@foxy.io/elements 1.18.0-beta.4 → 1.18.0-beta.7
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 +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +3 -3
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +5 -86
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -0
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -0
- package/dist/cdn/foxy-item-category-form.js +1 -0
- 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-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +2 -2
- package/dist/cdn/foxy-reports-table.js +6 -6
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -150
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +5 -5
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-swipe-actions.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-901ca702.js → shared-02f2d418.js} +1 -1
- package/dist/cdn/{shared-e1c1e8e2.js → shared-0479553e.js} +1 -1
- package/dist/cdn/shared-04c51428.js +1 -0
- package/dist/cdn/{shared-99940888.js → shared-11c2efc8.js} +1 -1
- package/dist/cdn/{shared-d90d6140.js → shared-16aade17.js} +1 -1
- package/dist/cdn/shared-1b38c44f.js +29 -0
- package/dist/cdn/shared-1ed709ca.js +82 -0
- package/dist/cdn/{shared-fd595d0a.js → shared-24fdefca.js} +1 -1
- package/dist/cdn/{shared-3e3c07ac.js → shared-26502fca.js} +1 -1
- package/dist/cdn/shared-2788214c.js +1 -0
- package/dist/cdn/{shared-ff1d9854.js → shared-2c0e6413.js} +1 -1
- package/dist/cdn/shared-351b4f85.js +150 -0
- package/dist/cdn/shared-39265f55.js +11 -0
- package/dist/cdn/{shared-9be1a70f.js → shared-3ddbe8c9.js} +1 -1
- package/dist/cdn/{shared-fe68657a.js → shared-403db7b9.js} +1 -1
- package/dist/cdn/{shared-023c287a.js → shared-4ba52733.js} +1 -1
- package/dist/cdn/shared-5155696f.js +1 -0
- package/dist/cdn/shared-565feb2f.js +1 -0
- package/dist/cdn/shared-589c6a83.js +1 -0
- package/dist/cdn/{shared-c63ba384.js → shared-5fd9d45d.js} +1 -1
- package/dist/cdn/shared-61199be1.js +1 -0
- package/dist/cdn/shared-710b5e7f.js +1 -0
- package/dist/cdn/{shared-4560425c.js → shared-71762c29.js} +1 -1
- package/dist/cdn/{shared-084b6372.js → shared-75ec4e1a.js} +1 -1
- package/dist/cdn/{shared-c7280a24.js → shared-76daf1fb.js} +1 -1
- package/dist/cdn/{shared-9ef81b37.js → shared-7976580a.js} +1 -1
- package/dist/cdn/shared-7a078e85.js +1 -0
- package/dist/cdn/{shared-07731632.js → shared-7b72ee7e.js} +1 -1
- package/dist/cdn/{shared-ec7cfc23.js → shared-7c5cfe1e.js} +12 -22
- package/dist/cdn/{shared-dc73b9a5.js → shared-7f33a83a.js} +1 -1
- package/dist/cdn/{shared-872ceacf.js → shared-81beff3a.js} +2 -2
- package/dist/cdn/{shared-e3b29ffa.js → shared-8403766d.js} +1 -1
- package/dist/cdn/{shared-85d45495.js → shared-84b5d8f0.js} +1 -1
- package/dist/cdn/{shared-77fad85a.js → shared-85cd6cfb.js} +1 -1
- package/dist/cdn/{shared-3a7cf739.js → shared-86d0d927.js} +1 -1
- package/dist/cdn/shared-8d7ef22f.js +1 -0
- package/dist/cdn/{shared-71acf673.js → shared-90119584.js} +1 -1
- package/dist/cdn/{shared-a48a9dfc.js → shared-94a4ab55.js} +1 -1
- package/dist/cdn/{shared-74a27421.js → shared-94f3042a.js} +1 -1
- package/dist/cdn/shared-974bec9a.js +1 -0
- package/dist/cdn/{shared-a2a1193d.js → shared-97a3aa5b.js} +1 -1
- package/dist/cdn/{shared-0eb966c5.js → shared-99065f2a.js} +1 -1
- package/dist/cdn/shared-9c176693.js +1 -0
- package/dist/cdn/{shared-11f0daea.js → shared-a7429258.js} +1 -1
- package/dist/cdn/{shared-c0fb5a33.js → shared-ad040ad4.js} +1 -1
- package/dist/cdn/{shared-23fd456c.js → shared-b95332ec.js} +1 -1
- package/dist/cdn/shared-be6ec4b3.js +1 -0
- package/dist/cdn/{shared-4c0520f6.js → shared-bfca826a.js} +1 -1
- package/dist/cdn/shared-c15f0523.js +1 -0
- package/dist/cdn/shared-c9d1a2cd.js +1 -0
- package/dist/cdn/{shared-91b86bae.js → shared-cf2b9cc3.js} +1 -1
- package/dist/cdn/{shared-60c862aa.js → shared-d37049e9.js} +1 -1
- package/dist/cdn/{shared-9803aa7c.js → shared-d3bf9ac0.js} +2 -2
- package/dist/cdn/{shared-a0c6a159.js → shared-d519a301.js} +2 -2
- package/dist/cdn/shared-d97ce3d5.js +1 -0
- package/dist/cdn/{shared-f2639daf.js → shared-db118e3e.js} +1 -1
- package/dist/cdn/{shared-82b1a365.js → shared-de25e8f0.js} +5 -5
- package/dist/cdn/{shared-80b90eec.js → shared-df26adf5.js} +1 -1
- package/dist/cdn/{shared-ca0f14c1.js → shared-e34d2ef1.js} +1 -1
- package/dist/cdn/{shared-f9f9ed5b.js → shared-e6f3e9f0.js} +1 -1
- package/dist/cdn/{shared-412670b8.js → shared-eb344bd5.js} +1 -1
- package/dist/cdn/shared-ec8a003f.js +1 -0
- package/dist/cdn/{shared-189dfb49.js → shared-ecdf2d11.js} +1 -1
- package/dist/cdn/{shared-22ba9566.js → shared-f3b35364.js} +1 -1
- package/dist/cdn/{shared-74b7ad17.js → shared-f4b47b4a.js} +1 -1
- package/dist/cdn/{shared-c7c8d1b6.js → shared-fe555bf4.js} +1 -1
- package/dist/cdn/shared-ff7a10de.js +1 -0
- package/dist/cdn/translations/email-template-card/en.json +8 -0
- package/dist/cdn/translations/email-template-form/en.json +5 -0
- package/dist/cdn/translations/gift-card-code-form/en.json +32 -0
- package/dist/cdn/translations/gift-card-code-log-card/en.json +10 -0
- package/dist/cdn/translations/gift-card-form/en.json +58 -1
- package/dist/cdn/translations/item-category-form/en.json +196 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +1 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalControl/InternalControl.js +3 -2
- package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +17 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +57 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
- package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
- package/dist/elements/internal/InternalSelectControl/index.js +7 -0
- package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
- package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
- package/dist/elements/internal/InternalSelectControl/types.js +2 -0
- package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +1 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +10 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +34 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -0
- package/dist/elements/public/EmailTemplateCard/index.d.ts +6 -0
- package/dist/elements/public/EmailTemplateCard/index.js +8 -0
- package/dist/elements/public/EmailTemplateCard/index.js.map +1 -0
- package/dist/elements/public/EmailTemplateCard/types.d.ts +3 -0
- package/dist/elements/public/EmailTemplateCard/types.js +2 -0
- package/dist/elements/public/EmailTemplateCard/types.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +3 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +17 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/index.d.ts +1 -0
- package/dist/elements/public/EmailTemplateForm/index.js +1 -0
- package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -0
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +32 -0
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/index.d.ts +7 -4
- package/dist/elements/public/GiftCardCodeForm/index.js +7 -4
- package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts +5 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +12 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +108 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +6 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.js +8 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +25 -0
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/index.d.ts +1 -2
- package/dist/elements/public/GiftCardForm/index.js +1 -2
- package/dist/elements/public/GiftCardForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +14 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +93 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +6 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +8 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -0
- package/dist/elements/public/ItemCard/ItemCard.js +8 -6
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +6 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +11 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
- package/dist/elements/public/ItemCategoryCard/index.d.ts +2 -0
- package/dist/elements/public/ItemCategoryCard/index.js +4 -0
- package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
- package/dist/elements/public/ItemCategoryCard/types.js +2 -0
- package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +31 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +309 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
- package/dist/elements/public/ItemCategoryForm/index.js +12 -0
- package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +85 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/types.d.ts +3 -0
- package/dist/elements/public/ItemCategoryForm/types.js +2 -0
- package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
- package/dist/elements/public/NucleonElement/API.js +1 -1
- package/dist/elements/public/NucleonElement/API.js.map +1 -1
- package/dist/elements/public/ShipmentCard/types.d.ts +2 -16
- package/dist/elements/public/ShipmentCard/types.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +0 -4
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +4 -0
- package/dist/elements/public/index.defined.d.ts +4 -0
- package/dist/elements/public/index.defined.js +4 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +4 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +48 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-131115c9.js +0 -1
- package/dist/cdn/shared-2f0efb2c.js +0 -1
- package/dist/cdn/shared-37b61010.js +0 -1
- package/dist/cdn/shared-3d7a47dd.js +0 -1
- package/dist/cdn/shared-56b6461b.js +0 -1
- package/dist/cdn/shared-6ce2acfa.js +0 -1
- package/dist/cdn/shared-6f89d2e0.js +0 -1
- package/dist/cdn/shared-9b392ba8.js +0 -1
- package/dist/cdn/shared-b5195ae3.js +0 -1
- package/dist/cdn/shared-ba3054c3.js +0 -1
- package/dist/cdn/shared-daa454bf.js +0 -1
- package/dist/cdn/shared-f31044b8.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,E as t,T as i,C as s}from"./shared-75ec4e1a.js";import{T as o}from"./shared-76daf1fb.js";import{O as n,I as l}from"./shared-5fd9d45d.js";import{h as A,D as r,t as a,P as d}from"./shared-cf2b9cc3.js";import{F as h,P as u,a as m}from"./shared-26502fca.js";import"./shared-1b38c44f.js";const c=A`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -76,23 +76,23 @@ import{_ as e}from"./shared-ca0f14c1.js";import{a as t,E as s,T as i,C as n}from
|
|
|
76
76
|
}
|
|
77
77
|
</style>
|
|
78
78
|
</template>
|
|
79
|
-
</dom-module>`;document.head.appendChild(
|
|
79
|
+
</dom-module>`;document.head.appendChild(c.content);
|
|
80
80
|
/**
|
|
81
81
|
@license
|
|
82
82
|
Copyright (c) 2017 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 p=t=>class extends t{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("click",(e=>this._onClick(e))),this._observer=new h(this,(e=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(e,t,i,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),this.items.forEach((e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation"),e.updateStyles()})),this._setFocusable(i);const s=e[i];e.forEach((e=>e.selected=e===s)),s&&!s.disabled&&this._scrollToItem(i)}}get focused(){return this.getRootNode().activeElement}_filterItems(e){return e.filter((e=>e._hasVaadinItemMixin))}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let i;t&&!t.disabled&&(i=this.items.indexOf(t))>=0&&(this.selected=i)}_searchKey(e,t){this._searchReset=r.debounce(this._searchReset,a.after(500),(()=>this._searchBuf="")),this._searchBuf+=t.toLowerCase();this.items.some((e=>0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=t.toLowerCase());const i=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(i,1,(e=>!(e.disabled||this._isItemHidden(e))&&0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key.replace(/^Arrow/,""),i=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(t)&&1===t.length){const e=this._searchKey(i,t);return void(e>=0&&this._focus(e))}let s,o;const n=this._isRTL?-1:1;this._vertical&&"Up"===t||!this._vertical&&"Left"===t?(o=-n,s=i-n):this._vertical&&"Down"===t||!this._vertical&&"Right"===t?(o=n,s=i+n):"Home"===t?(o=1,s=0):"End"===t&&(o=-1,s=this.items.length-1),s=this._getAvailableIndex(s,o,(e=>!(e.disabled||this._isItemHidden(e)))),s>=0&&(this._focus(s),e.preventDefault())}_getAvailableIndex(e,t,i){const s=this.items.length;for(let o=0;"number"==typeof e&&o<s;o++,e+=t||1){e<0?e=s-1:e>=s&&(e=0);if(i(this.items[e]))return e}return-1}_isItemHidden(e){return"none"===getComputedStyle(e).display}_setFocusable(e){e=this._getAvailableIndex(e,1,(e=>!e.disabled));const t=this.items[e]||this.items[0];this.items.forEach((e=>e.tabIndex=e===t?0:-1))}_focus(e){const t=this.items[e];this.items.forEach((e=>e.focused=e===t)),this._setFocusable(e),this._scrollToItem(e),t.focus()}focus(){this._observer&&this._observer.flush();const e=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);e&&e.focus()}get _scrollerElement(){}_scrollToItem(e){const t=this.items[e];if(!t)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect();let l=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?l=o[i[1]]-s[i[1]]:(!this._isRTL&&n[i[0]]<=s[i[0]]||this._isRTL&&n[i[0]]>=s[i[0]])&&(l=n[i[0]]-s[i[0]]),this._scroll(l)}get _vertical(){return"horizontal"!==this.orientation}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const i=e.detectScrollType(),s=e.getNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement)+t;e.setNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement,s)}}}
|
|
86
86
|
/**
|
|
87
87
|
@license
|
|
88
88
|
Copyright (c) 2019 Vaadin Ltd.
|
|
89
89
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
|
-
*/,
|
|
90
|
+
*/,v=e=>class extends(p(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,i,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],i=t&&!t.disabled?this.items.indexOf(t):-1;i<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(i)?this.selectedValues=this.selectedValues.filter((e=>e!==i)):this.selectedValues=this.selectedValues.concat(i))}_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)}}
|
|
91
91
|
/**
|
|
92
92
|
@license
|
|
93
93
|
Copyright (c) 2017 Vaadin Ltd.
|
|
94
94
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
95
|
-
*/;class
|
|
95
|
+
*/;class _ extends(t(v(i(d)))){static get template(){return A`
|
|
96
96
|
<style>
|
|
97
97
|
:host {
|
|
98
98
|
display: flex;
|
|
@@ -112,7 +112,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
112
112
|
<div part="items">
|
|
113
113
|
<slot></slot>
|
|
114
114
|
</div>
|
|
115
|
-
`}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
|
|
115
|
+
`}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 d||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(_.is,_);const g=A`<dom-module id="lumo-select" theme-for="vaadin-select">
|
|
116
116
|
<template>
|
|
117
117
|
<style include="lumo-field-button">
|
|
118
118
|
:host {
|
|
@@ -239,7 +239,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
239
239
|
}
|
|
240
240
|
</style>
|
|
241
241
|
</template>
|
|
242
|
-
</dom-module>`;document.head.appendChild(
|
|
242
|
+
</dom-module>`;document.head.appendChild(g.content),
|
|
243
243
|
/**
|
|
244
244
|
@license
|
|
245
245
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -250,25 +250,25 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
250
250
|
part of the polymer project is also subject to an additional IP rights grant
|
|
251
251
|
found at http://polymer.github.io/PATENTS.txt
|
|
252
252
|
*/
|
|
253
|
-
|
|
253
|
+
u({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)}});
|
|
254
254
|
/**
|
|
255
255
|
@license
|
|
256
256
|
Copyright (c) 2017 Vaadin Ltd.
|
|
257
257
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
258
258
|
*/
|
|
259
|
-
const
|
|
259
|
+
const f=document.createElement("template");f.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(f.content);class y extends n{static get is(){return"vaadin-select-overlay"}}
|
|
260
260
|
/**
|
|
261
261
|
@license
|
|
262
262
|
Copyright (c) 2017 Vaadin Ltd.
|
|
263
263
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
264
264
|
*/
|
|
265
|
-
let
|
|
265
|
+
let b;customElements.define(y.is,y);class E extends o{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!b){b=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=b.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return b}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(E.is,E);
|
|
266
266
|
/**
|
|
267
267
|
@license
|
|
268
268
|
Copyright (c) 2017 Vaadin Ltd.
|
|
269
269
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
270
270
|
*/
|
|
271
|
-
const
|
|
271
|
+
const w=document.createElement("template");w.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(w.content);class x extends(t(s(i(m(l,d))))){static get template(){return A`
|
|
272
272
|
<style>
|
|
273
273
|
:host {
|
|
274
274
|
display: inline-block;
|
|
@@ -301,14 +301,4 @@ const M=document.createElement("template");M.innerHTML="<custom-style>\n <style
|
|
|
301
301
|
<vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
|
|
302
302
|
|
|
303
303
|
<iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
|
|
304
|
-
`}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
|
|
305
|
-
[part='items'] ::slotted(vaadin-item.dropdown-divisor){
|
|
306
|
-
color:var(--lumo-contrast-40pct);
|
|
307
|
-
box-shadow:0 1px var(--lumo-contrast-10pct);
|
|
308
|
-
border-radius:0;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
[part='items'] ::slotted(vaadin-item.dropdown-sub-item){
|
|
312
|
-
margin-left:var(--lumo-space-l);
|
|
313
|
-
}
|
|
314
|
-
`)));class $ extends y{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 g.styles}render(){return b(q||(q=O` <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 s=e.querySelector("vaadin-list-box");null===s&&(e.appendChild(this.__list),s=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const i=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<i.length;++e)if("string"==typeof i[e])this.__addOrKeepItem(i[e],i[e],s).classList.add("dropdown-item");else if(Array.isArray(i[e])){const t=this.__addOrKeepItem(i[e][0],i[e][0],s);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of i[e][1])this.__addOrKeepItem(i[e][0]+": "+t,t,s).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,s){let i;return this.__renderedItems[e]?i=this.__renderedItems[e]:(i=document.createElement("vaadin-item"),this.__renderedItems[e]=i,i.value=e,s.appendChild(i)),i.dataset.keep="true",i.dataset.trackId=e,i.textContent=this.getText(t),i}__handleChange(e){const t=e.target.value,s=t===this.__unexistentValue?null:t;this.dispatchEvent(new f(s))}}let P,j,H=e=>e;class V extends y{constructor(){super(...arguments),this.variant=null}static get styles(){return[g.styles,_(P||(P=H`@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 b(j||(j=H` <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 N,z,K,F=e=>e;class G extends v{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":V}}static get properties(){return e(e({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,_(N||(N=F`:host{display:inline-block}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?b(z||(z=F`${0}<slot></slot>`),this._t(this.key,this.opts)):b(K||(K=F`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function W(...e){return e.filter((e=>!!e))}let U,Y,J,Z,X=e=>e;class ee extends v{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":G}}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=ee._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return b(U||(U=X` <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> `),ee._allDays.map(((t,s)=>b(Y||(Y=X` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[s],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),W(this.value.length>0&&b(J||(J=X` <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,W([29,30,31].some((e=>this.value.includes(e)))&&b(Z||(Z=X`<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 x(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,s)=>s!==t))}}ee._allDays=Array.from(new Array(31),((e,t)=>t+1));const te=document.createElement("template");function se(e,t,s="long"){const i=new Date;for(;i.getDay()!==e;)i.setDate(i.getDate()+1);return i.toLocaleDateString(t,{weekday:s})}te.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(te.content);let ie,ne,re,oe=e=>e;class ae extends ee{render(){return b(ie||(ie=oe` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),ae._allDays.map((e=>b(ne||(ne=oe` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),se(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),W(this.value.length>0&&b(re||(re=oe` <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 w(this.value))}}ae._allDays=new Array(7).fill(0).map(((e,t)=>t));export{$ as D,G as I,ee as M,V as S,ae as W,Q as a,W as c,se as t};
|
|
304
|
+
`}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 h(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,i,s){e!==t?this._contentTemplate=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,i){if(i){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&&(i.setProperties({owner:this,renderer:t}),this.render(),i.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,i=void 0!==t?t:-1,s=this._menuElement._searchKey(i,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,i){t&&t.setAttribute("aria-expanded",e),i&&i.focusElement&&i.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),i=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?i:"",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,i,s)=>void 0===t&&i.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),i=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",i?(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(x.is,x);export{x as S};
|
|
@@ -156,4 +156,4 @@ const Y=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad
|
|
|
156
156
|
* subject to an additional IP rights grant found at
|
|
157
157
|
* http://polymer.github.io/PATENTS.txt
|
|
158
158
|
*/
|
|
159
|
-
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const it={};class nt extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,s)=>t.reduceRight(((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t)),s),s=e(t,new Set),i=[];s.forEach((t=>i.unshift(t))),this._styles=i}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((t=>{if(t instanceof CSSStyleSheet&&!Y){const e=Array.prototype.slice.call(t.cssRules).reduce(((t,e)=>t+e.cssText),"");return et(e)}return t}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=t.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((t=>t.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==it&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)})))}render(){return it}}nt.finalized=!0,nt.render=(t,e,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=q.has(e),o=F&&11===e.nodeType&&!!e.host,a=o&&!D.has(n),l=a?document.createDocumentFragment():e;if(L(t,l,Object.assign({templateFactory:z(n)},i)),a){const t=q.get(l);q.delete(l);const i=t.value instanceof S?t.value.template:void 0;J(n,l,i),s(e,e.firstChild),e.appendChild(l),q.set(e,t)}!r&&o&&window.ShadyCSS.styleElement(e.host)},nt.shadowRootOptions={mode:"open"};export{T as A,E as B,tt as C,R as E,nt as L,A as N,U as P,o as T,b as a,h as b,st as c,_ as d,e,
|
|
159
|
+
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const it={};class nt extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,s)=>t.reduceRight(((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t)),s),s=e(t,new Set),i=[];s.forEach((t=>i.unshift(t))),this._styles=i}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((t=>{if(t instanceof CSSStyleSheet&&!Y){const e=Array.prototype.slice.call(t.cssRules).reduce(((t,e)=>t+e.cssText),"");return et(e)}return t}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=t.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((t=>t.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==it&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)})))}render(){return it}}nt.finalized=!0,nt.render=(t,e,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=q.has(e),o=F&&11===e.nodeType&&!!e.host,a=o&&!D.has(n),l=a?document.createDocumentFragment():e;if(L(t,l,Object.assign({templateFactory:z(n)},i)),a){const t=q.get(l);q.delete(l);const i=t.value instanceof S?t.value.template:void 0;J(n,l,i),s(e,e.firstChild),e.appendChild(l),q.set(e,t)}!r&&o&&window.ShadyCSS.styleElement(e.host)},nt.shadowRootOptions={mode:"open"};export{T as A,E as B,tt as C,R as E,nt as L,A as N,U as P,o as T,b as a,h as b,st as c,_ as d,s as e,L as f,j as h,i as m,y as n,e as r,H as s,$ as t,et as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-eb344bd5.js";import"./shared-26502fca.js";import{_ as e,I as l}from"./shared-e34d2ef1.js";import{s as t,h as n,c as s,L as a}from"./shared-7f33a83a.js";import{o}from"./shared-e6f3e9f0.js";import{c as i}from"./shared-4e709717.js";import{i as r}from"./shared-d3bf9ac0.js";import{s as d}from"./shared-2061be9a.js";import{r as u}from"./shared-d519a301.js";import{R as c,T as v}from"./shared-1b38c44f.js";import{T as p}from"./shared-5155696f.js";var f,h;!function(e){e.Attribute="attribute",e.Boolean="boolean",e.String="string",e.Number="number",e.Date="date",e.Any="any"}(f||(f={})),function(e){e.LessThanOrEqual="lessthanorequal",e.LessThan="lessthan",e.GreaterThanOrEqual="greaterthanorequal",e.GreaterThan="greaterthan",e.IsDefined="isdefined",e.Not="not",e.In="in"}(h||(h={}));let g;const C=t(g||(g=(e=>e)`
|
|
2
2
|
<svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
|
|
4
4
|
</svg>
|
|
@@ -61,4 +61,4 @@ import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import{_ as e,I as l}f
|
|
|
61
61
|
<svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
62
62
|
<path d="M11 11V14H16.5V26H19.5V14H25V11H11Z" class="fill-current"/>
|
|
63
63
|
</svg>
|
|
64
|
-
`));let z,R,G,U,F,W=e=>e;function Q(e){var l,t,a;const s=null===(t=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===t||t;return n(z||(z=W` <label class="flex items-center cursor-pointer transition-colors group text-tertiary hover-bg-contrast-5"> <div class="relative flex-1 min-w-0 overflow-hidden"> <select class="${0}" @change="${0}"> ${0} ${0} </select> </div> ${0} </label> `),i({"cursor-pointer bg-transparent relative appearance-none flex h-m px-s":!0,"font-medium w-full max-w-full whitespace-nowrap focus-outline-none":!0,"text-tertiary":s,"text-body":!s}),(l=>{const t=l.currentTarget,n=t.options[t.options.selectedIndex].value;e.onChange(n)}),s?n(R||(R=W`<option value disabled="disabled" ?selected="${0}">${0}</option>`),s,e.t(e.label)):"",null===(a=e.list)||void 0===a?void 0:a.map((({label:l,value:t})=>n(G||(G=W` <option value="${0}" ?selected="${0}"> ${0} </option> `),t,t===e.value,e.t(l)))),s?"":n(U||(U=W` <span class="font-tnum text-xs font-medium border mr-s px-xs rounded-s border-current inline-block"> ${0} </span> ${0} `),e.t(e.label),e.clearable?n(F||(F=W` <button aria-label="${0}" class="w-s h-s mr-xs text-body flex items-center justify-center transition-colors rounded-full focus-outline-none focus-ring-2 focus-ring-primary-50 hover-bg-contrast-5 hover-text-error" @click="${0}"> <iron-icon aria-hidden="true" class="icon-inline text-l" icon="icons:remove-circle-outline"> </iron-icon> </button> `),e.t("delete"),(()=>e.onChange(""))):""))}let J,K,P,X,Y,ee=e=>e;function le(e){var l;const t=`${null!==(l=e.id)&&void 0!==l?l:String(Math.floor(Math.random()*Math.pow(10,8)))}-list`,a=!!e.displayValue;let s=e.value;if("date"===e.type){const l=new Date(e.value);isNaN(l.getTime())||(s=u(l))}return n(J||(J=ee` <label class="relative flex items-center cursor-text group text-tertiary"> <div class="relative flex-1 min-w-0 overflow-hidden"> ${0} <input placeholder="${0}" class="${0}" list="${0}" type="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),a?n(K||(K=ee` <div aria-hidden="true" class="absolute inset-0 h-m px-s font-medium text-body flex items-center"> <div class="truncate">${0}</div> </div> `),e.t(e.displayValue)):"",s||"date"===e.type?"":e.t(e.label),i({"bg-base text-body relative appearance-none flex h-m px-s font-medium w-full":!0,"flex max-w-full whitespace-nowrap":!0,"focus-outline-none":!0,"opacity-0 focus-opacity-100":a}),r(e.list?t:void 0),e.type,s,e.disabled,(l=>{var t,n;const a=l.currentTarget;"date"===e.type?e.onChange(null!==(n=null===(t=a.valueAsDate)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:a.value):e.onChange(a.value)}),i({"font-tnum text-xs font-medium border border-current mr-s px-xs rounded-s":!0,"inline-block":!!s||"date"===e.type,"sr-only":!s&&"date"!==e.type}),e.t(e.label),e.list?n(P||(P=ee` <datalist id="${0}"> ${0} </datalist> `),t,e.list.map((({label:l,value:t})=>n(X||(X=ee`<option value="${0}">${0}</option>`),t,e.t(l))))):"",e.disabled?"":n(Y||(Y=ee` <div class="absolute inset-0 transition-colors bg-transparent group-hover-bg-contrast-5 pointer-events-none"></div> `)))}let te,ne,ae=e=>e;let se,oe=e=>e;function ie({parsedValue:l,option:t,options:n,t:a,onChange:s}){return le({displayValue:null==t?void 0:t.label,value:l.path,label:"field",list:n.map((l=>e(e({},l),{},{value:l.path}))),type:"text",id:"path",t:a,onChange:e=>s({operator:null,value:"",path:e})})}let re,ue=e=>e;let de,ce,ve=e=>e;function pe(l){var t,a;const{parsedValue:s,options:r,t:u,isNested:c,isFullSize:v,onChange:p,onDelete:g,onConvert:b}=l,x=null!==(t=r.find((e=>e.path===s.path)))&&void 0!==t?t:null,V=null!==(a=null==x?void 0:x.type)&&void 0!==a?a:f.Any,$=s.operator,L={parsedValue:s,option:x,options:r,t:u,onChange:p},Z={[f.Attribute]:A,[f.Boolean]:D,[f.Number]:E,[f.String]:k,[f.Date]:O,[f.Any]:j};return n(de||(de=ve` <div class="flex items-center space-x-s" aria-label="${0}"> <div class="${0}"> <div class="bg-contrast-10"> <div class="grid gap-1px grid-vertical sm-grid-horizontal"> <div class="bg-base" title="${0}"> <div class="w-m h-m text-tertiary" aria-hidden="true"> ${0} </div> </div> <div class="bg-base"> ${0} </div> <div class="bg-base">${0}</div> <div class="bg-base"> ${0} </div> </div> </div> </div> <div class="${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:remove-circle-outline"> </iron-icon> </button> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:add-circle-outline"> </iron-icon> </button> </div> </div> `),u("query_builder_rule"),i({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!c,"border-contrast-50":!!c}),u(`type_${V}`),x?Z[V]:j,s.path&&(V===f.Attribute||s.name)?n(ce||(ce=ve` <div class="bg-contrast-10 grid gap-1px grid-cols-1 sm-grid-cols-2"> <div class="bg-base">${0}</div> <div class="bg-base">${0}</div> </div> `),ie(L),function(l){var t;return le({value:null!==(t=l.parsedValue.name)&&void 0!==t?t:"",label:"name",type:"text",t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{name:t}))})}(L)):ie(L),function(l){const t=l.parsedValue.operator,a={[h.GreaterThan]:m,[h.GreaterThanOrEqual]:o,[h.In]:w,[h.IsDefined]:H,[h.LessThan]:y,[h.LessThanOrEqual]:M,[h.Not]:I},s={[f.Attribute]:[h.In,h.Not,h.IsDefined],[f.Boolean]:[],[f.String]:[h.In,h.Not],[f.Number]:[h.In,h.Not,h.GreaterThan,h.LessThan,h.GreaterThanOrEqual,h.LessThanOrEqual],[f.Date]:[h.In,h.Not],[f.Any]:Object.values(h)},r=l.option?s[l.option.type]:l.parsedValue.name?Object.values(h):Object.values(h).filter((e=>e!==h.IsDefined)),u=0===r.length||!l.parsedValue.path;return n(se||(se=oe` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=t?t:"equal"}`),i({"flex items-center justify-center w-m h-m transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-tertiary cursor-default":u,"hover-bg-contrast-5":!u}),u,(()=>{var n;const a=t?r.indexOf(t):-1,s=null!==(n=r[a+1])&&void 0!==n?n:null;l.onChange(e(e({},l.parsedValue),{},{operator:s,value:l.parsedValue.value}))}),t?a[t]:C)}(L),$===h.In?function(l){var t,a,s,o;const i=(null===(t=l.option)||void 0===t?void 0:t.list)?Q:le,r=l.parsedValue.value.split(","),u=null!==(s=null===(a=l.option)||void 0===a?void 0:a.type)&&void 0!==s?s:f.Any,c=u===f.Number?"number":u===f.Date?"date":"text",v=null===(o=l.option)||void 0===o?void 0:o.list;return n(te||(te=ae` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),d([...r.filter((e=>!!e)),null],((e,l)=>l),((t,a)=>{var s;return n(ne||(ne=ae` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=t?t:"",label:t?String(a+1):"add_value",clearable:!0,displayValue:null===(s=null==v?void 0:v.find((e=>e.value===t)))||void 0===s?void 0:s.label,onChange:t=>{t?r[a]=t:r.splice(a,1),l.onChange(e(e({},l.parsedValue),{},{value:r.join(",")}))}}))})))}(L):$===h.IsDefined?function(l){return Q({value:l.parsedValue.value,label:"value",list:[{label:"is_defined_true",value:"true"},{label:"is_defined_false",value:"false"}],t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{value:t}))})}(L):V===f.Boolean?function(l){var t,n,a,s,o,i;const{parsedValue:r,option:u,t:d,onChange:c}=l,v=null!==(a=null===(n=null===(t=null==u?void 0:u.list)||void 0===t?void 0:t.find((e=>"false"===e.value)))||void 0===n?void 0:n.label)&&void 0!==a?a:"false",p=[{label:null!==(i=null===(o=null===(s=null==u?void 0:u.list)||void 0===s?void 0:s.find((e=>"true"===e.value)))||void 0===o?void 0:o.label)&&void 0!==i?i:"true",value:"true"},{label:v,value:"false"}];return Q({value:r.value,label:"value",list:p,t:d,onChange:l=>c(e(e({},r),{},{value:l}))})}(L):null===$&&[f.Number,f.Date].includes(V)?function(l){var t,a,s;const{t:o,parsedValue:i,option:r,onChange:u}=l,[d,c]=i.value.split(".."),v=(null==r?void 0:r.list)?Q:le,p=null!==(t=null==r?void 0:r.type)&&void 0!==t?t:f.Any,h=p===f.Number?"number":p===f.Date?"date":"text",g=null==r?void 0:r.list;return n(re||(re=ue` <div class="grid bg-contrast-10 gap-1px grid-cols-1 grid-rows-2 sm-grid-cols-2 sm-grid-rows-1"> <div class="bg-base"> ${0} </div> <div class="bg-base"> ${0} </div> </div> `),v({displayValue:null===(a=null==g?void 0:g.find((e=>e.value===d)))||void 0===a?void 0:a.label,value:d,label:"range_from",type:h,list:g,t:o,onChange:l=>u(e(e({},i),{},{value:`${l}..${c}`}))}),v({displayValue:null===(s=null==g?void 0:g.find((e=>e.value===c)))||void 0===s?void 0:s.label,label:"range_to",value:c,type:h,list:g,t:o,onChange:l=>u(e(e({},i),{},{value:`${d}..${l}`}))}))}(L):function(l){var t,n,a,s;const{t:o,option:i,parsedValue:r,onChange:u}=l,d=(null==i?void 0:i.list)?Q:le,c=null!==(t=null==i?void 0:i.type)&&void 0!==t?t:f.Any;return d({displayValue:null===(a=null===(n=null==i?void 0:i.list)||void 0===n?void 0:n.find((e=>e.value===r.value)))||void 0===a?void 0:a.label,disabled:!r.path,value:null!==(s=r.value)&&void 0!==s?s:"",label:"value",type:c===f.Number?"number":c===f.Date?"date":"text",list:null==i?void 0:i.list,t:o,onChange:l=>u(e(e({},r),{},{value:l}))})}(L),i({"-mr-s self-start flex-col sm-flex-row flex-shrink-0 items-center":!0,"border-t border-b border-transparent divide-y divide-transparent":!0,hidden:!!v,flex:!v}),u("delete"),i({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-secondary hover-bg-contrast-5 hover-text-error":!0,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!s.path}),!s.path,g,u("add_or_clause"),i({"box-content flex w-m h-m rounded-full transition-colors text-success":!0,"hover-bg-contrast-5 focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!s.path||!!c}),!s.path,b)}let fe,he,ge,Ce,be=e=>e;function me(l){const t=n(fe||(fe=be`<div class="h-xs"></div>`)),a=n(he||(he=be` <div class="flex items-center h-s"> <div class="w-m text-center leading-none uppercase font-semibold text-xs text-contrast-30"> ${0} </div> <div class="flex-1 border-t border-contrast-20"></div> <div class="w-m ml-s flex-shrink-0"></div> <div class="hidden sm-block w-m flex-shrink-0"></div> </div> `),l.t("or"));return n(ge||(ge=be` <div aria-label="${0}"> ${0} </div> `),l.t("query_builder_group"),d([...l.parsedValues,null],((e,l)=>String(l)),((s,o)=>{const i=o>0?l.isNested?a:t:"";return null===s?[i,pe({isFullSize:!l.isNested&&0===l.parsedValues.length,isNested:l.isNested,options:l.options,parsedValue:{path:"",operator:null,value:""},t:l.t,onChange:e=>l.onChange([...l.parsedValues,e])})]:Array.isArray(s)?[i,n(Ce||(Ce=be` <div class="bg-contrast-10 rounded-t-l rounded-b-l p-s -m-s"> ${0} </div> `),me({parsedValues:s,isNested:!0,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues],n=e;t[o]=e.length>1?n:n[0],l.onChange(t)}}))]:[i,pe({parsedValue:s,isNested:l.isNested,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues];t[o]=e,l.onChange(t)},onDelete:()=>{const e=l.parsedValues.filter(((e,l)=>l!==o));l.onChange(e)},onConvert:()=>{const t=[...l.parsedValues];t[o]=[s,e(e({},s),{},{operator:null,value:""})],l.onChange(t)}})]})))}function xe(e){var l;const[t,n]=e.split("=").map(decodeURIComponent),a=null!==(l=Object.values(h).find((e=>t.endsWith(`:${e}`))))&&void 0!==l?l:null;let s,o=t.substring(0,a?t.lastIndexOf(":"):void 0);const i=t.lastIndexOf("[");return o.endsWith("]")&&-1!==i&&(s=o.substring(i+1,o.length-1),o=o.substring(0,i)),{name:s,path:o,value:n,operator:a}}function we(e){let l=e.path;return e.name&&(l+=`[${e.name}]`),e.operator&&(l+=`:${e.operator}`),l=`${encodeURIComponent(l)}=${encodeURIComponent(e.value)}`,"="===l?"":l}let Ve;const He=a(Ve||(Ve=(e=>e)`.gap-1px{gap:1px}.grid-vertical{grid-template:auto/var(--lumo-size-m) 1fr}:host([sm]) .sm-grid-horizontal{grid-template:auto/var(--lumo-size-m) 1fr var(--lumo-size-m) 1fr}`)),$e=c(v(p(l(s),"query-builder")));class ye extends $e{constructor(){super(...arguments),this.options=null,this.value=null}static get properties(){return e(e({},super.properties),{},{options:{type:Array},value:{type:String}})}static get styles(){return[super.styles,He]}render(){var e,l,t;return me({parsedValues:(t=null!==(e=this.value)&&void 0!==e?e:"",t.split("&").filter((e=>!!e)).map((e=>{const[l,t]=e.split("=").map(decodeURIComponent);return(null==t?void 0:t.includes("|"))?`${encodeURIComponent(l)}=${t}`.split("|").map((e=>xe(e))):xe(e)}))),options:null!==(l=this.options)&&void 0!==l?l:[],t:this.t.bind(this),onChange:e=>{this.value=function(e){return e.map((e=>{if(Array.isArray(e)){const l=[e[0].value,e.slice(1).map((e=>we(e)))].join("|");return`${e[0].path}=${encodeURIComponent(l)}`}return we(e)})).join("&")}(e),this.dispatchEvent(new ye.ChangeEvent("change"))}})}}ye.ChangeEvent=class extends CustomEvent{},ye.Operator=h,ye.Type=f,customElements.define("foxy-query-builder",ye);export{ye as Q,f as T};
|
|
64
|
+
`));let z,R,G,U,F,W=e=>e;function Q(e){var l,t,s;const a=null===(t=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===t||t;return n(z||(z=W` <label class="flex items-center cursor-pointer transition-colors group text-tertiary hover-bg-contrast-5"> <div class="relative flex-1 min-w-0 overflow-hidden"> <select class="${0}" @change="${0}"> ${0} ${0} </select> </div> ${0} </label> `),i({"cursor-pointer bg-transparent relative appearance-none flex h-m px-s":!0,"font-medium w-full max-w-full whitespace-nowrap focus-outline-none":!0,"text-tertiary":a,"text-body":!a}),(l=>{const t=l.currentTarget,n=t.options[t.options.selectedIndex].value;e.onChange(n)}),a?n(R||(R=W`<option value disabled="disabled" ?selected="${0}">${0}</option>`),a,e.t(e.label)):"",null===(s=e.list)||void 0===s?void 0:s.map((({label:l,value:t})=>n(G||(G=W` <option value="${0}" ?selected="${0}"> ${0} </option> `),t,t===e.value,e.t(l)))),a?"":n(U||(U=W` <span class="font-tnum text-xs font-medium border mr-s px-xs rounded-s border-current inline-block"> ${0} </span> ${0} `),e.t(e.label),e.clearable?n(F||(F=W` <button aria-label="${0}" class="w-s h-s mr-xs text-body flex items-center justify-center transition-colors rounded-full focus-outline-none focus-ring-2 focus-ring-primary-50 hover-bg-contrast-5 hover-text-error" @click="${0}"> <iron-icon aria-hidden="true" class="icon-inline text-l" icon="icons:remove-circle-outline"> </iron-icon> </button> `),e.t("delete"),(()=>e.onChange(""))):""))}let J,K,P,X,Y,ee=e=>e;function le(e){var l;const t=`${null!==(l=e.id)&&void 0!==l?l:String(Math.floor(Math.random()*Math.pow(10,8)))}-list`,s=!!e.displayValue;let a=e.value;if("date"===e.type){const l=new Date(e.value);isNaN(l.getTime())||(a=d(l))}return n(J||(J=ee` <label class="relative flex items-center cursor-text group text-tertiary"> <div class="relative flex-1 min-w-0 overflow-hidden"> ${0} <input placeholder="${0}" class="${0}" list="${0}" type="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),s?n(K||(K=ee` <div aria-hidden="true" class="absolute inset-0 h-m px-s font-medium text-body flex items-center"> <div class="truncate">${0}</div> </div> `),e.t(e.displayValue)):"",a||"date"===e.type?"":e.t(e.label),i({"bg-base text-body relative appearance-none flex h-m px-s font-medium w-full":!0,"flex max-w-full whitespace-nowrap":!0,"focus-outline-none":!0,"opacity-0 focus-opacity-100":s}),r(e.list?t:void 0),e.type,a,e.disabled,(l=>{var t,n;const s=l.currentTarget;"date"===e.type?e.onChange(null!==(n=null===(t=s.valueAsDate)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:s.value):e.onChange(s.value)}),i({"font-tnum text-xs font-medium border border-current mr-s px-xs rounded-s":!0,"inline-block":!!a||"date"===e.type,"sr-only":!a&&"date"!==e.type}),e.t(e.label),e.list?n(P||(P=ee` <datalist id="${0}"> ${0} </datalist> `),t,e.list.map((({label:l,value:t})=>n(X||(X=ee`<option value="${0}">${0}</option>`),t,e.t(l))))):"",e.disabled?"":n(Y||(Y=ee` <div class="absolute inset-0 transition-colors bg-transparent group-hover-bg-contrast-5 pointer-events-none"></div> `)))}let te,ne,se=e=>e;let ae,oe=e=>e;function ie({parsedValue:l,option:t,options:n,t:s,onChange:a}){return le({displayValue:null==t?void 0:t.label,value:l.path,label:"field",list:n.map((l=>e(e({},l),{},{value:l.path}))),type:"text",id:"path",t:s,onChange:e=>a({operator:null,value:"",path:e})})}let re,de=e=>e;let ue,ce,ve=e=>e;function pe(l){var t,s;const{parsedValue:a,options:r,t:d,isNested:c,isFullSize:v,onChange:p,onDelete:g,onConvert:b}=l,x=null!==(t=r.find((e=>e.path===a.path)))&&void 0!==t?t:null,V=null!==(s=null==x?void 0:x.type)&&void 0!==s?s:f.Any,$=a.operator,L={parsedValue:a,option:x,options:r,t:d,onChange:p},Z={[f.Attribute]:A,[f.Boolean]:D,[f.Number]:E,[f.String]:k,[f.Date]:O,[f.Any]:j};return n(ue||(ue=ve` <div class="flex items-center space-x-s" aria-label="${0}"> <div class="${0}"> <div class="bg-contrast-10"> <div class="grid gap-1px grid-vertical sm-grid-horizontal"> <div class="bg-base" title="${0}"> <div class="w-m h-m text-tertiary" aria-hidden="true"> ${0} </div> </div> <div class="bg-base"> ${0} </div> <div class="bg-base">${0}</div> <div class="bg-base"> ${0} </div> </div> </div> </div> <div class="${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:remove-circle-outline"> </iron-icon> </button> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:add-circle-outline"> </iron-icon> </button> </div> </div> `),d("query_builder_rule"),i({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!c,"border-contrast-50":!!c}),d(`type_${V}`),x?Z[V]:j,a.path&&(V===f.Attribute||a.name)?n(ce||(ce=ve` <div class="bg-contrast-10 grid gap-1px grid-cols-1 sm-grid-cols-2"> <div class="bg-base">${0}</div> <div class="bg-base">${0}</div> </div> `),ie(L),function(l){var t;return le({value:null!==(t=l.parsedValue.name)&&void 0!==t?t:"",label:"name",type:"text",t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{name:t}))})}(L)):ie(L),function(l){const t=l.parsedValue.operator,s={[h.GreaterThan]:m,[h.GreaterThanOrEqual]:o,[h.In]:w,[h.IsDefined]:H,[h.LessThan]:y,[h.LessThanOrEqual]:M,[h.Not]:I},a={[f.Attribute]:[h.In,h.Not,h.IsDefined],[f.Boolean]:[],[f.String]:[h.In,h.Not],[f.Number]:[h.In,h.Not,h.GreaterThan,h.LessThan,h.GreaterThanOrEqual,h.LessThanOrEqual],[f.Date]:[h.In,h.Not],[f.Any]:Object.values(h)},r=l.option?a[l.option.type]:l.parsedValue.name?Object.values(h):Object.values(h).filter((e=>e!==h.IsDefined)),d=0===r.length||!l.parsedValue.path;return n(ae||(ae=oe` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=t?t:"equal"}`),i({"flex items-center justify-center w-m h-m transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-tertiary cursor-default":d,"hover-bg-contrast-5":!d}),d,(()=>{var n;const s=t?r.indexOf(t):-1,a=null!==(n=r[s+1])&&void 0!==n?n:null;l.onChange(e(e({},l.parsedValue),{},{operator:a,value:l.parsedValue.value}))}),t?s[t]:C)}(L),$===h.In?function(l){var t,s,a,o;const i=(null===(t=l.option)||void 0===t?void 0:t.list)?Q:le,r=l.parsedValue.value.split(","),d=null!==(a=null===(s=l.option)||void 0===s?void 0:s.type)&&void 0!==a?a:f.Any,c=d===f.Number?"number":d===f.Date?"date":"text",v=null===(o=l.option)||void 0===o?void 0:o.list;return n(te||(te=se` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),u([...r.filter((e=>!!e)),null],((e,l)=>l),((t,s)=>{var a;return n(ne||(ne=se` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=t?t:"",label:t?String(s+1):"add_value",clearable:!0,displayValue:null===(a=null==v?void 0:v.find((e=>e.value===t)))||void 0===a?void 0:a.label,onChange:t=>{t?r[s]=t:r.splice(s,1),l.onChange(e(e({},l.parsedValue),{},{value:r.join(",")}))}}))})))}(L):$===h.IsDefined?function(l){return Q({value:l.parsedValue.value,label:"value",list:[{label:"is_defined_true",value:"true"},{label:"is_defined_false",value:"false"}],t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{value:t}))})}(L):V===f.Boolean?function(l){var t,n,s,a,o,i;const{parsedValue:r,option:d,t:u,onChange:c}=l,v=null!==(s=null===(n=null===(t=null==d?void 0:d.list)||void 0===t?void 0:t.find((e=>"false"===e.value)))||void 0===n?void 0:n.label)&&void 0!==s?s:"false",p=[{label:null!==(i=null===(o=null===(a=null==d?void 0:d.list)||void 0===a?void 0:a.find((e=>"true"===e.value)))||void 0===o?void 0:o.label)&&void 0!==i?i:"true",value:"true"},{label:v,value:"false"}];return Q({value:r.value,label:"value",list:p,t:u,onChange:l=>c(e(e({},r),{},{value:l}))})}(L):null===$&&[f.Number,f.Date].includes(V)?function(l){var t,s,a;const{t:o,parsedValue:i,option:r,onChange:d}=l,[u,c]=i.value.split(".."),v=(null==r?void 0:r.list)?Q:le,p=null!==(t=null==r?void 0:r.type)&&void 0!==t?t:f.Any,h=p===f.Number?"number":p===f.Date?"date":"text",g=null==r?void 0:r.list;return n(re||(re=de` <div class="grid bg-contrast-10 gap-1px grid-cols-1 grid-rows-2 sm-grid-cols-2 sm-grid-rows-1"> <div class="bg-base"> ${0} </div> <div class="bg-base"> ${0} </div> </div> `),v({displayValue:null===(s=null==g?void 0:g.find((e=>e.value===u)))||void 0===s?void 0:s.label,value:u,label:"range_from",type:h,list:g,t:o,onChange:l=>d(e(e({},i),{},{value:`${l}..${c}`}))}),v({displayValue:null===(a=null==g?void 0:g.find((e=>e.value===c)))||void 0===a?void 0:a.label,label:"range_to",value:c,type:h,list:g,t:o,onChange:l=>d(e(e({},i),{},{value:`${u}..${l}`}))}))}(L):function(l){var t,n,s,a;const{t:o,option:i,parsedValue:r,onChange:d}=l,u=(null==i?void 0:i.list)?Q:le,c=null!==(t=null==i?void 0:i.type)&&void 0!==t?t:f.Any;return u({displayValue:null===(s=null===(n=null==i?void 0:i.list)||void 0===n?void 0:n.find((e=>e.value===r.value)))||void 0===s?void 0:s.label,disabled:!r.path,value:null!==(a=r.value)&&void 0!==a?a:"",label:"value",type:c===f.Number?"number":c===f.Date?"date":"text",list:null==i?void 0:i.list,t:o,onChange:l=>d(e(e({},r),{},{value:l}))})}(L),i({"-mr-s self-start flex-col sm-flex-row flex-shrink-0 items-center":!0,"border-t border-b border-transparent divide-y divide-transparent":!0,hidden:!!v,flex:!v}),d("delete"),i({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-secondary hover-bg-contrast-5 hover-text-error":!0,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!a.path}),!a.path,g,d("add_or_clause"),i({"box-content flex w-m h-m rounded-full transition-colors text-success":!0,"hover-bg-contrast-5 focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!a.path||!!c}),!a.path,b)}let fe,he,ge,Ce,be=e=>e;function me(l){const t=n(fe||(fe=be`<div class="h-xs"></div>`)),s=n(he||(he=be` <div class="flex items-center h-s"> <div class="w-m text-center leading-none uppercase font-semibold text-xs text-contrast-30"> ${0} </div> <div class="flex-1 border-t border-contrast-20"></div> <div class="w-m ml-s flex-shrink-0"></div> <div class="hidden sm-block w-m flex-shrink-0"></div> </div> `),l.t("or"));return n(ge||(ge=be` <div aria-label="${0}"> ${0} </div> `),l.t("query_builder_group"),u([...l.parsedValues,null],((e,l)=>String(l)),((a,o)=>{const i=o>0?l.isNested?s:t:"";return null===a?[i,pe({isFullSize:!l.isNested&&0===l.parsedValues.length,isNested:l.isNested,options:l.options,parsedValue:{path:"",operator:null,value:""},t:l.t,onChange:e=>l.onChange([...l.parsedValues,e])})]:Array.isArray(a)?[i,n(Ce||(Ce=be` <div class="bg-contrast-10 rounded-t-l rounded-b-l p-s -m-s"> ${0} </div> `),me({parsedValues:a,isNested:!0,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues],n=e;t[o]=e.length>1?n:n[0],l.onChange(t)}}))]:[i,pe({parsedValue:a,isNested:l.isNested,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues];t[o]=e,l.onChange(t)},onDelete:()=>{const e=l.parsedValues.filter(((e,l)=>l!==o));l.onChange(e)},onConvert:()=>{const t=[...l.parsedValues];t[o]=[a,e(e({},a),{},{operator:null,value:""})],l.onChange(t)}})]})))}function xe(e){var l;const[t,n]=e.split("=").map(decodeURIComponent),s=null!==(l=Object.values(h).find((e=>t.endsWith(`:${e}`))))&&void 0!==l?l:null;let a,o=t.substring(0,s?t.lastIndexOf(":"):void 0);const i=t.lastIndexOf("[");return o.endsWith("]")&&-1!==i&&(a=o.substring(i+1,o.length-1),o=o.substring(0,i)),{name:a,path:o,value:n,operator:s}}function we(e){let l=e.path;return e.name&&(l+=`[${e.name}]`),e.operator&&(l+=`:${e.operator}`),l=`${encodeURIComponent(l)}=${encodeURIComponent(e.value)}`,"="===l?"":l}let Ve;const He=s(Ve||(Ve=(e=>e)`.gap-1px{gap:1px}.grid-vertical{grid-template:auto/var(--lumo-size-m) 1fr}:host([sm]) .sm-grid-horizontal{grid-template:auto/var(--lumo-size-m) 1fr var(--lumo-size-m) 1fr}`)),$e=c(v(p(l(a),"query-builder")));class ye extends $e{constructor(){super(...arguments),this.options=null,this.value=null}static get properties(){return e(e({},super.properties),{},{options:{type:Array},value:{type:String}})}static get styles(){return[super.styles,He]}render(){var e,l,t;return me({parsedValues:(t=null!==(e=this.value)&&void 0!==e?e:"",t.split("&").filter((e=>!!e)).map((e=>{const[l,t]=e.split("=").map(decodeURIComponent);return(null==t?void 0:t.includes("|"))?`${encodeURIComponent(l)}=${t}`.split("|").map((e=>xe(e))):xe(e)}))),options:null!==(l=this.options)&&void 0!==l?l:[],t:this.t.bind(this),onChange:e=>{this.value=function(e){return e.map((e=>{if(Array.isArray(e)){const l=[e[0].value,e.slice(1).map((e=>we(e)))].join("|");return`${e[0].path}=${encodeURIComponent(l)}`}return we(e)})).join("&")}(e),this.dispatchEvent(new ye.ChangeEvent("change"))}})}}ye.ChangeEvent=class extends CustomEvent{},ye.Operator=h,ye.Type=f,customElements.define("foxy-query-builder",ye);export{ye as Q,f as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-
|
|
1
|
+
import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-c9d1a2cd.js";import{I as e}from"./shared-ff7a10de.js";import"./shared-eb344bd5.js";import"./shared-26502fca.js";import{I as t,_ as r}from"./shared-e34d2ef1.js";import{L as i,h as s}from"./shared-7f33a83a.js";import{T as o}from"./shared-1b38c44f.js";import{c as n}from"./shared-4e709717.js";let a,c=e=>e;class l extends(o(t(i))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return s(a||(a=c` <details class="w-full border border-contrast-10 rounded-t-l rounded-b-l" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-bold text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t-l":!0,"rounded-b-l":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",l);let d,f,m,h,p=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return s(d||(d=p` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),t,n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!t}),(t=>{const r=t.currentTarget,i=this.__dialog;i.header="header_update",i.href=e.href,i.show(r)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const t=new URL(this.first);t.searchParams.set("limit",String(this.limit)),e=t.toString()}catch(t){e=this.first}return s(f||(f=p` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?s(m||(m=p` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":s(h||(h=p` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const t=this.__dialog,r=e.currentTarget;t.header="header_create",t.href="",t.show(r)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;return(null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==this.item&&(this.__cachedCardRenderer={item:this.item,render:new Function("ctx",`return ctx.html\`<${this.item} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${this.item}>\``)}),this.__cachedCardRenderer.render}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-e34d2ef1.js";import{h as t}from"./shared-7f33a83a.js";import{B as r}from"./shared-86d0d927.js";import{i as s}from"./shared-d3bf9ac0.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=r.False,this.disabled=!1,this.disabledControls=r.False,this.hidden=!1,this.hiddenControls=r.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return e(e({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}}})}get readonlySelector(){return this.readonly?r.True:this.readonlyControls}get disabledSelector(){return this.disabled?r.True:this.disabledControls}get hiddenSelector(){return this.hidden?r.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(t=!1){const r=t?{}:e({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,r){const l=null!=e?e:"default",d=this.templates[l];if(!d)return t(o||(o=n`<slot name="${0}"></slot>`),s(e));return t(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=r?r:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(t,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(e){if(super.applyInferredProperties(e),null===this.infer)return;const t=e.get("disabledSelector"),s=e.get("disabled"),o=e.get("readonlySelector"),i=e.get("readonly"),n=e.get("hiddenSelector"),l=e.get("hidden"),d=e.get("templates"),a=e.get("mode"),h=r.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=e=>{var t;return null!==(t=this.infer?null==e?void 0:e.zoom(this.infer):e)&&void 0!==t?t:r.False};this.disabledControls=u(t),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,_ as t}from"./shared-
|
|
1
|
+
import{I as e,_ as t}from"./shared-e34d2ef1.js";import{L as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-86d0d927.js";import{A as u}from"./shared-565feb2f.js";import{U as _}from"./shared-7684cb05.js";import{i as d}from"./shared-bfca826a.js";function c(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,u,_,d,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(_=null===(u=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===u?void 0:u.self)||void 0===_?void 0:_.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),u=new URL(e);return a.searchParams.set("offset",o.length.toString()),u.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:u.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}class l extends(e(s)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=d(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new u(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=l.Rumour(this.group),i=[...this.related,this.parent];return r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){this.__destroyRumour();const e=await this._fetch(this.href);return l.Rumour(this.group).share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return l.Rumour(this.group).share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){this.__destroyRumour();const e=await this._fetch(this.href,{method:"DELETE"}),t=l.Rumour(this.group),s=[...this.related,this.parent];return t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{e.changed&&(this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue())})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__createRumour(){const e=l.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new l.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=c(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}l.UpdateEvent=_,l.Rumour=i((()=>new h)),l.API=u;export{l as N,c as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as t,i as e,
|
|
1
|
+
import{S as t,i as e,a as n,f as r,r as i,h as o,j as a,c as s,b as c,g as u,e as l}from"./shared-e34d2ef1.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-c9d1a2cd.js";import{I as e}from"./shared-ff7a10de.js";import{h as t,c as i}from"./shared-7f33a83a.js";import{Q as n}from"./shared-86d0d927.js";import"./shared-90119584.js";import{_ as r}from"./shared-e34d2ef1.js";import"./shared-7976580a.js";import"./foxy-spinner.js";import{C as s}from"./shared-84b5d8f0.js";import{T as a}from"./shared-1b38c44f.js";import{N as o}from"./shared-85cd6cfb.js";import{c as l}from"./shared-4e709717.js";let d,c=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="primary error"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(d||(d=c` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,f=e=>e;customElements.define("foxy-internal-create-control",class extends e{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=f` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let p,y,u=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{static get styles(){return[super.styles,i(p||(p=u`.max-w-0{max-width:0}`))]}renderControl(){return t(y||(y=u` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_created"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_modified"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> </tbody> </table> `),JSON.stringify({value:n(this,"nucleon.form.date_created")}),JSON.stringify({value:n(this,"nucleon.form.date_modified")}))}});let h,v,x,_=e=>e;const b=s(a(o));class g extends b{renderBody(){return this.data?t(h||(h=_` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):t(v||(v=_`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(x||(x=_` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),l({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),l({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}}customElements.define("foxy-internal-form",g);export{g as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as t,C as e,T as o}from"./shared-
|
|
1
|
+
import{E as t,C as e,T as o}from"./shared-75ec4e1a.js";import{h as r,G as i,P as a,b as s}from"./shared-cf2b9cc3.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as r,h as s}from"./shared-
|
|
1
|
+
import{L as r,h as s}from"./shared-7f33a83a.js";import{t as e}from"./shared-1b38c44f.js";let t,o=r=>r;class n extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded-t-l rounded-b-l p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}function a(r){const[s,e,t]=r.split("-").map((r=>parseInt(r,10)));return[s,e,t].some((r=>"number"!=typeof r||isNaN(r)))?null:new Date(s,e-1,t)}export{n as W,a as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./shared-e34d2ef1.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-84b5d8f0.js";import"./foxy-nucleon-element.js";import{R as s,T as a}from"./shared-1b38c44f.js";import{T as i}from"./shared-5155696f.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-85cd6cfb.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as A}from"./shared-
|
|
1
|
+
import{T as A}from"./shared-76daf1fb.js";import"./shared-75ec4e1a.js";import{h as e}from"./shared-cf2b9cc3.js";import{D as t}from"./shared-1b38c44f.js";const s=e`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
[part="reveal-button"]::before {
|