@foxy.io/elements 1.18.0-beta.2 → 1.18.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -0
- package/dist/cdn/foxy-api-browser.js +3 -3
- 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 +10 -9
- package/dist/cdn/foxy-customer.js +5 -5
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -0
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -0
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -0
- package/dist/cdn/foxy-integration-form.js +1 -0
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -0
- package/dist/cdn/foxy-item-category-form.js +1 -0
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -0
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -0
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -0
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -0
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -0
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -0
- package/dist/cdn/foxy-payments-api.js +1 -0
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +12 -12
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -0
- 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 -0
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -150
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -16
- package/dist/cdn/foxy-subscription-settings-form.js +1 -0
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-swipe-actions.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -0
- package/dist/cdn/foxy-template-set-form.js +1 -0
- 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 -318
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/shared-004f1a77.js +1 -0
- package/dist/cdn/{shared-40689cd2.js → shared-034c6aeb.js} +3 -3
- package/dist/cdn/{shared-e1c1e8e2.js → shared-0479553e.js} +1 -1
- package/dist/cdn/shared-09eb558f.js +1 -0
- package/dist/cdn/shared-0d4f9b06.js +1 -0
- package/dist/cdn/{shared-6eeb69e7.js → shared-0f649dc6.js} +5 -5
- package/dist/cdn/{shared-99940888.js → shared-11c2efc8.js} +1 -1
- package/dist/cdn/shared-11ffd643.js +1 -0
- package/dist/cdn/shared-1351c1e3.js +1 -0
- package/dist/cdn/shared-13982611.js +1 -0
- package/dist/cdn/{shared-17331dc5.js → shared-179ff8af.js} +1 -1
- package/dist/cdn/shared-17c1eab2.js +169 -0
- package/dist/cdn/shared-181f51bd.js +1 -0
- package/dist/cdn/{shared-2b077e01.js → shared-1db07286.js} +1 -1
- package/dist/cdn/{shared-33b47806.js → shared-1e94e6dd.js} +3 -3
- package/dist/cdn/shared-21689ac0.js +1 -0
- package/dist/cdn/shared-23bf6ee6.js +25 -0
- package/dist/cdn/{shared-59796faa.js → shared-2b2002ac.js} +1 -1
- package/dist/cdn/{shared-fd001fd3.js → shared-2f6e33b6.js} +1 -1
- package/dist/cdn/{shared-e6a7b2f1.js → shared-2f7dcefa.js} +1 -1
- package/dist/cdn/shared-2f9b7791.js +1 -0
- package/dist/cdn/{shared-32b15545.js → shared-39b184de.js} +5 -5
- package/dist/cdn/{shared-4fc53390.js → shared-3ca1e8e4.js} +1 -1
- package/dist/cdn/{shared-9f9cdbb0.js → shared-413415b0.js} +1 -1
- package/dist/cdn/shared-43bcce74.js +1 -0
- package/dist/cdn/shared-4f037e43.js +1 -0
- package/dist/cdn/shared-5ada1ccb.js +1 -0
- package/dist/cdn/shared-5b3ae513.js +1 -0
- package/dist/cdn/shared-5c6eb602.js +553 -0
- package/dist/cdn/shared-63139d9e.js +1 -0
- package/dist/cdn/{shared-c13674cb.js → shared-68e0cf30.js} +1 -1
- package/dist/cdn/shared-6cc53630.js +1 -0
- package/dist/cdn/{shared-1bbd9b73.js → shared-75e78c70.js} +1 -1
- package/dist/cdn/shared-76b3d76a.js +15 -0
- package/dist/cdn/shared-776f948d.js +1 -0
- package/dist/cdn/shared-79d6a262.js +1 -0
- package/dist/cdn/shared-7d658c02.js +1 -0
- package/dist/cdn/{shared-dc73b9a5.js → shared-7f33a83a.js} +1 -1
- package/dist/cdn/shared-7fb8ecc5.js +1 -0
- package/dist/cdn/shared-839dd3a8.js +1 -0
- package/dist/cdn/{shared-8936b109.js → shared-869df7ed.js} +1 -1
- package/dist/cdn/shared-888d690a.js +1 -0
- package/dist/cdn/{shared-12f8034b.js → shared-88c7755d.js} +1 -1
- package/dist/cdn/shared-8b6addec.js +1 -0
- package/dist/cdn/{shared-4473f0cf.js → shared-8eb4c8d7.js} +1 -1
- package/dist/cdn/{shared-d6dd67a5.js → shared-90c7dbdb.js} +1 -1
- package/dist/cdn/{shared-0eb966c5.js → shared-99065f2a.js} +1 -1
- package/dist/cdn/shared-9d511d7e.js +1 -0
- package/dist/cdn/shared-9d7bbdd8.js +64 -0
- package/dist/cdn/{shared-a64ead08.js → shared-a343ec6b.js} +1 -1
- package/dist/cdn/{shared-e06de519.js → shared-a41f2200.js} +1 -1
- package/dist/cdn/shared-a85afa33.js +1 -0
- package/dist/cdn/shared-a8ced8bf.js +1 -0
- package/dist/cdn/{shared-dbdc2a38.js → shared-a90a5235.js} +1 -1
- package/dist/cdn/shared-ae588315.js +1 -0
- package/dist/cdn/{shared-d539ee69.js → shared-b48e5aaf.js} +1 -1
- package/dist/cdn/shared-b7636a23.js +1 -0
- package/dist/cdn/shared-bae9da44.js +318 -0
- package/dist/cdn/shared-bc7f58ef.js +1 -0
- package/dist/cdn/shared-bcc6e13b.js +1 -0
- package/dist/cdn/{shared-5f411ce2.js → shared-bf47ead0.js} +1 -1
- package/dist/cdn/shared-c379590f.js +1 -0
- package/dist/cdn/shared-cdc183c5.js +1 -0
- package/dist/cdn/{shared-6c1aab74.js → shared-cf784db1.js} +1 -1
- package/dist/cdn/{shared-4f8fe424.js → shared-d384d6a3.js} +13 -18
- package/dist/cdn/{shared-9803aa7c.js → shared-d3bf9ac0.js} +2 -2
- package/dist/cdn/{shared-48ef8a04.js → shared-d4a652b7.js} +1 -1
- package/dist/cdn/{shared-a0c6a159.js → shared-d519a301.js} +2 -2
- package/dist/cdn/shared-d6276c83.js +1 -0
- package/dist/cdn/shared-dbd4a5e8.js +150 -0
- package/dist/cdn/{shared-c5a638d1.js → shared-df462496.js} +27 -51
- package/dist/cdn/shared-e06b70cc.js +1 -0
- package/dist/cdn/{shared-f9f9ed5b.js → shared-e6f3e9f0.js} +1 -1
- package/dist/cdn/shared-e94165e9.js +1 -0
- package/dist/cdn/shared-e99fa3d6.js +6 -0
- package/dist/cdn/{shared-75e34b5b.js → shared-ea67b3f3.js} +1 -1
- package/dist/cdn/{shared-824f6e03.js → shared-ea6c8bae.js} +15 -15
- package/dist/cdn/{shared-22ba9566.js → shared-f3b35364.js} +1 -1
- package/dist/cdn/shared-fafafc09.js +1 -0
- package/dist/cdn/translations/admin-subscription-card/en.json +27 -0
- package/dist/cdn/translations/api-browser/en.json +1 -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/email-template-card/en.json +12 -0
- package/dist/cdn/translations/email-template-form/en.json +10 -0
- package/dist/cdn/translations/gift-card-code-form/en.json +32 -0
- package/dist/cdn/translations/gift-card-code-log-card/en.json +10 -0
- package/dist/cdn/translations/gift-card-form/en.json +58 -1
- package/dist/cdn/translations/i18n-editor/en.json +10 -0
- package/dist/cdn/translations/integration-card/en.json +10 -0
- package/dist/cdn/translations/integration-form/en.json +41 -0
- package/dist/cdn/translations/item-category-card/en.json +7 -0
- package/dist/cdn/translations/item-category-form/en.json +196 -0
- package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +10 -0
- package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +34 -0
- package/dist/cdn/translations/payments-api-payment-method-card/en.json +10 -0
- package/dist/cdn/translations/payments-api-payment-method-form/en.json +61 -0
- package/dist/cdn/translations/payments-api-payment-preset-card/en.json +9 -0
- package/dist/cdn/translations/payments-api-payment-preset-form/en.json +84 -0
- package/dist/cdn/translations/shipping-method-card/en.json +9 -0
- package/dist/cdn/translations/store-form/en.json +316 -0
- package/dist/cdn/translations/store-shipping-method-form/en.json +8 -1
- package/dist/cdn/translations/subscription-form/en.json +116 -21
- package/dist/cdn/translations/subscription-settings-form/en.json +92 -0
- package/dist/cdn/translations/template-set-card/en.json +7 -0
- package/dist/cdn/translations/template-set-form/en.json +50 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +3 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +25 -17
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js +3 -1
- package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +33 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +204 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -0
- package/dist/elements/internal/InternalAsyncListControl/index.d.ts +12 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js +14 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -0
- 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/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +11 -5
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -1
- package/dist/elements/internal/InternalControl/InternalControl.js +3 -2
- package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +1 -1
- package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +18 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +12 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +152 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/index.d.ts +3 -0
- package/dist/elements/internal/InternalEditableListControl/index.js +5 -0
- package/dist/elements/internal/InternalEditableListControl/index.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/types.d.ts +9 -0
- package/dist/elements/{public/StoreShippingMethodCard → internal/InternalEditableListControl}/types.js +0 -0
- package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -0
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +6 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +27 -13
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +6 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +22 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +6 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +22 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +13 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +40 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -0
- package/dist/elements/internal/InternalPasswordControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalPasswordControl/index.js +6 -0
- package/dist/elements/internal/InternalPasswordControl/index.js.map +1 -0
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +32 -4
- package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +18 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +60 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
- package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
- package/dist/elements/internal/InternalSelectControl/index.js +7 -0
- package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
- package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
- package/dist/elements/internal/InternalSelectControl/types.js +2 -0
- package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +15 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/private/Dialog/Dialog.d.ts +2 -0
- package/dist/elements/private/Dialog/Dialog.js +7 -1
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/private/I18N/I18N.js +3 -0
- package/dist/elements/private/I18N/I18N.js.map +1 -1
- package/dist/elements/private/Switch/Switch.js +1 -1
- package/dist/elements/private/Switch/Switch.js.map +1 -1
- package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +5 -5
- package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/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/ApiBrowser/ApiBrowser.d.ts +2 -1
- package/dist/elements/public/ApiBrowser/ApiBrowser.js +38 -15
- package/dist/elements/public/ApiBrowser/ApiBrowser.js.map +1 -1
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.d.ts +20 -0
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js +48 -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/AttributeForm/AttributeForm.js +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.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/CouponCodeForm/CouponCodeForm.js +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js +5 -4
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerApi/CustomerApi.d.ts +2 -0
- package/dist/elements/public/CustomerApi/CustomerApi.js +14 -0
- package/dist/elements/public/CustomerApi/CustomerApi.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/CustomerForm/CustomerForm.js +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.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/EmailTemplateCard/EmailTemplateCard.d.ts +23 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +41 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -0
- package/dist/elements/public/EmailTemplateCard/index.d.ts +5 -0
- package/dist/elements/public/EmailTemplateCard/index.js +7 -0
- package/dist/elements/public/EmailTemplateCard/index.js.map +1 -0
- package/dist/elements/public/EmailTemplateCard/types.d.ts +3 -0
- package/dist/elements/public/EmailTemplateCard/types.js +2 -0
- package/dist/elements/public/EmailTemplateCard/types.js.map +1 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +4 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +30 -3
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/index.d.ts +2 -0
- package/dist/elements/public/EmailTemplateForm/index.js +2 -0
- package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
- package/dist/elements/public/FormDialog/FormDialog.js +1 -1
- package/dist/elements/public/FormDialog/FormDialog.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/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -0
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +33 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/index.d.ts +7 -4
- package/dist/elements/public/GiftCardCodeForm/index.js +7 -4
- package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts +5 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +12 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +108 -0
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +6 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.js +8 -0
- package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
- package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +26 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/index.d.ts +1 -2
- package/dist/elements/public/GiftCardForm/index.js +1 -2
- package/dist/elements/public/GiftCardForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.d.ts +14 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js +94 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/InternalGiftCardFormProvisioningControl.js.map +1 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.d.ts +6 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js +8 -0
- package/dist/elements/public/GiftCardForm/internal/InternalGiftCardFormProvisioningControl/index.js.map +1 -0
- package/dist/elements/public/I18n/format/date.js +5 -4
- package/dist/elements/public/I18n/format/date.js.map +1 -1
- package/dist/elements/public/I18nEditor/I18nEditor.d.ts +18 -0
- package/dist/elements/public/I18nEditor/I18nEditor.js +173 -0
- package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -0
- package/dist/elements/public/I18nEditor/index.d.ts +7 -0
- package/dist/elements/public/I18nEditor/index.js +9 -0
- package/dist/elements/public/I18nEditor/index.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.d.ts +17 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +169 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.d.ts +6 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js +8 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js.map +1 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.d.ts +3 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js +2 -0
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js.map +1 -0
- package/dist/elements/public/I18nEditor/types.d.ts +4 -0
- package/dist/elements/public/I18nEditor/types.js +2 -0
- package/dist/elements/public/I18nEditor/types.js.map +1 -0
- package/dist/elements/public/{StoreShippingMethodCard/StoreShippingMethodCard.d.ts → IntegrationCard/IntegrationCard.d.ts} +4 -4
- package/dist/elements/public/IntegrationCard/IntegrationCard.js +59 -0
- package/dist/elements/public/IntegrationCard/IntegrationCard.js.map +1 -0
- package/dist/elements/public/IntegrationCard/index.d.ts +4 -0
- package/dist/elements/public/IntegrationCard/index.js +6 -0
- package/dist/elements/public/IntegrationCard/index.js.map +1 -0
- package/dist/elements/public/IntegrationCard/types.d.ts +3 -0
- package/dist/elements/public/IntegrationCard/types.js +2 -0
- package/dist/elements/public/IntegrationCard/types.js.map +1 -0
- package/dist/elements/public/IntegrationForm/IntegrationForm.d.ts +18 -0
- package/dist/elements/public/IntegrationForm/IntegrationForm.js +220 -0
- package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -0
- package/dist/elements/public/IntegrationForm/index.d.ts +10 -0
- package/dist/elements/public/IntegrationForm/index.js +12 -0
- package/dist/elements/public/IntegrationForm/index.js.map +1 -0
- package/dist/elements/public/IntegrationForm/types.d.ts +21 -0
- package/dist/elements/public/IntegrationForm/types.js +2 -0
- package/dist/elements/public/IntegrationForm/types.js.map +1 -0
- package/dist/elements/public/ItemCard/ItemCard.d.ts +26 -4
- package/dist/elements/public/ItemCard/ItemCard.js +224 -33
- 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 +22 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +26 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
- package/dist/elements/public/ItemCategoryCard/index.d.ts +4 -0
- package/dist/elements/public/ItemCategoryCard/index.js +6 -0
- package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
- package/dist/elements/public/ItemCategoryCard/types.js +2 -0
- package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +31 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +309 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
- package/dist/elements/public/ItemCategoryForm/index.js +12 -0
- package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +83 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
- package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
- package/dist/elements/public/ItemCategoryForm/types.d.ts +3 -0
- package/dist/elements/public/ItemCategoryForm/types.js +2 -0
- package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
- package/dist/elements/public/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/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +2 -2
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +1 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +1 -1
- package/dist/elements/public/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/API.js +1 -1
- package/dist/elements/public/NucleonElement/API.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +8 -4
- package/dist/elements/public/NucleonElement/NucleonElement.js +123 -44
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/NucleonElement/UpdateEvent.d.ts +10 -2
- package/dist/elements/public/NucleonElement/UpdateEvent.js +8 -2
- package/dist/elements/public/NucleonElement/UpdateEvent.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/PaymentMethodCard/PaymentMethodCard.d.ts +1 -1
- package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +2 -2
- package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
- package/dist/elements/public/PaymentsApi/PaymentsApi.d.ts +18 -0
- package/dist/elements/public/PaymentsApi/PaymentsApi.js +92 -0
- package/dist/elements/public/PaymentsApi/PaymentsApi.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.d.ts +6 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js +95 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.d.ts +11 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js +15 -0
- package/dist/elements/public/PaymentsApi/api/composers/available_payment_methods.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.d.ts +10 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js +20 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protection.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.d.ts +10 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js +39 -0
- package/dist/elements/public/PaymentsApi/api/composers/fraud_protections.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_method.d.ts +18 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_method.js +25 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_method.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_methods.d.ts +14 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js +59 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_methods.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_preset.d.ts +8 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js +22 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_preset.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_presets.d.ts +8 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js +36 -0
- package/dist/elements/public/PaymentsApi/api/composers/payment_presets.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.d.ts +12 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +34 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.d.ts +16 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +44 -0
- package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.d.ts +17 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +68 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.d.ts +17 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +77 -0
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_method.d.ts +22 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +97 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.d.ts +21 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +113 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.d.ts +14 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +42 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.d.ts +14 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +47 -0
- package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/index.d.ts +11 -0
- package/dist/elements/public/PaymentsApi/api/index.js +35 -0
- package/dist/elements/public/PaymentsApi/api/index.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/types.d.ts +154 -0
- package/dist/elements/public/PaymentsApi/api/types.js +2 -0
- package/dist/elements/public/PaymentsApi/api/types.js.map +1 -0
- package/dist/elements/public/PaymentsApi/api/utils.d.ts +1 -0
- package/dist/elements/public/PaymentsApi/api/utils.js +7 -0
- package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -0
- package/dist/elements/public/PaymentsApi/index.d.ts +2 -0
- package/dist/elements/public/PaymentsApi/index.js +4 -0
- package/dist/elements/public/PaymentsApi/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +14 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +52 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/index.d.ts +4 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js +6 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/types.d.ts +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js +2 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/types.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +17 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +217 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/index.d.ts +11 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js +13 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/types.d.ts +3 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js +2 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +15 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +54 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/index.d.ts +4 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js +6 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/types.d.ts +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js +2 -0
- package/dist/elements/public/PaymentsApiPaymentMethodCard/types.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +20 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +428 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +10 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +12 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/types.d.ts +3 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js +2 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +27 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +39 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/index.d.ts +5 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js +7 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/types.d.ts +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js +2 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/types.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +22 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +145 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/index.d.ts +10 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js +12 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/index.js.map +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/types.d.ts +1 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js +2 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js.map +1 -0
- package/dist/elements/public/QueryBuilder/components/Input.js +10 -8
- package/dist/elements/public/QueryBuilder/components/Input.js.map +1 -1
- package/dist/elements/public/QueryBuilder/components/RangeValue.js +7 -5
- package/dist/elements/public/QueryBuilder/components/RangeValue.js.map +1 -1
- package/dist/elements/public/QueryBuilder/components/Select.js +3 -1
- package/dist/elements/public/QueryBuilder/components/Select.js.map +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js +1 -1
- package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
- package/dist/elements/public/ShipmentCard/types.d.ts +2 -16
- package/dist/elements/public/ShipmentCard/types.js.map +1 -1
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.d.ts +34 -0
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js +96 -0
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js.map +1 -0
- package/dist/elements/public/ShippingMethodCard/index.d.ts +5 -0
- package/dist/elements/public/ShippingMethodCard/index.js +7 -0
- package/dist/elements/public/ShippingMethodCard/index.js.map +1 -0
- package/dist/elements/public/ShippingMethodCard/types.d.ts +10 -0
- package/dist/elements/public/ShippingMethodCard/types.js +2 -0
- package/dist/elements/public/ShippingMethodCard/types.js.map +1 -0
- package/dist/elements/public/StoreForm/StoreForm.d.ts +55 -0
- package/dist/elements/public/StoreForm/StoreForm.js +1022 -0
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -0
- package/dist/elements/public/StoreForm/index.d.ts +15 -0
- package/dist/elements/public/StoreForm/index.js +17 -0
- package/dist/elements/public/StoreForm/index.js.map +1 -0
- package/dist/elements/public/StoreForm/types.d.ts +3 -0
- package/dist/elements/public/StoreForm/types.js +2 -0
- package/dist/elements/public/StoreForm/types.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +2 -2
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +102 -32
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/index.d.ts +1 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js +1 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +46 -14
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +300 -157
- 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/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +33 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +208 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.d.ts +9 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js +11 -0
- package/dist/elements/public/SubscriptionSettingsForm/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.d.ts +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js +128 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/InternalSubscriptionSettingsFormReattemptBypass.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.d.ts +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js +26 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/globalStyles.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.d.ts +6 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js +12 -0
- package/dist/elements/public/SubscriptionSettingsForm/internal/InternalSubscriptionSettingsFormReattemptBypass/index.js.map +1 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +3 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -0
- package/dist/elements/public/TaxCard/TaxCard.d.ts +4 -4
- package/dist/elements/public/TaxCard/TaxCard.js +12 -8
- package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
- package/dist/elements/public/TaxCard/index.d.ts +1 -3
- package/dist/elements/public/TaxCard/index.js +1 -3
- package/dist/elements/public/TaxCard/index.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +2 -2
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.d.ts +22 -0
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.js +26 -0
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.js.map +1 -0
- package/dist/elements/public/TemplateSetCard/index.d.ts +4 -0
- package/dist/elements/public/TemplateSetCard/index.js +6 -0
- package/dist/elements/public/TemplateSetCard/index.js.map +1 -0
- package/dist/elements/public/TemplateSetCard/types.d.ts +3 -0
- package/dist/elements/public/TemplateSetCard/types.js +2 -0
- package/dist/elements/public/TemplateSetCard/types.js.map +1 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +26 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +156 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -0
- package/dist/elements/public/TemplateSetForm/index.d.ts +8 -0
- package/dist/elements/public/TemplateSetForm/index.js +10 -0
- package/dist/elements/public/TemplateSetForm/index.js.map +1 -0
- package/dist/elements/public/TemplateSetForm/types.d.ts +3 -0
- package/dist/elements/public/TemplateSetForm/types.js +2 -0
- package/dist/elements/public/TemplateSetForm/types.js.map +1 -0
- package/dist/elements/public/TransactionCard/TransactionCard.js +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.js +1 -1
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +24 -1
- package/dist/elements/public/index.defined.d.ts +24 -1
- package/dist/elements/public/index.defined.js +24 -1
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +24 -1
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/configurable.js +25 -8
- package/dist/mixins/configurable.js.map +1 -1
- package/dist/mixins/inferrable.js +25 -23
- package/dist/mixins/inferrable.js.map +1 -1
- package/dist/mixins/responsive.js +8 -6
- package/dist/mixins/responsive.js.map +1 -1
- package/dist/mixins/themeable.js +189 -6727
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/utils/serialize-date.d.ts +1 -0
- package/dist/utils/serialize-date.js +7 -0
- package/dist/utils/serialize-date.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/foxy-store-shipping-method-card.js +0 -1
- package/dist/cdn/shared-0b9c755c.js +0 -1
- package/dist/cdn/shared-16d10bca.js +0 -1
- package/dist/cdn/shared-2061be9a.js +0 -1
- package/dist/cdn/shared-29dd9d87.js +0 -1
- package/dist/cdn/shared-2caab7af.js +0 -169
- package/dist/cdn/shared-2f186d21.js +0 -1
- package/dist/cdn/shared-2f19b670.js +0 -60
- package/dist/cdn/shared-30bb4828.js +0 -1
- package/dist/cdn/shared-5652560a.js +0 -1
- package/dist/cdn/shared-58a35351.js +0 -1
- package/dist/cdn/shared-7684cb05.js +0 -1
- package/dist/cdn/shared-7ed7818e.js +0 -1
- package/dist/cdn/shared-8166ba00.js +0 -1
- package/dist/cdn/shared-89dce718.js +0 -1
- package/dist/cdn/shared-95f4cffd.js +0 -1
- package/dist/cdn/shared-b52c7edf.js +0 -64
- package/dist/cdn/shared-b772fbb1.js +0 -15
- package/dist/cdn/shared-d673b138.js +0 -1
- package/dist/cdn/shared-d6ed2e5c.js +0 -1
- package/dist/cdn/shared-da130124.js +0 -1
- package/dist/cdn/shared-e25c676a.js +0 -1
- package/dist/cdn/shared-f966bbc3.js +0 -1
- package/dist/cdn/shared-fadcb2e1.js +0 -1
- package/dist/cdn/shared-fcdc4903.js +0 -1
- package/dist/cdn/translations/store-shipping-method-card/en.json +0 -15
- package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js +0 -60
- package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js.map +0 -1
- package/dist/elements/public/StoreShippingMethodCard/index.d.ts +0 -6
- package/dist/elements/public/StoreShippingMethodCard/index.js +0 -8
- package/dist/elements/public/StoreShippingMethodCard/index.js.map +0 -1
- package/dist/elements/public/StoreShippingMethodCard/types.d.ts +0 -5
- package/dist/elements/public/StoreShippingMethodCard/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3ca1e8e4.js";import"./shared-2f6e33b6.js";import"./shared-b48e5aaf.js";import"./shared-888d690a.js";import{_ as e}from"./shared-a8ced8bf.js";import{h as t,L as s}from"./shared-7f33a83a.js";import{C as i}from"./shared-43bcce74.js";import{N as n}from"./shared-181f51bd.js";import{R as a,T as r,a as o}from"./shared-1e94e6dd.js";import{c as l}from"./shared-4e709717.js";import{Q as c}from"./shared-76b3d76a.js";import{I as d}from"./shared-4f037e43.js";import"./shared-68e0cf30.js";import"./shared-869df7ed.js";import"./shared-d3bf9ac0.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";let m,_=e=>e;const f=a(i(r(o(d(s),"pagination"))));class h extends f{constructor(){super(...arguments),this.__pageElement=null,this.__rerender=()=>this.requestUpdate(),this.__first=""}static get properties(){return e(e({},super.properties),{},{first:{type:String},__pageElement:{attribute:!1}})}get first(){return this.__first}set first(e){this.__first=e,this.__pageElement&&(this.__pageElement.href=e)}connectedCallback(){super.connectedCallback(),this.__connectPageElement()}render(){var e;const s=null===(e=this.__pageElement)||void 0===e?void 0:e.data,{disabled:i,lang:n,ns:a}=this,r=Number(c(s,"returned_items")),o=Number.isNaN(r)?0:r,d=Number(c(s,"total_items")),f=Number.isNaN(d)?0:d,h=Number(c(s,"offset")),p=Number.isNaN(h)?0:h,g=!i&&p>0,u=!i&&p+o<f,v="sr-only sm-not-sr-only";return t(m||(m=_` <slot @slotchange="${0}"></slot> <div class="grid gap-s items-center -mx-xs" style="grid-template-columns:1fr auto 1fr"> <div class="flex items-center space-x-s"> <vaadin-button data-testid="first" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-s" icon="icons:first-page"></iron-icon> <foxy-i18n class="${0}" lang="${0}" key="first" ns="${0}"></foxy-i18n> </vaadin-button> <vaadin-button data-testid="prev" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-s" icon="icons:chevron-left"></iron-icon> <foxy-i18n class="${0}" lang="${0}" key="previous" ns="${0}"></foxy-i18n> </vaadin-button> </div> <foxy-i18n options="${0}" class="${0}" lang="${0}" key="pagination" ns="${0}"> </foxy-i18n> <div class="flex items-center justify-end space-x-s"> <vaadin-button data-testid="next" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="next" ns="${0}"></foxy-i18n> <iron-icon class="icon-inline text-s" icon="icons:chevron-right"></iron-icon> </vaadin-button> <vaadin-button data-testid="last" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="last" ns="${0}"></foxy-i18n> <iron-icon class="icon-inline text-s" icon="icons:last-page"></iron-icon> </vaadin-button> </div> </div> `),this.__connectPageElement,!g,(()=>this.__goTo("first")),v,n,a,!g,(()=>this.__goTo("prev")),v,n,a,JSON.stringify({total:f,from:p?p+1:0,to:p+o}),l({"flex-1 text-xs text-tertiary text-center leading-xs truncate":!0,"opacity-0":!s}),n,a,!u,(()=>this.__goTo("next")),v,n,a,!u,(()=>this.__goTo("last")),v,n,a)}disconnectedCallback(){super.disconnectedCallback(),this.__disconnectPageElement()}__goTo(e){var t;this.__pageElement.href=String(c(null===(t=this.__pageElement)||void 0===t?void 0:t.data,`_links.${e}.href`))}__disconnectPageElement(){var e;null===(e=this.__pageElement)||void 0===e||e.removeEventListener("update",this.__rerender),this.__pageElement=null}__connectPageElement(){var e;this.__disconnectPageElement();const t=this.renderRoot.querySelector("slot"),s=(null!==(e=null==t?void 0:t.assignedElements())&&void 0!==e?e:[]).find((e=>e instanceof n));s&&(this.__pageElement=s,this.__pageElement.addEventListener("update",this.__rerender),this.__pageElement.href=this.first)}}customElements.define("foxy-pagination",h);export{h as Pagination};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-0479553e.js";import"./shared-888d690a.js";import"./foxy-spinner.js";import{l as e,u as t}from"./shared-99065f2a.js";import{h as s}from"./shared-7f33a83a.js";import{C as r}from"./shared-43bcce74.js";import{N as i}from"./shared-181f51bd.js";import{T as a,a as n}from"./shared-1e94e6dd.js";import{c as o}from"./shared-4e709717.js";import"./shared-a8ced8bf.js";import"./shared-76b3d76a.js";import"./shared-4f037e43.js";import"./shared-2f6e33b6.js";import"./shared-68e0cf30.js";import"./shared-3ca1e8e4.js";import"./shared-d3bf9ac0.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";let d,l,c,p,u,f,h,m=e=>e;const v=a(r(n(i,"payment-card")));class _ extends v{constructor(){super(...arguments),this.templates={},this.__currencyDisplay="",this.__currency=""}render(){var e,t;const r=this.hiddenSelector,i=r.matches("card-info",!0),a=r.matches("fraud-risk",!0);return s(d||(d=m` <div aria-busy="${0}" aria-live="polite" class="relative text-body text-m font-lumo leading-m focus-outline-none"> <div class="${0}"> ${0} ${0} ${0} ${0} </div> <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"),o({"relative transition duration-250 ease-in-out":!0,"opacity-0 pointer-events-none":!this.data}),r.matches("title",!0)?"":this.__renderTitle(),r.matches("subtitle",!0)?"":this.__renderSubtitle(),i&&a?"":s(l||(l=m` <div class="my-s flex space-x-s overflow-auto"> ${0} ${0} </div> `),i?"":this.__renderCardInfo(),a?"":this.__renderFraudRisk()),r.matches("processor-response",!0)?"":this.__renderProcessorResponse(),o({"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!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){const e=await super._sendGet(),[t,s]=await Promise.all([super._fetch(e._links["fx:transaction"].href),super._fetch(e._links["fx:store"].href)]);return this.__currency=t.currency_code,this.__currencyDisplay=s.use_international_currency_symbol?"code":"symbol",e}__renderTitle(){const e=this.data?`gateways.${this.data.gateway_type}`:"",t=`${this.ns} gateways`;return s(c||(c=m` <div class="text-m flex text-secondary" data-testid="title"> ${0} <foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n>​ ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.lang,e,t,this.renderTemplateOrSlot("title:after"))}__renderSubtitle(){var e,t,r,i;const a=`${null!==(t=null===(e=this.data)||void 0===e?void 0:e.amount)&&void 0!==t?t:""} ${this.__currency}`,n=JSON.stringify({amount:a,currencyDisplay:this.__currencyDisplay}),o=null!==(i=null===(r=this.data)||void 0===r?void 0:r.date_created)&&void 0!==i?i:"",d=JSON.stringify({value:o}),l=this.lang,c=this.ns;return s(p||(p=m` <div class="flex font-semibold text-m" data-testid="subtitle"> ${0} <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"></foxy-i18n> <span> • </span> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"></foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),n,l,c,d,l,c,this.renderTemplateOrSlot("subtitle:after"))}__renderCardInfo(){var r,i,a,n;const o=this.data,d=(null!==(r=null==o?void 0:o.cc_type)&&void 0!==r?r:"unknown").toLowerCase(),l=null===(i=null==o?void 0:o.cc_exp_year)||void 0===i?void 0:i.substring(2),c=null==o?void 0:o.cc_exp_month,p=null===(a=null==o?void 0:o.cc_number_masked)||void 0===a?void 0:a.replace(/x/gi,"");if(c&&l&&p)return s(u||(u=m` <div class="flex" data-testid="card-info"> ${0} <div class="truncate flex items-center h-s rounded overflow-hidden bg-contrast-5"> <div class="h-s">${0}</div> <div class="text-m font-semibold px-s">•••• ${0} ${0}/${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("card-info:before"),null!==(n=e[d])&&void 0!==n?n:t,p,c,l,this.renderTemplateOrSlot("card-info:after"))}__renderFraudRisk(){var e,t;const r=null!==(t=null===(e=this.data)||void 0===e?void 0:e.fraud_protection_score)&&void 0!==t?t:0,i=r>0?"text-error":"text-success",a=r>0?"bg-error-10":"bg-success-10";return s(f||(f=m` <div class="flex" data-testid="fraud-risk"> ${0} <foxy-i18n options="${0}" class="truncate flex font-semibold h-s items-center px-s rounded text-m ${0} ${0}" lang="${0}" key="fraud_risk" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("fraud-risk:before"),JSON.stringify({score:r}),i,a,this.lang,this.ns,this.renderTemplateOrSlot("fraud-risk:after"))}__renderProcessorResponse(){var e;return s(h||(h=m` <div class="text-m text-tertiary" data-testid="processor-response"> ${0} ${0}​ ${0} </div> `),this.renderTemplateOrSlot("processor-response:before"),null===(e=this.data)||void 0===e?void 0:e.processor_response,this.renderTemplateOrSlot("processor-response:after"))}}customElements.define("foxy-payment-card",_);export{_ as PaymentCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-2f6e33b6.js";import"./shared-3ca1e8e4.js";import"./shared-b48e5aaf.js";import"./shared-cf784db1.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-888d690a.js";import{l as e,u as t}from"./shared-99065f2a.js";import{u as s,h as a,c as i}from"./shared-7f33a83a.js";import{B as r}from"./shared-76b3d76a.js";import{C as n}from"./shared-43bcce74.js";import"./foxy-nucleon-element.js";import{T as d,a as o}from"./shared-1e94e6dd.js";import{c as l}from"./shared-4e709717.js";import{N as c}from"./shared-181f51bd.js";import"./shared-68e0cf30.js";import"./shared-869df7ed.js";import"./shared-a8ced8bf.js";import"./shared-ae588315.js";import"./shared-a85afa33.js";import"./shared-4f037e43.js";import"./shared-d3bf9ac0.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";const m=s("\n repeating-radial-gradient(\n circle at -100% 500%,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.05) 4px\n )\n"),h=s(Object.entries({unknown:"#797c85",amex:"#2557d6",diners:"#0079be",discover:"#4d4d4d",jcb:"#0e4c96",maestro:"#181818",mastercard:"#16366f",unionpay:"#0dadb5",visa:"#0e4595"}).map((([e,t])=>`.bg-${e} { background: ${t} ${m} }`)).join(" "));let p,f,u,b,v,y,_,g=e=>e;const j=d(n(o(c,"payment-method-card")));class $ extends j{constructor(){super(...arguments),this.templates={},this.__renderActionsDelete=()=>a(p||(p=g` <div class="flex"> ${0} <vaadin-button class="px-xs rounded" theme="icon" style="--lumo-primary-text-color:#fff;--lumo-primary-color-50pct:rgba(255, 255, 255, 0.5);--lumo-contrast-5pct:rgba(255, 255, 255, 0.05)" aria-label="${0}" data-testid="actions:delete" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:delete"></iron-icon> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("actions:delete:before"),this.t("delete").toString(),this.disabledSelector.matches("actions:delete",!0),this.__handleDelete,this.renderTemplateOrSlot("actions:delete:after")),this.__renderActions=()=>a(f||(f=g` <div class="flex" data-testid="actions"> ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("actions:before"),this.hiddenSelector.matches("actions:delete",!0)?"":this.__renderActionsDelete(),this.renderTemplateOrSlot("actions:after"))}static get styles(){return[super.styles,h,i(u||(u=g`.ratio-card{padding-top:63%;position:relative;height:0}.ratio-card>*{position:absolute;top:0;right:0;bottom:0;left:0}`))]}render(){var s,i,n,d,o,c;const{data:m,lang:h,ns:p}=this;if(this.in({idle:"template"})||!(null==m?void 0:m.save_cc)||!this.in("idle")){const e=this.in("fail")?"error":this.in("busy")?"busy":"empty";return a(b||(b=g` <div class="ratio-card" aria-live="polite" aria-busy="${0}" data-testid="wrapper"> <div class="h-full bg-contrast-5"></div> <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),e,this.lang,p,null!==(i=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==i?i:"")}const f=null!==(d=null===(n=m.cc_type)||void 0===n?void 0:n.toLowerCase())&&void 0!==d?d:"unknown",u=null!==(o=e[f])&&void 0!==o?o:t,j=null===(c=m.cc_number_masked)||void 0===c?void 0:c.substring(m.cc_number_masked.length-4);return a(v||(v=g` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div class="ratio-card" data-testid="wrapper" aria-busy="${0}" aria-live="polite"> <div class="flex flex-col justify-between text-base text-m leading-m font-lumo p-m bg-unknown bg-${0}"> <div class="${0}"> ${0} <div class="ml-auto rounded h-m">${0}</div> </div> <div class="font-tnum leading-none flex justify-between"> <div data-testid="expiry"> ${0} </div> <div data-testid="number"> ${0} </div> </div> </div> </div> `),h,p,this.__handleConfirmHide,this.in("busy"),f,l({"flex items-start":!0,"justify-between":this.readonlyControls===r.False,"justify-end":this.readonlyControls===r.True}),this.hiddenSelector.matches("actions",!0)?"":this.__renderActions(),u,m.cc_exp_month&&m.cc_exp_year?a(y||(y=g` <span class="sr-only">${0} </span> <span>${0} / ${0}</span> `),this.t("expires").toString(),m.cc_exp_month,m.cc_exp_year):"",j?a(_||(_=g` <span class="sr-only">${0} </span> <span aria-hidden="true">••••</span> <span>${0}</span> `),this.t("last_4_digits").toString(),j):"")}async _sendDelete(){const e=JSON.stringify({save_cc:!1});await this._fetch(this.href,{method:"PATCH",body:e});return c.Rumour(this.group).share({data:null,source:this.href,related:[this.parent]}),null}__handleDelete(e){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}__handleConfirmHide(e){e.detail.cancelled||this.delete()}}customElements.define("foxy-payment-method-card",$);export{$ as PaymentMethodCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e}from"./shared-b7636a23.js";import"./shared-888d690a.js";import{_ as t}from"./shared-a8ced8bf.js";import{a as s}from"./shared-1e94e6dd.js";import{h as r}from"./shared-7f33a83a.js";import"./foxy-spinner.js";import"./shared-2f6e33b6.js";import"./shared-68e0cf30.js";import"./shared-3ca1e8e4.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-4e709717.js";let a,i,d=e=>e;const l=s(e,"payments-api-fraud-protection-card");class o extends l{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var e,t;const s=this.data,l=o.defaultImageSrc;return r(a||(a=d` <figure class="flex items-center gap-m h-m"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1"> <dl class="flex justify-between gap-s"> <dt class="sr-only">${0}</dt> <dd class="font-semibold truncate flex-shrink-0"> ${0}​ </dd> ${0} </dl> </figcaption> </figure> `),null!==(t=s?null===(e=this.getImageSrc)||void 0===e?void 0:e.call(this,s.type):null)&&void 0!==t?t:l,this.t("image_alt"),(e=>e.currentTarget.src=l),this.t("title_description"),null==s?void 0:s.helper.name,(null==s?void 0:s.helper.name)!==(null==s?void 0:s.description)?r(i||(i=d` <dt class="sr-only">${0}</dt> <dd class="truncate text-tertiary">${0}</dd> `),this.t("subtitle_description"),null==s?void 0:s.description):"")}}customElements.define("foxy-payments-api-fraud-protection-card",o);export{o as PaymentsApiFraudProtectionCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-5c6eb602.js";import"./shared-e94165e9.js";import"./shared-dbd4a5e8.js";import"./shared-bae9da44.js";import"./shared-776f948d.js";import"./shared-fafafc09.js";import"./shared-5ada1ccb.js";import{I as e}from"./shared-21689ac0.js";import"./shared-888d690a.js";import{_ as t,l as r}from"./shared-a8ced8bf.js";import{a as o}from"./shared-1e94e6dd.js";import{h as s}from"./shared-7f33a83a.js";import{Q as i}from"./shared-76b3d76a.js";import{s as a}from"./shared-bcc6e13b.js";import{h as l}from"./shared-09eb558f.js";import"./shared-869df7ed.js";import"./shared-68e0cf30.js";import"./shared-5b3ae513.js";import"./shared-e99fa3d6.js";import"./shared-2f6e33b6.js";import"./shared-23bf6ee6.js";import"./shared-df462496.js";import"./shared-39b184de.js";import"./shared-0d4f9b06.js";import"./shared-c379590f.js";import"./shared-0479553e.js";import"./shared-43bcce74.js";import"./shared-d3bf9ac0.js";import"./shared-4f037e43.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-2b2002ac.js";import"./shared-4e709717.js";import"./shared-88c7755d.js";import"./shared-a343ec6b.js";import"./shared-b48e5aaf.js";import"./shared-cf784db1.js";import"./shared-ae588315.js";import"./foxy-spinner.js";import"./shared-3ca1e8e4.js";import"./shared-839dd3a8.js";let d,n,c,p,h,f,m,u,v,b,j,g=e=>e;class x extends(o(e,"payments-api-fraud-protection-form")){constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",({score_threshold_reject:e})=>"number"!=typeof e||e<=100&&e>=0||"score-threshold-reject:v8n_out_of_range",e=>{var t,r,o,s;const i=null!==(o=null===(r=null===(t=e.helper)||void 0===t?void 0:t.json)||void 0===r?void 0:r.blocks)&&void 0!==o?o:[];let a;try{a=JSON.parse(null!==(s=e.json)&&void 0!==s?s:"{}")}catch(e){a={}}for(const e of i)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!l(a,r)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid"}return!0}]}renderBody(){var e,t,o,i,a,l,m,u,v,b;let j;try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}).exec(new URL(this.href||this.parent).pathname).groups.presetId;j=new URL(`/payment_presets/${e}/available_fraud_protections`,this.href||this.parent).toString()}catch(e){j=""}const y=null===(e=this.renderRoot.querySelector("#available-fraud-protections"))||void 0===e?void 0:e.data,_=x.defaultImageSrc;return s(d||(d=g` <foxy-nucleon class="hidden" href="${0}" id="available-fraud-protections" @update="${0}"> </foxy-nucleon> ${0} `),j,(()=>this.requestUpdate()),this.form.type?s(n||(n=g` <figure class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-bold text-xl text-center"> ${0}​ </figcaption> </figure> <div class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-1 gap-m"> ${0} ${0} </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} `),null!==(o=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,this.form.type))&&void 0!==o?o:_,(e=>e.currentTarget.src=_),null!==(a=null===(i=this.form.helper)||void 0===i?void 0:i.name)&&void 0!==a?a:this.form.type,(null===(l=this.form.helper)||void 0===l?void 0:l.uses_rejection_threshold)?s(c||(c=g` <foxy-internal-integer-control infer="score-threshold-reject"> </foxy-internal-integer-control> `)):"",null===(u=null===(m=this.form.helper)||void 0===m?void 0:m.json)||void 0===u?void 0:u.blocks.map((e=>this.__renderBlock(e))),(null===(v=this.data)||void 0===v?void 0:v.type)?"":s(p||(p=g` <vaadin-button theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody()):s(h||(h=g` <foxy-i18n class="block text-xxl font-bold border-b border-contrast-10 pb-m" infer="" key="select_protection_title"> </foxy-i18n> <div> <div class="-my-s grid grid-cols-1"> ${0} </div> </div> `),Object.entries(null!==(b=null==y?void 0:y.values)&&void 0!==b?b:{}).map((([e,t])=>{var r,o;return s(f||(f=g` <button class="block text-left hover-bg-contrast-5 p-s rounded-t-l rounded-b-l -mx-s" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="min-w-0 flex-1 truncate leading-s font-semibold"> ${0}​ </figcaption> </figure> </button> `),(()=>this.edit({type:e,helper:t})),null!==(o=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==o?o:_,(e=>e.currentTarget.src=_),t.name)}))))}__renderBlock(e){return s(m||(m=g`${0}`),e.fields.map((t=>{var r,o,l,d,n,c;const p=()=>{var r,o;let s;try{s=JSON.parse(null!==(r=this.form.json)&&void 0!==r?r:"")}catch(e){s={}}const a=[e.parent_id,e.id,t.id].filter((e=>!!e));return null!==(o=i(s,a))&&void 0!==o?o:s.default_value},h=r=>{var o;let s;try{s=JSON.parse(null!==(o=this.form.json)&&void 0!==o?o:"")}catch(e){s={}}const i=[e.parent_id,e.id,t.id].filter((e=>!!e));this.edit({json:JSON.stringify(a(s,i,r))})},f=t.options;return s(u||(u=g` ${0} `),"checkbox"===t.type?s(v||(v=g` <foxy-internal-checkbox-group-control helper-text="${0}" label="" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",[{label:t.name,value:"checked"}],p,(e=>h(e.includes("checked")))):"select"===t.type?s(b||(b=g` <foxy-internal-select-control helper-text="${0}" placeholder="${0}" label="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(o=t.description)&&void 0!==o?o:"",null!==(n=null===(d=null===(l=t.options)||void 0===l?void 0:l.find((e=>e.value===t.default_value)))||void 0===d?void 0:d.name)&&void 0!==n?n:this.t("default_additional_field_placeholder"),t.name,f.map((({name:e,value:t})=>({label:e,value:t}))),p,h):s(j||(j=g` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(c=t.description)&&void 0!==c?c:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,p,h))})))}}customElements.define("foxy-payments-api-fraud-protection-form",x);export{x as PaymentsApiFraudProtectionForm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e}from"./shared-b7636a23.js";import"./shared-888d690a.js";import{_ as t}from"./shared-a8ced8bf.js";import{a as s}from"./shared-1e94e6dd.js";import{h as r}from"./shared-7f33a83a.js";import"./foxy-spinner.js";import"./shared-2f6e33b6.js";import"./shared-68e0cf30.js";import"./shared-3ca1e8e4.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-4e709717.js";let a,i,l=e=>e;const d=s(e,"payments-api-payment-method-card");class o extends d{constructor(){super(...arguments),this.paymentGatewaysHelper=null,this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{paymentGatewaysHelper:{type:String,attribute:"payment-gateways-helper"},getImageSrc:{attribute:!1}})}renderBody(){var e,t;const s=o.defaultImageSrc,d=this.data;return r(a||(a=l` <figure class="flex items-center gap-m h-m"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1"> <dl class="flex justify-between gap-s"> <dt class="sr-only">${0}</dt> <dd class="font-semibold truncate flex-shrink-0"> ${0}​ </dd> ${0} </dl> </figcaption> </figure> `),null!==(t=d?null===(e=this.getImageSrc)||void 0===e?void 0:e.call(this,d.type):null)&&void 0!==t?t:s,this.t("image_alt"),(e=>e.currentTarget.src=s),this.t("title_description"),null==d?void 0:d.helper.name,(null==d?void 0:d.helper.name)!==(null==d?void 0:d.description)?r(i||(i=l` <dt class="sr-only">${0}</dt> <dd class="truncate text-tertiary">${0}</dd> `),this.t("subtitle_description"),null==d?void 0:d.description):"")}}customElements.define("foxy-payments-api-payment-method-card",o);export{o as PaymentsApiPaymentMethodCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-5c6eb602.js";import"./shared-e94165e9.js";import"./shared-dbd4a5e8.js";import"./shared-bae9da44.js";import"./shared-fafafc09.js";import"./shared-5ada1ccb.js";import{I as e}from"./shared-21689ac0.js";import"./shared-888d690a.js";import{_ as t,l as r}from"./shared-a8ced8bf.js";import{a as i}from"./shared-1e94e6dd.js";import{c as o}from"./shared-4e709717.js";import{h as l}from"./shared-7f33a83a.js";import{h as a}from"./shared-09eb558f.js";import{Q as s}from"./shared-76b3d76a.js";import{s as d}from"./shared-bcc6e13b.js";import"./shared-869df7ed.js";import"./shared-68e0cf30.js";import"./shared-5b3ae513.js";import"./shared-e99fa3d6.js";import"./shared-2f6e33b6.js";import"./shared-23bf6ee6.js";import"./shared-df462496.js";import"./shared-39b184de.js";import"./shared-0d4f9b06.js";import"./shared-c379590f.js";import"./shared-0479553e.js";import"./shared-43bcce74.js";import"./shared-d3bf9ac0.js";import"./shared-4f037e43.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-2b2002ac.js";import"./shared-b48e5aaf.js";import"./shared-cf784db1.js";import"./shared-ae588315.js";import"./foxy-spinner.js";import"./shared-3ca1e8e4.js";import"./shared-839dd3a8.js";let n,c,p,f,h,m,u,v,_,y,x,b,g,$,j,k,w,V,S,Z,L=e=>e;class B extends(i(e,"payments-api-payment-method-form")){constructor(){super(...arguments),this.getImageSrc=null,this.__tab=0}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{__tab:{attribute:!1},getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,i,o;const l=null!==(i=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==i?i:[];let s;try{s=JSON.parse(null!==(o=e.additional_fields)&&void 0!==o?o:"{}")}catch(e){s={}}for(const e of l)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!a(s,r)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid"}return!0}]}renderBody(){var e,t,i,a,s,d,k,w,V,S,Z,H,I,q;let C;try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}).exec(new URL(this.href||this.parent).pathname).groups.presetId;C=new URL(`/payment_presets/${e}/available_payment_methods`,this.href||this.parent).toString()}catch(e){C=""}const W=null===(e=this.renderRoot.querySelector("#available-payment-methods"))||void 0===e?void 0:e.data,E=B.defaultImageSrc,M=Object.entries(null!==(t=null==W?void 0:W.values)&&void 0!==t?t:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{const i=t.charAt(0).toUpperCase(),o=!/\w/.test(i)?"#":i,l=e.find((e=>e.name===o));return l?l.items.push({type:t,helper:r}):e.push({name:o,items:[{type:t,helper:r}]}),e}),[]);return l(n||(n=L` <foxy-nucleon class="hidden" href="${0}" id="available-payment-methods" @update="${0}"> </foxy-nucleon> ${0} `),C,(()=>this.requestUpdate()),this.form.type?l(c||(c=L` <figure class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-bold text-xl text-center"> ${0}​ </figcaption> </figure> <div class="rounded-t-l rounded-b-l border border-contrast-10"> <vaadin-tabs selected="${0}" theme="centered" @selected-changed="${0}"> <vaadin-tab><foxy-i18n infer="" key="tab_live"></foxy-i18n></vaadin-tab> <vaadin-tab><foxy-i18n infer="" key="tab_test"></foxy-i18n></vaadin-tab> </vaadin-tabs> <div class="overflow-hidden"> <div class="grid grid-cols-2 gap-m transition-transform transform duration-300" style="width:calc(200% + var(--lumo-space-m));--tw-translate-x:${0}"> <div class="grid grid-cols-1 gap-m p-m transition-opacity duration-300 ${0}"> ${0} ${0} ${0} ${0} </div> <div class="grid grid-cols-1 gap-m p-m transition-opacity duration-300 ${0}"> ${0} ${0} ${0} ${0} </div> </div> </div> </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} `),null!==(a=null===(i=this.getImageSrc)||void 0===i?void 0:i.call(this,this.form.type))&&void 0!==a?a:E,(e=>e.currentTarget.src=E),null!==(d=null===(s=this.form.helper)||void 0===s?void 0:s.name)&&void 0!==d?d:this.form.type,this.__tab,(e=>{var t;const r=e.currentTarget;this.__tab=null!==(t=r.selected)&&void 0!==t?t:0}),0===this.__tab?"0":"calc(-50% - (var(--lumo-space-m) / 2))",0===this.__tab?"opacity-100":"opacity-0",(null===(k=this.form.helper)||void 0===k?void 0:k.id_description)?l(p||(p=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description):"",(null===(w=this.form.helper)||void 0===w?void 0:w.third_party_key_description)?l(f||(f=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description):"",(null===(V=this.form.helper)||void 0===V?void 0:V.key_description)?l(h||(h=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description):"",this.__liveBlocks.map((e=>this.__renderBlock(e))),1===this.__tab?"opacity-100":"opacity-0",(null===(S=this.form.helper)||void 0===S?void 0:S.id_description)?l(m||(m=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="test-account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description):"",(null===(Z=this.form.helper)||void 0===Z?void 0:Z.third_party_key_description)?l(u||(u=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="test-third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description):"",(null===(H=this.form.helper)||void 0===H?void 0:H.key_description)?l(v||(v=L` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="test-account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description):"",this.__testBlocks.map((e=>this.__renderBlock(e))),(null===(I=this.form.helper)||void 0===I?void 0:I.supports_3d_secure)?l(_||(_=L` <foxy-internal-radio-group-control infer="three-d-secure-toggle" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> ${0} `),(()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"}),(e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})}),[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.form.config_3d_secure?l(y||(y=L` <foxy-internal-checkbox-group-control infer="three-d-secure-response" class="-mb-s" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),[{value:"valid_only",label:"option_valid_only"}],(()=>{var e;return(null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response"))?["valid_only"]:[]}),(e=>{const t=e.includes("valid_only")?"_require_valid_response":"",r=this.form.config_3d_secure,i=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${i}${t}`})})):""):"",(null===(q=this.data)||void 0===q?void 0:q.type)?"":l(x||(x=L` <vaadin-button theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody()):l(b||(b=L` <foxy-i18n class="block text-xxl font-bold border-b border-contrast-10 pb-m" infer="" key="select_method_title"> </foxy-i18n> <div> <div class="-my-s grid grid-cols-1"> ${0} </div> </div> `),M.map((e=>l(g||(g=L` <div class="w-m text-center font-semibold text-tertiary py-s"> ${0} </div> ${0} `),e.name,e.items.map((({type:e,helper:t})=>{var r,i;return l($||($=L` <button class="${0}" ?disabled="${0}" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="min-w-0 flex-1 truncate leading-s ${0}"> <div class="font-semibold">${0}​</div> ${0} </figcaption> </figure> </button> `),o({"block text-left p-s rounded-t-l rounded-b-l -mx-s":!0,"transition-colors hover-bg-contrast-5":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,(()=>this.edit({type:e,helper:t})),null!==(i=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==i?i:E,(e=>e.currentTarget.src=E),t.conflict?"text-tertiary":"",t.name,t.conflict?l(j||(j=L` <foxy-i18n class="block text-tertiary text-xs" infer="" key="conflict_message" .options="${0}"> </foxy-i18n> `),t.conflict):"")})))))))}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderBlock(e){return l(k||(k=L`${0}`),e.fields.map((t=>{var r,i,o;const a=[e.parent_id,e.id,t.id].filter((e=>!!e)),n=["additional-fields",...a].join("-").replace(/_/g,"-"),c=()=>{var e,r;try{const t=JSON.parse(null!==(e=this.form.additional_fields)&&void 0!==e?e:"{}");return null!==(r=s(t,a))&&void 0!==r?r:t.default_value}catch(e){return t.default_value}},p=e=>{var t;try{const r=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");this.edit({additional_fields:JSON.stringify(d(r,a,e))})}catch(e){return""}},f=t.options;return l(w||(w=L` ${0} `),"checkbox"===t.type?l(V||(V=L` <foxy-internal-checkbox-group-control helper-text="${0}" label="" class="-mb-s" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",n,[{label:t.name,value:"checked"}],c,(e=>{p(e.includes("checked"))})):"select"===t.type?l(S||(S=L` <foxy-internal-select-control helper-text="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(i=t.description)&&void 0!==i?i:"",t.name,n,f.map((({name:e,value:t})=>({label:e,value:t}))),c,p):l(Z||(Z=L` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(o=t.description)&&void 0!==o?o:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,n,c,p))})))}}customElements.define("foxy-payments-api-payment-method-form",B);export{B as PaymentsApiPaymentMethodForm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-888d690a.js";import{a as s}from"./shared-1e94e6dd.js";import{T as e}from"./shared-79d6a262.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-7f33a83a.js";import"./shared-2f6e33b6.js";import"./shared-68e0cf30.js";import"./shared-3ca1e8e4.js";import"./shared-a8ced8bf.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-43bcce74.js";import"./shared-d3bf9ac0.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";let t,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{render(){return super.render({title:s=>a(t||(t=i`${0}`),s.description),subtitle:({is_live:s})=>a(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-dbd4a5e8.js";import"./shared-11ffd643.js";import"./shared-5ada1ccb.js";import{I as e}from"./shared-21689ac0.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as t}from"./shared-a8ced8bf.js";import{a as r}from"./shared-1e94e6dd.js";import{h as a}from"./shared-7f33a83a.js";import"./shared-2b2002ac.js";import"./shared-869df7ed.js";import"./shared-68e0cf30.js";import"./shared-39b184de.js";import"./shared-5b3ae513.js";import"./shared-2f6e33b6.js";import"./shared-0d4f9b06.js";import"./shared-c379590f.js";import"./shared-0479553e.js";import"./shared-888d690a.js";import"./shared-76b3d76a.js";import"./shared-4f037e43.js";import"./shared-43bcce74.js";import"./shared-d3bf9ac0.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-b48e5aaf.js";import"./shared-3ca1e8e4.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-cf784db1.js";import"./shared-ae588315.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-b7636a23.js";import"./shared-5c6eb602.js";import"./shared-e99fa3d6.js";import"./shared-23bf6ee6.js";import"./shared-e94165e9.js";import"./shared-df462496.js";import"./shared-bae9da44.js";import"./shared-776f948d.js";import"./shared-88c7755d.js";import"./shared-a343ec6b.js";import"./shared-fafafc09.js";import"./shared-bcc6e13b.js";import"./shared-839dd3a8.js";import"./shared-09eb558f.js";let s,o,i,d,p,n,m=e=>e;const f=r(e,"payments-api-payment-preset-form");class c extends f{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.__getIsPOEnabledValue=()=>this.form.is_purchase_order_enabled?["true"]:[],this.__setIsPOEnabledValue=e=>{this.edit({is_purchase_order_enabled:e.includes("true")})},this.__getIsLiveValue=()=>this.form.is_live?["live"]:["test"],this.__setIsLiveValue=e=>{this.edit({is_live:e.includes("live")})}}static get properties(){return t(t({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}renderBody(){const e=this.constructor;return a(s||(s=m` <foxy-internal-text-control infer="description"></foxy-internal-text-control> <div class="-mb-s"> <foxy-internal-checkbox-group-control infer="is-live" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="is-purchase-order-enabled" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} ${0} `),this.__getIsLiveValue,this.__setIsLiveValue,e.__isLiveOptions,this.__getIsPOEnabledValue,this.__setIsPOEnabledValue,e.__isPOEnabledOptions,this.data?a(o||(o=m` <div class="grid grid-cols-1 gap-s"> <foxy-i18n class="text-s font-medium text-secondary" infer="payment-methods" key="title"> </foxy-i18n> <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> </div> <div class="grid grid-cols-1 gap-s"> <foxy-i18n class="text-s font-medium text-secondary" infer="fraud-protections" key="title"> </foxy-i18n> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> </div> `),this.data._links["fx:payment_methods"].href,(e=>a(i||(i=m` <foxy-payments-api-payment-method-card parent="${0}" infer="payments-api-payment-method-card" class="px-m py-s" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-payment-method-card> `),e.parent,e.href,this.getPaymentMethodImageSrc)),(e=>a(d||(d=m` <foxy-payments-api-payment-method-form parent="${0}" infer="payments-api-payment-method-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-payment-method-form> `),e.dialog.parent,e.dialog.href,this.getPaymentMethodImageSrc,e.handleFetch,e.handleUpdate)),this.data._links["fx:fraud_protections"].href,(e=>a(p||(p=m` <foxy-payments-api-fraud-protection-card parent="${0}" infer="payments-api-fraud-protection-card" class="px-m py-s" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-fraud-protection-card> `),e.parent,e.href,this.getFraudProtectionImageSrc)),(e=>a(n||(n=m` <foxy-payments-api-fraud-protection-form parent="${0}" infer="payments-api-fraud-protection-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-fraud-protection-form> `),e.dialog.parent,e.dialog.href,this.getFraudProtectionImageSrc,e.handleFetch,e.handleUpdate))):"",super.renderBody())}}c.__isPOEnabledOptions=[{label:"option_true",value:"true"}],c.__isLiveOptions=[{label:"option_live",value:"live"}],customElements.define("foxy-payments-api-payment-preset-form",c);export{c as PaymentsApiPaymentPresetForm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as e,h as t}from"./shared-7f33a83a.js";import{F as a}from"./shared-76b3d76a.js";import{l as s,_ as n,k as r}from"./shared-a8ced8bf.js";import{A as o}from"./shared-a85afa33.js";async function i(e){const t=await e;if(!t.ok)throw new Error(await t.text());return t.json()}async function l(e){var t;let a,n;try{const{hostedPaymentGatewaysHelperUrl:r,paymentGatewaysHelperUrl:o,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if("GET"!==d.method)throw a=405,new Error("Method not allowed. Allowed methods: GET.");const p=s(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}).exec(new URL(d.url).pathname).groups.presetId,h=i(m(r)),y=i(m(o)),f=null===(t=(await i(m(l(p))))._links["fx:payment_gateway"])||void 0===t?void 0:t.href,c=f?await i(m(f)):void 0,u=function(e){const{hostedPaymentGatewaysHelper:t,paymentGatewaysHelper:a,paymentPresetId:s,paymentGateway:n,base:r}=e,o=new URL(`./payment_presets/${s}/available_payment_methods`,r),i={};return Object.entries(t.values).forEach((([e,t])=>{i[e]=t})),Object.entries(a.values).forEach((([e,t])=>{i[e]=t,n&&(i[e].conflict={type:n.type,name:n.description})})),{_links:{self:{href:o.toString()}},values:i}}({hostedPaymentGatewaysHelper:await h,paymentGatewaysHelper:await y,paymentPresetId:p,paymentGateway:c,base:new URL(d.url).origin});n=JSON.stringify(u),a=200}catch(e){n=e instanceof Error?e.message:String(e),a=null!=a?a:500}return new Response(n,{status:a})}function d(e){const{paymentPresetId:t,base:a}=e;return{_links:{self:{href:new URL(`./payment_presets/${t}/available_fraud_protections`,a).toString()}},values:{minfraud:{name:"MaxMind minFraud",uses_rejection_threshold:!0,json:null},google_recaptcha:{name:"Google reCAPTCHA",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"config",name:"Configuration",type:"select",description:"Determines how reCAPTCHA is configured to operate.",default_value:"disabled",options:[{name:"Disabled",value:"disabled"},{name:"Always enabled",value:"enabled_always"},{name:"Enabled by errors",value:"enabled_by_errors"}]},{id:"private_key",name:"Private Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Private Key here.",default_value:""},{id:"site_key",name:"Site Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Site Key here.",default_value:""}]}]}},custom_precheckout_hook:{name:"Pre-Checkout Webhook",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"enabled",name:"Enabled",type:"checkbox",default_value:!1},{id:"url",name:"URL",type:"text",description:"Url of your Pre-Checkout Hook",default_value:""},{id:"failure_handling",name:"Failure handling",type:"select",description:"Determines what happens to the checkout if your webhook fails.",default_value:"",options:[{name:"Reject",value:"reject"},{name:"Approve",value:"approve"}]}]}]}}}}}async function m(e){let t,a;try{const{request:n}=e;if("GET"!==n.method)throw t=405,new Error("Method not allowed. Allowed methods: GET.");const r=d({paymentPresetId:s(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}).exec(new URL(n.url).pathname).groups.presetId,base:new URL(n.url).origin});a=JSON.stringify(r),t=200}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}const p=["_links"];function h(e){const{paymentMethodSetFraudProtectionId:t,paymentPresetId:a,fraudProtection:s,base:o}=e,{_links:i}=s,l=r(s,p),m=d({paymentPresetId:a,base:o}),h=`${new URL(i.self.href).pathname.split("/").pop()}C${t}`,y=new URL(`./payment_presets/${a}`,o),f=new URL(`./payment_presets/${a}/fraud_protections/${h}`,o);return n(n({_links:{self:{href:f.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:y.toString()}}},l),{},{helper:m.values[s.type]})}async function y(e){var t,a;let n,r;try{const{fraudProtectionsUrl:o,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if(!["GET","POST"].includes(d.method))throw n=405,new Error("Method not allowed. Allowed methods: GET, POST.");const p=new URL(d.url),y=s(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}).exec(p.pathname).groups.presetId,f=await i(m(l(y)));if("GET"===d.method){const e=parseInt(null!==(t=p.searchParams.get("offset"))&&void 0!==t?t:"0"),s=parseInt(null!==(a=p.searchParams.get("limit"))&&void 0!==a?a:"20"),o=new URL(f._links["fx:payment_method_set_fraud_protections"].href);o.searchParams.set("offset",String(Math.max(0,e-1))),o.searchParams.set("limit",String(s));const l=await i(m(o.toString())),c=await Promise.all(l._embedded["fx:payment_method_set_fraud_protections"].map((async e=>i(m(e._links["fx:fraud_protection"].href))))),u=function(e){const{paymentMethodSetFraudProtections:t,fraudProtections:a,paymentPresetId:s,base:n}=e,r=new URL(`/payment_presets/${s}/fraud_protections`,n);r.search=new URL(t._links.self.href).search;const o=new URL(r.toString());o.search=new URL(t._links.first.href).search;const i=new URL(r.toString());i.search=new URL(t._links.last.href).search;const l=new URL(r.toString());l.search=new URL(t._links.prev.href).search;const d=new URL(r.toString());d.search=new URL(t._links.next.href).search;const m=a.map((e=>{const a=t._embedded["fx:payment_method_set_fraud_protections"].find((t=>t.fraud_protection_uri===e._links.self.href));return h({paymentMethodSetFraudProtectionId:new URL(a._links.self.href).pathname.split("/").pop(),fraudProtection:e,paymentPresetId:s,base:n})}));return{_links:{first:{href:o.toString()},last:{href:i.toString()},prev:{href:l.toString()},next:{href:d.toString()},self:{href:r.toString()}},_embedded:{"fx:fraud_protections":m},returned_items:t.returned_items,total_items:t.total_items,offset:t.offset,limit:t.limit}}({paymentMethodSetFraudProtections:l,fraudProtections:c,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(u)}else{const e=await d.json();delete e.helper;const t=m(o,{method:"POST",body:JSON.stringify(e)}),a=await i(t),s=await i(m(f._links["fx:payment_method_set_fraud_protections"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:f._links.self.href,fraud_protection_uri:a._links.self.href})})),l=h({paymentMethodSetFraudProtectionId:new URL(s._links.self.href).pathname.split("/").pop(),fraudProtection:a,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(l)}}catch(e){r=e instanceof Error?e.message:String(e),n=null!=n?n:500}return new Response(r,{status:n})}async function f(e){let t,a;try{const{getPaymentMethodSetUrl:n,getFraudProtectionUrl:r,request:o,fetch:l}=e;if(!["GET","PATCH","DELETE"].includes(o.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const d=s(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),{presetId:m,protectionId:p}=d.exec(o.url).groups,y=n(m),f=p.substring(0,p.indexOf("C"));if("DELETE"===o.method){const e=(await i(l(y)))._links["fx:payment_method_set_fraud_protections"].href,t=new URL(e);t.searchParams.set("fraud_protection_id",f);const a=await i(l(t.toString())),s=a._embedded["fx:payment_method_set_fraud_protections"].map((e=>i(l(e._links.self.href,{method:"DELETE"}))));await Promise.all(s)}let c=await o.text();try{const e=JSON.parse(c);delete e.helper,c=JSON.stringify(e)}catch(e){}const u=l(r(f),{method:o.method,body:"PATCH"===o.method?c:null}),_=await i(u);a="DELETE"===o.method?JSON.stringify({message:"Fraud protection was successfully deleted."}):JSON.stringify(h({paymentMethodSetFraudProtectionId:p.substring(p.indexOf("C")+1),fraudProtection:_,paymentPresetId:m,base:new URL(o.url).origin}))}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}const c=["_links"];function u(e){const{paymentPresetId:t,helper:a,base:s}=e,o="paymentGateway"in e?e.paymentGateway:e.hostedPaymentGateway,{_links:i}=o,l=r(o,c),d=new URL(i.self.href).pathname.split("/").pop();let m;m="paymentMethodSetHostedPaymentGatewayId"in e?`H${d}C${e.paymentMethodSetHostedPaymentGatewayId}`:`R${d}`;const p=new URL(`./payment_presets/${t}`,s),h=new URL(`./payment_presets/${t}/payment_methods/${m}`,s);return n(n({_links:{self:{href:h.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:p.toString()}}},l),{},{helper:a})}async function _(e){var t,a,n,r;let o,l;try{const{hostedPaymentGatewaysHelperUrl:d,paymentGatewaysHelperUrl:m,hostedPaymentGatewaysUrl:p,getPaymentMethodSetUrl:h,paymentGatewaysUrl:y,request:f,fetch:c}=e;if(!["GET","POST"].includes(f.method))throw o=405,new Error("Method not allowed. Allowed methods: GET, POST.");const _=new URL(f.url),w=s(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}).exec(_.pathname).groups.presetId,[g,P,S]=await Promise.all([i(c(d)),i(c(m)),i(c(h(w)))]);if("GET"===f.method){const e=parseInt(null!==(t=_.searchParams.get("offset"))&&void 0!==t?t:"0"),s=parseInt(null!==(a=_.searchParams.get("limit"))&&void 0!==a?a:"20"),r=new URL(S._links["fx:payment_method_set_hosted_payment_gateways"].href);r.searchParams.set("offset",String(Math.max(0,e-1))),r.searchParams.set("limit",String(s));const d=null===(n=S._links["fx:payment_gateway"])||void 0===n?void 0:n.href,[m,p]=await Promise.all([d&&0===e?i(c(d)):null,i(c(r.toString()))]),h=await Promise.all(p._embedded["fx:payment_method_set_hosted_payment_gateways"].map((async e=>i(c(e._links["fx:hosted_payment_gateway"].href))))),y=function(e){var t,a;const{paymentMethodSetHostedPaymentGateways:s,hostedPaymentGatewaysHelper:n,hostedPaymentGateways:r,paymentGatewaysHelper:o,paymentPresetId:i,paymentGateway:l,query:d,base:m}=e,p=new URLSearchParams(d),h=parseInt(null!==(t=p.get("offset"))&&void 0!==t?t:"0"),y=parseInt(null!==(a=p.get("limit"))&&void 0!==a?a:"20"),f=s.total_items+(l?1:0),c=s.returned_items+(l&&"not-on-page"!==l?1:0),_=new URL(`/payment_presets/${i}/payment_methods`,m);_.search=d;const w=new URL(_.toString()),g=new URL(_.toString()),P=new URL(_.toString()),S=new URL(_.toString());w.searchParams.set("limit",String(y)),w.searchParams.set("offset",String(h)),g.searchParams.set("limit",String(y)),g.searchParams.set("offset",String(Math.max(0,f-y))),P.searchParams.set("limit",String(y)),P.searchParams.set("offset",String(Math.max(0,h-y))),S.searchParams.set("limit",String(y)),S.searchParams.set("offset",String(Math.min(h+y,Math.max(0,f-y))));const U=[...l&&"not-on-page"!==l?[l]:[],...r].map((e=>{const t=s._embedded["fx:payment_method_set_hosted_payment_gateways"].find((t=>t.hosted_payment_gateway_uri===e._links.self.href));return u(t?{paymentMethodSetHostedPaymentGatewayId:new URL(t._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:e,paymentPresetId:i,helper:n.values[e.type],base:m}:{paymentPresetId:i,paymentGateway:e,helper:o.values[e.type],base:m})}));return{_links:{first:{href:w.toString()},last:{href:g.toString()},prev:{href:P.toString()},next:{href:S.toString()},self:{href:_.toString()}},_embedded:{"fx:payment_methods":U},returned_items:c,total_items:f,offset:h,limit:y}}({paymentMethodSetHostedPaymentGateways:p,hostedPaymentGatewaysHelper:g,paymentGatewaysHelper:P,hostedPaymentGateways:h,paymentPresetId:w,paymentGateway:m||(d?"not-on-page":void 0),query:new URL(f.url).search,base:new URL(f.url).origin});o=200,l=JSON.stringify(y)}else{const e=await f.clone().json(),t=!!g.values[null!==(r=e.type)&&void 0!==r?r:""];if(delete e.helper,t){const t=await i(c(p,{method:"POST",body:JSON.stringify(e)})),a=await i(c(S._links["fx:payment_method_set_hosted_payment_gateways"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:S._links.self.href,hosted_payment_gateway_uri:t._links.self.href})})),s=u({paymentMethodSetHostedPaymentGatewayId:new URL(a._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:t,paymentPresetId:w,helper:g.values[t.type],base:new URL(f.url).origin});o=200,l=JSON.stringify(s)}else{const t=c(y,{method:f.method,body:JSON.stringify(e)}),a=await i(t),s={gateway_uri:a._links.self.href};await Promise.all([i(c(S._links.self.href,{method:"PATCH",body:JSON.stringify(s)})),S.gateway_uri?i(c(S.gateway_uri,{method:"DELETE"})):null]);const n=u({paymentPresetId:w,paymentGateway:a,helper:P.values[a.type],base:new URL(f.url).origin});o=200,l=JSON.stringify(n)}}}catch(e){l=e instanceof Error?e.message:String(e),o=null!=o?o:500}return new Response(l,{status:o})}const w=["_links"];function g(e){const{paymentMethodSet:t,base:a}=e,{_links:s}=t,o=r(t,w),i=new URL(t._links.self.href).pathname.split("/").pop(),l=new URL(`./payment_presets/${i}`,a),d=new URL(`./payment_presets/${i}/payment_methods`,a),m=new URL(`./payment_presets/${i}/fraud_protections`,a),p=new URL(`./payment_presets/${i}/available_payment_methods`,a),h=new URL(`./payment_presets/${i}/available_fraud_protections`,a);return n({_links:{self:{href:l.toString()},"fx:store":s["fx:store"],"fx:payment_methods":{href:d.toString()},"fx:fraud_protections":{href:m.toString()},"fx:available_payment_methods":{href:p.toString()},"fx:available_fraud_protections":{href:h.toString()}}},o)}const P=["_embedded","_links"];async function S(e){let t,a;try{const{paymentMethodSetsUrl:s,request:o,fetch:l}=e;if(!["GET","POST"].includes(o.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, POST.");const d=new URL(o.url),m=new URL(s);let p;if(m.search=d.search,"POST"===o.method){const e=l(m.toString(),{method:"POST",body:await o.text()});p=g({paymentMethodSet:await i(e),base:d.origin})}else p=function(e){const{paymentMethodSets:t,base:a}=e,{_embedded:s,_links:o}=t,i=r(t,P),l=new URL("./payment_presets",a),d=new URL(o.first.href);l.search=d.search;const m=new URL("./payment_presets",a),p=new URL(o.last.href);m.search=p.search;const h=new URL("./payment_presets",a),y=new URL(o.prev.href);h.search=y.search;const f=new URL("./payment_presets",a),c=new URL(o.next.href);f.search=c.search;const u=new URL("./payment_presets",a),_=new URL(o.self.href);return u.search=_.search,n(n({},i),{},{_links:{first:{href:l.toString()},last:{href:m.toString()},prev:{href:h.toString()},next:{href:f.toString()},self:{href:u.toString()}},_embedded:{"fx:payment_presets":s["fx:payment_method_sets"].map((e=>g({paymentMethodSet:e,base:a})))}})}({paymentMethodSets:await i(l(m.toString())),base:d.origin});a=JSON.stringify(p),t=200}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}async function U(e){let t,a;try{const{getPaymentMethodSetUrl:n,request:r,fetch:o}=e;if(!["GET","PATCH","DELETE"].includes(r.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const l=s(/payment_presets\/(.+)/,{presetId:1}).exec(r.url).groups.presetId,d=new URL(r.url),m=new URL(n(l));m.search=d.search;const p=await i(o(m.toString(),{method:r.method,body:"PATCH"===r.method?await r.text():null}));a="DELETE"===r.method?JSON.stringify({message:"Payment preset was successfully deleted."}):JSON.stringify(g({paymentMethodSet:p,base:new URL(r.url).origin}))}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}async function b(e){let t,a;try{const{hostedPaymentGatewaysHelperUrl:n,paymentGatewaysHelperUrl:r,getPaymentMethodSetHostedPaymentGatewayUrl:o,getHostedPaymentGatewayUrl:l,getPaymentMethodSetUrl:d,getPaymentGatewayUrl:m,request:p,fetch:h}=e;if(!["GET","PATCH","DELETE"].includes(p.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const y=s(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),{presetId:f,methodId:c}=y.exec(p.url).groups,_=c.startsWith("H"),w=d(f),g=c.substring(1,_?c.indexOf("C"):void 0),P=i(h(n)),S=i(h(r));if("DELETE"===p.method)if(_){const e=o(c.substring(c.indexOf("C")+1));await i(h(e,{method:"DELETE"}))}else{const e={gateway_uri:""},t=JSON.stringify(e);await i(h(w,{method:"PATCH",body:t}))}let U=await p.text();try{const e=JSON.parse(U);delete e.helper,U=JSON.stringify(e)}catch(e){}if(_){const e=h(l(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await P,s=await i(e);a="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(u({paymentMethodSetHostedPaymentGatewayId:c.substring(c.indexOf("C")+1),hostedPaymentGateway:s,paymentPresetId:f,helper:t.values[s.type],base:new URL(p.url).origin}))}else{const e=h(m(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await S,s=await i(e);a="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(u({paymentGateway:s,paymentPresetId:f,helper:t.values[s.type],base:new URL(p.url).origin}))}}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}let L,E=e=>e;class G extends e{constructor(){super(...arguments),this.paymentMethodSetHostedPaymentGatewaysUrl=null,this.hostedPaymentGatewaysHelperUrl=null,this.hostedPaymentGatewaysUrl=null,this.paymentGatewaysHelperUrl=null,this.paymentMethodSetsUrl=null,this.fraudProtectionsUrl=null,this.paymentGatewaysUrl=null,this.__api=new o(this),this.__fetch=this.__api.fetch.bind(this.__api),this.__handleFetch=e=>{if(!(e instanceof a))return;if(!e.request.url.startsWith("https://foxy-payments-api.element/"))return;if(e.defaultPrevented)return;const{paymentMethodSetHostedPaymentGatewaysUrl:t,hostedPaymentGatewaysHelperUrl:n,paymentGatewaysHelperUrl:r,hostedPaymentGatewaysUrl:o,paymentMethodSetsUrl:i,fraudProtectionsUrl:d,paymentGatewaysUrl:p}=this;if(null===t)return;if(null===n)return;if(null===r)return;if(null===o)return;if(null===i)return;if(null===d)return;if(null===p)return;const h=e=>t=>{const a=new URL(e);return a.pathname.endsWith("/")||(a.pathname+="/"),a.pathname+=t,a.toString()},c=function(e){const t=[[s(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),b],[s(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}),m],[s(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}),l],[s(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),f],[s(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}),y],[s(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}),_],[s(/\/payment_presets\/(.+)/,{presetId:1}),U],[/\/payment_presets/,S]];for(const[a,s]of t)if(a.test(new URL(e.request.url).pathname))return s(e);return null}({hostedPaymentGatewaysHelperUrl:n,paymentGatewaysHelperUrl:r,hostedPaymentGatewaysUrl:o,paymentMethodSetsUrl:i,fraudProtectionsUrl:d,paymentGatewaysUrl:p,getPaymentMethodSetHostedPaymentGatewayUrl:h(t),getHostedPaymentGatewayUrl:h(o),getPaymentMethodSetUrl:h(i),getFraudProtectionUrl:h(d),getPaymentGatewayUrl:h(p),request:e.request,fetch:this.__fetch});c&&(e.preventDefault(),e.respondWith(c))}}static get properties(){return{paymentMethodSetHostedPaymentGatewaysUrl:{attribute:"payment-method-set-hosted-payment-gateways-url"},hostedPaymentGatewaysHelperUrl:{attribute:"hosted-payment-gateways-helper-url"},hostedPaymentGatewaysUrl:{attribute:"hosted-payment-gateways-url"},paymentGatewaysHelperUrl:{attribute:"payment-gateways-helper-url"},paymentMethodSetsUrl:{attribute:"payment-method-sets-url"},fraudProtectionsUrl:{attribute:"fraud-protections-url"},paymentGatewaysUrl:{attribute:"payment-gateways-url"}}}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return t(L||(L=E`<slot></slot>`))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}}customElements.define("foxy-payments-api",G);export{G as PaymentsApi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3ca1e8e4.js";import"./shared-2f6e33b6.js";export{Q as QueryBuilder}from"./shared-9d7bbdd8.js";import"./shared-68e0cf30.js";import"./shared-1e94e6dd.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-e6f3e9f0.js";import"./shared-4e709717.js";import"./shared-d3bf9ac0.js";import"./shared-bc7f58ef.js";import"./shared-d519a301.js";import"./shared-4f037e43.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e}from"./shared-17c1eab2.js";import{D as t,a as i}from"./shared-ea6c8bae.js";import{C as a,b as s,a as n}from"./shared-df462496.js";import{h as r,B as d,P as l}from"./shared-68e0cf30.js";import{T as o,E as h,C as m}from"./shared-869df7ed.js";import{T as _}from"./shared-39b184de.js";import"./shared-5b3ae513.js";import"./shared-2b2002ac.js";import"./shared-b48e5aaf.js";import"./shared-d384d6a3.js";import"./shared-cf784db1.js";import"./shared-0479553e.js";import"./foxy-spinner.js";import"./shared-888d690a.js";import{_ as u}from"./shared-a8ced8bf.js";import"./shared-2f6e33b6.js";import"./shared-a90a5235.js";import{h as c,f as p}from"./shared-7f33a83a.js";import{S as g,R as v,T as f,a as b}from"./shared-1e94e6dd.js";import{c as y}from"./shared-4e709717.js";import{C as k,a as T}from"./shared-7d658c02.js";import"./shared-ae588315.js";import"./shared-88c7755d.js";import"./shared-a343ec6b.js";import{G as x}from"./shared-d4a652b7.js";import{P as $}from"./shared-413415b0.js";import{C as D}from"./shared-43bcce74.js";import{N as E}from"./shared-181f51bd.js";import{i as w}from"./shared-d3bf9ac0.js";import{l as S}from"./shared-f3b35364.js";import"./shared-23bf6ee6.js";import"./shared-e99fa3d6.js";import"./shared-3ca1e8e4.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-1db07286.js";import"./shared-11c2efc8.js";import"./shared-2f7dcefa.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
5
5
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/class P extends(
|
|
6
|
+
*/class P extends(o(a(s(l)))){static get template(){return r`
|
|
7
7
|
<style>
|
|
8
8
|
:host([opened]) {
|
|
9
9
|
pointer-events: auto;
|
|
@@ -14,7 +14,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
14
14
|
|
|
15
15
|
<vaadin-combo-box-dropdown-wrapper id="overlay" opened="[[opened]]" position-target="[[inputElement]]" renderer="[[renderer]]" _focused-index="[[_focusedIndex]]" _item-id-path="[[itemIdPath]]" _item-label-path="[[itemLabelPath]]" loading="[[loading]]" theme="[[theme]]">
|
|
16
16
|
</vaadin-combo-box-dropdown-wrapper>
|
|
17
|
-
`}static get is(){return"vaadin-combo-box-light"}static get properties(){return{attrForValue:{type:String,value:"value"},inputElement:{type:Element,readOnly:!0}}}constructor(){super(),this._boundInputValueChanged=this._inputValueChanged.bind(this),this.__boundInputValueCommitted=this.__inputValueCommitted.bind(this)}ready(){super.ready(),this._toggleElement=this.querySelector(".toggle-button"),this._clearElement=this.querySelector(".clear-button"),this._clearElement&&this._clearElement.addEventListener("mousedown",(e=>{e.preventDefault(),(this.inputElement._focusableElement||this.inputElement).focus()}))}get focused(){return this.getRootNode().activeElement===this.inputElement}connectedCallback(){super.connectedCallback();this._setInputElement(this.querySelector("vaadin-text-field,iron-input,paper-input,.paper-input-input,.input")),this._revertInputValue(),this.inputElement.addEventListener("input",this._boundInputValueChanged),this.inputElement.addEventListener("change",this.__boundInputValueCommitted),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this.inputElement.removeEventListener("input",this._boundInputValueChanged),this.inputElement.removeEventListener("change",this.__boundInputValueCommitted),this._restoreInputBlur()}__inputValueCommitted(e){e.__fromClearButton&&this._clear()}get _propertyForValue(){return
|
|
17
|
+
`}static get is(){return"vaadin-combo-box-light"}static get properties(){return{attrForValue:{type:String,value:"value"},inputElement:{type:Element,readOnly:!0}}}constructor(){super(),this._boundInputValueChanged=this._inputValueChanged.bind(this),this.__boundInputValueCommitted=this.__inputValueCommitted.bind(this)}ready(){super.ready(),this._toggleElement=this.querySelector(".toggle-button"),this._clearElement=this.querySelector(".clear-button"),this._clearElement&&this._clearElement.addEventListener("mousedown",(e=>{e.preventDefault(),(this.inputElement._focusableElement||this.inputElement).focus()}))}get focused(){return this.getRootNode().activeElement===this.inputElement}connectedCallback(){super.connectedCallback();this._setInputElement(this.querySelector("vaadin-text-field,iron-input,paper-input,.paper-input-input,.input")),this._revertInputValue(),this.inputElement.addEventListener("input",this._boundInputValueChanged),this.inputElement.addEventListener("change",this.__boundInputValueCommitted),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this.inputElement.removeEventListener("input",this._boundInputValueChanged),this.inputElement.removeEventListener("change",this.__boundInputValueCommitted),this._restoreInputBlur()}__inputValueCommitted(e){e.__fromClearButton&&this._clear()}get _propertyForValue(){return d(this.attrForValue)}get _inputElementValue(){return this.inputElement&&this.inputElement[this._propertyForValue]}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._propertyForValue]=e)}}customElements.define(P.is,P);const C=r`<dom-module id="lumo-time-picker" theme-for="vaadin-time-picker">
|
|
18
18
|
<template>
|
|
19
19
|
<style include="lumo-field-button">
|
|
20
20
|
[part~="toggle-button"]::before {
|
|
@@ -22,7 +22,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
22
22
|
}
|
|
23
23
|
</style>
|
|
24
24
|
</template>
|
|
25
|
-
</dom-module>`;document.head.appendChild(C.content);const I=
|
|
25
|
+
</dom-module>`;document.head.appendChild(C.content);const I=r`<dom-module id="lumo-time-picker-text-field" theme-for="vaadin-time-picker-text-field">
|
|
26
26
|
<template>
|
|
27
27
|
<style>
|
|
28
28
|
:not(*):placeholder-shown, /* to prevent broken styles on IE */
|
|
@@ -43,13 +43,13 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
43
43
|
Copyright (c) 2018 Vaadin Ltd.
|
|
44
44
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
45
45
|
*/
|
|
46
|
-
const M=document.createElement("template");M.innerHTML='<dom-module id="vaadin-time-picker-text-field-styles" theme-for="vaadin-time-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(M.content);class V extends
|
|
46
|
+
const M=document.createElement("template");M.innerHTML='<dom-module id="vaadin-time-picker-text-field-styles" theme-for="vaadin-time-picker-text-field">\n <template>\n <style>\n :host([dir="rtl"]) [part="input-field"] {\n direction: ltr;\n }\n\n :host([dir="rtl"]) [part="value"]::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n\n :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,\n :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {\n direction: rtl;\n text-align: left;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(M.content);class V extends _{static get is(){return"vaadin-time-picker-text-field"}}customElements.define(V.is,V);
|
|
47
47
|
/**
|
|
48
48
|
@license
|
|
49
49
|
Copyright (c) 2018 Vaadin Ltd.
|
|
50
50
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
51
|
*/
|
|
52
|
-
class O extends(
|
|
52
|
+
class O extends(h(m(o(l)))){static get template(){return r`
|
|
53
53
|
<style>
|
|
54
54
|
:host {
|
|
55
55
|
display: inline-block;
|
|
@@ -77,7 +77,7 @@ class O extends(_(u(m(h)))){static get template(){return l`
|
|
|
77
77
|
<span slot="suffix" part="toggle-button" class="toggle-button" role="button" aria-label\$="[[i18n.selector]]"></span>
|
|
78
78
|
</vaadin-time-picker-text-field>
|
|
79
79
|
</vaadin-combo-box-light>
|
|
80
|
-
`}static get is(){return"vaadin-time-picker"}static get version(){return"2.4.0"}static get properties(){return{name:{type:String},value:{type:String,observer:"__valueChanged",notify:!0,value:""},label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},helperText:{type:String,value:""},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},min:{type:String,value:"00:00:00.000"},max:{type:String,value:"23:59:59.999"},step:{type:Number},clearButtonVisible:{type:Boolean,value:!1},autoOpenDisabled:Boolean,__dropdownItems:{type:Array},i18n:{type:Object,value:()=>({formatTime:e=>{if(!e)return;const t=(e=0,t="00")=>(t+e).substr((t+e).length-t.length);let i=`${t(e.hours)}:${t(e.minutes)}`;return void 0!==e.seconds&&(i+=`:${t(e.seconds)}`),void 0!==e.milliseconds&&(i+=`.${t(e.milliseconds,"000")}`),i},parseTime:e=>{const t=new RegExp("^(\\d|[0-1]\\d|2[0-3])(?::(\\d|[0-5]\\d)(?::(\\d|[0-5]\\d)(?:\\.(\\d{1,3}))?)?)?$").exec(e);if(t){if(t[4])for(;t[4].length<3;)t[4]+="0";return{hours:t[1],minutes:t[2],seconds:t[3],milliseconds:t[4]}}},selector:"Time selector",clear:"Clear"})}}}static get observers(){return["__updateDropdownItems(i18n.*, min, max, step)"]}ready(){super.ready(),this.__inputElement.validate=()=>{},this.__dropdownElement.addEventListener("value-changed",(e=>this.__onInputChange(e))),this.__inputElement.addEventListener("keydown",this.__onKeyDown.bind(this)),this.__dropdownElement.addEventListener("change",(e=>this.validate())),this.__inputElement.addEventListener("blur",(e=>this.validate())),this.__dropdownElement.addEventListener("change",(e=>{e.composedPath()[0]!==this.__inputElement&&this.__dispatchChange()}))}__validDayDivisor(e){return!e||86400%e==0||e<1&&e%1*1e3%1==0}__onKeyDown(e){if(this.readonly||this.disabled||this.__dropdownItems.length)return;const t=this.__validDayDivisor(this.step)&&this.step||60;
|
|
80
|
+
`}static get is(){return"vaadin-time-picker"}static get version(){return"2.4.0"}static get properties(){return{name:{type:String},value:{type:String,observer:"__valueChanged",notify:!0,value:""},label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},helperText:{type:String,value:""},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},min:{type:String,value:"00:00:00.000"},max:{type:String,value:"23:59:59.999"},step:{type:Number},clearButtonVisible:{type:Boolean,value:!1},autoOpenDisabled:Boolean,__dropdownItems:{type:Array},i18n:{type:Object,value:()=>({formatTime:e=>{if(!e)return;const t=(e=0,t="00")=>(t+e).substr((t+e).length-t.length);let i=`${t(e.hours)}:${t(e.minutes)}`;return void 0!==e.seconds&&(i+=`:${t(e.seconds)}`),void 0!==e.milliseconds&&(i+=`.${t(e.milliseconds,"000")}`),i},parseTime:e=>{const t=new RegExp("^(\\d|[0-1]\\d|2[0-3])(?::(\\d|[0-5]\\d)(?::(\\d|[0-5]\\d)(?:\\.(\\d{1,3}))?)?)?$").exec(e);if(t){if(t[4])for(;t[4].length<3;)t[4]+="0";return{hours:t[1],minutes:t[2],seconds:t[3],milliseconds:t[4]}}},selector:"Time selector",clear:"Clear"})}}}static get observers(){return["__updateDropdownItems(i18n.*, min, max, step)"]}ready(){super.ready(),this.__inputElement.validate=()=>{},this.__dropdownElement.addEventListener("value-changed",(e=>this.__onInputChange(e))),this.__inputElement.addEventListener("keydown",this.__onKeyDown.bind(this)),this.__dropdownElement.addEventListener("change",(e=>this.validate())),this.__inputElement.addEventListener("blur",(e=>this.validate())),this.__dropdownElement.addEventListener("change",(e=>{e.composedPath()[0]!==this.__inputElement&&this.__dispatchChange()}))}__validDayDivisor(e){return!e||86400%e==0||e<1&&e%1*1e3%1==0}__onKeyDown(e){if(this.readonly||this.disabled||this.__dropdownItems.length)return;const t=this.__validDayDivisor(this.step)&&this.step||60;n.keyboardEventMatchesKeys(e,"down")?this.__onArrowPressWithStep(-t):n.keyboardEventMatchesKeys(e,"up")&&this.__onArrowPressWithStep(t)}__onArrowPressWithStep(e){const t=this.__addStep(this.__getMsec(this.__memoValue),e,!0);this.__memoValue=t,this.__inputElement.value=this.i18n.formatTime(this.__validateTime(t)),this.__dispatchChange()}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__getMsec(e){let t=60*(e&&e.hours||0)*60*1e3;return t+=60*(e&&e.minutes||0)*1e3,t+=1e3*(e&&e.seconds||0),t+=e&&parseInt(e.milliseconds)||0,t}__getSec(e){let t=60*(e&&e.hours||0)*60;return t+=60*(e&&e.minutes||0),t+=e&&e.seconds||0,t+=e&&e.milliseconds/1e3||0,t}__addStep(e,t,i){0===e&&t<0&&(e=864e5);const a=1e3*t,s=e%a;a<0&&s&&i?e-=s:a>0&&s&&i?e-=s-a:e+=a;var n=Math.floor(e/1e3/60/60);e-=1e3*n*60*60;var r=Math.floor(e/1e3/60);e-=1e3*r*60;var d=Math.floor(e/1e3);return{hours:n<24?n:0,minutes:r,seconds:d,milliseconds:e-=1e3*d}}__updateDropdownItems(e,t,i,a){const s=this.__validateTime(this.__parseISO(t)),n=this.__getSec(s),r=this.__validateTime(this.__parseISO(i)),d=this.__getSec(r);if(this.__adjustValue(n,d,s,r),this.__dropdownItems=this.__generateDropdownList(n,d,a),a!==this.__oldStep){this.__oldStep=a;const e=this.__validateTime(this.__parseISO(this.value));this.__updateValue(e)}this.value&&(this.__dropdownElement.value=this.i18n.formatTime(this.i18n.parseTime(this.value)))}__generateDropdownList(e,t,i){if(i<900||!this.__validDayDivisor(i))return[];const a=[];let s=-(i=i||3600)+e;for(;s+i>=e&&s+i<=t;){const e=this.__validateTime(this.__addStep(1e3*s,i));s+=i;const t=this.i18n.formatTime(e);a.push({label:t,value:t})}return a}__adjustValue(e,t,i,a){if(!this.__memoValue)return;const s=this.__getSec(this.__memoValue);s<e?this.__updateValue(i):s>t&&this.__updateValue(a)}__valueChanged(e,t){const i=this.__memoValue=this.__parseISO(e),a=this.__formatISO(i)||"";""===this.value||null===this.value||i?this.value!==a?this.value=a:this.__updateInputValue(i):this.value=t}__onInputChange(e){const t=this.i18n.parseTime(this.__dropdownElement.value),i=this.i18n.formatTime(t)||"";t?this.__dropdownElement.value!==i?this.__dropdownElement.value=i:this.__updateValue(t):this.value=""}__updateValue(e){const t=this.__formatISO(this.__validateTime(e))||"";this.value=t}__updateInputValue(e){const t=this.i18n.formatTime(this.__validateTime(e))||"";this.__dropdownElement.value=t}__validateTime(e){return e&&(e.hours=parseInt(e.hours),e.minutes=parseInt(e.minutes||0),e.seconds=this.__stepSegment<3?void 0:parseInt(e.seconds||0),e.milliseconds=this.__stepSegment<4?void 0:parseInt(e.milliseconds||0)),e}get __stepSegment(){return this.step%3600==0?1:this.step%60!=0&&this.step?this.step%1==0?3:this.step<1?4:void 0:2}__formatISO(e){return O.properties.i18n.value().formatTime(e)}__parseISO(e){return O.properties.i18n.value().parseTime(e)}_getInputElement(){return this.shadowRoot.querySelector("vaadin-time-picker-text-field")}get __inputElement(){return this.__memoInput||(this.__memoInput=this._getInputElement())}get __dropdownElement(){return this.__memoDropdown||(this.__memoDropdown=this.shadowRoot.querySelector("vaadin-combo-box-light"))}get focusElement(){return this.__inputElement}validate(){return!(this.invalid=!this.checkValidity())}_timeAllowed(e){const t=this.i18n.parseTime(this.min),i=this.i18n.parseTime(this.max);return(!this.__getMsec(t)||this.__getMsec(e)>=this.__getMsec(t))&&(!this.__getMsec(i)||this.__getMsec(e)<=this.__getMsec(i))}checkValidity(){return!(!this.__inputElement.focusElement.checkValidity()||this.value&&!this._timeAllowed(this.i18n.parseTime(this.value))||this.__dropdownElement.value&&!this.i18n.parseTime(this.__dropdownElement.value))}}customElements.define(O.is,O);const j=r`<dom-module id="lumo-date-time-picker-date-text-field" theme-for="vaadin-date-time-picker-date-text-field">
|
|
81
81
|
<template>
|
|
82
82
|
<style>
|
|
83
83
|
[part~="input-field"] {
|
|
@@ -135,25 +135,25 @@ class F extends e{static get is(){return"vaadin-date-time-picker-custom-field"}c
|
|
|
135
135
|
Copyright (c) 2019 Vaadin Ltd.
|
|
136
136
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
137
137
|
*/
|
|
138
|
-
class q extends
|
|
138
|
+
class q extends _{static get is(){return"vaadin-date-time-picker-date-text-field"}}
|
|
139
139
|
/**
|
|
140
140
|
@license
|
|
141
141
|
Copyright (c) 2019 Vaadin Ltd.
|
|
142
142
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
143
143
|
*/
|
|
144
|
-
let L,R;customElements.define(q.is,q);class N extends
|
|
144
|
+
let L,R;customElements.define(q.is,q);class N extends t{static get is(){return"vaadin-date-time-picker-date-picker"}static get template(){return L||(L=super.template.cloneNode(!0),L.innerHTML=L.innerHTML.replace("vaadin-date-picker-text-field","vaadin-date-time-picker-date-text-field")),L}}customElements.define(N.is,N);
|
|
145
145
|
/**
|
|
146
146
|
@license
|
|
147
147
|
Copyright (c) 2019 Vaadin Ltd.
|
|
148
148
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
149
149
|
*/
|
|
150
|
-
class B extends
|
|
150
|
+
class B extends _{static get is(){return"vaadin-date-time-picker-time-text-field"}}customElements.define(B.is,B);class H extends O{static get is(){return"vaadin-date-time-picker-time-picker"}static get template(){return R||(R=super.template.cloneNode(!0),R.innerHTML=R.innerHTML.replace("vaadin-time-picker-text-field","vaadin-date-time-picker-time-text-field")),R}_getInputElement(){return this.shadowRoot.querySelector("vaadin-date-time-picker-time-text-field")}}customElements.define(H.is,H);
|
|
151
151
|
/**
|
|
152
152
|
@license
|
|
153
153
|
Copyright (c) 2019 Vaadin Ltd.
|
|
154
154
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
155
155
|
*/
|
|
156
|
-
const Y=document.createElement("template");Y.innerHTML='<dom-module id="date-time-picker-custom-field" theme-for="vaadin-date-time-picker-custom-field">\n <template>\n <style>\n :host,\n .container {\n width: 100%;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(Y.content);const A=function(e,t){for(;e;){if(e.properties&&e.properties[t])return e.properties[t];e=e.__proto__}},W=customElements.get("vaadin-date-time-picker-date-picker"),K=customElements.get("vaadin-date-time-picker-time-picker"),U=A(W,"i18n").value(),G=A(K,"i18n").value(),z=Object.keys(U),J=Object.keys(G);class Q extends(
|
|
156
|
+
const Y=document.createElement("template");Y.innerHTML='<dom-module id="date-time-picker-custom-field" theme-for="vaadin-date-time-picker-custom-field">\n <template>\n <style>\n :host,\n .container {\n width: 100%;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(Y.content);const A=function(e,t){for(;e;){if(e.properties&&e.properties[t])return e.properties[t];e=e.__proto__}},W=customElements.get("vaadin-date-time-picker-date-picker"),K=customElements.get("vaadin-date-time-picker-time-picker"),U=A(W,"i18n").value(),G=A(K,"i18n").value(),z=Object.keys(U),J=Object.keys(G);class Q extends(h(o(l))){static get template(){return r`
|
|
157
157
|
<style>
|
|
158
158
|
:host {
|
|
159
159
|
display: inline-block;
|
|
@@ -192,4 +192,4 @@ const Y=document.createElement("template");Y.innerHTML='<dom-module id="date-tim
|
|
|
192
192
|
</div>
|
|
193
193
|
<slot name="helper" slot="helper">[[helperText]]</slot>
|
|
194
194
|
</vaadin-date-time-picker-custom-field>
|
|
195
|
-
`}static get is(){return"vaadin-date-time-picker"}static get version(){return"1.4.0"}static get properties(){return{name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,value:!1},errorMessage:String,value:{type:String,notify:!0,value:"",observer:"__valueChanged"},min:{type:String,observer:"__minChanged"},max:{type:String,observer:"__maxChanged"},__minDateTime:{type:Date,value:""},__maxDateTime:{type:Date,value:""},datePlaceholder:{type:String},timePlaceholder:{type:String},helperText:{type:String,value:""},step:{type:Number},initialPosition:String,showWeekNumbers:{type:Boolean},label:{type:String,value:""},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date},__customFieldValueFormat:{type:Object,value:()=>({parseValue:e=>e.split("T"),formatValue:e=>e.join("T")})},i18n:{type:Object,value:()=>Object.assign({},U,G)}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder)","__timePlaceholderChanged(timePlaceholder)","__stepChanged(step)","__initialPositionChanged(initialPosition)","__showWeekNumbersChanged(showWeekNumbers)","__requiredChanged(required)","__invalidChanged(invalid)","__disabledChanged(disabled)","__readonlyChanged(readonly)","__i18nChanged(i18n.*)","__autoOpenDisabledChanged(autoOpenDisabled)"]}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999"}ready(){super.ready(),this.addEventListener("focusout",(e=>{e.relatedTarget!==this.__datePicker.$.overlay&&this.validate()})),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__filterElements=e=>e.nodeType===Node.ELEMENT_NODE,this.__datePickerChanged(),this.__timePickerChanged(),this.$.dateSlot.addEventListener("slotchange",this.__datePickerChanged.bind(this)),this.$.timeSlot.addEventListener("slotchange",this.__timePickerChanged.bind(this)),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>this.focus()))}focus(){this.$.customField.focus()}__syncI18n(e,t,i){(i=i||Object.keys(t.i18n)).forEach((i=>{t.i18n.hasOwnProperty(i)&&e.set(`i18n.${i}`,t.i18n[i])}))}__updateCustomFieldInputs(){const e=this.$.customField.inputs;this.__datePicker&&this.__timePicker&&(e[0]!==this.__datePicker||e[1]!==this.__timePicker)&&this.$.customField._setInputs([this.__datePicker,this.__timePicker])}__changeEventHandler(e){this.__doDispatchChange=!0}__removeChangeListener(e){e&&e.removeEventListener("change",this.__changeEventHandler,!1)}__addChangeListener(e){e.addEventListener("change",this.__changeEventHandler,!1)}__datePickerChanged(){const e=this.shadowRoot.querySelector('[part="date"]'),t=this.$.dateSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__datePicker!==t&&(this.__removeChangeListener(this.__datePicker),this.__addChangeListener(t),this.__datePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.datePlaceholder,t.invalid=this.invalid,t.initialPosition=this.initialPosition,t.showWeekNumbers=this.showWeekNumbers,this.__syncI18n(t,this,z)):(this.datePlaceholder=t.placeholder,this.initialPosition=t.initialPosition,this.showWeekNumbers=t.showWeekNumbers,this.__syncI18n(this,t,z)),t.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),t.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{},t._validateInput=()=>{})}__timePickerChanged(){const e=this.shadowRoot.querySelector('[part="time"]'),t=this.$.timeSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__timePicker!==t&&(this.__removeChangeListener(this.__timePicker),this.__addChangeListener(t),this.__timePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.timePlaceholder,t.step=this.step,t.invalid=this.invalid,this.__syncI18n(t,this,J)):(this.timePlaceholder=t.placeholder,this.step=t.step,this.__syncI18n(this,t,J)),this.__updateTimePickerMinMax(),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{})}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){const e=s._dateEquals,t=this.__parseDate(this.__datePicker.value),i=e(this.__minDateTime,this.__maxDateTime),a=this.__timePicker.value;this.__minDateTime&&e(t,this.__minDateTime)||i?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&e(t,this.__maxDateTime)||i?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue,this.__timePicker.value!==a&&(this.__timePicker.value=a)}}__i18nChanged(e){this.__datePicker&&this.__datePicker.set(e.path,e.value),this.__timePicker&&this.__timePicker.set(e.path,e.value)}__datePlaceholderChanged(e){this.__datePicker&&(this.__datePicker.placeholder=e)}__timePlaceholderChanged(e){this.__timePicker&&(this.__timePicker.placeholder=e)}__stepChanged(e){if(this.__timePicker&&this.__timePicker.step!==e){const t=this.__timePicker.value;this.__timePicker.step=e,this.__timePicker.value!==t&&this.__triggerCustomFieldValueUpdate()}}__triggerCustomFieldValueUpdate(){this.__timePicker&&this.__timePicker.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__initialPositionChanged(e){this.__datePicker&&(this.__datePicker.initialPosition=e)}__showWeekNumbersChanged(e){this.__datePicker&&(this.__datePicker.showWeekNumbers=e)}__invalidChanged(e){this.__datePicker&&(this.__datePicker.invalid=e),this.__timePicker&&(this.__timePicker.invalid=e)}__requiredChanged(e){this.__datePicker&&(this.__datePicker.required=e),this.__timePicker&&(this.__timePicker.required=e)}__disabledChanged(e){this.__datePicker&&(this.__datePicker.disabled=e),this.__timePicker&&(this.__timePicker.disabled=e)}__readonlyChanged(e){this.__datePicker&&(this.__datePicker.readonly=e),this.__timePicker&&(this.__timePicker.readonly=e)}__parseDate(e){return W.prototype._parseDate(e)}__formatDateISO(e,t){return e?W.prototype._formatISO(e):t}__formatTimeISO(e){return G.formatTime(e)}__parseTimeISO(e){return G.parseTime(e)}__parseDateTime(e){const[t,i]=e.split("T");if(!t||!i)return;const a=this.__parseDate(t);if(!a)return;const s=this.__parseTimeISO(i);return s?(a.setHours(parseInt(s.hours)),a.setMinutes(parseInt(s.minutes||0)),a.setSeconds(parseInt(s.seconds||0)),a.setMilliseconds(parseInt(s.milliseconds||0)),a):void 0}__formatDateTime(e){if(!e)return"";return`${this.__formatDateISO(e,"")}T${this.__dateToIsoTimeString(e)}`}__dateToIsoTimeString(e){return this.__formatTimeISO(this.__validateTime({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}))}__validateTime(e){return e&&(e.seconds=this.__stepSegment<3?void 0:e.seconds,e.milliseconds=this.__stepSegment<4?void 0:e.milliseconds),e}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){const e=this.$.customField.inputs.filter((e=>!e.checkValidity.call(e))).length>0,t=this.required&&this.$.customField.inputs.filter((e=>!e.value)).length>0;return!e&&!t}get __stepSegment(){const e=null==this.step?60:parseFloat(this.step);return e%3600==0?1:e%60!=0&&e?e%1==0?3:e<1?4:void 0:2}__dateTimeEquals(e,t){return!!s._dateEquals(e,t)&&(e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()&&e.getSeconds()===t.getSeconds()&&e.getMilliseconds()===t.getMilliseconds())}__handleDateTimeChange(e,t,i,a){if(!i)return this[e]="",void(this[t]="");const s=this.__parseDateTime(i);s?this.__dateTimeEquals(this[t],s)||(this[t]=s):this[e]=a}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__doDispatchChange&&(this.__dispatchChange(),this.validate())}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__selectedDateTimeChanged(e){const t=this.__formatDateTime(e);this.value!==t&&(this.value=t);if(!!this.$.customField.inputs[0].$){const e=this.__doDispatchChange;this.$.customField.value=""!==this.value?this.value:"T",this.__doDispatchChange=e}}__customFieldValueChanged(e){const t=e.detail.value;if("T"===t&&!this.__customFieldInitialValueChangeReceived)return void(this.__customFieldInitialValueChangeReceived=!0);const[i,a]=t.split("T");this.__oldDateValue!==i&&(this.__oldDateValue=i,this.__updateTimePickerMinMax()),i&&a?t!==this.value&&(this.value=t):this.value="",this.__doDispatchChange=!1}__autoOpenDisabledChanged(e){this.__datePicker&&(this.__datePicker.autoOpenDisabled=e),this.__timePicker&&(this.__timePicker.autoOpenDisabled=e)}}customElements.define(Q.is,Q);const X=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];function Z(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=0===i?X.length-1:i-1,s=X[a][0],n=new Date(e.getFullYear(),s),r=X[a][2];return{start:n,end:new Date(new Date(e.getFullYear(),r+1).getTime()-1)}}function ee(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=X[i][0],s=new Date(e.getFullYear(),a),n=X[i][2];return{start:s,end:new Date(new Date(e.getFullYear(),n+1).getTime()-1)}}function te(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()-1),end:new Date(new Date(e.getFullYear(),e.getMonth()).getTime()-1)}}function ie(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()),end:new Date(new Date(e.getFullYear(),e.getMonth()+1).getTime()-1)}}function ae(e=new Date){return{start:new Date(e.getFullYear()-1,0),end:new Date(new Date(e.getFullYear(),0).getTime()-1)}}function se(e=new Date){return{start:new Date(e.getFullYear(),0),end:new Date(new Date(e.getFullYear()+1,0).getTime()-1)}}function ne(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-365),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function re(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-30),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function de(e){return`${e.getFullYear().toString().padStart(4,"0")}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}`}let le,oe,he,me,_e,ue,ce,pe,ge,ve,fe,be,ye,ke,Te,xe=e=>e;const $e=f(b(y(D(k(E,"report-form")))));class De extends $e{constructor(){super(...arguments),this.templates={},this.__showRangeTime=!1}static get scopedElements(){return{"vaadin-date-time-picker":customElements.get("vaadin-date-time-picker"),"vaadin-date-picker":customElements.get("vaadin-date-picker"),"vaadin-checkbox":customElements.get("vaadin-checkbox"),"vaadin-select":customElements.get("vaadin-select"),"vaadin-button":customElements.get("vaadin-button"),"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-property-table":$,"x-choice":t,"x-group":x}}static get properties(){return p(p({},super.properties),{},{__showRangeTime:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name_required",({datetime_start:e})=>!!e||"datetime_start_required",({datetime_end:e})=>!!e||"datetime_end_required"]}render(){var e,t;const i=this.hiddenSelector;return g(le||(le=xe` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="space-y-m"> ${0} ${0} ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),i.matches("name",!0)?"":this.__renderName(),i.matches("range",!0)?"":this.__renderRange(),i.matches("timestamps",!0)||!this.data?"":this.__renderTimestamps(),i.matches("create",!0)||this.data?"":this.__renderCreate(),i.matches("delete",!0)||!this.data?"":this.__renderDelete(),T({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderName(){const e="name",t=["complete","customers","customers_ltv"],a=!this.in("idle")||this.disabledSelector.matches(e),s=this.readonlySelector.matches(e);return g(oe||(oe=xe` <div data-testid="${0}"> ${0} <x-group frame> <foxy-i18n lang="${0}" slot="header" key="name" ns="${0}"></foxy-i18n> <x-choice data-testid="name-choice" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} </x-choice> </x-group> ${0} </div> `),e,this.renderTemplateOrSlot("name:before"),this.lang,this.ns,this.form.name,t,s,a,(e=>{e instanceof i&&this.edit({name:e.detail})}),t.map((e=>g(he||(he=xe` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="name_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="name_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),this.renderTemplateOrSlot("name:after"))}__renderRangePreset(){var e;const t=[[p({value:"0",label:"preset_previous_quarter"},Z()),p({value:"1",label:"preset_previous_month"},te()),p({value:"2",label:"preset_previous_year"},ae())],[p({value:"3",label:"preset_this_quarter"},ee()),p({value:"4",label:"preset_this_month"},ie()),p({value:"5",label:"preset_this_year"},se())],[p({value:"6",label:"preset_last_365_days"},ne()),p({value:"7",label:"preset_last_30_days"},re())]],i=t.flat(1).find((e=>{const{datetime_end:t,datetime_start:i}=this.form;return i&&t&&de(e.start)===i&&de(e.end)===t}));return g(ge||(ge=xe` <div> <vaadin-select data-testid="range:preset" label="${0}" class="w-full -mt-m -mb-xs" ?disabled="${0}" ?readonly="${0}" .value="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> </div> `),this.t("preset"),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),S(null!==(e=null==i?void 0:i.value)&&void 0!==e?e:"custom"),(e=>{const i=g(me||(me=xe`<vaadin-item value="custom">${0}</vaadin-item>`),this.t("preset_custom")),a=g(_e||(_e=xe`<hr>`)),s=t.map((e=>{const t=e.map((({value:e,label:t})=>g(ue||(ue=xe`<vaadin-item value="${0}">${0}</vaadin-item>`),e,this.t(t))));return g(ce||(ce=xe`${0}${0}`),t,a)}));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),v(g(pe||(pe=xe`${0}${0}`),s,i),e.firstElementChild)}),(e=>{const i=e.currentTarget,a=t.flat(1).find((e=>e.value===i.value));a&&this.edit({datetime_start:de(a.start),datetime_end:de(a.end)})}))}__renderRangeDateTimePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return g(ve||(ve=xe` <vaadin-date-time-picker date-placeholder="${0}" time-placeholder="${0}" error-message="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-time-picker> `),this.t("select_date"),this.t("select_time"),w(i?this.t(i):void 0),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(e=>{const i=e.currentTarget;this.edit({[t]:i.value})}));var s,n}__renderRangeDatePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return g(fe||(fe=xe` <vaadin-date-picker error-message="${0}" placeholder="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),w(i?this.t(i):void 0),this.t("select_date"),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(i=>{const a=i.currentTarget,s="end"===e?"23:59:59":"00:00:00";this.edit({[t]:`${a.value}T${s}`})}));var s,n}__renderRange(){const e=this.__showRangeTime?this.__renderRangeDateTimePicker:this.__renderRangeDatePicker;return g(be||(be=xe` <div data-testid="range"> ${0} <x-group frame> <foxy-i18n slot="header" lang="${0}" key="range" ns="${0}"></foxy-i18n> <div class="p-m grid gap-m ${0}"> <div class="${0}"> ${0} </div> ${0} ${0} <vaadin-checkbox data-testid="range:toggle" class="-my-xs w-full ${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="use_precise_time" ns="${0}"></foxy-i18n> </vaadin-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("range:before"),this.lang,this.ns,this.__showRangeTime?"grid-cols-1":"sm-grid-cols-2",this.__showRangeTime?"col-span-1":"sm-col-span-2",this.__renderRangePreset(),e.call(this,"start"),e.call(this,"end"),this.__showRangeTime?"col-span-1":"sm-col-span-2",!this.in("idle")||this.disabledSelector.matches("range",!0),this.__showRangeTime,(e=>{const t=e.currentTarget;this.__showRangeTime=t.checked}),this.lang,this.ns,this.renderTemplateOrSlot("range:after"))}__renderTimestamps(){return g(ye||(ye=xe` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot("timestamps:before"),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),a=this.in({idle:{snapshot:{dirty:"invalid"}}}),s=e||t||(i||a),n=this.in("idle");return g(ke||(ke=xe` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||s||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return g(Te||(Te=xe` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="primary error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}}customElements.define("foxy-report-form",De);export{De as ReportForm};
|
|
195
|
+
`}static get is(){return"vaadin-date-time-picker"}static get version(){return"1.4.0"}static get properties(){return{name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,value:!1},errorMessage:String,value:{type:String,notify:!0,value:"",observer:"__valueChanged"},min:{type:String,observer:"__minChanged"},max:{type:String,observer:"__maxChanged"},__minDateTime:{type:Date,value:""},__maxDateTime:{type:Date,value:""},datePlaceholder:{type:String},timePlaceholder:{type:String},helperText:{type:String,value:""},step:{type:Number},initialPosition:String,showWeekNumbers:{type:Boolean},label:{type:String,value:""},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date},__customFieldValueFormat:{type:Object,value:()=>({parseValue:e=>e.split("T"),formatValue:e=>e.join("T")})},i18n:{type:Object,value:()=>Object.assign({},U,G)}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder)","__timePlaceholderChanged(timePlaceholder)","__stepChanged(step)","__initialPositionChanged(initialPosition)","__showWeekNumbersChanged(showWeekNumbers)","__requiredChanged(required)","__invalidChanged(invalid)","__disabledChanged(disabled)","__readonlyChanged(readonly)","__i18nChanged(i18n.*)","__autoOpenDisabledChanged(autoOpenDisabled)"]}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999"}ready(){super.ready(),this.addEventListener("focusout",(e=>{e.relatedTarget!==this.__datePicker.$.overlay&&this.validate()})),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__filterElements=e=>e.nodeType===Node.ELEMENT_NODE,this.__datePickerChanged(),this.__timePickerChanged(),this.$.dateSlot.addEventListener("slotchange",this.__datePickerChanged.bind(this)),this.$.timeSlot.addEventListener("slotchange",this.__timePickerChanged.bind(this)),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>this.focus()))}focus(){this.$.customField.focus()}__syncI18n(e,t,i){(i=i||Object.keys(t.i18n)).forEach((i=>{t.i18n.hasOwnProperty(i)&&e.set(`i18n.${i}`,t.i18n[i])}))}__updateCustomFieldInputs(){const e=this.$.customField.inputs;this.__datePicker&&this.__timePicker&&(e[0]!==this.__datePicker||e[1]!==this.__timePicker)&&this.$.customField._setInputs([this.__datePicker,this.__timePicker])}__changeEventHandler(e){this.__doDispatchChange=!0}__removeChangeListener(e){e&&e.removeEventListener("change",this.__changeEventHandler,!1)}__addChangeListener(e){e.addEventListener("change",this.__changeEventHandler,!1)}__datePickerChanged(){const e=this.shadowRoot.querySelector('[part="date"]'),t=this.$.dateSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__datePicker!==t&&(this.__removeChangeListener(this.__datePicker),this.__addChangeListener(t),this.__datePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.datePlaceholder,t.invalid=this.invalid,t.initialPosition=this.initialPosition,t.showWeekNumbers=this.showWeekNumbers,this.__syncI18n(t,this,z)):(this.datePlaceholder=t.placeholder,this.initialPosition=t.initialPosition,this.showWeekNumbers=t.showWeekNumbers,this.__syncI18n(this,t,z)),t.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),t.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{},t._validateInput=()=>{})}__timePickerChanged(){const e=this.shadowRoot.querySelector('[part="time"]'),t=this.$.timeSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__timePicker!==t&&(this.__removeChangeListener(this.__timePicker),this.__addChangeListener(t),this.__timePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.timePlaceholder,t.step=this.step,t.invalid=this.invalid,this.__syncI18n(t,this,J)):(this.timePlaceholder=t.placeholder,this.step=t.step,this.__syncI18n(this,t,J)),this.__updateTimePickerMinMax(),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{})}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){const e=i._dateEquals,t=this.__parseDate(this.__datePicker.value),a=e(this.__minDateTime,this.__maxDateTime),s=this.__timePicker.value;this.__minDateTime&&e(t,this.__minDateTime)||a?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&e(t,this.__maxDateTime)||a?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue,this.__timePicker.value!==s&&(this.__timePicker.value=s)}}__i18nChanged(e){this.__datePicker&&this.__datePicker.set(e.path,e.value),this.__timePicker&&this.__timePicker.set(e.path,e.value)}__datePlaceholderChanged(e){this.__datePicker&&(this.__datePicker.placeholder=e)}__timePlaceholderChanged(e){this.__timePicker&&(this.__timePicker.placeholder=e)}__stepChanged(e){if(this.__timePicker&&this.__timePicker.step!==e){const t=this.__timePicker.value;this.__timePicker.step=e,this.__timePicker.value!==t&&this.__triggerCustomFieldValueUpdate()}}__triggerCustomFieldValueUpdate(){this.__timePicker&&this.__timePicker.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__initialPositionChanged(e){this.__datePicker&&(this.__datePicker.initialPosition=e)}__showWeekNumbersChanged(e){this.__datePicker&&(this.__datePicker.showWeekNumbers=e)}__invalidChanged(e){this.__datePicker&&(this.__datePicker.invalid=e),this.__timePicker&&(this.__timePicker.invalid=e)}__requiredChanged(e){this.__datePicker&&(this.__datePicker.required=e),this.__timePicker&&(this.__timePicker.required=e)}__disabledChanged(e){this.__datePicker&&(this.__datePicker.disabled=e),this.__timePicker&&(this.__timePicker.disabled=e)}__readonlyChanged(e){this.__datePicker&&(this.__datePicker.readonly=e),this.__timePicker&&(this.__timePicker.readonly=e)}__parseDate(e){return W.prototype._parseDate(e)}__formatDateISO(e,t){return e?W.prototype._formatISO(e):t}__formatTimeISO(e){return G.formatTime(e)}__parseTimeISO(e){return G.parseTime(e)}__parseDateTime(e){const[t,i]=e.split("T");if(!t||!i)return;const a=this.__parseDate(t);if(!a)return;const s=this.__parseTimeISO(i);return s?(a.setHours(parseInt(s.hours)),a.setMinutes(parseInt(s.minutes||0)),a.setSeconds(parseInt(s.seconds||0)),a.setMilliseconds(parseInt(s.milliseconds||0)),a):void 0}__formatDateTime(e){if(!e)return"";return`${this.__formatDateISO(e,"")}T${this.__dateToIsoTimeString(e)}`}__dateToIsoTimeString(e){return this.__formatTimeISO(this.__validateTime({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}))}__validateTime(e){return e&&(e.seconds=this.__stepSegment<3?void 0:e.seconds,e.milliseconds=this.__stepSegment<4?void 0:e.milliseconds),e}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){const e=this.$.customField.inputs.filter((e=>!e.checkValidity.call(e))).length>0,t=this.required&&this.$.customField.inputs.filter((e=>!e.value)).length>0;return!e&&!t}get __stepSegment(){const e=null==this.step?60:parseFloat(this.step);return e%3600==0?1:e%60!=0&&e?e%1==0?3:e<1?4:void 0:2}__dateTimeEquals(e,t){return!!i._dateEquals(e,t)&&(e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()&&e.getSeconds()===t.getSeconds()&&e.getMilliseconds()===t.getMilliseconds())}__handleDateTimeChange(e,t,i,a){if(!i)return this[e]="",void(this[t]="");const s=this.__parseDateTime(i);s?this.__dateTimeEquals(this[t],s)||(this[t]=s):this[e]=a}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__doDispatchChange&&(this.__dispatchChange(),this.validate())}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__selectedDateTimeChanged(e){const t=this.__formatDateTime(e);this.value!==t&&(this.value=t);if(!!this.$.customField.inputs[0].$){const e=this.__doDispatchChange;this.$.customField.value=""!==this.value?this.value:"T",this.__doDispatchChange=e}}__customFieldValueChanged(e){const t=e.detail.value;if("T"===t&&!this.__customFieldInitialValueChangeReceived)return void(this.__customFieldInitialValueChangeReceived=!0);const[i,a]=t.split("T");this.__oldDateValue!==i&&(this.__oldDateValue=i,this.__updateTimePickerMinMax()),i&&a?t!==this.value&&(this.value=t):this.value="",this.__doDispatchChange=!1}__autoOpenDisabledChanged(e){this.__datePicker&&(this.__datePicker.autoOpenDisabled=e),this.__timePicker&&(this.__timePicker.autoOpenDisabled=e)}}customElements.define(Q.is,Q);const X=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];function Z(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=0===i?X.length-1:i-1,s=X[a][0],n=new Date(e.getFullYear(),s),r=X[a][2];return{start:n,end:new Date(new Date(e.getFullYear(),r+1).getTime()-1)}}function ee(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=X[i][0],s=new Date(e.getFullYear(),a),n=X[i][2];return{start:s,end:new Date(new Date(e.getFullYear(),n+1).getTime()-1)}}function te(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()-1),end:new Date(new Date(e.getFullYear(),e.getMonth()).getTime()-1)}}function ie(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()),end:new Date(new Date(e.getFullYear(),e.getMonth()+1).getTime()-1)}}function ae(e=new Date){return{start:new Date(e.getFullYear()-1,0),end:new Date(new Date(e.getFullYear(),0).getTime()-1)}}function se(e=new Date){return{start:new Date(e.getFullYear(),0),end:new Date(new Date(e.getFullYear()+1,0).getTime()-1)}}function ne(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-365),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function re(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-30),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function de(e){return`${e.getFullYear().toString().padStart(4,"0")}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}`}let le,oe,he,me,_e,ue,ce,pe,ge,ve,fe,be,ye,ke,Te,xe=e=>e;const $e=g(v(f(D(b(E,"report-form")))));class De extends $e{constructor(){super(...arguments),this.templates={},this.__showRangeTime=!1}static get scopedElements(){return{"vaadin-date-time-picker":customElements.get("vaadin-date-time-picker"),"vaadin-date-picker":customElements.get("vaadin-date-picker"),"vaadin-checkbox":customElements.get("vaadin-checkbox"),"vaadin-select":customElements.get("vaadin-select"),"vaadin-button":customElements.get("vaadin-button"),"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-property-table":$,"x-choice":k,"x-group":x}}static get properties(){return u(u({},super.properties),{},{__showRangeTime:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name_required",({datetime_start:e})=>!!e||"datetime_start_required",({datetime_end:e})=>!!e||"datetime_end_required"]}render(){var e,t;const i=this.hiddenSelector;return c(le||(le=xe` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="space-y-m"> ${0} ${0} ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),i.matches("name",!0)?"":this.__renderName(),i.matches("range",!0)?"":this.__renderRange(),i.matches("timestamps",!0)||!this.data?"":this.__renderTimestamps(),i.matches("create",!0)||this.data?"":this.__renderCreate(),i.matches("delete",!0)||!this.data?"":this.__renderDelete(),y({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderName(){const e="name",t=["complete","customers","customers_ltv"],i=!this.in("idle")||this.disabledSelector.matches(e),a=this.readonlySelector.matches(e);return c(oe||(oe=xe` <div data-testid="${0}"> ${0} <x-group frame> <foxy-i18n lang="${0}" slot="header" key="name" ns="${0}"></foxy-i18n> <x-choice data-testid="name-choice" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} </x-choice> </x-group> ${0} </div> `),e,this.renderTemplateOrSlot("name:before"),this.lang,this.ns,this.form.name,t,a,i,(e=>{e instanceof T&&this.edit({name:e.detail})}),t.map((e=>c(he||(he=xe` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="name_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="name_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),this.renderTemplateOrSlot("name:after"))}__renderRangePreset(){var e;const t=[[u({value:"0",label:"preset_previous_quarter"},Z()),u({value:"1",label:"preset_previous_month"},te()),u({value:"2",label:"preset_previous_year"},ae())],[u({value:"3",label:"preset_this_quarter"},ee()),u({value:"4",label:"preset_this_month"},ie()),u({value:"5",label:"preset_this_year"},se())],[u({value:"6",label:"preset_last_365_days"},ne()),u({value:"7",label:"preset_last_30_days"},re())]],i=t.flat(1).find((e=>{const{datetime_end:t,datetime_start:i}=this.form;return i&&t&&de(e.start)===i&&de(e.end)===t}));return c(ge||(ge=xe` <div> <vaadin-select data-testid="range:preset" label="${0}" class="w-full -mt-m -mb-xs" ?disabled="${0}" ?readonly="${0}" .value="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> </div> `),this.t("preset"),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),S(null!==(e=null==i?void 0:i.value)&&void 0!==e?e:"custom"),(e=>{const i=c(me||(me=xe`<vaadin-item value="custom">${0}</vaadin-item>`),this.t("preset_custom")),a=c(_e||(_e=xe`<hr>`)),s=t.map((e=>{const t=e.map((({value:e,label:t})=>c(ue||(ue=xe`<vaadin-item value="${0}">${0}</vaadin-item>`),e,this.t(t))));return c(ce||(ce=xe`${0}${0}`),t,a)}));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),p(c(pe||(pe=xe`${0}${0}`),s,i),e.firstElementChild)}),(e=>{const i=e.currentTarget,a=t.flat(1).find((e=>e.value===i.value));a&&this.edit({datetime_start:de(a.start),datetime_end:de(a.end)})}))}__renderRangeDateTimePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return c(ve||(ve=xe` <vaadin-date-time-picker date-placeholder="${0}" time-placeholder="${0}" error-message="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-time-picker> `),this.t("select_date"),this.t("select_time"),w(i?this.t(i):void 0),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(e=>{const i=e.currentTarget;this.edit({[t]:i.value})}));var s,n}__renderRangeDatePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return c(fe||(fe=xe` <vaadin-date-picker error-message="${0}" placeholder="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),w(i?this.t(i):void 0),this.t("select_date"),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(i=>{const a=i.currentTarget,s="end"===e?"23:59:59":"00:00:00";this.edit({[t]:`${a.value}T${s}`})}));var s,n}__renderRange(){const e=this.__showRangeTime?this.__renderRangeDateTimePicker:this.__renderRangeDatePicker;return c(be||(be=xe` <div data-testid="range"> ${0} <x-group frame> <foxy-i18n slot="header" lang="${0}" key="range" ns="${0}"></foxy-i18n> <div class="p-m grid gap-m ${0}"> <div class="${0}"> ${0} </div> ${0} ${0} <vaadin-checkbox data-testid="range:toggle" class="-my-xs w-full ${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="use_precise_time" ns="${0}"></foxy-i18n> </vaadin-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("range:before"),this.lang,this.ns,this.__showRangeTime?"grid-cols-1":"sm-grid-cols-2",this.__showRangeTime?"col-span-1":"sm-col-span-2",this.__renderRangePreset(),e.call(this,"start"),e.call(this,"end"),this.__showRangeTime?"col-span-1":"sm-col-span-2",!this.in("idle")||this.disabledSelector.matches("range",!0),this.__showRangeTime,(e=>{const t=e.currentTarget;this.__showRangeTime=t.checked}),this.lang,this.ns,this.renderTemplateOrSlot("range:after"))}__renderTimestamps(){return c(ye||(ye=xe` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot("timestamps:before"),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),a=this.in({idle:{snapshot:{dirty:"invalid"}}}),s=e||t||(i||a),n=this.in("idle");return c(ke||(ke=xe` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||s||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return c(Te||(Te=xe` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}}customElements.define("foxy-report-form",De);export{De as ReportForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import"./shared-888d690a.js";import{T as n}from"./shared-8eb4c8d7.js";import{a as e}from"./shared-1e94e6dd.js";import"./shared-2f6e33b6.js";import"./shared-68e0cf30.js";import"./shared-3ca1e8e4.js";import"./shared-a8ced8bf.js";import"./shared-7f33a83a.js";import"./shared-4f037e43.js";import"./shared-76b3d76a.js";import"./shared-43bcce74.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-181f51bd.js";import"./shared-a85afa33.js";import"./shared-d6276c83.js";import"./shared-2f7dcefa.js";import"./shared-4e709717.js";let a,s,o,r,t,l,i,d,m,f,y,h=n=>n;class p extends(e(n,"reports-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.startColumn,p.endColumn,p.createdOnColumn,p.linkColumn]}}p.nameColumn={header:({html:n,lang:e,ns:s})=>n(a||(a=h`<foxy-i18n lang=${0} key="report_name" ns=${0}></foxy-i18n>`),e,s),cell:({html:n,data:e,lang:a,ns:o})=>{const r=`report_name_${e.name}`;return n(s||(s=h`<foxy-i18n class="font-semibold" lang=${0} key=${0} ns=${0}></foxy-i18n>`),a,r,o)}},p.startColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(o||(o=h`<foxy-i18n lang=${0} key="range_start" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(r||(r=h`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
options=${0}
|
|
4
4
|
lang=${0}
|
|
@@ -6,7 +6,7 @@ import"./foxy-spinner.js";import"./shared-da130124.js";import{T as n}from"./shar
|
|
|
6
6
|
ns=${0}
|
|
7
7
|
>
|
|
8
8
|
</foxy-i18n>
|
|
9
|
-
`),JSON.stringify({value:e.datetime_start}),a,s)},
|
|
9
|
+
`),JSON.stringify({value:e.datetime_start}),a,s)},p.endColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(t||(t=h`<foxy-i18n lang=${0} key="range_end" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(l||(l=h`
|
|
10
10
|
<foxy-i18n
|
|
11
11
|
options=${0}
|
|
12
12
|
lang=${0}
|
|
@@ -14,7 +14,7 @@ import"./foxy-spinner.js";import"./shared-da130124.js";import{T as n}from"./shar
|
|
|
14
14
|
ns=${0}
|
|
15
15
|
>
|
|
16
16
|
</foxy-i18n>
|
|
17
|
-
`),JSON.stringify({value:e.datetime_end}),a,s)},
|
|
17
|
+
`),JSON.stringify({value:e.datetime_end}),a,s)},p.createdOnColumn={header:({html:n,lang:e,ns:a})=>n(i||(i=h`<foxy-i18n lang=${0} key="created_on" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(d||(d=h`
|
|
18
18
|
<foxy-i18n
|
|
19
19
|
options=${0}
|
|
20
20
|
lang=${0}
|
|
@@ -22,7 +22,7 @@ import"./foxy-spinner.js";import"./shared-da130124.js";import{T as n}from"./shar
|
|
|
22
22
|
ns=${0}
|
|
23
23
|
>
|
|
24
24
|
</foxy-i18n>
|
|
25
|
-
`),JSON.stringify({value:e.date_created}),a,s)},
|
|
25
|
+
`),JSON.stringify({value:e.date_created}),a,s)},p.linkColumn={header:({html:n,lang:e,ns:a})=>n(m||(m=h`<foxy-i18n lang=${0} key="link" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,lang:e,data:a,ns:s})=>"ready"===a.status?n(f||(f=h`
|
|
26
26
|
<a
|
|
27
27
|
class="rounded font-medium text-primary transition-opacity hover-opacity-75 focus-outline-none focus-ring-2 focus-ring-primary-50"
|
|
28
28
|
href=${0}
|
|
@@ -38,4 +38,4 @@ import"./foxy-spinner.js";import"./shared-da130124.js";import{T as n}from"./shar
|
|
|
38
38
|
ns="${0} link-spinner"
|
|
39
39
|
>
|
|
40
40
|
</foxy-spinner>
|
|
41
|
-
`),"error"===a.status?"error":"busy",e,s)},customElements.define("foxy-reports-table",
|
|
41
|
+
`),"error"===a.status?"error":"busy",e,s)},customElements.define("foxy-reports-table",p);export{p as ReportsTable};
|