@foxy.io/elements 1.18.0-beta.1 → 1.18.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +15 -15
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-report-form.js +6 -6
- package/dist/cdn/foxy-reports-table.js +6 -6
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +2 -2
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +5 -5
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/shared-0b9c755c.js +1 -0
- package/dist/cdn/{shared-45feee83.js → shared-16d10bca.js} +1 -1
- package/dist/cdn/{shared-4eae0021.js → shared-29dd9d87.js} +1 -1
- package/dist/cdn/{shared-97654b20.js → shared-2caab7af.js} +1 -1
- package/dist/cdn/{shared-7c977470.js → shared-2f186d21.js} +1 -1
- package/dist/cdn/{shared-93d93d79.js → shared-2f19b670.js} +1 -1
- package/dist/cdn/{shared-98497473.js → shared-30bb4828.js} +1 -1
- package/dist/cdn/{shared-0561e4c0.js → shared-4473f0cf.js} +1 -1
- package/dist/cdn/{shared-80ca2f70.js → shared-4f8fe424.js} +1 -1
- package/dist/cdn/{shared-e144edd2.js → shared-5652560a.js} +1 -1
- package/dist/cdn/{shared-e9a4a204.js → shared-58a35351.js} +1 -1
- package/dist/cdn/{shared-6bcd6831.js → shared-5f411ce2.js} +1 -1
- package/dist/cdn/{shared-e28fb2ef.js → shared-6c1aab74.js} +1 -1
- package/dist/cdn/{shared-18fa34a8.js → shared-6eeb69e7.js} +1 -1
- package/dist/cdn/{shared-26ce8d23.js → shared-75e34b5b.js} +1 -1
- package/dist/cdn/{shared-354e0ed8.js → shared-8166ba00.js} +1 -1
- package/dist/cdn/{shared-1eb23210.js → shared-824f6e03.js} +1 -1
- package/dist/cdn/{shared-ac44429d.js → shared-89dce718.js} +1 -1
- package/dist/cdn/{shared-7b7b6065.js → shared-95f4cffd.js} +1 -1
- package/dist/cdn/shared-b772fbb1.js +15 -0
- package/dist/cdn/{shared-4b85b408.js → shared-d673b138.js} +1 -1
- package/dist/cdn/{shared-91a28cfe.js → shared-d6ed2e5c.js} +1 -1
- package/dist/cdn/{shared-c73ca2c5.js → shared-da130124.js} +1 -1
- package/dist/cdn/{shared-e8312a29.js → shared-e25c676a.js} +1 -1
- package/dist/cdn/{shared-7c8bb60c.js → shared-e6a7b2f1.js} +1 -1
- package/dist/cdn/{shared-9d905cdc.js → shared-f966bbc3.js} +1 -1
- package/dist/cdn/{shared-593c3727.js → shared-fcdc4903.js} +1 -1
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +1 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +9 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +10 -23
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +1 -2
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +1 -1
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-4de4a8bc.js +0 -1
- package/dist/cdn/shared-92327224.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-30bb4828.js";import{N as s}from"./shared-89dce718.js";import{T as i,a as r}from"./shared-33b47806.js";import{c as a}from"./shared-4e709717.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./shared-9803aa7c.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";let o,n,d,c,l,m,h,p,u,f,v,y,_=t=>t;const $=i(e(r(s,"transaction-card")));class x extends ${constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(o||(o=_` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(n||(n=_` <div class="flex items-center justify-between"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){const t=await super._sendGet(),e=await super._fetch(t._links["fx:store"].href);return this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",t}__renderTotal(){const e=this.data;let s;if(e){const i=`${e.total_order} ${e.currency_code}`,r=this.__currencyDisplay;s=t(d||(d=_` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:i,currencyDisplay:r}),this.lang,this.ns)}else s=t(c||(c=_`​`));return t(l||(l=_` <div data-testid="total"> ${0} <div class="font-semibold truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const a=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(m||(m=_` <div data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[a])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${a}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[a])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count:i.length};r=t(h||(h=_` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(p||(p=_`​`));return t(u||(u=_` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(f||(f=_`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(v||(v=_`​`));return t(y||(y=_` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",x);export{x as TransactionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-c73ca2c5.js";import"./shared-e8312a29.js";import{a as t,I as o}from"./shared-4eae0021.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as r,c as e}from"./shared-dc73b9a5.js";import{i}from"./shared-9803aa7c.js";import"./shared-d539ee69.js";import"./shared-e28fb2ef.js";import{_ as s}from"./shared-fadcb2e1.js";import{N as n}from"./shared-ac44429d.js";import{a}from"./shared-33b47806.js";import{B as d}from"./shared-92327224.js";import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-98497473.js";import"./shared-4e709717.js";import"./shared-45feee83.js";import"./shared-7684cb05.js";import"./shared-7c8bb60c.js";import"./shared-2b077e01.js";import"./shared-8936b109.js";import"./shared-32b15545.js";import"./shared-dbdc2a38.js";import"./shared-97654b20.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-354e0ed8.js";import"./shared-80ca2f70.js";import"./shared-48ef8a04.js";import"./shared-9f9cdbb0.js";import"./shared-59796faa.js";import"./shared-9d905cdc.js";import"./foxy-address-card.js";import"./shared-d6dd67a5.js";import"./foxy-item-card.js";import"./shared-4b85b408.js";import"./shared-7c977470.js";import"./foxy-item-option-form.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-coupon-card.js";import"./shared-91a28cfe.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-1eb23210.js";import"./shared-2061be9a.js";import"./shared-7ed7818e.js";import"./foxy-subscription-card.js";import"./shared-593c3727.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-7b7b6065.js";import"./shared-6bcd6831.js";import"./foxy-table.js";import"./shared-0561e4c0.js";import"./foxy-nucleon-element.js";import"./shared-26ce8d23.js";import"./shared-1bbd9b73.js";import"./shared-93d93d79.js";import"./foxy-pagination.js";import"./shared-0eb966c5.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-18fa34a8.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends t{renderControl(){var t,o,e,s;return r(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,o="fail"===t?"error":"idle"===t?this.theme:"";return r(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),o,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const o=new n.API(this),r=await o.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=r.ok?"idle":"fail",r.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends t{renderControl(){var t,o,e,i,s,n,a,d;return r(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,o;return r(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,o;return r(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,o,e;return r(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,o,e;return r(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends t{renderControl(){var t;return r(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,o;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o.status)||"completed";return r(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;if(!o)return r(b||(b=w`--`));const i={amount:`${o.total_order} ${e}`};return r($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==o?void 0:o[t]} ${e}`};return r(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,o?r(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):r(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(o,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,o,r;return Boolean(null!==(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==o?o:null===(r=this.data)||void 0===r?void 0:r._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,o,e,s,n,a;return r(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(o=this.data)||void 0===o?void 0:o._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
1
|
+
import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-da130124.js";import"./shared-e25c676a.js";import{a as t,I as o}from"./shared-29dd9d87.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as r,c as e}from"./shared-dc73b9a5.js";import{i}from"./shared-9803aa7c.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import{_ as s}from"./shared-fadcb2e1.js";import{N as n}from"./shared-89dce718.js";import{a}from"./shared-33b47806.js";import{B as d}from"./shared-b772fbb1.js";import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-30bb4828.js";import"./shared-4e709717.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-2b077e01.js";import"./shared-8936b109.js";import"./shared-32b15545.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-8166ba00.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-9f9cdbb0.js";import"./shared-59796faa.js";import"./shared-f966bbc3.js";import"./foxy-address-card.js";import"./shared-d6dd67a5.js";import"./foxy-item-card.js";import"./shared-d673b138.js";import"./shared-2f186d21.js";import"./foxy-item-option-form.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-coupon-card.js";import"./shared-d6ed2e5c.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-824f6e03.js";import"./shared-2061be9a.js";import"./shared-7ed7818e.js";import"./foxy-subscription-card.js";import"./shared-fcdc4903.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-95f4cffd.js";import"./shared-5f411ce2.js";import"./foxy-table.js";import"./shared-4473f0cf.js";import"./foxy-nucleon-element.js";import"./shared-75e34b5b.js";import"./shared-1bbd9b73.js";import"./shared-2f19b670.js";import"./foxy-pagination.js";import"./shared-0eb966c5.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-6eeb69e7.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends t{renderControl(){var t,o,e,s;return r(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,o="fail"===t?"error":"idle"===t?this.theme:"";return r(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),o,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const o=new n.API(this),r=await o.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=r.ok?"idle":"fail",r.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends t{renderControl(){var t,o,e,i,s,n,a,d;return r(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,o;return r(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,o;return r(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,o,e;return r(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,o,e;return r(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,b,_,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends t{renderControl(){var t;return r(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,o;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o.status)||"completed";return r(b||(b=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;if(!o)return r(_||(_=w`--`));const i={amount:`${o.total_order} ${e}`};return r($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==o?void 0:o[t]} ${e}`};return r(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,o?r(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):r(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(o,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,o,r;return Boolean(null!==(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==o?o:null===(r=this.data)||void 0===r?void 0:r._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,o,e,s,n,a;return r(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(o=this.data)||void 0===o?void 0:o._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{T as s}from"./shared-2f19b670.js";export{T as TransactionsTable}from"./shared-2f19b670.js";import"./shared-c13674cb.js";import"./shared-33b47806.js";import"./shared-fadcb2e1.js";import"./shared-dc73b9a5.js";import"./shared-b772fbb1.js";import"./shared-4473f0cf.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-32b15545.js";import"./shared-d539ee69.js";import"./shared-
|
|
1
|
+
import"./shared-32b15545.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import"./foxy-spinner.js";import"./shared-da130124.js";export{U as UserForm}from"./shared-0b9c755c.js";import"./shared-8936b109.js";import"./shared-c13674cb.js";import"./shared-33b47806.js";import"./shared-fadcb2e1.js";import"./shared-dc73b9a5.js";import"./shared-8166ba00.js";import"./shared-16d10bca.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-fd001fd3.js";import"./shared-4fc53390.js";import"./shared-e06de519.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-e6a7b2f1.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-89dce718.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-d539ee69.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-
|
|
1
|
+
import"./shared-d539ee69.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-0b9c755c.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{h as e}from"./shared-dc73b9a5.js";import{T as a}from"./shared-4473f0cf.js";import{a as t}from"./shared-33b47806.js";import"./shared-8936b109.js";import"./shared-c13674cb.js";import"./shared-6c1aab74.js";import"./shared-fadcb2e1.js";import"./shared-8166ba00.js";import"./shared-16d10bca.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-32b15545.js";import"./shared-e06de519.js";import"./shared-fd001fd3.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-e6a7b2f1.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-89dce718.js";import"./shared-b738ee96.js";import"./shared-4fc53390.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return e(r||(r=p` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}f.nameColumn={cell:s=>e(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},f.emailColumn={hideBelow:"md",cell:s=>e(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:a=>e(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=p` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},f.actionsColumn={cell:s=>e(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import{I as s}from"./shared-
|
|
1
|
+
import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import{I as s}from"./shared-d673b138.js";import{h as e}from"./shared-dc73b9a5.js";import{a as i}from"./shared-33b47806.js";import"./shared-c13674cb.js";import"./foxy-spinner.js";import"./shared-da130124.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";let a,r=s=>s;class o extends(i(s,"webhook-card")){renderBody(){var s,i,o,t;return e(a||(a=r` <div class="grid grid-cols-1 gap-s leading-none"> <p class="flex justify-between items-center font-semibold"> <span class="truncate">${0}​</span> <span class="uppercase inline-block text-xs bg-contrast-5 rounded p-xs flex-shrink-0"> ${0}​ </span> </p> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:language"></iron-icon> <p class="truncate">${0}​</p> </div> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:settings-input-antenna"> </iron-icon> <p class="truncate">${0}​</p> </div> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(i=this.data)||void 0===i?void 0:i.format,null===(o=this.data)||void 0===o?void 0:o.url,null===(t=this.data)||void 0===t?void 0:t.event_resource)}}customElements.define("foxy-webhook-card",o);export{o as WebhookCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-e25c676a.js";import{E as e,C as t,T as r,D as o}from"./shared-8936b109.js";import{h as i,G as s,P as a}from"./shared-c13674cb.js";import"./shared-32b15545.js";import{F as n}from"./shared-fd001fd3.js";import{I as l}from"./shared-2f186d21.js";import"./shared-da130124.js";import{_ as d}from"./shared-fadcb2e1.js";import{i as h}from"./shared-9803aa7c.js";import{h as c}from"./shared-dc73b9a5.js";import{I as u}from"./shared-29dd9d87.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as p}from"./shared-33b47806.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-4fc53390.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./shared-6c1aab74.js";import"./shared-d539ee69.js";import"./shared-8166ba00.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-e1c1e8e2.js";import"./shared-d673b138.js";const b=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -122,13 +122,13 @@ import"./shared-e8312a29.js";import{E as e,C as t,T as r,D as o}from"./shared-89
|
|
|
122
122
|
}
|
|
123
123
|
</style>
|
|
124
124
|
</template>
|
|
125
|
-
</dom-module>`;document.head.appendChild(
|
|
125
|
+
</dom-module>`;document.head.appendChild(b.content);
|
|
126
126
|
/**
|
|
127
127
|
@license
|
|
128
128
|
Copyright (c) 2017 Vaadin Ltd.
|
|
129
129
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
130
130
|
*/
|
|
131
|
-
class
|
|
131
|
+
class m extends(e(t(r(s(a))))){static get template(){return i`
|
|
132
132
|
<style>
|
|
133
133
|
:host {
|
|
134
134
|
display: inline-block;
|
|
@@ -172,7 +172,7 @@ class b extends(e(t(r(s(a))))){static get template(){return i`
|
|
|
172
172
|
<slot></slot>
|
|
173
173
|
</span>
|
|
174
174
|
</label>
|
|
175
|
-
`}static get is(){return"vaadin-radio-button"}static get version(){return"1.5.4"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(
|
|
175
|
+
`}static get is(){return"vaadin-radio-button"}static get version(){return"1.5.4"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(m.is,m);const f=i`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
|
|
176
176
|
<template>
|
|
177
177
|
<style include="lumo-required-field">
|
|
178
178
|
:host {
|
|
@@ -315,4 +315,4 @@ class v extends(r(o(a))){static get template(){return i`
|
|
|
315
315
|
|
|
316
316
|
<div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
|
|
317
317
|
</div>
|
|
318
|
-
`}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new n(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=v._uniqueId=1+v._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof
|
|
318
|
+
`}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new n(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=v._uniqueId=1+v._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof m))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(v.is,v);let g,y,_=e=>e;customElements.define("foxy-internal-radio-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return d(d({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return c(g||(g=_` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>c(y||(y=_` <vaadin-radio-button value="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,e.label))))}});let x,k,B=e=>e;class E extends(p(u,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}renderBody(){return c(x||(x=B` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?c(k||(k=B` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",E);export{E as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-da130124.js";import{I as e}from"./shared-d673b138.js";import{a as s}from"./shared-33b47806.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./foxy-spinner.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";let o,a=e=>e;class t extends(s(e,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(o||(o=a` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-semibold"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}​ </span> </p> <p class="text-tertiary">${0}​</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-da130124.js";import{I as s}from"./shared-d673b138.js";import{a as e}from"./shared-33b47806.js";import{h as t}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./foxy-spinner.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";let a,o=s=>s;const d=e(s,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return t(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-semibold" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},r({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-32b15545.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{C as e}from"./shared-e06de519.js";import"./shared-2caab7af.js";import"./shared-8166ba00.js";import"./shared-4f8fe424.js";import{s,h as t}from"./shared-dc73b9a5.js";import{S as i,T as a,a as r}from"./shared-33b47806.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-c5a638d1.js";import{m as n}from"./shared-b772fbb1.js";import{G as l}from"./shared-48ef8a04.js";import"./shared-8936b109.js";import"./shared-fd001fd3.js";import"./shared-dbdc2a38.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-30bb4828.js";import{N as h}from"./shared-89dce718.js";import{i as m}from"./shared-9803aa7c.js";import{v as c}from"./shared-b738ee96.js";let C,f,p,g,u=e=>e;const v=[{property:"is_merchant",icon:s(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:s(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:s(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:s(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let y,x,_,b=e=>e;const $=i(a(d(r(h,"user-form"))));class w extends ${constructor(){super(...arguments),this.__getValidator=n((e=>()=>!this.errors.some((s=>s.startsWith(e))))),this.__bindField=n((e=>s=>{const t=s.target;this.edit({[e]:t.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&c(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){var e,s;const i=this.in({idle:{template:{dirty:"valid"}}}),a=this.in({idle:{snapshot:{dirty:"valid"}}}),r=i||a,n=this.in("busy"),l=this.in("fail"),d=n||l||this.disabled;return t(y||(y=b` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>t(x||(x=b` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,d,this.readonly,this.t(e),m(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),v.map(((e,s)=>t(_||(_=b` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),s>0?"border-contrast-10":"hidden",this.readonly,d,this.form[e.property],(s=>{const t=s.target;this.edit({[e.property]:t.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!r||d,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n&&!l}),l?"error":n?"busy":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__getErrorMessage(e){const s=this.errors.find((s=>s.startsWith(e)));return s?this.t(s.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",w);export{w as U,v as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,A as t}from"./shared-
|
|
1
|
+
import{F as e,A as t}from"./shared-b772fbb1.js";class s extends t{constructor(t){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((c,a)=>{const o="string"==typeof n[0]?new s.WHATWGRequest(...n):n[0];o.headers.set("Content-Type","application/json"),o.headers.set("FOXY-API-VERSION","1");const r=new e("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:o,resolve:c,reject:a});t.dispatchEvent(r),r.defaultPrevented||fetch(o).then(c).catch(a)}))})}}s.FetchEvent=e;export{s as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-da130124.js";import"./shared-e1c1e8e2.js";import{I as e,_ as t}from"./shared-fadcb2e1.js";import{C as r}from"./shared-30bb4828.js";import{a as n,T as i}from"./shared-33b47806.js";import{L as s,h as a,r as o,c as l}from"./shared-dc73b9a5.js";import{N as d}from"./shared-89dce718.js";import{Q as c}from"./shared-b772fbb1.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import"./foxy-spinner.js";import{c as p}from"./shared-4e709717.js";let u,f,m,h,y=e=>e;class v extends(r(n(i(e(s))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return t(t({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof d?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null}updated(e){if(super.updated(e),"string"==typeof this.infer){const e=a(u||(u=y` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);o(e,this)}}renderControl(){return a(f||(f=y``))}render(){return this.hidden?a(m||(m=y``)):a(h||(h=y` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",v);let x,b=e=>e;customElements.define("foxy-internal-delete-control",class extends v{constructor(){super(...arguments),this.theme="primary error"}static get properties(){return t(t({},super.properties),{},{theme:{type:String}})}renderControl(){return a(x||(x=b` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let _,g=e=>e;customElements.define("foxy-internal-create-control",class extends v{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return t(t({},super.properties),{},{theme:{type:String}})}renderControl(){return a(_||(_=g` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let $,I,w=e=>e;customElements.define("foxy-internal-timestamps-control",class extends v{static get styles(){return[super.styles,l($||($=w`.max-w-0{max-width:0}`))]}renderControl(){return a(I||(I=w` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_created"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_modified"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> </tbody> </table> `),JSON.stringify({value:c(this,"nucleon.form.date_created")}),JSON.stringify({value:c(this,"nucleon.form.date_modified")}))}});let S,j,C,T=e=>e;const k=r(i(d));class E extends k{renderBody(){return this.data?a(S||(S=T` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):a(j||(j=T`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return a(C||(C=T` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),p({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),p({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}}customElements.define("foxy-internal-form",E);export{E as I,v as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as e,_ as t}from"./shared-fadcb2e1.js";import{F as s}from"./shared-fd001fd3.js";import{E as a,T as i}from"./shared-8936b109.js";import"./shared-dbdc2a38.js";import"./shared-12f8034b.js";import"./shared-32b15545.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-dc73b9a5.js";import{h as u,P as c}from"./shared-c13674cb.js";import"./shared-c5a638d1.js";import{p as m}from"./shared-
|
|
1
|
+
import{I as e,_ as t}from"./shared-fadcb2e1.js";import{F as s}from"./shared-fd001fd3.js";import{E as a,T as i}from"./shared-8936b109.js";import"./shared-dbdc2a38.js";import"./shared-12f8034b.js";import"./shared-32b15545.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-dc73b9a5.js";import{h as u,P as c}from"./shared-c13674cb.js";import"./shared-c5a638d1.js";import{p as m}from"./shared-da130124.js";import{a as p,y as v}from"./shared-33b47806.js";import{T as g,U as b,V as _,W as y,X as f,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-b772fbb1.js";import{s as z}from"./shared-99940888.js";import{i as q}from"./shared-e6a7b2f1.js";var L={raise:g,send:b,sendParent:_,sendUpdate:y,log:f,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)s[a]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-required-field">
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-32b15545.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-32b15545.js";import{a as e}from"./shared-29dd9d87.js";import{_ as t}from"./shared-fadcb2e1.js";import{i as r}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";class i extends e{constructor(){super(...arguments),this.getValue=()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]},this.setValue=e=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.edit({[this.property]:e})},this.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.requestUpdate("helperText",this.__helperText),this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){this.requestUpdate("property",this.__property),this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.requestUpdate("label",this.__label),this.__label=e}resetPlaceholder(){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=null}resetHelperText(){this.requestUpdate("helperText",this.__helperText),this.__helperText=null}resetV8nPrefix(){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=null}resetProperty(){this.requestUpdate("property",this.__property),this.__property=null}resetLabel(){this.requestUpdate("label",this.__label),this.__label=null}get _value(){return this.getValue()}set _value(e){const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)))}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",i);let l,h=e=>e;customElements.define("foxy-internal-text-control",class extends i{renderControl(){return s(l||(l=h` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> `),r(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});export{i as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as t}from"./shared-
|
|
1
|
+
import{T as t}from"./shared-4473f0cf.js";import{a as s}from"./shared-33b47806.js";let e,n,a,o,l,i,r=t=>t;class c extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.idColumn,c.dateColumn,c.receiptColumn]}}c.priceColumn={cell:t=>t.html(e||(e=r`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n totals"
|
|
4
4
|
class="text-m font-semibold font-tnum"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-fadcb2e1.js";import{h as t}from"./shared-dc73b9a5.js";import{B as r}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-fadcb2e1.js";import{h as t}from"./shared-dc73b9a5.js";import{B as r}from"./shared-b772fbb1.js";import{i as s}from"./shared-9803aa7c.js";let o,i,l=e=>e;const n=n=>class extends n{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=r.False,this.disabled=!1,this.disabledControls=r.False,this.hidden=!1,this.hiddenControls=r.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return e(e({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}}})}get readonlySelector(){return this.readonly?r.True:this.readonlyControls}get disabledSelector(){return this.disabled?r.True:this.disabledControls}get hiddenSelector(){return this.hidden?r.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(t=!1){const r=t?{}:e({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,r){const n=null!=e?e:"default",d=this.templates[n];if(!d)return t(o||(o=l`<slot name="${0}"></slot>`),s(e));return t(i||(i=l` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),n,(()=>{try{const e=null!=r?r:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(t,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(e){var t,s,o,i,l,n,d,a,h;if(super.applyInferredProperties(e),null===this.infer)return;const c=e.get("disabledSelector"),u=e.get("disabled"),p=e.get("readonlySelector"),m=e.get("readonly"),b=e.get("hiddenSelector"),f=e.get("hidden"),v=e.get("templates"),y=e.get("mode");this.disabledControls=null!==(t=null==c?void 0:c.zoom(this.infer))&&void 0!==t?t:r.False,this.disabled=null!==(o=null!==(s=null==c?void 0:c.matches(this.infer,!0))&&void 0!==s?s:u)&&void 0!==o&&o,this.readonlyControls=null!==(i=null==p?void 0:p.zoom(this.infer))&&void 0!==i?i:r.False,this.readonly=null!==(n=null!==(l=null==p?void 0:p.matches(this.infer,!0))&&void 0!==l?l:m)&&void 0!==n&&n,this.hiddenControls=null!==(d=null==b?void 0:b.zoom(this.infer))&&void 0!==d?d:r.False,this.hidden=null!==(h=null!==(a=null==b?void 0:b.matches(this.infer,!0))&&void 0!==a?a:f)&&void 0!==h&&h,this.templates=null!=v?v:{},this.templates=this.getNestedTemplates(this.infer),this.mode=null!=y?y:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{n as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-fadcb2e1.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-fadcb2e1.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-30bb4828.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-33b47806.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-89dce718.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e}from"./shared-fadcb2e1.js";import{a as t,E as s,T as i,C as n}from"./shared-8936b109.js";import{T as r}from"./shared-32b15545.js";import{O as o,I as a}from"./shared-c5a638d1.js";import{h as l,D as d,t as A,P as h}from"./shared-c13674cb.js";import{F as c,P as m,a as u}from"./shared-fd001fd3.js";import{z as p,w as g,y as v}from"./shared-33b47806.js";import{c as _,L as b,h as y}from"./shared-dc73b9a5.js";import{D as f}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-fadcb2e1.js";import{a as t,E as s,T as i,C as n}from"./shared-8936b109.js";import{T as r}from"./shared-32b15545.js";import{O as o,I as a}from"./shared-c5a638d1.js";import{h as l,D as d,t as A,P as h}from"./shared-c13674cb.js";import{F as c,P as m,a as u}from"./shared-fd001fd3.js";import{z as p,w as g,y as v}from"./shared-33b47806.js";import{c as _,L as b,h as y}from"./shared-dc73b9a5.js";import{D as f}from"./shared-2caab7af.js";class x extends CustomEvent{constructor(e){super("change",{detail:e})}}class w extends x{}const E=l`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,I as e}from"./shared-fadcb2e1.js";import{h as s,L as i}from"./shared-dc73b9a5.js";import{C as r}from"./shared-
|
|
1
|
+
import{_ as t,I as e}from"./shared-fadcb2e1.js";import{h as s,L as i}from"./shared-dc73b9a5.js";import{C as r}from"./shared-30bb4828.js";import{a as n,T as o}from"./shared-33b47806.js";import{c as a}from"./shared-4e709717.js";import{l}from"./shared-22ba9566.js";import{r as c}from"./shared-a0c6a159.js";let d,h,u,m=t=>t;const p=n(r(o(e(i))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=a({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),e=a({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(d||(d=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),c(this.items,(t=>t.value),((i,r)=>{var n;return s(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),e,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),a({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),l(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:e})=>{if(!this.items.some((t=>t.value===e)))return s(u||(u=m`<option value="${0}">${0}</option>`),e,null!=t?t:e)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),a({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,g as t,I as r,_ as n}from"./shared-fadcb2e1.js";import{L as s,h as o}from"./shared-dc73b9a5.js";import{A as i}from"./shared-
|
|
1
|
+
import{c as e,g as t,I as r,_ as n}from"./shared-fadcb2e1.js";import{L as s,h as o}from"./shared-dc73b9a5.js";import{A as i}from"./shared-75e34b5b.js";import"./shared-1bbd9b73.js";import{C as a}from"./shared-30bb4828.js";import{F as u}from"./shared-b772fbb1.js";var c=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var r=function(e){var t=e.path,r=e.domain,n=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==r?"":";domain="+r,null==n?"":";expires="+n.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,n){return[encodeURIComponent(e),"=",encodeURIComponent(t),r(n)].join("")}})),l=e((function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},n=new RegExp("\\s*;\\s*");return e.split(n).forEach((function(e){var n=r(e.split("="),2),s=n[0],o=n[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),p=e((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){var e=this,t=l.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=l.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=l.parseCookies(this._getCookie()),r=Object.keys(t).sort();return e<r.length?r[e]:null}},{key:"removeItem",value:function(e,t){var r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),n=c.formatCookie(e,"",r);this._setCookie(n)}},{key:"setItem",value:function(e,t,r){var n=Object.assign(Object.assign({},this._defaultOptions),r),s=c.formatCookie(e,t,n);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=l.parseCookies(this._getCookie());return Object.keys(e).length}}])&&r(t.prototype,n),o&&r(t,o),e}();t.CookieStorage=n;var s={defineProperty:function(e,t,r){return e.setItem(t.toString(),String(r.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,r){if("string"==typeof t&&t in e)return e[t];var n=e.getItem(t.toString());return null!==n?n:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],r=0;r<e.length;r++){var n=e.key(r);null!==n&&t.push(n)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,r,n){return e.setItem(t.toString(),String(r)),!0}}})),f=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return p.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return c.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return l.parseCookies}})})));class h extends f.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===i.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),r=super.getItem("fx.customer.start"),n=super.getItem("fx.customer.jwt");if(null===e||null===t||null===r||null===n)return null;const s={session_token:e,date_created:r,expires_in:parseInt(t),jwt:n},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,r){if(e!==i.SESSION)return super.setItem(e,t,r);{const e=JSON.parse(t),r=1e3*e.expires_in,n=new Date(new Date(e.date_created).getTime()+r);super.setItem("fx.customer",e.session_token,{expires:n}),super.setItem("fx.customer.jwt",e.jwt,{expires:n}),super.setItem("fx.customer.start",e.date_created,{expires:n}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:n}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:n})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new h;let m,g=e=>e;class _ extends(a(r(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof u))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const r=new u("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:n=>{"foxy://customer-api/session"===r.request.url&&e.requestUpdate(),401===n.status&&e.requestUpdate(),t.respondWith(Promise.resolve(n))}});e.dispatchEvent(r)&&r.respondWith(e.__handleRequest(r.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(i.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return o(m||(m=g` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new i({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof i.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleRequest(e){const t=e.url,r=e.method;try{if("foxy://customer-api/session"===t){if("DELETE"===r)return this.__handleVirtualAuthSessionDelete();if("POST"===r)return this.__handleVirtualAuthSessionPost(e)}if("foxy://customer-api/recover"===t&&"POST"===r)return this.__handleVirtualAuthRecoverPost(e);const n=await this.api.fetch(e);return 401===n.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),n}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{};export{_ as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-fadcb2e1.js";import{B as t}from"./shared-d539ee69.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{y as n}from"./shared-33b47806.js";import{I as o}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-fadcb2e1.js";import{B as t}from"./shared-d539ee69.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{y as n}from"./shared-33b47806.js";import{I as o}from"./shared-4f8fe424.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-d539ee69.js";import"./shared-
|
|
1
|
+
import"./shared-d539ee69.js";import"./shared-da130124.js";import{_ as t}from"./shared-fadcb2e1.js";import{h as e}from"./shared-dc73b9a5.js";import{D as s}from"./shared-8166ba00.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"./shared-fadcb2e1.js";import{T as e}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-fadcb2e1.js";import{T as e}from"./shared-4473f0cf.js";import{a as s}from"./shared-33b47806.js";import{p as a}from"./shared-fcdc4903.js";let n,o,r,i,c=t=>t;class l extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[l.priceColumn,l.summaryColumn,l.statusColumn,l.subTokenURLColumn]}}l.priceColumn={cell:e=>{const s=e.data._embedded["fx:last_transaction"],o=`${s.total_order} ${s.currency_code}`;return e.html(n||(n=c`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n frequencies"
|
|
4
4
|
class="font-semibold text-m font-tnum"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,a8 as t}from"./shared-
|
|
1
|
+
import{A as e,a8 as t}from"./shared-b772fbb1.js";import{d as s}from"./shared-fadcb2e1.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
|