@foxy.io/elements 1.18.0-beta.18 → 1.18.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -0
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -0
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -0
- 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-cart-card.js +1 -0
- package/dist/cdn/foxy-cart-form.js +1 -0
- 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 +3 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-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 -2
- 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 +1 -1
- 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 +4 -16
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- 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 +60 -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-29e21467.js → shared-00752056.js} +1 -1
- package/dist/cdn/{shared-56d26968.js → shared-01d2cae6.js} +1 -1
- package/dist/cdn/{shared-d5f242df.js → shared-09c75a01.js} +1 -1
- package/dist/cdn/shared-09eb558f.js +1 -0
- package/dist/cdn/{shared-236d9b7e.js → shared-0a52b08c.js} +1 -1
- package/dist/cdn/{shared-55e20d5b.js → shared-0b17e9a6.js} +1 -1
- package/dist/cdn/{shared-f022673a.js → shared-124a17c1.js} +1 -1
- package/dist/cdn/{shared-344485cf.js → shared-15effede.js} +5 -5
- package/dist/cdn/{shared-196fa627.js → shared-17cb43f3.js} +2 -2
- package/dist/cdn/shared-181f51bd.js +1 -0
- package/dist/cdn/{shared-262caea4.js → shared-1936d1d5.js} +1 -1
- package/dist/cdn/{shared-f2d19582.js → shared-1e9fd9f1.js} +1 -1
- package/dist/cdn/{shared-c52d3772.js → shared-2470973b.js} +1 -1
- package/dist/cdn/{shared-923da875.js → shared-254ef6a4.js} +1 -1
- package/dist/cdn/shared-2afc2d3b.js +1 -0
- package/dist/cdn/{shared-0672e78b.js → shared-2bce9f91.js} +1 -1
- package/dist/cdn/{shared-b5cbbdd8.js → shared-2c067e88.js} +1 -1
- package/dist/cdn/{shared-dcbf57e0.js → shared-2f7dcefa.js} +1 -1
- package/dist/cdn/{shared-4975f86f.js → shared-37d6c723.js} +1 -1
- package/dist/cdn/{shared-3a3878c9.js → shared-39549b4e.js} +1 -1
- package/dist/cdn/{shared-f23d122e.js → shared-3aecf4e3.js} +1 -1
- package/dist/cdn/{shared-17d24760.js → shared-3ba49bac.js} +1 -1
- package/dist/cdn/shared-436f4187.js +1 -0
- package/dist/cdn/{shared-5ad8c9a0.js → shared-43bcce74.js} +1 -1
- package/dist/cdn/{shared-34b11d34.js → shared-4c32f1ad.js} +1 -1
- package/dist/cdn/{shared-ea316e64.js → shared-4cf568d8.js} +1 -1
- package/dist/cdn/{shared-2215e6c8.js → shared-50f97405.js} +1 -1
- package/dist/cdn/{shared-4308cdab.js → shared-54c5d16b.js} +1 -1
- package/dist/cdn/{shared-ff2f84c7.js → shared-63139d9e.js} +1 -1
- package/dist/cdn/{shared-ef0fc329.js → shared-6a53f85f.js} +1 -1
- package/dist/cdn/{shared-002b788f.js → shared-76b3d76a.js} +1 -1
- package/dist/cdn/shared-7a1de87a.js +1 -0
- package/dist/cdn/shared-7b6f4a11.js +1 -0
- package/dist/cdn/{shared-8a5bdad3.js → shared-7cc9cc71.js} +1 -1
- package/dist/cdn/{shared-162fc285.js → shared-7df6ee40.js} +1 -1
- package/dist/cdn/shared-7e2ea44c.js +1 -0
- package/dist/cdn/{shared-bb522838.js → shared-7ed14dc8.js} +1 -1
- package/dist/cdn/shared-839dd3a8.js +1 -0
- package/dist/cdn/{shared-da6cc488.js → shared-862b436d.js} +1 -1
- package/dist/cdn/{shared-b0a6d48f.js → shared-873b14d1.js} +1 -1
- package/dist/cdn/{shared-5b55627c.js → shared-875748d8.js} +1 -1
- package/dist/cdn/{shared-2d3027f4.js → shared-8b6addec.js} +1 -1
- package/dist/cdn/{shared-07fb5be2.js → shared-90b8ef49.js} +1 -1
- package/dist/cdn/{shared-b7f7f15f.js → shared-9923f00e.js} +1 -1
- package/dist/cdn/{shared-b28dbc68.js → shared-9c3934c8.js} +1 -1
- package/dist/cdn/{shared-6b8874a7.js → shared-9cba1b0e.js} +1 -1
- package/dist/cdn/{shared-aebbceea.js → shared-a2e9009b.js} +1 -1
- package/dist/cdn/{shared-d43fc5cc.js → shared-a696c602.js} +1 -1
- package/dist/cdn/shared-a85afa33.js +1 -0
- package/dist/cdn/{shared-e396ec04.js → shared-ab687b1e.js} +1 -1
- package/dist/cdn/{shared-c484320b.js → shared-aef0c294.js} +1 -1
- package/dist/cdn/shared-b51997d1.js +1 -0
- package/dist/cdn/{shared-8a5e01ae.js → shared-b90ddfc1.js} +1 -1
- package/dist/cdn/shared-bcc6e13b.js +1 -0
- package/dist/cdn/{shared-b8e9b536.js → shared-bfc37e75.js} +1 -1
- package/dist/cdn/{shared-6d2064e9.js → shared-c434e6d6.js} +3 -3
- package/dist/cdn/{shared-ce1ae7e1.js → shared-cce2fc5a.js} +1 -1
- package/dist/cdn/{shared-1f0841ec.js → shared-cd6381a5.js} +1 -1
- package/dist/cdn/{shared-a86761d3.js → shared-cef7c63d.js} +2 -2
- package/dist/cdn/{shared-7b167fe9.js → shared-cfae0154.js} +1 -1
- package/dist/cdn/{shared-98652709.js → shared-d34586cb.js} +1 -1
- package/dist/cdn/shared-d4f80692.js +1 -0
- package/dist/cdn/{shared-2c842660.js → shared-d7e653ae.js} +1 -1
- package/dist/cdn/shared-d8b07f4f.js +1 -0
- package/dist/cdn/{shared-85f9051e.js → shared-db61a5e8.js} +1 -1
- package/dist/cdn/{shared-b0ff4590.js → shared-ddf10c04.js} +1 -1
- package/dist/cdn/{shared-d302ad2c.js → shared-ea67b3f3.js} +1 -1
- package/dist/cdn/translations/admin-subscription-card/en.json +27 -0
- package/dist/cdn/translations/applied-coupon-code-card/en.json +7 -0
- package/dist/cdn/translations/applied-coupon-code-form/en.json +26 -0
- package/dist/cdn/translations/cart-card/en.json +15 -0
- package/dist/cdn/translations/cart-form/en.json +762 -0
- package/dist/cdn/translations/coupon-card/en.json +2 -2
- package/dist/cdn/translations/customer-portal/en.json +9 -9
- package/dist/cdn/translations/subscription-form/en.json +116 -21
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +2 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +4 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +3 -3
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +12 -10
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/index.d.ts +1 -1
- package/dist/elements/internal/InternalAsyncListControl/index.js +1 -1
- package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -1
- package/dist/elements/internal/InternalCard/InternalCard.d.ts +1 -0
- package/dist/elements/internal/InternalCard/InternalCard.js +12 -4
- package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +2 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +6 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +21 -0
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +1 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +6 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/private/Dialog/Dialog.js +1 -0
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.d.ts +40 -0
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js +304 -0
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionCard/index.d.ts +4 -0
- package/dist/elements/public/AdminSubscriptionCard/index.js +6 -0
- package/dist/elements/public/AdminSubscriptionCard/index.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionCard/types.d.ts +9 -0
- package/dist/elements/public/AdminSubscriptionCard/types.js +2 -0
- package/dist/elements/public/AdminSubscriptionCard/types.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.d.ts +11 -0
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js +33 -0
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeCard/index.d.ts +4 -0
- package/dist/elements/public/AppliedCouponCodeCard/index.js +6 -0
- package/dist/elements/public/AppliedCouponCodeCard/index.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeCard/types.d.ts +3 -0
- package/dist/elements/public/AppliedCouponCodeCard/types.js +2 -0
- package/dist/elements/public/AppliedCouponCodeCard/types.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.d.ts +18 -0
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js +54 -0
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeForm/index.d.ts +5 -0
- package/dist/elements/public/AppliedCouponCodeForm/index.js +7 -0
- package/dist/elements/public/AppliedCouponCodeForm/index.js.map +1 -0
- package/dist/elements/public/AppliedCouponCodeForm/types.d.ts +5 -0
- package/dist/elements/public/AppliedCouponCodeForm/types.js +2 -0
- package/dist/elements/public/AppliedCouponCodeForm/types.js.map +1 -0
- package/dist/elements/public/AttributeCard/AttributeCard.js +5 -4
- package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
- package/dist/elements/public/CartCard/CartCard.d.ts +42 -0
- package/dist/elements/public/CartCard/CartCard.js +264 -0
- package/dist/elements/public/CartCard/CartCard.js.map +1 -0
- package/dist/elements/public/CartCard/index.d.ts +5 -0
- package/dist/elements/public/CartCard/index.js +7 -0
- package/dist/elements/public/CartCard/index.js.map +1 -0
- package/dist/elements/public/CartCard/types.d.ts +5 -0
- package/dist/elements/public/CartCard/types.js +2 -0
- package/dist/elements/public/CartCard/types.js.map +1 -0
- package/dist/elements/public/CartForm/CartForm.d.ts +59 -0
- package/dist/elements/public/CartForm/CartForm.js +603 -0
- package/dist/elements/public/CartForm/CartForm.js.map +1 -0
- package/dist/elements/public/CartForm/index.d.ts +19 -0
- package/dist/elements/public/CartForm/index.js +21 -0
- package/dist/elements/public/CartForm/index.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.d.ts +10 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js +83 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.d.ts +4 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js +6 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js.map +1 -0
- package/dist/elements/public/CartForm/types.d.ts +3 -0
- package/dist/elements/public/CartForm/types.js +2 -0
- package/dist/elements/public/CartForm/types.js.map +1 -0
- package/dist/elements/public/CollectionPage/CollectionPage.js +11 -8
- package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js +5 -4
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
- package/dist/elements/public/CustomerCard/CustomerCard.js +1 -1
- package/dist/elements/public/CustomerCard/CustomerCard.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +3 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/DiscountCard/DiscountCard.js +2 -1
- package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -1
- package/dist/elements/public/GiftCardCard/GiftCardCard.js +2 -2
- package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -1
- package/dist/elements/public/IntegrationCard/IntegrationCard.js +2 -2
- package/dist/elements/public/IntegrationCard/IntegrationCard.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.d.ts +26 -4
- package/dist/elements/public/ItemCard/ItemCard.js +216 -27
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemCard/index.d.ts +1 -0
- package/dist/elements/public/ItemCard/index.js +1 -0
- package/dist/elements/public/ItemCard/index.js.map +1 -1
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +3 -1
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +4 -3
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -1
- package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -0
- package/dist/elements/public/ItemForm/ItemForm.js +58 -8
- package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +25 -5
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +200 -17
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -1
- package/dist/elements/public/ItemOptionCard/index.d.ts +1 -0
- package/dist/elements/public/ItemOptionCard/index.js +1 -0
- package/dist/elements/public/ItemOptionCard/index.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +25 -14
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/Pagination/Pagination.js +2 -2
- package/dist/elements/public/Pagination/Pagination.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +46 -14
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +300 -156
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/index.d.ts +9 -4
- package/dist/elements/public/SubscriptionForm/index.js +9 -4
- package/dist/elements/public/SubscriptionForm/index.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/types.d.ts +2 -5
- package/dist/elements/public/SubscriptionForm/types.js.map +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.js +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
- package/dist/elements/public/index.d.ts +5 -0
- package/dist/elements/public/index.defined.d.ts +5 -0
- package/dist/elements/public/index.defined.js +5 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +5 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +29 -8
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-1b3e1a0d.js +0 -1
- package/dist/cdn/shared-210387cb.js +0 -1
- package/dist/cdn/shared-222fe491.js +0 -1
- package/dist/cdn/shared-515f00b1.js +0 -1
- package/dist/cdn/shared-5643d0ed.js +0 -1
- package/dist/cdn/shared-62c8cfa2.js +0 -60
- package/dist/cdn/shared-6b622399.js +0 -1
- package/dist/cdn/shared-92926b1d.js +0 -1
- package/dist/cdn/shared-b7219771.js +0 -1
- package/dist/cdn/shared-dc798bf4.js +0 -1
- package/dist/cdn/shared-e08bcb6c.js +0 -1
- package/dist/cdn/shared-fdac2851.js +0 -1
package/dist/mixins/themeable.js
CHANGED
|
@@ -1234,6 +1234,10 @@ input::-webkit-date-and-time-value{
|
|
|
1234
1234
|
justify-content: space-evenly;
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
|
+
:host([sm]) .sm-justify-between {
|
|
1238
|
+
justify-content: space-between;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1237
1241
|
.gap-xs {
|
|
1238
1242
|
gap: var(--lumo-space-xs, 0.25rem);
|
|
1239
1243
|
}
|
|
@@ -1254,6 +1258,14 @@ input::-webkit-date-and-time-value{
|
|
|
1254
1258
|
gap: var(--lumo-space-m, 1rem);
|
|
1255
1259
|
}
|
|
1256
1260
|
|
|
1261
|
+
:host([sm]) .sm-gap-s {
|
|
1262
|
+
gap: var(--lumo-space-s, 0.5rem);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
:host([sm]) .sm-gap-l {
|
|
1266
|
+
gap: var(--lumo-space-l, 1.5rem);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1257
1269
|
.space-x-xs > :not([hidden]) ~ :not([hidden]) {
|
|
1258
1270
|
--tw-space-x-reverse: 0;
|
|
1259
1271
|
margin-right: calc(var(--lumo-space-xs, 0.25rem) * var(--tw-space-x-reverse));
|
|
@@ -1383,7 +1395,7 @@ input::-webkit-date-and-time-value{
|
|
|
1383
1395
|
}
|
|
1384
1396
|
|
|
1385
1397
|
.rounded {
|
|
1386
|
-
border-radius: var(--lumo-border-radius
|
|
1398
|
+
border-radius: var(--lumo-border-radius, 0.5em);
|
|
1387
1399
|
}
|
|
1388
1400
|
|
|
1389
1401
|
.rounded-t-l {
|
|
@@ -1391,6 +1403,11 @@ input::-webkit-date-and-time-value{
|
|
|
1391
1403
|
border-top-right-radius: var(--lumo-border-radius-l, 0.75em);
|
|
1392
1404
|
}
|
|
1393
1405
|
|
|
1406
|
+
.rounded-t {
|
|
1407
|
+
border-top-left-radius: var(--lumo-border-radius, 0.5em);
|
|
1408
|
+
border-top-right-radius: var(--lumo-border-radius, 0.5em);
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1394
1411
|
.rounded-r-none {
|
|
1395
1412
|
border-top-right-radius: 0;
|
|
1396
1413
|
border-bottom-right-radius: 0;
|
|
@@ -1402,8 +1419,8 @@ input::-webkit-date-and-time-value{
|
|
|
1402
1419
|
}
|
|
1403
1420
|
|
|
1404
1421
|
.rounded-b {
|
|
1405
|
-
border-bottom-right-radius: var(--lumo-border-radius
|
|
1406
|
-
border-bottom-left-radius: var(--lumo-border-radius
|
|
1422
|
+
border-bottom-right-radius: var(--lumo-border-radius, 0.5em);
|
|
1423
|
+
border-bottom-left-radius: var(--lumo-border-radius, 0.5em);
|
|
1407
1424
|
}
|
|
1408
1425
|
|
|
1409
1426
|
.rounded-l-none {
|
|
@@ -1421,7 +1438,7 @@ input::-webkit-date-and-time-value{
|
|
|
1421
1438
|
}
|
|
1422
1439
|
|
|
1423
1440
|
.rounded-tl {
|
|
1424
|
-
border-top-left-radius: var(--lumo-border-radius
|
|
1441
|
+
border-top-left-radius: var(--lumo-border-radius, 0.5em);
|
|
1425
1442
|
}
|
|
1426
1443
|
|
|
1427
1444
|
.rounded-tr-s {
|
|
@@ -1429,19 +1446,19 @@ input::-webkit-date-and-time-value{
|
|
|
1429
1446
|
}
|
|
1430
1447
|
|
|
1431
1448
|
.rounded-tr {
|
|
1432
|
-
border-top-right-radius: var(--lumo-border-radius
|
|
1449
|
+
border-top-right-radius: var(--lumo-border-radius, 0.5em);
|
|
1433
1450
|
}
|
|
1434
1451
|
|
|
1435
1452
|
.rounded-br {
|
|
1436
|
-
border-bottom-right-radius: var(--lumo-border-radius
|
|
1453
|
+
border-bottom-right-radius: var(--lumo-border-radius, 0.5em);
|
|
1437
1454
|
}
|
|
1438
1455
|
|
|
1439
1456
|
.rounded-bl {
|
|
1440
|
-
border-bottom-left-radius: var(--lumo-border-radius
|
|
1457
|
+
border-bottom-left-radius: var(--lumo-border-radius, 0.5em);
|
|
1441
1458
|
}
|
|
1442
1459
|
|
|
1443
1460
|
:host([sm]) .sm-rounded-tr {
|
|
1444
|
-
border-top-right-radius: var(--lumo-border-radius
|
|
1461
|
+
border-top-right-radius: var(--lumo-border-radius, 0.5em);
|
|
1445
1462
|
}
|
|
1446
1463
|
|
|
1447
1464
|
:host([sm]) .sm-rounded-bl-none {
|
|
@@ -1863,6 +1880,10 @@ input::-webkit-date-and-time-value{
|
|
|
1863
1880
|
font-size: var(--lumo-font-size-xxxl, 2.5rem);
|
|
1864
1881
|
}
|
|
1865
1882
|
|
|
1883
|
+
:host([sm]) .sm-text-m {
|
|
1884
|
+
font-size: var(--lumo-font-size-m, 1rem);
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1866
1887
|
:host([sm]) .sm-text-l {
|
|
1867
1888
|
font-size: var(--lumo-font-size-l, 1.125rem);
|
|
1868
1889
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAI/E,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG
|
|
1
|
+
{"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAI/E,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA4HF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CACZ,yBAAyB,EACzB,GAAG;;;;;;;;GASF,CACF,CAAC;AAEF,cAAc,CACZ,qCAAqC,EACrC,GAAG;;;;;;;GAOF,CACF,CAAC;AAEF,cAAc,CACZ,qCAAqC,EACrC,GAAG;;;;;;;GAOF,CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n color: var(--lumo-body-text-color);\n line-height: var(--lumo-line-height-m);\n font: normal var(--lumo-font-size-m) var(--lumo-font-family);\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-checkbox-group,\n vaadin-radio-group,\n vaadin-combo-box::part(text-field),\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-time-picker,\n vaadin-date-time-picker {\n width: 100%;\n }\n\n vaadin-button,\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .max-w-modal-wide {\n max-width: 50rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\nregisterStyles(\n 'vaadin-date-time-picker',\n css`\n vaadin-date-time-picker-custom-field {\n --lumo-text-field-size: auto;\n padding: 0;\n }\n\n vaadin-date-time-picker-custom-field::part(label) {\n padding-bottom: 0.5em;\n }\n `\n);\n\nregisterStyles(\n 'vaadin-date-time-picker-date-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-date-text-field {\n padding: 0;\n }\n `\n);\n\nregisterStyles(\n 'vaadin-date-time-picker-time-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-time-text-field {\n padding: 0;\n }\n `\n);\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-a8ced8bf.js";import"./shared-c484320b.js";import"./shared-7b167fe9.js";import"./shared-f2d19582.js";import"./shared-d43fc5cc.js";import"./shared-2215e6c8.js";import"./shared-34b11d34.js";import"./shared-6d2064e9.js";import{d as t,P as a,A as s,L as i,c as n,h as r}from"./shared-7f33a83a.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import{p as o}from"./shared-0672e78b.js";import{a as l,x as d}from"./shared-29e21467.js";import{T as c,U as u,V as h,W as m,X as v,Y as g,Z as p,$ as y,b,a0 as f,a1 as x,a2 as _,a3 as w,a4 as $,a5 as E,a6 as T,m as k,a7 as S}from"./shared-002b788f.js";import{I as V}from"./shared-4f037e43.js";import{s as C}from"./shared-11c2efc8.js";import{i as A}from"./shared-dcbf57e0.js";var M={raise:c,send:u,sendParent:h,sendUpdate:m,log:v,cancel:g,start:p,stop:y,assign:b,after:f,done:x,respond:_,forwardTo:w,escalate:$,choose:E,pure:T};const j=t((e=>t=>{const{element:i,name:n,strings:r}=t.committer;if(2!==r.length||""!==r[0]||""!==r[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof a)i[n]!==e&&t.setValue(e);else{if(!(t instanceof s))throw new Error("live directive can only be used on attributes or properties");i.getAttribute(n)!==e&&t.setValue(e)}}));class I extends CustomEvent{constructor(e){super("change",{detail:e})}}class U extends CustomEvent{constructor(e){super("change",{detail:e})}}class D extends U{}let P,q,F=e=>e;class L extends(l(V(i))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:a}=o(e);return[t.toString(),a]}},this.__getItems=k((e=>{const t=o(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return e(e({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return n(P||(P=F`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return r(q||(q=F` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,j(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new D(this.value))}}const B=S({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:M.assign({defaultCustomValue:(e,t)=>t.data}),setValue:M.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:M.assign({custom:(e,t)=>t.data}),setItems:M.assign({items:(e,t)=>t.data}),setType:M.assign({type:(e,t)=>t.data}),setMin:M.assign({min:(e,t)=>t.data}),setMax:M.assign({max:(e,t)=>t.data})}});let N,O,Y,R,X,z,W,Z,G,H,J,K,Q,ee=e=>e;const te=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ae extends d{constructor(){super(...arguments),this.getText=e=>e,this.__service=A(B).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":L,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,n(Y||(Y=ee`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return e(e({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,te]:this.items,t=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),s=r(R||(R=ee` ${0} `),e.map(((e,s,i)=>{var n;const o=this.custom&&s===i.length-1,l=o?a:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),d=this.disabled||!this._isI18nReady,c=C({value:o?te:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":d,"@change":t=>{if(this.readonly)return t.preventDefault();const a=t.target.checked,s=e===te?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===te?a?[...i,s]:i.slice(0,i.length-1):a?[s,...i]:i.filter((e=>e!==s)):this.value=a?s:null,this.dispatchEvent(new I(this.value))}}),u=r(X||(X=ee` <div> ${0} </div> `),e===te?this._t("choice.other").toString():r(z||(z=ee`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return r(W||(W=ee` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),s?"":"hidden",t?function(e,t,a,s,i){const n="transition ease-in-out duration-200",o=`${n} transform ${a?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return r(O||(O=ee` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",o,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,d,l,c,u):function(e,t,a,s,i){const n="transition ease-in-out duration-200",o=`${n} ${t||e?"":"shadow-xs"} transform ${a?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return r(N||(N=ee` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",o,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,d,l,c,u),e===te&&a?this.__field:"",e!==te?r(Z||(Z=ee`<slot name="${0}"></slot>`),e):"")})));return r(G||(G=ee`<form>${0}</form> `),s)}get __field(){const e=C({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new I(this.value))}});return"frequency"===this.type?r(H||(H=ee`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?r(J||(J=ee`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"textarea"===this.type?r(K||(K=ee`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):r(Q||(Q=ee`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{ae as C,U as D,L as F,I as a,M as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-2215e6c8.js";import{I as e}from"./shared-17d24760.js";import{_ as t}from"./shared-a8ced8bf.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";class i extends e{constructor(){super(...arguments),this.getValue=()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]},this.setValue=e=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.edit({[this.property]:e})},this.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.requestUpdate("helperText",this.__helperText),this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){this.requestUpdate("property",this.__property),this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.requestUpdate("label",this.__label),this.__label=e}resetPlaceholder(){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=null}resetHelperText(){this.requestUpdate("helperText",this.__helperText),this.__helperText=null}resetV8nPrefix(){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=null}resetProperty(){this.requestUpdate("property",this.__property),this.__property=null}resetLabel(){this.requestUpdate("label",this.__label),this.__label=null}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)))}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",i);let l,h,n,o=e=>e;customElements.define("foxy-internal-text-control",class extends i{constructor(){super(...arguments),this.prefix=null,this.suffix=null}static get properties(){return t(t({},super.properties),{},{prefix:{},suffix:{}})}renderControl(){return s(l||(l=o` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),r(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?s(h||(h=o`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(n||(n=o`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});export{i as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-a8ced8bf.js";import{L as t,h as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-002b788f.js";import{A as d}from"./shared-dc798bf4.js";import{U as u,a as c}from"./shared-d6276c83.js";import{I as l}from"./shared-4f037e43.js";import{i as _}from"./shared-dcbf57e0.js";function f(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,d,u,c,l;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(u=null===(d=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===d?void 0:d.self)||void 0===u?void 0:u.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(l=null===(c=this.node)||void 0===c?void 0:c._links)&&void 0!==l?l:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),d=new URL(e);return a.searchParams.set("offset",o.length.toString()),d.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:d.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}let v,p=e=>e;class m extends(l(t)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__hrefToLoad=null,this.__group="",this.__fetchEventQueue=[],this.__service=_(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:t=>{const s=this.constructor.v8n,r=e(e({},t.data),t.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:t,edits:s}=this.__service.state.context;return e(e({},t),s)}get data(){return this.__service.state.context.data}set data(e){this.__service.send({type:"SET_DATA",data:e}),this.__hrefToLoad=null}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,s;return null!==(s=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==s?s:""}set href(e){e?(this.__hrefToLoad=e,this.__service.send({type:"FETCH"})):(this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:null}))}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),s=this.in({idle:{template:{clean:"valid"}}}),r=this.in({idle:{snapshot:{clean:"valid"}}});return s||e||(r||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,s=["reportValidity","validate"];for(const e of s)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return s(v||(v=p`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new u)}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new d(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=await this._fetch(s._links.self.href),i=m.Rumour(this.group),n=[...this.related,this.parent];return i.share({data:r,related:n,source:r._links.self.href}),r}finally{this.__createRumour()}}async _sendGet(){this.__destroyRumour();try{const e=await this._fetch(this.href);return m.Rumour(this.group).share({data:e,source:this.href}),e}finally{this.__createRumour()}}async _sendPatch(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return m.Rumour(this.group).share({data:s,source:this.href,related:this.related}),s}finally{this.__createRumour()}}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=m.Rumour(this.group),t=[...this.related,this.parent];return e.share({data:null,source:this.href,related:t}),null}finally{this.__createRumour()}}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{var t,s;if(!e.changed)return;let r;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?r=c.ResourceDeleted:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"creating"}))&&(r=c.ResourceCreated)),this.requestUpdate(),this.dispatchEvent(new u("update",{detail:{result:r}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new u)})),this.__service.start()}__createRumour(){const e=m.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new m.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=f(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.__service.state.matches("busy")||this.__processFetchEventQueue())))}}m.UpdateEvent=u,m.Rumour=i((()=>new h)),m.API=d;export{m as N,f as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aw as r,ax as a,ay as n,aa as t,ar as o,az as e}from"./shared-002b788f.js";import{a as s}from"./shared-92926b1d.js";import{e as u}from"./shared-a8ced8bf.js";var l=Object.prototype.hasOwnProperty;function f(r,a){return null!=r&&l.call(r,a)}function i(s,u){return null!=s&&function(s,u,l){for(var f=-1,i=(u=r(u,s)).length,c=!1;++f<i;){var p=a(u[f]);if(!(c=null!=s&&l(s,p)))break;s=s[p]}return c||++f!=i?c:!!(i=null==s?0:s.length)&&n(i)&&t(p,i)&&(o(s)||e(s))}(s,u,f)}function c(n,o,e){return null==n?n:function(n,o,e,l){if(!u(n))return n;for(var f=-1,i=(o=r(o,n)).length,c=i-1,p=n;null!=p&&++f<i;){var h=a(o[f]),v=e;if("__proto__"===h||"constructor"===h||"prototype"===h)return n;if(f!=c){var d=p[h];void 0===(v=l?l(d,h,p):void 0)&&(v=u(d)?d:t(o[f+1])?[]:{})}s(p,h,v),p=p[h]}return n}(n,o,e)}export{i as h,c as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./shared-a8ced8bf.js";import{C as e}from"./shared-5ad8c9a0.js";import{h as i}from"./shared-7f33a83a.js";import{N as s}from"./shared-222fe491.js";import{T as r}from"./shared-29e21467.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}}export{p as T};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{T as t}from"./shared-d5f242df.js";import{a as s}from"./shared-29e21467.js";let e,n,a,o,l,i,r=t=>t;class c extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.idColumn,c.dateColumn,c.receiptColumn]}}c.priceColumn={cell:t=>t.html(e||(e=r`
|
|
2
|
-
<foxy-i18n
|
|
3
|
-
data-testclass="i18n totals"
|
|
4
|
-
class="text-m font-semibold font-tnum"
|
|
5
|
-
lang=${0}
|
|
6
|
-
key="price"
|
|
7
|
-
ns=${0}
|
|
8
|
-
.options=${0}
|
|
9
|
-
>
|
|
10
|
-
</foxy-i18n>
|
|
11
|
-
`),t.lang,t.ns,{amount:`${t.data.total_order} ${t.data.currency_code}`})},c.summaryColumn={cell:t=>{var s;const e=null===(s=t.data._embedded)||void 0===s?void 0:s["fx:items"];if(!e)return"";const a={most_expensive_item:[...e].sort(((t,s)=>t.price-s.price))[0],count:e.length};return t.html(n||(n=r`
|
|
12
|
-
<foxy-i18n
|
|
13
|
-
data-testclass="i18n summaries"
|
|
14
|
-
class="text-m"
|
|
15
|
-
lang=${0}
|
|
16
|
-
key="transaction_summary"
|
|
17
|
-
ns=${0}
|
|
18
|
-
.options=${0}
|
|
19
|
-
>
|
|
20
|
-
</foxy-i18n>
|
|
21
|
-
`),t.lang,t.ns,a)}},c.statusColumn={hideBelow:"md",cell:t=>{const s={completed:"bg-success-10 text-success",declined:"bg-error-10 text-error",rejected:"bg-error-10 text-error"},e=t.data.status||"completed",n=e in s?s[e]:"bg-contrast-5 text-contrast";return t.html(a||(a=r`
|
|
22
|
-
<foxy-i18n
|
|
23
|
-
data-testclass="i18n statuses"
|
|
24
|
-
class="px-s py-xs text-m font-medium rounded ${0}"
|
|
25
|
-
lang=${0}
|
|
26
|
-
key=${0}
|
|
27
|
-
ns=${0}
|
|
28
|
-
>
|
|
29
|
-
</foxy-i18n>
|
|
30
|
-
`),n,t.lang,`transaction_${e}`,t.ns)}},c.idColumn={hideBelow:"md",cell:t=>t.html(o||(o=r`
|
|
31
|
-
<span class="text-m text-secondary font-tnum" data-testclass="ids">
|
|
32
|
-
<span class="text-tertiary">ID</span> ${0}
|
|
33
|
-
</span>
|
|
34
|
-
`),t.data.id)},c.dateColumn={hideBelow:"md",cell:t=>t.html(l||(l=r`
|
|
35
|
-
<foxy-i18n
|
|
36
|
-
data-testclass="i18n dates"
|
|
37
|
-
class="text-m text-secondary font-tnum"
|
|
38
|
-
lang=${0}
|
|
39
|
-
key="date"
|
|
40
|
-
ns=${0}
|
|
41
|
-
.options=${0}
|
|
42
|
-
>
|
|
43
|
-
</foxy-i18n>
|
|
44
|
-
`),t.lang,t.ns,{value:t.data.transaction_date})},c.receiptColumn={cell:t=>t.html(i||(i=r`
|
|
45
|
-
<a
|
|
46
|
-
data-testclass="links"
|
|
47
|
-
target="_blank"
|
|
48
|
-
class="text-m font-semibold text-primary rounded hover-underline focus-outline-none focus-shadow-outline"
|
|
49
|
-
href=${0}
|
|
50
|
-
>
|
|
51
|
-
<foxy-i18n
|
|
52
|
-
data-testclass="i18n"
|
|
53
|
-
ns=${0}
|
|
54
|
-
lang=${0}
|
|
55
|
-
key="receipt"
|
|
56
|
-
>
|
|
57
|
-
</foxy-i18n>
|
|
58
|
-
<iron-icon icon="icons:open-in-new" class="icon-inline"></iron-icon>
|
|
59
|
-
</a>
|
|
60
|
-
`),t.data._links["fx:receipt"].href,t.ns,t.lang)},c.__ns="transactions-table";export{c as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-b28dbc68.js";import{I as e}from"./shared-210387cb.js";import{_ as t}from"./shared-a8ced8bf.js";import{i as a}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";import{A as i}from"./shared-dc798bf4.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){var e;super(...arguments),e=this,this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null,this.__dataProvider=async function(t,a){if(!e.first)return a([],0);const s=new URL(e.first);s.searchParams.set("offset",String(t.page*t.pageSize)),s.searchParams.set("limit",String(t.pageSize)),t.filter&&e.itemLabelPath&&s.searchParams.set(e.itemLabelPath,`*${t.filter}*`);const r=await new i(e).fetch(s.toString());if(!r.ok)throw new Error(await r.text());const l=await r.json();a(Array.from(Object.values(l._embedded))[0],l.total_items)}}static get properties(){return t(t({},super.properties),{},{itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this.__dataProvider,this.selectedItem,this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")||e.has("itemLabelPath")){const e=this.renderRoot.querySelector("vaadin-combo-box");e&&(e.size=0,e.size=1)}}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{av as r,ab as a}from"./shared-002b788f.js";var e=function(){try{var a=r(Object,"defineProperty");return a({},"",{}),a}catch(r){}}();function t(r,a,t){"__proto__"==a&&e?e(r,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[a]=t}var o=Object.prototype.hasOwnProperty;function n(r,e,n){var c=r[e];o.call(r,e)&&a(c,n)&&(void 0!==n||e in r)||t(r,e,n)}export{n as a,t as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{T as e}from"./shared-29e21467.js";import{N as i}from"./shared-222fe491.js";import{c as s}from"./shared-4e709717.js";import{h as t}from"./shared-7f33a83a.js";let n,r,a=e=>e;class o extends(e(i)){renderBody(){return t(n||(n=a``))}render(){return t(r||(r=a` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" class="m-auto" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.in({idle:"snapshot"})}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in({idle:"snapshot"})}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy")}}customElements.define("foxy-internal-card",o);export{o as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e,A as s}from"./shared-002b788f.js";class t extends s{constructor(s){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,a)=>{const c="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];c.headers.set("Content-Type","application/json"),c.headers.set("FOXY-API-VERSION","1");const r=new e("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:c,resolve:o,reject:a});s.dispatchEvent(r),r.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=e;export{t as A};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./shared-a8ced8bf.js";import"./shared-b8e9b536.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-0672e78b.js";import"./shared-c484320b.js";import"./shared-7b167fe9.js";import"./shared-f2d19582.js";import{w as a,S as n,x as o}from"./shared-29e21467.js";import"./shared-1b3e1a0d.js";import"./shared-4975f86f.js";import{I as l,D as c}from"./shared-196fa627.js";import{E as h}from"./shared-07fb5be2.js";import"./shared-d43fc5cc.js";import"./shared-2215e6c8.js";import"./shared-34b11d34.js";import"./shared-bb522838.js";import"./shared-b28dbc68.js";import"./shared-6b8874a7.js";import"./shared-ea316e64.js";import{s as d}from"./shared-11c2efc8.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=f.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class j extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":j,"x-i18n":l}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{K as I,j as P,R as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-d43fc5cc.js";import"./shared-2215e6c8.js";import{I as e}from"./shared-210387cb.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as a}from"./shared-7f33a83a.js";let l,s=e=>e;customElements.define("foxy-internal-number-control",class extends e{renderControl(){return a(l||(l=s` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> </vaadin-number-field> `),r(this._errorMessage),this.placeholder,this.helperText,this.label,this.disabled,this.readonly,this._checkValidity,String(this._value),(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseFloat(r.value)}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:0}set _value(e){super._value=e}});
|