@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
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { defineComponent } from "../../core/dist/define-component.js";
|
|
3
|
+
import { defineContentType } from "../../core/dist/define-content-type.js";
|
|
3
4
|
import "../../core/dist/index.js";
|
|
5
|
+
import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
|
|
4
6
|
import { Field, FieldBinding, FieldsetFieldContext, useFieldsetField, useFieldsetFieldNames, useNoAncestorFieldset } from "../../particles/field/field.js";
|
|
5
7
|
import { useActionsOverride } from "../../sdk/actions/actions-override-context.js";
|
|
8
|
+
import { formatErrorCode } from "../../sdk/i18n/format-error-code.js";
|
|
6
9
|
import { useDataOverride } from "../../sdk/data/data-override-context.js";
|
|
7
10
|
import { useSession } from "../session/session.js";
|
|
8
|
-
import { useFormRegistry } from "../../particles/form/form.js";
|
|
9
11
|
import { useEntityDataResolved } from "../../sdk/data/entity-resolution-context.js";
|
|
10
12
|
import { useReactiveDataSettled } from "../../sdk/data/use-reactive-data-settled.js";
|
|
13
|
+
import { useFormRegistry } from "../../particles/form/form.js";
|
|
11
14
|
import { Fieldset } from "../../particles/fieldset/fieldset.js";
|
|
12
15
|
import { DOCUMENTS, DocumentField, isSupportedDocumentType } from "../../particles/document-field/document-field.js";
|
|
13
16
|
import { PhoneField, toE164 } from "../../particles/phone-field/phone-field.js";
|
|
@@ -46,6 +49,119 @@ const fragment = `
|
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
`;
|
|
52
|
+
const ClientProfileFieldsetContent = defineContentType({
|
|
53
|
+
id: "client-profile-fieldset",
|
|
54
|
+
title: "Client Profile Fieldset",
|
|
55
|
+
description: "The profile fieldset's loading and loaded announcements and its accessible group name.",
|
|
56
|
+
schema: {
|
|
57
|
+
type: "object",
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
properties: {
|
|
60
|
+
loadingLabel: {
|
|
61
|
+
type: "string",
|
|
62
|
+
title: "Loading announcement",
|
|
63
|
+
format: "icu-message",
|
|
64
|
+
messageSource: "Loading your details"
|
|
65
|
+
},
|
|
66
|
+
loadedLabel: {
|
|
67
|
+
type: "string",
|
|
68
|
+
title: "Loaded announcement",
|
|
69
|
+
format: "icu-message",
|
|
70
|
+
messageSource: "Your details are ready"
|
|
71
|
+
},
|
|
72
|
+
groupLabel: {
|
|
73
|
+
type: "string",
|
|
74
|
+
title: "Accessible group name",
|
|
75
|
+
format: "icu-message",
|
|
76
|
+
messageSource: "Your details",
|
|
77
|
+
messageOptional: true
|
|
78
|
+
},
|
|
79
|
+
genericErrorMessage: {
|
|
80
|
+
type: "string",
|
|
81
|
+
title: "Generic error message",
|
|
82
|
+
description: "Shown by FormError when the details could not be saved.",
|
|
83
|
+
format: "icu-message",
|
|
84
|
+
messageSource: "Unable to save your details. Please try again."
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* The message for each refusal of the profile write: every `ClientProfileUpdateErrorCode` plus the
|
|
91
|
+
* client-minted transport failure. None is a fault the shopper can fix, so all share one message.
|
|
92
|
+
* `dispatch` hands `FormError` this copy, and genericErrorMessage for an unknown code.
|
|
93
|
+
*/
|
|
94
|
+
const CLIENT_PROFILE_FIELDSET_ERROR_FIELDS = {
|
|
95
|
+
MISSING_CART_CONTEXT: "genericErrorMessage",
|
|
96
|
+
CART_NOT_FOUND: "genericErrorMessage",
|
|
97
|
+
NO_PROFILE_FIELD_PROVIDED: "genericErrorMessage",
|
|
98
|
+
NETWORK_ERROR: "genericErrorMessage"
|
|
99
|
+
};
|
|
100
|
+
function wordClientProfileError(error, { format }) {
|
|
101
|
+
return {
|
|
102
|
+
code: error.code,
|
|
103
|
+
message: formatErrorCode(ClientProfileFieldsetContent, CLIENT_PROFILE_FIELDSET_ERROR_FIELDS, error, format, "genericErrorMessage")
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const ClientProfileFieldsetPhoneControlContent = defineContentType({
|
|
107
|
+
id: "client-profile-fieldset-phone",
|
|
108
|
+
title: "Client Profile Fieldset Phone Control",
|
|
109
|
+
description: "The phone control's label and its validation messages.",
|
|
110
|
+
schema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
label: {
|
|
115
|
+
type: "string",
|
|
116
|
+
title: "Label",
|
|
117
|
+
format: "icu-message",
|
|
118
|
+
messageSource: "Phone"
|
|
119
|
+
},
|
|
120
|
+
errorInvalid: {
|
|
121
|
+
type: "string",
|
|
122
|
+
title: "Invalid error message",
|
|
123
|
+
format: "icu-message",
|
|
124
|
+
messageSource: "Invalid phone number"
|
|
125
|
+
},
|
|
126
|
+
errorRequired: {
|
|
127
|
+
type: "string",
|
|
128
|
+
title: "Required error message",
|
|
129
|
+
format: "icu-message",
|
|
130
|
+
messageSource: "Phone number is required"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
const ClientProfileFirstNameControlContent = defineContentType({
|
|
136
|
+
id: "client-profile-first-name",
|
|
137
|
+
title: "Client Profile First Name Control",
|
|
138
|
+
description: "The first-name control's label.",
|
|
139
|
+
schema: {
|
|
140
|
+
type: "object",
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
properties: { label: {
|
|
143
|
+
type: "string",
|
|
144
|
+
title: "Label",
|
|
145
|
+
format: "icu-message",
|
|
146
|
+
messageSource: "First name"
|
|
147
|
+
} }
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const ClientProfileLastNameControlContent = defineContentType({
|
|
151
|
+
id: "client-profile-last-name",
|
|
152
|
+
title: "Client Profile Last Name Control",
|
|
153
|
+
description: "The last-name control's label.",
|
|
154
|
+
schema: {
|
|
155
|
+
type: "object",
|
|
156
|
+
additionalProperties: false,
|
|
157
|
+
properties: { label: {
|
|
158
|
+
type: "string",
|
|
159
|
+
title: "Label",
|
|
160
|
+
format: "icu-message",
|
|
161
|
+
messageSource: "Last name"
|
|
162
|
+
} }
|
|
163
|
+
}
|
|
164
|
+
});
|
|
49
165
|
/** No control publishes a rule today — a blocking `RegisterOptions` key would reopen the same submit
|
|
50
166
|
* block for a read-only session (Decision 6): `readOnly` disables a control's rendered `<input>` via a
|
|
51
167
|
* plain HTML attribute, never react-hook-form's own `disabled` registration option (`field.tsx`'s
|
|
@@ -71,6 +187,7 @@ const ClientProfileFieldsetDefinition = defineComponent({
|
|
|
71
187
|
name: "ClientProfileFieldset",
|
|
72
188
|
importPath: "@vtex/faststore/components",
|
|
73
189
|
component: ClientProfileFieldset,
|
|
190
|
+
content: ClientProfileFieldsetContent,
|
|
74
191
|
fragment,
|
|
75
192
|
fetchStrategy: "reactive",
|
|
76
193
|
skeleton: ClientProfileFieldsetSkeleton,
|
|
@@ -95,73 +212,49 @@ const ClientProfileFieldsetDefinition = defineComponent({
|
|
|
95
212
|
type: "number",
|
|
96
213
|
default: 4,
|
|
97
214
|
label: "Skeleton rows"
|
|
98
|
-
},
|
|
99
|
-
loadingLabel: {
|
|
100
|
-
type: "string",
|
|
101
|
-
default: "Loading your details",
|
|
102
|
-
label: "Loading announcement"
|
|
103
|
-
},
|
|
104
|
-
loadedLabel: {
|
|
105
|
-
type: "string",
|
|
106
|
-
default: "Your details are ready",
|
|
107
|
-
label: "Loaded announcement"
|
|
108
|
-
},
|
|
109
|
-
groupLabel: {
|
|
110
|
-
type: "string",
|
|
111
|
-
default: "Your details",
|
|
112
|
-
label: "Accessible group name"
|
|
113
215
|
}
|
|
114
216
|
},
|
|
115
|
-
guideline: "Registers a batched write of the ClientProfile entity with the enclosing FormRoot; renders one Fieldset.Root and no <form>. Must be inside a FormRoot with a SessionRoot ancestor. Compose ClientProfileFirstNameControl / ClientProfileLastNameControl / ClientProfileFieldsetPhoneControl / ClientProfileDocumentControl as children, in any order. The controls mount only once the profile has resolved, with skeletonCount placeholder rows in their place until then — set it to the number of controls composed, or the form jumps by the difference. Style the announcement sr-only. Dispatches only the fields the shopper changed. groupLabel names the group as its accessible name;
|
|
217
|
+
guideline: "Registers a batched write of the ClientProfile entity with the enclosing FormRoot; renders one Fieldset.Root and no <form>. Must be inside a FormRoot with a SessionRoot ancestor. Compose ClientProfileFirstNameControl / ClientProfileLastNameControl / ClientProfileFieldsetPhoneControl / ClientProfileDocumentControl as children, in any order. The controls mount only once the profile has resolved, with skeletonCount placeholder rows in their place until then — set it to the number of controls composed, or the form jumps by the difference. Style the announcement sr-only; it reads the $content fields loadingLabel and loadedLabel. Dispatches only the fields the shopper changed. The $content field groupLabel names the group as its accessible name; an unauthored one emits no aria-label, and a composed FieldsetLegend wins over it."
|
|
116
218
|
});
|
|
117
219
|
const ClientProfileFirstNameControlDefinition = defineComponent({
|
|
118
220
|
name: "ClientProfileFirstNameControl",
|
|
119
221
|
importPath: "@vtex/faststore/components",
|
|
120
222
|
component: ClientProfileFirstNameControl,
|
|
223
|
+
content: ClientProfileFirstNameControlContent,
|
|
121
224
|
requiresContext: "client-profile-fieldset",
|
|
122
225
|
providesContext: "field",
|
|
123
226
|
editor: {
|
|
124
227
|
label: "Client Profile First Name Control",
|
|
125
228
|
category: "identity"
|
|
126
229
|
},
|
|
127
|
-
schema: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
placeholder: {
|
|
133
|
-
type: "string",
|
|
134
|
-
label: "Placeholder"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
guideline: "The bound first-name control; must be a descendant of ClientProfileFieldset. Renders Field.Root > Field.Label + Field.Control + Field.Error by default, or the composed children in the author's own order."
|
|
230
|
+
schema: { placeholder: {
|
|
231
|
+
type: "string",
|
|
232
|
+
label: "Placeholder"
|
|
233
|
+
} },
|
|
234
|
+
guideline: "The bound first-name control, labelled by the $content field label; must be a descendant of ClientProfileFieldset. Renders Field.Root > Field.Label + Field.Control + Field.Error by default, or the composed children in the author's own order."
|
|
138
235
|
});
|
|
139
236
|
const ClientProfileLastNameControlDefinition = defineComponent({
|
|
140
237
|
name: "ClientProfileLastNameControl",
|
|
141
238
|
importPath: "@vtex/faststore/components",
|
|
142
239
|
component: ClientProfileLastNameControl,
|
|
240
|
+
content: ClientProfileLastNameControlContent,
|
|
143
241
|
requiresContext: "client-profile-fieldset",
|
|
144
242
|
providesContext: "field",
|
|
145
243
|
editor: {
|
|
146
244
|
label: "Client Profile Last Name Control",
|
|
147
245
|
category: "identity"
|
|
148
246
|
},
|
|
149
|
-
schema: {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
placeholder: {
|
|
155
|
-
type: "string",
|
|
156
|
-
label: "Placeholder"
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
guideline: "The bound last-name control; must be a descendant of ClientProfileFieldset. Renders Field.Root > Field.Label + Field.Control + Field.Error by default, or the composed children in the author's own order."
|
|
247
|
+
schema: { placeholder: {
|
|
248
|
+
type: "string",
|
|
249
|
+
label: "Placeholder"
|
|
250
|
+
} },
|
|
251
|
+
guideline: "The bound last-name control, labelled by the $content field label; must be a descendant of ClientProfileFieldset. Renders Field.Root > Field.Label + Field.Control + Field.Error by default, or the composed children in the author's own order."
|
|
160
252
|
});
|
|
161
253
|
const ClientProfileFieldsetPhoneControlDefinition = defineComponent({
|
|
162
254
|
name: "ClientProfileFieldsetPhoneControl",
|
|
163
255
|
importPath: "@vtex/faststore/components",
|
|
164
256
|
component: ClientProfileFieldsetPhoneControl,
|
|
257
|
+
content: ClientProfileFieldsetPhoneControlContent,
|
|
165
258
|
requiresContext: "client-profile-fieldset",
|
|
166
259
|
providesContext: ["field", "phone-field"],
|
|
167
260
|
editor: {
|
|
@@ -169,10 +262,6 @@ const ClientProfileFieldsetPhoneControlDefinition = defineComponent({
|
|
|
169
262
|
category: "identity"
|
|
170
263
|
},
|
|
171
264
|
schema: {
|
|
172
|
-
label: {
|
|
173
|
-
type: "string",
|
|
174
|
-
label: "Label"
|
|
175
|
-
},
|
|
176
265
|
placeholder: {
|
|
177
266
|
type: "string",
|
|
178
267
|
label: "Placeholder"
|
|
@@ -180,17 +269,9 @@ const ClientProfileFieldsetPhoneControlDefinition = defineComponent({
|
|
|
180
269
|
requirement: {
|
|
181
270
|
type: ["mandatory", "optional"],
|
|
182
271
|
label: "Requirement"
|
|
183
|
-
},
|
|
184
|
-
errorInvalid: {
|
|
185
|
-
type: "string",
|
|
186
|
-
label: "Invalid error message"
|
|
187
|
-
},
|
|
188
|
-
errorRequired: {
|
|
189
|
-
type: "string",
|
|
190
|
-
label: "Required error message"
|
|
191
272
|
}
|
|
192
273
|
},
|
|
193
|
-
guideline: "The bound phone control; must be a descendant of ClientProfileFieldset. Distinct from ClientProfilePhoneControl (matter/client-profile), which writes on blur and requires the client-profile context — the two cannot compile into each other's container. Composes the PhoneField particle: recomposable (RFC:503) — given children, they replace PhoneField's default Field.Label + PhoneFieldInput + Field.Error anatomy, in any order; childless keeps today's order. Its className styles PhoneField's own root, the node that lays out label, input and error — not the wrapper, which carries only the data-fs-client-profile-fieldset-field=\"phone\" styling hook. A store that does not want a phone field omits this element from the page: requirement only governs required validation, never visibility."
|
|
274
|
+
guideline: "The bound phone control; must be a descendant of ClientProfileFieldset. Its label and its invalid and required messages are the $content fields label, errorInvalid and errorRequired. Distinct from ClientProfilePhoneControl (matter/client-profile), which writes on blur and requires the client-profile context — the two cannot compile into each other's container. Composes the PhoneField particle: recomposable (RFC:503) — given children, they replace PhoneField's default Field.Label + PhoneFieldInput + Field.Error anatomy, in any order; childless keeps today's order. Its className styles PhoneField's own root, the node that lays out label, input and error — not the wrapper, which carries only the data-fs-client-profile-fieldset-field=\"phone\" styling hook. A store that does not want a phone field omits this element from the page: requirement only governs required validation, never visibility."
|
|
194
275
|
});
|
|
195
276
|
const ClientProfileDocumentControlDefinition = defineComponent({
|
|
196
277
|
name: "ClientProfileDocumentControl",
|
|
@@ -240,13 +321,16 @@ const ClientProfileDocumentControlDefinition = defineComponent({
|
|
|
240
321
|
* carries trees with no reactive root above them, where the slice arrives as a plain prop.
|
|
241
322
|
*
|
|
242
323
|
* Both ends of that wait are spoken: the fieldset carries `aria-busy` while it lasts and holds a polite
|
|
243
|
-
* live region that announces `loadingLabel` and then `loadedLabel
|
|
324
|
+
* live region that announces the `loadingLabel` and then the `loadedLabel` message. Style the region `sr-only` — it is
|
|
244
325
|
* text meant for a screen reader, not for the page.
|
|
245
326
|
*/
|
|
246
|
-
function ClientProfileFieldset({ country = "US", documentType, skeletonCount = CLIENT_PROFILE_SKELETON_ROWS,
|
|
327
|
+
function ClientProfileFieldset({ country = "US", documentType, skeletonCount = CLIENT_PROFILE_SKELETON_ROWS, $content, $locale, className, children, $data: $dataProp, $actions: $actionsProp }) {
|
|
247
328
|
useNoAncestorFieldset("ClientProfileFieldset");
|
|
248
329
|
const $data = useDataOverride($dataProp);
|
|
249
330
|
const $actions = useActionsOverride($actionsProp);
|
|
331
|
+
const messages = useMessageFormatter(ClientProfileFieldsetContent, $content);
|
|
332
|
+
const { format } = messages;
|
|
333
|
+
const groupLabel = format("groupLabel");
|
|
250
334
|
const settled = useReactiveDataSettled();
|
|
251
335
|
const sliceResolved = useEntityDataResolved();
|
|
252
336
|
const resolved = settled && sliceResolved && $data !== void 0;
|
|
@@ -259,7 +343,8 @@ function ClientProfileFieldset({ country = "US", documentType, skeletonCount = C
|
|
|
259
343
|
country,
|
|
260
344
|
documentType,
|
|
261
345
|
readOnly,
|
|
262
|
-
getFieldState
|
|
346
|
+
getFieldState,
|
|
347
|
+
messages
|
|
263
348
|
});
|
|
264
349
|
useEffect(() => {
|
|
265
350
|
latest.current = {
|
|
@@ -267,21 +352,23 @@ function ClientProfileFieldset({ country = "US", documentType, skeletonCount = C
|
|
|
267
352
|
country,
|
|
268
353
|
documentType,
|
|
269
354
|
readOnly,
|
|
270
|
-
getFieldState
|
|
355
|
+
getFieldState,
|
|
356
|
+
messages
|
|
271
357
|
};
|
|
272
358
|
}, [
|
|
273
359
|
$actions,
|
|
274
360
|
country,
|
|
275
361
|
documentType,
|
|
276
362
|
readOnly,
|
|
277
|
-
getFieldState
|
|
363
|
+
getFieldState,
|
|
364
|
+
messages
|
|
278
365
|
]);
|
|
279
366
|
const { registry: fieldsetRegistry, getFieldNames } = useFieldsetFieldNames("clientProfile");
|
|
280
367
|
const dispatch = useCallback(async (payload) => {
|
|
281
368
|
if (latest.current.readOnly) throw new Error("ClientProfileFieldset cannot dispatch while the session is read-only.");
|
|
282
369
|
const update = latest.current.$actions?.identity?.clientProfileUpdate;
|
|
283
370
|
if (!update) throw new Error("ClientProfileFieldset requires $actions.identity.clientProfileUpdate.");
|
|
284
|
-
return update(payload);
|
|
371
|
+
return (await update(payload)).map((error) => wordClientProfileError(error, latest.current.messages));
|
|
285
372
|
}, []);
|
|
286
373
|
const toPayload = useCallback((values) => {
|
|
287
374
|
const { country: activeCountry, documentType: activeDocumentType, getFieldState } = latest.current;
|
|
@@ -331,7 +418,7 @@ function ClientProfileFieldset({ country = "US", documentType, skeletonCount = C
|
|
|
331
418
|
documentType
|
|
332
419
|
]);
|
|
333
420
|
const [announcement, setAnnouncement] = useState("");
|
|
334
|
-
const announced = resolved ? loadedLabel : loadingLabel;
|
|
421
|
+
const announced = format(resolved ? "loadedLabel" : "loadingLabel");
|
|
335
422
|
useEffect(() => {
|
|
336
423
|
setAnnouncement(announced);
|
|
337
424
|
}, [announced]);
|
|
@@ -339,7 +426,7 @@ function ClientProfileFieldset({ country = "US", documentType, skeletonCount = C
|
|
|
339
426
|
className,
|
|
340
427
|
disabled: readOnly,
|
|
341
428
|
"aria-busy": resolved ? void 0 : true,
|
|
342
|
-
...groupLabel
|
|
429
|
+
...groupLabel.trim() ? { "aria-label": groupLabel } : {},
|
|
343
430
|
"data-fs-client-profile-fieldset": "",
|
|
344
431
|
...resolved ? {} : { "data-fs-client-profile-fieldset-pending": "" },
|
|
345
432
|
...readOnly ? { "data-fs-client-profile-fieldset-readonly": "" } : {},
|
|
@@ -371,12 +458,12 @@ function ClientProfileFieldsetSkeleton({ count = CLIENT_PROFILE_SKELETON_ROWS, c
|
|
|
371
458
|
});
|
|
372
459
|
}
|
|
373
460
|
ClientProfileFieldset.Skeleton = ClientProfileFieldsetSkeleton;
|
|
374
|
-
function ProfileTextControl({ fieldKey, attr, autoComplete,
|
|
461
|
+
function ProfileTextControl({ fieldKey, attr, autoComplete, label, placeholder, className, children }) {
|
|
375
462
|
const { namespace, saved, readOnly, rules } = useClientProfileFieldsetContext();
|
|
376
463
|
const name = useFieldsetField(namespace, fieldKey);
|
|
377
464
|
return /* @__PURE__ */ jsx(FieldBinding, {
|
|
378
465
|
name,
|
|
379
|
-
label
|
|
466
|
+
label,
|
|
380
467
|
placeholder,
|
|
381
468
|
defaultValue: saved[fieldKey],
|
|
382
469
|
rule: rules[fieldKey],
|
|
@@ -393,25 +480,25 @@ function ProfileTextControl({ fieldKey, attr, autoComplete, defaultLabel, label,
|
|
|
393
480
|
})
|
|
394
481
|
});
|
|
395
482
|
}
|
|
396
|
-
function ClientProfileFirstNameControl({
|
|
483
|
+
function ClientProfileFirstNameControl({ placeholder, $content, $locale, className, children }) {
|
|
484
|
+
const { format } = useMessageFormatter(ClientProfileFirstNameControlContent, $content);
|
|
397
485
|
return /* @__PURE__ */ jsx(ProfileTextControl, {
|
|
398
486
|
fieldKey: "firstName",
|
|
399
487
|
attr: "first-name",
|
|
400
488
|
autoComplete: "given-name",
|
|
401
|
-
|
|
402
|
-
label,
|
|
489
|
+
label: format("label"),
|
|
403
490
|
placeholder,
|
|
404
491
|
className,
|
|
405
492
|
children
|
|
406
493
|
});
|
|
407
494
|
}
|
|
408
|
-
function ClientProfileLastNameControl({
|
|
495
|
+
function ClientProfileLastNameControl({ placeholder, $content, $locale, className, children }) {
|
|
496
|
+
const { format } = useMessageFormatter(ClientProfileLastNameControlContent, $content);
|
|
409
497
|
return /* @__PURE__ */ jsx(ProfileTextControl, {
|
|
410
498
|
fieldKey: "lastName",
|
|
411
499
|
attr: "last-name",
|
|
412
500
|
autoComplete: "family-name",
|
|
413
|
-
|
|
414
|
-
label,
|
|
501
|
+
label: format("label"),
|
|
415
502
|
placeholder,
|
|
416
503
|
className,
|
|
417
504
|
children
|
|
@@ -424,12 +511,13 @@ function ClientProfileLastNameControl({ label, placeholder, className, children
|
|
|
424
511
|
* state for this control to second-guess; `requirement` only ever raises the field to required,
|
|
425
512
|
* and left unset it raises nothing.
|
|
426
513
|
*/
|
|
427
|
-
function ClientProfileFieldsetPhoneControl({
|
|
514
|
+
function ClientProfileFieldsetPhoneControl({ placeholder, requirement, $content, $locale, className, children }) {
|
|
428
515
|
const { namespace, saved, readOnly, rules, country } = useClientProfileFieldsetContext();
|
|
429
516
|
const name = useFieldsetField(namespace, "phone");
|
|
517
|
+
const { format } = useMessageFormatter(ClientProfileFieldsetPhoneControlContent, $content);
|
|
430
518
|
const binding = /* @__PURE__ */ jsx(FieldBinding, {
|
|
431
519
|
name,
|
|
432
|
-
label,
|
|
520
|
+
label: format("label"),
|
|
433
521
|
placeholder,
|
|
434
522
|
defaultValue: saved.phone,
|
|
435
523
|
rule: rules.phone,
|
|
@@ -437,8 +525,8 @@ function ClientProfileFieldsetPhoneControl({ label, placeholder, requirement, er
|
|
|
437
525
|
children: /* @__PURE__ */ jsx(PhoneField, {
|
|
438
526
|
country,
|
|
439
527
|
requirement,
|
|
440
|
-
errorInvalid,
|
|
441
|
-
errorRequired,
|
|
528
|
+
errorInvalid: format("errorInvalid"),
|
|
529
|
+
errorRequired: format("errorRequired"),
|
|
442
530
|
className,
|
|
443
531
|
children
|
|
444
532
|
})
|
|
@@ -486,6 +574,6 @@ function ClientProfileDocumentControl({ label, placeholder, errorMessage, classN
|
|
|
486
574
|
});
|
|
487
575
|
}
|
|
488
576
|
//#endregion
|
|
489
|
-
export { ClientProfileDocumentControl, ClientProfileDocumentControlDefinition, ClientProfileFieldset, ClientProfileFieldsetDefinition, ClientProfileFieldsetPhoneControl, ClientProfileFieldsetPhoneControlDefinition, ClientProfileFieldsetSkeleton, ClientProfileFirstNameControl, ClientProfileFirstNameControlDefinition, ClientProfileLastNameControl, ClientProfileLastNameControlDefinition };
|
|
577
|
+
export { CLIENT_PROFILE_FIELDSET_ERROR_FIELDS, ClientProfileDocumentControl, ClientProfileDocumentControlDefinition, ClientProfileFieldset, ClientProfileFieldsetContent, ClientProfileFieldsetDefinition, ClientProfileFieldsetPhoneControl, ClientProfileFieldsetPhoneControlContent, ClientProfileFieldsetPhoneControlDefinition, ClientProfileFieldsetSkeleton, ClientProfileFirstNameControl, ClientProfileFirstNameControlContent, ClientProfileFirstNameControlDefinition, ClientProfileLastNameControl, ClientProfileLastNameControlContent, ClientProfileLastNameControlDefinition };
|
|
490
578
|
|
|
491
579
|
//# sourceMappingURL=client-profile-fieldset.js.map
|