@vtex/faststore 0.0.8 → 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 +59 -0
- package/dist/actions.json +42 -0
- package/dist/catalog.json +731 -16
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/components.d.ts +9 -4
- package/dist/components.js +11 -6
- package/dist/content-types.json +300 -0
- package/dist/core/dist/define-component.d.ts +6 -1
- package/dist/docs/account-entry-point.md +4 -4
- package/dist/docs/account-menu.md +2 -2
- package/dist/docs/account-saved-cards.md +301 -0
- package/dist/docs/binding-switcher.md +154 -0
- package/dist/docs/card-entry.md +3 -3
- package/dist/docs/card-summary.md +175 -0
- package/dist/docs/cart-destination.md +238 -0
- package/dist/docs/cart-item.md +21 -3
- package/dist/docs/cart-totalizer.md +1 -1
- package/dist/docs/cart.md +118 -11
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/free-shipping-progress.md +13 -9
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/logo.md +1 -1
- package/dist/docs/payment-method-badges.md +2 -2
- package/dist/docs/payment-methods.md +1 -1
- package/dist/docs/product-information.md +2 -2
- package/dist/docs/product-shelf.md +7 -0
- package/dist/docs/select.md +3 -4
- package/dist/docs/sign-in-redirect.md +1 -1
- package/dist/docs/toast.md +30 -12
- package/dist/index.d.ts +2 -1
- package/dist/internal/client.d.ts +4 -1
- package/dist/internal/client.js +4 -1
- package/dist/internal/server.d.ts +4 -2
- package/dist/internal/server.js +4 -2
- 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.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 +34 -4
- package/dist/matter/cart/cart.js +238 -28
- 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 +75 -16
- 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/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/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/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.js +6 -2
- package/dist/matter/shipping-simulator/shipping-simulator.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/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 +1 -1
- package/dist/particles/incentives/incentives.js +1 -1
- package/dist/particles/incentives/incentives.js.map +1 -1
- 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/toast/toast.d.ts +20 -6
- package/dist/particles/toast/toast.js +49 -7
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +298 -34
- package/dist/sdk/actions/index.d.ts +3 -1
- package/dist/sdk/actions/index.js +3 -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/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 +6 -2
- package/dist/sdk/cache/storefront-cache.js +2 -1
- 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/generated/gql.js +15 -11
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +177 -46
- package/dist/sdk/generated/graphql.js +2314 -93
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +19 -0
- package/dist/sdk/i18n/messages/en-US.json +19 -0
- package/dist/sdk/i18n/messages/en-US.json.d.ts +19 -0
- package/dist/sdk/i18n/messages/es-ES.js +19 -0
- package/dist/sdk/i18n/messages/es-ES.json +19 -0
- package/dist/sdk/i18n/messages/pt-BR.js +19 -0
- package/dist/sdk/i18n/messages/pt-BR.json +19 -0
- 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/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/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 +5 -3
- package/dist/sdk/seo/page-alternates.js +7 -12
- package/dist/sdk/seo/page-alternates.js.map +1 -1
- 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/package.json +2 -2
- package/src/styles/tailwind.css +1 -2
package/dist/catalog.json
CHANGED
|
@@ -369,6 +369,37 @@
|
|
|
369
369
|
"schema": {},
|
|
370
370
|
"guideline": "Status, count, or category labels with semantic color variants. Use for tags, status indicators, and notification badges."
|
|
371
371
|
},
|
|
372
|
+
"BindingSwitcher": {
|
|
373
|
+
"name": "BindingSwitcher",
|
|
374
|
+
"importPath": "@vtex/faststore/components",
|
|
375
|
+
"editor": {
|
|
376
|
+
"label": "Binding Switcher",
|
|
377
|
+
"category": "action"
|
|
378
|
+
},
|
|
379
|
+
"actions": {
|
|
380
|
+
"locale": [
|
|
381
|
+
"set"
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
"schema": {
|
|
385
|
+
"bindings": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"label": "Bindings"
|
|
388
|
+
},
|
|
389
|
+
"label": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"default": "Language",
|
|
392
|
+
"label": "Label"
|
|
393
|
+
},
|
|
394
|
+
"notice": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"default": "This page isn't available in the selected language.",
|
|
397
|
+
"label": "Notice"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"guideline": "Lists the bindings a store declares and switches the whole binding (locale, currency, sales channel) through locale.set. Renders nothing when fewer than two bindings are present; the store passes bindings as $data.Global.localization.bindings.",
|
|
401
|
+
"docPath": "src/particles/binding-switcher/binding-switcher.md"
|
|
402
|
+
},
|
|
372
403
|
"Button": {
|
|
373
404
|
"name": "Button",
|
|
374
405
|
"importPath": "@vtex/faststore/components",
|
|
@@ -379,6 +410,72 @@
|
|
|
379
410
|
"schema": {},
|
|
380
411
|
"guideline": "Composable action button — combine with Icon for icon buttons, Spinner for loading states. Ghost appearance can be achieved via className."
|
|
381
412
|
},
|
|
413
|
+
"CardSummary": {
|
|
414
|
+
"name": "CardSummary",
|
|
415
|
+
"importPath": "@vtex/faststore/components",
|
|
416
|
+
"requiresContext": "card-summary",
|
|
417
|
+
"editor": {
|
|
418
|
+
"label": "Card Summary",
|
|
419
|
+
"category": "content"
|
|
420
|
+
},
|
|
421
|
+
"schema": {},
|
|
422
|
+
"guideline": "A saved card's identity: network mark, label or else network name, mask, last four digits, in that order by default. Compose CardSummaryMark / Name / Mask / Digits as children to reorder or drop a part; the reading order follows the composition. The default satisfies the rule that the mark and the digits always show; a custom composition that drops either gives that up. Must be inside a card-summary provider.",
|
|
423
|
+
"docPath": "src/particles/card-summary/card-summary.md"
|
|
424
|
+
},
|
|
425
|
+
"CardSummaryMark": {
|
|
426
|
+
"name": "CardSummaryMark",
|
|
427
|
+
"importPath": "@vtex/faststore/components",
|
|
428
|
+
"requiresContext": "card-summary",
|
|
429
|
+
"editor": {
|
|
430
|
+
"label": "Card Summary Mark",
|
|
431
|
+
"category": "content"
|
|
432
|
+
},
|
|
433
|
+
"schema": {},
|
|
434
|
+
"guideline": "The card network's mark. When the card has a label, it also carries the network: hidden text beside the mark, or the network name as visible text for a network with no mark. Renders nothing for an unlabelled card on a network with no mark, since the name says it. On an unlabelled card the glyph is decorative and CardSummaryName announces the network, so compose both: Mark without Name leaves screen readers no network. Marks come from data, so the store lists CARD_NETWORK_ICON_NAMES under icons.include. Must be inside a card-summary provider.",
|
|
435
|
+
"docPath": "src/particles/card-summary/card-summary.md"
|
|
436
|
+
},
|
|
437
|
+
"CardSummaryName": {
|
|
438
|
+
"name": "CardSummaryName",
|
|
439
|
+
"importPath": "@vtex/faststore/components",
|
|
440
|
+
"requiresContext": "card-summary",
|
|
441
|
+
"editor": {
|
|
442
|
+
"label": "Card Summary Name",
|
|
443
|
+
"category": "content"
|
|
444
|
+
},
|
|
445
|
+
"schema": {},
|
|
446
|
+
"guideline": "The shopper's label for the card, or else its network name; nothing when both are blank. Read-only. On an unlabelled card it is the only part a screen reader hears the network from. Must be inside a card-summary provider.",
|
|
447
|
+
"docPath": "src/particles/card-summary/card-summary.md"
|
|
448
|
+
},
|
|
449
|
+
"CardSummaryMask": {
|
|
450
|
+
"name": "CardSummaryMask",
|
|
451
|
+
"importPath": "@vtex/faststore/components",
|
|
452
|
+
"requiresContext": "card-summary",
|
|
453
|
+
"editor": {
|
|
454
|
+
"label": "Card Summary Mask",
|
|
455
|
+
"category": "content"
|
|
456
|
+
},
|
|
457
|
+
"schema": {
|
|
458
|
+
"mask": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"default": "••••",
|
|
461
|
+
"label": "Mask"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"guideline": "Decoration standing for the hidden digits: the mask text (•••• by default), or children such as an icon in its place. Keep children inline. Always hidden from assistive technology; dropping it changes nothing a screen reader hears. Renders nothing when empty or when the card has no digits. Must be inside a card-summary provider.",
|
|
465
|
+
"docPath": "src/particles/card-summary/card-summary.md"
|
|
466
|
+
},
|
|
467
|
+
"CardSummaryDigits": {
|
|
468
|
+
"name": "CardSummaryDigits",
|
|
469
|
+
"importPath": "@vtex/faststore/components",
|
|
470
|
+
"requiresContext": "card-summary",
|
|
471
|
+
"editor": {
|
|
472
|
+
"label": "Card Summary Digits",
|
|
473
|
+
"category": "content"
|
|
474
|
+
},
|
|
475
|
+
"schema": {},
|
|
476
|
+
"guideline": "The last four digits, announced to screen readers as \"ending in\" and the digits. Never more than four digits. Renders nothing when the card has no digits. Must be inside a card-summary provider.",
|
|
477
|
+
"docPath": "src/particles/card-summary/card-summary.md"
|
|
478
|
+
},
|
|
382
479
|
"CarouselRoot": {
|
|
383
480
|
"name": "CarouselRoot",
|
|
384
481
|
"importPath": "@vtex/faststore/components",
|
|
@@ -3281,7 +3378,8 @@
|
|
|
3281
3378
|
"label": "Default Auto-Dismiss (ms)"
|
|
3282
3379
|
}
|
|
3283
3380
|
},
|
|
3284
|
-
"
|
|
3381
|
+
"providesContext": "toast",
|
|
3382
|
+
"guideline": "Mount once at the layout root, above the Slot. Compose as: ToastProvider > ToastPortal > ToastViewport. A childless ToastViewport renders the active toasts itself; to control the markup, put a ToastList with a ToastRoot template inside it. Code raises toasts with useOptionalToast() (null without a provider) or useToast() (throws without one).",
|
|
3285
3383
|
"docPath": "src/particles/toast/toast.md"
|
|
3286
3384
|
},
|
|
3287
3385
|
"ToastPortal": {
|
|
@@ -3303,7 +3401,7 @@
|
|
|
3303
3401
|
"category": "layout"
|
|
3304
3402
|
},
|
|
3305
3403
|
"schema": {},
|
|
3306
|
-
"guideline": "The fixed-position stack container for all active toasts. With no children it renders every active toast itself (title, description, action and a localized close button), so a page schema needs only ToastProvider > ToastPortal > ToastViewport. Pass children
|
|
3404
|
+
"guideline": "The fixed-position stack container for all active toasts. With no children it renders every active toast itself (title, description, action and a localized close button), so a page schema needs only ToastProvider > ToastPortal > ToastViewport. Pass children to take control of the markup: a ToastList with a ToastRoot template is the schema-composable way (it renders the template once per queued toast), or map useToast().toasts to ToastRoot in code. Position it with a swatch on data-fs-toast-viewport (e.g. bottom-right vs. top-center). Direct child of ToastPortal.",
|
|
3307
3405
|
"docPath": "src/particles/toast/toast.md"
|
|
3308
3406
|
},
|
|
3309
3407
|
"ToastRoot": {
|
|
@@ -3314,7 +3412,21 @@
|
|
|
3314
3412
|
"category": "layout"
|
|
3315
3413
|
},
|
|
3316
3414
|
"schema": {},
|
|
3317
|
-
"
|
|
3415
|
+
"requiresContext": "toast-item",
|
|
3416
|
+
"guideline": "One instance per active toast. Inside a ToastList it is the per-toast template and reads its toast from the list; a childless ToastViewport renders its own ToastRoot per toast, so compose one only to override that. Compose as: ToastRoot > (Icon + ToastTitle + ToastDescription + ToastAction + ToastClose), all optional except at least one of Title/Description.",
|
|
3417
|
+
"docPath": "src/particles/toast/toast.md"
|
|
3418
|
+
},
|
|
3419
|
+
"ToastList": {
|
|
3420
|
+
"name": "ToastList",
|
|
3421
|
+
"importPath": "@vtex/faststore/components",
|
|
3422
|
+
"editor": {
|
|
3423
|
+
"label": "Toast List",
|
|
3424
|
+
"category": "layout"
|
|
3425
|
+
},
|
|
3426
|
+
"schema": {},
|
|
3427
|
+
"requiresContext": "toast",
|
|
3428
|
+
"providesContext": "toast-item",
|
|
3429
|
+
"guideline": "Renders its children once per queued toast; place a ToastRoot (with ToastTitle and ToastDescription, both auto-filled from the toast) inside it as the template. With no children it renders that template by default. Direct child of ToastViewport; renders nothing without a ToastProvider ancestor.",
|
|
3318
3430
|
"docPath": "src/particles/toast/toast.md"
|
|
3319
3431
|
},
|
|
3320
3432
|
"ToastTitle": {
|
|
@@ -4344,6 +4456,231 @@
|
|
|
4344
4456
|
"guideline": "Loading placeholder rendered by AccountMenuIdentity while the profile is unresolved. Declares no context requirement — it renders before the matter has anything to show.",
|
|
4345
4457
|
"docPath": "src/matter/account-menu-identity/account-menu-identity.md"
|
|
4346
4458
|
},
|
|
4459
|
+
"AccountSavedCardsRoot": {
|
|
4460
|
+
"name": "AccountSavedCardsRoot",
|
|
4461
|
+
"importPath": "@vtex/faststore/components",
|
|
4462
|
+
"fragment": "\n fragment AccountSavedCardsData on Query {\n customerSavedCards {\n __typename\n id\n cards {\n __typename\n id\n }\n }\n }\n",
|
|
4463
|
+
"fetchStrategy": "reactive",
|
|
4464
|
+
"requiresContext": "session",
|
|
4465
|
+
"providesContext": "account-saved-cards",
|
|
4466
|
+
"actions": {
|
|
4467
|
+
"savedCard": [
|
|
4468
|
+
"remove"
|
|
4469
|
+
]
|
|
4470
|
+
},
|
|
4471
|
+
"editor": {
|
|
4472
|
+
"label": "Account Saved Cards Root",
|
|
4473
|
+
"category": "identity"
|
|
4474
|
+
},
|
|
4475
|
+
"schema": {},
|
|
4476
|
+
"guideline": "The signed-in shopper's saved cards, read with no cart. Renders nothing unless the session is loggedIn, and no chrome of its own: compose AccountSavedCardsHeading, AccountSavedCardsRemoveFeedback, AccountSavedCardsLoading, AccountSavedCardsError, AccountSavedCardsEmpty, and AccountSavedCardsList (with an AccountSavedCardItem inside) as children. Exactly one of Loading, Error, Empty, or List renders at a time; the state is on data-fs-account-saved-cards-state. It owns the removal state and supplies the savedCard.remove write to every AccountSavedCardRemove inside, placed or default, so the write sits here rather than on the control that dispatches it; with no remove control composed the write is never called. Must be inside a SessionRoot, normally the my-account layout's. See account-saved-cards.md.",
|
|
4477
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4478
|
+
},
|
|
4479
|
+
"AccountSavedCardsHeading": {
|
|
4480
|
+
"name": "AccountSavedCardsHeading",
|
|
4481
|
+
"importPath": "@vtex/faststore/components",
|
|
4482
|
+
"contentTypeId": "account-saved-cards-heading",
|
|
4483
|
+
"requiresContext": "account-saved-cards",
|
|
4484
|
+
"editor": {
|
|
4485
|
+
"label": "Account Saved Cards Heading",
|
|
4486
|
+
"category": "identity"
|
|
4487
|
+
},
|
|
4488
|
+
"schema": {
|
|
4489
|
+
"as": {
|
|
4490
|
+
"type": [
|
|
4491
|
+
"h2",
|
|
4492
|
+
"h3",
|
|
4493
|
+
"h4",
|
|
4494
|
+
"h5",
|
|
4495
|
+
"h6"
|
|
4496
|
+
],
|
|
4497
|
+
"default": "h2",
|
|
4498
|
+
"label": "Heading level"
|
|
4499
|
+
}
|
|
4500
|
+
},
|
|
4501
|
+
"guideline": "The section heading, rendered in every state. `as` sets the level from h2 to h6 (default h2); there is no h1, because the page title belongs to the page shell — pick the level that fits where the section is nested, or omit the heading. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.heading). Must be inside AccountSavedCardsRoot.",
|
|
4502
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4503
|
+
},
|
|
4504
|
+
"AccountSavedCardsList": {
|
|
4505
|
+
"name": "AccountSavedCardsList",
|
|
4506
|
+
"importPath": "@vtex/faststore/components",
|
|
4507
|
+
"requiresContext": "account-saved-cards",
|
|
4508
|
+
"providesContext": "account-saved-card",
|
|
4509
|
+
"editor": {
|
|
4510
|
+
"label": "Account Saved Cards List",
|
|
4511
|
+
"category": "identity"
|
|
4512
|
+
},
|
|
4513
|
+
"schema": {},
|
|
4514
|
+
"guideline": "The list of saved cards, one row per card in the platform order, rendered only when the shopper has at least one. Place one AccountSavedCardItem inside as the row template. Must be inside AccountSavedCardsRoot.",
|
|
4515
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4516
|
+
},
|
|
4517
|
+
"AccountSavedCardItem": {
|
|
4518
|
+
"name": "AccountSavedCardItem",
|
|
4519
|
+
"importPath": "@vtex/faststore/components",
|
|
4520
|
+
"fragment": "\n fragment AccountSavedCardItemData on Query {\n customerSavedCards {\n cards {\n __typename\n id\n network {\n name\n }\n lastDigits\n expiry {\n month\n year\n }\n status\n }\n }\n }\n",
|
|
4521
|
+
"fetchStrategy": "reactive-list-item",
|
|
4522
|
+
"requiresContext": "account-saved-card",
|
|
4523
|
+
"providesContext": [
|
|
4524
|
+
"card-summary",
|
|
4525
|
+
"account-saved-card-data"
|
|
4526
|
+
],
|
|
4527
|
+
"editor": {
|
|
4528
|
+
"label": "Account Saved Card Item",
|
|
4529
|
+
"category": "identity"
|
|
4530
|
+
},
|
|
4531
|
+
"schema": {},
|
|
4532
|
+
"guideline": "One saved card as a list row. It provides the card to the CardSummary parts, AccountSavedCardExpiry, and AccountSavedCardRemove. With no children it renders CardSummary (mark, network name, mask, last four digits), AccountSavedCardExpiry, and AccountSavedCardRemove, whose text is then always the catalog wording; compose them as children to rearrange them or to reword them from the CMS, keep AccountSavedCardExpiry in any custom row, and leave AccountSavedCardRemove out only for a read-only list. An expired row carries data-fs-account-saved-card-expired, an unusable one data-fs-account-saved-card-unusable, and a row whose removal is pending data-fs-account-saved-card-removing, for a swatch to dim. Never shows more than the last four digits. Must be inside AccountSavedCardsList.",
|
|
4533
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4534
|
+
},
|
|
4535
|
+
"AccountSavedCardExpiry": {
|
|
4536
|
+
"name": "AccountSavedCardExpiry",
|
|
4537
|
+
"importPath": "@vtex/faststore/components",
|
|
4538
|
+
"contentTypeId": "account-saved-card-expiry",
|
|
4539
|
+
"requiresContext": "account-saved-card-data",
|
|
4540
|
+
"editor": {
|
|
4541
|
+
"label": "Account Saved Card Expiry",
|
|
4542
|
+
"category": "identity"
|
|
4543
|
+
},
|
|
4544
|
+
"schema": {},
|
|
4545
|
+
"guideline": "When a saved card expires: \"Expires 05/28\" for a working card, \"Expired 05/24\" (or \"Expired\" with no date) for an expired one, and \"This card can't be used\", with no date, for an unusable one. Renders nothing for a working card with no date. The label comes from the CMS entry, then the catalog (fs/saved-cards.expires, .expired, .expired-no-date, .unusable); the component always places the MM/YY date after it, and only a placed element reads the CMS entry. The state is on data-fs-account-saved-card-expiry-status (usable, expired, unusable). Must be inside AccountSavedCardItem.",
|
|
4546
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4547
|
+
},
|
|
4548
|
+
"AccountSavedCardsEmpty": {
|
|
4549
|
+
"name": "AccountSavedCardsEmpty",
|
|
4550
|
+
"importPath": "@vtex/faststore/components",
|
|
4551
|
+
"contentTypeId": "account-saved-cards-empty",
|
|
4552
|
+
"requiresContext": "account-saved-cards",
|
|
4553
|
+
"editor": {
|
|
4554
|
+
"label": "Account Saved Cards Empty",
|
|
4555
|
+
"category": "identity"
|
|
4556
|
+
},
|
|
4557
|
+
"schema": {},
|
|
4558
|
+
"guideline": "States that the shopper has no saved cards. Renders only once the read resolved with none — never while loading or after a failure. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.empty). Must be inside AccountSavedCardsRoot.",
|
|
4559
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4560
|
+
},
|
|
4561
|
+
"AccountSavedCardsLoading": {
|
|
4562
|
+
"name": "AccountSavedCardsLoading",
|
|
4563
|
+
"importPath": "@vtex/faststore/components",
|
|
4564
|
+
"contentTypeId": "account-saved-cards-loading",
|
|
4565
|
+
"requiresContext": "account-saved-cards",
|
|
4566
|
+
"editor": {
|
|
4567
|
+
"label": "Account Saved Cards Loading",
|
|
4568
|
+
"category": "identity"
|
|
4569
|
+
},
|
|
4570
|
+
"schema": {
|
|
4571
|
+
"skeletonCount": {
|
|
4572
|
+
"type": "number",
|
|
4573
|
+
"default": 2,
|
|
4574
|
+
"label": "Placeholder rows"
|
|
4575
|
+
}
|
|
4576
|
+
},
|
|
4577
|
+
"guideline": "Placeholder rows while the saved cards load, plus one polite live region that announces the wait (CMS entry, then the catalog fs/saved-cards.loading). The rows are hidden from assistive technology; style them through data-fs-account-saved-cards-loading-row. Without this part the section shows no loading look. Must be inside AccountSavedCardsRoot.",
|
|
4578
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4579
|
+
},
|
|
4580
|
+
"AccountSavedCardsError": {
|
|
4581
|
+
"name": "AccountSavedCardsError",
|
|
4582
|
+
"importPath": "@vtex/faststore/components",
|
|
4583
|
+
"contentTypeId": "account-saved-cards-error",
|
|
4584
|
+
"requiresContext": "account-saved-cards",
|
|
4585
|
+
"editor": {
|
|
4586
|
+
"label": "Account Saved Cards Error",
|
|
4587
|
+
"category": "identity"
|
|
4588
|
+
},
|
|
4589
|
+
"schema": {},
|
|
4590
|
+
"guideline": "An alert shown when the saved cards cannot be read. An expired session says so and links to sign-in, returning the shopper to this page; any other failure says the cards could not be loaded. The wording comes from the CMS entry, then the catalog (fs/saved-cards.session-expired, .sign-in, .load-failed), never from the server; children replace it for every failure and drop the link. Must be inside AccountSavedCardsRoot.",
|
|
4591
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4592
|
+
},
|
|
4593
|
+
"AccountSavedCardRemove": {
|
|
4594
|
+
"name": "AccountSavedCardRemove",
|
|
4595
|
+
"importPath": "@vtex/faststore/components",
|
|
4596
|
+
"requiresContext": "account-saved-card-data",
|
|
4597
|
+
"providesContext": "account-saved-card-remove",
|
|
4598
|
+
"editor": {
|
|
4599
|
+
"label": "Account Saved Card Remove",
|
|
4600
|
+
"category": "identity"
|
|
4601
|
+
},
|
|
4602
|
+
"schema": {},
|
|
4603
|
+
"guideline": "Lets the shopper remove the row's card after confirming. State-only controller: wrap one AlertDialogRoot and it becomes controlled, so never set open or onOpenChange on it. Compose AlertDialogRoot > (AccountSavedCardRemoveTrigger + AlertDialogPortal > (AlertDialogBackdrop + AlertDialogViewport > AlertDialogPopup > (AccountSavedCardRemoveTitle + AccountSavedCardRemoveDescription + AccountSavedCardRemoveCancel + AccountSavedCardRemoveConfirm))), Cancel before Confirm so the safe action takes focus. With no children it renders that prompt with catalog text; compose the parts to reword them from the CMS. The prompt stays open while the removal runs and closes when it fails; on success the row leaves the list. AccountSavedCardsRoot supplies the savedCard.remove write, and the outcome goes unreported unless the section composes AccountSavedCardsRemoveFeedback. Must be inside AccountSavedCardItem.",
|
|
4604
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4605
|
+
},
|
|
4606
|
+
"AccountSavedCardRemoveTrigger": {
|
|
4607
|
+
"name": "AccountSavedCardRemoveTrigger",
|
|
4608
|
+
"importPath": "@vtex/faststore/components",
|
|
4609
|
+
"contentTypeId": "account-saved-card-remove-trigger",
|
|
4610
|
+
"requiresContext": "account-saved-card-remove",
|
|
4611
|
+
"editor": {
|
|
4612
|
+
"label": "Account Saved Card Remove Trigger",
|
|
4613
|
+
"category": "identity"
|
|
4614
|
+
},
|
|
4615
|
+
"schema": {},
|
|
4616
|
+
"guideline": "Opens the removal prompt. Its accessible name is its text followed by the card, e.g. \"Remove Visa ending in 1234\"; the card part is visually hidden. Disabled while any removal in the section is pending. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.remove.trigger). Direct child of the AlertDialogRoot inside AccountSavedCardRemove.",
|
|
4617
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4618
|
+
},
|
|
4619
|
+
"AccountSavedCardRemoveTitle": {
|
|
4620
|
+
"name": "AccountSavedCardRemoveTitle",
|
|
4621
|
+
"importPath": "@vtex/faststore/components",
|
|
4622
|
+
"contentTypeId": "account-saved-card-remove-title",
|
|
4623
|
+
"requiresContext": "account-saved-card-remove",
|
|
4624
|
+
"editor": {
|
|
4625
|
+
"label": "Account Saved Card Remove Title",
|
|
4626
|
+
"category": "identity"
|
|
4627
|
+
},
|
|
4628
|
+
"schema": {},
|
|
4629
|
+
"guideline": "The removal prompt's question and its accessible name. Required inside AlertDialogPopup. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.remove.title). Must be inside AccountSavedCardRemove.",
|
|
4630
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4631
|
+
},
|
|
4632
|
+
"AccountSavedCardRemoveDescription": {
|
|
4633
|
+
"name": "AccountSavedCardRemoveDescription",
|
|
4634
|
+
"importPath": "@vtex/faststore/components",
|
|
4635
|
+
"contentTypeId": "account-saved-card-remove-description",
|
|
4636
|
+
"requiresContext": "account-saved-card-remove",
|
|
4637
|
+
"editor": {
|
|
4638
|
+
"label": "Account Saved Card Remove Description",
|
|
4639
|
+
"category": "identity"
|
|
4640
|
+
},
|
|
4641
|
+
"schema": {},
|
|
4642
|
+
"guideline": "Names the card and states the consequence; screen readers announce it with the prompt. With no children it renders CardSummary and then the text, which resolves the CMS entry, then the catalog (fs/saved-cards.remove.description); children replace both, so keep a CardSummary in them for the prompt to name the card. Inside AlertDialogPopup, after AccountSavedCardRemoveTitle. Must be inside AccountSavedCardRemove.",
|
|
4643
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4644
|
+
},
|
|
4645
|
+
"AccountSavedCardRemoveCancel": {
|
|
4646
|
+
"name": "AccountSavedCardRemoveCancel",
|
|
4647
|
+
"importPath": "@vtex/faststore/components",
|
|
4648
|
+
"contentTypeId": "account-saved-card-remove-cancel",
|
|
4649
|
+
"requiresContext": "account-saved-card-remove",
|
|
4650
|
+
"editor": {
|
|
4651
|
+
"label": "Account Saved Card Remove Cancel",
|
|
4652
|
+
"category": "identity"
|
|
4653
|
+
},
|
|
4654
|
+
"schema": {},
|
|
4655
|
+
"guideline": "Closes the removal prompt and keeps the card. Disabled while the removal runs. Place it before AccountSavedCardRemoveConfirm so it takes focus when the prompt opens. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.remove.cancel). Must be inside AccountSavedCardRemove.",
|
|
4656
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4657
|
+
},
|
|
4658
|
+
"AccountSavedCardRemoveConfirm": {
|
|
4659
|
+
"name": "AccountSavedCardRemoveConfirm",
|
|
4660
|
+
"importPath": "@vtex/faststore/components",
|
|
4661
|
+
"contentTypeId": "account-saved-card-remove-confirm",
|
|
4662
|
+
"requiresContext": "account-saved-card-remove",
|
|
4663
|
+
"editor": {
|
|
4664
|
+
"label": "Account Saved Card Remove Confirm",
|
|
4665
|
+
"category": "identity"
|
|
4666
|
+
},
|
|
4667
|
+
"schema": {},
|
|
4668
|
+
"guideline": "Removes the card. It dispatches savedCard.remove through the write AccountSavedCardsRoot supplies and declares none of its own. While the removal runs it is busy and shows its pending text; one removal runs at a time in the section. Text resolves children, then the CMS entry, then the catalog (fs/saved-cards.remove.confirm, .pending). Must be inside AccountSavedCardRemove.",
|
|
4669
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4670
|
+
},
|
|
4671
|
+
"AccountSavedCardsRemoveFeedback": {
|
|
4672
|
+
"name": "AccountSavedCardsRemoveFeedback",
|
|
4673
|
+
"importPath": "@vtex/faststore/components",
|
|
4674
|
+
"contentTypeId": "account-saved-cards-remove-feedback",
|
|
4675
|
+
"requiresContext": "account-saved-cards",
|
|
4676
|
+
"editor": {
|
|
4677
|
+
"label": "Account Saved Cards Remove Feedback",
|
|
4678
|
+
"category": "identity"
|
|
4679
|
+
},
|
|
4680
|
+
"schema": {},
|
|
4681
|
+
"guideline": "Tells the shopper how a card removal ended: a status message that takes focus when the card was removed, or an alert when it was not, with a sign-in link back to this page when the session expired. Renders in every state of the section, so the message outlives the removed row and an emptied list; it stays until the next removal starts. Without this part a removal's outcome goes unreported. The wording comes from the CMS entry, then the catalog (fs/saved-cards.remove.success, .failed, fs/saved-cards.session-expired, .sign-in), never from the server; the outcome is on data-fs-account-saved-cards-remove-feedback-outcome. Must be inside AccountSavedCardsRoot.",
|
|
4682
|
+
"docPath": "src/matter/account-saved-cards/account-saved-cards.md"
|
|
4683
|
+
},
|
|
4347
4684
|
"BillingAddress": {
|
|
4348
4685
|
"name": "BillingAddress",
|
|
4349
4686
|
"importPath": "@vtex/faststore/components",
|
|
@@ -4699,14 +5036,19 @@
|
|
|
4699
5036
|
"CartRoot": {
|
|
4700
5037
|
"name": "CartRoot",
|
|
4701
5038
|
"importPath": "@vtex/faststore/components",
|
|
4702
|
-
"fragment": "\n fragment CartData on Query {\n cart {\n __typename\n id\n items {\n __typename\n id\n quantity\n gift\n variant {\n __typename\n availability\n }\n }\n totalizers {\n __typename\n id\n name\n value {\n ...MoneyFragment\n }\n }\n total {\n ...MoneyFragment\n }\n messages {\n __typename\n code\n text\n status\n }\n appliedCoupons {\n code\n isUnmatchedCondition\n }\n }\n }\n\nfragment MoneyFragment on Money {\n __typename\n amount\n currencyCode\n}",
|
|
5039
|
+
"fragment": "\n fragment CartData on Query {\n cart {\n __typename\n id\n items {\n __typename\n id\n quantity\n gift\n variant {\n __typename\n availability\n }\n }\n totalizers {\n __typename\n id\n name\n value {\n ...MoneyFragment\n }\n }\n total {\n ...MoneyFragment\n }\n messages {\n __typename\n code\n text\n status\n }\n appliedCoupons {\n code\n isUnmatchedCondition\n }\n discounts {\n name\n value {\n ...MoneyFragment\n }\n kind\n }\n salesChannelMismatch {\n cartSalesChannel\n activeSalesChannel\n }\n }\n }\n\nfragment MoneyFragment on Money {\n __typename\n amount\n currencyCode\n}",
|
|
4703
5040
|
"fetchStrategy": "reactive",
|
|
4704
5041
|
"editor": {
|
|
4705
5042
|
"label": "Cart Root",
|
|
4706
5043
|
"category": "commerce"
|
|
4707
5044
|
},
|
|
4708
5045
|
"schema": {},
|
|
4709
|
-
"
|
|
5046
|
+
"actions": {
|
|
5047
|
+
"cart": [
|
|
5048
|
+
"syncSalesChannel"
|
|
5049
|
+
]
|
|
5050
|
+
},
|
|
5051
|
+
"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.",
|
|
4710
5052
|
"docPath": "src/matter/cart/cart.md"
|
|
4711
5053
|
},
|
|
4712
5054
|
"CartList": {
|
|
@@ -4755,9 +5097,13 @@
|
|
|
4755
5097
|
"type": "string",
|
|
4756
5098
|
"default": "{count}",
|
|
4757
5099
|
"label": "Template"
|
|
5100
|
+
},
|
|
5101
|
+
"templateOne": {
|
|
5102
|
+
"type": "string",
|
|
5103
|
+
"label": "Template (one)"
|
|
4758
5104
|
}
|
|
4759
5105
|
},
|
|
4760
|
-
"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.",
|
|
5106
|
+
"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.",
|
|
4761
5107
|
"docPath": "src/matter/cart/cart.md"
|
|
4762
5108
|
},
|
|
4763
5109
|
"CartError": {
|
|
@@ -4816,6 +5162,11 @@
|
|
|
4816
5162
|
"applyLabel": {
|
|
4817
5163
|
"type": "string",
|
|
4818
5164
|
"label": "Apply Label"
|
|
5165
|
+
},
|
|
5166
|
+
"appliedMessage": {
|
|
5167
|
+
"type": "string",
|
|
5168
|
+
"default": "Coupon applied",
|
|
5169
|
+
"label": "Applied message"
|
|
4819
5170
|
}
|
|
4820
5171
|
},
|
|
4821
5172
|
"actions": {
|
|
@@ -4823,7 +5174,7 @@
|
|
|
4823
5174
|
"applyCoupon"
|
|
4824
5175
|
]
|
|
4825
5176
|
},
|
|
4826
|
-
"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.",
|
|
5177
|
+
"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.",
|
|
4827
5178
|
"docPath": "src/matter/cart/cart.md"
|
|
4828
5179
|
},
|
|
4829
5180
|
"CartAppliedCoupons": {
|
|
@@ -4839,7 +5190,7 @@
|
|
|
4839
5190
|
"removeCoupon"
|
|
4840
5191
|
]
|
|
4841
5192
|
},
|
|
4842
|
-
"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.",
|
|
5193
|
+
"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.",
|
|
4843
5194
|
"docPath": "src/matter/cart/cart.md"
|
|
4844
5195
|
},
|
|
4845
5196
|
"CartCouponRemove": {
|
|
@@ -4874,6 +5225,51 @@
|
|
|
4874
5225
|
"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.",
|
|
4875
5226
|
"docPath": "src/matter/cart/cart.md"
|
|
4876
5227
|
},
|
|
5228
|
+
"CartCouponEmpty": {
|
|
5229
|
+
"name": "CartCouponEmpty",
|
|
5230
|
+
"importPath": "@vtex/faststore/components",
|
|
5231
|
+
"editor": {
|
|
5232
|
+
"label": "Cart Coupon Empty",
|
|
5233
|
+
"category": "commerce"
|
|
5234
|
+
},
|
|
5235
|
+
"schema": {},
|
|
5236
|
+
"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.",
|
|
5237
|
+
"docPath": "src/matter/cart/cart.md"
|
|
5238
|
+
},
|
|
5239
|
+
"CartCouponUnmatched": {
|
|
5240
|
+
"name": "CartCouponUnmatched",
|
|
5241
|
+
"importPath": "@vtex/faststore/components",
|
|
5242
|
+
"editor": {
|
|
5243
|
+
"label": "Cart Coupon Unmatched",
|
|
5244
|
+
"category": "commerce"
|
|
5245
|
+
},
|
|
5246
|
+
"schema": {
|
|
5247
|
+
"message": {
|
|
5248
|
+
"type": "string",
|
|
5249
|
+
"default": "This coupon is not being applied to your cart",
|
|
5250
|
+
"label": "Message"
|
|
5251
|
+
}
|
|
5252
|
+
},
|
|
5253
|
+
"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.",
|
|
5254
|
+
"docPath": "src/matter/cart/cart.md"
|
|
5255
|
+
},
|
|
5256
|
+
"CartCouponSavings": {
|
|
5257
|
+
"name": "CartCouponSavings",
|
|
5258
|
+
"importPath": "@vtex/faststore/components",
|
|
5259
|
+
"editor": {
|
|
5260
|
+
"label": "Cart Coupon Savings",
|
|
5261
|
+
"category": "commerce"
|
|
5262
|
+
},
|
|
5263
|
+
"schema": {
|
|
5264
|
+
"template": {
|
|
5265
|
+
"type": "string",
|
|
5266
|
+
"default": "{amount}",
|
|
5267
|
+
"label": "Template"
|
|
5268
|
+
}
|
|
5269
|
+
},
|
|
5270
|
+
"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.",
|
|
5271
|
+
"docPath": "src/matter/cart/cart.md"
|
|
5272
|
+
},
|
|
4877
5273
|
"CartCheckoutGuard": {
|
|
4878
5274
|
"name": "CartCheckoutGuard",
|
|
4879
5275
|
"importPath": "@vtex/faststore/components",
|
|
@@ -4930,9 +5326,13 @@
|
|
|
4930
5326
|
"type": "string",
|
|
4931
5327
|
"default": "{count} items unavailable",
|
|
4932
5328
|
"label": "Template"
|
|
5329
|
+
},
|
|
5330
|
+
"templateOne": {
|
|
5331
|
+
"type": "string",
|
|
5332
|
+
"label": "Template (one)"
|
|
4933
5333
|
}
|
|
4934
5334
|
},
|
|
4935
|
-
"guideline": "Cart-level summary of how many lines are unavailable; self-hides when none. See cart.md.",
|
|
5335
|
+
"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.",
|
|
4936
5336
|
"docPath": "src/matter/cart/cart.md"
|
|
4937
5337
|
},
|
|
4938
5338
|
"CartRemoveUnavailable": {
|
|
@@ -4951,6 +5351,22 @@
|
|
|
4951
5351
|
"guideline": "Button that removes every unavailable line in one batch call; self-hides when none. See cart.md.",
|
|
4952
5352
|
"docPath": "src/matter/cart/cart.md"
|
|
4953
5353
|
},
|
|
5354
|
+
"ClearCartButton": {
|
|
5355
|
+
"name": "ClearCartButton",
|
|
5356
|
+
"importPath": "@vtex/faststore/components",
|
|
5357
|
+
"editor": {
|
|
5358
|
+
"label": "Clear Cart Button",
|
|
5359
|
+
"category": "commerce"
|
|
5360
|
+
},
|
|
5361
|
+
"schema": {},
|
|
5362
|
+
"actions": {
|
|
5363
|
+
"cart": [
|
|
5364
|
+
"removeItems"
|
|
5365
|
+
]
|
|
5366
|
+
},
|
|
5367
|
+
"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.",
|
|
5368
|
+
"docPath": "src/matter/cart/cart.md"
|
|
5369
|
+
},
|
|
4954
5370
|
"CartOpenOnAdd": {
|
|
4955
5371
|
"name": "CartOpenOnAdd",
|
|
4956
5372
|
"importPath": "@vtex/faststore/components",
|
|
@@ -5030,7 +5446,7 @@
|
|
|
5030
5446
|
}
|
|
5031
5447
|
},
|
|
5032
5448
|
"providesContext": "cart-alert",
|
|
5033
|
-
"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
|
|
5449
|
+
"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.",
|
|
5034
5450
|
"docPath": "src/matter/cart/cart.md"
|
|
5035
5451
|
},
|
|
5036
5452
|
"CartAlertIcon": {
|
|
@@ -5093,10 +5509,194 @@
|
|
|
5093
5509
|
"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.",
|
|
5094
5510
|
"docPath": "src/matter/cart/cart.md"
|
|
5095
5511
|
},
|
|
5512
|
+
"CartDestinationRoot": {
|
|
5513
|
+
"name": "CartDestinationRoot",
|
|
5514
|
+
"importPath": "@vtex/faststore/components",
|
|
5515
|
+
"fragment": "\n fragment CartDestinationData on Query {\n shipping {\n __typename\n id\n address {\n __typename\n id\n postalCode\n country\n city\n state\n }\n }\n }\n",
|
|
5516
|
+
"fetchStrategy": "reactive",
|
|
5517
|
+
"providesContext": "cartDestination",
|
|
5518
|
+
"actions": {
|
|
5519
|
+
"shipping": [
|
|
5520
|
+
"setAddress"
|
|
5521
|
+
]
|
|
5522
|
+
},
|
|
5523
|
+
"editor": {
|
|
5524
|
+
"label": "Cart Destination Root",
|
|
5525
|
+
"category": "content"
|
|
5526
|
+
},
|
|
5527
|
+
"schema": {
|
|
5528
|
+
"defaultCountry": {
|
|
5529
|
+
"type": "string",
|
|
5530
|
+
"default": "BRA",
|
|
5531
|
+
"label": "Default country (ISO alpha-3)"
|
|
5532
|
+
}
|
|
5533
|
+
},
|
|
5534
|
+
"guideline": "Where the cart is delivered, with a postal-code-only form that writes the cart destination so the free-shipping bar follows. Compose CartDestinationRead (CartDestinationValue, CartDestinationUnset, CartDestinationChange) for read mode and CartDestinationForm (PostalCodeControl, Submit, Cancel, Error) for edit mode. Starts in read mode; the store cannot open edit mode from outside. See cart-destination.md.",
|
|
5535
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5536
|
+
},
|
|
5537
|
+
"CartDestinationRead": {
|
|
5538
|
+
"name": "CartDestinationRead",
|
|
5539
|
+
"importPath": "@vtex/faststore/components",
|
|
5540
|
+
"requiresContext": "cartDestination",
|
|
5541
|
+
"editor": {
|
|
5542
|
+
"label": "Cart Destination Read",
|
|
5543
|
+
"category": "layout"
|
|
5544
|
+
},
|
|
5545
|
+
"schema": {},
|
|
5546
|
+
"guideline": "Wraps what read mode shows: the value, the invitation when no destination is set, and the change control. Renders nothing while edit mode is open. Must be inside CartDestinationRoot.",
|
|
5547
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5548
|
+
},
|
|
5549
|
+
"CartDestinationValue": {
|
|
5550
|
+
"name": "CartDestinationValue",
|
|
5551
|
+
"importPath": "@vtex/faststore/components",
|
|
5552
|
+
"contentTypeId": "cart-destination-value",
|
|
5553
|
+
"requiresContext": "cartDestination",
|
|
5554
|
+
"editor": {
|
|
5555
|
+
"label": "Cart Destination Value",
|
|
5556
|
+
"category": "content"
|
|
5557
|
+
},
|
|
5558
|
+
"schema": {
|
|
5559
|
+
"prefix": {
|
|
5560
|
+
"type": "string",
|
|
5561
|
+
"label": "Prefix"
|
|
5562
|
+
}
|
|
5563
|
+
},
|
|
5564
|
+
"guideline": "The cart destination as postal code, city and state, each in its own element. Renders nothing while loading or when no destination is set. Must be inside CartDestinationRoot.",
|
|
5565
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5566
|
+
},
|
|
5567
|
+
"CartDestinationUnset": {
|
|
5568
|
+
"name": "CartDestinationUnset",
|
|
5569
|
+
"importPath": "@vtex/faststore/components",
|
|
5570
|
+
"requiresContext": "cartDestination",
|
|
5571
|
+
"editor": {
|
|
5572
|
+
"label": "Cart Destination Unset",
|
|
5573
|
+
"category": "content"
|
|
5574
|
+
},
|
|
5575
|
+
"schema": {},
|
|
5576
|
+
"guideline": "Renders its children only once the destination resolved and none is set. Place the store-authored invitation (for example a Text reading \"Informe seu CEP\") inside it, within CartDestinationRead. Must be inside CartDestinationRoot.",
|
|
5577
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5578
|
+
},
|
|
5579
|
+
"CartDestinationChange": {
|
|
5580
|
+
"name": "CartDestinationChange",
|
|
5581
|
+
"importPath": "@vtex/faststore/components",
|
|
5582
|
+
"contentTypeId": "cart-destination-change",
|
|
5583
|
+
"requiresContext": "cartDestination",
|
|
5584
|
+
"editor": {
|
|
5585
|
+
"label": "Cart Destination Change",
|
|
5586
|
+
"category": "action"
|
|
5587
|
+
},
|
|
5588
|
+
"schema": {
|
|
5589
|
+
"label": {
|
|
5590
|
+
"type": "string",
|
|
5591
|
+
"label": "Button label"
|
|
5592
|
+
}
|
|
5593
|
+
},
|
|
5594
|
+
"guideline": "Button that opens edit mode, styled as a link by the store. Place it inside CartDestinationRead. Must be inside CartDestinationRoot.",
|
|
5595
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5596
|
+
},
|
|
5597
|
+
"CartDestinationForm": {
|
|
5598
|
+
"name": "CartDestinationForm",
|
|
5599
|
+
"importPath": "@vtex/faststore/components",
|
|
5600
|
+
"requiresContext": "cartDestination",
|
|
5601
|
+
"editor": {
|
|
5602
|
+
"label": "Cart Destination Form",
|
|
5603
|
+
"category": "action"
|
|
5604
|
+
},
|
|
5605
|
+
"schema": {},
|
|
5606
|
+
"guideline": "Edit mode: renders only while editing and routes Enter to the submit. Holds the postal code control, Submit, Cancel and Error, and any help text the store places. Must be inside CartDestinationRoot.",
|
|
5607
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5608
|
+
},
|
|
5609
|
+
"CartDestinationPostalCodeControl": {
|
|
5610
|
+
"name": "CartDestinationPostalCodeControl",
|
|
5611
|
+
"importPath": "@vtex/faststore/components",
|
|
5612
|
+
"requiresContext": "cartDestination",
|
|
5613
|
+
"editor": {
|
|
5614
|
+
"label": "Cart Destination Postal Code Control",
|
|
5615
|
+
"category": "content"
|
|
5616
|
+
},
|
|
5617
|
+
"schema": {
|
|
5618
|
+
"mask": {
|
|
5619
|
+
"type": "string",
|
|
5620
|
+
"label": "Mask pattern"
|
|
5621
|
+
},
|
|
5622
|
+
"label": {
|
|
5623
|
+
"type": "string",
|
|
5624
|
+
"label": "Label"
|
|
5625
|
+
},
|
|
5626
|
+
"placeholder": {
|
|
5627
|
+
"type": "string",
|
|
5628
|
+
"label": "Placeholder"
|
|
5629
|
+
},
|
|
5630
|
+
"invalidMessage": {
|
|
5631
|
+
"type": "string",
|
|
5632
|
+
"label": "Invalid-value message"
|
|
5633
|
+
}
|
|
5634
|
+
},
|
|
5635
|
+
"guideline": "The postal code input of edit mode, empty each time edit mode opens and focused on open. The mask follows the cart country unless set. Must be inside CartDestinationForm.",
|
|
5636
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5637
|
+
},
|
|
5638
|
+
"CartDestinationSubmit": {
|
|
5639
|
+
"name": "CartDestinationSubmit",
|
|
5640
|
+
"importPath": "@vtex/faststore/components",
|
|
5641
|
+
"contentTypeId": "cart-destination-submit",
|
|
5642
|
+
"requiresContext": "cartDestination",
|
|
5643
|
+
"editor": {
|
|
5644
|
+
"label": "Cart Destination Submit",
|
|
5645
|
+
"category": "action"
|
|
5646
|
+
},
|
|
5647
|
+
"schema": {
|
|
5648
|
+
"label": {
|
|
5649
|
+
"type": "string",
|
|
5650
|
+
"label": "Button label"
|
|
5651
|
+
},
|
|
5652
|
+
"pendingLabel": {
|
|
5653
|
+
"type": "string",
|
|
5654
|
+
"label": "Pending label"
|
|
5655
|
+
}
|
|
5656
|
+
},
|
|
5657
|
+
"guideline": "Writes the typed postal code. Disabled until it is complete for the country, valid and different from the current one, and while a write is pending (aria-busy). Must be inside CartDestinationForm.",
|
|
5658
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5659
|
+
},
|
|
5660
|
+
"CartDestinationCancel": {
|
|
5661
|
+
"name": "CartDestinationCancel",
|
|
5662
|
+
"importPath": "@vtex/faststore/components",
|
|
5663
|
+
"contentTypeId": "cart-destination-cancel",
|
|
5664
|
+
"requiresContext": "cartDestination",
|
|
5665
|
+
"editor": {
|
|
5666
|
+
"label": "Cart Destination Cancel",
|
|
5667
|
+
"category": "action"
|
|
5668
|
+
},
|
|
5669
|
+
"schema": {
|
|
5670
|
+
"label": {
|
|
5671
|
+
"type": "string",
|
|
5672
|
+
"label": "Button label"
|
|
5673
|
+
}
|
|
5674
|
+
},
|
|
5675
|
+
"guideline": "Closes edit mode, discards what was typed and writes nothing. Disabled while a write is pending. Must be inside CartDestinationForm.",
|
|
5676
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5677
|
+
},
|
|
5678
|
+
"CartDestinationError": {
|
|
5679
|
+
"name": "CartDestinationError",
|
|
5680
|
+
"importPath": "@vtex/faststore/components",
|
|
5681
|
+
"contentTypeId": "cart-destination-error",
|
|
5682
|
+
"requiresContext": "cartDestination",
|
|
5683
|
+
"editor": {
|
|
5684
|
+
"label": "Cart Destination Error",
|
|
5685
|
+
"category": "content"
|
|
5686
|
+
},
|
|
5687
|
+
"schema": {
|
|
5688
|
+
"genericMessage": {
|
|
5689
|
+
"type": "string",
|
|
5690
|
+
"label": "Failure message"
|
|
5691
|
+
}
|
|
5692
|
+
},
|
|
5693
|
+
"guideline": "Announces why the destination write failed, as an alert, and renders nothing otherwise. Author one message covering a refused postal code and a network failure: both reach the client as the same error. Must be inside CartDestinationForm.",
|
|
5694
|
+
"docPath": "src/matter/cart-destination/cart-destination.md"
|
|
5695
|
+
},
|
|
5096
5696
|
"CartItemRoot": {
|
|
5097
5697
|
"name": "CartItemRoot",
|
|
5098
5698
|
"importPath": "@vtex/faststore/components",
|
|
5099
|
-
"fragment": "\n fragment CartItemRootData on Query {\n cart {\n items {\n __typename\n id\n quantity\n price {\n amount\n currencyCode\n }\n listPrice {\n amount\n currencyCode\n }\n sellingPrice {\n amount\n currencyCode\n }\n gift\n ownTotal {\n ...MoneyFragment\n }\n total {\n ...MoneyFragment\n }\n variant {\n __typename\n variantId\n sku\n name\n image {\n url\n altText\n }\n availability\n }\n product {\n __typename\n productId\n title\n detailUrl\n categories {\n categoryId\n name\n }\n brand {\n brandId\n name\n }\n }\n }\n }\n }\n\nfragment MoneyFragment on Money {\n __typename\n amount\n currencyCode\n}",
|
|
5699
|
+
"fragment": "\n fragment CartItemRootData on Query {\n cart {\n items {\n __typename\n id\n lineId\n quantity\n price {\n amount\n currencyCode\n }\n listPrice {\n amount\n currencyCode\n }\n sellingPrice {\n amount\n currencyCode\n }\n gift\n ownTotal {\n ...MoneyFragment\n }\n total {\n ...MoneyFragment\n }\n variant {\n __typename\n variantId\n sku\n name\n image {\n url\n altText\n }\n availability\n }\n product {\n __typename\n productId\n title\n detailUrl\n categories {\n categoryId\n name\n }\n brand {\n brandId\n name\n }\n }\n }\n }\n }\n\nfragment MoneyFragment on Money {\n __typename\n amount\n currencyCode\n}",
|
|
5100
5700
|
"fetchStrategy": "reactive-list-item",
|
|
5101
5701
|
"requiresContext": "cart-item",
|
|
5102
5702
|
"providesContext": "cart-item-data",
|
|
@@ -5128,7 +5728,7 @@
|
|
|
5128
5728
|
"label": "Object Fit"
|
|
5129
5729
|
}
|
|
5130
5730
|
},
|
|
5131
|
-
"guideline": "Renders the product image from the cart item. Must be inside CartItemRoot.",
|
|
5731
|
+
"guideline": "Renders the product image from the cart item. When the line has no image, or the image fails to load, it renders a decorative placeholder span in the same slot (same className and style, hidden from assistive technology) carrying data-fs-cart-item-image-broken for a swatch to style. The placeholder keeps the inline-level display of the image (inline-block) so width and height apply, and adds no color, border or background. Must be inside CartItemRoot.",
|
|
5132
5732
|
"docPath": "src/matter/cart-item/cart-item.md"
|
|
5133
5733
|
},
|
|
5134
5734
|
"CartItemProductLink": {
|
|
@@ -5140,7 +5740,7 @@
|
|
|
5140
5740
|
"category": "commerce"
|
|
5141
5741
|
},
|
|
5142
5742
|
"schema": {},
|
|
5143
|
-
"guideline": "Links the cart line image to its product page, using the product URL the line already carries: place it inside CartItemRoot wrapping CartItemImage. Whether a line links is decided by placing this element, so there is no prop to toggle it — a checkout line simply omits it. Renders its children unwrapped when the line has no image or no usable product URL, so it never leaves an empty or unsafe link. Navigation is same-tab, and the leaf adds no fields to the page query. Must be inside CartItemRoot. See cart-item.md.",
|
|
5743
|
+
"guideline": "Links the cart line image to its product page, using the product URL the line already carries: place it inside CartItemRoot wrapping CartItemImage. Whether a line links is decided by placing this element, so there is no prop to toggle it — a checkout line simply omits it. Renders its children unwrapped when the line has no image or no usable product URL, so it never leaves an empty or unsafe link. The link names itself with an aria-label taken from the image alt text (or the variant name), so it stays named when the image shows the placeholder; an aria-label passed to the link wins. Navigation is same-tab, and the leaf adds no fields to the page query. Must be inside CartItemRoot. See cart-item.md.",
|
|
5144
5744
|
"docPath": "src/matter/cart-item/cart-item.md"
|
|
5145
5745
|
},
|
|
5146
5746
|
"CartItemName": {
|
|
@@ -5323,13 +5923,19 @@
|
|
|
5323
5923
|
"label": "Cart Item Remove",
|
|
5324
5924
|
"category": "commerce"
|
|
5325
5925
|
},
|
|
5326
|
-
"schema": {
|
|
5926
|
+
"schema": {
|
|
5927
|
+
"removedMessage": {
|
|
5928
|
+
"type": "string",
|
|
5929
|
+
"default": "Item removed",
|
|
5930
|
+
"label": "Removed message"
|
|
5931
|
+
}
|
|
5932
|
+
},
|
|
5327
5933
|
"actions": {
|
|
5328
5934
|
"cart": [
|
|
5329
5935
|
"removeItem"
|
|
5330
5936
|
]
|
|
5331
5937
|
},
|
|
5332
|
-
"guideline": "Button that removes the current line item from the cart. Must be inside CartItemRoot. Also composes inside CartItemUnavailable as a remove-on-alert control. See cart-item.md.",
|
|
5938
|
+
"guideline": "Button that removes the current line item from the cart. Disabled while the removal is in flight; when the removal returns no errors it raises a toast titled removedMessage (needs a ToastProvider with a ToastList in the layout; with none, no toast shows and removal still works). Must be inside CartItemRoot. Also composes inside CartItemUnavailable as a remove-on-alert control. See cart-item.md.",
|
|
5333
5939
|
"docPath": "src/matter/cart-item/cart-item.md"
|
|
5334
5940
|
},
|
|
5335
5941
|
"CartItemAvailable": {
|
|
@@ -6052,7 +6658,7 @@
|
|
|
6052
6658
|
"FreeShippingProgressRoot": {
|
|
6053
6659
|
"name": "FreeShippingProgressRoot",
|
|
6054
6660
|
"importPath": "@vtex/faststore/components",
|
|
6055
|
-
"fragment": "\n fragment FreeShippingProgressData on Query {\n cart {\n id\n
|
|
6661
|
+
"fragment": "\n fragment FreeShippingProgressData on Query {\n cart {\n id\n totalizers {\n id\n value {\n amount\n currencyCode\n }\n }\n freeShippingProgress {\n threshold {\n amount\n currencyCode\n }\n remaining {\n amount\n currencyCode\n }\n qualified\n }\n }\n }\n",
|
|
6056
6662
|
"fetchStrategy": "reactive",
|
|
6057
6663
|
"editor": {
|
|
6058
6664
|
"label": "Free Shipping Progress",
|
|
@@ -8217,6 +8823,115 @@
|
|
|
8217
8823
|
"guideline": "Data-owning root of a facet-sourced product shelf. Owns a products(first:, orderBy:, filter:) fragment whose variables bind to this element: the merchant fills them in the CMS (content model product-shelf) and the props of the same name are the defaults. Receives $data lazily. Compose as: ProductShelfRoot > (ProductShelfHeading + CarouselRoot > (ProductShelfItems + CarouselPrevious + CarouselNext + CarouselBullets)). Compose ProductShelfHeading with the title as its children to render a heading; set the source with categoryId / brandId / collectionId / searchTerm and tune first, sort, availableOnly. Renders a skeleton while loading and nothing when the result is empty. Bind itemsPerPage to the CarouselRoot so paging matches the shelf config. See product-shelf.md.",
|
|
8218
8824
|
"docPath": "src/matter/product-shelf/product-shelf.md"
|
|
8219
8825
|
},
|
|
8826
|
+
"ProductShelfOnMountRoot": {
|
|
8827
|
+
"name": "ProductShelfOnMountRoot",
|
|
8828
|
+
"importPath": "@vtex/faststore/components",
|
|
8829
|
+
"fragment": "\n fragment ProductShelfData on Query {\n products(\n first: $first\n orderBy: $orderBy\n filter: {\n categoryIds: $categoryId\n brandIds: $brandId\n collectionId: $collectionId\n searchTerm: $searchTerm\n availableOnly: $availableOnly\n }\n ) {\n edges {\n node {\n id\n title\n slug\n routeSlug\n images(first: 1) {\n edges {\n node {\n url\n altText\n }\n }\n }\n variants(first: 1) {\n edges {\n node {\n availableForSale\n quantityAvailable\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n sellers {\n isDefault\n offer {\n price {\n amount\n currencyCode\n }\n listPrice {\n amount\n currencyCode\n }\n spotPrice {\n amount\n currencyCode\n }\n tax {\n amount\n currencyCode\n }\n taxPercentage\n availableQuantity\n }\n }\n }\n }\n }\n }\n }\n totalCount\n }\n }\n",
|
|
8830
|
+
"fetchStrategy": "lazy-on-mount",
|
|
8831
|
+
"variables": {
|
|
8832
|
+
"orderBy": {
|
|
8833
|
+
"from": "sort",
|
|
8834
|
+
"values": {
|
|
8835
|
+
"relevance": {
|
|
8836
|
+
"field": "RELEVANCE",
|
|
8837
|
+
"direction": "DESC"
|
|
8838
|
+
},
|
|
8839
|
+
"price_asc": {
|
|
8840
|
+
"field": "PRICE",
|
|
8841
|
+
"direction": "ASC"
|
|
8842
|
+
},
|
|
8843
|
+
"price_desc": {
|
|
8844
|
+
"field": "PRICE",
|
|
8845
|
+
"direction": "DESC"
|
|
8846
|
+
},
|
|
8847
|
+
"name_asc": {
|
|
8848
|
+
"field": "TITLE",
|
|
8849
|
+
"direction": "ASC"
|
|
8850
|
+
},
|
|
8851
|
+
"name_desc": {
|
|
8852
|
+
"field": "TITLE",
|
|
8853
|
+
"direction": "DESC"
|
|
8854
|
+
},
|
|
8855
|
+
"release": {
|
|
8856
|
+
"field": "RELEASE_DATE",
|
|
8857
|
+
"direction": "DESC"
|
|
8858
|
+
},
|
|
8859
|
+
"orders": {
|
|
8860
|
+
"field": "BEST_SELLING",
|
|
8861
|
+
"direction": "DESC"
|
|
8862
|
+
},
|
|
8863
|
+
"discount": {
|
|
8864
|
+
"field": "RELEVANCE",
|
|
8865
|
+
"direction": "DESC"
|
|
8866
|
+
}
|
|
8867
|
+
}
|
|
8868
|
+
}
|
|
8869
|
+
},
|
|
8870
|
+
"editor": {
|
|
8871
|
+
"label": "Product Shelf Root (on mount)",
|
|
8872
|
+
"category": "commerce"
|
|
8873
|
+
},
|
|
8874
|
+
"providesContext": "product-shelf",
|
|
8875
|
+
"schema": {
|
|
8876
|
+
"itemsPerPage": {
|
|
8877
|
+
"type": "number",
|
|
8878
|
+
"default": 5,
|
|
8879
|
+
"label": "Items Per Page"
|
|
8880
|
+
},
|
|
8881
|
+
"usePriceWithTaxes": {
|
|
8882
|
+
"type": "boolean",
|
|
8883
|
+
"default": false,
|
|
8884
|
+
"label": "Use Price With Taxes"
|
|
8885
|
+
},
|
|
8886
|
+
"taxesLabel": {
|
|
8887
|
+
"type": "string",
|
|
8888
|
+
"default": "Tax included",
|
|
8889
|
+
"label": "Taxes Label"
|
|
8890
|
+
},
|
|
8891
|
+
"first": {
|
|
8892
|
+
"type": "number",
|
|
8893
|
+
"default": 5,
|
|
8894
|
+
"label": "Number of Products"
|
|
8895
|
+
},
|
|
8896
|
+
"sort": {
|
|
8897
|
+
"type": [
|
|
8898
|
+
"relevance",
|
|
8899
|
+
"price_asc",
|
|
8900
|
+
"price_desc",
|
|
8901
|
+
"name_asc",
|
|
8902
|
+
"name_desc",
|
|
8903
|
+
"release",
|
|
8904
|
+
"orders",
|
|
8905
|
+
"discount"
|
|
8906
|
+
],
|
|
8907
|
+
"default": "relevance",
|
|
8908
|
+
"label": "Sort"
|
|
8909
|
+
},
|
|
8910
|
+
"searchTerm": {
|
|
8911
|
+
"type": "string",
|
|
8912
|
+
"label": "Search Term"
|
|
8913
|
+
},
|
|
8914
|
+
"categoryId": {
|
|
8915
|
+
"type": "string",
|
|
8916
|
+
"label": "Category ID"
|
|
8917
|
+
},
|
|
8918
|
+
"brandId": {
|
|
8919
|
+
"type": "string",
|
|
8920
|
+
"label": "Brand ID"
|
|
8921
|
+
},
|
|
8922
|
+
"collectionId": {
|
|
8923
|
+
"type": "string",
|
|
8924
|
+
"label": "Collection ID"
|
|
8925
|
+
},
|
|
8926
|
+
"availableOnly": {
|
|
8927
|
+
"type": "boolean",
|
|
8928
|
+
"default": false,
|
|
8929
|
+
"label": "Available Only"
|
|
8930
|
+
}
|
|
8931
|
+
},
|
|
8932
|
+
"guideline": "ProductShelfRoot variant that fetches its products on the client when it mounts, in its own request: the products never enter the page query and are absent from the server HTML. Renders nothing while loading, when the request fails and when the result is empty (no skeleton). Meant for a conditional branch such as CartEmpty, never above the fold. Configured by props only (first, sort, availableOnly, categoryId, brandId, collectionId, searchTerm, itemsPerPage). Compose as: ProductShelfOnMountRoot > (ProductShelfHeading + CarouselRoot > (ProductShelfItems + CarouselPrevious + CarouselNext)). See product-shelf.md.",
|
|
8933
|
+
"docPath": "src/matter/product-shelf/product-shelf.md"
|
|
8934
|
+
},
|
|
8220
8935
|
"ProductShelfItems": {
|
|
8221
8936
|
"name": "ProductShelfItems",
|
|
8222
8937
|
"importPath": "@vtex/faststore/components",
|