@foxy.io/elements 1.18.0-beta.13 → 1.18.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.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-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.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 +1 -1
- 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-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-card.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-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.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-pagination.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-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +12 -12
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +2 -2
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-form.js +1 -0
- package/dist/cdn/foxy-store-shipping-method-form.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-card.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.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/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-68600caf.js → shared-04046e0e.js} +1 -1
- package/dist/cdn/{shared-45cc4f44.js → shared-0bbbc87f.js} +1 -1
- package/dist/cdn/{shared-0093ee59.js → shared-0cc4beec.js} +1 -1
- package/dist/cdn/{shared-57412bac.js → shared-0ecc7d2c.js} +1 -1
- package/dist/cdn/{shared-0f137ff8.js → shared-119efeaa.js} +1 -1
- package/dist/cdn/{shared-26adbd9b.js → shared-11be3c89.js} +1 -1
- package/dist/cdn/{shared-d863e06b.js → shared-14dc506c.js} +1 -1
- package/dist/cdn/{shared-9f0606f2.js → shared-15278fe0.js} +1 -1
- package/dist/cdn/{shared-6a2cf3b9.js → shared-19044260.js} +2 -2
- package/dist/cdn/{shared-fce199fa.js → shared-19440ca2.js} +1 -1
- package/dist/cdn/shared-1eb24528.js +1 -0
- package/dist/cdn/shared-214c34b5.js +1 -0
- package/dist/cdn/{shared-10e7ddf5.js → shared-23e0d67e.js} +1 -1
- package/dist/cdn/{shared-20b2223a.js → shared-290769ea.js} +1 -1
- package/dist/cdn/{shared-7c8b3ce0.js → shared-2af327d0.js} +1 -1
- package/dist/cdn/{shared-34db34b2.js → shared-35a7a4d6.js} +1 -1
- package/dist/cdn/{shared-7e690245.js → shared-36aaf815.js} +5 -5
- package/dist/cdn/{shared-2e33702b.js → shared-3a84611d.js} +1 -1
- package/dist/cdn/{shared-aecb20d0.js → shared-3e781cc9.js} +1 -1
- package/dist/cdn/{shared-27aeabd9.js → shared-418e88da.js} +1 -1
- package/dist/cdn/{shared-35e929aa.js → shared-435ab348.js} +1 -1
- package/dist/cdn/{shared-f49ee631.js → shared-4a519a4a.js} +1 -1
- package/dist/cdn/{shared-b0ba62ff.js → shared-4a796610.js} +1 -1
- package/dist/cdn/{shared-cbff5e58.js → shared-4c61787a.js} +1 -1
- package/dist/cdn/{shared-0b67dae4.js → shared-4ebfd7ef.js} +1 -1
- package/dist/cdn/{shared-ef792142.js → shared-4fa44231.js} +1 -1
- package/dist/cdn/{shared-58445db9.js → shared-553e6472.js} +1 -1
- package/dist/cdn/{shared-5bf3f8f1.js → shared-5cb39f03.js} +1 -1
- package/dist/cdn/{shared-da126678.js → shared-67f1821b.js} +1 -1
- package/dist/cdn/shared-682dbe0a.js +1 -0
- package/dist/cdn/{shared-f38a79cc.js → shared-73a8b603.js} +1 -1
- package/dist/cdn/{shared-53cdff0b.js → shared-7415fa7e.js} +1 -1
- package/dist/cdn/shared-779795c5.js +1 -0
- package/dist/cdn/{shared-008ffb33.js → shared-81d3ff30.js} +1 -1
- package/dist/cdn/{shared-cd1bc9f5.js → shared-8d9c0007.js} +1 -1
- package/dist/cdn/{shared-09a14740.js → shared-915fb0e4.js} +1 -1
- package/dist/cdn/{shared-d8faafc7.js → shared-9195959e.js} +1 -1
- package/dist/cdn/{shared-015e5cb9.js → shared-93548d58.js} +1 -1
- package/dist/cdn/{shared-4382f0cd.js → shared-93a1be98.js} +1 -1
- package/dist/cdn/{shared-ba78987f.js → shared-96ebc59f.js} +1 -1
- package/dist/cdn/shared-9a0f97e5.js +1 -0
- package/dist/cdn/{shared-8a34457d.js → shared-9afb80a6.js} +1 -1
- package/dist/cdn/{shared-c7fad58c.js → shared-a0e71609.js} +1 -1
- package/dist/cdn/shared-a420358e.js +1 -0
- package/dist/cdn/{shared-415c86b6.js → shared-a42a63aa.js} +1 -1
- package/dist/cdn/{shared-2ec256d5.js → shared-a8966936.js} +1 -1
- package/dist/cdn/{shared-68fad60e.js → shared-aa4bf9ab.js} +1 -1
- package/dist/cdn/shared-b1201c2e.js +1 -0
- package/dist/cdn/{shared-a0f6e39c.js → shared-b20753b8.js} +1 -1
- package/dist/cdn/shared-b2850d64.js +1 -0
- package/dist/cdn/{shared-465cdd03.js → shared-c3a3d9f6.js} +2 -2
- package/dist/cdn/{shared-be043b54.js → shared-c7ab6598.js} +1 -1
- package/dist/cdn/{shared-e46eb641.js → shared-c7cae9e6.js} +1 -1
- package/dist/cdn/{shared-8911c2e0.js → shared-d24c3729.js} +1 -1
- package/dist/cdn/{shared-fff1815b.js → shared-d75c6072.js} +1 -1
- package/dist/cdn/shared-d82f3ba0.js +1 -0
- package/dist/cdn/{shared-c6f5602e.js → shared-d8bf2eac.js} +1 -1
- package/dist/cdn/{shared-5382ccfa.js → shared-d9a3104e.js} +1 -1
- package/dist/cdn/shared-da285807.js +169 -0
- package/dist/cdn/shared-e1069291.js +1 -0
- package/dist/cdn/{shared-b54eb879.js → shared-e32be255.js} +4 -4
- package/dist/cdn/{shared-8c8853ab.js → shared-e4383064.js} +1 -1
- package/dist/cdn/shared-e4e93604.js +1 -0
- package/dist/cdn/shared-eab81bf4.js +1 -0
- package/dist/cdn/{shared-3fb5f380.js → shared-effdf59d.js} +1 -1
- package/dist/cdn/translations/store-form/en.json +311 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +11 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +143 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/index.d.ts +3 -0
- package/dist/elements/internal/InternalEditableListControl/index.js +5 -0
- package/dist/elements/internal/InternalEditableListControl/index.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/types.d.ts +9 -0
- package/dist/elements/internal/InternalEditableListControl/types.js +2 -0
- package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -0
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +6 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +25 -12
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +4 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +15 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +13 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +40 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -0
- package/dist/elements/internal/InternalPasswordControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalPasswordControl/index.js +6 -0
- package/dist/elements/internal/InternalPasswordControl/index.js.map +1 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +15 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +55 -0
- package/dist/elements/public/StoreForm/StoreForm.js +1023 -0
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -0
- package/dist/elements/public/StoreForm/index.d.ts +15 -0
- package/dist/elements/public/StoreForm/index.js +17 -0
- package/dist/elements/public/StoreForm/index.js.map +1 -0
- package/dist/elements/public/StoreForm/types.d.ts +3 -0
- package/dist/elements/public/StoreForm/types.js +2 -0
- package/dist/elements/public/StoreForm/types.js.map +1 -0
- 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 +248 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-156144ab.js +0 -1
- package/dist/cdn/shared-2a20ac6b.js +0 -1
- package/dist/cdn/shared-3909c1e5.js +0 -1
- package/dist/cdn/shared-4cd53ea2.js +0 -1
- package/dist/cdn/shared-8c91f512.js +0 -169
- package/dist/cdn/shared-9eff0743.js +0 -1
- package/dist/cdn/shared-a03d948d.js +0 -1
- package/dist/cdn/shared-c00bff9d.js +0 -1
- package/dist/cdn/shared-c47571a6.js +0 -1
- package/dist/cdn/shared-c60b6e1a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-2e33702b.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-c6f5602e.js";import"./shared-35e929aa.js";import"./shared-68fad60e.js";import"./shared-c7fad58c.js";import"./shared-cd1bc9f5.js";import"./shared-5382ccfa.js";import"./shared-09a14740.js";import{_ as e}from"./shared-a8ced8bf.js";import{C as t}from"./shared-f38a79cc.js";import"./shared-8c91f512.js";import"./shared-156144ab.js";import{D as i}from"./shared-20b2223a.js";import{h as r}from"./shared-7f33a83a.js";import{T as s,S as a,a as n}from"./shared-6a2cf3b9.js";import"./shared-45cc4f44.js";import"./shared-4382f0cd.js";import"./shared-cbff5e58.js";import{P as o}from"./shared-008ffb33.js";import{c as d}from"./shared-4e709717.js";import{a as l}from"./shared-7c8b3ce0.js";import{C as h}from"./shared-2ec256d5.js";import{N as c}from"./shared-9f0606f2.js";import{i as _}from"./shared-d3bf9ac0.js";import{i as m}from"./shared-b0ba62ff.js";import"./shared-53cdff0b.js";import"./shared-34db34b2.js";import"./shared-4f037e43.js";import"./shared-0093ee59.js";import"./shared-f49ee631.js";import"./shared-11c2efc8.js";import"./shared-a03d948d.js";import"./shared-d6276c83.js";let p,u,y,g,f,v,$,b,x,S,T,E,k,j,O=e=>e;const C=["US","CA","AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IM","IT","LT","LU","LV","MC","MT","NL","PL","PT","RO","SE","SI","SK"],w=[...C,"AU"],H=h(s(a(n(c,"tax-form"))));class A extends H{constructor(){var e;super(...arguments),e=this,this.templates={},this.__previousCountry=void 0,this.__countries="",this.__regions="",this.__countriesService=m(l.withConfig({services:{sendGet:async function(){const t=await new A.API(e).fetch(e.countries);if(!t.ok)throw new Error(await t.text());return await t.json()}}})),this.__regionsService=m(l.withConfig({services:{sendGet:async function(){var t;const i=new URL(e.regions);i.searchParams.set("country_code",null!==(t=e.form.country)&&void 0!==t?t:"US");const r=await new A.API(e).fetch(i.toString());if(!r.ok)throw new Error(await r.text());return await r.json()}}}))}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-combo-box":customElements.get("vaadin-combo-box"),"vaadin-button":customElements.get("vaadin-button"),"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"),"x-property-table":o,"x-checkbox":t,"x-dropdown":i}}static get properties(){return e(e({},super.properties),{},{countries:{type:String,noAccessor:!0},regions:{type:String,noAccessor:!0}})}static get v8n(){return[({name:e})=>!!e||"name_required",({name:e})=>!e||e.length<=30||"name_too_long",({country:e,type:t})=>"country"!==t||!!e||"country_required",({country:e,type:t})=>"region"!==t||!!e||"country_required",({country:e,use_origin_rates:t})=>!t||!!e||"country_required",({country:e})=>!e||!!e.match(/[A-Z]{2}/)||"country_invalid",({region:e,type:t})=>"region"!=t||!!e||"region_required",({region:e})=>!e||e.length<=20||"region_too_long",({city:e})=>!e||e.length<=50||"city_too_long",({city:e,type:t})=>"local"!=t||!!e||"city_required",({rate:e})=>!e||e<=100||"rate_invalid"]}get countries(){return this.__countries}set countries(e){this.__countries=e,e?this.__countriesService.send({type:"FETCH"}):this.__countriesService.send({type:"SET_DATA",data:null})}get regions(){return this.__regions}set regions(e){this.__regions=e,e?this.__regionsService.send({type:"FETCH"}):this.__regionsService.send({type:"SET_DATA",data:null})}connectedCallback(){super.connectedCallback(),this.__countriesService.onTransition((({changed:e})=>e&&this.requestUpdate())),this.__countriesService.onChange((()=>this.requestUpdate())),this.__countriesService.start(),this.__regionsService.onTransition((({changed:e})=>e&&this.requestUpdate())),this.__regionsService.onChange((()=>this.requestUpdate())),this.__regionsService.start()}render(){var e,t;return r(p||(p=O` <div class="relative space-y-m"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${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> `),this.__isNameHidden?null:this.__renderName(),this.__isTypeHidden?null:this.__renderType(),this.__isCountryHidden?null:this.__renderCountry(),this.__isRegionHidden?null:this.__renderRegion(),this.__isCityHidden?null:this.__renderCity(),this.__isProviderHidden?null:this.__renderProvider(),this.__isRateHidden?null:this.__renderRate(),this.__isApplyToShippingHidden?null:this.__renderApplyToShipping(),this.__isUseOriginRatesHidden?null:this.__renderUseOriginRates(),this.__isExemptAllCustomerTaxIdsHidden?null:this.__renderExemptAllCustomerTaxIds(),this.__isTimestampsHidden?null:this.__renderTimestamps(),this.__isCreateHidden?null:this.__renderCreate(),this.__isDeleteHidden?null:this.__renderDelete(),d({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}updated(e){super.updated(e),this.form.country!==this.__previousCountry&&(this.__previousCountry=this.form.country,this.__regionsService.send({type:"FETCH"})),this.renderRoot.querySelectorAll("vaadin-combo-box").forEach((e=>e.validate()))}disconnectedCallback(){super.disconnectedCallback(),this.__countriesService.stop(),this.__regionsService.stop()}get __isNameHidden(){return this.hiddenSelector.matches("name",!0)}get __isTypeHidden(){return this.hiddenSelector.matches("type",!0)}get __isCountryHidden(){return!!this.hiddenSelector.matches("country",!0)||("union"===this.form.type?!this.form.use_origin_rates:!["country","region","local"].includes(this.form.type))}get __isRegionHidden(){return!!this.hiddenSelector.matches("region",!0)||"local"!==this.form.type&&"region"!==this.form.type}get __isCityHidden(){return!!this.hiddenSelector.matches("city",!0)||"local"!==this.form.type}get __isProviderHidden(){return!!this.hiddenSelector.matches("provider",!0)||(!this.form.type||"global"===this.form.type||"local"===this.form.type)}get __isRateHidden(){return!!this.hiddenSelector.matches("rate",!0)||(!this.form.type||!0===this.form.is_live)}get __isApplyToShippingHidden(){return!!this.hiddenSelector.matches("apply-to-shipping",!0)||(void 0===this.form.type||!!this.form.is_live&&C.includes(this.form.country))}get __isUseOriginRatesHidden(){return!!this.hiddenSelector.matches("use-origin-rates",!0)||("union"!==this.form.type||!this.form.is_live||!!this.form.service_provider)}get __isExemptAllCustomerTaxIdsHidden(){if(this.hiddenSelector.matches("exempt-all-customer-tax-ids",!0))return!0;const e=this.form.service_provider;return void 0===e||"onesource"===e||"avalara"===e}get __isTimestampsHidden(){return!!this.hiddenSelector.matches("timestamps",!0)||!this.data}get __isCreateHidden(){return!!this.hiddenSelector.matches("create",!0)||!!this.data}get __isDeleteHidden(){return!!this.hiddenSelector.matches("delete",!0)||!this.data}__getErrorMessage(e){const t=this.errors.find((t=>t.startsWith(e)));return t?this.t(t.replace(e,"v8n")).toString():""}__getValidator(e){return()=>!this.errors.some((t=>t.startsWith(e)))}__renderName(){return r(u||(u=O` <div> ${0} <vaadin-text-field data-testid="name" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot("name:before"),this.t("name"),_(this.form.name),this.__getValidator("name"),this.__getErrorMessage("name"),!this.in("idle")||this.disabledSelector.matches("name",!0),this.readonlySelector.matches("name",!0),this.__submitOnEnter,(e=>{const t=e.currentTarget.value;this.edit({name:t})}),this.renderTemplateOrSlot("name:after"))}__renderType(){return this.form.type||this.edit({type:"global"}),r(y||(y=O` <div> ${0} <x-dropdown data-testid="type" label="${0}" value="${0}" class="w-full" .items="${0}" .getText="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </x-dropdown> ${0} </div> `),this.renderTemplateOrSlot("type:before"),this.t("type"),_(this.form.type),["global","union","country","region","local"],(e=>this.t(`tax_${e}`)),!this.in("idle")||this.disabledSelector.matches("type",!0),this.readonlySelector.matches("type",!0),(e=>{this.edit({type:e.detail,country:"",region:"",city:"",service_provider:"",apply_to_shipping:!1,use_origin_rates:!1,exempt_all_customer_tax_ids:!1,is_live:!1,rate:0})}),this.renderTemplateOrSlot("type:after"))}__renderCountry(){var e;const t=this.__countriesService.state.matches("busy"),i=this.in("busy"),s=t||i,a=this.in("fail"),n=this.__countriesService.state.context.data,o=Object.values(null!==(e=null==n?void 0:n.values)&&void 0!==e?e:{});return r(g||(g=O` <div> ${0} <vaadin-combo-box item-value-path="cc2" item-label-path="default" item-id-path="cc2" data-testid="country" label="${0}${0}" value="${0}" class="w-full" .checkValidity="${0}" .errorMessage="${0}" .items="${0}" ?allow-custom-value="${0}" ?disabled="${0}" ?readonly="${0}" required @change="${0}"> </vaadin-combo-box> ${0} </div> `),this.renderTemplateOrSlot("country:before"),this.t("country"),t?` • ${this.t("loading_busy")}`:"",_(t?void 0:this.form.country),this.__getValidator("country"),this.__getErrorMessage("country"),o,0===o.length,a||s||this.disabledSelector.matches("country",!0),this.readonlySelector.matches("country",!0),(e=>{this.edit({country:e.currentTarget.value,region:"",city:"",is_live:!1,service_provider:""}),this.__isApplyToShippingHidden&&this.edit({apply_to_shipping:!1}),this.__regionsService.send({type:"FETCH"})}),this.renderTemplateOrSlot("country:after"))}__renderRegion(){var e;const t=this.__regionsService.state.matches("busy"),i=this.in("busy"),s=t||i,a=this.in("fail"),n=this.__regionsService.state.context.data,o=Object.values(null!==(e=null==n?void 0:n.values)&&void 0!==e?e:{});return r(f||(f=O` <div> ${0} <vaadin-combo-box item-value-path="code" item-label-path="default" item-id-path="code" data-testid="region" label="${0}${0}" value="${0}" class="w-full" .checkValidity="${0}" .errorMessage="${0}" .items="${0}" ?allow-custom-value="${0}" ?disabled="${0}" ?readonly="${0}" required @change="${0}"> </vaadin-combo-box> ${0} </div> `),this.renderTemplateOrSlot("region:before"),this.t("region"),t?` • ${this.t("loading_busy")}`:"",_(t?void 0:this.form.region),this.__getValidator("region"),this.__getErrorMessage("region"),o,0===o.length,a||s||this.disabledSelector.matches("region",!0),this.readonlySelector.matches("region",!0),(e=>{const t=e.currentTarget.value;this.edit({region:t,city:""})}),this.renderTemplateOrSlot("region:after"))}__renderCity(){return r(v||(v=O` <div> ${0} <vaadin-text-field data-testid="city" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot("city:before"),this.t("city"),_(this.form.city),this.__getValidator("city"),this.__getErrorMessage("city"),!this.in("idle")||this.disabledSelector.matches("city",!0),this.readonlySelector.matches("city",!0),this.__submitOnEnter,(e=>{const t=e.currentTarget.value;this.edit({city:t})}),this.renderTemplateOrSlot("city:after"))}__renderProvider(){const e=[{label:this.t("tax_rate_provider_none"),value:"none"},{label:"Avalara AvaTax 15",value:"avalara"},{label:"Thomson Reuters ONESOURCE",value:"onesource"}];return("union"===this.form.type||C.includes(this.form.country))&&e.push({label:this.t("tax_rate_provider_default"),value:"default"}),w.includes(this.form.country)&&e.push({label:"TaxJar",value:"taxjar"}),r($||($=O` <div> ${0} <x-dropdown data-testid="provider" label="${0}" value="${0}" class="w-full" .items="${0}" .getText="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </x-dropdown> ${0} </div> `),this.renderTemplateOrSlot("provider:before"),this.t("tax_rate_provider"),this.form.service_provider||(this.form.is_live?"default":"none"),e.map((e=>e.value)),(t=>{var i;return null===(i=e.find((e=>e.value===t)))||void 0===i?void 0:i.label}),!this.in("idle")||this.disabledSelector.matches("provider",!0),this.readonlySelector.matches("provider",!0),(e=>{const t=e.detail,i=["none","default"].includes(t)?"":t;this.edit({service_provider:i,is_live:"none"!==t}),this.__isExemptAllCustomerTaxIdsHidden&&this.edit({exempt_all_customer_tax_ids:!1}),this.__isApplyToShippingHidden&&this.edit({apply_to_shipping:!1}),this.__isUseOriginRatesHidden&&this.edit({use_origin_rates:!1})}),this.renderTemplateOrSlot("provider:after"))}__renderRate(){return r(b||(b=O` <div> ${0} <vaadin-integer-field data-testid="rate" class="w-full" label="${0}" value="${0}" min="0" prevent-invalid-input has-controls .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @change="${0}"> </vaadin-integer-field> ${0} </div> `),this.renderTemplateOrSlot("rate:before"),this.t("tax_rate"),_(this.form.rate),this.__getValidator("rate"),this.__getErrorMessage("rate"),!this.in("idle")||this.disabledSelector.matches("rate",!0),this.readonlySelector.matches("rate",!0),this.__submitOnEnter,(e=>{const t=parseInt(e.currentTarget.value);this.edit({rate:t})}),this.renderTemplateOrSlot("rate:after"))}__renderApplyToShipping(){return r(x||(x=O` <div> ${0} <x-checkbox data-testid="apply-to-shipping" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_apply_to_shipping" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_apply_to_shipping_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot("apply-to-shipping:before"),!this.in("idle")||this.disabledSelector.matches("apply-to-shipping",!0),this.readonlySelector.matches("apply-to-shipping",!0),!!this.form.apply_to_shipping,(e=>this.edit({apply_to_shipping:e.detail})),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot("apply-to-shipping:after"))}__renderUseOriginRates(){return r(S||(S=O` <div> ${0} <x-checkbox data-testid="use-origin-rates" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_use_origin_rates" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_use_origin_rates_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot("use-origin-rates:before"),!this.in("idle")||this.disabledSelector.matches("use-origin-rates",!0),this.readonlySelector.matches("use-origin-rates",!0),!!this.form.use_origin_rates,(e=>this.edit({use_origin_rates:e.detail})),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot("use-origin-rates:after"))}__renderExemptAllCustomerTaxIds(){const e="exempt-all-customer-tax-ids";return r(T||(T=O` <div> ${0} <x-checkbox data-testid="${0}" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_exempt_all_customer_tax_ids" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_exempt_all_customer_tax_ids_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),e,!this.in("idle")||this.disabledSelector.matches(e,!0),this.readonlySelector.matches(e,!0),!!this.form.exempt_all_customer_tax_ids,(e=>{this.edit({exempt_all_customer_tax_ids:e.detail})}),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot(`${e}:after`))}__renderTimestamps(){return r(E||(E=O` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot("timestamps: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("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),s=this.in({idle:{snapshot:{dirty:"invalid"}}}),a=e||t||(i||s),n=this.in("idle");return r(k||(k=O` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||a||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return r(j||(j=O` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="primary error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}__submitOnEnter(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-tax-form",A);export{A as TaxForm};
|
|
1
|
+
import"./shared-3a84611d.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import"./shared-435ab348.js";import"./shared-aa4bf9ab.js";import"./shared-a0e71609.js";import"./shared-8d9c0007.js";import"./shared-d9a3104e.js";import"./shared-915fb0e4.js";import{_ as e}from"./shared-a8ced8bf.js";import{C as t}from"./shared-73a8b603.js";import"./shared-9a0f97e5.js";import"./shared-b1201c2e.js";import{D as i}from"./shared-290769ea.js";import{h as r}from"./shared-7f33a83a.js";import{T as s,S as a,a as n}from"./shared-19044260.js";import"./shared-da285807.js";import"./shared-0bbbc87f.js";import"./shared-93a1be98.js";import"./shared-4c61787a.js";import{P as o}from"./shared-81d3ff30.js";import{c as d}from"./shared-4e709717.js";import{a as l}from"./shared-2af327d0.js";import{C as h}from"./shared-a8966936.js";import{N as c}from"./shared-15278fe0.js";import{i as _}from"./shared-d3bf9ac0.js";import{i as m}from"./shared-4a796610.js";import"./shared-7415fa7e.js";import"./shared-35a7a4d6.js";import"./shared-4f037e43.js";import"./shared-0cc4beec.js";import"./shared-4a519a4a.js";import"./shared-11c2efc8.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";let p,u,y,g,v,f,$,x,b,S,T,E,j,k,O=e=>e;const C=["US","CA","AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IM","IT","LT","LU","LV","MC","MT","NL","PL","PT","RO","SE","SI","SK"],w=[...C,"AU"],H=h(s(a(n(c,"tax-form"))));class A extends H{constructor(){var e;super(...arguments),e=this,this.templates={},this.__previousCountry=void 0,this.__countries="",this.__regions="",this.__countriesService=m(l.withConfig({services:{sendGet:async function(){const t=await new A.API(e).fetch(e.countries);if(!t.ok)throw new Error(await t.text());return await t.json()}}})),this.__regionsService=m(l.withConfig({services:{sendGet:async function(){var t;const i=new URL(e.regions);i.searchParams.set("country_code",null!==(t=e.form.country)&&void 0!==t?t:"US");const r=await new A.API(e).fetch(i.toString());if(!r.ok)throw new Error(await r.text());return await r.json()}}}))}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-combo-box":customElements.get("vaadin-combo-box"),"vaadin-button":customElements.get("vaadin-button"),"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"),"x-property-table":o,"x-checkbox":t,"x-dropdown":i}}static get properties(){return e(e({},super.properties),{},{countries:{type:String,noAccessor:!0},regions:{type:String,noAccessor:!0}})}static get v8n(){return[({name:e})=>!!e||"name_required",({name:e})=>!e||e.length<=30||"name_too_long",({country:e,type:t})=>"country"!==t||!!e||"country_required",({country:e,type:t})=>"region"!==t||!!e||"country_required",({country:e,use_origin_rates:t})=>!t||!!e||"country_required",({country:e})=>!e||!!e.match(/[A-Z]{2}/)||"country_invalid",({region:e,type:t})=>"region"!=t||!!e||"region_required",({region:e})=>!e||e.length<=20||"region_too_long",({city:e})=>!e||e.length<=50||"city_too_long",({city:e,type:t})=>"local"!=t||!!e||"city_required",({rate:e})=>!e||e<=100||"rate_invalid"]}get countries(){return this.__countries}set countries(e){this.__countries=e,e?this.__countriesService.send({type:"FETCH"}):this.__countriesService.send({type:"SET_DATA",data:null})}get regions(){return this.__regions}set regions(e){this.__regions=e,e?this.__regionsService.send({type:"FETCH"}):this.__regionsService.send({type:"SET_DATA",data:null})}connectedCallback(){super.connectedCallback(),this.__countriesService.onTransition((({changed:e})=>e&&this.requestUpdate())),this.__countriesService.onChange((()=>this.requestUpdate())),this.__countriesService.start(),this.__regionsService.onTransition((({changed:e})=>e&&this.requestUpdate())),this.__regionsService.onChange((()=>this.requestUpdate())),this.__regionsService.start()}render(){var e,t;return r(p||(p=O` <div class="relative space-y-m"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${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> `),this.__isNameHidden?null:this.__renderName(),this.__isTypeHidden?null:this.__renderType(),this.__isCountryHidden?null:this.__renderCountry(),this.__isRegionHidden?null:this.__renderRegion(),this.__isCityHidden?null:this.__renderCity(),this.__isProviderHidden?null:this.__renderProvider(),this.__isRateHidden?null:this.__renderRate(),this.__isApplyToShippingHidden?null:this.__renderApplyToShipping(),this.__isUseOriginRatesHidden?null:this.__renderUseOriginRates(),this.__isExemptAllCustomerTaxIdsHidden?null:this.__renderExemptAllCustomerTaxIds(),this.__isTimestampsHidden?null:this.__renderTimestamps(),this.__isCreateHidden?null:this.__renderCreate(),this.__isDeleteHidden?null:this.__renderDelete(),d({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}updated(e){super.updated(e),this.form.country!==this.__previousCountry&&(this.__previousCountry=this.form.country,this.__regionsService.send({type:"FETCH"})),this.renderRoot.querySelectorAll("vaadin-combo-box").forEach((e=>e.validate()))}disconnectedCallback(){super.disconnectedCallback(),this.__countriesService.stop(),this.__regionsService.stop()}get __isNameHidden(){return this.hiddenSelector.matches("name",!0)}get __isTypeHidden(){return this.hiddenSelector.matches("type",!0)}get __isCountryHidden(){return!!this.hiddenSelector.matches("country",!0)||("union"===this.form.type?!this.form.use_origin_rates:!["country","region","local"].includes(this.form.type))}get __isRegionHidden(){return!!this.hiddenSelector.matches("region",!0)||"local"!==this.form.type&&"region"!==this.form.type}get __isCityHidden(){return!!this.hiddenSelector.matches("city",!0)||"local"!==this.form.type}get __isProviderHidden(){return!!this.hiddenSelector.matches("provider",!0)||(!this.form.type||"global"===this.form.type||"local"===this.form.type)}get __isRateHidden(){return!!this.hiddenSelector.matches("rate",!0)||(!this.form.type||!0===this.form.is_live)}get __isApplyToShippingHidden(){return!!this.hiddenSelector.matches("apply-to-shipping",!0)||(void 0===this.form.type||!!this.form.is_live&&C.includes(this.form.country))}get __isUseOriginRatesHidden(){return!!this.hiddenSelector.matches("use-origin-rates",!0)||("union"!==this.form.type||!this.form.is_live||!!this.form.service_provider)}get __isExemptAllCustomerTaxIdsHidden(){if(this.hiddenSelector.matches("exempt-all-customer-tax-ids",!0))return!0;const e=this.form.service_provider;return void 0===e||"onesource"===e||"avalara"===e}get __isTimestampsHidden(){return!!this.hiddenSelector.matches("timestamps",!0)||!this.data}get __isCreateHidden(){return!!this.hiddenSelector.matches("create",!0)||!!this.data}get __isDeleteHidden(){return!!this.hiddenSelector.matches("delete",!0)||!this.data}__getErrorMessage(e){const t=this.errors.find((t=>t.startsWith(e)));return t?this.t(t.replace(e,"v8n")).toString():""}__getValidator(e){return()=>!this.errors.some((t=>t.startsWith(e)))}__renderName(){return r(u||(u=O` <div> ${0} <vaadin-text-field data-testid="name" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot("name:before"),this.t("name"),_(this.form.name),this.__getValidator("name"),this.__getErrorMessage("name"),!this.in("idle")||this.disabledSelector.matches("name",!0),this.readonlySelector.matches("name",!0),this.__submitOnEnter,(e=>{const t=e.currentTarget.value;this.edit({name:t})}),this.renderTemplateOrSlot("name:after"))}__renderType(){return this.form.type||this.edit({type:"global"}),r(y||(y=O` <div> ${0} <x-dropdown data-testid="type" label="${0}" value="${0}" class="w-full" .items="${0}" .getText="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </x-dropdown> ${0} </div> `),this.renderTemplateOrSlot("type:before"),this.t("type"),_(this.form.type),["global","union","country","region","local"],(e=>this.t(`tax_${e}`)),!this.in("idle")||this.disabledSelector.matches("type",!0),this.readonlySelector.matches("type",!0),(e=>{this.edit({type:e.detail,country:"",region:"",city:"",service_provider:"",apply_to_shipping:!1,use_origin_rates:!1,exempt_all_customer_tax_ids:!1,is_live:!1,rate:0})}),this.renderTemplateOrSlot("type:after"))}__renderCountry(){var e;const t=this.__countriesService.state.matches("busy"),i=this.in("busy"),s=t||i,a=this.in("fail"),n=this.__countriesService.state.context.data,o=Object.values(null!==(e=null==n?void 0:n.values)&&void 0!==e?e:{});return r(g||(g=O` <div> ${0} <vaadin-combo-box item-value-path="cc2" item-label-path="default" item-id-path="cc2" data-testid="country" label="${0}${0}" value="${0}" class="w-full" .checkValidity="${0}" .errorMessage="${0}" .items="${0}" ?allow-custom-value="${0}" ?disabled="${0}" ?readonly="${0}" required @change="${0}"> </vaadin-combo-box> ${0} </div> `),this.renderTemplateOrSlot("country:before"),this.t("country"),t?` • ${this.t("loading_busy")}`:"",_(t?void 0:this.form.country),this.__getValidator("country"),this.__getErrorMessage("country"),o,0===o.length,a||s||this.disabledSelector.matches("country",!0),this.readonlySelector.matches("country",!0),(e=>{this.edit({country:e.currentTarget.value,region:"",city:"",is_live:!1,service_provider:""}),this.__isApplyToShippingHidden&&this.edit({apply_to_shipping:!1}),this.__regionsService.send({type:"FETCH"})}),this.renderTemplateOrSlot("country:after"))}__renderRegion(){var e;const t=this.__regionsService.state.matches("busy"),i=this.in("busy"),s=t||i,a=this.in("fail"),n=this.__regionsService.state.context.data,o=Object.values(null!==(e=null==n?void 0:n.values)&&void 0!==e?e:{});return r(v||(v=O` <div> ${0} <vaadin-combo-box item-value-path="code" item-label-path="default" item-id-path="code" data-testid="region" label="${0}${0}" value="${0}" class="w-full" .checkValidity="${0}" .errorMessage="${0}" .items="${0}" ?allow-custom-value="${0}" ?disabled="${0}" ?readonly="${0}" required @change="${0}"> </vaadin-combo-box> ${0} </div> `),this.renderTemplateOrSlot("region:before"),this.t("region"),t?` • ${this.t("loading_busy")}`:"",_(t?void 0:this.form.region),this.__getValidator("region"),this.__getErrorMessage("region"),o,0===o.length,a||s||this.disabledSelector.matches("region",!0),this.readonlySelector.matches("region",!0),(e=>{const t=e.currentTarget.value;this.edit({region:t,city:""})}),this.renderTemplateOrSlot("region:after"))}__renderCity(){return r(f||(f=O` <div> ${0} <vaadin-text-field data-testid="city" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot("city:before"),this.t("city"),_(this.form.city),this.__getValidator("city"),this.__getErrorMessage("city"),!this.in("idle")||this.disabledSelector.matches("city",!0),this.readonlySelector.matches("city",!0),this.__submitOnEnter,(e=>{const t=e.currentTarget.value;this.edit({city:t})}),this.renderTemplateOrSlot("city:after"))}__renderProvider(){const e=[{label:this.t("tax_rate_provider_none"),value:"none"},{label:"Avalara AvaTax 15",value:"avalara"},{label:"Thomson Reuters ONESOURCE",value:"onesource"}];return("union"===this.form.type||C.includes(this.form.country))&&e.push({label:this.t("tax_rate_provider_default"),value:"default"}),w.includes(this.form.country)&&e.push({label:"TaxJar",value:"taxjar"}),r($||($=O` <div> ${0} <x-dropdown data-testid="provider" label="${0}" value="${0}" class="w-full" .items="${0}" .getText="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> </x-dropdown> ${0} </div> `),this.renderTemplateOrSlot("provider:before"),this.t("tax_rate_provider"),this.form.service_provider||(this.form.is_live?"default":"none"),e.map((e=>e.value)),(t=>{var i;return null===(i=e.find((e=>e.value===t)))||void 0===i?void 0:i.label}),!this.in("idle")||this.disabledSelector.matches("provider",!0),this.readonlySelector.matches("provider",!0),(e=>{const t=e.detail,i=["none","default"].includes(t)?"":t;this.edit({service_provider:i,is_live:"none"!==t}),this.__isExemptAllCustomerTaxIdsHidden&&this.edit({exempt_all_customer_tax_ids:!1}),this.__isApplyToShippingHidden&&this.edit({apply_to_shipping:!1}),this.__isUseOriginRatesHidden&&this.edit({use_origin_rates:!1})}),this.renderTemplateOrSlot("provider:after"))}__renderRate(){return r(x||(x=O` <div> ${0} <vaadin-integer-field data-testid="rate" class="w-full" label="${0}" value="${0}" min="0" prevent-invalid-input has-controls .checkValidity="${0}" .errorMessage="${0}" ?disabled="${0}" ?readonly="${0}" required @keydown="${0}" @change="${0}"> </vaadin-integer-field> ${0} </div> `),this.renderTemplateOrSlot("rate:before"),this.t("tax_rate"),_(this.form.rate),this.__getValidator("rate"),this.__getErrorMessage("rate"),!this.in("idle")||this.disabledSelector.matches("rate",!0),this.readonlySelector.matches("rate",!0),this.__submitOnEnter,(e=>{const t=parseInt(e.currentTarget.value);this.edit({rate:t})}),this.renderTemplateOrSlot("rate:after"))}__renderApplyToShipping(){return r(b||(b=O` <div> ${0} <x-checkbox data-testid="apply-to-shipping" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_apply_to_shipping" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_apply_to_shipping_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot("apply-to-shipping:before"),!this.in("idle")||this.disabledSelector.matches("apply-to-shipping",!0),this.readonlySelector.matches("apply-to-shipping",!0),!!this.form.apply_to_shipping,(e=>this.edit({apply_to_shipping:e.detail})),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot("apply-to-shipping:after"))}__renderUseOriginRates(){return r(S||(S=O` <div> ${0} <x-checkbox data-testid="use-origin-rates" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_use_origin_rates" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_use_origin_rates_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot("use-origin-rates:before"),!this.in("idle")||this.disabledSelector.matches("use-origin-rates",!0),this.readonlySelector.matches("use-origin-rates",!0),!!this.form.use_origin_rates,(e=>this.edit({use_origin_rates:e.detail})),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot("use-origin-rates:after"))}__renderExemptAllCustomerTaxIds(){const e="exempt-all-customer-tax-ids";return r(T||(T=O` <div> ${0} <x-checkbox data-testid="${0}" class="leading-s" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block text-m text-body" lang="${0}" key="tax_exempt_all_customer_tax_ids" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s text-secondary" lang="${0}" key="tax_exempt_all_customer_tax_ids_explainer" ns="${0}"> </foxy-i18n> </x-checkbox> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),e,!this.in("idle")||this.disabledSelector.matches(e,!0),this.readonlySelector.matches(e,!0),!!this.form.exempt_all_customer_tax_ids,(e=>{this.edit({exempt_all_customer_tax_ids:e.detail})}),this.lang,this.ns,this.lang,this.ns,this.renderTemplateOrSlot(`${e}:after`))}__renderTimestamps(){return r(E||(E=O` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot("timestamps: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("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),s=this.in({idle:{snapshot:{dirty:"invalid"}}}),a=e||t||(i||s),n=this.in("idle");return r(j||(j=O` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||a||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return r(k||(k=O` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="primary error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}__submitOnEnter(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-tax-form",A);export{A as TaxForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./shared-
|
|
1
|
+
import{I as e}from"./shared-04046e0e.js";import"./shared-d8bf2eac.js";import{a as s}from"./shared-19044260.js";import{h as t}from"./shared-7f33a83a.js";import"./foxy-spinner.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-a8ced8bf.js";import"./shared-4f037e43.js";import"./shared-2af327d0.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-4e709717.js";let r,a=e=>e;class o extends(s(e)){renderBody(){const e=this.data,s=(null==e?void 0:e.content_url)?"type_custom_url":(null==e?void 0:e.content)?"type_custom_text":"type_default";return t(r||(r=a` <div class="flex justify-between gap-s"> <foxy-i18n class="font-semibold truncate flex-shrink-0" infer="" key="title"></foxy-i18n> <foxy-i18n class="truncate text-tertiary" infer="" key="${0}"></foxy-i18n> </div> `),s)}}customElements.define("foxy-template-card",o);export{o as TemplateCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7415fa7e.js";import"./shared-93a1be98.js";import"./shared-aa4bf9ab.js";import"./shared-4a519a4a.js";import"./shared-4ebfd7ef.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";export{T as TemplateConfigForm}from"./shared-c7ab6598.js";import"./shared-35a7a4d6.js";import"./shared-19044260.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-0bbbc87f.js";import"./shared-0cc4beec.js";import"./shared-8d9c0007.js";import"./shared-4f037e43.js";import"./shared-2af327d0.js";import"./shared-99065f2a.js";import"./shared-9a0f97e5.js";import"./shared-4c61787a.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-da285807.js";import"./shared-11c2efc8.js";import"./shared-4a796610.js";import"./shared-73a8b603.js";import"./shared-4e709717.js";import"./shared-a8966936.js";import"./shared-d3bf9ac0.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-a42a63aa.js";import"./shared-f3b35364.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-aa4bf9ab.js";import"./shared-4a519a4a.js";import"./shared-d9a3104e.js";import"./shared-3a84611d.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import{_ as e}from"./shared-a8ced8bf.js";import{c as t,h as a}from"./shared-7f33a83a.js";import"./shared-93a1be98.js";import"./shared-0bbbc87f.js";import"./shared-4c61787a.js";import{S as s,T as i,a as r}from"./shared-19044260.js";import{c as n}from"./shared-4e709717.js";import{C as o,a as d}from"./shared-9a0f97e5.js";import"./shared-b1201c2e.js";import"./shared-290769ea.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import{G as l}from"./shared-a42a63aa.js";import{P as c}from"./shared-81d3ff30.js";import{C as h}from"./shared-a8966936.js";import{N as m}from"./shared-15278fe0.js";import{l as p}from"./shared-f3b35364.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-4f037e43.js";import"./shared-2af327d0.js";import"./shared-11c2efc8.js";import"./shared-4a796610.js";import"./shared-a420358e.js";import"./shared-915fb0e4.js";import"./shared-0cc4beec.js";import"./shared-d3bf9ac0.js";import"./shared-d6276c83.js";let f,u,$,v,y,b,_,x=e=>e;const g=s(i(h(r(m,"template-form"))));class j extends g{constructor(){super(...arguments),this.templates={},this.__cacheState="idle",this.__contentChoice="default"}static get properties(){return e(e({},super.properties),{},{__cacheState:{attribute:!1},__contentChoice:{attribute:!1}})}static get styles(){return[...super.styles,t(f||(f=x`#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":o,"x-group":l}}render(){var e,t;const{hiddenSelector:s,href:i,lang:r,ns:o}=this,d=i?"delete":"create",l=this.in("busy"),c=this.in("fail");return a(u||(u=x` <div class="space-y-m relative"> ${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> `),s.matches("description",!0)?"":this.__renderDescription(),s.matches("content",!0)?"":this.__renderContent(),s.matches("timestamps",!0)||!i?"":this.__renderTimestamps(),s.matches(d)?"":this.__renderAction(d),n({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!l&&!c}),c?"error":l?"busy":"empty",r,o,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderDescription(){var e,t;const s="description";return a($||($=x` <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(`${s}:before`),s,this.t(s),!this.in("idle")||this.disabledSelector.matches(s),this.readonlySelector.matches(s),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(`${s}:after`))}__renderContent(){var e;const t="content",s=!this.in("idle")||this.disabledSelector.matches(t),i=this.readonlySelector.matches(t),r=this.form.content_url?"url":this.form.content?"clipboard":this.__contentChoice;return a(v||(v=x` <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"),n({"transition-colors":!0,"text-disabled":s}),this.lang,this.ns,r,["default","url","clipboard"],i,s,(e=>{e instanceof d&&(this.edit({content:"",content_url:""}),this.__contentChoice=e.detail)}),["default","url","clipboard"].map((e=>a(y||(y=x` <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"!==r,i,s,this.form.content_url,(e=>"Enter"===e.key&&this.submit()),(e=>{const t=e.currentTarget.value;this.edit({content:"",content_url:t})}),i||this.form.content_url!==(null===(e=this.data)||void 0===e?void 0:e.content_url),s||"busy"===this.__cacheState,this.__cache,n({"relative transition-opacity":!0,"opacity-0":"idle"!==this.__cacheState}),this.lang,this.ns,n({"absolute inset-0 flex transition-opacity":!0,"opacity-0":"idle"===this.__cacheState}),"fail"===this.__cacheState?"error":"busy",this.lang,this.ns,"clipboard"!==r,i,s,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 a(b||(b=x` <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:s,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 a(_||(_=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 "+(s?"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:"",s=await new j.API(this).fetch(a,{method:"POST"});this.__cacheState=s.ok?"idle":"fail"}catch(e){this.__cacheState="fail"}}}customElements.define("foxy-template-form",j);export{j as TemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5382ccfa.js";import"./shared-0b67dae4.js";import"./shared-fff1815b.js";import"./shared-26adbd9b.js";import"./shared-9eff0743.js";import{I as e}from"./shared-d863e06b.js";import"./foxy-payments-api-payment-preset-form.js";import{g as t}from"./shared-be043b54.js";import"./foxy-email-template-card.js";import"./foxy-email-template-form.js";import"./foxy-nucleon-element.js";import"./foxy-template-card.js";import"./foxy-template-form.js";import{_ as r}from"./shared-a8ced8bf.js";import{a as o}from"./shared-6a2cf3b9.js";import{B as i,Q as a}from"./shared-7c8b3ce0.js";import{i as s}from"./shared-d3bf9ac0.js";import{c as n,h as l}from"./shared-7f33a83a.js";import{c as m}from"./shared-4e709717.js";import{s as d}from"./shared-11c2efc8.js";import"./shared-45cc4f44.js";import"./shared-34db34b2.js";import"./shared-68fad60e.js";import"./shared-0093ee59.js";import"./shared-4382f0cd.js";import"./shared-cd1bc9f5.js";import"./shared-8a34457d.js";import"./shared-fce199fa.js";import"./shared-0479553e.js";import"./shared-c6f5602e.js";import"./shared-4f037e43.js";import"./shared-2ec256d5.js";import"./shared-9f0606f2.js";import"./shared-a03d948d.js";import"./shared-d6276c83.js";import"./shared-b0ba62ff.js";import"./shared-09a14740.js";import"./shared-2e33702b.js";import"./shared-156144ab.js";import"./foxy-spinner.js";import"./shared-53cdff0b.js";import"./shared-a0f6e39c.js";import"./shared-8c8853ab.js";import"./foxy-collection-page.js";import"./shared-d519a301.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./foxy-payments-api-fraud-protection-card.js";import"./shared-68600caf.js";import"./foxy-payments-api-fraud-protection-form.js";import"./shared-e46eb641.js";import"./shared-2a20ac6b.js";import"./shared-35e929aa.js";import"./shared-c7fad58c.js";import"./shared-c00bff9d.js";import"./shared-4cd53ea2.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import"./shared-f49ee631.js";import"./shared-99065f2a.js";import"./shared-8c91f512.js";import"./shared-cbff5e58.js";import"./shared-f38a79cc.js";import"./shared-415c86b6.js";import"./shared-f3b35364.js";import"./shared-27aeabd9.js";import"./shared-20b2223a.js";import"./shared-008ffb33.js";let p,c,f,u,h,y,g,_,j=e=>e;const v=o(e,"template-set-form");class x extends v{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.cartIncludeTemplates=null,this.paymentMethodSets=null,this.checkoutTemplates=null,this.receiptTemplates=null,this.templateConfigs=null,this.emailTemplates=null,this.cartTemplates=null,this.localeCodes=null,this.languages=null,this.countries=null,this.regions=null}static get properties(){return r(r({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1},cartIncludeTemplates:{attribute:"cart-include-templates"},paymentMethodSets:{attribute:"payment-method-sets"},checkoutTemplates:{attribute:"checkout-templates"},receiptTemplates:{attribute:"receipt-templates"},templateConfigs:{attribute:"template-configs"},emailTemplates:{attribute:"email-templates"},cartTemplates:{attribute:"cart-templates"},localeCodes:{attribute:"locale-codes"},languages:{},countries:{},regions:{},__selectedTab:{attribute:!1}})}static get styles(){return[super.styles,n(p||(p=j`vaadin-button::part(label){flex:1;padding:0}.grid-cols-16rem{grid-template-columns:repeat(auto-fit,minmax(16rem,1fr))}`))]}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>!!e&&e.length<=100||"description:v8n_too_long",({code:e})=>!!e||"code:v8n_required",({code:e})=>!!e&&e.length<=50||"code:v8n_too_long",({language:e})=>!!e||"language:v8n_required",({locale_code:e})=>!!e||"locale_code:v8n_required"]}get hiddenSelector(){var e;const t=["cart-template-uri:not=content","cart-include-template-uri:not=content","email-template-uri:not=content,template-language","checkout-template-uri:not=content","receipt-template-uri:not=content","config:payment-method-set-uri:delete","config:payment-method-set-uri:create","config:payment-method-set-uri:timestamps","config:payment-method-set-uri:description","config:template-dialog:description","config:template-dialog:delete"];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("delete"),new i(`${t.join(" ")} ${super.hiddenSelector.toString()}`)}get readonlySelector(){var e;const t=[];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("code","description"),new i(`${t.join(" ")} ${super.readonlySelector.toString()}`)}get templateConfigForm(){return this.renderRoot.querySelector("foxy-template-config-form")}get paymentsApiPaymentPresetForm(){return this.renderRoot.querySelector("foxy-payments-api-payment-preset-form")}renderBody(){var e,t,r,o,i,a;const n=this.renderRoot.querySelector("#localeCodes"),m=null==n?void 0:n.data,d=Object.entries(null!==(e=null==m?void 0:m.values)&&void 0!==e?e:{}).map((([e,t])=>({value:e,label:t}))),p=this.renderRoot.querySelector("#languages"),u=null==p?void 0:p.data,h=Object.entries(null!==(t=null==u?void 0:u.values)&&void 0!==t?t:{}).map((([e,t])=>({value:e,label:t}))),y=this.constructor;return l(c||(c=j` <foxy-nucleon class="hidden" infer="" href="${0}" id="languages" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="localeCodes" @update="${0}"> </foxy-nucleon> <div class="grid grid-cols-1 gap-l"> <div class="grid grid-cols-16rem gap-m"> <foxy-internal-text-control infer="description"></foxy-internal-text-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> </div> ${0} </div> ${0} `),s(null!==(r=this.languages)&&void 0!==r?r:void 0),(()=>this.requestUpdate()),s(null!==(o=this.localeCodes)&&void 0!==o?o:void 0),(()=>this.requestUpdate()),h,d,this.data?l(f||(f=j` <foxy-template-config-form countries="${0}" regions="${0}" infer="config" href="${0}" id="config" @update="${0}"> ${0} ${0} </foxy-template-config-form> `),s(null!==(i=this.countries)&&void 0!==i?i:void 0),s(null!==(a=this.regions)&&void 0!==a?a:void 0),this.data._links["fx:template_config"].href,(()=>this.dispatchEvent(new y.UpdateEvent)),this.__renderPaymentMethods(),this.__renderTemplates()):"",super.renderBody())}in(e){const{paymentsApiPaymentPresetForm:t,templateConfigForm:r}=this;return super.in(e)||!!(null==t?void 0:t.in(e))||!!(null==r?void 0:r.in(e))}submit(){var e,t;null===(e=this.paymentsApiPaymentPresetForm)||void 0===e||e.submit(),null===(t=this.templateConfigForm)||void 0===t||t.submit(),super.submit()}undo(){var e,t;null===(e=this.paymentsApiPaymentPresetForm)||void 0===e||e.undo(),null===(t=this.templateConfigForm)||void 0===t||t.undo(),super.undo()}async _fetch(...e){var o,i,a,s,n,l,m,d,p=this;const c="string"==typeof e[0]?e[0]:e[0].url,f="string"==typeof e[0]?null===(o=e[1])||void 0===o?void 0:o.method:e[0].method,u=super._fetch.bind(this);if(c===this.href&&"DELETE"===f){const t=await u(this.href),r=[t._links["fx:cart_include_template"].href,t._links["fx:cart_template"].href,t._links["fx:receipt_template"].href,t._links["fx:checkout_template"].href,t._links["fx:email_template"].href,t._links["fx:payment_method_set"].href,t._links["fx:template_config"].href],o=await u(...e),i=await Promise.allSettled(r.map((e=>u(e,{method:"DELETE"})))),a=this.constructor.Rumour(this.group);return queueMicrotask((()=>r.forEach(((e,t)=>{"fulfilled"===i[t].status&&a.share({data:null,source:e})})))),o}if(c===this.parent&&"POST"===f){const e=this.form.code,o=async function({formEntry:e,collectionUrl:t,body:r}){if("string"==typeof e)return e;const o=await u(t,{method:"POST",body:JSON.stringify(r)}),i=o._links.self.href;return p.constructor.Rumour(p.group).share({data:o,source:i,related:[t]}),i},c=await Promise.all([o({collectionUrl:null!==(i=this.cartIncludeTemplates)&&void 0!==i?i:"",formEntry:this.form.cart_include_template_uri,body:{description:`Cart include template for template set ${e}`}}),o({collectionUrl:null!==(a=this.cartTemplates)&&void 0!==a?a:"",formEntry:this.form.cart_template_uri,body:{description:`Cart template for template set ${e}`}}),o({collectionUrl:null!==(s=this.receiptTemplates)&&void 0!==s?s:"",formEntry:this.form.receipt_template_uri,body:{description:`Web receipt template for template set ${e}`}}),o({collectionUrl:null!==(n=this.checkoutTemplates)&&void 0!==n?n:"",formEntry:this.form.checkout_template_uri,body:{description:`Checkout template for template set ${e}`}}),o({collectionUrl:null!==(l=this.emailTemplates)&&void 0!==l?l:"",formEntry:this.form.email_template_uri,body:{description:`Email receipt template for template set ${e}`}}),o({collectionUrl:null!==(m=this.paymentMethodSets)&&void 0!==m?m:"",formEntry:this.form.payment_method_set_uri,body:{description:`Payment method set for template set ${e}`}}),o({collectionUrl:null!==(d=this.templateConfigs)&&void 0!==d?d:"",formEntry:this.form.template_config_uri,body:{description:`Template config for template set ${e}`,json:JSON.stringify(t())}})]),f=JSON.stringify(r(r({},this.form),{},{cart_include_template_uri:c[0],cart_template_uri:c[1],receipt_template_uri:c[2],checkout_template_uri:c[3],email_template_uri:c[4],payment_method_set_uri:c[5],template_config_uri:c[6]}));return u(this.parent,{method:"POST",body:f})}return u(...e)}__renderPaymentMethods(){var e;const t=this.constructor;let r;try{r=`https://foxy-payments-api.element/payment_presets/${new URL(null!==(e=this.form.payment_method_set_uri)&&void 0!==e?e:"").pathname.split("/").pop()}`}catch(e){r=void 0}return l(u||(u=j` <foxy-payments-api-payment-preset-form infer="payment-method-set-uri" class="mt-l" href="${0}" slot="cards:after" .getFraudProtectionImageSrc="${0}" .getPaymentMethodImageSrc="${0}" @update="${0}"> </foxy-payments-api-payment-preset-form> `),s(r),this.getFraudProtectionImageSrc,this.getPaymentMethodImageSrc,(()=>this.dispatchEvent(new t.UpdateEvent)))}__renderTemplates(){return l(h||(h=j` <div class="grid grid-cols-1 gap-s mt-l" slot="troubleshooting:after"> <foxy-i18n class="text-s font-medium text-secondary" infer="" key="templates_title"> </foxy-i18n> <div class="grid grid-cols-1 divide-y divide-contrast-5"> ${0} </div> <foxy-i18n class="text-xs text-secondary" infer="" key="templates_helper_text"> </foxy-i18n> </div> `),["cart","cart_include","checkout","receipt","email"].map(((e,t,r)=>{const o=`foxy${"email"===e?"-email":""}-template-form`,i=`${e}_template_uri`,n=a(this.form,i),p=d({infer:i.replace(/_/g,"-"),href:n});return l(y||(y=j` <vaadin-button theme="contrast" class="${0}" @click="${0}"> <foxy-form-dialog header="${0}_header" infer="template-dialog" form="${0}" href="${0}"> </foxy-form-dialog> ${0} </vaadin-button> `),m({"rounded-none":!0,"rounded-t-l":0===t,"rounded-b-l":t===r.length-1}),(e=>{const t=e.currentTarget,r=t.querySelector("foxy-form-dialog");null==r||r.show(t)}),i,o,s(n),l("email"===e?g||(g=j`<foxy-email-template-card ...="${0}"></foxy-email-template-card>`):_||(_=j`<foxy-template-card ...="${0}"></foxy-template-card>`),p))})))}}customElements.define("foxy-template-set-form",x);export{x as TemplateSetForm};
|
|
1
|
+
import"./shared-d9a3104e.js";import"./shared-4ebfd7ef.js";import"./shared-d75c6072.js";import"./shared-11be3c89.js";import"./shared-214c34b5.js";import{I as e}from"./shared-14dc506c.js";import"./foxy-payments-api-payment-preset-form.js";import{g as t}from"./shared-c7ab6598.js";import"./foxy-email-template-card.js";import"./foxy-email-template-form.js";import"./foxy-nucleon-element.js";import"./foxy-template-card.js";import"./foxy-template-form.js";import{_ as r}from"./shared-a8ced8bf.js";import{a as o}from"./shared-19044260.js";import{B as a,Q as i}from"./shared-2af327d0.js";import{i as s}from"./shared-d3bf9ac0.js";import{c as n,h as l}from"./shared-7f33a83a.js";import{c as m}from"./shared-4e709717.js";import{s as d}from"./shared-11c2efc8.js";import"./shared-0bbbc87f.js";import"./shared-35a7a4d6.js";import"./shared-aa4bf9ab.js";import"./shared-0cc4beec.js";import"./shared-93a1be98.js";import"./shared-8d9c0007.js";import"./shared-9afb80a6.js";import"./shared-19440ca2.js";import"./shared-0479553e.js";import"./shared-d8bf2eac.js";import"./shared-4f037e43.js";import"./shared-a8966936.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-915fb0e4.js";import"./shared-3a84611d.js";import"./shared-b1201c2e.js";import"./foxy-spinner.js";import"./shared-7415fa7e.js";import"./shared-b20753b8.js";import"./shared-e4383064.js";import"./foxy-collection-page.js";import"./shared-d519a301.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./foxy-payments-api-fraud-protection-card.js";import"./shared-04046e0e.js";import"./foxy-payments-api-fraud-protection-form.js";import"./shared-c7cae9e6.js";import"./shared-b2850d64.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-1eb24528.js";import"./shared-d82f3ba0.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import"./shared-4a519a4a.js";import"./shared-99065f2a.js";import"./shared-9a0f97e5.js";import"./shared-4c61787a.js";import"./shared-da285807.js";import"./shared-73a8b603.js";import"./shared-a42a63aa.js";import"./shared-f3b35364.js";import"./shared-418e88da.js";import"./shared-290769ea.js";import"./shared-81d3ff30.js";let p,c,u,f,h,y,g,_,j=e=>e;const v=o(e,"template-set-form");class x extends v{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.cartIncludeTemplates=null,this.paymentMethodSets=null,this.checkoutTemplates=null,this.receiptTemplates=null,this.templateConfigs=null,this.emailTemplates=null,this.cartTemplates=null,this.localeCodes=null,this.languages=null,this.countries=null,this.regions=null}static get properties(){return r(r({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1},cartIncludeTemplates:{attribute:"cart-include-templates"},paymentMethodSets:{attribute:"payment-method-sets"},checkoutTemplates:{attribute:"checkout-templates"},receiptTemplates:{attribute:"receipt-templates"},templateConfigs:{attribute:"template-configs"},emailTemplates:{attribute:"email-templates"},cartTemplates:{attribute:"cart-templates"},localeCodes:{attribute:"locale-codes"},languages:{},countries:{},regions:{},__selectedTab:{attribute:!1}})}static get styles(){return[super.styles,n(p||(p=j`vaadin-button::part(label){flex:1;padding:0}.grid-cols-16rem{grid-template-columns:repeat(auto-fit,minmax(16rem,1fr))}`))]}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>!!e&&e.length<=100||"description:v8n_too_long",({code:e})=>!!e||"code:v8n_required",({code:e})=>!!e&&e.length<=50||"code:v8n_too_long",({language:e})=>!!e||"language:v8n_required",({locale_code:e})=>!!e||"locale_code:v8n_required"]}get hiddenSelector(){var e;const t=["cart-template-uri:not=content","cart-include-template-uri:not=content","email-template-uri:not=content,template-language","checkout-template-uri:not=content","receipt-template-uri:not=content","config:payment-method-set-uri:delete","config:payment-method-set-uri:create","config:payment-method-set-uri:timestamps","config:payment-method-set-uri:description","config:template-dialog:description","config:template-dialog:delete"];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("delete"),new a(`${t.join(" ")} ${super.hiddenSelector.toString()}`)}get readonlySelector(){var e;const t=[];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("code","description"),new a(`${t.join(" ")} ${super.readonlySelector.toString()}`)}get templateConfigForm(){return this.renderRoot.querySelector("foxy-template-config-form")}get paymentsApiPaymentPresetForm(){return this.renderRoot.querySelector("foxy-payments-api-payment-preset-form")}renderBody(){var e,t,r,o,a,i;const n=this.renderRoot.querySelector("#localeCodes"),m=null==n?void 0:n.data,d=Object.entries(null!==(e=null==m?void 0:m.values)&&void 0!==e?e:{}).map((([e,t])=>({value:e,label:t}))),p=this.renderRoot.querySelector("#languages"),f=null==p?void 0:p.data,h=Object.entries(null!==(t=null==f?void 0:f.values)&&void 0!==t?t:{}).map((([e,t])=>({value:e,label:t}))),y=this.constructor;return l(c||(c=j` <foxy-nucleon class="hidden" infer="" href="${0}" id="languages" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="localeCodes" @update="${0}"> </foxy-nucleon> <div class="grid grid-cols-1 gap-l"> <div class="grid grid-cols-16rem gap-m"> <foxy-internal-text-control infer="description"></foxy-internal-text-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> </div> ${0} </div> ${0} `),s(null!==(r=this.languages)&&void 0!==r?r:void 0),(()=>this.requestUpdate()),s(null!==(o=this.localeCodes)&&void 0!==o?o:void 0),(()=>this.requestUpdate()),h,d,this.data?l(u||(u=j` <foxy-template-config-form countries="${0}" regions="${0}" infer="config" href="${0}" id="config" @update="${0}"> ${0} ${0} </foxy-template-config-form> `),s(null!==(a=this.countries)&&void 0!==a?a:void 0),s(null!==(i=this.regions)&&void 0!==i?i:void 0),this.data._links["fx:template_config"].href,(()=>this.dispatchEvent(new y.UpdateEvent)),this.__renderPaymentMethods(),this.__renderTemplates()):"",super.renderBody())}in(e){const{paymentsApiPaymentPresetForm:t,templateConfigForm:r}=this;return super.in(e)||!!(null==t?void 0:t.in(e))||!!(null==r?void 0:r.in(e))}submit(){var e,t;null===(e=this.paymentsApiPaymentPresetForm)||void 0===e||e.submit(),null===(t=this.templateConfigForm)||void 0===t||t.submit(),super.submit()}undo(){var e,t;null===(e=this.paymentsApiPaymentPresetForm)||void 0===e||e.undo(),null===(t=this.templateConfigForm)||void 0===t||t.undo(),super.undo()}async _fetch(...e){var o,a,i,s,n,l,m,d,p=this;const c="string"==typeof e[0]?e[0]:e[0].url,u="string"==typeof e[0]?null===(o=e[1])||void 0===o?void 0:o.method:e[0].method,f=super._fetch.bind(this);if(c===this.href&&"DELETE"===u){const t=await f(this.href),r=[t._links["fx:cart_include_template"].href,t._links["fx:cart_template"].href,t._links["fx:receipt_template"].href,t._links["fx:checkout_template"].href,t._links["fx:email_template"].href,t._links["fx:payment_method_set"].href,t._links["fx:template_config"].href],o=await f(...e),a=await Promise.allSettled(r.map((e=>f(e,{method:"DELETE"})))),i=this.constructor.Rumour(this.group);return queueMicrotask((()=>r.forEach(((e,t)=>{"fulfilled"===a[t].status&&i.share({data:null,source:e})})))),o}if(c===this.parent&&"POST"===u){const e=this.form.code,o=async function({formEntry:e,collectionUrl:t,body:r}){if("string"==typeof e)return e;const o=await f(t,{method:"POST",body:JSON.stringify(r)}),a=o._links.self.href;return p.constructor.Rumour(p.group).share({data:o,source:a,related:[t]}),a},c=await Promise.all([o({collectionUrl:null!==(a=this.cartIncludeTemplates)&&void 0!==a?a:"",formEntry:this.form.cart_include_template_uri,body:{description:`Cart include template for template set ${e}`}}),o({collectionUrl:null!==(i=this.cartTemplates)&&void 0!==i?i:"",formEntry:this.form.cart_template_uri,body:{description:`Cart template for template set ${e}`}}),o({collectionUrl:null!==(s=this.receiptTemplates)&&void 0!==s?s:"",formEntry:this.form.receipt_template_uri,body:{description:`Web receipt template for template set ${e}`}}),o({collectionUrl:null!==(n=this.checkoutTemplates)&&void 0!==n?n:"",formEntry:this.form.checkout_template_uri,body:{description:`Checkout template for template set ${e}`}}),o({collectionUrl:null!==(l=this.emailTemplates)&&void 0!==l?l:"",formEntry:this.form.email_template_uri,body:{description:`Email receipt template for template set ${e}`}}),o({collectionUrl:null!==(m=this.paymentMethodSets)&&void 0!==m?m:"",formEntry:this.form.payment_method_set_uri,body:{description:`Payment method set for template set ${e}`}}),o({collectionUrl:null!==(d=this.templateConfigs)&&void 0!==d?d:"",formEntry:this.form.template_config_uri,body:{description:`Template config for template set ${e}`,json:JSON.stringify(t())}})]),u=JSON.stringify(r(r({},this.form),{},{cart_include_template_uri:c[0],cart_template_uri:c[1],receipt_template_uri:c[2],checkout_template_uri:c[3],email_template_uri:c[4],payment_method_set_uri:c[5],template_config_uri:c[6]}));return f(this.parent,{method:"POST",body:u})}return f(...e)}__renderPaymentMethods(){var e;const t=this.constructor;let r;try{r=`https://foxy-payments-api.element/payment_presets/${new URL(null!==(e=this.form.payment_method_set_uri)&&void 0!==e?e:"").pathname.split("/").pop()}`}catch(e){r=void 0}return l(f||(f=j` <foxy-payments-api-payment-preset-form infer="payment-method-set-uri" class="mt-l" href="${0}" slot="cards:after" .getFraudProtectionImageSrc="${0}" .getPaymentMethodImageSrc="${0}" @update="${0}"> </foxy-payments-api-payment-preset-form> `),s(r),this.getFraudProtectionImageSrc,this.getPaymentMethodImageSrc,(()=>this.dispatchEvent(new t.UpdateEvent)))}__renderTemplates(){return l(h||(h=j` <div class="grid grid-cols-1 gap-s mt-l" slot="troubleshooting:after"> <foxy-i18n class="text-s font-medium text-secondary" infer="" key="templates_title"> </foxy-i18n> <div class="grid grid-cols-1 divide-y divide-contrast-5"> ${0} </div> <foxy-i18n class="text-xs text-secondary" infer="" key="templates_helper_text"> </foxy-i18n> </div> `),["cart","cart_include","checkout","receipt","email"].map(((e,t,r)=>{const o=`foxy${"email"===e?"-email":""}-template-form`,a=`${e}_template_uri`,n=i(this.form,a),p=d({infer:a.replace(/_/g,"-"),href:n});return l(y||(y=j` <vaadin-button theme="contrast" class="${0}" @click="${0}"> <foxy-form-dialog header="${0}_header" infer="template-dialog" form="${0}" href="${0}"> </foxy-form-dialog> ${0} </vaadin-button> `),m({"rounded-none":!0,"rounded-t-l":0===t,"rounded-b-l":t===r.length-1}),(e=>{const t=e.currentTarget,r=t.querySelector("foxy-form-dialog");null==r||r.show(t)}),a,o,s(n),l("email"===e?g||(g=j`<foxy-email-template-card ...="${0}"></foxy-email-template-card>`):_||(_=j`<foxy-template-card ...="${0}"></foxy-template-card>`),p))})))}}customElements.define("foxy-template-set-form",x);export{x as TemplateSetForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import{h as t}from"./shared-7f33a83a.js";import{C as e}from"./shared-a8966936.js";import{N as s}from"./shared-15278fe0.js";import{T as i,a as r}from"./shared-19044260.js";import{c as a}from"./shared-4e709717.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-a8ced8bf.js";import"./shared-4f037e43.js";import"./shared-2af327d0.js";import"./shared-d3bf9ac0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";let o,n,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(o||(o=_` <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(n||(n=_` <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"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-c6f5602e.js";import"./shared-aecb20d0.js";import{I as t}from"./shared-d863e06b.js";import{I as r}from"./shared-fce199fa.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as o,c as e}from"./shared-7f33a83a.js";import{i}from"./shared-d3bf9ac0.js";import"./shared-5382ccfa.js";import"./shared-2e33702b.js";import{_ as s}from"./shared-a8ced8bf.js";import{N as n}from"./shared-9f0606f2.js";import{a}from"./shared-6a2cf3b9.js";import{B as d}from"./shared-7c8b3ce0.js";import"./shared-53cdff0b.js";import"./shared-4382f0cd.js";import"./shared-34db34b2.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-4f037e43.js";import"./shared-2ec256d5.js";import"./shared-4e709717.js";import"./shared-a03d948d.js";import"./shared-d6276c83.js";import"./shared-b0ba62ff.js";import"./shared-f49ee631.js";import"./shared-45cc4f44.js";import"./shared-68fad60e.js";import"./shared-cbff5e58.js";import"./shared-8c91f512.js";import"./shared-35e929aa.js";import"./shared-c7fad58c.js";import"./shared-cd1bc9f5.js";import"./shared-11c2efc8.js";import"./shared-156144ab.js";import"./shared-20b2223a.js";import"./shared-09a14740.js";import"./shared-0093ee59.js";import"./shared-415c86b6.js";import"./shared-008ffb33.js";import"./shared-8c8853ab.js";import"./shared-57412bac.js";import"./foxy-address-card.js";import"./shared-58445db9.js";import"./foxy-item-card.js";import"./shared-68600caf.js";import"./shared-2a20ac6b.js";import"./shared-8a34457d.js";import"./shared-c47571a6.js";import"./shared-9eff0743.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-coupon-card.js";import"./shared-fff1815b.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-0f137ff8.js";import"./shared-bc7f58ef.js";import"./shared-ef792142.js";import"./foxy-subscription-card.js";import"./shared-3fb5f380.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-3909c1e5.js";import"./shared-015e5cb9.js";import"./foxy-table.js";import"./shared-8911c2e0.js";import"./foxy-nucleon-element.js";import"./shared-d8faafc7.js";import"./shared-75e78c70.js";import"./shared-da126678.js";import"./foxy-pagination.js";import"./shared-99065f2a.js";import"./shared-27aeabd9.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-7e690245.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends r{renderControl(){var t,r,e,s;return o(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends r{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,r="fail"===t?"error":"idle"===t?this.theme:"";return o(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),r,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const r=new n.API(this),o=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=o.ok?"idle":"fail",o.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends r{renderControl(){var t,r,e,i,s,n,a,d;return o(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,r;return o(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,r;return o(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,r,e;return o(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,r,e;return o(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends r{renderControl(){var t;return o(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,r;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status)||"completed";return o(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;if(!r)return o(b||(b=w`--`));const i={amount:`${r.total_order} ${e}`};return o($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==r?void 0:r[t]} ${e}`};return o(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,r?o(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):o(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(t,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,r,o;return Boolean(null!==(r=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==r?r:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,r,e,s,n,a;return o(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
1
|
+
import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-d8bf2eac.js";import"./shared-3e781cc9.js";import{I as t}from"./shared-14dc506c.js";import{I as r}from"./shared-19440ca2.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as o,c as e}from"./shared-7f33a83a.js";import{i}from"./shared-d3bf9ac0.js";import"./shared-d9a3104e.js";import"./shared-3a84611d.js";import{_ as s}from"./shared-a8ced8bf.js";import{N as n}from"./shared-15278fe0.js";import{a}from"./shared-19044260.js";import{B as d}from"./shared-2af327d0.js";import"./shared-7415fa7e.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-4f037e43.js";import"./shared-a8966936.js";import"./shared-4e709717.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-4a519a4a.js";import"./shared-0bbbc87f.js";import"./shared-aa4bf9ab.js";import"./shared-4c61787a.js";import"./shared-9a0f97e5.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import"./shared-11c2efc8.js";import"./shared-b1201c2e.js";import"./shared-290769ea.js";import"./shared-915fb0e4.js";import"./shared-0cc4beec.js";import"./shared-a42a63aa.js";import"./shared-81d3ff30.js";import"./shared-e4383064.js";import"./shared-0ecc7d2c.js";import"./foxy-address-card.js";import"./shared-553e6472.js";import"./foxy-item-card.js";import"./shared-04046e0e.js";import"./shared-b2850d64.js";import"./shared-9afb80a6.js";import"./shared-e1069291.js";import"./shared-214c34b5.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-coupon-card.js";import"./shared-d75c6072.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-682dbe0a.js";import"./shared-119efeaa.js";import"./shared-bc7f58ef.js";import"./shared-4fa44231.js";import"./foxy-subscription-card.js";import"./shared-effdf59d.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-eab81bf4.js";import"./shared-93548d58.js";import"./foxy-table.js";import"./shared-d24c3729.js";import"./foxy-nucleon-element.js";import"./shared-9195959e.js";import"./shared-75e78c70.js";import"./shared-67f1821b.js";import"./foxy-pagination.js";import"./shared-99065f2a.js";import"./shared-418e88da.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-36aaf815.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends r{renderControl(){var t,r,e,s;return o(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends r{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,r="fail"===t?"error":"idle"===t?this.theme:"";return o(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),r,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const r=new n.API(this),o=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=o.ok?"idle":"fail",o.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends r{renderControl(){var t,r,e,i,s,n,a,d;return o(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,r;return o(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,r;return o(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,r,e;return o(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,r,e;return o(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends r{renderControl(){var t;return o(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,r;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status)||"completed";return o(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;if(!r)return o(b||(b=w`--`));const i={amount:`${r.total_order} ${e}`};return o($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==r?void 0:r[t]} ${e}`};return o(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,r?o(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):o(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(t,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,r,o;return Boolean(null!==(r=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==r?r:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,r,e,s,n,a;return o(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7415fa7e.js";import"./shared-93a1be98.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import{T as s}from"./shared-67f1821b.js";export{T as TransactionsTable}from"./shared-67f1821b.js";import"./shared-35a7a4d6.js";import"./shared-19044260.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-4f037e43.js";import"./shared-2af327d0.js";import"./shared-d24c3729.js";import"./shared-a8966936.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-aa4bf9ab.js";import"./shared-d9a3104e.js";import"./shared-3a84611d.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";export{U as UserForm}from"./shared-e4e93604.js";import"./shared-0bbbc87f.js";import"./shared-35a7a4d6.js";import"./shared-19044260.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-b1201c2e.js";import"./shared-a420358e.js";import"./shared-2af327d0.js";import"./shared-a8966936.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-4f037e43.js";import"./shared-93a1be98.js";import"./shared-7415fa7e.js";import"./shared-73a8b603.js";import"./shared-4c61787a.js";import"./shared-9a0f97e5.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-4a519a4a.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import"./shared-11c2efc8.js";import"./shared-4a796610.js";import"./shared-290769ea.js";import"./shared-915fb0e4.js";import"./shared-0cc4beec.js";import"./shared-a42a63aa.js";import"./shared-15278fe0.js";import"./shared-d6276c83.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d9a3104e.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-e4e93604.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import{h as a}from"./shared-7f33a83a.js";import{T as e}from"./shared-d24c3729.js";import{a as r}from"./shared-19044260.js";import"./shared-0bbbc87f.js";import"./shared-35a7a4d6.js";import"./shared-3a84611d.js";import"./shared-a8ced8bf.js";import"./shared-b1201c2e.js";import"./shared-a420358e.js";import"./shared-2af327d0.js";import"./shared-a8966936.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-4f037e43.js";import"./shared-d6276c83.js";import"./shared-aa4bf9ab.js";import"./shared-73a8b603.js";import"./shared-93a1be98.js";import"./shared-4c61787a.js";import"./shared-9a0f97e5.js";import"./shared-435ab348.js";import"./shared-a0e71609.js";import"./shared-4a519a4a.js";import"./shared-da285807.js";import"./shared-8d9c0007.js";import"./shared-11c2efc8.js";import"./shared-4a796610.js";import"./shared-290769ea.js";import"./shared-915fb0e4.js";import"./shared-0cc4beec.js";import"./shared-a42a63aa.js";import"./shared-15278fe0.js";import"./shared-b738ee96.js";import"./shared-7415fa7e.js";import"./foxy-nucleon-element.js";let t,o,d,i,m,n,l,p=s=>s;class h extends(r(e,"users-table")){constructor(){super(...arguments),this.columns=[h.nameColumn,h.emailColumn,h.rolesColumn,h.lastUpdatedColumn,h.actionsColumn]}render(){return a(t||(t=p` <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())}}h.nameColumn={cell:s=>a(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},h.emailColumn={hideBelow:"md",cell:s=>a(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},h.rolesColumn={cell:e=>a(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((r=>a(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[r]?"":"text-disabled",s.find((s=>s.property===r)).icon))))},h.lastUpdatedColumn={hideBelow:"lg",cell:s=>a(n||(n=p` <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:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},h.actionsColumn={cell:s=>a(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(a=>{const e=a.target,r=e.getRootNode().querySelector("#form");r.href=s.data._links.self.href,r.show(e)}),s.lang,s.ns)},customElements.define("foxy-users-table",h);export{h as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7415fa7e.js";import"./shared-93a1be98.js";import{I as s}from"./shared-04046e0e.js";import{h as e}from"./shared-7f33a83a.js";import{a}from"./shared-19044260.js";import"./shared-35a7a4d6.js";import"./foxy-spinner.js";import"./shared-d8bf2eac.js";import"./shared-a8ced8bf.js";import"./shared-2af327d0.js";import"./shared-4f037e43.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-4e709717.js";let i,r=s=>s;class o extends(a(s,"webhook-card")){renderBody(){var s,a,o,t;return e(i||(i=r` <div class="grid grid-cols-1 gap-s leading-none"> <p class="flex justify-between items-center font-semibold"> <span class="truncate">${0}​</span> <span class="uppercase inline-block text-xs bg-contrast-5 rounded p-xs flex-shrink-0"> ${0}​ </span> </p> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:language"></iron-icon> <p class="truncate">${0}​</p> </div> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:settings-input-antenna"> </iron-icon> <p class="truncate">${0}​</p> </div> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(a=this.data)||void 0===a?void 0:a.format,null===(o=this.data)||void 0===o?void 0:o.url,null===(t=this.data)||void 0===t?void 0:t.event_resource)}}customElements.define("foxy-webhook-card",o);export{o as WebhookCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3e781cc9.js";import"./shared-c7cae9e6.js";import"./shared-214c34b5.js";import{I as e}from"./shared-14dc506c.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as r}from"./shared-19044260.js";import{h as o}from"./shared-7f33a83a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-d8bf2eac.js";import"./shared-a8ced8bf.js";import"./shared-2af327d0.js";import"./shared-4f037e43.js";import"./shared-a8966936.js";import"./shared-d3bf9ac0.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./shared-3a84611d.js";import"./shared-d9a3104e.js";import"./shared-0bbbc87f.js";import"./shared-b1201c2e.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-19440ca2.js";import"./shared-0479553e.js";import"./shared-aa4bf9ab.js";import"./shared-9afb80a6.js";import"./shared-04046e0e.js";let t,a,s=e=>e;class n extends(r(e,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}renderBody(){return o(t||(t=s` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?o(a||(a=s` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",n);export{n as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d8bf2eac.js";import{I as e}from"./shared-04046e0e.js";import{a as s}from"./shared-19044260.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-a8ced8bf.js";import"./shared-2af327d0.js";import"./shared-4f037e43.js";import"./foxy-spinner.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";import"./shared-4e709717.js";let a,o=e=>e;class t extends(s(e,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=o` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-semibold"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}​ </span> </p> <p class="text-tertiary">${0}​</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d8bf2eac.js";import{I as s}from"./shared-04046e0e.js";import{a as e}from"./shared-19044260.js";import{h as a}from"./shared-7f33a83a.js";import{c as r}from"./shared-4e709717.js";import"./shared-a8ced8bf.js";import"./shared-2af327d0.js";import"./shared-4f037e43.js";import"./foxy-spinner.js";import"./shared-93a1be98.js";import"./shared-35a7a4d6.js";import"./shared-7415fa7e.js";import"./shared-15278fe0.js";import"./shared-a420358e.js";import"./shared-d6276c83.js";import"./shared-4a796610.js";let t,o=s=>s;const d=e(s,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return a(t||(t=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-semibold" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},r({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{T as e}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import{T as e}from"./shared-19044260.js";import{N as i}from"./shared-15278fe0.js";import{c as s}from"./shared-4e709717.js";import{h as t}from"./shared-7f33a83a.js";let n,r,a=e=>e;class o extends(e(i)){renderBody(){return t(n||(n=a``))}render(){return t(r||(r=a` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" class="m-auto" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.in({idle:"snapshot"})}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in({idle:"snapshot"})}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}}customElements.define("foxy-internal-card",o);export{o as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as t,i as e,e as n}from"./shared-34db34b2.js";import{D as o}from"./shared-6a2cf3b9.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
|
|
1
|
+
import{D as t,i as e,e as n}from"./shared-35a7a4d6.js";import{D as o}from"./shared-19044260.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as t}from"./shared-
|
|
1
|
+
import{F as t}from"./shared-93a1be98.js";import{a as e}from"./shared-0bbbc87f.js";import{D as s,t as i}from"./shared-35a7a4d6.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t}from"./shared-a8ced8bf.js";import{C as e}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-a8ced8bf.js";import{C as e}from"./shared-a8966936.js";import{h as i}from"./shared-7f33a83a.js";import{N as s}from"./shared-15278fe0.js";import{T as r}from"./shared-19044260.js";import{c as a}from"./shared-4e709717.js";let l,d,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(l||(l=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(d||(d=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!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:"")}}export{p as T};
|