@foxy.io/elements 1.18.0-beta.16 → 1.18.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +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 +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-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 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -0
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.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 +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +3 -3
- package/dist/cdn/foxy-subscription-settings-form.js +1 -0
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-card.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/shared-002b788f.js +15 -0
- package/dist/cdn/{shared-4623f740.js → shared-0672e78b.js} +1 -1
- package/dist/cdn/{shared-8cb76c8b.js → shared-07fb5be2.js} +1 -1
- package/dist/cdn/{shared-afaa6139.js → shared-162fc285.js} +1 -1
- package/dist/cdn/{shared-77359cd0.js → shared-17d24760.js} +1 -1
- package/dist/cdn/{shared-0db7afef.js → shared-196fa627.js} +22 -17
- package/dist/cdn/{shared-3f4f362e.js → shared-1b3e1a0d.js} +1 -1
- package/dist/cdn/{shared-0ff5e59d.js → shared-1f0841ec.js} +1 -1
- package/dist/cdn/{shared-59d73648.js → shared-210387cb.js} +1 -1
- package/dist/cdn/{shared-de385bdb.js → shared-2215e6c8.js} +5 -5
- package/dist/cdn/shared-222fe491.js +1 -0
- package/dist/cdn/shared-236d9b7e.js +1 -0
- package/dist/cdn/shared-262caea4.js +1 -0
- package/dist/cdn/{shared-ff13276c.js → shared-29e21467.js} +3 -3
- package/dist/cdn/{shared-00c585e4.js → shared-2c842660.js} +1 -1
- package/dist/cdn/{shared-23e0d67e.js → shared-2d3027f4.js} +1 -1
- package/dist/cdn/{shared-0a7b94ac.js → shared-344485cf.js} +5 -5
- package/dist/cdn/{shared-788e5ff5.js → shared-34b11d34.js} +1 -1
- package/dist/cdn/{shared-5714d3a4.js → shared-3a3878c9.js} +1 -1
- package/dist/cdn/shared-4308cdab.js +1 -0
- package/dist/cdn/{shared-6822bc96.js → shared-4975f86f.js} +1 -1
- package/dist/cdn/shared-515f00b1.js +1 -0
- package/dist/cdn/{shared-452a471d.js → shared-55e20d5b.js} +1 -1
- package/dist/cdn/{shared-c70b41e1.js → shared-5643d0ed.js} +1 -1
- package/dist/cdn/{shared-03f7cc13.js → shared-56d26968.js} +1 -1
- package/dist/cdn/{shared-a8966936.js → shared-5ad8c9a0.js} +1 -1
- package/dist/cdn/{shared-9f53978e.js → shared-5b55627c.js} +1 -1
- package/dist/cdn/{shared-0d697dd1.js → shared-62c8cfa2.js} +1 -1
- package/dist/cdn/{shared-a0c09692.js → shared-6b622399.js} +1 -1
- package/dist/cdn/shared-6b8874a7.js +1 -0
- package/dist/cdn/{shared-77970922.js → shared-6d2064e9.js} +3 -3
- package/dist/cdn/{shared-3d0dc4a6.js → shared-7b167fe9.js} +1 -1
- package/dist/cdn/{shared-03d5434f.js → shared-85f9051e.js} +1 -1
- package/dist/cdn/{shared-b617fde5.js → shared-8a5bdad3.js} +7 -7
- package/dist/cdn/{shared-684e229f.js → shared-8a5e01ae.js} +1 -1
- package/dist/cdn/shared-923da875.js +6 -0
- package/dist/cdn/shared-92926b1d.js +1 -0
- package/dist/cdn/{shared-7af4d4b6.js → shared-98652709.js} +1 -1
- package/dist/cdn/{shared-f04dd7e9.js → shared-a86761d3.js} +2 -2
- package/dist/cdn/{shared-b97d9ae3.js → shared-aebbceea.js} +1 -1
- package/dist/cdn/shared-b0a6d48f.js +1 -0
- package/dist/cdn/{shared-555ec39f.js → shared-b0ff4590.js} +15 -15
- package/dist/cdn/{shared-7bfd93b7.js → shared-b28dbc68.js} +27 -51
- package/dist/cdn/{shared-2ce65ad5.js → shared-b5cbbdd8.js} +1 -1
- package/dist/cdn/{shared-1d851ca7.js → shared-b7219771.js} +1 -1
- package/dist/cdn/{shared-760538ac.js → shared-b7f7f15f.js} +1 -1
- package/dist/cdn/{shared-e4bc532a.js → shared-b8e9b536.js} +1 -1
- package/dist/cdn/{shared-ecd289b3.js → shared-bb522838.js} +1 -1
- package/dist/cdn/{shared-a98a6602.js → shared-c484320b.js} +1 -1
- package/dist/cdn/{shared-08d6d02b.js → shared-c52d3772.js} +1 -1
- package/dist/cdn/shared-ce1ae7e1.js +1 -0
- package/dist/cdn/{shared-9195959e.js → shared-d302ad2c.js} +1 -1
- package/dist/cdn/{shared-e6bff624.js → shared-d43fc5cc.js} +1 -1
- package/dist/cdn/{shared-debbc076.js → shared-d5f242df.js} +1 -1
- package/dist/cdn/shared-da6cc488.js +1 -0
- package/dist/cdn/shared-dc798bf4.js +1 -0
- package/dist/cdn/{shared-4a796610.js → shared-dcbf57e0.js} +1 -1
- package/dist/cdn/shared-e08bcb6c.js +1 -0
- package/dist/cdn/shared-e396ec04.js +25 -0
- package/dist/cdn/{shared-3b22a756.js → shared-ea316e64.js} +1 -1
- package/dist/cdn/{shared-b5b5c848.js → shared-ef0fc329.js} +1 -1
- package/dist/cdn/{shared-f43a5253.js → shared-f022673a.js} +7 -7
- package/dist/cdn/{shared-184945cc.js → shared-f23d122e.js} +3 -3
- package/dist/cdn/{shared-45c3705a.js → shared-f2d19582.js} +1 -1
- package/dist/cdn/{shared-28b09f69.js → shared-fdac2851.js} +1 -1
- package/dist/cdn/{shared-779795c5.js → shared-ff2f84c7.js} +1 -1
- package/dist/cdn/translations/api-browser/en.json +1 -0
- package/dist/cdn/translations/email-template-card/en.json +1 -1
- package/dist/cdn/translations/i18n-editor/en.json +10 -0
- package/dist/cdn/translations/subscription-settings-form/en.json +92 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +2 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +29 -17
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +18 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +15 -6
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +2 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +6 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +32 -4
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +1 -3
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +16 -30
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/index.d.ts +1 -1
- package/dist/elements/internal/InternalSelectControl/index.js +1 -1
- package/dist/elements/internal/InternalSelectControl/index.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/ApiBrowser/ApiBrowser.d.ts +2 -1
- package/dist/elements/public/ApiBrowser/ApiBrowser.js +38 -15
- package/dist/elements/public/ApiBrowser/ApiBrowser.js.map +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +2 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +3 -3
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +3 -2
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -1
- package/dist/elements/public/I18nEditor/I18nEditor.d.ts +18 -0
- package/dist/elements/public/I18nEditor/I18nEditor.js +173 -0
- package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -0
- package/dist/elements/public/I18nEditor/index.d.ts +7 -0
- package/dist/elements/public/I18nEditor/index.js +9 -0
- package/dist/elements/public/I18nEditor/index.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.d.ts +17 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +169 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.d.ts +6 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js +8 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.d.ts +3 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js +2 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js.map +1 -0
- package/dist/elements/public/I18nEditor/types.d.ts +4 -0
- package/dist/elements/public/I18nEditor/types.js +2 -0
- package/dist/elements/public/I18nEditor/types.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +0 -2
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +2 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js +30 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +2 -10
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +33 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +208 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.d.ts +9 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js +11 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.d.ts +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js +128 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.d.ts +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js +26 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.d.ts +6 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +3 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -0
- package/dist/elements/public/TaxForm/TaxForm.js +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +1 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +29 -18
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
- package/dist/elements/public/TemplateSetForm/index.d.ts +1 -0
- package/dist/elements/public/TemplateSetForm/index.js +1 -0
- package/dist/elements/public/TemplateSetForm/index.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.js +1 -1
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +2 -0
- package/dist/elements/public/index.defined.d.ts +2 -0
- package/dist/elements/public/index.defined.js +2 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +2 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/responsive.js +3 -3
- package/dist/mixins/responsive.js.map +1 -1
- package/dist/mixins/themeable.js +79 -6966
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-15278fe0.js +0 -1
- package/dist/cdn/shared-17d5d718.js +0 -1
- package/dist/cdn/shared-193a0fb1.js +0 -1
- package/dist/cdn/shared-1e9dc71f.js +0 -1
- package/dist/cdn/shared-2af327d0.js +0 -15
- package/dist/cdn/shared-a420358e.js +0 -1
- package/dist/cdn/shared-a83b38f1.js +0 -1
- package/dist/cdn/shared-b1b40832.js +0 -1
- package/dist/cdn/shared-b5120f1a.js +0 -11
- package/dist/cdn/shared-d82f3ba0.js +0 -1
- package/dist/cdn/shared-f14201ed.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-ea316e64.js";import"./shared-c484320b.js";import{_ as e}from"./shared-a8ced8bf.js";import{s as l,h as t,c as n,L as s}from"./shared-7f33a83a.js";import{o as a}from"./shared-e6f3e9f0.js";import{c as o}from"./shared-4e709717.js";import{i}from"./shared-d3bf9ac0.js";import{a as r}from"./shared-bc7f58ef.js";import{r as u}from"./shared-d519a301.js";import{R as d,T as c,a as v}from"./shared-29e21467.js";import{I as p}from"./shared-4f037e43.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=l(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-3b22a756.js";import"./shared-a98a6602.js";import{_ as e}from"./s
|
|
|
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 Y(e){var l,n,a;const s=null===(n=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===n||n;return t(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> `),o({"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?t(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:n})=>t(G||(G=W` <option value="${0}" ?selected="${0}"> ${0} </option> `),n,n===e.value,e.t(l)))),s?"":t(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?t(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 Q,J,K,P,X,ee=e=>e;function le(e){var l;const n=`${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);s=isNaN(l.getTime())?"":r(l)}return t(Q||(Q=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}" max="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),a?t(J||(J=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),o({"bg-base text-body relative 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}),i(e.list?n:void 0),e.type,i("date"===e.type?"9999-12-31":""),s,e.disabled,(l=>{const t=l.currentTarget;try{const l=t.valueAsDate;l.getFullYear()>9999&&l.setFullYear(9999),e.onChange(l.toISOString())}catch(l){e.onChange(t.value)}}),o({"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?t(K||(K=ee` <datalist id="${0}"> ${0} </datalist> `),n,e.list.map((({label:l,value:n})=>t(P||(P=ee`<option value="${0}">${0}</option>`),n,e.t(l))))):"",e.disabled?"":t(X||(X=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 n,a;const{parsedValue:i,options:r,t:d,isNested:c,isFullSize:v,onChange:p,onDelete:g,onConvert:b}=l,x=null!==(n=r.find((e=>e.path===i.path)))&&void 0!==n?n:null,V=null!==(a=null==x?void 0:x.type)&&void 0!==a?a:f.Any,H=i.operator,L={parsedValue:i,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 t(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> `),d("query_builder_rule"),o({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!c,"border-contrast-50":!!c}),d(`type_${V}`),x?Z[V]:j,i.path&&(V===f.Attribute||i.name)?t(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 n=l.parsedValue.operator,a={[h.GreaterThan]:m,[h.GreaterThanOrEqual]:s,[h.In]:w,[h.IsDefined]:$,[h.LessThan]:y,[h.LessThanOrEqual]:M,[h.Not]:I},i={[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?i[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 t(se||(se=oe` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=n?n:"equal"}`),o({"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 t;const a=n?r.indexOf(n):-1,s=null!==(t=r[a+1])&&void 0!==t?t:null;l.onChange(e(e({},l.parsedValue),{},{operator:s,value:l.parsedValue.value}))}),n?a[n]:C)}(L),H===h.In?function(l){var n,a,s,o;const i=(null===(n=l.option)||void 0===n?void 0:n.list)?Y:le,r=l.parsedValue.value.split(","),d=null!==(s=null===(a=l.option)||void 0===a?void 0:a.type)&&void 0!==s?s: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 t(te||(te=ae` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),u([...r.filter((e=>!!e)),null],((e,l)=>l),((n,a)=>{var s;return t(ne||(ne=ae` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=n?n:"",label:n?String(a+1):"add_value",clearable:!0,displayValue:null===(s=null==v?void 0:v.find((e=>e.value===n)))||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===h.IsDefined?function(l){return Y({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 Y({value:r.value,label:"value",list:p,t:d,onChange:l=>c(e(e({},r),{},{value:l}))})}(L):null===H&&[f.Number,f.Date].includes(V)?function(l){var n,a,s,o;const{t:i,parsedValue:r,option:u,onChange:d}=l,c=r.value.split(".."),v=c.length>=2?c[0]:"",p=c.length>=2?c[1]:null!==(n=c[0])&&void 0!==n?n:"",h=(null==u?void 0:u.list)?Y:le,g=null!==(a=null==u?void 0:u.type)&&void 0!==a?a:f.Any,C=g===f.Number?"number":g===f.Date?"date":"text",b=null==u?void 0:u.list;return t(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> `),h({displayValue:null===(s=null==b?void 0:b.find((e=>e.value===v)))||void 0===s?void 0:s.label,value:v,label:"range_from",type:C,list:b,t:i,onChange:l=>d(e(e({},r),{},{value:`${l}..${p}`}))}),h({displayValue:null===(o=null==b?void 0:b.find((e=>e.value===p)))||void 0===o?void 0:o.label,label:"range_to",value:p,type:C,list:b,t:i,onChange:l=>d(e(e({},r),{},{value:`${v}..${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)?Y: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),o({"-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"),o({"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":!i.path}),!i.path,g,d("add_or_clause"),o({"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":!i.path||!!c}),!i.path,b)}let fe,he,ge,Ce,be=e=>e;function me(l){const n=t(fe||(fe=be`<div class="h-xs"></div>`)),a=t(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 t(ge||(ge=be` <div aria-label="${0}"> ${0} </div> `),l.t("query_builder_group"),u([...l.parsedValues,null],((e,l)=>String(l)),((s,o)=>{const i=o>0?l.isNested?a:n:"";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,t(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 $e=n(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}`)),He=d(c(v(p(a),"query-builder")));class ye extends He{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,$e]}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 Y(e){var l,n,s;const a=null===(n=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===n||n;return t(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> `),o({"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?t(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:n})=>t(G||(G=W` <option value="${0}" ?selected="${0}"> ${0} </option> `),n,n===e.value,e.t(l)))),a?"":t(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?t(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 Q,J,K,P,X,ee=e=>e;function le(e){var l;const n=`${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);a=isNaN(l.getTime())?"":r(l)}return t(Q||(Q=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}" max="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),s?t(J||(J=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),o({"bg-base text-body relative 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}),i(e.list?n:void 0),e.type,i("date"===e.type?"9999-12-31":""),a,e.disabled,(l=>{const t=l.currentTarget;try{const l=t.valueAsDate;l.getFullYear()>9999&&l.setFullYear(9999),e.onChange(l.toISOString())}catch(l){e.onChange(t.value)}}),o({"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?t(K||(K=ee` <datalist id="${0}"> ${0} </datalist> `),n,e.list.map((({label:l,value:n})=>t(P||(P=ee`<option value="${0}">${0}</option>`),n,e.t(l))))):"",e.disabled?"":t(X||(X=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,ue=e=>e;let de,ce,ve=e=>e;function pe(l){var n,s;const{parsedValue:i,options:r,t:d,isNested:c,isFullSize:v,onChange:p,onDelete:g,onConvert:b}=l,x=null!==(n=r.find((e=>e.path===i.path)))&&void 0!==n?n:null,V=null!==(s=null==x?void 0:x.type)&&void 0!==s?s:f.Any,H=i.operator,L={parsedValue:i,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 t(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> `),d("query_builder_rule"),o({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!c,"border-contrast-50":!!c}),d(`type_${V}`),x?Z[V]:j,i.path&&(V===f.Attribute||i.name)?t(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 n=l.parsedValue.operator,s={[h.GreaterThan]:m,[h.GreaterThanOrEqual]:a,[h.In]:w,[h.IsDefined]:$,[h.LessThan]:y,[h.LessThanOrEqual]:M,[h.Not]:I},i={[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?i[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 t(ae||(ae=oe` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=n?n:"equal"}`),o({"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 t;const s=n?r.indexOf(n):-1,a=null!==(t=r[s+1])&&void 0!==t?t:null;l.onChange(e(e({},l.parsedValue),{},{operator:a,value:l.parsedValue.value}))}),n?s[n]:C)}(L),H===h.In?function(l){var n,s,a,o;const i=(null===(n=l.option)||void 0===n?void 0:n.list)?Y: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 t(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),((n,s)=>{var a;return t(ne||(ne=se` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=n?n:"",label:n?String(s+1):"add_value",clearable:!0,displayValue:null===(a=null==v?void 0:v.find((e=>e.value===n)))||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===h.IsDefined?function(l){return Y({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:u,t:d,onChange:c}=l,v=null!==(s=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!==s?s:"false",p=[{label:null!==(i=null===(o=null===(a=null==u?void 0:u.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 Y({value:r.value,label:"value",list:p,t:d,onChange:l=>c(e(e({},r),{},{value:l}))})}(L):null===H&&[f.Number,f.Date].includes(V)?function(l){var n,s,a,o;const{t:i,parsedValue:r,option:u,onChange:d}=l,c=r.value.split(".."),v=c.length>=2?c[0]:"",p=c.length>=2?c[1]:null!==(n=c[0])&&void 0!==n?n:"",h=(null==u?void 0:u.list)?Y:le,g=null!==(s=null==u?void 0:u.type)&&void 0!==s?s:f.Any,C=g===f.Number?"number":g===f.Date?"date":"text",b=null==u?void 0:u.list;return t(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> `),h({displayValue:null===(a=null==b?void 0:b.find((e=>e.value===v)))||void 0===a?void 0:a.label,value:v,label:"range_from",type:C,list:b,t:i,onChange:l=>d(e(e({},r),{},{value:`${l}..${p}`}))}),h({displayValue:null===(o=null==b?void 0:b.find((e=>e.value===p)))||void 0===o?void 0:o.label,label:"range_to",value:p,type:C,list:b,t:i,onChange:l=>d(e(e({},r),{},{value:`${v}..${l}`}))}))}(L):function(l){var t,n,s,a;const{t:o,option:i,parsedValue:r,onChange:u}=l,d=(null==i?void 0:i.list)?Y:le,c=null!==(t=null==i?void 0:i.type)&&void 0!==t?t:f.Any;return d({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=>u(e(e({},r),{},{value:l}))})}(L),o({"-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"),o({"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":!i.path}),!i.path,g,d("add_or_clause"),o({"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":!i.path||!!c}),!i.path,b)}let fe,he,ge,Ce,be=e=>e;function me(l){const n=t(fe||(fe=be`<div class="h-xs"></div>`)),s=t(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 t(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:n:"";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,t(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 $e=n(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}`)),He=d(c(v(p(s),"query-builder")));class ye extends He{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,$e]}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,4 +1,4 @@
|
|
|
1
|
-
import{C as e}from"./shared-
|
|
1
|
+
import{C as e}from"./shared-85f9051e.js";import{T as t,D as r}from"./shared-7b167fe9.js";import"./shared-2215e6c8.js";import{h as o,P as a}from"./shared-c52d3772.js";import{F as s}from"./shared-c484320b.js";import{I as l}from"./shared-210387cb.js";import"./shared-0672e78b.js";import{_ as i}from"./shared-a8ced8bf.js";import{i as h}from"./shared-d3bf9ac0.js";import{h as d}from"./shared-7f33a83a.js";const n=o`<dom-module id="lumo-checkbox-group" theme-for="vaadin-checkbox-group">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-required-field">
|
|
4
4
|
:host {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-b28dbc68.js";import{I as e}from"./shared-210387cb.js";import"./shared-0672e78b.js";import{_ as t}from"./shared-a8ced8bf.js";import{i as a}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";let r,l=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return t(t({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){return s(r||(r=l` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.theme,this.disabled,this.readonly,this._checkValidity,this.options.map((({value:e,label:t})=>({value:e,label:this.t(t)}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as e,D as t,E as a,C as i}from"./shared-
|
|
1
|
+
import{T as e,D as t,E as a,C as i}from"./shared-7b167fe9.js";import{O as s,I as o,a as r}from"./shared-b28dbc68.js";import{h as n,G as l,P as d,D as h,t as u,b as c,s as p}from"./shared-c52d3772.js";import"./shared-b8e9b536.js";import"./shared-6b8874a7.js";import{T as m}from"./shared-2215e6c8.js";import"./shared-196fa627.js";import{D as _,t as f,f as v,a as g}from"./shared-c484320b.js";import{a as y,b}from"./shared-e396ec04.js";const D=n`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-menu-overlay">
|
|
4
4
|
[part="overlay"] {
|
|
@@ -41,7 +41,7 @@ import{T as e,D as t,E as a,C as i}from"./shared-3d0dc4a6.js";import{O as s,a as
|
|
|
41
41
|
}
|
|
42
42
|
</style>
|
|
43
43
|
</template>
|
|
44
|
-
</dom-module>`;document.head.appendChild(D.content);const w=
|
|
44
|
+
</dom-module>`;document.head.appendChild(D.content);const w=n`<dom-module id="lumo-date-picker-overlay-content" theme-for="vaadin-date-picker-overlay-content">
|
|
45
45
|
<template>
|
|
46
46
|
<style>
|
|
47
47
|
:host {
|
|
@@ -244,7 +244,7 @@ import{T as e,D as t,E as a,C as i}from"./shared-3d0dc4a6.js";import{O as s,a as
|
|
|
244
244
|
}
|
|
245
245
|
</style>
|
|
246
246
|
</template>
|
|
247
|
-
</dom-module>`;document.head.appendChild(w.content);const x=
|
|
247
|
+
</dom-module>`;document.head.appendChild(w.content);const x=n`<dom-module id="lumo-month-calendar" theme-for="vaadin-month-calendar">
|
|
248
248
|
<template>
|
|
249
249
|
<style>
|
|
250
250
|
:host {
|
|
@@ -390,7 +390,7 @@ import{T as e,D as t,E as a,C as i}from"./shared-3d0dc4a6.js";import{O as s,a as
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
</style>
|
|
393
|
-
</custom-style>`;document.head.appendChild(x.content);const k=
|
|
393
|
+
</custom-style>`;document.head.appendChild(x.content);const k=n`<dom-module id="lumo-date-picker" theme-for="vaadin-date-picker">
|
|
394
394
|
<template>
|
|
395
395
|
<style include="lumo-field-button">
|
|
396
396
|
:host {
|
|
@@ -412,7 +412,7 @@ import{T as e,D as t,E as a,C as i}from"./shared-3d0dc4a6.js";import{O as s,a as
|
|
|
412
412
|
}
|
|
413
413
|
</style>
|
|
414
414
|
</template>
|
|
415
|
-
</dom-module>`;document.head.appendChild(k.content);const S=
|
|
415
|
+
</dom-module>`;document.head.appendChild(k.content);const S=n`<dom-module id="lumo-date-picker-text-field" theme-for="vaadin-date-picker-text-field">
|
|
416
416
|
<template>
|
|
417
417
|
<style>
|
|
418
418
|
:not(*):placeholder-shown, /* to prevent broken styles on IE */
|
|
@@ -433,13 +433,13 @@ import{T as e,D as t,E as a,C as i}from"./shared-3d0dc4a6.js";import{O as s,a as
|
|
|
433
433
|
Copyright (c) 2019 Vaadin Ltd.
|
|
434
434
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
435
435
|
*/
|
|
436
|
-
const C=document.createElement("template");C.innerHTML='<dom-module id="vaadin-date-picker-text-field-styles" theme-for="vaadin-date-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(C.content);class E extends
|
|
436
|
+
const C=document.createElement("template");C.innerHTML='<dom-module id="vaadin-date-picker-text-field-styles" theme-for="vaadin-date-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(C.content);class E extends m{static get is(){return"vaadin-date-picker-text-field"}}customElements.define(E.is,E);
|
|
437
437
|
/**
|
|
438
438
|
@license
|
|
439
439
|
Copyright (c) 2017 Vaadin Ltd.
|
|
440
440
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
441
441
|
*/
|
|
442
|
-
class T extends(
|
|
442
|
+
class T extends(_(s)){static get is(){return"vaadin-date-picker-overlay"}}customElements.define(T.is,T);
|
|
443
443
|
/**
|
|
444
444
|
@license
|
|
445
445
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -450,7 +450,7 @@ const M=class{static _getISOWeekNumber(e){var t=e.getDay();0===t&&(t=7);var a=4-
|
|
|
450
450
|
@license
|
|
451
451
|
Copyright (c) 2017 Vaadin Ltd.
|
|
452
452
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
453
|
-
*/class A extends(e(
|
|
453
|
+
*/class A extends(e(l(d))){static get template(){return n`
|
|
454
454
|
<style>
|
|
455
455
|
:host {
|
|
456
456
|
display: block;
|
|
@@ -522,7 +522,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
522
522
|
Copyright (c) 2017 Vaadin Ltd.
|
|
523
523
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
524
524
|
*/
|
|
525
|
-
class I extends
|
|
525
|
+
class I extends d{static get template(){return n`
|
|
526
526
|
<style>
|
|
527
527
|
:host {
|
|
528
528
|
display: block;
|
|
@@ -569,13 +569,13 @@ class I extends u{static get template(){return d`
|
|
|
569
569
|
<div class="buffer"></div>
|
|
570
570
|
<div id="fullHeight"></div>
|
|
571
571
|
</div>
|
|
572
|
-
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";var e=this.querySelector("template");this._TemplateClass=
|
|
572
|
+
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";var e=this.querySelector("template");this._TemplateClass=f(e,this,{forwardHostProp:function(e,t){"index"!==e&&this._buffers.forEach((a=>{[].forEach.call(a.children,(a=>{a._itemWrapper.instance[e]=t}))}))}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(this.$.scroller.tabIndex=-1)}_activated(e){e&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((e=>{[].forEach.call(e.children,(e=>this._ensureStampedInstance(e._itemWrapper)))}),this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(e){var t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform="translate3d(0, "+this._buffers[t].translateY+"px, 0)",this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(!this._scrollDisabled){var e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());var t=this.root.querySelector(".buffer").offsetTop,a=e>this._buffers[1].translateY+this.itemHeight+t,i=e<this._buffers[0].translateY+this.itemHeight+t;(a||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=h.debounce(this._debouncerScrollFinish,u.after(200),(()=>{var e=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],e)||this._isVisible(this._buffers[1],e)||(this.position=this.position)}))}}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}get itemHeight(){if(!this._itemHeightVal){window.ShadyCSS&&window.ShadyCSS.nativeCss||this.updateStyles();const e=window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-infinite-scroller-item-height"):getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const a=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(a)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((e=>{e.style.transform="translate3d(0, "+e.translateY+"px, 0)"})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=h.debounce(this._debouncerUpdateClones,u.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){var e=this.getBoundingClientRect();this._buffers.forEach((t=>{for(var a=0;a<this.bufferSize;a++){const a=document.createElement("div");a.style.height=this.itemHeight+"px",a.instance={};const i="vaadin-infinite-scroller-item-content-"+(I._contentIndex=I._contentIndex+1||0),s=document.createElement("slot");s.setAttribute("name",i),s._itemWrapper=a,t.appendChild(s),a.setAttribute("slot",i),this.appendChild(a),v(),setTimeout((()=>{this._isVisible(a,e)&&this._ensureStampedInstance(a)}),1)}}),this),setTimeout((()=>{y(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(e){if(!e.firstElementChild){var t=e.instance;e.instance=new this._TemplateClass({}),e.appendChild(e.instance.root),Object.keys(t).forEach((a=>{e.instance.set(a,t[a])}))}}_updateClones(e){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;var t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((a,i)=>{if(!a.updated){var s=this._firstIndex+this.bufferSize*i;[].forEach.call(a.children,((a,i)=>{const o=a._itemWrapper;e&&!this._isVisible(o,t)||(o.instance.index=s+i)})),a.updated=!0}}),this)}_isVisible(e,t){var a=e.getBoundingClientRect();return a.bottom>t.top&&a.top<t.bottom}}customElements.define(I.is,I);const O=document.createElement("template");O.innerHTML='<dom-module id="vaadin-date-picker-overlay-styles" theme-for="vaadin-date-picker-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n :host([right-aligned]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"][right-aligned]) {\n align-items: flex-start;\n }\n\n [part="overlay"] {\n display: flex;\n flex: auto;\n }\n\n [part~="content"] {\n flex: auto;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(O.content);
|
|
573
573
|
/**
|
|
574
574
|
@license
|
|
575
575
|
Copyright (c) 2017 Vaadin Ltd.
|
|
576
576
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
577
577
|
*/
|
|
578
|
-
class F extends(e(t(
|
|
578
|
+
class F extends(e(t(l(d)))){static get template(){return n`
|
|
579
579
|
<style>
|
|
580
580
|
:host {
|
|
581
581
|
display: flex;
|
|
@@ -754,18 +754,18 @@ class F extends(e(t(h(u)))){static get template(){return d`
|
|
|
754
754
|
</div>
|
|
755
755
|
|
|
756
756
|
<iron-media-query query="(min-width: 375px)" query-matches="{{_desktopMode}}"></iron-media-query>
|
|
757
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{selectedDate:{type:Date,notify:!0},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,_focused:Boolean,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}ready(){super.ready(),this.setAttribute("tabindex",0),this.addEventListener("keydown",this._onKeydown.bind(this)),
|
|
757
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{selectedDate:{type:Date,notify:!0},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,_focused:Boolean,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}ready(){super.ready(),this.setAttribute("tabindex",0),this.addEventListener("keydown",this._onKeydown.bind(this)),c(this,"tap",this._stopPropagation),this.addEventListener("focus",this._onOverlayFocus.bind(this)),this.addEventListener("blur",this._onOverlayBlur.bind(this))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),p(this.$.scrollers,"pan-y"),o.requestAvailability()}announceFocusedDate(){var e=this._currentlyFocusedDate(),t=[];M._dateEquals(e,new Date)&&t.push(this.i18n.today),t=t.concat([this.i18n.weekdays[e.getDay()],e.getDate(),this.i18n.monthNames[e.getMonth()],e.getFullYear()]),this.showWeekNumbers&&1===this.i18n.firstDayOfWeek&&(t.push(this.i18n.week),t.push(M._getISOWeekNumber(e))),this.dispatchEvent(new CustomEvent("iron-announce",{bubbles:!0,composed:!0,detail:{text:t.join(" ")}}))}focusCancel(){this.$.cancelButton.focus()}scrollToDate(e,t){this._scrollToPosition(this._differenceInMonths(e,this._originDate),t)}_focusedDateChanged(e){this.revealDate(e)}_isCurrentYear(e){return 0===e}_isSelectedYear(e,t){if(t)return t.getFullYear()===this._originDate.getFullYear()+e}revealDate(e){if(e){var t=this._differenceInMonths(e,this._originDate),a=this.$.monthScroller.position>t,i=this.$.monthScroller.clientHeight/this.$.monthScroller.itemHeight,s=this.$.monthScroller.position+i-1<t;a?this._scrollToPosition(t,!0):s&&this._scrollToPosition(t-i+1,!0)}}_onOverlayFocus(){this._focused=!0}_onOverlayBlur(){this._focused=!1}_initialPositionChanged(e){this.scrollToDate(e)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>this._notTapping=!0),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=h.debounce(this._debouncer,u.after(300),(()=>this._ignoreTaps=!1))}_formatDisplayed(e,t,a){return e?t(M._extractDateParts(e)):a}_onTodayTap(){var e=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this.selectedDate=e,this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_showClear(e){return!!e}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){var t=(e.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2))/this.$.yearScroller.itemHeight;this._scrollToPosition(this.$.monthScroller.position+12*t,!0)}}_scrollToPosition(e,t){if(void 0===this._targetPosition){if(!t)return this.$.monthScroller.position=e,this._targetPosition=void 0,void this._repositionYearScroller();this._targetPosition=e;var a=t?300:0,i=0,s=this.$.monthScroller.position,o=e=>{var t,r,n,l=e-(i=i||e);if(l<a){var d=(t=l,r=s,n=this._targetPosition-s,(t/=a/2)<1?n/2*t*t+r:-n/2*(--t*(t-2)-1)+r);this.$.monthScroller.position=d,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}else this._targetPosition=e}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(!(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)){Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);var t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this.$.monthScroller.style.transform="translateX("+(e-this._yearScrollerWidth)+"px)",this.$.yearScroller.style.transform="translateX("+e+"px)")}_yearAfterXYears(e){var t=new Date(this._originDate);return t.setFullYear(parseInt(e)+this._originDate.getFullYear()),t.getFullYear()}_yearAfterXMonths(e){return this._dateAfterXMonths(e).getFullYear()}_dateAfterXMonths(e){var t=new Date(this._originDate);return t.setDate(1),t.setMonth(parseInt(e)+this._originDate.getMonth()),t}_differenceInMonths(e,t){return 12*(e.getFullYear()-t.getFullYear())-t.getMonth()+e.getMonth()}_differenceInYears(e,t){return this._differenceInMonths(e,t)/12}_clear(){this.selectedDate=""}_close(){const e=this.getRootNode().host,t=e?e.getRootNode().host:null;t&&(t.opened=!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}_eventKey(e){for(var t=["down","up","right","left","enter","space","home","end","pageup","pagedown","tab","esc"],a=0;a<t.length;a++){var i=t[a];if(r.keyboardEventMatchesKeys(e,i))return i}}_onKeydown(e){var t=this._currentlyFocusedDate();const a=e.composedPath().indexOf(this.$.todayButton)>=0,i=e.composedPath().indexOf(this.$.cancelButton)>=0,s=!a&&!i;var o=this._eventKey(e);if("tab"===o){e.stopPropagation();const t=this.hasAttribute("fullscreen"),o=e.shiftKey;t?e.preventDefault():o&&s||!o&&i?(e.preventDefault(),this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))):o&&a?(this._focused=!0,setTimeout((()=>this.revealDate(this.focusedDate)),1)):this._focused=!1}else if(o)switch(e.preventDefault(),e.stopPropagation(),o){case"down":this._moveFocusByDays(7),this.focus();break;case"up":this._moveFocusByDays(-7),this.focus();break;case"right":s&&this._moveFocusByDays(this.__isRTL?-1:1);break;case"left":s&&this._moveFocusByDays(this.__isRTL?1:-1);break;case"enter":s||i?this._close():a&&this._onTodayTap();break;case"space":if(i)this._close();else if(a)this._onTodayTap();else{var r=this.focusedDate;M._dateEquals(r,this.selectedDate)?(this.selectedDate="",this.focusedDate=r):this.selectedDate=r}break;case"home":this._moveFocusInsideMonth(t,"minDate");break;case"end":this._moveFocusInsideMonth(t,"maxDate");break;case"pagedown":this._moveFocusByMonths(e.shiftKey?12:1);break;case"pageup":this._moveFocusByMonths(e.shiftKey?-12:-1);break;case"esc":this._cancel()}}_currentlyFocusedDate(){return this.focusedDate||this.selectedDate||this.initialPosition||new Date}_focusDate(e){this.focusedDate=e,this._focusedMonthDate=e.getDate()}_focusClosestDate(e){this._focusDate(M._getClosestDate(e,[this.minDate,this.maxDate]))}_moveFocusByDays(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()),a.setDate(t.getDate()+e),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusByMonths(e){var t=this._currentlyFocusedDate(),a=new Date(0,0);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()+e);var i=a.getMonth();a.setDate(this._focusedMonthDate||(this._focusedMonthDate=t.getDate())),a.getMonth()!==i&&a.setDate(0),this._dateAllowed(a,this.minDate,this.maxDate)?this.focusedDate=a:this._dateAllowed(t,this.minDate,this.maxDate)?e>0?this._focusDate(this.maxDate):this._focusDate(this.minDate):this._focusClosestDate(t)}_moveFocusInsideMonth(e,t){var a=new Date(0,0);a.setFullYear(e.getFullYear()),"minDate"===t?(a.setMonth(e.getMonth()),a.setDate(1)):(a.setMonth(e.getMonth()+1),a.setDate(0)),this._dateAllowed(a,this.minDate,this.maxDate)?this._focusDate(a):this._dateAllowed(e,this.minDate,this.maxDate)?this._focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t,a){return(!t||e>=t)&&(!a||e<=a)}_isTodayAllowed(e,t){var a=new Date,i=new Date(0,0);return i.setFullYear(a.getFullYear()),i.setMonth(a.getMonth()),i.setDate(a.getDate()),this._dateAllowed(i,e,t)}_stopPropagation(e){e.stopPropagation()}}customElements.define(F.is,F);
|
|
758
758
|
/**
|
|
759
759
|
@license
|
|
760
760
|
Copyright (c) 2017 Vaadin Ltd.
|
|
761
761
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
762
762
|
*/
|
|
763
|
-
const $=e=>class extends(b([l],e)){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,observer:"_valueChanged",notify:!0,value:""},required:{type:Boolean,value:!1},name:{type:String},initialPosition:String,label:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{value:!1,observer:"_fullscreenChanged"},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_touchPrevented:Array,i18n:{type:Object,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",clear:"Clear",today:"Today",cancel:"Cancel",formatDate:e=>{const t=String(e.year).replace(/\d+/,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate:e=>{const t=e.split("/"),a=new Date;let i,s=a.getMonth(),o=a.getFullYear();if(3===t.length?(o=parseInt(t[2]),t[2].length<3&&o>=0&&(o+=o<50?2e3:1900),s=parseInt(t[0])-1,i=parseInt(t[1])):2===t.length?(s=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0])),void 0!==i)return{day:i,month:s,year:o}},formatTitle:(e,t)=>e+" "+t})},min:{type:String,observer:"_minChanged"},max:{type:String,observer:"_maxChanged"},_minDate:{type:Date,value:""},_maxDate:{type:Date,value:""},_noInput:{type:Boolean,computed:"_isNoInput(_fullscreen, _ios, i18n, i18n.*, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/)},_webkitOverflowScroll:{type:Boolean,value:""===document.createElement("div").style.webkitOverflowScrolling},_ignoreAnnounce:{value:!0},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_updateHasValue(value)","_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)","_announceFocusedDate(_focusedDate, opened, _ignoreAnnounce)"]}ready(){super.ready(),this._boundOnScroll=this._onScroll.bind(this),this._boundFocus=this._focus.bind(this),this._boundUpdateAlignmentAndPosition=this._updateAlignmentAndPosition.bind(this);const e=e=>{const t=e.composedPath(),a=t.indexOf(this._inputElement);return 1===t.slice(0,a).filter((e=>e.getAttribute&&"clear-button"===e.getAttribute("part"))).length};m(this,"tap",(t=>{e(t)||this.autoOpenDisabled&&!this._noInput||this.open()})),this.addEventListener("touchend",(t=>{this._noInput&&!e(t)&&t.preventDefault()})),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("input",this._onUserInput.bind(this)),this.addEventListener("focus",(e=>this._noInput&&e.target.blur())),this.addEventListener("blur",(e=>{if(!this.opened){if(this.autoOpenDisabled){const e=this._getParsedDate();this._isValidDate(e)&&(this._selectedDate=e)}""===this._inputElement.value&&this.__dispatchChange?(this.validate(),this.value="",this.__dispatchChange=!1):this.validate()}}))}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(e=>this.opened=e.detail.value)),this._overlayContent.addEventListener("close",this._close.bind(this)),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._boundFocus),this._overlayContent.addEventListener("focus",(()=>this.focusElement._setFocused(!0))),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));const e=e=>{this.$.overlay.bringToFront&&requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}disconnectedCallback(){super.disconnectedCallback(),this._overlayInitialized&&this.$.overlay.removeEventListener("vaadin-overlay-escape-press",this._boundFocus),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}_close(e){e&&e.stopPropagation(),this._focus(),this.close()}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}get _inputElement(){return this._input()}get _nativeInput(){if(this._inputElement)return this._inputElement.focusElement?this._inputElement.focusElement:this._inputElement.inputElement?this._inputElement.inputElement:window.unwrap?window.unwrap(this._inputElement):this._inputElement}_parseDate(e){var t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(e);if(t){var a=new Date(0,0);return a.setFullYear(parseInt(t[1],10)),a.setMonth(parseInt(t[2],10)-1),a.setDate(parseInt(t[3],10)),a}}_isNoInput(e,t,a,i,s,o){const r=e&&(!o||s),n=t&&s;return!this._inputElement||r||n||!a.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let a="",i="0000",s=e.getFullYear();s<0?(s=-s,a="-",i="000000"):e.getFullYear()>=1e4&&(a="+",i="000000");return[a+t(s,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_openedChanged(e){e&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=e),e&&this._updateAlignmentAndPosition()}_selectedDateChanged(e,t){if(void 0===e||void 0===t)return;this.__userInputOccurred&&(this.__dispatchChange=!0);const a=this._formatISO(e);this.__keepInputValue||this._applyInputValue(e),a!==this.value&&(this.validate(),this.value=a),this.__userInputOccurred=!1,this.__dispatchChange=!1,this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__userInputOccurred=!0,this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}__getOverlayTheme(e,t){if(t)return e}_handleDateChange(e,t,a){if(t){var i=this._parseDate(t);i?M._dateEquals(this[e],i)||(this[e]=i,this.value&&this.validate()):this.value=a}else this[e]=""}_valueChanged(e,t){this.__dispatchChange&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._handleDateChange("_selectedDate",e,t)}_minChanged(e,t){this._handleDateChange("_minDate",e,t)}_maxChanged(e,t){this._handleDateChange("_maxDate",e,t)}_updateAlignmentAndPosition(){if(this._overlayInitialized){if(!this._fullscreen){const e=this._inputElement.getBoundingClientRect(),t=e.top>window.innerHeight/2;if(e.left+this.clientWidth/2>window.innerWidth/2){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);this.$.overlay.setAttribute("right-aligned",""),this.$.overlay.style.removeProperty("left"),this.$.overlay.style.right=t-e.right+"px"}else this.$.overlay.removeAttribute("right-aligned"),this.$.overlay.style.removeProperty("right"),this.$.overlay.style.left=e.left+"px";if(t){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);this.$.overlay.setAttribute("bottom-aligned",""),this.$.overlay.style.removeProperty("top"),this.$.overlay.style.bottom=t-e.top+"px"}else this.$.overlay.removeAttribute("bottom-aligned"),this.$.overlay.style.removeProperty("bottom"),this.$.overlay.style.top=e.bottom+"px"}this.$.overlay.setAttribute("dir",getComputedStyle(this._inputElement).getPropertyValue("direction")),this._overlayContent._repositionYearScroller()}}_fullscreenChanged(){this._overlayInitialized&&this.$.overlay.opened&&this._updateAlignmentAndPosition()}_onOverlayOpened(){this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring");var e=this._parseDate(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;e||M._dateAllowed(t,this._minDate,this._maxDate)?this._overlayContent.initialPosition=t:this._overlayContent.initialPosition=M._getClosestDate(t,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this.addEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._webkitOverflowScroll&&(this._touchPrevented=this._preventWebkitOverflowScrollingTouch(this.parentElement)),this._focusOverlayOnOpen?(this._overlayContent.focus(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&this.focusElement.blur(),this.updateStyles(),this._ignoreAnnounce=!1}_preventWebkitOverflowScrollingTouch(e){for(var t=[];e;){if("touch"===window.getComputedStyle(e).webkitOverflowScrolling){var a=e.style.webkitOverflowScrolling;e.style.webkitOverflowScrolling="auto",t.push({element:e,oldInlineValue:a})}e=e.parentElement}return t}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputValue||"",t=this._getParsedDate(e);this._isValidDate(t)?this._selectedDate=t:(this.__keepInputValue=!0,this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&(this._selectedDate=this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this._ignoreAnnounce=!0,window.removeEventListener("scroll",this._boundOnScroll,!0),this.removeEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._touchPrevented&&(this._touchPrevented.forEach((e=>e.element.style.webkitOverflowScrolling=e.oldInlineValue)),this._touchPrevented=[]),this.updateStyles(),this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this.validate()}validate(){return!(this.invalid=!this.checkValidity(this._inputValue))}checkValidity(){const e=!this._inputValue||this._selectedDate&&this._inputValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),t=!this._selectedDate||M._dateAllowed(this._selectedDate,this._minDate,this._maxDate);let a=!0;return this._inputElement&&(this._inputElement.checkValidity?(this._inputElement.__forceCheckValidity=!0,a=this._inputElement.checkValidity(),this._inputElement.__forceCheckValidity=!1):this._inputElement.validate&&(a=this._inputElement.validate())),e&&t&&a}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._updateAlignmentAndPosition()}_focus(){this._noInput?this._overlayInitialized&&this._overlayContent.focus():this._inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputValue.length)}_applyInputValue(e){this._inputValue=e?this._getFormattedDate(this.i18n.formatDate,e):""}_getFormattedDate(e,t){return e(M._extractDateParts(t))}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_eventKey(e){for(var t=["down","up","enter","esc","tab"],a=0;a<t.length;a++){var i=t[a];if(n.keyboardEventMatchesKeys(e,i))return i}}_isValidDate(e){return e&&!isNaN(e.getTime())}_onKeydown(e){if(this._noInput){-1===[9].indexOf(e.keyCode)&&e.preventDefault()}switch(this._eventKey(e)){case"down":case"up":e.preventDefault(),this.opened?(this._overlayContent.focus(),this._overlayContent._onKeydown(e)):(this._focusOverlayOnOpen=!0,this.open());break;case"enter":{const e=this._getParsedDate(),t=this._isValidDate(e);if(this.opened)this._overlayInitialized&&this._overlayContent.focusedDate&&t&&(this._selectedDate=this._overlayContent.focusedDate),this.close();else if(t||""===this._inputElement.value){const e=this.value;this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}else this.validate();break}case"esc":this.opened?(this._focusedDate=this._selectedDate,this._close()):this.autoOpenDisabled?(""===this._inputElement.value&&(this._selectedDate=null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate());break;case"tab":this.opened&&(e.preventDefault(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():(this._overlayContent.focus(),this._overlayContent.revealDate(this._focusedDate)))}}_getParsedDate(e=this._inputValue){const t=this.i18n.parseDate&&this.i18n.parseDate(e);return t&&this._parseDate(t.year+"-"+(t.month+1)+"-"+t.day)}_onUserInput(e){this.opened||!this._inputElement.value||this.autoOpenDisabled||this.open(),this._userInputValueChanged(),e.__fromClearButton&&(this.validate(),this.__dispatchChange=!0,this.value="",this.__dispatchChange=!1)}_userInputValueChanged(e){if(this.opened&&this._inputValue){const e=this._getParsedDate();this._isValidDate(e)&&(this._ignoreFocusedDateChange=!0,M._dateEquals(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}_announceFocusedDate(e,t,a){t&&!a&&this._overlayContent.announceFocusedDate()}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}}
|
|
763
|
+
const $=e=>class extends(g([b],e)){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,observer:"_valueChanged",notify:!0,value:""},required:{type:Boolean,value:!1},name:{type:String},initialPosition:String,label:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{value:!1,observer:"_fullscreenChanged"},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_touchPrevented:Array,i18n:{type:Object,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",clear:"Clear",today:"Today",cancel:"Cancel",formatDate:e=>{const t=String(e.year).replace(/\d+/,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate:e=>{const t=e.split("/"),a=new Date;let i,s=a.getMonth(),o=a.getFullYear();if(3===t.length?(o=parseInt(t[2]),t[2].length<3&&o>=0&&(o+=o<50?2e3:1900),s=parseInt(t[0])-1,i=parseInt(t[1])):2===t.length?(s=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0])),void 0!==i)return{day:i,month:s,year:o}},formatTitle:(e,t)=>e+" "+t})},min:{type:String,observer:"_minChanged"},max:{type:String,observer:"_maxChanged"},_minDate:{type:Date,value:""},_maxDate:{type:Date,value:""},_noInput:{type:Boolean,computed:"_isNoInput(_fullscreen, _ios, i18n, i18n.*, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/)},_webkitOverflowScroll:{type:Boolean,value:""===document.createElement("div").style.webkitOverflowScrolling},_ignoreAnnounce:{value:!0},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_updateHasValue(value)","_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)","_announceFocusedDate(_focusedDate, opened, _ignoreAnnounce)"]}ready(){super.ready(),this._boundOnScroll=this._onScroll.bind(this),this._boundFocus=this._focus.bind(this),this._boundUpdateAlignmentAndPosition=this._updateAlignmentAndPosition.bind(this);const e=e=>{const t=e.composedPath(),a=t.indexOf(this._inputElement);return 1===t.slice(0,a).filter((e=>e.getAttribute&&"clear-button"===e.getAttribute("part"))).length};c(this,"tap",(t=>{e(t)||this.autoOpenDisabled&&!this._noInput||this.open()})),this.addEventListener("touchend",(t=>{this._noInput&&!e(t)&&t.preventDefault()})),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("input",this._onUserInput.bind(this)),this.addEventListener("focus",(e=>this._noInput&&e.target.blur())),this.addEventListener("blur",(e=>{if(!this.opened){if(this.autoOpenDisabled){const e=this._getParsedDate();this._isValidDate(e)&&(this._selectedDate=e)}""===this._inputElement.value&&this.__dispatchChange?(this.validate(),this.value="",this.__dispatchChange=!1):this.validate()}}))}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(e=>this.opened=e.detail.value)),this._overlayContent.addEventListener("close",this._close.bind(this)),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._boundFocus),this._overlayContent.addEventListener("focus",(()=>this.focusElement._setFocused(!0))),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));const e=e=>{this.$.overlay.bringToFront&&requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e)}disconnectedCallback(){super.disconnectedCallback(),this._overlayInitialized&&this.$.overlay.removeEventListener("vaadin-overlay-escape-press",this._boundFocus),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}_close(e){e&&e.stopPropagation(),this._focus(),this.close()}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}get _inputElement(){return this._input()}get _nativeInput(){if(this._inputElement)return this._inputElement.focusElement?this._inputElement.focusElement:this._inputElement.inputElement?this._inputElement.inputElement:window.unwrap?window.unwrap(this._inputElement):this._inputElement}_parseDate(e){var t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(e);if(t){var a=new Date(0,0);return a.setFullYear(parseInt(t[1],10)),a.setMonth(parseInt(t[2],10)-1),a.setDate(parseInt(t[3],10)),a}}_isNoInput(e,t,a,i,s,o){const r=e&&(!o||s),n=t&&s;return!this._inputElement||r||n||!a.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let a="",i="0000",s=e.getFullYear();s<0?(s=-s,a="-",i="000000"):e.getFullYear()>=1e4&&(a="+",i="000000");return[a+t(s,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_openedChanged(e){e&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=e),e&&this._updateAlignmentAndPosition()}_selectedDateChanged(e,t){if(void 0===e||void 0===t)return;this.__userInputOccurred&&(this.__dispatchChange=!0);const a=this._formatISO(e);this.__keepInputValue||this._applyInputValue(e),a!==this.value&&(this.validate(),this.value=a),this.__userInputOccurred=!1,this.__dispatchChange=!1,this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__userInputOccurred=!0,this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_updateHasValue(e){e?this.setAttribute("has-value",""):this.removeAttribute("has-value")}__getOverlayTheme(e,t){if(t)return e}_handleDateChange(e,t,a){if(t){var i=this._parseDate(t);i?M._dateEquals(this[e],i)||(this[e]=i,this.value&&this.validate()):this.value=a}else this[e]=""}_valueChanged(e,t){this.__dispatchChange&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._handleDateChange("_selectedDate",e,t)}_minChanged(e,t){this._handleDateChange("_minDate",e,t)}_maxChanged(e,t){this._handleDateChange("_maxDate",e,t)}_updateAlignmentAndPosition(){if(this._overlayInitialized){if(!this._fullscreen){const e=this._inputElement.getBoundingClientRect(),t=e.top>window.innerHeight/2;if(e.left+this.clientWidth/2>window.innerWidth/2){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);this.$.overlay.setAttribute("right-aligned",""),this.$.overlay.style.removeProperty("left"),this.$.overlay.style.right=t-e.right+"px"}else this.$.overlay.removeAttribute("right-aligned"),this.$.overlay.style.removeProperty("right"),this.$.overlay.style.left=e.left+"px";if(t){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);this.$.overlay.setAttribute("bottom-aligned",""),this.$.overlay.style.removeProperty("top"),this.$.overlay.style.bottom=t-e.top+"px"}else this.$.overlay.removeAttribute("bottom-aligned"),this.$.overlay.style.removeProperty("bottom"),this.$.overlay.style.top=e.bottom+"px"}this.$.overlay.setAttribute("dir",getComputedStyle(this._inputElement).getPropertyValue("direction")),this._overlayContent._repositionYearScroller()}}_fullscreenChanged(){this._overlayInitialized&&this.$.overlay.opened&&this._updateAlignmentAndPosition()}_onOverlayOpened(){this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement&&this.focusElement.hasAttribute("focus-ring");var e=this._parseDate(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;e||M._dateAllowed(t,this._minDate,this._maxDate)?this._overlayContent.initialPosition=t:this._overlayContent.initialPosition=M._getClosestDate(t,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this.addEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._webkitOverflowScroll&&(this._touchPrevented=this._preventWebkitOverflowScrollingTouch(this.parentElement)),this._focusOverlayOnOpen?(this._overlayContent.focus(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&this.focusElement.blur(),this.updateStyles(),this._ignoreAnnounce=!1}_preventWebkitOverflowScrollingTouch(e){for(var t=[];e;){if("touch"===window.getComputedStyle(e).webkitOverflowScrolling){var a=e.style.webkitOverflowScrolling;e.style.webkitOverflowScrolling="auto",t.push({element:e,oldInlineValue:a})}e=e.parentElement}return t}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputValue||"",t=this._getParsedDate(e);this._isValidDate(t)?this._selectedDate=t:(this.__keepInputValue=!0,this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&(this._selectedDate=this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this._ignoreAnnounce=!0,window.removeEventListener("scroll",this._boundOnScroll,!0),this.removeEventListener("iron-resize",this._boundUpdateAlignmentAndPosition),this._touchPrevented&&(this._touchPrevented.forEach((e=>e.element.style.webkitOverflowScrolling=e.oldInlineValue)),this._touchPrevented=[]),this.updateStyles(),this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this.validate()}validate(){return!(this.invalid=!this.checkValidity(this._inputValue))}checkValidity(){const e=!this._inputValue||this._selectedDate&&this._inputValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),t=!this._selectedDate||M._dateAllowed(this._selectedDate,this._minDate,this._maxDate);let a=!0;return this._inputElement&&(this._inputElement.checkValidity?(this._inputElement.__forceCheckValidity=!0,a=this._inputElement.checkValidity(),this._inputElement.__forceCheckValidity=!1):this._inputElement.validate&&(a=this._inputElement.validate())),e&&t&&a}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._updateAlignmentAndPosition()}_focus(){this._noInput?this._overlayInitialized&&this._overlayContent.focus():this._inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputValue.length)}_applyInputValue(e){this._inputValue=e?this._getFormattedDate(this.i18n.formatDate,e):""}_getFormattedDate(e,t){return e(M._extractDateParts(t))}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_eventKey(e){for(var t=["down","up","enter","esc","tab"],a=0;a<t.length;a++){var i=t[a];if(r.keyboardEventMatchesKeys(e,i))return i}}_isValidDate(e){return e&&!isNaN(e.getTime())}_onKeydown(e){if(this._noInput){-1===[9].indexOf(e.keyCode)&&e.preventDefault()}switch(this._eventKey(e)){case"down":case"up":e.preventDefault(),this.opened?(this._overlayContent.focus(),this._overlayContent._onKeydown(e)):(this._focusOverlayOnOpen=!0,this.open());break;case"enter":{const e=this._getParsedDate(),t=this._isValidDate(e);if(this.opened)this._overlayInitialized&&this._overlayContent.focusedDate&&t&&(this._selectedDate=this._overlayContent.focusedDate),this.close();else if(t||""===this._inputElement.value){const e=this.value;this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}else this.validate();break}case"esc":this.opened?(this._focusedDate=this._selectedDate,this._close()):this.autoOpenDisabled?(""===this._inputElement.value&&(this._selectedDate=null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate());break;case"tab":this.opened&&(e.preventDefault(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():(this._overlayContent.focus(),this._overlayContent.revealDate(this._focusedDate)))}}_getParsedDate(e=this._inputValue){const t=this.i18n.parseDate&&this.i18n.parseDate(e);return t&&this._parseDate(t.year+"-"+(t.month+1)+"-"+t.day)}_onUserInput(e){this.opened||!this._inputElement.value||this.autoOpenDisabled||this.open(),this._userInputValueChanged(),e.__fromClearButton&&(this.validate(),this.__dispatchChange=!0,this.value="",this.__dispatchChange=!1)}_userInputValueChanged(e){if(this.opened&&this._inputValue){const e=this._getParsedDate();this._isValidDate(e)&&(this._ignoreFocusedDateChange=!0,M._dateEquals(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}_announceFocusedDate(e,t,a){t&&!a&&this._overlayContent.announceFocusedDate()}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}}
|
|
764
764
|
/**
|
|
765
765
|
@license
|
|
766
766
|
Copyright (c) 2017 Vaadin Ltd.
|
|
767
767
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
768
|
-
*/;class Y extends(a(i(e($(
|
|
768
|
+
*/;class Y extends(a(i(e($(l(d)))))){static get template(){return n`
|
|
769
769
|
<style>
|
|
770
770
|
:host {
|
|
771
771
|
display: inline-block;
|
|
@@ -801,4 +801,4 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
801
801
|
|
|
802
802
|
<iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}">
|
|
803
803
|
</iron-media-query>
|
|
804
|
-
`}static get is(){return"vaadin-date-picker"}static get version(){return"4.4.2"}static get properties(){return{clearButtonVisible:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},errorMessage:String,placeholder:String,helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_userInputValue:String}}static get observers(){return["_userInputValueChanged(_userInputValue)","_setClearButtonLabel(i18n.clear)"]}ready(){super.ready(),
|
|
804
|
+
`}static get is(){return"vaadin-date-picker"}static get version(){return"4.4.2"}static get properties(){return{clearButtonVisible:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},errorMessage:String,placeholder:String,helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_userInputValue:String}}static get observers(){return["_userInputValueChanged(_userInputValue)","_setClearButtonLabel(i18n.clear)"]}ready(){super.ready(),y(this,(()=>this._inputElement.validate=()=>{})),this._inputElement.addEventListener("change",(e=>{""!==this._inputElement.value||e.__fromClearButton||(this.__dispatchChange=!0)}))}_onVaadinOverlayClose(e){this._openedWithFocusRing&&this.hasAttribute("focused")?this.focusElement.setAttribute("focus-ring",""):this.hasAttribute("focused")||this.focusElement.blur(),e.detail.sourceEvent&&-1!==e.detail.sourceEvent.composedPath().indexOf(this)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_input(){return this.$.input}set _inputValue(e){this._inputElement.value=e}get _inputValue(){return this._inputElement.value}_getAriaExpanded(e){return Boolean(e).toString()}get focusElement(){return this._input()||this}_setClearButtonLabel(e){this._inputElement.shadowRoot.querySelector('[part="clear-button"]').setAttribute("aria-label",e)}}customElements.define(Y.is,Y);export{Y as D,M as a};
|