@foxy.io/elements 1.16.0-beta.5 → 1.16.0-beta.6
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-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-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-query-builder.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 +2 -2
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +2 -2
- 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 -0
- package/dist/cdn/foxy-webhook-form.js +467 -0
- package/dist/cdn/foxy-webhook-log-card.js +1 -0
- package/dist/cdn/foxy-webhook-status-card.js +1 -0
- package/dist/cdn/{shared-3ffd77da.js → shared-012b606d.js} +3 -3
- package/dist/cdn/{shared-b4a4a92b.js → shared-0af1128f.js} +1 -1
- package/dist/cdn/{shared-c3c424cd.js → shared-0cab3007.js} +1 -1
- package/dist/cdn/{shared-f7bddf72.js → shared-0f2e2799.js} +1 -1
- package/dist/cdn/{shared-e090608c.js → shared-16b54a16.js} +1 -1
- package/dist/cdn/{shared-38f8a319.js → shared-180ca311.js} +2 -2
- package/dist/cdn/{shared-757bb517.js → shared-28f78e36.js} +1 -1
- package/dist/cdn/{shared-60e98fbf.js → shared-30a41bea.js} +1 -1
- package/dist/cdn/{shared-e59c65e3.js → shared-3138e990.js} +1 -1
- package/dist/cdn/{shared-34998df6.js → shared-4c35a2b7.js} +1 -1
- package/dist/cdn/{shared-368a2f85.js → shared-5f934d4e.js} +1 -1
- package/dist/cdn/{shared-5e75308a.js → shared-634813cb.js} +1 -1
- package/dist/cdn/{shared-5097c880.js → shared-65f1f0a5.js} +1 -1
- package/dist/cdn/{shared-ea9af4b0.js → shared-6b4564c6.js} +1 -1
- package/dist/cdn/{shared-a8e21a41.js → shared-6c9541a9.js} +1 -1
- package/dist/cdn/{shared-bbfdfee2.js → shared-6e80f6b9.js} +2 -2
- package/dist/cdn/{shared-c4f0a219.js → shared-803a0366.js} +1 -1
- package/dist/cdn/{shared-25e9c276.js → shared-8d8d637f.js} +3 -3
- package/dist/cdn/{shared-22103348.js → shared-8f7f868c.js} +1 -1
- package/dist/cdn/shared-9a91c68f.js +1 -0
- package/dist/cdn/{shared-bc94606b.js → shared-9ad10520.js} +1 -1
- package/dist/cdn/{shared-fe8ec1f9.js → shared-a89fd2f0.js} +1 -1
- package/dist/cdn/{shared-007660a6.js → shared-b65bb8ec.js} +1 -1
- package/dist/cdn/{shared-4e63d6e0.js → shared-bcfaeb2c.js} +1 -1
- package/dist/cdn/{shared-9d7aaf7a.js → shared-bebc774a.js} +2 -2
- package/dist/cdn/{shared-b8f492a4.js → shared-c76687b7.js} +1 -1
- package/dist/cdn/shared-d33bf73b.js +1 -0
- package/dist/cdn/{shared-35de1004.js → shared-db34c00a.js} +1 -1
- package/dist/cdn/{shared-518902c8.js → shared-dc545318.js} +1 -1
- package/dist/cdn/shared-dcb80bcf.js +1 -0
- package/dist/cdn/{shared-f3f9f752.js → shared-dd0fd816.js} +1 -1
- package/dist/cdn/shared-dd43ab46.js +1 -0
- package/dist/cdn/{shared-9a089d49.js → shared-e0e3bdc1.js} +1 -1
- package/dist/cdn/{shared-7f3ca8e7.js → shared-ea0ac28c.js} +5 -5
- package/dist/cdn/{shared-92d6f937.js → shared-eba18a6f.js} +1 -1
- package/dist/cdn/{shared-7819b0b0.js → shared-eeecd876.js} +1 -1
- package/dist/cdn/shared-fe347acc.js +1 -0
- package/dist/cdn/translations/webhook-card/en.json +7 -0
- package/dist/cdn/translations/webhook-form/en.json +101 -0
- package/dist/cdn/translations/webhook-log-card/en.json +8 -0
- package/dist/cdn/translations/webhook-status-card/en.json +11 -0
- package/dist/elements/internal/InternalCard/InternalCard.d.ts +14 -6
- package/dist/elements/internal/InternalCard/InternalCard.js +18 -8
- package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
- package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js +2 -2
- package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js.map +1 -1
- package/dist/elements/internal/InternalCollectionCard/index.d.ts +1 -1
- package/dist/elements/internal/InternalCollectionCard/index.js +1 -1
- package/dist/elements/internal/InternalCollectionCard/index.js.map +1 -1
- package/dist/elements/internal/InternalDetailsControl/InternalDetailsControl.d.ts +22 -0
- package/dist/elements/internal/{InternalCollapsibleCard/InternalCollapsibleCard.js → InternalDetailsControl/InternalDetailsControl.js} +14 -6
- package/dist/elements/internal/InternalDetailsControl/InternalDetailsControl.js.map +1 -0
- package/dist/elements/internal/InternalDetailsControl/index.d.ts +6 -0
- package/dist/elements/internal/InternalDetailsControl/index.js +8 -0
- package/dist/elements/internal/InternalDetailsControl/index.js.map +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +1 -1
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +1 -3
- package/dist/elements/internal/InternalForm/InternalForm.js +1 -2
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +7 -2
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +29 -29
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalFrequencyControl/index.d.ts +2 -3
- package/dist/elements/internal/InternalFrequencyControl/index.js +3 -4
- package/dist/elements/internal/InternalFrequencyControl/index.js.map +1 -1
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.d.ts +11 -0
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +43 -0
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -0
- package/dist/elements/internal/InternalRadioGroupControl/index.d.ts +6 -0
- package/dist/elements/internal/InternalRadioGroupControl/index.js +8 -0
- package/dist/elements/internal/InternalRadioGroupControl/index.js.map +1 -0
- package/dist/elements/public/ItemCard/ItemCard.d.ts +3 -3
- package/dist/elements/public/ItemCard/ItemCard.js +8 -5
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +3 -3
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +5 -2
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js +2 -2
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.d.ts +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js.map +1 -1
- package/dist/elements/public/WebhookCard/WebhookCard.d.ts +10 -0
- package/dist/elements/public/WebhookCard/WebhookCard.js +30 -0
- package/dist/elements/public/WebhookCard/WebhookCard.js.map +1 -0
- package/dist/elements/public/WebhookCard/index.d.ts +5 -0
- package/dist/elements/public/WebhookCard/index.js +7 -0
- package/dist/elements/public/WebhookCard/index.js.map +1 -0
- package/dist/elements/public/WebhookCard/types.d.ts +3 -0
- package/dist/elements/public/WebhookCard/types.js +2 -0
- package/dist/elements/public/WebhookCard/types.js.map +1 -0
- package/dist/elements/public/WebhookForm/WebhookForm.d.ts +14 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js +68 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -0
- package/dist/elements/public/WebhookForm/index.d.ts +10 -0
- package/dist/elements/public/WebhookForm/index.js +12 -0
- package/dist/elements/public/WebhookForm/index.js.map +1 -0
- package/dist/elements/public/WebhookForm/types.d.ts +3 -0
- package/dist/elements/public/WebhookForm/types.js +2 -0
- package/dist/elements/public/WebhookForm/types.js.map +1 -0
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.d.ts +10 -0
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js +23 -0
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js.map +1 -0
- package/dist/elements/public/WebhookLogCard/index.d.ts +4 -0
- package/dist/elements/public/WebhookLogCard/index.js +6 -0
- package/dist/elements/public/WebhookLogCard/index.js.map +1 -0
- package/dist/elements/public/WebhookLogCard/types.d.ts +3 -0
- package/dist/elements/public/WebhookLogCard/types.js +2 -0
- package/dist/elements/public/WebhookLogCard/types.js.map +1 -0
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.d.ts +10 -0
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js +35 -0
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js.map +1 -0
- package/dist/elements/public/WebhookStatusCard/index.d.ts +4 -0
- package/dist/elements/public/WebhookStatusCard/index.js +6 -0
- package/dist/elements/public/WebhookStatusCard/index.js.map +1 -0
- package/dist/elements/public/WebhookStatusCard/types.d.ts +3 -0
- package/dist/elements/public/WebhookStatusCard/types.js +2 -0
- package/dist/elements/public/WebhookStatusCard/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +4 -0
- package/dist/elements/public/index.defined.d.ts +4 -0
- package/dist/elements/public/index.defined.js +4 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +4 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +8 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-1ddccf4d.js +0 -1
- package/dist/cdn/shared-874bbae5.js +0 -1
- package/dist/cdn/shared-cad5fe82.js +0 -1
- package/dist/cdn/shared-ce2aab66.js +0 -1
- package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.d.ts +0 -16
- package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.js.map +0 -1
- package/dist/elements/internal/InternalCollapsibleCard/index.d.ts +0 -5
- package/dist/elements/internal/InternalCollapsibleCard/index.js +0 -7
- package/dist/elements/internal/InternalCollapsibleCard/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-bcfaeb2c.js";import{h as t}from"./shared-7f33a83a.js";import{C as e}from"./shared-06014421.js";import{N as s}from"./shared-1b064836.js";import{T as i,a as r}from"./shared-6b4564c6.js";import{c as a}from"./shared-4e709717.js";import"./shared-db34c00a.js";import"./shared-16b54a16.js";import"./shared-9ad10520.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-3026cee0.js";import"./shared-d3bf9ac0.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.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,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-28f78e36.js";import"./shared-db34c00a.js";import{h as t}from"./shared-16b54a16.js";import"./shared-9ad10520.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-bcfaeb2c.js";import"./shared-dcb80bcf.js";import{a as i,b as o}from"./shared-fe347acc.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as e,c as r}from"./shared-7f33a83a.js";import{i as a}from"./shared-d3bf9ac0.js";import{_ as c}from"./shared-2eee69db.js";import{N as s}from"./shared-1b064836.js";import{a as n}from"./shared-6b4564c6.js";import{B as d}from"./shared-3026cee0.js";import"./shared-b65bb8ec.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-64657919.js";import"./shared-06014421.js";import"./shared-4e709717.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.js";import"./shared-180ca311.js";import"./shared-eeecd876.js";import"./shared-65f1f0a5.js";import"./shared-30a41bea.js";import"./shared-0f2e2799.js";import"./shared-dd0fd816.js";import"./shared-11c2efc8.js";import"./shared-eba18a6f.js";import"./shared-9a91c68f.js";import"./shared-6e80f6b9.js";import"./shared-634813cb.js";import"./shared-8f7f868c.js";import"./shared-bebc774a.js";import"./shared-a89fd2f0.js";import"./foxy-address-card.js";import"./foxy-item-card.js";import"./shared-d33bf73b.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-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-c76687b7.js";import"./shared-2061be9a.js";import"./shared-803a0366.js";import"./foxy-subscription-card.js";import"./shared-dd43ab46.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-6c9541a9.js";import"./shared-4c35a2b7.js";import"./foxy-table.js";import"./shared-0cab3007.js";import"./foxy-nucleon-element.js";import"./shared-2bb49907.js";import"./shared-f0ba30e8.js";import"./shared-3138e990.js";import"./foxy-pagination.js";import"./shared-99065f2a.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-ea0ac28c.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 i{renderControl(){var t,i,o,r;return e(h||(h=m` <foxy-internal-
|
|
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-control 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-control> `),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 c(c({},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` <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer></foxy-i18n> </vaadin-button> `),i,"busy"===t||this.disabled,this.submit,t)}async submit(){if("busy"!==this.state)try{this.state="busy";const t=await new s.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,g,y,z,x=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends i{renderControl(){var t,i,o,r,a,c,s,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===(c=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===c?void 0:c._links["fx:refund"])?this.__renderRefundAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.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(g||(g=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(y||(y=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,c,s;return e(C||(C=S` <div id="body" class="gap-m"> <foxy-internal-collection-card infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-collection-card> <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-collection-card infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-collection-card> <foxy-internal-collection-card infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-collection-card> <foxy-internal-collection-card infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-collection-card> <foxy-internal-collection-card related="${0}" infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card"> </foxy-internal-collection-card> <foxy-internal-collection-card related="${0}" infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card"> </foxy-internal-collection-card> <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===(c=this.data)||void 0===c?void 0:c._links["fx:custom_fields"].href),JSON.stringify([this.href]),a(null===(s=this.data)||void 0===s?void 0:s._links["fx:attributes"].href))}}customElements.define("foxy-transaction",w);export{w as Transaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9ad10520.js";import"./shared-db34c00a.js";import"./foxy-spinner.js";import"./shared-bcfaeb2c.js";import{T as s}from"./shared-3138e990.js";export{T as TransactionsTable}from"./shared-3138e990.js";import"./shared-16b54a16.js";import"./shared-6b4564c6.js";import"./shared-2eee69db.js";import"./shared-7f33a83a.js";import"./shared-64657919.js";import"./shared-3026cee0.js";import"./shared-0cab3007.js";import"./shared-06014421.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-1b064836.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-30a41bea.js";import"./shared-28f78e36.js";import"./shared-eba18a6f.js";import"./foxy-spinner.js";import"./shared-bcfaeb2c.js";export{U as UserForm}from"./shared-dc545318.js";import"./shared-b65bb8ec.js";import"./shared-16b54a16.js";import"./shared-6b4564c6.js";import"./shared-2eee69db.js";import"./shared-7f33a83a.js";import"./shared-9a91c68f.js";import"./shared-9d4835ed.js";import"./shared-3026cee0.js";import"./shared-64657919.js";import"./shared-06014421.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-db34c00a.js";import"./shared-9ad10520.js";import"./shared-0af1128f.js";import"./shared-eeecd876.js";import"./shared-180ca311.js";import"./shared-65f1f0a5.js";import"./shared-0f2e2799.js";import"./shared-dd0fd816.js";import"./shared-11c2efc8.js";import"./shared-f3655f42.js";import"./shared-6e80f6b9.js";import"./shared-634813cb.js";import"./shared-1b064836.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-28f78e36.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-dc545318.js";import"./foxy-spinner.js";import"./shared-bcfaeb2c.js";import{h as e}from"./shared-7f33a83a.js";import{T as a}from"./shared-0cab3007.js";import{a as t}from"./shared-6b4564c6.js";import"./shared-b65bb8ec.js";import"./shared-16b54a16.js";import"./shared-eba18a6f.js";import"./shared-2eee69db.js";import"./shared-9a91c68f.js";import"./shared-9d4835ed.js";import"./shared-3026cee0.js";import"./shared-64657919.js";import"./shared-06014421.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-30a41bea.js";import"./shared-0af1128f.js";import"./shared-db34c00a.js";import"./shared-eeecd876.js";import"./shared-180ca311.js";import"./shared-65f1f0a5.js";import"./shared-0f2e2799.js";import"./shared-dd0fd816.js";import"./shared-11c2efc8.js";import"./shared-f3655f42.js";import"./shared-6e80f6b9.js";import"./shared-634813cb.js";import"./shared-1b064836.js";import"./shared-b738ee96.js";import"./shared-9ad10520.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return e(r||(r=p` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}f.nameColumn={cell:s=>e(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},f.emailColumn={hideBelow:"md",cell:s=>e(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:a=>e(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=p` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},f.actionsColumn={cell:s=>e(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-9ad10520.js";import"./shared-db34c00a.js";import{I as s}from"./shared-d33bf73b.js";import{h as e}from"./shared-7f33a83a.js";import{a as i}from"./shared-6b4564c6.js";import"./shared-16b54a16.js";import"./foxy-spinner.js";import"./shared-bcfaeb2c.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-3026cee0.js";import"./shared-1b064836.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.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.toUpperCase(),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};
|
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import{C as e}from"./shared-bebc774a.js";import{T as t,D as r,E as o,C as i}from"./shared-b65bb8ec.js";import"./shared-30a41bea.js";import{h as a,P as s,G as l}from"./shared-16b54a16.js";import{F as n}from"./shared-db34c00a.js";import{I as d,b as h}from"./shared-fe347acc.js";import"./shared-bcfaeb2c.js";import{_ as c}from"./shared-2eee69db.js";import{i as u}from"./shared-d3bf9ac0.js";import{h as p}from"./shared-7f33a83a.js";import"./shared-dcb80bcf.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as b}from"./shared-6b4564c6.js";import"./foxy-spinner.js";import"./shared-9ad10520.js";import"./shared-64657919.js";import"./shared-3026cee0.js";import"./shared-28f78e36.js";import"./shared-06014421.js";import"./shared-1b064836.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.js";import"./shared-eba18a6f.js";import"./shared-9a91c68f.js";import"./shared-4e709717.js";import"./foxy-collection-page.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-d33bf73b.js";const m=a`<dom-module id="lumo-checkbox-group" theme-for="vaadin-checkbox-group">
|
|
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">
|
|
151
|
+
<template>
|
|
152
|
+
<style>
|
|
153
|
+
:host {
|
|
154
|
+
-webkit-tap-highlight-color: transparent;
|
|
155
|
+
-webkit-user-select: none;
|
|
156
|
+
-moz-user-select: none;
|
|
157
|
+
-ms-user-select: none;
|
|
158
|
+
user-select: none;
|
|
159
|
+
cursor: default;
|
|
160
|
+
outline: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
[part="label"]:not([empty]) {
|
|
164
|
+
margin: 0.1875em 0.875em 0.1875em 0.375em;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[part="radio"] {
|
|
168
|
+
width: calc(1em + 2px);
|
|
169
|
+
height: calc(1em + 2px);
|
|
170
|
+
margin: 0.1875em;
|
|
171
|
+
position: relative;
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
background-color: var(--lumo-contrast-20pct);
|
|
174
|
+
transition: transform 0.2s cubic-bezier(.12, .32, .54, 2), background-color 0.15s;
|
|
175
|
+
pointer-events: none;
|
|
176
|
+
will-change: transform;
|
|
177
|
+
line-height: 1.2;
|
|
178
|
+
transform: translateZ(0); /* Workaround IE11 jumpiness */
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Used for activation "halo" */
|
|
182
|
+
[part="radio"]::before {
|
|
183
|
+
/* Needed to align the radio-button nicely on the baseline */
|
|
184
|
+
content: "\\2003";
|
|
185
|
+
color: transparent;
|
|
186
|
+
display: inline-block;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 100%;
|
|
189
|
+
border-radius: inherit;
|
|
190
|
+
background-color: inherit;
|
|
191
|
+
transform: scale(1.4);
|
|
192
|
+
opacity: 0;
|
|
193
|
+
transition: transform 0.1s, opacity 0.8s;
|
|
194
|
+
will-change: transform, opacity;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Used for the dot */
|
|
198
|
+
[part="radio"]::after {
|
|
199
|
+
content: "";
|
|
200
|
+
width: 0;
|
|
201
|
+
height: 0;
|
|
202
|
+
border: 3px solid var(--lumo-primary-contrast-color);
|
|
203
|
+
border-radius: 50%;
|
|
204
|
+
position: absolute;
|
|
205
|
+
top: 50%;
|
|
206
|
+
left: 50%;
|
|
207
|
+
transform: translate(-50%, -50%) scale(0);
|
|
208
|
+
transition: 0.25s transform;
|
|
209
|
+
will-change: transform;
|
|
210
|
+
background-clip: content-box;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:host([checked]) [part="radio"] {
|
|
214
|
+
background-color: var(--lumo-primary-color);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host([checked]) [part="radio"]::after {
|
|
218
|
+
transform: translate(-50%, -50%) scale(1);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part="radio"] {
|
|
222
|
+
background-color: var(--lumo-contrast-30pct);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
:host([active]) [part="radio"] {
|
|
226
|
+
transform: scale(0.9);
|
|
227
|
+
transition-duration: 0.05s;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:host([active][checked]) [part="radio"] {
|
|
231
|
+
transform: scale(1.1);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host([active]:not([checked])) [part="radio"]::before {
|
|
235
|
+
transition-duration: 0.01s, 0.01s;
|
|
236
|
+
transform: scale(0);
|
|
237
|
+
opacity: 0.4;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:host([focus-ring]) [part="radio"] {
|
|
241
|
+
box-shadow: 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:host([disabled]) {
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
color: var(--lumo-disabled-text-color);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:host([disabled]) ::slotted(*) {
|
|
250
|
+
color: inherit;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:host([disabled]) [part="radio"] {
|
|
254
|
+
background-color: var(--lumo-contrast-10pct);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:host([disabled]) [part="radio"]::after {
|
|
258
|
+
border-color: var(--lumo-contrast-30pct);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* IE11 only */
|
|
262
|
+
::-ms-backdrop,
|
|
263
|
+
[part="radio"] {
|
|
264
|
+
line-height: 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* RTL specific styles */
|
|
268
|
+
|
|
269
|
+
:host([dir="rtl"]) [part="label"]:not([empty]) {
|
|
270
|
+
margin: 0.1875em 0.375em 0.1875em 0.875em;
|
|
271
|
+
}
|
|
272
|
+
</style>
|
|
273
|
+
</template>
|
|
274
|
+
</dom-module>`;document.head.appendChild(g.content);
|
|
275
|
+
/**
|
|
276
|
+
@license
|
|
277
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
278
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
279
|
+
*/
|
|
280
|
+
class f extends(o(i(t(l(s))))){static get template(){return a`
|
|
281
|
+
<style>
|
|
282
|
+
:host {
|
|
283
|
+
display: inline-block;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
label {
|
|
287
|
+
display: inline-flex;
|
|
288
|
+
align-items: baseline;
|
|
289
|
+
outline: none;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
[part="radio"] {
|
|
293
|
+
position: relative;
|
|
294
|
+
display: inline-block;
|
|
295
|
+
flex: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
input[type="radio"] {
|
|
299
|
+
position: absolute;
|
|
300
|
+
top: 0;
|
|
301
|
+
left: 0;
|
|
302
|
+
right: 0;
|
|
303
|
+
width: 100%;
|
|
304
|
+
height: 100%;
|
|
305
|
+
opacity: 0;
|
|
306
|
+
cursor: inherit;
|
|
307
|
+
margin: 0;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
:host([disabled]) {
|
|
311
|
+
-webkit-tap-highlight-color: transparent;
|
|
312
|
+
}
|
|
313
|
+
</style>
|
|
314
|
+
|
|
315
|
+
<label>
|
|
316
|
+
<span part="radio">
|
|
317
|
+
<input type="radio" checked="[[checked]]" disabled\$="[[disabled]]" role="presentation" on-change="_onChange" tabindex="-1">
|
|
318
|
+
</span>
|
|
319
|
+
|
|
320
|
+
<span part="label">
|
|
321
|
+
<slot></slot>
|
|
322
|
+
</span>
|
|
323
|
+
</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(f.is,f);const _=a`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
|
|
325
|
+
<template>
|
|
326
|
+
<style include="lumo-required-field">
|
|
327
|
+
:host {
|
|
328
|
+
color: var(--lumo-body-text-color);
|
|
329
|
+
font-size: var(--lumo-font-size-m);
|
|
330
|
+
font-family: var(--lumo-font-family);
|
|
331
|
+
-webkit-font-smoothing: antialiased;
|
|
332
|
+
-moz-osx-font-smoothing: grayscale;
|
|
333
|
+
-webkit-tap-highlight-color: transparent;
|
|
334
|
+
padding: var(--lumo-space-xs) 0;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
:host::before {
|
|
338
|
+
height: var(--lumo-size-m);
|
|
339
|
+
box-sizing: border-box;
|
|
340
|
+
display: inline-flex;
|
|
341
|
+
align-items: center;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
:host([theme~="vertical"]) [part="group-field"] {
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
[part="label"] {
|
|
350
|
+
padding-bottom: 0.7em;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:host([focused]:not([readonly])) [part="label"] {
|
|
354
|
+
color: var(--lumo-primary-text-color);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
:host(:hover:not([readonly]):not([focused])) [part="label"],
|
|
358
|
+
:host(:hover:not([readonly])) [part="helper-text"],
|
|
359
|
+
:host(:hover:not([readonly])) [part="helper-text"] ::slotted(*) {
|
|
360
|
+
color: var(--lumo-body-text-color);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
:host([has-helper]) [part="helper-text"]::before {
|
|
364
|
+
content: "";
|
|
365
|
+
display: block;
|
|
366
|
+
height: 0.4em;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
[part="helper-text"],
|
|
370
|
+
[part="helper-text"] ::slotted(*) {
|
|
371
|
+
display: block;
|
|
372
|
+
color: var(--lumo-secondary-text-color);
|
|
373
|
+
font-size: var(--lumo-font-size-xs);
|
|
374
|
+
line-height: var(--lumo-line-height-xs);
|
|
375
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
376
|
+
transition: color 0.2s;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* helper-text position */
|
|
380
|
+
|
|
381
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
|
|
382
|
+
display: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
|
|
386
|
+
content: "";
|
|
387
|
+
display: block;
|
|
388
|
+
height: 0.4em;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:host([has-helper][theme~="helper-above-field"]) [part="label"] {
|
|
392
|
+
order: 0;
|
|
393
|
+
padding-bottom: 0.4em;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
|
|
397
|
+
order: 1;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
:host([has-helper][theme~="helper-above-field"]) [part="group-field"] {
|
|
401
|
+
order: 2;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
:host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
|
|
405
|
+
order: 3;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* Touch device adjustment */
|
|
409
|
+
@media (pointer: coarse) {
|
|
410
|
+
:host(:hover:not([readonly]):not([focused])) [part="label"] {
|
|
411
|
+
color: var(--lumo-secondary-text-color);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
</style>
|
|
415
|
+
</template>
|
|
416
|
+
</dom-module>`;document.head.appendChild(_.content);
|
|
417
|
+
/**
|
|
418
|
+
@license
|
|
419
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
420
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
421
|
+
*/
|
|
422
|
+
class y extends(t(r(s))){static get template(){return a`
|
|
423
|
+
<style>
|
|
424
|
+
:host {
|
|
425
|
+
display: inline-flex;
|
|
426
|
+
|
|
427
|
+
/* Prevent horizontal overflow in IE 11 instead of wrapping radios */
|
|
428
|
+
max-width: 100%;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
:host::before {
|
|
432
|
+
content: "\\2003";
|
|
433
|
+
width: 0;
|
|
434
|
+
display: inline-block;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
:host([hidden]) {
|
|
438
|
+
display: none !important;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.vaadin-group-field-container {
|
|
442
|
+
display: flex;
|
|
443
|
+
flex-direction: column;
|
|
444
|
+
|
|
445
|
+
/* Prevent horizontal overflow in IE 11 instead of wrapping radios */
|
|
446
|
+
width: 100%;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
[part="label"]:empty {
|
|
450
|
+
display: none;
|
|
451
|
+
}
|
|
452
|
+
</style>
|
|
453
|
+
|
|
454
|
+
<div class="vaadin-group-field-container">
|
|
455
|
+
<label part="label">[[label]]</label>
|
|
456
|
+
|
|
457
|
+
<div part="group-field">
|
|
458
|
+
<slot id="slot"></slot>
|
|
459
|
+
</div>
|
|
460
|
+
|
|
461
|
+
<div part="helper-text" id="[[_helperTextId]]" aria-live="assertive" aria-hidden\$="[[_getHelperTextAriaHidden(helperText, _helperTextId, _hasSlottedHelper)]]">
|
|
462
|
+
<slot name="helper">[[helperText]]</slot>
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
<div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
|
|
466
|
+
</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=y._uniqueId=1+y._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 f))}_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(y.is,y);let x,k,A=e=>e;customElements.define("foxy-internal-radio-group-control",class extends d{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return c(c({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return p(x||(x=A` <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> `),u(this._errorMessage),this.helperText,this.label,u(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,String(this._value),(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>p(k||(k=A` <vaadin-radio-button value="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,e.label))))}});let E,w,B=e=>e;class T extends(b(h,"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 p(E||(E=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?p(w||(w=B` <foxy-internal-collection-card first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-collection-card> <foxy-internal-collection-card first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-collection-card> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",T);export{T as WebhookForm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-bcfaeb2c.js";import{I as e}from"./shared-d33bf73b.js";import{a as s}from"./shared-6b4564c6.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-2eee69db.js";import"./shared-64657919.js";import"./shared-3026cee0.js";import"./foxy-spinner.js";import"./shared-db34c00a.js";import"./shared-16b54a16.js";import"./shared-9ad10520.js";import"./shared-1b064836.js";import"./shared-9d4835ed.js";import"./shared-7684cb05.js";import"./shared-f3655f42.js";import"./shared-4e709717.js";let o,a=e=>e;class d extends(s(e,"webhook-log-card")){renderBody(){var e,s,d;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:null===(e=this.data)||void 0===e?void 0:e.date_created},null===(s=this.data)||void 0===s?void 0:s.response_code,null===(d=this.data)||void 0===d?void 0:d.response_body)}}customElements.define("foxy-webhook-log-card",d);export{d as WebhookLogCard};
|