@vtex/faststore 0.0.1
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 +18 -0
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/actions.json +334 -0
- package/dist/catalog.json +6615 -0
- package/dist/client.d.ts +17 -0
- package/dist/client.js +8 -0
- package/dist/components.d.ts +87 -0
- package/dist/components.js +87 -0
- package/dist/content-types.json +684 -0
- package/dist/core/dist/actions/mock-action.d.ts +24 -0
- package/dist/core/dist/actions/mock-action.js +28 -0
- package/dist/core/dist/actions/mock-action.js.map +1 -0
- package/dist/core/dist/actions/registry.d.ts +24 -0
- package/dist/core/dist/actions/registry.js +28 -0
- package/dist/core/dist/actions/registry.js.map +1 -0
- package/dist/core/dist/define-component.d.ts +100 -0
- package/dist/core/dist/define-component.js +8 -0
- package/dist/core/dist/define-component.js.map +1 -0
- package/dist/core/dist/define-content-type.d.ts +95 -0
- package/dist/core/dist/define-content-type.js +283 -0
- package/dist/core/dist/define-content-type.js.map +1 -0
- package/dist/core/dist/index.d.ts +7 -0
- package/dist/core/dist/index.js +5 -0
- package/dist/core/dist/schema/generated/schema.d.ts +28 -0
- package/dist/core/dist/types.d.ts +1 -0
- package/dist/docs/access-code-field.md +100 -0
- package/dist/docs/access-code-sign-in.md +174 -0
- package/dist/docs/account-entry-point.md +155 -0
- package/dist/docs/address-summary.md +50 -0
- package/dist/docs/buy-button.md +162 -0
- package/dist/docs/carousel.md +105 -0
- package/dist/docs/cart-item.md +162 -0
- package/dist/docs/cart-totalizer.md +197 -0
- package/dist/docs/cart.md +495 -0
- package/dist/docs/client-preferences.md +184 -0
- package/dist/docs/client-profile-form.md +192 -0
- package/dist/docs/client-profile.md +117 -0
- package/dist/docs/container.md +97 -0
- package/dist/docs/document-field.md +97 -0
- package/dist/docs/email-field.md +93 -0
- package/dist/docs/email-identification.md +102 -0
- package/dist/docs/footer-copyright.md +112 -0
- package/dist/docs/footer-link-group.md +162 -0
- package/dist/docs/footer-root.md +145 -0
- package/dist/docs/footer-social.md +151 -0
- package/dist/docs/free-shipping-progress.md +87 -0
- package/dist/docs/gallery.md +84 -0
- package/dist/docs/header-root.md +150 -0
- package/dist/docs/identity-edit.md +88 -0
- package/dist/docs/identity-summary.md +106 -0
- package/dist/docs/incentives.md +151 -0
- package/dist/docs/logo.md +135 -0
- package/dist/docs/meter.md +67 -0
- package/dist/docs/navigation-link-list.md +171 -0
- package/dist/docs/navigation-link.md +163 -0
- package/dist/docs/navigation-menu.md +264 -0
- package/dist/docs/payment-methods.md +139 -0
- package/dist/docs/phone-field.md +106 -0
- package/dist/docs/postal-code-field.md +126 -0
- package/dist/docs/pricing.md +499 -0
- package/dist/docs/product-gallery.md +409 -0
- package/dist/docs/product-information.md +295 -0
- package/dist/docs/product-list.md +170 -0
- package/dist/docs/product-quantity.md +88 -0
- package/dist/docs/product-shelf.md +141 -0
- package/dist/docs/promotion.md +109 -0
- package/dist/docs/region.md +225 -0
- package/dist/docs/session.md +123 -0
- package/dist/docs/shipping-address.md +390 -0
- package/dist/docs/shipping-simulator.md +147 -0
- package/dist/docs/sign-in-form.md +117 -0
- package/dist/docs/tabs.md +176 -0
- package/dist/docs/toast.md +124 -0
- package/dist/docs/variant-selector.md +450 -0
- package/dist/graphql/define-subgraph.d.ts +12 -0
- package/dist/graphql/define-subgraph.js +15 -0
- package/dist/graphql/define-subgraph.js.map +1 -0
- package/dist/graphql/gql.d.ts +10 -0
- package/dist/graphql/gql.js +16 -0
- package/dist/graphql/gql.js.map +1 -0
- package/dist/graphql/types.d.ts +88 -0
- package/dist/graphql.d.ts +4 -0
- package/dist/graphql.js +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +5 -0
- package/dist/internal/client.d.ts +24 -0
- package/dist/internal/client.js +23 -0
- package/dist/internal/content.d.ts +2 -0
- package/dist/internal/content.js +2 -0
- package/dist/internal/server.d.ts +7 -0
- package/dist/internal/server.js +6 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +111 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js +387 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.d.ts +64 -0
- package/dist/matter/account-entry-point/account-entry-point.js +151 -0
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -0
- package/dist/matter/breadcrumb/breadcrumb.d.ts +40 -0
- package/dist/matter/breadcrumb/breadcrumb.js +155 -0
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/matter/buy-button/buy-button.d.ts +95 -0
- package/dist/matter/buy-button/buy-button.js +259 -0
- package/dist/matter/buy-button/buy-button.js.map +1 -0
- package/dist/matter/cart/cart-namespace.d.ts +48 -0
- package/dist/matter/cart/cart-namespace.js +50 -0
- package/dist/matter/cart/cart-namespace.js.map +1 -0
- package/dist/matter/cart/cart.d.ts +312 -0
- package/dist/matter/cart/cart.js +1034 -0
- package/dist/matter/cart/cart.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +103 -0
- package/dist/matter/cart-item/cart-item.js +672 -0
- package/dist/matter/cart-item/cart-item.js.map +1 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.d.ts +49 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js +165 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.d.ts +28 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js +73 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.d.ts +33 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js +70 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.d.ts +24 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +54 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -0
- package/dist/matter/cart-item-variations/cart-item-variations.d.ts +27 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js +69 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -0
- package/dist/matter/cart-totalizer/cart-totalizer.d.ts +78 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js +220 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -0
- package/dist/matter/client-preferences/client-preferences.d.ts +50 -0
- package/dist/matter/client-preferences/client-preferences.js +206 -0
- package/dist/matter/client-preferences/client-preferences.js.map +1 -0
- package/dist/matter/client-profile/client-profile.d.ts +59 -0
- package/dist/matter/client-profile/client-profile.js +185 -0
- package/dist/matter/client-profile/client-profile.js.map +1 -0
- package/dist/matter/client-profile-form/client-profile-form.d.ts +126 -0
- package/dist/matter/client-profile-form/client-profile-form.js +660 -0
- package/dist/matter/client-profile-form/client-profile-form.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-accordion.d.ts +30 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js +189 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-controller.d.ts +49 -0
- package/dist/matter/delivery-options/delivery-options-controller.js +203 -0
- package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options.d.ts +31 -0
- package/dist/matter/delivery-options/delivery-options.js +103 -0
- package/dist/matter/delivery-options/delivery-options.js.map +1 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +9 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js +76 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -0
- package/dist/matter/email-identification/email-identification.d.ts +37 -0
- package/dist/matter/email-identification/email-identification.js +111 -0
- package/dist/matter/email-identification/email-identification.js.map +1 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +44 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +170 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -0
- package/dist/matter/identity-edit/identity-edit.d.ts +52 -0
- package/dist/matter/identity-edit/identity-edit.js +148 -0
- package/dist/matter/identity-edit/identity-edit.js.map +1 -0
- package/dist/matter/identity-summary/identity-summary.d.ts +128 -0
- package/dist/matter/identity-summary/identity-summary.js +344 -0
- package/dist/matter/identity-summary/identity-summary.js.map +1 -0
- package/dist/matter/pricing/pricing.d.ts +162 -0
- package/dist/matter/pricing/pricing.js +793 -0
- package/dist/matter/pricing/pricing.js.map +1 -0
- package/dist/matter/product-gallery/product-gallery.d.ts +23 -0
- package/dist/matter/product-gallery/product-gallery.js +188 -0
- package/dist/matter/product-gallery/product-gallery.js.map +1 -0
- package/dist/matter/product-information/product-information.d.ts +61 -0
- package/dist/matter/product-information/product-information.js +355 -0
- package/dist/matter/product-information/product-information.js.map +1 -0
- package/dist/matter/product-list/product-list.d.ts +86 -0
- package/dist/matter/product-list/product-list.js +342 -0
- package/dist/matter/product-list/product-list.js.map +1 -0
- package/dist/matter/product-quantity/product-quantity.d.ts +50 -0
- package/dist/matter/product-quantity/product-quantity.js +111 -0
- package/dist/matter/product-quantity/product-quantity.js.map +1 -0
- package/dist/matter/product-shelf/product-shelf.d.ts +125 -0
- package/dist/matter/product-shelf/product-shelf.js +376 -0
- package/dist/matter/product-shelf/product-shelf.js.map +1 -0
- package/dist/matter/region/region.d.ts +211 -0
- package/dist/matter/region/region.js +579 -0
- package/dist/matter/region/region.js.map +1 -0
- package/dist/matter/session/session.d.ts +58 -0
- package/dist/matter/session/session.js +112 -0
- package/dist/matter/session/session.js.map +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +101 -0
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -0
- package/dist/matter/shipping-address/shipping-address.d.ts +284 -0
- package/dist/matter/shipping-address/shipping-address.js +1036 -0
- package/dist/matter/shipping-address/shipping-address.js.map +1 -0
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +143 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js +644 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -0
- package/dist/matter/sign-in-form/sign-in-form.d.ts +79 -0
- package/dist/matter/sign-in-form/sign-in-form.js +226 -0
- package/dist/matter/sign-in-form/sign-in-form.js.map +1 -0
- package/dist/matter/variant-selector/variant-selector.d.ts +183 -0
- package/dist/matter/variant-selector/variant-selector.js +840 -0
- package/dist/matter/variant-selector/variant-selector.js.map +1 -0
- package/dist/message-locales.json +7 -0
- package/dist/particles/access-code-field/access-code-field.d.ts +33 -0
- package/dist/particles/access-code-field/access-code-field.js +95 -0
- package/dist/particles/access-code-field/access-code-field.js.map +1 -0
- package/dist/particles/accordion/accordion.d.ts +45 -0
- package/dist/particles/accordion/accordion.js +156 -0
- package/dist/particles/accordion/accordion.js.map +1 -0
- package/dist/particles/address-summary/address-summary.d.ts +50 -0
- package/dist/particles/address-summary/address-summary.js +129 -0
- package/dist/particles/address-summary/address-summary.js.map +1 -0
- package/dist/particles/badge/badge.d.ts +10 -0
- package/dist/particles/badge/badge.js +27 -0
- package/dist/particles/badge/badge.js.map +1 -0
- package/dist/particles/button/button.d.ts +18 -0
- package/dist/particles/button/button.js +37 -0
- package/dist/particles/button/button.js.map +1 -0
- package/dist/particles/carousel/carousel.d.ts +60 -0
- package/dist/particles/carousel/carousel.js +335 -0
- package/dist/particles/carousel/carousel.js.map +1 -0
- package/dist/particles/checkbox/checkbox.d.ts +40 -0
- package/dist/particles/checkbox/checkbox.js +82 -0
- package/dist/particles/checkbox/checkbox.js.map +1 -0
- package/dist/particles/container/container.d.ts +20 -0
- package/dist/particles/container/container.js +36 -0
- package/dist/particles/container/container.js.map +1 -0
- package/dist/particles/dialog/dialog.d.ts +54 -0
- package/dist/particles/dialog/dialog.js +192 -0
- package/dist/particles/dialog/dialog.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +61 -0
- package/dist/particles/document-field/document-field.js +146 -0
- package/dist/particles/document-field/document-field.js.map +1 -0
- package/dist/particles/drawer/drawer.d.ts +52 -0
- package/dist/particles/drawer/drawer.js +183 -0
- package/dist/particles/drawer/drawer.js.map +1 -0
- package/dist/particles/email-field/email-field.d.ts +37 -0
- package/dist/particles/email-field/email-field.js +106 -0
- package/dist/particles/email-field/email-field.js.map +1 -0
- package/dist/particles/field/field.d.ts +50 -0
- package/dist/particles/field/field.js +133 -0
- package/dist/particles/field/field.js.map +1 -0
- package/dist/particles/fieldset/fieldset.d.ts +16 -0
- package/dist/particles/fieldset/fieldset.js +52 -0
- package/dist/particles/fieldset/fieldset.js.map +1 -0
- package/dist/particles/footer-copyright/footer-copyright.d.ts +32 -0
- package/dist/particles/footer-copyright/footer-copyright.js +50 -0
- package/dist/particles/footer-copyright/footer-copyright.js.map +1 -0
- package/dist/particles/footer-link-group/footer-link-group.d.ts +66 -0
- package/dist/particles/footer-link-group/footer-link-group.js +154 -0
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -0
- package/dist/particles/footer-root/footer-root.d.ts +21 -0
- package/dist/particles/footer-root/footer-root.js +38 -0
- package/dist/particles/footer-root/footer-root.js.map +1 -0
- package/dist/particles/footer-social/footer-social.d.ts +79 -0
- package/dist/particles/footer-social/footer-social.js +176 -0
- package/dist/particles/footer-social/footer-social.js.map +1 -0
- package/dist/particles/gallery/gallery.d.ts +181 -0
- package/dist/particles/gallery/gallery.js +920 -0
- package/dist/particles/gallery/gallery.js.map +1 -0
- package/dist/particles/header-root/header-root.d.ts +21 -0
- package/dist/particles/header-root/header-root.js +38 -0
- package/dist/particles/header-root/header-root.js.map +1 -0
- package/dist/particles/icon/icon.d.ts +22 -0
- package/dist/particles/icon/icon.js +48 -0
- package/dist/particles/icon/icon.js.map +1 -0
- package/dist/particles/image/image.d.ts +13 -0
- package/dist/particles/image/image.js +59 -0
- package/dist/particles/image/image.js.map +1 -0
- package/dist/particles/incentives/incentives.d.ts +85 -0
- package/dist/particles/incentives/incentives.js +200 -0
- package/dist/particles/incentives/incentives.js.map +1 -0
- package/dist/particles/input/input.d.ts +9 -0
- package/dist/particles/input/input.js +28 -0
- package/dist/particles/input/input.js.map +1 -0
- package/dist/particles/logo/logo.d.ts +55 -0
- package/dist/particles/logo/logo.js +96 -0
- package/dist/particles/logo/logo.js.map +1 -0
- package/dist/particles/menu/menu.d.ts +103 -0
- package/dist/particles/menu/menu.js +409 -0
- package/dist/particles/menu/menu.js.map +1 -0
- package/dist/particles/menubar/menubar.d.ts +18 -0
- package/dist/particles/menubar/menubar.js +42 -0
- package/dist/particles/menubar/menubar.js.map +1 -0
- package/dist/particles/meter/meter.d.ts +36 -0
- package/dist/particles/meter/meter.js +132 -0
- package/dist/particles/meter/meter.js.map +1 -0
- package/dist/particles/navigation-link/navigation-link.d.ts +43 -0
- package/dist/particles/navigation-link/navigation-link.js +82 -0
- package/dist/particles/navigation-link/navigation-link.js.map +1 -0
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +59 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js +103 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -0
- package/dist/particles/navigation-menu/navigation-menu.d.ts +78 -0
- package/dist/particles/navigation-menu/navigation-menu.js +295 -0
- package/dist/particles/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/particles/number-field/number-field.d.ts +46 -0
- package/dist/particles/number-field/number-field.js +169 -0
- package/dist/particles/number-field/number-field.js.map +1 -0
- package/dist/particles/password-field/password-field.d.ts +31 -0
- package/dist/particles/password-field/password-field.js +109 -0
- package/dist/particles/password-field/password-field.js.map +1 -0
- package/dist/particles/payment-methods/payment-methods.d.ts +72 -0
- package/dist/particles/payment-methods/payment-methods.js +151 -0
- package/dist/particles/payment-methods/payment-methods.js.map +1 -0
- package/dist/particles/phone-field/phone-field.d.ts +67 -0
- package/dist/particles/phone-field/phone-field.js +250 -0
- package/dist/particles/phone-field/phone-field.js.map +1 -0
- package/dist/particles/popover/popover.d.ts +68 -0
- package/dist/particles/popover/popover.js +284 -0
- package/dist/particles/popover/popover.js.map +1 -0
- package/dist/particles/postal-code-field/postal-code-field.d.ts +75 -0
- package/dist/particles/postal-code-field/postal-code-field.js +169 -0
- package/dist/particles/postal-code-field/postal-code-field.js.map +1 -0
- package/dist/particles/promotion/promotion.d.ts +46 -0
- package/dist/particles/promotion/promotion.js +78 -0
- package/dist/particles/promotion/promotion.js.map +1 -0
- package/dist/particles/quantity-selector/quantity-selector.d.ts +30 -0
- package/dist/particles/quantity-selector/quantity-selector.js +116 -0
- package/dist/particles/quantity-selector/quantity-selector.js.map +1 -0
- package/dist/particles/radio/radio.d.ts +36 -0
- package/dist/particles/radio/radio.js +76 -0
- package/dist/particles/radio/radio.js.map +1 -0
- package/dist/particles/scroll-area/scroll-area.d.ts +36 -0
- package/dist/particles/scroll-area/scroll-area.js +145 -0
- package/dist/particles/scroll-area/scroll-area.js.map +1 -0
- package/dist/particles/select/select.d.ts +125 -0
- package/dist/particles/select/select.js +478 -0
- package/dist/particles/select/select.js.map +1 -0
- package/dist/particles/separator/separator.d.ts +12 -0
- package/dist/particles/separator/separator.js +33 -0
- package/dist/particles/separator/separator.js.map +1 -0
- package/dist/particles/shared/input-mask.d.ts +5 -0
- package/dist/particles/shared/input-mask.js +58 -0
- package/dist/particles/shared/input-mask.js.map +1 -0
- package/dist/particles/spinner/spinner.d.ts +13 -0
- package/dist/particles/spinner/spinner.js +31 -0
- package/dist/particles/spinner/spinner.js.map +1 -0
- package/dist/particles/switch/switch.d.ts +27 -0
- package/dist/particles/switch/switch.js +59 -0
- package/dist/particles/switch/switch.js.map +1 -0
- package/dist/particles/tabs/tabs.d.ts +45 -0
- package/dist/particles/tabs/tabs.js +164 -0
- package/dist/particles/tabs/tabs.js.map +1 -0
- package/dist/particles/text/text.d.ts +24 -0
- package/dist/particles/text/text.js +40 -0
- package/dist/particles/text/text.js.map +1 -0
- package/dist/particles/toast/toast.d.ts +83 -0
- package/dist/particles/toast/toast.js +194 -0
- package/dist/particles/toast/toast.js.map +1 -0
- package/dist/particles/toggle/toggle.d.ts +26 -0
- package/dist/particles/toggle/toggle.js +61 -0
- package/dist/particles/toggle/toggle.js.map +1 -0
- package/dist/particles/tooltip/tooltip.d.ts +61 -0
- package/dist/particles/tooltip/tooltip.js +240 -0
- package/dist/particles/tooltip/tooltip.js.map +1 -0
- package/dist/schema.graphql +2953 -0
- package/dist/sdk/actions/cart-action-provider.d.ts +19 -0
- package/dist/sdk/actions/cart-action-provider.js +23 -0
- package/dist/sdk/actions/cart-action-provider.js.map +1 -0
- package/dist/sdk/actions/identity-action-provider.d.ts +15 -0
- package/dist/sdk/actions/identity-action-provider.js +19 -0
- package/dist/sdk/actions/identity-action-provider.js.map +1 -0
- package/dist/sdk/actions/index.d.ts +7 -0
- package/dist/sdk/actions/index.js +6 -0
- package/dist/sdk/actions/inject-actions.d.ts +14 -0
- package/dist/sdk/actions/inject-actions.js +36 -0
- package/dist/sdk/actions/inject-actions.js.map +1 -0
- package/dist/sdk/actions/region-action-provider.d.ts +15 -0
- package/dist/sdk/actions/region-action-provider.js +19 -0
- package/dist/sdk/actions/region-action-provider.js.map +1 -0
- package/dist/sdk/actions/session-action-provider.d.ts +15 -0
- package/dist/sdk/actions/session-action-provider.js +19 -0
- package/dist/sdk/actions/session-action-provider.js.map +1 -0
- package/dist/sdk/actions/shipping-action-provider.d.ts +15 -0
- package/dist/sdk/actions/shipping-action-provider.js +19 -0
- package/dist/sdk/actions/shipping-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +21 -0
- package/dist/sdk/cache/storefront-cache.js +35 -0
- package/dist/sdk/cache/storefront-cache.js.map +1 -0
- package/dist/sdk/cart/operations.d.ts +31 -0
- package/dist/sdk/cart/operations.js +215 -0
- package/dist/sdk/cart/operations.js.map +1 -0
- package/dist/sdk/cart/optimistic.d.ts +24 -0
- package/dist/sdk/cart/optimistic.js +164 -0
- package/dist/sdk/cart/optimistic.js.map +1 -0
- package/dist/sdk/cart/use-cart-actions.d.ts +56 -0
- package/dist/sdk/cart/use-cart-actions.js +348 -0
- package/dist/sdk/cart/use-cart-actions.js.map +1 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js +50 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -0
- package/dist/sdk/cart/write-gate.js +54 -0
- package/dist/sdk/cart/write-gate.js.map +1 -0
- package/dist/sdk/client/assert-api-url.js +20 -0
- package/dist/sdk/client/assert-api-url.js.map +1 -0
- package/dist/sdk/client/create-client.d.ts +23 -0
- package/dist/sdk/client/create-client.js +46 -0
- package/dist/sdk/client/create-client.js.map +1 -0
- package/dist/sdk/client/fetch-page-data.d.ts +39 -0
- package/dist/sdk/client/fetch-page-data.js +33 -0
- package/dist/sdk/client/fetch-page-data.js.map +1 -0
- package/dist/sdk/client/register-preload-query.d.ts +24 -0
- package/dist/sdk/client/register-preload-query.js +33 -0
- package/dist/sdk/client/register-preload-query.js.map +1 -0
- package/dist/sdk/content/create-content-runtime.d.ts +68 -0
- package/dist/sdk/content/create-content-runtime.js +503 -0
- package/dist/sdk/content/create-content-runtime.js.map +1 -0
- package/dist/sdk/context/headers.d.ts +15 -0
- package/dist/sdk/context/headers.js +21 -0
- package/dist/sdk/context/headers.js.map +1 -0
- package/dist/sdk/context/storefront-context.d.ts +11 -0
- package/dist/sdk/context/storefront-context.js +29 -0
- package/dist/sdk/context/storefront-context.js.map +1 -0
- package/dist/sdk/data/data-override-context.d.ts +12 -0
- package/dist/sdk/data/data-override-context.js +19 -0
- package/dist/sdk/data/data-override-context.js.map +1 -0
- package/dist/sdk/data/entity-subscriber.js +28 -0
- package/dist/sdk/data/entity-subscriber.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.d.ts +19 -0
- package/dist/sdk/data/hot-data-provider.js +33 -0
- package/dist/sdk/data/hot-data-provider.js.map +1 -0
- package/dist/sdk/data/index.d.ts +8 -0
- package/dist/sdk/data/index.js +8 -0
- package/dist/sdk/data/list-item-ref-context.d.ts +20 -0
- package/dist/sdk/data/list-item-ref-context.js +11 -0
- package/dist/sdk/data/list-item-ref-context.js.map +1 -0
- package/dist/sdk/data/multiple-reactive-data-provider.d.ts +32 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js +20 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/page-reactive-data-root.d.ts +53 -0
- package/dist/sdk/data/page-reactive-data-root.js +153 -0
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -0
- package/dist/sdk/data/reactive-data-provider.d.ts +25 -0
- package/dist/sdk/data/reactive-data-provider.js +24 -0
- package/dist/sdk/data/reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/reactive-list-item-data-provider.d.ts +26 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js +42 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -0
- package/dist/sdk/data/use-reactive-entity.js +40 -0
- package/dist/sdk/data/use-reactive-entity.js.map +1 -0
- package/dist/sdk/format/client.d.ts +12 -0
- package/dist/sdk/format/client.js +20 -0
- package/dist/sdk/format/client.js.map +1 -0
- package/dist/sdk/format/formatters.d.ts +32 -0
- package/dist/sdk/format/formatters.js +45 -0
- package/dist/sdk/format/formatters.js.map +1 -0
- package/dist/sdk/generated/fragment-types.js +23 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -0
- package/dist/sdk/generated/gql.js +51 -0
- package/dist/sdk/generated/gql.js.map +1 -0
- package/dist/sdk/generated/graphql.d.ts +622 -0
- package/dist/sdk/generated/graphql.js +11917 -0
- package/dist/sdk/generated/graphql.js.map +1 -0
- package/dist/sdk/graphql-tag.d.ts +10 -0
- package/dist/sdk/graphql-tag.js +21 -0
- package/dist/sdk/graphql-tag.js.map +1 -0
- package/dist/sdk/i18n/client.d.ts +4 -0
- package/dist/sdk/i18n/client.js +4 -0
- package/dist/sdk/i18n/locales.d.ts +8 -0
- package/dist/sdk/i18n/locales.js +57 -0
- package/dist/sdk/i18n/locales.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.js +24 -0
- package/dist/sdk/i18n/messages/en-US.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.json +19 -0
- package/dist/sdk/i18n/messages/en-US.json.d.ts +23 -0
- package/dist/sdk/i18n/messages/es-ES.js +24 -0
- package/dist/sdk/i18n/messages/es-ES.js.map +1 -0
- package/dist/sdk/i18n/messages/es-ES.json +19 -0
- package/dist/sdk/i18n/messages/pt-BR.js +24 -0
- package/dist/sdk/i18n/messages/pt-BR.js.map +1 -0
- package/dist/sdk/i18n/messages/pt-BR.json +19 -0
- package/dist/sdk/i18n/provider.d.ts +1 -0
- package/dist/sdk/i18n/provider.js +30 -0
- package/dist/sdk/i18n/provider.js.map +1 -0
- package/dist/sdk/i18n/server.d.ts +28 -0
- package/dist/sdk/i18n/server.js +59 -0
- package/dist/sdk/i18n/server.js.map +1 -0
- package/dist/sdk/identity/operations.d.ts +34 -0
- package/dist/sdk/identity/operations.js +78 -0
- package/dist/sdk/identity/operations.js.map +1 -0
- package/dist/sdk/identity/use-identity-actions.d.ts +62 -0
- package/dist/sdk/identity/use-identity-actions.js +180 -0
- package/dist/sdk/identity/use-identity-actions.js.map +1 -0
- package/dist/sdk/provider/index.d.ts +2 -0
- package/dist/sdk/provider/index.js +2 -0
- package/dist/sdk/provider/storefront-provider.d.ts +32 -0
- package/dist/sdk/provider/storefront-provider.js +111 -0
- package/dist/sdk/provider/storefront-provider.js.map +1 -0
- package/dist/sdk/region/operations.d.ts +6 -0
- package/dist/sdk/region/region-operations.d.ts +30 -0
- package/dist/sdk/region/region-operations.js +23 -0
- package/dist/sdk/region/region-operations.js.map +1 -0
- package/dist/sdk/region/use-region-actions.d.ts +23 -0
- package/dist/sdk/region/use-region-actions.js +66 -0
- package/dist/sdk/region/use-region-actions.js.map +1 -0
- package/dist/sdk/seller.js +11 -0
- package/dist/sdk/seller.js.map +1 -0
- package/dist/sdk/session/auth-operations.d.ts +47 -0
- package/dist/sdk/session/auth-operations.js +79 -0
- package/dist/sdk/session/auth-operations.js.map +1 -0
- package/dist/sdk/session/operations.d.ts +6 -0
- package/dist/sdk/session/use-session-actions.d.ts +27 -0
- package/dist/sdk/session/use-session-actions.js +126 -0
- package/dist/sdk/session/use-session-actions.js.map +1 -0
- package/dist/sdk/shipping/cart-operations.d.ts +3 -0
- package/dist/sdk/shipping/cart-operations.js +33 -0
- package/dist/sdk/shipping/cart-operations.js.map +1 -0
- package/dist/sdk/shipping/operations.d.ts +3 -0
- package/dist/sdk/shipping/operations.js +33 -0
- package/dist/sdk/shipping/operations.js.map +1 -0
- package/dist/sdk/shipping/option-select-operations.d.ts +24 -0
- package/dist/sdk/shipping/option-select-operations.js +45 -0
- package/dist/sdk/shipping/option-select-operations.js.map +1 -0
- package/dist/sdk/shipping/request-timeout.js +41 -0
- package/dist/sdk/shipping/request-timeout.js.map +1 -0
- package/dist/sdk/shipping/shipping-operations.d.ts +38 -0
- package/dist/sdk/shipping/shipping-operations.js +77 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-actions.d.ts +27 -0
- package/dist/sdk/shipping/use-shipping-actions.js +113 -0
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -0
- package/dist/sdk/state/cart.d.ts +42 -0
- package/dist/sdk/state/cart.js +64 -0
- package/dist/sdk/state/cart.js.map +1 -0
- package/dist/sdk/state/index.js +3 -0
- package/dist/sdk/state/variant-selector.d.ts +17 -0
- package/dist/sdk/state/variant-selector.js +14 -0
- package/dist/sdk/state/variant-selector.js.map +1 -0
- package/dist/utils/safe-href.js +63 -0
- package/dist/utils/safe-href.js.map +1 -0
- package/package.json +84 -0
- package/src/styles/tailwind.css +32 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
3
|
+
import "../../core/dist/index.js";
|
|
4
|
+
import { useDataOverride } from "../../sdk/data/data-override-context.js";
|
|
5
|
+
import { useSession } from "../session/session.js";
|
|
6
|
+
import { applyPhoneMask } from "../../particles/phone-field/phone-field.js";
|
|
7
|
+
import { Badge } from "../../particles/badge/badge.js";
|
|
8
|
+
import { createContext, useContext, useState } from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/matter/identity-summary/identity-summary.tsx
|
|
11
|
+
const fragment = `
|
|
12
|
+
fragment IdentitySummaryData on Query {
|
|
13
|
+
clientProfile {
|
|
14
|
+
__typename
|
|
15
|
+
id
|
|
16
|
+
email
|
|
17
|
+
firstName
|
|
18
|
+
lastName
|
|
19
|
+
phone
|
|
20
|
+
document
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
const IDENTITY_SUMMARY_CONTEXT_UNSET = Symbol("IdentitySummaryContextUnset");
|
|
25
|
+
const IdentitySummaryContext = createContext(IDENTITY_SUMMARY_CONTEXT_UNSET);
|
|
26
|
+
function useIdentitySummaryContext() {
|
|
27
|
+
const ctx = useContext(IdentitySummaryContext);
|
|
28
|
+
if (ctx === IDENTITY_SUMMARY_CONTEXT_UNSET) throw new Error("IdentitySummary components must be used inside IdentitySummaryRoot.");
|
|
29
|
+
return ctx;
|
|
30
|
+
}
|
|
31
|
+
const IdentitySummaryRootDefinition = defineComponent({
|
|
32
|
+
name: "IdentitySummaryRoot",
|
|
33
|
+
importPath: "@vtex/faststore/components",
|
|
34
|
+
component: IdentitySummaryRoot,
|
|
35
|
+
fragment,
|
|
36
|
+
fetchStrategy: "reactive",
|
|
37
|
+
requiresContext: "session",
|
|
38
|
+
providesContext: "identity-summary",
|
|
39
|
+
actions: { session: ["logout"] },
|
|
40
|
+
editor: {
|
|
41
|
+
label: "Identity Summary Root",
|
|
42
|
+
category: "identity"
|
|
43
|
+
},
|
|
44
|
+
schema: { signOutErrorMessage: {
|
|
45
|
+
type: "string",
|
|
46
|
+
default: "Unable to sign out. Please try again.",
|
|
47
|
+
label: "Sign-out error message"
|
|
48
|
+
} },
|
|
49
|
+
guideline: "Read-only identity summary data root: reads the shopper profile, provides it plus a sign-out action to descendants, and self-gates (renders nothing in the anonymous state). Must be inside SessionRoot. Wrap the parts in an IdentityEditController for the summary/form swap: an IdentitySummaryView holding these parts, an IdentityEditForm holding a ClientProfileForm. See identity-summary.md."
|
|
50
|
+
});
|
|
51
|
+
const IdentitySummarySelectedSummaryDefinition = defineComponent({
|
|
52
|
+
name: "IdentitySummarySelectedSummary",
|
|
53
|
+
importPath: "@vtex/faststore/components",
|
|
54
|
+
component: IdentitySummarySelectedSummary,
|
|
55
|
+
requiresContext: "identity-summary",
|
|
56
|
+
editor: {
|
|
57
|
+
label: "Identity Selected Summary",
|
|
58
|
+
category: "identity"
|
|
59
|
+
},
|
|
60
|
+
schema: {},
|
|
61
|
+
guideline: "Default composition of the identity summary: badge, name, e-mail, phone, document, in that order. It is a shortcut, not the only way — to change the order, drop a field, or interleave anything else, compose IdentitySummaryBadge / Name / Email / Phone / Document directly instead. It offers nothing to the schema: its country and badge-label props configure the default composition only, and are withheld from the schema because a page that set one here and then composed children would watch it vanish. A composed summary configures the leaf instead — the phone mask country on IdentitySummaryPhone, the labels on IdentitySummaryBadge. Must be a descendant of IdentitySummaryRoot."
|
|
62
|
+
});
|
|
63
|
+
const IdentitySummaryBadgeDefinition = defineComponent({
|
|
64
|
+
name: "IdentitySummaryBadge",
|
|
65
|
+
importPath: "@vtex/faststore/components",
|
|
66
|
+
component: IdentitySummaryBadge,
|
|
67
|
+
requiresContext: "identity-summary",
|
|
68
|
+
editor: {
|
|
69
|
+
label: "Identity Summary Badge",
|
|
70
|
+
category: "identity"
|
|
71
|
+
},
|
|
72
|
+
schema: {
|
|
73
|
+
identifiedLabel: {
|
|
74
|
+
type: "string",
|
|
75
|
+
default: "Guest",
|
|
76
|
+
label: "Identified badge label"
|
|
77
|
+
},
|
|
78
|
+
loggedInLabel: {
|
|
79
|
+
type: "string",
|
|
80
|
+
default: "Signed in",
|
|
81
|
+
label: "Logged-in badge label"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
guideline: "Session-state badge for the identity summary. Place it wherever the summary should carry it; order is composition, not a prop. Must be a descendant of IdentitySummaryRoot."
|
|
85
|
+
});
|
|
86
|
+
const IdentitySummaryNameDefinition = defineComponent({
|
|
87
|
+
name: "IdentitySummaryName",
|
|
88
|
+
importPath: "@vtex/faststore/components",
|
|
89
|
+
component: IdentitySummaryName,
|
|
90
|
+
requiresContext: "identity-summary",
|
|
91
|
+
editor: {
|
|
92
|
+
label: "Identity Summary Name",
|
|
93
|
+
category: "identity"
|
|
94
|
+
},
|
|
95
|
+
schema: {},
|
|
96
|
+
guideline: "The shopper's full name, or nothing when the profile has neither first nor last name. Place it in whatever order the summary should read. Must be a descendant of IdentitySummaryRoot."
|
|
97
|
+
});
|
|
98
|
+
const IdentitySummaryEmailDefinition = defineComponent({
|
|
99
|
+
name: "IdentitySummaryEmail",
|
|
100
|
+
importPath: "@vtex/faststore/components",
|
|
101
|
+
component: IdentitySummaryEmail,
|
|
102
|
+
requiresContext: "identity-summary",
|
|
103
|
+
editor: {
|
|
104
|
+
label: "Identity Summary Email",
|
|
105
|
+
category: "identity"
|
|
106
|
+
},
|
|
107
|
+
schema: {},
|
|
108
|
+
guideline: "The shopper's e-mail, or nothing when absent. Must be a descendant of IdentitySummaryRoot."
|
|
109
|
+
});
|
|
110
|
+
const IdentitySummaryPhoneDefinition = defineComponent({
|
|
111
|
+
name: "IdentitySummaryPhone",
|
|
112
|
+
importPath: "@vtex/faststore/components",
|
|
113
|
+
component: IdentitySummaryPhone,
|
|
114
|
+
requiresContext: "identity-summary",
|
|
115
|
+
editor: {
|
|
116
|
+
label: "Identity Summary Phone",
|
|
117
|
+
category: "identity"
|
|
118
|
+
},
|
|
119
|
+
schema: { country: {
|
|
120
|
+
type: "string",
|
|
121
|
+
label: "Phone country (US or BR)"
|
|
122
|
+
} },
|
|
123
|
+
guideline: "The shopper's phone, or nothing when absent. Masked for `country` when one is set; rendered as stored otherwise, since each mask truncates to its own country's length. Must be a descendant of IdentitySummaryRoot."
|
|
124
|
+
});
|
|
125
|
+
const IdentitySummaryDocumentDefinition = defineComponent({
|
|
126
|
+
name: "IdentitySummaryDocument",
|
|
127
|
+
importPath: "@vtex/faststore/components",
|
|
128
|
+
component: IdentitySummaryDocument,
|
|
129
|
+
requiresContext: "identity-summary",
|
|
130
|
+
editor: {
|
|
131
|
+
label: "Identity Summary Document",
|
|
132
|
+
category: "identity"
|
|
133
|
+
},
|
|
134
|
+
schema: {},
|
|
135
|
+
guideline: "The shopper's tax document, or nothing when absent. Must be a descendant of IdentitySummaryRoot."
|
|
136
|
+
});
|
|
137
|
+
const IdentitySummarySignOutButtonDefinition = defineComponent({
|
|
138
|
+
name: "IdentitySummarySignOutButton",
|
|
139
|
+
importPath: "@vtex/faststore/components",
|
|
140
|
+
component: IdentitySummarySignOutButton,
|
|
141
|
+
requiresContext: "identity-summary",
|
|
142
|
+
editor: {
|
|
143
|
+
label: "Identity Sign Out Button",
|
|
144
|
+
category: "action"
|
|
145
|
+
},
|
|
146
|
+
schema: { label: {
|
|
147
|
+
type: "string",
|
|
148
|
+
default: "Sign out",
|
|
149
|
+
label: "Button label"
|
|
150
|
+
} },
|
|
151
|
+
guideline: "Dispatches $actions.session.logout (async/pessimistic): carries data-fs-identity-summary-pending while in flight and disables itself. Compose an Icon + text as children, or rely on `label`. Must be a descendant of IdentitySummaryRoot."
|
|
152
|
+
});
|
|
153
|
+
const IdentitySummaryErrorDefinition = defineComponent({
|
|
154
|
+
name: "IdentitySummaryError",
|
|
155
|
+
importPath: "@vtex/faststore/components",
|
|
156
|
+
component: IdentitySummaryError,
|
|
157
|
+
requiresContext: "identity-summary",
|
|
158
|
+
editor: {
|
|
159
|
+
label: "Identity Summary Error",
|
|
160
|
+
category: "content"
|
|
161
|
+
},
|
|
162
|
+
schema: {},
|
|
163
|
+
guideline: "Renders the inline sign-out error (role=\"alert\") when the logout mutation returns a user error, else nothing. Must be a descendant of IdentitySummaryRoot."
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Data root for the identity summary. Reads the shopper profile from its colocated fragment,
|
|
167
|
+
* enforces the SessionRoot ancestor via `useSession()`, and self-gates to null in the anonymous
|
|
168
|
+
* state. Owns the sign-out mutation state (pending/error) and broadcasts everything the read-only
|
|
169
|
+
* parts and the sign-out button need through `IdentitySummaryContext`.
|
|
170
|
+
*/
|
|
171
|
+
function IdentitySummaryRoot({ signOutErrorMessage = "Unable to sign out. Please try again.", className, children, $data: $dataProp, $actions }) {
|
|
172
|
+
const $data = useDataOverride($dataProp);
|
|
173
|
+
const { state } = useSession();
|
|
174
|
+
const [signOutPending, setSignOutPending] = useState(false);
|
|
175
|
+
const [signOutError, setSignOutError] = useState(null);
|
|
176
|
+
async function handleSignOut() {
|
|
177
|
+
setSignOutPending(true);
|
|
178
|
+
setSignOutError(null);
|
|
179
|
+
try {
|
|
180
|
+
const errors = await $actions?.session?.logout?.() ?? [];
|
|
181
|
+
if (errors.length > 0) setSignOutError(errors[0]?.message ?? signOutErrorMessage);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.error("[IdentitySummary] logout failed:", error);
|
|
184
|
+
setSignOutError(signOutErrorMessage);
|
|
185
|
+
} finally {
|
|
186
|
+
setSignOutPending(false);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (state === "anonymous") return null;
|
|
190
|
+
const contextValue = {
|
|
191
|
+
state,
|
|
192
|
+
firstName: $data?.firstName ?? "",
|
|
193
|
+
lastName: $data?.lastName ?? "",
|
|
194
|
+
email: $data?.email ?? "",
|
|
195
|
+
phone: $data?.phone ?? "",
|
|
196
|
+
document: $data?.document ?? "",
|
|
197
|
+
handleSignOut,
|
|
198
|
+
signOutPending,
|
|
199
|
+
signOutError
|
|
200
|
+
};
|
|
201
|
+
return /* @__PURE__ */ jsx(IdentitySummaryContext.Provider, {
|
|
202
|
+
value: contextValue,
|
|
203
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className,
|
|
205
|
+
"data-fs-identity-summary": "",
|
|
206
|
+
...signOutPending ? { "data-fs-identity-summary-pending": "" } : {},
|
|
207
|
+
children
|
|
208
|
+
})
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Read-only identity display: a session-state badge plus name, email, phone, and document.
|
|
213
|
+
*
|
|
214
|
+
* The props below configure the default composition only — composing children replaces it wholesale,
|
|
215
|
+
* and a leaf placed there takes its own props (`IdentitySummaryPhone` its `country`,
|
|
216
|
+
* `IdentitySummaryBadge` its labels). They are deliberately absent from the schema, so a page cannot
|
|
217
|
+
* set one here and watch it disappear behind composed children.
|
|
218
|
+
*/
|
|
219
|
+
function IdentitySummarySelectedSummary({ country, identifiedBadgeLabel = "Guest", loggedInBadgeLabel = "Signed in", className, children }) {
|
|
220
|
+
return /* @__PURE__ */ jsx("div", {
|
|
221
|
+
className,
|
|
222
|
+
"data-fs-identity-summary-summary": "",
|
|
223
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
224
|
+
/* @__PURE__ */ jsx(IdentitySummaryBadge, {
|
|
225
|
+
identifiedLabel: identifiedBadgeLabel,
|
|
226
|
+
loggedInLabel: loggedInBadgeLabel
|
|
227
|
+
}),
|
|
228
|
+
/* @__PURE__ */ jsx(IdentitySummaryName, {}),
|
|
229
|
+
/* @__PURE__ */ jsx(IdentitySummaryEmail, {}),
|
|
230
|
+
/* @__PURE__ */ jsx(IdentitySummaryPhone, { country }),
|
|
231
|
+
/* @__PURE__ */ jsx(IdentitySummaryDocument, {})
|
|
232
|
+
] })
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/** Session-state badge. Renders `identifiedLabel` for a guest and `loggedInLabel` once authenticated. */
|
|
236
|
+
function IdentitySummaryBadge({ identifiedLabel = "Guest", loggedInLabel = "Signed in", className }) {
|
|
237
|
+
const { state } = useIdentitySummaryContext();
|
|
238
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
239
|
+
className,
|
|
240
|
+
"data-fs-identity-summary-badge": "",
|
|
241
|
+
"data-fs-identity-summary-state": state,
|
|
242
|
+
children: state === "loggedIn" ? loggedInLabel : identifiedLabel
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/** The shopper's full name. Renders nothing when the profile carries neither name. */
|
|
246
|
+
function IdentitySummaryName({ className }) {
|
|
247
|
+
const { firstName, lastName } = useIdentitySummaryContext();
|
|
248
|
+
const fullName = [firstName, lastName].filter(Boolean).join(" ");
|
|
249
|
+
if (!fullName) return null;
|
|
250
|
+
return /* @__PURE__ */ jsx("p", {
|
|
251
|
+
className,
|
|
252
|
+
"data-fs-identity-summary-name": "",
|
|
253
|
+
children: fullName
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/** The shopper's e-mail. Renders nothing when absent. */
|
|
257
|
+
function IdentitySummaryEmail({ className }) {
|
|
258
|
+
const { email } = useIdentitySummaryContext();
|
|
259
|
+
if (!email) return null;
|
|
260
|
+
return /* @__PURE__ */ jsx("p", {
|
|
261
|
+
className,
|
|
262
|
+
"data-fs-identity-summary-email": "",
|
|
263
|
+
children: email
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/** E.164 prefixes for the countries the masks understand. */
|
|
267
|
+
const COUNTRY_PREFIX = {
|
|
268
|
+
BR: "+55",
|
|
269
|
+
US: "+1"
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* The shopper's phone, masked for `country`. Renders nothing when absent, and renders the stored value
|
|
273
|
+
* as-is whenever the mask does not apply to it — no country given, or a stored E.164 number belonging to
|
|
274
|
+
* a different one. Each mask truncates to its own country's length, so applying the wrong one prints a
|
|
275
|
+
* number that is not the shopper's, with nothing to signal that digits were dropped.
|
|
276
|
+
*/
|
|
277
|
+
function IdentitySummaryPhone({ country, className }) {
|
|
278
|
+
const { phone } = useIdentitySummaryContext();
|
|
279
|
+
if (!phone) return null;
|
|
280
|
+
const maskApplies = country !== void 0 && (!phone.startsWith("+") || phone.startsWith(COUNTRY_PREFIX[country]));
|
|
281
|
+
return /* @__PURE__ */ jsx("p", {
|
|
282
|
+
className,
|
|
283
|
+
"data-fs-identity-summary-phone": "",
|
|
284
|
+
children: maskApplies && country ? applyPhoneMask(phone, country) : phone
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/** The shopper's tax document. Renders nothing when absent. */
|
|
288
|
+
function IdentitySummaryDocument({ className }) {
|
|
289
|
+
const { document } = useIdentitySummaryContext();
|
|
290
|
+
if (!document) return null;
|
|
291
|
+
return /* @__PURE__ */ jsx("p", {
|
|
292
|
+
className,
|
|
293
|
+
"data-fs-identity-summary-document": "",
|
|
294
|
+
children: document
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/** Dispatches the sign-out mutation (async/pessimistic). */
|
|
298
|
+
function IdentitySummarySignOutButton({ label = "Sign out", className, children }) {
|
|
299
|
+
const { handleSignOut, signOutPending } = useIdentitySummaryContext();
|
|
300
|
+
return /* @__PURE__ */ jsx("button", {
|
|
301
|
+
type: "button",
|
|
302
|
+
"data-fs-identity-summary-sign-out": "",
|
|
303
|
+
className,
|
|
304
|
+
disabled: signOutPending,
|
|
305
|
+
...signOutPending ? { "data-fs-identity-summary-pending": "" } : {},
|
|
306
|
+
onClick: handleSignOut,
|
|
307
|
+
children: children ?? label
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/** Renders the inline sign-out user error, or nothing when there is none. */
|
|
311
|
+
function IdentitySummaryError({ className }) {
|
|
312
|
+
const { signOutError } = useIdentitySummaryContext();
|
|
313
|
+
if (!signOutError) return null;
|
|
314
|
+
return /* @__PURE__ */ jsx("div", {
|
|
315
|
+
role: "alert",
|
|
316
|
+
className,
|
|
317
|
+
"data-fs-identity-summary-error": "",
|
|
318
|
+
children: signOutError
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
const IdentitySummary = {
|
|
322
|
+
Badge: IdentitySummaryBadge,
|
|
323
|
+
BadgeDefinition: IdentitySummaryBadgeDefinition,
|
|
324
|
+
Name: IdentitySummaryName,
|
|
325
|
+
NameDefinition: IdentitySummaryNameDefinition,
|
|
326
|
+
Email: IdentitySummaryEmail,
|
|
327
|
+
EmailDefinition: IdentitySummaryEmailDefinition,
|
|
328
|
+
Phone: IdentitySummaryPhone,
|
|
329
|
+
PhoneDefinition: IdentitySummaryPhoneDefinition,
|
|
330
|
+
Document: IdentitySummaryDocument,
|
|
331
|
+
DocumentDefinition: IdentitySummaryDocumentDefinition,
|
|
332
|
+
Root: IdentitySummaryRoot,
|
|
333
|
+
RootDefinition: IdentitySummaryRootDefinition,
|
|
334
|
+
SelectedSummary: IdentitySummarySelectedSummary,
|
|
335
|
+
SelectedSummaryDefinition: IdentitySummarySelectedSummaryDefinition,
|
|
336
|
+
SignOutButton: IdentitySummarySignOutButton,
|
|
337
|
+
SignOutButtonDefinition: IdentitySummarySignOutButtonDefinition,
|
|
338
|
+
Error: IdentitySummaryError,
|
|
339
|
+
ErrorDefinition: IdentitySummaryErrorDefinition
|
|
340
|
+
};
|
|
341
|
+
//#endregion
|
|
342
|
+
export { IdentitySummary, IdentitySummaryBadge, IdentitySummaryBadgeDefinition, IdentitySummaryDocument, IdentitySummaryDocumentDefinition, IdentitySummaryEmail, IdentitySummaryEmailDefinition, IdentitySummaryError, IdentitySummaryErrorDefinition, IdentitySummaryName, IdentitySummaryNameDefinition, IdentitySummaryPhone, IdentitySummaryPhoneDefinition, IdentitySummaryRoot, IdentitySummaryRootDefinition, IdentitySummarySelectedSummary, IdentitySummarySelectedSummaryDefinition, IdentitySummarySignOutButton, IdentitySummarySignOutButtonDefinition };
|
|
343
|
+
|
|
344
|
+
//# sourceMappingURL=identity-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-summary.js","names":[],"sources":["../../../src/matter/identity-summary/identity-summary.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport { createContext, type ReactNode, useContext, useState } from 'react';\nimport { Badge } from '../../particles/badge/badge.js';\nimport { applyPhoneMask, type PhoneCountry } from '../../particles/phone-field/phone-field.js';\nimport type { ComponentActions } from '../../sdk/actions/types.js';\nimport { useDataOverride } from '../../sdk/data/data-override-context.js';\nimport type { SessionUserError } from '../../sdk/session/auth-operations.js';\nimport { type SessionState, useSession } from '../session/session.js';\n\n// ---------------------------------------------------------------------------\n// GraphQL Fragment — colocated self-contained data root (ADR-0011).\n// Reads only `clientProfile` (the fields this read-only summary displays). The\n// edit surface is a separately-composed `ClientProfileForm`, which owns its own\n// fragment and identity actions.\n//\n// Single top-level entity → the compiler delivers `$data` UNWRAPPED, i.e. the\n// `ClientProfile` value directly, not `{ clientProfile: ... }` (ADR-0015 arity-1).\n// ---------------------------------------------------------------------------\n\nconst fragment = /* GraphQL */ `\n fragment IdentitySummaryData on Query {\n clientProfile {\n __typename\n id\n email\n firstName\n lastName\n phone\n document\n }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * The `$data` slice forwarded by the reactive runtime — the unwrapped `ClientProfile` entity.\n * The fragment selects a single top-level field, so the compiler hands the entity value directly\n * (not a `{ clientProfile: ... }` wrapper); ADR-0015.\n */\nexport type IdentitySummaryData = {\n email?: string | null;\n firstName?: string | null;\n lastName?: string | null;\n phone?: string | null;\n document?: string | null;\n} | null;\n\n// ---------------------------------------------------------------------------\n// Context — data + session state + sign-out, provided by IdentitySummaryRoot.\n// The summary/form swap is owned by `IdentityEditController`, which moves only on its own buttons\n// (ADR-0006) — this matter owns only the identity data and the sign-out action, never a bespoke toggle.\n// ---------------------------------------------------------------------------\n\ntype IdentitySummaryContextValue = {\n state: SessionState;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n document: string;\n handleSignOut: () => void;\n signOutPending: boolean;\n signOutError: string | null;\n};\n\nconst IDENTITY_SUMMARY_CONTEXT_UNSET = Symbol('IdentitySummaryContextUnset');\n\nconst IdentitySummaryContext = createContext<IdentitySummaryContextValue | typeof IDENTITY_SUMMARY_CONTEXT_UNSET>(\n IDENTITY_SUMMARY_CONTEXT_UNSET,\n);\n\nfunction useIdentitySummaryContext(): IdentitySummaryContextValue {\n const ctx = useContext(IdentitySummaryContext);\n if (ctx === IDENTITY_SUMMARY_CONTEXT_UNSET) {\n throw new Error('IdentitySummary components must be used inside IdentitySummaryRoot.');\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport type IdentitySummaryRootProps = {\n /** Error message shown when the sign-out mutation returns user errors. */\n signOutErrorMessage?: string;\n className?: string;\n children?: ReactNode;\n /** `IdentitySummaryData` slice forwarded by the reactive runtime. */\n $data?: IdentitySummaryData;\n /** Compiler-injected action surface; carries `session.logout`. */\n $actions?: ComponentActions;\n};\n\nexport type IdentitySummarySelectedSummaryProps = {\n /** Phone display country; selects the mask applied to the stored E.164 value. */\n country?: PhoneCountry;\n /** Badge label in the `identified` session state. */\n identifiedBadgeLabel?: string;\n /** Badge label in the `loggedIn` session state. */\n loggedInBadgeLabel?: string;\n className?: string;\n /** Compose custom read-only content; falls back to the default badge + details when omitted. */\n children?: ReactNode;\n};\n\nexport type IdentitySummaryBadgeProps = {\n /** Badge label in the `identified` session state. */\n identifiedLabel?: string;\n /** Badge label in the `loggedIn` session state. */\n loggedInLabel?: string;\n className?: string;\n};\n\nexport type IdentitySummaryFieldProps = {\n className?: string;\n};\n\nexport type IdentitySummaryPhoneProps = {\n /** Phone display country; selects the mask applied to the stored E.164 value. */\n country?: PhoneCountry;\n className?: string;\n};\n\nexport type IdentitySummarySignOutButtonProps = {\n label?: string;\n className?: string;\n children?: ReactNode;\n};\n\nexport type IdentitySummaryErrorProps = {\n className?: string;\n};\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const IdentitySummaryRootDefinition = defineComponent<IdentitySummaryRootProps>({\n name: 'IdentitySummaryRoot',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryRoot,\n fragment,\n fetchStrategy: 'reactive',\n requiresContext: 'session',\n providesContext: 'identity-summary',\n actions: { session: ['logout'] },\n editor: { label: 'Identity Summary Root', category: 'identity' },\n schema: {\n signOutErrorMessage: {\n type: 'string',\n default: 'Unable to sign out. Please try again.',\n label: 'Sign-out error message',\n },\n },\n guideline:\n 'Read-only identity summary data root: reads the shopper profile, provides it plus a sign-out action to descendants, and self-gates (renders nothing in the anonymous state). Must be inside SessionRoot. Wrap the parts in an IdentityEditController for the summary/form swap: an IdentitySummaryView holding these parts, an IdentityEditForm holding a ClientProfileForm. See identity-summary.md.',\n});\n\nexport const IdentitySummarySelectedSummaryDefinition = defineComponent<IdentitySummarySelectedSummaryProps>({\n name: 'IdentitySummarySelectedSummary',\n importPath: '@vtex/faststore/components',\n component: IdentitySummarySelectedSummary,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Selected Summary', category: 'identity' },\n schema: {},\n guideline:\n 'Default composition of the identity summary: badge, name, e-mail, phone, document, in that order. It is a shortcut, not the only way — to change the order, drop a field, or interleave anything else, compose IdentitySummaryBadge / Name / Email / Phone / Document directly instead. It offers nothing to the schema: its country and badge-label props configure the default composition only, and are withheld from the schema because a page that set one here and then composed children would watch it vanish. A composed summary configures the leaf instead — the phone mask country on IdentitySummaryPhone, the labels on IdentitySummaryBadge. Must be a descendant of IdentitySummaryRoot.',\n});\n\nexport const IdentitySummaryBadgeDefinition = defineComponent<IdentitySummaryBadgeProps>({\n name: 'IdentitySummaryBadge',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryBadge,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Badge', category: 'identity' },\n schema: {\n identifiedLabel: { type: 'string', default: 'Guest', label: 'Identified badge label' },\n loggedInLabel: { type: 'string', default: 'Signed in', label: 'Logged-in badge label' },\n },\n guideline:\n 'Session-state badge for the identity summary. Place it wherever the summary should carry it; order is composition, not a prop. Must be a descendant of IdentitySummaryRoot.',\n});\n\nexport const IdentitySummaryNameDefinition = defineComponent<IdentitySummaryFieldProps>({\n name: 'IdentitySummaryName',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryName,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Name', category: 'identity' },\n schema: {},\n guideline:\n \"The shopper's full name, or nothing when the profile has neither first nor last name. Place it in whatever order the summary should read. Must be a descendant of IdentitySummaryRoot.\",\n});\n\nexport const IdentitySummaryEmailDefinition = defineComponent<IdentitySummaryFieldProps>({\n name: 'IdentitySummaryEmail',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryEmail,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Email', category: 'identity' },\n schema: {},\n guideline: \"The shopper's e-mail, or nothing when absent. Must be a descendant of IdentitySummaryRoot.\",\n});\n\nexport const IdentitySummaryPhoneDefinition = defineComponent<IdentitySummaryPhoneProps>({\n name: 'IdentitySummaryPhone',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryPhone,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Phone', category: 'identity' },\n schema: {\n country: { type: 'string', label: 'Phone country (US or BR)' },\n },\n guideline:\n \"The shopper's phone, or nothing when absent. Masked for `country` when one is set; rendered as stored otherwise, since each mask truncates to its own country's length. Must be a descendant of IdentitySummaryRoot.\",\n});\n\nexport const IdentitySummaryDocumentDefinition = defineComponent<IdentitySummaryFieldProps>({\n name: 'IdentitySummaryDocument',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryDocument,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Document', category: 'identity' },\n schema: {},\n guideline: \"The shopper's tax document, or nothing when absent. Must be a descendant of IdentitySummaryRoot.\",\n});\n\nexport const IdentitySummarySignOutButtonDefinition = defineComponent<IdentitySummarySignOutButtonProps>({\n name: 'IdentitySummarySignOutButton',\n importPath: '@vtex/faststore/components',\n component: IdentitySummarySignOutButton,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Sign Out Button', category: 'action' },\n schema: {\n label: { type: 'string', default: 'Sign out', label: 'Button label' },\n },\n guideline:\n 'Dispatches $actions.session.logout (async/pessimistic): carries data-fs-identity-summary-pending while in flight and disables itself. Compose an Icon + text as children, or rely on `label`. Must be a descendant of IdentitySummaryRoot.',\n});\n\nexport const IdentitySummaryErrorDefinition = defineComponent<IdentitySummaryErrorProps>({\n name: 'IdentitySummaryError',\n importPath: '@vtex/faststore/components',\n component: IdentitySummaryError,\n requiresContext: 'identity-summary',\n editor: { label: 'Identity Summary Error', category: 'content' },\n schema: {},\n guideline:\n 'Renders the inline sign-out error (role=\"alert\") when the logout mutation returns a user error, else nothing. Must be a descendant of IdentitySummaryRoot.',\n});\n\n// ---------------------------------------------------------------------------\n// Root\n// ---------------------------------------------------------------------------\n\n/**\n * Data root for the identity summary. Reads the shopper profile from its colocated fragment,\n * enforces the SessionRoot ancestor via `useSession()`, and self-gates to null in the anonymous\n * state. Owns the sign-out mutation state (pending/error) and broadcasts everything the read-only\n * parts and the sign-out button need through `IdentitySummaryContext`.\n */\nexport function IdentitySummaryRoot({\n signOutErrorMessage = 'Unable to sign out. Please try again.',\n className,\n children,\n $data: $dataProp,\n $actions,\n}: IdentitySummaryRootProps) {\n const $data = useDataOverride($dataProp);\n // Enforces the SessionRoot ancestor: useSession() throws when rendered outside one.\n const { state } = useSession();\n\n const [signOutPending, setSignOutPending] = useState(false);\n const [signOutError, setSignOutError] = useState<string | null>(null);\n\n async function handleSignOut() {\n setSignOutPending(true);\n setSignOutError(null);\n try {\n const errors: readonly SessionUserError[] = (await $actions?.session?.logout?.()) ?? [];\n if (errors.length > 0) setSignOutError(errors[0]?.message ?? signOutErrorMessage);\n } catch (error) {\n // A logout that throws rather than resolving userErrors would otherwise leave the shopper still\n // signed in with nothing on screen, and escape as an unhandled rejection.\n console.error('[IdentitySummary] logout failed:', error);\n setSignOutError(signOutErrorMessage);\n } finally {\n setSignOutPending(false);\n }\n }\n\n // Self-gate: nothing to show for an anonymous or unresolved session.\n if (state === 'anonymous') return null;\n\n const contextValue: IdentitySummaryContextValue = {\n state,\n firstName: $data?.firstName ?? '',\n lastName: $data?.lastName ?? '',\n email: $data?.email ?? '',\n phone: $data?.phone ?? '',\n document: $data?.document ?? '',\n handleSignOut,\n signOutPending,\n signOutError,\n };\n\n return (\n <IdentitySummaryContext.Provider value={contextValue}>\n <div\n className={className}\n data-fs-identity-summary=\"\"\n {...(signOutPending ? { 'data-fs-identity-summary-pending': '' } : {})}\n >\n {children}\n </div>\n </IdentitySummaryContext.Provider>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Read-only summary\n// ---------------------------------------------------------------------------\n\n/**\n * Read-only identity display: a session-state badge plus name, email, phone, and document.\n *\n * The props below configure the default composition only — composing children replaces it wholesale,\n * and a leaf placed there takes its own props (`IdentitySummaryPhone` its `country`,\n * `IdentitySummaryBadge` its labels). They are deliberately absent from the schema, so a page cannot\n * set one here and watch it disappear behind composed children.\n */\nexport function IdentitySummarySelectedSummary({\n country,\n identifiedBadgeLabel = 'Guest',\n loggedInBadgeLabel = 'Signed in',\n className,\n children,\n}: IdentitySummarySelectedSummaryProps) {\n return (\n <div className={className} data-fs-identity-summary-summary=\"\">\n {children ?? (\n <>\n <IdentitySummaryBadge identifiedLabel={identifiedBadgeLabel} loggedInLabel={loggedInBadgeLabel} />\n <IdentitySummaryName />\n <IdentitySummaryEmail />\n <IdentitySummaryPhone country={country} />\n <IdentitySummaryDocument />\n </>\n )}\n </div>\n );\n}\n\n/** Session-state badge. Renders `identifiedLabel` for a guest and `loggedInLabel` once authenticated. */\nexport function IdentitySummaryBadge({\n identifiedLabel = 'Guest',\n loggedInLabel = 'Signed in',\n className,\n}: IdentitySummaryBadgeProps) {\n const { state } = useIdentitySummaryContext();\n return (\n <Badge className={className} data-fs-identity-summary-badge=\"\" data-fs-identity-summary-state={state}>\n {state === 'loggedIn' ? loggedInLabel : identifiedLabel}\n </Badge>\n );\n}\n\n/** The shopper's full name. Renders nothing when the profile carries neither name. */\nexport function IdentitySummaryName({ className }: IdentitySummaryFieldProps) {\n const { firstName, lastName } = useIdentitySummaryContext();\n const fullName = [firstName, lastName].filter(Boolean).join(' ');\n if (!fullName) return null;\n return (\n <p className={className} data-fs-identity-summary-name=\"\">\n {fullName}\n </p>\n );\n}\n\n/** The shopper's e-mail. Renders nothing when absent. */\nexport function IdentitySummaryEmail({ className }: IdentitySummaryFieldProps) {\n const { email } = useIdentitySummaryContext();\n if (!email) return null;\n return (\n <p className={className} data-fs-identity-summary-email=\"\">\n {email}\n </p>\n );\n}\n\n/** E.164 prefixes for the countries the masks understand. */\nconst COUNTRY_PREFIX: Record<PhoneCountry, string> = { BR: '+55', US: '+1' };\n\n/**\n * The shopper's phone, masked for `country`. Renders nothing when absent, and renders the stored value\n * as-is whenever the mask does not apply to it — no country given, or a stored E.164 number belonging to\n * a different one. Each mask truncates to its own country's length, so applying the wrong one prints a\n * number that is not the shopper's, with nothing to signal that digits were dropped.\n */\nexport function IdentitySummaryPhone({ country, className }: IdentitySummaryPhoneProps) {\n const { phone } = useIdentitySummaryContext();\n if (!phone) return null;\n const maskApplies = country !== undefined && (!phone.startsWith('+') || phone.startsWith(COUNTRY_PREFIX[country]));\n return (\n <p className={className} data-fs-identity-summary-phone=\"\">\n {maskApplies && country ? applyPhoneMask(phone, country) : phone}\n </p>\n );\n}\n\n/** The shopper's tax document. Renders nothing when absent. */\nexport function IdentitySummaryDocument({ className }: IdentitySummaryFieldProps) {\n const { document } = useIdentitySummaryContext();\n if (!document) return null;\n return (\n <p className={className} data-fs-identity-summary-document=\"\">\n {document}\n </p>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Sign-out button + error (domain-coupled; the summary/form swap is IdentityEditController's)\n// ---------------------------------------------------------------------------\n\n/** Dispatches the sign-out mutation (async/pessimistic). */\nexport function IdentitySummarySignOutButton({\n label = 'Sign out',\n className,\n children,\n}: IdentitySummarySignOutButtonProps) {\n const { handleSignOut, signOutPending } = useIdentitySummaryContext();\n return (\n <button\n type=\"button\"\n data-fs-identity-summary-sign-out=\"\"\n className={className}\n disabled={signOutPending}\n {...(signOutPending ? { 'data-fs-identity-summary-pending': '' } : {})}\n onClick={handleSignOut}\n >\n {children ?? label}\n </button>\n );\n}\n\n/** Renders the inline sign-out user error, or nothing when there is none. */\nexport function IdentitySummaryError({ className }: IdentitySummaryErrorProps) {\n const { signOutError } = useIdentitySummaryContext();\n if (!signOutError) return null;\n return (\n <div role=\"alert\" className={className} data-fs-identity-summary-error=\"\">\n {signOutError}\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Namespace Export\n// ---------------------------------------------------------------------------\n\nexport const IdentitySummary = {\n Badge: IdentitySummaryBadge,\n BadgeDefinition: IdentitySummaryBadgeDefinition,\n Name: IdentitySummaryName,\n NameDefinition: IdentitySummaryNameDefinition,\n Email: IdentitySummaryEmail,\n EmailDefinition: IdentitySummaryEmailDefinition,\n Phone: IdentitySummaryPhone,\n PhoneDefinition: IdentitySummaryPhoneDefinition,\n Document: IdentitySummaryDocument,\n DocumentDefinition: IdentitySummaryDocumentDefinition,\n Root: IdentitySummaryRoot,\n RootDefinition: IdentitySummaryRootDefinition,\n SelectedSummary: IdentitySummarySelectedSummary,\n SelectedSummaryDefinition: IdentitySummarySelectedSummaryDefinition,\n SignOutButton: IdentitySummarySignOutButton,\n SignOutButtonDefinition: IdentitySummarySignOutButtonDefinition,\n Error: IdentitySummaryError,\n ErrorDefinition: IdentitySummaryErrorDefinition,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import "../../sdk/generated/graphql.js";
|
|
4
|
+
import { ComponentPropsWithRef } from "react";
|
|
5
|
+
//#region src/matter/pricing/pricing.d.ts
|
|
6
|
+
type MoneyValue = {
|
|
7
|
+
amount: number;
|
|
8
|
+
currencyCode: string;
|
|
9
|
+
};
|
|
10
|
+
type RawPromotion = {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
type RawOffer = {
|
|
14
|
+
price: MoneyValue;
|
|
15
|
+
listPrice: MoneyValue;
|
|
16
|
+
spotPrice: MoneyValue;
|
|
17
|
+
installmentPlans: Array<{
|
|
18
|
+
paymentMethod: string;
|
|
19
|
+
paymentType: string;
|
|
20
|
+
installments: Array<{
|
|
21
|
+
count: number;
|
|
22
|
+
value: MoneyValue;
|
|
23
|
+
totalAmount: MoneyValue;
|
|
24
|
+
interestRate: number;
|
|
25
|
+
interestFree: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
discountHighlights: string[];
|
|
29
|
+
promotions: RawPromotion[];
|
|
30
|
+
};
|
|
31
|
+
type RawPricingData = {
|
|
32
|
+
__typename?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
variants: {
|
|
35
|
+
edges: Array<{
|
|
36
|
+
node: {
|
|
37
|
+
sellers: Array<{
|
|
38
|
+
isDefault: boolean;
|
|
39
|
+
offer: RawOffer | null;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type InstallmentData = {
|
|
46
|
+
count: number;
|
|
47
|
+
value: number;
|
|
48
|
+
totalAmount: number;
|
|
49
|
+
interestRate: number;
|
|
50
|
+
interestFree: boolean;
|
|
51
|
+
};
|
|
52
|
+
type InstallmentPlanItemContextData = {
|
|
53
|
+
paymentMethod: string;
|
|
54
|
+
paymentType: string;
|
|
55
|
+
installments: InstallmentData[];
|
|
56
|
+
bestInstallment: InstallmentData | null;
|
|
57
|
+
};
|
|
58
|
+
export type PricingRootProps = ComponentPropsWithRef<'div'> & {
|
|
59
|
+
$data?: RawPricingData | null;
|
|
60
|
+
/** Page-supplied viewed SKU; pre-selects the offer on first paint. A published swatch selection
|
|
61
|
+
* wins over it once the shopper interacts. */
|
|
62
|
+
selectedVariantId?: string;
|
|
63
|
+
};
|
|
64
|
+
export type PricingSellingPriceProps = ComponentPropsWithRef<'span'>;
|
|
65
|
+
export type PricingListPriceProps = ComponentPropsWithRef<'span'>;
|
|
66
|
+
export type PricingSpotPriceProps = ComponentPropsWithRef<'span'>;
|
|
67
|
+
export type PricingInstallmentsProps = ComponentPropsWithRef<'div'>;
|
|
68
|
+
export type PricingInstallmentPlansProps = ComponentPropsWithRef<'div'>;
|
|
69
|
+
export type PricingInstallmentPlanProps = ComponentPropsWithRef<'div'>;
|
|
70
|
+
export type PricingInstallmentsForPlanProps = ComponentPropsWithRef<'div'>;
|
|
71
|
+
export type PricingPaymentMethodsTriggerProps = ComponentPropsWithRef<'button'>;
|
|
72
|
+
export type PricingPaymentMethodsListProps = ComponentPropsWithRef<'div'>;
|
|
73
|
+
export type PricingPaymentMethodsTabListProps = ComponentPropsWithRef<'div'>;
|
|
74
|
+
export type PricingPaymentMethodsTabPanelsProps = ComponentPropsWithRef<'div'>;
|
|
75
|
+
export type PricingPaymentMethodNameProps = ComponentPropsWithRef<'span'>;
|
|
76
|
+
export type PricingInstallmentProps = ComponentPropsWithRef<'span'> & {
|
|
77
|
+
template?: string;
|
|
78
|
+
interestFreeLabel?: string;
|
|
79
|
+
};
|
|
80
|
+
export type PricingDiscountProps = ComponentPropsWithRef<'span'> & {
|
|
81
|
+
template?: string;
|
|
82
|
+
format?: 'percentage' | 'absolute';
|
|
83
|
+
};
|
|
84
|
+
export type PricingHighlightsProps = ComponentPropsWithRef<'div'>;
|
|
85
|
+
export type PricingHighlightProps = ComponentPropsWithRef<'span'>;
|
|
86
|
+
export type PricingPromotionsProps = ComponentPropsWithRef<'div'>;
|
|
87
|
+
export type PricingPromotionProps = ComponentPropsWithRef<'span'> & {
|
|
88
|
+
template?: string;
|
|
89
|
+
};
|
|
90
|
+
export type PricingSpotDiscountProps = ComponentPropsWithRef<'span'> & {
|
|
91
|
+
template?: string;
|
|
92
|
+
};
|
|
93
|
+
export declare function useInstallmentPlanItem(caller?: string, parent?: string): InstallmentPlanItemContextData;
|
|
94
|
+
export declare const PricingRootDefinition: ComponentDefinition<PricingRootProps>;
|
|
95
|
+
export declare const PricingSellingPriceDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
96
|
+
export declare const PricingListPriceDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
97
|
+
export declare const PricingSpotPriceDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
98
|
+
export declare const PricingInstallmentsDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
99
|
+
export declare const PricingInstallmentPlansDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
100
|
+
export declare const PricingInstallmentPlanDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
101
|
+
export declare const PricingInstallmentsForPlanDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
102
|
+
export declare const PricingPaymentMethodsTriggerDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
103
|
+
export declare const PricingPaymentMethodsListDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
104
|
+
export declare const PricingPaymentMethodsTabListDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
105
|
+
export declare const PricingPaymentMethodsTabPanelsDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
106
|
+
export declare const PricingPaymentMethodNameDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
107
|
+
export declare const PricingInstallmentDefinition: ComponentDefinition<PricingInstallmentProps>;
|
|
108
|
+
export declare const PricingDiscountDefinition: ComponentDefinition<PricingDiscountProps>;
|
|
109
|
+
export declare const PricingSpotDiscountDefinition: ComponentDefinition<PricingSpotDiscountProps>;
|
|
110
|
+
export declare const PricingHighlightsDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
111
|
+
export declare const PricingHighlightDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
112
|
+
export declare const PricingPromotionsDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
113
|
+
export declare const PricingPromotionDefinition: ComponentDefinition<PricingPromotionProps>;
|
|
114
|
+
export declare function PricingRoot({ $data: $dataProp, selectedVariantId, children, ...props }: PricingRootProps): import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
export declare namespace PricingRoot {
|
|
116
|
+
var Skeleton: typeof PricingSkeleton;
|
|
117
|
+
}
|
|
118
|
+
export declare function PricingSellingPrice({ className, children, ...props }: PricingSellingPriceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
119
|
+
export declare function PricingListPrice({ className, children, ...props }: PricingListPriceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
120
|
+
export declare function PricingSpotPrice({ className, children, ...props }: PricingSpotPriceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
121
|
+
export declare function PricingInstallments({ className, children, ...props }: PricingInstallmentsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
122
|
+
export declare function PricingInstallmentPlans({ className, children, ...props }: PricingInstallmentPlansProps): import("react/jsx-runtime").JSX.Element | null;
|
|
123
|
+
export declare function PricingInstallmentPlan({ className, children, ...props }: PricingInstallmentPlanProps): import("react/jsx-runtime").JSX.Element | null;
|
|
124
|
+
export declare function PricingInstallmentsForPlan({ className, children, ...props }: PricingInstallmentsForPlanProps): import("react/jsx-runtime").JSX.Element | null;
|
|
125
|
+
export declare function PricingPaymentMethodsTrigger({ className, children, ...props }: PricingPaymentMethodsTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
126
|
+
export declare function PricingPaymentMethodsList({ className, children, ...props }: PricingPaymentMethodsListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
127
|
+
export declare function PricingPaymentMethodsTabList({ className, children, ...props }: PricingPaymentMethodsTabListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
128
|
+
export declare function PricingPaymentMethodsTabPanels({ className, children, ...props }: PricingPaymentMethodsTabPanelsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
129
|
+
export declare function PricingPaymentMethodName({ className, children, ...props }: PricingPaymentMethodNameProps): import("react/jsx-runtime").JSX.Element;
|
|
130
|
+
export declare function PricingInstallment({ template, interestFreeLabel, className, children, ...props }: PricingInstallmentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
131
|
+
export declare function PricingDiscount({ template, format, className, children, ...props }: PricingDiscountProps): import("react/jsx-runtime").JSX.Element | null;
|
|
132
|
+
export declare function PricingSpotDiscount({ template, className, children, ...props }: PricingSpotDiscountProps): import("react/jsx-runtime").JSX.Element | null;
|
|
133
|
+
export declare function PricingHighlights({ className, children, ...props }: PricingHighlightsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
134
|
+
export declare function PricingHighlight({ className, children, ...props }: PricingHighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
135
|
+
export declare function PricingPromotions({ className, children, ...props }: PricingPromotionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
136
|
+
export declare function PricingPromotion({ template, className, children, ...props }: PricingPromotionProps): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
export declare function PricingSkeleton({ className, ...props }: ComponentPropsWithRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
138
|
+
export declare const Pricing: {
|
|
139
|
+
Root: typeof PricingRoot;
|
|
140
|
+
SellingPrice: typeof PricingSellingPrice;
|
|
141
|
+
ListPrice: typeof PricingListPrice;
|
|
142
|
+
SpotPrice: typeof PricingSpotPrice;
|
|
143
|
+
Installments: typeof PricingInstallments;
|
|
144
|
+
InstallmentPlans: typeof PricingInstallmentPlans;
|
|
145
|
+
InstallmentPlan: typeof PricingInstallmentPlan;
|
|
146
|
+
InstallmentsForPlan: typeof PricingInstallmentsForPlan;
|
|
147
|
+
Installment: typeof PricingInstallment;
|
|
148
|
+
PaymentMethodsTrigger: typeof PricingPaymentMethodsTrigger;
|
|
149
|
+
PaymentMethodsList: typeof PricingPaymentMethodsList;
|
|
150
|
+
PaymentMethodsTabList: typeof PricingPaymentMethodsTabList;
|
|
151
|
+
PaymentMethodsTabPanels: typeof PricingPaymentMethodsTabPanels;
|
|
152
|
+
PaymentMethodName: typeof PricingPaymentMethodName;
|
|
153
|
+
Discount: typeof PricingDiscount;
|
|
154
|
+
SpotDiscount: typeof PricingSpotDiscount;
|
|
155
|
+
Highlights: typeof PricingHighlights;
|
|
156
|
+
Highlight: typeof PricingHighlight;
|
|
157
|
+
Promotions: typeof PricingPromotions;
|
|
158
|
+
Promotion: typeof PricingPromotion;
|
|
159
|
+
Skeleton: typeof PricingSkeleton;
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
//# sourceMappingURL=pricing.d.ts.map
|