@foxy.io/elements 1.35.0-beta.2 → 1.35.0
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 +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-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-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-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- 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-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.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-experimental-add-to-cart-builder.js +14 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.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-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-editor.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.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-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-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-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card-embed.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 +1 -1
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- 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 +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-swipe-actions.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.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 +7 -7
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-card.js +1 -1
- package/dist/cdn/foxy-user-invitation-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-2f02918d.js → shared-059d1e79.js} +1 -1
- package/dist/cdn/{shared-53caa399.js → shared-0e1d094b.js} +1 -1
- package/dist/cdn/{shared-018166d0.js → shared-0e59bad9.js} +1 -1
- package/dist/cdn/{shared-b16829cd.js → shared-120413cd.js} +1 -1
- package/dist/cdn/{shared-0ae33cf9.js → shared-139024d1.js} +1 -1
- package/dist/cdn/{shared-257389e5.js → shared-19ebb715.js} +5 -5
- package/dist/cdn/{shared-fc6bcfc5.js → shared-21254863.js} +1 -1
- package/dist/cdn/{shared-c5cb7e8a.js → shared-2256b8b1.js} +1 -1
- package/dist/cdn/{shared-cf0ca582.js → shared-247297ce.js} +1 -1
- package/dist/cdn/{shared-57a98543.js → shared-2565fed8.js} +1 -1
- package/dist/cdn/{shared-297e8531.js → shared-2676836d.js} +1 -1
- package/dist/cdn/{shared-504f3c65.js → shared-2868b35f.js} +1 -1
- package/dist/cdn/{shared-ebc72d69.js → shared-2b25aedd.js} +1 -1
- package/dist/cdn/{shared-80688cd4.js → shared-2ca4d459.js} +1 -1
- package/dist/cdn/{shared-066fb69f.js → shared-2eebd7bc.js} +1 -1
- package/dist/cdn/{shared-5d308dd7.js → shared-3023dfb2.js} +3 -3
- package/dist/cdn/{shared-44118acb.js → shared-303cf36c.js} +1 -1
- package/dist/cdn/{shared-525c1936.js → shared-3149ab8d.js} +1 -1
- package/dist/cdn/{shared-bb3c9e23.js → shared-33ed0fe7.js} +1 -1
- package/dist/cdn/{shared-68fdcf24.js → shared-349a42e1.js} +1 -1
- package/dist/cdn/{shared-112e521b.js → shared-35a2aabc.js} +1 -1
- package/dist/cdn/{shared-d8bffb38.js → shared-37bdd118.js} +1 -1
- package/dist/cdn/{shared-c5326ab8.js → shared-37c52c4c.js} +1 -1
- package/dist/cdn/{shared-32440b17.js → shared-37dc0b85.js} +1 -1
- package/dist/cdn/{shared-c7740aa2.js → shared-3b1fc10b.js} +1 -1
- package/dist/cdn/{shared-ce055dce.js → shared-40bed8c1.js} +1 -1
- package/dist/cdn/shared-433b15f9.js +1 -0
- package/dist/cdn/{shared-96886940.js → shared-481eb635.js} +1 -1
- package/dist/cdn/{shared-eadddff6.js → shared-4bcb2368.js} +1 -1
- package/dist/cdn/{shared-c532d615.js → shared-4fdc63d9.js} +1 -1
- package/dist/cdn/{shared-0e2a0b21.js → shared-50f2497c.js} +1 -1
- package/dist/cdn/{shared-51c4a6dd.js → shared-5212ef4f.js} +1 -1
- package/dist/cdn/{shared-9803aa7c.js → shared-53e42a77.js} +1 -1
- package/dist/cdn/shared-53e476fd.js +1 -0
- package/dist/cdn/{shared-51fd39fa.js → shared-544b7d4b.js} +1 -1
- package/dist/cdn/{shared-eb7bf7ba.js → shared-56271b15.js} +1 -1
- package/dist/cdn/{shared-238d397f.js → shared-5741ba29.js} +1 -1
- package/dist/cdn/{shared-4c4b87c2.js → shared-59d9d6ca.js} +1 -1
- package/dist/cdn/{shared-87b5a6aa.js → shared-5a9e9e89.js} +1 -1
- package/dist/cdn/shared-5fd5805c.js +15 -0
- package/dist/cdn/{shared-2cb3cb3a.js → shared-602ed877.js} +1 -1
- package/dist/cdn/{shared-b1fa0b61.js → shared-61e50856.js} +1 -1
- package/dist/cdn/{shared-a585bfd3.js → shared-639dbd3f.js} +1 -1
- package/dist/cdn/{shared-8438d4ca.js → shared-63c32024.js} +1 -1
- package/dist/cdn/{shared-44fd89ce.js → shared-64d48bc6.js} +1 -1
- package/dist/cdn/{shared-8af5a4f2.js → shared-6b06d5c1.js} +1 -1
- package/dist/cdn/{shared-ec5b614e.js → shared-6cb26d12.js} +1 -1
- package/dist/cdn/{shared-1c4ddc9b.js → shared-6fa216e7.js} +1 -1
- package/dist/cdn/{shared-573d6e21.js → shared-7439665e.js} +1 -1
- package/dist/cdn/{shared-70487b4c.js → shared-751c9f1e.js} +1 -1
- package/dist/cdn/{shared-01f85a69.js → shared-7f68743e.js} +1 -1
- package/dist/cdn/{shared-d3a5cb85.js → shared-831f5042.js} +1 -1
- package/dist/cdn/{shared-b0d76785.js → shared-84ada96e.js} +1 -1
- package/dist/cdn/{shared-9fcd36e5.js → shared-8d92dd6e.js} +1 -1
- package/dist/cdn/{shared-6de0e9f3.js → shared-900fd54f.js} +1 -1
- package/dist/cdn/{shared-e77d8d01.js → shared-927f1a51.js} +1 -1
- package/dist/cdn/{shared-da393323.js → shared-939f50c2.js} +1 -1
- package/dist/cdn/{shared-8b838d83.js → shared-9c82e27f.js} +2 -2
- package/dist/cdn/{shared-95a7dab8.js → shared-a4d773a3.js} +1 -1
- package/dist/cdn/{shared-80a7903f.js → shared-a5bd0da6.js} +1 -1
- package/dist/cdn/{shared-84761b5b.js → shared-a81a1cc3.js} +1 -1
- package/dist/cdn/shared-aa54bc96.js +29 -0
- package/dist/cdn/{shared-363dce45.js → shared-acdf3166.js} +1 -1
- package/dist/cdn/{shared-7889f2f2.js → shared-afa402dc.js} +1 -1
- package/dist/cdn/{shared-dc73b9a5.js → shared-ba5c42c7.js} +1 -1
- package/dist/cdn/{shared-31d8e958.js → shared-bf7baab5.js} +1 -1
- package/dist/cdn/{shared-b77e1a8a.js → shared-c5972323.js} +1 -1
- package/dist/cdn/{shared-d973155b.js → shared-cdb5ad48.js} +1 -1
- package/dist/cdn/{shared-2bf89a21.js → shared-cf613436.js} +1 -1
- package/dist/cdn/{shared-22ba9566.js → shared-d0aed1c1.js} +1 -1
- package/dist/cdn/{shared-3713f047.js → shared-d4e7383e.js} +1 -1
- package/dist/cdn/shared-d9393c31.js +1 -0
- package/dist/cdn/{shared-9f97643d.js → shared-d9f38239.js} +1 -1
- package/dist/cdn/{shared-ffc84c84.js → shared-db92bb31.js} +1 -1
- package/dist/cdn/{shared-27e2e59a.js → shared-e14930ce.js} +1 -1
- package/dist/cdn/{shared-28b0e29a.js → shared-ebd077b5.js} +1 -1
- package/dist/cdn/{shared-d1cb97c6.js → shared-eeb2bd18.js} +1 -1
- package/dist/cdn/{shared-b04e9753.js → shared-f0a38941.js} +1 -1
- package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +5 -4
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +9 -2
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
- package/dist/mixins/themeable.js +20 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-5e0b71a2.js +0 -29
- package/dist/cdn/shared-99940888.js +0 -1
- package/dist/cdn/shared-a0c6a159.js +0 -15
- package/dist/cdn/shared-a7617e76.js +0 -1
- package/dist/cdn/shared-ab26c69f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3023dfb2.js";import"./shared-f0a38941.js";import"./shared-6b06d5c1.js";import"./shared-0e59bad9.js";import"./shared-3149ab8d.js";import"./shared-59d9d6ca.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-2565fed8.js";import{h as e}from"./shared-ba5c42c7.js";import{C as s}from"./shared-eeb2bd18.js";import{N as t}from"./shared-33ed0fe7.js";import{T as i,a as r}from"./shared-aa54bc96.js";import{c as a}from"./shared-4e709717.js";import{i as d}from"./shared-53e42a77.js";import{v as o}from"./shared-b738ee96.js";import"./shared-120413cd.js";import"./shared-0e1d094b.js";import"./shared-639dbd3f.js";import"./shared-ebd077b5.js";import"./shared-247297ce.js";import"./shared-8d92dd6e.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let n,l,m,h,c=e=>e;const p=i(s(r(t,"access-recovery-form")));class f extends p{constructor(){super(...arguments),this.__checkEmailValidity=()=>!this.errors.some((e=>e.startsWith("email"))),this.__renderEmail=()=>{var s;const t=this.in("fail"),i=this.in("busy"),r=this.in({idle:"snapshot"}),a=this.errors.filter((e=>e.startsWith("email"))).map((e=>e.replace("email","v8n"))),o=a[0]?this.t(a[0]).toString():"";return e(n||(n=c` <div> ${0} <vaadin-email-field error-message="${0}" data-testid="email" class="w-full" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-email-field> ${0} </div> `),this.renderTemplateOrSlot("email:before"),o,this.t("email").toString(),d(null===(s=this.form.detail)||void 0===s?void 0:s.email),i||r||t||this.disabledSelector.matches("email",!0),this.readonlySelector.matches("email",!0),this.__checkEmailValidity,(e=>{this.edit({detail:{email:e.target.value},type:"email"})}),(e=>{"Enter"===e.key&&this.submit()}),this.renderTemplateOrSlot("email:after"))},this.__renderMessage=()=>{const s=this.in("fail"),t=s?"bg-error-10 text-error":"bg-success-10 text-success",i=s?"lumo:error":"lumo:cog",r=s?"unknown_error":"recover_access_success";return e(l||(l=c` <div> ${0} <p class="leading-s flex items-start text-s rounded p-s ${0}"> <iron-icon class="flex-shrink-0 icon-inline text-l mr-s" icon="${0}"></iron-icon> <foxy-i18n lang="${0}" key="${0}" ns="${0}" data-testid="message"></foxy-i18n> </p> ${0} </div> `),this.renderTemplateOrSlot("message:before"),t,i,this.lang,r,this.ns,this.renderTemplateOrSlot("message:after"))},this.__renderSubmit=()=>{const s=this.in("fail"),t=0===this.errors.length,i=this.in("busy"),r=this.in({idle:"snapshot"}),a=i||r||!t||s;return e(m||(m=c` <div> ${0} <vaadin-button data-testid="submit" class="w-full" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),a||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.lang,this.ns,this.renderTemplateOrSlot("submit:after"))}}static get v8n(){return[({detail:e})=>(null==e?void 0:e.email)&&e.email.length>0||"email_required",({detail:e})=>{var s;return o(null!==(s=null==e?void 0:e.email)&&void 0!==s?s:"")||"email_invalid_email"}]}render(){var s,t;const i=this.hiddenSelector,r=this.in({idle:"snapshot"})||this.in("fail"),d=this.in("busy");return e(h||(h=c` <main data-testid="wrapper" aria-live="polite" aria-busy="${0}" class="relative font-lumo text-m leading-m space-y-m"> ${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="busy" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </main> `),d,i.matches("email",!0)?"":this.__renderEmail(),i.matches("message",!0)||!r?"":this.__renderMessage(),i.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!d}),this.lang,this.ns,null!==(t=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==t?t:"")}async _sendPost(e){const s=JSON.stringify(e),i=await this._fetch(this.parent,{body:s,method:"POST"}),r=t.Rumour(this.group),a=[...this.related,this.parent];return r.share({data:i,related:a,source:i._links.self.href}),i}}customElements.define("foxy-access-recovery-form",f);export{f as AccessRecoveryForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3149ab8d.js";import"./shared-8d92dd6e.js";import{h as c}from"./shared-120413cd.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-2565fed8.js";import{h}from"./shared-ba5c42c7.js";import{C as a}from"./shared-eeb2bd18.js";import{N as t}from"./shared-33ed0fe7.js";import{T as s,a as i}from"./shared-aa54bc96.js";import{c as d}from"./shared-4e709717.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4bcb2368.js";import"./shared-a5bd0da6.js";import"./shared-84ada96e.js";import{I as e}from"./shared-64d48bc6.js";import{a as r}from"./shared-aa54bc96.js";import{B as t}from"./shared-d1195c27.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-6cb26d12.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-6b06d5c1.js";import"./shared-0e1d094b.js";import"./shared-3149ab8d.js";import"./shared-2565fed8.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-2256b8b1.js";import"./shared-56271b15.js";import"./shared-900fd54f.js";import"./shared-9c82e27f.js";import"./shared-927f1a51.js";import"./shared-639dbd3f.js";import"./shared-651c44fa.js";import"./shared-ebd077b5.js";import"./shared-f0a38941.js";import"./shared-831f5042.js";import"./shared-61e50856.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";import"./shared-8d92dd6e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const s={AF:[],AX:[],AL:[],DZ:[],AS:[],AD:[],AO:[],AI:[],AQ:[],AG:[],AR:[],AM:[],AW:[],AU:["ACT","NSW","NT","QLD","SA","TAS","VIC","WA"],AT:["BL","KN","NO","OO","SB","ST","TI","VB","WI"],AZ:[],BS:[],BH:[],BD:[],BB:[],BY:[],BE:[],BZ:[],BJ:[],BM:[],BT:[],BO:[],BQ:["BO","SA","SE"],BA:[],BW:[],BV:[],BR:[],IO:[],BN:[],BG:[],BF:[],BI:[],KH:[],CM:[],CA:["AB","BC","MB","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT"],CV:[],CW:[],KY:[],CF:[],TD:[],CL:[],CN:[],CX:[],CC:[],CO:[],KM:[],CG:[],CD:[],CK:[],CR:[],CI:[],HR:[],CU:[],CY:[],CZ:[],DK:[],DJ:[],DM:[],DO:[],EC:[],EG:[],SV:[],SX:[],GQ:[],ER:[],EE:[],ET:[],FK:[],FO:[],FJ:[],FI:[],FR:[],GF:[],PF:[],TF:[],GA:[],GM:[],GE:[],DE:["BW","BY","BE","BB","HB","HH","HE","MV","NI","NW","RP","SL","SN","ST","SH","TH"],GH:[],GI:[],GR:[],GL:[],GD:[],GP:[],GU:[],GT:[],GG:[],GN:[],GW:[],GY:[],HT:[],HM:[],VA:[],HN:[],HK:[],HU:[],IS:[],IN:["AN","AP","AR","AS","BR","CH","CT","DN","DD","DL","GA","GJ","HR","HP","JK","JH","KA","KL","LD","MP","MH","MN","ML","MZ","NL","OR","PY","PB","RJ","SK","TN","TG","TR","UT","UP","WB"],ID:[],IR:[],IQ:[],IE:["CW","CN","CE","CO","DL","D","G","KY","KE","KK","LS","LM","LK","LD","LH","MO","MH","MN","OY","RN","SO","TA","WD","WH","WX","WW"],IM:[],IL:[],IT:[],JM:[],JP:["10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","05","02","07","01","08","03","04","09","06"],JE:[],JO:[],KZ:[],KE:[],KI:[],KP:[],KR:[],KW:[],KG:[],LA:[],LV:[],LB:[],LS:[],LR:[],LY:[],LI:[],LT:[],LU:[],MO:[],MK:[],MG:[],MW:[],MY:[],MV:[],ML:[],MT:[],MH:[],MQ:[],MR:[],MU:[],YT:[],MX:[],FM:[],MD:[],MC:[],MN:[],ME:[],MS:[],MA:[],MZ:[],MM:[],NA:[],NR:[],NP:[],NL:[],NC:[],NZ:[],NI:[],NE:[],NG:[],NU:[],NF:[],MP:[],NO:["10","11","12","14","15","16","17","18","19","20","30","34","38","42","46","50","54","01","02","03","04","05","06","07","08","09"],OM:[],PK:[],PW:[],PS:[],PA:[],PG:[],PY:[],PE:[],PH:[],PN:[],PL:[],PT:[],PR:[],QA:[],RE:[],RO:[],RU:[],RW:[],BL:[],SH:[],KN:[],LC:[],MF:[],PM:[],VC:[],WS:[],SM:[],SS:[],ST:[],SA:[],SN:[],RS:[],SC:[],SL:[],SG:[],SK:[],SI:[],SB:[],SO:[],ZA:[],GS:[],ES:["A Coruna","Alava","Albacete","Alicante","Almeria","Asturias","Avila","Badajoz","Baleares","Barcelona","Burgos","Caceres","Cadiz","CN","Cantabria","Castellon","Ceuta","Ciudad Real","Cordoba","Cuenca","Gipuzkoa","Girona","Granada","Guadalajara","Guipuzcoa","Huelva","Huesca","Jaen","La Rioja","Las Palmas","Leon","Lleida","Lugo","Madrid","Malaga","Melilla","Murcia","Navarra","Ourense","Palencia","Pontevedra","Salamanca","Santa Cruz de Tenerife","Segovia","Sevilla","Soria","Tarragona","Teruel","Toledo","Valencia","Valladolid","Vizcaya","Zamora","Zaragoza"],LK:[],SD:[],SR:[],SJ:[],SZ:[],SE:[],CH:["AG","AR","AI","BL","BS","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TI","TG","UR","VS","VD","ZH","ZG"],SY:[],TW:[],TJ:[],TZ:[],TH:[],TL:[],TG:[],TK:[],TO:[],TT:[],TN:[],TR:[],TM:[],TC:[],TV:[],UG:[],UA:[],AE:[],GB:[],US:["AL","AK","AS","AZ","AR","AF","AA","AC","AE","AM","AP","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"],UM:[],UY:[],UZ:[],VU:[],VE:[],VN:[],VG:[],VI:[],WF:[],EH:[],YE:[],ZM:[],ZW:[]};let a,n,i,d=e=>e;const l=r(e,"address-form");class c extends l{constructor(){super(...arguments),this.__ignoreAddressRestrictionsGetValue=()=>this.form.ignore_address_restrictions?["true"]:[],this.__ignoreAddressRestrictionsSetValue=e=>{this.edit({ignore_address_restrictions:e.includes("true")})},this.__ignoreAddressRestrictionsOptions=[{label:"option_true",value:"true"}],this.__countrySetValue=e=>{this.edit({country:e,region:""})}}static get v8n(){return[({address_name:e})=>e&&e.length>0||"address-name:v8n_required",({address_name:e})=>!e||e.length<=100||"address-name:v8n_too_long",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({region:e})=>!e||e.length<=50||"region:v8n_too_long",({city:e})=>!e||e.length<=50||"city:v8n_too_long",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long",({company:e})=>!e||e.length<=50||"company:v8n_too_long",({address2:e})=>!e||e.length<=100||"address-two:v8n_too_long",({address1:e})=>e&&e.length>0||"address-one:v8n_required",({address1:e})=>!e||e.length<=100||"address-one:v8n_too_long",({postal_code:e})=>!e||e.length<=50||"postal-code:v8n_too_long"]}get hiddenSelector(){var e,r;const o=[super.hiddenSelector.toString()];return(!!(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)||!!(null===(r=this.data)||void 0===r?void 0:r.is_default_billing))&&o.unshift("delete","address-name","header:copy-id"),new t(o.join(" ").trim())}get headerTitleKey(){var e,r;return(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)?"title_default_shipping":(null===(r=this.data)||void 0===r?void 0:r.is_default_billing)?"title_default_billing":super.headerTitleKey}renderBody(){const e=this.__regionOptions;return o(a||(a=d` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="address-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-one" property="address1"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-two" property="address2"> </foxy-internal-text-control> <foxy-internal-select-control infer="country" .options="${0}" .setValue="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="city"></foxy-internal-text-control> <foxy-internal-text-control infer="postal-code"></foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="ignore-address-restrictions" class="col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} `),this.renderHeader(),this.__countryOptions,this.__countrySetValue,e.length>0?o(n||(n=d` <foxy-internal-select-control infer="region" .options="${0}"> </foxy-internal-select-control> `),e):o(i||(i=d`<foxy-internal-text-control infer="region"></foxy-internal-text-control>`)),this.__ignoreAddressRestrictionsGetValue,this.__ignoreAddressRestrictionsSetValue,this.__ignoreAddressRestrictionsOptions,super.renderBody())}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let r;try{r=(await e.json())._embedded["fx:errors"][0].message}catch(r){throw e}throw r.includes("Country is invalid or disallowed by store configuration")?["error:country_banned"]:r.includes("this address name already exists for this customer")?["error:address_name_exists"]:e}}get __countryOptions(){return Object.keys(s).map((e=>({label:this.t(`country_${e.toLowerCase()}`),value:e})))}get __regionOptions(){var e,r;const t=null!==(e=this.form.country)&&void 0!==e?e:"";return(null!==(r=s[t])&&void 0!==r?r:[]).map((e=>({label:this.t(`country_${t.toLowerCase()}_region_${e.toLowerCase()}`),value:e})))}}customElements.define("foxy-address-form",c);export{c as AddressForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-433b15f9.js";import"./foxy-nucleon-element.js";import"./shared-2565fed8.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-aa54bc96.js";import{C as r}from"./shared-eeb2bd18.js";import{p as i}from"./shared-d9393c31.js";import{I as s}from"./shared-5741ba29.js";import{i as a}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let d,n,l,_,c,u,m,f=e=>e;const h=r(t(s,"admin-subscription-card"));class p extends h{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__customerLoaderId="customerLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){var e;const t=!!(null===(e=this.data)||void 0===e?void 0:e.first_failed_transaction_date),r=this.__customer,i=this.__transactionTemplate,s=this.__priceKey,h=this.__priceOptions,p=this.__summaryOptions,v=this.__summaryKey,y=this.__statusKey,x=this.__statusOptions;return o(d||(d=f` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s text-tertiary"> <div class="flex items-center space-x-s"> <span class="block flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s"> ${0} </span> </div> <div class="truncate text-s ${0}"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} ${0} (${0}) </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()),a(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),p&&v?o(n||(n=f`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),v,p):o(l||(l=f`​`)),h&&s?o(_||(_=f`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,h):o(c||(c=f`​`)),t?"text-error":"text-secondary",x&&y?o(u||(u=f`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),y,x):o(m||(m=f`​`)),null==r?void 0:r.first_name,null==r?void 0:r.last_name,null==i?void 0:i.customer_email)}get isBodyReady(){return super.isBodyReady&&!!this.__items&&!!this.__currencyCode&&!!this.__currencyDisplay&&!!this.__customer}get __transactionTemplateHref(){var e,t;const r=this.data;if(!r)return;if("_embedded"in r&&"fx:transaction_template"in r._embedded)return;const i=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction_template"].href)&&void 0!==t?t:"");return i.searchParams.set("zoom","items"),i.toString()}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){const e=this.__transactionTemplate;if(!(null==e?void 0:e.currency_code))return(null==e?void 0:e.template_set_uri)||void 0}get __customerHref(){var e,t,r,i;if(!("fx:customer"in(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})))return null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:customer"])||void 0===i?void 0:i.href}get __itemsHref(){const e=this.__transactionTemplate;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:transaction_template"in r._embedded)return r._embedded["fx:transaction_template"];{const r=`#${this.__transactionTemplateLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,i=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __customer(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:customer"in r._embedded)return r._embedded["fx:customer"];{const r=`#${this.__customerLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __items(){const e=this.__transactionTemplate;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);return(null==t?void 0:t.data)?{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __summaryOptions(){var e;const{array:t,count:r}=null!==(e=this.__items)&&void 0!==e?e:{};if(t&&r)return{firstItem:t[0],count:r,countMinus1:r-1}}get __summaryKey(){const e=this.__items;if(e)return e.isApproximateCount?"summary_approximate":"summary"}get __statusOptions(){const e=this.data;if(null!==e)return e.first_failed_transaction_date?{date:e.first_failed_transaction_date}:e.end_date?{date:e.end_date}:!1===e.is_active?{}:new Date(e.start_date)>new Date?{date:e.start_date}:{date:e.next_transaction_date}}get __currencyCode(){var e,t,r;const i=this.__transactionTemplate;if(null==i?void 0:i.currency_code)return i.currency_code;{const i=this.__localeCodesHelper,s=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,a=s?null==i?void 0:i.values[s]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}get __priceOptions(){var t,r;const s=this.__currencyDisplay;if(void 0===s)return;const a=this.__currencyCode;if(void 0===a)return;const o=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===o)return;const d=null===(r=this.data)||void 0===r?void 0:r.frequency;return void 0!==d?e(e({},i(d)),{},{amount:`${o} ${a}`,currencyDisplay:s}):void 0}get __statusKey(){const e=this.data;if(null!==e){if(e.first_failed_transaction_date)return"subscription_failed";if(e.end_date){return new Date(e.end_date).getTime()>Date.now()?"subscription_will_be_cancelled":"subscription_cancelled"}return!1===e.is_active?"subscription_inactive":new Date(e.start_date)>new Date?"subscription_will_be_active":"subscription_active"}}get __priceKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.frequency;if(t)return"price_"+(".5m"===t?"twice_a_month":"recurring")}}customElements.define("foxy-admin-subscription-card",p);export{p as AdminSubscriptionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-544b7d4b.js";import"./shared-a81a1cc3.js";import"./shared-afa402dc.js";import"./shared-602ed877.js";import{b as r,I as o}from"./shared-64d48bc6.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-transaction.js";import"./shared-2565fed8.js";import{_ as t,B as e}from"./shared-d1195c27.js";import{i as s}from"./shared-53e42a77.js";import{h as a,s as i}from"./shared-ba5c42c7.js";import{a as n}from"./shared-aa54bc96.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-3149ab8d.js";import"./shared-247297ce.js";import"./shared-6cb26d12.js";import"./shared-6b06d5c1.js";import"./shared-56271b15.js";import"./shared-900fd54f.js";import"./shared-9c82e27f.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-8d92dd6e.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-37c52c4c.js";import"./shared-639dbd3f.js";import"./shared-ebd077b5.js";import"./shared-f0a38941.js";import"./shared-0e1d094b.js";import"./shared-349a42e1.js";import"./shared-35a2aabc.js";import"./shared-2256b8b1.js";import"./shared-927f1a51.js";import"./shared-651c44fa.js";import"./shared-831f5042.js";import"./shared-61e50856.js";import"./shared-6fa216e7.js";import"./shared-37dc0b85.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";import"./shared-bab2ea2c.js";import"./shared-433b15f9.js";import"./shared-5741ba29.js";import"./shared-7f68743e.js";import"./shared-c5972323.js";import"./foxy-billing-address-card.js";import"./foxy-custom-field-form.js";import"./shared-4bcb2368.js";import"./foxy-custom-field-card.js";import"./shared-bf7baab5.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-641786b2.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./shared-21254863.js";import"./shared-939f50c2.js";import"./shared-303cf36c.js";import"./shared-a5bd0da6.js";import"./shared-84ada96e.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./shared-d9393c31.js";import"./foxy-item-form.js";import"./shared-2b25aedd.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./shared-2ca4d459.js";import"./foxy-customer-card.js";let d,m=r=>r;customElements.define("foxy-internal-admin-subscription-form-load-in-cart-action",class extends r{constructor(){super(...arguments),this.action=null}static get properties(){return t(t({},super.properties),{},{action:{}})}renderControl(){var r,o;const t=this.nucleon;let e;try{const s=new URL(null!==(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r._links["fx:sub_token_url"].href)&&void 0!==o?o:"");"cancel"===this.action&&s.searchParams.set("sub_cancel","true"),e=s.toString()}catch(r){e=void 0}return a(d||(d=m` <a target="_blank" class="rounded font-medium text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="caption"> </foxy-i18n> </a> `),s(e))}});let c,f,l=r=>r;customElements.define("foxy-internal-admin-subscription-form-error",class extends r{renderControl(){var r,o;return a(c||(c=l` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),i(f||(f=l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(o=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===o?void 0:o.error_message)}});let p,h,u=r=>r;const j=n(o,"admin-subscription-form");class y extends j{get hiddenSelector(){var r,o;const t=["delete",super.hiddenSelector.toString()];return(null===(r=this.data)||void 0===r?void 0:r.error_message)||t.unshift("error-message"),(null===(o=this.data)||void 0===o?void 0:o.is_active)||t.unshift("view-action","cancel-action"),new e(t.join(" ").trim())}get headerSubtitleOptions(){var r;return{context:(null===(r=this.data)||void 0===r?void 0:r.is_active)?"active":"inactive"}}renderHeaderActions(r){return a(p||(p=u` <foxy-internal-admin-subscription-form-load-in-cart-action infer="view-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> <foxy-internal-admin-subscription-form-load-in-cart-action action="cancel" infer="cancel-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> `))}renderBody(){var r,o,t,e,i;let n;try{const t=new URL(null!==(o=null===(r=this.data)||void 0===r?void 0:r._links["fx:transactions"].href)&&void 0!==o?o:"");t.searchParams.set("zoom","items"),n=t.toString()}catch(r){n=void 0}return a(h||(h=u` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),s(null===(t=this.data)||void 0===t?void 0:t._embedded["fx:transaction_template"].currency_code),this.renderTemplateOrSlot(),s(null===(i=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===i?void 0:i["fx:attributes"].href),s(n),super.renderBody())}}customElements.define("foxy-admin-subscription-form",y);export{y as AdminSubscriptionForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-f0a38941.js";import"./shared-6b06d5c1.js";import"./shared-8d92dd6e.js";import"./shared-3149ab8d.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-2565fed8.js";import{I as t}from"./shared-64d48bc6.js";import"./shared-c5972323.js";import"./foxy-copy-to-clipboard.js";import"./foxy-swipe-actions.js";import{_ as e}from"./shared-d1195c27.js";import{a as s,T as r}from"./shared-aa54bc96.js";import{c as i}from"./shared-4e709717.js";import{c as o,h as n}from"./shared-ba5c42c7.js";import{C as a}from"./shared-eeb2bd18.js";import{N as h}from"./shared-33ed0fe7.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-0e1d094b.js";import"./shared-639dbd3f.js";import"./shared-ebd077b5.js";import"./shared-247297ce.js";import"./foxy-spinner.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-53e42a77.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5212ef4f.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./shared-bab2ea2c.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";let l,d,c,p,f,u,m,_,b,y,g,v,x,$=t=>t;const j=Symbol(),w=Symbol();class k extends(s(t)){constructor(){super(...arguments),this.open=!1}static get properties(){return e(e({},super.properties),{},{open:{type:Boolean,reflect:!0}})}static get styles(){return[...super.styles,o(l||(l=$`.resource{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr));grid-gap:1px}.resource>:first-child{grid-column-start:1;grid-column-end:-2}foxy-internal-source-control::part(editor){border-radius:0;max-height:none;box-shadow:none;border:none}foxy-internal-source-control::part(helper-text),foxy-internal-source-control::part(label){position:absolute;width:1px;height:1px;padding-top:0;margin-top:-1px;overflow-x:hidden;overflow-y:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-top-width:0}`))]}static get v8n(){return[...super.v8n,t=>"string"!=typeof t[j]||"invalid_json"]}renderBody(){return n(d||(d=$` <details class="select-none rounded-t-l rounded-b-l overflow-hidden border border-contrast-10" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center space-x-s p-s pr-m transition-colors cursor-pointer bg-contrast-5 hover-bg-contrast-10"> <foxy-copy-to-clipboard infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> <span class="font-medium truncate">${0}</span> <span class="flex-1"></span> ${0} ${0} ${0} </div> </summary> ${0} </details> `),this.open,(t=>{const e=t.currentTarget;this.open=e.open}),i({"ring-inset ring-primary-50 rounded-t-l":!0,"focus-outline-none focus-ring-2":!0,"rounded-b-l":!this.open}),this.href||this.parent,this.__renderTitle(),this.in({idle:{snapshot:"dirty"}})||this.in({idle:"template"})?n(c||(c=$` <foxy-internal-submit-control infer="${0}" theme="tertiary-inline success"> </foxy-internal-submit-control> `),this.href?"submit":"create"):"",this.in({idle:{snapshot:"dirty"}})||this.in({idle:{template:"dirty"}})?n(p||(p=$` <vaadin-button data-testid="undo" theme="tertiary-inline contrast" class="px-xs" @click="${0}"> <foxy-i18n infer="" key="undo"></foxy-i18n> </vaadin-button> `),(()=>this.undo())):"",this.in({idle:"snapshot"})?n(f||(f=$` <foxy-internal-delete-control infer="delete" theme="tertiary-inline error"> </foxy-internal-delete-control> `)):"",this.open?this.__renderForm():"")}async _fetch(...t){var e;try{const s=t[0]instanceof Request?t[0]:new Request(...t);if("POST"!==s.method)return await super._fetch(...t);const r=null!==(e=this.form[w])&&void 0!==e?e:JSON.stringify(this.form);return await super._fetch(s.url,{method:"POST",body:r})}catch(t){throw["invalid_json"]}}__renderTitle(){if(!this.href)return n(u||(u=$` <span class="text-tertiary">POST</span> <span>${0}</span> `),this.parent);let t="",e="",s="";try{const r=new URL(this.href);t=r.pathname,t.startsWith("/")&&(t=t.substring(1));const i=t.split("/");t=i.slice(0,i.length-1).join("/"),i.length>1&&(t=`${t}/`,e=i[i.length-1]),s=r.search}catch(e){t=this.href}return n(m||(m=$` ${0} `),[n(_||(_=$`<span>${0}</span>`),t),n(b||(b=$`<span class="text-primary">${0}</span>`),e),n(y||(y=$`<span class="text-tertiary">${0}</span>`),s)])}__renderForm(){return n(g||(g=$` <div class="bg-base"> <div class="${0} border-t border-contrast-5 bg-contrast-10"> <foxy-internal-source-control infer="editor" class="flex-1 bg-base" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> ${0} </div> </div> `),this.data?"resource":"",(()=>this.__formAsString),(t=>this.__formAsString=t),this.data?n(v||(v=$` <div class="bg-base"> <ul class="bg-contrast-5 p-xs h-full"> ${0} </ul> </div> `),this.__links.map((([t,e])=>this.__renderLink(t,e.href,e.title)))):"")}get __links(){var t,e;const s=Object.entries(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links)&&void 0!==e?e:{}).filter((([t,e])=>"self"!==t&&!Array.isArray(e)&&!e.templated));try{s.sort((([t],[e])=>t.localeCompare(e,this.lang)))}catch(t){s.sort((([t],[e])=>t.localeCompare(e)))}return s}get __formAsString(){const t=this.form,e=t[w],s=t[j];return"string"==typeof s?s:"string"==typeof e?e:JSON.stringify(t,((t,e)=>t.startsWith("_")?void 0:e),2)}set __formAsString(t){this.undo();try{const e=JSON.parse(t);"object"==typeof e&&this.edit(e),this.edit({[w]:t})}catch(e){this.edit({[j]:t})}}__renderLink(t,e,s){return n(x||(x=$` <li data-testclass="link" class="m-xs rounded overflow-hidden transition-colors hover-bg-contrast-5"> <foxy-swipe-actions> <button class="${0}" @click="${0}"> <div class="flex items-center"> <div class="flex-1 space-y-xs px-s min-w-0 text-s"> <div class="truncate font-medium">${0}</div> <div class="opacity-75 truncate">${0}</div> </div> <iron-icon class="icon-inline text-xl text-tertiary mr-s flex-shrink-0" icon="icons:chevron-right"> </iron-icon> </div> </button> <div slot="action" class="h-full flex"> <vaadin-button theme="secondary success" class="h-full rounded-none" @click="${0}"> POST </vaadin-button> </div> </foxy-swipe-actions> </li> `),i({"rounded leading-none space-y-xs block text-left w-full py-s":!0,"ring-inset ring-primary-50":!0,"focus-outline-none focus-ring-2 ":!0}),(()=>{const t=new CustomEvent("navigate:get",{bubbles:!0,detail:e});this.dispatchEvent(t)}),s||e,t,(()=>{const t=new CustomEvent("navigate:post",{bubbles:!0,detail:e});this.dispatchEvent(t)}))}}customElements.define("foxy-internal-api-browser-resource-form",k);let C,S,E,T,U,O,B,P,A,G=t=>t;const H=a(r(s(h,"api-browser")));class R extends H{constructor(){super(...arguments),this.home=null,this.__newCurrentUrl=null,this.__history=[],this.__renderItem=({href:t,html:e})=>t?e(S||(S=G`
|
|
2
2
|
<foxy-internal-api-browser-resource-form infer="" href=${0}>
|
|
3
3
|
</foxy-internal-api-browser-resource-form>
|
|
4
4
|
`),t):e(C||(C=G``)),this.__handleExistingResourceFetch=t=>{"DELETE"===t.request.method&&(t.preventDefault(),t.respondWith(new R.API(this).fetch(t.request).then((t=>(t.ok&&(this.__canGoBack?this.__goBack():this.__canGoHome?this.__goHome():(this.parent="",this.href="")),t)))))}}static get properties(){return e(e({},super.properties),{},{__newCurrentUrl:{attribute:!1},__history:{attribute:!1},home:{type:String}})}render(){var t;return n(E||(E=G` <div class="space-y-m"> <div class="flex items-center gap-s flex-wrap-reverse"> <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:arrow-back"></iron-icon> </vaadin-button> <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:home"></iron-icon> </vaadin-button> <vaadin-text-field placeholder="https://api.foxy.io/stores/0" aria-label="${0}" class="flex-1" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} <div class="grid grid-cols-2"> <vaadin-button title="${0}" theme="${0}" class="rounded-r-none p-0" ?disabled="${0}" @click="${0}"> GET </vaadin-button> <vaadin-button title="${0}" theme="${0}" class="rounded-l-none p-0" ?disabled="${0}" @click="${0}"> POST </vaadin-button> </div> </div> <div @navigate:get="${0}" @navigate:post="${0}"> ${0} </div> </div> `),this.t("go_back"),this.disabled||!this.__canGoBack,(()=>this.__goBack()),this.t("go_home"),this.disabled||!this.__canGoHome,(()=>this.__goHome()),this.t("current_url"),this.disabled,this.readonly,this.__newCurrentUrl||this.href||this.parent,(t=>"Enter"===t.key&&this.__go()),(t=>{const e=t.currentTarget;this.__newCurrentUrl=e.value}),this.__newCurrentUrl?n(T||(T=G` <vaadin-button title="${0}" theme="icon primary" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:arrow-forward"></iron-icon> </vaadin-button> `),this.t("navigate"),this.disabled||this.in("busy"),this.__go):n(U||(U=G` <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:refresh"></iron-icon> </vaadin-button> `),this.t("refresh"),this.disabled||this.in("busy"),(()=>this.refresh())),this.t("get_mode"),this.href?"contrast primary":"contrast",this.disabled||"get"===this.__mode,(()=>this.__mode="get"),this.t("post_mode"),this.href?"contrast":"contrast primary",this.disabled||"post"===this.__mode,(()=>this.__mode="post"),(t=>{t.stopPropagation(),this.__history.push({href:this.href,parent:this.parent}),this.__newCurrentUrl=null,this.parent="",this.href=t.detail}),(t=>{t.stopPropagation(),this.__history.push({href:this.href,parent:this.parent}),this.__newCurrentUrl=null,this.parent=t.detail,this.href=""}),this.href?n(O||(O=G` ${0} `),(null===(t=this.data)||void 0===t?void 0:t._links.first)?n(B||(B=G` <foxy-pagination first="${0}" infer=""> <foxy-collection-page class="block space-y-m mb-m" infer="" .item="${0}"> </foxy-collection-page> </foxy-pagination> `),this.href,this.__renderItem):n(P||(P=G` <foxy-internal-api-browser-resource-form infer="" href="${0}" open @fetch="${0}"> </foxy-internal-api-browser-resource-form> `),this.href,this.__handleExistingResourceFetch)):n(A||(A=G` <foxy-internal-api-browser-resource-form infer="" parent="${0}" open @update="${0}"> </foxy-internal-api-browser-resource-form> `),this.parent,(t=>{const e=t.currentTarget;e.in({idle:"snapshot"})&&(this.href=e.data._links.self.href,this.parent="")})))}get __canGoBack(){return this.__history.length>0}get __canGoHome(){return this.href!==this.home}get __mode(){return this.href?"get":"post"}set __mode(t){"get"===t?(this.href=this.parent,this.parent=""):(this.parent=this.href,this.href="")}__goBack(){var t,e;const s=this.__history.length-1,r=this.__history[s];this.parent=null!==(t=null==r?void 0:r.parent)&&void 0!==t?t:"",this.href=null!==(e=null==r?void 0:r.href)&&void 0!==e?e:"",this.__history=this.__history.slice(0,s)}__goHome(){var t;this.__history=[],this.parent="",this.href=null!==(t=this.home)&&void 0!==t?t:""}__go(){if("string"==typeof this.__newCurrentUrl){this.__history.push({href:this.href,parent:this.parent});this[this.href?"href":"parent"]=this.__newCurrentUrl,this.__newCurrentUrl=null}}}customElements.define("foxy-api-browser",R);export{R as ApiBrowser};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-433b15f9.js";import"./foxy-nucleon-element.js";import{a as r}from"./shared-aa54bc96.js";import{T as e}from"./shared-bf7baab5.js";import{i as o}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-2565fed8.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5741ba29.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-eeb2bd18.js";let d,a,t,i=r=>r;const p=r(e,"applied-coupon-code-card");class n extends p{constructor(){super(...arguments),this.__couponLoaderId="couponLoader"}renderBody(){var r;return s(d||(d=i` <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(null===(r=this.data)||void 0===r?void 0:r._links["fx:coupon"].href),this.__couponLoaderId,(()=>this.requestUpdate()),super.renderBody({title:r=>s(a||(a=i`${0}`),r.code),subtitle:()=>{var r;return s(t||(t=i`${0}`),null===(r=this.__coupon)||void 0===r?void 0:r.name)}}))}get isBodyReady(){return super.isBodyReady&&!!this.__coupon}get __couponLoader(){return this.renderRoot.querySelector(`#${this.__couponLoaderId}`)}get __coupon(){var r;return null===(r=this.__couponLoader)||void 0===r?void 0:r.data}}customElements.define("foxy-applied-coupon-code-card",n);export{n as AppliedCouponCodeCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4bcb2368.js";import"./shared-84ada96e.js";import{I as e}from"./shared-64d48bc6.js";import{a as r}from"./shared-aa54bc96.js";import{B as s}from"./shared-d1195c27.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-6cb26d12.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-6b06d5c1.js";import"./shared-0e1d094b.js";import"./shared-3149ab8d.js";import"./shared-2565fed8.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-f0a38941.js";import"./shared-639dbd3f.js";import"./shared-ebd077b5.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";import"./shared-8d92dd6e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let o,d,i=e=>e;const a=r(e,"applied-coupon-code-form");class p extends a{constructor(){super(...arguments),this.__ignoreUsageLimitsOptions=[{value:"checked",label:"option_checked"}],this.__getIgnoreUsageLimitsValue=()=>this.form.ignore_usage_limits?["checked"]:[],this.__setIgnoreUsageLimitsValue=e=>{this.edit({ignore_usage_limits:e.includes("checked")})}}static get v8n(){return[({code:e})=>!!e||"code:v8n_required"]}get readonlySelector(){return this.data?new s("not=delete"):super.readonlySelector}get hiddenSelector(){return new s(`timestamps ${super.hiddenSelector}`)}renderBody(){return t(o||(o=i` ${0} <foxy-internal-text-control helper-text="${0}" infer="code"> </foxy-internal-text-control> ${0} ${0} `),this.renderHeader(),this.t(this.data?"code.helper_text_existing":"code.helper_text_new"),this.data?"":t(d||(d=i` <foxy-internal-checkbox-group-control infer="ignore-usage-limits" class="-my-xs" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__getIgnoreUsageLimitsValue,this.__setIgnoreUsageLimitsValue,this.__ignoreUsageLimitsOptions),super.renderBody())}}customElements.define("foxy-applied-coupon-code-form",p);export{p as AppliedCouponCodeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-2565fed8.js";import{h as r}from"./shared-ba5c42c7.js";import{a as s}from"./shared-aa54bc96.js";import{T as e}from"./shared-bf7baab5.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-5741ba29.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let t,a,i=r=>r;class o extends(s(e,"applied-tax-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=i`${0}`),s.name),subtitle:s=>r(a||(a=i` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> <span>•</span> <foxy-i18n options="${0}" lang="${0}" key="percent" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:`${s.amount} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),this.lang,this.ns,JSON.stringify({fraction:s.rate/100}),this.lang,this.ns)})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-applied-tax-card",o);export{o as AppliedTaxCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-8d92dd6e.js";import"./shared-3149ab8d.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{h as e}from"./shared-ba5c42c7.js";import{C as t}from"./shared-eeb2bd18.js";import{N as s}from"./shared-33ed0fe7.js";import{R as i,a as r,T as a}from"./shared-aa54bc96.js";import{c as d}from"./shared-4e709717.js";import"./shared-120413cd.js";import"./shared-2565fed8.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let n,o,l,m,c,h,p=e=>e;const u=i(r(t(a(s)),"attribute-card"));class v extends u{constructor(){super(...arguments),this.__renderName=()=>{var t,s;const{data:i}=this;return e(n||(n=p` <div> ${0} <div class="flex items-center space-x-xs font-medium"> <div class="truncate" title="${0}" data-testid="name"> ${0} </div> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("name:before"),null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.name)&&void 0!==s?s:e(o||(o=p` `)),i&&"public"!==i.visibility?e(l||(l=p` <div class="flex items-center" style="height:1px"> <iron-icon icon="icons:lock" class="icon-inline"></iron-icon> </div> `)):"",this.renderTemplateOrSlot("name:after"))},this.__renderValue=()=>{var t,s;const{data:i}=this;return e(m||(m=p` <div> ${0} <div class="truncate text-secondary text-s sm-text-m" title="${0}" data-testid="value"> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("value:before"),null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.value)&&void 0!==s?s:e(c||(c=p` `)),this.renderTemplateOrSlot("value:after"))}}render(){const t=this.hiddenSelector,s=this.in({idle:"snapshot"}),i=this.in({idle:"template"});return e(h||(h=p` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-xs sm-flex sm-items-center sm-justify-between"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),t.matches("name",!0)?"":this.__renderName(),t.matches("value",!0)?"":this.__renderValue(),d({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":s}),this.in("fail")?"error":i?"empty":"busy",this.lang,this.ns)}}customElements.define("foxy-attribute-card",v);export{v as AttributeCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7f68743e.js";import"./shared-c5972323.js";import{I as e}from"./shared-64d48bc6.js";import{a as r}from"./shared-aa54bc96.js";import{B as t}from"./shared-d1195c27.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-6b06d5c1.js";import"./shared-0e1d094b.js";import"./shared-3149ab8d.js";import"./shared-2565fed8.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";import"./shared-8d92dd6e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,o=e=>e;const a=r(e,"attribute-form");class d extends a{constructor(){super(...arguments),this.__visibilityGetValue=()=>this.form.visibility||"private",this.__visibilityOptions=[{label:"option_public",value:"public"},{label:"option_restricted",value:"restricted"},{label:"option_private",value:"private"}]}static get v8n(){return[({value:e})=>e&&e.length>0||"value:v8n_required",({value:e})=>!e||e.length<=1e3||"value:v8n_too_long",({name:e})=>e&&e.length>0||"name:v8n_required",({name:e})=>!e||e.length<=500||"name:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("visibility"),new t(e.join(" ").trim())}get headerSubtitleKey(){var e;return`subtitle_${null===(e=this.data)||void 0===e?void 0:e.visibility}`}renderBody(){return i(s||(s=o` ${0} <foxy-internal-source-control infer="name"></foxy-internal-source-control> <foxy-internal-source-control infer="value"></foxy-internal-source-control> <foxy-internal-radio-group-control infer="visibility" .options="${0}" .getValue="${0}"> </foxy-internal-radio-group-control> ${0} `),this.renderHeader(),this.__visibilityOptions,this.__visibilityGetValue,super.renderBody())}}customElements.define("foxy-attribute-form",d);export{d as AttributeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-433b15f9.js";import"./shared-2565fed8.js";import{a as s}from"./shared-aa54bc96.js";import{I as e}from"./shared-5741ba29.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let d,a=s=>s;const t=s(e,"billing-address-card");class o extends t{renderBody(){return r(d||(d=a` <section class="leading-none space-y-xs font-lumo"> <p class="text-m text-body font-medium truncate"> <foxy-i18n infer="" key="full_name" .options="${0}"></foxy-i18n> ​ </p> <p class="text-s text-secondary truncate"> <foxy-i18n infer="" key="full_address" .options="${0}"></foxy-i18n> ​ </p> </section> `),this.data,this.data)}}customElements.define("foxy-billing-address-card",o);export{o as BillingAddressCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-6b06d5c1.js";import"./shared-d9f38239.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-2565fed8.js";import"./shared-d1195c27.js";import"./shared-3149ab8d.js";import"./shared-0e59bad9.js";import"./shared-59d9d6ca.js";import{h as e}from"./shared-ba5c42c7.js";import{S as t,T as s,a as r}from"./shared-aa54bc96.js";import{c as a}from"./shared-4e709717.js";import"./shared-2676836d.js";import"./shared-db92bb31.js";import{G as d}from"./shared-acdf3166.js";import"./shared-ebd077b5.js";import"./shared-927f1a51.js";import"./shared-900fd54f.js";import"./shared-0e1d094b.js";import"./shared-751c9f1e.js";import"./shared-639dbd3f.js";import{W as i}from"./shared-2eebd7bc.js";import{C as n}from"./shared-eeb2bd18.js";import{N as o}from"./shared-33ed0fe7.js";import{i as m}from"./shared-53e42a77.js";import{s as h}from"./shared-79d0699c.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-8d92dd6e.js";import"./shared-43e2c3f6.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-37c52c4c.js";import"./shared-f0a38941.js";import"./shared-349a42e1.js";import"./shared-4fdc63d9.js";import"./shared-35a2aabc.js";import"./shared-2256b8b1.js";import"./shared-56271b15.js";import"./shared-9c82e27f.js";import"./shared-651c44fa.js";import"./shared-831f5042.js";import"./shared-61e50856.js";import"./shared-53e476fd.js";import"./shared-fcdb896f.js";import"./shared-cdb5ad48.js";import"./shared-37dc0b85.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";let l,c,p,f,b=e=>e;const u=t(s(n(r(o,"cancellation-form"))));class j extends u{constructor(){super(...arguments),this.__renderWarning=()=>{const{lang:t,ns:s}=this;return e(l||(l=b` <div> ${0} <x-warning> <foxy-i18n data-testid="warning" class="${0}" lang="${0}" key="end_subscription_explainer" ns="${0}"> </foxy-i18n> </x-warning> ${0} </div> `),this.renderTemplateOrSlot("warning:before"),a({"text-disabled":!this.in({idle:"snapshot"})}),t,s,this.renderTemplateOrSlot("warning:after"))},this.__renderEndDate=()=>{var t,s;const{constructor:r,lang:d,ns:i}=this,n=r.__tomorrow.getTime(),o=this.in({idle:"snapshot"});return e(c||(c=b` <div> ${0} <x-group frame> <foxy-i18n data-testid="end-date-label" class="${0}" slot="header" lang="${0}" key="end_date" ns="${0}"> </foxy-i18n> <foxy-internal-calendar data-testid="end-date" .checkAvailability="${0}" ?disabled="${0}" ?readonly="${0}" value="${0}" lang="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),a({"text-disabled":!o}),d,i,(e=>e.getTime()>=n),!o||this.disabledSelector.matches("end-date",!0),!!(null===(t=this.data)||void 0===t?void 0:t.end_date)||this.readonlySelector.matches("end-date",!0),m(null!==(s=this.form.end_date)&&void 0!==s?s:void 0),d,(e=>{this.edit({end_date:e.target.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__renderSubmit=()=>{const t=this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{snapshot:{dirty:"valid"}}});return e(p||(p=b` <div> ${0} <vaadin-button data-testid="submit" ?disabled="${0}" theme="primary error" class="w-full" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="end_subscription"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!t||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get scopedElements(){return{"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-warning":i,"x-group":d}}static get v8n(){return[({end_date:e})=>!!e||"end_date_required"]}render(){var t,s;const r=this.hiddenSelector,d=this.in("busy"),i=this.in("fail");return e(f||(f=b` <div class="space-y-l font-lumo text-m text-body leading-m relative"> ${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> `),r.matches("warning",!0)?"":this.__renderWarning(),r.matches("end-date",!0)?"":this.__renderEndDate(),r.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!d&&!i}),i?"error":d?"busy":"empty",this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"")}submit(){if(!this.form.end_date){const e=this.constructor;this.edit({end_date:h(e.__tomorrow)})}super.submit()}static get __tomorrow(){const e=new Date;return e.setDate(e.getDate()+1),e.setHours(0,0,0,0),e}}customElements.define("foxy-cancellation-form",j);export{j as CancellationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-433b15f9.js";import"./foxy-nucleon-element.js";import"./shared-2565fed8.js";import{_ as e}from"./shared-d1195c27.js";import{g as t}from"./shared-bab2ea2c.js";import{a as r}from"./shared-aa54bc96.js";import{C as s}from"./shared-eeb2bd18.js";import{I as i}from"./shared-5741ba29.js";import{i as o}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let a,n,l,_,c,u,h,f,p,m,v=e=>e;const y=s(r(i,"cart-card"));class x extends y{constructor(){super(...arguments),this.localeCodes=null,this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){const e=this.__statusOptions,t=this.__line1Options,r=this.__line2Options,s=this.__line2Key,i=this.data;return d(a||(a=v` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s"> <div class="flex items-center space-x-s"> <span class="flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s text-tertiary"> ${0} </span> </div> <div class="truncate text-s text-secondary"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} </div> </div> `),o(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),t?d(n||(n=v`<foxy-i18n infer="" key="line_1" .options="${0}"></foxy-i18n>`),t):d(l||(l=v`​`)),i?d(_||(_=v`<foxy-i18n infer="" key="status" .options="${0}"></foxy-i18n>`),e):d(c||(c=v`​`)),s?d(u||(u=v`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,r):d(h||(h=v`​`)),i?i.customer_email?d(f||(f=v`${0}`),i.customer_email):d(p||(p=v`<foxy-i18n infer="" key="no_customer"></foxy-i18n>`)):d(m||(m=v`​`)))}get isBodyReady(){const e=!!this.__line1Options&&!!this.__statusOptions&&!!this.__line2Key;return super.isBodyReady&&e}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.data)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){var e,t;if(!(null===(e=this.data)||void 0===e?void 0:e.currency_code))return(null===(t=this.data)||void 0===t?void 0:t.template_set_uri)||void 0}get __itemsHref(){const e=this.data;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("order","price desc"),t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __items(){const e=this.data;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);if(null==t?void 0:t.data)return{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __currencyCode(){var e,t,r;const s=this.data;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,i=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,o=i?null==s?void 0:s.values[i]:void 0;if(o)return null===(r=/Currency: ([A-Z]{3})/g.exec(o))||void 0===r?void 0:r[1]}}get __line1Options(){var e,r,s;const i=null===(e=this.data)||void 0===e?void 0:e.total_order;if(void 0===i)return;const o=this.__currencyDisplay;if(void 0===o)return;const d=this.__currencyCode;if(void 0===d)return;const a=null===(r=this.__items)||void 0===r?void 0:r.count;if(void 0===a)return;const n=null===(s=this.data)||void 0===s?void 0:s._links.self.href;return void 0!==n?{currencyDisplay:o,amount:`${i} ${d}`,count:a,id:t(n)}:void 0}get __line2Options(){var e;return null===(e=this.__items)||void 0===e?void 0:e.array[0]}get __line2Key(){const e=this.__items;if(void 0!==e)return 0===e.count?"line_2_empty":1===e.count?"line_2_one":e.count>1?"line_2_many":void 0}get __statusOptions(){const e=this.data;if(e)return{dateCreated:e.date_created}}}customElements.define("foxy-cart-card",x);export{x as CartCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-2b25aedd.js";import"./shared-544b7d4b.js";import"./shared-303cf36c.js";import"./shared-2ca4d459.js";import"./shared-a5bd0da6.js";import"./shared-84ada96e.js";import{b as e,a as t,I as r}from"./shared-64d48bc6.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-2565fed8.js";import{_ as i,B as o}from"./shared-d1195c27.js";import{c as s}from"./shared-4e709717.js";import{h as n,c as a}from"./shared-ba5c42c7.js";import"./shared-6b06d5c1.js";import{R as l,a as d}from"./shared-aa54bc96.js";import{i as c}from"./shared-53e42a77.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-53e476fd.js";import"./shared-433b15f9.js";import{g as p}from"./shared-bab2ea2c.js";import{T as _}from"./shared-bf7baab5.js";import{T as h}from"./shared-8874ec69.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-0e59bad9.js";import"./shared-3149ab8d.js";import"./shared-59d9d6ca.js";import"./shared-8d92dd6e.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./foxy-form-dialog.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./shared-67898669.js";import"./shared-33ed0fe7.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-6cb26d12.js";import"./shared-56271b15.js";import"./shared-900fd54f.js";import"./shared-9c82e27f.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-2256b8b1.js";import"./shared-927f1a51.js";import"./shared-639dbd3f.js";import"./shared-651c44fa.js";import"./shared-ebd077b5.js";import"./shared-f0a38941.js";import"./shared-0e1d094b.js";import"./shared-831f5042.js";import"./shared-61e50856.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-5741ba29.js";import"./shared-4bcb2368.js";import"./shared-c5972323.js";import"./shared-7f68743e.js";import"./shared-d9393c31.js";import"./shared-641786b2.js";import"./shared-a81a1cc3.js";import"./shared-37c52c4c.js";import"./shared-349a42e1.js";import"./shared-35a2aabc.js";import"./shared-afa402dc.js";import"./shared-602ed877.js";import"./shared-6fa216e7.js";import"./shared-37dc0b85.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-751c9f1e.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";let f,y,v=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends e{constructor(){super(...arguments),this.__loader=null}static get properties(){return i(i({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,i=null===(t=this.__loader)||void 0===t?void 0:t.result;return i?n(f||(f=v` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),i):n(y||(y=v` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),s({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,i=null==r?void 0:r.data,o=null!==(t=null==i?void 0:i._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(o)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},i=new r.constructor.API(this);this.__loader=t;try{const r=await i.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let g;const x=a(g||(g=(e=>e)`
|
|
2
2
|
#dialog{
|
|
3
3
|
width:100dvw;
|
|
4
4
|
max-height:calc(100dvh - var(--lumo-space-m));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-433b15f9.js";import{a as e}from"./shared-aa54bc96.js";import{I as t}from"./shared-5741ba29.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-2565fed8.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let i,s,a,d,o=e=>e;const C=e(t,"client-card");class l extends C{static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2168_15479)'%3E%3Crect width='40' height='40' fill='%23E8E8E8'/%3E%3Cpath d='M6.93609 0H0V6.93609L6.93609 0Z' fill='white'/%3E%3Cpath d='M0 8.35031V16.2326L16.2326 0H8.35031L0 8.35031Z' fill='white'/%3E%3Cpath d='M23.4667 20C23.4667 21.9146 21.9146 23.4667 20 23.4667C18.0854 23.4667 16.5333 21.9146 16.5333 20C16.5333 18.0854 18.0854 16.5333 20 16.5333C21.9146 16.5333 23.4667 18.0854 23.4667 20Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.6468 0L0 17.6468V25.529L5.75703 19.772C5.9523 19.5767 6.26888 19.5767 6.46414 19.772C6.6594 19.9673 6.6594 20.2839 6.46414 20.4791L0 26.9433V34.8255L7.67907 27.1464C7.87433 26.9512 8.19091 26.9512 8.38617 27.1464C8.58144 27.3417 8.58144 27.6583 8.38617 27.8536L0 36.2397V40H4.12198L12.4755 31.6464C12.6708 31.4512 12.9874 31.4512 13.1826 31.6464C13.3779 31.8417 13.3779 32.1583 13.1826 32.3536L5.5362 40H13.4185L19.8826 33.5359C20.0779 33.3406 20.3944 33.3406 20.5897 33.5359C20.785 33.7311 20.785 34.0477 20.5897 34.243L14.8327 40H22.7149L40 22.7149V14.8327L34.3536 20.4791C34.1583 20.6744 33.8417 20.6744 33.6464 20.4791C33.4512 20.2839 33.4512 19.9673 33.6464 19.772L40 13.4185V5.5362L32.3536 13.1826C32.1583 13.3779 31.8417 13.3779 31.6464 13.1826C31.4512 12.9874 31.4512 12.6708 31.6464 12.4755L40 4.12198V0H36.2397L27.8536 8.38617C27.6583 8.58144 27.3417 8.58144 27.1464 8.38617C26.9512 8.19091 26.9512 7.87433 27.1464 7.67907L34.8255 0H26.9433L20.5897 6.35355C20.3944 6.54882 20.0779 6.54882 19.8826 6.35355C19.6873 6.15829 19.6873 5.84171 19.8826 5.64645L25.529 0H17.6468ZM12.6461 28.5796L11.4204 27.3539C10.7435 26.677 10.7435 25.5795 11.4204 24.9026L11.7742 24.5489C12.0955 24.2275 12.1662 23.7396 11.992 23.3199C11.8178 22.9003 11.421 22.6 10.9668 22.6H10.4667C9.50938 22.6 8.73334 21.824 8.73334 20.8667V19.1333C8.73334 18.176 9.50938 17.4 10.4667 17.4H10.9668C11.421 17.4 11.8178 17.0997 11.992 16.6801C12.1662 16.2604 12.0955 15.7725 11.7742 15.4511L11.4204 15.0974C10.7435 14.4205 10.7435 13.323 11.4204 12.6461L12.6461 11.4204C13.323 10.7435 14.4205 10.7435 15.0974 11.4204L15.4511 11.7742C15.7725 12.0955 16.2604 12.1662 16.6801 11.992C17.0997 11.8178 17.4 11.421 17.4 10.9668V10.4667C17.4 9.50938 18.176 8.73334 19.1333 8.73334H20.8667C21.824 8.73334 22.6 9.50938 22.6 10.4667V10.9668C22.6 11.421 22.9003 11.8178 23.3199 11.992C23.7396 12.1662 24.2275 12.0955 24.5489 11.7742L24.9026 11.4204C25.5795 10.7435 26.677 10.7435 27.3539 11.4204L28.5796 12.6461C29.2565 13.323 29.2565 14.4205 28.5796 15.0974L28.2259 15.4511C27.9045 15.7725 27.8338 16.2604 28.0081 16.6801C28.1822 17.0997 28.579 17.4 29.0333 17.4H29.5333C30.4906 17.4 31.2667 18.176 31.2667 19.1333V20.8667C31.2667 21.824 30.4906 22.6 29.5333 22.6H29.0332C28.579 22.6 28.1822 22.9003 28.0081 23.3199C27.8338 23.7396 27.9045 24.2275 28.2259 24.5489L28.5796 24.9026C29.2565 25.5795 29.2565 26.677 28.5796 27.3539L27.3539 28.5796C26.677 29.2565 25.5795 29.2565 24.9026 28.5796L24.5489 28.2259C24.2275 27.9045 23.7396 27.8338 23.3199 28.0081C22.9003 28.1822 22.6 28.579 22.6 29.0333V29.5333C22.6 30.4906 21.824 31.2667 20.8667 31.2667H19.1333C18.176 31.2667 17.4 30.4906 17.4 29.5333V29.0333C17.4 28.579 17.0997 28.1822 16.6801 28.0081C16.2604 27.8338 15.7725 27.9045 15.4511 28.2259L15.0974 28.5796C14.4205 29.2565 13.323 29.2565 12.6461 28.5796Z' fill='white'/%3E%3Cpath d='M40 24.1291L24.1291 40H32.0114L40 32.0114V24.1291Z' fill='white'/%3E%3Cpath d='M40 33.4256L33.4256 40H40V33.4256Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2168_15479'%3E%3Crect width='40' height='40' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"}renderBody(){const e=l.defaultImageSrc,t=this.data;return r(i||(i=o` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium"> ${0} </p> <p class="text-s truncate text-secondary"> ${0} </p> <p class="text-s truncate text-tertiary"> ${0} • ${0} </p> </figcaption> </figure> `),(null==t?void 0:t.company_logo)||e,this.t("image_alt"),(t=>t.currentTarget.src=e),(null==t?void 0:t.project_name.trim())||r(s||(s=o`<foxy-i18n infer="" key="no_project_name"></foxy-i18n>`)),(null==t?void 0:t.project_description.trim())||r(a||(a=o`<foxy-i18n infer="" key="no_project_description"></foxy-i18n>`)),t?new URL(t.redirect_uri).host:"",(null==t?void 0:t.company_name)||r(d||(d=o`<foxy-i18n infer="" key="no_company_name"></foxy-i18n>`)))}}customElements.define("foxy-client-card",l);export{l as ClientCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-481eb635.js";import"./shared-84ada96e.js";import{I as t}from"./shared-64d48bc6.js";import{R as e,a as r}from"./shared-aa54bc96.js";import{B as o}from"./shared-d1195c27.js";import{h as n}from"./shared-ba5c42c7.js";import"./shared-4fdc63d9.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-f0a38941.js";import"./shared-0e1d094b.js";import"./shared-639dbd3f.js";import"./shared-ebd077b5.js";import"./shared-6b06d5c1.js";import"./shared-247297ce.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-2565fed8.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-33ed0fe7.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./foxy-copy-to-clipboard.js";import"./shared-7439665e.js";import"./shared-3149ab8d.js";import"./shared-59d9d6ca.js";import"./shared-8d92dd6e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,a=t=>t;const i=e(r(t,"client-form"));class d extends i{get headerSubtitleOptions(){var t,e;try{return{context:"with_domain",domain:new URL(null!==(e=null===(t=this.data)||void 0===t?void 0:t.redirect_uri)&&void 0!==e?e:"").hostname}}catch(t){return super.headerSubtitleOptions}}get readonlySelector(){const t=["client-secret"];return(this.data||this.in({busy:"fetching"}))&&t.push("client-id"),new o(`${t.join(" ")} ${super.readonlySelector.toString()}`)}get hiddenSelector(){const t=[];return this.data||this.in({busy:"fetching"})||t.push("client-secret"),new o(`${t.join(" ")} ${super.hiddenSelector.toString()}`)}renderBody(){return n(s||(s=a` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="client-id"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="client-secret"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="redirect-uri"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="project-name"> </foxy-internal-text-control> <foxy-internal-text-area-control class="col-span-2" infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-text-control infer="company-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company-url"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="company-logo"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="contact-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="contact-email"></foxy-internal-text-control> <foxy-internal-text-control infer="contact-phone"></foxy-internal-text-control> </div> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-client-form",d);export{d as ClientForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{_ as e}from"./shared-d1195c27.js";import{h as t}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import{_ as e}from"./shared-d1195c27.js";import{h as t}from"./shared-ba5c42c7.js";import{a as s}from"./shared-aa54bc96.js";import{C as r}from"./shared-eeb2bd18.js";import{F as i}from"./shared-343d1fd7.js";import{N as n}from"./shared-33ed0fe7.js";import{r as a}from"./shared-5fd5805c.js";import{s as o}from"./shared-53e476fd.js";import"./shared-3149ab8d.js";import"./shared-120413cd.js";import"./shared-8d92dd6e.js";import"./shared-2565fed8.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-67898669.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,l=e=>e;const h=r(s(n));class p extends h{constructor(){super(),this.props={},this.__pageFetchEventHandler=e=>this.__handlePageFetchEvent(e),this.item="foxy-null"}static get properties(){return e(e({},super.properties),{},{props:{type:Object},item:{type:String}})}get item(){return this.__item}set item(e){const t=null!=e?e:"foxy-null";this.__renderItem="string"==typeof t?new Function("ctx",`return ctx.html\`\n <${t}\n disabledcontrols=\${ctx.disabledControls.toString()}\n readonlycontrols=\${ctx.readonlyControls.toString()}\n hiddencontrols=\${ctx.hiddenControls.toString()}\n data-testclass="items"\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n group=\${ctx.group}\n href=\${ctx.href}\n lang=\${ctx.lang}\n ns="\${ctx.ns} \${customElements.get('${t}')?.defaultNS ?? ''}"\n ?disabled=\${ctx.disabled}\n ?readonly=\${ctx.readonly}\n ?hidden=\${ctx.hidden}\n .simplifyNsLoading=\${ctx.simplifyNsLoading}\n .templates=\${ctx.templates}\n ...=\${ctx.spread(ctx.props)}\n >\n </${t}>\``):t,this.__item=e,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__pageFetchEventHandler)}render(){let e=[];return e=this.in("busy")?[{key:"stalled",href:"foxy://collection-page/stall",data:null}]:this.in("fail")?[{key:"failed",href:"foxy://collection-page/fail",data:null}]:this.in({idle:"template"})||0===this.__items.length?[{key:"empty",href:"",data:null}]:this.__items.map((e=>({key:e._links.self.href,href:e._links.self.href,data:e}))),t(d||(d=l`${0}`),a(e,(e=>e.key),((s,r)=>{var i,n,a,d,l;return null===(i=this.__renderItem)||void 0===i?void 0:i.call(this,{simplifyNsLoading:this.simplifyNsLoading,disabledControls:this.disabledControls,readonlyControls:this.readonlyControls,hiddenControls:this.hiddenControls,templates:this.templates,disabled:this.disabled,readonly:this.readonly,previous:null!==(a=null===(n=e[r-1])||void 0===n?void 0:n.data)&&void 0!==a?a:null,related:this.related,hidden:this.hidden,parent:this.href,spread:o,props:this.props,group:this.group,lang:this.lang,data:s.data,href:s.href,next:null!==(l=null===(d=e[r+1])||void 0===d?void 0:d.data)&&void 0!==l?l:null,ns:this.ns,html:t})})))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__pageFetchEventHandler)}get __items(){var e,t;return Array.from(Object.values(null!==(t=null===(e=this.form)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})).reduce(((e,t)=>[...e,...t]),[])}__handlePageFetchEvent(e){if(!(e instanceof i)||e.target===this)return;const{method:t,url:s}=e.request;return"GET"===t?"foxy://collection-page/stall"===s?this.__stallRequest(e):"foxy://collection-page/fail"===s?this.__failRequest(e):void 0:void 0}__stallRequest(e){e.stopImmediatePropagation(),e.respondWith(new Promise((()=>{})))}__failRequest(e){e.stopImmediatePropagation(),e.respondWith(Promise.resolve(new Response(null,{status:500})))}}customElements.define("foxy-collection-page",p);export{p as CollectionPage};
|