@foxy.io/elements 1.45.0-beta.2 → 1.45.0-beta.3
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-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-experimental-add-to-cart-builder.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-subscriptions-table.js +1 -1
- package/dist/cdn/{shared-8ba28691.js → shared-461a25ae.js} +1 -1
- package/dist/cdn/shared-96e4f603.js +1 -0
- package/dist/cdn/translations/admin-subscription-form/en.json +2 -2
- package/dist/cdn/translations/cart-form/en.json +2 -2
- package/dist/cdn/translations/coupon-card/en.json +8 -8
- package/dist/cdn/translations/coupon-form/en.json +10 -10
- package/dist/cdn/translations/discount-builder/en.json +2 -2
- package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +3 -3
- package/dist/cdn/translations/item-category-form/en.json +2 -2
- package/dist/cdn/translations/item-form/en.json +2 -2
- package/dist/cdn/translations/transaction/en.json +2 -2
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +36 -33
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
- package/dist/utils/get-subscription-status.js +1 -1
- package/dist/utils/get-subscription-status.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-ada5e9f5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-9585cf5b.js";import"./foxy-nucleon-element.js";import"./shared-64210e53.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-
|
|
1
|
+
import"./shared-9585cf5b.js";import"./foxy-nucleon-element.js";import"./shared-64210e53.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-96e4f603.js";import{a as r}from"./shared-387d7254.js";import{C as s}from"./shared-c782b9fa.js";import{p as o}from"./shared-47269bb6.js";import{I as i}from"./shared-ba0d1f31.js";import{i as a}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let n,l,_,u,c,m,f,h=e=>e;const p=s(r(i,"admin-subscription-card"));class v extends p{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__customerLoaderId="customerLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__customer,r=this.__transactionTemplate,s=this.__priceKey,o=this.__priceOptions,i=this.__summaryOptions,p=this.__summaryKey,v=t(this.data);return d(n||(n=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="text-left leading-s text-tertiary"> <div class="flex items-center space-x-s"> <span class="block flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s"> ${0} </span> </div> <div class="truncate text-s ${0}"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} ${0} (${0}) </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()),a(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),i&&p?d(l||(l=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),p,i):d(_||(_=h`​`)),o&&s?d(u||(u=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,o):d(c||(c=h`​`)),"failed"===v?"text-error":"text-secondary",this.data&&v?d(m||(m=h`<foxy-i18n infer="" key="status_${0}" .options="${0}"></foxy-i18n>`),v,this.data):d(f||(f=h`​`)),null==e?void 0:e.first_name,null==e?void 0:e.last_name,null==r?void 0:r.customer_email)}get isBodyReady(){return super.isBodyReady&&!!this.__items&&!!this.__currencyCode&&!!this.__currencyDisplay&&!!this.__customer}get __transactionTemplateHref(){var e,t;const r=this.data;if(!r)return;if("_embedded"in r&&"fx:transaction_template"in r._embedded)return;const s=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction_template"].href)&&void 0!==t?t:"");return s.searchParams.set("zoom","items"),s.toString()}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){const e=this.__transactionTemplate;if(!(null==e?void 0:e.currency_code))return(null==e?void 0:e.template_set_uri)||void 0}get __customerHref(){var e,t,r,s;if(!("fx:customer"in(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})))return null===(s=null===(r=this.data)||void 0===r?void 0:r._links["fx:customer"])||void 0===s?void 0:s.href}get __itemsHref(){const e=this.__transactionTemplate;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:transaction_template"in r._embedded)return r._embedded["fx:transaction_template"];{const r=`#${this.__transactionTemplateLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __customer(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:customer"in r._embedded)return r._embedded["fx:customer"];{const r=`#${this.__customerLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __items(){const e=this.__transactionTemplate;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);return(null==t?void 0:t.data)?{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __summaryOptions(){var e;const{array:t,count:r}=null!==(e=this.__items)&&void 0!==e?e:{};if(t&&r)return{firstItem:t[0],count:r,countMinus1:r-1}}get __summaryKey(){const e=this.__items;if(e)return e.isApproximateCount?"summary_approximate":"summary"}get __currencyCode(){var e,t,r;const s=this.__transactionTemplate;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,o=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,i=o?null==s?void 0:s.values[o]:void 0;if(i)return null===(r=/Currency: ([A-Z]{3})/g.exec(i))||void 0===r?void 0:r[1]}}get __priceOptions(){var t,r;const s=this.__currencyDisplay;if(void 0===s)return;const i=this.__currencyCode;if(void 0===i)return;const a=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===a)return;const d=null===(r=this.data)||void 0===r?void 0:r.frequency;return void 0!==d?e(e({},o(d)),{},{amount:`${a} ${i}`,currencyDisplay:s}):void 0}get __priceKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.frequency;if(t)return"price_"+(".5m"===t?"twice_a_month":"recurring")}}customElements.define("foxy-admin-subscription-card",v);export{v as AdminSubscriptionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-transaction.js";import"./shared-df92d411.js";import"./shared-ada2d315.js";import"./shared-0b3dbac6.js";import"./shared-4f36f302.js";import{I as e}from"./shared-4e4766ee.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-24998349.js";import"./shared-25a9d87d.js";import{a as t}from"./shared-92c211bd.js";import"./foxy-form-dialog.js";import"./shared-64210e53.js";import"./shared-b148b310.js";import"./shared-bc89d3fb.js";import{B as r,_ as a}from"./shared-7fec42f2.js";import{s as o}from"./shared-2061be9a.js";import{p as s}from"./shared-f0fa0a88.js";import{h as i,s as n}from"./shared-ba5c42c7.js";import{i as d}from"./shared-53e42a77.js";import"./foxy-copy-to-clipboard.js";import{R as l,a as c}from"./shared-387d7254.js";import{g as m}from"./shared-ada5e9f5.js";import"./foxy-billing-address-card.js";import"./shared-9585cf5b.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-ba0d1f31.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./foxy-custom-field-form.js";import"./shared-adfed461.js";import"./shared-297155d9.js";import"./shared-a6cf5b1f.js";import"./shared-46efbc40.js";import"./shared-dc357e9d.js";import"./shared-7933d898.js";import"./shared-5fd5805c.js";import"./foxy-custom-field-card.js";import"./shared-5212ef4f.js";import"./shared-1b04321a.js";import"./shared-c782b9fa.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-12973e93.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./shared-bab2ea2c.js";import"./foxy-webhook-form.js";import"./shared-d674d2ce.js";import"./shared-1d03ea56.js";import"./shared-db758d3b.js";import"./shared-ac44a3a5.js";import"./shared-ab9dfa48.js";import"./shared-52053d0d.js";import"./shared-1d6ed748.js";import"./shared-ed24a3f9.js";import"./shared-8ba4b5bf.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-c3d1d247.js";import"./shared-e275989e.js";import"./foxy-item-card.js";import"./shared-47269bb6.js";import"./foxy-item-form.js";import"./shared-b7401886.js";import"./shared-53e476fd.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-5574ea83.js";import"./shared-caac6517.js";import"./shared-0d01cd66.js";import"./shared-2d6478b0.js";import"./shared-7fa24559.js";import"./shared-05e997ae.js";let f,h,u,p,x,y,v,_,g,b,j,w=e=>e;customElements.define("foxy-internal-admin-subscription-form-status-action-form",class extends e{constructor(){super(...arguments),this.__endDatePresetOptions=JSON.stringify([{value:"tomorrow",label:"option_tomorrow"},{value:"next_transaction_date",label:"option_next_transaction_date"},{value:"custom_date",label:"option_custom_date"}]),this.__endDatePresetGetValue=()=>{var e;return null!==(e=this.form.end_date_preset)&&void 0!==e?e:"next_transaction_date"},this.__endDatePresetSetValue=e=>{if(this.edit({end_date_preset:e}),"tomorrow"===e){const e=new Date;e.setDate(e.getDate()+1),e.setHours(0,0,0,0),this.edit({end_date:o(e)})}else"next_transaction_date"===e?this.edit({end_date:this.form.next_transaction_date}):this.edit({end_date:""})},this.__endDateGetValue=()=>this.form.end_date_preset?this.form.end_date:this.form.next_transaction_date,this.__nextTransactionDateGetValue=()=>{const e=new Date;e.setDate(e.getDate()+1),e.setHours(0,0,0,0);const t=o(e);if(!this.form.next_transaction_date)return t;const r=s(this.form.next_transaction_date.substring(0,10));return!r||r<e?t:this.form.next_transaction_date}}static get v8n(){return[({next_transaction_date:e,end_date:t},r)=>{var a;if(null===(a=r.data)||void 0===a?void 0:a.is_active){if(!t||"0000-00-00"===t)return"end-date:v8n_required"}else if(!e)return"next-transaction-date:v8n_required";return!0}]}get readonlySelector(){const e=[super.readonlySelector.toString()];return"custom_date"!==this.form.end_date_preset&&e.push("end-date"),new r(e.join(" ").trim())}renderBody(){var e;const t=new Date;t.setDate(t.getDate()+1),t.setHours(0,0,0,0);const r=!!(null===(e=this.data)||void 0===e?void 0:e.is_active),a=r?"cancel":"reactivate",s=r?"bg-error-10":"bg-success-10",d=n(r?f||(f=w`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z" /></svg>`):h||(h=w`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>`));return i(u||(u=w` <foxy-internal-summary-control infer="" label="" helper-text=""> <div class="text-center flex flex-col items-center bg-transparent"> <div class="rounded-full ${0} p-m mb-s mx-auto">${0}</div> <p class="font-medium text-xl leading-m"> <foxy-i18n infer="" key="${0}_title"></foxy-i18n> </p> <p class="text-secondary leading-s"> <foxy-i18n infer="" key="${0}_subtitle"></foxy-i18n> </p> </div> </foxy-internal-summary-control> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} </foxy-internal-summary-control> <vaadin-button theme="primary ${0} large" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}_submit"></foxy-i18n> </vaadin-button> `),s,d,a,a,r?i(p||(p=w` <foxy-internal-select-control options="${0}" layout="summary-item" infer="end-date-preset" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-date-control layout="summary-item" infer="end-date" min="${0}" hide-clear-button .getValue="${0}"> </foxy-internal-date-control> `),this.__endDatePresetOptions,this.__endDatePresetGetValue,this.__endDatePresetSetValue,o(t),this.__endDateGetValue):i(x||(x=w` <foxy-internal-date-control layout="summary-item" infer="next-transaction-date" min="${0}" hide-clear-button .getValue="${0}"> </foxy-internal-date-control> `),o(t),this.__nextTransactionDateGetValue),r?[this.__renderFaq("cancel_why_not_today",n(y||(y=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V12ZM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H6ZM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75V12ZM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H8ZM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V10ZM10 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H10ZM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V14ZM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75H12ZM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75V12ZM12 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H12ZM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75V10ZM14 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H14Z" /><path fill-rule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clip-rule="evenodd" /></svg>`))),this.__renderFaq("cancel_whats_next",n(v||(v=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M3.288 4.818A1.5 1.5 0 0 0 1 6.095v7.81a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905c.155-.096.285-.213.389-.344v2.973a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905a1.5 1.5 0 0 0 0-2.552l-6.323-3.906A1.5 1.5 0 0 0 10 6.095v2.972a1.506 1.506 0 0 0-.389-.343L3.288 4.818Z" /></svg>`))),this.__renderFaq("cancel_how_to_reactivate",n(_||(_=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M6.111 11.89A5.5 5.5 0 1 1 15.501 8 .75.75 0 0 0 17 8a7 7 0 1 0-11.95 4.95.75.75 0 0 0 1.06-1.06Z" /><path d="M8.232 6.232a2.5 2.5 0 0 0 0 3.536.75.75 0 1 1-1.06 1.06A4 4 0 1 1 14 8a.75.75 0 0 1-1.5 0 2.5 2.5 0 0 0-4.268-1.768Z" /><path d="M10.766 7.51a.75.75 0 0 0-1.37.365l-.492 6.861a.75.75 0 0 0 1.204.65l1.043-.799.985 3.678a.75.75 0 0 0 1.45-.388l-.978-3.646 1.292.204a.75.75 0 0 0 .74-1.16l-3.874-5.764Z" /></svg>`)))]:[this.__renderFaq("reactivate_why_not_today",n(g||(g=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-success flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V12ZM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H6ZM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75V12ZM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H8ZM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V10ZM10 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H10ZM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V14ZM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75H12ZM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75V12ZM12 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H12ZM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75V10ZM14 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H14Z" /><path fill-rule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clip-rule="evenodd" /></svg>`))),this.__renderFaq("reactivate_whats_next",n(b||(b=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-success flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M3.288 4.818A1.5 1.5 0 0 0 1 6.095v7.81a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905c.155-.096.285-.213.389-.344v2.973a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905a1.5 1.5 0 0 0 0-2.552l-6.323-3.906A1.5 1.5 0 0 0 10 6.095v2.972a1.506 1.506 0 0 0-.389-.343L3.288 4.818Z" /></svg>`)))],r?"error":"success",this.disabled,(()=>this.submit()),a)}submit(){var e;(null===(e=this.data)||void 0===e?void 0:e.is_active)?"next_transaction_date"===this.__endDatePresetGetValue()&&this.edit({end_date:this.form.next_transaction_date}):this.edit({next_transaction_date:this.__nextTransactionDateGetValue(),is_active:!0,end_date:"0000-00-00"}),super.submit()}async _sendPatch(e){return delete e.end_date_preset,super._sendPatch(e)}__renderFaq(e,t){return i(j||(j=w` <div class="bg-transparent flex leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p class="grid"> <foxy-i18n class="leading-m text-s font-medium" infer="" key="${0}_title"> </foxy-i18n> <foxy-i18n class="leading-xs text-secondary text-xs" infer="" key="${0}_text"> </foxy-i18n> </p> </div> `),t,e,e)}});let k,$,V,M=e=>e;customElements.define("foxy-internal-admin-subscription-form-status-action",class extends t{get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("form:save-button"),new r(e.join(" ").trim())}renderControl(){var e,t;const r=this.nucleon,a=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.end_date,o=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.is_active,s=!o||!a||"0000-00-00"===a;return i(k||(k=M` <vaadin-button theme="tertiary-inline${0}" @click="${0}"> <foxy-i18n infer="" key="caption_${0}"></foxy-i18n> </vaadin-button> ${0} `),s?o?" error":" success":"",(e=>{var t;const r=e.currentTarget;null===(t=this.renderRoot.querySelector("#dialog"))||void 0===t||t.show(r)}),o?a&&"0000-00-00"!==a?"uncancel":"cancel":"reactivate",s?i($||($=M` <foxy-form-dialog infer="form" form="foxy-internal-admin-subscription-form-status-action-form" href="${0}" no-confirm-when-dirty close-on-patch alert id="dialog"> </foxy-form-dialog> `),d(null==r?void 0:r.href)):i(V||(V=M` <foxy-internal-confirm-dialog message="uncancel_message" confirm="uncancel_confirm" cancel="uncancel_cancel" header="uncancel_header" infer="" id="dialog" @hide="${0}"> </foxy-internal-confirm-dialog> `),(e=>{var t,r;e.detail.cancelled||(null===(t=this.nucleon)||void 0===t||t.edit({end_date:"0000-00-00"}),null===(r=this.nucleon)||void 0===r||r.submit())})))}});let Z,H=e=>e;class S extends(l(t)){constructor(){super(...arguments),this.search=null}static get properties(){return a(a({},super.properties),{},{search:{}})}renderControl(){var e,t;const r=this.nucleon;let a;try{const o=new URL(null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:sub_token_url"].href)&&void 0!==t?t:"");if(this.search){const e=new URLSearchParams(o.search);o.search=this.search,e.forEach(((e,t)=>o.searchParams.set(t,e)))}a=o.toString()}catch(e){a=void 0}return i(Z||(Z=H` <div class="leading-xs flex items-center gap-xs"> <foxy-i18n class="truncate min-w-0" infer="" key="label"></foxy-i18n> <span class="text-tertiary"> • </span> <foxy-copy-to-clipboard layout="complete" theme="tertiary-inline" infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="leading-xs block text-xs text-secondary" infer="" key="helper_text"> </foxy-i18n> `),a)}}customElements.define("foxy-internal-admin-subscription-form-link-control",S);let A,D,P=e=>e;customElements.define("foxy-internal-admin-subscription-form-error",class extends t{renderControl(){var e,t;return i(A||(A=P` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),n(D||(D=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.error_message)}});let B,C,q,G,E,F,z,L=e=>e;const O=c(e,"admin-subscription-form");class R extends O{constructor(){super(...arguments),this.uoeSettingsPage=null}static get properties(){return a(a({},super.properties),{},{uoeSettingsPage:{attribute:"uoe-settings-page"}})}get hiddenSelector(){const e=["delete",super.hiddenSelector.toString()],t=this.data;return(null==t?void 0:t.error_message)&&t.past_due_amount||e.unshift("error-message"),new r(e.join(" ").trim())}get headerSubtitleKey(){const e=m(this.data);return e?`subtitle_${e}`:super.headerSubtitleKey}renderHeaderActions(){return i(B||(B=L` <foxy-internal-admin-subscription-form-status-action infer="status-action"> </foxy-internal-admin-subscription-form-status-action> `))}renderBody(){var e,t,r,a,o,s,l,c,m;let f;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transactions"].href)&&void 0!==t?t:"");r.searchParams.set("zoom","items"),f=r.toString()}catch(e){f=void 0}const h=null===(a=null===(r=this.data)||void 0===r?void 0:r._links["fx:charge_past_due"])||void 0===a?void 0:a.href,u=null===(o=this.data)||void 0===o?void 0:o.past_due_amount,p=null===(s=this.data)||void 0===s?void 0:s.error_message,x=null===(l=this.data)||void 0===l?void 0:l._embedded["fx:transaction_template"].currency_code;return i(C||(C=L` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="self-service-links"> <foxy-internal-admin-subscription-form-link-control infer="load-in-cart"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="cart=checkout" infer="load-on-checkout"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=next_transaction_date" infer="cancel-at-end-of-billing-period"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=true" infer="cancel-next-day"> </foxy-internal-admin-subscription-form-link-control> <div class="flex items-start leading-xs text-xs text-secondary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="uoe_hint_text"></foxy-i18n> ${0} </p> </div> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),d(x),h&&x&&u?i(q||(q=L` <foxy-internal-post-action-control message-options="${0}" theme="tertiary-inline" infer="charge-past-due" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),JSON.stringify({amount:`${u} ${x}`}),h,(()=>this.refresh())):p&&!u?i(G||(G=L` <details class="leading-xs text-xs text-secondary rounded-b focus-within-ring-2 focus-within-ring-inset focus-within-ring-primary-50" style="--gap:calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"> <summary class="cursor-pointer transition-colors hover-text-body focus-outline-none"> <span class="flex items-start" style="gap:var(--gap)"> ${0} <foxy-i18n infer="" key="error_with_zero_past_due_hint"></foxy-i18n> </span> </summary> <p style="padding-left:calc(1.25em + var(--gap))" class="pt-xs"> <span class="whitespace-pre-line">${0}</span> </p> </details> `),n(E||(E=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),p):"",n(F||(F=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),this.uoeSettingsPage?i(z||(z=L` <a target="_blank" class="inline-block rounded font-medium text-body cursor-pointer hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="uoe_link_text"></foxy-i18n> </a> `),this.uoeSettingsPage):"",this.renderTemplateOrSlot(),d(null===(m=null===(c=this.data)||void 0===c?void 0:c._links)||void 0===m?void 0:m["fx:attributes"].href),d(f),super.renderBody())}}customElements.define("foxy-admin-subscription-form",R);export{R as AdminSubscriptionForm};
|
|
1
|
+
import"./foxy-transaction.js";import"./shared-df92d411.js";import"./shared-ada2d315.js";import"./shared-0b3dbac6.js";import"./shared-4f36f302.js";import{I as e}from"./shared-4e4766ee.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-24998349.js";import"./shared-25a9d87d.js";import{a as t}from"./shared-92c211bd.js";import"./foxy-form-dialog.js";import"./shared-64210e53.js";import"./shared-b148b310.js";import"./shared-bc89d3fb.js";import{B as r,_ as a}from"./shared-7fec42f2.js";import{s as o}from"./shared-2061be9a.js";import{p as s}from"./shared-f0fa0a88.js";import{h as i,s as n}from"./shared-ba5c42c7.js";import{i as d}from"./shared-53e42a77.js";import"./foxy-copy-to-clipboard.js";import{R as l,a as c}from"./shared-387d7254.js";import{g as m}from"./shared-96e4f603.js";import"./foxy-billing-address-card.js";import"./shared-9585cf5b.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-ba0d1f31.js";import"./shared-69074dae.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./foxy-custom-field-form.js";import"./shared-adfed461.js";import"./shared-297155d9.js";import"./shared-a6cf5b1f.js";import"./shared-46efbc40.js";import"./shared-dc357e9d.js";import"./shared-7933d898.js";import"./shared-5fd5805c.js";import"./foxy-custom-field-card.js";import"./shared-5212ef4f.js";import"./shared-1b04321a.js";import"./shared-c782b9fa.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-12973e93.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./shared-bab2ea2c.js";import"./foxy-webhook-form.js";import"./shared-d674d2ce.js";import"./shared-1d03ea56.js";import"./shared-db758d3b.js";import"./shared-ac44a3a5.js";import"./shared-ab9dfa48.js";import"./shared-52053d0d.js";import"./shared-1d6ed748.js";import"./shared-ed24a3f9.js";import"./shared-8ba4b5bf.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-c3d1d247.js";import"./shared-e275989e.js";import"./foxy-item-card.js";import"./shared-47269bb6.js";import"./foxy-item-form.js";import"./shared-b7401886.js";import"./shared-53e476fd.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-5574ea83.js";import"./shared-caac6517.js";import"./shared-0d01cd66.js";import"./shared-2d6478b0.js";import"./shared-7fa24559.js";import"./shared-05e997ae.js";let f,h,u,p,x,y,v,_,g,b,j,w=e=>e;customElements.define("foxy-internal-admin-subscription-form-status-action-form",class extends e{constructor(){super(...arguments),this.__endDatePresetOptions=JSON.stringify([{value:"tomorrow",label:"option_tomorrow"},{value:"next_transaction_date",label:"option_next_transaction_date"},{value:"custom_date",label:"option_custom_date"}]),this.__endDatePresetGetValue=()=>{var e;return null!==(e=this.form.end_date_preset)&&void 0!==e?e:"next_transaction_date"},this.__endDatePresetSetValue=e=>{if(this.edit({end_date_preset:e}),"tomorrow"===e){const e=new Date;e.setDate(e.getDate()+1),e.setHours(0,0,0,0),this.edit({end_date:o(e)})}else"next_transaction_date"===e?this.edit({end_date:this.form.next_transaction_date}):this.edit({end_date:""})},this.__endDateGetValue=()=>this.form.end_date_preset?this.form.end_date:this.form.next_transaction_date,this.__nextTransactionDateGetValue=()=>{const e=new Date;e.setDate(e.getDate()+1),e.setHours(0,0,0,0);const t=o(e);if(!this.form.next_transaction_date)return t;const r=s(this.form.next_transaction_date.substring(0,10));return!r||r<e?t:this.form.next_transaction_date}}static get v8n(){return[({next_transaction_date:e,end_date:t},r)=>{var a;if(null===(a=r.data)||void 0===a?void 0:a.is_active){if(!t||"0000-00-00"===t)return"end-date:v8n_required"}else if(!e)return"next-transaction-date:v8n_required";return!0}]}get readonlySelector(){const e=[super.readonlySelector.toString()];return"custom_date"!==this.form.end_date_preset&&e.push("end-date"),new r(e.join(" ").trim())}renderBody(){var e;const t=new Date;t.setDate(t.getDate()+1),t.setHours(0,0,0,0);const r=!!(null===(e=this.data)||void 0===e?void 0:e.is_active),a=r?"cancel":"reactivate",s=r?"bg-error-10":"bg-success-10",d=n(r?f||(f=w`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z" /></svg>`):h||(h=w`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>`));return i(u||(u=w` <foxy-internal-summary-control infer="" label="" helper-text=""> <div class="text-center flex flex-col items-center bg-transparent"> <div class="rounded-full ${0} p-m mb-s mx-auto">${0}</div> <p class="font-medium text-xl leading-m"> <foxy-i18n infer="" key="${0}_title"></foxy-i18n> </p> <p class="text-secondary leading-s"> <foxy-i18n infer="" key="${0}_subtitle"></foxy-i18n> </p> </div> </foxy-internal-summary-control> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} </foxy-internal-summary-control> <vaadin-button theme="primary ${0} large" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}_submit"></foxy-i18n> </vaadin-button> `),s,d,a,a,r?i(p||(p=w` <foxy-internal-select-control options="${0}" layout="summary-item" infer="end-date-preset" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-date-control layout="summary-item" infer="end-date" min="${0}" hide-clear-button .getValue="${0}"> </foxy-internal-date-control> `),this.__endDatePresetOptions,this.__endDatePresetGetValue,this.__endDatePresetSetValue,o(t),this.__endDateGetValue):i(x||(x=w` <foxy-internal-date-control layout="summary-item" infer="next-transaction-date" min="${0}" hide-clear-button .getValue="${0}"> </foxy-internal-date-control> `),o(t),this.__nextTransactionDateGetValue),r?[this.__renderFaq("cancel_why_not_today",n(y||(y=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V12ZM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H6ZM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75V12ZM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H8ZM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V10ZM10 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H10ZM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V14ZM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75H12ZM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75V12ZM12 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H12ZM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75V10ZM14 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H14Z" /><path fill-rule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clip-rule="evenodd" /></svg>`))),this.__renderFaq("cancel_whats_next",n(v||(v=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M3.288 4.818A1.5 1.5 0 0 0 1 6.095v7.81a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905c.155-.096.285-.213.389-.344v2.973a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905a1.5 1.5 0 0 0 0-2.552l-6.323-3.906A1.5 1.5 0 0 0 10 6.095v2.972a1.506 1.506 0 0 0-.389-.343L3.288 4.818Z" /></svg>`))),this.__renderFaq("cancel_how_to_reactivate",n(_||(_=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-error flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M6.111 11.89A5.5 5.5 0 1 1 15.501 8 .75.75 0 0 0 17 8a7 7 0 1 0-11.95 4.95.75.75 0 0 0 1.06-1.06Z" /><path d="M8.232 6.232a2.5 2.5 0 0 0 0 3.536.75.75 0 1 1-1.06 1.06A4 4 0 1 1 14 8a.75.75 0 0 1-1.5 0 2.5 2.5 0 0 0-4.268-1.768Z" /><path d="M10.766 7.51a.75.75 0 0 0-1.37.365l-.492 6.861a.75.75 0 0 0 1.204.65l1.043-.799.985 3.678a.75.75 0 0 0 1.45-.388l-.978-3.646 1.292.204a.75.75 0 0 0 .74-1.16l-3.874-5.764Z" /></svg>`)))]:[this.__renderFaq("reactivate_why_not_today",n(g||(g=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-success flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V12ZM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H6ZM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75V12ZM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H8ZM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V10ZM10 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H10ZM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75V14ZM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75H12ZM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75V12ZM12 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75H12ZM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75V10ZM14 11.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75H14Z" /><path fill-rule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clip-rule="evenodd" /></svg>`))),this.__renderFaq("reactivate_whats_next",n(b||(b=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="text-success flex-shrink-0" style="width: 1.25em; height: 1.25em;"><path d="M3.288 4.818A1.5 1.5 0 0 0 1 6.095v7.81a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905c.155-.096.285-.213.389-.344v2.973a1.5 1.5 0 0 0 2.288 1.276l6.323-3.905a1.5 1.5 0 0 0 0-2.552l-6.323-3.906A1.5 1.5 0 0 0 10 6.095v2.972a1.506 1.506 0 0 0-.389-.343L3.288 4.818Z" /></svg>`)))],r?"error":"success",this.disabled,(()=>this.submit()),a)}submit(){var e;(null===(e=this.data)||void 0===e?void 0:e.is_active)?"next_transaction_date"===this.__endDatePresetGetValue()&&this.edit({end_date:this.form.next_transaction_date}):this.edit({next_transaction_date:this.__nextTransactionDateGetValue(),is_active:!0,end_date:"0000-00-00"}),super.submit()}async _sendPatch(e){return delete e.end_date_preset,super._sendPatch(e)}__renderFaq(e,t){return i(j||(j=w` <div class="bg-transparent flex leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p class="grid"> <foxy-i18n class="leading-m text-s font-medium" infer="" key="${0}_title"> </foxy-i18n> <foxy-i18n class="leading-xs text-secondary text-xs" infer="" key="${0}_text"> </foxy-i18n> </p> </div> `),t,e,e)}});let k,$,V,M=e=>e;customElements.define("foxy-internal-admin-subscription-form-status-action",class extends t{get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("form:save-button"),new r(e.join(" ").trim())}renderControl(){var e,t;const r=this.nucleon,a=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.end_date,o=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.is_active,s=!o||!a||"0000-00-00"===a;return i(k||(k=M` <vaadin-button theme="tertiary-inline${0}" @click="${0}"> <foxy-i18n infer="" key="caption_${0}"></foxy-i18n> </vaadin-button> ${0} `),s?o?" error":" success":"",(e=>{var t;const r=e.currentTarget;null===(t=this.renderRoot.querySelector("#dialog"))||void 0===t||t.show(r)}),o?a&&"0000-00-00"!==a?"uncancel":"cancel":"reactivate",s?i($||($=M` <foxy-form-dialog infer="form" form="foxy-internal-admin-subscription-form-status-action-form" href="${0}" no-confirm-when-dirty close-on-patch alert id="dialog"> </foxy-form-dialog> `),d(null==r?void 0:r.href)):i(V||(V=M` <foxy-internal-confirm-dialog message="uncancel_message" confirm="uncancel_confirm" cancel="uncancel_cancel" header="uncancel_header" infer="" id="dialog" @hide="${0}"> </foxy-internal-confirm-dialog> `),(e=>{var t,r;e.detail.cancelled||(null===(t=this.nucleon)||void 0===t||t.edit({end_date:"0000-00-00"}),null===(r=this.nucleon)||void 0===r||r.submit())})))}});let Z,H=e=>e;class S extends(l(t)){constructor(){super(...arguments),this.search=null}static get properties(){return a(a({},super.properties),{},{search:{}})}renderControl(){var e,t;const r=this.nucleon;let a;try{const o=new URL(null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:sub_token_url"].href)&&void 0!==t?t:"");if(this.search){const e=new URLSearchParams(o.search);o.search=this.search,e.forEach(((e,t)=>o.searchParams.set(t,e)))}a=o.toString()}catch(e){a=void 0}return i(Z||(Z=H` <div class="leading-xs flex items-center gap-xs"> <foxy-i18n class="truncate min-w-0" infer="" key="label"></foxy-i18n> <span class="text-tertiary"> • </span> <foxy-copy-to-clipboard layout="complete" theme="tertiary-inline" infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="leading-xs block text-xs text-secondary" infer="" key="helper_text"> </foxy-i18n> `),a)}}customElements.define("foxy-internal-admin-subscription-form-link-control",S);let A,D,P=e=>e;customElements.define("foxy-internal-admin-subscription-form-error",class extends t{renderControl(){var e,t;return i(A||(A=P` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),n(D||(D=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.error_message)}});let B,C,q,G,E,F,z,L=e=>e;const O=c(e,"admin-subscription-form");class R extends O{constructor(){super(...arguments),this.uoeSettingsPage=null}static get properties(){return a(a({},super.properties),{},{uoeSettingsPage:{attribute:"uoe-settings-page"}})}get hiddenSelector(){const e=["delete",super.hiddenSelector.toString()],t=this.data;return(null==t?void 0:t.error_message)&&t.past_due_amount||e.unshift("error-message"),new r(e.join(" ").trim())}get headerSubtitleKey(){const e=m(this.data);return e?`subtitle_${e}`:super.headerSubtitleKey}renderHeaderActions(){return i(B||(B=L` <foxy-internal-admin-subscription-form-status-action infer="status-action"> </foxy-internal-admin-subscription-form-status-action> `))}renderBody(){var e,t,r,a,o,s,l,c,m;let f;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transactions"].href)&&void 0!==t?t:"");r.searchParams.set("zoom","items"),f=r.toString()}catch(e){f=void 0}const h=null===(a=null===(r=this.data)||void 0===r?void 0:r._links["fx:charge_past_due"])||void 0===a?void 0:a.href,u=null===(o=this.data)||void 0===o?void 0:o.past_due_amount,p=null===(s=this.data)||void 0===s?void 0:s.error_message,x=null===(l=this.data)||void 0===l?void 0:l._embedded["fx:transaction_template"].currency_code;return i(C||(C=L` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="self-service-links"> <foxy-internal-admin-subscription-form-link-control infer="load-in-cart"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="cart=checkout" infer="load-on-checkout"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=next_transaction_date" infer="cancel-at-end-of-billing-period"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=true" infer="cancel-next-day"> </foxy-internal-admin-subscription-form-link-control> <div class="flex items-start leading-xs text-xs text-secondary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="uoe_hint_text"></foxy-i18n> ${0} </p> </div> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),d(x),h&&x&&u?i(q||(q=L` <foxy-internal-post-action-control message-options="${0}" theme="tertiary-inline" infer="charge-past-due" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),JSON.stringify({amount:`${u} ${x}`}),h,(()=>this.refresh())):p&&!u?i(G||(G=L` <details class="leading-xs text-xs text-secondary rounded-b focus-within-ring-2 focus-within-ring-inset focus-within-ring-primary-50" style="--gap:calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"> <summary class="cursor-pointer transition-colors hover-text-body focus-outline-none"> <span class="flex items-start" style="gap:var(--gap)"> ${0} <foxy-i18n infer="" key="error_with_zero_past_due_hint"></foxy-i18n> </span> </summary> <p style="padding-left:calc(1.25em + var(--gap))" class="pt-xs"> <span class="whitespace-pre-line">${0}</span> </p> </details> `),n(E||(E=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),p):"",n(F||(F=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),this.uoeSettingsPage?i(z||(z=L` <a target="_blank" class="inline-block rounded font-medium text-body cursor-pointer hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="uoe_link_text"></foxy-i18n> </a> `),this.uoeSettingsPage):"",this.renderTemplateOrSlot(),d(null===(m=null===(c=this.data)||void 0===c?void 0:c._links)||void 0===m?void 0:m["fx:attributes"].href),d(f),super.renderBody())}}customElements.define("foxy-admin-subscription-form",R);export{R as AdminSubscriptionForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./foxy-customer.js";import"./shared-24998349.js";import"./shared-a1cfe9d5.js";import"./shared-c1b71162.js";import"./shared-d674d2ce.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-4e4766ee.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import{u as s}from"./shared-0abec247.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as r,B as o,aI as i}from"./shared-7fec42f2.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-3b4148ad.js";import"./shared-7dc40542.js";import{C as c}from"./shared-be30b940.js";import{a as m,T as u}from"./shared-387d7254.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-65b2760f.js";import{C as y}from"./shared-c782b9fa.js";import{I as $}from"./shared-0ea750af.js";import"./shared-3bc9eaf7.js";import"./foxy-update-payment-method-form.js";import"./shared-b7401886.js";import"./shared-df92d411.js";import"./shared-a6cf5b1f.js";import"./shared-3db3f3c3.js";import"./shared-46efbc40.js";import"./shared-297155d9.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-db758d3b.js";import"./shared-c3d1d247.js";import"./shared-ab9dfa48.js";import"./shared-ac44a3a5.js";import"./shared-dc357e9d.js";import"./shared-b148b310.js";import"./shared-92c211bd.js";import"./shared-69074dae.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-0b3dbac6.js";import"./shared-5574ea83.js";import"./shared-bc89d3fb.js";import"./shared-25a9d87d.js";import"./shared-e275989e.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d6ed748.js";import"./shared-ed24a3f9.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-1b04321a.js";import"./shared-ba0d1f31.js";import"./foxy-payment-card-embed.js";import"./shared-a5580ef6.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-05e997ae.js";import"./shared-7933d898.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-adfed461.js";import"./shared-8ba4b5bf.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-f58068b0.js";import"./shared-e6d5f375.js";import"./shared-caac6517.js";import"./shared-dda75cab.js";import"./shared-0d01cd66.js";import"./shared-302f3391.js";import"./shared-7fa24559.js";import"./shared-0eef6fb7.js";import"./shared-
|
|
1
|
+
import"./foxy-customer.js";import"./shared-24998349.js";import"./shared-a1cfe9d5.js";import"./shared-c1b71162.js";import"./shared-d674d2ce.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-4e4766ee.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import{u as s}from"./shared-0abec247.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as r,B as o,aI as i}from"./shared-7fec42f2.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-3b4148ad.js";import"./shared-7dc40542.js";import{C as c}from"./shared-be30b940.js";import{a as m,T as u}from"./shared-387d7254.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-65b2760f.js";import{C as y}from"./shared-c782b9fa.js";import{I as $}from"./shared-0ea750af.js";import"./shared-3bc9eaf7.js";import"./foxy-update-payment-method-form.js";import"./shared-b7401886.js";import"./shared-df92d411.js";import"./shared-a6cf5b1f.js";import"./shared-3db3f3c3.js";import"./shared-46efbc40.js";import"./shared-297155d9.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-db758d3b.js";import"./shared-c3d1d247.js";import"./shared-ab9dfa48.js";import"./shared-ac44a3a5.js";import"./shared-dc357e9d.js";import"./shared-b148b310.js";import"./shared-92c211bd.js";import"./shared-69074dae.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-0b3dbac6.js";import"./shared-5574ea83.js";import"./shared-bc89d3fb.js";import"./shared-25a9d87d.js";import"./shared-e275989e.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d6ed748.js";import"./shared-ed24a3f9.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-1b04321a.js";import"./shared-ba0d1f31.js";import"./foxy-payment-card-embed.js";import"./shared-a5580ef6.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-05e997ae.js";import"./shared-7933d898.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-adfed461.js";import"./shared-8ba4b5bf.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-f58068b0.js";import"./shared-e6d5f375.js";import"./shared-caac6517.js";import"./shared-dda75cab.js";import"./shared-0d01cd66.js";import"./shared-302f3391.js";import"./shared-7fa24559.js";import"./shared-0eef6fb7.js";import"./shared-461a25ae.js";import"./shared-47269bb6.js";import"./shared-96e4f603.js";import"./shared-cf613436.js";import"./shared-7a818ad5.js";import"./shared-f0fa0a88.js";import"./shared-2061be9a.js";import"./foxy-transaction-card.js";import"./shared-9585cf5b.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-12973e93.js";import"./shared-a6b2bd14.js";import"./shared-1d03ea56.js";import"./shared-b738ee96.js";import"./shared-51919259.js";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-c1b71162.js";import"./shared-a1cfe9d5.js";import{h as t}from"./shared-3bc9eaf7.js";import"./shared-24998349.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-0abec247.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-64210e53.js";import{aI as e,_ as s}from"./shared-7fec42f2.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-c782b9fa.js";import"./shared-a6cf5b1f.js";import"./shared-ed24a3f9.js";import{z as h,S as d,T as n,a as l}from"./shared-387d7254.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-e6d5f375.js";import"./shared-e275989e.js";import{G as v}from"./shared-0eef6fb7.js";import"./shared-ab9dfa48.js";import"./shared-d35ed355.js";import"./shared-dc357e9d.js";import"./shared-a5580ef6.js";import"./shared-db758d3b.js";import{N as p}from"./shared-69074dae.js";import{S as f}from"./shared-
|
|
1
|
+
import"./shared-c1b71162.js";import"./shared-a1cfe9d5.js";import{h as t}from"./shared-3bc9eaf7.js";import"./shared-24998349.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-0abec247.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-64210e53.js";import{aI as e,_ as s}from"./shared-7fec42f2.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-c782b9fa.js";import"./shared-a6cf5b1f.js";import"./shared-ed24a3f9.js";import{z as h,S as d,T as n,a as l}from"./shared-387d7254.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-e6d5f375.js";import"./shared-e275989e.js";import{G as v}from"./shared-0eef6fb7.js";import"./shared-ab9dfa48.js";import"./shared-d35ed355.js";import"./shared-dc357e9d.js";import"./shared-a5580ef6.js";import"./shared-db758d3b.js";import{N as p}from"./shared-69074dae.js";import{S as f}from"./shared-461a25ae.js";import{i as g}from"./shared-53e42a77.js";import"./shared-3db3f3c3.js";import"./shared-46efbc40.js";import"./shared-25a9d87d.js";import"./shared-cf613436.js";import"./foxy-nucleon-element.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-0ea750af.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-b7401886.js";import"./shared-df92d411.js";import"./shared-297155d9.js";import"./shared-1abfcf87.js";import"./shared-c3d1d247.js";import"./shared-ac44a3a5.js";import"./shared-b148b310.js";import"./shared-92c211bd.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-0b3dbac6.js";import"./shared-5574ea83.js";import"./shared-bc89d3fb.js";import"./shared-4e4766ee.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d6ed748.js";import"./shared-bab2ea2c.js";import"./shared-53e476fd.js";import"./foxy-template-set-card.js";import"./shared-1b04321a.js";import"./shared-ba0d1f31.js";import"./foxy-payment-card-embed.js";import"./shared-3b4148ad.js";import"./shared-7dc40542.js";import"./shared-5fd5805c.js";import"./shared-7a818ad5.js";import"./shared-f0fa0a88.js";import"./shared-2061be9a.js";import"./foxy-transaction-card.js";import"./shared-9585cf5b.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-47269bb6.js";import"./shared-12973e93.js";import"./shared-96e4f603.js";import"./shared-f58068b0.js";import"./shared-05e997ae.js";import"./shared-7933d898.js";import"./shared-a6b2bd14.js";import"./shared-d674d2ce.js";import"./shared-1d03ea56.js";import"./shared-8ba4b5bf.js";import"./shared-d0aed1c1.js";import"./shared-b738ee96.js";import"./shared-adfed461.js";import"./shared-caac6517.js";import"./shared-dda75cab.js";import"./shared-0d01cd66.js";import"./shared-302f3391.js";import"./shared-7fa24559.js";let z,u,b,$=t=>t;class H extends r{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(a(z||(z=$` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,m({"text-l font-medium px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(a(u||(u=$` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,m({hidden:this.value!==s}),this.value!==s,s));return a(b||(b=$` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|