@foxy.io/elements 1.35.0 → 1.36.0-beta.2
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-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 +1 -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 +15 -15
- 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-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 +1 -1
- 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-4bcb2368.js → shared-0053cf93.js} +1 -1
- package/dist/cdn/{shared-3149ab8d.js → shared-01bb183b.js} +1 -1
- package/dist/cdn/{shared-a4d773a3.js → shared-03355bd1.js} +1 -1
- package/dist/cdn/{shared-6cb26d12.js → shared-0b00883f.js} +1 -1
- package/dist/cdn/{shared-6b06d5c1.js → shared-0b1b1c14.js} +1 -1
- package/dist/cdn/{shared-d9f38239.js → shared-0d8e7067.js} +1 -1
- package/dist/cdn/{shared-2256b8b1.js → shared-10b54c49.js} +1 -1
- package/dist/cdn/{shared-84ada96e.js → shared-133fc37b.js} +1 -1
- package/dist/cdn/{shared-0e59bad9.js → shared-1482d5dd.js} +1 -1
- package/dist/cdn/{shared-db92bb31.js → shared-1a49f70b.js} +1 -1
- package/dist/cdn/shared-1c07cd7f.js +1 -0
- package/dist/cdn/{shared-602ed877.js → shared-22dd6cbe.js} +1 -1
- package/dist/cdn/{shared-7439665e.js → shared-2503aefc.js} +1 -1
- package/dist/cdn/{shared-bf7baab5.js → shared-25893d83.js} +1 -1
- package/dist/cdn/{shared-56271b15.js → shared-2879b67f.js} +1 -1
- package/dist/cdn/{shared-2b25aedd.js → shared-2d11750b.js} +1 -1
- package/dist/cdn/{shared-f0a38941.js → shared-2e8361e1.js} +1 -1
- package/dist/cdn/{shared-831f5042.js → shared-3aaf64e6.js} +1 -1
- package/dist/cdn/{shared-059d1e79.js → shared-40e4854e.js} +1 -1
- package/dist/cdn/{shared-303cf36c.js → shared-42bb9e8e.js} +1 -1
- package/dist/cdn/{shared-a81a1cc3.js → shared-43e551f2.js} +1 -1
- package/dist/cdn/{shared-19ebb715.js → shared-4666b6aa.js} +5 -5
- package/dist/cdn/{shared-2868b35f.js → shared-48970bb4.js} +1 -1
- package/dist/cdn/{shared-e14930ce.js → shared-4c90701b.js} +1 -1
- package/dist/cdn/{shared-35a2aabc.js → shared-4cf87721.js} +1 -1
- package/dist/cdn/{shared-2565fed8.js → shared-4e8a5b95.js} +1 -1
- package/dist/cdn/{shared-afa402dc.js → shared-528b3bdb.js} +1 -1
- package/dist/cdn/{shared-481eb635.js → shared-5f1a4329.js} +1 -1
- package/dist/cdn/{shared-8d92dd6e.js → shared-5f43aa36.js} +1 -1
- package/dist/cdn/{shared-37dc0b85.js → shared-60150977.js} +1 -1
- package/dist/cdn/{shared-acdf3166.js → shared-61ef8001.js} +1 -1
- package/dist/cdn/{shared-9c82e27f.js → shared-6a45a781.js} +2 -2
- package/dist/cdn/{shared-0e1d094b.js → shared-6b76afc2.js} +1 -1
- package/dist/cdn/{shared-927f1a51.js → shared-6d11190a.js} +1 -1
- package/dist/cdn/{shared-61e50856.js → shared-76dcc864.js} +1 -1
- package/dist/cdn/{shared-40bed8c1.js → shared-7cb8722a.js} +1 -1
- package/dist/cdn/{shared-544b7d4b.js → shared-7ce74b42.js} +1 -1
- package/dist/cdn/shared-7e9fdf64.js +1 -0
- package/dist/cdn/{shared-2ca4d459.js → shared-8521017c.js} +1 -1
- package/dist/cdn/{shared-2eebd7bc.js → shared-85475a4e.js} +1 -1
- package/dist/cdn/{shared-c5972323.js → shared-8676e5c0.js} +1 -1
- package/dist/cdn/{shared-4fdc63d9.js → shared-86aa139c.js} +1 -1
- package/dist/cdn/{shared-59d9d6ca.js → shared-89d09114.js} +1 -1
- package/dist/cdn/{shared-21254863.js → shared-901b41cf.js} +1 -1
- package/dist/cdn/{shared-50f2497c.js → shared-9092b247.js} +1 -1
- package/dist/cdn/{shared-5741ba29.js → shared-93774efe.js} +1 -1
- package/dist/cdn/shared-9d7ae4aa.js +1 -0
- package/dist/cdn/{shared-3023dfb2.js → shared-b927be75.js} +3 -3
- package/dist/cdn/{shared-247297ce.js → shared-c1ade7a9.js} +1 -1
- package/dist/cdn/{shared-120413cd.js → shared-c52295d5.js} +1 -1
- package/dist/cdn/{shared-7f68743e.js → shared-c5cf889e.js} +1 -1
- package/dist/cdn/{shared-2676836d.js → shared-cbd1fab7.js} +1 -1
- package/dist/cdn/{shared-751c9f1e.js → shared-cc76a917.js} +1 -1
- package/dist/cdn/{shared-ebd077b5.js → shared-cd652fd0.js} +1 -1
- package/dist/cdn/{shared-a5bd0da6.js → shared-cf28d2c8.js} +1 -1
- package/dist/cdn/{shared-33ed0fe7.js → shared-d1dfac4d.js} +1 -1
- package/dist/cdn/{shared-900fd54f.js → shared-d2340faa.js} +1 -1
- package/dist/cdn/{shared-37c52c4c.js → shared-d279baa5.js} +1 -1
- package/dist/cdn/{shared-64d48bc6.js → shared-d784b79a.js} +1 -1
- package/dist/cdn/{shared-349a42e1.js → shared-e0d1856d.js} +1 -1
- package/dist/cdn/{shared-6fa216e7.js → shared-e622d8cf.js} +1 -1
- package/dist/cdn/{shared-939f50c2.js → shared-f20eefdd.js} +1 -1
- package/dist/cdn/{shared-d4e7383e.js → shared-f316780a.js} +1 -1
- package/dist/cdn/{shared-aa54bc96.js → shared-f72d82a9.js} +1 -1
- package/dist/cdn/{shared-cdb5ad48.js → shared-f92b9842.js} +1 -1
- package/dist/cdn/{shared-639dbd3f.js → shared-fea2714e.js} +1 -1
- package/dist/cdn/translations/native-integration-form/en.json +344 -214
- package/dist/cdn/translations/payments-api-payment-method-form/en.json +6 -0
- package/dist/cdn/translations/payments-api-payment-preset-form/en.json +6 -0
- package/dist/cdn/translations/tax-card/en.json +6 -4
- package/dist/cdn/translations/tax-form/en.json +161 -32
- package/dist/elements/internal/InternalForm/InternalForm.js +2 -2
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +4 -5
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +415 -292
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/defaults.d.ts +9 -68
- package/dist/elements/public/NativeIntegrationForm/defaults.js +18 -18
- package/dist/elements/public/NativeIntegrationForm/defaults.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/index.d.ts +4 -3
- package/dist/elements/public/NativeIntegrationForm/index.js +4 -3
- package/dist/elements/public/NativeIntegrationForm/index.js.map +1 -1
- package/dist/elements/public/NucleonElement/API.js +8 -2
- package/dist/elements/public/NucleonElement/API.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +11 -6
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -1
- package/dist/elements/public/TaxCard/TaxCard.js +4 -0
- package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.d.ts +31 -51
- package/dist/elements/public/TaxForm/TaxForm.js +260 -634
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TaxForm/index.d.ts +9 -9
- package/dist/elements/public/TaxForm/index.js +9 -9
- package/dist/elements/public/TaxForm/index.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-139024d1.js +0 -1
- package/dist/cdn/shared-3b1fc10b.js +0 -1
- package/dist/cdn/shared-433b15f9.js +0 -1
- package/dist/cdn/shared-67898669.js +0 -1
- package/dist/cdn/shared-d9393c31.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./shared-1c07cd7f.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{a as e}from"./shared-f72d82a9.js";import{T as s}from"./shared-25893d83.js";import{h as t,s as r}from"./shared-ba5c42c7.js";import"./shared-93774efe.js";import"./shared-d1dfac4d.js";import"./shared-d1195c27.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";let a,i,o,n,d,l,c=e=>e;const m=e(s,"downloadable-card");class h extends m{renderBody(){const e=this.__extension;return t(a||(a=c` <div class="flex gap-s"> <div class="w-s h-s flex-shrink-0 rounded-s bg-contrast-5 flex" aria-hidden="true"> ${0} </div> <div class="flex-1 min-w-0"> ${0} </div> </div> `),e.length<5?this.__renderExtension(e):r(i||(i=c`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="m-auto" style="width: 64%; height: 64%"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`)),super.renderBody({title:e=>t(o||(o=c` <span class="inline-flex w-full items-center"> <span class="mr-auto truncate min-w-0">${0} • ${0}</span> <span class="text-s text-tertiary font-normal flex-shrink-0"> ${0} ${0} </span> </span> `),e.name,e.code,r(n||(n=c`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="inline" style="width: 1.15em; height: 1.15em"><path d="M10.75 10.818v2.614A3.13 3.13 0 0011.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 00-1.138-.432zM8.33 8.62c.053.055.115.11.184.164.208.16.46.284.736.363V6.603a2.45 2.45 0 00-.35.13c-.14.065-.27.143-.386.233-.377.292-.514.627-.514.909 0 .184.058.39.202.592.037.051.08.102.128.152z" /><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-6a.75.75 0 01.75.75v.316a3.78 3.78 0 011.653.713c.426.33.744.74.925 1.2a.75.75 0 01-1.395.55 1.35 1.35 0 00-.447-.563 2.187 2.187 0 00-.736-.363V9.3c.698.093 1.383.32 1.959.696.787.514 1.29 1.27 1.29 2.13 0 .86-.504 1.616-1.29 2.13-.576.377-1.261.603-1.96.696v.299a.75.75 0 11-1.5 0v-.3c-.697-.092-1.382-.318-1.958-.695-.482-.315-.857-.717-1.078-1.188a.75.75 0 111.359-.636c.08.173.245.376.54.569.313.205.706.353 1.138.432v-2.748a3.782 3.782 0 01-1.653-.713C6.9 9.433 6.5 8.681 6.5 7.875c0-.805.4-1.558 1.097-2.096a3.78 3.78 0 011.653-.713V4.75A.75.75 0 0110 4z" clip-rule="evenodd" /></svg>`)),this.__formattedPrice),subtitle:e=>t(d||(d=c`${0} (${0})`),e.file_name,this.__formattedFileSize)}))}get __formattedFileSize(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_size)&&void 0!==s?s:0,r=1024,a=1048576,i=1024*a,o={maximumFractionDigits:2},n=this.lang||"en";try{return t/i>1?`${(t/i).toLocaleString(n,o)} GB`:t/a>1?`${(t/a).toLocaleString(n,o)} MB`:t/r>1?`${(t/r).toLocaleString(n,o)} KB`:`${t.toLocaleString(n,o)} B`}catch(e){return`${t} B`}}get __formattedPrice(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.price)&&void 0!==s?s:0;try{return t.toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2})}catch(e){return String(t)}}get __extension(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_name.split(".").filter((e=>!!e)))&&void 0!==s?s:[];return t.length<2?"?????":t.pop()}__renderExtension(e){const s=`font: 700 calc(var(--lumo-size-s) / ${Math.max(2,e.length)}) sans-serif`;return t(l||(l=c`<span style="${0}" class="m-auto font-medium uppercase">${0}</span>`),s,e)}}customElements.define("foxy-downloadable-card",h);export{h as DownloadableCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as e,a as t,I as r}from"./shared-
|
|
1
|
+
import{b as e,a as t,I as r}from"./shared-d784b79a.js";import"./shared-fea2714e.js";import"./shared-1482d5dd.js";import"./shared-cd652fd0.js";import"./shared-0b1b1c14.js";import{h as a,P as o,B as i}from"./shared-c52295d5.js";import{E as s,T as l}from"./shared-c1ade7a9.js";import"./shared-01bb183b.js";import"./shared-4e8a5b95.js";import{x as n,a as d}from"./shared-f72d82a9.js";import{c as A,h as u}from"./shared-ba5c42c7.js";import{i as p}from"./shared-53e42a77.js";import{c}from"./shared-4e709717.js";import"./shared-10b54c49.js";import{_ as m,B as h}from"./shared-d1195c27.js";import{A as g}from"./shared-7e9fdf64.js";import"./shared-528b3bdb.js";import"./shared-133fc37b.js";import"./foxy-nucleon-element.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./shared-6d11190a.js";import"./shared-651c44fa.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-d279baa5.js";import"./shared-d0aed1c1.js";const f=a`<dom-module id="lumo-progress-bar" theme-for="vaadin-progress-bar">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{a as e}from"./shared-f72d82a9.js";import{T as t}from"./shared-25893d83.js";import{h as r}from"./shared-ba5c42c7.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-93774efe.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.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 s,d,o=e=>e;const a=e(t,"email-template-card");class m extends a{renderBody(){return super.renderBody({title:e=>r(s||(s=o`${0}`),e.description),subtitle:e=>r(d||(d=o`<foxy-i18n infer="" key="${0}"></foxy-i18n>`),this.__getType(e))})}__getType(e){const{content_html_url:t,content_text_url:r}=e,{content_html:s,content_text:d}=e;return!d||r||s||t?!s||t||d||r?!t||r||s||d?!r||t||d||s?s||t||d||r?"type_mixed":"type_default":"type_custom_text_url":"type_custom_html_url":"type_custom_html":"type_custom_text"}}customElements.define("foxy-email-template-card",m);export{m as EmailTemplateCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-42bb9e8e.js";import"./shared-8676e5c0.js";import"./shared-cf28d2c8.js";import"./shared-8521017c.js";import"./shared-133fc37b.js";import{b as t,I as e}from"./shared-d784b79a.js";import"./shared-0b1b1c14.js";import"./shared-4e8a5b95.js";import{_ as r,B as a}from"./shared-d1195c27.js";import{N as s}from"./shared-d1dfac4d.js";import{h as o}from"./shared-ba5c42c7.js";import{a as n}from"./shared-f72d82a9.js";import{i}from"./shared-53e42a77.js";import"./shared-5fd5805c.js";import"./shared-10b54c49.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-01bb183b.js";import"./shared-6a45a781.js";import"./shared-c1ade7a9.js";import"./shared-6d11190a.js";import"./shared-fea2714e.js";import"./shared-651c44fa.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-4e709717.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./foxy-copy-to-clipboard.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";let l,c=t=>t;customElements.define("foxy-internal-email-template-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"";return o(l||(l=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=e?e:""}`.trim(),"busy"===t||this.disabled,this.__submit,t)}async __submit(){var t,e;if("busy"!==this.__state)try{this.__state="busy";const r=new s.API(this),a=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=a.ok?"idle":"fail",a.ok&&(null===(e=this.nucleon)||void 0===e||e.refresh())}catch(t){this.__state="fail"}}});let h,m=t=>t;const d=n(e,"email-template-form");class f extends d{constructor(){super(...arguments),this.__templateLanguageOptions=[{rawLabel:"Nunjucks",value:"nunjucks"},{rawLabel:"Handlebars",value:"handlebars"},{rawLabel:"Pug",value:"pug"},{rawLabel:"Twig",value:"twig"},{rawLabel:"EJS",value:"ejs"}],this.__toggleGetValue=()=>!!this.form.subject,this.__toggleSetValue=t=>{this.edit({subject:t?this.t("general.subject.default_value"):""})}}get readonlySelector(){const t=[super.readonlySelector.toString()],e=this.form.subject;return this.form.content_html_url&&e&&t.unshift("content-html"),this.form.content_text_url&&e&&t.unshift("content-text"),new a(t.join(" ").trim())}get disabledSelector(){const t=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_html_url&&this.data.content_text_url||t.unshift("html-source:cache","text-source:cache"),this.form.subject||t.unshift("general:template-language","html-source","text-source","content-html","content-text"),new a(t.join(" ").trim())}get hiddenSelector(){var t,e,r;const s=[super.hiddenSelector.toString()];return(null===(t=this.data)||void 0===t?void 0:t.content_html_url)||s.unshift("html-source:cache"),(null===(e=this.data)||void 0===e?void 0:e.content_text_url)||s.unshift("text-source:cache"),(null===(r=this.data)||void 0===r?void 0:r.subject)||this.form.subject||s.unshift("general:template-language","general:subject","html-source","text-source","content-html","content-text"),new a(s.join(" ").trim())}renderBody(){var t,e;return o(h||(h=m` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="subject"> </foxy-internal-text-control> <foxy-internal-select-control layout="summary-item" infer="template-language" .options="${0}"> </foxy-internal-select-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content-html"></foxy-internal-source-control> <foxy-internal-summary-control infer="html-source"> <foxy-internal-text-control layout="summary-item" infer="content-html-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> <foxy-internal-source-control infer="content-text"></foxy-internal-source-control> <foxy-internal-summary-control infer="text-source"> <foxy-internal-text-control layout="summary-item" infer="content-text-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.__toggleGetValue,this.__toggleSetValue,this.__templateLanguageOptions,this.renderTemplateOrSlot(),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:cache"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(t){const e=await super._sendPost(t);if(t.content_html_url&&t.content_text_url){const t=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(t,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(e._links.self.href)}async _sendPatch(t){const e=await super._sendPatch(t);if(!t.content_html_url&&!t.content_text_url)return e;const r=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(e._links.self.href)}}customElements.define("foxy-email-template-form",f);export{f as EmailTemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,c as t,h as a}from"./shared-ba5c42c7.js";import{T as i,a as n,S as o}from"./shared-
|
|
1
|
+
import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,c as t,h as a}from"./shared-ba5c42c7.js";import{T as i,a as n,S as o}from"./shared-f72d82a9.js";import{c as d}from"./shared-4e709717.js";import{G as l}from"./shared-61ef8001.js";import"./foxy-nucleon-element.js";import{g as c}from"./shared-bab2ea2c.js";import{N as p}from"./shared-d1dfac4d.js";import{d as u}from"./shared-641786b2.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let f,m,h,y=e=>e;class x extends(i(r)){constructor(){super(...arguments),this.data=[]}static get properties(){return{data:{type:Array}}}static get styles(){return[super.styles,t(f||(f=y`dd,dt{display:inline-block;overflow:hidden;vertical-align:top;overflow-wrap:anywhere}dt{min-width:calc(5 * var(--lumo-size-l));padding-right:.5em}dd{max-width:calc(15 * var(--lumo-size-l));min-width:calc(10 * var(--lumo-size-l))}`))]}render(){return a(m||(m=y` <dl class="space-y-s"> ${0} </dl> `),this.data.map((e=>{const s=String(e[1]).trim();return a(h||(h=y` <div> <dt class="text-secondary truncate">${0}</dt> <dd class="${0}">${0}</dd> </div> `),e[0],d({"text-tertiary":!s}),s||"–")})))}}let g,v,$=e=>e;const _=["_links","_embedded"],b=n(i(o(p)));class j extends b{static get scopedElements(){return{"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x}}render(){if(this.in({idle:"snapshot"})){const s=this.data,{_links:r,_embedded:t}=s,i=e(s,_);try{const e=c(r.self.href);null!==e&&(i.id=e)}catch(e){}return a(g||(g=$` <x-data-list aria-live="polite" aria-busy="false" class="leading-s text-s" data="${0}"> </x-data-list> `),JSON.stringify(Array.from(Object.entries(i))))}const s=this.in("busy");return a(v||(v=$` <div aria-live="polite" aria-busy="${0}" data-testid="wrapper" class="flex justify-center"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> `),s,this.in("fail")?"error":s?"busy":"empty",this.lang,this.ns)}}let w,k,S,E,O,N,z,T,G,J,P,A=e=>e;const R=n(i(o(p)),"error-entry-card");class D extends R{constructor(){super(...arguments),this.open=!1}static get scopedElements(){return{"x-resource-viewer":j,"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x,"iron-icon":customElements.get("iron-icon"),"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get properties(){return s(s({},super.properties),{},{open:{type:Boolean,reflect:!0}})}render(){var e,s;const r=this.data,t=this.in("busy");if(r){const{hide_error:e}=r,{open:s}=this;return a(w||(w=A` <details aria-busy="${0}" aria-live="polite" class="text-body w-full" ?open="${0}" @toggle="${0}"> <summary class="rounded-s ring-offset-4 ring-offset-base ring-primary-50 focus-outline-none focus-ring-2"> <div style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="${0}"> ${0} </div> </summary> ${0} </details> `),t,s,this.__handleToggle,d({"border-l-2 leading-s relative cursor-pointer":!0,"border-contrast":e&&!s,"border-primary":!e,"border-error":e&&s,"h-l":!s}),this.__renderSummary(r),s?this.__renderDetails(r):"")}return a(k||(k=A` <div aria-busy="${0}" aria-live="polite" style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="flex items-center justify-center border-l-2 leading-s relative border-contrast-10 h-l"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),t,t?"busy":this.in("fail")?"error":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderGetOrPostValues(e,s){const r=new URLSearchParams(u(e||s));return a(S||(S=A` <div class="relative leading-xs pt-s"> <div class="absolute font-medium right-0 text-tertiary text-xs top-0 mt-s">${0}</div> <x-data-list data="${0}"></x-data-list> </div> `),e?"GET":"POST",JSON.stringify(Array.from(r.entries())))}__renderReferrer(e){return a(E||(E=A` <span class="text-secondary">Navigated from</span> <a target="_blank" class="font-medium text-primary hover-underline" href="${0}" rel="nofollow noopener noreferrer"> ${0} </a> `),e,e)}__renderSummary(e){return a(O||(O=A` <div class="text-s absolute right-0 top-0 text-tertiary"> <iron-icon icon="icons:expand-${0}"></iron-icon> </div> <div class="text-s mb-xs ${0}"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </div> <p class="${0} overflow-hidden font-medium"> ${0} </p> `),this.open?"less":"more",e.hide_error?"text-error":"text-primary",JSON.stringify({value:e.date_created}),this.lang,this.ns,JSON.stringify({value:e.date_created}),this.lang,this.ns,this.open?"":"truncate",e.error_message)}__renderDetails(e){return a(N||(N=A` <div class="space-y-m pt-m"> ${0} ${0} ${0} </div> `),e.referrer||e.get_values||e.post_values?a(z||(z=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="request" ns="${0}"></foxy-i18n> <div class="mx-xs p-s text-s divide-y divide-contrast-10 space-y-s"> <p> <span class="block font-medium">${0}</span> ${0} </p> ${0} </div> </x-group> `),this.lang,this.ns,e.url,e.referrer?this.__renderReferrer(e.referrer):"",e.get_values||e.post_values?this.__renderGetOrPostValues(e.get_values,e.post_values):""):"",e.ip_address||e.ip_country||e.user_agent?a(T||(T=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="client" ns="${0}"></foxy-i18n> <div class="text-s flex flex-col mx-xs p-s"> <span class="font-medium"> ${0} ${0} </span> ${0} </div> </x-group> `),this.lang,this.ns,e.ip_address,e.ip_country?a(G||(G=A`<span class="text-tertiary"> • </span>${0}`),e.ip_country):"",e.user_agent?a(J||(J=A`<span class="text-secondary">${0}</span>`),e.user_agent):""):"",Object.entries(e._links).map((([e,s])=>["self","fx:store","curies"].includes(e)?"":a(P||(P=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <x-resource-viewer class="p-s mx-xs" href="${0}" lang="${0}" ns="${0}"> </x-resource-viewer> </x-group> `),this.lang,e.substr(3),this.ns,s.href,this.lang,this.ns))))}__handleToggle(e){var s;const r=e.target;r.open&&!1===(null===(s=this.data)||void 0===s?void 0:s.hide_error)&&(this.edit({hide_error:!0}),this.submit()),this.open=r.open}}customElements.define("foxy-error-entry-card",D);export{D as ErrorEntryCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-6b06d5c1.js";import"./shared-2b25aedd.js";import"./shared-2868b35f.js";import"./shared-303cf36c.js";import"./shared-2ca4d459.js";import"./shared-a5bd0da6.js";import"./shared-84ada96e.js";import{I as e,b as t}from"./shared-64d48bc6.js";import"./foxy-template-set-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-2565fed8.js";import"./shared-a81a1cc3.js";import"./shared-544b7d4b.js";import"./shared-afa402dc.js";import"./shared-602ed877.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-433b15f9.js";import{I as n}from"./shared-5741ba29.js";import{h as r,d as i,N as o,i as a,s}from"./shared-ba5c42c7.js";import{_ as l,B as d}from"./shared-d1195c27.js";import{a as u,R as c,w as m}from"./shared-aa54bc96.js";import{i as f}from"./shared-53e42a77.js";import{e as h,d as g}from"./shared-641786b2.js";import{c as p}from"./shared-4e709717.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./foxy-form-dialog.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./shared-67898669.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-33ed0fe7.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-7439665e.js";import"./shared-3149ab8d.js";import"./shared-59d9d6ca.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.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-0e1d094b.js";import"./shared-831f5042.js";import"./shared-61e50856.js";import"./shared-5212ef4f.js";import"./shared-bf7baab5.js";import"./shared-8d92dd6e.js";import"./shared-37c52c4c.js";import"./shared-349a42e1.js";import"./shared-35a2aabc.js";import"./shared-6cb26d12.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-6fa216e7.js";import"./shared-37dc0b85.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-63c32024.js";let y,_=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-card",class extends n{renderBody(){var e,t;return r(y||(y=_` <div class="flex justify-between items-center h-xs"> <span class="font-medium">${0}​</span> <span class="text-secondary">${0}​</span> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(t=this.data)||void 0===t?void 0:t.value)}});let b,x=e=>e;const v=u(e,"internal-experimental-add-to-cart-builder-custom-option-form");customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-form",class extends v{constructor(){super(...arguments),this.defaultWeightUnit=null,this.existingOptions=[],this.itemCategories=null,this.currencyCode=null}static get properties(){return l(l({},super.properties),{},{defaultWeightUnit:{attribute:"default-weight-unit"},existingOptions:{type:Array,attribute:"existing-options"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"}})}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("basics-group"),new d(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return!this.href&&this.existingOptions.some((e=>e.name===this.form.name))&&e.unshift("basics-group:value-configurable"),new d(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.form.value_configurable&&e.unshift("price-group","weight-group","code-group","category-group"),new d(e.join(" ").trim())}renderBody(){var e,t,n,i;return r(b||(b=x` <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control property="value" layout="summary-item" infer="${0}"> </foxy-internal-text-control> <foxy-internal-switch-control infer="value-configurable"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="price"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-price"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="weight-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="weight"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-weight"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-switch-control infer="replace-code"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="category-group"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> `),this.form.value_configurable?"default-value":"value",f(null!==(e=this.currencyCode)&&void 0!==e?e:void 0),f(null!==(t=this.__resolvedDefaultWeightUnit)&&void 0!==t?t:void 0),f(null!==(n=this.itemCategories)&&void 0!==n?n:void 0),f(null!==(i=this.form.item_category_uri)&&void 0!==i?i:void 0),(()=>this.requestUpdate()))}async _sendPost(e){const t=this.existingOptions.filter((t=>t.name===e.name));if(t.some((e=>e.value_configurable)))throw["error:option_exists_configurable"];if(t.some((t=>t.value===e.value)))throw["error:option_exists"];return super._sendPost(e)}get __resolvedDefaultWeightUnit(){var e,t;const n=this.renderRoot.querySelector("#itemCategoryLoader");return null!==(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.default_weight_unit)&&void 0!==t?t:this.defaultWeightUnit}});let $,w,E,S,j,k,C,N,L,M,R,O,P,T,A,I,q=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-item-control",class extends t{constructor(){super(...arguments),this.defaultItemCategory=null,this.itemCategories=null,this.currencyCode=null,this.index=0}static get properties(){return l(l({},super.properties),{},{defaultItemCategory:{type:Object,attribute:"default-item-category"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"},index:{type:Number}})}renderControl(){var e,t,n,i,o,a,s,l,d;const u=this.__resolvedItemCategory,c=null==u?void 0:u.item_delivery_type,m=this.nucleon,h=this.index,g=null===(e=null==m?void 0:m.form.items)||void 0===e?void 0:e[h];return r($||($=q` <div class="space-y-m"> <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control property="items.${0}.name" layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-resource-picker-control property="items.${0}.item_category_uri" layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control property="items.${0}.price" layout="summary-item" suffix="${0}" infer="${0}"> </foxy-internal-number-control> <foxy-internal-switch-control property="items.${0}.price_configurable" layout="summary-item" infer="price-configurable"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control property="items.${0}.code" layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-text-control property="items.${0}.parent_code" layout="summary-item" infer="parent-code"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-summary-control infer="subscriptions-group"> <foxy-internal-switch-control property="items.${0}.sub_enabled" layout="summary-item" infer="sub-enabled"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="quantity-group" layout="details"> <foxy-internal-number-control property="items.${0}.quantity" layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> ${0} <foxy-internal-switch-control property="items.${0}.hide_quantity" infer="hide-quantity"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="advanced-group" layout="details"> <foxy-internal-text-control property="items.${0}.discount_name" layout="summary-item" infer="discount-name"> </foxy-internal-text-control> ${0} <foxy-internal-text-control property="items.${0}.image" layout="summary-item" infer="image"> </foxy-internal-text-control> ${0} <foxy-internal-select-control property="items.${0}.expires_format" layout="summary-item" infer="expires-format" .options="${0}"> </foxy-internal-select-control> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-async-list-control first="foxy://${0}/form/items/${0}/custom_options" infer="custom-options" form="foxy-internal-experimental-add-to-cart-builder-custom-option-form" item="foxy-internal-experimental-add-to-cart-builder-custom-option-card" alert .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> </div> `),h,h,f(null!==(t=this.itemCategories)&&void 0!==t?t:void 0),h,f(null!==(n=this.currencyCode)&&void 0!==n?n:void 0),(null==g?void 0:g.price_configurable)?"price-default":"price",h,h,h,"notshipped"===c||"downloaded"===c?"":r(w||(w=q` <foxy-internal-summary-control infer="appearance-group"> <foxy-internal-number-control placeholder="${0}" property="items.${0}.weight" layout="summary-item" suffix="${0}" infer="weight" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> `),f(null==u?void 0:u.default_weight),h,f(null==u?void 0:u.default_weight_unit)),h,(null==g?void 0:g.sub_enabled)?r(E||(E=q` <foxy-internal-frequency-control property="items.${0}.sub_frequency" layout="summary-item" infer="sub-frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-select-control property="items.${0}.sub_startdate_format" layout="summary-item" infer="sub-startdate-format" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control property="items.${0}.sub_enddate_format" layout="summary-item" infer="sub-enddate-format" .options="${0}"> </foxy-internal-select-control> ${0} `),h,h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_dd",value:"dd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_startdate_format?r(S||(S=q` <foxy-internal-date-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_startdate_format?r(j||(j=q` <foxy-internal-frequency-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-duration"> </foxy-internal-frequency-control> `),h):"dd"===g.sub_startdate_format?r(k||(k=q` <foxy-internal-number-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-dd" step="1" min="1" max="31"> </foxy-internal-number-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_enddate_format?r(C||(C=q` <foxy-internal-date-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_enddate_format?r(N||(N=q` <foxy-internal-frequency-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-duration"> </foxy-internal-frequency-control> `),h):""):"",h,"minutes"===(null==g?void 0:g.expires_format)?"":r(L||(L=q` <foxy-internal-number-control property="items.${0}.quantity_min" layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.quantity_max" layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> `),h,h),h,h,(null==g?void 0:g.discount_name)?r(M||(M=q` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),{details:null!==(i=null==g?void 0:g.discount_details)&&void 0!==i?i:"",type:null!==(o=null==g?void 0:g.discount_type)&&void 0!==o?o:"amount_percentage",name:null!==(a=null==g?void 0:g.discount_name)&&void 0!==a?a:""},(e=>{this.__handleDiscountBuilderChange(e,g,h)})):"",h,(null==g?void 0:g.image)?r(R||(R=q` <foxy-internal-text-control property="items.${0}.url" layout="summary-item" infer="url"> </foxy-internal-text-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_minutes",value:"minutes"},{label:"option_timestamp",value:"timestamp"}],"minutes"===(null==g?void 0:g.expires_format)?r(O||(O=q` <foxy-internal-number-control property="items.${0}.expires_value" layout="summary-item" suffix="min" infer="expires-value-minutes"> </foxy-internal-number-control> `),h):"timestamp"===(null==g?void 0:g.expires_format)?r(P||(P=q` <foxy-internal-date-control property="items.${0}.expires_value" layout="summary-item" format="unix" infer="expires-value-timestamp"> </foxy-internal-date-control> `),h):"","notshipped"===c||"downloaded"===c?"":r(T||(T=q` <foxy-internal-number-control property="items.${0}.length" layout="summary-item" suffix="${0}" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.width" layout="summary-item" suffix="${0}" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.height" layout="summary-item" suffix="${0}" infer="height" min="0"> </foxy-internal-number-control> `),h,f(null==u?void 0:u.default_length_unit),h,f(null==u?void 0:u.default_length_unit),h,f(null==u?void 0:u.default_length_unit)),null==m?void 0:m.virtualHost,h,{".defaultWeightUnit":null==u?void 0:u.default_weight_unit,".existingOptions":null!==(s=null==g?void 0:g.custom_options)&&void 0!==s?s:[],".itemCategories":this.itemCategories,".currencyCode":this.currencyCode},(null!==(d=null===(l=null==m?void 0:m.form.items)||void 0===l?void 0:l.length)&&void 0!==d?d:0)<=1?r(A||(A=q``)):r(I||(I=q` <vaadin-button theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="delete" key="caption"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>this.dispatchEvent(new CustomEvent("remove")))),f(null==g?void 0:g.item_category_uri),(()=>this.requestUpdate()))}get __resolvedItemCategory(){var e,t;return null!==(t=null===(e=this.__itemCategoryLoader)||void 0===e?void 0:e.data)&&void 0!==t?t:this.defaultItemCategory}get __itemCategoryLoader(){return this.renderRoot.querySelector("#itemCategoryLoader")}__handleDiscountBuilderChange(e,t,n){var r;const i=e.currentTarget,o=this.nucleon;t.discount_details=i.parsedValue.details,t.discount_type=i.parsedValue.type,t.discount_name=i.parsedValue.name;const a=null!==(r=null==o?void 0:o.form.items)&&void 0!==r?r:[];a.splice(n,1,t),null==o||o.edit({items:[...a]})}});const D=new WeakMap,H=i((e=>t=>{if(!(t instanceof o))throw new Error("unsafeHTML can only be used in text bindings");const n=D.get(t);if(void 0!==n&&a(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),D.set(t,{value:e,fragment:i})}));
|
|
1
|
+
import"./shared-0b1b1c14.js";import"./shared-2d11750b.js";import"./shared-48970bb4.js";import"./shared-42bb9e8e.js";import"./shared-8521017c.js";import"./shared-cf28d2c8.js";import"./shared-133fc37b.js";import{I as e,b as t}from"./shared-d784b79a.js";import"./foxy-template-set-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import"./shared-43e551f2.js";import"./shared-7ce74b42.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-1c07cd7f.js";import{I as n}from"./shared-93774efe.js";import{h as r,d as i,N as o,i as a,s}from"./shared-ba5c42c7.js";import{_ as l,B as d}from"./shared-d1195c27.js";import{a as u,R as c,w as m}from"./shared-f72d82a9.js";import{i as f}from"./shared-53e42a77.js";import{e as h,d as g}from"./shared-641786b2.js";import{c as p}from"./shared-4e709717.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./shared-d1dfac4d.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-2503aefc.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-10b54c49.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./shared-6d11190a.js";import"./shared-fea2714e.js";import"./shared-651c44fa.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-5212ef4f.js";import"./shared-25893d83.js";import"./shared-5f43aa36.js";import"./shared-d279baa5.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-0b00883f.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-63c32024.js";let y,_=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-card",class extends n{renderBody(){var e,t;return r(y||(y=_` <div class="flex justify-between items-center h-xs"> <span class="font-medium">${0}​</span> <span class="text-secondary">${0}​</span> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(t=this.data)||void 0===t?void 0:t.value)}});let b,x=e=>e;const v=u(e,"internal-experimental-add-to-cart-builder-custom-option-form");customElements.define("foxy-internal-experimental-add-to-cart-builder-custom-option-form",class extends v{constructor(){super(...arguments),this.defaultWeightUnit=null,this.existingOptions=[],this.itemCategories=null,this.currencyCode=null}static get properties(){return l(l({},super.properties),{},{defaultWeightUnit:{attribute:"default-weight-unit"},existingOptions:{type:Array,attribute:"existing-options"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"}})}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("basics-group"),new d(e.join(" ").trim())}get disabledSelector(){const e=[super.disabledSelector.toString()];return!this.href&&this.existingOptions.some((e=>e.name===this.form.name))&&e.unshift("basics-group:value-configurable"),new d(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.form.value_configurable&&e.unshift("price-group","weight-group","code-group","category-group"),new d(e.join(" ").trim())}renderBody(){var e,t,n,i;return r(b||(b=x` <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> <foxy-internal-text-control property="value" layout="summary-item" infer="${0}"> </foxy-internal-text-control> <foxy-internal-switch-control infer="value-configurable"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="price"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-price"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="weight-group"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="weight"> </foxy-internal-number-control> <foxy-internal-switch-control infer="replace-weight"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-switch-control infer="replace-code"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="category-group"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> `),this.form.value_configurable?"default-value":"value",f(null!==(e=this.currencyCode)&&void 0!==e?e:void 0),f(null!==(t=this.__resolvedDefaultWeightUnit)&&void 0!==t?t:void 0),f(null!==(n=this.itemCategories)&&void 0!==n?n:void 0),f(null!==(i=this.form.item_category_uri)&&void 0!==i?i:void 0),(()=>this.requestUpdate()))}async _sendPost(e){const t=this.existingOptions.filter((t=>t.name===e.name));if(t.some((e=>e.value_configurable)))throw["error:option_exists_configurable"];if(t.some((t=>t.value===e.value)))throw["error:option_exists"];return super._sendPost(e)}get __resolvedDefaultWeightUnit(){var e,t;const n=this.renderRoot.querySelector("#itemCategoryLoader");return null!==(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.default_weight_unit)&&void 0!==t?t:this.defaultWeightUnit}});let $,w,E,S,j,k,C,N,L,M,R,O,P,T,A,I,q=e=>e;customElements.define("foxy-internal-experimental-add-to-cart-builder-item-control",class extends t{constructor(){super(...arguments),this.defaultItemCategory=null,this.itemCategories=null,this.currencyCode=null,this.index=0}static get properties(){return l(l({},super.properties),{},{defaultItemCategory:{type:Object,attribute:"default-item-category"},itemCategories:{attribute:"item-categories"},currencyCode:{attribute:"currency-code"},index:{type:Number}})}renderControl(){var e,t,n,i,o,a,s,l,d;const u=this.__resolvedItemCategory,c=null==u?void 0:u.item_delivery_type,m=this.nucleon,h=this.index,g=null===(e=null==m?void 0:m.form.items)||void 0===e?void 0:e[h];return r($||($=q` <div class="space-y-m"> <foxy-internal-summary-control infer="basics-group"> <foxy-internal-text-control property="items.${0}.name" layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-resource-picker-control property="items.${0}.item_category_uri" layout="summary-item" first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="price-group"> <foxy-internal-number-control property="items.${0}.price" layout="summary-item" suffix="${0}" infer="${0}"> </foxy-internal-number-control> <foxy-internal-switch-control property="items.${0}.price_configurable" layout="summary-item" infer="price-configurable"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="code-group"> <foxy-internal-text-control property="items.${0}.code" layout="summary-item" infer="code"> </foxy-internal-text-control> <foxy-internal-text-control property="items.${0}.parent_code" layout="summary-item" infer="parent-code"> </foxy-internal-text-control> </foxy-internal-summary-control> ${0} <foxy-internal-summary-control infer="subscriptions-group"> <foxy-internal-switch-control property="items.${0}.sub_enabled" layout="summary-item" infer="sub-enabled"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="quantity-group" layout="details"> <foxy-internal-number-control property="items.${0}.quantity" layout="summary-item" infer="quantity" step="1" min="1"> </foxy-internal-number-control> ${0} <foxy-internal-switch-control property="items.${0}.hide_quantity" infer="hide-quantity"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="advanced-group" layout="details"> <foxy-internal-text-control property="items.${0}.discount_name" layout="summary-item" infer="discount-name"> </foxy-internal-text-control> ${0} <foxy-internal-text-control property="items.${0}.image" layout="summary-item" infer="image"> </foxy-internal-text-control> ${0} <foxy-internal-select-control property="items.${0}.expires_format" layout="summary-item" infer="expires-format" .options="${0}"> </foxy-internal-select-control> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-async-list-control first="foxy://${0}/form/items/${0}/custom_options" infer="custom-options" form="foxy-internal-experimental-add-to-cart-builder-custom-option-form" item="foxy-internal-experimental-add-to-cart-builder-custom-option-card" alert .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="itemCategoryLoader" @update="${0}"> </foxy-nucleon> </div> `),h,h,f(null!==(t=this.itemCategories)&&void 0!==t?t:void 0),h,f(null!==(n=this.currencyCode)&&void 0!==n?n:void 0),(null==g?void 0:g.price_configurable)?"price-default":"price",h,h,h,"notshipped"===c||"downloaded"===c?"":r(w||(w=q` <foxy-internal-summary-control infer="appearance-group"> <foxy-internal-number-control placeholder="${0}" property="items.${0}.weight" layout="summary-item" suffix="${0}" infer="weight" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> `),f(null==u?void 0:u.default_weight),h,f(null==u?void 0:u.default_weight_unit)),h,(null==g?void 0:g.sub_enabled)?r(E||(E=q` <foxy-internal-frequency-control property="items.${0}.sub_frequency" layout="summary-item" infer="sub-frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-select-control property="items.${0}.sub_startdate_format" layout="summary-item" infer="sub-startdate-format" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control property="items.${0}.sub_enddate_format" layout="summary-item" infer="sub-enddate-format" .options="${0}"> </foxy-internal-select-control> ${0} `),h,h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_dd",value:"dd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_startdate_format?r(S||(S=q` <foxy-internal-date-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_startdate_format?r(j||(j=q` <foxy-internal-frequency-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-duration"> </foxy-internal-frequency-control> `),h):"dd"===g.sub_startdate_format?r(k||(k=q` <foxy-internal-number-control property="items.${0}.sub_startdate" layout="summary-item" infer="sub-startdate-dd" step="1" min="1" max="31"> </foxy-internal-number-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_yyyymmdd",value:"yyyymmdd"},{label:"option_duration",value:"duration"}],"yyyymmdd"===g.sub_enddate_format?r(C||(C=q` <foxy-internal-date-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-yyyymmdd"> </foxy-internal-date-control> `),h):"duration"===g.sub_enddate_format?r(N||(N=q` <foxy-internal-frequency-control property="items.${0}.sub_enddate" layout="summary-item" infer="sub-enddate-duration"> </foxy-internal-frequency-control> `),h):""):"",h,"minutes"===(null==g?void 0:g.expires_format)?"":r(L||(L=q` <foxy-internal-number-control property="items.${0}.quantity_min" layout="summary-item" infer="quantity-min" step="1" min="1"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.quantity_max" layout="summary-item" infer="quantity-max" step="1" min="1"> </foxy-internal-number-control> `),h,h),h,h,(null==g?void 0:g.discount_name)?r(M||(M=q` <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),{details:null!==(i=null==g?void 0:g.discount_details)&&void 0!==i?i:"",type:null!==(o=null==g?void 0:g.discount_type)&&void 0!==o?o:"amount_percentage",name:null!==(a=null==g?void 0:g.discount_name)&&void 0!==a?a:""},(e=>{this.__handleDiscountBuilderChange(e,g,h)})):"",h,(null==g?void 0:g.image)?r(R||(R=q` <foxy-internal-text-control property="items.${0}.url" layout="summary-item" infer="url"> </foxy-internal-text-control> `),h):"",h,[{label:"option_none",value:"none"},{label:"option_minutes",value:"minutes"},{label:"option_timestamp",value:"timestamp"}],"minutes"===(null==g?void 0:g.expires_format)?r(O||(O=q` <foxy-internal-number-control property="items.${0}.expires_value" layout="summary-item" suffix="min" infer="expires-value-minutes"> </foxy-internal-number-control> `),h):"timestamp"===(null==g?void 0:g.expires_format)?r(P||(P=q` <foxy-internal-date-control property="items.${0}.expires_value" layout="summary-item" format="unix" infer="expires-value-timestamp"> </foxy-internal-date-control> `),h):"","notshipped"===c||"downloaded"===c?"":r(T||(T=q` <foxy-internal-number-control property="items.${0}.length" layout="summary-item" suffix="${0}" infer="length" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.width" layout="summary-item" suffix="${0}" infer="width" min="0"> </foxy-internal-number-control> <foxy-internal-number-control property="items.${0}.height" layout="summary-item" suffix="${0}" infer="height" min="0"> </foxy-internal-number-control> `),h,f(null==u?void 0:u.default_length_unit),h,f(null==u?void 0:u.default_length_unit),h,f(null==u?void 0:u.default_length_unit)),null==m?void 0:m.virtualHost,h,{".defaultWeightUnit":null==u?void 0:u.default_weight_unit,".existingOptions":null!==(s=null==g?void 0:g.custom_options)&&void 0!==s?s:[],".itemCategories":this.itemCategories,".currencyCode":this.currencyCode},(null!==(d=null===(l=null==m?void 0:m.form.items)||void 0===l?void 0:l.length)&&void 0!==d?d:0)<=1?r(A||(A=q``)):r(I||(I=q` <vaadin-button theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="delete" key="caption"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>this.dispatchEvent(new CustomEvent("remove")))),f(null==g?void 0:g.item_category_uri),(()=>this.requestUpdate()))}get __resolvedItemCategory(){var e,t;return null!==(t=null===(e=this.__itemCategoryLoader)||void 0===e?void 0:e.data)&&void 0!==t?t:this.defaultItemCategory}get __itemCategoryLoader(){return this.renderRoot.querySelector("#itemCategoryLoader")}__handleDiscountBuilderChange(e,t,n){var r;const i=e.currentTarget,o=this.nucleon;t.discount_details=i.parsedValue.details,t.discount_type=i.parsedValue.type,t.discount_name=i.parsedValue.name;const a=null!==(r=null==o?void 0:o.form.items)&&void 0!==r?r:[];a.splice(n,1,t),null==o||o.edit({items:[...a]})}});const D=new WeakMap,H=i((e=>t=>{if(!(t instanceof o))throw new Error("unsafeHTML can only be used in text bindings");const n=D.get(t);if(void 0!==n&&a(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),D.set(t,{value:e,fragment:i})}));
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1c07cd7f.js";import"./foxy-nucleon-element.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-f72d82a9.js";import{I as r}from"./shared-93774efe.js";import{i as s}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{d as o}from"./shared-641786b2.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,n,u=e=>e;const h=t(r,"filter-attribute-card");class c extends h{constructor(){super(...arguments),this.getCountLoaderHref=null,this.__countLoaderId="countLoader",this.__refreshTimeout=null}static get properties(){return e(e({},super.properties),{},{countRefreshInterval:{attribute:"count-refresh-interval",type:Number},getCountLoaderHref:{attribute:!1}})}disconnectedCallback(){super.disconnectedCallback(),"number"==typeof this.__refreshTimeout&&clearTimeout(this.__refreshTimeout)}updated(e){if(super.updated(e),"number"!=typeof this.__refreshTimeout){const e=this.constructor.countRefreshInterval;this.__refreshTimeout=setTimeout((()=>{var e;return null===(e=this.__getCountLoader())||void 0===e?void 0:e.refresh()}),e)}}render(){var e,t;const r=this.constructor,h=null===(t=null===(e=this.__getCountLoader())||void 0===e?void 0:e.data)||void 0===t?void 0:t.total_items;let c;try{this.data&&this.getCountLoaderHref&&(c=new URL(this.getCountLoaderHref(o(this.data.value))),c.searchParams.set("limit","1"))}catch(e){c=void 0}return i(d||(d=u` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="${0}"> <span class="${0}"> ${0} </span> <span class="${0}"> ${0} </span> </div> `),s(null==c?void 0:c.toString()),this.__countLoaderId,(()=>this.requestUpdate()),a({"transition-colors flex gap-s font-medium text-m leading-xs rounded-s":!0,"bg-contrast-5":!this.in("fail")&&!this.data,"bg-error-10":this.in("fail")}),a({"transition-opacity truncate min-w-0":!0,"opacity-0":!this.data}),this.__getValueParam(r.filterNameKey)||i(n||(n=u`<foxy-i18n infer="" key="no_name"></foxy-i18n>`)),a({"transition-opacity bg-contrast-5 px-xs rounded-s":!0,"opacity-0":!this.data||"number"!=typeof h}),null!=h?h:0)}__getCountLoader(){return this.renderRoot.querySelector(`#${this.__countLoaderId}`)}__getValueParam(e){var t,r,s;try{return null!==(s=new URL(o(null!==(r=null===(t=this.data)||void 0===t?void 0:t.value)&&void 0!==r?r:""),"https://example.com").searchParams.get(e))&&void 0!==s?s:""}catch(e){return""}}}c.countRefreshInterval=6e5,c.filterQueryKey="filter_query",c.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-card",c);export{c as FilterAttributeCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as t,I as e}from"./shared-d784b79a.js";import"./shared-0b1b1c14.js";import"./shared-4e8a5b95.js";import{h as r}from"./shared-ba5c42c7.js";import"./shared-133fc37b.js";import"./shared-f316780a.js";import{_ as s,B as a}from"./shared-d1195c27.js";import{a as i}from"./shared-f72d82a9.js";import{d as o,e as d}from"./shared-641786b2.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-1482d5dd.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-d0aed1c1.js";import"./shared-8874ec69.js";import"./shared-63c32024.js";import"./shared-79d0699c.js";import"./shared-5fd5805c.js";let n,l,m=t=>t;customElements.define("foxy-internal-filter-attribute-form-action-control",class extends t{renderControl(){const t=this.nucleon,e=null==t?void 0:t.in({idle:{snapshot:"dirty"}}),s=!!(null==t?void 0:t.data);return r(n||(n=m` <div class="grid grid-cols-2 gap-m"> ${0} <vaadin-button theme="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </vaadin-button> </div> `),s&&e?r(l||(l=m` <vaadin-button theme="contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>null==t?void 0:t.undo())):"",s?e?"secondary":"error":"success",s&&e?"":"col-span-2",this.disabled,(()=>!s||e?null==t?void 0:t.submit():null==t?void 0:t.delete()),s?e?"update":"delete":"create")}});let h,u=t=>t;const c=i(e,"filter-attribute-form");class f extends c{constructor(){super(...arguments),this.pathname=null,this.options=[],this.__filterNameGetValue=()=>{const t=this.constructor;return this.__getValueParam(t.filterNameKey)},this.__filterNameSetValue=t=>{const e=this.constructor;this.__setValueParam(e.filterNameKey,t)}}static get properties(){return s(s({},super.properties),{},{pathname:{},options:{type:Array}})}get hiddenSelector(){const t=[],e=this.constructor,r=this.__getValueParam(e.filterQueryKey),s=!!this.data;return s||t.push("filter-name"),r||s||t.push("action"),new a(`${t.join(" ")} ${super.hiddenSelector}`.trim())}renderBody(){const t=this.constructor;return r(h||(h=u` <foxy-query-builder infer="filter-query" .options="${0}" .value="${0}" @change="${0}"> </foxy-query-builder> <foxy-internal-text-control infer="filter-name" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-filter-attribute-form-action-control infer="action"> </foxy-internal-filter-attribute-form-action-control> `),this.options,this.__getValueParam(t.filterQueryKey),this.__handleFilterQueryChange,this.__filterNameGetValue,this.__filterNameSetValue)}updated(t){var e;if(super.updated(t),"string"==typeof this.form.value){const t=new URL(o(this.form.value),"https://example.com");t.pathname=null!==(e=this.pathname)&&void 0!==e?e:"";const r=d(t.toString().substring(t.origin.length));r!==this.form.value&&this.edit({value:r})}}submit(){const t=this.constructor;this.edit({visibility:t.attributeVisibility,name:t.attributeName}),super.submit()}__getValueParam(t){var e,r;try{return null!==(r=new URL(o(null!==(e=this.form.value)&&void 0!==e?e:""),"https://example.com").searchParams.get(t))&&void 0!==r?r:""}catch(t){return""}}__setValueParam(t,e){var r;try{const s=new URL(o(null!==(r=this.form.value)&&void 0!==r?r:""),"https://example.com");s.searchParams.set(t,e),this.edit({value:d(s.toString().substring(s.origin.length))})}catch(t){}}__handleFilterQueryChange(t){var e;const r=this.constructor,s=t.currentTarget;this.__setValueParam(r.filterQueryKey,null!==(e=s.value)&&void 0!==e?e:"")}}f.attributeVisibility="restricted",f.filterQueryKey="filter_query",f.attributeName="foxy-admin-bookmark",f.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-form",f);export{f as FilterAttributeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4e8a5b95.js";import"./shared-4c90701b.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{h as r}from"./shared-ba5c42c7.js";import{A as o}from"./shared-7e9fdf64.js";import{D as s}from"./shared-1a49f70b.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-53e476fd.js";import"./shared-f72d82a9.js";import"./shared-17a61265.js";import"./shared-0b1b1c14.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";let d,p,l=e=>e;class h extends s{constructor(){super(...arguments),this.closeOnPatch=!1,this.keepOpenOnDelete=!1,this.keepOpenOnPost=!1,this.related=[],this.parent="",this.props={},this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))},this.__handleUpdate=e=>{var t;if(!(e instanceof i))return;const r=null===(t=e.detail)||void 0===t?void 0:t.result,o=i.UpdateResult,s=e.currentTarget;(!this.keepOpenOnDelete&&r===o.ResourceDeleted||!this.keepOpenOnPost&&r===o.ResourceCreated||this.closeOnPatch&&r===o.ResourceUpdated&&0===s.errors.length)&&(this.open=!1),this.parent!==s.parent&&(this.parent=s.parent),this.href!==s.href&&(this.href=s.href),this.closable=!s.in("busy"),this.editable=s.in({idle:{template:{dirty:"valid"}}})||s.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},props:{type:Object},parent:{type:String},related:{type:Array},closeOnPatch:{type:Boolean,attribute:"close-on-patch"},keepOpenOnPost:{type:Boolean,attribute:"keep-open-on-post"},keepOpenOnDelete:{type:Boolean,attribute:"keep-open-on-delete"}})}get hiddenSelector(){return new t(`submit undo ${super.hiddenSelector}`.trim())}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledSelector.toString()}\n readonlycontrols=\${options.dialog.readonlySelector.toString()}\n hiddencontrols=\${options.dialog.hiddenSelector.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n ...=\${options.spread(options.dialog.props)}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return r(d||(d=l` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return r(p||(p=l`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,spread:a,dialog:this,html:r}))})))}async hide(e=!1){if(!e||!this.editable)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",h);export{h as FormDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d279baa5.js";import"./shared-2e8361e1.js";import"./shared-e0d1856d.js";import{a as e,I as r}from"./shared-d784b79a.js";import{_ as s,B as t}from"./shared-d1195c27.js";import{i}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-528b3bdb.js";import"./shared-8676e5c0.js";import"./shared-133fc37b.js";import{a}from"./shared-f72d82a9.js";import"./shared-fea2714e.js";import"./shared-c52295d5.js";import"./shared-1482d5dd.js";import"./shared-cd652fd0.js";import"./shared-6b76afc2.js";import"./shared-0b1b1c14.js";import"./shared-c1ade7a9.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";let n,d,l,h=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.showControls=!1,this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return s(s({},super.properties),{},{showControls:{type:Boolean,attribute:"show-controls"},prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,r;return o(n||(n=h` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?has-controls="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),i(this._errorMessage),this.placeholder,this.helperText,this.label,i(null!==(e=this.min)&&void 0!==e?e:void 0),i(null!==(r=this.max)&&void 0!==r?r:void 0),this.showControls,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}),this.prefix?o(d||(d=h`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?o(l||(l=h`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});let m,p=e=>e;const c=a(r,"generate-codes-form");class f extends c{constructor(){super(...arguments),this.__exampleGetValue=()=>{var e,r;const s=null!==(e=this.form.prefix)&&void 0!==e?e:"",t=(null!==(r=this.form.length)&&void 0!==r?r:6)-s.length;if(t>0)return["1V3BJ3USJKSS1BYANMNBT7AJ06R6QQ8RB0VPPL03ATQVY186X2","P4YNSW7NSSAY43PL4H7BKHDUVNAE9UR13FC0XAAJHDLZWW8AJC","7DGT4Q91FV4KK095WLX1ML1HFNU6ZCGVBVPMGR7D3P52A9UFTB"].map((e=>`${s}${e.slice(0,t)}`)).join("\n")}}static get v8n(){return[({prefix:e="",length:r=6})=>r-e.length>0&&r<=50&&!(null==e?void 0:e.includes(" "))||"error:invalid_form"]}get readonlySelector(){const e=["example",super.readonlySelector.toString()];return this.href&&e.push("length number-of-codes current-balance prefix"),new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("delete timestamps"),this.href&&e.push("example"),this.errors.includes("error:invalid_form")&&e.push("example"),new t(e.join(" ").trim())}renderBody(){return o(m||(m=p` <foxy-internal-text-control infer="prefix"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-m"> <foxy-internal-integer-control infer="length" min="1"></foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-codes" min="1"> </foxy-internal-integer-control> </div> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> <foxy-internal-source-control infer="example" .getValue="${0}"> </foxy-internal-source-control> ${0} `),this.__exampleGetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-generate-codes-form",f);export{f as GenerateCodesForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{h as t}from"./shared-ba5c42c7.js";import{C as e}from"./shared-eeb2bd18.js";import{N as s}from"./shared-d1dfac4d.js";import{T as i,a as r}from"./shared-f72d82a9.js";import{c as a}from"./shared-4e709717.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,o,n,l,p,c=t=>t;const h=i(e(r(s,"gift-card-card")));class f extends h{render(){var e,s;const i=this.hiddenSelector;return t(d||(d=c` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("status",!0)?"":this.__renderStatus(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderTitle(){var e,s,i,r;const a=null!==(s=null===(e=this.data)||void 0===e?void 0:e.name)&&void 0!==s?s:t(o||(o=c`​`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:t(n||(n=c`​`));return t(l||(l=c` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <div class="text-tertiary uppercase text-s flex-shrink-0">${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),a,d,this.renderTemplateOrSlot("title:after"))}__renderStatus(){var e;const s=null===(e=this.data)||void 0===e?void 0:e.expires_after;return t(p||(p=c` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-secondary" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:s}),this.lang,s?"expires_after_value":"never_expires",this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-gift-card-card",f);export{f as GiftCardCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1c07cd7f.js";import"./foxy-nucleon-element.js";import"./shared-4e8a5b95.js";import{a as e}from"./shared-f72d82a9.js";import{I as r}from"./shared-93774efe.js";import{i as t}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.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 o,d=e=>e;const a=e(r,"gift-card-code-card");class i extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}get isBodyReady(){var e,r;return super.isBodyReady&&!!(null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data)&&!!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data)}renderBody(){var e,r,a,i,n;const f=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,c=null===(r=this.__storeLoader)||void 0===r?void 0:r.data;return s(o||(o=d` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="current_balance" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.data,{currencyDisplay:(null==c?void 0:c.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==f?void 0:f.currency_code}`},this.data,t(null===(i=this.data)||void 0===i?void 0:i._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),t(null===(n=this.data)||void 0===n?void 0:n._links["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()))}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-card",i);export{i as GiftCardCodeCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-42bb9e8e.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import"./shared-133fc37b.js";import{I as e}from"./shared-d784b79a.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-f72d82a9.js";import{T as a}from"./shared-8874ec69.js";import{i}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./shared-0b1b1c14.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-eeb2bd18.js";import"./foxy-nucleon-element.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-4e709717.js";import"./shared-53e476fd.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.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-d279baa5.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-e622d8cf.js";import"./shared-6d11190a.js";import"./shared-60150977.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-1c07cd7f.js";import"./shared-93774efe.js";let n,l=e=>e;const m=s(e,"gift-card-code-form");class c extends m{constructor(){super(...arguments),this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__customerGetValue=()=>{var e,r,t;const o=null===(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:customer"])||void 0===t?void 0:t.href,s=this.form.customer_id;return void 0===s?o:this.getCustomerHref(s)},this.__customerSetValue=e=>{const r=o(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:a.String,path:"id",label:"filters.id"},{type:a.String,path:"tax_id",label:"filters.tax_id"},{type:a.String,path:"email",label:"filters.email"},{type:a.String,path:"first_name",label:"filters.first_name"},{type:a.String,path:"last_name",label:"filters.last_name"},{type:a.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:a.Date,path:"last_login_date",label:"filters.last_login_date"},{type:a.Date,path:"date_created",label:"filters.date_created"},{type:a.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>!e||e.length<=50||"code:v8n_too_long",({code:e})=>!(null==e?void 0:e.includes(" "))||"code:v8n_has_spaces",({current_balance:e})=>"number"==typeof e||"current-balance:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString(),"cart-item"];return new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new t(e.join(" ").trim())}renderBody(){var e,r,t,o,s,a,m,c;let f;try{const o=new URL(null!==(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==t?t:"");o.searchParams.set("zoom","item_options"),f=o.toString()}catch(e){f=void 0}return d(n||(n=l` ${0} <foxy-internal-summary-control infer="settings"> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="current-balance"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-resource-picker-control infer="customer" first="${0}" item="foxy-customer-card" .getValue="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-resource-picker-control infer="cart-item" item="foxy-item-card" .getValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-async-list-control infer="logs" first="${0}" limit="5" item="foxy-gift-card-code-log-card"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,(()=>f),i(null===(m=null===(a=this.data)||void 0===a?void 0:a._links)||void 0===m?void 0:m["fx:gift_card_code_logs"].href),super.renderBody(),i(null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",c);export{c as GiftCardCodeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1c07cd7f.js";import"./foxy-nucleon-element.js";import"./shared-4e8a5b95.js";import{a as e}from"./shared-f72d82a9.js";import{I as t}from"./shared-93774efe.js";import{i as r}from"./shared-53e42a77.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-01bb183b.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,i=e=>e;const a=e(t,"gift-card-code-log-card");class n extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,a,n;const f=this.data,c=null!==(e=null==f?void 0:f.balance_adjustment)&&void 0!==e?e:0,l="number"==typeof(null==f?void 0:f.transaction_id),_=l?"title_used":"title_updated_via_api",u=l?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==f?void 0:f.transaction_id},h={date_created:null==f?void 0:f.date_created,month:"short"},m={currencyDisplay:(null===(t=this.__store)||void 0===t?void 0:t.use_international_currency_symbol)?"code":"symbol",signDisplay:"exceptZero",amount:`${c} ${null===(a=this.__giftCard)||void 0===a?void 0:a.currency_code}`};return o(d||(d=i` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="leading-s"> <div class="flex justify-between items-center"> <span class="text-body font-medium truncate"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </span> <span class="text-s text-tertiary flex-shrink-0"> <foxy-i18n infer="" key="date" .options="${0}"></foxy-i18n> </span> </div> <div class="text-s text-secondary truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> <span class="text-tertiary">•</span> <span class="${0}"> <foxy-i18n infer="" key="adjustment" .options="${0}"></foxy-i18n> </span> </div> </div> `),r(null===(n=null==f?void 0:f._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==f?void 0:f._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===c,"text-success":c>0,"text-error":c<0}),m)}get isBodyReady(){return super.isBodyReady&&!!this.__giftCard&&!!this.__store}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __giftCard(){var e;return null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data}get __store(){var e;return null===(e=this.__storeLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-gift-card-code-log-card",n);export{n as GiftCardCodeLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-48970bb4.js";import"./shared-528b3bdb.js";import{I as r}from"./shared-d784b79a.js";import{a as e}from"./shared-f72d82a9.js";import{B as s}from"./shared-d1195c27.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-2503aefc.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-1482d5dd.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-d279baa5.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-0b1b1c14.js";import"./shared-53e42a77.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let d,a=r=>r;const o=e(r,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var r,e;return null!==(e=null===(r=this.form.gift_card_codes)||void 0===r?void 0:r.map((r=>({value:r}))))&&void 0!==e?e:[]},this.__giftCardCodesSetValue=r=>{this.edit({gift_card_codes:r.map((({value:r})=>r.split(" ").map((r=>r.trim())))).flat().filter(((r,e,s)=>s.indexOf(r)===e))})}}static get v8n(){return[({gift_card_codes:r})=>r&&r.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const r=[super.readonlySelector.toString()];return this.href&&r.push("gift-card-codes"),new s(r.join(" ").trim())}get hiddenSelector(){const r=["delete timestamps",super.hiddenSelector.toString()];return new s(r.join(" ").trim())}renderBody(){return t(d||(d=a` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(r){const e=JSON.stringify(r),s=await this._fetch(this.parent,{body:e,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-40bed8c1.js";import"./shared-059d1e79.js";import"./shared-2868b35f.js";import"./shared-544b7d4b.js";import"./shared-a81a1cc3.js";import"./shared-303cf36c.js";import"./shared-a5bd0da6.js";import"./shared-2ca4d459.js";import"./shared-afa402dc.js";import"./shared-84ada96e.js";import{I as e}from"./shared-64d48bc6.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as a,a as s}from"./shared-aa54bc96.js";import{i as n}from"./shared-53e42a77.js";import"./shared-6cb26d12.js";import"./shared-0e59bad9.js";import"./shared-120413cd.js";import"./shared-247297ce.js";import"./shared-6b06d5c1.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-3149ab8d.js";import"./shared-8d92dd6e.js";import"./shared-2565fed8.js";import"./shared-343d1fd7.js";import"./shared-17a61265.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-pagination.js";import"./shared-4e709717.js";import"./foxy-form-dialog.js";import"./shared-e14930ce.js";import"./shared-db92bb31.js";import"./shared-7439665e.js";import"./shared-59d9d6ca.js";import"./shared-d0aed1c1.js";import"./shared-56271b15.js";import"./shared-900fd54f.js";import"./shared-9c82e27f.js";import"./foxy-swipe-actions.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-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-c5972323.js";import"./shared-bf7baab5.js";import"./shared-5741ba29.js";import"./shared-433b15f9.js";import"./shared-2b25aedd.js";import"./shared-602ed877.js";import"./shared-6fa216e7.js";import"./shared-37dc0b85.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./shared-7f68743e.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,l,m,p,u;let _;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),_=t.toString()}catch(e){_=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,_,{".getCustomerHref":this.getCustomerHref},this.__codesActions,this.__codesFilters,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(s=null===(a=this.__storeLoader)||void 0===a?void 0:a.data)||void 0===s?void 0:s._links["fx:item_categories"].href),n(null===(l=this.data)||void 0===l?void 0:l._links["fx:gift_card_item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links.self.href),n(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),super.renderBody(),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
|
|
1
|
+
import"./shared-7cb8722a.js";import"./shared-40e4854e.js";import"./shared-48970bb4.js";import"./shared-7ce74b42.js";import"./shared-43e551f2.js";import"./shared-42bb9e8e.js";import"./shared-cf28d2c8.js";import"./shared-8521017c.js";import"./shared-528b3bdb.js";import"./shared-133fc37b.js";import{I as e}from"./shared-d784b79a.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-ba5c42c7.js";import{R as s,a}from"./shared-f72d82a9.js";import{i as n}from"./shared-53e42a77.js";import"./shared-0b00883f.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-0b1b1c14.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-01bb183b.js";import"./shared-5f43aa36.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.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-pagination.js";import"./shared-4e709717.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-d0aed1c1.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-swipe-actions.js";import"./shared-d279baa5.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-10b54c49.js";import"./shared-6d11190a.js";import"./shared-651c44fa.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-8676e5c0.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./shared-1c07cd7f.js";import"./shared-2d11750b.js";import"./shared-22dd6cbe.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./shared-c5cf889e.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=s(a(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,s,a,l,m,p,u;let _;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),_=t.toString()}catch(e){_=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,_,{".getCustomerHref":this.getCustomerHref},this.__codesActions,this.__codesFilters,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(a=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===a?void 0:a._links["fx:item_categories"].href),n(null===(l=this.data)||void 0===l?void 0:l._links["fx:gift_card_item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links.self.href),n(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),super.renderBody(),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1482d5dd.js";import{h as t,P as e}from"./shared-c52295d5.js";import{E as r,T as o}from"./shared-c1ade7a9.js";import{I as a}from"./shared-651c44fa.js";import"./shared-fea2714e.js";import{L as i}from"./shared-f92b9842.js";import{I as s}from"./shared-76dcc864.js";import{a as n}from"./shared-6a45a781.js";import{a as l}from"./shared-01bb183b.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36.js";import{_ as d}from"./shared-d1195c27.js";import{C as c}from"./shared-eeb2bd18.js";import{R as m,a as h,T as u}from"./shared-f72d82a9.js";import{N as f}from"./shared-d1dfac4d.js";import{c as p,h as v}from"./shared-ba5c42c7.js";import{c as b}from"./shared-4e709717.js";import{i as g}from"./shared-53e42a77.js";import{r as y}from"./shared-5fd5805c.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
package/dist/cdn/foxy-i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{I as I18n}from"./shared-
|
|
1
|
+
export{I as I18n}from"./shared-4e8a5b95.js";import"./shared-d1195c27.js";import"./shared-ba5c42c7.js";import"./shared-f72d82a9.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";
|