@foxy.io/elements 1.18.0-beta.17 → 1.18.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.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-editor.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-report-form.js +2 -2
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -0
- 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-card.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-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-e119731e.js → shared-07fb5be2.js} +1 -1
- package/dist/cdn/{shared-4c338ca6.js → shared-17d24760.js} +1 -1
- package/dist/cdn/{shared-e3ce88dc.js → shared-196fa627.js} +21 -11
- package/dist/cdn/{shared-40537775.js → shared-1f0841ec.js} +1 -1
- package/dist/cdn/{shared-71deb26e.js → shared-210387cb.js} +1 -1
- package/dist/cdn/shared-222fe491.js +1 -0
- package/dist/cdn/shared-262caea4.js +1 -0
- package/dist/cdn/{shared-74277a73.js → shared-344485cf.js} +5 -5
- package/dist/cdn/shared-4308cdab.js +1 -0
- package/dist/cdn/{shared-6003864d.js → shared-5643d0ed.js} +1 -1
- package/dist/cdn/{shared-29376ba1.js → shared-56d26968.js} +1 -1
- package/dist/cdn/{shared-facfe95a.js → shared-62c8cfa2.js} +4 -4
- package/dist/cdn/{shared-2f1e04ae.js → shared-6b622399.js} +1 -1
- package/dist/cdn/{shared-cfec6ec1.js → shared-8a5bdad3.js} +7 -7
- package/dist/cdn/{shared-8d533e0c.js → shared-98652709.js} +1 -1
- package/dist/cdn/{shared-ad8141c4.js → shared-aebbceea.js} +1 -1
- package/dist/cdn/shared-b0a6d48f.js +1 -0
- package/dist/cdn/{shared-7661b51a.js → shared-b0ff4590.js} +1 -1
- package/dist/cdn/{shared-6e6ed30a.js → shared-b7219771.js} +1 -1
- package/dist/cdn/{shared-a46a2f49.js → shared-ce1ae7e1.js} +1 -1
- package/dist/cdn/{shared-cced7800.js → shared-d5f242df.js} +1 -1
- package/dist/cdn/shared-da6cc488.js +1 -0
- package/dist/cdn/{shared-6bf8883f.js → shared-e08bcb6c.js} +1 -1
- package/dist/cdn/{shared-4457dc27.js → shared-fdac2851.js} +1 -1
- package/dist/cdn/translations/email-template-card/en.json +1 -1
- package/dist/cdn/translations/subscription-settings-form/en.json +92 -0
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +18 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +15 -6
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +2 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +6 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +32 -4
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +1 -3
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +16 -30
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/index.d.ts +1 -1
- package/dist/elements/internal/InternalSelectControl/index.js +1 -1
- package/dist/elements/internal/InternalSelectControl/index.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +2 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +3 -3
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +3 -2
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +2 -2
- 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.d.ts +2 -2
- 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.d.ts +2 -2
- 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 +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +2 -2
- 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.d.ts +2 -2
- 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/NucleonElement/NucleonElement.d.ts +2 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js +30 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +33 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +208 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.d.ts +9 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js +11 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.d.ts +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js +128 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.d.ts +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js +26 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.d.ts +6 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +3 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -0
- package/dist/elements/public/TaxForm/TaxForm.js +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.js +1 -1
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +13 -7164
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-40d82f6b.js +0 -1
- package/dist/cdn/shared-5504f415.js +0 -11
- package/dist/cdn/shared-92bd849f.js +0 -1
- package/dist/cdn/shared-b7423eab.js +0 -1
- package/dist/cdn/shared-bd194cdf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-2215e6c8.js";import"./shared-6d2064e9.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{_ as e}from"./shared-a8ced8bf.js";import{c as t,h as s}from"./shared-7f33a83a.js";import"./shared-c484320b.js";import"./shared-7b167fe9.js";import"./shared-f2d19582.js";import{S as a,T as i,a as r}from"./shared-29e21467.js";import{c as n}from"./shared-4e709717.js";import{C as o,a as d}from"./shared-1b3e1a0d.js";import"./shared-4975f86f.js";import"./shared-
|
|
1
|
+
import"./shared-2215e6c8.js";import"./shared-6d2064e9.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{_ as e}from"./shared-a8ced8bf.js";import{c as t,h as s}from"./shared-7f33a83a.js";import"./shared-c484320b.js";import"./shared-7b167fe9.js";import"./shared-f2d19582.js";import{S as a,T as i,a as r}from"./shared-29e21467.js";import{c as n}from"./shared-4e709717.js";import{C as o,a as d}from"./shared-1b3e1a0d.js";import"./shared-4975f86f.js";import"./shared-196fa627.js";import"./shared-d43fc5cc.js";import"./shared-34b11d34.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import{G as l}from"./shared-3a3878c9.js";import"./shared-6b8874a7.js";import{P as c}from"./shared-162fc285.js";import{C as h}from"./shared-5ad8c9a0.js";import{N as m}from"./shared-222fe491.js";import{l as p}from"./shared-f3b35364.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-4f037e43.js";import"./shared-002b788f.js";import"./shared-11c2efc8.js";import"./shared-dcbf57e0.js";import"./shared-dc798bf4.js";import"./shared-923da875.js";import"./shared-e396ec04.js";import"./shared-d3bf9ac0.js";import"./shared-d6276c83.js";let f,u,$,b,v,y,_,x=e=>e;const g=a(i(h(r(m,"template-form"))));class j extends g{constructor(){super(...arguments),this.templates={},this.__cacheState="idle",this.__contentChoice="default"}static get properties(){return e(e({},super.properties),{},{__cacheState:{attribute:!1},__contentChoice:{attribute:!1}})}static get styles(){return[...super.styles,t(f||(f=x`#cached-content::part(input-field){max-height:15em}`))]}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-text-area":customElements.get("vaadin-text-area"),"vaadin-button":customElements.get("vaadin-button"),"x-property-table":c,"x-choice":o,"x-group":l}}render(){var e,t;const{hiddenSelector:a,href:i,lang:r,ns:o}=this,d=i?"delete":"create",l=this.in("busy"),c=this.in("fail");return s(u||(u=x` <div class="space-y-m relative"> ${0} ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),a.matches("description",!0)?"":this.__renderDescription(),a.matches("content",!0)?"":this.__renderContent(),a.matches("timestamps",!0)||!i?"":this.__renderTimestamps(),a.matches(d)?"":this.__renderAction(d),n({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!l&&!c}),c?"error":l?"busy":"empty",r,o,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderDescription(){var e,t;const a="description";return s($||($=x` <div> ${0} <vaadin-text-field data-testid="${0}" class="w-full mb-s" label="${0}" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${a}:before`),a,this.t(a),!this.in("idle")||this.disabledSelector.matches(a),this.readonlySelector.matches(a),null!==(t=null===(e=this.form)||void 0===e?void 0:e.description)&&void 0!==t?t:"",(e=>"Enter"===e.key&&this.submit()),(e=>{this.edit({description:e.currentTarget.value})}),this.renderTemplateOrSlot(`${a}:after`))}__renderContent(){var e;const t="content",a=!this.in("idle")||this.disabledSelector.matches(t),i=this.readonlySelector.matches(t),r=this.form.content_url?"url":this.form.content?"clipboard":this.__contentChoice;return s(b||(b=x` <div data-testid="content"> ${0} <x-group frame> <foxy-i18n class="${0}" lang="${0}" slot="header" key="template" ns="${0}"> </foxy-i18n> <x-choice data-testid="content-type" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} <div slot="url" ?hidden="${0}"> <div class="flex items-center mt-0 mb-m"> <vaadin-text-field data-testid="content-url" class="mr-s flex-grow" ?readonly="${0}" ?disabled="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> <vaadin-button data-testid="cache" class="relative" ?hidden="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="cache" ns="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" class="m-auto" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </vaadin-button> </div> </div> <div slot="clipboard" ?hidden="${0}"> <vaadin-text-area id="cached-content" data-testid="content-clipboard" class="w-full mb-m" ?readonly="${0}" ?disabled="${0}" .value="${0}" @input="${0}"> </vaadin-text-area> </div> </x-choice> </x-group> ${0} </div> `),this.renderTemplateOrSlot("content:before"),n({"transition-colors":!0,"text-disabled":a}),this.lang,this.ns,r,["default","url","clipboard"],i,a,(e=>{e instanceof d&&(this.edit({content:"",content_url:""}),this.__contentChoice=e.detail)}),["default","url","clipboard"].map((e=>s(v||(v=x` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="template_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="template_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),"url"!==r,i,a,this.form.content_url,(e=>"Enter"===e.key&&this.submit()),(e=>{const t=e.currentTarget.value;this.edit({content:"",content_url:t})}),i||this.form.content_url!==(null===(e=this.data)||void 0===e?void 0:e.content_url),a||"busy"===this.__cacheState,this.__cache,n({"relative transition-opacity":!0,"opacity-0":"idle"!==this.__cacheState}),this.lang,this.ns,n({"absolute inset-0 flex transition-opacity":!0,"opacity-0":"idle"===this.__cacheState}),"fail"===this.__cacheState?"error":"busy",this.lang,this.ns,"clipboard"!==r,i,a,p(this.form.content),(e=>{const t=e.currentTarget.value;this.edit({content:t,content_url:""})}),this.renderTemplateOrSlot("content:after"))}__renderTimestamps(){const e="timestamps";return s(y||(y=x` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot(`${e}:after`))}__renderAction(e){const{disabledSelector:t,href:a,lang:i,ns:r}=this,n=this.in({idle:{template:{dirty:"valid"}}}),o=this.in({idle:{snapshot:{dirty:"valid"}}}),d=!this.in("idle")||t.matches(e,!0),l=n||o;return s(_||(_=x` <div> ${0} <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" data-testid="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0}" data-testid="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="${0}" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),i,r,(e=>{e.detail.cancelled||this.delete()}),this.in("idle")?a?"error":"primary success":"",e,this.in({idle:"template"})&&!l||d,(t=>{if("delete"===e){this.renderRoot.querySelector("#confirm").show(t.currentTarget)}else this.submit()}),r,e,i,this.renderTemplateOrSlot(`${e}:after`))}async __cache(){var e,t;this.__cacheState="busy";try{const s=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href)&&void 0!==t?t:"",a=await new j.API(this).fetch(s,{method:"POST"});this.__cacheState=a.ok?"idle":"fail"}catch(e){this.__cacheState="fail"}}}customElements.define("foxy-template-form",j);export{j as TemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as
|
|
1
|
+
import{I as s}from"./shared-b7219771.js";import{a as e}from"./shared-29e21467.js";import{h as r}from"./shared-7f33a83a.js";import"./foxy-spinner.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-0672e78b.js";import"./shared-a8ced8bf.js";import"./shared-002b788f.js";import"./shared-4f037e43.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-4e709717.js";let t,a=s=>s;const d=e(s,"template-set-card");class o extends d{renderBody(){var s;const{description:e="",code:d=""}=null!==(s=this.data)&&void 0!==s?s:{};return r(t||(t=a` <div class="flex justify-between gap-s"> <span class="font-semibold truncate flex-shrink-0">${0}​</span> <span class="truncate text-tertiary">${0}​</span> </div> `),e,d)}}customElements.define("foxy-template-set-card",o);export{o as TemplateSetCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-6b622399.js";import"./shared-b0a6d48f.js";import"./shared-210387cb.js";import{I as e}from"./shared-da6cc488.js";import"./foxy-nucleon-element.js";import"./foxy-i18n-editor.js";import{_ as t}from"./shared-a8ced8bf.js";import{a as r}from"./shared-29e21467.js";import{B as o}from"./shared-002b788f.js";import{i as s}from"./shared-d3bf9ac0.js";import{c as a,h as n}from"./shared-7f33a83a.js";import"./shared-b28dbc68.js";import"./shared-7b167fe9.js";import"./shared-c52d3772.js";import"./shared-6b8874a7.js";import"./shared-e396ec04.js";import"./shared-c484320b.js";import"./shared-2215e6c8.js";import"./shared-dc798bf4.js";import"./shared-0672e78b.js";import"./shared-4f037e43.js";import"./shared-17d24760.js";import"./shared-0479553e.js";import"./shared-5ad8c9a0.js";import"./shared-222fe491.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import"./shared-4975f86f.js";import"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-ea316e64.js";import"./shared-f022673a.js";import"./shared-923da875.js";import"./shared-d519a301.js";let i,d,l,c=e=>e;const p=r(e,"template-set-form");class m extends p{constructor(){super(...arguments),this.paymentMethodSets=null,this.languageStrings="https://demo.api/hapi/property_helpers/10",this.localeCodes=null,this.languages=null}static get properties(){return t(t({},super.properties),{},{paymentMethodSets:{attribute:"payment-method-sets"},languageStrings:{attribute:"language-strings"},localeCodes:{attribute:"locale-codes"},languages:{}})}static get styles(){return[super.styles,a(i||(i=c`vaadin-button::part(label){flex:1;padding:0}.grid-cols-16rem{grid-template-columns:repeat(auto-fit,minmax(16rem,1fr))}`))]}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>!!e&&e.length<=100||"description:v8n_too_long",({code:e})=>!!e||"code:v8n_required",({code:e})=>!!e&&e.length<=50||"code:v8n_too_long",({language:e})=>!!e||"language:v8n_required",({locale_code:e})=>!!e||"locale_code:v8n_required"]}get hiddenSelector(){var e;const t=["cart-template-uri:not=content","cart-include-template-uri:not=content","email-template-uri:not=content,template-language","checkout-template-uri:not=content","receipt-template-uri:not=content","config:payment-method-set-uri:delete","config:payment-method-set-uri:create","config:payment-method-set-uri:timestamps","config:payment-method-set-uri:description","config:template-dialog:description","config:template-dialog:delete"];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("delete"),new o(`${t.join(" ")} ${super.hiddenSelector.toString()}`)}get readonlySelector(){var e;const t=[];return"DEFAULT"===(null===(e=this.data)||void 0===e?void 0:e.code)&&t.push("code","description"),new o(`${t.join(" ")} ${super.readonlySelector.toString()}`)}get templateConfigForm(){return this.renderRoot.querySelector("foxy-template-config-form")}get paymentsApiPaymentPresetForm(){return this.renderRoot.querySelector("foxy-payments-api-payment-preset-form")}renderBody(){var e,t,r,o;const a=this.renderRoot.querySelector("#localeCodes"),i=null==a?void 0:a.data,p=Object.entries(null!==(e=null==i?void 0:i.values)&&void 0!==e?e:{}).map((([e,t])=>({value:e,label:t}))),m=this.renderRoot.querySelector("#languages"),u=null==m?void 0:m.data,h=Object.entries(null!==(t=null==u?void 0:u.values)&&void 0!==t?t:{}).map((([e,t])=>({value:e,label:t}))),f=this.renderRoot.querySelector("#paymentMethodSet"),g=null==f?void 0:f.data;return n(d||(d=c` <foxy-nucleon class="hidden" infer="" href="${0}" id="languages" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="localeCodes" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="paymentMethodSet" @update="${0}"> </foxy-nucleon> <div class="grid grid-cols-16rem gap-m"> <foxy-internal-text-control infer="description"></foxy-internal-text-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-select-control infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="locale-code" .options="${0}"> </foxy-internal-select-control> </div> <foxy-internal-async-combo-box-control item-label-path="description" item-id-path="_links.self.href" infer="payment-method-set-uri" first="${0}" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> ${0} ${0} `),s(null!==(r=this.languages)&&void 0!==r?r:void 0),(()=>this.requestUpdate()),s(null!==(o=this.localeCodes)&&void 0!==o?o:void 0),(()=>this.requestUpdate()),s(this.form.payment_method_set_uri),(()=>this.requestUpdate()),h,p,this.paymentMethodSets,g,this.data&&this.languageStrings?n(l||(l=c` <foxy-i18n-editor language-overrides="${0}" selected-language="${0}" infer="i18n-editor" href="${0}"> </foxy-i18n-editor> `),this.data._links["fx:language_overrides"].href,this.form.language,this.languageStrings):"",super.renderBody())}}customElements.define("foxy-template-set-form",m);export{m as TemplateSetForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{h as t}from"./shared-7f33a83a.js";import{C as e}from"./shared-5ad8c9a0.js";import{N as s}from"./shared-
|
|
1
|
+
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{h as t}from"./shared-7f33a83a.js";import{C as e}from"./shared-5ad8c9a0.js";import{N as s}from"./shared-222fe491.js";import{T as i,a as r}from"./shared-29e21467.js";import{c as a}from"./shared-4e709717.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-a8ced8bf.js";import"./shared-4f037e43.js";import"./shared-002b788f.js";import"./shared-d3bf9ac0.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";let o,n,d,c,l,m,h,p,u,f,v,y,_=t=>t;const $=i(e(r(s,"transaction-card")));class x extends ${constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(o||(o=_` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(n||(n=_` <div class="flex items-center justify-between"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){const t=await super._sendGet(),e=await super._fetch(t._links["fx:store"].href);return this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",t}__renderTotal(){const e=this.data;let s;if(e){const i=`${e.total_order} ${e.currency_code}`,r=this.__currencyDisplay;s=t(d||(d=_` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:i,currencyDisplay:r}),this.lang,this.ns)}else s=t(c||(c=_`​`));return t(l||(l=_` <div data-testid="total"> ${0} <div class="font-semibold truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const a=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(m||(m=_` <div data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[a])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${a}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[a])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count:i.length};r=t(h||(h=_` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(p||(p=_`​`));return t(u||(u=_` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(f||(f=_`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(v||(v=_`​`));return t(y||(y=_` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",x);export{x as TransactionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-0672e78b.js";import"./shared-40537775.js";import{I as t}from"./shared-92bd849f.js";import{I as r}from"./shared-4c338ca6.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as o,c as e}from"./shared-7f33a83a.js";import{i}from"./shared-d3bf9ac0.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import{_ as s}from"./shared-a8ced8bf.js";import{N as n}from"./shared-b7423eab.js";import{a}from"./shared-29e21467.js";import{B as d}from"./shared-002b788f.js";import"./shared-ea316e64.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-4f037e43.js";import"./shared-5ad8c9a0.js";import"./shared-4e709717.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-6d2064e9.js";import"./shared-7b167fe9.js";import"./shared-2215e6c8.js";import"./shared-6b8874a7.js";import"./shared-f2d19582.js";import"./shared-1b3e1a0d.js";import"./shared-d43fc5cc.js";import"./shared-34b11d34.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import"./shared-e396ec04.js";import"./shared-11c2efc8.js";import"./shared-4975f86f.js";import"./shared-5504f415.js";import"./shared-e3ce88dc.js";import"./shared-923da875.js";import"./shared-3a3878c9.js";import"./shared-162fc285.js";import"./shared-85f9051e.js";import"./shared-6003864d.js";import"./foxy-address-card.js";import"./shared-b5cbbdd8.js";import"./foxy-item-card.js";import"./shared-6e6ed30a.js";import"./shared-40d82f6b.js";import"./shared-71deb26e.js";import"./shared-4457dc27.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-coupon-card.js";import"./shared-2f1e04ae.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-29376ba1.js";import"./shared-7661b51a.js";import"./shared-bc7f58ef.js";import"./shared-5b55627c.js";import"./foxy-subscription-card.js";import"./shared-236d9b7e.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-6bf8883f.js";import"./shared-e119731e.js";import"./foxy-table.js";import"./shared-cced7800.js";import"./foxy-nucleon-element.js";import"./shared-d302ad2c.js";import"./shared-75e78c70.js";import"./shared-facfe95a.js";import"./foxy-pagination.js";import"./shared-99065f2a.js";import"./shared-55e20d5b.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-74277a73.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends r{renderControl(){var t,r,e,s;return o(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends r{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,r="fail"===t?"error":"idle"===t?this.theme:"";return o(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),r,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const r=new n.API(this),o=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=o.ok?"idle":"fail",o.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends r{renderControl(){var t,r,e,i,s,n,a,d;return o(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,r;return o(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,r;return o(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,r,e;return o(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,r,e;return o(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends r{renderControl(){var t;return o(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,r;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status)||"completed";return o(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;if(!r)return o(b||(b=w`--`));const i={amount:`${r.total_order} ${e}`};return o($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==r?void 0:r[t]} ${e}`};return o(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,r?o(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):o(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(t,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,r,o;return Boolean(null!==(r=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==r?r: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,r,e,s,n,a;return o(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
1
|
+
import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-0672e78b.js";import"./shared-1f0841ec.js";import{I as t}from"./shared-da6cc488.js";import{I as r}from"./shared-17d24760.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as o,c as e}from"./shared-7f33a83a.js";import{i}from"./shared-d3bf9ac0.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import{_ as s}from"./shared-a8ced8bf.js";import{N as n}from"./shared-222fe491.js";import{a}from"./shared-29e21467.js";import{B as d}from"./shared-002b788f.js";import"./shared-ea316e64.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-4f037e43.js";import"./shared-5ad8c9a0.js";import"./shared-4e709717.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-6d2064e9.js";import"./shared-7b167fe9.js";import"./shared-2215e6c8.js";import"./shared-6b8874a7.js";import"./shared-f2d19582.js";import"./shared-1b3e1a0d.js";import"./shared-d43fc5cc.js";import"./shared-34b11d34.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import"./shared-e396ec04.js";import"./shared-11c2efc8.js";import"./shared-4975f86f.js";import"./shared-196fa627.js";import"./shared-923da875.js";import"./shared-3a3878c9.js";import"./shared-162fc285.js";import"./shared-85f9051e.js";import"./shared-5643d0ed.js";import"./foxy-address-card.js";import"./shared-b5cbbdd8.js";import"./foxy-item-card.js";import"./shared-b7219771.js";import"./shared-262caea4.js";import"./shared-210387cb.js";import"./shared-fdac2851.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-coupon-card.js";import"./shared-6b622399.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-e6f3e9f0.js";import"./shared-56d26968.js";import"./shared-b0ff4590.js";import"./shared-bc7f58ef.js";import"./shared-5b55627c.js";import"./foxy-subscription-card.js";import"./shared-236d9b7e.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-e08bcb6c.js";import"./shared-07fb5be2.js";import"./foxy-table.js";import"./shared-d5f242df.js";import"./foxy-nucleon-element.js";import"./shared-d302ad2c.js";import"./shared-75e78c70.js";import"./shared-62c8cfa2.js";import"./foxy-pagination.js";import"./shared-99065f2a.js";import"./shared-55e20d5b.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-344485cf.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends r{renderControl(){var t,r,e,s;return o(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends r{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,r="fail"===t?"error":"idle"===t?this.theme:"";return o(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),r,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const r=new n.API(this),o=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=o.ok?"idle":"fail",o.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends r{renderControl(){var t,r,e,i,s,n,a,d;return o(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,r;return o(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,r;return o(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,r,e;return o(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,r,e;return o(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends r{renderControl(){var t;return o(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,r;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(r=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status)||"completed";return o(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;if(!r)return o(b||(b=w`--`));const i={amount:`${r.total_order} ${e}`};return o($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const r=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==r?void 0:r.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==r?void 0:r[t]} ${e}`};return o(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,r?o(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):o(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(t,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,r,o;return Boolean(null!==(r=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==r?r: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,r,e,s,n,a;return o(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(r=this.data)||void 0===r?void 0:r._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-ea316e64.js";import"./shared-c484320b.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{T as s}from"./shared-
|
|
1
|
+
import"./shared-ea316e64.js";import"./shared-c484320b.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{T as s}from"./shared-62c8cfa2.js";export{T as TransactionsTable}from"./shared-62c8cfa2.js";import"./shared-c52d3772.js";import"./shared-29e21467.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-4f037e43.js";import"./shared-002b788f.js";import"./shared-d5f242df.js";import"./shared-5ad8c9a0.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-2215e6c8.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";export{U as UserForm}from"./shared-
|
|
1
|
+
import"./shared-2215e6c8.js";import"./shared-b8e9b536.js";import"./shared-ef0fc329.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";export{U as UserForm}from"./shared-ce1ae7e1.js";import"./shared-7b167fe9.js";import"./shared-c52d3772.js";import"./shared-29e21467.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-6b8874a7.js";import"./shared-4975f86f.js";import"./shared-dc798bf4.js";import"./shared-002b788f.js";import"./shared-5ad8c9a0.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-4f037e43.js";import"./shared-c484320b.js";import"./shared-ea316e64.js";import"./shared-2c842660.js";import"./shared-f2d19582.js";import"./shared-1b3e1a0d.js";import"./shared-d43fc5cc.js";import"./shared-34b11d34.js";import"./shared-6d2064e9.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import"./shared-e396ec04.js";import"./shared-11c2efc8.js";import"./shared-dcbf57e0.js";import"./shared-196fa627.js";import"./shared-923da875.js";import"./shared-3a3878c9.js";import"./shared-222fe491.js";import"./shared-d6276c83.js";import"./shared-b738ee96.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-b8e9b536.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-
|
|
1
|
+
import"./shared-b8e9b536.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-ce1ae7e1.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import{h as e}from"./shared-7f33a83a.js";import{T as a}from"./shared-d5f242df.js";import{a as r}from"./shared-29e21467.js";import"./shared-7b167fe9.js";import"./shared-c52d3772.js";import"./shared-ef0fc329.js";import"./shared-a8ced8bf.js";import"./shared-4975f86f.js";import"./shared-dc798bf4.js";import"./shared-002b788f.js";import"./shared-5ad8c9a0.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-4f037e43.js";import"./shared-d6276c83.js";import"./shared-2215e6c8.js";import"./shared-6b8874a7.js";import"./shared-2c842660.js";import"./shared-c484320b.js";import"./shared-f2d19582.js";import"./shared-1b3e1a0d.js";import"./shared-d43fc5cc.js";import"./shared-34b11d34.js";import"./shared-6d2064e9.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import"./shared-e396ec04.js";import"./shared-11c2efc8.js";import"./shared-dcbf57e0.js";import"./shared-196fa627.js";import"./shared-923da875.js";import"./shared-3a3878c9.js";import"./shared-222fe491.js";import"./shared-b738ee96.js";import"./shared-ea316e64.js";import"./foxy-nucleon-element.js";let t,o,d,i,m,n,l,p=s=>s;class f extends(r(a,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return e(t||(t=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((r=>e(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[r]?"":"text-disabled",s.find((s=>s.property===r)).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,r=a.getRootNode().querySelector("#form");r.href=s.data._links.self.href,r.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-ea316e64.js";import"./shared-c484320b.js";import{I as
|
|
1
|
+
import"./shared-ea316e64.js";import"./shared-c484320b.js";import{I as s}from"./shared-b7219771.js";import{h as e}from"./shared-7f33a83a.js";import{a as i}from"./shared-29e21467.js";import"./shared-c52d3772.js";import"./foxy-spinner.js";import"./shared-0672e78b.js";import"./shared-a8ced8bf.js";import"./shared-002b788f.js";import"./shared-4f037e43.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-4e709717.js";let r,a=s=>s;class o extends(i(s,"webhook-card")){renderBody(){var s,i,o,t;return e(r||(r=a` <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 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1f0841ec.js";import"./shared-8a5bdad3.js";import"./shared-210387cb.js";import{I as e}from"./shared-da6cc488.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as r}from"./shared-29e21467.js";import{h as o}from"./shared-7f33a83a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-0672e78b.js";import"./shared-a8ced8bf.js";import"./shared-002b788f.js";import"./shared-4f037e43.js";import"./shared-5ad8c9a0.js";import"./shared-d3bf9ac0.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./shared-ef0fc329.js";import"./shared-b8e9b536.js";import"./shared-7b167fe9.js";import"./shared-4975f86f.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-17d24760.js";import"./shared-0479553e.js";import"./shared-2215e6c8.js";import"./shared-6b8874a7.js";import"./shared-b7219771.js";let t,s,n=e=>e;class a extends(r(e,"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 o(t||(t=n` <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?o(s||(s=n` <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",a);export{a as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0672e78b.js";import{I as e}from"./shared-
|
|
1
|
+
import"./shared-0672e78b.js";import{I as e}from"./shared-b7219771.js";import{a as s}from"./shared-29e21467.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-a8ced8bf.js";import"./shared-002b788f.js";import"./shared-4f037e43.js";import"./foxy-spinner.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";import"./shared-4e709717.js";let o,a=e=>e;class t extends(s(e,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(o||(o=a` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-semibold"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}​ </span> </p> <p class="text-tertiary">${0}​</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0672e78b.js";import{I as s}from"./shared-
|
|
1
|
+
import"./shared-0672e78b.js";import{I as s}from"./shared-b7219771.js";import{a as e}from"./shared-29e21467.js";import{h as r}from"./shared-7f33a83a.js";import{c as t}from"./shared-4e709717.js";import"./shared-a8ced8bf.js";import"./shared-002b788f.js";import"./shared-4f037e43.js";import"./foxy-spinner.js";import"./shared-c484320b.js";import"./shared-c52d3772.js";import"./shared-ea316e64.js";import"./shared-222fe491.js";import"./shared-dc798bf4.js";import"./shared-d6276c83.js";import"./shared-dcbf57e0.js";let a,o=s=>s;const d=e(s,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return r(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-semibold" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},t({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-a8ced8bf.js";import{B as t}from"./shared-b8e9b536.js";import{c as r,h as s}from"./shared-7f33a83a.js";import{x as n}from"./shared-29e21467.js";import{I as o}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-a8ced8bf.js";import{B as t}from"./shared-b8e9b536.js";import{c as r,h as s}from"./shared-7f33a83a.js";import{x as n}from"./shared-29e21467.js";import{I as o}from"./shared-196fa627.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-0479553e.js";import"./shared-0672e78b.js";import{_ as e}from"./shared-a8ced8bf.js";import{C as r}from"./shared-5ad8c9a0.js";import{a as t,T as s}from"./shared-29e21467.js";import{L as n,h as o,f as i}from"./shared-7f33a83a.js";import{I as a}from"./shared-4f037e43.js";import{N as l}from"./shared-
|
|
1
|
+
import"./shared-0479553e.js";import"./shared-0672e78b.js";import{_ as e}from"./shared-a8ced8bf.js";import{C as r}from"./shared-5ad8c9a0.js";import{a as t,T as s}from"./shared-29e21467.js";import{L as n,h as o,f as i}from"./shared-7f33a83a.js";import{I as a}from"./shared-4f037e43.js";import{N as l}from"./shared-222fe491.js";let d,p,f,u,h=e=>e;class m extends(r(t(s(a(n))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,r){return"nucleon"===e&&r instanceof l?r:super.inferFromElement(e,r)}applyInferredProperties(e){var r,t;super.applyInferredProperties(e),this.disabled=!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))||super.disabled,this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null}updated(e){if(super.updated(e),"string"==typeof this.infer){const e=o(d||(d=h` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);i(e,this)}}renderControl(){return o(p||(p=h``))}render(){return this.hidden?o(f||(f=h``)):o(u||(u=h` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",m);export{m as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as
|
|
1
|
+
import{_ as e}from"./shared-a8ced8bf.js";import{E as t,T as n,C as s}from"./shared-7b167fe9.js";import"./shared-6b8874a7.js";import{O as i}from"./shared-b28dbc68.js";import{T as r}from"./shared-2215e6c8.js";import{h as o,P as a}from"./shared-c52d3772.js";import{L as l}from"./shared-923da875.js";import{b as A}from"./shared-e396ec04.js";import{P as d,a as h,F as m}from"./shared-c484320b.js";import{y as c,w as u,x as p}from"./shared-29e21467.js";import{c as g,L as v,h as y}from"./shared-7f33a83a.js";import{D as b}from"./shared-1b3e1a0d.js";class _ extends CustomEvent{constructor(e){super("change",{detail:e})}}class f extends _{}const w=o`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -76,18 +76,18 @@ import{E as e,T as t,C as i}from"./shared-7b167fe9.js";import"./shared-6b8874a7.
|
|
|
76
76
|
}
|
|
77
77
|
</style>
|
|
78
78
|
</template>
|
|
79
|
-
</dom-module>`;document.head.appendChild(
|
|
79
|
+
</dom-module>`;document.head.appendChild(w.content);
|
|
80
80
|
/**
|
|
81
81
|
@license
|
|
82
82
|
Copyright (c) 2019 Vaadin Ltd.
|
|
83
83
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
84
84
|
*/
|
|
85
|
-
const
|
|
85
|
+
const x=e=>class extends(l(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,n,s){if(e&&t){if(s){const t=s.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],n=t&&!t.disabled?this.items.indexOf(t):-1;n<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(n)?this.selectedValues=this.selectedValues.filter((e=>e!==n)):this.selectedValues=this.selectedValues.concat(n))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
|
|
86
86
|
/**
|
|
87
87
|
@license
|
|
88
88
|
Copyright (c) 2017 Vaadin Ltd.
|
|
89
89
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
|
-
*/;class
|
|
90
|
+
*/;class E extends(t(x(n(a)))){static get template(){return o`
|
|
91
91
|
<style>
|
|
92
92
|
:host {
|
|
93
93
|
display: flex;
|
|
@@ -107,7 +107,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
107
107
|
<div part="items">
|
|
108
108
|
<slot></slot>
|
|
109
109
|
</div>
|
|
110
|
-
`}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof
|
|
110
|
+
`}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof a||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(E.is,E);const k=o`<dom-module id="lumo-select" theme-for="vaadin-select">
|
|
111
111
|
<template>
|
|
112
112
|
<style include="lumo-field-button">
|
|
113
113
|
:host {
|
|
@@ -234,7 +234,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
234
234
|
}
|
|
235
235
|
</style>
|
|
236
236
|
</template>
|
|
237
|
-
</dom-module>`;document.head.appendChild(
|
|
237
|
+
</dom-module>`;document.head.appendChild(k.content),
|
|
238
238
|
/**
|
|
239
239
|
@license
|
|
240
240
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -245,25 +245,25 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
245
245
|
part of the polymer project is also subject to an additional IP rights grant
|
|
246
246
|
found at http://polymer.github.io/PATENTS.txt
|
|
247
247
|
*/
|
|
248
|
-
|
|
248
|
+
d({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});
|
|
249
249
|
/**
|
|
250
250
|
@license
|
|
251
251
|
Copyright (c) 2017 Vaadin Ltd.
|
|
252
252
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
253
253
|
*/
|
|
254
|
-
const
|
|
254
|
+
const B=document.createElement("template");B.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(B.content);class C extends i{static get is(){return"vaadin-select-overlay"}}
|
|
255
255
|
/**
|
|
256
256
|
@license
|
|
257
257
|
Copyright (c) 2017 Vaadin Ltd.
|
|
258
258
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
259
259
|
*/
|
|
260
|
-
let
|
|
260
|
+
let I;customElements.define(C.is,C);class S extends r{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!I){I=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=I.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return I}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(S.is,S);
|
|
261
261
|
/**
|
|
262
262
|
@license
|
|
263
263
|
Copyright (c) 2017 Vaadin Ltd.
|
|
264
264
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
265
265
|
*/
|
|
266
|
-
const
|
|
266
|
+
const Q=document.createElement("template");Q.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(Q.content);class T extends(t(s(n(h(A,a))))){static get template(){return o`
|
|
267
267
|
<style>
|
|
268
268
|
:host {
|
|
269
269
|
display: inline-block;
|
|
@@ -296,4 +296,14 @@ const y=document.createElement("template");y.innerHTML="<custom-style>\n <style
|
|
|
296
296
|
<vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
|
|
297
297
|
|
|
298
298
|
<iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
|
|
299
|
-
`}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new
|
|
299
|
+
`}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new m(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,n,s){e!==t?this._contentTemplate=void 0:n!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,n){if(n){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(n.setProperties({owner:this,renderer:t}),this.render(),n.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,n=void 0!==t?t:-1,s=this._menuElement._searchKey(n,e.key);s>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[s].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,n){t&&t.setAttribute("aria-expanded",e),n&&n.focusElement&&n.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),n=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?n:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,n,s)=>void 0===t&&n.value===e?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),n=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",n?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(T.is,T);let M,D,q=e=>e;c("vaadin-list-box",g(M||(M=q`
|
|
300
|
+
[part='items'] ::slotted(vaadin-item.dropdown-divisor){
|
|
301
|
+
color:var(--lumo-contrast-40pct);
|
|
302
|
+
box-shadow:0 1px var(--lumo-contrast-10pct);
|
|
303
|
+
border-radius:0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
[part='items'] ::slotted(vaadin-item.dropdown-sub-item){
|
|
307
|
+
margin-left:var(--lumo-space-l);
|
|
308
|
+
}
|
|
309
|
+
`)));class L extends v{constructor(){super(),this.disabled=!1,this.label="",this.value=null,this.items=null,this.getText=e=>e,this.__unexistentValue=`@foxy.io/elements#dropdown-${Math.random().toFixed(16).substr(2)}`,this.__renderedItems={},this.__list=document.createElement("vaadin-list-box")}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},getText:{type:Object,attribute:!1},items:{type:Array},label:{type:String},value:{type:String}})}static get styles(){return u.styles}render(){return y(D||(D=q` <vaadin-select class="w-full ${0}" data-testid="select" .label="${0}" .value="${0}" .disabled="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> `),this.label?"-mt-m":"",this.label,null===this.value?this.__unexistentValue:this.value,this.disabled,this.__renderItems.bind(this),this.__handleChange)}__renderItems(e){var t;let n=e.querySelector("vaadin-list-box");null===n&&(e.appendChild(this.__list),n=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const s=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<s.length;++e)if("string"==typeof s[e])this.__addOrKeepItem(s[e],s[e],n).classList.add("dropdown-item");else if(Array.isArray(s[e])){const t=this.__addOrKeepItem(s[e][0],s[e][0],n);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of s[e][1])this.__addOrKeepItem(s[e][0]+": "+t,t,n).classList.add("dropdown-sub-item")}for(const e of Object.values(this.__renderedItems)){const t=e;t.dataset.keep||(e.remove(),delete this.__renderedItems[t.dataset.trackId])}}__addOrKeepItem(e,t,n){let s;return this.__renderedItems[e]?s=this.__renderedItems[e]:(s=document.createElement("vaadin-item"),this.__renderedItems[e]=s,s.value=e,n.appendChild(s)),s.dataset.keep="true",s.dataset.trackId=e,s.textContent=this.getText(t),s}__handleChange(e){const t=e.target.value,n=t===this.__unexistentValue?null:t;this.dispatchEvent(new b(n))}}let R,$,j=e=>e;class O extends v{constructor(){super(...arguments),this.variant=null}static get styles(){return[u.styles,g(R||(R=j`@keyframes blink{from{opacity:.5}to{opacity:1}}.animated{animation:blink .5s infinite alternate}:host{display:inline-block;min-width:4rem}`))]}static get properties(){return e(e({},super.properties),{},{variant:{type:String}})}render(){const e="error"===this.variant?"bg-error-10":"bg-contrast-10",t=null===this.variant?"animated":"";return y($||($=j` <div class="relative"> <span class="opacity-0"><slot></slot></span> <div class="${0} ${0} rounded my-xs absolute inset-0"></div> </div> `),e,t)}}let P,H,V,G=e=>e;class N extends p{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":O}}static get properties(){return e(e({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,g(P||(P=G`:host{display:inline-block;color:inherit;line-height:inherit;font:inherit}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?y(H||(H=G`${0}<slot></slot>`),this._t(this.key,this.opts)):y(V||(V=G`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function F(...e){return e.filter((e=>!!e))}let W,z,K,U,Y=e=>e;class J extends p{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":N}}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=J._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return y(W||(W=Y` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs" style="max-width:364px;font-feature-settings:'tnum' 1"> ${0} </div> ${0} </div> `),J._allDays.map(((t,n)=>y(z||(z=Y` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[n],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),F(this.value.length>0&&y(K||(K=Y` <p class="text-s text-tertiary leading-s"> <x-i18n key="monthday-picker.hint" .opts="${0}" .lang="${0}"> </x-i18n> ${0} </p> `),{days:this.value},this.lang,F([29,30,31].some((e=>this.value.includes(e)))&&y(U||(U=Y`<x-i18n key="monthday-picker.warning" .lang="${0}"></x-i18n>`),this.lang)))))}_getLabelClass(e){let t="flex items-center justify-center m-xs p-s rounded text-m font-medium transition duration-200 sm-p-0 sm-h-m sm-w-l ";return this.value.includes(e)||(t+="bg-contrast-5 "),this._isI18nReady&&!this.disabled?(t+="cursor-pointer ",t+=this.value.includes(e)?"text-base ":"hover-bg-primary-10 ",e<29?(t+="focus-within-shadow-outline ",t+=this.value.includes(e)?"bg-primary":"text-body"):(t+="focus-within-shadow-outline-error ",t+=this.value.includes(e)?"bg-error":"text-error")):(t+="text-transparent ",this.value.includes(e)&&(t+=e<29?"bg-primary-50":"bg-error-10")),t}_handleChange(e,t){e.stopPropagation(),this._toggle(t),this._sendChange()}_sendChange(){this.dispatchEvent(new _(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,n)=>n!==t))}}J._allDays=Array.from(new Array(31),((e,t)=>t+1));const Z=document.createElement("template");function X(e,t,n="long"){const s=new Date;for(;s.getDay()!==e;)s.setDate(s.getDate()+1);return s.toLocaleDateString(t,{weekday:n})}Z.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(Z.content);let ee,te,ne,se=e=>e;class ie extends J{render(){return y(ee||(ee=se` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),ie._allDays.map((e=>y(te||(te=se` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),X(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),F(this.value.length>0&&y(ne||(ne=se` <p class="text-s text-tertiary leading-s"> <x-i18n key="weekday-picker.hint" .lang="${0}" .opts="${0}"> </x-i18n> </p> `),this.lang,{days:this.value})))}_getLabelClass(e){let t="flex items-center justify-center m-xs h-m w-xl rounded font-medium transition duration-200 ";return this._isI18nReady&&!this.disabled?(t+="cursor-pointer focus-within-shadow-outline ",t+=this.value.includes(e)?"text-base bg-primary":"bg-contrast-5 hover-bg-contrast-10 text-body"):(t+="text-transparent ",t+=this.value.includes(e)?"bg-primary-50":"bg-contrast-5"),t}_sendChange(){this.dispatchEvent(new f(this.value))}}ie._allDays=new Array(7).fill(0).map(((e,t)=>t));export{L as D,N as I,J as M,O as S,ie as W,T as a,F as c,X as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-0672e78b.js";import{I as e}from"./shared-
|
|
1
|
+
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-0672e78b.js";import{I as e}from"./shared-17d24760.js";import"./shared-ea316e64.js";import"./shared-c484320b.js";import{_ as t}from"./shared-a8ced8bf.js";import{L as r,h as i}from"./shared-7f33a83a.js";import{I as s}from"./shared-4f037e43.js";import{T as o}from"./shared-29e21467.js";import{c as n}from"./shared-4e709717.js";let a,l=e=>e;class c extends(o(s(r))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return t(t({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return i(a||(a=l` <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",c);let d,m,f,h,p=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return i(d||(d=p` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),t,n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!t}),(t=>{const r=t.currentTarget,i=this.__dialog;i.header="header_update",i.href=e.href,i.show(r)}),this.__cardRenderer(e))}}static get properties(){return t(t({},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(m||(m=p` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?i(f||(f=p` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":i(h||(h=p` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const t=this.__dialog,r=e.currentTarget;t.header="header_create",t.href="",t.show(r)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;return(null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==this.item&&(this.__cachedCardRenderer={item:this.item,render:"string"==typeof this.item?new Function("ctx",`return ctx.html\`<${this.item} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${this.item}>\``):this.item}),this.__cachedCardRenderer.render}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-2215e6c8.js";import{I as e}from"./shared-
|
|
1
|
+
import"./shared-2215e6c8.js";import{I as e}from"./shared-17d24760.js";import{_ as t}from"./shared-a8ced8bf.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";class i extends e{constructor(){super(...arguments),this.getValue=()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]},this.setValue=e=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.edit({[this.property]:e})},this.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.requestUpdate("helperText",this.__helperText),this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){this.requestUpdate("property",this.__property),this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.requestUpdate("label",this.__label),this.__label=e}resetPlaceholder(){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=null}resetHelperText(){this.requestUpdate("helperText",this.__helperText),this.__helperText=null}resetV8nPrefix(){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=null}resetProperty(){this.requestUpdate("property",this.__property),this.__property=null}resetLabel(){this.requestUpdate("label",this.__label),this.__label=null}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)))}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",i);let l,h,n,o=e=>e;customElements.define("foxy-internal-text-control",class extends i{constructor(){super(...arguments),this.prefix=null,this.suffix=null}static get properties(){return t(t({},super.properties),{},{prefix:{},suffix:{}})}renderControl(){return s(l||(l=o` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),r(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,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}),this.prefix?s(h||(h=o`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(n||(n=o`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});export{i as I};
|