@vtex/faststore 0.0.7 → 0.0.10
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/CHANGELOG.md +102 -0
- package/dist/actions.json +194 -1
- package/dist/catalog.json +3449 -1612
- package/dist/cli/index.d.ts +512 -63
- package/dist/cli/index.js +2098 -686
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server-runtime.js +44 -24
- package/dist/cli/server-runtime.js.map +1 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +5 -1
- package/dist/components.d.ts +42 -10
- package/dist/components.js +47 -15
- package/dist/content-types.json +823 -0
- package/dist/core/dist/define-component.d.ts +12 -2
- package/dist/docs/account-access-gate.md +4 -4
- package/dist/docs/account-address-book.md +519 -0
- package/dist/docs/account-entry-point.md +5 -5
- package/dist/docs/account-menu.md +7 -7
- package/dist/docs/account-saved-cards.md +301 -0
- package/dist/docs/alert-dialog.md +2 -2
- package/dist/docs/billing-address.md +17 -9
- package/dist/docs/binding-switcher.md +154 -0
- package/dist/docs/card-entry.md +38 -7
- package/dist/docs/card-summary.md +175 -0
- package/dist/docs/cardholder-document.md +16 -14
- package/dist/docs/cart-destination.md +238 -0
- package/dist/docs/cart-item.md +22 -4
- package/dist/docs/cart-totalizer.md +1 -1
- package/dist/docs/cart.md +126 -19
- package/dist/docs/client-profile-fieldset.md +7 -5
- package/dist/docs/copy-text.md +84 -0
- package/dist/docs/document-field.md +8 -8
- package/dist/docs/footer-link-group.md +2 -2
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/free-shipping-progress.md +13 -9
- package/dist/docs/header-root.md +1 -1
- package/dist/docs/incentives.md +4 -4
- package/dist/docs/logo.md +6 -6
- package/dist/docs/my-account-profile.md +4 -4
- package/dist/docs/navigation-link-list.md +2 -2
- package/dist/docs/navigation-link.md +3 -3
- package/dist/docs/order-cancel.md +52 -0
- package/dist/docs/order-delivery-address.md +63 -0
- package/dist/docs/order-delivery-group.md +83 -0
- package/dist/docs/order-details-back.md +41 -0
- package/dist/docs/order-details-header.md +48 -0
- package/dist/docs/order-list-row.md +46 -0
- package/dist/docs/order-list-search.md +101 -0
- package/dist/docs/order-list-views.md +97 -0
- package/dist/docs/order-list.md +94 -0
- package/dist/docs/order-payment.md +94 -0
- package/dist/docs/order-placed-date.md +49 -0
- package/dist/docs/order-placed-payment-summary.md +13 -15
- package/dist/docs/order-placed.md +225 -0
- package/dist/docs/order-progress.md +88 -0
- package/dist/docs/order-status-badge.md +91 -0
- package/dist/docs/order-summary.md +53 -0
- package/dist/docs/payment-method-badges.md +16 -5
- package/dist/docs/payment-methods.md +1 -1
- package/dist/docs/place-order.md +13 -9
- package/dist/docs/product-information.md +2 -2
- package/dist/docs/product-shelf.md +7 -0
- package/dist/docs/saved-cards.md +2 -2
- package/dist/docs/select.md +22 -10
- package/dist/docs/session.md +1 -1
- package/dist/docs/shipping-address.md +1 -1
- package/dist/docs/sign-in-redirect.md +7 -7
- package/dist/docs/toast.md +35 -13
- package/dist/index.d.ts +7 -2
- package/dist/index.js +2 -1
- package/dist/internal/client.d.ts +9 -1
- package/dist/internal/client.js +10 -2
- package/dist/internal/server.d.ts +8 -2
- package/dist/internal/server.js +8 -2
- package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
- package/dist/matter/account-access-gate/account-access-gate.js +19 -16
- package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
- package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
- package/dist/matter/account-address-book/account-address-book.js +469 -0
- package/dist/matter/account-address-book/account-address-book.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
- package/dist/matter/account-address-book/account-address-country.js +151 -0
- package/dist/matter/account-address-book/account-address-country.js.map +1 -0
- package/dist/matter/account-address-book/account-address-first-line.js +11 -0
- package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
- package/dist/matter/account-address-book/account-address-form-context.js +14 -0
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
- package/dist/matter/account-address-book/account-address-form.js +946 -0
- package/dist/matter/account-address-book/account-address-form.js.map +1 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
- package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
- package/dist/matter/account-address-book/account-address-record.js +138 -0
- package/dist/matter/account-address-book/account-address-record.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.js +11 -11
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +7 -3
- package/dist/matter/account-menu/account-menu.js +69 -28
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-saved-cards/account-saved-cards.d.ts +383 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js +956 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
- package/dist/matter/billing-address/billing-address.d.ts +30 -17
- package/dist/matter/billing-address/billing-address.js +128 -33
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.js +2 -2
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +4 -3
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +5 -3
- package/dist/matter/card-entry/card-entry.js +77 -27
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
- package/dist/matter/cardholder-document/cardholder-document.js +36 -16
- package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
- package/dist/matter/cart/cart-namespace.d.ts +5 -1
- package/dist/matter/cart/cart-namespace.js +5 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +41 -6
- package/dist/matter/cart/cart.js +267 -54
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +222 -0
- package/dist/matter/cart-destination/cart-destination.js +613 -0
- package/dist/matter/cart-destination/cart-destination.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +4 -2
- package/dist/matter/cart-item/cart-item.js +76 -17
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/cart-totalizer/cart-totalizer.js +3 -2
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +1 -1
- package/dist/matter/client-profile-form/client-profile-fieldset.js +8 -5
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +6 -3
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +76 -33
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.js +3 -3
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.js +2 -2
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -3
- package/dist/matter/my-account-profile/my-account-profile.js +4 -4
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
- package/dist/matter/order-cancel/order-cancel.js +344 -0
- package/dist/matter/order-cancel/order-cancel.js.map +1 -0
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
- package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
- package/dist/matter/order-details-header/order-details-header.js +190 -0
- package/dist/matter/order-details-header/order-details-header.js.map +1 -0
- package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
- package/dist/matter/order-list/customer-orders-filter.js +30 -0
- package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +121 -0
- package/dist/matter/order-list/order-list.js +395 -0
- package/dist/matter/order-list/order-list.js.map +1 -0
- package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
- package/dist/matter/order-list-row/order-list-row.js +127 -0
- package/dist/matter/order-list-row/order-list-row.js.map +1 -0
- package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
- package/dist/matter/order-list-search/order-list-search.js +296 -0
- package/dist/matter/order-list-search/order-list-search.js.map +1 -0
- package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
- package/dist/matter/order-list-views/order-list-views.js +154 -0
- package/dist/matter/order-list-views/order-list-views.js.map +1 -0
- package/dist/matter/order-payment/order-payment.d.ts +83 -0
- package/dist/matter/order-payment/order-payment.js +258 -0
- package/dist/matter/order-payment/order-payment.js.map +1 -0
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
- package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
- package/dist/matter/order-placed/order-placed.d.ts +122 -0
- package/dist/matter/order-placed/order-placed.js +452 -0
- package/dist/matter/order-placed/order-placed.js.map +1 -0
- package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
- package/dist/matter/order-placed-date/order-placed-date.js +92 -0
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +85 -0
- package/dist/matter/order-progress/order-progress.js +203 -0
- package/dist/matter/order-progress/order-progress.js.map +1 -0
- package/dist/matter/order-summary/order-summary.d.ts +81 -0
- package/dist/matter/order-summary/order-summary.js +192 -0
- package/dist/matter/order-summary/order-summary.js.map +1 -0
- package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
- package/dist/matter/payment/cardholder-document-rule.js +35 -0
- package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +38 -23
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.js +11 -0
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +4 -2
- package/dist/matter/payment/payment-method-badges.js.map +1 -1
- package/dist/matter/payment/payment.js +11 -0
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
- package/dist/matter/payment/use-payment-method-selection.js +30 -2
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
- package/dist/matter/payment/use-payment-submit-gate.js +42 -14
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +12 -7
- package/dist/matter/place-order/place-order.js +126 -103
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.js +5 -5
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +7 -0
- package/dist/matter/product-shelf/product-shelf.js +115 -1
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/region/region.js +1 -1
- package/dist/matter/saved-cards/saved-cards.js +26 -15
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/session/session.js +2 -2
- package/dist/matter/session/session.js.map +1 -1
- package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +23 -1
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/shipping-address.js +62 -14
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +2 -2
- package/dist/matter/shipping-simulator/shipping-simulator.js +6 -2
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
- package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
- package/dist/matter/variant-selector/variant-selector.js +2 -2
- package/dist/matter/variant-selector/variant-selector.js.map +1 -1
- package/dist/particles/address-summary/address-summary.js +2 -2
- package/dist/particles/address-summary/address-summary.js.map +1 -1
- package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
- package/dist/particles/alert-dialog/alert-dialog.js +5 -2
- package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/particles/binding-switcher/binding-switcher.d.ts +38 -0
- package/dist/particles/binding-switcher/binding-switcher.js +183 -0
- package/dist/particles/binding-switcher/binding-switcher.js.map +1 -0
- package/dist/particles/card-summary/card-network.d.ts +17 -0
- package/dist/particles/card-summary/card-network.js +25 -0
- package/dist/particles/card-summary/card-network.js.map +1 -0
- package/dist/particles/card-summary/card-summary.d.ts +83 -0
- package/dist/particles/card-summary/card-summary.js +188 -0
- package/dist/particles/card-summary/card-summary.js.map +1 -0
- package/dist/particles/copy-text/copy-text.d.ts +28 -0
- package/dist/particles/copy-text/copy-text.js +140 -0
- package/dist/particles/copy-text/copy-text.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +34 -5
- package/dist/particles/document-field/document-field.js +115 -19
- package/dist/particles/document-field/document-field.js.map +1 -1
- package/dist/particles/field/field.js +1 -1
- package/dist/particles/field/field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
- package/dist/particles/footer-link-group/footer-link-group.js +18 -7
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
- package/dist/particles/footer-social/footer-social.d.ts +1 -1
- package/dist/particles/footer-social/footer-social.js +1 -1
- package/dist/particles/footer-social/footer-social.js.map +1 -1
- package/dist/particles/incentives/incentives.d.ts +7 -3
- package/dist/particles/incentives/incentives.js +8 -3
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/logo/logo.d.ts +3 -2
- package/dist/particles/logo/logo.js +20 -8
- package/dist/particles/logo/logo.js.map +1 -1
- package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
- package/dist/particles/navigation-link/navigation-link.js +4 -4
- package/dist/particles/navigation-link/navigation-link.js.map +1 -1
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
- package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
- package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
- package/dist/particles/order-details-back/order-details-back.js +52 -0
- package/dist/particles/order-details-back/order-details-back.js.map +1 -0
- package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
- package/dist/particles/order-status-badge/order-status-badge.js +50 -0
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
- package/dist/particles/payment-methods/payment-methods.d.ts +1 -1
- package/dist/particles/payment-methods/payment-methods.js +1 -1
- package/dist/particles/payment-methods/payment-methods.js.map +1 -1
- package/dist/particles/phone-field/phone-field.js +2 -2
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/select/select.js +6 -6
- package/dist/particles/select/select.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +21 -7
- package/dist/particles/toast/toast.js +76 -8
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +1376 -126
- package/dist/sdk/actions/address-action-provider.d.ts +16 -0
- package/dist/sdk/actions/address-action-provider.js +20 -0
- package/dist/sdk/actions/address-action-provider.js.map +1 -0
- package/dist/sdk/actions/analytics-action-provider.js +1 -1
- package/dist/sdk/actions/index.d.ts +5 -1
- package/dist/sdk/actions/index.js +5 -1
- package/dist/sdk/actions/locale-action-provider.d.ts +16 -0
- package/dist/sdk/actions/locale-action-provider.js +20 -0
- package/dist/sdk/actions/locale-action-provider.js.map +1 -0
- package/dist/sdk/actions/order-action-provider.d.ts +12 -0
- package/dist/sdk/actions/order-action-provider.js +16 -0
- package/dist/sdk/actions/order-action-provider.js.map +1 -0
- package/dist/sdk/actions/saved-card-action-provider.d.ts +12 -0
- package/dist/sdk/actions/saved-card-action-provider.js +16 -0
- package/dist/sdk/actions/saved-card-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +10 -2
- package/dist/sdk/address/address-fields.js +38 -0
- package/dist/sdk/address/address-fields.js.map +1 -0
- package/dist/sdk/address/checkout-readiness.js +17 -0
- package/dist/sdk/address/checkout-readiness.js.map +1 -0
- package/dist/sdk/address/constants.js +60 -0
- package/dist/sdk/address/constants.js.map +1 -0
- package/dist/sdk/address/country-display.js +19 -0
- package/dist/sdk/address/country-display.js.map +1 -0
- package/dist/sdk/address/country-rules.js +30 -0
- package/dist/sdk/address/country-rules.js.map +1 -0
- package/dist/sdk/address/format-address.js +18 -0
- package/dist/sdk/address/format-address.js.map +1 -0
- package/dist/sdk/address/iso-countries.js +262 -0
- package/dist/sdk/address/iso-countries.js.map +1 -0
- package/dist/sdk/address/layouts.js +56 -0
- package/dist/sdk/address/layouts.js.map +1 -0
- package/dist/sdk/address/messages.js +97 -0
- package/dist/sdk/address/messages.js.map +1 -0
- package/dist/sdk/address/operations.d.ts +54 -0
- package/dist/sdk/address/operations.js +83 -0
- package/dist/sdk/address/operations.js.map +1 -0
- package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
- package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
- package/dist/sdk/address/postal-code.js +11 -0
- package/dist/sdk/address/postal-code.js.map +1 -0
- package/dist/sdk/address/schema.js +14 -0
- package/dist/sdk/address/schema.js.map +1 -0
- package/dist/sdk/address/server-fields.js +25 -0
- package/dist/sdk/address/server-fields.js.map +1 -0
- package/dist/sdk/address/switch-country.js +57 -0
- package/dist/sdk/address/switch-country.js.map +1 -0
- package/dist/sdk/address/types.d.ts +26 -0
- package/dist/sdk/address/use-address-actions.d.ts +29 -0
- package/dist/sdk/address/use-address-actions.js +247 -0
- package/dist/sdk/address/use-address-actions.js.map +1 -0
- package/dist/sdk/address/use-address-by-postal-code.js +57 -0
- package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
- package/dist/sdk/address/validate-address.js +62 -0
- package/dist/sdk/address/validate-address.js.map +1 -0
- package/dist/sdk/cache/storefront-cache.js +30 -4
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/cart/operations.d.ts +2 -1
- package/dist/sdk/cart/operations.js +55 -1
- package/dist/sdk/cart/operations.js.map +1 -1
- package/dist/sdk/cart/optimistic.d.ts +30 -7
- package/dist/sdk/cart/optimistic.js +78 -41
- package/dist/sdk/cart/optimistic.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.d.ts +7 -0
- package/dist/sdk/cart/use-cart-actions.js +61 -15
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-sync-sales-channel.js +70 -0
- package/dist/sdk/cart/use-cart-sync-sales-channel.js.map +1 -0
- package/dist/sdk/client/fetch-page-data.d.ts +11 -0
- package/dist/sdk/client/fetch-page-data.js +12 -1
- package/dist/sdk/client/fetch-page-data.js.map +1 -1
- package/dist/sdk/content/create-content-runtime.js +1 -8
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/failed-fields.js +23 -0
- package/dist/sdk/data/failed-fields.js.map +1 -0
- package/dist/sdk/data/index.js +2 -2
- package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
- package/dist/sdk/data/page-reactive-data-root.js +88 -12
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/generated/fragment-types.js +2 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -1
- package/dist/sdk/generated/gql.js +17 -11
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +185 -46
- package/dist/sdk/generated/graphql.js +2587 -155
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +157 -1
- package/dist/sdk/i18n/messages/en-US.json +157 -1
- package/dist/sdk/i18n/messages/en-US.json.d.ts +156 -0
- package/dist/sdk/i18n/messages/es-ES.js +157 -1
- package/dist/sdk/i18n/messages/es-ES.json +157 -1
- package/dist/sdk/i18n/messages/pt-BR.js +157 -1
- package/dist/sdk/i18n/messages/pt-BR.json +157 -1
- package/dist/sdk/i18n/provider.js +1 -1
- package/dist/sdk/i18n/provider.js.map +1 -1
- package/dist/sdk/locale/binding-switch-provider.d.ts +13 -0
- package/dist/sdk/locale/binding-switch-provider.js +20 -0
- package/dist/sdk/locale/binding-switch-provider.js.map +1 -0
- package/dist/sdk/locale/use-locale-actions.d.ts +16 -0
- package/dist/sdk/locale/use-locale-actions.js +70 -0
- package/dist/sdk/locale/use-locale-actions.js.map +1 -0
- package/dist/sdk/navigation/binding-switch.d.ts +39 -0
- package/dist/sdk/navigation/binding-switch.js +129 -0
- package/dist/sdk/navigation/binding-switch.js.map +1 -0
- package/dist/sdk/navigation/current-page.js +30 -0
- package/dist/sdk/navigation/current-page.js.map +1 -0
- package/dist/sdk/navigation/decode-route-params.d.ts +11 -0
- package/dist/sdk/navigation/decode-route-params.js +32 -0
- package/dist/sdk/navigation/decode-route-params.js.map +1 -0
- package/dist/sdk/navigation/not-found-log.d.ts +28 -0
- package/dist/sdk/navigation/not-found-log.js +133 -0
- package/dist/sdk/navigation/not-found-log.js.map +1 -0
- package/dist/sdk/navigation/path.js +25 -0
- package/dist/sdk/navigation/path.js.map +1 -0
- package/dist/sdk/navigation/redirect.d.ts +11 -0
- package/dist/sdk/navigation/redirect.js +22 -0
- package/dist/sdk/navigation/redirect.js.map +1 -0
- package/dist/sdk/navigation/report.js +70 -0
- package/dist/sdk/navigation/report.js.map +1 -0
- package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
- package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
- package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
- package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
- package/dist/sdk/navigation/route-identity-provider.js +20 -0
- package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
- package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
- package/dist/sdk/navigation/route-map-provider.js +29 -0
- package/dist/sdk/navigation/route-map-provider.js.map +1 -0
- package/dist/sdk/navigation/storefront-link.d.ts +16 -0
- package/dist/sdk/navigation/storefront-link.js +66 -0
- package/dist/sdk/navigation/storefront-link.js.map +1 -0
- package/dist/sdk/navigation/types.d.ts +45 -0
- package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
- package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-route.js +87 -0
- package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
- package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
- package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
- package/dist/sdk/orders/completion-badge.d.ts +8 -0
- package/dist/sdk/orders/completion-badge.js +47 -0
- package/dist/sdk/orders/completion-badge.js.map +1 -0
- package/dist/sdk/orders/order-operations.d.ts +19 -0
- package/dist/sdk/orders/order-operations.js +21 -0
- package/dist/sdk/orders/order-operations.js.map +1 -0
- package/dist/sdk/orders/use-order-actions.d.ts +23 -0
- package/dist/sdk/orders/use-order-actions.js +62 -0
- package/dist/sdk/orders/use-order-actions.js.map +1 -0
- package/dist/sdk/payment/gateway-origin.js +26 -13
- package/dist/sdk/payment/gateway-origin.js.map +1 -1
- package/dist/sdk/payment/gateway.d.ts +14 -2
- package/dist/sdk/payment/gateway.js +32 -14
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.js +11 -0
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/submission-registry.d.ts +2 -1
- package/dist/sdk/payment/submission-registry.js +12 -8
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
- package/dist/sdk/payment/use-payment-actions.js +5 -2
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +6 -3
- package/dist/sdk/payment/use-place-order.js +333 -143
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/saved-cards/operations.d.ts +16 -0
- package/dist/sdk/saved-cards/operations.js +41 -0
- package/dist/sdk/saved-cards/operations.js.map +1 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
- package/dist/sdk/seo/page-alternates.d.ts +57 -0
- package/dist/sdk/seo/page-alternates.js +127 -0
- package/dist/sdk/seo/page-alternates.js.map +1 -0
- package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
- package/dist/sdk/shipping/shipping-operations.js +13 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -1
- package/dist/sdk/state/cart.d.ts +9 -2
- package/dist/sdk/state/cart.js +9 -2
- package/dist/sdk/state/cart.js.map +1 -1
- package/dist/utils/own-value.js +19 -0
- package/dist/utils/own-value.js.map +1 -0
- package/dist/utils/safe-href.d.ts +4 -4
- package/dist/utils/safe-href.js +31 -22
- package/dist/utils/safe-href.js.map +1 -1
- package/package.json +5 -1
- package/skills/storefront-asset/SKILL.md +111 -0
- package/skills/storefront-asset/references/api-side.md +153 -0
- package/skills/storefront-asset/references/findings.md +40 -0
- package/skills/storefront-asset/references/ui-side.md +94 -0
- package/src/styles/tailwind.css +28 -2
package/dist/matter/cart/cart.js
CHANGED
|
@@ -3,23 +3,26 @@ import { defineComponent } from "../../core/dist/define-component.js";
|
|
|
3
3
|
import { defineContentType } from "../../core/dist/define-content-type.js";
|
|
4
4
|
import "../../core/dist/index.js";
|
|
5
5
|
import { useStorefrontContext } from "../../sdk/context/storefront-context.js";
|
|
6
|
+
import { useStorefrontNavigation } from "../../sdk/navigation/use-storefront-navigation.js";
|
|
6
7
|
import { graphql } from "../../sdk/generated/gql.js";
|
|
7
8
|
import { useActionsOverride } from "../../sdk/actions/actions-override-context.js";
|
|
8
9
|
import { useDataOverride } from "../../sdk/data/data-override-context.js";
|
|
9
10
|
import { NavigationLink } from "../../particles/navigation-link/navigation-link.js";
|
|
10
|
-
import {
|
|
11
|
+
import { loggableErrorName } from "../../utils/loggable-error-name.js";
|
|
12
|
+
import { ListItemRefContext } from "../../sdk/data/list-item-ref-context.js";
|
|
11
13
|
import { ReactiveRootContext } from "../../sdk/data/page-reactive-data-root.js";
|
|
14
|
+
import { useOptionalToast } from "../../particles/toast/toast.js";
|
|
15
|
+
import { Icon } from "../../particles/icon/icon.js";
|
|
12
16
|
import { DrawerClose } from "../../particles/drawer/drawer.js";
|
|
13
17
|
import { Image } from "../../particles/image/image.js";
|
|
14
18
|
import { cartCouponErrorsVar, cartLastAddVar, cartUserErrorsVar, miniCartOpenVar, orderFormIdVar } from "../../sdk/state/cart.js";
|
|
15
19
|
import { awaitCartWrites } from "../../sdk/cart/write-gate.js";
|
|
16
20
|
import { readCartFromCache } from "../../sdk/cart/use-cart-actions.js";
|
|
21
|
+
import { useCartSyncSalesChannel } from "../../sdk/cart/use-cart-sync-sales-channel.js";
|
|
17
22
|
import { useCartValidateOnOpen } from "../../sdk/cart/use-cart-validate-on-open.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
import { useRouter } from "next/navigation";
|
|
23
|
+
import { getApolloContext, useApolloClient, useReactiveVar } from "@apollo/client/react";
|
|
24
|
+
import { cloneElement, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
25
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
23
26
|
import { useLinkStatus } from "next/link";
|
|
24
27
|
//#region src/matter/cart/cart.tsx
|
|
25
28
|
const CartDisclaimerContent = defineContentType({
|
|
@@ -88,6 +91,17 @@ const fragment = graphql(`
|
|
|
88
91
|
code
|
|
89
92
|
isUnmatchedCondition
|
|
90
93
|
}
|
|
94
|
+
discounts {
|
|
95
|
+
name
|
|
96
|
+
value {
|
|
97
|
+
...MoneyFragment
|
|
98
|
+
}
|
|
99
|
+
kind
|
|
100
|
+
}
|
|
101
|
+
salesChannelMismatch {
|
|
102
|
+
cartSalesChannel
|
|
103
|
+
activeSalesChannel
|
|
104
|
+
}
|
|
91
105
|
}
|
|
92
106
|
}
|
|
93
107
|
`);
|
|
@@ -97,6 +111,17 @@ function formatPrice(value, locale, currency) {
|
|
|
97
111
|
currency
|
|
98
112
|
}).format(value);
|
|
99
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* True when a money amount can be read as a number: a finite `number` (the optimistic-cache shape) or
|
|
116
|
+
* a non-blank string `Number` parses to a finite value (the wire shape, a decimal string). Blank and
|
|
117
|
+
* nullish amounts are rejected before `Number()` runs, because `Number('')` and `Number(null)` are `0`
|
|
118
|
+
* and would turn a missing amount into a real zero.
|
|
119
|
+
*/
|
|
120
|
+
function isFiniteAmount(value) {
|
|
121
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
122
|
+
if (typeof value === "string") return value.trim() !== "" && Number.isFinite(Number(value));
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
100
125
|
const CartTotalValueContext = createContext(null);
|
|
101
126
|
const CART_DATA_UNSET = Symbol("CartDataContextUnset");
|
|
102
127
|
const CartDataContextInternal = createContext(CART_DATA_UNSET);
|
|
@@ -126,7 +151,8 @@ const CartRootDefinition = defineComponent({
|
|
|
126
151
|
category: "commerce"
|
|
127
152
|
},
|
|
128
153
|
schema: {},
|
|
129
|
-
|
|
154
|
+
actions: { cart: ["syncSalesChannel"] },
|
|
155
|
+
guideline: "Cart data provider hosted by the layout (shared shell), wrapping the slot so every page consumes its context; exactly one per tree — do not place it as a page root. To build a mini-cart, wrap this CartRoot subtree in a modal DrawerRoot: the header carries a DrawerTrigger with a CartCount badge, the DrawerPopup body is a CartList line-item template, and its footer is CartTotal plus CartGoCheckout. The mini-cart is this layout composition, not a dedicated component. See cart.md. On load, a cart whose sales channel differs from the request is moved onto the active channel."
|
|
130
156
|
});
|
|
131
157
|
const CartListDefinition = defineComponent({
|
|
132
158
|
name: "CartList",
|
|
@@ -166,12 +192,18 @@ const CartCountDefinition = defineComponent({
|
|
|
166
192
|
label: "Cart Count",
|
|
167
193
|
category: "commerce"
|
|
168
194
|
},
|
|
169
|
-
schema: {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
195
|
+
schema: {
|
|
196
|
+
template: {
|
|
197
|
+
type: "string",
|
|
198
|
+
default: "{count}",
|
|
199
|
+
label: "Template"
|
|
200
|
+
},
|
|
201
|
+
templateOne: {
|
|
202
|
+
type: "string",
|
|
203
|
+
label: "Template (one)"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
guideline: "Renders the total item count in the cart; use the template prop to customize the format (e.g. '{count} produtos'). Set templateOne (e.g. '{count} produto') to word the count of exactly 1; template covers every other count, including 0, and is also used when templateOne is unset. A count that is not a finite number renders nothing. Gift lines are excluded from the count — a promotional gift is not something the shopper added — so a cart holding only gifts shows 0. In a mini-cart, place it as the badge on the header DrawerTrigger and again in the DrawerPopup header. Must be inside CartRoot."
|
|
175
207
|
});
|
|
176
208
|
const CartErrorDefinition = defineComponent({
|
|
177
209
|
name: "CartError",
|
|
@@ -195,8 +227,8 @@ const CartGoCheckoutDefinition = defineComponent({
|
|
|
195
227
|
},
|
|
196
228
|
schema: {
|
|
197
229
|
href: {
|
|
198
|
-
type: "
|
|
199
|
-
default: "
|
|
230
|
+
type: "link",
|
|
231
|
+
default: { standard: "checkout" },
|
|
200
232
|
label: "Checkout URL"
|
|
201
233
|
},
|
|
202
234
|
label: {
|
|
@@ -206,7 +238,7 @@ const CartGoCheckoutDefinition = defineComponent({
|
|
|
206
238
|
}
|
|
207
239
|
},
|
|
208
240
|
actions: { cart: ["validate"] },
|
|
209
|
-
guideline: "Navigation link to the checkout page (default href
|
|
241
|
+
guideline: "Navigation link to the checkout page (default href the checkout page); use as the checkout CTA inside the cart summary. In a mini-cart it is the DrawerPopup footer CTA, next to CartTotal. The button wording is merchant-editable content: a CMS entry wins, then the label prop (default \"Checkout\"), then children — so a store that labels the button through children keeps working and a CMS save overrides it without a deploy. The destination is not content-editable: href stays an authored prop, because re-pointing checkout is not a copy decision. Before routing it runs a stock validation and only navigates when the re-checked cart has no unavailable line; a validation that cannot run falls open and navigates anyway. During a client-side route transition to checkout it surfaces a loading state on its content wrapper as aria-busy plus data-fs-cart-go-checkout-pending, and while the pre-checkout validation runs it exposes data-fs-cart-go-checkout-validating — there is no built-in spinner, so opt into one by styling those attributes (e.g. composing a Spinner). For an external or hard checkout navigation there is no client-side transition, so the loading state simply does not show (a graceful no-op). The enriched footer checkout CTA is CartCheckoutGuard wrapping CartTotal and this CartGoCheckout: the guard makes the CTA inert (data-fs-cart-checkout-blocked) while any item is unavailable, and CartTotal shows the grand total at the button. Must be inside CartRoot."
|
|
210
242
|
});
|
|
211
243
|
const CartCouponFormDefinition = defineComponent({
|
|
212
244
|
name: "CartCouponForm",
|
|
@@ -224,10 +256,15 @@ const CartCouponFormDefinition = defineComponent({
|
|
|
224
256
|
applyLabel: {
|
|
225
257
|
type: "string",
|
|
226
258
|
label: "Apply Label"
|
|
259
|
+
},
|
|
260
|
+
appliedMessage: {
|
|
261
|
+
type: "string",
|
|
262
|
+
default: "Coupon applied",
|
|
263
|
+
label: "Applied message"
|
|
227
264
|
}
|
|
228
265
|
},
|
|
229
266
|
actions: { cart: ["applyCoupon"] },
|
|
230
|
-
guideline: "Coupon code input plus an apply button; root-agnostic (dispatches $actions.cart.applyCoupon). While an apply is in flight it disables the input and button and exposes data-fs-cart-coupon-pending. In a mini-cart it sits in the DrawerPopup footer above the totals; pair it with CartAppliedCoupons (the applied list) and CartCouponError (the error banner). Must be inside CartRoot."
|
|
267
|
+
guideline: "Coupon code input plus an apply button; root-agnostic (dispatches $actions.cart.applyCoupon). While an apply is in flight it disables the input and button and exposes data-fs-cart-coupon-pending. In a mini-cart it sits in the DrawerPopup footer above the totals; pair it with CartAppliedCoupons (the applied list) and CartCouponError (the error banner). For a single-coupon store, wrap the entry (the accordion holding this form) in CartCouponEmpty so it hides once a code is applied. When an apply returns no errors and the submitted code comes back matched, it raises a toast titled appliedMessage (needs a ToastProvider with a ToastList in the layout; with none, no toast shows and the apply still works). An unmatched code raises no toast; compose CartCouponUnmatched in the chip for that case. The toast still shows when CartCouponEmpty removes the form. Must be inside CartRoot."
|
|
231
268
|
});
|
|
232
269
|
const CartAppliedCouponsDefinition = defineComponent({
|
|
233
270
|
name: "CartAppliedCoupons",
|
|
@@ -239,7 +276,7 @@ const CartAppliedCouponsDefinition = defineComponent({
|
|
|
239
276
|
},
|
|
240
277
|
schema: {},
|
|
241
278
|
actions: { cart: ["removeCoupon"] },
|
|
242
|
-
guideline: "Renders one chip per applied coupon (cart.appliedCoupons), each showing its code and a CartCouponRemove control; renders nothing when no coupons are applied. A coupon whose conditions did not match is marked with data-fs-cart-coupon-unmatched. Place it next to CartCouponForm in the mini-cart footer. Must be inside CartRoot."
|
|
279
|
+
guideline: "Renders one chip per applied coupon (cart.appliedCoupons), each showing its code and a CartCouponRemove control; renders nothing when no coupons are applied. A coupon whose conditions did not match is marked with data-fs-cart-coupon-unmatched. Place it next to CartCouponForm in the mini-cart footer. Composed children replace the built-in remove control, so a chip template that adds CartCouponUnmatched (the unmatched-coupon notice) or CartCouponSavings (the amount the coupon saves) must also compose CartCouponRemove. Must be inside CartRoot."
|
|
243
280
|
});
|
|
244
281
|
const CartCouponRemoveDefinition = defineComponent({
|
|
245
282
|
name: "CartCouponRemove",
|
|
@@ -267,13 +304,62 @@ const CartCouponErrorDefinition = defineComponent({
|
|
|
267
304
|
schema: {},
|
|
268
305
|
guideline: "Inline error banner that surfaces coupon apply/remove errors next to the CartCouponForm; renders nothing when there are none. Reads a dedicated coupon error channel, separate from CartError. Must be inside CartRoot."
|
|
269
306
|
});
|
|
270
|
-
|
|
271
|
-
|
|
307
|
+
const CartCouponEmptyDefinition = defineComponent({
|
|
308
|
+
name: "CartCouponEmpty",
|
|
309
|
+
importPath: "@vtex/faststore/components",
|
|
310
|
+
component: CartCouponEmpty,
|
|
311
|
+
editor: {
|
|
312
|
+
label: "Cart Coupon Empty",
|
|
313
|
+
category: "commerce"
|
|
314
|
+
},
|
|
315
|
+
schema: {},
|
|
316
|
+
guideline: "Coupon entry gate: renders its children only while the resolved cart has no applied coupon (cart.appliedCoupons is empty), and nothing while the cart loads. The merchant coupon policy is composition: for a single-coupon store, wrap the coupon entry (the AccordionRoot holding CartCouponForm) in it so the entry hides once a code is applied and returns when the chip is removed; for a multi-coupon store, omit it so the entry stays open for more codes. Keep CartAppliedCoupons and CartCouponError outside it, so the applied chips and coupon errors stay visible. Must be inside CartRoot. See cart.md."
|
|
317
|
+
});
|
|
318
|
+
const CartCouponUnmatchedDefinition = defineComponent({
|
|
319
|
+
name: "CartCouponUnmatched",
|
|
320
|
+
importPath: "@vtex/faststore/components",
|
|
321
|
+
component: CartCouponUnmatched,
|
|
322
|
+
editor: {
|
|
323
|
+
label: "Cart Coupon Unmatched",
|
|
324
|
+
category: "commerce"
|
|
325
|
+
},
|
|
326
|
+
schema: { message: {
|
|
327
|
+
type: "string",
|
|
328
|
+
default: "This coupon is not being applied to your cart",
|
|
329
|
+
label: "Message"
|
|
330
|
+
} },
|
|
331
|
+
guideline: "Per-chip notice for an applied coupon that grants nothing: renders the message copy in an <output> live region only while the enclosing chip's coupon has isUnmatchedCondition (its conditions stopped matching, were never met, or the code was accepted without validation), and nothing once it matches again, outside a chip, or when the copy is blank. Place it inside CartAppliedCoupons next to CartCouponRemove: composed children replace the built-in remove control, so a chip template without CartCouponRemove loses the X. It does not remove the coupon; the shopper removes it with the X. See cart.md."
|
|
332
|
+
});
|
|
333
|
+
const CartCouponSavingsDefinition = defineComponent({
|
|
334
|
+
name: "CartCouponSavings",
|
|
335
|
+
importPath: "@vtex/faststore/components",
|
|
336
|
+
component: CartCouponSavings,
|
|
337
|
+
editor: {
|
|
338
|
+
label: "Cart Coupon Savings",
|
|
339
|
+
category: "commerce"
|
|
340
|
+
},
|
|
341
|
+
schema: { template: {
|
|
342
|
+
type: "string",
|
|
343
|
+
default: "{amount}",
|
|
344
|
+
label: "Template"
|
|
345
|
+
} },
|
|
346
|
+
guideline: "Per-chip amount a fixed-amount coupon took off, summed from cart.discounts for the enclosing chip's code. Renders nothing for an unmatched, free-shipping or percentage coupon (the API attributes no amount to them), outside a chip, or when the sum is not above zero. Set template to word the chip text, e.g. 'Economia de {amount}' or '{code} — Economia de {amount}': every {amount} becomes the saving and every {code} the chip's code; the default is '{amount}' and a blank template counts as unset. The chip already shows the code before its children, so {code} repeats it. Place it inside a CartAppliedCoupons chip template next to CartCouponRemove: composed children replace the built-in remove control, so a chip template without CartCouponRemove loses the X. Must be inside CartRoot. See cart.md."
|
|
347
|
+
});
|
|
348
|
+
const useIsomorphicLayoutEffect = globalThis.window === void 0 ? useEffect : useLayoutEffect;
|
|
349
|
+
function CartRoot({ $data: $dataProp, $actions: $actionsProp, className, children, ...props }) {
|
|
350
|
+
const $data = useDataOverride($dataProp);
|
|
351
|
+
const $actions = useActionsOverride($actionsProp);
|
|
352
|
+
const cart = $data ?? null;
|
|
353
|
+
useCartSyncSalesChannel($actions?.cart?.syncSalesChannel, cart?.id ?? null, cart?.salesChannelMismatch);
|
|
272
354
|
const { error: rootError } = useContext(ReactiveRootContext);
|
|
273
355
|
const cartEntityId = cart?.id ?? null;
|
|
274
356
|
useEffect(() => {
|
|
275
357
|
if (cartEntityId) orderFormIdVar(cartEntityId);
|
|
276
358
|
}, [cartEntityId]);
|
|
359
|
+
useIsomorphicLayoutEffect(() => {
|
|
360
|
+
cartUserErrorsVar([]);
|
|
361
|
+
cartCouponErrorsVar([]);
|
|
362
|
+
}, []);
|
|
277
363
|
const dataValue = useMemo(() => ({
|
|
278
364
|
cart,
|
|
279
365
|
error: rootError ?? null
|
|
@@ -318,24 +404,37 @@ function CartList({ className, children, skeletonCount = 3, ...props }) {
|
|
|
318
404
|
function CartTotal({ label, className, children, ...props }) {
|
|
319
405
|
const total = useContext(CartTotalValueContext);
|
|
320
406
|
const { locale, currency } = useStorefrontContext();
|
|
321
|
-
const value = children ?? formatPrice(total?.amount ?? 0, locale, currency);
|
|
407
|
+
const value = children ?? formatPrice(Number(total?.amount ?? 0), locale, currency);
|
|
322
408
|
return /* @__PURE__ */ jsx("span", {
|
|
323
409
|
...props,
|
|
324
410
|
className,
|
|
325
411
|
"data-fs-cart-total": "",
|
|
326
412
|
"data-fs-text": "",
|
|
327
|
-
children: label == null ? value : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx("span", { children: value })] })
|
|
413
|
+
children: label == null ? value : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx("span", { children: value })] })
|
|
328
414
|
});
|
|
329
415
|
}
|
|
330
|
-
|
|
416
|
+
/**
|
|
417
|
+
* Fills `{count}` in the template for the count. `templateOne` is used only at exactly 1 and only when
|
|
418
|
+
* it is not blank. A count that is not a finite number yields `null`.
|
|
419
|
+
*/
|
|
420
|
+
function formatCount(count, template, templateOne) {
|
|
421
|
+
if (!Number.isFinite(count)) return null;
|
|
422
|
+
return (count === 1 && templateOne?.trim() ? templateOne : template).replace("{count}", String(count));
|
|
423
|
+
}
|
|
424
|
+
function addToCount(sum, item) {
|
|
425
|
+
if (item.gift) return sum;
|
|
426
|
+
return Number.isFinite(item.quantity) ? sum + item.quantity : NaN;
|
|
427
|
+
}
|
|
428
|
+
function CartCount({ className, children, template = "{count}", templateOne, ...props }) {
|
|
331
429
|
const { cart } = useCart();
|
|
332
|
-
const count = cart?.items.reduce(
|
|
430
|
+
const count = cart?.items.reduce(addToCount, 0) ?? 0;
|
|
431
|
+
if (!Number.isFinite(count)) return null;
|
|
333
432
|
return /* @__PURE__ */ jsx("span", {
|
|
334
433
|
...props,
|
|
335
434
|
className,
|
|
336
435
|
"data-fs-cart-count": "",
|
|
337
436
|
"data-fs-text": "",
|
|
338
|
-
children: children ??
|
|
437
|
+
children: children ?? formatCount(count, template, templateOne)
|
|
339
438
|
});
|
|
340
439
|
}
|
|
341
440
|
function CartError({ className, children, ...props }) {
|
|
@@ -362,14 +461,12 @@ function CartGoCheckoutPending({ children }) {
|
|
|
362
461
|
function configuredLabel(value) {
|
|
363
462
|
return value?.trim() ? value : void 0;
|
|
364
463
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
function CartGoCheckout({ href = "/checkout", label, className, children, onClick, $content, $actions: $actionsProp, ...props }) {
|
|
464
|
+
/** The default destination of both checkout navigations. Module-level, so an effect keyed on it is stable. */
|
|
465
|
+
const CHECKOUT_PAGE = { standard: "checkout" };
|
|
466
|
+
function CartGoCheckout({ href = CHECKOUT_PAGE, label, className, children, onClick, $content, $actions: $actionsProp, ...props }) {
|
|
370
467
|
const $actions = useActionsOverride($actionsProp);
|
|
371
468
|
const client = useApolloClient();
|
|
372
|
-
const
|
|
469
|
+
const { push } = useStorefrontNavigation();
|
|
373
470
|
const [validating, setValidating] = useState(false);
|
|
374
471
|
const inFlight = useRef(false);
|
|
375
472
|
const resolvedChildren = typeof children === "string" ? configuredLabel(children) : children;
|
|
@@ -386,10 +483,10 @@ function CartGoCheckout({ href = "/checkout", label, className, children, onClic
|
|
|
386
483
|
try {
|
|
387
484
|
await awaitCartWrites();
|
|
388
485
|
if ((await validate()).length > 0) {
|
|
389
|
-
|
|
486
|
+
push(href);
|
|
390
487
|
return;
|
|
391
488
|
}
|
|
392
|
-
if (!(readCartFromCache(client)?.items ?? []).some((item) => item.variant.availability !== "AVAILABLE"))
|
|
489
|
+
if (!(readCartFromCache(client)?.items ?? []).some((item) => item.variant.availability !== "AVAILABLE")) push(href);
|
|
393
490
|
} finally {
|
|
394
491
|
inFlight.current = false;
|
|
395
492
|
setValidating(false);
|
|
@@ -405,8 +502,10 @@ function CartGoCheckout({ href = "/checkout", label, className, children, onClic
|
|
|
405
502
|
children: /* @__PURE__ */ jsx(CartGoCheckoutPending, { children: resolvedLabel })
|
|
406
503
|
});
|
|
407
504
|
}
|
|
408
|
-
function CartCouponForm({ placeholder = "Coupon code", applyLabel = "Apply", className, children, onSubmit, $actions: $actionsProp, ...props }) {
|
|
505
|
+
function CartCouponForm({ placeholder = "Coupon code", applyLabel = "Apply", appliedMessage = "Coupon applied", className, children, onSubmit, $actions: $actionsProp, ...props }) {
|
|
409
506
|
const $actions = useActionsOverride($actionsProp);
|
|
507
|
+
const toast = useOptionalToast();
|
|
508
|
+
const { client } = useContext(getApolloContext());
|
|
410
509
|
const [code, setCode] = useState("");
|
|
411
510
|
const [pending, setPending] = useState(false);
|
|
412
511
|
async function handleSubmit(e) {
|
|
@@ -418,6 +517,13 @@ function CartCouponForm({ placeholder = "Coupon code", applyLabel = "Apply", cla
|
|
|
418
517
|
try {
|
|
419
518
|
const errors = await $actions?.cart?.applyCoupon?.({ code: trimmed });
|
|
420
519
|
if (!errors || errors.length === 0) setCode("");
|
|
520
|
+
if (errors?.length === 0 && client && appliedMessage?.trim()) {
|
|
521
|
+
const submitted = trimmed.toLowerCase();
|
|
522
|
+
if ((readCartFromCache(client)?.appliedCoupons ?? []).some((coupon) => coupon.code.trim().toLowerCase() === submitted && coupon.isUnmatchedCondition === false)) toast?.add({
|
|
523
|
+
title: appliedMessage,
|
|
524
|
+
type: "success"
|
|
525
|
+
});
|
|
526
|
+
}
|
|
421
527
|
} finally {
|
|
422
528
|
setPending(false);
|
|
423
529
|
}
|
|
@@ -428,7 +534,7 @@ function CartCouponForm({ placeholder = "Coupon code", applyLabel = "Apply", cla
|
|
|
428
534
|
onSubmit: handleSubmit,
|
|
429
535
|
"data-fs-cart-coupon-form": "",
|
|
430
536
|
...pending ? { "data-fs-cart-coupon-pending": "" } : {},
|
|
431
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("input", {
|
|
537
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("input", {
|
|
432
538
|
type: "text",
|
|
433
539
|
value: code,
|
|
434
540
|
placeholder,
|
|
@@ -510,6 +616,52 @@ function CartCouponError({ className, children, ...props }) {
|
|
|
510
616
|
children: children ?? firstError.message
|
|
511
617
|
});
|
|
512
618
|
}
|
|
619
|
+
function CartCouponEmpty({ className, children, ...props }) {
|
|
620
|
+
const { cart } = useCart();
|
|
621
|
+
if (cart == null || (cart.appliedCoupons ?? []).length > 0) return null;
|
|
622
|
+
return /* @__PURE__ */ jsx("div", {
|
|
623
|
+
...props,
|
|
624
|
+
className,
|
|
625
|
+
"data-fs-cart-coupon-empty": "",
|
|
626
|
+
children
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
function CartCouponUnmatched({ message = "This coupon is not being applied to your cart", className, children, ...props }) {
|
|
630
|
+
if (useContext(CartCouponContext)?.isUnmatchedCondition !== true) return null;
|
|
631
|
+
if (children == null && !message?.trim()) return null;
|
|
632
|
+
return /* @__PURE__ */ jsx("output", {
|
|
633
|
+
...props,
|
|
634
|
+
className,
|
|
635
|
+
"data-fs-cart-coupon-unmatched-notice": "",
|
|
636
|
+
"data-fs-text": "",
|
|
637
|
+
children: children ?? message
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Fills every `{code}` and `{amount}` in one pass. A function replacer keeps `$` sequences in the
|
|
642
|
+
* values literal, and a substituted value is never scanned again for placeholders.
|
|
643
|
+
*/
|
|
644
|
+
function fillCouponTemplate(template, { code, amount }) {
|
|
645
|
+
return template.replaceAll(/\{(code|amount)\}/g, (_, key) => key === "code" ? code : amount);
|
|
646
|
+
}
|
|
647
|
+
function CartCouponSavings({ className, template = "{amount}", ...props }) {
|
|
648
|
+
const coupon = useContext(CartCouponContext);
|
|
649
|
+
const { cart } = useCart();
|
|
650
|
+
const { locale, currency } = useStorefrontContext();
|
|
651
|
+
if (!cart || !coupon || coupon.isUnmatchedCondition || coupon.code === "") return null;
|
|
652
|
+
const saved = cart.discounts.reduce((sum, discount) => discount.kind === "COUPON" && discount.name === coupon.code && isFiniteAmount(discount.value.amount) ? sum + Number(discount.value.amount) : sum, 0);
|
|
653
|
+
if (saved <= 0) return null;
|
|
654
|
+
return /* @__PURE__ */ jsx("span", {
|
|
655
|
+
...props,
|
|
656
|
+
className,
|
|
657
|
+
"data-fs-cart-coupon-savings": "",
|
|
658
|
+
"data-fs-text": "",
|
|
659
|
+
children: fillCouponTemplate(template?.trim() ? template : "{amount}", {
|
|
660
|
+
code: coupon.code,
|
|
661
|
+
amount: formatPrice(-saved, locale, currency)
|
|
662
|
+
})
|
|
663
|
+
});
|
|
664
|
+
}
|
|
513
665
|
const CartCheckoutGuardDefinition = defineComponent({
|
|
514
666
|
name: "CartCheckoutGuard",
|
|
515
667
|
importPath: "@vtex/faststore/components",
|
|
@@ -562,12 +714,18 @@ const CartUnavailableCountDefinition = defineComponent({
|
|
|
562
714
|
label: "Cart Unavailable Count",
|
|
563
715
|
category: "commerce"
|
|
564
716
|
},
|
|
565
|
-
schema: {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
717
|
+
schema: {
|
|
718
|
+
template: {
|
|
719
|
+
type: "string",
|
|
720
|
+
default: "{count} items unavailable",
|
|
721
|
+
label: "Template"
|
|
722
|
+
},
|
|
723
|
+
templateOne: {
|
|
724
|
+
type: "string",
|
|
725
|
+
label: "Template (one)"
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
guideline: "Cart-level summary of how many lines are unavailable; self-hides when none. Set templateOne to word the count of exactly 1 line; template covers every other count, including 0, and is also used when templateOne is unset. See cart.md."
|
|
571
729
|
});
|
|
572
730
|
const CartRemoveUnavailableDefinition = defineComponent({
|
|
573
731
|
name: "CartRemoveUnavailable",
|
|
@@ -581,6 +739,18 @@ const CartRemoveUnavailableDefinition = defineComponent({
|
|
|
581
739
|
actions: { cart: ["removeItems"] },
|
|
582
740
|
guideline: "Button that removes every unavailable line in one batch call; self-hides when none. See cart.md."
|
|
583
741
|
});
|
|
742
|
+
const ClearCartButtonDefinition = defineComponent({
|
|
743
|
+
name: "ClearCartButton",
|
|
744
|
+
importPath: "@vtex/faststore/components",
|
|
745
|
+
component: ClearCartButton,
|
|
746
|
+
editor: {
|
|
747
|
+
label: "Clear Cart Button",
|
|
748
|
+
category: "commerce"
|
|
749
|
+
},
|
|
750
|
+
schema: {},
|
|
751
|
+
actions: { cart: ["removeItems"] },
|
|
752
|
+
guideline: "Button that removes every line in the cart (gift and unavailable lines included) in one batch call; self-hides when the cart has no lines. Disabled, with data-fs-clear-cart-button-pending, while the call is in flight. No confirmation and no toast. The write is optimistic: CartEmpty replaces CartFilled as soon as it is clicked; on failure the lines come back and the error shows in CartError, so compose a CartError outside the CartFilled/CartEmpty branches. Children are the label (default \"Clear cart\"). Must be inside CartRoot. See cart.md."
|
|
753
|
+
});
|
|
584
754
|
function isUnavailable(item) {
|
|
585
755
|
return item.variant.availability !== "AVAILABLE";
|
|
586
756
|
}
|
|
@@ -597,7 +767,7 @@ function CartCheckoutGuard({ className, children, ...props }) {
|
|
|
597
767
|
children
|
|
598
768
|
});
|
|
599
769
|
}
|
|
600
|
-
function CartUnavailableCount({ className, children, template = "{count} items unavailable", ...props }) {
|
|
770
|
+
function CartUnavailableCount({ className, children, template = "{count} items unavailable", templateOne, ...props }) {
|
|
601
771
|
const { cart } = useCart();
|
|
602
772
|
const count = (cart?.items ?? []).filter(isUnavailable).length;
|
|
603
773
|
if (count === 0) return null;
|
|
@@ -606,7 +776,7 @@ function CartUnavailableCount({ className, children, template = "{count} items u
|
|
|
606
776
|
className,
|
|
607
777
|
"data-fs-cart-unavailable-count": "",
|
|
608
778
|
"data-fs-text": "",
|
|
609
|
-
children: children ??
|
|
779
|
+
children: children ?? formatCount(count, template, templateOne)
|
|
610
780
|
});
|
|
611
781
|
}
|
|
612
782
|
function CartRemoveUnavailable({ className, children, onClick, $actions: $actionsProp, ...props }) {
|
|
@@ -628,6 +798,44 @@ function CartRemoveUnavailable({ className, children, onClick, $actions: $action
|
|
|
628
798
|
children: children ?? "Remove unavailable items"
|
|
629
799
|
});
|
|
630
800
|
}
|
|
801
|
+
function ClearCartButton({ className, children, disabled, onClick, $actions: $actionsProp, ...props }) {
|
|
802
|
+
const $actions = useActionsOverride($actionsProp);
|
|
803
|
+
const { cart } = useCart();
|
|
804
|
+
const [pending, setPending] = useState(false);
|
|
805
|
+
const inFlight = useRef(false);
|
|
806
|
+
const ids = (cart?.items ?? []).map((item) => item.id);
|
|
807
|
+
if (ids.length === 0) return null;
|
|
808
|
+
async function clear(removeItems) {
|
|
809
|
+
try {
|
|
810
|
+
await removeItems({ ids });
|
|
811
|
+
} catch (error) {
|
|
812
|
+
console.error("[ClearCartButton] removeItems failed", loggableErrorName(error));
|
|
813
|
+
} finally {
|
|
814
|
+
inFlight.current = false;
|
|
815
|
+
setPending(false);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
function handleClick(e) {
|
|
819
|
+
if (inFlight.current) return;
|
|
820
|
+
onClick?.(e);
|
|
821
|
+
const removeItems = $actions?.cart?.removeItems;
|
|
822
|
+
if (typeof removeItems !== "function") return;
|
|
823
|
+
inFlight.current = true;
|
|
824
|
+
setPending(true);
|
|
825
|
+
clear(removeItems);
|
|
826
|
+
}
|
|
827
|
+
return /* @__PURE__ */ jsx("button", {
|
|
828
|
+
...props,
|
|
829
|
+
type: "button",
|
|
830
|
+
className,
|
|
831
|
+
onClick: handleClick,
|
|
832
|
+
disabled: pending || disabled,
|
|
833
|
+
"data-fs-clear-cart-button": "",
|
|
834
|
+
"data-fs-button": "",
|
|
835
|
+
...pending ? { "data-fs-clear-cart-button-pending": "" } : {},
|
|
836
|
+
children: children ?? "Clear cart"
|
|
837
|
+
});
|
|
838
|
+
}
|
|
631
839
|
const CartOpenOnAddDefinition = defineComponent({
|
|
632
840
|
name: "CartOpenOnAdd",
|
|
633
841
|
importPath: "@vtex/faststore/components",
|
|
@@ -649,11 +857,11 @@ const CartRedirectOnAddDefinition = defineComponent({
|
|
|
649
857
|
category: "commerce"
|
|
650
858
|
},
|
|
651
859
|
schema: { href: {
|
|
652
|
-
type: "
|
|
653
|
-
default: "
|
|
860
|
+
type: "link",
|
|
861
|
+
default: { standard: "checkout" },
|
|
654
862
|
label: "Checkout URL"
|
|
655
863
|
} },
|
|
656
|
-
guideline: "No-mini-cart post-add behavior: navigates the shopper to checkout (href, default
|
|
864
|
+
guideline: "No-mini-cart post-add behavior: navigates the shopper to checkout (href, default the checkout page) after each successful add to cart. Compose it once in the layout for a store that has no mini-cart drawer; it renders no UI of its own. Use this instead of a mini-cart when adding a product should go straight to checkout. Mutually exclusive with CartOpenOnAdd — compose exactly one, and omit the drawer when using this. See cart.md."
|
|
657
865
|
});
|
|
658
866
|
/**
|
|
659
867
|
* Makes the wrapped mini-cart `DrawerRoot` controlled by `miniCartOpenVar` and opens it on each
|
|
@@ -683,16 +891,21 @@ function CartOpenOnAdd({ children, $actions: $actionsProp }) {
|
|
|
683
891
|
* redirect is post-resolve and success-gated. The initial `0` is ignored, so a fresh mount never
|
|
684
892
|
* navigates. Context-free — no `CartRoot` ancestor (ADR-0010). Renders its passthrough children (or
|
|
685
893
|
* nothing); it carries no drawer.
|
|
894
|
+
*
|
|
895
|
+
* The effect keys on the serialized `href`, not on its identity: a reference authored in a schema
|
|
896
|
+
* arrives as a new object on every server render, and keying on it would push to checkout again on a
|
|
897
|
+
* `router.refresh()` long after the add.
|
|
686
898
|
*/
|
|
687
|
-
function CartRedirectOnAdd({ href =
|
|
688
|
-
const
|
|
899
|
+
function CartRedirectOnAdd({ href = CHECKOUT_PAGE, children }) {
|
|
900
|
+
const { push } = useStorefrontNavigation();
|
|
689
901
|
const pulse = useReactiveVar(cartLastAddVar);
|
|
902
|
+
const hrefKey = JSON.stringify(href);
|
|
690
903
|
useEffect(() => {
|
|
691
|
-
if (pulse > 0)
|
|
904
|
+
if (pulse > 0) push(JSON.parse(hrefKey));
|
|
692
905
|
}, [
|
|
693
906
|
pulse,
|
|
694
|
-
|
|
695
|
-
|
|
907
|
+
hrefKey,
|
|
908
|
+
push
|
|
696
909
|
]);
|
|
697
910
|
return children;
|
|
698
911
|
}
|
|
@@ -873,7 +1086,7 @@ const CartAlertRootDefinition = defineComponent({
|
|
|
873
1086
|
}
|
|
874
1087
|
},
|
|
875
1088
|
providesContext: "cart-alert",
|
|
876
|
-
guideline: "Merchant-authored notice near the top of the mini-cart overlay (a minimum order, a running promotion): wraps CartAlertIcon and CartAlertText in any subset, any order — the arrangement is the composition, not a prop — and renders the glyph then the copy when composed with no children. Its copy and glyph are CMS-editable through the cart-alert content model, with the text, icon, iconUrl and iconAlt props as the non-CMS fallback; it renders nothing when no message is configured, so an unconfigured banner leaves no empty box. Reads no cart data, so it needs no CartRoot ancestor and no cart-state gate — place it inside CartFilled to hide it on an empty cart. A store whose merchants choose the icon must list CART_ALERT_ICON_NAMES under icons.include in
|
|
1089
|
+
guideline: "Merchant-authored notice near the top of the mini-cart overlay (a minimum order, a running promotion): wraps CartAlertIcon and CartAlertText in any subset, any order — the arrangement is the composition, not a prop — and renders the glyph then the copy when composed with no children. Its copy and glyph are CMS-editable through the cart-alert content model, with the text, icon, iconUrl and iconAlt props as the non-CMS fallback; it renders nothing when no message is configured, so an unconfigured banner leaves no empty box. Reads no cart data, so it needs no CartRoot ancestor and no cart-state gate — place it inside CartFilled to hide it on an empty cart. A store whose merchants choose the icon must list CART_ALERT_ICON_NAMES under icons.include in its foundation, or a chosen glyph renders empty. Distinct from CartError (cart mutation errors) and CartUnavailableCount (data-driven). See cart.md."
|
|
877
1090
|
});
|
|
878
1091
|
const CartAlertIconDefinition = defineComponent({
|
|
879
1092
|
name: "CartAlertIcon",
|
|
@@ -920,7 +1133,7 @@ function CartAlertRoot({ text, icon, iconUrl, iconAlt, className, children, $con
|
|
|
920
1133
|
...props,
|
|
921
1134
|
className,
|
|
922
1135
|
"data-fs-cart-alert": "",
|
|
923
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CartAlertIcon, {}), /* @__PURE__ */ jsx(CartAlertText, {})] })
|
|
1136
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CartAlertIcon, {}), /* @__PURE__ */ jsx(CartAlertText, {})] })
|
|
924
1137
|
})
|
|
925
1138
|
});
|
|
926
1139
|
}
|
|
@@ -1036,6 +1249,6 @@ function CartContinueShopping({ label = "Continue shopping", $content, className
|
|
|
1036
1249
|
});
|
|
1037
1250
|
}
|
|
1038
1251
|
//#endregion
|
|
1039
|
-
export { CART_ALERT_ICON_NAMES, CartAlertContent, CartAlertIcon, CartAlertIconDefinition, CartAlertRoot, CartAlertRootDefinition, CartAlertText, CartAlertTextDefinition, CartAppliedCoupons, CartAppliedCouponsDefinition, CartCheckoutGuard, CartCheckoutGuardDefinition, CartCheckoutLabelContent, CartContinueShopping, CartContinueShoppingContent, CartContinueShoppingDefinition, CartCount, CartCountDefinition, CartCouponError, CartCouponErrorDefinition, CartCouponForm, CartCouponFormDefinition, CartCouponRemove, CartCouponRemoveDefinition, CartDataContext, CartDisclaimer, CartDisclaimerContent, CartDisclaimerDefinition, CartEmpty, CartEmptyDefinition, CartEmptyMessage, CartEmptyMessageContent, CartEmptyMessageDefinition, CartError, CartErrorDefinition, CartFilled, CartFilledDefinition, CartGoCheckout, CartGoCheckoutDefinition, CartItemSkeleton, CartList, CartListDefinition, CartLoading, CartLoadingDefinition, CartOpenOnAdd, CartOpenOnAddDefinition, CartRedirectOnAdd, CartRedirectOnAddDefinition, CartRemoveUnavailable, CartRemoveUnavailableDefinition, CartRoot, CartRootDefinition, CartTotal, CartTotalDefinition, CartTotalValueContext, CartUnavailableCount, CartUnavailableCountDefinition, formatPrice, useCart };
|
|
1252
|
+
export { CART_ALERT_ICON_NAMES, CartAlertContent, CartAlertIcon, CartAlertIconDefinition, CartAlertRoot, CartAlertRootDefinition, CartAlertText, CartAlertTextDefinition, CartAppliedCoupons, CartAppliedCouponsDefinition, CartCheckoutGuard, CartCheckoutGuardDefinition, CartCheckoutLabelContent, CartContinueShopping, CartContinueShoppingContent, CartContinueShoppingDefinition, CartCount, CartCountDefinition, CartCouponEmpty, CartCouponEmptyDefinition, CartCouponError, CartCouponErrorDefinition, CartCouponForm, CartCouponFormDefinition, CartCouponRemove, CartCouponRemoveDefinition, CartCouponSavings, CartCouponSavingsDefinition, CartCouponUnmatched, CartCouponUnmatchedDefinition, CartDataContext, CartDisclaimer, CartDisclaimerContent, CartDisclaimerDefinition, CartEmpty, CartEmptyDefinition, CartEmptyMessage, CartEmptyMessageContent, CartEmptyMessageDefinition, CartError, CartErrorDefinition, CartFilled, CartFilledDefinition, CartGoCheckout, CartGoCheckoutDefinition, CartItemSkeleton, CartList, CartListDefinition, CartLoading, CartLoadingDefinition, CartOpenOnAdd, CartOpenOnAddDefinition, CartRedirectOnAdd, CartRedirectOnAddDefinition, CartRemoveUnavailable, CartRemoveUnavailableDefinition, CartRoot, CartRootDefinition, CartTotal, CartTotalDefinition, CartTotalValueContext, CartUnavailableCount, CartUnavailableCountDefinition, ClearCartButton, ClearCartButtonDefinition, fillCouponTemplate, formatPrice, isFiniteAmount, useCart };
|
|
1040
1253
|
|
|
1041
1254
|
//# sourceMappingURL=cart.js.map
|