@vtex/faststore 0.0.10 → 0.0.12
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 +55 -0
- package/README.md +0 -1
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/actions.json +6 -1
- package/dist/catalog.json +789 -1701
- 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 +63 -57
- package/dist/components.js +60 -54
- package/dist/content-types.json +5785 -754
- package/dist/core/dist/define-component.d.ts +1 -1
- 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-menu.md +14 -15
- package/dist/docs/account-saved-cards.md +44 -39
- 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 +5 -2
- package/dist/docs/buy-button.md +7 -8
- package/dist/docs/card-entry.md +39 -26
- package/dist/docs/card-summary.md +18 -8
- package/dist/docs/cardholder-document.md +5 -3
- package/dist/docs/carousel.md +5 -4
- package/dist/docs/cart-destination.md +39 -26
- package/dist/docs/cart-item.md +29 -14
- package/dist/docs/cart-totalizer.md +7 -5
- package/dist/docs/cart.md +135 -41
- 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/form.md +54 -18
- package/dist/docs/free-shipping-progress.md +6 -5
- package/dist/docs/identity-edit.md +8 -2
- package/dist/docs/identity-summary.md +18 -5
- package/dist/docs/installments.md +46 -32
- 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 +30 -4
- package/dist/docs/payment-methods.md +1 -1
- 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 +13 -9
- package/dist/docs/product-list.md +7 -6
- package/dist/docs/product-shelf.md +0 -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/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 +4 -2
- package/dist/docs/sign-in.md +173 -0
- package/dist/docs/toast.md +15 -4
- package/dist/docs/variant-selector.md +15 -11
- package/dist/domain-logic/dist/checkout/rules.js +33 -0
- package/dist/domain-logic/dist/checkout/rules.js.map +1 -0
- package/dist/graphql/types.d.ts +4 -14
- package/dist/index.d.ts +2 -2
- package/dist/internal/client.d.ts +1 -3
- package/dist/internal/client.js +1 -1
- package/dist/internal/server.d.ts +7 -4
- package/dist/internal/server.js +7 -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 +108 -28
- package/dist/matter/account-saved-cards/account-saved-cards.js +177 -122
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -1
- 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 +7 -1
- package/dist/matter/cart/cart-namespace.js +7 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +402 -61
- package/dist/matter/cart/cart.js +624 -153
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +30 -19
- package/dist/matter/cart-destination/cart-destination.js +160 -70
- package/dist/matter/cart-destination/cart-destination.js.map +1 -1
- package/dist/matter/cart-item/cart-item.d.ts +144 -17
- package/dist/matter/cart-item/cart-item.js +166 -49
- 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 +46 -17
- 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 +79 -7
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +77 -20
- 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 +1 -3
- package/dist/matter/product-shelf/product-shelf.js +2 -15
- 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 +250 -24
- package/dist/matter/shipping-simulator/shipping-simulator.js +257 -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 +29 -8
- package/dist/particles/binding-switcher/binding-switcher.js +37 -26
- package/dist/particles/binding-switcher/binding-switcher.js.map +1 -1
- package/dist/particles/card-summary/card-summary.d.ts +38 -8
- package/dist/particles/card-summary/card-summary.js +55 -22
- package/dist/particles/card-summary/card-summary.js.map +1 -1
- 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/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/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/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 +29 -3
- package/dist/particles/toast/toast.js +34 -10
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +164 -56
- 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/cart/use-cart-actions.js.map +1 -1
- 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 +1 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +20 -5
- package/dist/sdk/generated/graphql.js +6 -0
- 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/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 +21 -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 -4
- 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/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 +3 -2
- package/dist/sdk/seo/page-alternates.js +4 -2
- 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/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/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 +8 -0
- 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 -183
- package/dist/sdk/i18n/messages/en-US.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.json +0 -178
- package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -182
- package/dist/sdk/i18n/messages/es-ES.js +0 -183
- package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
- package/dist/sdk/i18n/messages/es-ES.json +0 -178
- package/dist/sdk/i18n/messages/pt-BR.js +0 -183
- package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
- package/dist/sdk/i18n/messages/pt-BR.json +0 -178
- 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
|
@@ -58,7 +58,7 @@ PaymentSectionRoot (or PaymentSectionController)
|
|
|
58
58
|
|
|
59
59
|
Either component must be a descendant of `PaymentSectionRoot` or `PaymentSectionController` — each reads the shopper's in-progress card draft (`draft.bin`) and the currently selected method from that context. Place it as a **sibling** of `CardEntry` and `SavedCards`, never nested inside either: one instance serves both the new-card and saved-card paths, matched automatically from the same context data.
|
|
60
60
|
|
|
61
|
-
Both
|
|
61
|
+
Both render nothing until the shopper can act on them: for a new card, once the entry passes length, Luhn, expiration and security code (`CardEntry` publishes that verdict as a boolean; the holder name is not part of it); for a saved card, as soon as it is the selection. The new-card verdict is local state on the `payment` context (`draft.entryValid`). It comes from the same validation the blur and place-order checks run, changes only when the verdict changes, sends no request, and resets to false when `CardEntry` unmounts, so a selector does not outlive the form it describes (`card-entry.test.tsx`, `setDraftEntryValid`). Only the boolean crosses to this component; the card values stay in `CardEntry`. Once the data has resolved they also render nothing when no payment method the store offers carries a tier above 1x — a store without installments shows no selector, not a one-row group. The check is store-wide: a card whose own option is 1x-only still sees a one-row group while another method offers more. Before the data resolves, and with the entry valid, they render a loading wrapper. Past those two gates they self-gate to an empty state when nothing matches the current selection. Safe to include speculatively inside any payment section, but for image-to-schema work only include one when the image actually shows a selectable installment control, and pick the variant (list vs. dropdown) the image actually shows.
|
|
62
62
|
|
|
63
63
|
Both render nothing while the card payment is collapsed — the persisted selection is a method that is not a card, or one the section does not serve, and a composed `PaymentMethodList` can bring the card form back (see [[payment]]) — and come back with it. A method's own installment options apply only when it is a card: over a persisted non-card method, card mode included, both read `empty` until a card is recorded, never that method's own tiers.
|
|
64
64
|
|
|
@@ -68,12 +68,15 @@ Both render nothing while the card payment is collapsed — the persisted select
|
|
|
68
68
|
|
|
69
69
|
### Installments
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
No copy props.
|
|
72
|
+
|
|
73
|
+
**Content model** (`installments`):
|
|
74
|
+
|
|
75
|
+
- `installmentTemplate`: ICU message with `count` and `value` (the currency-formatted per-installment value) arguments, matching `PricingInstallment`'s convention.
|
|
76
|
+
- `interestFreeLabel`: appended when the API marks a row `interestFree`.
|
|
77
|
+
- `interestTemplate`: ICU message with a `rate` argument, appended instead of `interestFreeLabel` when the API marks a row not `interestFree`. A row whose rate the order form did not state (`interestRate` and `interestFree` both `null`) gets neither: just the count and the per-installment value. `{rate}` is the order form's `interestRate`, which is in hundredths of a percent, divided by 100 and locale-formatted: `100` renders `1`.
|
|
78
|
+
- `legend`: the radio group's accessible name, rendered as a visible fieldset legend above the rows (T38).
|
|
79
|
+
- `invalidInstallmentMessage`, `missingMethodMessage`, `genericErrorMessage`: the inline alert for a refused pick, keyed on its code. `INVALID_INSTALLMENT_COUNT` reads the first, `MISSING_PAYMENT_METHOD_SELECTION` the second, and `MISSING_CART_CONTEXT`, `CART_NOT_FOUND` and `NETWORK_ERROR` the generic one. A code the package does not know (one a newer server added) also shows `genericErrorMessage` and logs `message.unknown-code`.
|
|
77
80
|
|
|
78
81
|
**Data:** declares its own `fragment InstallmentsData on Query` (selects `Query.payment.installmentOptions` and `Query.payment.selectedInstallment` — the compiler merges it into the page query alongside `PaymentSectionRoot`'s own, smaller `payment` selection; no explicit `dataSources` entry needed). `fetchStrategy: 'reactive'` — the option list updates live from the cache, no refetch.
|
|
79
82
|
|
|
@@ -81,19 +84,20 @@ Both render nothing while the card payment is collapsed — the persisted select
|
|
|
81
84
|
|
|
82
85
|
**The 1x option:** the component renders exactly the tiers the matched option's own data carries. The API guarantees a `count: 1` tier is present in every projected `installmentOptions` entry — passed through untouched (including its interest rate) when upstream supplies one, synthesized from the option's own `value` with no interest when it does not — so a 1x row is always shown and selectable.
|
|
83
86
|
|
|
84
|
-
**Selecting a row** dispatches the installment write action; on
|
|
87
|
+
**Selecting a row** dispatches the installment write action. The mutation returns the cart, and the cart's `total` is the greater of the order form's value and the selected payment's value, so it includes the picked tier's interest; a `CartTotal` on the page reads it from the normalized cache. The rule lives in one place, `mapOrderFormToGqlCart` in the checkout module's `mappers.ts`, so every cart read and every mutation payload agrees, and the cart page shows the interest-inclusive total too. It gives the same answer whether or not upstream already folds interest into the order form's value, and it equals the value the order will be charged at. `installments-total-propagation.test.tsx` proves the path through a real Apollo cache, with an order value that differs from the tier's total. The totalizer lines do not include an interest line, so they may not add up to that total while an interest tier is selected. If the entry turns invalid after a pick, the selector disappears but the pick, and the total that includes its interest, stay until the entry is valid again. On rejection, the first error renders inline, worded from its code.
|
|
85
88
|
|
|
86
89
|
### InstallmentsSelect
|
|
87
90
|
|
|
88
|
-
The collapsed sibling: same tiers, same matching, same write path, same `installmentTemplate`/`interestFreeLabel`/`interestTemplate`
|
|
91
|
+
The collapsed sibling: same tiers, same matching, same write path, same `installmentTemplate`/`interestFreeLabel`/`interestTemplate` messages as `Installments`, and the same formatting locale — the storefront context's, since neither component takes a `locale` prop — only the control itself differs (a Base UI Select instead of a radio group), plus two extra messages for the closed control's own text. No copy props.
|
|
92
|
+
|
|
93
|
+
**Content model** (`installments-select`):
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
| `placeholder` | string | `"Select an installment plan"` | Shown on the closed control when the bound count matches no tier in the currently matched option (a stale selection — see below). As of T31, every copy prop across both `Installments` and `InstallmentsSelect` defaults to en-US, while values and interest rates format in the storefront context's locale, which no prop overrides. A pt-BR store now authors every copy prop explicitly, not just these two. |
|
|
95
|
+
- `installmentTemplate`, `interestFreeLabel`, `interestTemplate`: same as `Installments`.
|
|
96
|
+
- `label`: accessible name for the control, rendered as the particle's own label element. Always renders — there is no mode that hides it; a store that already has its own heading suppresses it visually via its own `data-fs-installments-label` hook.
|
|
97
|
+
- `placeholder`: shown on the closed control when the bound count matches no tier in the currently matched option (a stale selection — see below).
|
|
98
|
+
- `invalidInstallmentMessage`, `missingMethodMessage`, `genericErrorMessage`: same as `Installments`.
|
|
99
|
+
|
|
100
|
+
Every message of both components is read only from `$content`; values and interest rates format in the storefront context's locale. A missing message renders empty and logs `message.missing`.
|
|
97
101
|
|
|
98
102
|
**Data:** declares its own `fragment InstallmentsSelectData on Query`, with a selection set identical to `InstallmentsData` under a distinct name (two registered components on one page must not share a fragment name). Same `fetchStrategy: 'reactive'`.
|
|
99
103
|
|
|
@@ -134,7 +138,13 @@ Collapsed dropdown — same payment section, `InstallmentsSelect` in place of `I
|
|
|
134
138
|
},
|
|
135
139
|
"installments-select": {
|
|
136
140
|
"type": "InstallmentsSelect",
|
|
137
|
-
"props": {
|
|
141
|
+
"props": {
|
|
142
|
+
"installmentTemplate": "{count}x de {value}",
|
|
143
|
+
"interestFreeLabel": "sem juros",
|
|
144
|
+
"interestTemplate": "{rate}% de juros",
|
|
145
|
+
"label": "Parcelamento",
|
|
146
|
+
"placeholder": "Selecione o parcelamento"
|
|
147
|
+
}
|
|
138
148
|
}
|
|
139
149
|
}
|
|
140
150
|
```
|
|
@@ -149,7 +159,7 @@ Collapsed dropdown — same payment section, `InstallmentsSelect` in place of `I
|
|
|
149
159
|
- **Using either component on a PDP.** A PDP's advertised plans are `Pricing`'s `PricingInstallments` / `PricingInstallmentPlans` — different data source, display-only, not reusable here.
|
|
150
160
|
- **Using either component for a read-only recap.** A recap of the already-chosen installment (e.g. Order Review) is not `Installments` or `InstallmentsSelect`; both are selectors.
|
|
151
161
|
- **Placing either component outside a payment section.** Both require a `PaymentSectionRoot`/`PaymentSectionController` ancestor and throw without one.
|
|
152
|
-
- **Expecting a rendered order total.** Neither component ever shows a total — selecting an option
|
|
162
|
+
- **Expecting a rendered order total.** Neither component ever shows a total — selecting an option returns the cart, whose `total` includes the tier's interest, and `CartTotal` reads it from the normalized cache.
|
|
153
163
|
- **Expecting a full card number or CVV field.** Both fragments structurally select neither — only installment counts, values, and interest rates.
|
|
154
164
|
- **Expecting `InstallmentsSelect`'s option list to be styleable from the page's `style` array.** Its popup is portalled to `<body>` — see [Styling](#styling).
|
|
155
165
|
|
|
@@ -165,14 +175,16 @@ Single DOM root wrapping a list of selectable rows.
|
|
|
165
175
|
|---|---|---|
|
|
166
176
|
| `Installments` (root `div`) | Stacks the option rows | `flex flex-col gap-2` |
|
|
167
177
|
| Fieldset (`data-fs-installments-fieldset`, native `<fieldset>`) | Wraps the legend and the radio rows (T38) — gives the group its visible, accessible name | usually left unstyled; a merchant border/padding choice |
|
|
168
|
-
| Legend (`data-fs-fieldset-legend`, native `<legend>`) | The group's visible name, from `legend` | `text-[14px] font-medium text-[
|
|
169
|
-
| Empty state (`data-fs-installments-state="empty"`) | Neutral placeholder sizing | `min-h-12 border border-dashed border-[
|
|
170
|
-
| Loading state (`data-fs-installments-state="loading"`) | Skeleton affordance | `min-h-12 animate-pulse bg-[
|
|
178
|
+
| Legend (`data-fs-fieldset-legend`, native `<legend>`) | The group's visible name, from `legend` | `text-[14px] font-medium text-[var(--color-ink)]` |
|
|
179
|
+
| Empty state (`data-fs-installments-state="empty"`) | Neutral placeholder sizing | `min-h-12 border border-dashed border-[color-mix(in_srgb,var(--color-ink)_20%,transparent)]` |
|
|
180
|
+
| Loading state (`data-fs-installments-state="loading"`) | Skeleton affordance | `min-h-12 animate-pulse bg-[color-mix(in_srgb,var(--color-ink)_8%,transparent)]` |
|
|
171
181
|
| Pending state (`data-fs-installments-state="pending"`) | Rows visible but disabled while the persisted BIN settles | `opacity-50 pointer-events-none` |
|
|
172
|
-
| Inline error (`data-fs-installments-error`) | Warning-toned alert text | `text-[12px] font-medium
|
|
173
|
-
| Option row label (`data-fs-installments-option-label`) | Row text | `text-[14px] text-[
|
|
182
|
+
| Inline error (`data-fs-installments-error`) | Warning-toned alert text | `text-[12px] font-medium` |
|
|
183
|
+
| Option row label (`data-fs-installments-option-label`) | Row text | `text-[14px] text-[var(--color-ink)]` |
|
|
174
184
|
| Placing (`data-fs-installments-placing`) | Present while an order-placement sequence is in flight (T28) — distinct from the `pending` state above, which is this component's own BIN-confirmation wait; the root is also `inert` and `aria-disabled` at that point | `opacity-60 cursor-not-allowed` |
|
|
175
185
|
|
|
186
|
+
A status color is a `visualIdentity` feedback role of the foundation: when the store declares them, color the error row `text-[var(--color-feedback-danger)]`, the success row `text-[var(--color-feedback-success)]` and the notice row `text-[var(--color-feedback-warning)]`, never with a hex.
|
|
187
|
+
|
|
176
188
|
Styled example:
|
|
177
189
|
|
|
178
190
|
```json
|
|
@@ -194,17 +206,19 @@ Root `div` plus a Base UI Select. Only the parts that stay inside the component
|
|
|
194
206
|
|---|---|---|---|
|
|
195
207
|
| `InstallmentsSelect` (root `div`, `data-fs-installments`) | Yes | Positions the label + trigger | `flex flex-col gap-1` |
|
|
196
208
|
| `data-fs-installments-control="select"` | Yes | Discriminates this surface from the radio one when a store styles both from one shared selector | — |
|
|
197
|
-
| Empty / loading state (`data-fs-installments-state`) | Yes | Same neutral/skeleton treatment as `Installments` | `min-h-12 border border-dashed border-[
|
|
209
|
+
| Empty / loading state (`data-fs-installments-state`) | Yes | Same neutral/skeleton treatment as `Installments` | `min-h-12 border border-dashed border-[color-mix(in_srgb,var(--color-ink)_20%,transparent)]` / `min-h-12 animate-pulse bg-[color-mix(in_srgb,var(--color-ink)_8%,transparent)]` |
|
|
198
210
|
| Pending state (`data-fs-installments-state="pending"`) | Yes | Trigger visible but disabled while the persisted BIN settles | `opacity-50 pointer-events-none` |
|
|
199
|
-
| Inline error (`data-fs-installments-error`) | Yes | Warning-toned alert text | `text-[12px] font-medium
|
|
200
|
-
| Label (`data-fs-installments-label`) | Yes | The accessible-name text above the trigger | `text-[12px] text-[
|
|
201
|
-
| Trigger (`data-fs-installments-trigger`) | Yes | The closed control's own box | `flex items-center justify-between border border-[
|
|
202
|
-
| Value (`data-fs-installments-value`) | Yes | The selected label / placeholder text | `text-[14px] text-[
|
|
203
|
-
| Icon (`data-fs-installments-icon`) | Yes | The `▾` glyph | `text-[
|
|
211
|
+
| Inline error (`data-fs-installments-error`) | Yes | Warning-toned alert text | `text-[12px] font-medium` |
|
|
212
|
+
| Label (`data-fs-installments-label`) | Yes | The accessible-name text above the trigger | `text-[12px] text-[color-mix(in_srgb,var(--color-ink)_60%,transparent)]`, or `sr-only` to hide it visually |
|
|
213
|
+
| Trigger (`data-fs-installments-trigger`) | Yes | The closed control's own box | `flex items-center justify-between border border-[color-mix(in_srgb,var(--color-ink)_20%,transparent)] rounded px-3 py-2` |
|
|
214
|
+
| Value (`data-fs-installments-value`) | Yes | The selected label / placeholder text | `text-[14px] text-[var(--color-ink)]` |
|
|
215
|
+
| Icon (`data-fs-installments-icon`) | Yes | The `▾` glyph | `text-[color-mix(in_srgb,var(--color-ink)_60%,transparent)]` |
|
|
204
216
|
| Option (`data-fs-installments-option`) | **No — portalled** | One row inside the open popup | not authorable from this page's `style` array today |
|
|
205
217
|
| Option label (`data-fs-installments-option-label`) | **No — portalled** | An option's text | not authorable from this page's `style` array today |
|
|
206
218
|
| Placing (`data-fs-installments-placing`) | Yes | Present while an order-placement sequence is in flight (T28) — the same hook and presence attribute name `Installments` uses (both surfaces read the shared engine's own `placing`); the root is also `inert` and `aria-disabled` at that point | `opacity-60 cursor-not-allowed` |
|
|
207
219
|
|
|
220
|
+
A status color is a `visualIdentity` feedback role of the foundation: when the store declares them, color the error row `text-[var(--color-feedback-danger)]`, the success row `text-[var(--color-feedback-success)]` and the notice row `text-[var(--color-feedback-warning)]`, never with a hex.
|
|
221
|
+
|
|
208
222
|
Styled example (only the reachable parts):
|
|
209
223
|
|
|
210
224
|
```json
|
|
@@ -223,9 +237,9 @@ The popup's own visual defaults (spacing, hover, the selected-row treatment) com
|
|
|
223
237
|
## Accessibility Contract
|
|
224
238
|
|
|
225
239
|
**What the platform promises:** `Installments`' radio group and `InstallmentsSelect`'s combobox each
|
|
226
|
-
carry a visible, programmatic accessible name (`legend`/`label
|
|
227
|
-
|
|
228
|
-
|
|
240
|
+
carry a visible, programmatic accessible name (the `legend`/`label` messages) — a screen-reader user
|
|
241
|
+
hears what the rows are a choice *between*. A store that leaves either message unauthored ships a
|
|
242
|
+
nameless control, and the formatter logs `message.missing`. Each tier keeps its
|
|
229
243
|
own accessible name/text from `installmentLabel`. `Installments`' group is a native `<fieldset>`/
|
|
230
244
|
`<legend>` pair, visible to sighted and low-vision shoppers, not only `aria-label`. Keyboard:
|
|
231
245
|
`Installments`' group is one Tab stop — Tab lands on the checked row, and the arrow keys move the
|
|
@@ -23,7 +23,7 @@ Use `MyAccountProfile` (not a hand-assembled combination of ad-hoc state) whenev
|
|
|
23
23
|
## When NOT to use
|
|
24
24
|
|
|
25
25
|
- Rendering an individual profile field's presentation or input directly on the Root — that is each field Control's job. This Root owns no field's formatting or masking; the Controls delegate that to the `Field`, `PhoneField`, `DocumentField`, `Input`, and `Select` particles.
|
|
26
|
-
- The signed-out prompt — compose the
|
|
26
|
+
- The signed-out prompt — compose the sign-in surface (`SignInRoot` with `SignInEmailControl` and the method components under it) inside a `SessionGuard` in the store topology; this Root renders nothing for that audience.
|
|
27
27
|
- Editing the email — it is the login identifier and is read-only by construction; there is no edit-state rendering for it.
|
|
28
28
|
|
|
29
29
|
---
|
|
@@ -58,31 +58,35 @@ A field Control is absent from the composition means absent from both states and
|
|
|
58
58
|
- **Field registration, not enumeration**: a Control calls `registerField({ key, validate?, normalize? })` in an effect on mount and unregisters on cleanup. The Root validates, batches, and focuses only over the live registry — it never names a field itself (Decision 1).
|
|
59
59
|
- **Dirty is value comparison, not a touched flag**: `dirty(key) === draft[key] !== savedValues[key]`. Retyping a field back to its saved value makes Save a no-op for it, for free.
|
|
60
60
|
- **Absent and empty are different instructions**: a dirty field cleared to `''` erases upstream; a field the shopper never touched is omitted from the payload entirely.
|
|
61
|
-
- **Save order**: compute dirtiness first → nothing dirty raises the saved toast without dispatching → otherwise validate only the dirty registered fields' current draft values (Decision 9) → any error blocks the dispatch and focuses the first invalid field in rendered DOM order → otherwise normalize dirty values and dispatch one `$actions.identity.customerProfileUpdate` → a `userError` raises an error toast and keeps the edit state with the draft intact → success returns to the view state and raises a success toast (Decision 10). A field the shopper never touched is neither validated nor sent.
|
|
61
|
+
- **Save order**: compute dirtiness first → nothing dirty raises the saved toast without dispatching → otherwise validate only the dirty registered fields' current draft values (Decision 9) → any error blocks the dispatch and focuses the first invalid field in rendered DOM order → otherwise normalize dirty values and dispatch one `$actions.identity.customerProfileUpdate` → a `userError` raises an error toast worded by its `code` and keeps the edit state with the draft intact → success returns to the view state and raises a success toast (Decision 10). A field the shopper never touched is neither validated nor sent.
|
|
62
62
|
- **Edit always opens from the latest saved values**: pressing Edit re-seeds the draft from `savedValues` before switching modes, so a value the server normalized on a previous save (not this task's concern, but a sibling Control's) is what the shopper sees, not a stale local draft.
|
|
63
63
|
- **Background re-delivery**: when `$data` delivers new values while editing, a field re-seeds only if its draft still equals the previously saved value; a dirty field is never clobbered.
|
|
64
64
|
- **Self-gate**: renders nothing outside `state === 'loggedIn'`, even if the topology's `SessionGuard` is missing. Renders `MyAccountProfileSkeleton` while `$data` is unresolved and the shopper is logged in — never an empty summary. `customerProfile` is nullable, so `$data` is also `null` for an anonymous session (the self-gate renders nothing) and for a logged-in shopper whose read failed (the skeleton stays).
|
|
65
|
-
- **PII**: no profile value appears in any log line. A write that throws (rather than resolving `userErrors`) logs only the error's name; the message shown to the shopper is the `saveFailedMessage`
|
|
65
|
+
- **PII**: no profile value appears in any log line. A write that throws (rather than resolving `userErrors`) logs only the error's name; the message shown to the shopper is the `saveFailedMessage` message.
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
69
|
## Props
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Every message below is an ICU message field on the part's own content type (`my-account-profile-root`,
|
|
72
|
+
`-edit`, `-save`, `-cancel`, `-first-name`, `-last-name`, `-phone`, `-tax-id`, `-birth-date`, `-gender`),
|
|
73
|
+
with no package default: an unauthored one renders empty and logs `message.missing`.
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
**`MyAccountProfile.Root`** — `documentType` (string, e.g. `'CPF'`; the store-configured fallback used when the saved `documentType` is not a registered type), and the messages `savedMessage` (source `Your profile has been saved.`; the toast title on a successful Save) and `saveFailedMessage` (source `Unable to save your profile. Please try again.`; the toast title on a failed Save). A refused Save's toast title is keyed on the refusal's `code`: `INVALID_VALUE` → `invalidValueMessage` (source `Some of your details were not accepted. Check them and try again.`; the account names no field), `UNAUTHORIZED` → `sessionExpiredMessage` (source `Your session has expired. Please sign in again.`), and `NETWORK_ERROR`, a write that throws or a missing action → `saveFailedMessage`. A code none of these words (one a newer server added) shows `saveFailedMessage` and logs `message.unknown-code`; a blank field raises an empty toast and logs `message.missing`. Declares `actions: { identity: ['customerProfileUpdate'] }`, `requiresContext: 'session'`, `providesContext: 'my-account-profile'`, `fetchStrategy: 'reactive'`.
|
|
76
|
+
|
|
77
|
+
**`.EditButton` / `.SaveButton` / `.CancelButton`** — the `label` message (source `Edit` / `Save` / `Cancel`) or composed `children`.
|
|
74
78
|
|
|
75
79
|
**`.Email` / `.Skeleton`** — no props beyond `className`.
|
|
76
80
|
|
|
77
|
-
**`.FirstNameControl` / `.LastNameControl`** — `label` (
|
|
81
|
+
**`.FirstNameControl` / `.LastNameControl`** — the messages `label` (source `First name` / `Last name`) and `requiredMessage` (source `First name is required.` / `Last name is required.`; shown when Save is blocked on an empty value).
|
|
78
82
|
|
|
79
|
-
**`.PhoneControl`** — `field` (`'homePhone' | 'mobilePhone'`, default `'mobilePhone'`; compose the Control twice to expose both numbers), `country` (`'US' | 'BR'`, default `'US'`), `label
|
|
83
|
+
**`.PhoneControl`** — `field` (`'homePhone' | 'mobilePhone'`, default `'mobilePhone'`; compose the Control twice to expose both numbers), `country` (`'US' | 'BR'`, default `'US'`), and the messages `label` (source `Phone`) and `invalidMessage` (source `Invalid phone number`), which it formats and hands to `PhoneField`.
|
|
80
84
|
|
|
81
|
-
**`.TaxIdControl`** — `label` (
|
|
85
|
+
**`.TaxIdControl`** — the messages `label` (source `National tax ID`), `invalidMessage` (source `Invalid document number.`), `lockedReason` (source `Your document ID can't be edited.`; the inline copy shown beside the disabled input when a document is already saved). The control masks, validates and normalizes with the active document type: CPF, SSN, SIN or RFC. It sends `document` only (never `documentType`): digits for CPF, SSN and SIN, letters kept for RFC.
|
|
82
86
|
|
|
83
|
-
**`.BirthDateControl`** — `label` (
|
|
87
|
+
**`.BirthDateControl`** — the `label` message (source `Birth date`).
|
|
84
88
|
|
|
85
|
-
**`.GenderControl`** — `label` (
|
|
89
|
+
**`.GenderControl`** — the messages `label` (source `Gender`), `placeholder` (source `Select`), `clearLabel` (source `Clear`; the button shown once a draft value is set, since the Select itself offers no way back to empty), `options` (`{ value, label }[]`; an authored list keeps its own labels. Unset, the control offers female / male / other / prefer not to say, labelled by the messages `femaleLabel`, `maleLabel`, `otherLabel` and `preferNotToSayLabel`, sources `Female`, `Male`, `Other`, `Prefer not to say`).
|
|
86
90
|
|
|
87
91
|
---
|
|
88
92
|
|
|
@@ -159,13 +163,14 @@ The `data-fs-my-account-profile-field="<key>"` attribute on each Control's own w
|
|
|
159
163
|
}
|
|
160
164
|
```
|
|
161
165
|
|
|
162
|
-
Add each field Control id to `profile-root`'s `children` array for the fields the store exposes.
|
|
166
|
+
Add each field Control id to `profile-root`'s `children` array for the fields the store exposes. For the signed-out audience, a sibling `SessionGuard` with `when: ["anonymous", "identified"]` composes next to `profile-guard` and holds a `SignInRoot` with `SignInEmailControl` and the method components (`SignInForm`, the access-code family) under it, so the branch follows the account's enabled sign-in methods; a store that hosts `SignInRoot` in its shared layout needs only the guard and the method components.
|
|
163
167
|
|
|
164
168
|
---
|
|
165
169
|
|
|
166
170
|
## Common mistakes
|
|
167
171
|
|
|
168
172
|
- **Rendering `MyAccountProfile.Root` outside `SessionRoot`.** `useSession()` throws; the page must host a `SessionRoot`.
|
|
173
|
+
- **Composing `SignInForm` in the signed-out branch without a `SignInRoot` ancestor.** The page fails the **build**, not the render: sukima rejects it with the diagnostic code `context-constraint-violation`, because `SignInForm` `requiresContext: 'sign-in'` and nothing above it provides it. Compose `SignInRoot` (with `SignInEmailControl`) around the method components in the branch, unless the store's shared layout already hosts it.
|
|
169
174
|
- **Rendering `MyAccountProfile.Root` outside a `ToastProvider`.** Save calls `useToast()` (Decision 10); without a `ToastProvider` ancestor that call throws.
|
|
170
175
|
- **Expecting the email to be editable.** It is always read-only; there is no edit-state rendering for it anywhere in this compound.
|
|
171
176
|
- **Composing a field Control without an unmount cleanup on its `registerField` effect.** A Control that never unregisters leaks a stale validator into the registry after it stops rendering — every shipped Control returns the unregister function from its effect; keep that pattern in a custom Control.
|
|
@@ -126,7 +126,7 @@ When you author `target: "_blank"`, write the "(opens in new tab)" cue into `chi
|
|
|
126
126
|
|
|
127
127
|
| Component | What you style | Plausible classes |
|
|
128
128
|
|---|---|---|
|
|
129
|
-
| `NavigationLink` | The label — typography, color, and hover affordance | `text-[14px] leading-[1.4] font-medium text-[
|
|
129
|
+
| `NavigationLink` | The label — typography, color, and hover affordance | `text-[14px] leading-[1.4] font-medium text-[var(--color-text)] no-underline hover:underline` |
|
|
130
130
|
|
|
131
131
|
The spacing between links belongs to the parent that groups them, not to the link. Give that parent the `flex` and `gap-[*]` classes and keep each link to typography and color.
|
|
132
132
|
|
|
@@ -142,16 +142,18 @@ Styled example of a row of links:
|
|
|
142
142
|
"nav-sale": {
|
|
143
143
|
"type": "NavigationLink",
|
|
144
144
|
"props": { "href": "/collection/sale", "children": "Sale" },
|
|
145
|
-
"style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[
|
|
145
|
+
"style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[var(--color-text)]", "no-underline", "hover:underline"]
|
|
146
146
|
},
|
|
147
147
|
"nav-new": {
|
|
148
148
|
"type": "NavigationLink",
|
|
149
149
|
"props": { "href": "/collection/new-in", "children": "New in" },
|
|
150
|
-
"style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[
|
|
150
|
+
"style": ["text-[14px]", "leading-[1.4]", "font-medium", "text-[var(--color-text)]", "no-underline", "hover:underline"]
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
+
The colors that several elements share are variables of the page or layout `theme`, which declares them: `{"--color-text": "#1A1A1A"}`. A color used once stays a hex.
|
|
156
|
+
|
|
155
157
|
---
|
|
156
158
|
|
|
157
159
|
## Related
|
|
@@ -36,7 +36,9 @@ The dialog, the reason list, and the acknowledgement are inside this matter.
|
|
|
36
36
|
|
|
37
37
|
### OrderCancel
|
|
38
38
|
|
|
39
|
-
No authoring props. The page query passes the order. Reasons and sentences come from the `order-cancel` content model.
|
|
39
|
+
No authoring props. The page query passes the order. Reasons and sentences come from the `order-cancel` content model. Its sentences are ICU messages; a missing one renders empty and logs. Without authored `reasons`, the dialog offers `reasonChangedMind`, `reasonBoughtByMistake`, `reasonBetterPrice`, and `reasonSlowDelivery`, in that order. Authored `reasons` replace them, and their labels stay plain text.
|
|
40
|
+
|
|
41
|
+
A refused cancellation is worded from content by its code: `ORDER_NOT_CANCELLABLE` shows `notCancellableMessage`, `NOT_FOUND` shows `notFoundMessage`, and a transport failure (`NETWORK_ERROR`) shows `failure`. A code this component does not know, one a newer server added, also shows `failure` and logs `message.unknown-code`.
|
|
40
42
|
|
|
41
43
|
## Styling
|
|
42
44
|
|
|
@@ -38,12 +38,14 @@ OrderDeliveryGroup
|
|
|
38
38
|
|
|
39
39
|
### OrderDeliveryAddress
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|---|---|---|---|
|
|
43
|
-
| deliveryLabel | string | catalogue `fs/order-delivery-address.delivery` | Caption above a delivery address |
|
|
44
|
-
| storeLabel | string | catalogue `fs/order-delivery-address.store` | Caption above a pickup store address |
|
|
41
|
+
No schema props. The captions are ICU messages in content (`order-delivery-address`):
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
| Content field | Description |
|
|
44
|
+
|---|---|
|
|
45
|
+
| deliveryLabel | Caption above a delivery address |
|
|
46
|
+
| storeLabel | Caption above a pickup store address |
|
|
47
|
+
|
|
48
|
+
A missing message renders empty and logs.
|
|
47
49
|
|
|
48
50
|
## Data
|
|
49
51
|
|
|
@@ -41,9 +41,7 @@ The group order is the order of `deliveryOptions`.
|
|
|
41
41
|
|
|
42
42
|
### OrderDeliveryGroup
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|---|---|---|---|
|
|
46
|
-
| label | string | content, then catalogue `fs/order-delivery-group.label` | Accessible name of the section. The other fixed labels are content too (`order-delivery-group`). Item counts keep `{count}`. |
|
|
44
|
+
No schema props. The accessible name of the section (`label`) and the other fixed labels are ICU messages in content (`order-delivery-group`). The item count `items` takes a `count` argument (`{count, plural, one {# item} other {# items}}`). A missing message renders empty and logs.
|
|
47
45
|
|
|
48
46
|
The initial open state is not a prop. One option opens; two or more start closed.
|
|
49
47
|
|
|
@@ -34,7 +34,7 @@ OrderDetailsBack
|
|
|
34
34
|
|
|
35
35
|
| Prop | Type | Default | Purpose |
|
|
36
36
|
|---|---|---|---|
|
|
37
|
-
| — | — | — | No schema props. The label is content (`order-details-back`); a
|
|
37
|
+
| — | — | — | No schema props. The label is an ICU message in content (`order-details-back.label`); a missing one renders empty and logs. The href is `/pvt/orders`. |
|
|
38
38
|
|
|
39
39
|
## Styling hooks
|
|
40
40
|
|
|
@@ -37,11 +37,8 @@ OrderDetailsHeader
|
|
|
37
37
|
| Prop | Type | Default | Purpose |
|
|
38
38
|
|---|---|---|---|
|
|
39
39
|
| `$data` | `{ id, completion } \| null` | — | The `customerOrder` the generator passes. Null renders nothing. |
|
|
40
|
-
| `prefix` | string | `Order #` | Copy before the number. Content wins. An empty string, with no content, omits the prefix. |
|
|
41
|
-
| `copyLabel` | string | `Copy` | Visible label of the copy action. Content wins. |
|
|
42
|
-
| `copyAccessibleName` | string | `Copy order number` | Accessible name of the copy action. Content wins. |
|
|
43
40
|
|
|
44
|
-
Content id `order-details-header`
|
|
41
|
+
No schema props. Content id `order-details-header` carries the copy before the number (`prefix`), the copy action (`copyLabel`, `copyAccessibleName`), its acknowledgement (`copyCopied`, `copyFailure`, `copyDismiss`), and one field per status sentence (`statusInProgress`, `statusCancellationRequested`, `statusCancelled`, `statusDelivered`, `statusShipped`, `statusReadyForPickup`, `statusCollected`, `statusPlaceholder`). Every field is an ICU message. The header formats them and passes them to `CopyText` and `OrderStatusBadge`. A missing message renders empty and logs; a missing `prefix` also omits the prefix element. The list page does not read this entry.
|
|
45
42
|
|
|
46
43
|
## Styling hooks
|
|
47
44
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# OrderInvoiceDownload
|
|
2
|
+
|
|
3
|
+
**Category:** action
|
|
4
|
+
**Purpose:** Offers every invoice file the order kept, so the shopper can download them.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A "Download invoice" button on the order page, usually beside the cancel action.
|
|
11
|
+
- With several files, the button opens a dialog with a short sentence and one entry per invoice ("Invoice 1 of 2").
|
|
12
|
+
- No status, no money, no product.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- On the order details page, for an order the merchant has invoiced.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For a printable bank slip → `OrderPayment` owns that action.
|
|
23
|
+
- For the order list → each row has no invoice control.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Composition
|
|
28
|
+
|
|
29
|
+
Standalone. Place it anywhere under the order details page. It does not choose its place.
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
OrderInvoiceDownload
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The dialog and the invoice list are inside this matter. The dialog portals into this root so its styling hooks stay reachable.
|
|
36
|
+
|
|
37
|
+
## Data
|
|
38
|
+
|
|
39
|
+
Fragment on `Query`: `customerOrder(id: $orderId) { progress { cancelled } invoices { url issuedAt kind } }`. The generator binds `$data` to that root field.
|
|
40
|
+
|
|
41
|
+
- One file navigates to the merchant address. No dialog opens.
|
|
42
|
+
- Several files open a dialog. The list stays mounted until the browser leaves the page, so it stays open only when the merchant serves the file as an attachment.
|
|
43
|
+
- An address the browser would execute (`javascript:`) is dropped before the one-or-many choice.
|
|
44
|
+
- The component renders nothing when the order is cancelled or no file remains.
|
|
45
|
+
|
|
46
|
+
## Components
|
|
47
|
+
|
|
48
|
+
### OrderInvoiceDownload
|
|
49
|
+
|
|
50
|
+
No schema props. Every label is an ICU message in the `order-invoice-download` content model: `downloadLabel`, `entryLabel` (arguments `n` and `total`), `description`, and `closeLabel`. A missing one renders empty and logs.
|
|
51
|
+
|
|
52
|
+
## Styling
|
|
53
|
+
|
|
54
|
+
- `data-fs-order-invoice-download` — the root.
|
|
55
|
+
- `data-fs-order-invoice-download-control` — the button that downloads, or opens the dialog.
|
|
56
|
+
- `data-fs-dialog-backdrop`, `data-fs-dialog-viewport`, `data-fs-dialog-popup`, `data-fs-dialog-title`, `data-fs-dialog-description` — the overlay.
|
|
57
|
+
- `data-fs-order-invoice-download-header` — the title and close row. `data-fs-order-invoice-download-dismiss` is the close mark.
|
|
58
|
+
- `data-fs-order-invoice-download-list` — the invoice list.
|
|
59
|
+
- `data-fs-order-invoice-download-entry` — one invoice button.
|
|
60
|
+
- `data-fs-order-invoice-download-skeleton` — the loading placeholder.
|
|
@@ -35,7 +35,7 @@ OrderList
|
|
|
35
35
|
|
|
36
36
|
### OrderListRow
|
|
37
37
|
|
|
38
|
-
No props. The list passes the order.
|
|
38
|
+
No schema props. The list passes the order and `statusMessages`, the status sentences it formats from its own `status*` messages. The row has no content of its own.
|
|
39
39
|
|
|
40
40
|
## Styling
|
|
41
41
|
|
|
@@ -38,25 +38,18 @@ OrderListSearch
|
|
|
38
38
|
|
|
39
39
|
### OrderListSearch
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|------|------|---------|-------|
|
|
43
|
-
| `label` | string | `Order number` | Visible label of the text field. |
|
|
44
|
-
| `fromLabel` | string | `Placed from` | Visible label of the from day. |
|
|
45
|
-
| `toLabel` | string | `Placed to` | Visible label of the to day. |
|
|
46
|
-
| `submitLabel` | string | `Search` | Submit button. |
|
|
47
|
-
| `clearLabel` | string | `Clear search` | Clear link. Rendered only when the URL already has a criterion. |
|
|
48
|
-
| `invalidRangeMessage` | string | `The start date is after the end date.` | Shown when the from day is after the to day. |
|
|
41
|
+
No props of its own.
|
|
49
42
|
|
|
50
|
-
Content model (`order-list-search`) fields,
|
|
43
|
+
Content model (`order-list-search`) fields, all ICU messages. A store without CMS authors them on the element; a CMS-bound store keeps them in content. An unauthored field renders empty and logs `message.missing`; it does not remove a control.
|
|
51
44
|
|
|
52
45
|
| Field | Type | Required | Notes |
|
|
53
46
|
|-------|------|----------|-------|
|
|
54
|
-
| `label` | string | no |
|
|
55
|
-
| `from` | string | no |
|
|
56
|
-
| `to` | string | no |
|
|
57
|
-
| `submit` | string | no |
|
|
58
|
-
| `clear` | string | no |
|
|
59
|
-
| `invalidRange` | string | no |
|
|
47
|
+
| `label` | string | no | Visible label of the text field. Source: `Order number`. |
|
|
48
|
+
| `from` | string | no | Visible label of the from day. Source: `Placed from`. |
|
|
49
|
+
| `to` | string | no | Visible label of the to day. Source: `Placed to`. |
|
|
50
|
+
| `submit` | string | no | Submit button. Source: `Search`. |
|
|
51
|
+
| `clear` | string | no | Clear link, rendered only when the URL already has a criterion. Source: `Clear search`. |
|
|
52
|
+
| `invalidRange` | string | no | Shown when the from day is after the to day. Source: `The start date is after the end date.` |
|
|
60
53
|
|
|
61
54
|
**The param keys are fixed.** The term is `search`. The days are `placedFrom` and `placedTo`, as RFC 3339 UTC instants of the local start and the local end of the picked days. Renaming a label does not change the keys. Submit and clear delete `after` and keep `view`.
|
|
62
55
|
|
|
@@ -74,11 +67,11 @@ Content model (`order-list-search`) fields, edited in the CMS. A non-blank field
|
|
|
74
67
|
"type": "OrderListSearch",
|
|
75
68
|
"props": {
|
|
76
69
|
"label": "Order number",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
70
|
+
"from": "Placed from",
|
|
71
|
+
"to": "Placed to",
|
|
72
|
+
"submit": "Search",
|
|
73
|
+
"clear": "Clear search",
|
|
74
|
+
"invalidRange": "The start date is after the end date."
|
|
82
75
|
},
|
|
83
76
|
"children": [],
|
|
84
77
|
"style": ["flex flex-wrap items-end gap-[12px]"]
|
|
@@ -38,23 +38,17 @@ OrderListViews
|
|
|
38
38
|
|
|
39
39
|
### OrderListViews
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|------|------|---------|-------|
|
|
43
|
-
| `label` | string | `Order views` | Accessible name of the navigation landmark. |
|
|
44
|
-
| `allLabel` | string | `All orders` | Visible name of the all-orders choice. |
|
|
45
|
-
| `ongoingLabel` | string | `Ongoing` | Visible name of the ongoing choice. |
|
|
46
|
-
| `completedLabel` | string | `Completed` | Visible name of the completed choice. |
|
|
47
|
-
| `cancelledLabel` | string | `Cancelled` | Visible name of the cancelled choice. |
|
|
41
|
+
No props of its own.
|
|
48
42
|
|
|
49
|
-
Content model (`order-list-views`) fields,
|
|
43
|
+
Content model (`order-list-views`) fields, all ICU messages. A store without CMS authors them on the element; a CMS-bound store keeps them in content. An unauthored field renders empty and logs `message.missing`; it does not remove a choice.
|
|
50
44
|
|
|
51
45
|
| Field | Type | Required | Notes |
|
|
52
46
|
|-------|------|----------|-------|
|
|
53
|
-
| `label` | string | no | Accessible name.
|
|
54
|
-
| `all` | string | no |
|
|
55
|
-
| `ongoing` | string | no |
|
|
56
|
-
| `completed` | string | no |
|
|
57
|
-
| `cancelled` | string | no |
|
|
47
|
+
| `label` | string | no | Accessible name of the navigation landmark. Source: `Order views`. |
|
|
48
|
+
| `all` | string | no | Name of the all-orders choice. Source: `All orders`. |
|
|
49
|
+
| `ongoing` | string | no | Name of the ongoing choice. Source: `Ongoing`. |
|
|
50
|
+
| `completed` | string | no | Name of the completed choice. Source: `Completed`. |
|
|
51
|
+
| `cancelled` | string | no | Name of the cancelled choice. Source: `Cancelled`. |
|
|
58
52
|
|
|
59
53
|
**The href values are fixed.** All orders omits `view`. The other three set `view` to `ongoing`, `completed`, or `cancelled`. Renaming a label does not change the param. The switch also deletes `after` and keeps every other search param, including `search`, `placedFrom`, and `placedTo`.
|
|
60
54
|
|
|
@@ -72,10 +66,10 @@ Content model (`order-list-views`) fields, edited in the CMS. A non-blank field
|
|
|
72
66
|
"type": "OrderListViews",
|
|
73
67
|
"props": {
|
|
74
68
|
"label": "Order views",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
69
|
+
"all": "All orders",
|
|
70
|
+
"ongoing": "Ongoing",
|
|
71
|
+
"completed": "Completed",
|
|
72
|
+
"cancelled": "Cancelled"
|
|
79
73
|
},
|
|
80
74
|
"children": [],
|
|
81
75
|
"style": ["flex flex-wrap gap-[8px]"]
|
package/dist/docs/order-list.md
CHANGED
|
@@ -43,16 +43,17 @@ Child order is not applicable. The row order is the order of the connection.
|
|
|
43
43
|
|
|
44
44
|
| Prop | Type | Default | Description |
|
|
45
45
|
|---|---|---|---|
|
|
46
|
-
| label | string | `Orders` | Accessible name of the region |
|
|
47
46
|
| advance | `pages` \| `load-more` | `pages` | Label of the control that asks for the next cursor. Both modes load the page again |
|
|
48
47
|
| startShoppingHref | link | `{ standard: 'home' }` | Link offered when the account has no orders. An unsafe string falls back to the home page |
|
|
49
48
|
| orderHref | link | `{ standard: 'order' }` | The order page each row links to. The row fills `orderId`, so the store's order page must take `[orderId]`; a string is the path the orders live under, and the row appends the encoded id |
|
|
50
49
|
|
|
51
50
|
Page size is not a prop. The fragment always reads 25.
|
|
52
51
|
|
|
52
|
+
Content model `order-list` declares every sentence as an ICU message: the region's accessible name (`label`), the empty, error and advance sentences and their links (`emptyAccount`, `emptyView`, `emptySearch`, `pastEnd`, `walkStopped`, `error`, `retry`, `next`, `loadMore`, `firstPage`, `clear`, `startShopping`), the count sentences (`count`, `countIncomplete`, with `count` and `total`), the column headers (`columnId`, `columnPlaced`, `columnTotal`, `columnItems`, `columnStatus`, `columnEstimate`) and the row status labels (`statusInProgress`, `statusCancellationRequested`, `statusCancelled`, `statusDelivered`, `statusShipped`, `statusReadyForPickup`, `statusCollected`, `statusPlaceholder`) as ICU messages. The list formats them once and passes the headers to its column row and the status sentences to each `OrderListRow`. A missing message renders empty and logs; only `count` and `countIncomplete` still fall back to their English source. A store without CMS authors the messages on the element.
|
|
53
|
+
|
|
53
54
|
### OrderListRow
|
|
54
55
|
|
|
55
|
-
No schema props. The list passes one order. Do not place this component in a page schema.
|
|
56
|
+
No schema props. The list passes one order and its formatted status sentences. Do not place this component in a page schema.
|
|
56
57
|
|
|
57
58
|
## Data
|
|
58
59
|
|
|
@@ -70,10 +71,12 @@ Style the region, the count, each fact, and the links through their hooks. Inlin
|
|
|
70
71
|
- `data-fs-order-list-row-state` — `ongoing`, `completed`, or `cancelled`.
|
|
71
72
|
- `data-fs-order-list-row-id` — the order number. `text-[16px] font-medium text-[#111827]`.
|
|
72
73
|
- `data-fs-order-list-row-placed`, `data-fs-order-list-row-total`, `data-fs-order-list-row-count` — the facts. `text-[14px] text-[#374151]`.
|
|
73
|
-
- `data-fs-order-list-row-estimate` — the delivery estimate on an ongoing row. `text-[14px] text-[
|
|
74
|
+
- `data-fs-order-list-row-estimate` — the delivery estimate on an ongoing row. `text-[14px] text-[var(--color-blue)]`.
|
|
74
75
|
- `data-fs-order-list-empty` — `account`, `view`, `search`, `past-end`, or `walk-stopped`.
|
|
75
76
|
- `data-fs-order-list-error` — the failed read.
|
|
76
|
-
- `data-fs-order-list-next`, `data-fs-order-list-first`, `data-fs-order-list-clear`, `data-fs-order-list-retry`, `data-fs-order-list-start` — the links. `text-[14px] font-medium text-[
|
|
77
|
+
- `data-fs-order-list-next`, `data-fs-order-list-first`, `data-fs-order-list-clear`, `data-fs-order-list-retry`, `data-fs-order-list-start` — the links. `text-[14px] font-medium text-[var(--color-blue)]`.
|
|
78
|
+
|
|
79
|
+
The colors that several elements share are variables of the page or layout `theme`, which declares them: `{"--color-blue": "#1D4ED8"}`. A color used once stays a hex.
|
|
77
80
|
|
|
78
81
|
## Canonical schema
|
|
79
82
|
|
|
@@ -82,8 +85,12 @@ Style the region, the count, each fact, and the links through their hooks. Inlin
|
|
|
82
85
|
"orders": {
|
|
83
86
|
"type": "OrderList",
|
|
84
87
|
"props": {
|
|
88
|
+
"advance": "pages",
|
|
85
89
|
"label": "Orders",
|
|
86
|
-
"
|
|
90
|
+
"emptyAccount": "You have no orders yet",
|
|
91
|
+
"error": "Could not load orders",
|
|
92
|
+
"retry": "Try again",
|
|
93
|
+
"next": "Next page"
|
|
87
94
|
},
|
|
88
95
|
"style": {
|
|
89
96
|
"default": "flex flex-col gap-[16px]"
|