@foxy.io/elements 1.28.0 → 1.29.0-beta.2
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 +5 -5
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -0
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +57 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-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-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +4 -4
- 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-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.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-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +3 -3
- 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-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-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-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card-embed.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +2 -2
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-c2128988.js → shared-01b2cad8.js} +1 -1
- package/dist/cdn/{shared-fad783a0.js → shared-021c7a22.js} +1 -1
- package/dist/cdn/{shared-f2335b72.js → shared-075796e2.js} +2 -2
- package/dist/cdn/{shared-fee535ca.js → shared-0b01f721.js} +1 -1
- package/dist/cdn/{shared-701157ac.js → shared-0f6e4584.js} +1 -1
- package/dist/cdn/{shared-414a0c9b.js → shared-10325cda.js} +1 -1
- package/dist/cdn/{shared-9f44b81f.js → shared-10b5e78f.js} +1 -1
- package/dist/cdn/{shared-042969fe.js → shared-12a7a15d.js} +1 -1
- package/dist/cdn/{shared-9ee719e6.js → shared-12ac8cc6.js} +1 -1
- package/dist/cdn/{shared-57e4bcb0.js → shared-1cf1e1a4.js} +1 -1
- package/dist/cdn/{shared-7004839c.js → shared-2099544a.js} +2 -2
- package/dist/cdn/{shared-cbeb8587.js → shared-24d71d01.js} +1 -1
- package/dist/cdn/shared-292ba15e.js +1 -0
- package/dist/cdn/{shared-850e441a.js → shared-2a71795e.js} +1 -1
- package/dist/cdn/{shared-c0e56e97.js → shared-2d723710.js} +1 -1
- package/dist/cdn/{shared-58095d4b.js → shared-2fc671cd.js} +1 -1
- package/dist/cdn/{shared-cfdd6c21.js → shared-30221a16.js} +1 -1
- package/dist/cdn/{shared-e4cc1191.js → shared-303b428e.js} +1 -1
- package/dist/cdn/{shared-44b101d0.js → shared-339bbd50.js} +1 -1
- package/dist/cdn/{shared-cf9c48f9.js → shared-39a33102.js} +1 -1
- package/dist/cdn/{shared-0ed41a9e.js → shared-3e03c988.js} +1 -1
- package/dist/cdn/{shared-66084f2e.js → shared-3fa791ca.js} +1 -1
- package/dist/cdn/{shared-a28c9952.js → shared-4993a79d.js} +1 -1
- package/dist/cdn/shared-4c2d43e6.js +1 -0
- package/dist/cdn/{shared-ecec6a10.js → shared-522a172d.js} +1 -1
- package/dist/cdn/{shared-f300193c.js → shared-558bc894.js} +1 -1
- package/dist/cdn/{shared-b44cf5a9.js → shared-5c05ac06.js} +1 -1
- package/dist/cdn/shared-61f4e91a.js +1 -0
- package/dist/cdn/{shared-ec696e1b.js → shared-634b670e.js} +1 -1
- package/dist/cdn/{shared-25c57c74.js → shared-644ee296.js} +1 -1
- package/dist/cdn/shared-6474675f.js +1 -0
- package/dist/cdn/{shared-24586cfb.js → shared-6a4e81ad.js} +1 -1
- package/dist/cdn/{shared-bb35ee61.js → shared-6ac0d05e.js} +1 -1
- package/dist/cdn/{shared-7063f5af.js → shared-6d645dc5.js} +1 -1
- package/dist/cdn/shared-6e355777.js +1 -0
- package/dist/cdn/shared-7026fb08.js +1 -0
- package/dist/cdn/shared-70a5fad6.js +1 -0
- package/dist/cdn/{shared-a79dbeb9.js → shared-72c61f43.js} +1 -1
- package/dist/cdn/{shared-484b31eb.js → shared-72f41a65.js} +1 -1
- package/dist/cdn/shared-77051754.js +1 -0
- package/dist/cdn/{shared-789e3185.js → shared-77c4acdd.js} +1 -1
- package/dist/cdn/{shared-1708eb3c.js → shared-797ba64a.js} +1 -1
- package/dist/cdn/shared-7b8ad9c1.js +1 -0
- package/dist/cdn/shared-7ce91c80.js +1 -0
- package/dist/cdn/{shared-b3681c71.js → shared-7fd9a30f.js} +1 -1
- package/dist/cdn/{shared-ba5c9c0b.js → shared-81d3a9ae.js} +1 -1
- package/dist/cdn/{shared-80b9cb48.js → shared-876a4341.js} +1 -1
- package/dist/cdn/shared-8c1df97c.js +1 -0
- package/dist/cdn/{shared-add044d3.js → shared-8f7a31e0.js} +2 -2
- package/dist/cdn/{shared-49d678ad.js → shared-91f5e0b3.js} +1 -1
- package/dist/cdn/{shared-059680a0.js → shared-9a90a24e.js} +1 -1
- package/dist/cdn/shared-9db46672.js +1 -0
- package/dist/cdn/{shared-23061fb2.js → shared-a036e345.js} +1 -1
- package/dist/cdn/{shared-baaa1e47.js → shared-a159ccff.js} +1 -1
- package/dist/cdn/shared-a6273e4a.js +1 -0
- package/dist/cdn/{shared-f91d5706.js → shared-abea5e34.js} +1 -1
- package/dist/cdn/{shared-ae200b9f.js → shared-acdcae7e.js} +1 -1
- package/dist/cdn/{shared-80c6f97e.js → shared-aefac46b.js} +1 -1
- package/dist/cdn/{shared-fd410dee.js → shared-b6814728.js} +2 -2
- package/dist/cdn/{shared-293f9c07.js → shared-b731dfc5.js} +1 -1
- package/dist/cdn/{shared-2782886e.js → shared-b98b8d02.js} +1 -1
- package/dist/cdn/{shared-32cac4bd.js → shared-bdd4fbbb.js} +3 -3
- package/dist/cdn/shared-c286c5ad.js +1 -0
- package/dist/cdn/shared-cbb0e610.js +1 -0
- package/dist/cdn/{shared-4761504a.js → shared-cc79152c.js} +1 -1
- package/dist/cdn/{shared-2e6bda84.js → shared-d464d078.js} +1 -1
- package/dist/cdn/shared-d4810405.js +1 -0
- package/dist/cdn/{shared-41d57c3b.js → shared-d6010c96.js} +1 -1
- package/dist/cdn/{shared-c4f5b03b.js → shared-df00a537.js} +1 -1
- package/dist/cdn/{shared-db108ddb.js → shared-e2a61f69.js} +1 -1
- package/dist/cdn/{shared-59d8b64e.js → shared-e5d37737.js} +1 -1
- package/dist/cdn/{shared-a4e0a78b.js → shared-e6e84ff5.js} +1 -1
- package/dist/cdn/{shared-fbfa45bb.js → shared-ee36b83f.js} +1 -1
- package/dist/cdn/{shared-6d1556a0.js → shared-f1d2b5bb.js} +1 -1
- package/dist/cdn/{shared-aac73acd.js → shared-f22f22ae.js} +1 -1
- package/dist/cdn/{shared-ae462b8e.js → shared-f5366dda.js} +1 -1
- package/dist/cdn/{shared-a5c48bf4.js → shared-f7a1193f.js} +1 -1
- package/dist/cdn/{shared-a05fe56c.js → shared-fa9e5c7f.js} +1 -1
- package/dist/cdn/{shared-a08d509a.js → shared-fb56178f.js} +1 -1
- package/dist/cdn/{shared-5c1e607b.js → shared-fe77f6f6.js} +1 -1
- package/dist/cdn/{shared-bba917bf.js → shared-ff63a551.js} +1 -1
- package/dist/cdn/{shared-4b209827.js → shared-ffd3690b.js} +1 -1
- package/dist/cdn/translations/address-form/en.json +3 -3
- package/dist/cdn/translations/admin-subscription-form/en.json +1840 -0
- package/dist/cdn/translations/api-browser/en.json +2 -5
- package/dist/cdn/translations/cart-form/en.json +598 -169
- package/dist/cdn/translations/customer/en.json +3 -3
- package/dist/cdn/translations/item-form/en.json +0 -1
- package/dist/cdn/translations/transaction/en.json +0 -1
- package/dist/elements/internal/InternalCalendar/InternalCalendar.js +2 -1
- package/dist/elements/internal/InternalCalendar/InternalCalendar.js.map +1 -1
- package/dist/elements/internal/InternalCard/InternalCard.js +1 -1
- package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
- package/dist/elements/internal/InternalControl/InternalControl.d.ts +1 -0
- package/dist/elements/internal/InternalControl/InternalControl.js +10 -7
- package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
- package/dist/elements/internal/InternalDateControl/InternalDateControl.d.ts +4 -1
- package/dist/elements/internal/InternalDateControl/InternalDateControl.js +36 -3
- package/dist/elements/internal/InternalDateControl/InternalDateControl.js.map +1 -1
- package/dist/elements/internal/InternalDateControl/getMonthNames.d.ts +1 -0
- package/dist/elements/internal/InternalDateControl/getMonthNames.js +7 -0
- package/dist/elements/internal/InternalDateControl/getMonthNames.js.map +1 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayLongNames.d.ts +1 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayLongNames.js +8 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayLongNames.js.map +1 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayShortNames.d.ts +1 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayShortNames.js +8 -0
- package/dist/elements/internal/InternalDateControl/getWeekdayShortNames.js.map +1 -0
- package/dist/elements/internal/InternalDateControl/index.d.ts +1 -0
- package/dist/elements/internal/InternalDateControl/index.js +1 -0
- package/dist/elements/internal/InternalDateControl/index.js.map +1 -1
- package/dist/elements/internal/InternalDateControl/vaadinStyles.d.ts +1 -0
- package/dist/elements/internal/InternalDateControl/vaadinStyles.js +73 -0
- package/dist/elements/internal/InternalDateControl/vaadinStyles.js.map +1 -0
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +2 -0
- package/dist/elements/internal/InternalForm/InternalForm.js +26 -29
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +3 -0
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +128 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +4 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +93 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.d.ts +11 -1
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js +115 -20
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js.map +1 -1
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js +0 -4
- package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js.map +1 -1
- package/dist/elements/internal/InternalResourcePickerControl/index.d.ts +2 -0
- package/dist/elements/internal/InternalResourcePickerControl/index.js +2 -0
- package/dist/elements/internal/InternalResourcePickerControl/index.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +4 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +70 -2
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.d.ts +8 -0
- package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js +28 -0
- package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js.map +1 -0
- package/dist/elements/internal/InternalSummaryControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalSummaryControl/index.js +6 -0
- package/dist/elements/internal/InternalSummaryControl/index.js.map +1 -0
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.d.ts +7 -0
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js +75 -0
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js.map +1 -0
- package/dist/elements/internal/InternalSwitchControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalSwitchControl/index.js +6 -0
- package/dist/elements/internal/InternalSwitchControl/index.js.map +1 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +74 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/private/Dialog/Dialog.js +1 -1
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.d.ts +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +5 -5
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +14 -0
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +109 -0
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/index.d.ts +13 -0
- package/dist/elements/public/AdminSubscriptionForm/index.js +15 -0
- package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/InternalAdminSubscriptionFormError.d.ts +5 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/InternalAdminSubscriptionFormError.js +17 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/InternalAdminSubscriptionFormError.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/index.d.ts +3 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/index.js +5 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormError/index.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/InternalAdminSubscriptionFormLoadInCartAction.d.ts +8 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/InternalAdminSubscriptionFormLoadInCartAction.js +40 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/InternalAdminSubscriptionFormLoadInCartAction.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/index.d.ts +4 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/index.js +6 -0
- package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLoadInCartAction/index.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/types.d.ts +5 -0
- package/dist/elements/public/AdminSubscriptionForm/types.js +2 -0
- package/dist/elements/public/AdminSubscriptionForm/types.js.map +1 -0
- package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js +4 -1
- package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js.map +1 -1
- package/dist/elements/public/AttributeCard/AttributeCard.js +3 -4
- package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
- package/dist/elements/public/CartForm/CartForm.d.ts +18 -35
- package/dist/elements/public/CartForm/CartForm.js +265 -501
- package/dist/elements/public/CartForm/CartForm.js.map +1 -1
- package/dist/elements/public/CartForm/index.d.ts +10 -5
- package/dist/elements/public/CartForm/index.js +10 -5
- package/dist/elements/public/CartForm/index.js.map +1 -1
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/InternalCartFormAddressSummaryItem.d.ts +33 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/InternalCartFormAddressSummaryItem.js +293 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/InternalCartFormAddressSummaryItem.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.d.ts +7 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.js +9 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/index.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/style.d.ts +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/style.js +58 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/style.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/types.d.ts +11 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/types.js +2 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormAddressSummaryItem/types.js.map +1 -0
- package/dist/elements/public/CartForm/internal/{InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.d.ts → InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.d.ts} +1 -1
- package/dist/elements/public/CartForm/internal/{InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js → InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js} +5 -5
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/index.d.ts +4 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/index.js +6 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/index.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/InternalCartFormPaymentMethodCard.d.ts +6 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/InternalCartFormPaymentMethodCard.js +35 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/InternalCartFormPaymentMethodCard.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/index.d.ts +4 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/index.js +6 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/index.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/types.d.ts +5 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/types.js +2 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodCard/types.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/InternalCartFormPaymentMethodForm.d.ts +13 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/InternalCartFormPaymentMethodForm.js +68 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/InternalCartFormPaymentMethodForm.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/index.d.ts +6 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/index.js +8 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/index.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/types.d.ts +5 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/types.js +2 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormPaymentMethodForm/types.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.d.ts +9 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js +91 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/index.d.ts +5 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/index.js +7 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/index.js.map +1 -0
- package/dist/elements/public/CartForm/types.d.ts +11 -1
- package/dist/elements/public/CartForm/types.js.map +1 -1
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js +1 -1
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
- package/dist/elements/public/FormDialog/FormDialog.d.ts +2 -0
- package/dist/elements/public/FormDialog/FormDialog.js +9 -6
- package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +18 -6
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-004fc193.js +0 -1
- package/dist/cdn/shared-08d018f5.js +0 -1
- package/dist/cdn/shared-0da6e42c.js +0 -1
- package/dist/cdn/shared-0e038fda.js +0 -1
- package/dist/cdn/shared-1d8edd03.js +0 -1
- package/dist/cdn/shared-365c8437.js +0 -1
- package/dist/cdn/shared-421708b0.js +0 -1
- package/dist/cdn/shared-57266e2a.js +0 -1
- package/dist/cdn/shared-5cb6aca6.js +0 -1
- package/dist/cdn/shared-6740ee7a.js +0 -1
- package/dist/cdn/shared-7af96c0a.js +0 -1
- package/dist/cdn/shared-824d0804.js +0 -1
- package/dist/cdn/shared-8f0251e9.js +0 -1
- package/dist/cdn/shared-b42c6fe3.js +0 -1
- package/dist/cdn/shared-b6376c8f.js +0 -1
- package/dist/cdn/shared-d82f9e35.js +0 -1
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/InternalCartFormViewAsCustomerControl.js.map +0 -1
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.d.ts +0 -4
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js +0 -6
- package/dist/elements/public/CartForm/internal/InternalCartFormViewAsCustomerControl/index.js.map +0 -1
|
@@ -1 +1,57 @@
|
|
|
1
|
-
import"./shared-a05fe56c.js";import"./shared-2782886e.js";import"./shared-004fc193.js";import{I as e}from"./shared-5cb6aca6.js";import"./shared-0e038fda.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-discount-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-6d1556a0.js";import{a as t}from"./shared-b6376c8f.js";import{_ as o,l as i}from"./shared-701157ac.js";import{c as r}from"./shared-4e709717.js";import{h as s}from"./shared-dc73b9a5.js";import{R as n,a as l}from"./shared-f2335b72.js";import{i as a}from"./shared-9803aa7c.js";import{s as d}from"./shared-365c8437.js";import"./shared-1708eb3c.js";import"./shared-24586cfb.js";import"./shared-cfdd6c21.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-a08d509a.js";import"./shared-7004839c.js";import"./shared-add044d3.js";import"./shared-58095d4b.js";import"./shared-59d8b64e.js";import"./shared-651c44fa.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-5c1e607b.js";import"./shared-61ade33e.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-8f0251e9.js";import"./shared-343d1fd7.js";import"./shared-c0e56e97.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-b44cf5a9.js";import"./shared-a5c48bf4.js";import"./shared-fee535ca.js";import"./shared-cbeb8587.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-fbfa45bb.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-f91d5706.js";import"./shared-57266e2a.js";import"./foxy-pagination.js";import"./foxy-copy-to-clipboard.js";import"./shared-9ee719e6.js";import"./shared-bba917bf.js";import"./shared-bab2ea2c.js";import"./shared-7af96c0a.js";import"./shared-d82f9e35.js";import"./shared-08d018f5.js";import"./shared-9f44b81f.js";import"./shared-a4e0a78b.js";import"./shared-51c4a6dd.js";import"./shared-23061fb2.js";import"./shared-4761504a.js";import"./shared-6740ee7a.js";import"./shared-0da6e42c.js";import"./shared-b42c6fe3.js";import"./shared-c4f5b03b.js";import"./shared-44b101d0.js";import"./shared-db108ddb.js";import"./shared-484b31eb.js";import"./shared-789e3185.js";import"./shared-66084f2e.js";import"./shared-824d0804.js";import"./shared-421708b0.js";import"./shared-4b209827.js";import"./shared-e4cc1191.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-8438d4ca.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";let c,f,p=e=>e;customElements.define("foxy-internal-cart-form-view-as-customer-control",class extends t{constructor(){super(...arguments),this.__loader=null}static get properties(){return o(o({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const o=null===(e=this.__loader)||void 0===e?void 0:e.state,i=null===(t=this.__loader)||void 0===t?void 0:t.result;return i?s(c||(c=p` <a target="_blank" class="flex h-m px-m rounded font-medium transition-colors text-body bg-contrast-5 hover-bg-contrast-10 items-center justify-center focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),i):s(f||(f=p` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),r({"flex h-m px-m rounded items-center justify-center":!0,"transition-colors bg-contrast-5 font-medium":!0,"text-tertiary":"fail"!==o,"text-error":"fail"===o}),"fail"===o?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const o=this.nucleon,i=null==o?void 0:o.data,r=null!==(t=null==i?void 0:i._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(r)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const o=this.nucleon;if(o)if(e){const t={result:null,state:"busy",href:e},i=new o.constructor.API(this);this.__loader=t;try{const o=await i.fetch(e,{method:"POST"});if(!o.ok)throw new Error;t.result=(await o.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let u,h,m,_,y,g,x,v,b,j,$,L,S,H=e=>e;const k=n(l(e,"cart-form"));class R extends k{constructor(){super(...arguments),this.itemCategories=null,this.templateSets=null,this.localeCodes=null,this.customers=null,this.countries=null,this.regions=null,this.coupons=null,this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__shippingRegionsLoaderId="shippingRegionsLoader",this.__billingRegionsLoaderId="billingRegionsLoader",this.__templateSetLoaderId="templateSetLoader",this.__countriesHelperLoaderId="countriesHelperLoader",this.__discountsLoaderId="discountsLoader",this.__customerLoaderId="customerLoader",this.__storeLoaderId="storeLoader",this.__customerTypeGetValue=()=>{var e;return this.form.customer_uri?(null===(e=this.__customer)||void 0===e?void 0:e.is_anonymous)?"guest":"regular":"new"},this.__customerTypeSetValue=e=>{this.edit({customer_uri:"",customer_email:""}),this.__isGuestMode="guest"===e},this.__customerTypeOptions=[{label:"option_new",value:"new"},{label:"option_guest",value:"guest"},{label:"option_regular",value:"regular"}],this.__customerGetValue=()=>this.form.customer_uri||this.form.customer_email,this.__customerSetValue=e=>{try{new URL(e);const t={},r=this.data,s=this.form;for(const e in this.form){if("customer_email"===e)continue;const o=i(s,e);i(r,e)!==o&&d(t,e,o)}this.undo(),this.edit(o(o({},t),{},{customer_uri:e}))}catch(t){this.edit({customer_uri:"",customer_email:e})}},this.__isGuestMode=!1}static get properties(){return o(o({},super.properties),{},{itemCategories:{attribute:"item-categories"},templateSets:{attribute:"template-sets"},localeCodes:{attribute:"locale-codes"},customers:{},countries:{},regions:{},coupons:{},__isGuestMode:{attribute:!1}})}static get v8n(){return[({billing_first_name:e})=>!e||e.length<=50||"billing-first-name:v8n_too_long",({billing_last_name:e})=>!e||e.length<=50||"billing-last-name:v8n_too_long",({billing_region:e})=>!e||e.length<=50||"billing-region:v8n_too_long",({billing_city:e})=>!e||e.length<=50||"billing-city:v8n_too_long",({billing_phone:e})=>!e||e.length<=50||"billing-phone:v8n_too_long",({billing_company:e})=>!e||e.length<=50||"billing-company:v8n_too_long",({billing_address2:e})=>!e||e.length<=100||"billing-address-two:v8n_too_long",({billing_address1:e})=>!e||e.length<=100||"billing-address-one:v8n_too_long",({billing_postal_code:e})=>!e||e.length<=50||"billing-postal-code:v8n_too_long",({shipping_first_name:e})=>!e||e.length<=50||"shipping-first-name:v8n_too_long",({shipping_last_name:e})=>!e||e.length<=50||"shipping-last-name:v8n_too_long",({shipping_region:e})=>!e||e.length<=50||"shipping-region:v8n_too_long",({shipping_city:e})=>!e||e.length<=50||"shipping-city:v8n_too_long",({shipping_phone:e})=>!e||e.length<=50||"shipping-phone:v8n_too_long",({shipping_company:e})=>!e||e.length<=50||"shipping-company:v8n_too_long",({shipping_address2:e})=>!e||e.length<=100||"shipping-address-two:v8n_too_long",({shipping_address1:e})=>!e||e.length<=100||"shipping-address-one:v8n_too_long",({shipping_postal_code:e})=>!e||e.length<=50||"shipping-postal-code:v8n_too_long"]}renderBody(){var e,t,o,i,r,n,l,d,c,f,p,g;const x=Object.values(null!==(e=this.__shippingRegions)&&void 0!==e?e:{}),v=Object.values(null!==(t=this.__billingRegions)&&void 0!==t?t:{}),b=Object.values(null!==(o=this.__countriesHelper)&&void 0!==o?o:{}),j=x.map((e=>({label:e.default,value:e.code}))),$=v.map((e=>({label:e.default,value:e.code}))),L=b.map((e=>({label:e.default,value:e.cc2}))),S=null===(i=this.__customer)||void 0===i?void 0:i._links["fx:customer_addresses"].href,k=this.__store,R=k?k.use_international_currency_symbol?"code":"symbol":void 0;let w=null;if(this.form.currency_code)w=this.form.currency_code;else{const e=this.__localeCodesHelper,t=null===(n=null!==(r=this.__templateSet)&&void 0!==r?r:this.__defaultTemplateSet)||void 0===n?void 0:n.locale_code,o=t?null==e?void 0:e.values[t]:void 0;o&&(w=null!==(d=null===(l=/Currency: ([A-Z]{3})/g.exec(o))||void 0===l?void 0:l[1])&&void 0!==d?d:null)}return s(m||(m=H` ${0} <div class="grid sm-grid-cols-2 gap-l"> <div class="sm-col-span-2"> <foxy-i18n class="text-l font-medium leading-s block" infer="" key="order_section_title"> </foxy-i18n> <foxy-i18n class="text-s text-secondary leading-s block" infer="" key="order_section_description"> </foxy-i18n> </div> <foxy-internal-select-control infer="customer-type" .getValue="${0}" .setValue="${0}" .options="${0}" @update="${0}"> </foxy-internal-select-control> <foxy-internal-async-combo-box-control item-label-path="email" item-value-path="_links.self.href" item-id-path="_links.self.href" first="${0}" infer="customer" allow-custom-value .selectedItem="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" item-id-path="_links.self.href" first="${0}" class="sm-col-span-2" infer="template-set-uri" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-list-control infer="items" class="min-w-0 sm-col-span-2" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="applied-coupon-codes" class="min-w-0 sm-col-span-2" first="${0}" limit="5" item="foxy-applied-coupon-code-card" form="${0}" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" item="foxy-custom-field-card" form="${0}" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" item="foxy-attribute-card" form="${0}" alert> </foxy-internal-async-list-control> <div class="grid gap-l"> <div> <foxy-i18n class="text-l font-medium leading-s block" infer="" key="billing_section_title"> </foxy-i18n> <foxy-i18n class="text-s text-secondary leading-s block" infer="" key="billing_section_description"> </foxy-i18n> </div> <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="billing-first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="billing-last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="billing-company"></foxy-internal-text-control> <foxy-internal-text-control infer="billing-phone"></foxy-internal-text-control> <foxy-internal-text-control property="billing_address1" infer="billing-address-one" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-text-control property="billing_address2" infer="billing-address-two" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-select-control infer="billing-country" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="billing-region" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control infer="billing-city"></foxy-internal-text-control> <foxy-internal-text-control infer="billing-postal-code"></foxy-internal-text-control> </div> </div> <div class="grid gap-l"> <div> <foxy-i18n class="text-l font-medium leading-s block" infer="" key="shipping_section_title"> </foxy-i18n> <foxy-i18n class="text-s text-secondary leading-s block" infer="" key="shipping_section_description"> </foxy-i18n> </div> <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="shipping-first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="shipping-last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="shipping-company"></foxy-internal-text-control> <foxy-internal-text-control infer="shipping-phone"></foxy-internal-text-control> <foxy-internal-text-control property="shipping_address1" infer="shipping-address-one" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-text-control property="shipping_address2" infer="shipping-address-two" class="col-span-2"> </foxy-internal-text-control> <foxy-internal-select-control infer="shipping-country" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="shipping-region" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control infer="shipping-city"></foxy-internal-text-control> <foxy-internal-text-control infer="shipping-postal-code"></foxy-internal-text-control> </div> </div> <div class="leading-m sm-col-span-2"> <div class="text-xl font-medium mb-s"> ${0} </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} ${0} </div> ${0} </div> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__customerTypeGetValue,this.__customerTypeSetValue,this.__customerTypeOptions,(()=>this.requestUpdate()),a(this.__customersHref),this.__customer,this.__customerGetValue,this.__customerSetValue,a(this.templateSets),null!==(c=this.__templateSet)&&void 0!==c?c:null,a(this.__itemsHref),(e=>s(h||(h=H` <foxy-item-card locale-codes="${0}" parent="${0}" infer="" href="${0}" .related="${0}"> </foxy-item-card> `),this.localeCodes,e.parent,e.href,e.related)),this.data?e=>{var t,o,i;return s(u||(u=H` <foxy-item-form customer-addresses="${0}" item-categories="${0}" locale-codes="${0}" coupons="${0}" parent="${0}" href="${0}" infer="" id="form" .related="${0}" @fetch="${0}" @update="${0}"> </foxy-item-form> `),a(null!=S?S:void 0),a(null!==(t=this.itemCategories)&&void 0!==t?t:void 0),a(null!==(o=this.localeCodes)&&void 0!==o?o:void 0),a(null!==(i=this.coupons)&&void 0!==i?i:void 0),e.dialog.parent,e.dialog.href,e.dialog.related,e.handleFetch,e.handleUpdate)}:null,a(null===(f=this.data)||void 0===f?void 0:f._links["fx:applied_coupon_codes"].href),a(this.data?"foxy-applied-coupon-code-form":void 0),a(null===(p=this.data)||void 0===p?void 0:p._links["fx:custom_fields"].href),a(this.data?"foxy-custom-field-form":void 0),a(null===(g=this.data)||void 0===g?void 0:g._links["fx:attributes"].href),a(this.data?"foxy-attribute-form":void 0),L,$,L,j,this.__renderTotalOrder(w,R),this.__renderTotals(w,R),this.__renderDiscounts(w,R),this.data?s(_||(_=H` <div class="grid gap-s sm-grid-cols-2 sm-gap-l sm-col-span-2"> <foxy-internal-cart-form-view-as-customer-control infer="view-as-customer"> </foxy-internal-cart-form-view-as-customer-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> </div> `)):s(y||(y=H`<foxy-internal-submit-control infer="create"></foxy-internal-submit-control>`)),a(this.__shippingRegionsHref),this.__shippingRegionsLoaderId,(()=>this.requestUpdate()),a(this.__billingRegionsHref),this.__billingRegionsLoaderId,(()=>this.requestUpdate()),a(this.__countriesHref),this.__countriesHelperLoaderId,(()=>this.requestUpdate()),a(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()),a(this.__discountsHref),this.__discountsLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()))}get __defaultTemplateSetHref(){var e,t,o;if(""===(null===(e=this.data)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(o=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==o?o:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __shippingRegionsHref(){var e;try{const t=new URL(null!==(e=this.regions)&&void 0!==e?e:""),o=this.form.shipping_country;return o&&t.searchParams.set("country_code",o),t.toString()}catch(e){}}get __billingRegionsHref(){var e;try{const t=new URL(null!==(e=this.regions)&&void 0!==e?e:""),o=this.form.billing_country;return o&&t.searchParams.set("country_code",o),t.toString()}catch(e){}}get __templateSetHref(){return this.form.template_set_uri||void 0}get __customersHref(){var e;try{const t=new URL(null!==(e=this.customers)&&void 0!==e?e:"");return t.searchParams.set("is_anonymous",this.__isGuestMode?"1":"0"),t.toString()}catch(e){}}get __countriesHref(){var e;return null!==(e=this.countries)&&void 0!==e?e:void 0}get __discountsHref(){var e,t;try{const o=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href)&&void 0!==t?t:"");return o.searchParams.set("limit","300"),o.toString()}catch(e){}}get __customerHref(){return this.form.customer_uri||void 0}get __itemsHref(){var e,t;try{const o=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:items"].href)&&void 0!==t?t:"");return o.searchParams.set("zoom","item_options"),o.toString()}catch(e){}}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __defaultTemplateSet(){var e,t;const o=`#${this.__defaultTemplateSetLoaderId}`,i=this.renderRoot.querySelector(o);return null!==(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const o=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(o))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __shippingRegions(){var e;const t=this.renderRoot.querySelector(`#${this.__shippingRegionsLoaderId}`);return null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.values}get __billingRegions(){var e;const t=this.renderRoot.querySelector(`#${this.__billingRegionsLoaderId}`);return null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.values}get __templateSet(){var e,t;const o=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(o))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __discounts(){return this.renderRoot.querySelector(`#${this.__discountsLoaderId}`)}get __countriesHelper(){var e;const t=this.renderRoot.querySelector(`#${this.__countriesHelperLoaderId}`);return null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.values}get __customer(){var e;return null===(e=this.renderRoot.querySelector(`#${this.__customerLoaderId}`))||void 0===e?void 0:e.data}get __store(){var e,t;const o=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(o))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderTotalOrder(e,t){const o=this.data;if(!o||!e||!t)return s(g||(g=H`--`));const i={amount:`${o.total_order} ${e}`,currencyDisplay:t};return s(x||(x=H`<foxy-i18n infer="totals" key="total_order" .options="${0}"></foxy-i18n>`),i)}__renderTotals(e,t){const o=this.data,i=o&&e&&t;return["total_item_price","total_shipping","total_tax"].map((r=>{const n={amount:`${null==o?void 0:o[r]} ${e}`,currencyDisplay:t};return s(v||(v=H` <div data-testid="${0}" class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer="totals"></foxy-i18n> ${0} </div> `),r,r,i?s(b||(b=H`<foxy-i18n infer="totals" key="price" .options="${0}"></foxy-i18n>`),n):s(j||(j=H`<span>--</span>`)))}))}__renderDiscounts(e,t){var o,i;const r=null===(i=null===(o=this.__discounts)||void 0===o?void 0:o.data)||void 0===i?void 0:i._embedded["fx:discounts"],n=e&&t;return null==r?void 0:r.map((o=>{const i={amount:`${o.amount} ${e}`,currencyDisplay:t};return s($||($=H` <div data-testclass="discount" class="flex justify-between text-m text-secondary"> <span>${0} • ${0}</span> ${0} </div> `),o.name,o.code,n?s(L||(L=H`<foxy-i18n infer="totals" key="price" .options="${0}"></foxy-i18n>`),i):s(S||(S=H`<span>--</span>`)))}))}}customElements.define("foxy-cart-form",R);export{R as CartForm};
|
|
1
|
+
import"./shared-7ce91c80.js";import"./shared-b98b8d02.js";import{I as e,a as t}from"./shared-7b8ad9c1.js";import"./shared-f1d2b5bb.js";import{c as r,h as i}from"./shared-dc73b9a5.js";import{_ as s,B as o}from"./shared-0f6e4584.js";import{c as n}from"./shared-4e709717.js";import"./shared-d4810405.js";import"./shared-6e355777.js";import{I as a}from"./shared-8c1df97c.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-2d723710.js";import{R as l,a as d}from"./shared-075796e2.js";import{i as c}from"./shared-9803aa7c.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-99940888.js";import"./shared-61f4e91a.js";import{g as p}from"./shared-bab2ea2c.js";import{T as h}from"./shared-77051754.js";import{T as _}from"./shared-8874ec69.js";import"./foxy-form-dialog.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./shared-c286c5ad.js";import"./shared-343d1fd7.js";import"./shared-0b01f721.js";import"./shared-f7a1193f.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./shared-24d71d01.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-10325cda.js";import"./shared-021c7a22.js";import"./shared-fb56178f.js";import"./shared-2099544a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5c05ac06.js";import"./shared-a0c6a159.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-51c4a6dd.js";import"./shared-797ba64a.js";import"./shared-2fc671cd.js";import"./shared-e5d37737.js";import"./shared-651c44fa.js";import"./shared-acdcae7e.js";import"./shared-3e03c988.js";import"./shared-fe77f6f6.js";import"./shared-b6814728.js";import"./shared-634b670e.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-a6273e4a.js";import"./shared-10b5e78f.js";import"./shared-e6e84ff5.js";import"./shared-a036e345.js";import"./shared-cc79152c.js";import"./shared-4c2d43e6.js";import"./shared-70a5fad6.js";import"./shared-df00a537.js";import"./shared-339bbd50.js";import"./shared-e2a61f69.js";import"./shared-72f41a65.js";import"./shared-77c4acdd.js";import"./shared-3fa791ca.js";import"./shared-292ba15e.js";import"./shared-cbb0e610.js";import"./shared-ffd3690b.js";import"./shared-303b428e.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-8438d4ca.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-39a33102.js";import"./shared-01b2cad8.js";import"./shared-6d645dc5.js";let f,y,v=e=>e;customElements.define("foxy-internal-summary-control",class extends e{static get styles(){return[...super.styles,r(f||(f=v`::slotted(*){padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}::slotted(:not(:first-child)){border-top:thin var(--foxy-border-style,solid) var(--lumo-contrast-5pct)!important}`))]}renderLightDom(){}renderControl(){return i(y||(y=v` <p class="mb-xs font-medium text-secondary text-s" ?hidden="${0}">${0}</p> <div class="border border-contrast-5 rounded"><slot></slot></div> <p class="mt-xs text-xs text-secondary" ?hidden="${0}">${0}</p> `),!this.label,this.label,!this.helperText,this.helperText)}});let x,g,b,$=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.invert=!1}static get properties(){return s(s({},super.properties),{},{invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return i(x||(x=$` <div class="flex items-center leading-xs"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> <p class="text-s text-secondary">${0}</p> <p class="text-s text-error" ?hidden="${0}"> ${0} </p> </div> ${0} </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.readonly?i(g||(g=$`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):i(b||(b=$` <div style="height:1em" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((var(--lumo-space-m) * 2) + (var(--lumo-space-xs) * 2))" class="${0}" @click="${0}"> <div style="width:var(--lumo-space-m);height:var(--lumo-space-m)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),n({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),n({"transition-all transform block rounded-full m-xs":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled,"group-hover-scale-110":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})))}});let j,k,w=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends t{constructor(){super(...arguments),this.__loader=null}static get properties(){return s(s({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,s=null===(t=this.__loader)||void 0===t?void 0:t.result;return s?i(j||(j=w` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),s):i(k||(k=w` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),n({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,i=null==r?void 0:r.data,s=null!==(t=null==i?void 0:i._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(s)}async __reloadSessionHref(e){var t;if(console.log("RELOAD SESSION HREF",e),(null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},i=new r.constructor.API(this);this.__loader=t;try{const r=await i.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let P;const S=r(P||(P=(e=>e)`
|
|
2
|
+
#dialog{
|
|
3
|
+
width:100dvw;
|
|
4
|
+
max-height:calc(100dvh - var(--lumo-space-m));
|
|
5
|
+
max-width:none;
|
|
6
|
+
opacity:0;
|
|
7
|
+
transform:translateY(100%);
|
|
8
|
+
transition:all 500ms allow-discrete;
|
|
9
|
+
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
|
|
10
|
+
margin:auto 0 0 0;
|
|
11
|
+
border-radius:var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#dialog::backdrop{
|
|
15
|
+
background-color:transparent;
|
|
16
|
+
transition:all 500ms allow-discrete;
|
|
17
|
+
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#dialog[open]{
|
|
21
|
+
opacity:1;
|
|
22
|
+
transform:none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#dialog[open]::backdrop{
|
|
26
|
+
background-color:var(--lumo-shade-50pct);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@starting-style{
|
|
30
|
+
#dialog[open]{
|
|
31
|
+
opacity:0;
|
|
32
|
+
transform:translateY(100%);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@starting-style{
|
|
37
|
+
#dialog[open]::backdrop{
|
|
38
|
+
background-color:transparent;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media all and (min-width: 640px){
|
|
43
|
+
#dialog{
|
|
44
|
+
max-width:30rem;
|
|
45
|
+
max-height:calc(100dvh - var(--lumo-space-m));
|
|
46
|
+
transform:scale(1.1);
|
|
47
|
+
margin:auto;
|
|
48
|
+
border-radius:var(--lumo-border-radius-l);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@starting-style{
|
|
52
|
+
#dialog[open]{
|
|
53
|
+
transform:scale(1.1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`));let U,L,E,T,A,C,O=e=>e;class R extends(l(e)){constructor(){super(...arguments),this.countries=null,this.customer=null,this.regions=null,this.type=null}static get properties(){return s(s({},super.properties),{},{countries:{},customer:{type:Object},regions:{},type:{}})}static get styles(){return[...super.styles,S]}get disabledSelector(){var e;const t=[super.disabledSelector.toString()];return(null===(e=this.__regionsLoader)||void 0===e?void 0:e.data)||t.unshift("address:state"),new o(t.join(" ").toString())}renderControl(){var e,t;const r=this.__regionOptions,s=null!==(e=this.type)&&void 0!==e?e:"billing",o=this.__mergedAddress;return i(U||(U=O` <div class="flex flex-col gap-m sm-flex-row items-start leading-xs"> <div class="flex-1"> <p class="text-m text-body">${0}</p> <p class="text-s text-secondary">${0}</p> <p class="text-s text-error" ?hidden="${0}"> ${0} </p> </div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> ${0} </button> </div> <dialog id="dialog" class="p-m bg-base shadow-xxl space-y-m"> <h2 class="text-xl font-medium"> <foxy-i18n infer="" key="label"></foxy-i18n> </h2> <foxy-internal-summary-control infer="name"> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="address"> ${0} ${0} ${0} <foxy-internal-select-control placeholder="${0}" property="${0}_country" layout="summary-item" infer="country" .options="${0}"> </foxy-internal-select-control> ${0} ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="extra"> ${0} ${0} </foxy-internal-summary-control> <p class="text-s text-secondary"> <foxy-i18n infer="" key="form_helper_text"></foxy-i18n> </p> <div class="flex justify-between gap-m"> <vaadin-button theme="error" ?disabled="${0}" ?hidden="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="done"></foxy-i18n> </vaadin-button> </div> </dialog> <foxy-nucleon class="hidden" infer="" href="${0}" id="countriesLoader" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="regionsLoader" @update="${0}"> </foxy-nucleon> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.t("edit"),n({"text-left sm-text-right transition-colors transition-opacity":!0,"text-body cursor-pointer hover-opacity-80":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),this.disabled||this.readonly,(()=>{var e;return null===(e=this.__dialog)||void 0===e?void 0:e.showModal()}),this.__isAddressEmpty?i(L||(L=O`<foxy-i18n infer="" key="not_set"></foxy-i18n>`)):i(E||(E=O` <div> ${0} ${0} </div> <div>${0}</div> <div>${0}</div> <div> ${0} ${0} ${0} ${0} ${0} ${0} </div> `),this.__renderAddressPart(o.first_name),this.__renderAddressPart(o.last_name),this.__renderAddressPart(o.company),this.__renderAddressPart(o.phone),this.__renderAddressPart(o.address1),this.__renderAddressPart(o.address2),this.__renderAddressPart(o.city),this.__renderAddressPart(o.state),this.__renderAddressPart(o.postal_code),this.__renderAddressPart(o.country)),this.__renderTextField(o.first_name),this.__renderTextField(o.last_name),this.__renderTextField(o.address1),this.__renderTextField(o.address2),this.__renderTextField(o.city),c(this.__getPlaceholder(o.country)),s,this.__countryOptions,r.length>0?i(T||(T=O` <foxy-internal-select-control placeholder="${0}" property="${0}_state" layout="summary-item" infer="state" .options="${0}"> </foxy-internal-select-control> `),c(this.__getPlaceholder(o.state)),s,r):this.__renderTextField(o.state),this.__renderTextField(o.postal_code),this.__renderTextField(o.company),this.__renderTextField(o.phone),this.disabled,this.readonly,(()=>{var e;null===(e=this.nucleon)||void 0===e||e.edit({[`${s}_first_name`]:null,[`${s}_last_name`]:null,[`${s}_company`]:null,[`${s}_address1`]:null,[`${s}_address2`]:null,[`${s}_city`]:null,[`${s}_state`]:null,[`${s}_postal_code`]:null,[`${s}_country`]:null,[`${s}_phone`]:null})}),this.disabled,(()=>{var e;return null===(e=this.__dialog)||void 0===e?void 0:e.close()}),c(null!==(t=this.countries)&&void 0!==t?t:void 0),(()=>this.requestUpdate()),c(this.__regionsUrl),(()=>this.requestUpdate()))}__renderAddressPart(e){const t=this.__getDisplayText(e);return i(A||(A=O` <span class="${0}"> ${0} </span> `),n({"text-success bg-success-10":e.modified&&!this.disabled,"bg-contrast-5":e.modified&&this.disabled,"inline-block":!!t,"rounded-s":!0,hidden:!t}),t)}__renderTextField(e){var t;return i(C||(C=O` <foxy-internal-text-control placeholder="${0}" property="${0}_${0}" layout="summary-item" infer="${0}" @clear="${0}"> </foxy-internal-text-control> `),c(this.__getPlaceholder(e)),null!==(t=this.type)&&void 0!==t?t:"billing",e.field,e.field.replace(/_/g,"-").replace("1","-one").replace("2","-two"),(()=>{var t,r;return null===(t=this.nucleon)||void 0===t?void 0:t.edit({[`${null!==(r=this.type)&&void 0!==r?r:"billing"}_${e.field}`]:null})}))}__getDisplayText(e){return e.value||(e.modified?"--":"")}__getPlaceholder(e){return e.modified?this.t("empty_modified_placeholder"):e.originalValue||void 0}get __countriesLoader(){return this.renderRoot.querySelector("#countriesLoader")}get __countryOptions(){var e,t,r;return Object.values(null!==(r=null===(t=null===(e=this.__countriesLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==r?r:{}).map((e=>({rawLabel:e.default,value:e.cc2})))}get __isAddressEmpty(){return Object.values(this.__mergedAddress).every((e=>""===this.__getDisplayText(e)))}get __regionOptions(){var e,t,r;return Object.values(null!==(r=null===(t=null===(e=this.__regionsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==r?r:{}).map((e=>({rawLabel:e.default,value:e.code})))}get __regionsLoader(){return this.renderRoot.querySelector("#regionsLoader")}get __mergedAddress(){var e,t,r;const i=null===(e=this.nucleon)||void 0===e?void 0:e.form,s="shipping"===this.type?"shipping":"billing",o=null!==(r=null===(t=this.customer)||void 0===t?void 0:t._embedded[`fx:default_${s}_address`])&&void 0!==r?r:{},n=["first_name","last_name","company","address1","address2","city","state","postal_code","country","phone"].reduce(((e,t)=>{var r;const n=null==i?void 0:i[`${s}_${t}`],a=null==o?void 0:o["state"===t?"region":t];return e[t]={originalValue:String(null!=a?a:""),modified:null!==n,value:String(null!==(r=null!=n?n:a)&&void 0!==r?r:""),field:t},e}),{});return n}get __regionsUrl(){var e;try{const t=new URL(null!==(e=this.regions)&&void 0!==e?e:""),r=this.__mergedAddress.country.value;return r&&t.searchParams.set("country_code",r),t.toString()}catch(e){}}get __dialog(){return this.renderRoot.querySelector("#dialog")}}customElements.define("foxy-internal-cart-form-address-summary-item",R);let M,F=e=>e;customElements.define("foxy-internal-cart-form-payment-method-form",class extends a{constructor(){super(...arguments),this.defaultPaymentMethod=null,this.paymentCardEmbedUrl=null,this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{defaultPaymentMethod:{attribute:"default-payment-method"},paymentCardEmbedUrl:{attribute:"payment-card-embed-url"},selectionProps:{attribute:!1}})}renderBody(){var e,t;return i(M||(M=F` <foxy-update-payment-method-form embed-url="${0}" infer="default-payment-method" href="${0}" @update="${0}"> </foxy-update-payment-method-form> <div class="flex items-center gap-m"> <div class="border-t border-contrast-10 flex-1"></div> <foxy-i18n class="text-tertiary" infer="" key="or"></foxy-i18n> <div class="border-t border-contrast-10 flex-1"></div> </div> <h2 class="text-xl font-medium"> <foxy-i18n infer="" key="select_previous"></foxy-i18n> </h2> <foxy-internal-async-list-control infer="selection" limit="5" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),c(null!==(e=this.paymentCardEmbedUrl)&&void 0!==e?e:void 0),c(null!==(t=this.defaultPaymentMethod)&&void 0!==t?t:void 0),(e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===u.UpdateResult.ResourceUpdated&&(this.edit({selection:""}),this.submit())}),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),m(this.selectionProps))}});let I,q,D=e=>e;customElements.define("foxy-internal-cart-form-payment-method-card",class extends h{renderBody(){return super.renderBody({title:e=>{var t,r,s,o,n;const a=null===(r=null===(t=e._embedded)||void 0===t?void 0:t["fx:payments"])||void 0===r?void 0:r[0],l=null!==(s=null==a?void 0:a.cc_type)&&void 0!==s?s:"",d=null===(o=null==a?void 0:a.cc_exp_year)||void 0===o?void 0:o.substring(2),c=null==a?void 0:a.cc_exp_month,u=null===(n=null==a?void 0:a.cc_number_masked)||void 0===n?void 0:n.replace(/x/gi,"");return i(I||(I=D`<foxy-i18n infer="" key="title" .options="${0}"></foxy-i18n>`),{last4Digits:u,context:l&&d&&c&&u?"valid":"invalid",month:c,type:l,year:d})},subtitle:e=>{var t,r,s;const o=null===(r=null===(t=e._embedded)||void 0===t?void 0:t["fx:payments"])||void 0===r?void 0:r[0],n={id:p(e._links.self.href),date:null!==(s=null==o?void 0:o.date_created)&&void 0!==s?s:e.transaction_date};return i(q||(q=D`<foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n>`),n)}})}});let H,V,z,B,G,W=e=>e;customElements.define("foxy-internal-cart-form-totals-control",class extends t{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var e,t,r,s,o;const n=null===(e=this.nucleon)||void 0===e?void 0:e.data;return n?i(V||(V=W` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>:</span> <span>${0}</span> <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>:</span> <span>${0} </span> <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>:</span> <span>${0}</span> ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> <span></span> <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>: ${0} </span> </span> </p> `),c(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(n.total_item_price),this.__renderPrice(n.total_shipping,!0),this.__renderPrice(n.total_tax,!0),null===(r=null===(t=null==n?void 0:n._embedded)||void 0===t?void 0:t["fx:applied_gift_card_codes"])||void 0===r?void 0:r.map((e=>{var t;return i(z||(z=W` <span>${0}:</span> <span>${0}</span> `),e._embedded["fx:gift_card"].name,this.__renderPrice(null!==(t=e.balance_adjustment)&&void 0!==t?t:0,!0))})),null===(o=null===(s=null==n?void 0:n._embedded)||void 0===s?void 0:s["fx:discounts"])||void 0===o?void 0:o.map((e=>i(B||(B=W` <span data-testclass="discount">${0}:</span> <span>${0}</span> `),e.name,this.__renderPrice(e.amount,!0)))),this.__renderPrice(n.total_order)):i(H||(H=W``))}get __storeHref(){var e,t,r;return null===(r=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:store"])||void 0===r?void 0:r.href}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderPrice(e,t=!1){var r,s,o;const n=(null===(r=this.__store)||void 0===r?void 0:r.use_international_currency_symbol)?"code":"symbol",a=null===(o=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===o?void 0:o.currency_code;return i(G||(G=W` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),t&&0!==e?e>0?"text-success":"text-error":"",{currencyDisplay:n,signDisplay:t?"exceptZero":"auto",amount:`${e} ${a}`})}});let Y,N,Z=e=>e;const J=l(d(a,"cart-form"));class K extends J{constructor(){super(...arguments),this.paymentCardEmbedUrl=null,this.itemCategories=null,this.templateSets=null,this.localeCodes=null,this.languages=null,this.customers=null,this.countries=null,this.regions=null,this.coupons=null,this.__languagesLoaderId="languagesLoader",this.__customerLoaderId="customerLoader",this.__paymentMethodUriGetDisplayValueOptions=e=>{var t,r,i,s;const o=null!==(i=null===(r=null===(t=null==e?void 0:e._embedded)||void 0===t?void 0:t["fx:payments"])||void 0===r?void 0:r[0])&&void 0!==i?i:null,n=null==o?void 0:o.cc_exp_month,a=null==o?void 0:o.cc_exp_year,l=null===(s=null==o?void 0:o.cc_number_masked)||void 0===s?void 0:s.replace(/x/g,""),d=null==o?void 0:o.cc_type;return{cc_exp_month:null!=n?n:"",cc_exp_year:null!=a?a:"",cc_last4:null!=l?l:"",cc_type:null!=d?d:"",context:l&&n&&a&&d?"":"empty"}},this.__paymentMethodUriSetValue=e=>{try{const t=new URL(e);t.search="",t.pathname+="/payments",this.edit({payment_method_uri:t.toString()})}catch(e){this.edit({payment_method_uri:""})}},this.__paymentMethodUriFilters=[{label:"filter_type",type:_.String,path:"payments:type",list:[{label:"filter_type_value_purchase_order",value:"purchase_order"},{label:"filter_type_value_amazon_mws",value:"amazon_mws"},{label:"filter_type_value_paypal_ec",value:"paypal_ec"},{label:"filter_type_value_paypal",value:"paypal"},{label:"filter_type_value_hosted",value:"hosted"},{label:"filter_type_value_ogone",value:"ogone"}]},{label:"filter_cc_type",type:_.String,path:"payments:cc_type",list:[{label:"filter_cc_type_value_mastercard",value:"mastercard"},{label:"filter_cc_type_value_discover",value:"discover"},{label:"filter_cc_type_value_unionpay",value:"unionpay"},{label:"filter_cc_type_value_maestro",value:"maestro"},{label:"filter_cc_type_value_diners",value:"diners"},{label:"filter_cc_type_value_visa",value:"visa"},{label:"filter_cc_type_value_amex",value:"amex"},{label:"filter_cc_type_value_jcb",value:"jcb"}]},{label:"filter_cc_number_masked",type:_.String,path:"payments:cc_number_masked"}],this.__customerUriSetValue=e=>{this.edit({customer_uri:e,customer_email:""})},this.__customerUriOptions=[{label:"filter_email",path:"email",type:_.String},{label:"filter_is_anonymous",path:"is_anonymous",type:_.String,list:[{value:"false",label:"filter_is_anonymous_value_false"},{value:"true",label:"filter_is_anonymous_value_true"}]}]}static get properties(){return s(s({},super.properties),{},{paymentCardEmbedUrl:{attribute:"payment-card-embed-url"},itemCategories:{attribute:"item-categories"},templateSets:{attribute:"template-sets"},localeCodes:{attribute:"locale-codes"},languages:{},customers:{},countries:{},regions:{},coupons:{}})}static get v8n(){return[({billing_first_name:e})=>!e||e.length<=50||"billing-first-name:v8n_too_long",({billing_last_name:e})=>!e||e.length<=50||"billing-last-name:v8n_too_long",({billing_state:e})=>!e||e.length<=50||"billing-state:v8n_too_long",({billing_city:e})=>!e||e.length<=50||"billing-city:v8n_too_long",({billing_phone:e})=>!e||e.length<=50||"billing-phone:v8n_too_long",({billing_company:e})=>!e||e.length<=50||"billing-company:v8n_too_long",({billing_address2:e})=>!e||e.length<=100||"billing-address-two:v8n_too_long",({billing_address1:e})=>!e||e.length<=100||"billing-address-one:v8n_too_long",({billing_postal_code:e})=>!e||e.length<=50||"billing-postal-code:v8n_too_long",({shipping_first_name:e})=>!e||e.length<=50||"shipping-first-name:v8n_too_long",({shipping_last_name:e})=>!e||e.length<=50||"shipping-last-name:v8n_too_long",({shipping_state:e})=>!e||e.length<=50||"shipping-state:v8n_too_long",({shipping_city:e})=>!e||e.length<=50||"shipping-city:v8n_too_long",({shipping_phone:e})=>!e||e.length<=50||"shipping-phone:v8n_too_long",({shipping_company:e})=>!e||e.length<=50||"shipping-company:v8n_too_long",({shipping_address2:e})=>!e||e.length<=100||"shipping-address-two:v8n_too_long",({shipping_address1:e})=>!e||e.length<=100||"shipping-address-one:v8n_too_long",({shipping_postal_code:e})=>!e||e.length<=50||"shipping-postal-code:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.form.customer_uri?e.unshift("general:customer-email"):e.unshift("billing:payment-method-uri"),this.data?this.form.use_customer_shipping_address||e.unshift("shipping:shipping-address"):e.unshift("applied-coupon-codes","custom-fields","attributes","shipping","billing","totals","items"),new o(e.join(" ").trim())}renderHeaderActions(){return i(Y||(Y=Z` <foxy-internal-cart-form-create-session-action infer="view-as-customer"> </foxy-internal-cart-form-create-session-action> `))}renderBody(){var e,t,r,s,o,n,a,l,d,u,m,p,h,_;const f=null===(e=this.data)||void 0===e?void 0:e._links,y=this.__customer,v=null==y?void 0:y._links["fx:customer_addresses"].href;return i(N||(N=Z` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="template-set-uri" item="foxy-template-set-card"> </foxy-internal-resource-picker-control> <foxy-internal-select-control layout="summary-item" infer="language" .options="${0}"> </foxy-internal-select-control> <foxy-internal-resource-picker-control layout="summary-item" first="${0}" infer="customer-uri" item="foxy-customer-card" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-text-control layout="summary-item" infer="customer-email"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" alert item="foxy-item-card" form="foxy-item-form" .related="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-cart-form-totals-control class="min-w-0" infer="totals"> </foxy-internal-cart-form-totals-control> <foxy-internal-async-list-control infer="applied-coupon-codes" class="min-w-0" first="${0}" item="foxy-applied-coupon-code-card" form="foxy-applied-coupon-code-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="billing"> <foxy-internal-resource-picker-control placeholder="${0}" layout="summary-item" first="${0}" infer="payment-method-uri" item="foxy-internal-cart-form-payment-method-card" form="foxy-internal-cart-form-payment-method-form" .getDisplayValueOptions="${0}" .formProps="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-cart-form-address-summary-item countries="${0}" regions="${0}" infer="billing-address" type="billing" .customer="${0}"> </foxy-internal-cart-form-address-summary-item> </foxy-internal-summary-control> <foxy-internal-summary-control infer="shipping"> <foxy-internal-switch-control infer="use-customer-shipping-address" invert> </foxy-internal-switch-control> <foxy-internal-cart-form-address-summary-item countries="${0}" regions="${0}" infer="shipping-address" type="shipping" .customer="${0}"> </foxy-internal-cart-form-address-summary-item> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" item="foxy-custom-field-card" form="foxy-custom-field-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),c(null!==(t=this.templateSets)&&void 0!==t?t:void 0),this.__languageOptions,c(null!==(r=this.customers)&&void 0!==r?r:void 0),this.__customerUriSetValue,this.__customerUriOptions,c(this.__itemsHref),this.href?[this.href]:[],{"locale-codes":null!==(s=this.localeCodes)&&void 0!==s?s:""},{"customer-addresses":null!=v?v:"","item-categories":null!==(o=this.itemCategories)&&void 0!==o?o:"","locale-codes":null!==(n=this.localeCodes)&&void 0!==n?n:"",coupons:null!==(a=this.coupons)&&void 0!==a?a:""},c(null==f?void 0:f["fx:applied_coupon_codes"].href),this.href?[this.href]:[],this.__paymentMethodUriPlaceholder,c(this.__transactionsWithPaymentsUrl),this.__paymentMethodUriGetDisplayValueOptions,{"default-payment-method":null!==(l=null==y?void 0:y._links["fx:default_payment_method"].href)&&void 0!==l?l:"","payment-card-embed-url":null!==(d=this.__pickerPaymentCardEmbedUrl)&&void 0!==d?d:""},this.__paymentMethodUriSetValue,this.__paymentMethodUriFilters,c(null!==(u=this.countries)&&void 0!==u?u:void 0),c(null!==(m=this.regions)&&void 0!==m?m:void 0),y,c(null!==(p=this.countries)&&void 0!==p?p:void 0),c(null!==(h=this.regions)&&void 0!==h?h:void 0),y,c(null==f?void 0:f["fx:custom_fields"].href),c(null==f?void 0:f["fx:attributes"].href),super.renderBody(),c(null!==(_=this.languages)&&void 0!==_?_:void 0),this.__languagesLoaderId,(()=>this.requestUpdate()),c(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()))}get __paymentMethodUriPlaceholder(){var e,t,r,i,s,o;const n=null===(e=this.__customer)||void 0===e?void 0:e._embedded["fx:default_payment_method"],a=null!==(t=null==n?void 0:n.cc_exp_month)&&void 0!==t?t:null,l=null!==(r=null==n?void 0:n.cc_exp_year)&&void 0!==r?r:null,d=null!==(s=null===(i=null==n?void 0:n.cc_number_masked)||void 0===i?void 0:i.replace(/x/g,""))&&void 0!==s?s:null,c=null!==(o=null==n?void 0:n.cc_type)&&void 0!==o?o:null;return this.t("billing.payment-method-uri.value",{cc_exp_month:null!=a?a:"",cc_exp_year:null!=l?l:"",cc_last4:null!=d?d:"",cc_type:null!=c?c:"",context:d&&a&&l&&c?"":"empty"})}get __transactionsWithPaymentsUrl(){var e,t;try{const r=new URL(null!==(t=null===(e=this.__customer)||void 0===e?void 0:e._links["fx:transactions"].href)&&void 0!==t?t:"");return r.searchParams.set("zoom","payments"),r.toString()}catch(e){}}get __pickerPaymentCardEmbedUrl(){var e,t;try{const r=new URL(null!==(e=this.paymentCardEmbedUrl)&&void 0!==e?e:""),i=p(null!==(t=this.form.template_set_uri)&&void 0!==t?t:"");if(null!==i)return r.searchParams.set("template_set_id",String(i)),r.toString()}catch(e){}}get __customerHref(){var e;try{const t=new URL(null!==(e=this.form.customer_uri)&&void 0!==e?e:"");return t.searchParams.set("zoom","default_payment_method,default_billing_address,default_shipping_address"),t.toString()}catch(e){}}get __itemsHref(){var e,t;try{const r=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:items"].href)&&void 0!==t?t:"");return r.searchParams.set("zoom","item_options"),r.toString()}catch(e){}}get __languageOptions(){var e,t;const r=this.renderRoot.querySelector(`#${this.__languagesLoaderId}`);return Object.entries(null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.values)&&void 0!==t?t:{}).map((([e,t])=>({rawLabel:t,value:e})))}get __customer(){var e;return null===(e=this.renderRoot.querySelector(`#${this.__customerLoaderId}`))||void 0===e?void 0:e.data}}customElements.define("foxy-cart-form",K);export{K as CartForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-61f4e91a.js";import{a as e}from"./shared-075796e2.js";import{I as t}from"./shared-a6273e4a.js";import{h as r}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-0f6e4584.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let i,s,a,o,d=e=>e;const C=e(t,"client-card");class l extends C{static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2168_15479)'%3E%3Crect width='40' height='40' fill='%23E8E8E8'/%3E%3Cpath d='M6.93609 0H0V6.93609L6.93609 0Z' fill='white'/%3E%3Cpath d='M0 8.35031V16.2326L16.2326 0H8.35031L0 8.35031Z' fill='white'/%3E%3Cpath d='M23.4667 20C23.4667 21.9146 21.9146 23.4667 20 23.4667C18.0854 23.4667 16.5333 21.9146 16.5333 20C16.5333 18.0854 18.0854 16.5333 20 16.5333C21.9146 16.5333 23.4667 18.0854 23.4667 20Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.6468 0L0 17.6468V25.529L5.75703 19.772C5.9523 19.5767 6.26888 19.5767 6.46414 19.772C6.6594 19.9673 6.6594 20.2839 6.46414 20.4791L0 26.9433V34.8255L7.67907 27.1464C7.87433 26.9512 8.19091 26.9512 8.38617 27.1464C8.58144 27.3417 8.58144 27.6583 8.38617 27.8536L0 36.2397V40H4.12198L12.4755 31.6464C12.6708 31.4512 12.9874 31.4512 13.1826 31.6464C13.3779 31.8417 13.3779 32.1583 13.1826 32.3536L5.5362 40H13.4185L19.8826 33.5359C20.0779 33.3406 20.3944 33.3406 20.5897 33.5359C20.785 33.7311 20.785 34.0477 20.5897 34.243L14.8327 40H22.7149L40 22.7149V14.8327L34.3536 20.4791C34.1583 20.6744 33.8417 20.6744 33.6464 20.4791C33.4512 20.2839 33.4512 19.9673 33.6464 19.772L40 13.4185V5.5362L32.3536 13.1826C32.1583 13.3779 31.8417 13.3779 31.6464 13.1826C31.4512 12.9874 31.4512 12.6708 31.6464 12.4755L40 4.12198V0H36.2397L27.8536 8.38617C27.6583 8.58144 27.3417 8.58144 27.1464 8.38617C26.9512 8.19091 26.9512 7.87433 27.1464 7.67907L34.8255 0H26.9433L20.5897 6.35355C20.3944 6.54882 20.0779 6.54882 19.8826 6.35355C19.6873 6.15829 19.6873 5.84171 19.8826 5.64645L25.529 0H17.6468ZM12.6461 28.5796L11.4204 27.3539C10.7435 26.677 10.7435 25.5795 11.4204 24.9026L11.7742 24.5489C12.0955 24.2275 12.1662 23.7396 11.992 23.3199C11.8178 22.9003 11.421 22.6 10.9668 22.6H10.4667C9.50938 22.6 8.73334 21.824 8.73334 20.8667V19.1333C8.73334 18.176 9.50938 17.4 10.4667 17.4H10.9668C11.421 17.4 11.8178 17.0997 11.992 16.6801C12.1662 16.2604 12.0955 15.7725 11.7742 15.4511L11.4204 15.0974C10.7435 14.4205 10.7435 13.323 11.4204 12.6461L12.6461 11.4204C13.323 10.7435 14.4205 10.7435 15.0974 11.4204L15.4511 11.7742C15.7725 12.0955 16.2604 12.1662 16.6801 11.992C17.0997 11.8178 17.4 11.421 17.4 10.9668V10.4667C17.4 9.50938 18.176 8.73334 19.1333 8.73334H20.8667C21.824 8.73334 22.6 9.50938 22.6 10.4667V10.9668C22.6 11.421 22.9003 11.8178 23.3199 11.992C23.7396 12.1662 24.2275 12.0955 24.5489 11.7742L24.9026 11.4204C25.5795 10.7435 26.677 10.7435 27.3539 11.4204L28.5796 12.6461C29.2565 13.323 29.2565 14.4205 28.5796 15.0974L28.2259 15.4511C27.9045 15.7725 27.8338 16.2604 28.0081 16.6801C28.1822 17.0997 28.579 17.4 29.0333 17.4H29.5333C30.4906 17.4 31.2667 18.176 31.2667 19.1333V20.8667C31.2667 21.824 30.4906 22.6 29.5333 22.6H29.0332C28.579 22.6 28.1822 22.9003 28.0081 23.3199C27.8338 23.7396 27.9045 24.2275 28.2259 24.5489L28.5796 24.9026C29.2565 25.5795 29.2565 26.677 28.5796 27.3539L27.3539 28.5796C26.677 29.2565 25.5795 29.2565 24.9026 28.5796L24.5489 28.2259C24.2275 27.9045 23.7396 27.8338 23.3199 28.0081C22.9003 28.1822 22.6 28.579 22.6 29.0333V29.5333C22.6 30.4906 21.824 31.2667 20.8667 31.2667H19.1333C18.176 31.2667 17.4 30.4906 17.4 29.5333V29.0333C17.4 28.579 17.0997 28.1822 16.6801 28.0081C16.2604 27.8338 15.7725 27.9045 15.4511 28.2259L15.0974 28.5796C14.4205 29.2565 13.323 29.2565 12.6461 28.5796Z' fill='white'/%3E%3Cpath d='M40 24.1291L24.1291 40H32.0114L40 32.0114V24.1291Z' fill='white'/%3E%3Cpath d='M40 33.4256L33.4256 40H40V33.4256Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2168_15479'%3E%3Crect width='40' height='40' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"}renderBody(){const e=l.defaultImageSrc,t=this.data;return r(i||(i=d` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <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 leading-s -my-xs"> <p class="text-m truncate text-body font-medium"> ${0} </p> <p class="text-s truncate text-secondary"> ${0} </p> <p class="text-s truncate text-tertiary"> ${0} • ${0} </p> </figcaption> </figure> `),(null==t?void 0:t.company_logo)||e,this.t("image_alt"),(t=>t.currentTarget.src=e),(null==t?void 0:t.project_name.trim())||r(s||(s=d`<foxy-i18n infer="" key="no_project_name"></foxy-i18n>`)),(null==t?void 0:t.project_description.trim())||r(a||(a=d`<foxy-i18n infer="" key="no_project_description"></foxy-i18n>`)),t?new URL(t.redirect_uri).host:"",(null==t?void 0:t.company_name)||r(o||(o=d`<foxy-i18n infer="" key="no_company_name"></foxy-i18n>`)))}}customElements.define("foxy-client-card",l);export{l as ClientCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-72f41a65.js";import"./shared-6e355777.js";import{I as r}from"./shared-8c1df97c.js";import{R as t,a as e}from"./shared-075796e2.js";import{B as o}from"./shared-0f6e4584.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-77c4acdd.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-3e03c988.js";import"./shared-fe77f6f6.js";import"./shared-e5d37737.js";import"./shared-acdcae7e.js";import"./shared-61ade33e.js";import"./shared-8f7a31e0.js";import"./shared-7b8ad9c1.js";import"./shared-51c4a6dd.js";import"./shared-f1d2b5bb.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";import"./shared-2d723710.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-fb56178f.js";import"./shared-ff63a551.js";import"./shared-5c05ac06.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,n=r=>r;const i=t(e(r,"client-form"));class c extends i{get readonlySelector(){const r=["client-secret"];return(this.data||this.in({busy:"fetching"}))&&r.push("client-id"),new o(`${r.join(" ")} ${super.readonlySelector.toString()}`)}get hiddenSelector(){const r=[];return this.data||this.in({busy:"fetching"})||r.push("client-secret"),new o(`${r.join(" ")} ${super.hiddenSelector.toString()}`)}renderBody(){return s(a||(a=n` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="client-id"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="client-secret"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="redirect-uri"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="project-name"> </foxy-internal-text-control> <foxy-internal-text-area-control class="col-span-2" infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-text-control infer="company-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company-url"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="company-logo"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="contact-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="contact-email"></foxy-internal-text-control> <foxy-internal-text-control infer="contact-phone"></foxy-internal-text-control> </div> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-client-form",c);export{c as ClientForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{_ as e}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import{_ as e}from"./shared-0f6e4584.js";import{h as t}from"./shared-dc73b9a5.js";import{a as s}from"./shared-075796e2.js";import{C as r}from"./shared-0b01f721.js";import{F as i}from"./shared-343d1fd7.js";import{N as a}from"./shared-24d71d01.js";import{r as n}from"./shared-a0c6a159.js";import{s as o}from"./shared-99940888.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-f7a1193f.js";import"./shared-9803aa7c.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";let l,d=e=>e;const h=r(s(a));class p extends h{constructor(){super(),this.props={},this.__pageFetchEventHandler=e=>this.__handlePageFetchEvent(e),this.item="foxy-null"}static get properties(){return e(e({},super.properties),{},{props:{type:Object},item:{type:String}})}get item(){return this.__item}set item(e){const t=null!=e?e:"foxy-null";this.__renderItem="string"==typeof t?new Function("ctx",`return ctx.html\`\n <${t}\n disabledcontrols=\${ctx.disabledControls.toString()}\n readonlycontrols=\${ctx.readonlyControls.toString()}\n hiddencontrols=\${ctx.hiddenControls.toString()}\n data-testclass="items"\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n group=\${ctx.group}\n href=\${ctx.href}\n lang=\${ctx.lang}\n ns="\${ctx.ns} \${customElements.get('${t}')?.defaultNS ?? ''}"\n ?disabled=\${ctx.disabled}\n ?readonly=\${ctx.readonly}\n ?hidden=\${ctx.hidden}\n .simplifyNsLoading=\${ctx.simplifyNsLoading}\n .templates=\${ctx.templates}\n ...=\${ctx.spread(ctx.props)}\n >\n </${t}>\``):t,this.__item=e,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__pageFetchEventHandler)}render(){let e=[];return e=this.in("busy")?[{key:"stalled",href:"foxy://collection-page/stall",data:null}]:this.in("fail")?[{key:"failed",href:"foxy://collection-page/fail",data:null}]:this.in({idle:"template"})||0===this.__items.length?[{key:"empty",href:"",data:null}]:this.__items.map((e=>({key:e._links.self.href,href:e._links.self.href,data:e}))),t(l||(l=d`${0}`),n(e,(e=>e.key),((s,r)=>{var i,a,n,l,d;return null===(i=this.__renderItem)||void 0===i?void 0:i.call(this,{simplifyNsLoading:this.simplifyNsLoading,disabledControls:this.disabledControls,readonlyControls:this.readonlyControls,hiddenControls:this.hiddenControls,templates:this.templates,disabled:this.disabled,readonly:this.readonly,previous:null!==(n=null===(a=e[r-1])||void 0===a?void 0:a.data)&&void 0!==n?n:null,related:this.related,hidden:this.hidden,parent:this.href,spread:o,props:this.props,group:this.group,lang:this.lang,data:s.data,href:s.href,next:null!==(d=null===(l=e[r+1])||void 0===l?void 0:l.data)&&void 0!==d?d:null,ns:this.ns,html:t})})))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__pageFetchEventHandler)}get __items(){var e,t;return Array.from(Object.values(null!==(t=null===(e=this.form)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})).reduce(((e,t)=>[...e,...t]),[])}__handlePageFetchEvent(e){if(!(e instanceof i)||e.target===this)return;const{method:t,url:s}=e.request;return"GET"===t?"foxy://collection-page/stall"===s?this.__stallRequest(e):"foxy://collection-page/fail"===s?this.__failRequest(e):void 0:void 0}__stallRequest(e){e.stopImmediatePropagation(),e.respondWith(new Promise((()=>{})))}__failRequest(e){e.stopImmediatePropagation(),e.respondWith(Promise.resolve(new Response(null,{status:500})))}}customElements.define("foxy-collection-page",p);export{p as CollectionPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-2d723710.js";import"./foxy-collection-page.js";import"./shared-f1d2b5bb.js";import{o as e,aE as t,_ as s,R as r}from"./shared-0f6e4584.js";import{h as a,L as i}from"./shared-dc73b9a5.js";import{C as n}from"./shared-0b01f721.js";import{F as o}from"./shared-343d1fd7.js";import{N as d,s as l}from"./shared-24d71d01.js";import{r as c}from"./shared-a0c6a159.js";import{I as h}from"./shared-f7a1193f.js";import{i as p}from"./shared-ee36b83f.js";import{s as u}from"./shared-99940888.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-075796e2.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-5c05ac06.js";import"./shared-9803aa7c.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";const _=e({manual:(e,t)=>t.data}),g=e({error:(e,t)=>t.data}),m=e({first:(e,t)=>t.data,pages:[],error:null}),f=e({first:(e,t)=>{var s,r;return null!==(r=null===(s=t.data[0])||void 0===s?void 0:s._links.self.href)&&void 0!==r?r:""},pages:(e,t)=>t.data,error:null}),v=e({pages:(e,t)=>0===t.data.returned_items?e.pages:[...e.pages,t.data]}),y=e=>e.manual,b=t({id:"pages",initial:"idle",context:{first:"",pages:[],error:null,manual:!1},states:{busy:{invoke:{src:"sendGet",onError:{target:"fail",actions:g},onDone:[{target:"idle.empty",cond:(e,t)=>0==t.data.total_items},{target:"idle.end",cond:(e,t)=>t.data.returned_items<t.data.limit,actions:v},{target:"idle.paused.manual",cond:y,actions:v},{target:"idle.paused.auto",actions:v}]},on:{SET_MANUAL:{actions:_}}},fail:{on:{SET_MANUAL:{actions:_}}},idle:{initial:"empty",states:{paused:{states:{auto:{invoke:{src:"observeChildren"}},manual:{}},on:{RESUME:"#pages.busy",SET_MANUAL:[{cond:y,actions:_,target:".manual"},{actions:_,target:".auto"}]}},empty:{on:{SET_MANUAL:{actions:_}}},end:{on:{SET_MANUAL:{actions:_}}}}}},on:{SET_FIRST:[{cond:(e,t)=>0===t.data.trim().length,target:"idle.empty",actions:m},{target:"busy",actions:m}],SET_PAGES:[{cond:(e,t)=>0===t.data.length,target:"idle.empty",actions:f},{target:"idle.paused",actions:f}]}});let x,E,k,S=e=>e;const j=n(h(i));class R extends j{constructor(){var e;super(),e=this,this.props={},this.lang="",this.ns="",this.__group="",this.__fetchEventHandler=e=>this.__handleFetchEvent(e),this.__service=p(b.withConfig({services:{observeChildren:()=>e=>{const t=new IntersectionObserver((t=>{t.some((e=>e.isIntersecting))&&e("RESUME")}));return t.observe(this.renderRoot.children[this.renderRoot.children.length-1]),()=>t.disconnect()},sendGet:async function(t){var s;const r=t.pages[t.pages.length-1],a=null!==(s=null==r?void 0:r._links.next.href)&&void 0!==s?s:t.first,i=await new d.API(e).fetch(a);if(!i.ok)throw i;const n=await i.json();return e.__stopTrackingRumour(),d.Rumour(e.group).share({source:n._links.self.href,data:n}),e.__trackRumour(),n}}})),this.page="foxy-collection-page foxy-null"}static get properties(){return s(s({},super.properties),{},{manual:{type:Boolean,reflect:!0},first:{type:String,noAccessor:!0},pages:{type:Array,noAccessor:!0},group:{type:String},props:{type:Object},lang:{type:String},page:{type:String},ns:{type:String}})}get page(){return this.__page}set page(e){if("string"==typeof e){const t=e.split(" ").pop(),s=t?`item="${t}"`:"";this.__renderPage=new Function("ctx",`return ctx.html\`\n <${e}\n disabledcontrols=\${ctx.disabledControls.toString()}\n readonlycontrols=\${ctx.readonlyControls.toString()}\n hiddencontrols=\${ctx.hiddenControls.toString()}\n group=\${ctx.group}\n href=\${ctx.href}\n lang=\${ctx.lang}\n ns="\${ctx.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n ${s}\n ?disabled=\${ctx.disabled}\n ?readonly=\${ctx.readonly}\n ?hidden=\${ctx.hidden}\n .templates=\${ctx.templates}\n ...=\${ctx.spread(ctx.props)}\n >\n </${e}>\``)}else this.__renderPage=e;this.__page=e,this.requestUpdate()}get first(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.first)&&void 0!==t?t:""}set first(e){this.__service.send({type:"SET_FIRST",data:e})}get pages(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.pages)&&void 0!==t?t:[]}set pages(e){this.__service.send({type:"SET_PAGES",data:e})}get group(){return this.__group}set group(e){var t;this.__group=e,null===(t=this.__stopTrackingRumour)||void 0===t||t.call(this),this.__trackRumour()}get manual(){var e;return!!(null===(e=this.__service.state)||void 0===e?void 0:e.context.manual)}set manual(e){this.__service.send({type:"SET_MANUAL",data:e})}in(e){var t;return!!(null===(t=this.__service.state)||void 0===t?void 0:t.matches(e))}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__fetchEventHandler),this.__createService(),this.__trackRumour()}render(){var e,t,s;const r=this.pages.map((e=>({key:e._links.self.href,href:e._links.self.href})));return(null===(e=this.__service.state)||void 0===e?void 0:e.matches("busy"))?r.push({key:"stalled",href:"foxy://collection-pages/stall"}):(null===(t=this.__service.state)||void 0===t?void 0:t.matches("fail"))?r.push({key:"failed",href:"foxy://collection-pages/fail"}):(null===(s=this.__service.state)||void 0===s?void 0:s.matches({idle:"empty"}))&&r.push({key:"empty",href:""}),a(x||(x=S` ${0} ${0} `),c(r,(e=>e.key),((e,t)=>{var s;return this.__renderPage({disabledControls:this.disabledControls,readonlyControls:this.readonlyControls,hiddenControls:this.hiddenControls,templates:this.templates,disabled:this.disabled,readonly:this.readonly,hidden:this.hidden,spread:u,props:this.props,group:this.group,data:null!==(s=this.pages[t])&&void 0!==s?s:null,href:e.href,lang:this.lang,ns:this.ns,html:a})})),this.manual?this.in({idle:"paused"})?a(E||(E=S` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n lang="${0}" key="load_more" ns="${0}"></foxy-i18n> </vaadin-button> `),(()=>this.__service.send("RESUME")),this.lang,this.ns):"":a(k||(k=S` <span></span> `)))}updated(e){super.updated(e),this.dispatchEvent(new d.UpdateEvent)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("fetch",this.__fetchEventHandler),this.__service.stop(),null===(e=this.__stopTrackingRumour)||void 0===e||e.call(this)}__trackRumour(){this.__stopTrackingRumour=d.Rumour(this.group).track((e=>{try{0===this.pages.length?e({_links:{self:{href:this.first}}}):this.pages.map((t=>e(t)))}catch(e){if(!(e instanceof r.UpdateError))throw e;this.__service.send({type:"SET_FIRST",data:this.first})}}))}__createService(){this.__service.onTransition((({changed:e})=>e&&this.requestUpdate())).onChange((()=>this.requestUpdate())).start()}__handleFetchEvent(e){if(!(e instanceof o)||e.target===this)return;const{method:t,url:s}=e.request;return"GET"===t?"foxy://collection-pages/stall"===s?this.__stallRequest(e):"foxy://collection-pages/fail"===s?this.__failRequest(e):void this.__respondIfPossible(e):void 0}__respondIfPossible(e){const t=l(e.request.url,this.pages);t.ok&&(e.respondWith(Promise.resolve(t)),console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${e.request.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;",""))}__stallRequest(e){e.stopImmediatePropagation(),e.respondWith(new Promise((()=>{})))}__failRequest(e){var t;const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.error,r=null!=s?s:new Response("Unknown error, details unavailable.",{status:500});e.stopImmediatePropagation(),e.respondWith(Promise.resolve(r))}}customElements.define("foxy-collection-pages",R);export{R as CollectionPages};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-12ac8cc6.js";import"./shared-5c05ac06.js";import"./shared-fb56178f.js";import"./shared-f1d2b5bb.js";import{_ as t}from"./shared-0f6e4584.js";import{c as o,h as e,L as i}from"./shared-dc73b9a5.js";import{C as s}from"./shared-0b01f721.js";import{I as r}from"./shared-f7a1193f.js";import{a}from"./shared-075796e2.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-6a4e81ad.js";import"./shared-ff63a551.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";let n,d,c=t=>t;const p=s(a(r(i),"copy-to-clipboard"));class l extends p{constructor(){super(...arguments),this.icon=null,this.text=null,this.__state="idle"}static get properties(){return t(t({},super.properties),{},{text:{type:String},icon:{type:String},__state:{attribute:!1}})}static get styles(){return o(n||(n=c`button{position:relative;appearance:none;background:0 0;border:none;border-radius:var(--lumo-border-radius-s);color:inherit;font-size:inherit;padding:0;width:1.5em;height:1.5em;display:flex;justify-content:center;align-items:center}button::before{position:absolute;inset:0;content:' ';display:block;background:currentColor;opacity:.08;transition:opacity .15s ease;border-radius:var(--lumo-border-radius-s)}button:focus{outline:0;box-shadow:0 0 0 2px currentColor}button:disabled{opacity:.5;cursor:default}@media (hover:hover){button:not(:disabled):hover{cursor:pointer}button:not(:disabled):hover::before{opacity:.16}}iron-icon{--iron-icon-height:1em;--iron-icon-width:1em}`))}render(){var t;let o="",i="";return"busy"===this.__state?(o="copying",i="icons:hourglass-empty"):"fail"===this.__state?(o="failed_to_copy",i="icons:error-outline"):"done"===this.__state?(o="done",i="icons:done"):(o="click_to_copy",i=null!==(t=this.icon)&&void 0!==t?t:"icons:content-copy"),e(d||(d=c` <button id="trigger" ?disabled="${0}" @click="${0}"> <iron-icon icon="${0}"></iron-icon> </button> <vcf-tooltip for="trigger" position="bottom"> <span class="text-s"><foxy-i18n infer="" class="text-s" key="${0}"></foxy-i18n></span> </vcf-tooltip> `),this.disabled,(()=>{var t;"idle"===this.__state&&(this.__state="busy",navigator.clipboard.writeText(null!==(t=this.text)&&void 0!==t?t:"").then((()=>this.__state="done")).catch((()=>this.__state="fail")).then((()=>setTimeout((()=>this.__state="idle"),2e3))))}),i,o)}}customElements.define("foxy-copy-to-clipboard",l);export{l as CopyToClipboard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-f1d2b5bb.js";import{h as t}from"./shared-dc73b9a5.js";import{C as s}from"./shared-0b01f721.js";import{N as e}from"./shared-24d71d01.js";import{T as i,a}from"./shared-075796e2.js";import{c as r}from"./shared-4e709717.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";let n,d,o,l,c,p,h,m=t=>t;const u=i(s(a(e,"coupon-card")));class f extends u{render(){var s,e;const i=this.hiddenSelector;return t(n||(n=m` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("description",!0)?"":this.__renderDescription(),i.matches("status",!0)?"":this.__renderStatus(),r({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(e=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==e?e:"")}__renderTitle(){var s,e,i,a,r,n;const l=null!==(e=null===(s=this.data)||void 0===s?void 0:s.number_of_uses_to_date)&&void 0!==e?e:0,c=null!==(a=null===(i=this.data)||void 0===i?void 0:i.number_of_uses_allowed)&&void 0!==a?a:0;return t(d||(d=m` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <foxy-i18n options="${0}" class="text-tertiary text-s flex-shrink-0" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),null!==(n=null===(r=this.data)||void 0===r?void 0:r.name)&&void 0!==n?n:t(o||(o=m`​`)),JSON.stringify({count:l,total:c}),this.lang,0===c?"uses_count":"uses_to_total_count",this.ns,this.renderTemplateOrSlot("title:after"))}__renderDescription(){let s=null;if(this.data){const e=this.data.coupon_discount_details,i=this.data.coupon_discount_type,a=this.ns;s=t(l||(l=m` <foxy-i18n options="${0}" lang="${0}" key="discount_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify({params:{details:e,type:i,ns:a}}),this.lang,this.ns)}return t(c||(c=m` <div data-testid="description"> ${0} <div class="truncate text-s text-secondary">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),null!=s?s:t(p||(p=m`​`)),this.renderTemplateOrSlot("description:after"))}__renderStatus(){var s;const{start_date:e,end_date:i}=null!==(s=this.data)&&void 0!==s?s:{},a=e&&i?"complete":e?"from":i?"until":"any";return t(h||(h=m` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-tertiary" lang="${0}" key="date_range_${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({start:e,end:i}),this.lang,a,this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-coupon-card",f);export{f as CouponCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-61f4e91a.js";import"./shared-f1d2b5bb.js";import{a as s}from"./shared-075796e2.js";import{I as e}from"./shared-a6273e4a.js";import{h as t}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let r,o=s=>s;const a=s(e,"coupon-code-card");class i extends a{renderBody(){var s;return t(r||(r=o` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="uses_count" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> `),this.data,{count:null===(s=this.data)||void 0===s?void 0:s.number_of_uses_to_date},this.data)}}customElements.define("foxy-coupon-code-card",i);export{i as CouponCodeCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-b98b8d02.js";import"./shared-6e355777.js";import{I as r}from"./shared-8c1df97c.js";import"./foxy-transaction-card.js";import{_ as e,B as s}from"./shared-0f6e4584.js";import{a as o}from"./shared-075796e2.js";import{i as t}from"./shared-9803aa7c.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-10325cda.js";import"./shared-021c7a22.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-fb56178f.js";import"./shared-2099544a.js";import"./shared-8f7a31e0.js";import"./shared-2d723710.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-7b8ad9c1.js";import"./shared-51c4a6dd.js";import"./shared-3e03c988.js";import"./shared-fe77f6f6.js";import"./shared-e5d37737.js";import"./shared-acdcae7e.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-bab2ea2c.js";import"./shared-61f4e91a.js";import"./shared-a6273e4a.js";let i,d=r=>r;const n=o(r,"coupon-code-form");class c extends n{constructor(){super(...arguments),this.getTransactionPageHref=null}static get properties(){return e(e({},super.properties),{},{getTransactionPageHref:{attribute:!1}})}static get v8n(){return[({code:r})=>!!r||"code:v8n_required",({code:r})=>!r||r.length<=50||"code:v8n_too_long",({code:r})=>!(null==r?void 0:r.includes(" "))||"code:v8n_has_spaces"]}get hiddenSelector(){const r=[super.hiddenSelector.toString()];return this.href||r.unshift("transactions"),new s(r.join(" ").trim())}renderBody(){var r,e;let s;try{const o=new URL(null!==(e=null===(r=this.data)||void 0===r?void 0:r._links["fx:coupon_code_transactions"].href)&&void 0!==e?e:"");o.searchParams.set("zoom","items"),s=o.toString()}catch(r){s=void 0}return a(i||(i=d` ${0} <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-async-list-control first="${0}" infer="transactions" limit="5" item="foxy-transaction-card" .getPageHref="${0}" hide-delete-button> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),t(s),this.getTransactionPageHref,super.renderBody())}}customElements.define("foxy-coupon-code-form",c);export{c as CouponCodeForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-aefac46b.js";import{I as e}from"./shared-8c1df97c.js";import{a as s}from"./shared-075796e2.js";import{B as r}from"./shared-0f6e4584.js";import{h as o}from"./shared-dc73b9a5.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-7b8ad9c1.js";import"./shared-51c4a6dd.js";import"./shared-f1d2b5bb.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-99940888.js";import"./shared-2d723710.js";import"./shared-6a4e81ad.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-5c05ac06.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let t,a=e=>e;const d=s(e,"coupon-codes-form");class i extends d{constructor(){super(...arguments),this.__couponCodesGetValue=()=>{var e,s;return null!==(s=null===(e=this.form.coupon_codes)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==s?s:[]},this.__couponCodesSetValue=e=>{this.edit({coupon_codes:e.map((({value:e})=>e.split(" ").map((e=>e.trim())))).flat().filter(((e,s,r)=>r.indexOf(e)===s))})}}static get v8n(){return[({coupon_codes:e})=>e&&e.length>0||"coupon-codes:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.push("coupon-codes"),new r(e.join(" ").trim())}get hiddenSelector(){const e=["delete timestamps",super.hiddenSelector.toString()];return new r(e.join(" ").trim())}renderBody(){return o(t||(t=a` <foxy-internal-editable-list-control infer="coupon-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> ${0} `),this.__couponCodesGetValue,this.__couponCodesSetValue,super.renderBody())}async _sendPost(e){const s=JSON.stringify(e),r=await this._fetch(this.parent,{body:s,method:"POST"});return this.status={key:"success"},r}}customElements.define("foxy-coupon-codes-form",i);export{i as CouponCodesForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-f1d2b5bb.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-075796e2.js";import{T as e}from"./shared-77051754.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-0f6e4584.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-a6273e4a.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";let t,a,i=r=>r;const o=s(e,"coupon-detail-card");class c extends o{constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=i`${0} • ${0}`),s.name,s.code),subtitle:s=>{let e;try{e=Math.abs(s.amount_per).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:this.__currencyDisplay,currency:this.__currency,style:"currency"})}catch(r){e="--"}return r(a||(a=i` <span class="${0}">${0}</span> `),s.amount_per>0?"text-success":"text-error",e)}})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-coupon-detail-card",c);export{c as CouponDetailCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-b3681c71.js";import"./shared-9f44b81f.js";import"./shared-57e4bcb0.js";import"./shared-80c6f97e.js";import{I as e}from"./shared-b6376c8f.js";import"./foxy-query-builder.js";import{_ as t,B as o}from"./shared-701157ac.js";import{O as s,T as r}from"./shared-8874ec69.js";import{c as i}from"./shared-4e709717.js";import{h as n}from"./shared-dc73b9a5.js";import"./shared-66084f2e.js";import"./shared-824d0804.js";import"./shared-0e038fda.js";import"./shared-421708b0.js";import{I as a}from"./shared-5cb6aca6.js";import"./foxy-generate-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-coupon-codes-form.js";import"./foxy-coupon-code-card.js";import"./foxy-coupon-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-form.js";import"./foxy-attribute-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-discount-builder.js";import"./shared-6d1556a0.js";import{R as l,a as c}from"./shared-f2335b72.js";import{i as d}from"./shared-9803aa7c.js";import"./shared-a4e0a78b.js";import"./shared-24586cfb.js";import"./shared-cfdd6c21.js";import"./shared-add044d3.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-b44cf5a9.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-fee535ca.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-c0e56e97.js";import"./shared-bab2ea2c.js";import"./shared-5c1e607b.js";import"./foxy-form-dialog.js";import"./shared-f91d5706.js";import"./shared-57266e2a.js";import"./shared-22ba9566.js";import"./shared-51c4a6dd.js";import"./shared-8438d4ca.js";import"./shared-79d0699c.js";import"./shared-c4f5b03b.js";import"./shared-59d8b64e.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-44b101d0.js";import"./shared-4b209827.js";import"./shared-58095d4b.js";import"./shared-fad783a0.js";import"./shared-e4cc1191.js";import"./shared-414a0c9b.js";import"./shared-7004839c.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-43e2c3f6.js";import"./shared-23061fb2.js";import"./shared-08d018f5.js";import"./shared-d82f9e35.js";import"./shared-9ee719e6.js";import"./shared-bba917bf.js";import"./shared-7af96c0a.js";import"./shared-2782886e.js";import"./foxy-swipe-actions.js";import"./foxy-transaction-card.js";import"./shared-4761504a.js";let u,p,_,m,f=e=>e;customElements.define("foxy-internal-query-builder-control",class extends e{constructor(){super(...arguments),this.operators=Object.values(s),this.disableOr=!1}static get properties(){return t(t({},super.properties),{},{operators:{type:Array},disableOr:{type:Boolean,attribute:"disable-or"}})}renderControl(){const{label:e,helperText:t,_errorMessage:o}=this,s=o&&!this.disabled&&!this.readonly;return n(u||(u=f` <section class="${0}"> ${0} <foxy-query-builder infer="query-builder" .operators="${0}" .value="${0}" ?disable-or="${0}" @change="${0}"> </foxy-query-builder> ${0} ${0} </section> `),i({"grid gap-xs leading-xs transition-colors":!0,"text-secondary hover-text-body":!this.disabled&&!this.readonly,"text-disabled":this.disabled,"text-body":this.readonly}),e?n(p||(p=f`<p class="text-s font-medium">${0}</p>`),e):"",this.operators,this._value,this.disableOr,(e=>{var t;const o=e.currentTarget;this._value=null!==(t=o.value)&&void 0!==t?t:""}),t?n(_||(_=f`<p class="text-xs">${0}</p>`),t):"",s?n(m||(m=f`<p class="text-xs text-error">${0}</p>`),o):"")}});let h,y,b,x,g,v=e=>e;customElements.define("foxy-internal-coupon-form-rules-control",class extends e{renderControl(){var e,t;const o=this.nucleon,s=null!==(e=null==o?void 0:o.form.coupon_discount_details)&&void 0!==e?e:"",r=null!==(t=null==o?void 0:o.form.coupon_discount_type)&&void 0!==t?t:"quantity_amount",a=this.helperText,l=this.__renderRulesDescription(),c=this._errorMessage;return n(h||(h=v` <section> <p class="leading-xs flex items-center justify-between space-x-m text-s mb-xs"> <span class="${0}"> ${0} </span> <span class="min-w-0">${0}</span> </p> <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> ${0} ${0} </section> `),i({"transition-colors font-medium flex-1":!0,"text-secondary":!this.disabled,"text-disabled":this.disabled}),this.label,this.__renderPreset(),{details:s,type:r,name:"Rules"},(e=>{const t=e.currentTarget.parsedValue,o=this.nucleon;null==o||o.edit({coupon_discount_details:t.details,coupon_discount_type:t.type})}),a||l?n(y||(y=v` <p class="${0}"> ${0} </p> `),i({"text-xs mt-xs leading-xs transition-colors":!0,"text-secondary":!this.disabled&&!this.readonly,"text-disabled":this.disabled,"text-body":this.readonly}),l||a):"",!c||this.disabled||this.readonly?"":n(b||(b=v`<p class="mt-xs text-xs leading-xs text-error">${0}</p>`),this._errorMessage))}__renderRulesDescription(){var e,t;const o=this.nucleon,s=null!==(e=null==o?void 0:o.form.coupon_discount_type)&&void 0!==e?e:"quantity_amount",r=null!==(t=null==o?void 0:o.form.coupon_discount_details)&&void 0!==t?t:"";return r?this.t("discount_summary",{params:{details:r,type:s,ns:this.ns}}):null}__renderPreset(){const e=this.nucleon,o=null==e?void 0:e.form.coupon_discount_details,s=null==e?void 0:e.form.coupon_discount_type,r=[{type:"quantity_amount",details:"allunits|2-2"},{type:"quantity_percentage",details:"allunits|5-10|10-20"},{type:"quantity_amount",details:"incremental|3-5"},{type:"quantity_percentage",details:"incremental|11-10|51-15|101-20"},{type:"quantity_percentage",details:"repeat|2-100"},{type:"quantity_percentage",details:"repeat|4-50"},{type:"quantity_amount",details:"single|5-10"},{type:"price_percentage",details:"single|99.99-10"}],a=r.find((e=>e.details===o&&e.type===s));return n(x||(x=v` <label data-testid="rules:preset" class="${0}"> <foxy-i18n class="sr-only" infer="" key="preset"></foxy-i18n> <span class="relative font-medium flex items-center"> <span class="truncate"> ${0} </span> <iron-icon class="icon-inline text-xl ml-xs -mr-xs" icon="icons:expand-more"></iron-icon> <select data-testclass="interactive editable" data-testid="rules:preset:select" class="opacity-0 absolute inset-0 focus-outline-none" ?disabled="${0}" @change="${0}"> ${0} <option value="custom" ?selected="${0}"> ${0} </option> </select> </span> </label> `),i({"whitespace-nowrap block ring-primary-50 rounded px-xs -mx-xs transition-colors":!0,"text-body hover-text-primary focus-within-ring-2":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled}),a?this.t("discount_summary",{params:t(t({},a),{},{ns:this.ns})}):this.t("custom_discount"),this.disabled||this.readonly,(e=>{var t,o;const s=e.currentTarget,i=r[s.selectedIndex],n=this.nucleon;null==n||n.edit({coupon_discount_details:null!==(t=null==i?void 0:i.details)&&void 0!==t?t:"",coupon_discount_type:null!==(o=null==i?void 0:i.type)&&void 0!==o?o:"quantity_amount"})}),r.map((e=>n(g||(g=v` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.details,e===a,this.t("discount_summary",{params:t(t({},e),{},{ns:this.ns})})))),!a&&!!o&&!!s,this.t("custom_discount"))}});let j,$,w=e=>e;const k=l(c(a,"coupon-form"));class V extends k{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.__customerSubscriptionRestrictionsGetValue=()=>{var e;const t=null===(e=this.form.customer_subscription_restrictions)||void 0===e?void 0:e.split(",").map((e=>e.trim())).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).map((e=>({value:e})));return null!=t?t:[]},this.__customerSubscriptionRestrictionsSetValue=e=>{this.edit({customer_subscription_restrictions:e.map((({value:e})=>e.trim())).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).join()}),this.edit({customer_auto_apply:!!this.form.customer_subscription_restrictions||!!this.form.customer_attribute_restrictions})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:t})=>"block"===t?`-${e}`:e)).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).join(",")})},this.__itemOptionRestrictionsOperators=[s.In],this.__itemOptionRestrictionsGetValue=()=>{var e;const t=new URLSearchParams,o=null!==(e=this.form.item_option_restrictions)&&void 0!==e?e:{};for(const e in o)t.set(`${e}:in`,o[e].join(","));return t.toString()},this.__itemOptionRestrictionsSetValue=e=>{const t=Object.fromEntries(Array.from(new URLSearchParams(e).entries()).map((([e,t])=>[e.replace(":in",""),t.split(",").filter((e=>!!e.trim()))])));this.edit({item_option_restrictions:t})},this.__optionsGetValue=()=>{const e=[];return this.form.multiple_codes_allowed&&e.push("multiple_codes_allowed"),this.form.combinable&&e.push("combinable"),this.form.exclude_category_discounts&&e.push("exclude_category_discounts"),this.form.exclude_line_item_discounts&&e.push("exclude_line_item_discounts"),this.form.is_taxable&&e.push("is_taxable"),this.form.shared_codes_allowed&&e.push("shared_codes_allowed"),this.form.customer_auto_apply&&e.push("customer_auto_apply"),e},this.__optionsSetValue=e=>{this.edit({multiple_codes_allowed:e.includes("multiple_codes_allowed"),combinable:e.includes("combinable"),exclude_category_discounts:e.includes("exclude_category_discounts"),exclude_line_item_discounts:e.includes("exclude_line_item_discounts"),is_taxable:e.includes("is_taxable"),shared_codes_allowed:e.includes("shared_codes_allowed"),customer_auto_apply:e.includes("customer_auto_apply")})},this.__optionsOptions=[{value:"multiple_codes_allowed",label:"option_multiple_codes_allowed"},{value:"combinable",label:"option_combinable"},{value:"exclude_category_discounts",label:"option_exclude_category_discounts"},{value:"exclude_line_item_discounts",label:"option_exclude_line_item_discounts"},{value:"is_taxable",label:"option_is_taxable"},{value:"shared_codes_allowed",label:"option_shared_codes_allowed"},{value:"customer_auto_apply",label:"option_customer_auto_apply"}],this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:r.String},{label:"used_codes",path:"number_of_uses_to_date",type:r.Number},{label:"date_created",path:"date_created",type:r.Date},{label:"date_modified",path:"date_modified",type:r.Date}],this.__couponCodesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(t){e.__couponCodesActions[0].state="busy",e.__couponCodesActions=[...e.__couponCodesActions];try{await navigator.clipboard.writeText(t.code),e.__couponCodesActions[0].state="end"}catch(t){e.__couponCodesActions[0].state="error"}finally{e.__couponCodesActions=[...e.__couponCodesActions],setTimeout((()=>{e.__couponCodesActions[0].state="idle",e.__couponCodesActions=[...e.__couponCodesActions]}),1e3)}}}]}static get properties(){return t(t({},super.properties),{},{getTransactionPageHref:{attribute:!1},__couponCodesActions:{type:Array}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",({inclusive_tax_rate:e})=>!e||e>=0||"inclusive-tax-rate:v8n_too_small",({inclusive_tax_rate:e})=>!e||e<=1||"inclusive-tax-rate:v8n_too_big",({number_of_uses_allowed:e})=>!e||e>=0||"number-of-uses-allowed:v8n_too_small",({coupon_discount_details:e})=>!!e||"rules:v8n_required",({coupon_discount_details:e})=>!e||e.length<=200||"rules:v8n_too_long",({item_option_restrictions:e})=>!e||JSON.stringify(e).length<=6e3||"item-option-restrictions:v8n_too_long",({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long",({customer_attribute_restrictions:e})=>!e||e.length<=2e3||"customer-attribute-restrictions:v8n_too_long",({number_of_uses_allowed_per_code:e})=>!e||e>=0||"number-of-uses-allowed-per-code:v8n_too_small",({customer_subscription_restrictions:e})=>!e||e.length<=200||"customer-subscription-restrictions:v8n_too_long",({number_of_uses_allowed_per_customer:e})=>!e||e>=0||"number-of-uses-allowed-per-customer:v8n_too_small"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.push("coupon-codes","category-restrictions","attributes"),this.form.customer_auto_apply||e.push("customer-attribute-restrictions","customer-subscription-restrictions"),new o(e.join(" ").trim())}get headerSubtitleOptions(){return t(t({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}renderHeaderActions(e){return n(j||(j=w` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-coupon-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:coupon_codes"].href],e._links["fx:coupon_codes"].href,[e._links["fx:coupon_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,t,o,s,r,i,a,l;let c;try{const o=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:coupon_codes"].href)&&void 0!==t?t:"");o.searchParams.set("order","date_created desc"),c=o.toString()}catch(e){c=void 0}return n($||($=w` ${0} <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-coupon-form-rules-control infer="rules"> </foxy-internal-coupon-form-rules-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="coupon-codes" item="foxy-coupon-code-card" form="foxy-coupon-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-query-builder-control infer="item-option-restrictions" disable-or .operators="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-query-builder-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="coupon_uri" own-uri="${0}" embed-key="fx:coupon_item_categories" options-href="${0}" links-href="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <div class="grid gap-l sm-grid-cols-3"> <foxy-internal-integer-control infer="number-of-uses-allowed" min="0" show-controls> </foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-uses-allowed-per-customer" min="0" show-controls> </foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-uses-allowed-per-code" min="0" show-controls> </foxy-internal-integer-control> </div> <div class="grid gap-l sm-grid-cols-2"> <foxy-internal-date-control infer="start-date"></foxy-internal-date-control> <foxy-internal-date-control infer="end-date"></foxy-internal-date-control> </div> <foxy-internal-number-control min="0" max="1" infer="inclusive-tax-rate"> </foxy-internal-number-control> <foxy-internal-checkbox-group-control infer="options" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-editable-list-control infer="customer-subscription-restrictions" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-query-builder-control infer="customer-attribute-restrictions"> </foxy-internal-query-builder-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),c,{".getTransactionPageHref":this.getTransactionPageHref},this.__couponCodesActions,this.__codesFilters,this.__itemOptionRestrictionsOperators,this.__itemOptionRestrictionsGetValue,this.__itemOptionRestrictionsSetValue,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],d(null===(o=this.data)||void 0===o?void 0:o._links.self.href),d(null===(r=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:item_categories"].href),d(null===(i=this.data)||void 0===i?void 0:i._links["fx:coupon_item_categories"].href),this.__optionsGetValue,this.__optionsSetValue,this.__optionsOptions,this.__customerSubscriptionRestrictionsGetValue,this.__customerSubscriptionRestrictionsSetValue,d(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),super.renderBody(),d(null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-coupon-form",V);export{V as CouponForm};
|
|
1
|
+
import"./shared-7fd9a30f.js";import"./shared-10b5e78f.js";import"./shared-1cf1e1a4.js";import"./shared-aefac46b.js";import{I as e}from"./shared-7b8ad9c1.js";import"./foxy-query-builder.js";import{_ as t,B as o}from"./shared-0f6e4584.js";import{O as s,T as r}from"./shared-8874ec69.js";import{c as i}from"./shared-4e709717.js";import{h as n}from"./shared-dc73b9a5.js";import"./shared-3fa791ca.js";import"./shared-292ba15e.js";import"./shared-6e355777.js";import"./shared-cbb0e610.js";import{I as a}from"./shared-8c1df97c.js";import"./foxy-generate-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-coupon-codes-form.js";import"./foxy-coupon-code-card.js";import"./foxy-coupon-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-form.js";import"./foxy-attribute-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-discount-builder.js";import"./shared-f1d2b5bb.js";import{R as l,a as d}from"./shared-075796e2.js";import{i as c}from"./shared-9803aa7c.js";import"./shared-e6e84ff5.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-5c05ac06.js";import"./shared-f7a1193f.js";import"./shared-343d1fd7.js";import"./shared-0b01f721.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-2d723710.js";import"./shared-bab2ea2c.js";import"./shared-fe77f6f6.js";import"./foxy-form-dialog.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./shared-22ba9566.js";import"./shared-51c4a6dd.js";import"./shared-8438d4ca.js";import"./shared-79d0699c.js";import"./shared-df00a537.js";import"./shared-e5d37737.js";import"./shared-acdcae7e.js";import"./shared-3e03c988.js";import"./shared-339bbd50.js";import"./shared-ffd3690b.js";import"./shared-2fc671cd.js";import"./shared-021c7a22.js";import"./shared-303b428e.js";import"./shared-10325cda.js";import"./shared-2099544a.js";import"./shared-b6814728.js";import"./shared-634b670e.js";import"./shared-43e2c3f6.js";import"./shared-a036e345.js";import"./shared-77051754.js";import"./shared-a6273e4a.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-61f4e91a.js";import"./shared-b98b8d02.js";import"./foxy-swipe-actions.js";import"./foxy-transaction-card.js";import"./shared-cc79152c.js";let u,p,_,m,f=e=>e;customElements.define("foxy-internal-query-builder-control",class extends e{constructor(){super(...arguments),this.operators=Object.values(s),this.disableOr=!1}static get properties(){return t(t({},super.properties),{},{operators:{type:Array},disableOr:{type:Boolean,attribute:"disable-or"}})}renderControl(){const{label:e,helperText:t,_errorMessage:o}=this,s=o&&!this.disabled&&!this.readonly;return n(u||(u=f` <section class="${0}"> ${0} <foxy-query-builder infer="query-builder" .operators="${0}" .value="${0}" ?disable-or="${0}" @change="${0}"> </foxy-query-builder> ${0} ${0} </section> `),i({"grid gap-xs leading-xs transition-colors":!0,"text-secondary hover-text-body":!this.disabled&&!this.readonly,"text-disabled":this.disabled,"text-body":this.readonly}),e?n(p||(p=f`<p class="text-s font-medium">${0}</p>`),e):"",this.operators,this._value,this.disableOr,(e=>{var t;const o=e.currentTarget;this._value=null!==(t=o.value)&&void 0!==t?t:""}),t?n(_||(_=f`<p class="text-xs">${0}</p>`),t):"",s?n(m||(m=f`<p class="text-xs text-error">${0}</p>`),o):"")}});let h,y,b,x,g,v=e=>e;customElements.define("foxy-internal-coupon-form-rules-control",class extends e{renderControl(){var e,t;const o=this.nucleon,s=null!==(e=null==o?void 0:o.form.coupon_discount_details)&&void 0!==e?e:"",r=null!==(t=null==o?void 0:o.form.coupon_discount_type)&&void 0!==t?t:"quantity_amount",a=this.helperText,l=this.__renderRulesDescription(),d=this._errorMessage;return n(h||(h=v` <section> <p class="leading-xs flex items-center justify-between space-x-m text-s mb-xs"> <span class="${0}"> ${0} </span> <span class="min-w-0">${0}</span> </p> <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> ${0} ${0} </section> `),i({"transition-colors font-medium flex-1":!0,"text-secondary":!this.disabled,"text-disabled":this.disabled}),this.label,this.__renderPreset(),{details:s,type:r,name:"Rules"},(e=>{const t=e.currentTarget.parsedValue,o=this.nucleon;null==o||o.edit({coupon_discount_details:t.details,coupon_discount_type:t.type})}),a||l?n(y||(y=v` <p class="${0}"> ${0} </p> `),i({"text-xs mt-xs leading-xs transition-colors":!0,"text-secondary":!this.disabled&&!this.readonly,"text-disabled":this.disabled,"text-body":this.readonly}),l||a):"",!d||this.disabled||this.readonly?"":n(b||(b=v`<p class="mt-xs text-xs leading-xs text-error">${0}</p>`),this._errorMessage))}__renderRulesDescription(){var e,t;const o=this.nucleon,s=null!==(e=null==o?void 0:o.form.coupon_discount_type)&&void 0!==e?e:"quantity_amount",r=null!==(t=null==o?void 0:o.form.coupon_discount_details)&&void 0!==t?t:"";return r?this.t("discount_summary",{params:{details:r,type:s,ns:this.ns}}):null}__renderPreset(){const e=this.nucleon,o=null==e?void 0:e.form.coupon_discount_details,s=null==e?void 0:e.form.coupon_discount_type,r=[{type:"quantity_amount",details:"allunits|2-2"},{type:"quantity_percentage",details:"allunits|5-10|10-20"},{type:"quantity_amount",details:"incremental|3-5"},{type:"quantity_percentage",details:"incremental|11-10|51-15|101-20"},{type:"quantity_percentage",details:"repeat|2-100"},{type:"quantity_percentage",details:"repeat|4-50"},{type:"quantity_amount",details:"single|5-10"},{type:"price_percentage",details:"single|99.99-10"}],a=r.find((e=>e.details===o&&e.type===s));return n(x||(x=v` <label data-testid="rules:preset" class="${0}"> <foxy-i18n class="sr-only" infer="" key="preset"></foxy-i18n> <span class="relative font-medium flex items-center"> <span class="truncate"> ${0} </span> <iron-icon class="icon-inline text-xl ml-xs -mr-xs" icon="icons:expand-more"></iron-icon> <select data-testclass="interactive editable" data-testid="rules:preset:select" class="opacity-0 absolute inset-0 focus-outline-none" ?disabled="${0}" @change="${0}"> ${0} <option value="custom" ?selected="${0}"> ${0} </option> </select> </span> </label> `),i({"whitespace-nowrap block ring-primary-50 rounded px-xs -mx-xs transition-colors":!0,"text-body hover-text-primary focus-within-ring-2":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled}),a?this.t("discount_summary",{params:t(t({},a),{},{ns:this.ns})}):this.t("custom_discount"),this.disabled||this.readonly,(e=>{var t,o;const s=e.currentTarget,i=r[s.selectedIndex],n=this.nucleon;null==n||n.edit({coupon_discount_details:null!==(t=null==i?void 0:i.details)&&void 0!==t?t:"",coupon_discount_type:null!==(o=null==i?void 0:i.type)&&void 0!==o?o:"quantity_amount"})}),r.map((e=>n(g||(g=v` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.details,e===a,this.t("discount_summary",{params:t(t({},e),{},{ns:this.ns})})))),!a&&!!o&&!!s,this.t("custom_discount"))}});let j,$,w=e=>e;const k=l(d(a,"coupon-form"));class V extends k{constructor(){var e;super(...arguments),e=this,this.getTransactionPageHref=null,this.__customerSubscriptionRestrictionsGetValue=()=>{var e;const t=null===(e=this.form.customer_subscription_restrictions)||void 0===e?void 0:e.split(",").map((e=>e.trim())).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).map((e=>({value:e})));return null!=t?t:[]},this.__customerSubscriptionRestrictionsSetValue=e=>{this.edit({customer_subscription_restrictions:e.map((({value:e})=>e.trim())).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).join()}),this.edit({customer_auto_apply:!!this.form.customer_subscription_restrictions||!!this.form.customer_attribute_restrictions})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:t})=>"block"===t?`-${e}`:e)).filter(((e,t,o)=>!!e&&o.indexOf(e)===t)).join(",")})},this.__itemOptionRestrictionsOperators=[s.In],this.__itemOptionRestrictionsGetValue=()=>{var e;const t=new URLSearchParams,o=null!==(e=this.form.item_option_restrictions)&&void 0!==e?e:{};for(const e in o)t.set(`${e}:in`,o[e].join(","));return t.toString()},this.__itemOptionRestrictionsSetValue=e=>{const t=Object.fromEntries(Array.from(new URLSearchParams(e).entries()).map((([e,t])=>[e.replace(":in",""),t.split(",").filter((e=>!!e.trim()))])));this.edit({item_option_restrictions:t})},this.__optionsGetValue=()=>{const e=[];return this.form.multiple_codes_allowed&&e.push("multiple_codes_allowed"),this.form.combinable&&e.push("combinable"),this.form.exclude_category_discounts&&e.push("exclude_category_discounts"),this.form.exclude_line_item_discounts&&e.push("exclude_line_item_discounts"),this.form.is_taxable&&e.push("is_taxable"),this.form.shared_codes_allowed&&e.push("shared_codes_allowed"),this.form.customer_auto_apply&&e.push("customer_auto_apply"),e},this.__optionsSetValue=e=>{this.edit({multiple_codes_allowed:e.includes("multiple_codes_allowed"),combinable:e.includes("combinable"),exclude_category_discounts:e.includes("exclude_category_discounts"),exclude_line_item_discounts:e.includes("exclude_line_item_discounts"),is_taxable:e.includes("is_taxable"),shared_codes_allowed:e.includes("shared_codes_allowed"),customer_auto_apply:e.includes("customer_auto_apply")})},this.__optionsOptions=[{value:"multiple_codes_allowed",label:"option_multiple_codes_allowed"},{value:"combinable",label:"option_combinable"},{value:"exclude_category_discounts",label:"option_exclude_category_discounts"},{value:"exclude_line_item_discounts",label:"option_exclude_line_item_discounts"},{value:"is_taxable",label:"option_is_taxable"},{value:"shared_codes_allowed",label:"option_shared_codes_allowed"},{value:"customer_auto_apply",label:"option_customer_auto_apply"}],this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:r.String},{label:"used_codes",path:"number_of_uses_to_date",type:r.Number},{label:"date_created",path:"date_created",type:r.Date},{label:"date_modified",path:"date_modified",type:r.Date}],this.__couponCodesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(t){e.__couponCodesActions[0].state="busy",e.__couponCodesActions=[...e.__couponCodesActions];try{await navigator.clipboard.writeText(t.code),e.__couponCodesActions[0].state="end"}catch(t){e.__couponCodesActions[0].state="error"}finally{e.__couponCodesActions=[...e.__couponCodesActions],setTimeout((()=>{e.__couponCodesActions[0].state="idle",e.__couponCodesActions=[...e.__couponCodesActions]}),1e3)}}}]}static get properties(){return t(t({},super.properties),{},{getTransactionPageHref:{attribute:!1},__couponCodesActions:{type:Array}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",({inclusive_tax_rate:e})=>!e||e>=0||"inclusive-tax-rate:v8n_too_small",({inclusive_tax_rate:e})=>!e||e<=1||"inclusive-tax-rate:v8n_too_big",({number_of_uses_allowed:e})=>!e||e>=0||"number-of-uses-allowed:v8n_too_small",({coupon_discount_details:e})=>!!e||"rules:v8n_required",({coupon_discount_details:e})=>!e||e.length<=200||"rules:v8n_too_long",({item_option_restrictions:e})=>!e||JSON.stringify(e).length<=6e3||"item-option-restrictions:v8n_too_long",({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long",({customer_attribute_restrictions:e})=>!e||e.length<=2e3||"customer-attribute-restrictions:v8n_too_long",({number_of_uses_allowed_per_code:e})=>!e||e>=0||"number-of-uses-allowed-per-code:v8n_too_small",({customer_subscription_restrictions:e})=>!e||e.length<=200||"customer-subscription-restrictions:v8n_too_long",({number_of_uses_allowed_per_customer:e})=>!e||e>=0||"number-of-uses-allowed-per-customer:v8n_too_small"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.push("coupon-codes","category-restrictions","attributes"),this.form.customer_auto_apply||e.push("customer-attribute-restrictions","customer-subscription-restrictions"),new o(e.join(" ").trim())}get headerSubtitleOptions(){return t(t({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}renderHeaderActions(e){return n(j||(j=w` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-coupon-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:coupon_codes"].href],e._links["fx:coupon_codes"].href,[e._links["fx:coupon_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,t,o,s,r,i,a,l;let d;try{const o=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:coupon_codes"].href)&&void 0!==t?t:"");o.searchParams.set("order","date_created desc"),d=o.toString()}catch(e){d=void 0}return n($||($=w` ${0} <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-coupon-form-rules-control infer="rules"> </foxy-internal-coupon-form-rules-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="coupon-codes" item="foxy-coupon-code-card" form="foxy-coupon-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-query-builder-control infer="item-option-restrictions" disable-or .operators="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-query-builder-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="coupon_uri" own-uri="${0}" embed-key="fx:coupon_item_categories" options-href="${0}" links-href="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <div class="grid gap-l sm-grid-cols-3"> <foxy-internal-integer-control infer="number-of-uses-allowed" min="0" show-controls> </foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-uses-allowed-per-customer" min="0" show-controls> </foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-uses-allowed-per-code" min="0" show-controls> </foxy-internal-integer-control> </div> <div class="grid gap-l sm-grid-cols-2"> <foxy-internal-date-control infer="start-date"></foxy-internal-date-control> <foxy-internal-date-control infer="end-date"></foxy-internal-date-control> </div> <foxy-internal-number-control min="0" max="1" infer="inclusive-tax-rate"> </foxy-internal-number-control> <foxy-internal-checkbox-group-control infer="options" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-editable-list-control infer="customer-subscription-restrictions" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-query-builder-control infer="customer-attribute-restrictions"> </foxy-internal-query-builder-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),d,{".getTransactionPageHref":this.getTransactionPageHref},this.__couponCodesActions,this.__codesFilters,this.__itemOptionRestrictionsOperators,this.__itemOptionRestrictionsGetValue,this.__itemOptionRestrictionsSetValue,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],c(null===(o=this.data)||void 0===o?void 0:o._links.self.href),c(null===(r=null===(s=this.__storeLoader)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:item_categories"].href),c(null===(i=this.data)||void 0===i?void 0:i._links["fx:coupon_item_categories"].href),this.__optionsGetValue,this.__optionsSetValue,this.__optionsOptions,this.__customerSubscriptionRestrictionsGetValue,this.__customerSubscriptionRestrictionsSetValue,c(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),super.renderBody(),c(null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-coupon-form",V);export{V as CouponForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./shared-61f4e91a.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-075796e2.js";import{T as e}from"./shared-77051754.js";import"./foxy-spinner.js";import"./shared-fb56178f.js";import"./shared-30221a16.js";import"./shared-5c05ac06.js";import"./shared-f1d2b5bb.js";import"./shared-0f6e4584.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-a6273e4a.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-4e709717.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";let a,d,t=r=>r;class o extends(s(e,"custom-field-card")){renderBody(){return super.renderBody({title:s=>r(a||(a=t`${0}`),s.name),subtitle:s=>r(d||(d=t`${0}`),s.value)})}}customElements.define("foxy-custom-field-card",o);export{o as CustomFieldCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-10b5e78f.js";import"./shared-a036e345.js";import{I as e}from"./shared-8c1df97c.js";import{a as r}from"./shared-075796e2.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-e6e84ff5.js";import"./shared-6a4e81ad.js";import"./shared-30221a16.js";import"./shared-8f7a31e0.js";import"./shared-61ade33e.js";import"./shared-fe77f6f6.js";import"./shared-fb56178f.js";import"./shared-7b8ad9c1.js";import"./shared-51c4a6dd.js";import"./shared-f1d2b5bb.js";import"./shared-0f6e4584.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-24d71d01.js";import"./shared-c286c5ad.js";import"./shared-cd96ff03.js";import"./shared-522a172d.js";import"./shared-12a7a15d.js";import"./shared-6474675f.js";import"./shared-ee36b83f.js";import"./shared-a0c6a159.js";import"./shared-2d723710.js";import"./shared-abea5e34.js";import"./shared-7026fb08.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-12ac8cc6.js";import"./shared-ff63a551.js";import"./shared-5c05ac06.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let i,t=e=>e;const o=r(e,"custom-field-form");class a extends o{constructor(){super(...arguments),this.__visibilityGetValue=()=>this.form.is_hidden?["hidden"]:[],this.__visibilitySetValue=e=>{this.edit({is_hidden:e.includes("hidden")})},this.__visibilityOptions=[{label:"option_hidden",value:"hidden"}]}static get v8n(){return[({value:e})=>e&&e.length>0||"value:v8n_required",({value:e})=>!e||e.length<=700||"value:v8n_too_long",({name:e})=>e&&e.length>0||"name:v8n_required",({name:e})=>!e||e.length<=100||"name:v8n_too_long"]}renderBody(){return s(i||(i=t` ${0} <foxy-internal-source-control infer="name"></foxy-internal-source-control> <foxy-internal-source-control infer="value"></foxy-internal-source-control> <foxy-internal-checkbox-group-control infer="visibility" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.renderHeader(),this.__visibilityGetValue,this.__visibilitySetValue,this.__visibilityOptions,super.renderBody())}}customElements.define("foxy-custom-field-form",a);export{a as CustomFieldForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as s}from"./shared-
|
|
1
|
+
import{C as s}from"./shared-91f5e0b3.js";export{C as CustomerApi}from"./shared-91f5e0b3.js";import"./shared-0f6e4584.js";import"./shared-dc73b9a5.js";import"./shared-01b2cad8.js";import"./shared-6d645dc5.js";import"./shared-0b01f721.js";import"./shared-9803aa7c.js";import"./shared-343d1fd7.js";import"./shared-f7a1193f.js";customElements.define("foxy-customer-api",s);
|