@foxy.io/elements 1.18.0-beta.3 → 1.18.0-beta.4
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-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-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.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-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.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-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-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 +1 -1
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/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 +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-fcbf9a41.js → shared-07731632.js} +1 -1
- package/dist/cdn/{shared-6af95088.js → shared-131115c9.js} +1 -1
- package/dist/cdn/{shared-9ef13805.js → shared-3d7a47dd.js} +1 -1
- package/dist/cdn/{shared-381aa7fe.js → shared-56b6461b.js} +1 -1
- package/dist/cdn/{shared-5482630e.js → shared-74b7ad17.js} +1 -1
- package/dist/cdn/shared-77fad85a.js +1 -0
- package/dist/cdn/{shared-5e43b817.js → shared-82b1a365.js} +1 -1
- package/dist/cdn/{shared-d91ed0a8.js → shared-b5195ae3.js} +1 -1
- package/dist/cdn/{shared-4773b634.js → shared-ba3054c3.js} +1 -1
- package/dist/cdn/{shared-2ca6d676.js → shared-d90d6140.js} +1 -1
- package/dist/cdn/{shared-68ab037d.js → shared-e3b29ffa.js} +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +2 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-619adfad.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-c7280a24.js";import"./shared-23fd456c.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{_ as e}from"./shared-ca0f14c1.js";import{c as t,h as a}from"./shared-dc73b9a5.js";import"./shared-3e3c07ac.js";import"./shared-084b6372.js";import"./shared-4560425c.js";import{S as i,T as s,a as r}from"./shared-f31044b8.js";import{c as n}from"./shared-4e709717.js";import{C as o,b as d}from"./shared-11f0daea.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import{G as l}from"./shared-189dfb49.js";import{P as c}from"./shared-fd595d0a.js";import{C as h}from"./shared-85d45495.js";import{N as m}from"./shared-
|
|
1
|
+
import"./shared-c7280a24.js";import"./shared-23fd456c.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{_ as e}from"./shared-ca0f14c1.js";import{c as t,h as a}from"./shared-dc73b9a5.js";import"./shared-3e3c07ac.js";import"./shared-084b6372.js";import"./shared-4560425c.js";import{S as i,T as s,a as r}from"./shared-f31044b8.js";import{c as n}from"./shared-4e709717.js";import{C as o,b as d}from"./shared-11f0daea.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import{G as l}from"./shared-189dfb49.js";import{P as c}from"./shared-fd595d0a.js";import{C as h}from"./shared-85d45495.js";import{N as m}from"./shared-77fad85a.js";import{l as p}from"./shared-22ba9566.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-3a7cf739.js";import"./shared-99940888.js";import"./shared-4c0520f6.js";import"./shared-9b392ba8.js";import"./shared-9803aa7c.js";import"./shared-7684cb05.js";let f,u,$,v,y,b,_,x=e=>e;const g=i(s(h(r(m,"template-form"))));class j extends g{constructor(){super(...arguments),this.templates={},this.__cacheState="idle",this.__contentChoice="default"}static get properties(){return e(e({},super.properties),{},{__cacheState:{attribute:!1},__contentChoice:{attribute:!1}})}static get styles(){return[...super.styles,t(f||(f=x`#cached-content::part(input-field){max-height:15em}`))]}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-text-area":customElements.get("vaadin-text-area"),"vaadin-button":customElements.get("vaadin-button"),"x-property-table":c,"x-choice":o,"x-group":l}}render(){var e,t;const{hiddenSelector:i,href:s,lang:r,ns:o}=this,d=s?"delete":"create",l=this.in("busy"),c=this.in("fail");return a(u||(u=x` <div class="space-y-m relative"> ${0} ${0} ${0} ${0} <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> `),i.matches("description",!0)?"":this.__renderDescription(),i.matches("content",!0)?"":this.__renderContent(),i.matches("timestamps",!0)||!s?"":this.__renderTimestamps(),i.matches(d)?"":this.__renderAction(d),n({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!l&&!c}),c?"error":l?"busy":"empty",r,o,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderDescription(){var e,t;const i="description";return a($||($=x` <div> ${0} <vaadin-text-field data-testid="${0}" class="w-full mb-s" label="${0}" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${i}:before`),i,this.t(i),!this.in("idle")||this.disabledSelector.matches(i),this.readonlySelector.matches(i),null!==(t=null===(e=this.form)||void 0===e?void 0:e.description)&&void 0!==t?t:"",(e=>"Enter"===e.key&&this.submit()),(e=>{this.edit({description:e.currentTarget.value})}),this.renderTemplateOrSlot(`${i}:after`))}__renderContent(){var e;const t="content",i=!this.in("idle")||this.disabledSelector.matches(t),s=this.readonlySelector.matches(t),r=this.form.content_url?"url":this.form.content?"clipboard":this.__contentChoice;return a(v||(v=x` <div data-testid="content"> ${0} <x-group frame> <foxy-i18n class="${0}" lang="${0}" slot="header" key="template" ns="${0}"> </foxy-i18n> <x-choice data-testid="content-type" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} <div slot="url" ?hidden="${0}"> <div class="flex items-center mt-0 mb-m"> <vaadin-text-field data-testid="content-url" class="mr-s flex-grow" ?readonly="${0}" ?disabled="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> <vaadin-button data-testid="cache" class="relative" ?hidden="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="cache" ns="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" class="m-auto" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </vaadin-button> </div> </div> <div slot="clipboard" ?hidden="${0}"> <vaadin-text-area id="cached-content" data-testid="content-clipboard" class="w-full mb-m" ?readonly="${0}" ?disabled="${0}" .value="${0}" @input="${0}"> </vaadin-text-area> </div> </x-choice> </x-group> ${0} </div> `),this.renderTemplateOrSlot("content:before"),n({"transition-colors":!0,"text-disabled":i}),this.lang,this.ns,r,["default","url","clipboard"],s,i,(e=>{e instanceof d&&(this.edit({content:"",content_url:""}),this.__contentChoice=e.detail)}),["default","url","clipboard"].map((e=>a(y||(y=x` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="template_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="template_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),"url"!==r,s,i,this.form.content_url,(e=>"Enter"===e.key&&this.submit()),(e=>{const t=e.currentTarget.value;this.edit({content:"",content_url:t})}),s||this.form.content_url!==(null===(e=this.data)||void 0===e?void 0:e.content_url),i||"busy"===this.__cacheState,this.__cache,n({"relative transition-opacity":!0,"opacity-0":"idle"!==this.__cacheState}),this.lang,this.ns,n({"absolute inset-0 flex transition-opacity":!0,"opacity-0":"idle"===this.__cacheState}),"fail"===this.__cacheState?"error":"busy",this.lang,this.ns,"clipboard"!==r,s,i,p(this.form.content),(e=>{const t=e.currentTarget.value;this.edit({content:t,content_url:""})}),this.renderTemplateOrSlot("content:after"))}__renderTimestamps(){const e="timestamps";return a(b||(b=x` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot(`${e}:after`))}__renderAction(e){const{disabledSelector:t,href:i,lang:s,ns:r}=this,n=this.in({idle:{template:{dirty:"valid"}}}),o=this.in({idle:{snapshot:{dirty:"valid"}}}),d=!this.in("idle")||t.matches(e,!0),l=n||o;return a(_||(_=x` <div> ${0} <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" data-testid="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0}" data-testid="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="${0}" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),s,r,(e=>{e.detail.cancelled||this.delete()}),this.in("idle")?"primary "+(i?"error":"success"):"",e,this.in({idle:"template"})&&!l||d,(t=>{if("delete"===e){this.renderRoot.querySelector("#confirm").show(t.currentTarget)}else this.submit()}),r,e,s,this.renderTemplateOrSlot(`${e}:after`))}async __cache(){var e,t;this.__cacheState="busy";try{const a=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href)&&void 0!==t?t:"",i=await new j.API(this).fetch(a,{method:"POST"});this.__cacheState=i.ok?"idle":"fail"}catch(e){this.__cacheState="fail"}}}customElements.define("foxy-template-form",j);export{j as TemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-85d45495.js";import{N as s}from"./shared-
|
|
1
|
+
import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-85d45495.js";import{N as s}from"./shared-77fad85a.js";import{T as i,a as r}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./shared-9803aa7c.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.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-2f0efb2c.js";import"./shared-68ab037d.js";import{a as t,I as o}from"./shared-9ef13805.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-71acf673.js";import"./shared-9ef81b37.js";import{_ as s}from"./shared-ca0f14c1.js";import{N as n}from"./shared-619adfad.js";import{a}from"./shared-f31044b8.js";import{B as d}from"./shared-3a7cf739.js";import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-85d45495.js";import"./shared-4e709717.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-23fd456c.js";import"./shared-084b6372.js";import"./shared-c7280a24.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-fd595d0a.js";import"./shared-80b90eec.js";import"./shared-2ca6d676.js";import"./foxy-address-card.js";import"./shared-a48a9dfc.js";import"./foxy-item-card.js";import"./shared-5482630e.js";import"./shared-4773b634.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-381aa7fe.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-f2639daf.js";import"./shared-2061be9a.js";import"./shared-74a27421.js";import"./foxy-subscription-card.js";import"./shared-6ce2acfa.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-daa454bf.js";import"./shared-60c862aa.js";import"./foxy-table.js";import"./shared-d91ed0a8.js";import"./foxy-nucleon-element.js";import"./shared-023c287a.js";import"./shared-9be1a70f.js";import"./shared-fcbf9a41.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-5e43b817.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-2f0efb2c.js";import"./shared-e3b29ffa.js";import{a as t,I as o}from"./shared-3d7a47dd.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-71acf673.js";import"./shared-9ef81b37.js";import{_ as s}from"./shared-ca0f14c1.js";import{N as n}from"./shared-77fad85a.js";import{a}from"./shared-f31044b8.js";import{B as d}from"./shared-3a7cf739.js";import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-85d45495.js";import"./shared-4e709717.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-23fd456c.js";import"./shared-084b6372.js";import"./shared-c7280a24.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-fd595d0a.js";import"./shared-80b90eec.js";import"./shared-d90d6140.js";import"./foxy-address-card.js";import"./shared-a48a9dfc.js";import"./foxy-item-card.js";import"./shared-74b7ad17.js";import"./shared-ba3054c3.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-56b6461b.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-f2639daf.js";import"./shared-2061be9a.js";import"./shared-74a27421.js";import"./foxy-subscription-card.js";import"./shared-6ce2acfa.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-daa454bf.js";import"./shared-60c862aa.js";import"./foxy-table.js";import"./shared-b5195ae3.js";import"./foxy-nucleon-element.js";import"./shared-023c287a.js";import"./shared-9be1a70f.js";import"./shared-07731632.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-82b1a365.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 +1 @@
|
|
|
1
|
-
import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{T as s}from"./shared-
|
|
1
|
+
import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{T as s}from"./shared-07731632.js";export{T as TransactionsTable}from"./shared-07731632.js";import"./shared-91b86bae.js";import"./shared-f31044b8.js";import"./shared-ca0f14c1.js";import"./shared-dc73b9a5.js";import"./shared-3a7cf739.js";import"./shared-b5195ae3.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-77fad85a.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-c7280a24.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";export{U as UserForm}from"./shared-
|
|
1
|
+
import"./shared-c7280a24.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";export{U as UserForm}from"./shared-131115c9.js";import"./shared-084b6372.js";import"./shared-91b86bae.js";import"./shared-f31044b8.js";import"./shared-ca0f14c1.js";import"./shared-dc73b9a5.js";import"./shared-6f89d2e0.js";import"./shared-9b392ba8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-3e3c07ac.js";import"./shared-412670b8.js";import"./shared-ff1d9854.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-4c0520f6.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-77fad85a.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-71acf673.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-
|
|
1
|
+
import"./shared-71acf673.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-131115c9.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{h as a}from"./shared-dc73b9a5.js";import{T as e}from"./shared-b5195ae3.js";import{a as t}from"./shared-f31044b8.js";import"./shared-084b6372.js";import"./shared-91b86bae.js";import"./shared-9ef81b37.js";import"./shared-ca0f14c1.js";import"./shared-6f89d2e0.js";import"./shared-9b392ba8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-c7280a24.js";import"./shared-ff1d9854.js";import"./shared-3e3c07ac.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-4c0520f6.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-77fad85a.js";import"./shared-b738ee96.js";import"./shared-412670b8.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(e,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return a(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=>a(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=>a(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:e=>a(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=>a(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>a(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=>a(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> `),(a=>{const e=a.target,t=e.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(e)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import{I as s}from"./shared-
|
|
1
|
+
import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import{I as s}from"./shared-74b7ad17.js";import{h as e}from"./shared-dc73b9a5.js";import{a}from"./shared-f31044b8.js";import"./shared-91b86bae.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./shared-77fad85a.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";let i,r=s=>s;class o extends(a(s,"webhook-card")){renderBody(){var s,a,o,t;return e(i||(i=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===(a=this.data)||void 0===a?void 0:a.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-e3b29ffa.js";import{E as e,C as t,T as r,D as o}from"./shared-084b6372.js";import{h as i,G as s,P as a}from"./shared-91b86bae.js";import"./shared-c7280a24.js";import{F as n}from"./shared-3e3c07ac.js";import{I as l}from"./shared-ba3054c3.js";import"./shared-2f0efb2c.js";import{_ as d}from"./shared-ca0f14c1.js";import{i as h}from"./shared-9803aa7c.js";import{h as c}from"./shared-dc73b9a5.js";import{I as u}from"./shared-3d7a47dd.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as p}from"./shared-f31044b8.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-412670b8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-77fad85a.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./shared-9ef81b37.js";import"./shared-71acf673.js";import"./shared-6f89d2e0.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-e1c1e8e2.js";import"./shared-74b7ad17.js";const m=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-2f0efb2c.js";import{I as e}from"./shared-
|
|
1
|
+
import"./shared-2f0efb2c.js";import{I as e}from"./shared-74b7ad17.js";import{a as s}from"./shared-f31044b8.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./foxy-spinner.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-77fad85a.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";let a,o=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(a||(a=o` <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-2f0efb2c.js";import{I as s}from"./shared-
|
|
1
|
+
import"./shared-2f0efb2c.js";import{I as s}from"./shared-74b7ad17.js";import{a as e}from"./shared-f31044b8.js";import{h as t}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./foxy-spinner.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-77fad85a.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";let a,o=s=>s;const i=e(s,"webhook-status-card");class d extends i{renderBody(){var s,e;const i=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"===i,"text-tertiary":"pending"===i,"text-success":"successful"===i}),i)}}customElements.define("foxy-webhook-status-card",d);export{d as WebhookStatusCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as t}from"./shared-
|
|
1
|
+
import{T as t}from"./shared-b5195ae3.js";import{a as s}from"./shared-f31044b8.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"./shared-c7280a24.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{C as e}from"./shared-ff1d9854.js";import"./shared-11f0daea.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import{s,h as t}from"./shared-dc73b9a5.js";import{S as i,T as r,a}from"./shared-f31044b8.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import{m as n}from"./shared-3a7cf739.js";import{G as l}from"./shared-189dfb49.js";import"./shared-084b6372.js";import"./shared-3e3c07ac.js";import"./shared-4560425c.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-85d45495.js";import{N as h}from"./shared-
|
|
1
|
+
import"./shared-c7280a24.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{C as e}from"./shared-ff1d9854.js";import"./shared-11f0daea.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import{s,h as t}from"./shared-dc73b9a5.js";import{S as i,T as r,a}from"./shared-f31044b8.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import{m as n}from"./shared-3a7cf739.js";import{G as l}from"./shared-189dfb49.js";import"./shared-084b6372.js";import"./shared-3e3c07ac.js";import"./shared-4560425c.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-85d45495.js";import{N as h}from"./shared-77fad85a.js";import{i as c}from"./shared-9803aa7c.js";import{v as m}from"./shared-b738ee96.js";let f,C,p,g,u=e=>e;const v=[{property:"is_merchant",icon:s(f||(f=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(C||(C=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,_,$=e=>e;const b=i(r(d(a(h,"user-form"))));class w extends b{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&&m(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"}}}),r=this.in({idle:{snapshot:{dirty:"valid"}}}),a=i||r,n=this.in("busy"),l=this.in("fail"),d=n||l||this.disabled;return t(y||(y=$` <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=$` <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),c(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),v.map(((e,s)=>t(_||(_=$` <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"})&&!a||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"./shared-2f0efb2c.js";import"./shared-e1c1e8e2.js";import{I as e,_ as t}from"./shared-ca0f14c1.js";import{C as r}from"./shared-85d45495.js";import{a as n,T as i}from"./shared-f31044b8.js";import{L as s,h as a,r as o,c as l}from"./shared-dc73b9a5.js";import{N as d}from"./shared-
|
|
1
|
+
import"./shared-2f0efb2c.js";import"./shared-e1c1e8e2.js";import{I as e,_ as t}from"./shared-ca0f14c1.js";import{C as r}from"./shared-85d45495.js";import{a as n,T as i}from"./shared-f31044b8.js";import{L as s,h as a,r as o,c as l}from"./shared-dc73b9a5.js";import{N as d}from"./shared-77fad85a.js";import{Q as c}from"./shared-3a7cf739.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import{c as f}from"./shared-4e709717.js";let p,u,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(p||(p=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(u||(u=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,_=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=_` <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 b,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(b||(b=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"),f({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),f({"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 +1 @@
|
|
|
1
|
-
import"./shared-c63ba384.js";import{I as e}from"./shared-
|
|
1
|
+
import"./shared-c63ba384.js";import{I as e}from"./shared-ba3054c3.js";import{_ as t}from"./shared-ca0f14c1.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import{A as i}from"./shared-9b392ba8.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){super(...arguments),this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null}static get properties(){return t(t({},super.properties),{},{itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t,o=this;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,(async function(e,t){if(!o.first)return t([],0);const a=new URL(o.first);a.searchParams.set("offset",String(e.page*e.pageSize)),a.searchParams.set("limit",String(e.pageSize)),e.filter&&o.itemLabelPath&&a.searchParams.set(o.itemLabelPath,`*${e.filter}*`);const s=await new i(o).fetch(a.toString());if(!s.ok)throw new Error(await s.text());const r=await s.json();t(Array.from(Object.values(r._embedded))[0],r.total_items)}),this.selectedItem,this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")){const e=this.renderRoot.querySelector("vaadin-combo-box");e&&(e.size=0,e.size=1)}}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{T as e}from"./shared-f31044b8.js";import{N as i}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import{T as e}from"./shared-f31044b8.js";import{N as i}from"./shared-77fad85a.js";import{c as s}from"./shared-4e709717.js";import{h as t}from"./shared-dc73b9a5.js";let n,r,a=e=>e;class o extends(e(i)){renderBody(){return t(n||(n=a``))}render(){return t(r||(r=a` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" class="m-auto" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.in({idle:"snapshot"})}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in({idle:"snapshot"})}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}}customElements.define("foxy-internal-card",o);export{o as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e,_ as t}from"./shared-ca0f14c1.js";import{L as s}from"./shared-dc73b9a5.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-3a7cf739.js";import{A as u}from"./shared-9b392ba8.js";import{U as _}from"./shared-7684cb05.js";import{i as d}from"./shared-4c0520f6.js";function c(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,u,_,d,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(_=null===(u=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===u?void 0:u.self)||void 0===_?void 0:_.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),u=new URL(e);return a.searchParams.set("offset",o.length.toString()),u.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:u.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}class l extends(e(s)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=d(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new u(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=l.Rumour(this.group),i=[...this.related,this.parent];return r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){this.__destroyRumour();const e=await this._fetch(this.href);return l.Rumour(this.group).share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return l.Rumour(this.group).share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){this.__destroyRumour();const e=await this._fetch(this.href,{method:"DELETE"}),t=l.Rumour(this.group),s=[...this.related,this.parent];return t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{e.changed&&(this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue())})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__createRumour(){const e=l.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new l.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=c(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}l.UpdateEvent=_,l.Rumour=i((()=>new h)),l.API=u;export{l as N,c as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"./shared-ca0f14c1.js";import{T as e}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-ca0f14c1.js";import{T as e}from"./shared-b5195ae3.js";import{a as s}from"./shared-f31044b8.js";import{p as a}from"./shared-6ce2acfa.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{_ as e}from"./shared-ca0f14c1.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-85d45495.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-f31044b8.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-ca0f14c1.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-85d45495.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-f31044b8.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-77fad85a.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 +1 @@
|
|
|
1
|
-
import"./shared-c7280a24.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-c7280a24.js";import{a as e}from"./shared-3d7a47dd.js";import{_ as t}from"./shared-ca0f14c1.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 +1 @@
|
|
|
1
|
-
import{_ as t}from"./shared-ca0f14c1.js";import{C as e}from"./shared-85d45495.js";import{h as i}from"./shared-dc73b9a5.js";import{N as s}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-ca0f14c1.js";import{C as e}from"./shared-85d45495.js";import{h as i}from"./shared-dc73b9a5.js";import{N as s}from"./shared-77fad85a.js";import{T as r}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!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:"")}}export{p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-2f0efb2c.js";import{a as e}from"./shared-
|
|
1
|
+
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-2f0efb2c.js";import{a as e}from"./shared-3d7a47dd.js";import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import{I as t,_ as r}from"./shared-ca0f14c1.js";import{L as i,h as s}from"./shared-dc73b9a5.js";import{T as o}from"./shared-f31044b8.js";import{c as n}from"./shared-4e709717.js";let a,c=e=>e;class l extends(o(t(i))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return s(a||(a=c` <details class="w-full border border-contrast-10 rounded-t-l rounded-b-l" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-bold text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t-l":!0,"rounded-b-l":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",l);let d,f,m,h,p=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return s(d||(d=p` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),t,n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!t}),(t=>{const r=t.currentTarget,i=this.__dialog;i.header="header_update",i.href=e.href,i.show(r)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const t=new URL(this.first);t.searchParams.set("limit",String(this.limit)),e=t.toString()}catch(t){e=this.first}return s(f||(f=p` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?s(m||(m=p` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":s(h||(h=p` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const t=this.__dialog,r=e.currentTarget;t.header="header_create",t.href="",t.show(r)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;return(null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==this.item&&(this.__cachedCardRenderer={item:this.item,render:new Function("ctx",`return ctx.html\`<${this.item} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${this.item}>\``)}),this.__cachedCardRenderer.render}});
|
|
@@ -58,7 +58,6 @@ export class NucleonElement extends InferrableMixin(LitElement) {
|
|
|
58
58
|
},
|
|
59
59
|
}));
|
|
60
60
|
this.__createService();
|
|
61
|
-
this.__createRumour();
|
|
62
61
|
}
|
|
63
62
|
static get inferredProperties() {
|
|
64
63
|
return [...super.inferredProperties, 'group', 'lang'];
|
|
@@ -206,12 +205,14 @@ export class NucleonElement extends InferrableMixin(LitElement) {
|
|
|
206
205
|
super.connectedCallback();
|
|
207
206
|
if (this.href)
|
|
208
207
|
this.refresh();
|
|
208
|
+
this.__createRumour();
|
|
209
209
|
this.__createServer();
|
|
210
210
|
this.__processFetchEventQueue();
|
|
211
211
|
}
|
|
212
212
|
/** @readonly */
|
|
213
213
|
disconnectedCallback() {
|
|
214
214
|
super.disconnectedCallback();
|
|
215
|
+
this.__destroyRumour();
|
|
215
216
|
this.__destroyServer();
|
|
216
217
|
this.__flushFetchEventQueue('parent element was disconnected');
|
|
217
218
|
}
|