@vtex/faststore 0.0.8 → 0.0.11
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 +101 -0
- package/README.md +0 -1
- package/dist/actions.json +48 -1
- package/dist/catalog.json +1397 -1594
- package/dist/cli/index.d.ts +66 -28
- package/dist/cli/index.js +7371 -512
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server-runtime.js +41 -60
- package/dist/cli/server-runtime.js.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +2 -2
- package/dist/components.d.ts +67 -56
- package/dist/components.js +64 -53
- package/dist/content-types.json +5886 -555
- package/dist/core/dist/define-component.d.ts +7 -2
- package/dist/core/dist/define-content-type.d.ts +50 -2
- package/dist/core/dist/define-content-type.js +107 -3
- package/dist/core/dist/define-content-type.js.map +1 -1
- package/dist/core/dist/index.d.ts +2 -2
- package/dist/docs/access-code-field.md +1 -1
- package/dist/docs/access-code-sign-in.md +126 -77
- package/dist/docs/account-address-book.md +210 -95
- package/dist/docs/account-entry-point.md +4 -4
- package/dist/docs/account-menu.md +16 -17
- package/dist/docs/account-saved-cards.md +306 -0
- package/dist/docs/alert-dialog.md +3 -1
- package/dist/docs/avatar.md +4 -2
- package/dist/docs/billing-address.md +99 -30
- package/dist/docs/binding-switcher.md +157 -0
- package/dist/docs/buy-button.md +7 -8
- package/dist/docs/card-entry.md +42 -29
- package/dist/docs/card-summary.md +185 -0
- package/dist/docs/cardholder-document.md +5 -3
- package/dist/docs/carousel.md +5 -4
- package/dist/docs/cart-destination.md +251 -0
- package/dist/docs/cart-item.md +48 -15
- package/dist/docs/cart-totalizer.md +8 -6
- package/dist/docs/cart.md +240 -39
- package/dist/docs/challenge-return.md +135 -0
- package/dist/docs/client-preferences-fieldset.md +10 -5
- package/dist/docs/client-preferences.md +31 -8
- package/dist/docs/client-profile-fieldset.md +20 -6
- package/dist/docs/client-profile.md +12 -3
- package/dist/docs/copy-text.md +9 -7
- package/dist/docs/document-field.md +1 -1
- package/dist/docs/email-field.md +2 -1
- package/dist/docs/email-identification.md +12 -2
- package/dist/docs/footer-copyright.md +4 -2
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/form.md +54 -18
- package/dist/docs/free-shipping-progress.md +18 -13
- package/dist/docs/identity-edit.md +8 -2
- package/dist/docs/identity-summary.md +18 -5
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/installments.md +46 -32
- package/dist/docs/logo.md +1 -1
- package/dist/docs/my-account-profile.md +16 -11
- package/dist/docs/navigation-link.md +5 -3
- package/dist/docs/order-cancel.md +3 -1
- package/dist/docs/order-delivery-address.md +7 -5
- package/dist/docs/order-delivery-group.md +1 -3
- package/dist/docs/order-details-back.md +1 -1
- package/dist/docs/order-details-header.md +1 -4
- package/dist/docs/order-invoice-download.md +60 -0
- package/dist/docs/order-list-row.md +1 -1
- package/dist/docs/order-list-search.md +13 -20
- package/dist/docs/order-list-views.md +11 -17
- package/dist/docs/order-list.md +12 -5
- package/dist/docs/order-payment.md +9 -7
- package/dist/docs/order-placed-date.md +1 -1
- package/dist/docs/order-placed-payment-summary.md +28 -15
- package/dist/docs/order-placed.md +49 -14
- package/dist/docs/order-progress.md +1 -1
- package/dist/docs/order-status-badge.md +20 -9
- package/dist/docs/order-summary.md +2 -2
- package/dist/docs/order-tracking-link.md +58 -0
- package/dist/docs/payment-method-badges.md +32 -6
- package/dist/docs/payment-methods.md +2 -2
- package/dist/docs/payment.md +36 -17
- package/dist/docs/phone-field.md +4 -4
- package/dist/docs/place-order.md +84 -36
- package/dist/docs/postal-code-field.md +3 -1
- package/dist/docs/pricing.md +21 -23
- package/dist/docs/product-gallery.md +19 -20
- package/dist/docs/product-information.md +14 -10
- package/dist/docs/product-list.md +7 -6
- package/dist/docs/product-shelf.md +7 -1
- package/dist/docs/promotion.md +4 -2
- package/dist/docs/region.md +23 -15
- package/dist/docs/save-card.md +7 -6
- package/dist/docs/saved-cards.md +65 -36
- package/dist/docs/select.md +3 -4
- package/dist/docs/shipping-address.md +57 -21
- package/dist/docs/shipping-simulator.md +53 -15
- package/dist/docs/sign-in-disclosure.md +176 -0
- package/dist/docs/sign-in-form.md +78 -47
- package/dist/docs/sign-in-redirect.md +5 -3
- package/dist/docs/sign-in.md +173 -0
- package/dist/docs/toast.md +45 -16
- package/dist/docs/variant-selector.md +15 -11
- package/dist/graphql/types.d.ts +4 -14
- package/dist/index.d.ts +3 -2
- package/dist/internal/client.d.ts +4 -3
- package/dist/internal/client.js +5 -2
- package/dist/internal/server.d.ts +10 -5
- package/dist/internal/server.js +9 -4
- package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
- package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
- package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
- package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
- package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
- package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
- package/dist/matter/account-address-book/account-address-book.js +74 -33
- package/dist/matter/account-address-book/account-address-book.js.map +1 -1
- package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
- package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
- package/dist/matter/account-address-book/account-address-country.js +83 -49
- package/dist/matter/account-address-book/account-address-country.js.map +1 -1
- package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
- package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
- package/dist/matter/account-address-book/account-address-form.js +518 -155
- package/dist/matter/account-address-book/account-address-form.js.map +1 -1
- package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
- package/dist/matter/account-address-book/account-address-record.js +32 -17
- package/dist/matter/account-address-book/account-address-record.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +34 -17
- package/dist/matter/account-menu/account-menu.js +46 -54
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
- package/dist/matter/account-saved-cards/account-saved-cards.d.ts +463 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js +1011 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
- package/dist/matter/billing-address/billing-address.d.ts +156 -74
- package/dist/matter/billing-address/billing-address.js +227 -156
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
- package/dist/matter/breadcrumb/breadcrumb.js +24 -9
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/buy-button/buy-button.d.ts +8 -11
- package/dist/matter/buy-button/buy-button.js +10 -19
- package/dist/matter/buy-button/buy-button.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +12 -4
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +123 -32
- package/dist/matter/card-entry/card-entry.js +348 -221
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cart/cart-namespace.d.ts +11 -1
- package/dist/matter/cart/cart-namespace.js +11 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +416 -45
- package/dist/matter/cart/cart.js +782 -101
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +233 -0
- package/dist/matter/cart-destination/cart-destination.js +703 -0
- package/dist/matter/cart-destination/cart-destination.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +145 -16
- package/dist/matter/cart-item/cart-item.js +230 -54
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
- package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
- package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
- package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
- package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
- package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
- package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
- package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
- package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
- package/dist/matter/cart-totalizer/cart-totalizer.js +49 -19
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
- package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
- package/dist/matter/challenge-return/challenge-return.js +241 -0
- package/dist/matter/challenge-return/challenge-return.js.map +1 -0
- package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
- package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
- package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
- package/dist/matter/client-preferences/client-preferences.js +84 -15
- package/dist/matter/client-preferences/client-preferences.js.map +1 -1
- package/dist/matter/client-profile/client-profile.d.ts +44 -9
- package/dist/matter/client-profile/client-profile.js +64 -24
- package/dist/matter/client-profile/client-profile.js.map +1 -1
- package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
- package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
- package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
- package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
- package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
- package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
- package/dist/matter/delivery-options/delivery-options.js +75 -12
- package/dist/matter/delivery-options/delivery-options.js.map +1 -1
- package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
- package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
- package/dist/matter/email-identification/email-identification.d.ts +25 -3
- package/dist/matter/email-identification/email-identification.js +49 -12
- package/dist/matter/email-identification/email-identification.js.map +1 -1
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +85 -10
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +153 -53
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
- package/dist/matter/identity-edit/identity-edit.js +47 -19
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
- package/dist/matter/identity-summary/identity-summary.js +95 -45
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/installments/installments-select.d.ts +98 -16
- package/dist/matter/installments/installments-select.js +156 -48
- package/dist/matter/installments/installments-select.js.map +1 -1
- package/dist/matter/installments/installments.d.ts +96 -16
- package/dist/matter/installments/installments.js +115 -40
- package/dist/matter/installments/installments.js.map +1 -1
- package/dist/matter/installments/use-installments-selection.d.ts +1 -0
- package/dist/matter/installments/use-installments-selection.js +8 -3
- package/dist/matter/installments/use-installments-selection.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
- package/dist/matter/my-account-profile/my-account-profile.js +370 -174
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
- package/dist/matter/order-cancel/order-cancel.js +118 -51
- package/dist/matter/order-cancel/order-cancel.js.map +1 -1
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
- package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
- package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
- package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
- package/dist/matter/order-details-header/order-details-header.js +66 -58
- package/dist/matter/order-details-header/order-details-header.js.map +1 -1
- package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
- package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
- package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +164 -19
- package/dist/matter/order-list/order-list.js +229 -87
- package/dist/matter/order-list/order-list.js.map +1 -1
- package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
- package/dist/matter/order-list-row/order-list-row.js +3 -2
- package/dist/matter/order-list-row/order-list-row.js.map +1 -1
- package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
- package/dist/matter/order-list-search/order-list-search.js +30 -69
- package/dist/matter/order-list-search/order-list-search.js.map +1 -1
- package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
- package/dist/matter/order-list-views/order-list-views.js +22 -68
- package/dist/matter/order-list-views/order-list-views.js.map +1 -1
- package/dist/matter/order-payment/order-payment.d.ts +33 -10
- package/dist/matter/order-payment/order-payment.js +44 -39
- package/dist/matter/order-payment/order-payment.js.map +1 -1
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
- package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
- package/dist/matter/order-placed/order-placed.d.ts +198 -31
- package/dist/matter/order-placed/order-placed.js +230 -139
- package/dist/matter/order-placed/order-placed.js.map +1 -1
- package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
- package/dist/matter/order-placed-date/order-placed-date.js +7 -8
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +19 -8
- package/dist/matter/order-progress/order-progress.js +37 -45
- package/dist/matter/order-progress/order-progress.js.map +1 -1
- package/dist/matter/order-summary/order-summary.d.ts +19 -9
- package/dist/matter/order-summary/order-summary.js +38 -44
- package/dist/matter/order-summary/order-summary.js.map +1 -1
- package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
- package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
- package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +17 -10
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.d.ts +4 -2
- package/dist/matter/payment/payment-controller.js +30 -9
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +1 -1
- package/dist/matter/payment/payment.d.ts +69 -19
- package/dist/matter/payment/payment.js +101 -35
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
- package/dist/matter/payment/use-payment-method-selection.js +94 -32
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
- package/dist/matter/payment/use-payment-submit-gate.js +47 -8
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +171 -57
- package/dist/matter/place-order/place-order.js +376 -185
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.d.ts +152 -13
- package/dist/matter/pricing/pricing.js +153 -52
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-information/product-information.d.ts +27 -4
- package/dist/matter/product-information/product-information.js +32 -15
- package/dist/matter/product-information/product-information.js.map +1 -1
- package/dist/matter/product-list/product-list.d.ts +24 -6
- package/dist/matter/product-list/product-list.js +32 -26
- package/dist/matter/product-list/product-list.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +8 -3
- package/dist/matter/product-shelf/product-shelf.js +111 -10
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/region/region.d.ts +33 -16
- package/dist/matter/region/region.js +59 -52
- package/dist/matter/region/region.js.map +1 -1
- package/dist/matter/save-card/save-card.d.ts +43 -8
- package/dist/matter/save-card/save-card.js +61 -23
- package/dist/matter/save-card/save-card.js.map +1 -1
- package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
- package/dist/matter/saved-cards/saved-cards.js +349 -77
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/shipping-address/address-payload.js +25 -0
- package/dist/matter/shipping-address/address-payload.js.map +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +71 -71
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
- package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
- package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
- package/dist/matter/shipping-address/shipping-address.js +443 -188
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +251 -25
- package/dist/matter/shipping-simulator/shipping-simulator.js +261 -51
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in/sign-in.d.ts +108 -0
- package/dist/matter/sign-in/sign-in.js +285 -0
- package/dist/matter/sign-in/sign-in.js.map +1 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
- package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
- package/dist/matter/sign-in-form/sign-in-form.js +134 -144
- package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
- package/dist/particles/binding-switcher/binding-switcher.d.ts +59 -0
- package/dist/particles/binding-switcher/binding-switcher.js +194 -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 +113 -0
- package/dist/particles/card-summary/card-summary.js +221 -0
- package/dist/particles/card-summary/card-summary.js.map +1 -0
- package/dist/particles/carousel/carousel.d.ts +99 -11
- package/dist/particles/carousel/carousel.js +103 -35
- package/dist/particles/carousel/carousel.js.map +1 -1
- package/dist/particles/copy-text/copy-text.js +5 -15
- package/dist/particles/copy-text/copy-text.js.map +1 -1
- package/dist/particles/dialog/dialog.d.ts +14 -6
- package/dist/particles/dialog/dialog.js +6 -3
- package/dist/particles/dialog/dialog.js.map +1 -1
- package/dist/particles/drawer/drawer.js +1 -1
- package/dist/particles/drawer/drawer.js.map +1 -1
- package/dist/particles/email-field/email-field.d.ts +2 -1
- package/dist/particles/email-field/email-field.js +2 -1
- package/dist/particles/email-field/email-field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.js +1 -0
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
- package/dist/particles/footer-social/footer-social.d.ts +1 -1
- package/dist/particles/footer-social/footer-social.js +1 -1
- package/dist/particles/footer-social/footer-social.js.map +1 -1
- package/dist/particles/form/form.d.ts +85 -13
- package/dist/particles/form/form.js +91 -42
- package/dist/particles/form/form.js.map +1 -1
- package/dist/particles/gallery/gallery.d.ts +129 -12
- package/dist/particles/gallery/gallery.js +121 -34
- package/dist/particles/gallery/gallery.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/order-details-back/order-details-back.d.ts +5 -3
- package/dist/particles/order-details-back/order-details-back.js +8 -10
- package/dist/particles/order-details-back/order-details-back.js.map +1 -1
- package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
- package/dist/particles/order-status-badge/order-status-badge.js +4 -20
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
- package/dist/particles/password-field/password-field.d.ts +1 -1
- package/dist/particles/password-field/password-field.js +2 -4
- package/dist/particles/password-field/password-field.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/phone-field/phone-field.d.ts +4 -4
- package/dist/particles/phone-field/phone-field.js +8 -11
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/spinner/spinner.d.ts +24 -4
- package/dist/particles/spinner/spinner.js +25 -9
- package/dist/particles/spinner/spinner.js.map +1 -1
- package/dist/particles/switch/switch.d.ts +4 -1
- package/dist/particles/switch/switch.js +3 -1
- package/dist/particles/switch/switch.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +49 -9
- package/dist/particles/toast/toast.js +81 -15
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +461 -89
- 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/address/address-fields.js +4 -4
- package/dist/sdk/address/address-fields.js.map +1 -1
- package/dist/sdk/address/constants.js +1 -6
- package/dist/sdk/address/constants.js.map +1 -1
- package/dist/sdk/address/messages.js +44 -44
- package/dist/sdk/address/messages.js.map +1 -1
- package/dist/sdk/address/postal-code.js +15 -2
- package/dist/sdk/address/postal-code.js.map +1 -1
- package/dist/sdk/address/types.d.ts +5 -3
- package/dist/sdk/address/validate-address.js +3 -3
- package/dist/sdk/address/validate-address.js.map +1 -1
- package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
- package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
- 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/data/index.js +2 -2
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/generated/gql.js +16 -12
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +197 -51
- package/dist/sdk/generated/graphql.js +2318 -91
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/format-error-code.js +23 -0
- package/dist/sdk/i18n/format-error-code.js.map +1 -0
- package/dist/sdk/i18n/message-formatter.d.ts +22 -0
- package/dist/sdk/i18n/message-formatter.js +140 -0
- package/dist/sdk/i18n/message-formatter.js.map +1 -0
- package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
- package/dist/sdk/i18n/use-message-formatter.js +18 -0
- package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
- package/dist/sdk/identity/use-identity-actions.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/navigation/redirect.d.ts +2 -0
- package/dist/sdk/navigation/redirect.js +19 -1
- package/dist/sdk/navigation/redirect.js.map +1 -1
- package/dist/sdk/navigation/types.d.ts +13 -0
- package/dist/sdk/payment/bin-format.js +20 -0
- package/dist/sdk/payment/bin-format.js.map +1 -0
- package/dist/sdk/payment/challenge-return.js +37 -0
- package/dist/sdk/payment/challenge-return.js.map +1 -0
- package/dist/sdk/payment/confirmation-last-four.js +39 -0
- package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
- package/dist/sdk/payment/gateway.d.ts +1 -1
- package/dist/sdk/payment/gateway.js +8 -2
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.d.ts +1 -0
- package/dist/sdk/payment/operations.js +28 -6
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
- package/dist/sdk/payment/resumed-purchase.js +119 -0
- package/dist/sdk/payment/resumed-purchase.js.map +1 -0
- package/dist/sdk/payment/security-code-mask.js +16 -23
- package/dist/sdk/payment/security-code-mask.js.map +1 -1
- package/dist/sdk/payment/submission-registry.js +6 -2
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
- package/dist/sdk/payment/use-payment-actions.js +23 -3
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +10 -2
- package/dist/sdk/payment/use-place-order.js +138 -76
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/provider/storefront-provider.d.ts +1 -7
- package/dist/sdk/provider/storefront-provider.js +4 -11
- package/dist/sdk/provider/storefront-provider.js.map +1 -1
- package/dist/sdk/saved-cards/operations.d.ts +16 -0
- package/dist/sdk/saved-cards/operations.js +41 -0
- package/dist/sdk/saved-cards/operations.js.map +1 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
- package/dist/sdk/seo/entity-landing.d.ts +24 -0
- package/dist/sdk/seo/entity-landing.js +30 -0
- package/dist/sdk/seo/entity-landing.js.map +1 -0
- package/dist/sdk/seo/page-alternates.d.ts +8 -5
- package/dist/sdk/seo/page-alternates.js +11 -14
- package/dist/sdk/seo/page-alternates.js.map +1 -1
- package/dist/sdk/seo/search-landing.d.ts +42 -0
- package/dist/sdk/seo/search-landing.js +85 -0
- package/dist/sdk/seo/search-landing.js.map +1 -0
- package/dist/sdk/session/mock-session.d.ts +9 -0
- package/dist/sdk/session/mock-session.js +31 -0
- package/dist/sdk/session/mock-session.js.map +1 -0
- package/dist/sdk/session/read-server-session.d.ts +3 -0
- package/dist/sdk/session/read-server-session.js +5 -0
- package/dist/sdk/session/read-server-session.js.map +1 -1
- package/dist/sdk/session/return-path-segment.d.ts +10 -0
- package/dist/sdk/session/return-path-segment.js +15 -0
- package/dist/sdk/session/return-path-segment.js.map +1 -0
- package/dist/sdk/session/use-session-actions.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/shipping/use-cart-shipping-simulation.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
- package/dist/sdk/state/cart.d.ts +9 -2
- package/dist/sdk/state/cart.js +9 -2
- package/dist/sdk/state/cart.js.map +1 -1
- package/dist/utils/safe-href.d.ts +2 -0
- package/package.json +4 -3
- package/skills/storefront-asset/SKILL.md +2 -2
- package/skills/storefront-asset/references/api-side.md +27 -14
- package/skills/storefront-asset/references/findings.md +5 -2
- package/src/styles/tailwind.css +9 -2
- package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
- package/dist/message-locales.json +0 -7
- package/dist/sdk/i18n/client.d.ts +0 -4
- package/dist/sdk/i18n/client.js +0 -4
- package/dist/sdk/i18n/locales.d.ts +0 -8
- package/dist/sdk/i18n/locales.js +0 -57
- package/dist/sdk/i18n/locales.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.js +0 -164
- package/dist/sdk/i18n/messages/en-US.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.json +0 -159
- package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -163
- package/dist/sdk/i18n/messages/es-ES.js +0 -164
- package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
- package/dist/sdk/i18n/messages/es-ES.json +0 -159
- package/dist/sdk/i18n/messages/pt-BR.js +0 -164
- package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
- package/dist/sdk/i18n/messages/pt-BR.json +0 -159
- package/dist/sdk/i18n/provider.d.ts +0 -1
- package/dist/sdk/i18n/provider.js +0 -30
- package/dist/sdk/i18n/provider.js.map +0 -1
- package/dist/sdk/i18n/server.d.ts +0 -28
- package/dist/sdk/i18n/server.js +0 -59
- package/dist/sdk/i18n/server.js.map +0 -1
- package/dist/utils/resolve-authored-copy.js +0 -18
- package/dist/utils/resolve-authored-copy.js.map +0 -1
- package/dist/utils/substitute-template.js +0 -33
- package/dist/utils/substitute-template.js.map +0 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
# AccessCodeSignIn (Root +
|
|
1
|
+
# AccessCodeSignIn (Root + Request + SentNotice + Validate + Resend + CorrectEmail)
|
|
2
2
|
|
|
3
3
|
**Category:** identity
|
|
4
|
-
**Purpose:**
|
|
4
|
+
**Purpose:** The access-code (passwordless) method of the sign-in surface. It sits under `SignInRoot`, which reads the account's enabled methods once and owns the one email draft every method shares; `SignInEmailControl` is the email field. `AccessCodeSignInRoot` owns only the request/validate stepper, the `authenticationToken`, the address the code was requested for and the resend deadline. It renders nothing until the account configuration has arrived, when the account disables the access code, while another sign-in method is the active one, and once the shopper is `loggedIn`. `AccessCodeRequestControl` sends the code to the shared draft; `AccessCodeValidateControl` collects the code and validates it against the address it was requested for. While the shopper waits, `AccessCodeSentNotice` names that address, `AccessCodeResendControl` asks for another code once a visible interval has passed and `AccessCodeCorrectEmailControl` takes the shopper back to correct a mistyped address. A successful validate flips `useSession()` to `loggedIn` (and the server persists the validated email onto the cart's profile as a side effect), which makes the whole Root disappear on its own.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Visual cues (how to identify in an image)
|
|
9
9
|
|
|
10
|
-
- An **email input + "send a sign-in code" button**, usable with no prior identification step — this is `
|
|
10
|
+
- An **email input + "send a sign-in code" button**, usable with no prior identification step — this is `SignInEmailControl` (the shared email field) over `AccessCodeRequestControl`.
|
|
11
11
|
- A **one-time-code input + submit button** shown right after activating the send-code button — this is `AccessCodeValidateControl` composing `AccessCodeField`.
|
|
12
|
+
- A **line naming the e-mail address the code went to** above or beside the code input — `AccessCodeSentNotice`.
|
|
13
|
+
- Below the code input, a secondary **"resend" button that is inert and counts down in its own label** ("send again in 42s") until it releases, and a second secondary **"use a different e-mail" button** — `AccessCodeResendControl` and `AccessCodeCorrectEmailControl`. Neither is a primary action.
|
|
12
14
|
- Lives inside the checkout User Identity step as an optional method — never a step the shopper must complete to continue as a guest.
|
|
13
15
|
- No third "blocked" or "rate limited" full-screen error state: those outcomes appear as small inline text under the button/field instead.
|
|
14
16
|
|
|
@@ -19,13 +21,14 @@ Use `AccessCodeSignIn.*` whenever the image shows a passwordless "email me a cod
|
|
|
19
21
|
## When to use
|
|
20
22
|
|
|
21
23
|
- The access-code (passwordless) sign-in method in the checkout User Identity step, for a shopper at any session state short of `loggedIn` — including fully `anonymous`, with no prior email identification.
|
|
22
|
-
- Alongside the password `SignInForm
|
|
24
|
+
- Alongside the password `SignInForm`, as one of the sign-in methods composed under the same `SignInRoot`: both share one email field, and this family shows only while the access code is the method showing.
|
|
23
25
|
|
|
24
26
|
## When NOT to use
|
|
25
27
|
|
|
26
|
-
- A blocking, must-complete-to-continue login gate → this flow is always optional; it
|
|
27
|
-
- Persisting the draft email as profile data on its own → `
|
|
28
|
-
- Composing "sign in with a password instead"
|
|
28
|
+
- A blocking, must-complete-to-continue login gate → this flow is always optional; it hides itself when the account disables the method and never blocks guest checkout.
|
|
29
|
+
- Persisting the draft email as profile data on its own → `SignInEmailControl` never writes to the cart; only a successful `validateAccessCode` does, server-side, as a side effect of authentication. Don't pair it with `EmailIdentificationControl` for the same field — that control's blur-triggered `clientProfileUpdate` is a different, cart-writing identification path.
|
|
30
|
+
- Composing "sign in with a password instead" switch affordances → those are `SignInMethodSwitch` and `SignInMethodOption`, which live in the `sign-in` family, not this one.
|
|
31
|
+
- Rendering outside a `SignInRoot` → every part of this family throws; there is no standalone use.
|
|
29
32
|
|
|
30
33
|
---
|
|
31
34
|
|
|
@@ -33,18 +36,24 @@ Use `AccessCodeSignIn.*` whenever the image shows a passwordless "email me a cod
|
|
|
33
36
|
|
|
34
37
|
```
|
|
35
38
|
SessionRoot (provides the session tri-state; required ancestor)
|
|
36
|
-
└──
|
|
37
|
-
├──
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
├──
|
|
42
|
-
|
|
39
|
+
└── SignInRoot (reads the account once; owns the shared email draft and the active method; required ancestor)
|
|
40
|
+
├── SignInEmailControl (the one email field, for every method)
|
|
41
|
+
└── AccessCodeSignInRoot (data-fs-access-code-sign-in-root; renders while the access code is the active method; owns step + authenticationToken + requested address)
|
|
42
|
+
├── AccessCodeRequestControl (visible only in step 'request')
|
|
43
|
+
│ └── (button) (dispatches $actions.session.requestAccessCode with the shared draft)
|
|
44
|
+
├── AccessCodeSentNotice (visible only in step 'validate'; role="status"; names the pinned address)
|
|
45
|
+
├── AccessCodeValidateControl (visible only in step 'validate')
|
|
46
|
+
│ ├── AccessCodeField (the code input; value/invalid/errorMessage bound)
|
|
47
|
+
│ └── (submit button) (dispatches $actions.session.validateAccessCode)
|
|
48
|
+
├── AccessCodeResendControl (visible only in step 'validate'; paced by the Root's deadline)
|
|
49
|
+
│ └── (button) (dispatches $actions.session.requestAccessCode with the pinned address)
|
|
50
|
+
└── AccessCodeCorrectEmailControl (visible only in step 'validate')
|
|
51
|
+
└── (button) (calls the Root's resetToRequest())
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
Every part of this family **must** be a descendant of `SignInRoot`, which itself needs a `SessionRoot` ancestor — each throws `useSignIn() must be used inside a <SignInRoot> subtree.` otherwise. The five children also **must** be descendants of `AccessCodeSignInRoot` and throw a descriptive error otherwise (runtime-only guards, not compiler-checked; the compiler checks the `sign-in` ancestry of the Root).
|
|
46
55
|
|
|
47
|
-
`
|
|
56
|
+
`SignInEmailControl` sits **above** `AccessCodeSignInRoot`, as its sibling, so the email stays anchored while the method below it swaps. It is not required by the compiler, but a page that omits it has no email input anywhere and the request control stays disabled (an empty draft never passes its valid-email gate), except for an identified shopper whose `clientProfile.email` seeds the draft. The other methods compose beside this Root under the same `SignInRoot`; see [[sign-in]].
|
|
48
57
|
|
|
49
58
|
---
|
|
50
59
|
|
|
@@ -52,37 +61,79 @@ SessionRoot (provides the session tri-state; requir
|
|
|
52
61
|
|
|
53
62
|
### `AccessCodeSignInRoot`
|
|
54
63
|
|
|
64
|
+
Takes the props of a `div` and no others. It declares no fragment, no `fetchStrategy` and no `$data`; `requiresContext` is `'sign-in'`.
|
|
65
|
+
|
|
66
|
+
**Gate:** renders its children whenever **all** hold: `useSession().state !== 'loggedIn'`, and, from `useSignIn()`, `resolved`, `accessCodeEnabled` and `method === 'accessCode'`. The three `sign-in` reads are the account's own configuration, so this family never reads `sessionAuthProviders` itself. Until the configuration has arrived, with the access code disabled, while another method is active, and once `loggedIn`, it renders nothing — it returns `null` rather than unmounting, so the stepper survives all of those.
|
|
67
|
+
|
|
68
|
+
### `AccessCodeRequestControl`
|
|
69
|
+
|
|
55
70
|
| Prop | Type | Default | Notes |
|
|
56
71
|
|------|------|---------|-------|
|
|
57
|
-
|
|
|
72
|
+
| `label` | string | — | Send-code button label. |
|
|
73
|
+
| `pendingLabel` | string | — | Label while the request is in flight; a blank one falls back to `label`. |
|
|
74
|
+
| `onRequested` | `(authenticationToken: string) => void` | — | Fires after a successful request, alongside the Root's own step advance. |
|
|
75
|
+
| `$content` | `ContentValue<typeof AccessCodeRequestControlContent>` | — | The inline message for each refusal of the send. |
|
|
76
|
+
| `$actions` | injected | — | Carries `session.requestAccessCode` (compiler-injected, narrowed to that one method). |
|
|
58
77
|
|
|
59
|
-
|
|
78
|
+
Content type `access-code-request-control`, keyed on the refusal's `code`:
|
|
60
79
|
|
|
61
|
-
|
|
80
|
+
| Content field | Codes | Source (en) |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| sendLimitMessage | `ACCESS_CODE_SEND_LIMIT` | Too many codes requested. Try again later. |
|
|
83
|
+
| blockedMessage | `BLOCKED` (names no duration: the account service returns none) | This account is blocked. Contact support. |
|
|
84
|
+
| networkErrorMessage | `NETWORK_ERROR`, `MISSING_AUTH_CONTEXT`, and the codes the send never returns (`INVALID_CREDENTIALS`, `INVALID_ACCESS_CODE`) | Something went wrong. Please try again. |
|
|
62
85
|
|
|
63
|
-
|
|
86
|
+
A code none of these fields words (one a newer server added) shows `networkErrorMessage` and logs `message.unknown-code`. A blank field renders an empty alert and logs `message.missing`, never the server's text.
|
|
87
|
+
|
|
88
|
+
The button is disabled until the shared draft email (`SignInRoot`'s, typed into `SignInEmailControl`) is a valid, non-empty address (checked with the same rule `EmailIdentificationControl` uses) — never a blocking error state, just an inert affordance.
|
|
89
|
+
|
|
90
|
+
### `AccessCodeSentNotice`
|
|
64
91
|
|
|
65
92
|
| Prop | Type | Default | Notes |
|
|
66
93
|
|------|------|---------|-------|
|
|
67
|
-
| `
|
|
68
|
-
| `placeholder` | string | — | Passed to `EmailField`. |
|
|
69
|
-
| `invalidEmailMessage` | string | — | `EmailField`'s inline error text; format validation itself is `EmailField`'s own blur-triggered check, never per-keystroke. |
|
|
94
|
+
| `$content` | `ContentValue<typeof AccessCodeSentNoticeContent>` | — | Its `template` message is the confirmation sentence. |
|
|
70
95
|
|
|
71
|
-
|
|
96
|
+
Content type `access-code-sent-notice`:
|
|
72
97
|
|
|
73
|
-
|
|
98
|
+
| Content field | Arguments | Source (en) |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| template | `email` (string): the address the code was sent to | We sent an access code to {email}. |
|
|
101
|
+
|
|
102
|
+
An unauthored `template` renders empty and logs `message.missing`.
|
|
103
|
+
|
|
104
|
+
Renders only at the validate step, as `<div role="status">`, so the confirmation is announced once. It names the Root's **pinned** address, not the live draft: editing the shared email field afterwards does not change it. Takes the props of a `div` as well.
|
|
105
|
+
|
|
106
|
+
### `AccessCodeResendControl`
|
|
74
107
|
|
|
75
108
|
| Prop | Type | Default | Notes |
|
|
76
109
|
|------|------|---------|-------|
|
|
77
|
-
| `label` | string | — |
|
|
78
|
-
| `pendingLabel` | string | — | Label while the
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `networkErrorMessage` | string | — | Inline message for the synthetic `NETWORK_ERROR`. |
|
|
82
|
-
| `onRequested` | `(authenticationToken: string) => void` | — | Fires after a successful request, alongside the Root's own step advance. |
|
|
110
|
+
| `label` | string | — | Button label once the pace has elapsed. |
|
|
111
|
+
| `pendingLabel` | string | — | Label while the resend is in flight; falls back to `label`. |
|
|
112
|
+
| `onResent` | `(authenticationToken: string) => void` | — | Fires after a successful resend, alongside the Root's own token replacement. |
|
|
113
|
+
| `$content` | `ContentValue<typeof AccessCodeResendContent>` | — | Its `countdownTemplate` message is the button label while the pace has not elapsed; the other fields word each refusal of the send. |
|
|
83
114
|
| `$actions` | injected | — | Carries `session.requestAccessCode` (compiler-injected, narrowed to that one method). |
|
|
84
115
|
|
|
85
|
-
|
|
116
|
+
Content type `access-code-resend`:
|
|
117
|
+
|
|
118
|
+
| Content field | Arguments | Source (en) |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| countdownTemplate | `seconds` (integer): the whole seconds left | Resend code in {seconds}s |
|
|
121
|
+
| sendLimitMessage | — | Too many codes requested. Try again later. |
|
|
122
|
+
| blockedMessage | — | This account is blocked. Contact support. |
|
|
123
|
+
| networkErrorMessage | — | Something went wrong. Please try again. |
|
|
124
|
+
|
|
125
|
+
The three error fields word the same codes as `AccessCodeRequestControl`'s, with the same unknown-code and blank-field behavior. An unauthored `countdownTemplate` renders an empty label and logs `message.missing`.
|
|
126
|
+
|
|
127
|
+
Renders only at the validate step. There is no interval prop: the pace is the module constant `ACCESS_CODE_RESEND_INTERVAL_SECONDS` (60), because a CMS edit could set it to zero. Takes the props of a `div` as well.
|
|
128
|
+
|
|
129
|
+
### `AccessCodeCorrectEmailControl`
|
|
130
|
+
|
|
131
|
+
| Prop | Type | Default | Notes |
|
|
132
|
+
|------|------|---------|-------|
|
|
133
|
+
| `label` | string | — | Button label. |
|
|
134
|
+
| `onCorrected` | `() => void` | — | Fires after the earlier request has been discarded. |
|
|
135
|
+
|
|
136
|
+
Renders only at the validate step. Takes the props of a `div` as well.
|
|
86
137
|
|
|
87
138
|
### `AccessCodeValidateControl`
|
|
88
139
|
|
|
@@ -92,24 +143,38 @@ The button is disabled until the Root's draft email is a valid, non-empty addres
|
|
|
92
143
|
| `placeholder` | string | — | Passed to `AccessCodeField`. |
|
|
93
144
|
| `submitLabel` | string | — | Submit button label. |
|
|
94
145
|
| `codeLength` | number | `6` | Disables submit below this length and caps the field maxLength — a UX gate, never a validity claim. |
|
|
95
|
-
| `invalidCodeMessage` | string | — | Inline message for `INVALID_ACCESS_CODE`. |
|
|
96
|
-
| `blockedMessage` | string | — | Inline message for `BLOCKED`. |
|
|
97
|
-
| `missingAuthContextMessage` | string | — | Inline message for `MISSING_AUTH_CONTEXT` (should not occur on a correct flow). |
|
|
98
|
-
| `networkErrorMessage` | string | — | Inline message for the synthetic `NETWORK_ERROR`. |
|
|
99
146
|
| `onValidated` | `() => void` | — | Fires after a successful validate. No local "success" UI is needed — the session flip hides the Root. |
|
|
147
|
+
| `$content` | `ContentValue<typeof AccessCodeValidateControlContent>` | — | The field's message for each refusal of the code. |
|
|
100
148
|
| `$actions` | injected | — | Carries `session.validateAccessCode` (compiler-injected, narrowed to that one method). |
|
|
101
149
|
|
|
150
|
+
Content type `access-code-validate-control`, keyed on the refusal's `code`:
|
|
151
|
+
|
|
152
|
+
| Content field | Codes | Source (en) |
|
|
153
|
+
|---|---|---|
|
|
154
|
+
| invalidCodeMessage | `INVALID_ACCESS_CODE` | That code is incorrect or expired. |
|
|
155
|
+
| blockedMessage | `BLOCKED` | This account is blocked. Contact support. |
|
|
156
|
+
| missingAuthContextMessage | `MISSING_AUTH_CONTEXT` (should not occur on a correct flow) | Something went wrong. Please try again. |
|
|
157
|
+
| networkErrorMessage | `NETWORK_ERROR`, and the codes the validate never returns (`INVALID_CREDENTIALS`, `ACCESS_CODE_SEND_LIMIT`) | Something went wrong. Please try again. |
|
|
158
|
+
|
|
159
|
+
An unknown code shows `networkErrorMessage` and logs `message.unknown-code`; a blank field leaves the field invalid with an empty message and logs `message.missing`.
|
|
160
|
+
|
|
102
161
|
---
|
|
103
162
|
|
|
104
163
|
## Behavior
|
|
105
164
|
|
|
106
|
-
- **
|
|
165
|
+
- **The email draft is not this family's:** `SignInRoot` owns it, seeded from `clientProfile.email` until the shopper edits it, and it survives a method change. Editing it dispatches nothing; this family only reads it, at the moment the shopper requests a code.
|
|
166
|
+
- **The requested address is pinned:** `AccessCodeRequestControl` reads the draft into a local before it dispatches, and hands that exact address to the Root together with the token, in one `startValidation(token, requestedEmail)` call. `AccessCodeValidateControl` dispatches with that pinned address and never reads the live draft, because the server rejects a `validateAccessCode` whose email differs from the `requestAccessCode` that issued the token. A shopper edit of the shared field, a profile re-seed of it or a method switch after the request therefore cannot change which address is validated. With a token but no pinned address the submit stays disabled.
|
|
167
|
+
- **The resend pace is armed by a code actually sent:** a successful request and a successful resend each arm a deadline `ACCESS_CODE_RESEND_INTERVAL_SECONDS` (60) seconds away; `AccessCodeResendControl` is disabled until it passes and shows the whole seconds left in its own label. The deadline lives on the Root, not on the control, because the Root returns `null` on a method switch and a control-local countdown would reset with it. The rendered seconds are derived from the deadline, so a throttled background tab cannot make them drift, and the 1-second timer that re-renders them exists only while a deadline is pending. No `aria-live` wraps the countdown: sixty announcements are worse than none. The pace is a courtesy, not a rate limit — the server's `ACCESS_CODE_SEND_LIMIT` is the enforcement, and it renders inline like any other failure. A failed resend sent no code, so it arms nothing.
|
|
168
|
+
- **Resend goes to the pinned address:** `AccessCodeResendControl` dispatches `requestAccessCode` with the Root's `requestedEmail`, never the live draft, and replaces the token through the same `startValidation(token, requestedEmail)`, so the notice, the pin and the new code agree. A resend that resolves after the shopper has gone back (or the session changed) is dropped, not written, so a token is never re-paired with the address that was left. **The same guard has a cost, and it is deliberate:** the resend control compares the token the Root holds against the one it was pressed under, and the control's cleanup clears it when it unmounts. A method switch mid-flight unmounts it, so a resend that was already sent is dropped too: the server has issued and emailed the second token (invalidating the first) while the Root still holds the first. On switching back, a correct code from the second email is dispatched under the first token and rejected as incorrect. It is recoverable (send again once the pace releases) but silent. The guard stays because the alternative re-pins an address the shopper abandoned, which breaks the invariant that a `validateAccessCode` never carries an address other than the one its token was issued for; a refactor that removes the cost must not reintroduce that. The test `drops a resend result when the shopper switches method mid-flight` pins the behaviour.
|
|
169
|
+
- **A request is dropped when the session changed under it:** `AccessCodeRequestControl` does the same for a send still in flight when `useSession().state` changes. The Root has just cleared the stepper for that change, and writing the late result would bind the next shopper on a shared terminal to the address and live token of the one who pressed send. No `onRequested`, no error, no stepper write. A method switch is not a session change, so a request in flight across one still lands, and the shopper finds the code step when they return.
|
|
170
|
+
- **Going back discards four things together:** `AccessCodeCorrectEmailControl` calls the Root's `resetToRequest()`, which resets the step, the `authenticationToken`, the pinned `requestedEmail` and the resend deadline in one transition. A corrected address is therefore a genuinely new request with its own token, and the earlier token can never be submitted against it. The deadline is cleared too, so a shopper who mistyped is not made to wait to send to the address they meant.
|
|
107
171
|
- **Profile persistence happens server-side, on success:** a successful `validateAccessCode` sets the cart's `clientProfileData.email` to the validated email as a side effect of authentication (see the auth module's `completeLoginWithEmail`) — this family itself never calls `clientProfileUpdate`.
|
|
108
172
|
- **No account-existence pre-check:** `AccessCodeRequestControl` dispatches unconditionally once the draft email is valid — no separate lookup call.
|
|
109
|
-
- **Stepper:** the Root owns `step: 'request' | 'validate'` and `
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
173
|
+
- **Stepper:** the Root owns `step: 'request' | 'validate'`, `authenticationToken: string | null` and `requestedEmail: string | null` as local state — the session-action namespace itself holds none of this (a deliberate choice in the FSPG-880 session-actions design). The stepper survives a method round-trip: switching to the password and back returns to the code step the shopper left, not to the request. It clears on **any change** of `useSession().state` (`anonymous`, `identified`, `loggedIn`), through the same `resetToRequest()`, so the next shopper on a shared terminal never sees a code step, an address or a token that are not theirs. The trigger is a transition: a shopper who is already `identified` when they request a code keeps their own token. The session resolving is not a change: while it loads, `state` reads `anonymous` as a default, so the transition out of loading clears nothing, and a code sent in that window survives the arrival of the session it belongs to.
|
|
174
|
+
- **The validate control keeps nothing across the back path:** it stays mounted while the stepper is at the request step, so it drops its typed code and its error message on that transition. A re-request therefore opens an empty field with the submit disabled and no message about the earlier request, and a stale code cannot be spent against the lock-out counter with a single click.
|
|
175
|
+
- **Every failure is inline:** `ACCESS_CODE_SEND_LIMIT` / `BLOCKED` / `NETWORK_ERROR` surface at the request control and, for a resend, at the resend control; `INVALID_ACCESS_CODE` / `BLOCKED` / `MISSING_AUTH_CONTEXT` / `NETWORK_ERROR` surface on the `AccessCodeField` inside the validate control. The step never changes on error — the shopper can retry or abandon the method and continue as a guest.
|
|
176
|
+
- **Success is entirely reactive:** on a successful validate, the mutation's normalized cache write flips `useSession().state` to `loggedIn` with no refetch and no imperative cache write; the Root's own `useSession()` read reacts and hides it.
|
|
177
|
+
- **Pending states:** the request, validate and resend controls expose `data-fs-access-code-request-pending` / `data-fs-access-code-validate-pending` / `data-fs-access-code-resend-pending` while their dispatch is in flight, disabling their interactive elements — mirrors `CartCouponForm`'s `data-fs-cart-coupon-pending`.
|
|
113
178
|
|
|
114
179
|
---
|
|
115
180
|
|
|
@@ -118,40 +183,19 @@ The button is disabled until the Root's draft email is a valid, non-empty addres
|
|
|
118
183
|
```json
|
|
119
184
|
{
|
|
120
185
|
"type": "SessionRoot",
|
|
121
|
-
"children": [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"type": "AccessCodeRequestControl",
|
|
135
|
-
"props": {
|
|
136
|
-
"label": "Send a sign-in code",
|
|
137
|
-
"sendLimitMessage": "Too many codes requested. Try again later.",
|
|
138
|
-
"blockedMessage": "This account is blocked. Contact support.",
|
|
139
|
-
"networkErrorMessage": "Something went wrong. Please try again."
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"type": "AccessCodeValidateControl",
|
|
144
|
-
"props": {
|
|
145
|
-
"label": "Enter the code we sent you",
|
|
146
|
-
"placeholder": "000000",
|
|
147
|
-
"submitLabel": "Sign in",
|
|
148
|
-
"invalidCodeMessage": "That code is incorrect or expired.",
|
|
149
|
-
"networkErrorMessage": "Something went wrong. Please try again."
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
]
|
|
186
|
+
"children": [{
|
|
187
|
+
"type": "SignInRoot",
|
|
188
|
+
"children": [
|
|
189
|
+
{ "type": "SignInEmailControl", "props": { "label": "Email", "placeholder": "you@example.com" } },
|
|
190
|
+
{ "type": "AccessCodeSignInRoot", "children": [
|
|
191
|
+
{ "type": "AccessCodeRequestControl", "props": { "label": "Send a sign-in code" } },
|
|
192
|
+
{ "type": "AccessCodeSentNotice", "props": { "template": "We sent a code to {email}" } },
|
|
193
|
+
{ "type": "AccessCodeValidateControl", "props": { "label": "Enter the code we sent you", "submitLabel": "Sign in" } },
|
|
194
|
+
{ "type": "AccessCodeResendControl", "props": { "label": "Send another code", "countdownTemplate": "Send another code in {seconds}s" } },
|
|
195
|
+
{ "type": "AccessCodeCorrectEmailControl", "props": { "label": "Use a different e-mail" } }
|
|
196
|
+
]}
|
|
197
|
+
]
|
|
198
|
+
}]
|
|
155
199
|
}
|
|
156
200
|
```
|
|
157
201
|
|
|
@@ -159,10 +203,14 @@ The button is disabled until the Root's draft email is a valid, non-empty addres
|
|
|
159
203
|
|
|
160
204
|
## Common mistakes
|
|
161
205
|
|
|
162
|
-
- **Rendering the controls outside `AccessCodeSignInRoot`.**
|
|
163
|
-
- **Persisting the draft email yourself, or pairing this with `EmailIdentificationControl` for the same field.** `
|
|
206
|
+
- **Rendering the controls outside `AccessCodeSignInRoot`, or any part outside `SignInRoot`.** Each throws a descriptive error immediately.
|
|
207
|
+
- **Persisting the draft email yourself, or pairing this with `EmailIdentificationControl` for the same field.** `SignInEmailControl` never writes to the cart; the server sets the profile email on a successful validate, not before.
|
|
208
|
+
- **Composing a second email field for this method.** The one `SignInEmailControl` serves every method; this family has no email control of its own.
|
|
164
209
|
- **Adding a blocking error screen for send-limit/blocked outcomes.** Every failure is inline at the control that produced it — there is no third "error" step.
|
|
165
210
|
- **Manually unmounting or resetting the flow after login.** The Root's own `useSession()` read is what hides it; no explicit call is needed.
|
|
211
|
+
- **Pacing the first send.** The pace starts once a code has been sent and never holds the request control, so a shopper who mistyped is not stuck waiting. Do not add a delay to `AccessCodeRequestControl` or to the back path.
|
|
212
|
+
- **Authoring the interval, or promising a time.** The interval is not a prop, and the `blockedMessage` message must not state when access returns: the account service reports a blocked account with no duration.
|
|
213
|
+
- **Reading the live draft for the confirmation or the resend.** Both use the pinned address; the draft can move after the request.
|
|
166
214
|
- **Persisting or logging the `authenticationToken` or the entered code.** Both flow through mutation variables only.
|
|
167
215
|
|
|
168
216
|
---
|
|
@@ -170,5 +218,6 @@ The button is disabled until the Root's draft email is a valid, non-empty addres
|
|
|
170
218
|
## Related
|
|
171
219
|
|
|
172
220
|
- [[access-code-field]] — the presentational one-time-code particle this family composes.
|
|
221
|
+
- [[sign-in]] — the required `SignInRoot` ancestor: the one account-configuration read, the shared email draft and the active method this family gates on.
|
|
173
222
|
- [[session]] — provides the identification tri-state and the required `SessionRoot` ancestor; also what makes the Root disappear post-login.
|
|
174
223
|
- [[email-identification]] — a separate, cart-writing identification path (blur-triggered `clientProfileUpdate`); do not compose it for the same email field as this family.
|