@foxy.io/elements 1.39.0-beta.3 → 1.39.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-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +10 -14
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-report-form.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-subscriptions-table.js +1 -1
- package/dist/cdn/{shared-56d70cc2.js → shared-230dee11.js} +5 -5
- package/dist/cdn/shared-84eb85dd.js +1 -0
- package/dist/cdn/shared-ada5e9f5.js +1 -0
- package/dist/cdn/translations/customer/en.json +18 -10
- package/dist/cdn/translations/customer-portal/de.json +33 -13
- package/dist/cdn/translations/customer-portal/en.json +24 -8
- package/dist/cdn/translations/customer-portal/es.json +32 -12
- package/dist/cdn/translations/customer-portal/fr.json +33 -13
- package/dist/cdn/translations/customer-portal/nl.json +33 -13
- package/dist/cdn/translations/customer-portal/pl.json +33 -13
- package/dist/cdn/translations/customer-portal/sv.json +33 -13
- package/dist/cdn/translations/customer-portal/zh-hk.json +34 -14
- package/dist/cdn/translations/store-form/en.json +44 -22
- package/dist/cdn/translations/store-shipping-method-form/en.json +4 -3
- package/dist/cdn/translations/subscription-card/en.json +8 -0
- package/dist/cdn/translations/subscription-form/en.json +16 -8
- package/dist/elements/private/Group/Group.js +2 -2
- package/dist/elements/private/Group/Group.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js +2 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.d.ts +1 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js +10 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +3 -6
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.d.ts +3 -1
- package/dist/elements/public/ItemCard/ItemCard.js +20 -9
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemCard/types.d.ts +4 -2
- package/dist/elements/public/ItemCard/types.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +5 -12
- package/dist/elements/public/StoreForm/StoreForm.js +119 -82
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +25 -4
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.d.ts +4 -1
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +19 -6
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/types.d.ts +4 -2
- package/dist/elements/public/SubscriptionCard/types.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +20 -7
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/utils/get-subscription-status.d.ts +3 -1
- package/dist/utils/get-subscription-status.js +27 -0
- package/dist/utils/get-subscription-status.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-4f64c35e.js +0 -1
- package/dist/cdn/shared-e2675ed0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-d807cb20.js";import"./shared-243456aa.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import{I as e}from"./shared-5b4e2567.js";import"./shared-0c134ce7.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-5212ef4f.js";import"./foxy-transaction-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-4d32d19e.js";import{_ as t,B as s}from"./shared-cb58dfcd.js";import"./shared-f9ac8763.js";import"./shared-360d6a20.js";import{h as a}from"./shared-ba5c42c7.js";import{S as r,R as i,a as n}from"./shared-11351c00.js";import{c as o}from"./shared-4e709717.js";import{S as d,C as l}from"./shared-c46affa4.js";import"./shared-048d5cae.js";import{G as c}from"./shared-4f64c35e.js";import"./shared-be442f26.js";import"./shared-c1e86ea4.js";import"./shared-7dc9c80b.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-8b0f00fa.js";import{g as u}from"./shared-e2675ed0.js";import{p as m}from"./shared-8eeddc22.js";import{s as h}from"./shared-79d0699c.js";import{i as f}from"./shared-53e42a77.js";import{p as _}from"./shared-99a8889a.js";import{j as p}from"./shared-673d668a.js";import"./shared-21e68b72.js";import"./shared-315d7620.js";import"./shared-3556f4b7.js";import"./shared-c25538f1.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-6957b8e6.js";import"./shared-80a1bf6f.js";import"./foxy-collection-page.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-b65d169b.js";import"./shared-43e2c3f6.js";import"./shared-3661a086.js";import"./shared-f1a70f51.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./shared-eb963ba3.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";function y(e){return function*(e){const t=[];for(const s of e.settings.subscriptions.allowFrequencyModification)if(p(s.jsonataQuery).evaluate(e.subscription))for(const e of s.values)!t.includes(e)&&(t.push(e),yield e)}({settings:{subscriptions:{allowFrequencyModification:e.settings.subscriptions.allow_frequency_modification.map((e=>({jsonataQuery:e.jsonata_query,values:e.values})))}},subscription:e.subscription})}class v extends Error{constructor(e){super(`Invalid frequency "${e}".`)}}function x(e){const t=864e5,s=31*t;if(".5m"===e)return s/2;const a=parseInt(e.substring(0,e.length-1));if(isNaN(a))throw new v(e);if(e.endsWith("y"))return 31536e6*a;if(e.endsWith("m"))return a*s;if(e.endsWith("w"))return 6048e5*a;if(e.endsWith("d"))return a*t;throw new v(e)}function g(e,t){if("boolean"==typeof t)return t;const s=t.filter((t=>Boolean(p(t.jsonataQuery).evaluate(e)))).reduce(((e,t)=>{var s,a,r,i,n;if(t.min){const s=e.min?x(e.min):1/0;x(t.min)<s&&(e.min=t.min)}if(t.max){const s=e.max?x(e.max):-1/0;x(t.max)>s&&(e.max=t.max)}if("day"===(null===(s=t.allowedDays)||void 0===s?void 0:s.type)){const s=[...null!==(a=e.allowedDaysOfWeek)&&void 0!==a?a:[],...t.allowedDays.days];e.allowedDaysOfWeek=Array.from(new Set(s))}if("month"===(null===(r=t.allowedDays)||void 0===r?void 0:r.type)){const s=[...null!==(i=e.allowedDaysOfMonth)&&void 0!==i?i:[],...t.allowedDays.days];e.allowedDaysOfMonth=Array.from(new Set(s))}if(t.disallowedDates){const s=[...null!==(n=e.disallowedDates)&&void 0!==n?n:[],...t.disallowedDates];e.disallowedDates=Array.from(new Set(s))}return e}),{});return 0!==Object.keys(s).length&&s}function b(e){const[t,s,a]=e.split("-").map((e=>parseInt(e)));return new Date(t,s-1,a)}function $(e){const t=e.settings.subscriptions.allow_next_date_modification;let s;return s="boolean"==typeof t?t:t.map((e=>({allowedDays:e.allowed_days,disallowedDates:e.disallowed_dates,jsonataQuery:e.jsonata_query,max:e.max,min:e.min}))),function(e){var t,s;const a=b(e.value),r=a.getTime(),i=g(e.subscription,e.settings.subscriptions.allowNextDateModification);if("boolean"==typeof i)return i;if(!1===(null===(t=i.allowedDaysOfMonth)||void 0===t?void 0:t.includes(a.getDate())))return!1;if(!1===(null===(s=i.allowedDaysOfWeek)||void 0===s?void 0:s.includes(a.getDay())))return!1;if(i.disallowedDates&&i.disallowedDates.find((e=>{const[t,s]=e.split("..").map((e=>b(e).getTime()));return r===t||void 0!==s&&r>=t&&r<=s})))return!1;if(i.min){const e=_(i.min);if(null!==e&&Date.now()+e>=r)return!1}if(i.max){const e=_(i.max);if(null!==e&&Date.now()+e<=r)return!1}return!0}({settings:{subscriptions:{allowNextDateModification:s}},subscription:e.subscription,value:e.value})}let j,S,D,w,T,q,E,k,H,C,L,A=e=>e;const I=r(i(n(e,"subscription-form")));class O extends I{constructor(){super(...arguments),this.getTransactionPageHref=(e,t)=>null==t?void 0:t._links["fx:receipt"].href,this.getCustomerPageHref=null,this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.settings=null,this.coupons=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__renderItemsActions=()=>a(j||(j=A` <div class="flex" data-testid="items:actions"> ${0} <foxy-i18n data-testid="items:actions-label" class="flex-1 text-s font-medium text-secondary" lang="${0}" key="item_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("items:actions:before"),this.lang,this.ns,this.renderTemplateOrSlot("items:actions:after")),this.__renderItems=()=>{var e;let t;try{const s=this.__transactionTemplate,a=new URL(null!==(e=null==s?void 0:s._links["fx:items"].href)&&void 0!==e?e:"");a.searchParams.set("zoom","item_options"),t=a.toString()}catch(e){t=void 0}return a(S||(S=A` <div data-testid="items" class="space-y-xs sm-col-span-2"> ${0} <foxy-internal-async-list-control first="${0}" infer="items" item="foxy-item-card" .itemProps="${0}"> </foxy-internal-async-list-control> </div> `),this.hiddenSelector.matches("items:actions",!0)?"":this.__renderItemsActions(),f(t),{"locale-codes":this.localeCodes})},this.__renderEndDate=()=>{var e;const{data:t,lang:s,ns:r}=this;return a(D||(D=A` <div data-testid="end-date"> ${0} <x-group frame> <foxy-i18n key="end_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),r,s,f(null===(e=null==t?void 0:t.end_date)||void 0===e?void 0:e.substr(0,10)),f(null==t?void 0:t.end_date),s,!this.__isEndDateEditable,this.disabledSelector.matches("end-date",!0),this.__checkEndDateAvailability,(e=>{const t=e.target;this.edit({end_date:t.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__checkNextTransactionDateAvailability=e=>{const{settings:t,data:s}=this;if(t&&s){return $({value:h(e),settings:t,subscription:s})}return e.getTime()>=Date.now()},this.__checkStartDateAvailability=e=>e.getTime()>=Date.now(),this.__checkEndDateAvailability=e=>{const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),e.getTime()>=t.getTime()},this.__renderStartDate=()=>{const{data:e,lang:t,ns:s}=this;return a(w||(w=A` <div data-testid="start-date"> ${0} <x-group frame> <foxy-i18n key="start_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("start-date:before"),s,t,f(null==e?void 0:e.start_date.substr(0,10)),f(null==e?void 0:e.start_date),t,!this.__isStartDateEditable,this.disabledSelector.matches("start-date",!0),this.__checkStartDateAvailability,(e=>{const t=e.target;this.edit({start_date:t.value})}),this.renderTemplateOrSlot("start-date:after"))},this.__renderNextTransactionDate=()=>{const{data:e,lang:t,ns:s}=this,r=!!(null==e?void 0:e.is_active);return a(T||(T=A` <div data-testid="next-transaction-date"> ${0} <x-group frame> <foxy-i18n key="next_transaction_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("next-transaction-date:before"),s,t,f(null==e?void 0:e.next_transaction_date.substr(0,10)),f(null==e?void 0:e.next_transaction_date),t,!r||this.readonlySelector.matches("next-transaction-date",!0),!e||this.disabledSelector.matches("next-transaction-date",!0),this.__checkNextTransactionDateAvailability,(e=>{const t=e.target;this.edit({next_transaction_date:t.value})}),this.renderTemplateOrSlot("next-transaction-date:after"))},this.__renderFrequencyAsDropdown=()=>{const{data:e}=this,t=!!(null==e?void 0:e.is_active),s=this.__frequencies.map((e=>({label:this.t(".5m"===e?"twice_a_month":"frequency",m(e)),value:e})));return a(q||(q=A` <vaadin-combo-box item-value-path="value" item-label-path="label" data-testid="frequency" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .items="${0}" @change="${0}"> </vaadin-combo-box> `),!e||this.disabledSelector.matches("frequency",!0),e&&(!t||this.readonlySelector.matches("frequency",!0)),this.t("frequency_label").toString(),f(this.form.frequency),s,(e=>{this.edit({frequency:e.target.value})}))},this.__renderFrequencyAsRadioList=()=>{var e;const{data:t,lang:s,ns:r}=this;return a(E||(E=A` <x-group frame> <foxy-i18n key="frequency_label" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <x-choice default-custom-value="1d" data-testid="frequency" type="frequency" ns="${0}" ?custom="${0}" .items="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> ${0} </x-choice> </x-group> `),r,s,r,null===this.settings,this.__frequencies,null!==(e=this.form.frequency)&&void 0!==e?e:null,!t||this.disabledSelector.matches("frequency",!0),t&&(!t.is_active||this.readonlySelector.matches("frequency",!0)),(e=>{this.edit({frequency:e.target.value})}),this.__frequencies.map((e=>a(k||(k=A` <foxy-i18n options="${0}" slot="${0}-label" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> `),JSON.stringify(m(e)),e,s,".5m"===e?"twice_a_month":"frequency",r))))},this.__renderFrequency=()=>a(H||(H=A` <div class="sm-col-span-2"> ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("frequency:before"),this.settings&&this.__frequencies.length>4?this.__renderFrequencyAsDropdown():this.__renderFrequencyAsRadioList(),this.renderTemplateOrSlot("frequency:after")),this.__renderCustomer=()=>{var e,t;const s=null===(e=this.data)||void 0===e?void 0:e._links["fx:customer"].href,r=s?null===(t=this.getCustomerPageHref)||void 0===t?void 0:t.call(this,s):void 0;return a(C||(C=A` <div data-testid="customer" class="sm-col-span-2"> ${0} <foxy-i18n infer="customer" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="customer" href="${0}"></foxy-customer-card> </a> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),o({"block rounded transition-colors":!0,"ring-1 ring-contrast-10":!r,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!r,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!r}),f(r),f(s),this.renderTemplateOrSlot("customer:after"))}}static get scopedElements(){return{"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-async-list-control":customElements.get("foxy-internal-async-list-control"),"foxy-internal-number-control":customElements.get("foxy-internal-number-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-customer-card":customElements.get("foxy-customer-card"),"vaadin-combo-box":customElements.get("vaadin-combo-box"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-nucleon":customElements.get("foxy-nucleon"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"iron-icon":customElements.get("iron-icon"),"x-skeleton":d,"x-choice":l,"x-group":c}}static get properties(){return t(t({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},customerAddresses:{attribute:"customer-addresses"},itemCategories:{attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},settings:{type:Object},coupons:{}})}get hiddenSelector(){return new s(`items:pagination:card:autorenew-icon ${super.hiddenSelector}`)}get headerTitleOptions(){if(this.data&&this.__currencyCode){const e=m(this.data.frequency),s=this.__transactionTemplate,a=`${null==s?void 0:s.total_order} ${this.__currencyCode}`,r=this.__currencyDisplay,i=this.__currencyCode?".5m"===this.data.frequency?"twice_a_month":"recurring":"existing";return t(t({},e),{},{amount:a,currencyDisplay:r,context:i})}return{}}get headerSubtitleKey(){const e=u(this.data);return e?`subtitle_${e}`:super.headerSubtitleKey}renderBody(){var e,t,s,r,i;let n;try{const s=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transactions"].href)&&void 0!==t?t:"");s.searchParams.set("order","transaction_date desc"),s.searchParams.set("zoom","items"),n=s.toString()}catch(e){n=void 0}return a(L||(L=A` ${0} <div class="relative grid grid-cols-1 sm-grid-cols-2 gap-l"> <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> ${0} ${0} ${0} ${0} ${0} ${0} <foxy-internal-number-control suffix="${0}" infer="past-due-amount" class="sm-col-span-2" min="0"> </foxy-internal-number-control> <foxy-internal-async-list-control first="${0}" class="sm-col-span-2" infer="attributes" limit="5" form="foxy-attribute-form" item="foxy-attribute-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" class="sm-col-span-2" infer="transactions" limit="5" item="foxy-transaction-card" hide-delete-button .getPageHref="${0}"> </foxy-internal-async-list-control> <foxy-internal-timestamps-control infer="timestamps" class="sm-col-span-2"> </foxy-internal-timestamps-control> </div> `),this.renderHeader(),f(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),f(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),f(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),f(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),f(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.hiddenSelector.matches("customer",!0)?"":this.__renderCustomer(),this.hiddenSelector.matches("items",!0)?"":this.__renderItems(),this.__isFrequencyVisible?this.__renderFrequency():"",this.__isStartDateVisible?this.__renderStartDate():"",this.__isNextTransactionDateVisible?this.__renderNextTransactionDate():"",this.__isEndDateVisible?this.__renderEndDate():"",f(null!==(s=this.__currencyCode)&&void 0!==s?s:void 0),f(null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:attributes"])||void 0===i?void 0:i.href),f(n),this.getTransactionPageHref)}get __transactionTemplateHref(){var e;const t=this.data;return(null===(e=null==t?void 0:t._embedded)||void 0===e?void 0:e["fx:transaction_template"])||null==t?void 0:t._links["fx:transaction_template"].href}get __defaultTemplateSetHref(){var e,t,s;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(s=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==s?s:"");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 __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,s;const a=this.data,r=null===(e=null==a?void 0:a._embedded)||void 0===e?void 0:e["fx:transaction_template"],i=`#${this.__transactionTemplateLoaderId}`;return null!==(s=null!=r?r:null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==s?s:null}get __defaultTemplateSet(){var e,t;const s=`#${this.__defaultTemplateSetLoaderId}`,a=this.renderRoot.querySelector(s);return null!==(t=null===(e=null==a?void 0:a.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const s=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const s=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const s=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __isNextTransactionDateVisible(){if(this.hiddenSelector.matches("next-transaction-date",!0))return!1;if(null===this.data)return!1;if(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())return!1;if(!1===this.data.is_active)return!1;if(null===this.settings)return!0;const e=this.settings.subscriptions.allow_next_date_modification;return!!function(e,t){let s;return s="boolean"==typeof t?t:t.map((e=>({allowedDays:e.allowed_days,disallowedDates:e.disallowed_dates,jsonataQuery:e.jsonata_query,max:e.max,min:e.min}))),g(e,s)}(this.data,e)}get __isStartDateVisible(){return!this.hiddenSelector.matches("start-date",!0)&&this.__isNextTransactionDateVisible}get __isEndDateVisible(){return!this.hiddenSelector.matches("end-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())&&(!1!==this.data.is_active&&!this.settings)))}get __isStartDateEditable(){return!this.readonlySelector.matches("start-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date)<=new Date)&&(!1!==this.data.is_active&&(!(this.data.start_date&&new Date(this.data.start_date)<=new Date)&&null===this.settings))))}get __isEndDateEditable(){return!this.readonlySelector.matches("end-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date)<=new Date)&&(!1!==this.data.is_active&&null===this.settings)))}get __isFrequencyVisible(){if(this.hiddenSelector.matches("frequency",!0))return!1;if(null===this.data)return!1;if(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())return!1;if(!1===this.data.is_active)return!1;if(null===this.settings)return!0;return!y({subscription:this.data,settings:this.settings}).next().done}get __frequencies(){if(!this.settings||!this.data)return[".5m","1m","1y"];const e=y({subscription:this.data,settings:this.settings});return Array.from(e)}get __currencyCode(){var e,t,s,a;const r=this.__transactionTemplate;if(null==r?void 0:r.currency_code)return r.currency_code;const i=this.__localeCodesHelper,n=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,o=n?null==i?void 0:i.values[n]:void 0;return o&&null!==(a=null===(s=/Currency: ([A-Z]{3})/g.exec(o))||void 0===s?void 0:s[1])&&void 0!==a?a:null}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-subscription-form",O);export{O as SubscriptionForm};
|
|
1
|
+
import"./shared-d807cb20.js";import"./shared-243456aa.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import{I as e}from"./shared-5b4e2567.js";import"./shared-0c134ce7.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-5212ef4f.js";import"./foxy-transaction-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-4d32d19e.js";import{_ as t,B as s}from"./shared-cb58dfcd.js";import"./shared-f9ac8763.js";import"./shared-360d6a20.js";import{h as a}from"./shared-ba5c42c7.js";import{S as i,R as r,a as n}from"./shared-11351c00.js";import{c as o}from"./shared-4e709717.js";import{S as d,C as l}from"./shared-c46affa4.js";import"./shared-048d5cae.js";import{G as c}from"./shared-84eb85dd.js";import"./shared-be442f26.js";import"./shared-c1e86ea4.js";import"./shared-7dc9c80b.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-8b0f00fa.js";import{p as u}from"./shared-8eeddc22.js";import{s as m}from"./shared-79d0699c.js";import{i as h}from"./shared-53e42a77.js";import{a as f,g as _}from"./shared-ada5e9f5.js";import{p}from"./shared-99a8889a.js";import{j as y}from"./shared-673d668a.js";import"./shared-21e68b72.js";import"./shared-315d7620.js";import"./shared-3556f4b7.js";import"./shared-c25538f1.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-6957b8e6.js";import"./shared-80a1bf6f.js";import"./foxy-collection-page.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-b65d169b.js";import"./shared-43e2c3f6.js";import"./shared-3661a086.js";import"./shared-f1a70f51.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./shared-eb963ba3.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";function v(e){return function*(e){const t=[];for(const s of e.settings.subscriptions.allowFrequencyModification)if(y(s.jsonataQuery).evaluate(e.subscription))for(const e of s.values)!t.includes(e)&&(t.push(e),yield e)}({settings:{subscriptions:{allowFrequencyModification:e.settings.subscriptions.allow_frequency_modification.map((e=>({jsonataQuery:e.jsonata_query,values:e.values})))}},subscription:e.subscription})}class g extends Error{constructor(e){super(`Invalid frequency "${e}".`)}}function x(e){const t=864e5,s=31*t;if(".5m"===e)return s/2;const a=parseInt(e.substring(0,e.length-1));if(isNaN(a))throw new g(e);if(e.endsWith("y"))return 31536e6*a;if(e.endsWith("m"))return a*s;if(e.endsWith("w"))return 6048e5*a;if(e.endsWith("d"))return a*t;throw new g(e)}function b(e,t){if("boolean"==typeof t)return t;const s=t.filter((t=>Boolean(y(t.jsonataQuery).evaluate(e)))).reduce(((e,t)=>{var s,a,i,r,n;if(t.min){const s=e.min?x(e.min):1/0;x(t.min)<s&&(e.min=t.min)}if(t.max){const s=e.max?x(e.max):-1/0;x(t.max)>s&&(e.max=t.max)}if("day"===(null===(s=t.allowedDays)||void 0===s?void 0:s.type)){const s=[...null!==(a=e.allowedDaysOfWeek)&&void 0!==a?a:[],...t.allowedDays.days];e.allowedDaysOfWeek=Array.from(new Set(s))}if("month"===(null===(i=t.allowedDays)||void 0===i?void 0:i.type)){const s=[...null!==(r=e.allowedDaysOfMonth)&&void 0!==r?r:[],...t.allowedDays.days];e.allowedDaysOfMonth=Array.from(new Set(s))}if(t.disallowedDates){const s=[...null!==(n=e.disallowedDates)&&void 0!==n?n:[],...t.disallowedDates];e.disallowedDates=Array.from(new Set(s))}return e}),{});return 0!==Object.keys(s).length&&s}function $(e){const[t,s,a]=e.split("-").map((e=>parseInt(e)));return new Date(t,s-1,a)}function j(e){const t=e.settings.subscriptions.allow_next_date_modification;let s;return s="boolean"==typeof t?t:t.map((e=>({allowedDays:e.allowed_days,disallowedDates:e.disallowed_dates,jsonataQuery:e.jsonata_query,max:e.max,min:e.min}))),function(e){var t,s;const a=$(e.value),i=a.getTime(),r=b(e.subscription,e.settings.subscriptions.allowNextDateModification);if("boolean"==typeof r)return r;if(!1===(null===(t=r.allowedDaysOfMonth)||void 0===t?void 0:t.includes(a.getDate())))return!1;if(!1===(null===(s=r.allowedDaysOfWeek)||void 0===s?void 0:s.includes(a.getDay())))return!1;if(r.disallowedDates&&r.disallowedDates.find((e=>{const[t,s]=e.split("..").map((e=>$(e).getTime()));return i===t||void 0!==s&&i>=t&&i<=s})))return!1;if(r.min){const e=p(r.min);if(null!==e&&Date.now()+e>=i)return!1}if(r.max){const e=p(r.max);if(null!==e&&Date.now()+e<=i)return!1}return!0}({settings:{subscriptions:{allowNextDateModification:s}},subscription:e.subscription,value:e.value})}let S,w,D,T,q,E,k,H,C,L,A,I=e=>e;const O=i(r(n(e,"subscription-form")));class N extends O{constructor(){super(...arguments),this.getTransactionPageHref=(e,t)=>null==t?void 0:t._links["fx:receipt"].href,this.getCustomerPageHref=null,this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.settings=null,this.coupons=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__renderItemsActions=()=>a(S||(S=I` <div class="flex items-center gap-s text-m" data-testid="items:actions"> ${0} <foxy-i18n data-testid="items:actions-label" class="flex-1 text-l font-medium text-body leading-m" lang="${0}" key="item_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("items:actions:before"),this.lang,this.ns,this.renderTemplateOrSlot("items:actions:after")),this.__renderItems=()=>{var e;let t;try{const s=this.__transactionTemplate,a=new URL(null!==(e=null==s?void 0:s._links["fx:items"].href)&&void 0!==e?e:"");a.searchParams.set("zoom","item_options"),t=a.toString()}catch(e){t=void 0}return a(w||(w=I` <div data-testid="items" class="space-y-xs sm-col-span-2"> ${0} <foxy-internal-async-list-control first="${0}" infer="items" item="foxy-item-card" .itemProps="${0}"> </foxy-internal-async-list-control> </div> `),this.hiddenSelector.matches("items:actions",!0)?"":this.__renderItemsActions(),h(t),{"locale-codes":this.localeCodes,".settings":this.settings})},this.__renderEndDate=()=>{var e;const{data:t,lang:s,ns:i}=this;return a(D||(D=I` <div data-testid="end-date"> ${0} <x-group frame> <foxy-i18n key="end_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),i,s,h(null===(e=null==t?void 0:t.end_date)||void 0===e?void 0:e.substr(0,10)),h(null==t?void 0:t.end_date),s,!this.__isEndDateEditable,this.disabledSelector.matches("end-date",!0),this.__checkEndDateAvailability,(e=>{const t=e.target;this.edit({end_date:t.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__checkNextTransactionDateAvailability=e=>{const{settings:t,data:s}=this;if(t&&s){return j({value:m(e),settings:t,subscription:s})}return e.getTime()>=Date.now()},this.__checkStartDateAvailability=e=>e.getTime()>=Date.now(),this.__checkEndDateAvailability=e=>{const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),e.getTime()>=t.getTime()},this.__renderStartDate=()=>{const{data:e,lang:t,ns:s}=this;return a(T||(T=I` <div data-testid="start-date"> ${0} <x-group frame> <foxy-i18n key="start_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("start-date:before"),s,t,h(null==e?void 0:e.start_date.substr(0,10)),h(null==e?void 0:e.start_date),t,!this.__isStartDateEditable,this.disabledSelector.matches("start-date",!0),this.__checkStartDateAvailability,(e=>{const t=e.target;this.edit({start_date:t.value})}),this.renderTemplateOrSlot("start-date:after"))},this.__renderNextTransactionDate=()=>{const{data:e,lang:t,ns:s}=this,i=!!(null==e?void 0:e.is_active);return a(q||(q=I` <div data-testid="next-transaction-date"> ${0} <x-group frame> <foxy-i18n key="next_transaction_date" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <foxy-internal-calendar start="${0}" value="${0}" lang="${0}" ?readonly="${0}" ?disabled="${0}" .checkAvailability="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("next-transaction-date:before"),s,t,h(null==e?void 0:e.next_transaction_date.substr(0,10)),h(null==e?void 0:e.next_transaction_date),t,!i||this.readonlySelector.matches("next-transaction-date",!0),!e||this.disabledSelector.matches("next-transaction-date",!0),this.__checkNextTransactionDateAvailability,(e=>{const t=e.target;this.edit({next_transaction_date:t.value})}),this.renderTemplateOrSlot("next-transaction-date:after"))},this.__renderFrequencyAsDropdown=()=>{const{data:e}=this,t=!!(null==e?void 0:e.is_active),s=this.__frequencies.map((e=>({label:this.t(".5m"===e?"twice_a_month":"frequency",u(e)),value:e})));return a(E||(E=I` <vaadin-combo-box item-value-path="value" item-label-path="label" data-testid="frequency" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .items="${0}" @change="${0}"> </vaadin-combo-box> `),!e||this.disabledSelector.matches("frequency",!0),e&&(!t||this.readonlySelector.matches("frequency",!0)),this.t("frequency_label").toString(),h(this.form.frequency),s,(e=>{this.edit({frequency:e.target.value})}))},this.__renderFrequencyAsRadioList=()=>{var e;const{data:t,lang:s,ns:i}=this;return a(k||(k=I` <x-group frame> <foxy-i18n key="frequency_label" ns="${0}" lang="${0}" slot="header"></foxy-i18n> <x-choice default-custom-value="1d" data-testid="frequency" type="frequency" ns="${0}" ?custom="${0}" .items="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" @change="${0}"> ${0} </x-choice> </x-group> `),i,s,i,null===this.settings,this.__frequencies,null!==(e=this.form.frequency)&&void 0!==e?e:null,!t||this.disabledSelector.matches("frequency",!0),t&&(!t.is_active||this.readonlySelector.matches("frequency",!0)),(e=>{this.edit({frequency:e.target.value})}),this.__frequencies.map((e=>a(H||(H=I` <foxy-i18n options="${0}" slot="${0}-label" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> `),JSON.stringify(u(e)),e,s,".5m"===e?"twice_a_month":"frequency",i))))},this.__renderFrequency=()=>a(C||(C=I` <div class="sm-col-span-2"> ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("frequency:before"),this.settings&&this.__frequencies.length>4?this.__renderFrequencyAsDropdown():this.__renderFrequencyAsRadioList(),this.renderTemplateOrSlot("frequency:after")),this.__renderCustomer=()=>{var e,t;const s=null===(e=this.data)||void 0===e?void 0:e._links["fx:customer"].href,i=s?null===(t=this.getCustomerPageHref)||void 0===t?void 0:t.call(this,s):void 0;return a(L||(L=I` <div data-testid="customer" class="sm-col-span-2"> ${0} <foxy-i18n infer="customer" class="block text-l font-medium leading-xs mb-s" key="label"> </foxy-i18n> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="customer" href="${0}"></foxy-customer-card> </a> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),o({"block rounded transition-colors":!0,"ring-1 ring-contrast-10":!i,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!i,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!i}),h(i),h(s),this.renderTemplateOrSlot("customer:after"))}}static get scopedElements(){return{"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-async-list-control":customElements.get("foxy-internal-async-list-control"),"foxy-internal-number-control":customElements.get("foxy-internal-number-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-customer-card":customElements.get("foxy-customer-card"),"vaadin-combo-box":customElements.get("vaadin-combo-box"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-nucleon":customElements.get("foxy-nucleon"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"iron-icon":customElements.get("iron-icon"),"x-skeleton":d,"x-choice":l,"x-group":c}}static get properties(){return t(t({},super.properties),{},{getTransactionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},customerAddresses:{attribute:"customer-addresses"},itemCategories:{attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},settings:{type:Object},coupons:{}})}get hiddenSelector(){return new s(`items:pagination:card:autorenew-icon ${super.hiddenSelector}`)}get headerTitleOptions(){var e,s;if(this.data&&this.__currencyCode){const a=u(this.data.frequency),i=this.__transactionTemplate,r=`${null==i?void 0:i.total_order} ${this.__currencyCode}`,n=this.__currencyDisplay,o=null===(s=null===(e=this.settings)||void 0===e?void 0:e.cart_display_config.show_sub_frequency)||void 0===s||s,d=this.__currencyCode&&o?".5m"===this.data.frequency?"twice_a_month":"recurring":"existing";return t(t({},a),{},{amount:r,currencyDisplay:n,context:d})}return{}}get headerSubtitleKey(){const e=this.settings?f(this.data,this.settings):_(this.data);return e?`subtitle_${e}`:super.headerSubtitleKey}renderBody(){var e,t,s,i,r;let n;try{const s=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transactions"].href)&&void 0!==t?t:"");s.searchParams.set("order","transaction_date desc"),s.searchParams.set("zoom","items"),n=s.toString()}catch(e){n=void 0}return a(A||(A=I` ${0} <div class="relative grid grid-cols-1 sm-grid-cols-2 gap-l"> <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> ${0} ${0} ${0} ${0} ${0} ${0} <foxy-internal-number-control suffix="${0}" infer="past-due-amount" class="sm-col-span-2" min="0"> </foxy-internal-number-control> <foxy-internal-async-list-control first="${0}" class="sm-col-span-2" infer="attributes" limit="5" form="foxy-attribute-form" item="foxy-attribute-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" class="sm-col-span-2" infer="transactions" limit="5" item="foxy-transaction-card" hide-delete-button .getPageHref="${0}"> </foxy-internal-async-list-control> <foxy-internal-timestamps-control infer="timestamps" class="sm-col-span-2"> </foxy-internal-timestamps-control> </div> `),this.renderHeader(),h(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),h(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),h(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),h(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),h(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.hiddenSelector.matches("customer",!0)?"":this.__renderCustomer(),this.hiddenSelector.matches("items",!0)?"":this.__renderItems(),this.__isFrequencyVisible?this.__renderFrequency():"",this.__isStartDateVisible?this.__renderStartDate():"",this.__isNextTransactionDateVisible?this.__renderNextTransactionDate():"",this.__isEndDateVisible?this.__renderEndDate():"",h(null!==(s=this.__currencyCode)&&void 0!==s?s:void 0),h(null===(r=null===(i=this.data)||void 0===i?void 0:i._links["fx:attributes"])||void 0===r?void 0:r.href),h(n),this.getTransactionPageHref)}get __transactionTemplateHref(){var e;const t=this.data;return(null===(e=null==t?void 0:t._embedded)||void 0===e?void 0:e["fx:transaction_template"])||null==t?void 0:t._links["fx:transaction_template"].href}get __defaultTemplateSetHref(){var e,t,s;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(s=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==s?s:"");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 __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,s;const a=this.data,i=null===(e=null==a?void 0:a._embedded)||void 0===e?void 0:e["fx:transaction_template"],r=`#${this.__transactionTemplateLoaderId}`;return null!==(s=null!=i?i:null===(t=this.renderRoot.querySelector(r))||void 0===t?void 0:t.data)&&void 0!==s?s:null}get __defaultTemplateSet(){var e,t;const s=`#${this.__defaultTemplateSetLoaderId}`,a=this.renderRoot.querySelector(s);return null!==(t=null===(e=null==a?void 0:a.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const s=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const s=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const s=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(s))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __isNextTransactionDateVisible(){var e;if(this.hiddenSelector.matches("next-transaction-date",!0))return!1;if(null===this.data)return!1;if(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())return!1;if(!1===this.data.is_active)return!1;if(!1===(null===(e=this.settings)||void 0===e?void 0:e.cart_display_config.show_sub_nextdate))return!1;if(null===this.settings)return!0;const t=this.settings.subscriptions.allow_next_date_modification;return!!function(e,t){let s;return s="boolean"==typeof t?t:t.map((e=>({allowedDays:e.allowed_days,disallowedDates:e.disallowed_dates,jsonataQuery:e.jsonata_query,max:e.max,min:e.min}))),b(e,s)}(this.data,t)}get __isStartDateVisible(){var e;return!this.hiddenSelector.matches("start-date",!0)&&(!1!==(null===(e=this.settings)||void 0===e?void 0:e.cart_display_config.show_sub_startdate)&&this.__isNextTransactionDateVisible)}get __isEndDateVisible(){return!this.hiddenSelector.matches("end-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())&&(!1!==this.data.is_active&&!this.settings)))}get __isStartDateEditable(){return!this.readonlySelector.matches("start-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date)<=new Date)&&(!1!==this.data.is_active&&(!(this.data.start_date&&new Date(this.data.start_date)<=new Date)&&null===this.settings))))}get __isEndDateEditable(){return!this.readonlySelector.matches("end-date",!0)&&(null!==this.data&&(!(this.data.end_date&&new Date(this.data.end_date)<=new Date)&&(!1!==this.data.is_active&&null===this.settings)))}get __isFrequencyVisible(){var e;if(this.hiddenSelector.matches("frequency",!0))return!1;if(null===this.data)return!1;if(this.data.end_date&&new Date(this.data.end_date).getTime()<=Date.now())return!1;if(!1===this.data.is_active)return!1;if(!1===(null===(e=this.settings)||void 0===e?void 0:e.cart_display_config.show_sub_frequency))return!1;if(null===this.settings)return!0;return!v({subscription:this.data,settings:this.settings}).next().done}get __frequencies(){if(!this.settings||!this.data)return[".5m","1m","1y"];const e=v({subscription:this.data,settings:this.settings});return Array.from(e)}get __currencyCode(){var e,t,s,a;const i=this.__transactionTemplate;if(null==i?void 0:i.currency_code)return i.currency_code;const r=this.__localeCodesHelper,n=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,o=n?null==r?void 0:r.values[n]:void 0;return o&&null!==(a=null===(s=/Currency: ([A-Z]{3})/g.exec(o))||void 0===s?void 0:s[1])&&void 0!==a?a:null}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-subscription-form",N);export{N as SubscriptionForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{S as s}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{S as s}from"./shared-230dee11.js";export{S as SubscriptionsTable}from"./shared-230dee11.js";import"./shared-37348820.js";import"./shared-21e68b72.js";import"./shared-11351c00.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-c18f681b.js";import"./shared-2aa23b5f.js";import"./shared-343d1fd7.js";import"./shared-e3421ca1.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./foxy-nucleon-element.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-4e709717.js";import"./shared-8eeddc22.js";import"./shared-ada5e9f5.js";customElements.define("foxy-subscriptions-table",s);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as t}from"./shared-cb58dfcd.js";import{T as e}from"./shared-e3421ca1.js";import{a as s}from"./shared-11351c00.js";import{p as n}from"./shared-8eeddc22.js";import{g as a}from"./shared-ada5e9f5.js";import{c as o}from"./shared-4e709717.js";let r,l,m,i,c=t=>t;class u extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[u.priceColumn,u.summaryColumn,u.statusColumn,u.subTokenURLColumn]}}u.priceColumn={cell:e=>{const s=e.data._embedded["fx:transaction_template"],a=`${s.total_order} ${s.currency_code}`;return e.html(r||(r=c`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n frequencies"
|
|
4
4
|
class="font-medium text-m font-tnum"
|
|
@@ -8,7 +8,7 @@ import{_ as e}from"./shared-cb58dfcd.js";import{T as t}from"./shared-e3421ca1.js
|
|
|
8
8
|
.options=${0}
|
|
9
9
|
>
|
|
10
10
|
</foxy-i18n>
|
|
11
|
-
`),
|
|
11
|
+
`),e.lang,".5m"===e.data.frequency?"twice_a_month":"recurring",e.ns,t(t({},n(e.data.frequency)),{},{amount:a}))}},u.summaryColumn={cell:t=>{const e=t.data._embedded["fx:transaction_template"]._embedded["fx:items"],s={most_expensive_item:[...e].sort(((t,e)=>t.price-e.price))[0],count_minus_one:e.length-1,count:e.length};return t.html(l||(l=c`
|
|
12
12
|
<foxy-i18n
|
|
13
13
|
data-testclass="i18n summaries"
|
|
14
14
|
class="text-m"
|
|
@@ -18,7 +18,7 @@ import{_ as e}from"./shared-cb58dfcd.js";import{T as t}from"./shared-e3421ca1.js
|
|
|
18
18
|
.options=${0}
|
|
19
19
|
>
|
|
20
20
|
</foxy-i18n>
|
|
21
|
-
`),
|
|
21
|
+
`),t.lang,t.ns,s)}},u.statusColumn={hideBelow:"sm",cell:({ns:t,lang:e,data:s,html:n})=>{const r=a(s),l="failed"===r,i="next_payment"===r||!!(null==r?void 0:r.startsWith("will_end"));return n(m||(m=c`
|
|
22
22
|
<foxy-i18n
|
|
23
23
|
data-testclass="i18n statuses"
|
|
24
24
|
class=${0}
|
|
@@ -28,7 +28,7 @@ import{_ as e}from"./shared-cb58dfcd.js";import{T as t}from"./shared-e3421ca1.js
|
|
|
28
28
|
.options=${0}
|
|
29
29
|
>
|
|
30
30
|
</foxy-i18n>
|
|
31
|
-
`),o({"px-s py-xs text-m font-medium inline-block whitespace-normal rounded":!0,"text-secondary bg-contrast-5":!i&&!l,"text-success bg-success-10":i,"text-error bg-error-10":l}),
|
|
31
|
+
`),o({"px-s py-xs text-m font-medium inline-block whitespace-normal rounded":!0,"text-secondary bg-contrast-5":!i&&!l,"text-success bg-success-10":i,"text-error bg-error-10":l}),e,r,t,s)}},u.subTokenURLColumn={cell:t=>t.html(i||(i=c`
|
|
32
32
|
<a
|
|
33
33
|
data-testclass="links"
|
|
34
34
|
target="_blank"
|
|
@@ -43,4 +43,4 @@ import{_ as e}from"./shared-cb58dfcd.js";import{T as t}from"./shared-e3421ca1.js
|
|
|
43
43
|
>
|
|
44
44
|
</foxy-i18n>
|
|
45
45
|
</a>
|
|
46
|
-
`),
|
|
46
|
+
`),t.data._links["fx:sub_token_url"].href,t.lang,t.ns)};export{u as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as s}from"./shared-cb58dfcd.js";import{L as e,h as t}from"./shared-ba5c42c7.js";import{z as r}from"./shared-11351c00.js";let a,o=s=>s;class i extends e{constructor(){super(...arguments),this.frame=!1}static get properties(){return s(s({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(a||(a=o` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded ${0}"> <slot></slot> </div> </section> `),"text-l font-medium text-body leading-none "+(this.frame?"":"pl-m"),this.frame?"bg-contrast-5 overflow-hidden":"")}}export{i as G};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){if(null===n)return null;const e=n=>n&&"0000-00-00"!==n?new Date(n).getTime():null,t=n.is_active,_=e(n.first_failed_transaction_date),d=e(n.start_date),a=e(n.next_transaction_date),l=e(n.end_date),i=Date.now();return _?l&&l<=i?"failed_and_ended":"failed":null===d?null:t&&d>i?"will_start":null===a?null:t&&l&&l>i?a<=l?"will_end_after_payment":"will_end":t?l?"ended":"next_payment":d<=i&&l&&l<=i?"ended":"inactive"}function e(e,t){var _,d,a;const l=n(e),i=t.cart_display_config,r=null===(_=null==i?void 0:i.show_sub_startdate)||void 0===_||_,u=null===(d=null==i?void 0:i.show_sub_nextdate)||void 0===d||d,o=null===(a=null==i?void 0:i.show_sub_enddate)||void 0===a||a;if("failed_and_ended"===l&&!o)return`${l}_no_enddate`;if("next_payment"===l&&!u)return`${l}_no_nextdate`;if("will_start"===l&&!r)return`${l}_no_startdate`;if("will_end"===l&&!o)return`${l}_no_enddate`;if("ended"===l&&!o)return`${l}_no_enddate`;if("will_end_after_payment"===l){if(!o&&!u)return"next_payment_no_nextdate";if(!u)return`${l}_no_nextdate`;if(!o)return`${l}_no_enddate`}return l}export{e as a,n as g};
|
|
@@ -1077,16 +1077,24 @@
|
|
|
1077
1077
|
"subscription-form": {
|
|
1078
1078
|
"header": {
|
|
1079
1079
|
"title_new": "Subscription",
|
|
1080
|
-
"title_existing": "Subscription",
|
|
1081
|
-
"title_recurring": "{{amount, price}} $t(frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"
|
|
1082
|
-
"title_twice_a_month": "{{amount, price}} $t(twice_a_month, { \"ns\": \"
|
|
1083
|
-
"subtitle_failed_and_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }} (failed on {{ first_failed_transaction_date, date }})",
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"
|
|
1087
|
-
"
|
|
1088
|
-
"
|
|
1089
|
-
"
|
|
1080
|
+
"title_existing": "Subscription • {{amount, price}}",
|
|
1081
|
+
"title_recurring": "{{amount, price}} $t(subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer\" })",
|
|
1082
|
+
"title_twice_a_month": "{{amount, price}} $t(subscription-form.twice_a_month, { \"ns\": \"customer\" })",
|
|
1083
|
+
"subtitle_failed_and_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }} (failed on {{ first_failed_transaction_date, date }}).",
|
|
1084
|
+
"subtitle_failed_and_ended_no_enddate": "Including shipping, taxes, etc. Ended (failed on {{ first_failed_transaction_date, date }}).",
|
|
1085
|
+
"subtitle_failed": "Including shipping, taxes, etc. Failed on {{ first_failed_transaction_date, date }}.",
|
|
1086
|
+
"subtitle_will_start": "Including shipping, taxes, etc. Starts on {{ start_date, date }}.",
|
|
1087
|
+
"subtitle_will_start_no_startdate": "Including shipping, taxes, etc. Scheduled to start.",
|
|
1088
|
+
"subtitle_will_end_after_payment": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}, ending {{ end_date, date }}.",
|
|
1089
|
+
"subtitle_will_end_after_payment_no_nextdate": "Including shipping, taxes, etc. Active, ending {{ end_date, date }}.",
|
|
1090
|
+
"subtitle_will_end_after_payment_no_enddate": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}.",
|
|
1091
|
+
"subtitle_will_end": "Including shipping, taxes, etc. Ends on {{ end_date, date }}.",
|
|
1092
|
+
"subtitle_will_end_no_enddate": "Including shipping, taxes, etc. Active, scheduled to end.",
|
|
1093
|
+
"subtitle_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }}.",
|
|
1094
|
+
"subtitle_ended_no_enddate": "Including shipping, taxes, etc. Ended.",
|
|
1095
|
+
"subtitle_next_payment": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}.",
|
|
1096
|
+
"subtitle_next_payment_no_nextdate": "Including shipping, taxes, etc. Active.",
|
|
1097
|
+
"subtitle_inactive": "Including shipping, taxes, etc. Inactive.",
|
|
1090
1098
|
"subtitle": "Including shipping, taxes, etc.",
|
|
1091
1099
|
"copy-id": {
|
|
1092
1100
|
"failed_to_copy": "Failed to copy",
|
|
@@ -919,14 +919,24 @@
|
|
|
919
919
|
"frequency": "$t(customer.subscription-card.{{units}}, { \"count\": {{count}}, \"ns\": \"customer-portal\" })",
|
|
920
920
|
"monthly": "/ Monat",
|
|
921
921
|
"monthly_plural": "/ {{count}} Monate",
|
|
922
|
+
"price": "{{amount, price}}",
|
|
922
923
|
"price_recurring": "{{amount, price}} $t(customer.subscription-card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
923
924
|
"price_twice_a_month": "{{amount, price}} $t(customer.subscription-card.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
925
|
+
"status_failed_and_ended": "Endete am {{ end_date, date }} (fehlgeschlagen am {{ first_failed_transaction_date, date }})",
|
|
926
|
+
"status_failed_and_ended_no_enddate": "Endete (fehlgeschlagen am {{ first_failed_transaction_date, date }})",
|
|
927
|
+
"status_failed": "Fehlgeschlagen am {{ first_failed_transaction_date, date }}",
|
|
928
|
+
"status_will_start": "Beginnt am {{ start_date, date }}",
|
|
929
|
+
"status_will_start_no_startdate": "Geplant zu beginnen",
|
|
930
|
+
"status_will_end_after_payment": "Nächste Zahlung am {{ next_transaction_date, date }}, endet am {{ end_date, date }}",
|
|
931
|
+
"status_will_end_after_payment_no_nextdate": "Aktiv, endet am {{ end_date, date }}",
|
|
932
|
+
"status_will_end_after_payment_no_enddate": "Nächste Zahlung am {{ next_transaction_date, date }}",
|
|
933
|
+
"status_will_end": "Endet am {{ end_date, date }}",
|
|
934
|
+
"status_will_end_no_enddate": "Aktiv, geplant zu enden",
|
|
935
|
+
"status_ended": "Endete am {{ end_date, date }}",
|
|
936
|
+
"status_ended_no_enddate": "Endete",
|
|
937
|
+
"status_next_payment": "Nächste Zahlung am {{ next_transaction_date, date }}",
|
|
938
|
+
"status_next_payment_no_nextdate": "Aktiv",
|
|
939
|
+
"status_inactive": "Inaktiv",
|
|
930
940
|
"transaction_summary": "{{most_expensive_item.name}}",
|
|
931
941
|
"fees_hint": "inc. ",
|
|
932
942
|
"fees_explainer": "Steuern, Versand und Rabatte können den berechneten Betrag ändern.",
|
|
@@ -945,15 +955,25 @@
|
|
|
945
955
|
"subscription-form": {
|
|
946
956
|
"header": {
|
|
947
957
|
"title_new": "Abonnement",
|
|
948
|
-
"title_existing": "Abonnement",
|
|
958
|
+
"title_existing": "Abonnement • {{amount, price}}",
|
|
949
959
|
"title_recurring": "{{amount, price}} $t(customer.subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
950
960
|
"title_twice_a_month": "{{amount, price}} $t(customer.subscription-form.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
961
|
+
"subtitle_failed_and_ended": "Inklusive Versand, Steuern usw. Endete am {{ end_date, date }} (fehlgeschlagen am {{ first_failed_transaction_date, date }}).",
|
|
962
|
+
"subtitle_failed_and_ended_no_enddate": "Inklusive Versand, Steuern usw. Endete (fehlgeschlagen am {{ first_failed_transaction_date, date }}).",
|
|
963
|
+
"subtitle_failed": "Inklusive Versand, Steuern usw. Fehlgeschlagen am {{ first_failed_transaction_date, date }}.",
|
|
964
|
+
"subtitle_will_start": "Inklusive Versand, Steuern usw. Beginnt am {{ start_date, date }}.",
|
|
965
|
+
"subtitle_will_start_no_startdate": "Inklusive Versand, Steuern usw. Geplant zu beginnen.",
|
|
966
|
+
"subtitle_will_end_after_payment": "Inklusive Versand, Steuern usw. Nächste Zahlung am {{ next_transaction_date, date }}, endet am {{ end_date, date }}.",
|
|
967
|
+
"subtitle_will_end_after_payment_no_nextdate": "Inklusive Versand, Steuern usw. Aktiv, endet am {{ end_date, date }}.",
|
|
968
|
+
"subtitle_will_end_after_payment_no_enddate": "Inklusive Versand, Steuern usw. Nächste Zahlung am {{ next_transaction_date, date }}.",
|
|
969
|
+
"subtitle_will_end": "Inklusive Versand, Steuern usw. Endet am {{ end_date, date }}.",
|
|
970
|
+
"subtitle_will_end_no_enddate": "Inklusive Versand, Steuern usw. Aktiv, geplant zu enden.",
|
|
971
|
+
"subtitle_ended": "Inklusive Versand, Steuern usw. Endete am {{ end_date, date }}.",
|
|
972
|
+
"subtitle_ended_no_enddate": "Inklusive Versand, Steuern usw. Endete.",
|
|
973
|
+
"subtitle_next_payment": "Inklusive Versand, Steuern usw. Nächste Zahlung am {{ next_transaction_date, date }}.",
|
|
974
|
+
"subtitle_next_payment_no_nextdate": "Inklusive Versand, Steuern usw. Aktiv.",
|
|
975
|
+
"subtitle_inactive": "Inklusive Versand, Steuern usw. Inaktiv.",
|
|
976
|
+
"subtitle": "Inklusive Versand, Steuern usw.",
|
|
957
977
|
"copy-id": {
|
|
958
978
|
"failed_to_copy": "Kopieren fehlgeschlagen",
|
|
959
979
|
"click_to_copy": "ID kopieren",
|
|
@@ -919,15 +919,23 @@
|
|
|
919
919
|
"frequency": "$t(customer.subscription-card.{{units}}, { \"count\": {{count}}, \"ns\": \"customer-portal\" })",
|
|
920
920
|
"monthly": "/ month",
|
|
921
921
|
"monthly_plural": "/ {{count}} months",
|
|
922
|
+
"price": "{{amount, price}}",
|
|
922
923
|
"price_recurring": "{{amount, price}} $t(customer.subscription-card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
923
924
|
"price_twice_a_month": "{{amount, price}} $t(customer.subscription-card.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
924
925
|
"status_failed_and_ended": "Ended on {{ end_date, date }} (failed on {{ first_failed_transaction_date, date }})",
|
|
926
|
+
"status_failed_and_ended_no_enddate": "Ended (failed on {{ first_failed_transaction_date, date }})",
|
|
925
927
|
"status_failed": "Failed on {{ first_failed_transaction_date, date }}",
|
|
926
928
|
"status_will_start": "Starts on {{ start_date, date }}",
|
|
929
|
+
"status_will_start_no_startdate": "Scheduled to start",
|
|
927
930
|
"status_will_end_after_payment": "Next payment on {{ next_transaction_date, date }}, ending {{ end_date, date }}",
|
|
931
|
+
"status_will_end_after_payment_no_nextdate": "Active, ending {{ end_date, date }}",
|
|
932
|
+
"status_will_end_after_payment_no_enddate": "Next payment on {{ next_transaction_date, date }}",
|
|
928
933
|
"status_will_end": "Ends on {{ end_date, date }}",
|
|
934
|
+
"status_will_end_no_enddate": "Active, scheduled to end",
|
|
929
935
|
"status_ended": "Ended on {{ end_date, date }}",
|
|
936
|
+
"status_ended_no_enddate": "Ended",
|
|
930
937
|
"status_next_payment": "Next payment on {{ next_transaction_date, date }}",
|
|
938
|
+
"status_next_payment_no_nextdate": "Active",
|
|
931
939
|
"status_inactive": "Inactive",
|
|
932
940
|
"transaction_summary": "{{most_expensive_item.name}}",
|
|
933
941
|
"fees_hint": "inc. shipping, taxes, etc.",
|
|
@@ -947,16 +955,24 @@
|
|
|
947
955
|
"subscription-form": {
|
|
948
956
|
"header": {
|
|
949
957
|
"title_new": "Subscription",
|
|
950
|
-
"title_existing": "Subscription",
|
|
958
|
+
"title_existing": "Subscription • {{amount, price}}",
|
|
951
959
|
"title_recurring": "{{amount, price}} $t(customer.subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
952
960
|
"title_twice_a_month": "{{amount, price}} $t(customer.subscription-form.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
953
|
-
"subtitle_failed_and_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }} (failed on {{ first_failed_transaction_date, date }})",
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
957
|
-
"
|
|
958
|
-
"
|
|
959
|
-
"
|
|
961
|
+
"subtitle_failed_and_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }} (failed on {{ first_failed_transaction_date, date }}).",
|
|
962
|
+
"subtitle_failed_and_ended_no_enddate": "Including shipping, taxes, etc. Ended (failed on {{ first_failed_transaction_date, date }}).",
|
|
963
|
+
"subtitle_failed": "Including shipping, taxes, etc. Failed on {{ first_failed_transaction_date, date }}.",
|
|
964
|
+
"subtitle_will_start": "Including shipping, taxes, etc. Starts on {{ start_date, date }}.",
|
|
965
|
+
"subtitle_will_start_no_startdate": "Including shipping, taxes, etc. Scheduled to start.",
|
|
966
|
+
"subtitle_will_end_after_payment": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}, ending {{ end_date, date }}.",
|
|
967
|
+
"subtitle_will_end_after_payment_no_nextdate": "Including shipping, taxes, etc. Active, ending {{ end_date, date }}.",
|
|
968
|
+
"subtitle_will_end_after_payment_no_enddate": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}.",
|
|
969
|
+
"subtitle_will_end": "Including shipping, taxes, etc. Ends on {{ end_date, date }}.",
|
|
970
|
+
"subtitle_will_end_no_enddate": "Including shipping, taxes, etc. Active, scheduled to end.",
|
|
971
|
+
"subtitle_ended": "Including shipping, taxes, etc. Ended on {{ end_date, date }}.",
|
|
972
|
+
"subtitle_ended_no_enddate": "Including shipping, taxes, etc. Ended.",
|
|
973
|
+
"subtitle_next_payment": "Including shipping, taxes, etc. Next payment on {{ next_transaction_date, date }}.",
|
|
974
|
+
"subtitle_next_payment_no_nextdate": "Including shipping, taxes, etc. Active.",
|
|
975
|
+
"subtitle_inactive": "Including shipping, taxes, etc. Inactive.",
|
|
960
976
|
"subtitle": "Including shipping, taxes, etc.",
|
|
961
977
|
"copy-id": {
|
|
962
978
|
"failed_to_copy": "Failed to copy",
|
|
@@ -919,14 +919,24 @@
|
|
|
919
919
|
"frequency": "$t(customer.subscription-card.{{units}}, { \"count\": {{count}}, \"ns\": \"customer-portal\" })",
|
|
920
920
|
"monthly": "/ mes",
|
|
921
921
|
"monthly_plural": "/ {{count}} meses",
|
|
922
|
+
"price": "{{amount, price}}",
|
|
922
923
|
"price_recurring": "{{amount, price}} $t(customer.subscription-card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
923
924
|
"price_twice_a_month": "{{amount, price}} $t(customer.subscription-card.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
925
|
+
"status_failed_and_ended": "Terminó el {{ end_date, date }} (falló el {{ first_failed_transaction_date, date }})",
|
|
926
|
+
"status_failed_and_ended_no_enddate": "Terminó (falló el {{ first_failed_transaction_date, date }})",
|
|
927
|
+
"status_failed": "Falló el {{ first_failed_transaction_date, date }}",
|
|
928
|
+
"status_will_start": "Comienza el {{ start_date, date }}",
|
|
929
|
+
"status_will_start_no_startdate": "Programado para comenzar",
|
|
930
|
+
"status_will_end_after_payment": "Próximo pago el {{ next_transaction_date, date }}, terminando el {{ end_date, date }}",
|
|
931
|
+
"status_will_end_after_payment_no_nextdate": "Activo, terminando el {{ end_date, date }}",
|
|
932
|
+
"status_will_end_after_payment_no_enddate": "Próximo pago el {{ next_transaction_date, date }}",
|
|
933
|
+
"status_will_end": "Termina el {{ end_date, date }}",
|
|
934
|
+
"status_will_end_no_enddate": "Activo, programado para terminar",
|
|
935
|
+
"status_ended": "Terminó el {{ end_date, date }}",
|
|
936
|
+
"status_ended_no_enddate": "Terminó",
|
|
937
|
+
"status_next_payment": "Próximo pago el {{ next_transaction_date, date }}",
|
|
938
|
+
"status_next_payment_no_nextdate": "Activo",
|
|
939
|
+
"status_inactive": "Inactivo",
|
|
930
940
|
"transaction_summary": "{{most_expensive_item.name}}",
|
|
931
941
|
"fees_hint": "incluye envío, impuestos, etc.",
|
|
932
942
|
"fees_explainer": "Los impuestos, el envío y los descuentos pueden cambiar el monto cobrado.",
|
|
@@ -945,15 +955,25 @@
|
|
|
945
955
|
"subscription-form": {
|
|
946
956
|
"header": {
|
|
947
957
|
"title_new": "Suscripción",
|
|
948
|
-
"title_existing": "Suscripción",
|
|
958
|
+
"title_existing": "Suscripción • {{amount, price}}",
|
|
949
959
|
"title_recurring": "{{amount, price}} $t(customer.subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
950
960
|
"title_twice_a_month": "{{amount, price}} $t(customer.subscription-form.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"subtitle_failed": "Incluye envío, impuestos, etc.
|
|
961
|
+
"subtitle_failed_and_ended": "Incluye envío, impuestos, etc. Terminó el {{ end_date, date }} (falló el {{ first_failed_transaction_date, date }}).",
|
|
962
|
+
"subtitle_failed_and_ended_no_enddate": "Incluye envío, impuestos, etc. Terminó (falló el {{ first_failed_transaction_date, date }}).",
|
|
963
|
+
"subtitle_failed": "Incluye envío, impuestos, etc. Falló el {{ first_failed_transaction_date, date }}.",
|
|
964
|
+
"subtitle_will_start": "Incluye envío, impuestos, etc. Comienza el {{ start_date, date }}.",
|
|
965
|
+
"subtitle_will_start_no_startdate": "Incluye envío, impuestos, etc. Programado para comenzar.",
|
|
966
|
+
"subtitle_will_end_after_payment": "Incluye envío, impuestos, etc. Próximo pago el {{ next_transaction_date, date }}, terminando el {{ end_date, date }}.",
|
|
967
|
+
"subtitle_will_end_after_payment_no_nextdate": "Incluye envío, impuestos, etc. Activo, terminando el {{ end_date, date }}.",
|
|
968
|
+
"subtitle_will_end_after_payment_no_enddate": "Incluye envío, impuestos, etc. Próximo pago el {{ next_transaction_date, date }}.",
|
|
969
|
+
"subtitle_will_end": "Incluye envío, impuestos, etc. Termina el {{ end_date, date }}.",
|
|
970
|
+
"subtitle_will_end_no_enddate": "Incluye envío, impuestos, etc. Activo, programado para terminar.",
|
|
971
|
+
"subtitle_ended": "Incluye envío, impuestos, etc. Terminó el {{ end_date, date }}.",
|
|
972
|
+
"subtitle_ended_no_enddate": "Incluye envío, impuestos, etc. Terminó.",
|
|
973
|
+
"subtitle_next_payment": "Incluye envío, impuestos, etc. Próximo pago el {{ next_transaction_date, date }}.",
|
|
974
|
+
"subtitle_next_payment_no_nextdate": "Incluye envío, impuestos, etc. Activo.",
|
|
954
975
|
"subtitle_inactive": "Incluye envío, impuestos, etc. Inactivo.",
|
|
955
|
-
"
|
|
956
|
-
"subtitle_will_be_active": "Incluye envío, impuestos, etc. Comienza el {{date, date}}.",
|
|
976
|
+
"subtitle": "Incluye envío, impuestos, etc.",
|
|
957
977
|
"copy-id": {
|
|
958
978
|
"failed_to_copy": "Error al copiar",
|
|
959
979
|
"click_to_copy": "Copiar ID",
|
|
@@ -919,14 +919,24 @@
|
|
|
919
919
|
"frequency": "$t(customer.subscription-card.{{units}}, { \"count\": {{count}}, \"ns\": \"customer-portal\" })",
|
|
920
920
|
"monthly": "/ mois",
|
|
921
921
|
"monthly_plural": "/ {{count}} mois",
|
|
922
|
+
"price": "{{amount, price}}",
|
|
922
923
|
"price_recurring": "{{amount, price}} $t(customer.subscription-card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
923
924
|
"price_twice_a_month": "{{amount, price}} $t(customer.subscription-card.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
925
|
+
"status_failed_and_ended": "Terminé le {{ end_date, date }} (échoué le {{ first_failed_transaction_date, date }})",
|
|
926
|
+
"status_failed_and_ended_no_enddate": "Terminé (échoué le {{ first_failed_transaction_date, date }})",
|
|
927
|
+
"status_failed": "Échoué le {{ first_failed_transaction_date, date }}",
|
|
928
|
+
"status_will_start": "Commence le {{ start_date, date }}",
|
|
929
|
+
"status_will_start_no_startdate": "Prévu pour commencer",
|
|
930
|
+
"status_will_end_after_payment": "Prochain paiement le {{ next_transaction_date, date }}, fin le {{ end_date, date }}",
|
|
931
|
+
"status_will_end_after_payment_no_nextdate": "Actif, fin le {{ end_date, date }}",
|
|
932
|
+
"status_will_end_after_payment_no_enddate": "Prochain paiement le {{ next_transaction_date, date }}",
|
|
933
|
+
"status_will_end": "Se termine le {{ end_date, date }}",
|
|
934
|
+
"status_will_end_no_enddate": "Actif, prévu pour se terminer",
|
|
935
|
+
"status_ended": "Terminé le {{ end_date, date }}",
|
|
936
|
+
"status_ended_no_enddate": "Terminé",
|
|
937
|
+
"status_next_payment": "Prochain paiement le {{ next_transaction_date, date }}",
|
|
938
|
+
"status_next_payment_no_nextdate": "Actif",
|
|
939
|
+
"status_inactive": "Inactif",
|
|
930
940
|
"transaction_summary": "{{most_expensive_item.name}}",
|
|
931
941
|
"fees_hint": "inc. ",
|
|
932
942
|
"fees_explainer": "Les taxes, les frais d'expédition et les réductions peuvent modifier le montant facturé.",
|
|
@@ -945,15 +955,25 @@
|
|
|
945
955
|
"subscription-form": {
|
|
946
956
|
"header": {
|
|
947
957
|
"title_new": "Abonnement",
|
|
948
|
-
"title_existing": "Abonnement",
|
|
958
|
+
"title_existing": "Abonnement • {{amount, price}}",
|
|
949
959
|
"title_recurring": "{{amount, price}} $t(customer.subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
950
960
|
"title_twice_a_month": "{{amount, price}} $t(customer.subscription-form.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"subtitle_failed": "
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
961
|
+
"subtitle_failed_and_ended": "Y compris les frais de port, taxes, etc. Terminé le {{ end_date, date }} (échoué le {{ first_failed_transaction_date, date }}).",
|
|
962
|
+
"subtitle_failed_and_ended_no_enddate": "Y compris les frais de port, taxes, etc. Terminé (échoué le {{ first_failed_transaction_date, date }}).",
|
|
963
|
+
"subtitle_failed": "Y compris les frais de port, taxes, etc. Échoué le {{ first_failed_transaction_date, date }}.",
|
|
964
|
+
"subtitle_will_start": "Y compris les frais de port, taxes, etc. Commence le {{ start_date, date }}.",
|
|
965
|
+
"subtitle_will_start_no_startdate": "Y compris les frais de port, taxes, etc. Prévu pour commencer.",
|
|
966
|
+
"subtitle_will_end_after_payment": "Y compris les frais de port, taxes, etc. Prochain paiement le {{ next_transaction_date, date }}, fin le {{ end_date, date }}.",
|
|
967
|
+
"subtitle_will_end_after_payment_no_nextdate": "Y compris les frais de port, taxes, etc. Actif, fin le {{ end_date, date }}.",
|
|
968
|
+
"subtitle_will_end_after_payment_no_enddate": "Y compris les frais de port, taxes, etc. Prochain paiement le {{ next_transaction_date, date }}.",
|
|
969
|
+
"subtitle_will_end": "Y compris les frais de port, taxes, etc. Se termine le {{ end_date, date }}.",
|
|
970
|
+
"subtitle_will_end_no_enddate": "Y compris les frais de port, taxes, etc. Actif, prévu pour se terminer.",
|
|
971
|
+
"subtitle_ended": "Y compris les frais de port, taxes, etc. Terminé le {{ end_date, date }}.",
|
|
972
|
+
"subtitle_ended_no_enddate": "Y compris les frais de port, taxes, etc. Terminé.",
|
|
973
|
+
"subtitle_next_payment": "Y compris les frais de port, taxes, etc. Prochain paiement le {{ next_transaction_date, date }}.",
|
|
974
|
+
"subtitle_next_payment_no_nextdate": "Y compris les frais de port, taxes, etc. Actif.",
|
|
975
|
+
"subtitle_inactive": "Y compris les frais de port, taxes, etc. Inactif.",
|
|
976
|
+
"subtitle": "Y compris les frais de port, taxes, etc.",
|
|
957
977
|
"copy-id": {
|
|
958
978
|
"failed_to_copy": "Échec de la copie",
|
|
959
979
|
"click_to_copy": "Copier l'ID",
|
|
@@ -919,14 +919,24 @@
|
|
|
919
919
|
"frequency": "$t(customer.subscription-card.{{units}}, { \"count\": {{count}}, \"ns\": \"customer-portal\" })",
|
|
920
920
|
"monthly": "/ maand",
|
|
921
921
|
"monthly_plural": "/ {{count}} maanden",
|
|
922
|
+
"price": "{{amount, price}}",
|
|
922
923
|
"price_recurring": "{{amount, price}} $t(customer.subscription-card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
923
924
|
"price_twice_a_month": "{{amount, price}} $t(customer.subscription-card.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
924
|
-
"
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
"
|
|
928
|
-
"
|
|
929
|
-
"
|
|
925
|
+
"status_failed_and_ended": "Beëindigd op {{ end_date, date }} (mislukt op {{ first_failed_transaction_date, date }})",
|
|
926
|
+
"status_failed_and_ended_no_enddate": "Beëindigd (mislukt op {{ first_failed_transaction_date, date }})",
|
|
927
|
+
"status_failed": "Mislukt op {{ first_failed_transaction_date, date }}",
|
|
928
|
+
"status_will_start": "Begint op {{ start_date, date }}",
|
|
929
|
+
"status_will_start_no_startdate": "Gepland om te beginnen",
|
|
930
|
+
"status_will_end_after_payment": "Volgende betaling op {{ next_transaction_date, date }}, eindigt {{ end_date, date }}",
|
|
931
|
+
"status_will_end_after_payment_no_nextdate": "Actief, eindigt {{ end_date, date }}",
|
|
932
|
+
"status_will_end_after_payment_no_enddate": "Volgende betaling op {{ next_transaction_date, date }}",
|
|
933
|
+
"status_will_end": "Eindigt op {{ end_date, date }}",
|
|
934
|
+
"status_will_end_no_enddate": "Actief, gepland om te eindigen",
|
|
935
|
+
"status_ended": "Beëindigd op {{ end_date, date }}",
|
|
936
|
+
"status_ended_no_enddate": "Beëindigd",
|
|
937
|
+
"status_next_payment": "Volgende betaling op {{ next_transaction_date, date }}",
|
|
938
|
+
"status_next_payment_no_nextdate": "Actief",
|
|
939
|
+
"status_inactive": "Inactief",
|
|
930
940
|
"transaction_summary": "{{most_expensive_item.name}}",
|
|
931
941
|
"fees_hint": "incl. ",
|
|
932
942
|
"fees_explainer": "Belastingen, verzendkosten en kortingen kunnen het in rekening gebrachte bedrag wijzigen.",
|
|
@@ -945,15 +955,25 @@
|
|
|
945
955
|
"subscription-form": {
|
|
946
956
|
"header": {
|
|
947
957
|
"title_new": "Abonnement",
|
|
948
|
-
"title_existing": "Abonnement",
|
|
958
|
+
"title_existing": "Abonnement • {{amount, price}}",
|
|
949
959
|
"title_recurring": "{{amount, price}} $t(customer.subscription-form.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" })",
|
|
950
960
|
"title_twice_a_month": "{{amount, price}} $t(customer.subscription-form.twice_a_month, { \"ns\": \"customer-portal\" })",
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"subtitle_failed": "Inclusief verzendkosten, belastingen etc.
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
961
|
+
"subtitle_failed_and_ended": "Inclusief verzendkosten, belastingen, etc. Beëindigd op {{ end_date, date }} (mislukt op {{ first_failed_transaction_date, date }}).",
|
|
962
|
+
"subtitle_failed_and_ended_no_enddate": "Inclusief verzendkosten, belastingen, etc. Beëindigd (mislukt op {{ first_failed_transaction_date, date }}).",
|
|
963
|
+
"subtitle_failed": "Inclusief verzendkosten, belastingen, etc. Mislukt op {{ first_failed_transaction_date, date }}.",
|
|
964
|
+
"subtitle_will_start": "Inclusief verzendkosten, belastingen, etc. Begint op {{ start_date, date }}.",
|
|
965
|
+
"subtitle_will_start_no_startdate": "Inclusief verzendkosten, belastingen, etc. Gepland om te beginnen.",
|
|
966
|
+
"subtitle_will_end_after_payment": "Inclusief verzendkosten, belastingen, etc. Volgende betaling op {{ next_transaction_date, date }}, eindigt {{ end_date, date }}.",
|
|
967
|
+
"subtitle_will_end_after_payment_no_nextdate": "Inclusief verzendkosten, belastingen, etc. Actief, eindigt {{ end_date, date }}.",
|
|
968
|
+
"subtitle_will_end_after_payment_no_enddate": "Inclusief verzendkosten, belastingen, etc. Volgende betaling op {{ next_transaction_date, date }}.",
|
|
969
|
+
"subtitle_will_end": "Inclusief verzendkosten, belastingen, etc. Eindigt op {{ end_date, date }}.",
|
|
970
|
+
"subtitle_will_end_no_enddate": "Inclusief verzendkosten, belastingen, etc. Actief, gepland om te eindigen.",
|
|
971
|
+
"subtitle_ended": "Inclusief verzendkosten, belastingen, etc. Beëindigd op {{ end_date, date }}.",
|
|
972
|
+
"subtitle_ended_no_enddate": "Inclusief verzendkosten, belastingen, etc. Beëindigd.",
|
|
973
|
+
"subtitle_next_payment": "Inclusief verzendkosten, belastingen, etc. Volgende betaling op {{ next_transaction_date, date }}.",
|
|
974
|
+
"subtitle_next_payment_no_nextdate": "Inclusief verzendkosten, belastingen, etc. Actief.",
|
|
975
|
+
"subtitle_inactive": "Inclusief verzendkosten, belastingen, etc. Inactief.",
|
|
976
|
+
"subtitle": "Inclusief verzendkosten, belastingen, etc.",
|
|
957
977
|
"copy-id": {
|
|
958
978
|
"failed_to_copy": "Kopiëren mislukt",
|
|
959
979
|
"click_to_copy": "ID kopiëren",
|