@foxy.io/elements 1.14.0-beta.1 → 1.14.0-beta.10
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 +18 -18
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +4 -4
- 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 -0
- 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 +2 -2
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +26 -9
- 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 +1 -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-151ca103.js → shared-00070cc4.js} +1 -1
- package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
- package/dist/cdn/shared-007c4e34.js +1 -0
- package/dist/cdn/shared-07134f93.js +14 -0
- package/dist/cdn/shared-0ced76a0.js +358 -0
- package/dist/cdn/shared-0f9809ab.js +1 -0
- package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
- package/dist/cdn/shared-1761daef.js +15 -0
- package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
- package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/shared-31d03530.js +264 -0
- package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
- package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
- package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
- package/dist/cdn/shared-4ba926ca.js +1 -0
- package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
- package/dist/cdn/shared-59e44f29.js +1 -0
- package/dist/cdn/{shared-35415106.js → shared-5d94bacb.js} +1 -1
- package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
- package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
- package/dist/cdn/shared-6b7602c7.js +1 -0
- package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
- package/dist/cdn/{shared-99f45065.js → shared-7007dedb.js} +1 -1
- package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
- package/dist/cdn/shared-a3d2c48e.js +314 -0
- package/dist/cdn/shared-a46edf4b.js +1 -0
- package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/{shared-f2a4fd27.js → shared-b24377bf.js} +1 -1
- package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
- package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
- package/dist/cdn/{shared-6783c996.js → shared-c5ae5d33.js} +1 -1
- package/dist/cdn/shared-ca7c3b9a.js +1 -0
- package/dist/cdn/shared-d01035c5.js +1 -0
- package/dist/cdn/{shared-dbbe03f9.js → shared-d05c93a5.js} +1 -1
- package/dist/cdn/{shared-5d286626.js → shared-da787055.js} +1 -1
- package/dist/cdn/{shared-566252ac.js → shared-daf6b763.js} +1 -1
- package/dist/cdn/shared-df573cea.js +12 -0
- package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
- package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
- package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
- package/dist/cdn/shared-fe8a7aa2.js +1 -0
- package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
- package/dist/cdn/translations/shared/en.json +87 -3
- package/dist/elements/private/Checkbox/Checkbox.d.ts +3 -1
- package/dist/elements/private/Checkbox/Checkbox.js +45 -12
- package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
- package/dist/elements/private/Choice/Choice.js +10 -8
- 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/private/I18N/I18N.js +1 -1
- package/dist/elements/private/I18N/I18N.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +8 -4
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +46 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +350 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/index.d.ts +9 -0
- package/dist/elements/public/EmailTemplateForm/index.js +11 -0
- package/dist/elements/public/EmailTemplateForm/index.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/types.d.ts +17 -0
- package/dist/elements/public/EmailTemplateForm/types.js +2 -0
- package/dist/elements/public/EmailTemplateForm/types.js.map +1 -0
- package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
- package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
- package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
- package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js +8 -4
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +138 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +22 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js +157 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +88 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1336 -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 +150 -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.d.ts +23 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js +102 -58
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/types.d.ts +14 -0
- package/dist/elements/public/TemplateForm/types.js.map +1 -1
- package/dist/elements/public/index.d.ts +2 -0
- package/dist/elements/public/index.defined.d.ts +2 -0
- package/dist/elements/public/index.defined.js +2 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +2 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +125 -16
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -7
- package/dist/cdn/shared-35502e88.js +0 -1
- package/dist/cdn/shared-50744508.js +0 -15
- package/dist/cdn/shared-5388f705.js +0 -1
- package/dist/cdn/shared-7f588649.js +0 -1
- package/dist/cdn/shared-9467cb31.js +0 -572
- package/dist/cdn/shared-b98f88c9.js +0 -369
- package/dist/cdn/shared-c0161e6a.js +0 -1
- package/dist/cdn/shared-dbcffd8e.js +0 -1
- package/dist/cdn/shared-e057788f.js +0 -1
- package/dist/cdn/shared-e21a2aac.js +0 -1
- package/dist/cdn/shared-ebbef842.js +0 -1
- package/dist/cdn/shared-fd5b81be.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-60126eee.js";import"./shared-46ee137f.js";import"./shared-bb824ab4.js";import{C as e,a as t}from"./shared-31d03530.js";import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{_ as s,h as i}from"./shared-63eaded9.js";import{l as n}from"./shared-218ba06e.js";import{C as o}from"./shared-007c4e34.js";import{C as a}from"./shared-593f7e2c.js";import{N as r}from"./shared-44cfc617.js";import{T as l,a as d,S as c,R as u}from"./shared-d01035c5.js";import{c as h}from"./shared-4e709717.js";import{i as p}from"./shared-6d45a07b.js";import{G as g}from"./shared-da787055.js";import{l as f}from"./shared-07134f93.js";import"./shared-ff79f3f9.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import"./shared-ec861f31.js";import"./shared-1761daef.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";let y,x,_,m,b,$=e=>e;const v=a(l(d(r)));class k extends v{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.regions=[],this.region="",this.name="",this.code=""}static get properties(){return s(s({},super.properties),{},{disabled:{type:Boolean},readonly:{type:Boolean},regions:{type:Array},region:{type:String},name:{type:String},code:{type:String}})}render(){var e,t;return i(y||(y=$` <div class="${0}"> <div class="h-m flex justify-between items-center border-b border-contrast-10"> <div class="ml-m"> <span>${0}</span> ${0} </div> <button class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> <div class="flex flex-wrap p-xs"> ${0} <div style="border-radius:var(--lumo-size-s)" class="${0}"> <input placeholder="${0}" class="bg-transparent appearance-none h-s text-s px-s focus-outline-none" style="width:8rem" list="list" .value="${0}" ?disabled="${0}" @keydown="${0}" @input="${0}"> <button style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:add" class="icon-inline text-m"></iron-icon> </button> </div> <datalist id="list"> ${0} </datalist> </div> </div> `),h({"border border-contrast-10 rounded text-s":!0,"text-disabled":this.disabled}),this.name||this.code,this.name?i(x||(x=$`<span class="text-secondary">${0}</span>`),this.code):"",h({"mr-xs items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>this.dispatchEvent(new CustomEvent("delete"))),this.regions.map((e=>{var t,s;const n=null===(s=null===(t=this.data)||void 0===t?void 0:t.values[e])||void 0===s?void 0:s.default;return i(_||(_=$` <div class="flex items-center border border-contrast-10 h-s m-xs" style="border-radius:var(--lumo-size-s)"> <span class="mx-s"> <span>${0}</span> ${0} </span> <button class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> `),n||e,n?i(m||(m=$`<span class="text-secondary">${0}</span>`),e):"",h({"items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>{this.regions=this.regions.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("update:regions"))}))})),h({"h-s m-xs items-center transition-colors border border-contrast-10":!0,"hover-border-contrast-40":!this.disabled,"focus-within-ring-1 ring-primary-50 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),this.t("add_region"),this.region,this.disabled,(e=>{"Enter"===e.key&&this.region&&this.__addRegion()}),(e=>{const t=e.currentTarget;this.region=t.value}),h({"flex-shrink-0":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":!this.region,"bg-success-10 text-success cursor-pointer":!!this.region,"hover-bg-success hover-text-success-contrast":!!this.region,"focus-outline-none focus-ring-2 ring-inset ring-success-50":!!this.region}),!this.region,this.__addRegion,Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e.values)&&void 0!==t?t:{}).map((e=>i(b||(b=$`<option value="${0}">${0}</option>`),e.code,e.default))))}__addRegion(){this.regions=[...new Set([...this.regions,this.region])],this.region="",this.dispatchEvent(new CustomEvent("update:regions"))}}let S,w,j,O=e=>e;const T=c(l(d(r)));class q extends T{constructor(){super(...arguments),this.countries={},this.disabled=!1,this.readonly=!1,this.regions="",this.country=""}static get scopedElements(){return{"x-country-card":k,"iron-icon":customElements.get("iron-icon")}}static get properties(){return s(s({},super.properties),{},{countries:{type:Object},disabled:{type:Boolean},readonly:{type:Boolean},regions:{type:String},country:{type:String}})}render(){var e,t;return i(S||(S=O` <div> <div class="space-y-s"> ${0} <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m text-s px-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <button class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:add" class="icon-inline text-m"></iron-icon> </button> </div> </div> <datalist id="list"> ${0} </datalist> </div> `),Object.entries(this.countries).map((([e,t])=>{var n,o;let a;try{const t=new URL(this.regions);t.searchParams.set("country_code",e),a=t.toString()}catch(e){a=""}return i(w||(w=O` <x-country-card regions="${0}" code="${0}" name="${0}" href="${0}" lang="${0}" ns="${0}" ?disabled="${0}" ?readonly="${0}" @update:regions="${0}" @delete="${0}"> </x-country-card> `),JSON.stringify("*"===t?[]:t),e,p(null===(o=null===(n=this.data)||void 0===n?void 0:n.values[e])||void 0===o?void 0:o.default),a,this.lang,this.ns,this.disabled,this.readonly,(t=>{const i=s({},this.countries),n=t.currentTarget.regions;i[e]=n.length?n:"*",this.countries=i,this.dispatchEvent(new CustomEvent("update:countries"))}),(()=>{const t=s({},this.countries);delete t[e],this.countries=t,this.dispatchEvent(new CustomEvent("update:countries"))}))})),h({"h-m flex items-center rounded transition-colors":!0,"border border-contrast-10 ring-primary-50":!0,"hover-border-contrast-40":!this.disabled,"focus-within-ring-1 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),this.t("add_country"),this.country,this.disabled,this.readonly,(e=>{"Enter"===e.key&&this.country&&this.__addCountry()}),(e=>{const t=e.currentTarget;this.country=t.value}),h({"mr-xs flex-shrink-0":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":!this.country,"bg-success-10 text-success cursor-pointer":!!this.country,"hover-bg-success hover-text-success-contrast":!!this.country,"focus-outline-none focus-ring-2 ring-inset ring-success-50":!!this.country}),!this.country||this.disabled,this.__addCountry,Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e.values)&&void 0!==t?t:{}).map((e=>i(j||(j=O`<option value="${0}">${0}</option>`),e.cc2,e.default))))}__addCountry(){this.countries=s(s({},this.countries),{},{[this.country]:"*"}),this.country="",this.dispatchEvent(new CustomEvent("update:countries"))}}let N,J,F,E,C,H,I,V,z,A,D,R,B,G,L,M,P,U,W,Y,K,Q,X,Z,ee,te,se,ie=e=>e;const ne=c(u(a(l(d(r,"template-config-form")))));class oe extends ne{constructor(){super(...arguments),this.templates={},this.countries="",this.regions="",this.__addHiddenFieldInputValue=""}static get scopedElements(){return{"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-countries-list":q,"x-checkbox":o,"x-choice":e,"x-group":g}}static get properties(){return s(s({},super.properties),{},{__addHiddenFieldInputValue:{attribute:!1},countries:{type:String},regions:{type:String}})}render(){var e,t;const s=this.hiddenSelector,n=this.form.json?JSON.parse(this.form.json):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},segment_io:{usage:"none",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"}};return i(N||(N=ie` <div class="relative" aria-busy="${0}" aria-live="polite"> <div class="${0}"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),h({"space-y-l transition-opacity":!0,"opacity-50":!this.in("idle")}),s.matches("cart-type",!0)?"":this.__renderCartType(n),s.matches("foxycomplete",!0)?"":this.__renderFoxycomplete(n),s.matches("locations",!0)?"":this.__renderLocations(n),s.matches("hidden-fields",!0)?"":this.__renderHiddenFields(n),s.matches("cards",!0)?"":this.__renderCards(n),s.matches("checkout-type",!0)?"":this.__renderCheckoutType(n),s.matches("consent",!0)?"":this.__renderConsent(n),s.matches("fields",!0)?"":this.__renderFields(n),s.matches("google-analytics",!0)?"":this.__renderGoogleAnalytics(n),s.matches("segment-io",!0)?"":this.__renderSegmentIo(n),s.matches("troubleshooting",!0)?"":this.__renderTroubleshooting(n),s.matches("custom-config",!0)?"":this.__renderCustomConfig(n),s.matches("header",!0)?"":this.__renderHeader(n),s.matches("custom-fields",!0)?"":this.__renderCustomFields(n),s.matches("footer",!0)?"":this.__renderFooter(n),h({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderCartType(e){const{lang:t,ns:n}=this,o=["default","fullpage","custom"],a=!this.in("idle")||this.disabledSelector.matches("cart-type",!0);return i(J||(J=ie` <div data-testid="cart-type"> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="cart_type" ns="${0}"> </foxy-i18n> <x-choice data-testid="cart-type-choice" .value="${0}" .items="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> ${0} </x-choice> </x-group> ${0} </div> `),this.renderTemplateOrSlot("cart-type:before"),a?"text-disabled":"",t,n,e.cart_type,o,a,this.readonlySelector.matches("cart-type",!0),(t=>{this.edit({json:JSON.stringify(s(s({},e),{},{cart_type:t.detail}))})}),o.map((e=>i(F||(F=ie` <div slot="${0}-label" class="grid leading-s py-s"> <foxy-i18n lang="${0}" key="cart_type_${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs ${0}" lang="${0}" key="cart_type_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,t,e,n,a?"text-disabled":"text-secondary",t,e,n))),this.renderTemplateOrSlot("cart-type:after"))}__renderFoxycomplete(e){const{lang:n,ns:o}=this,a=this.disabledSelector.matches("foxycomplete",!0),r=this.readonlySelector.matches("foxycomplete",!0),l=["combobox","search","disabled"],d="none"===e.foxycomplete.usage?"disabled":e.foxycomplete.show_combobox?"combobox":"search",c=()=>i(E||(E=ie` <x-checkbox ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="show_country_flags" ns="${0}"></foxy-i18n> </x-checkbox> `),a,r,e.foxycomplete.show_flags,(t=>{const i=s(s({},e.foxycomplete),{},{show_flags:t.detail});this.edit({json:JSON.stringify(s(s({},e),{},{foxycomplete:i}))})}),n,o);return i(C||(C=ie` <div> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="foxycomplete" ns="${0}"> </foxy-i18n> <x-choice .value="${0}" .items="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> ${0} <div slot="combobox" class="space-y-m pb-s" ?hidden="${0}"> <div class="grid grid-cols-2 gap-m" style="max-width:16rem"> ${0} </div> ${0} </div> <div slot="search" class="pb-s" ?hidden="${0}"> ${0} </div> </x-choice> <div class="border-t border-contrast-10 p-m"> <x-checkbox ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="enable_postcode_lookup" ns="${0}"></foxy-i18n> </x-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("foxycomplete:before"),a?"text-disabled":"",n,o,d,l,a,r,(i=>{if(!(i instanceof t))return;const n=s(s({},e.foxycomplete),{},{usage:"disabled"===i.detail?"none":"required",show_combobox:"combobox"===i.detail});this.edit({json:JSON.stringify(s(s({},e),{},{foxycomplete:n}))})}),l.map((e=>i(H||(H=ie` <div slot="${0}-label" class="grid leading-s py-s"> <foxy-i18n lang="${0}" key="foxycomplete_${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs ${0}" lang="${0}" key="foxycomplete_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,n,e,o,a?"text-disabled":"text-secondary",n,e,o))),"combobox"!==d,["open","close"].map((t=>{const n="open"===t?"combobox_open":"combobox_close";return i(I||(I=ie` <vaadin-text-field label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}"> </vaadin-text-field> `),this.t(`${t}_icon`),e.foxycomplete[n],a,r,(t=>{const i=t.currentTarget,o=s(s({},e.foxycomplete),{},{[n]:i.value});this.edit({json:JSON.stringify(s(s({},e),{},{foxycomplete:o}))})}))})),c(),"search"!==d,c(),a,r,"enabled"===e.postal_code_lookup.usage,(t=>{const i={usage:t.detail?"enabled":"none"};this.edit({json:JSON.stringify(s(s({},e),{},{postal_code_lookup:i}))})}),n,o,this.renderTemplateOrSlot("foxycomplete:after"))}__renderLocations(e){const{lang:t,ns:s}=this,n=e.location_filtering,o=this.disabledSelector.matches("locations",!0),a=this.readonlySelector.matches("locations",!0),r="blacklist"===n.shipping_filter_type?"block":"allow",l="both"===n.usage?"copy":"blacklist"===n.billing_filter_type?"block":"allow",d=()=>{if("both"===n.usage)n.billing_filter_type=n.shipping_filter_type,n.billing_filter_values=n.shipping_filter_values;else{const e=Object.keys(n.billing_filter_values).length>0,t=Object.keys(n.shipping_filter_values).length>0;n.usage=e||t?e&&!t?"billing":t&&!e?"shipping":"independent":"none"}};return i(V||(V=ie` ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="location_plural" ns="${0}"> </foxy-i18n> <div class="grid sm-grid-cols-2 bg-contrast-10" style="gap:1px"> <x-group class="bg-base pt-m"> <foxy-i18n class="${0}" slot="header" lang="${0}" key="shipping" ns="${0}"> </foxy-i18n> <x-choice .items="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> <foxy-i18n slot="allow-label" lang="${0}" key="allowlist" ns="${0}"></foxy-i18n> <foxy-i18n slot="block-label" lang="${0}" key="blocklist" ns="${0}"></foxy-i18n> <x-countries-list countries="${0}" regions="${0}" class="mb-m" href="${0}" slot="${0}" lang="${0}" ns="${0}" ?disabled="${0}" ?readonly="${0}" @update:countries="${0}"> </x-countries-list> </x-choice> </x-group> <x-group class="bg-base pt-m"> <foxy-i18n class="${0}" slot="header" lang="${0}" key="billing" ns="${0}"> </foxy-i18n> <x-choice .items="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> <foxy-i18n slot="allow-label" lang="${0}" key="allowlist" ns="${0}"></foxy-i18n> <foxy-i18n slot="block-label" lang="${0}" key="blocklist" ns="${0}"></foxy-i18n> <foxy-i18n slot="copy-label" lang="${0}" key="same_as_shipping" ns="${0}"></foxy-i18n> <x-countries-list countries="${0}" regions="${0}" class="mb-m" href="${0}" slot="${0}" lang="${0}" ns="${0}" ?disabled="${0}" ?readonly="${0}" ?hidden="${0}" @update:countries="${0}"> </x-countries-list> </x-choice> </x-group> </div> </x-group> ${0} `),this.renderTemplateOrSlot("locations:before"),o?"text-disabled":"",t,s,o?"text-disabled":"text-tertiary",t,s,["allow","block"],r,o,a,(t=>{"both"!==n.usage&&(n.usage="independent"),n.shipping_filter_type="block"===t.detail?"blacklist":"whitelist",d(),this.edit({json:JSON.stringify(e)})}),t,s,t,s,JSON.stringify(n.shipping_filter_values),this.regions,this.countries,r,t,s,o,a,(t=>{n.shipping_filter_values=t.currentTarget.countries,d(),this.edit({json:JSON.stringify(e)})}),o?"text-disabled":"text-tertiary",t,s,["allow","block","copy"],l,o,a,(t=>{"copy"===t.detail?n.usage="both":(n.usage="independent",n.billing_filter_type="block"===t.detail?"blacklist":"whitelist"),d(),this.edit({json:JSON.stringify(e)})}),t,s,t,s,t,s,JSON.stringify(n.billing_filter_values),this.regions,this.countries,l,t,s,o,a,"copy"===l,(t=>{n.billing_filter_values=t.currentTarget.countries,d(),this.edit({json:JSON.stringify(e)})}),this.renderTemplateOrSlot("locations:after"))}__renderHiddenFields(e){const{lang:t,ns:s}=this,n=[],o=[],a=e.cart_display_config,r=this.disabledSelector.matches("hidden-fields",!0),l=this.readonlySelector.matches("hidden-fields",!0);for(const e in a){if(!e.startsWith("show_"))continue;const t=e.substring(5);n.push(t),"required"!==a.usage||a[e]||o.push(t)}"required"===a.usage&&o.push(...a.hidden_product_options);const d=()=>{a.usage="required",n.includes(this.__addHiddenFieldInputValue)?a[`show_${this.__addHiddenFieldInputValue}`]=!1:a.hidden_product_options.includes(this.__addHiddenFieldInputValue)||a.hidden_product_options.push(this.__addHiddenFieldInputValue),this.edit({json:JSON.stringify(e)}),this.__addHiddenFieldInputValue=""},c="calc(var(--lumo-border-radius-l) / 1.2)",u=0===o.length?[c]:["0","0",c,c];return i(z||(z=ie` <div> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="hidden_fields" ns="${0}"> </foxy-i18n> <div class="divide-y divide-contrast-10"> ${0} </div> <div style="border-radius:${0}" class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m px-m focus-outline-none" list="hidden-fields-list" .value="${0}" ?disabled="${0}" @keydown="${0}" @input="${0}"> <datalist id="hidden-fields-list"> ${0} </datalist> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:add" class="icon-inline text-m"></iron-icon> </button> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("hidden-fields:before"),r?"text-disabled":"",t,s,o.map((o=>i(A||(A=ie` <div class="${0}"> ${0} <button class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m m-auto"></iron-icon> </button> </div> `),h({"h-m ml-m pr-xs flex items-center justify-between":!0,"text-secondary":l,"text-disabled":r}),n.includes(o)?i(D||(D=ie`<foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n>`),t,o,s):i(R||(R=ie`<span>${0}</span>`),o),h({"w-xs h-xs rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!r,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!r,"cursor-default":r,flex:!l,hidden:l}),r,(()=>{"boolean"==typeof a[`show_${o}`]?a[`show_${o}`]=!0:a.hidden_product_options=a.hidden_product_options.filter((e=>e!==o)),this.edit({json:JSON.stringify(e)})})))),u.join(" "),h({"h-m flex items-center ring-inset ring-primary-50 focus-within-ring-2":!0,"border-t border-contrast-10":o.length>0,flex:!l,hidden:l}),this.t("add_field"),f(this.__addHiddenFieldInputValue),r,(e=>"Enter"===e.key&&d()),(e=>{this.__addHiddenFieldInputValue=e.currentTarget.value}),n.filter((e=>!o.includes(e))).map((e=>i(B||(B=ie`<option value="${0}">${0}</option>`),e,this.t(e)))),this.t("add_field"),h({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":!this.__addHiddenFieldInputValue,"bg-success-10 text-success cursor-pointer":!!this.__addHiddenFieldInputValue,"hover-bg-success hover-text-success-contrast":!!this.__addHiddenFieldInputValue,"focus-outline-none focus-ring-2":!!this.__addHiddenFieldInputValue}),!this.__addHiddenFieldInputValue,d,this.renderTemplateOrSlot("hidden-fields:after"))}__renderCards(e){const{lang:t,ns:s}=this,o=this.disabledSelector.matches("cards",!0),a=this.readonlySelector.matches("cards",!0),r=e.supported_payment_cards;let l,d;"all_cards"===e.csc_requirements?(l=!1,d=!1):"sso_only"===e.csc_requirements?(l=!0,d=!1):(l=!0,d=!0);const c={amex:"American Express",diners:"Diners Club",discover:"Discover",jcb:"JCB",maestro:"Maestro",mastercard:"Mastercard",unionpay:"UnionPay",visa:"Visa"};return i(G||(G=ie` <div> ${0} <div class="space-y-xs"> <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="supported_cards" ns="${0}"> </foxy-i18n> <div class="flex flex-wrap m-xs p-s"> ${0} </div> <div class="flex flex-wrap p-s border-t border-contrast-10"> <x-checkbox class="m-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="leading-s block" lang="${0}" key="skip_csc_for_saved" ns="${0}"> </foxy-i18n> </x-checkbox> <x-checkbox class="m-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="leading-s block" lang="${0}" key="skip_csc_for_sso" ns="${0}"> </foxy-i18n> </x-checkbox> </div> </x-group> <foxy-i18n class="text-xs leading-s block ${0}" lang="${0}" key="supported_cards_disclaimer" ns="${0}"> </foxy-i18n> </div> ${0} </div> `),this.renderTemplateOrSlot("cards:before"),o?"text-disabled":"",t,s,Object.entries(n).map((([t,s])=>{if(!c[t])return;const n=r.includes(t);return i(L||(L=ie` <div class="${0}"> <label class="${0}"> <div class="h-s">${0}</div> <div class="text-s font-medium mx-s my-auto leading-none"> ${0} </div> <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> </div> `),h({"m-xs rounded":!0,"opacity-50 cursor-default":o,"cursor-pointer ring-primary-50 focus-within-ring-2":!o}),h({"overflow-hidden transition-colors flex rounded border":!0,"border-primary bg-primary-10 text-primary":n&&!a,"border-contrast bg-contrast-5 text-secondary":n&&a,"hover-text-body":n&&!o&&!a,"border-contrast-10":!n,"hover-border-primary":!n&&!o&&!a,"hover-text-primary":!n&&!o&&!a}),s,c[t],o,n,(s=>{if(a)return s.preventDefault();s.stopPropagation(),n?r.splice(r.indexOf(t),1):r.push(t),this.edit({json:JSON.stringify(e)})}))})),o||"new_cards_only"===e.csc_requirements,a,l,(t=>{e.csc_requirements=t.detail?"sso_only":"all_cards",this.edit({json:JSON.stringify(e)})}),t,s,o,a,d,(t=>{e.csc_requirements=t.detail?"new_cards_only":l?"sso_only":"all_cards",this.edit({json:JSON.stringify(e)})}),t,s,o?"text-disabled":"text-secondary",t,s,this.renderTemplateOrSlot("cards:after"))}__renderCheckoutType(e){const{lang:t,ns:s}=this,n=!this.in("idle")||this.disabledSelector.matches("checkout-type",!0),o=this.readonlySelector.matches("checkout-type",!0);return i(M||(M=ie` <div data-testid="checkout-type"> ${0} <div class="space-y-xs"> <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="checkout_type" ns="${0}"> </foxy-i18n> <x-choice data-testid="checkout-type-choice" ?disabled="${0}" ?readonly="${0}" .items="${0}" .value="${0}" .getText="${0}" @change="${0}"> </x-choice> </x-group> <foxy-i18n class="text-xs leading-s block ${0}" lang="${0}" key="checkout_type_helper_text" ns="${0}"> </foxy-i18n> </div> ${0} </div> `),this.renderTemplateOrSlot("checkout-type:before"),n?"text-disabled":"",t,s,n,o,["default_account","default_guest","guest_only","account_only"],e.checkout_type,(e=>this.t(`checkout_type_${e}`)),(t=>{e.checkout_type=t.detail,this.edit({json:JSON.stringify(e)})}),n?"text-disabled":"text-secondary",t,s,this.renderTemplateOrSlot("checkout-type:after"))}__renderConsent(e){const{lang:t,ns:s}=this,n=e.tos_checkbox_settings,o=e.newsletter_subscribe,a=e.eu_secure_data_transfer_consent,r=!this.in("idle")||this.disabledSelector.matches("consent",!0),l=this.readonlySelector.matches("consent",!0),d="margin-left: calc(1.125rem + (var(--lumo-space-m) * 2))";return i(P||(P=ie` <div data-testid="consent"> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="consent" ns="${0}"> </foxy-i18n> <x-checkbox data-testid="consent-tos-check" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" class="m-m" @change="${0}"> <div class="flex flex-col"> <foxy-i18n lang="${0}" key="display_tos_link" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs leading-s ${0}" lang="${0}" key="display_tos_link_explainer" ns="${0}"> </foxy-i18n> </div> <div slot="content" ?hidden="${0}"> <vaadin-text-field data-testid="consent-tos-field" label="${0}" class="w-full mt-m" placeholder="https://example.com/path/to/tos" clear-button-visible ?disabled="${0}" ?readonly="${0}" .value="${0}" @input="${0}"> </vaadin-text-field> <div class="flex flex-wrap -mx-s -mb-s mt-s"> <x-checkbox data-testid="consent-tos-require-check" class="m-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="leading-s block" lang="${0}" key="require_consent" ns="${0}"> </foxy-i18n> </x-checkbox> <x-checkbox data-testid="consent-tos-state-check" class="m-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="leading-s block" lang="${0}" key="checked_by_default" ns="${0}"> </foxy-i18n> </x-checkbox> </div> </div> </x-checkbox> <div style="${0}" class="border-b border-contrast-10"></div> <x-checkbox data-testid="consent-mail-check" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" class="m-m" @change="${0}"> <div class="flex flex-col"> <foxy-i18n lang="${0}" key="newsletter_subscribe" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs leading-s ${0}" lang="${0}" key="newsletter_subscribe_explainer" ns="${0}"> </foxy-i18n> </div> </x-checkbox> <div style="${0}" class="border-b border-contrast-10"></div> <x-checkbox data-testid="consent-sdta-check" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" class="m-m" @change="${0}"> <div class="flex flex-col"> <foxy-i18n lang="${0}" key="display_sdta" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs leading-s ${0}" lang="${0}" key="display_sdta_explainer" ns="${0}"> </foxy-i18n> </div> </x-checkbox> </x-group> ${0} </div> `),this.renderTemplateOrSlot("consent:before"),r?"text-disabled":"",t,s,r,l,"required"===n.usage||"optional"===n.usage,(t=>{n.initial_state=t.detail?n.initial_state:"unchecked",n.is_hidden=!1,n.usage=t.detail?"required":"none",n.url=t.detail?n.url:"",this.edit({json:JSON.stringify(e)})}),t,s,r?"text-disabled":"text-secondary",t,s,"none"===n.usage,this.t("location_url"),r,l,n.url,(t=>{n.url=t.currentTarget.value,this.edit({json:JSON.stringify(e)})}),r,l,"required"===n.usage,(t=>{n.usage=t.detail?"required":"optional",this.edit({json:JSON.stringify(e)})}),t,s,r,l,"checked"===n.initial_state,(t=>{n.initial_state=t.detail?"checked":"unchecked",this.edit({json:JSON.stringify(e)})}),t,s,d,r,l,"required"===o.usage,(t=>{o.usage=t.detail?"required":"none",this.edit({json:JSON.stringify(e)})}),t,s,r?"text-disabled":"text-secondary",t,s,d,r,l,"required"===a.usage,(t=>{a.usage=t.detail?"required":"none",this.edit({json:JSON.stringify(e)})}),t,s,r?"text-disabled":"text-secondary",t,s,this.renderTemplateOrSlot("consent:after"))}__renderFields(e){const{lang:t,ns:s}=this,n=!this.in("idle")||this.disabledSelector.matches("fields",!0),o=this.readonlySelector.matches("fields",!0),a=e.custom_checkout_field_requirements;return i(U||(U=ie` <div data-testid="fields"> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="field_plural" ns="${0}"> </foxy-i18n> <div class="bg-contrast-10 grid grid-cols-1 md-grid-cols-2" style="gap:1px"> ${0} <div class="bg-base hidden md-block"></div> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("fields:before"),n?"text-disabled":"",t,s,Object.entries({cart_controls:["enabled","disabled"],coupon_entry:["enabled","disabled"],billing_first_name:["default","optional","required","hidden"],billing_last_name:["default","optional","required","hidden"],billing_company:["default","optional","required","hidden"],billing_tax_id:["default","optional","required","hidden"],billing_phone:["default","optional","required","hidden"],billing_address1:["default","optional","required","hidden"],billing_address2:["default","optional","required","hidden"],billing_city:["default","optional","required","hidden"],billing_region:["default","optional","required","hidden"],billing_postal_code:["default","optional","required","hidden"],billing_country:["default","optional","required","hidden"]}).map((([r,l])=>i(W||(W=ie` <label class="${0}"> <foxy-i18n class="flex-1" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="${0}"> ${0} </div> <div class="${0}"> <select data-testid="fields-${0}" class="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> ${0} </select> <iron-icon class="pointer-events-none icon-inline text-xl" icon="icons:expand-more"> </iron-icon> </div> </label> `),h({"flex items-center pl-m bg-base":!0,"text-secondary":o,"text-disabled":n}),t,r.replace("billing_",""),s,h({"flex items-center text-right font-medium h-s px-s m-xs":o,hidden:!o}),this.t(l.find((e=>a[r]===e))),h({"px-s m-xs flex items-center rounded leading-none":!0,"ring-primary-50 ring-inset focus-within-ring-2":!n,"hover-text-primary":!n,"cursor-pointer":!n,"cursor-default":n,flex:!o,hidden:o}),r,h({"h-s mr-xs text-right appearance-none bg-transparent font-medium":!0,"focus-outline-none cursor-pointer":!n,"cursor-default":n}),n,o,(t=>{const s=t.currentTarget,i=s.options[s.options.selectedIndex].value;a[r]=i,this.edit({json:JSON.stringify(e)})}),l.map((e=>i(Y||(Y=ie` <option value="${0}" ?selected="${0}"> ${0} </option> `),e,a[r]===e,this.t(e))))))),this.renderTemplateOrSlot("fields:after"))}__renderGoogleAnalytics(e){const{lang:t,ns:s}=this,n=e.analytics_config,o=n.segment_io,a=n.google_analytics,r=!this.in("idle")||this.disabledSelector.matches("google-analytics",!0),l=this.readonlySelector.matches("google-analytics",!0);return i(K||(K=ie` <div data-testid="google-analytics"> ${0} <x-group frame> <span class="${0}" slot="header">Google Analytics</span> <div class="p-m space-y-m"> <vaadin-text-field data-testid="google-analytics-field" class="w-full" label="${0}" placeholder="UA-1234567-1" helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible @keydown="${0}" @input="${0}"> </vaadin-text-field> <x-checkbox data-testid="google-analytics-check" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <div class="flex flex-col"> <foxy-i18n lang="${0}" key="ga_include_on_site" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs leading-s ${0}" lang="${0}" key="ga_include_on_site_explainer" ns="${0}"> </foxy-i18n> </div> </x-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("google-analytics:before"),r?"text-disabled":"",this.t("ga_account_id"),this.t("ga_account_id_explainer"),f(a.account_id),r,l,(e=>"Enter"===e.key&&this.submit()),(t=>{a.account_id=t.currentTarget.value,a.usage=a.account_id?"required":"none",n.usage=a.account_id||o.account_id?"required":"none",this.edit({json:JSON.stringify(e)})}),r,l,a.include_on_site,(t=>{a.include_on_site=t.detail,this.edit({json:JSON.stringify(e)})}),t,s,r?"text-disabled":"text-secondary",t,s,this.renderTemplateOrSlot("google-analytics:after"))}__renderSegmentIo(e){const t=e.analytics_config,s=t.segment_io,n=t.google_analytics,o=!this.in("idle")||this.disabledSelector.matches("segment-io",!0),a=this.readonlySelector.matches("segment-io",!0);return i(Q||(Q=ie` <div data-testid="segment-io"> ${0} <x-group frame> <span class="${0}" slot="header">Segment.io</span> <div class="p-m"> <vaadin-text-field data-testid="segment-io-field" class="w-full" label="${0}" placeholder="MY-WRITE-KEY" helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible @keydown="${0}" @input="${0}"> </vaadin-text-field> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("segment-io:before"),o?"text-disabled":"",this.t("sio_account_id"),this.t("sio_account_id_explainer"),f(s.account_id),o,a,(e=>"Enter"===e.key&&this.submit()),(i=>{s.account_id=i.currentTarget.value,s.usage=s.account_id?"required":"none",t.usage=n.account_id||s.account_id?"required":"none",this.edit({json:JSON.stringify(e)})}),this.renderTemplateOrSlot("segment-io:after"))}__renderTroubleshooting(e){const{lang:t,ns:s}=this,n=e.debug,o=!this.in("idle")||this.disabledSelector.matches("troubleshooting",!0),a=this.readonlySelector.matches("troubleshooting",!0);return i(X||(X=ie` <div data-testid="troubleshooting"> ${0} <x-group frame> <foxy-i18n class="${0}" slot="header" lang="${0}" key="troubleshooting" ns="${0}"> </foxy-i18n> <div class="p-m space-y-m"> <x-checkbox data-testid="troubleshooting-check" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <div class="flex flex-col"> <foxy-i18n lang="${0}" key="troubleshooting_debug" ns="${0}"></foxy-i18n> <foxy-i18n class="text-xs leading-s ${0}" lang="${0}" key="troubleshooting_debug_explainer" ns="${0}"> </foxy-i18n> </div> </x-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("troubleshooting:before"),o?"text-disabled":"",t,s,o,a,"required"===n.usage,(t=>{n.usage=t.detail?"required":"none",this.edit({json:JSON.stringify(e)})}),t,s,o?"text-disabled":"text-secondary",t,s,this.renderTemplateOrSlot("troubleshooting:after"))}__renderCustomConfig(e){return i(Z||(Z=ie` <div data-testid="custom-config"> ${0} <vaadin-text-area data-testid="custom-config-field" class="w-full" label="${0}" placeholder='{ "key": "value" }' helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}"> </vaadin-text-area> ${0} </div> `),this.renderTemplateOrSlot("custom-config:before"),this.t("custom_config"),this.t("custom_config_helper_text"),e.custom_config?JSON.stringify(e.custom_config,null,2):"",!this.in("idle")||this.disabledSelector.matches("custom-config",!0),this.readonlySelector.matches("custom-config",!0),(t=>{const s=t.currentTarget;try{e.custom_config=s.value?JSON.parse(s.value):"",this.edit({json:JSON.stringify(e)}),s.invalid=!1}catch(e){s.invalid=!0}}),this.renderTemplateOrSlot("custom-config:after"))}__renderHeader(e){return i(ee||(ee=ie` <div data-testid="header"> ${0} <vaadin-text-area data-testid="header-field" class="w-full" label="${0}" helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}"> </vaadin-text-area> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.t("custom_header"),this.t("custom_header_helper_text"),e.custom_script_values.header,!this.in("idle")||this.disabledSelector.matches("header",!0),this.readonlySelector.matches("header",!0),(t=>{const i=t.currentTarget,n=s(s({},e.custom_script_values),{},{header:i.value});this.edit({json:JSON.stringify(s(s({},e),{},{custom_script_values:n}))})}),this.renderTemplateOrSlot("header:after"))}__renderCustomFields(e){return i(te||(te=ie` <div data-testid="custom-fields"> ${0} <vaadin-text-area data-testid="custom-fields-field" class="w-full" label="${0}" helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}"> </vaadin-text-area> ${0} </div> `),this.renderTemplateOrSlot("custom-fields:before"),this.t("custom_fields"),this.t("custom_fields_helper_text"),e.custom_script_values.checkout_fields,!this.in("idle")||this.disabledSelector.matches("custom-fields",!0),this.readonlySelector.matches("custom-fields",!0),(t=>{const s=t.currentTarget.value;e.custom_script_values.checkout_fields=s,this.edit({json:JSON.stringify(e)})}),this.renderTemplateOrSlot("custom-fields:after"))}__renderFooter(e){return i(se||(se=ie` <div data-testid="footer"> ${0} <vaadin-text-area data-testid="footer-field" class="w-full" label="${0}" helper-text="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}"> </vaadin-text-area> ${0} </div> `),this.renderTemplateOrSlot("footer:before"),this.t("custom_footer"),this.t("custom_footer_helper_text"),e.custom_script_values.footer,!this.in("idle")||this.disabledSelector.matches("footer",!0),this.readonlySelector.matches("footer",!0),(t=>{const i=t.currentTarget,n=s(s({},e.custom_script_values),{},{footer:i.value});this.edit({json:JSON.stringify(s(s({},e),{},{custom_script_values:n}))})}),this.renderTemplateOrSlot("footer:after"))}}customElements.define("foxy-template-config-form",oe);export{oe as TemplateConfigForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-bb824ab4.js";import{C as e,a as t}from"./shared-31d03530.js";import"./shared-0ced76a0.js";import"./shared-daf6b763.js";import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{_ as a,j as i,h as s}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{S as r,T as n,a as o}from"./shared-d01035c5.js";import{c as d}from"./shared-4e709717.js";import"./shared-4ba926ca.js";import"./shared-a3d2c48e.js";import"./shared-ec861f31.js";import{G as l}from"./shared-da787055.js";import{P as c}from"./shared-b24377bf.js";import{C as h}from"./shared-593f7e2c.js";import{N as m}from"./shared-44cfc617.js";import{l as p}from"./shared-07134f93.js";import"./shared-ff79f3f9.js";import"./shared-1761daef.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-60126eee.js";import"./shared-00563cb0.js";import"./shared-6d45a07b.js";import"./shared-7684cb05.js";let f,u,$,y,v,b,x,_=e=>e;const g=r(n(h(o(m,"template-form"))));class j extends g{constructor(){super(...arguments),this.templates={},this.__cacheState="idle",this.__contentChoice="default"}static get properties(){return a(a({},super.properties),{},{__cacheState:{attribute:!1},__contentChoice:{attribute:!1}})}static get styles(){return[...super.styles,i(f||(f=_`#cached-content::part(input-field){max-height:15em}`))]}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-text-area":customElements.get("vaadin-text-area"),"vaadin-button":customElements.get("vaadin-button"),"x-property-table":c,"x-choice":e,"x-group":l}}render(){var e,t;const{hiddenSelector:a,href:i,lang:r,ns:n}=this,o=i?"delete":"create",l=this.in("busy"),c=this.in("fail");return s(u||(u=_` <div class="space-y-m"> ${0} ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),a.matches("description",!0)?"":this.__renderDescription(),a.matches("content",!0)?"":this.__renderContent(),a.matches("timestamps",!0)||!i?"":this.__renderTimestamps(),a.matches(o)?"":this.__renderAction(o),d({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!l&&!c}),c?"error":l?"busy":"empty",r,n,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderDescription(){var e,t;const a="description";return s($||($=_` <div> ${0} <vaadin-text-field data-testid="${0}" class="w-full mb-s" label="${0}" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${a}:before`),a,this.t(a),!this.in("idle")||this.disabledSelector.matches(a),this.readonlySelector.matches(a),null!==(t=null===(e=this.form)||void 0===e?void 0:e.description)&&void 0!==t?t:"",(e=>"Enter"===e.key&&this.submit()),(e=>{this.edit({description:e.currentTarget.value})}),this.renderTemplateOrSlot(`${a}:after`))}__renderContent(){var e;const a="content",i=!this.in("idle")||this.disabledSelector.matches(a),r=this.readonlySelector.matches(a),n=this.form.content_url?"url":this.form.content?"clipboard":this.__contentChoice;return s(y||(y=_` <div data-testid="content"> ${0} <x-group frame> <foxy-i18n class="${0}" lang="${0}" slot="header" key="template" ns="${0}"> </foxy-i18n> <x-choice data-testid="content-type" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} <div slot="url" ?hidden="${0}"> <div class="flex items-center mt-0 mb-m"> <vaadin-text-field data-testid="content-url" class="mr-s flex-grow" ?readonly="${0}" ?disabled="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> <vaadin-button data-testid="cache" class="relative" ?hidden="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="cache" ns="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" class="m-auto" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </vaadin-button> </div> </div> <div slot="clipboard" ?hidden="${0}"> <vaadin-text-area id="cached-content" data-testid="content-clipboard" class="w-full mb-m" ?readonly="${0}" ?disabled="${0}" .value="${0}" @input="${0}"> </vaadin-text-area> </div> </x-choice> </x-group> ${0} </div> `),this.renderTemplateOrSlot("content:before"),d({"transition-colors":!0,"text-disabled":i}),this.lang,this.ns,n,["default","url","clipboard"],r,i,(e=>{e instanceof t&&(this.edit({content:"",content_url:""}),this.__contentChoice=e.detail)}),["default","url","clipboard"].map((e=>s(v||(v=_` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="template_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="template_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),"url"!==n,r,i,this.form.content_url,(e=>"Enter"===e.key&&this.submit()),(e=>{const t=e.currentTarget.value;this.edit({content:"",content_url:t})}),r||this.form.content_url!==(null===(e=this.data)||void 0===e?void 0:e.content_url),i||"busy"===this.__cacheState,this.__cache,d({"relative transition-opacity":!0,"opacity-0":"idle"!==this.__cacheState}),this.lang,this.ns,d({"absolute inset-0 flex transition-opacity":!0,"opacity-0":"idle"===this.__cacheState}),"fail"===this.__cacheState?"error":"busy",this.lang,this.ns,"clipboard"!==n,r,i,p(this.form.content),(e=>{const t=e.currentTarget.value;this.edit({content:t,content_url:""})}),this.renderTemplateOrSlot("content:after"))}__renderTimestamps(){const e="timestamps";return s(b||(b=_` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot(`${e}:after`))}__renderAction(e){const{disabledSelector:t,href:a,lang:i,ns:r}=this,n=this.in({idle:{template:{dirty:"valid"}}}),o=this.in({idle:{snapshot:{dirty:"valid"}}}),d=!this.in("idle")||t.matches(e,!0),l=n||o;return s(x||(x=_` <div> ${0} <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" data-testid="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0}" data-testid="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="${0}" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),i,r,(e=>{e.detail.cancelled||this.delete()}),this.in("idle")?"primary "+(a?"error":"success"):"",e,this.in({idle:"template"})&&!l||d,(t=>{if("delete"===e){this.renderRoot.querySelector("#confirm").show(t.currentTarget)}else this.submit()}),r,e,i,this.renderTemplateOrSlot(`${e}:after`))}async __cache(){var e,t;this.__cacheState="busy";try{const a=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href)&&void 0!==t?t:"",i=await new j.API(this).fetch(a,{method:"POST"});this.__cacheState=i.ok?"idle":"fail"}catch(e){this.__cacheState="fail"}}}customElements.define("foxy-template-form",j);export{j as TemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{h as t}from"./shared-63eaded9.js";import{C as e}from"./shared-593f7e2c.js";import{N as s}from"./shared-44cfc617.js";import{T as i,a as r}from"./shared-d01035c5.js";import{c as a}from"./shared-4e709717.js";import"./shared-46ee137f.js";import"./shared-ff79f3f9.js";import"./shared-60126eee.js";import"./shared-1761daef.js";import"./shared-6d45a07b.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";let n,o,d,c,l,m,h,p,u,f,v,y,_=t=>t;const $=i(e(r(s,"transaction-card")));class x extends ${constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(n||(n=_` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(o||(o=_` <div class="flex items-center justify-between"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){const t=await super._sendGet(),e=await super._fetch(t._links["fx:store"].href);return this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",t}__renderTotal(){const e=this.data;let s;if(e){const i=`${e.total_order} ${e.currency_code}`,r=this.__currencyDisplay;s=t(d||(d=_` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:i,currencyDisplay:r}),this.lang,this.ns)}else s=t(c||(c=_`​`));return t(l||(l=_` <div data-testid="total"> ${0} <div class="font-semibold truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const a=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(m||(m=_` <div data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[a])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${a}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[a])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count:i.length};r=t(h||(h=_` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(p||(p=_`​`));return t(u||(u=_` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(f||(f=_`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(v||(v=_`​`));return t(y||(y=_` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",x);export{x as TransactionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-60126eee.js";import"./shared-46ee137f.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{T as s}from"./shared-7007dedb.js";export{T as TransactionsTable}from"./shared-7007dedb.js";import"./shared-ff79f3f9.js";import"./shared-63eaded9.js";import"./shared-d01035c5.js";import"./shared-1761daef.js";import"./shared-c5ae5d33.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./foxy-nucleon-element.js";import"./shared-44cfc617.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-bb824ab4.js";import"./shared-0ced76a0.js";import"./shared-daf6b763.js";import"./foxy-spinner.js";import"./foxy-i18n.js";export{U as UserForm}from"./shared-0f9809ab.js";import"./shared-df573cea.js";import"./shared-ff79f3f9.js";import"./shared-63eaded9.js";import"./shared-4ba926ca.js";import"./shared-00563cb0.js";import"./shared-1761daef.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./shared-d01035c5.js";import"./shared-4e709717.js";import"./shared-46ee137f.js";import"./shared-60126eee.js";import"./shared-007c4e34.js";import"./shared-f0a83bd6.js";import"./shared-31d03530.js";import"./shared-ec861f31.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-a3d2c48e.js";import"./shared-da787055.js";import"./shared-44cfc617.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-0ced76a0.js";import"./foxy-form-dialog.js";import{r as e}from"./shared-0f9809ab.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{h as s}from"./shared-63eaded9.js";import{T as a}from"./shared-c5ae5d33.js";import"./shared-df573cea.js";import"./shared-ff79f3f9.js";import"./shared-daf6b763.js";import"./shared-4ba926ca.js";import"./shared-00563cb0.js";import"./shared-1761daef.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./shared-d01035c5.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-bb824ab4.js";import"./shared-007c4e34.js";import"./shared-46ee137f.js";import"./shared-f0a83bd6.js";import"./shared-31d03530.js";import"./shared-ec861f31.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-a3d2c48e.js";import"./shared-da787055.js";import"./shared-44cfc617.js";import"./shared-b738ee96.js";import"./shared-60126eee.js";import"./foxy-nucleon-element.js";let t,r,o,d,i,m,n,l=e=>e;class p extends a{constructor(){super(...arguments),this.columns=[p.nameColumn,p.emailColumn,p.rolesColumn,p.lastUpdatedColumn,p.actionsColumn]}render(){return s(t||(t=l` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}p.nameColumn={cell:e=>s(r||(r=l` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),e.data.first_name,e.data.last_name)},p.emailColumn={hideBelow:"md",cell:e=>s(o||(o=l` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),e.data.email)},p.rolesColumn={cell:a=>s(d||(d=l` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>s(i||(i=l` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",e.find((e=>e.property===t)).icon))))},p.lastUpdatedColumn={hideBelow:"lg",cell:e=>s(m||(m=l` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:e.data.date_modified}),e.lang,e.ns,JSON.stringify({value:e.data.date_modified}),e.lang,e.ns)},p.actionsColumn={cell:e=>s(n||(n=l` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(s=>{const a=s.target,t=a.getRootNode().querySelector("#form");t.href=e.data._links.self.href,t.show(a)}),e.lang,e.ns)},customElements.define("foxy-users-table",p);export{p as UsersTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-63eaded9.js";import{T as e}from"./shared-c5ae5d33.js";import{a as s}from"./shared-d01035c5.js";import{p as a}from"./shared-6b7602c7.js";let n,o,r,i,c=t=>t;class l extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[l.priceColumn,l.summaryColumn,l.statusColumn,l.subTokenURLColumn]}}l.priceColumn={cell:e=>{const s=e.data._embedded["fx:last_transaction"],o=`${s.total_order} ${s.currency_code}`;return e.html(n||(n=c`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n frequencies"
|
|
4
4
|
class="font-semibold text-m font-tnum"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,A as t}from"./shared-
|
|
1
|
+
import{F as e,A as t}from"./shared-1761daef.js";class s extends t{constructor(t){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((c,a)=>{const o="string"==typeof n[0]?new s.WHATWGRequest(...n):n[0];o.headers.set("Content-Type","application/json"),o.headers.set("FOXY-API-VERSION","1");const r=new e("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:o,resolve:c,reject:a});t.dispatchEvent(r),r.defaultPrevented||fetch(o).then(c).catch(a)}))})}}s.FetchEvent=e;export{s as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as e,_ as s,j as t,h as r}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{T as a}from"./shared-d01035c5.js";import{c as o}from"./shared-4e709717.js";class i extends CustomEvent{constructor(e){super("change",{detail:e})}}let d,c,l=e=>e;class n extends(a(e)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return s(s({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(d||(d=l`.ml-xxl{margin-left:calc(var(--lumo-space-m) + 1.125rem)}.check{height:1.125rem;width:1.125rem}`))]}render(){return r(c||(c=l` <label class="${0}"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> <div class="flex-1 font-lumo leading-m -mt-xs ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),o({"flex group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),o({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),o({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new i(this.checked))}),o({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{n as C};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{k as e,E as n,N as t,B as i,P as s,A as r}from"./shared-63eaded9.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
* This code may only be used under the BSD style license found at
|
|
6
|
+
* http://polymer.github.io/LICENSE.txt
|
|
7
|
+
* The complete set of authors may be found at
|
|
8
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
+
* The complete set of contributors may be found at
|
|
10
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
+
* Code distributed by Google as part of the polymer project is also
|
|
12
|
+
* subject to an additional IP rights grant found at
|
|
13
|
+
* http://polymer.github.io/PATENTS.txt
|
|
14
|
+
*/const a=e((e=>a=>{let l;if(a instanceof n||a instanceof t)throw new Error("The `live` directive is not allowed on text or event bindings");if(a instanceof i)o(a.strings),l=a.element.hasAttribute(a.name),a.value=l;else{const{element:n,name:t,strings:i}=a.committer;if(o(i),a instanceof s){if(l=n[t],l===e)return}else a instanceof r&&(l=n.getAttribute(t));if(l===String(e))return}a.setValue(e)})),o=e=>{if(2!==e.length||""!==e[0]||""!==e[1])throw new Error("`live` bindings can only contain a single expression")};export{a as l};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import{E as t,C as e,T as o}from"./shared-df573cea.js";import{h as r,G as i,P as a,c as s}from"./shared-ff79f3f9.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
|
|
2
|
+
<template>
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
/* Sizing */
|
|
6
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
7
|
+
min-width: calc(var(--lumo-button-size) * 2);
|
|
8
|
+
height: var(--lumo-button-size);
|
|
9
|
+
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius) / 2);
|
|
10
|
+
margin: var(--lumo-space-xs) 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
/* Style */
|
|
13
|
+
font-family: var(--lumo-font-family);
|
|
14
|
+
font-size: var(--lumo-font-size-m);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
17
|
+
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
18
|
+
border-radius: var(--lumo-border-radius);
|
|
19
|
+
cursor: default;
|
|
20
|
+
-webkit-tap-highlight-color: transparent;
|
|
21
|
+
-webkit-font-smoothing: antialiased;
|
|
22
|
+
-moz-osx-font-smoothing: grayscale;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Set only for the internal parts so we don’t affect the host vertical alignment */
|
|
26
|
+
[part="label"],
|
|
27
|
+
[part="prefix"],
|
|
28
|
+
[part="suffix"] {
|
|
29
|
+
line-height: var(--lumo-line-height-xs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[part="label"] {
|
|
33
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([theme~="small"]) {
|
|
37
|
+
font-size: var(--lumo-font-size-s);
|
|
38
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([theme~="large"]) {
|
|
42
|
+
font-size: var(--lumo-font-size-l);
|
|
43
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* This needs to be the last selector for it to take priority */
|
|
47
|
+
:host([disabled][disabled]) {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
color: var(--lumo-disabled-text-color);
|
|
50
|
+
background-color: var(--lumo-contrast-5pct);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* For interaction states */
|
|
54
|
+
:host::before,
|
|
55
|
+
:host::after {
|
|
56
|
+
content: "";
|
|
57
|
+
/* We rely on the host always being relative */
|
|
58
|
+
position: absolute;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
top: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
background-color: currentColor;
|
|
65
|
+
border-radius: inherit;
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transition: opacity 0.2s;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Hover */
|
|
72
|
+
|
|
73
|
+
:host(:hover)::before {
|
|
74
|
+
opacity: 0.05;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Disable hover for touch devices */
|
|
78
|
+
@media (pointer: coarse) {
|
|
79
|
+
:host(:not([active]):hover)::before {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Active */
|
|
85
|
+
|
|
86
|
+
:host::after {
|
|
87
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
88
|
+
filter: blur(8px);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([active])::before {
|
|
92
|
+
opacity: 0.1;
|
|
93
|
+
transition-duration: 0s;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([active])::after {
|
|
97
|
+
opacity: 0.1;
|
|
98
|
+
transition-duration: 0s, 0s;
|
|
99
|
+
transform: scale(0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Keyboard focus */
|
|
103
|
+
|
|
104
|
+
:host([focus-ring]) {
|
|
105
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
109
|
+
|
|
110
|
+
:host([theme~="tertiary"]),
|
|
111
|
+
:host([theme~="tertiary-inline"]) {
|
|
112
|
+
background-color: transparent !important;
|
|
113
|
+
transition: opacity 0.2s;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([theme~="tertiary"])::before,
|
|
118
|
+
:host([theme~="tertiary-inline"])::before {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([theme~="tertiary"]) {
|
|
123
|
+
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (hover: hover) {
|
|
127
|
+
:host([theme*="tertiary"]:not([active]):hover) {
|
|
128
|
+
opacity: 0.8;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([theme~="tertiary"][active]),
|
|
133
|
+
:host([theme~="tertiary-inline"][active]) {
|
|
134
|
+
opacity: 0.5;
|
|
135
|
+
transition-duration: 0s;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host([theme~="tertiary-inline"]) {
|
|
139
|
+
margin: 0;
|
|
140
|
+
height: auto;
|
|
141
|
+
padding: 0;
|
|
142
|
+
line-height: inherit;
|
|
143
|
+
font-size: inherit;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host([theme~="tertiary-inline"]) [part="label"] {
|
|
147
|
+
padding: 0;
|
|
148
|
+
overflow: visible;
|
|
149
|
+
line-height: inherit;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([theme~="primary"]) {
|
|
153
|
+
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
154
|
+
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([theme~="primary"][disabled]) {
|
|
160
|
+
background-color: var(--lumo-primary-color-50pct);
|
|
161
|
+
color: var(--lumo-primary-contrast-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([theme~="primary"]:hover)::before {
|
|
165
|
+
opacity: 0.1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([theme~="primary"][active])::before {
|
|
169
|
+
background-color: var(--lumo-shade-20pct);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@media (pointer: coarse) {
|
|
173
|
+
:host([theme~="primary"][active])::before {
|
|
174
|
+
background-color: var(--lumo-shade-60pct);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([theme~="primary"]:not([active]):hover)::before {
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:host([theme~="primary"][active])::after {
|
|
183
|
+
opacity: 0.2;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Colors (success, error, contrast) */
|
|
187
|
+
|
|
188
|
+
:host([theme~="success"]) {
|
|
189
|
+
color: var(--lumo-success-text-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([theme~="success"][theme~="primary"]) {
|
|
193
|
+
background-color: var(--lumo-success-color);
|
|
194
|
+
color: var(--lumo-success-contrast-color);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host([theme~="success"][theme~="primary"][disabled]) {
|
|
198
|
+
background-color: var(--lumo-success-color-50pct);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host([theme~="error"]) {
|
|
202
|
+
color: var(--lumo-error-text-color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([theme~="error"][theme~="primary"]) {
|
|
206
|
+
background-color: var(--lumo-error-color);
|
|
207
|
+
color: var(--lumo-error-contrast-color);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([theme~="error"][theme~="primary"][disabled]) {
|
|
211
|
+
background-color: var(--lumo-error-color-50pct);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host([theme~="contrast"]) {
|
|
215
|
+
color: var(--lumo-contrast);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:host([theme~="contrast"][theme~="primary"]) {
|
|
219
|
+
background-color: var(--lumo-contrast);
|
|
220
|
+
color: var(--lumo-base-color);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:host([theme~="contrast"][theme~="primary"][disabled]) {
|
|
224
|
+
background-color: var(--lumo-contrast-50pct);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Icons */
|
|
228
|
+
|
|
229
|
+
[part] ::slotted(iron-icon) {
|
|
230
|
+
display: inline-block;
|
|
231
|
+
width: var(--lumo-icon-size-m);
|
|
232
|
+
height: var(--lumo-icon-size-m);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
236
|
+
[part] ::slotted(iron-icon[icon^="vaadin:"]) {
|
|
237
|
+
padding: 0.25em;
|
|
238
|
+
box-sizing: border-box !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[part="prefix"] {
|
|
242
|
+
margin-left: -0.25em;
|
|
243
|
+
margin-right: 0.25em;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[part="suffix"] {
|
|
247
|
+
margin-left: 0.25em;
|
|
248
|
+
margin-right: -0.25em;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Icon-only */
|
|
252
|
+
|
|
253
|
+
:host([theme~="icon"]:not([theme~="tertiary-inline"])) {
|
|
254
|
+
min-width: var(--lumo-button-size);
|
|
255
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
256
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host([theme~="icon"]) [part="prefix"],
|
|
260
|
+
:host([theme~="icon"]) [part="suffix"] {
|
|
261
|
+
margin-left: 0;
|
|
262
|
+
margin-right: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* RTL specific styles */
|
|
266
|
+
|
|
267
|
+
:host([dir="rtl"]) [part="prefix"] {
|
|
268
|
+
margin-left: 0.25em;
|
|
269
|
+
margin-right: -0.25em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:host([dir="rtl"]) [part="suffix"] {
|
|
273
|
+
margin-left: -0.25em;
|
|
274
|
+
margin-right: 0.25em;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:host([dir="rtl"][theme~="icon"]) [part="prefix"],
|
|
278
|
+
:host([dir="rtl"][theme~="icon"]) [part="suffix"] {
|
|
279
|
+
margin-left: 0;
|
|
280
|
+
margin-right: 0;
|
|
281
|
+
}
|
|
282
|
+
</style>
|
|
283
|
+
</template>
|
|
284
|
+
</dom-module>`;document.head.appendChild(n.content);
|
|
285
|
+
/**
|
|
286
|
+
@license
|
|
287
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
288
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
289
|
+
*/
|
|
290
|
+
class l extends(t(e(o(i(a))))){static get template(){return r`
|
|
291
|
+
<style>
|
|
292
|
+
:host {
|
|
293
|
+
display: inline-block;
|
|
294
|
+
position: relative;
|
|
295
|
+
outline: none;
|
|
296
|
+
white-space: nowrap;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:host([hidden]) {
|
|
300
|
+
display: none !important;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Ensure the button is always aligned on the baseline */
|
|
304
|
+
.vaadin-button-container::before {
|
|
305
|
+
content: "\\2003";
|
|
306
|
+
display: inline-block;
|
|
307
|
+
width: 0;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.vaadin-button-container {
|
|
311
|
+
display: inline-flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: center;
|
|
314
|
+
text-align: center;
|
|
315
|
+
width: 100%;
|
|
316
|
+
height: 100%;
|
|
317
|
+
min-height: inherit;
|
|
318
|
+
text-shadow: inherit;
|
|
319
|
+
-webkit-user-select: none;
|
|
320
|
+
-moz-user-select: none;
|
|
321
|
+
user-select: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[part="prefix"],
|
|
325
|
+
[part="suffix"] {
|
|
326
|
+
flex: none;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
[part="label"] {
|
|
330
|
+
white-space: nowrap;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
text-overflow: ellipsis;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
#button {
|
|
336
|
+
position: absolute;
|
|
337
|
+
top: 0;
|
|
338
|
+
left: 0;
|
|
339
|
+
right: 0;
|
|
340
|
+
width: 100%;
|
|
341
|
+
height: 100%;
|
|
342
|
+
opacity: 0;
|
|
343
|
+
cursor: inherit;
|
|
344
|
+
}
|
|
345
|
+
</style>
|
|
346
|
+
<div class="vaadin-button-container">
|
|
347
|
+
<div part="prefix">
|
|
348
|
+
<slot name="prefix"></slot>
|
|
349
|
+
</div>
|
|
350
|
+
<div part="label">
|
|
351
|
+
<slot></slot>
|
|
352
|
+
</div>
|
|
353
|
+
<div part="suffix">
|
|
354
|
+
<slot name="suffix"></slot>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<button id="button" type="button"></button>
|
|
358
|
+
`}static get is(){return"vaadin-button"}static get version(){return"2.4.0"}ready(){super.ready(),this.setAttribute("role","button"),this.$.button.setAttribute("role","presentation"),this._addActiveListeners(),window.ShadyDOM&&window.ShadyDOM.flush()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this.removeAttribute("active")}_addActiveListeners(){s(this,"down",(()=>!this.disabled&&this.setAttribute("active",""))),s(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(t=>!this.disabled&&[13,32].indexOf(t.keyCode)>=0&&this.setAttribute("active",""))),this.addEventListener("keyup",(()=>this.removeAttribute("active"))),this.addEventListener("blur",(()=>this.removeAttribute("active")))}get focusElement(){return this.$.button}}customElements.define(l.is,l);export{l as B};
|