@foxy.io/elements 1.16.0-beta.8 → 1.16.0-beta.9
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-api-browser.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-report-form.js +6 -6
- package/dist/cdn/foxy-shipment-card.js +2 -2
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-transaction.js +2 -2
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +7 -156
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/{shared-9e0387e6.js → shared-157cced2.js} +1 -1
- package/dist/cdn/shared-38bc104d.js +1 -0
- package/dist/cdn/shared-c71f8ccc.js +1 -0
- package/dist/cdn/shared-cd65e716.js +1 -0
- package/dist/cdn/translations/transaction/en.json +28 -4
- package/dist/elements/internal/InternalCreateControl/index.d.ts +2 -1
- package/dist/elements/internal/InternalCreateControl/index.js +2 -1
- package/dist/elements/internal/InternalCreateControl/index.js.map +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.d.ts +8 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +10 -5
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
- package/dist/elements/internal/InternalDeleteControl/index.d.ts +3 -2
- package/dist/elements/internal/InternalDeleteControl/index.js +3 -2
- package/dist/elements/internal/InternalDeleteControl/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +13 -2
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map +1 -1
- package/dist/elements/public/WebhookCard/WebhookCard.d.ts +6 -0
- package/dist/elements/public/WebhookCard/WebhookCard.js +8 -2
- package/dist/elements/public/WebhookCard/WebhookCard.js.map +1 -1
- package/dist/elements/public/WebhookForm/WebhookForm.d.ts +33 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js +33 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
- package/dist/elements/public/WebhookForm/index.d.ts +1 -3
- package/dist/elements/public/WebhookForm/index.js +1 -3
- package/dist/elements/public/WebhookForm/index.js.map +1 -1
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.d.ts +6 -0
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js +11 -6
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js.map +1 -1
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.d.ts +6 -0
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js +6 -0
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-39b61999.js +0 -1
- package/dist/cdn/shared-6a0012d6.js +0 -1
- package/dist/cdn/shared-eb0e1f48.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-73cfd096.js";import"./shared-4764b995.js";import{h as t}from"./shared-abfe9262.js";import"./shared-c6ed5394.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-applied-tax-card.js";import"./foxy-custom-field-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-7a084a40.js";import"./shared-
|
|
1
|
+
import"./shared-73cfd096.js";import"./shared-4764b995.js";import{h as t}from"./shared-abfe9262.js";import"./shared-c6ed5394.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-applied-tax-card.js";import"./foxy-custom-field-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-7a084a40.js";import"./shared-cd65e716.js";import{a as i,I as o}from"./shared-c71f8ccc.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as e,c as r}from"./shared-dc73b9a5.js";import{i as a}from"./shared-9803aa7c.js";import"./shared-cea659c8.js";import{_ as s}from"./shared-2eee69db.js";import{N as c}from"./shared-25ef9e09.js";import{a as n}from"./shared-855a1983.js";import{B as d}from"./shared-6eb57269.js";import"./shared-3b318016.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-64657919.js";import"./shared-58a9174f.js";import"./shared-4e709717.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.js";import"./shared-3e14ffe1.js";import"./shared-f2a561f7.js";import"./shared-addf6302.js";import"./shared-8c41299f.js";import"./shared-78a2c66f.js";import"./shared-107acd1f.js";import"./shared-99940888.js";import"./shared-e21c712d.js";import"./shared-15d04c73.js";import"./shared-78adab3d.js";import"./shared-5e228fca.js";import"./shared-157cced2.js";import"./shared-85d4b53e.js";import"./foxy-address-card.js";import"./foxy-item-card.js";import"./shared-5cb2c769.js";import"./shared-38bc104d.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"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-3474279e.js";import"./shared-2061be9a.js";import"./shared-c9757355.js";import"./foxy-subscription-card.js";import"./shared-85618a7a.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-95b0cdf1.js";import"./shared-e0a54dfc.js";import"./foxy-table.js";import"./shared-e6be392d.js";import"./foxy-nucleon-element.js";import"./shared-40315eea.js";import"./shared-f0ba30e8.js";import"./shared-af60799b.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-e9967127.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -61,4 +61,4 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
61
61
|
<g id="voicemail"><path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3.04 0 5.5-2.46 5.5-5.5S21.54 6 18.5 6zm-13 9C3.57 15 2 13.43 2 11.5S3.57 8 5.5 8 9 9.57 9 11.5 7.43 15 5.5 15zm13 0c-1.93 0-3.5-1.57-3.5-3.5S16.57 8 18.5 8 22 9.57 22 11.5 20.43 15 18.5 15z"></path></g>
|
|
62
62
|
<g id="vpn-key"><path d="M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
|
|
63
63
|
</defs></svg>
|
|
64
|
-
</iron-iconset-svg>`;document.head.appendChild(l.content);let h,m=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends
|
|
64
|
+
</iron-iconset-svg>`;document.head.appendChild(l.content);let h,m=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends i{renderControl(){var t,i,o,r;return e(h||(h=m` <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> `),a(null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),a(null===(r=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===r?void 0:r._links["fx:customer"].href))}});let p,v=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends i{constructor(){super(...arguments),this.theme="",this.state="idle",this.href="",this.icon=""}static get properties(){return s(s({},super.properties),{},{theme:{type:String},state:{type:String},href:{type:String},icon:{type:String}})}renderControl(){const t=this.state,i="fail"===t?"error":"idle"===t?this.theme:"";return e(p||(p=v` <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()),i,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async submit(){if("busy"!==this.state)try{this.state="busy";const t=await new c.API(this).fetch(this.href,{method:"POST"});this.state=t.ok?"idle":"fail",t.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.state="fail"}}});let f,u,y,g,z,x=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends i{renderControl(){var t,i,o,r,a,s,c,n;return e(f||(f=x` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:capture"])?this.__renderCaptureAction():"",(null===(r=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===r?void 0:r._links["fx:void"])?this.__renderVoidAction():"",(null===(s=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===s?void 0:s._links["fx:refund"])?this.__renderRefundAction():"",(null===(n=null===(c=this.nucleon)||void 0===c?void 0:c.data)||void 0===n?void 0:n._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,i,o;return e(u||(u=x` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" key="send_emails" @done="${0}"> </foxy-internal-transaction-post-action-control> `),a(null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:send_emails"].href),null===(o=this.nucleon)||void 0===o?void 0:o.refresh)}__renderCaptureAction(){var t,i,o;return e(y||(y=x` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" key="capture" @done="${0}"> </foxy-internal-transaction-post-action-control> `),a(null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:capture"].href),null===(o=this.nucleon)||void 0===o?void 0:o.refresh)}__renderVoidAction(){var t,i,o,r;return e(g||(g=x` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" key="void" @done="${0}"> </foxy-internal-transaction-post-action-control> `),a(null===(o=null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:void"])||void 0===o?void 0:o.href),null===(r=this.nucleon)||void 0===r?void 0:r.refresh)}__renderRefundAction(){var t,i,o,r;return e(z||(z=x` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" key="refund" @done="${0}"> </foxy-internal-transaction-post-action-control> `),a(null===(o=null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i._links["fx:refund"])||void 0===o?void 0:o.href),null===(r=this.nucleon)||void 0===r?void 0:r.refresh)}});let V,j,M,H,b,_,L,$=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends i{renderControl(){var t;return e(V||(V=$` <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,i;const o={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},r=(null===(i=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===i?void 0:i.status)||"completed";return e(j||(j=$` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" lang="${0}" key="transaction_${0}" ns="${0}"> </foxy-i18n> `),r in o?o[r]:"bg-contrast-5 text-contrast",this.lang,r,this.ns)}__renderPrice(){var t;const i=null===(t=this.nucleon)||void 0===t?void 0:t.data,o=null==i?void 0:i.currency_code;return i?e(H||(H=$` <foxy-i18n options="${0}" key="price" infer> </foxy-i18n> `),JSON.stringify({amount:`${i.total_order} ${o}`})):e(M||(M=$`--`))}__renderTotals(){var t;const i=null===(t=this.nucleon)||void 0===t?void 0:t.data,o=null==i?void 0:i.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>e(b||(b=$` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer></foxy-i18n> ${0} </div> `),t,i?e(_||(_=$` <foxy-i18n options="${0}" key="price" infer> </foxy-i18n> `),JSON.stringify({amount:`${i[t]} ${o}`})):e(L||(L=$`<span>--</span>`)))))}});let k,C,S=t=>t;class w extends(n(o,"transaction")){static get styles(){return[...super.styles,r(k||(k=S`#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,i,o;return Boolean(null!==(i=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==i?i:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,i,o,r,s,c;return e(C||(C=S` <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 related="${0}" infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control related="${0}" infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),a(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),a(null===(i=this.data)||void 0===i?void 0:i._links["fx:payments"].href),a(null===(o=this.data)||void 0===o?void 0:o._links["fx:discounts"].href),a(null===(r=this.data)||void 0===r?void 0:r._links["fx:applied_taxes"].href),JSON.stringify([this.href]),a(null===(s=this.data)||void 0===s?void 0:s._links["fx:custom_fields"].href),JSON.stringify([this.href]),a(null===(c=this.data)||void 0===c?void 0:c._links["fx:attributes"].href))}}customElements.define("foxy-transaction",w);export{w as Transaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-c6ed5394.js";import"./shared-4764b995.js";import{I as s}from"./shared-5cb2c769.js";import{h as e}from"./shared-dc73b9a5.js";import{a as i}from"./shared-855a1983.js";import"./shared-abfe9262.js";import"./foxy-spinner.js";import"./shared-7a084a40.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-6eb57269.js";import"./shared-25ef9e09.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.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="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
|
|
1
|
+
import"./shared-c6ed5394.js";import"./shared-4764b995.js";import{I as s}from"./shared-5cb2c769.js";import{h as e}from"./shared-dc73b9a5.js";import{a as i}from"./shared-855a1983.js";import"./shared-abfe9262.js";import"./foxy-spinner.js";import"./shared-7a084a40.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-6eb57269.js";import"./shared-25ef9e09.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.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,153 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
<template>
|
|
3
|
-
<style include="lumo-required-field">
|
|
4
|
-
:host {
|
|
5
|
-
color: var(--lumo-body-text-color);
|
|
6
|
-
font-size: var(--lumo-font-size-m);
|
|
7
|
-
font-family: var(--lumo-font-family);
|
|
8
|
-
-webkit-font-smoothing: antialiased;
|
|
9
|
-
-moz-osx-font-smoothing: grayscale;
|
|
10
|
-
-webkit-tap-highlight-color: transparent;
|
|
11
|
-
padding: var(--lumo-space-xs) 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host::before {
|
|
15
|
-
height: var(--lumo-size-m);
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([theme~="vertical"]) [part="group-field"] {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[part="label"] {
|
|
27
|
-
padding-bottom: 0.7em;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host([disabled]) [part="label"] {
|
|
31
|
-
color: var(--lumo-disabled-text-color);
|
|
32
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:host([focused]:not([disabled])) [part="label"] {
|
|
36
|
-
color: var(--lumo-primary-text-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host(:hover:not([disabled]):not([focused])) [part="label"],
|
|
40
|
-
:host(:hover:not([disabled]):not([focused])) [part="helper-text"],
|
|
41
|
-
:host(:hover:not([disabled]):not([focused])) [part="helper-text"] ::slotted(*) {
|
|
42
|
-
color: var(--lumo-body-text-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([has-helper]) [part="helper-text"]::before {
|
|
46
|
-
content: "";
|
|
47
|
-
display: block;
|
|
48
|
-
height: 0.4em;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[part="helper-text"],
|
|
52
|
-
[part="helper-text"] ::slotted(*) {
|
|
53
|
-
display: block;
|
|
54
|
-
color: var(--lumo-secondary-text-color);
|
|
55
|
-
font-size: var(--lumo-font-size-xs);
|
|
56
|
-
line-height: var(--lumo-line-height-xs);
|
|
57
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
58
|
-
transition: color 0.2s;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* helper-text position */
|
|
62
|
-
|
|
63
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
|
|
64
|
-
display: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
|
|
68
|
-
content: "";
|
|
69
|
-
display: block;
|
|
70
|
-
height: 0.4em;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:host([has-helper][theme~="helper-above-field"]) [part="label"] {
|
|
74
|
-
order: 0;
|
|
75
|
-
padding-bottom: 0.4em;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
|
|
79
|
-
order: 1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host([has-helper][theme~="helper-above-field"]) [part="group-field"] {
|
|
83
|
-
order: 2;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
|
|
87
|
-
order: 3;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* Touch device adjustment */
|
|
91
|
-
@media (pointer: coarse) {
|
|
92
|
-
:host(:hover:not([disabled]):not([focused])) [part="label"] {
|
|
93
|
-
color: var(--lumo-secondary-text-color);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
97
|
-
</template>
|
|
98
|
-
</dom-module>`;document.head.appendChild(m.content);
|
|
99
|
-
/**
|
|
100
|
-
@license
|
|
101
|
-
Copyright (c) 2017 Vaadin Ltd.
|
|
102
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
103
|
-
*/
|
|
104
|
-
class v extends(t(r(s))){static get template(){return a`
|
|
105
|
-
<style>
|
|
106
|
-
:host {
|
|
107
|
-
display: inline-flex;
|
|
108
|
-
|
|
109
|
-
/* Prevent horizontal overflow in IE 11 instead of wrapping checkboxes */
|
|
110
|
-
max-width: 100%;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host::before {
|
|
114
|
-
content: "\\2003";
|
|
115
|
-
width: 0;
|
|
116
|
-
display: inline-block;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host([hidden]) {
|
|
120
|
-
display: none !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.vaadin-group-field-container {
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
|
|
127
|
-
/* Prevent horizontal overflow in IE 11 instead of wrapping checkboxes */
|
|
128
|
-
width: 100%;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
[part="label"]:empty {
|
|
132
|
-
display: none;
|
|
133
|
-
}
|
|
134
|
-
</style>
|
|
135
|
-
|
|
136
|
-
<div class="vaadin-group-field-container">
|
|
137
|
-
<label part="label">[[label]]</label>
|
|
138
|
-
|
|
139
|
-
<div part="group-field">
|
|
140
|
-
<slot id="slot"></slot>
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
<div part="helper-text" aria-live="assertive" aria-hidden\$="[[_getHelperTextAriaHidden(helperText, _hasSlottedHelper)]]">
|
|
144
|
-
<slot name="helper">[[helperText]]</slot>
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
<div part="error-message" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage)]]">[[errorMessage]]</div>
|
|
148
|
-
|
|
149
|
-
</div>
|
|
150
|
-
`}static get is(){return"vaadin-checkbox-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},label:{type:String,value:"",observer:"_labelChanged"},value:{type:Array,value:()=>[],notify:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},required:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_hasSlottedHelper:Boolean}}static get observers(){return["_updateValue(value, value.splices)"]}ready(){super.ready(),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{this._checkboxes.some((t=>e.relatedTarget===t||t.shadowRoot.contains(e.relatedTarget)))||(this.validate(),this._setFocused(!1))}));const e=e=>{this._changeSelectedCheckbox(e.target)};this._observer=new n(this,(t=>{const r=this._filterCheckboxes(t.addedNodes);r.forEach((t=>{t.addEventListener("checked-changed",e),this.disabled&&(t.disabled=!0),t.checked?this._addCheckboxToValue(t.value):this.value.indexOf(t.value)>-1&&(t.checked=!0)})),this._filterCheckboxes(t.removedNodes).forEach((t=>{t.removeEventListener("checked-changed",e),t.checked&&this._removeCheckboxFromValue(t.value)})),this._setOrToggleHasHelperAttribute();r.every((e=>{const{value:t}=e;return e.hasAttribute("value")||t&&"on"!==t}))||console.warn("Please add value attribute to all checkboxes in checkbox group")}))}validate(){return this.invalid=this.required&&0===this.value.length,!this.invalid}get _checkboxes(){return this._filterCheckboxes(this.querySelectorAll("*"))}_filterCheckboxes(t){return Array.from(t).filter((t=>t instanceof e))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._checkboxes.forEach((t=>t.disabled=e))}_addCheckboxToValue(e){-1===this.value.indexOf(e)&&(this.value=this.value.concat(e))}_removeCheckboxFromValue(e){this.value=this.value.filter((t=>t!==e))}_changeSelectedCheckbox(e){this._updatingValue||(e.checked?this._addCheckboxToValue(e.value):this._removeCheckboxFromValue(e.value))}_updateValue(e,t){0===e.length&&void 0===this._oldValue||(e.length?this.setAttribute("has-value",""):this.removeAttribute("has-value"),this._oldValue=e,this._updatingValue=!0,this._checkboxes.forEach((t=>{t.checked=e.indexOf(t.value)>-1})),this._updatingValue=!1,this.validate())}_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))}_getErrorMessageAriaHidden(e,t){return(!t||!e).toString()}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_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)}_getHelperTextAriaHidden(e,t){return(!(e||t)).toString()}}customElements.define(v.is,v);const g=a`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
1
|
+
import"./shared-cd65e716.js";import{E as e,C as t,T as r,D as o}from"./shared-3b318016.js";import{h as i,G as s,P as a}from"./shared-abfe9262.js";import"./shared-8c41299f.js";import{F as n}from"./shared-4764b995.js";import{I as l}from"./shared-38bc104d.js";import"./shared-7a084a40.js";import{_ as d}from"./shared-2eee69db.js";import{i as h}from"./shared-9803aa7c.js";import{h as c}from"./shared-dc73b9a5.js";import{I as u}from"./shared-c71f8ccc.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as p}from"./shared-855a1983.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-c6ed5394.js";import"./shared-64657919.js";import"./shared-6eb57269.js";import"./shared-58a9174f.js";import"./shared-25ef9e09.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./shared-cea659c8.js";import"./shared-73cfd096.js";import"./shared-e21c712d.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-5cb2c769.js";const m=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
151
2
|
<template>
|
|
152
3
|
<style>
|
|
153
4
|
:host {
|
|
@@ -271,13 +122,13 @@ class v extends(t(r(s))){static get template(){return a`
|
|
|
271
122
|
}
|
|
272
123
|
</style>
|
|
273
124
|
</template>
|
|
274
|
-
</dom-module>`;document.head.appendChild(
|
|
125
|
+
</dom-module>`;document.head.appendChild(m.content);
|
|
275
126
|
/**
|
|
276
127
|
@license
|
|
277
128
|
Copyright (c) 2017 Vaadin Ltd.
|
|
278
129
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
279
130
|
*/
|
|
280
|
-
class
|
|
131
|
+
class b extends(e(t(r(s(a))))){static get template(){return i`
|
|
281
132
|
<style>
|
|
282
133
|
:host {
|
|
283
134
|
display: inline-block;
|
|
@@ -321,7 +172,7 @@ class f extends(o(i(t(l(s))))){static get template(){return a`
|
|
|
321
172
|
<slot></slot>
|
|
322
173
|
</span>
|
|
323
174
|
</label>
|
|
324
|
-
`}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(b.is,b);const f=i`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
|
|
325
176
|
<template>
|
|
326
177
|
<style include="lumo-required-field">
|
|
327
178
|
:host {
|
|
@@ -413,13 +264,13 @@ class f extends(o(i(t(l(s))))){static get template(){return a`
|
|
|
413
264
|
}
|
|
414
265
|
</style>
|
|
415
266
|
</template>
|
|
416
|
-
</dom-module>`;document.head.appendChild(
|
|
267
|
+
</dom-module>`;document.head.appendChild(f.content);
|
|
417
268
|
/**
|
|
418
269
|
@license
|
|
419
270
|
Copyright (c) 2017 Vaadin Ltd.
|
|
420
271
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
421
272
|
*/
|
|
422
|
-
class
|
|
273
|
+
class v extends(r(o(a))){static get template(){return i`
|
|
423
274
|
<style>
|
|
424
275
|
:host {
|
|
425
276
|
display: inline-flex;
|
|
@@ -464,4 +315,4 @@ class y extends(t(r(s))){static get template(){return a`
|
|
|
464
315
|
|
|
465
316
|
<div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
|
|
466
317
|
</div>
|
|
467
|
-
`}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=
|
|
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 b))}_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-7a084a40.js";import{I as e}from"./shared-5cb2c769.js";import{a as s}from"./shared-855a1983.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-6eb57269.js";import"./foxy-spinner.js";import"./shared-4764b995.js";import"./shared-abfe9262.js";import"./shared-c6ed5394.js";import"./shared-25ef9e09.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.js";import"./shared-4e709717.js";let o,a=e=>e;class
|
|
1
|
+
import"./shared-7a084a40.js";import{I as e}from"./shared-5cb2c769.js";import{a as s}from"./shared-855a1983.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-6eb57269.js";import"./foxy-spinner.js";import"./shared-4764b995.js";import"./shared-abfe9262.js";import"./shared-c6ed5394.js";import"./shared-25ef9e09.js";import"./shared-567c8c48.js";import"./shared-7684cb05.js";import"./shared-968add7f.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};
|
|
@@ -227,4 +227,4 @@ class n extends(e(t(o(r(a))))){static get template(){return i`
|
|
|
227
227
|
<slot></slot>
|
|
228
228
|
</span>
|
|
229
229
|
</label>
|
|
230
|
-
`}static get is(){return"vaadin-checkbox"}static get version(){return"2.5.0"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},indeterminate:{type:Boolean,notify:!0,observer:"_indeterminateChanged",reflectToAttribute:!0,value:!1},value:{type:String,value:"on"},_nativeCheckbox:{type:Object}}}constructor(){super(),this.name}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}ready(){super.ready(),this.setAttribute("role","checkbox"),this._nativeCheckbox=this.shadowRoot.querySelector('input[type="checkbox"]'),this.addEventListener("click",this._handleClick.bind(this)),this._addActiveListeners();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.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",Boolean(e))}_indeterminateChanged(e){e?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",this.checked)}_addActiveListeners(){this._addEventListenerToNode(this,"down",(e=>{this.__interactionsAllowed(e)&&this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(e=>{this.__interactionsAllowed(e)&&32===e.keyCode&&(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.__interactionsAllowed(e)&&32===e.keyCode&&(e.preventDefault(),this._toggleChecked(),this.removeAttribute("active"),this.indeterminate&&(this.indeterminate=!1))}))}get focusElement(){return this.shadowRoot.querySelector("input")}__interactionsAllowed(e){return!this.disabled&&"a"!==e.target.localName}_handleClick(e){this.__interactionsAllowed(e)&&(this.indeterminate?(this.indeterminate=!1,e.preventDefault(),this._toggleChecked()):e.composedPath()[0]!==this._nativeCheckbox&&(e.preventDefault(),this._toggleChecked()))}_toggleChecked(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{composed:!1,bubbles:!0}))}}customElements.define(n.is,n);
|
|
230
|
+
`}static get is(){return"vaadin-checkbox"}static get version(){return"2.5.0"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},indeterminate:{type:Boolean,notify:!0,observer:"_indeterminateChanged",reflectToAttribute:!0,value:!1},value:{type:String,value:"on"},_nativeCheckbox:{type:Object}}}constructor(){super(),this.name}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}ready(){super.ready(),this.setAttribute("role","checkbox"),this._nativeCheckbox=this.shadowRoot.querySelector('input[type="checkbox"]'),this.addEventListener("click",this._handleClick.bind(this)),this._addActiveListeners();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.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",Boolean(e))}_indeterminateChanged(e){e?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",this.checked)}_addActiveListeners(){this._addEventListenerToNode(this,"down",(e=>{this.__interactionsAllowed(e)&&this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(e=>{this.__interactionsAllowed(e)&&32===e.keyCode&&(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.__interactionsAllowed(e)&&32===e.keyCode&&(e.preventDefault(),this._toggleChecked(),this.removeAttribute("active"),this.indeterminate&&(this.indeterminate=!1))}))}get focusElement(){return this.shadowRoot.querySelector("input")}__interactionsAllowed(e){return!this.disabled&&"a"!==e.target.localName}_handleClick(e){this.__interactionsAllowed(e)&&(this.indeterminate?(this.indeterminate=!1,e.preventDefault(),this._toggleChecked()):e.composedPath()[0]!==this._nativeCheckbox&&(e.preventDefault(),this._toggleChecked()))}_toggleChecked(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{composed:!1,bubbles:!0}))}}customElements.define(n.is,n);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-8c41299f.js";import{a as e}from"./shared-c71f8ccc.js";import{_ as t}from"./shared-2eee69db.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.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{__placeholder:{attribute:!1},__helperText:{attribute:!1},__v8nPrefix:{attribute:!1},__property:{attribute:!1},__label:{attribute:!1},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},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.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:`${this.infer}:`}set v8nPrefix(e){this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:this.infer.replace(/-/g,"_")}set property(e){this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.__label=e}get _value(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]}set _value(e){var t;const r=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(r)&&(null===(t=this.nucleon)||void 0===t||t.edit({[this.property]: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,n=e=>e;customElements.define("foxy-internal-text-control",class extends i{renderControl(){return s(l||(l=n` <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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./foxy-spinner.js";import"./shared-73cfd096.js";import"./shared-7a084a40.js";import{I as e,_ as t}from"./shared-2eee69db.js";import{L as n,r,h as i,c as s}from"./shared-dc73b9a5.js";import{C as a}from"./shared-58a9174f.js";import{a as o,T as l}from"./shared-855a1983.js";import{N as d}from"./shared-25ef9e09.js";import"./shared-cea659c8.js";import{P as c}from"./shared-6eb57269.js";import{c as p}from"./shared-4e709717.js";let u,m,h,f,y=e=>e;class v extends(a(o(l(e(n))))){constructor(){super(...arguments),this.nucleon=null,this.infer=""}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){super.updated(e),this.style.display=this.hidden?"none":"",r(i(u||(u=y` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer),this)}renderControl(){return i(m||(m=y``))}render(){return this.hidden?i(h||(h=y``)):i(f||(f=y` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",v);let x,g=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 i(x||(x=g` <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=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 i(_||(_=b` <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{constructor(){super(...arguments),this.infer="timestamps"}static get styles(){return[super.styles,s($||($=w`.max-w-0{max-width:0}`))]}renderControl(){return i(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 lang="${0}" key="date_created" ns="${0}"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n lang="${0}" key="date_modified" ns="${0}"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> </td> </tr> </tbody> </table> `),this.lang,this.ns,JSON.stringify({value:c(this,"nucleon.form.date_created")}),this.lang,this.ns,this.lang,this.ns,JSON.stringify({value:c(this,"nucleon.form.date_modified")}),this.lang,this.ns)}});let S,j,C,T=e=>e;const k=a(l(d));class E extends k{renderBody(){return this.data?i(S||(S=T` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):i(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 i(C||(C=T` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div 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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-7a084a40.js";import"./shared-c6ed5394.js";import"./shared-4764b995.js";import{a as e}from"./shared-c71f8ccc.js";import{I as t,_ as r}from"./shared-2eee69db.js";import{L as s,h as i}from"./shared-dc73b9a5.js";import{T as o}from"./shared-855a1983.js";import{c as n}from"./shared-4e709717.js";let a,c=e=>e;class l extends(o(t(s))){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 i(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,p,u=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.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return i(d||(d=u` <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,s=this.__dialog;s.header="header_update",s.href=e.href,s.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 i(f||(f=u` <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?i(m||(m=u` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":i(p||(p=u` <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" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),(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(){return 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}>\``)}});
|
|
@@ -279,22 +279,46 @@
|
|
|
279
279
|
"capture": {
|
|
280
280
|
"idle": "Capture",
|
|
281
281
|
"busy": "Capturing...",
|
|
282
|
-
"fail": "Failed to capture"
|
|
282
|
+
"fail": "Failed to capture",
|
|
283
|
+
"confirm": {
|
|
284
|
+
"header": "Capture",
|
|
285
|
+
"message": "Are you sure you'd like to capture this transaction?",
|
|
286
|
+
"confirm": "Yes",
|
|
287
|
+
"cancel": "No"
|
|
288
|
+
}
|
|
283
289
|
},
|
|
284
290
|
"void": {
|
|
285
291
|
"idle": "Void",
|
|
286
292
|
"busy": "Voiding...",
|
|
287
|
-
"fail": "Failed to void"
|
|
293
|
+
"fail": "Failed to void",
|
|
294
|
+
"confirm": {
|
|
295
|
+
"header": "Void",
|
|
296
|
+
"message": "Are you sure you'd like to void this transaction?",
|
|
297
|
+
"confirm": "Yes",
|
|
298
|
+
"cancel": "No"
|
|
299
|
+
}
|
|
288
300
|
},
|
|
289
301
|
"refund": {
|
|
290
302
|
"idle": "Refund",
|
|
291
303
|
"busy": "Refunding...",
|
|
292
|
-
"fail": "Failed to refund"
|
|
304
|
+
"fail": "Failed to refund",
|
|
305
|
+
"confirm": {
|
|
306
|
+
"header": "Refund",
|
|
307
|
+
"message": "Are you sure you'd like to refund this transaction?",
|
|
308
|
+
"confirm": "Yes",
|
|
309
|
+
"cancel": "No"
|
|
310
|
+
}
|
|
293
311
|
},
|
|
294
312
|
"send-emails": {
|
|
295
313
|
"idle": "Send emails",
|
|
296
314
|
"busy": "Sending emails...",
|
|
297
|
-
"fail": "Failed to send emails"
|
|
315
|
+
"fail": "Failed to send emails",
|
|
316
|
+
"confirm": {
|
|
317
|
+
"header": "Send emails",
|
|
318
|
+
"message": "Are you sure you'd like to send emails for this transaction?",
|
|
319
|
+
"confirm": "Yes",
|
|
320
|
+
"cancel": "No"
|
|
321
|
+
}
|
|
298
322
|
}
|
|
299
323
|
},
|
|
300
324
|
"spinner": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "../../public/I18n/index.js";
|
|
2
1
|
import '@vaadin/vaadin-button';
|
|
2
|
+
import "../../public/I18n/index.js";
|
|
3
|
+
import "../InternalControl/index.js";
|
|
3
4
|
import { InternalCreateControl } from "./InternalCreateControl.js";
|
|
4
5
|
customElements.define('foxy-internal-create-control', InternalCreateControl);
|
|
5
6
|
export { InternalCreateControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalCreateControl/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalCreateControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,oCAAiC;AACjC,qCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,mCAAgC;AAEhE,cAAc,CAAC,MAAM,CAAC,8BAA8B,EAAE,qBAAqB,CAAC,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import '@vaadin/vaadin-button';\n\nimport '../../public/I18n/index';\nimport '../InternalControl/index';\n\nimport { InternalCreateControl } from './InternalCreateControl';\n\ncustomElements.define('foxy-internal-create-control', InternalCreateControl);\n\nexport { InternalCreateControl };\n"]}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { PropertyDeclarations, TemplateResult } from 'lit-element';
|
|
2
2
|
import { InternalControl } from '../InternalControl/InternalControl';
|
|
3
|
+
/**
|
|
4
|
+
* Internal control displaying a "Delete" button that triggers resource
|
|
5
|
+
* deletion in Nucleon on click.
|
|
6
|
+
*
|
|
7
|
+
* @since 1.17.0
|
|
8
|
+
* @tag foxy-internal-delete-control
|
|
9
|
+
*/
|
|
3
10
|
export declare class InternalDeleteControl extends InternalControl {
|
|
4
11
|
static get properties(): PropertyDeclarations;
|
|
5
|
-
|
|
12
|
+
/** Same as the "theme" attribute of the `vaadin-button` element. */
|
|
6
13
|
theme: string;
|
|
7
14
|
renderControl(): TemplateResult;
|
|
8
15
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { InternalControl } from "../InternalControl/InternalControl.js";
|
|
2
2
|
import { html } from 'lit-element';
|
|
3
|
+
/**
|
|
4
|
+
* Internal control displaying a "Delete" button that triggers resource
|
|
5
|
+
* deletion in Nucleon on click.
|
|
6
|
+
*
|
|
7
|
+
* @since 1.17.0
|
|
8
|
+
* @tag foxy-internal-delete-control
|
|
9
|
+
*/
|
|
3
10
|
export class InternalDeleteControl extends InternalControl {
|
|
4
11
|
constructor() {
|
|
5
12
|
super(...arguments);
|
|
6
|
-
|
|
13
|
+
/** Same as the "theme" attribute of the `vaadin-button` element. */
|
|
7
14
|
this.theme = 'primary error';
|
|
8
15
|
}
|
|
9
16
|
static get properties() {
|
|
@@ -15,14 +22,12 @@ export class InternalDeleteControl extends InternalControl {
|
|
|
15
22
|
renderControl() {
|
|
16
23
|
return html `
|
|
17
24
|
<foxy-internal-confirm-dialog
|
|
18
|
-
data-testid="confirm"
|
|
19
25
|
message="delete_prompt"
|
|
20
26
|
confirm="delete"
|
|
21
27
|
cancel="cancel"
|
|
22
28
|
header="delete"
|
|
23
29
|
theme="primary error"
|
|
24
|
-
|
|
25
|
-
ns=${this.ns}
|
|
30
|
+
infer=""
|
|
26
31
|
id="confirm"
|
|
27
32
|
@hide=${(evt) => { var _a; return !evt.detail.cancelled && ((_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.delete()); }}
|
|
28
33
|
>
|
|
@@ -38,7 +43,7 @@ export class InternalDeleteControl extends InternalControl {
|
|
|
38
43
|
confirm.show(evt.currentTarget);
|
|
39
44
|
}}
|
|
40
45
|
>
|
|
41
|
-
<foxy-i18n
|
|
46
|
+
<foxy-i18n infer="" key="delete"></foxy-i18n>
|
|
42
47
|
</vaadin-button>
|
|
43
48
|
`;
|
|
44
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalDeleteControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalDeleteControl/InternalDeleteControl.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,8CAA2C;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IAA1D;;QAQE,
|
|
1
|
+
{"version":3,"file":"InternalDeleteControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalDeleteControl/InternalDeleteControl.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,8CAA2C;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC;;;;;;GAMG;AACH,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IAA1D;;QAQE,oEAAoE;QACpE,UAAK,GAAG,eAAe,CAAC;IA8B1B,CAAC;IAtCC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC;IACJ,CAAC;IAKD,aAAa;QACX,OAAO,IAAI,CAAA;;;;;;;;;gBASC,CAAC,GAAoB,EAAE,EAAE,WAAC,OAAA,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,WAAI,IAAI,CAAC,OAAO,0CAAE,MAAM,GAAE,CAAA,EAAA;;;;;;gBAMzE,IAAI,CAAC,KAAK;;oBAEN,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ;iBACjC,CAAC,GAAgB,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAA0B,CAAC;YACnF,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,aAA8B,CAAC,CAAC;QACnD,CAAC;;;;KAIJ,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { InternalConfirmDialog } from '../InternalConfirmDialog/InternalConfirmDialog';\nimport type { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport type { PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { ButtonElement } from '@vaadin/vaadin-button';\n\nimport { InternalControl } from '../InternalControl/InternalControl';\nimport { html } from 'lit-element';\n\n/**\n * Internal control displaying a \"Delete\" button that triggers resource\n * deletion in Nucleon on click.\n *\n * @since 1.17.0\n * @tag foxy-internal-delete-control\n */\nexport class InternalDeleteControl extends InternalControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n theme: { type: String },\n };\n }\n\n /** Same as the \"theme\" attribute of the `vaadin-button` element. */\n theme = 'primary error';\n\n renderControl(): TemplateResult {\n return html`\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n infer=\"\"\n id=\"confirm\"\n @hide=${(evt: DialogHideEvent) => !evt.detail.cancelled && this.nucleon?.delete()}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n data-testid=\"delete\"\n theme=${this.theme}\n class=\"w-full\"\n ?disabled=${this.disabled || this.readonly}\n @click=${(evt: CustomEvent) => {\n const confirm = this.renderRoot.querySelector('#confirm') as InternalConfirmDialog;\n confirm.show(evt.currentTarget as ButtonElement);\n }}\n >\n <foxy-i18n infer=\"\" key=\"delete\"></foxy-i18n>\n </vaadin-button>\n `;\n }\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import '../InternalConfirmDialog/index';
|
|
2
|
-
import '../../public/I18n/index';
|
|
3
1
|
import '@vaadin/vaadin-button';
|
|
2
|
+
import '../../public/I18n/index';
|
|
3
|
+
import '../InternalConfirmDialog/index';
|
|
4
|
+
import '../InternalControl/index';
|
|
4
5
|
import { InternalDeleteControl } from './InternalDeleteControl';
|
|
5
6
|
export { InternalDeleteControl };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../InternalConfirmDialog/index.js";
|
|
2
|
-
import "../../public/I18n/index.js";
|
|
3
1
|
import '@vaadin/vaadin-button';
|
|
2
|
+
import "../../public/I18n/index.js";
|
|
3
|
+
import "../InternalConfirmDialog/index.js";
|
|
4
|
+
import "../InternalControl/index.js";
|
|
4
5
|
import { InternalDeleteControl } from "./InternalDeleteControl.js";
|
|
5
6
|
customElements.define('foxy-internal-delete-control', InternalDeleteControl);
|
|
6
7
|
export { InternalDeleteControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalDeleteControl/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalDeleteControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,oCAAiC;AACjC,2CAAwC;AACxC,qCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,mCAAgC;AAEhE,cAAc,CAAC,MAAM,CAAC,8BAA8B,EAAE,qBAAqB,CAAC,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import '@vaadin/vaadin-button';\n\nimport '../../public/I18n/index';\nimport '../InternalConfirmDialog/index';\nimport '../InternalControl/index';\n\nimport { InternalDeleteControl } from './InternalDeleteControl';\n\ncustomElements.define('foxy-internal-delete-control', InternalDeleteControl);\n\nexport { InternalDeleteControl };\n"]}
|