@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
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { addressFields } from "../../sdk/address/address-fields.js";
|
|
2
|
+
import { loadCountryRules } from "../../sdk/address/country-rules.js";
|
|
3
|
+
import { validateAddress } from "../../sdk/address/validate-address.js";
|
|
4
|
+
import { normalizePostalCode } from "../../sdk/address/postal-code.js";
|
|
5
|
+
import { useEffect, useSyncExternalStore } from "react";
|
|
6
|
+
//#region src/matter/shipping-address/library-country-descriptors.ts
|
|
7
|
+
/**
|
|
8
|
+
* Country descriptors built from `@vtex/country-forms` at runtime, for the countries the hand-written
|
|
9
|
+
* `countryDescriptors` table does not hold.
|
|
10
|
+
*
|
|
11
|
+
* A library-backed descriptor takes its field names and order, its `required` flags and its postal-code
|
|
12
|
+
* verdict from the library, through `sdk/address/`. Nothing about those countries is written down here but
|
|
13
|
+
* the list of ISO codes: like every descriptor it holds no copy. The library loads one chunk per
|
|
14
|
+
* country, asynchronously, so a built descriptor lives in a module-level cache that `getCountryDescriptor`
|
|
15
|
+
* and `getAvailableCountries` read synchronously: a country is absent until its chunk arrives, and a
|
|
16
|
+
* descriptor is never returned half built.
|
|
17
|
+
*
|
|
18
|
+
* `BillingAddress` and `ShippingAddress` call `useLibraryCountryDescriptors` once. It starts the load when
|
|
19
|
+
* the component mounts and re-renders it when a country arrives. A server render never reads the cache.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The countries whose descriptor comes from `@vtex/country-forms`, in the order the selectors list them.
|
|
23
|
+
* Both are flat field lists, and both are countries `PAYMENT_COUNTRIES` already serves with a cardholder
|
|
24
|
+
* document. A country with a dependent select needs a control the descriptor model cannot express.
|
|
25
|
+
*/
|
|
26
|
+
const LIBRARY_COUNTRIES = ["CAN", "MEX"];
|
|
27
|
+
/**
|
|
28
|
+
* The postal-code verdict of a library-backed country: `true` for a blank value (blankness belongs to the
|
|
29
|
+
* required rule), else whether the library accepts the postal code. Only the `postalCode` key of the
|
|
30
|
+
* library's answer is read, so a free-text `state`, which the SDK would check against the library's list,
|
|
31
|
+
* never counts here.
|
|
32
|
+
*/
|
|
33
|
+
function postalCodeValidator(rules) {
|
|
34
|
+
return (value) => {
|
|
35
|
+
if (value.trim() === "") return true;
|
|
36
|
+
return validateAddress({ postalCode: value }, rules).postalCode === void 0;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Builds the descriptor of a library-backed country from its loaded rules. `recipientName` comes first and is
|
|
41
|
+
* required, like every other descriptor's; the rest is the library's field set, in its order, with its
|
|
42
|
+
* `required` flags. `state` stays a free-text field.
|
|
43
|
+
*/
|
|
44
|
+
function buildLibraryDescriptor(iso, rules) {
|
|
45
|
+
return {
|
|
46
|
+
iso,
|
|
47
|
+
fields: [{
|
|
48
|
+
name: "recipientName",
|
|
49
|
+
required: true
|
|
50
|
+
}, ...addressFields(rules, {}).map(({ name, required }) => ({
|
|
51
|
+
name,
|
|
52
|
+
...required ? { required: true } : {},
|
|
53
|
+
...name === "postalCode" ? {
|
|
54
|
+
rule: { validate: postalCodeValidator(rules) },
|
|
55
|
+
normalize: (value) => normalizePostalCode(value, rules)
|
|
56
|
+
} : {}
|
|
57
|
+
}))]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const SERVER_STATE = {
|
|
61
|
+
loaded: [],
|
|
62
|
+
settled: false
|
|
63
|
+
};
|
|
64
|
+
const cache$1 = /* @__PURE__ */ new Map();
|
|
65
|
+
const inFlight = /* @__PURE__ */ new Map();
|
|
66
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
67
|
+
let started = false;
|
|
68
|
+
let state = SERVER_STATE;
|
|
69
|
+
/** Recomputes the snapshot and tells the subscribers, only when something they can read changed. */
|
|
70
|
+
function publish() {
|
|
71
|
+
const loaded = LIBRARY_COUNTRIES.filter((iso) => cache$1.has(iso));
|
|
72
|
+
const settled = started && inFlight.size === 0;
|
|
73
|
+
if (state.settled === settled && state.loaded.length === loaded.length && state.loaded.every((iso, index) => iso === loaded[index])) return;
|
|
74
|
+
state = {
|
|
75
|
+
loaded,
|
|
76
|
+
settled
|
|
77
|
+
};
|
|
78
|
+
for (const listener of listeners) listener();
|
|
79
|
+
}
|
|
80
|
+
async function loadOne(iso) {
|
|
81
|
+
try {
|
|
82
|
+
cache$1.set(iso, buildLibraryDescriptor(iso, await loadCountryRules(iso)));
|
|
83
|
+
} catch {} finally {
|
|
84
|
+
inFlight.delete(iso);
|
|
85
|
+
publish();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Starts the load of every library-backed country that is neither loaded nor loading, and resolves once
|
|
90
|
+
* every one of them has settled. Idempotent, and it never rejects: a country whose chunk fails is left out
|
|
91
|
+
* of the cache and the next call tries it again.
|
|
92
|
+
*/
|
|
93
|
+
function loadLibraryCountryDescriptors() {
|
|
94
|
+
started = true;
|
|
95
|
+
const pending = LIBRARY_COUNTRIES.filter((iso) => !cache$1.has(iso)).map((iso) => {
|
|
96
|
+
const running = inFlight.get(iso);
|
|
97
|
+
if (running) return running;
|
|
98
|
+
const next = loadOne(iso);
|
|
99
|
+
inFlight.set(iso, next);
|
|
100
|
+
return next;
|
|
101
|
+
});
|
|
102
|
+
publish();
|
|
103
|
+
return Promise.all(pending).then(() => void 0);
|
|
104
|
+
}
|
|
105
|
+
/** The descriptor of a library-backed country once it has loaded, else `undefined`. */
|
|
106
|
+
function getLoadedLibraryCountry(iso) {
|
|
107
|
+
return cache$1.get(iso);
|
|
108
|
+
}
|
|
109
|
+
function subscribe(listener) {
|
|
110
|
+
listeners.add(listener);
|
|
111
|
+
return () => {
|
|
112
|
+
listeners.delete(listener);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function getSnapshot() {
|
|
116
|
+
return state;
|
|
117
|
+
}
|
|
118
|
+
function getServerSnapshot() {
|
|
119
|
+
return SERVER_STATE;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Starts the load when the component mounts and re-renders it as countries arrive. `loaded` lists the
|
|
123
|
+
* library-backed countries whose descriptor is available; `settled` is true once no load is running, whether
|
|
124
|
+
* a country arrived or failed. On the server, and on the first client render of a hydrating tree, it reads
|
|
125
|
+
* nothing loaded.
|
|
126
|
+
*/
|
|
127
|
+
function useLibraryCountryDescriptors() {
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
loadLibraryCountryDescriptors();
|
|
130
|
+
}, []);
|
|
131
|
+
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { LIBRARY_COUNTRIES, buildLibraryDescriptor, getLoadedLibraryCountry, loadLibraryCountryDescriptors, useLibraryCountryDescriptors };
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=library-country-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-country-descriptors.js","names":["cache"],"sources":["../../../src/matter/shipping-address/library-country-descriptors.ts"],"sourcesContent":["/**\n * Country descriptors built from `@vtex/country-forms` at runtime, for the countries the hand-written\n * `countryDescriptors` table does not hold.\n *\n * A library-backed descriptor takes its field names and order, its `required` flags and its postal-code\n * verdict from the library, through `sdk/address/`. Nothing about those countries is written down here but\n * the list of ISO codes: like every descriptor it holds no copy. The library loads one chunk per\n * country, asynchronously, so a built descriptor lives in a module-level cache that `getCountryDescriptor`\n * and `getAvailableCountries` read synchronously: a country is absent until its chunk arrives, and a\n * descriptor is never returned half built.\n *\n * `BillingAddress` and `ShippingAddress` call `useLibraryCountryDescriptors` once. It starts the load when\n * the component mounts and re-renders it when a country arrives. A server render never reads the cache.\n */\n\nimport { useEffect, useSyncExternalStore } from 'react';\nimport { addressFields } from '../../sdk/address/address-fields.js';\nimport { loadCountryRules } from '../../sdk/address/country-rules.js';\nimport { normalizePostalCode } from '../../sdk/address/postal-code.js';\nimport type { CountryRules } from '../../sdk/address/types.js';\nimport { validateAddress } from '../../sdk/address/validate-address.js';\nimport type { CountryDescriptor, FieldDescriptor } from './country-descriptors.js';\n\n/**\n * The countries whose descriptor comes from `@vtex/country-forms`, in the order the selectors list them.\n * Both are flat field lists, and both are countries `PAYMENT_COUNTRIES` already serves with a cardholder\n * document. A country with a dependent select needs a control the descriptor model cannot express.\n */\nexport const LIBRARY_COUNTRIES: readonly string[] = ['CAN', 'MEX'];\n\n/**\n * The postal-code verdict of a library-backed country: `true` for a blank value (blankness belongs to the\n * required rule), else whether the library accepts the postal code. Only the `postalCode` key of the\n * library's answer is read, so a free-text `state`, which the SDK would check against the library's list,\n * never counts here.\n */\nfunction postalCodeValidator(rules: CountryRules): (value: string) => boolean {\n return (value) => {\n if (value.trim() === '') return true;\n return validateAddress({ postalCode: value }, rules).postalCode === undefined;\n };\n}\n\n/**\n * Builds the descriptor of a library-backed country from its loaded rules. `recipientName` comes first and is\n * required, like every other descriptor's; the rest is the library's field set, in its order, with its\n * `required` flags. `state` stays a free-text field.\n */\nexport function buildLibraryDescriptor(iso: string, rules: CountryRules): CountryDescriptor {\n const fields: FieldDescriptor[] = [\n { name: 'recipientName', required: true },\n ...addressFields(rules, {}).map(\n ({ name, required }): FieldDescriptor => ({\n name,\n ...(required ? { required: true } : {}),\n ...(name === 'postalCode'\n ? {\n rule: { validate: postalCodeValidator(rules) },\n normalize: (value: string) => normalizePostalCode(value, rules),\n }\n : {}),\n }),\n ),\n ];\n\n return { iso, fields };\n}\n\ntype LibraryDescriptorsState = Readonly<{ loaded: readonly string[]; settled: boolean }>;\n\nconst SERVER_STATE: LibraryDescriptorsState = { loaded: [], settled: false };\n\nconst cache = new Map<string, CountryDescriptor>();\nconst inFlight = new Map<string, Promise<void>>();\nconst listeners = new Set<() => void>();\nlet started = false;\nlet state: LibraryDescriptorsState = SERVER_STATE;\n\n/** Recomputes the snapshot and tells the subscribers, only when something they can read changed. */\nfunction publish(): void {\n const loaded = LIBRARY_COUNTRIES.filter((iso) => cache.has(iso));\n const settled = started && inFlight.size === 0;\n const unchanged =\n state.settled === settled &&\n state.loaded.length === loaded.length &&\n state.loaded.every((iso, index) => iso === loaded[index]);\n if (unchanged) return;\n\n state = { loaded, settled };\n for (const listener of listeners) listener();\n}\n\nasync function loadOne(iso: string): Promise<void> {\n try {\n cache.set(iso, buildLibraryDescriptor(iso, await loadCountryRules(iso)));\n } catch {\n // A failed country stays out of the cache, so both forms treat it as a country with no descriptor.\n // Nothing is reported: the error could carry the request, and the next load retries it.\n } finally {\n inFlight.delete(iso);\n publish();\n }\n}\n\n/**\n * Starts the load of every library-backed country that is neither loaded nor loading, and resolves once\n * every one of them has settled. Idempotent, and it never rejects: a country whose chunk fails is left out\n * of the cache and the next call tries it again.\n */\nexport function loadLibraryCountryDescriptors(): Promise<void> {\n started = true;\n const pending = LIBRARY_COUNTRIES.filter((iso) => !cache.has(iso)).map((iso) => {\n const running = inFlight.get(iso);\n if (running) return running;\n const next = loadOne(iso);\n inFlight.set(iso, next);\n return next;\n });\n publish();\n return Promise.all(pending).then(() => undefined);\n}\n\n/** The descriptor of a library-backed country once it has loaded, else `undefined`. */\nexport function getLoadedLibraryCountry(iso: string): CountryDescriptor | undefined {\n return cache.get(iso);\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nfunction getSnapshot(): LibraryDescriptorsState {\n return state;\n}\n\nfunction getServerSnapshot(): LibraryDescriptorsState {\n return SERVER_STATE;\n}\n\n/**\n * Starts the load when the component mounts and re-renders it as countries arrive. `loaded` lists the\n * library-backed countries whose descriptor is available; `settled` is true once no load is running, whether\n * a country arrived or failed. On the server, and on the first client render of a hydrating tree, it reads\n * nothing loaded.\n */\nexport function useLibraryCountryDescriptors(): LibraryDescriptorsState {\n useEffect(() => {\n void loadLibraryCountryDescriptors();\n }, []);\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,oBAAuC,CAAC,OAAO,KAAK;;;;;;;AAQjE,SAAS,oBAAoB,OAAiD;CAC5E,QAAQ,UAAU;EAChB,IAAI,MAAM,KAAK,MAAM,IAAI,OAAO;EAChC,OAAO,gBAAgB,EAAE,YAAY,MAAM,GAAG,KAAK,CAAC,CAAC,eAAe,KAAA;CACtE;AACF;;;;;;AAOA,SAAgB,uBAAuB,KAAa,OAAwC;CAiB1F,OAAO;EAAE;EAAK,QAAA,CAfZ;GAAE,MAAM;GAAiB,UAAU;EAAK,GACxC,GAAG,cAAc,OAAO,CAAC,CAAC,CAAC,CAAC,KACzB,EAAE,MAAM,gBAAiC;GACxC;GACA,GAAI,WAAW,EAAE,UAAU,KAAK,IAAI,CAAC;GACrC,GAAI,SAAS,eACT;IACE,MAAM,EAAE,UAAU,oBAAoB,KAAK,EAAE;IAC7C,YAAY,UAAkB,oBAAoB,OAAO,KAAK;GAChE,IACA,CAAC;EACP,EACF,CAGiB;CAAE;AACvB;AAIA,MAAM,eAAwC;CAAE,QAAQ,CAAC;CAAG,SAAS;AAAM;AAE3E,MAAMA,0BAAQ,IAAI,IAA+B;AACjD,MAAM,2BAAW,IAAI,IAA2B;AAChD,MAAM,4BAAY,IAAI,IAAgB;AACtC,IAAI,UAAU;AACd,IAAI,QAAiC;;AAGrC,SAAS,UAAgB;CACvB,MAAM,SAAS,kBAAkB,QAAQ,QAAQA,QAAM,IAAI,GAAG,CAAC;CAC/D,MAAM,UAAU,WAAW,SAAS,SAAS;CAK7C,IAHE,MAAM,YAAY,WAClB,MAAM,OAAO,WAAW,OAAO,UAC/B,MAAM,OAAO,OAAO,KAAK,UAAU,QAAQ,OAAO,MAAM,GAC3C;CAEf,QAAQ;EAAE;EAAQ;CAAQ;CAC1B,KAAK,MAAM,YAAY,WAAW,SAAS;AAC7C;AAEA,eAAe,QAAQ,KAA4B;CACjD,IAAI;EACF,QAAM,IAAI,KAAK,uBAAuB,KAAK,MAAM,iBAAiB,GAAG,CAAC,CAAC;CACzE,QAAQ,CAGR,UAAU;EACR,SAAS,OAAO,GAAG;EACnB,QAAQ;CACV;AACF;;;;;;AAOA,SAAgB,gCAA+C;CAC7D,UAAU;CACV,MAAM,UAAU,kBAAkB,QAAQ,QAAQ,CAACA,QAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ;EAC9E,MAAM,UAAU,SAAS,IAAI,GAAG;EAChC,IAAI,SAAS,OAAO;EACpB,MAAM,OAAO,QAAQ,GAAG;EACxB,SAAS,IAAI,KAAK,IAAI;EACtB,OAAO;CACT,CAAC;CACD,QAAQ;CACR,OAAO,QAAQ,IAAI,OAAO,CAAC,CAAC,WAAW,KAAA,CAAS;AAClD;;AAGA,SAAgB,wBAAwB,KAA4C;CAClF,OAAOA,QAAM,IAAI,GAAG;AACtB;AAEA,SAAS,UAAU,UAAkC;CACnD,UAAU,IAAI,QAAQ;CACtB,aAAa;EACX,UAAU,OAAO,QAAQ;CAC3B;AACF;AAEA,SAAS,cAAuC;CAC9C,OAAO;AACT;AAEA,SAAS,oBAA6C;CACpD,OAAO;AACT;;;;;;;AAQA,SAAgB,+BAAwD;CACtE,gBAAgB;EACd,8BAAmC;CACrC,GAAG,CAAC,CAAC;CACL,OAAO,qBAAqB,WAAW,aAAa,iBAAiB;AACvE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContentValue, MessageLocaleProp } from "../../core/dist/define-content-type.js";
|
|
1
2
|
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
3
|
import "../../core/dist/index.js";
|
|
3
4
|
import { ComponentActions } from "../../sdk/actions/types.js";
|
|
@@ -31,94 +32,360 @@ export type ShippingAddressFieldsetData = {
|
|
|
31
32
|
lastName?: string | null;
|
|
32
33
|
} | null;
|
|
33
34
|
} | null;
|
|
34
|
-
export type ShippingAddressFieldsetProps = {
|
|
35
|
+
export type ShippingAddressFieldsetProps = MessageLocaleProp & {
|
|
35
36
|
/** Country used when the stored address has none. */
|
|
36
37
|
defaultCountry?: string;
|
|
37
38
|
/** Placeholder rows the loading skeleton draws. Set it to the number of Controls composed here. */
|
|
38
39
|
skeletonCount?: number;
|
|
39
|
-
/** Announced politely while the address resolves. Blank means no announcement. */
|
|
40
|
-
loadingLabel?: string;
|
|
41
|
-
/** Announced politely once the Controls mount. Blank means no announcement. */
|
|
42
|
-
loadedLabel?: string;
|
|
43
|
-
/** Accessible name of the `<fieldset>` group. Blank means no name is exposed. */
|
|
44
|
-
groupLabel?: string;
|
|
45
40
|
className?: string;
|
|
46
41
|
children?: ReactNode;
|
|
47
42
|
/** `ShippingAddressFieldsetData` forwarded by the reactive runtime. */
|
|
48
43
|
$data?: ShippingAddressFieldsetData;
|
|
49
44
|
/** Compiler-injected action surface; carries `shipping.setAddress`. */
|
|
50
45
|
$actions?: ComponentActions;
|
|
46
|
+
/** The two announcements, the group's accessible name and the required-field message. */
|
|
47
|
+
$content?: ContentValue<typeof ShippingAddressFieldsetContent>;
|
|
51
48
|
};
|
|
52
|
-
export type ShippingAddressStreetControlProps = {
|
|
49
|
+
export type ShippingAddressStreetControlProps = MessageLocaleProp & {
|
|
53
50
|
className?: string;
|
|
54
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
55
|
-
label?: string;
|
|
56
51
|
placeholder?: string;
|
|
57
52
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
58
53
|
children?: ReactNode;
|
|
54
|
+
$content?: ContentValue<typeof ShippingAddressStreetContent>;
|
|
59
55
|
};
|
|
60
|
-
export type ShippingAddressNumberControlProps = {
|
|
56
|
+
export type ShippingAddressNumberControlProps = MessageLocaleProp & {
|
|
61
57
|
className?: string;
|
|
62
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
63
|
-
label?: string;
|
|
64
58
|
placeholder?: string;
|
|
65
59
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
66
60
|
children?: ReactNode;
|
|
61
|
+
$content?: ContentValue<typeof ShippingAddressNumberContent>;
|
|
67
62
|
};
|
|
68
|
-
export type ShippingAddressCityControlProps = {
|
|
63
|
+
export type ShippingAddressCityControlProps = MessageLocaleProp & {
|
|
69
64
|
className?: string;
|
|
70
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
71
|
-
label?: string;
|
|
72
65
|
placeholder?: string;
|
|
73
66
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
74
67
|
children?: ReactNode;
|
|
68
|
+
$content?: ContentValue<typeof ShippingAddressCityContent>;
|
|
75
69
|
};
|
|
76
|
-
export type ShippingAddressStateControlProps = {
|
|
70
|
+
export type ShippingAddressStateControlProps = MessageLocaleProp & {
|
|
77
71
|
className?: string;
|
|
78
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
79
|
-
label?: string;
|
|
80
72
|
placeholder?: string;
|
|
81
73
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
82
74
|
children?: ReactNode;
|
|
75
|
+
$content?: ContentValue<typeof ShippingAddressStateContent>;
|
|
83
76
|
};
|
|
84
|
-
export type ShippingAddressPostalCodeControlProps = {
|
|
77
|
+
export type ShippingAddressPostalCodeControlProps = MessageLocaleProp & {
|
|
85
78
|
className?: string;
|
|
86
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
87
|
-
label?: string;
|
|
88
79
|
placeholder?: string;
|
|
89
80
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
90
81
|
children?: ReactNode;
|
|
82
|
+
$content?: ContentValue<typeof ShippingAddressPostalCodeContent>;
|
|
91
83
|
};
|
|
92
|
-
export type ShippingAddressComplementControlProps = {
|
|
84
|
+
export type ShippingAddressComplementControlProps = MessageLocaleProp & {
|
|
93
85
|
className?: string;
|
|
94
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
95
|
-
label?: string;
|
|
96
86
|
placeholder?: string;
|
|
97
87
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
98
88
|
children?: ReactNode;
|
|
89
|
+
$content?: ContentValue<typeof ShippingAddressComplementContent>;
|
|
99
90
|
};
|
|
100
|
-
export type ShippingAddressNeighborhoodControlProps = {
|
|
91
|
+
export type ShippingAddressNeighborhoodControlProps = MessageLocaleProp & {
|
|
101
92
|
className?: string;
|
|
102
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
103
|
-
label?: string;
|
|
104
93
|
placeholder?: string;
|
|
105
94
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
106
95
|
children?: ReactNode;
|
|
96
|
+
$content?: ContentValue<typeof ShippingAddressNeighborhoodContent>;
|
|
107
97
|
};
|
|
108
|
-
export type ShippingAddressCountryControlProps = {
|
|
98
|
+
export type ShippingAddressCountryControlProps = MessageLocaleProp & {
|
|
109
99
|
className?: string;
|
|
110
|
-
|
|
100
|
+
/** Shown when the field has no value. Absence shows the active country's name. */
|
|
111
101
|
placeholder?: string;
|
|
112
102
|
/** Recomposes the anatomy. Absence renders Field.Label, FieldSelect.Root, Field.Error. */
|
|
113
103
|
children?: ReactNode;
|
|
104
|
+
$content?: ContentValue<typeof ShippingAddressCountryContent>;
|
|
114
105
|
};
|
|
115
|
-
export type ShippingAddressRecipientNameControlProps = {
|
|
106
|
+
export type ShippingAddressRecipientNameControlProps = MessageLocaleProp & {
|
|
116
107
|
className?: string;
|
|
117
|
-
/** Overrides the descriptor's label. Absence means the platform's value. */
|
|
118
|
-
label?: string;
|
|
119
108
|
placeholder?: string;
|
|
120
109
|
/** Recomposes the anatomy. Absence renders Field.Label, Field.Control, Field.Error. */
|
|
121
110
|
children?: ReactNode;
|
|
111
|
+
$content?: ContentValue<typeof ShippingAddressRecipientNameContent>;
|
|
112
|
+
};
|
|
113
|
+
export declare const ShippingAddressFieldsetContent: {
|
|
114
|
+
readonly id: "shipping-address-fieldset";
|
|
115
|
+
readonly title: "Shipping Address Fieldset";
|
|
116
|
+
readonly description: "Announcements and accessible name of the delivery address group, and its required-field message.";
|
|
117
|
+
readonly schema: {
|
|
118
|
+
readonly type: "object";
|
|
119
|
+
readonly additionalProperties: false;
|
|
120
|
+
readonly properties: {
|
|
121
|
+
readonly loadingLabel: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly title: "Loading announcement";
|
|
124
|
+
readonly description: "Announced politely while the address resolves.";
|
|
125
|
+
readonly format: "icu-message";
|
|
126
|
+
readonly messageSource: "Loading your delivery address";
|
|
127
|
+
};
|
|
128
|
+
readonly loadedLabel: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly title: "Loaded announcement";
|
|
131
|
+
readonly description: "Announced politely once the fields mount.";
|
|
132
|
+
readonly format: "icu-message";
|
|
133
|
+
readonly messageSource: "Your delivery address is ready";
|
|
134
|
+
};
|
|
135
|
+
readonly groupLabel: {
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
readonly title: "Accessible group name";
|
|
138
|
+
readonly description: "A composed FieldsetLegend wins over it.";
|
|
139
|
+
readonly format: "icu-message";
|
|
140
|
+
readonly messageSource: "Your delivery address";
|
|
141
|
+
readonly messageOptional: true;
|
|
142
|
+
};
|
|
143
|
+
readonly requiredMessage: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly title: "Required field message";
|
|
146
|
+
readonly description: "Shown under a required field left blank; label is that field's label.";
|
|
147
|
+
readonly format: "icu-message";
|
|
148
|
+
readonly messageSource: "{label} is required";
|
|
149
|
+
readonly messageArguments: {
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly properties: {
|
|
152
|
+
readonly label: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly messageExample: {
|
|
158
|
+
readonly label: "recipient name";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly missingRecipientNameMessage: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly title: "Missing recipient name message";
|
|
164
|
+
readonly description: "Shown by FormError when the server refuses a blank recipient name.";
|
|
165
|
+
readonly format: "icu-message";
|
|
166
|
+
readonly messageSource: "Enter the recipient's name.";
|
|
167
|
+
};
|
|
168
|
+
readonly invalidPostalCodeMessage: {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
readonly title: "Invalid postal code message";
|
|
171
|
+
readonly description: "Shown by FormError when the server refuses the postal code.";
|
|
172
|
+
readonly format: "icu-message";
|
|
173
|
+
readonly messageSource: "Enter a valid postal code.";
|
|
174
|
+
};
|
|
175
|
+
readonly invalidAddressMessage: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
readonly title: "Invalid address message";
|
|
178
|
+
readonly description: "Shown by FormError when the server refuses the address.";
|
|
179
|
+
readonly format: "icu-message";
|
|
180
|
+
readonly messageSource: "Check the address and try again.";
|
|
181
|
+
};
|
|
182
|
+
readonly genericErrorMessage: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly title: "Generic error message";
|
|
185
|
+
readonly description: "Shown by FormError for a network failure or a refusal the shopper cannot fix.";
|
|
186
|
+
readonly format: "icu-message";
|
|
187
|
+
readonly messageSource: "Unable to save your delivery address. Please try again.";
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
export declare const ShippingAddressRecipientNameContent: {
|
|
193
|
+
readonly id: "shipping-address-recipient-name";
|
|
194
|
+
readonly title: "Shipping Address Recipient Name";
|
|
195
|
+
readonly description: "Label of the recipient name field of the delivery address.";
|
|
196
|
+
readonly schema: {
|
|
197
|
+
readonly type: "object";
|
|
198
|
+
readonly additionalProperties: false;
|
|
199
|
+
readonly properties: {
|
|
200
|
+
readonly label: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly title: "Field label";
|
|
203
|
+
readonly format: "icu-message";
|
|
204
|
+
readonly messageSource: "recipient name";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
export declare const ShippingAddressStreetContent: {
|
|
210
|
+
readonly id: "shipping-address-street";
|
|
211
|
+
readonly title: "Shipping Address Street";
|
|
212
|
+
readonly description: "Label of the street field of the delivery address.";
|
|
213
|
+
readonly schema: {
|
|
214
|
+
readonly type: "object";
|
|
215
|
+
readonly additionalProperties: false;
|
|
216
|
+
readonly properties: {
|
|
217
|
+
readonly label: {
|
|
218
|
+
readonly type: "string";
|
|
219
|
+
readonly title: "Field label";
|
|
220
|
+
readonly format: "icu-message";
|
|
221
|
+
readonly messageSource: "street";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
export declare const ShippingAddressNumberContent: {
|
|
227
|
+
readonly id: "shipping-address-number";
|
|
228
|
+
readonly title: "Shipping Address Number";
|
|
229
|
+
readonly description: "Label of the number field of the delivery address.";
|
|
230
|
+
readonly schema: {
|
|
231
|
+
readonly type: "object";
|
|
232
|
+
readonly additionalProperties: false;
|
|
233
|
+
readonly properties: {
|
|
234
|
+
readonly label: {
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
readonly title: "Field label";
|
|
237
|
+
readonly format: "icu-message";
|
|
238
|
+
readonly messageSource: "number";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
export declare const ShippingAddressComplementContent: {
|
|
244
|
+
readonly id: "shipping-address-complement";
|
|
245
|
+
readonly title: "Shipping Address Complement";
|
|
246
|
+
readonly description: "Label of the complement field of the delivery address.";
|
|
247
|
+
readonly schema: {
|
|
248
|
+
readonly type: "object";
|
|
249
|
+
readonly additionalProperties: false;
|
|
250
|
+
readonly properties: {
|
|
251
|
+
readonly label: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly title: "Field label";
|
|
254
|
+
readonly format: "icu-message";
|
|
255
|
+
readonly messageSource: "apartment, suite, etc. (optional)";
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
export declare const ShippingAddressNeighborhoodContent: {
|
|
261
|
+
readonly id: "shipping-address-neighborhood";
|
|
262
|
+
readonly title: "Shipping Address Neighborhood";
|
|
263
|
+
readonly description: "Label of the neighborhood field of the delivery address.";
|
|
264
|
+
readonly schema: {
|
|
265
|
+
readonly type: "object";
|
|
266
|
+
readonly additionalProperties: false;
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly label: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly title: "Field label";
|
|
271
|
+
readonly format: "icu-message";
|
|
272
|
+
readonly messageSource: "neighborhood";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
export declare const ShippingAddressCityContent: {
|
|
278
|
+
readonly id: "shipping-address-city";
|
|
279
|
+
readonly title: "Shipping Address City";
|
|
280
|
+
readonly description: "Label of the city field of the delivery address.";
|
|
281
|
+
readonly schema: {
|
|
282
|
+
readonly type: "object";
|
|
283
|
+
readonly additionalProperties: false;
|
|
284
|
+
readonly properties: {
|
|
285
|
+
readonly label: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly title: "Field label";
|
|
288
|
+
readonly format: "icu-message";
|
|
289
|
+
readonly messageSource: "city";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
export declare const ShippingAddressStateContent: {
|
|
295
|
+
readonly id: "shipping-address-state";
|
|
296
|
+
readonly title: "Shipping Address State";
|
|
297
|
+
readonly description: "Label of the state field of the delivery address, worded per country.";
|
|
298
|
+
readonly schema: {
|
|
299
|
+
readonly type: "object";
|
|
300
|
+
readonly additionalProperties: false;
|
|
301
|
+
readonly properties: {
|
|
302
|
+
readonly label: {
|
|
303
|
+
readonly type: "string";
|
|
304
|
+
readonly title: "Field label";
|
|
305
|
+
readonly description: "country is the active country (ISO 3166-1 alpha-3).";
|
|
306
|
+
readonly format: "icu-message";
|
|
307
|
+
readonly messageSource: "{country, select, CAN {province} other {state}}";
|
|
308
|
+
readonly messageArguments: {
|
|
309
|
+
readonly type: "object";
|
|
310
|
+
readonly properties: {
|
|
311
|
+
readonly country: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
readonly enum: readonly ["BRA", "USA", "CAN", "MEX"];
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly messageExample: {
|
|
318
|
+
readonly country: "CAN";
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
export declare const ShippingAddressPostalCodeContent: {
|
|
325
|
+
readonly id: "shipping-address-postal-code";
|
|
326
|
+
readonly title: "Shipping Address Postal Code";
|
|
327
|
+
readonly description: "Label of the postal code field of the delivery address and its format message, worded per country.";
|
|
328
|
+
readonly schema: {
|
|
329
|
+
readonly type: "object";
|
|
330
|
+
readonly additionalProperties: false;
|
|
331
|
+
readonly properties: {
|
|
332
|
+
readonly label: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly title: "Field label";
|
|
335
|
+
readonly description: "country is the active country (ISO 3166-1 alpha-3).";
|
|
336
|
+
readonly format: "icu-message";
|
|
337
|
+
readonly messageSource: "{country, select, USA {zip code} other {postal code}}";
|
|
338
|
+
readonly messageArguments: {
|
|
339
|
+
readonly type: "object";
|
|
340
|
+
readonly properties: {
|
|
341
|
+
readonly country: {
|
|
342
|
+
readonly type: "string";
|
|
343
|
+
readonly enum: readonly ["BRA", "USA", "CAN", "MEX"];
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
readonly messageExample: {
|
|
348
|
+
readonly country: "USA";
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly invalidMessage: {
|
|
352
|
+
readonly type: "string";
|
|
353
|
+
readonly title: "Invalid postal code message";
|
|
354
|
+
readonly description: "Shown under a postal code not in the active country's format. Never contains the typed value.";
|
|
355
|
+
readonly format: "icu-message";
|
|
356
|
+
readonly messageSource: "{country, select, USA {invalid zip code} other {invalid postal code}}";
|
|
357
|
+
readonly messageArguments: {
|
|
358
|
+
readonly type: "object";
|
|
359
|
+
readonly properties: {
|
|
360
|
+
readonly country: {
|
|
361
|
+
readonly type: "string";
|
|
362
|
+
readonly enum: readonly ["BRA", "USA", "CAN", "MEX"];
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly messageExample: {
|
|
367
|
+
readonly country: "USA";
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
export declare const ShippingAddressCountryContent: {
|
|
374
|
+
readonly id: "shipping-address-country";
|
|
375
|
+
readonly title: "Shipping Address Country";
|
|
376
|
+
readonly description: "Label of the country selector of the delivery address.";
|
|
377
|
+
readonly schema: {
|
|
378
|
+
readonly type: "object";
|
|
379
|
+
readonly additionalProperties: false;
|
|
380
|
+
readonly properties: {
|
|
381
|
+
readonly label: {
|
|
382
|
+
readonly type: "string";
|
|
383
|
+
readonly title: "Field label";
|
|
384
|
+
readonly format: "icu-message";
|
|
385
|
+
readonly messageSource: "country";
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
122
389
|
};
|
|
123
390
|
export declare const ShippingAddressFieldsetDefinition: ComponentDefinition<ShippingAddressFieldsetProps>;
|
|
124
391
|
export declare const ShippingAddressRecipientNameControlDefinition: ComponentDefinition<ShippingAddressRecipientNameControlProps>;
|
|
@@ -157,7 +424,7 @@ export declare const ShippingAddressCountryControlDefinition: ComponentDefinitio
|
|
|
157
424
|
* polite live region that announces `loadingLabel` and then `loadedLabel`. Style the region
|
|
158
425
|
* `sr-only` — it is text meant for a screen reader, not for the page.
|
|
159
426
|
*/
|
|
160
|
-
export declare function ShippingAddressFieldset({ defaultCountry, skeletonCount,
|
|
427
|
+
export declare function ShippingAddressFieldset({ defaultCountry, skeletonCount, className, children, $data: $dataProp, $actions: $actionsProp, $content }: ShippingAddressFieldsetProps): ReactNode;
|
|
161
428
|
export declare namespace ShippingAddressFieldset {
|
|
162
429
|
var Skeleton: typeof ShippingAddressFieldsetSkeleton;
|
|
163
430
|
}
|
|
@@ -174,28 +441,28 @@ export declare function ShippingAddressFieldsetSkeleton({ count, className, ...p
|
|
|
174
441
|
* too, against the active country's format.
|
|
175
442
|
* Pre-filled from clientProfile, editable, required.
|
|
176
443
|
*/
|
|
177
|
-
export declare function ShippingAddressRecipientNameControl({ className,
|
|
444
|
+
export declare function ShippingAddressRecipientNameControl({ className, placeholder, children, $content }: ShippingAddressRecipientNameControlProps): ReactNode;
|
|
178
445
|
/** StreetControl */
|
|
179
|
-
export declare function ShippingAddressStreetControl({ className,
|
|
446
|
+
export declare function ShippingAddressStreetControl({ className, placeholder, children, $content }: ShippingAddressStreetControlProps): ReactNode;
|
|
180
447
|
/** NumberControl */
|
|
181
|
-
export declare function ShippingAddressNumberControl({ className,
|
|
448
|
+
export declare function ShippingAddressNumberControl({ className, placeholder, children, $content }: ShippingAddressNumberControlProps): ReactNode;
|
|
182
449
|
/** CityControl */
|
|
183
|
-
export declare function ShippingAddressCityControl({ className,
|
|
184
|
-
/** StateControl */
|
|
185
|
-
export declare function ShippingAddressStateControl({ className,
|
|
186
|
-
/** PostalCodeControl */
|
|
187
|
-
export declare function ShippingAddressPostalCodeControl({ className,
|
|
450
|
+
export declare function ShippingAddressCityControl({ className, placeholder, children, $content }: ShippingAddressCityControlProps): ReactNode;
|
|
451
|
+
/** StateControl — its label is worded per country (`state`, `province`). */
|
|
452
|
+
export declare function ShippingAddressStateControl({ className, placeholder, children, $content }: ShippingAddressStateControlProps): ReactNode;
|
|
453
|
+
/** PostalCodeControl — its label and format message are worded per country. */
|
|
454
|
+
export declare function ShippingAddressPostalCodeControl({ className, placeholder, children, $content }: ShippingAddressPostalCodeControlProps): ReactNode;
|
|
188
455
|
/** ComplementControl */
|
|
189
|
-
export declare function ShippingAddressComplementControl({ className,
|
|
456
|
+
export declare function ShippingAddressComplementControl({ className, placeholder, children, $content }: ShippingAddressComplementControlProps): ReactNode;
|
|
190
457
|
/** NeighborhoodControl (BR-specific in v1) */
|
|
191
|
-
export declare function ShippingAddressNeighborhoodControl({ className,
|
|
458
|
+
export declare function ShippingAddressNeighborhoodControl({ className, placeholder, children, $content }: ShippingAddressNeighborhoodControlProps): ReactNode;
|
|
192
459
|
/**
|
|
193
460
|
* CountryControl — moves onto `FieldSelect` (Decision 8): the trigger resolves a country name from
|
|
194
461
|
* the field contract's `options`. Gated on `descriptor`, not on a per-field entry (country has
|
|
195
462
|
* none): a country with no descriptor renders no controls at all (Decision 3/4's "no entry, no
|
|
196
463
|
* control" applied to the field that selects the entry itself).
|
|
197
464
|
*/
|
|
198
|
-
export declare function ShippingAddressCountryControl({ className,
|
|
465
|
+
export declare function ShippingAddressCountryControl({ className, placeholder, children, $content }: ShippingAddressCountryControlProps): ReactNode;
|
|
199
466
|
export declare const ShippingAddress: {
|
|
200
467
|
Fieldset: typeof ShippingAddressFieldset;
|
|
201
468
|
FieldsetDefinition: ComponentDefinition<ShippingAddressFieldsetProps>;
|