@foxy.io/elements 1.29.0-beta.3 → 1.29.0-beta.5
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 +2 -2
- 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 +5 -5
- 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-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 +3 -3
- 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-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-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +2 -2
- 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 +2 -2
- 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-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-ffd3690b.js → shared-0059cfec.js} +4 -4
- package/dist/cdn/{shared-a6273e4a.js → shared-01b35bfe.js} +1 -1
- package/dist/cdn/{shared-797ba64a.js → shared-04327f82.js} +1 -1
- package/dist/cdn/{shared-7fd9a30f.js → shared-0ba38e56.js} +1 -1
- package/dist/cdn/{shared-b731dfc5.js → shared-1287115d.js} +1 -1
- package/dist/cdn/shared-13c54ae2.js +1 -0
- package/dist/cdn/{shared-e5d37737.js → shared-1c166d01.js} +1 -1
- package/dist/cdn/shared-241b34e5.js +1 -0
- package/dist/cdn/{shared-a036e345.js → shared-31276bc2.js} +1 -1
- package/dist/cdn/{shared-bdd4fbbb.js → shared-337f11e4.js} +1 -1
- package/dist/cdn/{shared-b6814728.js → shared-383f55a5.js} +1 -1
- package/dist/cdn/{shared-f22f22ae.js → shared-3cd5a0f0.js} +1 -1
- package/dist/cdn/{shared-f8723f3f.js → shared-437a77f7.js} +1 -1
- package/dist/cdn/{shared-df00a537.js → shared-45512693.js} +1 -1
- package/dist/cdn/{shared-cbb0e610.js → shared-494a9f3d.js} +1 -1
- package/dist/cdn/{shared-f1d2b5bb.js → shared-4f6e3162.js} +1 -1
- package/dist/cdn/shared-525fa58a.js +1 -0
- package/dist/cdn/{shared-e6e84ff5.js → shared-52c30c2b.js} +1 -1
- package/dist/cdn/{shared-3fa791ca.js → shared-5ab6d05e.js} +1 -1
- package/dist/cdn/{shared-10b5e78f.js → shared-5b53b424.js} +1 -1
- package/dist/cdn/{shared-6a4e81ad.js → shared-5e463387.js} +1 -1
- package/dist/cdn/{shared-4993a79d.js → shared-64aa8234.js} +1 -1
- package/dist/cdn/{shared-d393bcd8.js → shared-64faf409.js} +1 -1
- package/dist/cdn/{shared-f5366dda.js → shared-66c5e679.js} +1 -1
- package/dist/cdn/{shared-2099544a.js → shared-72d815f5.js} +2 -2
- package/dist/cdn/{shared-876a4341.js → shared-735ba10d.js} +1 -1
- package/dist/cdn/{shared-e2a61f69.js → shared-7e2a1984.js} +1 -1
- package/dist/cdn/{shared-12ac8cc6.js → shared-843229d8.js} +1 -1
- package/dist/cdn/{shared-72c61f43.js → shared-86012240.js} +1 -1
- package/dist/cdn/{shared-7ce91c80.js → shared-864584b7.js} +1 -1
- package/dist/cdn/{shared-021c7a22.js → shared-8c77078c.js} +1 -1
- package/dist/cdn/{shared-fe77f6f6.js → shared-8e81d32d.js} +1 -1
- package/dist/cdn/{shared-075796e2.js → shared-91445b2b.js} +1 -1
- package/dist/cdn/{shared-2d723710.js → shared-928400e3.js} +1 -1
- package/dist/cdn/{shared-acdcae7e.js → shared-982ea9e1.js} +1 -1
- package/dist/cdn/shared-9a4ccbbb.js +1 -0
- package/dist/cdn/{shared-cc79152c.js → shared-a18c7822.js} +1 -1
- package/dist/cdn/{shared-644ee296.js → shared-aa9765b6.js} +1 -1
- package/dist/cdn/{shared-fb56178f.js → shared-aba112fe.js} +1 -1
- package/dist/cdn/{shared-2a71795e.js → shared-ad932522.js} +1 -1
- package/dist/cdn/{shared-fa9e5c7f.js → shared-b53c58a6.js} +1 -1
- package/dist/cdn/{shared-77c4acdd.js → shared-b938ba79.js} +1 -1
- package/dist/cdn/{shared-b98b8d02.js → shared-ba9431a5.js} +1 -1
- package/dist/cdn/{shared-ff63a551.js → shared-bbf4189c.js} +1 -1
- package/dist/cdn/shared-bd0a9424.js +1 -0
- package/dist/cdn/{shared-9a90a24e.js → shared-bdb350d5.js} +1 -1
- package/dist/cdn/{shared-10325cda.js → shared-c0a292f9.js} +1 -1
- package/dist/cdn/{shared-5c05ac06.js → shared-c0ce5ed0.js} +1 -1
- package/dist/cdn/{shared-abea5e34.js → shared-c1770155.js} +1 -1
- package/dist/cdn/{shared-77051754.js → shared-c2296e25.js} +1 -1
- package/dist/cdn/{shared-8f7a31e0.js → shared-c308b7e0.js} +2 -2
- package/dist/cdn/shared-c7055ee3.js +1 -0
- package/dist/cdn/{shared-634b670e.js → shared-c92aa1b4.js} +1 -1
- package/dist/cdn/{shared-339bbd50.js → shared-ca437731.js} +1 -1
- package/dist/cdn/{shared-1cf1e1a4.js → shared-cdf1e214.js} +1 -1
- package/dist/cdn/{shared-d464d078.js → shared-d692fde9.js} +1 -1
- package/dist/cdn/{shared-39a33102.js → shared-d70c024a.js} +1 -1
- package/dist/cdn/{shared-7026fb08.js → shared-e891437e.js} +1 -1
- package/dist/cdn/{shared-81d3a9ae.js → shared-e9bf9d3d.js} +1 -1
- package/dist/cdn/{shared-7b8ad9c1.js → shared-f02d1d28.js} +1 -1
- package/dist/cdn/{shared-30221a16.js → shared-f0cbc9b6.js} +1 -1
- package/dist/cdn/{shared-d6010c96.js → shared-f4bf0a11.js} +1 -1
- package/dist/cdn/{shared-558bc894.js → shared-f7a3f4c7.js} +1 -1
- package/dist/cdn/{shared-2fc671cd.js → shared-f9e2e408.js} +1 -1
- package/dist/cdn/{shared-303b428e.js → shared-fbcfc48c.js} +1 -1
- package/dist/cdn/{shared-8c1df97c.js → shared-fcb58504.js} +1 -1
- package/dist/cdn/{shared-72f41a65.js → shared-fd17c575.js} +1 -1
- package/dist/cdn/{shared-3e03c988.js → shared-fe167efc.js} +1 -1
- package/dist/cdn/{shared-a159ccff.js → shared-ff73b5b8.js} +1 -1
- package/dist/cdn/shared-ffbcfbc5.js +1 -0
- package/dist/cdn/translations/client-form/en.json +1 -0
- package/dist/cdn/translations/item-category-form/en.json +181 -148
- package/dist/cdn/translations/native-integration-form/en.json +0 -6
- package/dist/cdn/translations/store-form/en.json +3 -4
- package/dist/cdn/translations/webhook-form/en.json +3 -11
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +3 -0
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +23 -8
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +2 -4
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.d.ts +4 -2
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js +6 -5
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +2 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +11 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +2 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +13 -2
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/ClientForm/ClientForm.d.ts +1 -0
- package/dist/elements/public/ClientForm/ClientForm.js +10 -0
- package/dist/elements/public/ClientForm/ClientForm.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +1 -7
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +109 -135
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/index.d.ts +4 -3
- package/dist/elements/public/ItemCategoryForm/index.js +4 -3
- package/dist/elements/public/ItemCategoryForm/index.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +18 -25
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/WebhookForm/WebhookForm.d.ts +2 -1
- package/dist/elements/public/WebhookForm/WebhookForm.js +21 -17
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
- package/dist/elements/public/WebhookForm/index.d.ts +1 -0
- package/dist/elements/public/WebhookForm/index.js +1 -0
- package/dist/elements/public/WebhookForm/index.js.map +1 -1
- package/dist/mixins/themeable.js +0 -4
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-18cb3cfc.js +0 -1
- package/dist/cdn/shared-4c2d43e6.js +0 -1
- package/dist/cdn/shared-588c6b15.js +0 -1
- package/dist/cdn/shared-61f4e91a.js +0 -1
- package/dist/cdn/shared-666bdabd.js +0 -1
- package/dist/cdn/shared-b9138e9f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4f6e3162.js";import"./shared-c1770155.js";import{_ as e,B as t}from"./shared-0f6e4584.js";import{h as r}from"./shared-dc73b9a5.js";import{A as o}from"./shared-c286c5ad.js";import{D as s}from"./shared-e891437e.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-99940888.js";import"./shared-91445b2b.js";import"./shared-f7a1193f.js";import"./shared-928400e3.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-61ade33e.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.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-5ab6d05e.js";import"./shared-ffbcfbc5.js";import"./shared-31276bc2.js";import"./shared-c7055ee3.js";import{I as e}from"./shared-fcb58504.js";import{a as r}from"./shared-91445b2b.js";import{B as s}from"./shared-0f6e4584.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-45512693.js";import"./shared-1c166d01.js";import"./shared-f0cbc9b6.js";import"./shared-5e463387.js";import"./shared-982ea9e1.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-61ade33e.js";import"./shared-c308b7e0.js";import"./shared-ca437731.js";import"./shared-f02d1d28.js";import"./shared-51c4a6dd.js";import"./shared-4f6e3162.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-928400e3.js";import"./shared-c1770155.js";import"./shared-e891437e.js";import"./foxy-copy-to-clipboard.js";import"./shared-843229d8.js";import"./shared-aba112fe.js";import"./shared-bbf4189c.js";import"./shared-c0ce5ed0.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let o,i=e=>e;const a=r(e,"generate-codes-form");class n extends a{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 s(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 s(e.join(" ").trim())}renderBody(){return t(o||(o=i` <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",n);export{n as GenerateCodesForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-4f6e3162.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-0b01f721.js";import{N as s}from"./shared-24d71d01.js";import{T as i,a as r}from"./shared-91445b2b.js";import{c as a}from"./shared-4e709717.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";let d,o,n,l,c,p=t=>t;const h=i(e(r(s,"gift-card-card")));class m extends h{render(){var e,s;const i=this.hiddenSelector;return t(d||(d=p` <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=p`​`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:t(n||(n=p`​`));return t(l||(l=p` <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(c||(c=p` <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",m);export{m as GiftCardCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9a4ccbbb.js";import"./foxy-nucleon-element.js";import"./shared-4f6e3162.js";import{a as e}from"./shared-91445b2b.js";import{I as r}from"./shared-01b35bfe.js";import{i as t}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.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 c=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,f=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==f?void 0:f.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==c?void 0:c.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-864584b7.js";import"./shared-ba9431a5.js";import"./shared-ffbcfbc5.js";import"./shared-494a9f3d.js";import"./shared-c7055ee3.js";import{I as e}from"./shared-fcb58504.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import{a as r}from"./shared-f02d1d28.js";import"./foxy-item-card.js";import"./shared-4f6e3162.js";import{i as t}from"./shared-9803aa7c.js";import{h as o}from"./shared-dc73b9a5.js";import{_ as s,B as i}from"./shared-0f6e4584.js";import{g as a}from"./shared-bab2ea2c.js";import{a as d}from"./shared-91445b2b.js";import{T as n}from"./shared-8874ec69.js";import"./foxy-nucleon-element.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-f7a1193f.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./foxy-form-dialog.js";import"./shared-c1770155.js";import"./shared-928400e3.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-61ade33e.js";import"./shared-e891437e.js";import"./shared-0b01f721.js";import"./shared-4e709717.js";import"./shared-99940888.js";import"./shared-c0a292f9.js";import"./shared-8c77078c.js";import"./shared-aba112fe.js";import"./shared-72d815f5.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-c0ce5ed0.js";import"./shared-a0c6a159.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-45512693.js";import"./shared-1c166d01.js";import"./shared-982ea9e1.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-0059cfec.js";import"./shared-f9e2e408.js";import"./shared-fbcfc48c.js";import"./shared-383f55a5.js";import"./shared-c92aa1b4.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-22ba9566.js";import"./foxy-copy-to-clipboard.js";import"./shared-843229d8.js";import"./shared-bbf4189c.js";import"./shared-9a4ccbbb.js";import"./shared-01b35bfe.js";import"./shared-51c4a6dd.js";import"./shared-241b34e5.js";let l,c=e=>e;customElements.define("foxy-internal-gift-card-code-form-item-control",class extends r{renderControl(){var e,r,s,i;let a;try{const t=new URL(null!==(i=null===(s=null===(r=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===r?void 0:r._links)||void 0===s?void 0:s["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==i?i:"");t.searchParams.set("zoom","item_options"),a=t.toString()}catch(e){a=void 0}return o(l||(l=c` <foxy-i18n infer="" class="text-secondary block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-item-card class="block rounded ring-1 ring-contrast-10" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="card" href="${0}"> </foxy-item-card> `),t(a))}});let m,f=e=>e;const p=d(e,"gift-card-code-form");class h extends p{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=a(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:n.String,path:"id",label:"filters.id"},{type:n.String,path:"tax_id",label:"filters.tax_id"},{type:n.String,path:"email",label:"filters.email"},{type:n.String,path:"first_name",label:"filters.first_name"},{type:n.String,path:"last_name",label:"filters.last_name"},{type:n.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:n.Date,path:"last_login_date",label:"filters.last_login_date"},{type:n.Date,path:"date_created",label:"filters.date_created"},{type:n.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return s(s({},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 hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new i(e.join(" ").trim())}renderBody(){var e,r,s,i,a;return o(m||(m=f` ${0} <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-number-control infer="current-balance"></foxy-internal-number-control> <foxy-internal-date-control infer="end-date"></foxy-internal-date-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-gift-card-code-form-item-control infer="cart-item"> </foxy-internal-gift-card-code-form-item-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(),t(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,t(null===(i=null===(s=this.data)||void 0===s?void 0:s._links)||void 0===i?void 0:i["fx:gift_card_code_logs"].href),super.renderBody(),t(null===(a=this.data)||void 0===a?void 0:a._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",h);export{h as GiftCardCodeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9a4ccbbb.js";import"./foxy-nucleon-element.js";import"./shared-4f6e3162.js";import{a as e}from"./shared-91445b2b.js";import{I as t}from"./shared-01b35bfe.js";import{i as r}from"./shared-9803aa7c.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";let a,i=e=>e;const d=e(t,"gift-card-code-log-card");class n extends d{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,d,n;const c=this.data,f=null!==(e=null==c?void 0:c.balance_adjustment)&&void 0!==e?e:0,l="number"==typeof(null==c?void 0:c.transaction_id),_=l?"title_used":"title_updated_via_api",u=l?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==c?void 0:c.transaction_id},h={date_created:null==c?void 0:c.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:`${f} ${null===(d=this.__giftCard)||void 0===d?void 0:d.currency_code}`};return o(a||(a=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==c?void 0:c._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===f,"text-success":f>0,"text-error":f<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-64faf409.js";import"./shared-ffbcfbc5.js";import{I as r}from"./shared-fcb58504.js";import{a as e}from"./shared-91445b2b.js";import{B as s}from"./shared-0f6e4584.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-843229d8.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-5e463387.js";import"./shared-aba112fe.js";import"./shared-bbf4189c.js";import"./shared-f02d1d28.js";import"./shared-51c4a6dd.js";import"./shared-4f6e3162.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-99940888.js";import"./shared-45512693.js";import"./shared-1c166d01.js";import"./shared-982ea9e1.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-61ade33e.js";import"./shared-928400e3.js";import"./shared-c1770155.js";import"./shared-e891437e.js";import"./foxy-copy-to-clipboard.js";import"./shared-c0ce5ed0.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,d=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(a||(a=d` <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-7fd9a30f.js";import"./shared-1cf1e1a4.js";import"./shared-d393bcd8.js";import"./shared-b98b8d02.js";import"./shared-f8723f3f.js";import"./shared-18cb3cfc.js";import"./shared-588c6b15.js";import{I as e}from"./shared-8c1df97c.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"./shared-10b5e78f.js";import{I as t}from"./shared-7b8ad9c1.js";import"./shared-3fa791ca.js";import{R as r,a as o}from"./shared-075796e2.js";import{h as i}from"./shared-dc73b9a5.js";import{_ as a,B as s}from"./shared-0f6e4584.js";import{T as n}from"./shared-8874ec69.js";import{i as d}from"./shared-9803aa7c.js";import"./shared-e6e84ff5.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-2d723710.js";import"./shared-4e709717.js";import"./shared-bab2ea2c.js";import"./foxy-form-dialog.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-22ba9566.js";import"./shared-10325cda.js";import"./shared-021c7a22.js";import"./shared-2099544a.js";import"./foxy-swipe-actions.js";import"./shared-df00a537.js";import"./shared-e5d37737.js";import"./shared-acdcae7e.js";import"./shared-3e03c988.js";import"./shared-fe77f6f6.js";import"./shared-339bbd50.js";import"./shared-e2a61f69.js";import"./shared-797ba64a.js";import"./shared-2fc671cd.js";import"./shared-651c44fa.js";import"./shared-b6814728.js";import"./shared-634b670e.js";import"./foxy-copy-to-clipboard.js";import"./shared-b9138e9f.js";import"./shared-a036e345.js";import"./shared-51c4a6dd.js";import"./shared-77051754.js";import"./shared-a6273e4a.js";import"./shared-61f4e91a.js";import"./shared-7ce91c80.js";import"./shared-cbb0e610.js";import"./shared-ffd3690b.js";import"./shared-303b428e.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-4c2d43e6.js";import"./shared-cc79152c.js";let l,c,f=e=>e;const m=r(t);customElements.define("foxy-internal-gift-card-form-provisioning-control",class extends m{constructor(){super(...arguments),this.__maxBalanceValueGetter=()=>{var e,t;return null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.initial_balance_max},this.__maxBalanceValueSetter=e=>{var t,r,o,i;const a=null!==(o=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==o?o:e;null===(i=this.nucleon)||void 0===i||i.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:a>e?e:a,initial_balance_max:e}})},this.__minBalanceValueGetter=()=>{var e,t;return null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.initial_balance_min},this.__minBalanceValueSetter=e=>{var t,r,o,i;const a=null!==(o=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==o?o:e;null===(i=this.nucleon)||void 0===i||i.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:a<e?e:a}})},this.__toggleValueGetter=()=>{var e,t;return(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning)?["allow"]:[]},this.__toggleValueSetter=e=>{var t,r,o,i,a,s,n,d;e.includes("allow")?null===(t=this.nucleon)||void 0===t||t.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(i=null===(o=null===(r=this.nucleon)||void 0===r?void 0:r.form.provisioning_config)||void 0===o?void 0:o.initial_balance_min)&&void 0!==i?i:0,initial_balance_max:null!==(n=null===(s=null===(a=this.nucleon)||void 0===a?void 0:a.form.provisioning_config)||void 0===s?void 0:s.initial_balance_max)&&void 0!==n?n:0}}):null===(d=this.nucleon)||void 0===d||d.edit({provisioning_config:null})},this.__toggleOptions=[{label:"text",value:"allow"}]}renderControl(){var e,t;return i(l||(l=f` <foxy-internal-checkbox-group-control infer="toggle" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.__toggleValueGetter,this.__toggleValueSetter,this.__toggleOptions,(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning)?i(c||(c=f` <div class="grid grid-cols-2 sm-grid-cols-4 gap-m mt-s"> <foxy-internal-text-control infer="sku" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-integer-control infer="min-balance" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-balance" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> </div> `),this.__minBalanceValueGetter,this.__minBalanceValueSetter,this.__maxBalanceValueGetter,this.__maxBalanceValueSetter):"")}});const p=["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 u,_,h=e=>e;const g=r(o(e,"gift-card-form"));class v extends g{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,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:t})=>"block"===t?`-${e}`:e)).filter(((e,t,r)=>!!e&&r.indexOf(e)===t)).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:n.String},{label:"current_balance",path:"current_balance",type:n.Number},{label:"end_date",path:"end_date",type:n.Date},{label:"date_created",path:"date_created",type:n.Date},{label:"date_modified",path:"date_modified",type:n.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(t){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(t.code),e.__codesActions[0].state="end"}catch(t){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 a(a({},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 t;if(null===(t=e.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_min;return!("number"==typeof r&&r<0)||"min-balance:v8n_negative"},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_max;return!("number"==typeof r&&r<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.push("codes","category-restrictions","attributes"),new s(e.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return i(u||(u=h` <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,t,r,o,a,s,n,l;let c;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==t?t:"");r.searchParams.set("order","date_created desc"),c=r.toString()}catch(e){c=void 0}return i(_||(_=h` ${0} <div class="grid grid-cols-1 sm-grid-cols-3 md-grid-cols-4 gap-m"> <foxy-internal-text-control infer="name" class="md-col-span-2"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" infer="expires"> </foxy-internal-frequency-control> </div> <foxy-internal-gift-card-form-provisioning-control infer="provisioning"> </foxy-internal-gift-card-form-provisioning-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,p.map((e=>({label:this.t(`currency.code_${e}`),value:e}))),c,{".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"}],d(null===(o=null===(r=this.__storeLoader)||void 0===r?void 0:r.data)||void 0===o?void 0:o._links["fx:item_categories"].href),d(null===(a=this.data)||void 0===a?void 0:a._links["fx:gift_card_item_categories"].href),d(null===(s=this.data)||void 0===s?void 0:s._links.self.href),d(null===(n=this.data)||void 0===n?void 0:n._links["fx:attributes"].href),super.renderBody(),d(null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",v);export{v as GiftCardForm};
|
|
1
|
+
import"./shared-0ba38e56.js";import"./shared-cdf1e214.js";import"./shared-64faf409.js";import"./shared-ba9431a5.js";import"./shared-437a77f7.js";import"./shared-bd0a9424.js";import"./shared-c7055ee3.js";import{I as e}from"./shared-fcb58504.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"./shared-5b53b424.js";import{I as t}from"./shared-f02d1d28.js";import"./shared-5ab6d05e.js";import{R as r,a as o}from"./shared-91445b2b.js";import{h as i}from"./shared-dc73b9a5.js";import{_ as s,B as n}from"./shared-0f6e4584.js";import{T as a}from"./shared-8874ec69.js";import{i as d}from"./shared-9803aa7c.js";import"./shared-52c30c2b.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-c0ce5ed0.js";import"./shared-4f6e3162.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-928400e3.js";import"./shared-4e709717.js";import"./shared-bab2ea2c.js";import"./foxy-form-dialog.js";import"./shared-c1770155.js";import"./shared-e891437e.js";import"./shared-843229d8.js";import"./shared-bbf4189c.js";import"./shared-22ba9566.js";import"./shared-c0a292f9.js";import"./shared-8c77078c.js";import"./shared-72d815f5.js";import"./foxy-swipe-actions.js";import"./shared-45512693.js";import"./shared-1c166d01.js";import"./shared-982ea9e1.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-ca437731.js";import"./shared-7e2a1984.js";import"./shared-04327f82.js";import"./shared-f9e2e408.js";import"./shared-651c44fa.js";import"./shared-383f55a5.js";import"./shared-c92aa1b4.js";import"./foxy-copy-to-clipboard.js";import"./shared-ffbcfbc5.js";import"./shared-31276bc2.js";import"./shared-51c4a6dd.js";import"./shared-c2296e25.js";import"./shared-01b35bfe.js";import"./shared-9a4ccbbb.js";import"./shared-864584b7.js";import"./shared-494a9f3d.js";import"./shared-0059cfec.js";import"./shared-fbcfc48c.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-241b34e5.js";import"./shared-a18c7822.js";let l,c,f=e=>e;const m=r(t);customElements.define("foxy-internal-gift-card-form-provisioning-control",class extends m{constructor(){super(...arguments),this.__maxBalanceValueGetter=()=>{var e,t;return null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.initial_balance_max},this.__maxBalanceValueSetter=e=>{var t,r,o,i;const s=null!==(o=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==o?o:e;null===(i=this.nucleon)||void 0===i||i.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:s>e?e:s,initial_balance_max:e}})},this.__minBalanceValueGetter=()=>{var e,t;return null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.initial_balance_min},this.__minBalanceValueSetter=e=>{var t,r,o,i;const s=null!==(o=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==o?o:e;null===(i=this.nucleon)||void 0===i||i.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:s<e?e:s}})},this.__toggleValueGetter=()=>{var e,t;return(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning)?["allow"]:[]},this.__toggleValueSetter=e=>{var t,r,o,i,s,n,a,d;e.includes("allow")?null===(t=this.nucleon)||void 0===t||t.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(i=null===(o=null===(r=this.nucleon)||void 0===r?void 0:r.form.provisioning_config)||void 0===o?void 0:o.initial_balance_min)&&void 0!==i?i:0,initial_balance_max:null!==(a=null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.form.provisioning_config)||void 0===n?void 0:n.initial_balance_max)&&void 0!==a?a:0}}):null===(d=this.nucleon)||void 0===d||d.edit({provisioning_config:null})},this.__toggleOptions=[{label:"text",value:"allow"}]}renderControl(){var e,t;return i(l||(l=f` <foxy-internal-checkbox-group-control infer="toggle" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.__toggleValueGetter,this.__toggleValueSetter,this.__toggleOptions,(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.form.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning)?i(c||(c=f` <div class="grid grid-cols-2 sm-grid-cols-4 gap-m mt-s"> <foxy-internal-text-control infer="sku" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-integer-control infer="min-balance" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-balance" .getValue="${0}" .setValue="${0}"> </foxy-internal-integer-control> </div> `),this.__minBalanceValueGetter,this.__minBalanceValueSetter,this.__maxBalanceValueGetter,this.__maxBalanceValueSetter):"")}});const p=["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 u,_,h=e=>e;const g=r(o(e,"gift-card-form"));class v extends g{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,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:t})=>"block"===t?`-${e}`:e)).filter(((e,t,r)=>!!e&&r.indexOf(e)===t)).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:a.String},{label:"current_balance",path:"current_balance",type:a.Number},{label:"end_date",path:"end_date",type:a.Date},{label:"date_created",path:"date_created",type:a.Date},{label:"date_modified",path:"date_modified",type:a.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(t){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(t.code),e.__codesActions[0].state="end"}catch(t){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 s(s({},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 t;if(null===(t=e.provisioning_config)||void 0===t?void 0:t.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_min;return!("number"==typeof r&&r<0)||"min-balance:v8n_negative"},e=>{var t;const r=null===(t=e.provisioning_config)||void 0===t?void 0:t.initial_balance_max;return!("number"==typeof r&&r<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.push("codes","category-restrictions","attributes"),new n(e.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return i(u||(u=h` <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,t,r,o,s,n,a,l;let c;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==t?t:"");r.searchParams.set("order","date_created desc"),c=r.toString()}catch(e){c=void 0}return i(_||(_=h` ${0} <div class="grid grid-cols-1 sm-grid-cols-3 md-grid-cols-4 gap-m"> <foxy-internal-text-control infer="name" class="md-col-span-2"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" infer="expires"> </foxy-internal-frequency-control> </div> <foxy-internal-gift-card-form-provisioning-control infer="provisioning"> </foxy-internal-gift-card-form-provisioning-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,p.map((e=>({label:this.t(`currency.code_${e}`),value:e}))),c,{".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"}],d(null===(o=null===(r=this.__storeLoader)||void 0===r?void 0:r.data)||void 0===o?void 0:o._links["fx:item_categories"].href),d(null===(s=this.data)||void 0===s?void 0:s._links["fx:gift_card_item_categories"].href),d(null===(n=this.data)||void 0===n?void 0:n._links.self.href),d(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),super.renderBody(),d(null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",v);export{v as GiftCardForm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-e9bf9d3d.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-4f6e3162.js";import"./shared-928400e3.js";import"./shared-c0ce5ed0.js";import"./shared-aba112fe.js";import{_ as e}from"./shared-0f6e4584.js";import{C as t}from"./shared-0b01f721.js";import{R as s,a as r,T as i}from"./shared-91445b2b.js";import{N as a}from"./shared-24d71d01.js";import{c as n,h as o}from"./shared-dc73b9a5.js";import{c as d}from"./shared-4e709717.js";import{i as l}from"./shared-9803aa7c.js";import{r as c}from"./shared-a0c6a159.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-1c166d01.js";import"./shared-c308b7e0.js";import"./shared-aa9765b6.js";import"./shared-c92aa1b4.js";import"./shared-651c44fa.js";import"./shared-72d815f5.js";import"./shared-c286c5ad.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-f7a1193f.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-61ade33e.js";let u,h,m,p=e=>e;const f=s(r(t(i(a))));customElements.define("foxy-internal-i18n-editor-entry",class extends f{constructor(){super(...arguments),this.defaultValue=null,this.gateway=null,this.code=null}static get properties(){return e(e({},super.properties),{},{defaultValue:{attribute:"default-value"},gateway:{},code:{}})}static get styles(){return[super.styles,n(u||(u=p`:host{--button-height:1.703rem}textarea{-webkit-text-fill-color:var(--lumo-body-text-color)}vaadin-button{height:var(--button-height);--lumo-primary-color-50pct:var(--lumo-success-contrast-color)}.h-bottom-bar{height:calc(var(--button-height) + (var(--lumo-space-xs) * 2))}.h-0{height:0}`))]}render(){var e,t,s;const r=null!==(e=this.form.custom_value)&&void 0!==e?e:this.defaultValue,i=this.in({idle:"snapshot"}),a=this.in({idle:"template"}),n=this.in({idle:{snapshot:"dirty"}}),l=this.in({idle:{template:"dirty"}}),c=n||l,u=!this.in("idle")||this.disabled,f=this.readonly,v=!u&&!f,b=this.in("fail");return o(h||(h=p` <div class="${0}"> <label class="group flex flex-col sm-flex-row"> <div class="flex-1 p-xs break-all" style="max-width:20rem"> <span class="inline-block rounded text-s p-xs font-medium"> ${0} </span> </div> <div class="flex-1 flex"> <div class="relative flex-1"> <div class="opacity-0 text-s p-s font-medium break-all"> <span class="whitespace-pre-wrap">${0}​</span> </div> <textarea class="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @input="${0}">
|
|
2
2
|
</textarea> </div> ${0} </div> </label> <div class="${0}"> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="undo_button"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary success small" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="save_button"></foxy-i18n> </vaadin-button> </div> </div> `),d({"transition-all rounded ring-1 leading-s text-secondary":!0,"ring-contrast-10":!b&&(!c||f),"ring-success":!b&&c&&!f,"ring-error":b,"opacity-75":u,"hover-ring-contrast-20":!b&&!c&&v,"hover-text-body":!b&&v}),null!==(s=null===(t=this.data)||void 0===t?void 0:t.code)&&void 0!==s?s:this.code,r,d({"absolute inset-0 p-s resize-none":!0,"sm-border-l sm-border-transparent":!0,"break-all text-body transition-colors text-s font-medium":!0,"rounded-b sm-rounded-bl-none sm-rounded-tr":a&&!c,"rounded-bl sm-rounded-bl-none":i&&!c,"sm-rounded-tr":a&&c,"sm-border-contrast-10":f,"bg-contrast-10":!f,"group-hover-bg-contrast-20":v,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0}),r,u,f,(e=>{const t=e.currentTarget;this.gateway&&this.edit({gateway:this.gateway}),this.code&&this.edit({code:this.code}),this.edit({custom_value:t.value})}),i?o(m||(m=p` <button class="${0}" title="${0}" theme="contrast icon" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-xl" icon="icons:restore"></iron-icon> </button> `),d({"flex-shrink-0 w-m flex items-center justify-center":!0,"transition-colors text-tertiary ring-inset":!0,"rounded-br sm-rounded-tr":!c,"sm-rounded-tr":c,"bg-contrast-10":!f,"cursor-default":!v,"cursor-pointer":v,"group-hover-bg-contrast-20 hover-text-body":v,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0}),this.t("delete_button_title"),u||f,(()=>this.delete())):"",d({"transition-all bg-success rounded-b overflow-hidden":!0,"flex items-center justify-end gap-xs px-xs":!0,"h-bottom-bar":c&&!f,"h-0":!c||f}),!v,(()=>this.undo()),!v,(()=>this.submit()))}});let v,b,g,y,x,$,j=e=>e;const _=r(t(i(a)),"i18n-editor");class w extends _{constructor(){super(...arguments),this.languageOverrides=null,this.selectedLanguage=null,this.__selectedTabIndex=0}static get properties(){return e(e({},super.properties),{},{languageOverrides:{attribute:"language-overrides"},selectedLanguage:{attribute:"selected-language"},__selectedTabIndex:{attribute:!1}})}render(){var e,t,s;const r=this.__tabs,i=r[this.__selectedTabIndex],a=null!==(s=null===(e=this.data)||void 0===e?void 0:e.values[null!==(t=this.selectedLanguage)&&void 0!==t?t:""])&&void 0!==s?s:{},n={},u=!this.in({idle:"snapshot"});if(i)if(i.includes("_")){const e=i.substring(0,i.indexOf("_")),t=i.substring(i.indexOf("_")+1),s=a[e][t];for(const r in s)n[`${e}_${t}_${r}`]=s[r]}else for(const e in a)e.startsWith(i)&&(n[e]=a[e]);const h=this.__renderOverridesLoader(),m=h.overrides;return o(v||(v=j` ${0} <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> <vaadin-tabs selected="${0}" class="-mx-l" theme="minimal" @selected-changed="${0}"> ${0} </vaadin-tabs> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),h.template,this.in("busy"),d({"transition-opacity grid grid-cols-1 gap-s":!0,"opacity-0 pointer-events-none":u}),this.__selectedTabIndex,(e=>{var t;const s=e.currentTarget;this.__selectedTabIndex=null!==(t=s.selected)&&void 0!==t?t:0}),r.map((e=>{const t=e.substring(e.indexOf("_")+1).replace(/_/g," "),s=o(b||(b=j`<span class="capitalize">${0}</span>`),t);return o(g||(g=j`<vaadin-tab>${0}</vaadin-tab>`),s)})),c(Object.entries(n),(([e])=>e),(([e,t])=>{var s;let r,a,n;return e.startsWith("gateways_")?(r=e.substring(i.length+1),a=i.substring(9),n=m.find((e=>e.code===r&&e.gateway===a))):(r=e,a=void 0,n=m.find((e=>e.code===r))),o(y||(y=j` <foxy-internal-i18n-editor-entry default-value="${0}" gateway="${0}" parent="${0}" code="${0}" infer="" .data="${0}"> </foxy-internal-i18n-editor-entry> `),t,l(a),l(null!==(s=this.languageOverrides)&&void 0!==s?s:void 0),r,null!=n?n:null)})),d({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!u}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}get __tabs(){var e;const t=this.selectedLanguage?null===(e=this.data)||void 0===e?void 0:e.values[this.selectedLanguage]:void 0,s=Object.entries(null!=t?t:{}).reduce(((e,[t,s])=>{if("string"==typeof s){const s=t.substring(0,t.indexOf("_"));e.add(s||t)}else Object.entries(s).forEach((([s,r])=>{0!==Object.keys(r).length&&e.add(`${t}_${s}`)}));return e}),new Set);return Array.from(s)}__renderOverridesLoader(){var e;const t=Array.from(this.renderRoot.querySelectorAll("foxy-nucleon")),s=t.reduce(((e,t)=>{var s,r;return[...e,...null!==(r=null===(s=t.data)||void 0===s?void 0:s._embedded["fx:language_overrides"])&&void 0!==r?r:[]]}),[]),r=t[0],i=new Array(Math.ceil(((null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.total_items)||300)/300)).fill(0).map(((e,t)=>{var s;try{const e=new URL(null!==(s=this.languageOverrides)&&void 0!==s?s:"");return e.searchParams.set("offset",String(300*t)),e.searchParams.set("limit","300"),o(x||(x=j` <foxy-nucleon infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e.toString(),(()=>this.requestUpdate()))}catch(e){return}}));return{template:o($||($=j`<div class="hidden">${0}</div>`),i),overrides:s,loaders:t}}}customElements.define("foxy-i18n-editor",w);export{w as I18nEditor};
|
package/dist/cdn/foxy-i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{I as I18n}from"./shared-
|
|
1
|
+
export{I as I18n}from"./shared-4f6e3162.js";import"./shared-0f6e4584.js";import"./shared-dc73b9a5.js";import"./shared-91445b2b.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9a4ccbbb.js";import"./shared-4f6e3162.js";import{a as e}from"./shared-91445b2b.js";import{I as s}from"./shared-01b35bfe.js";import{c as a}from"./shared-4e709717.js";import{h as t}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";let d,r,i=e=>e;const o=e(s,"integration-card");class n extends o{renderBody(){var e;const s=this.data,o=new Date(1e3*(null!==(e=null==s?void 0:s.expires)&&void 0!==e?e:0)),n=o>new Date;return t(d||(d=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}​ </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>​</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>​</span> </div> </div> `),null==s?void 0:s.project_name,a({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==s?void 0:s.project_description)?s.project_description:t(r||(r=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==s?void 0:s.client_id,null==s?void 0:s.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-928400e3.js";import"./shared-fd17c575.js";import{I as e}from"./shared-fcb58504.js";import"./shared-c7055ee3.js";import"./shared-51c4a6dd.js";import"./foxy-copy-to-clipboard.js";import"./shared-4f6e3162.js";import{_ as r,B as t}from"./shared-0f6e4584.js";import{a as s}from"./shared-91445b2b.js";import{c as a}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-61ade33e.js";import"./shared-b938ba79.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-1c166d01.js";import"./shared-982ea9e1.js";import"./shared-f02d1d28.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-f7a1193f.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-c1770155.js";import"./shared-e891437e.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-c0ce5ed0.js";import"./shared-bab2ea2c.js";import"./shared-22ba9566.js";import"./shared-843229d8.js";import"./shared-bbf4189c.js";let i,n,d,l,c,h,p,_,m,b,f,u,y=e=>e;const j=s(e,"integration-form");class x extends j{constructor(){super(...arguments),this.__postResponse=null}static get properties(){return r(r({},super.properties),{},{__postResponse:{attribute:!1}})}static get v8n(){return[({project_name:e})=>!!e||"project-name:v8n_required"]}get hiddenSelector(){return new t(`header:copy-id ${super.hiddenSelector}`.trimEnd())}renderBody(){return this.data?this.__renderSnapshotBody():this.__renderTemplateBody()}async _fetch(...e){var r;const t=this.constructor,s=await new t.API(this).fetch(...e),a="string"==typeof e[0]?null===(r=e[1])||void 0===r?void 0:r.method:e[0].method,o="string"==typeof e[0]?e[0]:e[0].url;if(!s.ok)throw s;const i=await s.json();return"POST"===(null==a?void 0:a.toUpperCase())&&o===this.parent&&(this.__postResponse=i),i}__renderSnapshotBody(){const e=this.hiddenSelector,r=this.__postResponse;return o(i||(i=y` ${0} ${0} ${0} <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),this.renderHeader(),e.matches("message",!0)||!r?"":this.__renderMessage(),e.matches("table")?"":this.__renderTable())}__renderTemplateBody(){return o(n||(n=y` ${0} <foxy-internal-text-control infer="project-name"></foxy-internal-text-control> <foxy-internal-text-area-control infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-submit-control infer="create"></foxy-internal-submit-control> `),this.renderHeader())}__renderMessage(){return o(d||(d=y` ${0} <div class="bg-success-10 text-success p-m pb-s space-y-xs leading-s rounded-t-l rounded-b-l"> <foxy-i18n infer="message" class="block" key="text"></foxy-i18n> <vaadin-button data-testid="message-action" theme="tertiary contrast" class="p-0" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="message" key="action"></foxy-i18n> </vaadin-button> </div> ${0} `),this.renderTemplateOrSlot("message:before"),this.disabledSelector.matches("message",!0),(()=>this.__postResponse=null),this.renderTemplateOrSlot("message:after"))}__renderTable(){var e;const r=this.data,t=new Date(1e3*(null!==(e=r.expires)&&void 0!==e?e:0)),s=this.__postResponse;return o(l||(l=y` ${0} <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} </tbody> </table> ${0} `),this.renderTemplateOrSlot("table:before"),this.__renderTableRow({label:this.__renderTableI18n("added_by"),value:this.__renderMailToLink(r.added_by_email,r.added_by_name)}),this.__renderTableRow({label:this.__renderTableI18n("contact"),value:this.__renderMailToLink(r.contact_email,r.contact_name)}),this.__renderTableRow({label:this.__renderTableI18n("company"),value:this.__renderLink(r.company_url,r.company_name)}),this.__renderTableRow({label:this.__renderTableI18n("expires"),value:this.__renderTableI18n("expires_date",{date:t})}),this.__renderTableRow({label:"Client ID",value:this.__renderCopiableText(r.client_id)}),s?o(c||(c=y` ${0} ${0} ${0} `),this.__renderTableRow({highlight:!0,label:"Client secret",value:this.__renderCopiableText(s.client_secret)}),this.__renderTableRow({highlight:!0,label:"Refresh token",value:this.__renderCopiableText(s.refresh_token)}),this.__renderTableRow({highlight:!0,label:"Access token",value:this.__renderCopiableText(s.access_token)})):"",this.__renderTableRow({label:"Scope",value:o(h||(h=y`<code>${0}</code>`),r.scope)}),this.renderTemplateOrSlot("table:after"))}__renderCopiableText(e){return o(p||(p=y` <div class="flex items-center gap-s"> <code class="truncate flex-1">${0}</code> <foxy-copy-to-clipboard infer="copy-to-clipboard" class="inline-block" text="${0}"> </foxy-copy-to-clipboard> </div> `),e,e)}__renderMailToLink(e,r){return e?this.__renderLink(`mailto:${e}`,r):o(_||(_=y`${0}`),r)}__renderLink(e,r){return e?o(b||(b=y` <a target="_blank" class="font-medium text-primary rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> ${0} </a> `),e,r):o(m||(m=y`${0}`),r)}__renderTableRow(e){const{label:r,value:t,highlight:s=!1}=e;return o(f||(f=y` <tr class="${0}"> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m">${0}</td> <td class="max-w-0 truncate py-s text-body w-2-3">${0}</td> </tr> `),a({"font-medium text-success":s}),r,t)}__renderTableI18n(e,r){return o(u||(u=y`<foxy-i18n infer="table" key="${0}" .options="${0}"></foxy-i18n>`),e,r)}}customElements.define("foxy-integration-form",x);export{x as IntegrationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-61f4e91a.js";import"./foxy-nucleon-element.js";import"./shared-f1d2b5bb.js";import{_ as e}from"./shared-0f6e4584.js";import{a as t}from"./shared-075796e2.js";import{C as i}from"./shared-0b01f721.js";import{p as r}from"./shared-4c2d43e6.js";import{I as o}from"./shared-a6273e4a.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let d,l,n,c,u,_,h=e=>e;const v=i(t(o,"item-card"));class f extends v{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,v,p,m,y,x;const L=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,$=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],g=null!==(v=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==v?v:0,C=this.__currencyDisplay,H=this.__currencyCode;return s(d||(d=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} × <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} ​ </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(p=this.data)||void 0===p?void 0:p.image),(e=>{e.currentTarget.src=f.__placeholder}),(null===(m=this.data)||void 0===m?void 0:m.name)||s(l||(l=h`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),L,{amount:`${g} ${H}`,currencyDisplay:C},(null===(y=this.data)||void 0===y?void 0:y.code)||void 0,(null===(x=this.data)||void 0===x?void 0:x.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?s(n||(n=h` <span> • </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",$&&$.length>0?s(c||(c=h` <div class="mt-m"> ${0} </div> `),$.map((e=>s(u||(u=h` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?s(_||(_=h` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${H}`,signDisplay:"exceptZero",currencyDisplay:C})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}f.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",f);export{f as ItemCard};
|
|
1
|
+
import"./shared-9a4ccbbb.js";import"./foxy-nucleon-element.js";import"./shared-4f6e3162.js";import{_ as e}from"./shared-0f6e4584.js";import{a as t}from"./shared-91445b2b.js";import{C as i}from"./shared-0b01f721.js";import{p as r}from"./shared-241b34e5.js";import{I as o}from"./shared-01b35bfe.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let d,l,n,c,u,_,h=e=>e;const v=i(t(o,"item-card"));class f extends v{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,v,p,m,y,x;const L=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,$=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],g=null!==(v=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==v?v:0,C=this.__currencyDisplay,H=this.__currencyCode;return s(d||(d=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} × <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} ​ </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(p=this.data)||void 0===p?void 0:p.image),(e=>{e.currentTarget.src=f.__placeholder}),(null===(m=this.data)||void 0===m?void 0:m.name)||s(l||(l=h`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),L,{amount:`${g} ${H}`,currencyDisplay:C},(null===(y=this.data)||void 0===y?void 0:y.code)||void 0,(null===(x=this.data)||void 0===x?void 0:x.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?s(n||(n=h` <span> • </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",$&&$.length>0?s(c||(c=h` <div class="mt-m"> ${0} </div> `),$.map((e=>s(u||(u=h` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?s(_||(_=h` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${H}`,signDisplay:"exceptZero",currencyDisplay:C})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}f.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",f);export{f as ItemCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import{a as r}from"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import{a as r}from"./shared-91445b2b.js";import{T as s}from"./shared-c2296e25.js";import{h as e}from"./shared-dc73b9a5.js";import"./shared-aba112fe.js";import"./shared-f0cbc9b6.js";import"./shared-c0ce5ed0.js";import"./shared-4f6e3162.js";import"./shared-0f6e4584.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-01b35bfe.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let a,d,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(a||(a=t`${0}`),r.name),subtitle:r=>e(d||(d=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-7fd9a30f.js";import"./shared-fa9e5c7f.js";import"./shared-3fa791ca.js";import"./shared-b9138e9f.js";import"./shared-18cb3cfc.js";import"./shared-588c6b15.js";import{I as e}from"./shared-8c1df97c.js";import"./foxy-discount-builder.js";import"./foxy-nucleon-element.js";import"./foxy-tax-card.js";import{_ as t,B as i}from"./shared-0f6e4584.js";import{a as r}from"./shared-075796e2.js";import{i as n}from"./shared-9803aa7c.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-e6e84ff5.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-2d723710.js";import"./shared-4e709717.js";import"./shared-7b8ad9c1.js";import"./shared-51c4a6dd.js";import"./shared-bab2ea2c.js";import"./shared-797ba64a.js";import"./shared-10325cda.js";import"./shared-021c7a22.js";import"./shared-2099544a.js";import"./shared-2fc671cd.js";import"./shared-e5d37737.js";import"./shared-651c44fa.js";import"./shared-acdcae7e.js";import"./shared-3e03c988.js";import"./shared-fe77f6f6.js";import"./shared-b6814728.js";import"./shared-634b670e.js";import"./shared-df00a537.js";import"./shared-339bbd50.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-8438d4ca.js";import"./shared-77051754.js";import"./shared-a6273e4a.js";let o,l,s,d,m,p,_,f,c,u,h,y=e=>e;class g extends(r(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null,this.__giftRecipientEmailTemplateLoaderId="gift-recipient-email-template-loader",this.__customerEmailTemplateLoaderId="customer-email-template-loader",this.__adminEmailTemplateLoaderId="admin-email-template-loader"}static get properties(){return t(t({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative",({send_admin_email:e,admin_email:t})=>!e||!!t||"admin-email:v8n_required"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.unshift("taxes"),new i(e.join(" ").trim())}renderBody(){var e,t,i,r,s,d,m,p,_,f;const c=this.form.item_delivery_type,u=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return a(o||(o=y` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="code" class="col-span-2"></foxy-internal-text-control> <foxy-internal-select-control infer="handling-fee-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control infer="item-delivery-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="discount-name" class="col-span-2"> </foxy-internal-text-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="admin-email-template-uri" class="${0}" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="customer-email-template-uri" class="col-span-2" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="gift-recipient-email-template-uri" class="col-span-2" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="tax_uri" foreign-key-for-id="tax_id" own-key-for-uri="item_category_uri" own-uri="${0}" embed-key="fx:tax_item_categories" options-href="${0}" links-href="${0}" infer="taxes" class="col-span-2" limit="5" item="foxy-tax-card"> </foxy-internal-async-resource-link-list-control> </div> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),g.__handlingFeeTypeOptions,"none"===u?"":a(l||(l=y` ${0} ${0} ${0} `),this.__renderHandlingFee(),u.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===u?this.__renderHandlingFeeMinimum():""),g.__itemDeliveryTypeOptions,"downloaded"===c?this.__renderDownloadDeliveryControls():"flat_rate"===c?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===c?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",this.form.discount_name?this.__renderDiscountBuilder():"",n(null!==(t=this.emailTemplates)&&void 0!==t?t:void 0),this.form.send_admin_email?"":"col-span-2",null===(i=this.__adminEmailTemplateLoader)||void 0===i?void 0:i.data,(e=>{this.edit({send_admin_email:!!e.detail,admin_email:e.detail?this.form.admin_email:""})}),this.form.send_admin_email?this.__renderAdminEmail():"",n(null!==(r=this.emailTemplates)&&void 0!==r?r:void 0),null===(s=this.__customerEmailTemplateLoader)||void 0===s?void 0:s.data,(e=>this.edit({send_customer_email:!!e.detail})),n(null!==(d=this.emailTemplates)&&void 0!==d?d:void 0),null===(m=this.__giftRecipientEmailTemplateLoader)||void 0===m?void 0:m.data,n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null!==(_=this.taxes)&&void 0!==_?_:void 0),n(null===(f=this.data)||void 0===f?void 0:f._links["fx:tax_item_categories"].href),super.renderBody(),n(this.form.customer_email_template_uri||void 0),this.__customerEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.gift_recipient_email_template_uri||void 0),this.__giftRecipientEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.admin_email_template_uri||void 0),this.__adminEmailTemplateLoaderId,(()=>this.requestUpdate()))}get __giftRecipientEmailTemplateLoader(){const e=this.__giftRecipientEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __customerEmailTemplateLoader(){const e=this.__customerEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __adminEmailTemplateLoader(){const e=this.__adminEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}__renderHandlingFee(){return a(s||(s=y` <foxy-internal-number-control infer="handling-fee" class="${0}"> </foxy-internal-number-control> `),"flat_percent"===this.form.handling_fee_type?"":"col-span-2")}__renderHandlingFeePercentage(){return a(d||(d=y` <foxy-internal-number-control infer="handling-fee-percentage"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return a(m||(m=y` <foxy-internal-number-control infer="handling-fee-minimum"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return a(p||(p=y` <foxy-internal-integer-control infer="max-downloads-per-customer"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-downloads-time-period"> </foxy-internal-integer-control> `))}__renderFlatRateControls(){return a(_||(_=y` <foxy-internal-number-control infer="shipping-flat-rate"> </foxy-internal-number-control> <foxy-internal-select-control infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),g.__shippingFlatRateTypeOptions)}__renderShippingControls(){return a(f||(f=y` <foxy-internal-integer-control infer="default-weight" class="col-span-2"> </foxy-internal-integer-control> <foxy-internal-select-control infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),g.__defaultWeightUnitOptions,g.__defaultLengthUnitOptions)}__renderCustomsValue(){return a(c||(c=y` <foxy-internal-number-control infer="customs-value" class="col-span-2"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const i={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return a(u||(u=y` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),i,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}__renderAdminEmail(){return a(h||(h=y`<foxy-internal-text-control infer="admin-email"> </foxy-internal-text-control>`))}}g.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],g.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],g.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],g.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],g.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",g);export{g as ItemCategoryForm};
|
|
1
|
+
import"./shared-0ba38e56.js";import"./shared-864584b7.js";import"./shared-525fa58a.js";import"./shared-ffbcfbc5.js";import"./shared-bd0a9424.js";import"./shared-c7055ee3.js";import{I as e}from"./shared-fcb58504.js";import"./foxy-email-template-card.js";import"./foxy-discount-builder.js";import"./foxy-tax-card.js";import"./shared-4f6e3162.js";import{_ as t,B as r}from"./shared-0f6e4584.js";import{a as n}from"./shared-91445b2b.js";import{i}from"./shared-9803aa7c.js";import{h as o,s as a}from"./shared-dc73b9a5.js";import"./shared-52c30c2b.js";import"./shared-5e463387.js";import"./shared-f0cbc9b6.js";import"./shared-c308b7e0.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-aba112fe.js";import"./shared-c0ce5ed0.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-928400e3.js";import"./shared-4e709717.js";import"./shared-f02d1d28.js";import"./shared-51c4a6dd.js";import"./shared-bab2ea2c.js";import"./shared-ba9431a5.js";import"./shared-c0a292f9.js";import"./shared-8c77078c.js";import"./shared-72d815f5.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-c1770155.js";import"./shared-e891437e.js";import"./shared-45512693.js";import"./shared-1c166d01.js";import"./shared-982ea9e1.js";import"./shared-fe167efc.js";import"./shared-8e81d32d.js";import"./shared-04327f82.js";import"./shared-f9e2e408.js";import"./shared-651c44fa.js";import"./shared-383f55a5.js";import"./shared-c92aa1b4.js";import"./shared-22ba9566.js";import"./foxy-copy-to-clipboard.js";import"./shared-843229d8.js";import"./shared-bbf4189c.js";import"./shared-c2296e25.js";import"./shared-01b35bfe.js";import"./shared-8438d4ca.js";let l,s,m,d,p,u,f,_,c,y,h,g=e=>e;class x extends(n(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null}static get properties(){return t(t({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative"]}get readonlySelector(){var e;const t=[super.readonlySelector.toString()];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("code","name"),new r(t.join(" ").trim())}get hiddenSelector(){var e;const t=[super.hiddenSelector.toString()];return this.data||t.unshift("taxes"),"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.unshift("delete"),new r(t.join(" ").trim())}renderBody(){var e,t,r,n,d;const p=this.form.item_delivery_type,u=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return o(l||(l=g` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control infer="name" layout="summary-item"></foxy-internal-text-control> <foxy-internal-text-control infer="code" layout="summary-item"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="tax_uri" foreign-key-for-id="tax_id" own-key-for-uri="item_category_uri" options-href="${0}" links-href="${0}" embed-key="fx:tax_item_categories" own-uri="${0}" infer="taxes" limit="5" item="foxy-tax-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-summary-control infer="delivery"> <foxy-internal-select-control layout="summary-item" infer="item-delivery-type" .options="${0}"> </foxy-internal-select-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="handling-and-discount"> <foxy-internal-select-control layout="summary-item" infer="handling-fee-type" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control layout="summary-item" infer="discount-name"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="emails"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="gift-recipient-email-template-uri" item="foxy-email-template-card"> </foxy-internal-resource-picker-control> <div class="flex items-start" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="wip_message"></foxy-i18n> <br> <a target="_blank" class="mt-xs inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://admin.foxycart.com"> admin.foxycart.com </a> </p> </div> </foxy-internal-summary-control> ${0} `),this.renderHeader(),i(null!==(t=this.taxes)&&void 0!==t?t:void 0),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:tax_item_categories"].href),i(null===(n=this.data)||void 0===n?void 0:n._links.self.href),x.__itemDeliveryTypeOptions,"downloaded"===p?this.__renderDownloadDeliveryControls():"flat_rate"===p?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===p?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",x.__handlingFeeTypeOptions,"none"===u?"":o(s||(s=g` ${0} ${0} ${0} `),this.__renderHandlingFee(),u.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===u?this.__renderHandlingFeeMinimum():""),this.form.discount_name?this.__renderDiscountBuilder():"",i(null!==(d=this.emailTemplates)&&void 0!==d?d:void 0),a(m||(m=g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),super.renderBody())}__renderHandlingFee(){return o(d||(d=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeePercentage(){return o(p||(p=g` <foxy-internal-number-control layout="summary-item" suffix="%" infer="handling-fee-percentage" min="0"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(u||(u=g` <foxy-internal-number-control layout="summary-item" infer="handling-fee-minimum" min="0"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(f||(f=g` <foxy-internal-number-control layout="summary-item" infer="max-downloads-per-customer" step="1" min="0"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" infer="max-downloads-time-period" step="1" min="0"> </foxy-internal-number-control> `))}__renderFlatRateControls(){return o(_||(_=g` <foxy-internal-number-control layout="summary-item" infer="shipping-flat-rate" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),x.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(c||(c=g` <foxy-internal-number-control layout="summary-item" infer="default-weight" min="0"> </foxy-internal-number-control> <foxy-internal-select-control layout="summary-item" infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control layout="summary-item" infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),x.__defaultWeightUnitOptions,x.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(y||(y=g` <foxy-internal-number-control layout="summary-item" infer="customs-value" min="0"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const r={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(h||(h=g` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),r,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}}x.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],x.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],x.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],x.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],x.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",x);export{x as ItemCategoryForm};
|