@vtex/faststore 0.0.1
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 +18 -0
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/actions.json +334 -0
- package/dist/catalog.json +6615 -0
- package/dist/client.d.ts +17 -0
- package/dist/client.js +8 -0
- package/dist/components.d.ts +87 -0
- package/dist/components.js +87 -0
- package/dist/content-types.json +684 -0
- package/dist/core/dist/actions/mock-action.d.ts +24 -0
- package/dist/core/dist/actions/mock-action.js +28 -0
- package/dist/core/dist/actions/mock-action.js.map +1 -0
- package/dist/core/dist/actions/registry.d.ts +24 -0
- package/dist/core/dist/actions/registry.js +28 -0
- package/dist/core/dist/actions/registry.js.map +1 -0
- package/dist/core/dist/define-component.d.ts +100 -0
- package/dist/core/dist/define-component.js +8 -0
- package/dist/core/dist/define-component.js.map +1 -0
- package/dist/core/dist/define-content-type.d.ts +95 -0
- package/dist/core/dist/define-content-type.js +283 -0
- package/dist/core/dist/define-content-type.js.map +1 -0
- package/dist/core/dist/index.d.ts +7 -0
- package/dist/core/dist/index.js +5 -0
- package/dist/core/dist/schema/generated/schema.d.ts +28 -0
- package/dist/core/dist/types.d.ts +1 -0
- package/dist/docs/access-code-field.md +100 -0
- package/dist/docs/access-code-sign-in.md +174 -0
- package/dist/docs/account-entry-point.md +155 -0
- package/dist/docs/address-summary.md +50 -0
- package/dist/docs/buy-button.md +162 -0
- package/dist/docs/carousel.md +105 -0
- package/dist/docs/cart-item.md +162 -0
- package/dist/docs/cart-totalizer.md +197 -0
- package/dist/docs/cart.md +495 -0
- package/dist/docs/client-preferences.md +184 -0
- package/dist/docs/client-profile-form.md +192 -0
- package/dist/docs/client-profile.md +117 -0
- package/dist/docs/container.md +97 -0
- package/dist/docs/document-field.md +97 -0
- package/dist/docs/email-field.md +93 -0
- package/dist/docs/email-identification.md +102 -0
- package/dist/docs/footer-copyright.md +112 -0
- package/dist/docs/footer-link-group.md +162 -0
- package/dist/docs/footer-root.md +145 -0
- package/dist/docs/footer-social.md +151 -0
- package/dist/docs/free-shipping-progress.md +87 -0
- package/dist/docs/gallery.md +84 -0
- package/dist/docs/header-root.md +150 -0
- package/dist/docs/identity-edit.md +88 -0
- package/dist/docs/identity-summary.md +106 -0
- package/dist/docs/incentives.md +151 -0
- package/dist/docs/logo.md +135 -0
- package/dist/docs/meter.md +67 -0
- package/dist/docs/navigation-link-list.md +171 -0
- package/dist/docs/navigation-link.md +163 -0
- package/dist/docs/navigation-menu.md +264 -0
- package/dist/docs/payment-methods.md +139 -0
- package/dist/docs/phone-field.md +106 -0
- package/dist/docs/postal-code-field.md +126 -0
- package/dist/docs/pricing.md +499 -0
- package/dist/docs/product-gallery.md +409 -0
- package/dist/docs/product-information.md +295 -0
- package/dist/docs/product-list.md +170 -0
- package/dist/docs/product-quantity.md +88 -0
- package/dist/docs/product-shelf.md +141 -0
- package/dist/docs/promotion.md +109 -0
- package/dist/docs/region.md +225 -0
- package/dist/docs/session.md +123 -0
- package/dist/docs/shipping-address.md +390 -0
- package/dist/docs/shipping-simulator.md +147 -0
- package/dist/docs/sign-in-form.md +117 -0
- package/dist/docs/tabs.md +176 -0
- package/dist/docs/toast.md +124 -0
- package/dist/docs/variant-selector.md +450 -0
- package/dist/graphql/define-subgraph.d.ts +12 -0
- package/dist/graphql/define-subgraph.js +15 -0
- package/dist/graphql/define-subgraph.js.map +1 -0
- package/dist/graphql/gql.d.ts +10 -0
- package/dist/graphql/gql.js +16 -0
- package/dist/graphql/gql.js.map +1 -0
- package/dist/graphql/types.d.ts +88 -0
- package/dist/graphql.d.ts +4 -0
- package/dist/graphql.js +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +5 -0
- package/dist/internal/client.d.ts +24 -0
- package/dist/internal/client.js +23 -0
- package/dist/internal/content.d.ts +2 -0
- package/dist/internal/content.js +2 -0
- package/dist/internal/server.d.ts +7 -0
- package/dist/internal/server.js +6 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +111 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js +387 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.d.ts +64 -0
- package/dist/matter/account-entry-point/account-entry-point.js +151 -0
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -0
- package/dist/matter/breadcrumb/breadcrumb.d.ts +40 -0
- package/dist/matter/breadcrumb/breadcrumb.js +155 -0
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/matter/buy-button/buy-button.d.ts +95 -0
- package/dist/matter/buy-button/buy-button.js +259 -0
- package/dist/matter/buy-button/buy-button.js.map +1 -0
- package/dist/matter/cart/cart-namespace.d.ts +48 -0
- package/dist/matter/cart/cart-namespace.js +50 -0
- package/dist/matter/cart/cart-namespace.js.map +1 -0
- package/dist/matter/cart/cart.d.ts +312 -0
- package/dist/matter/cart/cart.js +1034 -0
- package/dist/matter/cart/cart.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +103 -0
- package/dist/matter/cart-item/cart-item.js +672 -0
- package/dist/matter/cart-item/cart-item.js.map +1 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.d.ts +49 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js +165 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.d.ts +28 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js +73 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.d.ts +33 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js +70 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.d.ts +24 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +54 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -0
- package/dist/matter/cart-item-variations/cart-item-variations.d.ts +27 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js +69 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -0
- package/dist/matter/cart-totalizer/cart-totalizer.d.ts +78 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js +220 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -0
- package/dist/matter/client-preferences/client-preferences.d.ts +50 -0
- package/dist/matter/client-preferences/client-preferences.js +206 -0
- package/dist/matter/client-preferences/client-preferences.js.map +1 -0
- package/dist/matter/client-profile/client-profile.d.ts +59 -0
- package/dist/matter/client-profile/client-profile.js +185 -0
- package/dist/matter/client-profile/client-profile.js.map +1 -0
- package/dist/matter/client-profile-form/client-profile-form.d.ts +126 -0
- package/dist/matter/client-profile-form/client-profile-form.js +660 -0
- package/dist/matter/client-profile-form/client-profile-form.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-accordion.d.ts +30 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js +189 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-controller.d.ts +49 -0
- package/dist/matter/delivery-options/delivery-options-controller.js +203 -0
- package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options.d.ts +31 -0
- package/dist/matter/delivery-options/delivery-options.js +103 -0
- package/dist/matter/delivery-options/delivery-options.js.map +1 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +9 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js +76 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -0
- package/dist/matter/email-identification/email-identification.d.ts +37 -0
- package/dist/matter/email-identification/email-identification.js +111 -0
- package/dist/matter/email-identification/email-identification.js.map +1 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +44 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +170 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -0
- package/dist/matter/identity-edit/identity-edit.d.ts +52 -0
- package/dist/matter/identity-edit/identity-edit.js +148 -0
- package/dist/matter/identity-edit/identity-edit.js.map +1 -0
- package/dist/matter/identity-summary/identity-summary.d.ts +128 -0
- package/dist/matter/identity-summary/identity-summary.js +344 -0
- package/dist/matter/identity-summary/identity-summary.js.map +1 -0
- package/dist/matter/pricing/pricing.d.ts +162 -0
- package/dist/matter/pricing/pricing.js +793 -0
- package/dist/matter/pricing/pricing.js.map +1 -0
- package/dist/matter/product-gallery/product-gallery.d.ts +23 -0
- package/dist/matter/product-gallery/product-gallery.js +188 -0
- package/dist/matter/product-gallery/product-gallery.js.map +1 -0
- package/dist/matter/product-information/product-information.d.ts +61 -0
- package/dist/matter/product-information/product-information.js +355 -0
- package/dist/matter/product-information/product-information.js.map +1 -0
- package/dist/matter/product-list/product-list.d.ts +86 -0
- package/dist/matter/product-list/product-list.js +342 -0
- package/dist/matter/product-list/product-list.js.map +1 -0
- package/dist/matter/product-quantity/product-quantity.d.ts +50 -0
- package/dist/matter/product-quantity/product-quantity.js +111 -0
- package/dist/matter/product-quantity/product-quantity.js.map +1 -0
- package/dist/matter/product-shelf/product-shelf.d.ts +125 -0
- package/dist/matter/product-shelf/product-shelf.js +376 -0
- package/dist/matter/product-shelf/product-shelf.js.map +1 -0
- package/dist/matter/region/region.d.ts +211 -0
- package/dist/matter/region/region.js +579 -0
- package/dist/matter/region/region.js.map +1 -0
- package/dist/matter/session/session.d.ts +58 -0
- package/dist/matter/session/session.js +112 -0
- package/dist/matter/session/session.js.map +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +101 -0
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -0
- package/dist/matter/shipping-address/shipping-address.d.ts +284 -0
- package/dist/matter/shipping-address/shipping-address.js +1036 -0
- package/dist/matter/shipping-address/shipping-address.js.map +1 -0
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +143 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js +644 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -0
- package/dist/matter/sign-in-form/sign-in-form.d.ts +79 -0
- package/dist/matter/sign-in-form/sign-in-form.js +226 -0
- package/dist/matter/sign-in-form/sign-in-form.js.map +1 -0
- package/dist/matter/variant-selector/variant-selector.d.ts +183 -0
- package/dist/matter/variant-selector/variant-selector.js +840 -0
- package/dist/matter/variant-selector/variant-selector.js.map +1 -0
- package/dist/message-locales.json +7 -0
- package/dist/particles/access-code-field/access-code-field.d.ts +33 -0
- package/dist/particles/access-code-field/access-code-field.js +95 -0
- package/dist/particles/access-code-field/access-code-field.js.map +1 -0
- package/dist/particles/accordion/accordion.d.ts +45 -0
- package/dist/particles/accordion/accordion.js +156 -0
- package/dist/particles/accordion/accordion.js.map +1 -0
- package/dist/particles/address-summary/address-summary.d.ts +50 -0
- package/dist/particles/address-summary/address-summary.js +129 -0
- package/dist/particles/address-summary/address-summary.js.map +1 -0
- package/dist/particles/badge/badge.d.ts +10 -0
- package/dist/particles/badge/badge.js +27 -0
- package/dist/particles/badge/badge.js.map +1 -0
- package/dist/particles/button/button.d.ts +18 -0
- package/dist/particles/button/button.js +37 -0
- package/dist/particles/button/button.js.map +1 -0
- package/dist/particles/carousel/carousel.d.ts +60 -0
- package/dist/particles/carousel/carousel.js +335 -0
- package/dist/particles/carousel/carousel.js.map +1 -0
- package/dist/particles/checkbox/checkbox.d.ts +40 -0
- package/dist/particles/checkbox/checkbox.js +82 -0
- package/dist/particles/checkbox/checkbox.js.map +1 -0
- package/dist/particles/container/container.d.ts +20 -0
- package/dist/particles/container/container.js +36 -0
- package/dist/particles/container/container.js.map +1 -0
- package/dist/particles/dialog/dialog.d.ts +54 -0
- package/dist/particles/dialog/dialog.js +192 -0
- package/dist/particles/dialog/dialog.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +61 -0
- package/dist/particles/document-field/document-field.js +146 -0
- package/dist/particles/document-field/document-field.js.map +1 -0
- package/dist/particles/drawer/drawer.d.ts +52 -0
- package/dist/particles/drawer/drawer.js +183 -0
- package/dist/particles/drawer/drawer.js.map +1 -0
- package/dist/particles/email-field/email-field.d.ts +37 -0
- package/dist/particles/email-field/email-field.js +106 -0
- package/dist/particles/email-field/email-field.js.map +1 -0
- package/dist/particles/field/field.d.ts +50 -0
- package/dist/particles/field/field.js +133 -0
- package/dist/particles/field/field.js.map +1 -0
- package/dist/particles/fieldset/fieldset.d.ts +16 -0
- package/dist/particles/fieldset/fieldset.js +52 -0
- package/dist/particles/fieldset/fieldset.js.map +1 -0
- package/dist/particles/footer-copyright/footer-copyright.d.ts +32 -0
- package/dist/particles/footer-copyright/footer-copyright.js +50 -0
- package/dist/particles/footer-copyright/footer-copyright.js.map +1 -0
- package/dist/particles/footer-link-group/footer-link-group.d.ts +66 -0
- package/dist/particles/footer-link-group/footer-link-group.js +154 -0
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -0
- package/dist/particles/footer-root/footer-root.d.ts +21 -0
- package/dist/particles/footer-root/footer-root.js +38 -0
- package/dist/particles/footer-root/footer-root.js.map +1 -0
- package/dist/particles/footer-social/footer-social.d.ts +79 -0
- package/dist/particles/footer-social/footer-social.js +176 -0
- package/dist/particles/footer-social/footer-social.js.map +1 -0
- package/dist/particles/gallery/gallery.d.ts +181 -0
- package/dist/particles/gallery/gallery.js +920 -0
- package/dist/particles/gallery/gallery.js.map +1 -0
- package/dist/particles/header-root/header-root.d.ts +21 -0
- package/dist/particles/header-root/header-root.js +38 -0
- package/dist/particles/header-root/header-root.js.map +1 -0
- package/dist/particles/icon/icon.d.ts +22 -0
- package/dist/particles/icon/icon.js +48 -0
- package/dist/particles/icon/icon.js.map +1 -0
- package/dist/particles/image/image.d.ts +13 -0
- package/dist/particles/image/image.js +59 -0
- package/dist/particles/image/image.js.map +1 -0
- package/dist/particles/incentives/incentives.d.ts +85 -0
- package/dist/particles/incentives/incentives.js +200 -0
- package/dist/particles/incentives/incentives.js.map +1 -0
- package/dist/particles/input/input.d.ts +9 -0
- package/dist/particles/input/input.js +28 -0
- package/dist/particles/input/input.js.map +1 -0
- package/dist/particles/logo/logo.d.ts +55 -0
- package/dist/particles/logo/logo.js +96 -0
- package/dist/particles/logo/logo.js.map +1 -0
- package/dist/particles/menu/menu.d.ts +103 -0
- package/dist/particles/menu/menu.js +409 -0
- package/dist/particles/menu/menu.js.map +1 -0
- package/dist/particles/menubar/menubar.d.ts +18 -0
- package/dist/particles/menubar/menubar.js +42 -0
- package/dist/particles/menubar/menubar.js.map +1 -0
- package/dist/particles/meter/meter.d.ts +36 -0
- package/dist/particles/meter/meter.js +132 -0
- package/dist/particles/meter/meter.js.map +1 -0
- package/dist/particles/navigation-link/navigation-link.d.ts +43 -0
- package/dist/particles/navigation-link/navigation-link.js +82 -0
- package/dist/particles/navigation-link/navigation-link.js.map +1 -0
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +59 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js +103 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -0
- package/dist/particles/navigation-menu/navigation-menu.d.ts +78 -0
- package/dist/particles/navigation-menu/navigation-menu.js +295 -0
- package/dist/particles/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/particles/number-field/number-field.d.ts +46 -0
- package/dist/particles/number-field/number-field.js +169 -0
- package/dist/particles/number-field/number-field.js.map +1 -0
- package/dist/particles/password-field/password-field.d.ts +31 -0
- package/dist/particles/password-field/password-field.js +109 -0
- package/dist/particles/password-field/password-field.js.map +1 -0
- package/dist/particles/payment-methods/payment-methods.d.ts +72 -0
- package/dist/particles/payment-methods/payment-methods.js +151 -0
- package/dist/particles/payment-methods/payment-methods.js.map +1 -0
- package/dist/particles/phone-field/phone-field.d.ts +67 -0
- package/dist/particles/phone-field/phone-field.js +250 -0
- package/dist/particles/phone-field/phone-field.js.map +1 -0
- package/dist/particles/popover/popover.d.ts +68 -0
- package/dist/particles/popover/popover.js +284 -0
- package/dist/particles/popover/popover.js.map +1 -0
- package/dist/particles/postal-code-field/postal-code-field.d.ts +75 -0
- package/dist/particles/postal-code-field/postal-code-field.js +169 -0
- package/dist/particles/postal-code-field/postal-code-field.js.map +1 -0
- package/dist/particles/promotion/promotion.d.ts +46 -0
- package/dist/particles/promotion/promotion.js +78 -0
- package/dist/particles/promotion/promotion.js.map +1 -0
- package/dist/particles/quantity-selector/quantity-selector.d.ts +30 -0
- package/dist/particles/quantity-selector/quantity-selector.js +116 -0
- package/dist/particles/quantity-selector/quantity-selector.js.map +1 -0
- package/dist/particles/radio/radio.d.ts +36 -0
- package/dist/particles/radio/radio.js +76 -0
- package/dist/particles/radio/radio.js.map +1 -0
- package/dist/particles/scroll-area/scroll-area.d.ts +36 -0
- package/dist/particles/scroll-area/scroll-area.js +145 -0
- package/dist/particles/scroll-area/scroll-area.js.map +1 -0
- package/dist/particles/select/select.d.ts +125 -0
- package/dist/particles/select/select.js +478 -0
- package/dist/particles/select/select.js.map +1 -0
- package/dist/particles/separator/separator.d.ts +12 -0
- package/dist/particles/separator/separator.js +33 -0
- package/dist/particles/separator/separator.js.map +1 -0
- package/dist/particles/shared/input-mask.d.ts +5 -0
- package/dist/particles/shared/input-mask.js +58 -0
- package/dist/particles/shared/input-mask.js.map +1 -0
- package/dist/particles/spinner/spinner.d.ts +13 -0
- package/dist/particles/spinner/spinner.js +31 -0
- package/dist/particles/spinner/spinner.js.map +1 -0
- package/dist/particles/switch/switch.d.ts +27 -0
- package/dist/particles/switch/switch.js +59 -0
- package/dist/particles/switch/switch.js.map +1 -0
- package/dist/particles/tabs/tabs.d.ts +45 -0
- package/dist/particles/tabs/tabs.js +164 -0
- package/dist/particles/tabs/tabs.js.map +1 -0
- package/dist/particles/text/text.d.ts +24 -0
- package/dist/particles/text/text.js +40 -0
- package/dist/particles/text/text.js.map +1 -0
- package/dist/particles/toast/toast.d.ts +83 -0
- package/dist/particles/toast/toast.js +194 -0
- package/dist/particles/toast/toast.js.map +1 -0
- package/dist/particles/toggle/toggle.d.ts +26 -0
- package/dist/particles/toggle/toggle.js +61 -0
- package/dist/particles/toggle/toggle.js.map +1 -0
- package/dist/particles/tooltip/tooltip.d.ts +61 -0
- package/dist/particles/tooltip/tooltip.js +240 -0
- package/dist/particles/tooltip/tooltip.js.map +1 -0
- package/dist/schema.graphql +2953 -0
- package/dist/sdk/actions/cart-action-provider.d.ts +19 -0
- package/dist/sdk/actions/cart-action-provider.js +23 -0
- package/dist/sdk/actions/cart-action-provider.js.map +1 -0
- package/dist/sdk/actions/identity-action-provider.d.ts +15 -0
- package/dist/sdk/actions/identity-action-provider.js +19 -0
- package/dist/sdk/actions/identity-action-provider.js.map +1 -0
- package/dist/sdk/actions/index.d.ts +7 -0
- package/dist/sdk/actions/index.js +6 -0
- package/dist/sdk/actions/inject-actions.d.ts +14 -0
- package/dist/sdk/actions/inject-actions.js +36 -0
- package/dist/sdk/actions/inject-actions.js.map +1 -0
- package/dist/sdk/actions/region-action-provider.d.ts +15 -0
- package/dist/sdk/actions/region-action-provider.js +19 -0
- package/dist/sdk/actions/region-action-provider.js.map +1 -0
- package/dist/sdk/actions/session-action-provider.d.ts +15 -0
- package/dist/sdk/actions/session-action-provider.js +19 -0
- package/dist/sdk/actions/session-action-provider.js.map +1 -0
- package/dist/sdk/actions/shipping-action-provider.d.ts +15 -0
- package/dist/sdk/actions/shipping-action-provider.js +19 -0
- package/dist/sdk/actions/shipping-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +21 -0
- package/dist/sdk/cache/storefront-cache.js +35 -0
- package/dist/sdk/cache/storefront-cache.js.map +1 -0
- package/dist/sdk/cart/operations.d.ts +31 -0
- package/dist/sdk/cart/operations.js +215 -0
- package/dist/sdk/cart/operations.js.map +1 -0
- package/dist/sdk/cart/optimistic.d.ts +24 -0
- package/dist/sdk/cart/optimistic.js +164 -0
- package/dist/sdk/cart/optimistic.js.map +1 -0
- package/dist/sdk/cart/use-cart-actions.d.ts +56 -0
- package/dist/sdk/cart/use-cart-actions.js +348 -0
- package/dist/sdk/cart/use-cart-actions.js.map +1 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js +50 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -0
- package/dist/sdk/cart/write-gate.js +54 -0
- package/dist/sdk/cart/write-gate.js.map +1 -0
- package/dist/sdk/client/assert-api-url.js +20 -0
- package/dist/sdk/client/assert-api-url.js.map +1 -0
- package/dist/sdk/client/create-client.d.ts +23 -0
- package/dist/sdk/client/create-client.js +46 -0
- package/dist/sdk/client/create-client.js.map +1 -0
- package/dist/sdk/client/fetch-page-data.d.ts +39 -0
- package/dist/sdk/client/fetch-page-data.js +33 -0
- package/dist/sdk/client/fetch-page-data.js.map +1 -0
- package/dist/sdk/client/register-preload-query.d.ts +24 -0
- package/dist/sdk/client/register-preload-query.js +33 -0
- package/dist/sdk/client/register-preload-query.js.map +1 -0
- package/dist/sdk/content/create-content-runtime.d.ts +68 -0
- package/dist/sdk/content/create-content-runtime.js +503 -0
- package/dist/sdk/content/create-content-runtime.js.map +1 -0
- package/dist/sdk/context/headers.d.ts +15 -0
- package/dist/sdk/context/headers.js +21 -0
- package/dist/sdk/context/headers.js.map +1 -0
- package/dist/sdk/context/storefront-context.d.ts +11 -0
- package/dist/sdk/context/storefront-context.js +29 -0
- package/dist/sdk/context/storefront-context.js.map +1 -0
- package/dist/sdk/data/data-override-context.d.ts +12 -0
- package/dist/sdk/data/data-override-context.js +19 -0
- package/dist/sdk/data/data-override-context.js.map +1 -0
- package/dist/sdk/data/entity-subscriber.js +28 -0
- package/dist/sdk/data/entity-subscriber.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.d.ts +19 -0
- package/dist/sdk/data/hot-data-provider.js +33 -0
- package/dist/sdk/data/hot-data-provider.js.map +1 -0
- package/dist/sdk/data/index.d.ts +8 -0
- package/dist/sdk/data/index.js +8 -0
- package/dist/sdk/data/list-item-ref-context.d.ts +20 -0
- package/dist/sdk/data/list-item-ref-context.js +11 -0
- package/dist/sdk/data/list-item-ref-context.js.map +1 -0
- package/dist/sdk/data/multiple-reactive-data-provider.d.ts +32 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js +20 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/page-reactive-data-root.d.ts +53 -0
- package/dist/sdk/data/page-reactive-data-root.js +153 -0
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -0
- package/dist/sdk/data/reactive-data-provider.d.ts +25 -0
- package/dist/sdk/data/reactive-data-provider.js +24 -0
- package/dist/sdk/data/reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/reactive-list-item-data-provider.d.ts +26 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js +42 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -0
- package/dist/sdk/data/use-reactive-entity.js +40 -0
- package/dist/sdk/data/use-reactive-entity.js.map +1 -0
- package/dist/sdk/format/client.d.ts +12 -0
- package/dist/sdk/format/client.js +20 -0
- package/dist/sdk/format/client.js.map +1 -0
- package/dist/sdk/format/formatters.d.ts +32 -0
- package/dist/sdk/format/formatters.js +45 -0
- package/dist/sdk/format/formatters.js.map +1 -0
- package/dist/sdk/generated/fragment-types.js +23 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -0
- package/dist/sdk/generated/gql.js +51 -0
- package/dist/sdk/generated/gql.js.map +1 -0
- package/dist/sdk/generated/graphql.d.ts +622 -0
- package/dist/sdk/generated/graphql.js +11917 -0
- package/dist/sdk/generated/graphql.js.map +1 -0
- package/dist/sdk/graphql-tag.d.ts +10 -0
- package/dist/sdk/graphql-tag.js +21 -0
- package/dist/sdk/graphql-tag.js.map +1 -0
- package/dist/sdk/i18n/client.d.ts +4 -0
- package/dist/sdk/i18n/client.js +4 -0
- package/dist/sdk/i18n/locales.d.ts +8 -0
- package/dist/sdk/i18n/locales.js +57 -0
- package/dist/sdk/i18n/locales.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.js +24 -0
- package/dist/sdk/i18n/messages/en-US.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.json +19 -0
- package/dist/sdk/i18n/messages/en-US.json.d.ts +23 -0
- package/dist/sdk/i18n/messages/es-ES.js +24 -0
- package/dist/sdk/i18n/messages/es-ES.js.map +1 -0
- package/dist/sdk/i18n/messages/es-ES.json +19 -0
- package/dist/sdk/i18n/messages/pt-BR.js +24 -0
- package/dist/sdk/i18n/messages/pt-BR.js.map +1 -0
- package/dist/sdk/i18n/messages/pt-BR.json +19 -0
- package/dist/sdk/i18n/provider.d.ts +1 -0
- package/dist/sdk/i18n/provider.js +30 -0
- package/dist/sdk/i18n/provider.js.map +1 -0
- package/dist/sdk/i18n/server.d.ts +28 -0
- package/dist/sdk/i18n/server.js +59 -0
- package/dist/sdk/i18n/server.js.map +1 -0
- package/dist/sdk/identity/operations.d.ts +34 -0
- package/dist/sdk/identity/operations.js +78 -0
- package/dist/sdk/identity/operations.js.map +1 -0
- package/dist/sdk/identity/use-identity-actions.d.ts +62 -0
- package/dist/sdk/identity/use-identity-actions.js +180 -0
- package/dist/sdk/identity/use-identity-actions.js.map +1 -0
- package/dist/sdk/provider/index.d.ts +2 -0
- package/dist/sdk/provider/index.js +2 -0
- package/dist/sdk/provider/storefront-provider.d.ts +32 -0
- package/dist/sdk/provider/storefront-provider.js +111 -0
- package/dist/sdk/provider/storefront-provider.js.map +1 -0
- package/dist/sdk/region/operations.d.ts +6 -0
- package/dist/sdk/region/region-operations.d.ts +30 -0
- package/dist/sdk/region/region-operations.js +23 -0
- package/dist/sdk/region/region-operations.js.map +1 -0
- package/dist/sdk/region/use-region-actions.d.ts +23 -0
- package/dist/sdk/region/use-region-actions.js +66 -0
- package/dist/sdk/region/use-region-actions.js.map +1 -0
- package/dist/sdk/seller.js +11 -0
- package/dist/sdk/seller.js.map +1 -0
- package/dist/sdk/session/auth-operations.d.ts +47 -0
- package/dist/sdk/session/auth-operations.js +79 -0
- package/dist/sdk/session/auth-operations.js.map +1 -0
- package/dist/sdk/session/operations.d.ts +6 -0
- package/dist/sdk/session/use-session-actions.d.ts +27 -0
- package/dist/sdk/session/use-session-actions.js +126 -0
- package/dist/sdk/session/use-session-actions.js.map +1 -0
- package/dist/sdk/shipping/cart-operations.d.ts +3 -0
- package/dist/sdk/shipping/cart-operations.js +33 -0
- package/dist/sdk/shipping/cart-operations.js.map +1 -0
- package/dist/sdk/shipping/operations.d.ts +3 -0
- package/dist/sdk/shipping/operations.js +33 -0
- package/dist/sdk/shipping/operations.js.map +1 -0
- package/dist/sdk/shipping/option-select-operations.d.ts +24 -0
- package/dist/sdk/shipping/option-select-operations.js +45 -0
- package/dist/sdk/shipping/option-select-operations.js.map +1 -0
- package/dist/sdk/shipping/request-timeout.js +41 -0
- package/dist/sdk/shipping/request-timeout.js.map +1 -0
- package/dist/sdk/shipping/shipping-operations.d.ts +38 -0
- package/dist/sdk/shipping/shipping-operations.js +77 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-actions.d.ts +27 -0
- package/dist/sdk/shipping/use-shipping-actions.js +113 -0
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -0
- package/dist/sdk/state/cart.d.ts +42 -0
- package/dist/sdk/state/cart.js +64 -0
- package/dist/sdk/state/cart.js.map +1 -0
- package/dist/sdk/state/index.js +3 -0
- package/dist/sdk/state/variant-selector.d.ts +17 -0
- package/dist/sdk/state/variant-selector.js +14 -0
- package/dist/sdk/state/variant-selector.js.map +1 -0
- package/dist/utils/safe-href.js +63 -0
- package/dist/utils/safe-href.js.map +1 -0
- package/package.json +84 -0
- package/src/styles/tailwind.css +32 -0
|
@@ -0,0 +1,1034 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
3
|
+
import { defineContentType } from "../../core/dist/define-content-type.js";
|
|
4
|
+
import "../../core/dist/index.js";
|
|
5
|
+
import { useStorefrontContext } from "../../sdk/context/storefront-context.js";
|
|
6
|
+
import { graphql } from "../../sdk/generated/gql.js";
|
|
7
|
+
import { useDataOverride } from "../../sdk/data/data-override-context.js";
|
|
8
|
+
import { Icon } from "../../particles/icon/icon.js";
|
|
9
|
+
import { NavigationLink } from "../../particles/navigation-link/navigation-link.js";
|
|
10
|
+
import { DrawerClose } from "../../particles/drawer/drawer.js";
|
|
11
|
+
import { Image } from "../../particles/image/image.js";
|
|
12
|
+
import { cartCouponErrorsVar, cartLastAddVar, cartUserErrorsVar, miniCartOpenVar, orderFormIdVar } from "../../sdk/state/cart.js";
|
|
13
|
+
import { awaitCartWrites } from "../../sdk/cart/write-gate.js";
|
|
14
|
+
import { readCartFromCache } from "../../sdk/cart/use-cart-actions.js";
|
|
15
|
+
import { useCartValidateOnOpen } from "../../sdk/cart/use-cart-validate-on-open.js";
|
|
16
|
+
import { ListItemRefContext } from "../../sdk/data/list-item-ref-context.js";
|
|
17
|
+
import { ReactiveRootContext } from "../../sdk/data/page-reactive-data-root.js";
|
|
18
|
+
import { useApolloClient, useReactiveVar } from "@apollo/client/react";
|
|
19
|
+
import { cloneElement, createContext, isValidElement, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
20
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { useRouter } from "next/navigation";
|
|
22
|
+
import { useLinkStatus } from "next/link";
|
|
23
|
+
//#region src/matter/cart/cart.tsx
|
|
24
|
+
const CartDisclaimerContent = defineContentType({
|
|
25
|
+
id: "cart-disclaimer",
|
|
26
|
+
title: "Cart Disclaimer",
|
|
27
|
+
description: "Conditions, limits, or legal wording shown in the cart before checkout.",
|
|
28
|
+
schema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
additionalProperties: false,
|
|
31
|
+
required: ["text"],
|
|
32
|
+
properties: { text: {
|
|
33
|
+
type: "string",
|
|
34
|
+
minLength: 1,
|
|
35
|
+
title: "Disclaimer text"
|
|
36
|
+
} }
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const CartCheckoutLabelContent = defineContentType({
|
|
40
|
+
id: "cart-checkout-label",
|
|
41
|
+
title: "Cart Checkout Label",
|
|
42
|
+
description: "Editorial label for the checkout call to action.",
|
|
43
|
+
schema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
required: ["label"],
|
|
47
|
+
properties: { label: {
|
|
48
|
+
type: "string",
|
|
49
|
+
minLength: 1,
|
|
50
|
+
title: "Checkout label"
|
|
51
|
+
} }
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const fragment = graphql(`
|
|
55
|
+
fragment CartData on Query {
|
|
56
|
+
cart {
|
|
57
|
+
__typename
|
|
58
|
+
id
|
|
59
|
+
items {
|
|
60
|
+
__typename
|
|
61
|
+
id
|
|
62
|
+
quantity
|
|
63
|
+
gift
|
|
64
|
+
variant {
|
|
65
|
+
__typename
|
|
66
|
+
availability
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
totalizers {
|
|
70
|
+
__typename
|
|
71
|
+
id
|
|
72
|
+
name
|
|
73
|
+
value {
|
|
74
|
+
...MoneyFragment
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
total {
|
|
78
|
+
...MoneyFragment
|
|
79
|
+
}
|
|
80
|
+
messages {
|
|
81
|
+
__typename
|
|
82
|
+
code
|
|
83
|
+
text
|
|
84
|
+
status
|
|
85
|
+
}
|
|
86
|
+
appliedCoupons {
|
|
87
|
+
code
|
|
88
|
+
isUnmatchedCondition
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`);
|
|
93
|
+
function formatPrice(value, locale, currency) {
|
|
94
|
+
return new Intl.NumberFormat(locale, {
|
|
95
|
+
style: "currency",
|
|
96
|
+
currency
|
|
97
|
+
}).format(value);
|
|
98
|
+
}
|
|
99
|
+
const CartTotalValueContext = createContext(null);
|
|
100
|
+
const CART_DATA_UNSET = Symbol("CartDataContextUnset");
|
|
101
|
+
const CartDataContextInternal = createContext(CART_DATA_UNSET);
|
|
102
|
+
const CartDataContext = CartDataContextInternal;
|
|
103
|
+
/**
|
|
104
|
+
* Read the current cart entity and query error from the nearest `CartRoot`. Throws when called
|
|
105
|
+
* outside a `CartRoot` subtree.
|
|
106
|
+
*
|
|
107
|
+
* Cart *writes* no longer flow through this context — they are dispatched via the compiler-injected
|
|
108
|
+
* `$actions.cart.*` prop (the `cart` action namespace), which reads/writes the cache directly and
|
|
109
|
+
* needs no `CartRoot` ancestor (specs/actions.md, ADR-0010). This hook is reads only.
|
|
110
|
+
*/
|
|
111
|
+
function useCart() {
|
|
112
|
+
const ctx = useContext(CartDataContextInternal);
|
|
113
|
+
if (ctx === CART_DATA_UNSET) throw new Error("useCart() must be used inside a <CartRoot> subtree.");
|
|
114
|
+
return ctx;
|
|
115
|
+
}
|
|
116
|
+
const CartCouponContext = createContext(null);
|
|
117
|
+
const CartRootDefinition = defineComponent({
|
|
118
|
+
name: "CartRoot",
|
|
119
|
+
importPath: "@vtex/faststore/components",
|
|
120
|
+
component: CartRoot,
|
|
121
|
+
fragment,
|
|
122
|
+
fetchStrategy: "reactive",
|
|
123
|
+
editor: {
|
|
124
|
+
label: "Cart Root",
|
|
125
|
+
category: "commerce"
|
|
126
|
+
},
|
|
127
|
+
schema: {},
|
|
128
|
+
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."
|
|
129
|
+
});
|
|
130
|
+
const CartListDefinition = defineComponent({
|
|
131
|
+
name: "CartList",
|
|
132
|
+
importPath: "@vtex/faststore/components",
|
|
133
|
+
component: CartList,
|
|
134
|
+
editor: {
|
|
135
|
+
label: "Cart List",
|
|
136
|
+
category: "commerce"
|
|
137
|
+
},
|
|
138
|
+
schema: { skeletonCount: {
|
|
139
|
+
type: "number",
|
|
140
|
+
default: 3,
|
|
141
|
+
label: "Skeleton Count"
|
|
142
|
+
} },
|
|
143
|
+
providesContext: "cart-item",
|
|
144
|
+
guideline: "Renders its children once per cart item; wrap the line-item template in a CartItemRoot and place CartItem* components inside it to define the template (e.g. CartItemImage, CartItemName, CartItemPrice, a CartItemQuantity stepper, CartItemRemove). While the cart is loading it renders skeletonCount CartItemSkeleton placeholders instead. In a mini-cart it is the scrollable body of the DrawerPopup. Must be inside CartRoot."
|
|
145
|
+
});
|
|
146
|
+
const CartTotalDefinition = defineComponent({
|
|
147
|
+
name: "CartTotal",
|
|
148
|
+
importPath: "@vtex/faststore/components",
|
|
149
|
+
component: CartTotal,
|
|
150
|
+
editor: {
|
|
151
|
+
label: "Cart Total",
|
|
152
|
+
category: "commerce"
|
|
153
|
+
},
|
|
154
|
+
schema: { label: {
|
|
155
|
+
type: "string",
|
|
156
|
+
label: "Label"
|
|
157
|
+
} },
|
|
158
|
+
guideline: "The single root-agnostic grand-total component: renders the cart grand total, formatted from the active storefront context, reading the value from the nearest CartRoot or CartTotalizerRoot. Set the optional label prop to render a label alongside the value (e.g. \"Total\"); omit it to render the value alone. In a mini-cart it sits in the DrawerPopup footer alongside CartGoCheckout, inside a CartCheckoutGuard, so the total is visible at the checkout button."
|
|
159
|
+
});
|
|
160
|
+
const CartCountDefinition = defineComponent({
|
|
161
|
+
name: "CartCount",
|
|
162
|
+
importPath: "@vtex/faststore/components",
|
|
163
|
+
component: CartCount,
|
|
164
|
+
editor: {
|
|
165
|
+
label: "Cart Count",
|
|
166
|
+
category: "commerce"
|
|
167
|
+
},
|
|
168
|
+
schema: { template: {
|
|
169
|
+
type: "string",
|
|
170
|
+
default: "{count}",
|
|
171
|
+
label: "Template"
|
|
172
|
+
} },
|
|
173
|
+
guideline: "Renders the total item count in the cart; use the template prop to customize the format (e.g. '{count} produtos'). 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."
|
|
174
|
+
});
|
|
175
|
+
const CartErrorDefinition = defineComponent({
|
|
176
|
+
name: "CartError",
|
|
177
|
+
importPath: "@vtex/faststore/components",
|
|
178
|
+
component: CartError,
|
|
179
|
+
editor: {
|
|
180
|
+
label: "Cart Error",
|
|
181
|
+
category: "commerce"
|
|
182
|
+
},
|
|
183
|
+
schema: {},
|
|
184
|
+
guideline: "Inline error banner that surfaces cart mutation errors. Must be inside CartRoot."
|
|
185
|
+
});
|
|
186
|
+
const CartGoCheckoutDefinition = defineComponent({
|
|
187
|
+
name: "CartGoCheckout",
|
|
188
|
+
importPath: "@vtex/faststore/components",
|
|
189
|
+
component: CartGoCheckout,
|
|
190
|
+
content: CartCheckoutLabelContent,
|
|
191
|
+
editor: {
|
|
192
|
+
label: "Cart Go Checkout",
|
|
193
|
+
category: "commerce"
|
|
194
|
+
},
|
|
195
|
+
schema: {
|
|
196
|
+
href: {
|
|
197
|
+
type: "string",
|
|
198
|
+
default: "/checkout",
|
|
199
|
+
label: "Checkout URL"
|
|
200
|
+
},
|
|
201
|
+
label: {
|
|
202
|
+
type: "string",
|
|
203
|
+
default: "Checkout",
|
|
204
|
+
label: "Checkout label"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
actions: { cart: ["validate"] },
|
|
208
|
+
guideline: "Navigation link to the checkout page (default href /checkout); 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."
|
|
209
|
+
});
|
|
210
|
+
const CartCouponFormDefinition = defineComponent({
|
|
211
|
+
name: "CartCouponForm",
|
|
212
|
+
importPath: "@vtex/faststore/components",
|
|
213
|
+
component: CartCouponForm,
|
|
214
|
+
editor: {
|
|
215
|
+
label: "Cart Coupon Form",
|
|
216
|
+
category: "commerce"
|
|
217
|
+
},
|
|
218
|
+
schema: {
|
|
219
|
+
placeholder: {
|
|
220
|
+
type: "string",
|
|
221
|
+
label: "Placeholder"
|
|
222
|
+
},
|
|
223
|
+
applyLabel: {
|
|
224
|
+
type: "string",
|
|
225
|
+
label: "Apply Label"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
actions: { cart: ["applyCoupon"] },
|
|
229
|
+
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."
|
|
230
|
+
});
|
|
231
|
+
const CartAppliedCouponsDefinition = defineComponent({
|
|
232
|
+
name: "CartAppliedCoupons",
|
|
233
|
+
importPath: "@vtex/faststore/components",
|
|
234
|
+
component: CartAppliedCoupons,
|
|
235
|
+
editor: {
|
|
236
|
+
label: "Cart Applied Coupons",
|
|
237
|
+
category: "commerce"
|
|
238
|
+
},
|
|
239
|
+
schema: {},
|
|
240
|
+
actions: { cart: ["removeCoupon"] },
|
|
241
|
+
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."
|
|
242
|
+
});
|
|
243
|
+
const CartCouponRemoveDefinition = defineComponent({
|
|
244
|
+
name: "CartCouponRemove",
|
|
245
|
+
importPath: "@vtex/faststore/components",
|
|
246
|
+
component: CartCouponRemove,
|
|
247
|
+
editor: {
|
|
248
|
+
label: "Cart Coupon Remove",
|
|
249
|
+
category: "commerce"
|
|
250
|
+
},
|
|
251
|
+
schema: { code: {
|
|
252
|
+
type: "string",
|
|
253
|
+
label: "Coupon Code"
|
|
254
|
+
} },
|
|
255
|
+
actions: { cart: ["removeCoupon"] },
|
|
256
|
+
guideline: "The per-chip remove control (the X); dispatches $actions.cart.removeCoupon for that chip's code. Use inside a CartAppliedCoupons chip, which supplies the code via context. If used standalone (no CartAppliedCoupons ancestor), pass the code prop explicitly — without a code the remove action has no target and the button is a no-op."
|
|
257
|
+
});
|
|
258
|
+
const CartCouponErrorDefinition = defineComponent({
|
|
259
|
+
name: "CartCouponError",
|
|
260
|
+
importPath: "@vtex/faststore/components",
|
|
261
|
+
component: CartCouponError,
|
|
262
|
+
editor: {
|
|
263
|
+
label: "Cart Coupon Error",
|
|
264
|
+
category: "commerce"
|
|
265
|
+
},
|
|
266
|
+
schema: {},
|
|
267
|
+
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."
|
|
268
|
+
});
|
|
269
|
+
function CartRoot({ $data: $dataProp, className, children, ...props }) {
|
|
270
|
+
const cart = useDataOverride($dataProp) ?? null;
|
|
271
|
+
const { error: rootError } = useContext(ReactiveRootContext);
|
|
272
|
+
const cartEntityId = cart?.id ?? null;
|
|
273
|
+
useEffect(() => {
|
|
274
|
+
if (cartEntityId) orderFormIdVar(cartEntityId);
|
|
275
|
+
}, [cartEntityId]);
|
|
276
|
+
const dataValue = useMemo(() => ({
|
|
277
|
+
cart,
|
|
278
|
+
error: rootError ?? null
|
|
279
|
+
}), [cart, rootError]);
|
|
280
|
+
return /* @__PURE__ */ jsx(CartTotalValueContext, {
|
|
281
|
+
value: cart?.total ?? null,
|
|
282
|
+
children: /* @__PURE__ */ jsx(CartDataContextInternal, {
|
|
283
|
+
value: dataValue,
|
|
284
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
285
|
+
...props,
|
|
286
|
+
className,
|
|
287
|
+
"data-fs-cart-root": "",
|
|
288
|
+
children
|
|
289
|
+
})
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function CartList({ className, children, skeletonCount = 3, ...props }) {
|
|
294
|
+
const { cart } = useCart();
|
|
295
|
+
const { loading } = useContext(ReactiveRootContext);
|
|
296
|
+
const items = cart?.items ?? [];
|
|
297
|
+
if (loading && cart == null) return /* @__PURE__ */ jsx("div", {
|
|
298
|
+
...props,
|
|
299
|
+
className,
|
|
300
|
+
"data-fs-cart-list": "",
|
|
301
|
+
children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ jsx(CartItemSkeleton, {}, i))
|
|
302
|
+
});
|
|
303
|
+
return /* @__PURE__ */ jsx("div", {
|
|
304
|
+
...props,
|
|
305
|
+
className,
|
|
306
|
+
"data-fs-cart-list": "",
|
|
307
|
+
children: items.map((item) => /* @__PURE__ */ jsx(ListItemRefContext, {
|
|
308
|
+
value: {
|
|
309
|
+
__typename: "CartItem",
|
|
310
|
+
id: item.id,
|
|
311
|
+
fallbackData: item
|
|
312
|
+
},
|
|
313
|
+
children
|
|
314
|
+
}, item.id))
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function CartTotal({ label, className, children, ...props }) {
|
|
318
|
+
const total = useContext(CartTotalValueContext);
|
|
319
|
+
const { locale, currency } = useStorefrontContext();
|
|
320
|
+
const value = children ?? formatPrice(total?.amount ?? 0, locale, currency);
|
|
321
|
+
return /* @__PURE__ */ jsx("span", {
|
|
322
|
+
...props,
|
|
323
|
+
className,
|
|
324
|
+
"data-fs-cart-total": "",
|
|
325
|
+
"data-fs-text": "",
|
|
326
|
+
children: label == null ? value : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx("span", { children: value })] })
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function CartCount({ className, children, template = "{count}", ...props }) {
|
|
330
|
+
const { cart } = useCart();
|
|
331
|
+
const count = cart?.items.reduce((sum, item) => item.gift ? sum : sum + item.quantity, 0) ?? 0;
|
|
332
|
+
return /* @__PURE__ */ jsx("span", {
|
|
333
|
+
...props,
|
|
334
|
+
className,
|
|
335
|
+
"data-fs-cart-count": "",
|
|
336
|
+
"data-fs-text": "",
|
|
337
|
+
children: children ?? template.replace("{count}", String(count))
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function CartError({ className, children, ...props }) {
|
|
341
|
+
const [firstError] = useReactiveVar(cartUserErrorsVar);
|
|
342
|
+
if (!firstError) return null;
|
|
343
|
+
return /* @__PURE__ */ jsx("div", {
|
|
344
|
+
...props,
|
|
345
|
+
role: "alert",
|
|
346
|
+
className,
|
|
347
|
+
"data-fs-cart-error": "",
|
|
348
|
+
"data-fs-text": "",
|
|
349
|
+
children: children ?? firstError.message
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
function CartGoCheckoutPending({ children }) {
|
|
353
|
+
const { pending } = useLinkStatus();
|
|
354
|
+
return /* @__PURE__ */ jsx("span", {
|
|
355
|
+
"data-fs-cart-go-checkout-content": "",
|
|
356
|
+
"aria-busy": pending || void 0,
|
|
357
|
+
...pending ? { "data-fs-cart-go-checkout-pending": "" } : {},
|
|
358
|
+
children
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
function configuredLabel(value) {
|
|
362
|
+
return value?.trim() ? value : void 0;
|
|
363
|
+
}
|
|
364
|
+
function navigateToCheckout(href, push) {
|
|
365
|
+
if (/^https?:\/\//i.test(href)) globalThis.location.assign(href);
|
|
366
|
+
else push(href);
|
|
367
|
+
}
|
|
368
|
+
function CartGoCheckout({ href = "/checkout", label, className, children, onClick, $content, $actions, ...props }) {
|
|
369
|
+
const client = useApolloClient();
|
|
370
|
+
const router = useRouter();
|
|
371
|
+
const [validating, setValidating] = useState(false);
|
|
372
|
+
const inFlight = useRef(false);
|
|
373
|
+
const resolvedChildren = typeof children === "string" ? configuredLabel(children) : children;
|
|
374
|
+
const resolvedLabel = configuredLabel($content?.label) ?? configuredLabel(label) ?? resolvedChildren ?? "Checkout";
|
|
375
|
+
async function handleClick(e) {
|
|
376
|
+
onClick?.(e);
|
|
377
|
+
const validate = $actions?.cart?.validate;
|
|
378
|
+
if (!validate) return;
|
|
379
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
380
|
+
e.preventDefault();
|
|
381
|
+
if (inFlight.current) return;
|
|
382
|
+
inFlight.current = true;
|
|
383
|
+
setValidating(true);
|
|
384
|
+
try {
|
|
385
|
+
await awaitCartWrites();
|
|
386
|
+
if ((await validate()).length > 0) {
|
|
387
|
+
navigateToCheckout(href, router.push);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
if (!(readCartFromCache(client)?.items ?? []).some((item) => item.variant.availability !== "AVAILABLE")) navigateToCheckout(href, router.push);
|
|
391
|
+
} finally {
|
|
392
|
+
inFlight.current = false;
|
|
393
|
+
setValidating(false);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return /* @__PURE__ */ jsx(NavigationLink, {
|
|
397
|
+
...props,
|
|
398
|
+
href,
|
|
399
|
+
onClick: handleClick,
|
|
400
|
+
className,
|
|
401
|
+
"data-fs-cart-go-checkout": "",
|
|
402
|
+
...validating ? { "data-fs-cart-go-checkout-validating": "" } : {},
|
|
403
|
+
children: /* @__PURE__ */ jsx(CartGoCheckoutPending, { children: resolvedLabel })
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
function CartCouponForm({ placeholder = "Coupon code", applyLabel = "Apply", className, children, onSubmit, $actions, ...props }) {
|
|
407
|
+
const [code, setCode] = useState("");
|
|
408
|
+
const [pending, setPending] = useState(false);
|
|
409
|
+
async function handleSubmit(e) {
|
|
410
|
+
e.preventDefault();
|
|
411
|
+
onSubmit?.(e);
|
|
412
|
+
const trimmed = code.trim();
|
|
413
|
+
if (!trimmed || pending) return;
|
|
414
|
+
setPending(true);
|
|
415
|
+
try {
|
|
416
|
+
const errors = await $actions?.cart?.applyCoupon?.({ code: trimmed });
|
|
417
|
+
if (!errors || errors.length === 0) setCode("");
|
|
418
|
+
} finally {
|
|
419
|
+
setPending(false);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return /* @__PURE__ */ jsx("form", {
|
|
423
|
+
...props,
|
|
424
|
+
className,
|
|
425
|
+
onSubmit: handleSubmit,
|
|
426
|
+
"data-fs-cart-coupon-form": "",
|
|
427
|
+
...pending ? { "data-fs-cart-coupon-pending": "" } : {},
|
|
428
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("input", {
|
|
429
|
+
type: "text",
|
|
430
|
+
value: code,
|
|
431
|
+
placeholder,
|
|
432
|
+
"aria-label": placeholder,
|
|
433
|
+
disabled: pending,
|
|
434
|
+
onChange: (e) => setCode(e.target.value),
|
|
435
|
+
"data-fs-cart-coupon-input": ""
|
|
436
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
437
|
+
type: "submit",
|
|
438
|
+
disabled: pending,
|
|
439
|
+
"data-fs-cart-coupon-apply": "",
|
|
440
|
+
"data-fs-button": "",
|
|
441
|
+
children: applyLabel
|
|
442
|
+
})] })
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
function CartAppliedCoupons({ className, children, $actions, ...props }) {
|
|
446
|
+
const { cart } = useCart();
|
|
447
|
+
const coupons = cart?.appliedCoupons ?? [];
|
|
448
|
+
if (coupons.length === 0) return null;
|
|
449
|
+
return /* @__PURE__ */ jsx("div", {
|
|
450
|
+
...props,
|
|
451
|
+
className,
|
|
452
|
+
"data-fs-cart-applied-coupons": "",
|
|
453
|
+
children: coupons.map((coupon) => /* @__PURE__ */ jsx(CartCouponContext, {
|
|
454
|
+
value: coupon,
|
|
455
|
+
children: /* @__PURE__ */ jsx(CartCouponChip, {
|
|
456
|
+
$actions,
|
|
457
|
+
children
|
|
458
|
+
})
|
|
459
|
+
}, coupon.code))
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function CartCouponChip({ children, $actions }) {
|
|
463
|
+
const coupon = useContext(CartCouponContext);
|
|
464
|
+
if (!coupon) return null;
|
|
465
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
466
|
+
"data-fs-cart-coupon": "",
|
|
467
|
+
...coupon.isUnmatchedCondition ? { "data-fs-cart-coupon-unmatched": "" } : {},
|
|
468
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
469
|
+
"data-fs-cart-coupon-code": "",
|
|
470
|
+
"data-fs-text": "",
|
|
471
|
+
children: coupon.code
|
|
472
|
+
}), children ?? /* @__PURE__ */ jsx(CartCouponRemove, {
|
|
473
|
+
$actions,
|
|
474
|
+
"aria-label": `Remove coupon ${coupon.code}`,
|
|
475
|
+
children: "×"
|
|
476
|
+
})]
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
function CartCouponRemove({ code, className, children, onClick, $actions, ...props }) {
|
|
480
|
+
const coupon = useContext(CartCouponContext);
|
|
481
|
+
const targetCode = code ?? coupon?.code;
|
|
482
|
+
function handleClick(e) {
|
|
483
|
+
if (targetCode) $actions?.cart?.removeCoupon?.({ code: targetCode });
|
|
484
|
+
onClick?.(e);
|
|
485
|
+
}
|
|
486
|
+
return /* @__PURE__ */ jsx("button", {
|
|
487
|
+
...props,
|
|
488
|
+
type: "button",
|
|
489
|
+
className,
|
|
490
|
+
onClick: handleClick,
|
|
491
|
+
"data-fs-cart-coupon-remove": "",
|
|
492
|
+
"data-fs-button": "",
|
|
493
|
+
children
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
function CartCouponError({ className, children, ...props }) {
|
|
497
|
+
const [firstError] = useReactiveVar(cartCouponErrorsVar);
|
|
498
|
+
if (!firstError) return null;
|
|
499
|
+
return /* @__PURE__ */ jsx("div", {
|
|
500
|
+
...props,
|
|
501
|
+
role: "alert",
|
|
502
|
+
className,
|
|
503
|
+
"data-fs-cart-coupon-error": "",
|
|
504
|
+
"data-fs-text": "",
|
|
505
|
+
children: children ?? firstError.message
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
const CartCheckoutGuardDefinition = defineComponent({
|
|
509
|
+
name: "CartCheckoutGuard",
|
|
510
|
+
importPath: "@vtex/faststore/components",
|
|
511
|
+
component: CartCheckoutGuard,
|
|
512
|
+
editor: {
|
|
513
|
+
label: "Cart Checkout Guard",
|
|
514
|
+
category: "commerce"
|
|
515
|
+
},
|
|
516
|
+
schema: {},
|
|
517
|
+
guideline: "Wraps the checkout CTA and blocks progression while any cart item is unavailable: the subtree is made non-interactive (inert) and data-fs-cart-checkout-blocked is exposed for styling the disabled state. In the mini-cart DrawerPopup footer it is the enriched checkout CTA wrapper: place CartTotal and CartGoCheckout inside it so the grand total sits at the button and the whole CTA goes inert when an item cannot be delivered. Must be inside CartRoot."
|
|
518
|
+
});
|
|
519
|
+
const CartLoadingDefinition = defineComponent({
|
|
520
|
+
name: "CartLoading",
|
|
521
|
+
importPath: "@vtex/faststore/components",
|
|
522
|
+
component: CartLoading,
|
|
523
|
+
editor: {
|
|
524
|
+
label: "Cart Loading",
|
|
525
|
+
category: "commerce"
|
|
526
|
+
},
|
|
527
|
+
schema: {},
|
|
528
|
+
guideline: "The loading branch of the three-state mini-cart (loading / empty / filled): renders its children only while the cart is still loading. Supply a skeleton placeholder as its child. Pair with CartEmpty and CartFilled. Must be inside CartRoot. See cart.md."
|
|
529
|
+
});
|
|
530
|
+
const CartEmptyDefinition = defineComponent({
|
|
531
|
+
name: "CartEmpty",
|
|
532
|
+
importPath: "@vtex/faststore/components",
|
|
533
|
+
component: CartEmpty,
|
|
534
|
+
editor: {
|
|
535
|
+
label: "Cart Empty",
|
|
536
|
+
category: "commerce"
|
|
537
|
+
},
|
|
538
|
+
schema: {},
|
|
539
|
+
guideline: "The empty branch of the three-state mini-cart (loading / empty / filled): renders its children only when the cart has resolved with zero items. It carries no copy of its own — compose CartEmptyMessage for the message and CartContinueShopping for the continue-shopping control, in whatever order and grouping the panel needs. Pair with CartLoading and CartFilled. Must be inside CartRoot. See cart.md."
|
|
540
|
+
});
|
|
541
|
+
const CartFilledDefinition = defineComponent({
|
|
542
|
+
name: "CartFilled",
|
|
543
|
+
importPath: "@vtex/faststore/components",
|
|
544
|
+
component: CartFilled,
|
|
545
|
+
editor: {
|
|
546
|
+
label: "Cart Filled",
|
|
547
|
+
category: "commerce"
|
|
548
|
+
},
|
|
549
|
+
schema: {},
|
|
550
|
+
guideline: "The filled branch of the three-state mini-cart (loading / empty / filled): renders its children only when the cart has one or more items. Wrap the CartList, the order summary, and the checkout CTA in it so they hide when the cart is empty. Pair with CartLoading and CartEmpty. Must be inside CartRoot. See cart.md."
|
|
551
|
+
});
|
|
552
|
+
const CartUnavailableCountDefinition = defineComponent({
|
|
553
|
+
name: "CartUnavailableCount",
|
|
554
|
+
importPath: "@vtex/faststore/components",
|
|
555
|
+
component: CartUnavailableCount,
|
|
556
|
+
editor: {
|
|
557
|
+
label: "Cart Unavailable Count",
|
|
558
|
+
category: "commerce"
|
|
559
|
+
},
|
|
560
|
+
schema: { template: {
|
|
561
|
+
type: "string",
|
|
562
|
+
default: "{count} items unavailable",
|
|
563
|
+
label: "Template"
|
|
564
|
+
} },
|
|
565
|
+
guideline: "Cart-level summary of how many lines are unavailable; self-hides when none. See cart.md."
|
|
566
|
+
});
|
|
567
|
+
const CartRemoveUnavailableDefinition = defineComponent({
|
|
568
|
+
name: "CartRemoveUnavailable",
|
|
569
|
+
importPath: "@vtex/faststore/components",
|
|
570
|
+
component: CartRemoveUnavailable,
|
|
571
|
+
editor: {
|
|
572
|
+
label: "Cart Remove Unavailable",
|
|
573
|
+
category: "commerce"
|
|
574
|
+
},
|
|
575
|
+
schema: {},
|
|
576
|
+
actions: { cart: ["removeItems"] },
|
|
577
|
+
guideline: "Button that removes every unavailable line in one batch call; self-hides when none. See cart.md."
|
|
578
|
+
});
|
|
579
|
+
function isUnavailable(item) {
|
|
580
|
+
return item.variant.availability !== "AVAILABLE";
|
|
581
|
+
}
|
|
582
|
+
function CartCheckoutGuard({ className, children, ...props }) {
|
|
583
|
+
const { cart } = useCart();
|
|
584
|
+
const blocked = (cart?.items ?? []).some(isUnavailable);
|
|
585
|
+
return /* @__PURE__ */ jsx("div", {
|
|
586
|
+
...props,
|
|
587
|
+
className,
|
|
588
|
+
inert: blocked,
|
|
589
|
+
"aria-disabled": blocked || void 0,
|
|
590
|
+
"data-fs-cart-checkout-guard": "",
|
|
591
|
+
"data-fs-cart-checkout-blocked": blocked ? "" : void 0,
|
|
592
|
+
children
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
function CartUnavailableCount({ className, children, template = "{count} items unavailable", ...props }) {
|
|
596
|
+
const { cart } = useCart();
|
|
597
|
+
const count = (cart?.items ?? []).filter(isUnavailable).length;
|
|
598
|
+
if (count === 0) return null;
|
|
599
|
+
return /* @__PURE__ */ jsx("span", {
|
|
600
|
+
...props,
|
|
601
|
+
className,
|
|
602
|
+
"data-fs-cart-unavailable-count": "",
|
|
603
|
+
"data-fs-text": "",
|
|
604
|
+
children: children ?? template.replace("{count}", String(count))
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
function CartRemoveUnavailable({ className, children, onClick, $actions, ...props }) {
|
|
608
|
+
const { cart } = useCart();
|
|
609
|
+
const unavailableIds = (cart?.items ?? []).filter(isUnavailable).map((item) => item.id);
|
|
610
|
+
if (unavailableIds.length === 0) return null;
|
|
611
|
+
function handleClick(e) {
|
|
612
|
+
$actions?.cart?.removeItems?.({ ids: unavailableIds });
|
|
613
|
+
onClick?.(e);
|
|
614
|
+
}
|
|
615
|
+
return /* @__PURE__ */ jsx("button", {
|
|
616
|
+
...props,
|
|
617
|
+
type: "button",
|
|
618
|
+
className,
|
|
619
|
+
onClick: handleClick,
|
|
620
|
+
"data-fs-cart-remove-unavailable": "",
|
|
621
|
+
"data-fs-button": "",
|
|
622
|
+
children: children ?? "Remove unavailable items"
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
const CartOpenOnAddDefinition = defineComponent({
|
|
626
|
+
name: "CartOpenOnAdd",
|
|
627
|
+
importPath: "@vtex/faststore/components",
|
|
628
|
+
component: CartOpenOnAdd,
|
|
629
|
+
editor: {
|
|
630
|
+
label: "Cart Open On Add",
|
|
631
|
+
category: "commerce"
|
|
632
|
+
},
|
|
633
|
+
schema: {},
|
|
634
|
+
actions: { cart: ["validate"] },
|
|
635
|
+
guideline: "Mini-cart post-add behavior: wraps the mini-cart DrawerRoot subtree and opens the drawer automatically on each successful add to cart. Compose it as the parent of the DrawerRoot (its single child) — the header DrawerTrigger, the popup, and the cart leaves stay inside that DrawerRoot. It makes the drawer controlled internally, so do not set raw open/onOpenChange on DrawerRoot; the header trigger and manual close (Escape / backdrop / close button) keep working. It also runs a stock validation when the overlay opens, behind a short staleness window and skipped while a cart write is in flight, so opening a cart that went stale corrects it before the shopper acts. Use only in a store that has a mini-cart drawer. Mutually exclusive with CartRedirectOnAdd — compose exactly one. See cart.md."
|
|
636
|
+
});
|
|
637
|
+
const CartRedirectOnAddDefinition = defineComponent({
|
|
638
|
+
name: "CartRedirectOnAdd",
|
|
639
|
+
importPath: "@vtex/faststore/components",
|
|
640
|
+
component: CartRedirectOnAdd,
|
|
641
|
+
editor: {
|
|
642
|
+
label: "Cart Redirect On Add",
|
|
643
|
+
category: "commerce"
|
|
644
|
+
},
|
|
645
|
+
schema: { href: {
|
|
646
|
+
type: "string",
|
|
647
|
+
default: "/checkout",
|
|
648
|
+
label: "Checkout URL"
|
|
649
|
+
} },
|
|
650
|
+
guideline: "No-mini-cart post-add behavior: navigates the shopper to checkout (href, default /checkout) 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."
|
|
651
|
+
});
|
|
652
|
+
/**
|
|
653
|
+
* Makes the wrapped mini-cart `DrawerRoot` controlled by `miniCartOpenVar` and opens it on each
|
|
654
|
+
* add-success pulse. `miniCartOpenVar` is the single source of truth: the pulse-driven open, the
|
|
655
|
+
* header trigger (`onOpenChange(true)`), and manual close (`onOpenChange(false)`) all route through
|
|
656
|
+
* it, so the trigger and manual dismissal keep working under controlled mode. Context-free — it
|
|
657
|
+
* reads reactive vars and needs no `CartRoot` ancestor (ADR-0010). Expects a single `DrawerRoot`
|
|
658
|
+
* child; the wiring is encapsulated here, never exposed as authorable drawer props.
|
|
659
|
+
*/
|
|
660
|
+
function CartOpenOnAdd({ children, $actions }) {
|
|
661
|
+
const open = useReactiveVar(miniCartOpenVar);
|
|
662
|
+
const pulse = useReactiveVar(cartLastAddVar);
|
|
663
|
+
useEffect(() => {
|
|
664
|
+
if (pulse > 0) miniCartOpenVar(true);
|
|
665
|
+
}, [pulse]);
|
|
666
|
+
useCartValidateOnOpen($actions?.cart?.validate);
|
|
667
|
+
if (!isValidElement(children)) return children;
|
|
668
|
+
return cloneElement(children, {
|
|
669
|
+
open,
|
|
670
|
+
onOpenChange: (next) => miniCartOpenVar(next)
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Navigates a no-mini-cart store to checkout after a successful add. Keys a `useEffect` on the
|
|
675
|
+
* add-success pulse, which `addItem` increments only on the clean branch after the `await`, so the
|
|
676
|
+
* redirect is post-resolve and success-gated. The initial `0` is ignored, so a fresh mount never
|
|
677
|
+
* navigates. Context-free — no `CartRoot` ancestor (ADR-0010). Renders its passthrough children (or
|
|
678
|
+
* nothing); it carries no drawer.
|
|
679
|
+
*/
|
|
680
|
+
function CartRedirectOnAdd({ href = "/checkout", children }) {
|
|
681
|
+
const router = useRouter();
|
|
682
|
+
const pulse = useReactiveVar(cartLastAddVar);
|
|
683
|
+
useEffect(() => {
|
|
684
|
+
if (pulse > 0) router.push(href);
|
|
685
|
+
}, [
|
|
686
|
+
pulse,
|
|
687
|
+
href,
|
|
688
|
+
router
|
|
689
|
+
]);
|
|
690
|
+
return children;
|
|
691
|
+
}
|
|
692
|
+
function CartLoading({ className, children, ...props }) {
|
|
693
|
+
const { cart } = useCart();
|
|
694
|
+
if (cart != null) return null;
|
|
695
|
+
return /* @__PURE__ */ jsx("div", {
|
|
696
|
+
...props,
|
|
697
|
+
className,
|
|
698
|
+
"data-fs-cart-loading": "",
|
|
699
|
+
children
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
function CartEmpty({ className, children, ...props }) {
|
|
703
|
+
const { cart } = useCart();
|
|
704
|
+
if (cart == null || cart.items.length > 0) return null;
|
|
705
|
+
return /* @__PURE__ */ jsx("div", {
|
|
706
|
+
...props,
|
|
707
|
+
className,
|
|
708
|
+
"data-fs-cart-empty": "",
|
|
709
|
+
children
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function CartFilled({ className, children, ...props }) {
|
|
713
|
+
const { cart } = useCart();
|
|
714
|
+
if ((cart?.items ?? []).length === 0) return null;
|
|
715
|
+
return /* @__PURE__ */ jsx("div", {
|
|
716
|
+
...props,
|
|
717
|
+
className,
|
|
718
|
+
"data-fs-cart-filled": "",
|
|
719
|
+
children
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
const CartDisclaimerDefinition = defineComponent({
|
|
723
|
+
name: "CartDisclaimer",
|
|
724
|
+
importPath: "@vtex/faststore/components",
|
|
725
|
+
component: CartDisclaimer,
|
|
726
|
+
content: CartDisclaimerContent,
|
|
727
|
+
editor: {
|
|
728
|
+
label: "Cart Disclaimer",
|
|
729
|
+
category: "commerce"
|
|
730
|
+
},
|
|
731
|
+
schema: { text: {
|
|
732
|
+
type: "string",
|
|
733
|
+
label: "Disclaimer text"
|
|
734
|
+
} },
|
|
735
|
+
guideline: "Plain-text merchant notice — conditions, purchase limits, or legal wording — shown in the cart before the shopper commits. CMS content wins over the text prop, and nothing renders when neither supplies a notice. It renders only when the cart has items, so it stays out of the empty state and out of the window before the cart resolves on its own. Place it inside CartFilled, below the order summary or immediately above the checkout CTA (CartCheckoutGuard): placement is composition order, and there is no position prop. Plain text only — no rich text and no inline links. Must be inside CartRoot. See cart.md."
|
|
736
|
+
});
|
|
737
|
+
function CartDisclaimer({ text, $content, className, children, ...props }) {
|
|
738
|
+
const { cart } = useCart();
|
|
739
|
+
if (cart == null || cart.items.length === 0) return null;
|
|
740
|
+
const notice = $content?.text ?? text;
|
|
741
|
+
const resolvedChildren = typeof children === "string" ? configuredLabel(children) : children;
|
|
742
|
+
if (resolvedChildren == null && !notice?.trim()) return null;
|
|
743
|
+
return /* @__PURE__ */ jsx("p", {
|
|
744
|
+
...props,
|
|
745
|
+
className,
|
|
746
|
+
"data-fs-cart-disclaimer": "",
|
|
747
|
+
"data-fs-text": "",
|
|
748
|
+
children: resolvedChildren ?? notice
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
function CartItemSkeleton({ className, ...props }) {
|
|
752
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
753
|
+
...props,
|
|
754
|
+
className,
|
|
755
|
+
"data-fs-cart-item-skeleton": "",
|
|
756
|
+
"aria-hidden": "true",
|
|
757
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
758
|
+
"data-fs-cart-item-skeleton-line": "",
|
|
759
|
+
className: "block h-4 w-full animate-pulse rounded bg-gray-200"
|
|
760
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
761
|
+
"data-fs-cart-item-skeleton-line": "",
|
|
762
|
+
className: "mt-2 block h-4 w-2/3 animate-pulse rounded bg-gray-200"
|
|
763
|
+
})]
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
const CartAlertContent = defineContentType({
|
|
767
|
+
id: "cart-alert",
|
|
768
|
+
title: "Cart Alert",
|
|
769
|
+
description: "Merchant notice shown at the top of the mini-cart overlay.",
|
|
770
|
+
schema: {
|
|
771
|
+
type: "object",
|
|
772
|
+
additionalProperties: false,
|
|
773
|
+
properties: {
|
|
774
|
+
text: {
|
|
775
|
+
type: "string",
|
|
776
|
+
minLength: 1,
|
|
777
|
+
title: "Message"
|
|
778
|
+
},
|
|
779
|
+
icon: {
|
|
780
|
+
type: "string",
|
|
781
|
+
enum: [
|
|
782
|
+
"bell",
|
|
783
|
+
"bell-ringing",
|
|
784
|
+
"tag",
|
|
785
|
+
"shopping-cart",
|
|
786
|
+
"map-pin",
|
|
787
|
+
"star"
|
|
788
|
+
],
|
|
789
|
+
title: "Icon"
|
|
790
|
+
},
|
|
791
|
+
iconUrl: {
|
|
792
|
+
type: "string",
|
|
793
|
+
format: "uri",
|
|
794
|
+
title: "Custom icon",
|
|
795
|
+
widget: { "ui:widget": "media-gallery" }
|
|
796
|
+
},
|
|
797
|
+
iconAlt: {
|
|
798
|
+
type: "string",
|
|
799
|
+
title: "Custom icon alt text"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
/**
|
|
805
|
+
* The sprite names the CMS channel admits. Exported because a store whose merchants pick the icon
|
|
806
|
+
* has to list them under `icons.include` for the glyph to reach the route sprite — one import there
|
|
807
|
+
* instead of six retyped strings. Read off the model so the two cannot drift apart.
|
|
808
|
+
*/
|
|
809
|
+
const CART_ALERT_ICON_NAMES = CartAlertContent.schema.properties.icon.enum;
|
|
810
|
+
const CART_ALERT_CONTEXT_UNSET = Symbol("CartAlertContextUnset");
|
|
811
|
+
const CartAlertContext = createContext(CART_ALERT_CONTEXT_UNSET);
|
|
812
|
+
function useCartAlert() {
|
|
813
|
+
const ctx = useContext(CartAlertContext);
|
|
814
|
+
if (ctx === CART_ALERT_CONTEXT_UNSET) throw new Error("CartAlert parts must be used inside CartAlertRoot.");
|
|
815
|
+
return ctx;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* A content-channel icon name is admitted only when the model's `enum` still lists it. An entry is
|
|
819
|
+
* external data whose `icon` is typed as the enum but not guaranteed to be one at runtime (a stale
|
|
820
|
+
* value, or a read-time gate that does not enforce `enum`), and an unadmitted name would reach the
|
|
821
|
+
* sprite lookup and render an empty `<svg>` with no build error and nothing in the console.
|
|
822
|
+
*/
|
|
823
|
+
function admitContentIcon(name) {
|
|
824
|
+
return name && CART_ALERT_ICON_NAMES.includes(name) ? name : void 0;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Resolves one glyph from a single source channel, the upload before the sprite name. Kept per-source
|
|
828
|
+
* rather than per-field so the two channels never mix across sources: a merchant who configures a
|
|
829
|
+
* sprite name in the CMS is not silently overridden by an uploaded-glyph *prop* the developer left as
|
|
830
|
+
* a default. The prop `name` is unfiltered — the compiler resolves it or fails the build; only a
|
|
831
|
+
* content name passes through `admitContentIcon`.
|
|
832
|
+
*/
|
|
833
|
+
function resolveGlyph(url, alt, name) {
|
|
834
|
+
if (url?.trim()) return {
|
|
835
|
+
src: url,
|
|
836
|
+
alt: alt ?? ""
|
|
837
|
+
};
|
|
838
|
+
if (name) return { name };
|
|
839
|
+
return null;
|
|
840
|
+
}
|
|
841
|
+
const CartAlertRootDefinition = defineComponent({
|
|
842
|
+
name: "CartAlertRoot",
|
|
843
|
+
importPath: "@vtex/faststore/components",
|
|
844
|
+
component: CartAlertRoot,
|
|
845
|
+
content: CartAlertContent,
|
|
846
|
+
editor: {
|
|
847
|
+
label: "Cart Alert",
|
|
848
|
+
category: "commerce"
|
|
849
|
+
},
|
|
850
|
+
schema: {
|
|
851
|
+
text: {
|
|
852
|
+
type: "string",
|
|
853
|
+
label: "Message"
|
|
854
|
+
},
|
|
855
|
+
icon: {
|
|
856
|
+
type: "icon",
|
|
857
|
+
label: "Icon"
|
|
858
|
+
},
|
|
859
|
+
iconUrl: {
|
|
860
|
+
type: "string",
|
|
861
|
+
label: "Custom icon URL"
|
|
862
|
+
},
|
|
863
|
+
iconAlt: {
|
|
864
|
+
type: "string",
|
|
865
|
+
label: "Custom icon alt text"
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
providesContext: "cart-alert",
|
|
869
|
+
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 global.json, or a chosen glyph renders empty. Distinct from CartError (cart mutation errors) and CartUnavailableCount (data-driven). See cart.md."
|
|
870
|
+
});
|
|
871
|
+
const CartAlertIconDefinition = defineComponent({
|
|
872
|
+
name: "CartAlertIcon",
|
|
873
|
+
importPath: "@vtex/faststore/components",
|
|
874
|
+
component: CartAlertIcon,
|
|
875
|
+
editor: {
|
|
876
|
+
label: "Cart Alert Icon",
|
|
877
|
+
category: "commerce"
|
|
878
|
+
},
|
|
879
|
+
schema: {},
|
|
880
|
+
requiresContext: "cart-alert",
|
|
881
|
+
guideline: "The alert glyph, inside a CartAlertRoot (or any ancestor providing `cart-alert` context). Prefers the merchant-uploaded icon and falls back to the predefined sprite name, and renders nothing when neither is configured. Decorative — the message carries the meaning. Place it before or after CartAlertText to set the order."
|
|
882
|
+
});
|
|
883
|
+
const CartAlertTextDefinition = defineComponent({
|
|
884
|
+
name: "CartAlertText",
|
|
885
|
+
importPath: "@vtex/faststore/components",
|
|
886
|
+
component: CartAlertText,
|
|
887
|
+
editor: {
|
|
888
|
+
label: "Cart Alert Message",
|
|
889
|
+
category: "commerce"
|
|
890
|
+
},
|
|
891
|
+
schema: {},
|
|
892
|
+
requiresContext: "cart-alert",
|
|
893
|
+
guideline: "The alert message, inside a CartAlertRoot (or any ancestor providing `cart-alert` context). The copy comes from the root (its CMS entry or its text prop), so children are a display override rather than an authoring channel. Place it before or after CartAlertIcon to set the order."
|
|
894
|
+
});
|
|
895
|
+
function CartAlertRoot({ text, icon, iconUrl, iconAlt, className, children, $content, ...props }) {
|
|
896
|
+
const message = $content?.text ?? text;
|
|
897
|
+
const value = useMemo(() => ({
|
|
898
|
+
message: message ?? "",
|
|
899
|
+
glyph: resolveGlyph($content?.iconUrl, $content?.iconAlt, admitContentIcon($content?.icon)) ?? resolveGlyph(iconUrl, iconAlt, icon)
|
|
900
|
+
}), [
|
|
901
|
+
message,
|
|
902
|
+
$content?.iconUrl,
|
|
903
|
+
$content?.iconAlt,
|
|
904
|
+
$content?.icon,
|
|
905
|
+
iconUrl,
|
|
906
|
+
iconAlt,
|
|
907
|
+
icon
|
|
908
|
+
]);
|
|
909
|
+
if (!message?.trim()) return null;
|
|
910
|
+
return /* @__PURE__ */ jsx(CartAlertContext, {
|
|
911
|
+
value,
|
|
912
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
913
|
+
...props,
|
|
914
|
+
className,
|
|
915
|
+
"data-fs-cart-alert": "",
|
|
916
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CartAlertIcon, {}), /* @__PURE__ */ jsx(CartAlertText, {})] })
|
|
917
|
+
})
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
function CartAlertIcon({ className }) {
|
|
921
|
+
const { glyph } = useCartAlert();
|
|
922
|
+
if (!glyph) return null;
|
|
923
|
+
if ("src" in glyph) return /* @__PURE__ */ jsx(Image, {
|
|
924
|
+
src: glyph.src,
|
|
925
|
+
alt: glyph.alt,
|
|
926
|
+
className,
|
|
927
|
+
"data-fs-cart-alert-icon": ""
|
|
928
|
+
});
|
|
929
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
930
|
+
name: glyph.name,
|
|
931
|
+
className,
|
|
932
|
+
"data-fs-cart-alert-icon": ""
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
function CartAlertText({ className, children, ...props }) {
|
|
936
|
+
const { message } = useCartAlert();
|
|
937
|
+
return /* @__PURE__ */ jsx("span", {
|
|
938
|
+
...props,
|
|
939
|
+
className,
|
|
940
|
+
"data-fs-cart-alert-text": "",
|
|
941
|
+
"data-fs-text": "",
|
|
942
|
+
children: children ?? message
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
const CartEmptyMessageContent = defineContentType({
|
|
946
|
+
id: "cart-empty-message",
|
|
947
|
+
title: "Cart Empty Message",
|
|
948
|
+
description: "Message shown in the cart overlay when the cart has no items.",
|
|
949
|
+
schema: {
|
|
950
|
+
type: "object",
|
|
951
|
+
additionalProperties: false,
|
|
952
|
+
required: ["text"],
|
|
953
|
+
properties: { text: {
|
|
954
|
+
type: "string",
|
|
955
|
+
minLength: 1,
|
|
956
|
+
title: "Empty cart message",
|
|
957
|
+
default: "Your cart is empty"
|
|
958
|
+
} }
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
const CartContinueShoppingContent = defineContentType({
|
|
962
|
+
id: "cart-continue-shopping",
|
|
963
|
+
title: "Cart Continue Shopping",
|
|
964
|
+
description: "Label for the control that dismisses the cart overlay and returns the shopper to browsing.",
|
|
965
|
+
schema: {
|
|
966
|
+
type: "object",
|
|
967
|
+
additionalProperties: false,
|
|
968
|
+
required: ["label"],
|
|
969
|
+
properties: { label: {
|
|
970
|
+
type: "string",
|
|
971
|
+
minLength: 1,
|
|
972
|
+
title: "Continue shopping label",
|
|
973
|
+
default: "Continue shopping"
|
|
974
|
+
} }
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
const CartEmptyMessageDefinition = defineComponent({
|
|
978
|
+
name: "CartEmptyMessage",
|
|
979
|
+
importPath: "@vtex/faststore/components",
|
|
980
|
+
component: CartEmptyMessage,
|
|
981
|
+
content: CartEmptyMessageContent,
|
|
982
|
+
editor: {
|
|
983
|
+
label: "Cart Empty Message",
|
|
984
|
+
category: "commerce"
|
|
985
|
+
},
|
|
986
|
+
schema: { text: {
|
|
987
|
+
type: "string",
|
|
988
|
+
default: "Your cart is empty",
|
|
989
|
+
label: "Empty cart message"
|
|
990
|
+
} },
|
|
991
|
+
guideline: "The empty-cart message, rendered as plain text inside CartEmpty. CMS content wins over the text prop, which defaults to \"Your cart is empty\"; blank resolved copy renders nothing. It carries no layout — group and space it with Container, and pair it with CartContinueShopping for the way back to browsing. See cart.md."
|
|
992
|
+
});
|
|
993
|
+
const CartContinueShoppingDefinition = defineComponent({
|
|
994
|
+
name: "CartContinueShopping",
|
|
995
|
+
importPath: "@vtex/faststore/components",
|
|
996
|
+
component: CartContinueShopping,
|
|
997
|
+
content: CartContinueShoppingContent,
|
|
998
|
+
editor: {
|
|
999
|
+
label: "Cart Continue Shopping",
|
|
1000
|
+
category: "action"
|
|
1001
|
+
},
|
|
1002
|
+
schema: { label: {
|
|
1003
|
+
type: "string",
|
|
1004
|
+
default: "Continue shopping",
|
|
1005
|
+
label: "Continue shopping label"
|
|
1006
|
+
} },
|
|
1007
|
+
guideline: "Dismisses the cart overlay so the shopper can keep browsing; dispatches no cart write. Place it in the empty panel inside CartEmpty, commonly in a footer Container. It closes the drawer, so it requires a DrawerRoot ancestor — on a cart page with no drawer, compose a NavigationLink back to browsing instead of this control. CMS content wins over the label prop, and composed children win over both (compose an icon that way). See cart.md."
|
|
1008
|
+
});
|
|
1009
|
+
function CartEmptyMessage({ text = "Your cart is empty", $content, className, ...props }) {
|
|
1010
|
+
const message = $content?.text ?? text;
|
|
1011
|
+
if (!message.trim()) return null;
|
|
1012
|
+
return /* @__PURE__ */ jsx("p", {
|
|
1013
|
+
...props,
|
|
1014
|
+
className,
|
|
1015
|
+
"data-fs-cart-empty-message": "",
|
|
1016
|
+
"data-fs-text": "",
|
|
1017
|
+
children: message
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function CartContinueShopping({ label = "Continue shopping", $content, className, children, ...props }) {
|
|
1021
|
+
const content = $content?.label ?? label;
|
|
1022
|
+
if (children == null && !content.trim()) return null;
|
|
1023
|
+
return /* @__PURE__ */ jsx(DrawerClose, {
|
|
1024
|
+
...props,
|
|
1025
|
+
className,
|
|
1026
|
+
"data-fs-cart-continue-shopping": "",
|
|
1027
|
+
"data-fs-button": "",
|
|
1028
|
+
children: children ?? content
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
//#endregion
|
|
1032
|
+
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 };
|
|
1033
|
+
|
|
1034
|
+
//# sourceMappingURL=cart.js.map
|