@hanzo/commerce 7.3.7 → 7.3.9
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/components/cart/cart-panel/promo-code.tsx +7 -4
- package/components/checkout/payment-step-form/contact-form.tsx +3 -2
- package/components/checkout/payment-step-form/index.tsx +1 -1
- package/components/checkout/shipping-step-form.tsx +12 -9
- package/hanzo-ui.d.ts +108 -0
- package/package.json +3 -3
- package/tsconfig.json +3 -1
- package/util/promo-codes.ts +0 -2
- package/util/square-payment.ts +34 -27
- package/dist/components/Icons.d.ts +0 -18
- package/dist/components/Icons.jsx +0 -19
- package/dist/components/Icons.jsx.map +0 -1
- package/dist/components/add-to-cart-widget.d.ts +0 -11
- package/dist/components/add-to-cart-widget.jsx +0 -99
- package/dist/components/add-to-cart-widget.jsx.map +0 -1
- package/dist/components/buy/buy-card.d.ts +0 -30
- package/dist/components/buy/buy-card.jsx +0 -123
- package/dist/components/buy/buy-card.jsx.map +0 -1
- package/dist/components/buy/carousel-buy-card.d.ts +0 -12
- package/dist/components/buy/carousel-buy-card.jsx +0 -99
- package/dist/components/buy/carousel-buy-card.jsx.map +0 -1
- package/dist/components/buy/multi-family/all-variants-carousel.d.ts +0 -4
- package/dist/components/buy/multi-family/all-variants-carousel.jsx +0 -147
- package/dist/components/buy/multi-family/all-variants-carousel.jsx.map +0 -1
- package/dist/components/buy/multi-family/family-carousel/index.d.ts +0 -4
- package/dist/components/buy/multi-family/family-carousel/index.jsx +0 -34
- package/dist/components/buy/multi-family/family-carousel/index.jsx.map +0 -1
- package/dist/components/buy/multi-family/family-carousel/slide.d.ts +0 -11
- package/dist/components/buy/multi-family/family-carousel/slide.jsx +0 -41
- package/dist/components/buy/multi-family/family-carousel/slide.jsx.map +0 -1
- package/dist/components/buy/multi-family/family-carousel/state.d.ts +0 -20
- package/dist/components/buy/multi-family/family-carousel/state.js +0 -59
- package/dist/components/buy/multi-family/family-carousel/state.js.map +0 -1
- package/dist/components/buy/multi-family/index.d.ts +0 -2
- package/dist/components/buy/multi-family/index.js +0 -3
- package/dist/components/buy/multi-family/index.js.map +0 -1
- package/dist/components/buy/single-family-selector.d.ts +0 -15
- package/dist/components/buy/single-family-selector.jsx +0 -31
- package/dist/components/buy/single-family-selector.jsx.map +0 -1
- package/dist/components/buy/title-and-byline.d.ts +0 -8
- package/dist/components/buy/title-and-byline.jsx +0 -9
- package/dist/components/buy/title-and-byline.jsx.map +0 -1
- package/dist/components/cart/cart-panel/cart-line-item.d.ts +0 -11
- package/dist/components/cart/cart-panel/cart-line-item.jsx +0 -39
- package/dist/components/cart/cart-panel/cart-line-item.jsx.map +0 -1
- package/dist/components/cart/cart-panel/index.d.ts +0 -19
- package/dist/components/cart/cart-panel/index.jsx +0 -79
- package/dist/components/cart/cart-panel/index.jsx.map +0 -1
- package/dist/components/cart/cart-panel/promo-code.d.ts +0 -4
- package/dist/components/cart/cart-panel/promo-code.jsx +0 -73
- package/dist/components/cart/cart-panel/promo-code.jsx.map +0 -1
- package/dist/components/cart/cart-panel/total-area.d.ts +0 -7
- package/dist/components/cart/cart-panel/total-area.jsx +0 -37
- package/dist/components/cart/cart-panel/total-area.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icon-row.d.ts +0 -2
- package/dist/components/checkout/payment-step-form/card-icon-row.jsx +0 -22
- package/dist/components/checkout/payment-step-form/card-icon-row.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/amex.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/amex.jsx +0 -12
- package/dist/components/checkout/payment-step-form/card-icons/amex.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/diners-club.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/diners-club.jsx +0 -10
- package/dist/components/checkout/payment-step-form/card-icons/diners-club.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/discover.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/discover.jsx +0 -12
- package/dist/components/checkout/payment-step-form/card-icons/discover.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/jcb.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/jcb.jsx +0 -23
- package/dist/components/checkout/payment-step-form/card-icons/jcb.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/mastercard.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/mastercard.jsx +0 -12
- package/dist/components/checkout/payment-step-form/card-icons/mastercard.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/card-icons/visa.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/card-icons/visa.jsx +0 -10
- package/dist/components/checkout/payment-step-form/card-icons/visa.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/cc-button.d.ts +0 -3
- package/dist/components/checkout/payment-step-form/cc-button.jsx +0 -9
- package/dist/components/checkout/payment-step-form/cc-button.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/contact-form.d.ts +0 -5
- package/dist/components/checkout/payment-step-form/contact-form.jsx +0 -21
- package/dist/components/checkout/payment-step-form/contact-form.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/crypto-icons/btc.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/crypto-icons/btc.jsx +0 -8
- package/dist/components/checkout/payment-step-form/crypto-icons/btc.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/crypto-icons/eth.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/crypto-icons/eth.jsx +0 -17
- package/dist/components/checkout/payment-step-form/crypto-icons/eth.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/crypto-icons/usdt.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/crypto-icons/usdt.jsx +0 -10
- package/dist/components/checkout/payment-step-form/crypto-icons/usdt.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/index.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/index.jsx +0 -85
- package/dist/components/checkout/payment-step-form/index.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/methods/bank-transfer.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/methods/bank-transfer.jsx +0 -44
- package/dist/components/checkout/payment-step-form/methods/bank-transfer.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/methods/card.d.ts +0 -4
- package/dist/components/checkout/payment-step-form/methods/card.jsx +0 -182
- package/dist/components/checkout/payment-step-form/methods/card.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/methods/crypto.d.ts +0 -9
- package/dist/components/checkout/payment-step-form/methods/crypto.jsx +0 -167
- package/dist/components/checkout/payment-step-form/methods/crypto.jsx.map +0 -1
- package/dist/components/checkout/payment-step-form/methods/index.d.ts +0 -6
- package/dist/components/checkout/payment-step-form/methods/index.js +0 -21
- package/dist/components/checkout/payment-step-form/methods/index.js.map +0 -1
- package/dist/components/checkout/shipping-step-form.d.ts +0 -3
- package/dist/components/checkout/shipping-step-form.jsx +0 -105
- package/dist/components/checkout/shipping-step-form.jsx.map +0 -1
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.js +0 -9
- package/dist/components/index.js.map +0 -1
- package/dist/components/item/product-card.d.ts +0 -7
- package/dist/components/item/product-card.jsx +0 -21
- package/dist/components/item/product-card.jsx.map +0 -1
- package/dist/components/item-selector/button.d.ts +0 -4
- package/dist/components/item-selector/button.jsx +0 -65
- package/dist/components/item-selector/button.jsx.map +0 -1
- package/dist/components/item-selector/carousel/index.d.ts +0 -12
- package/dist/components/item-selector/carousel/index.jsx +0 -101
- package/dist/components/item-selector/carousel/index.jsx.map +0 -1
- package/dist/components/item-selector/carousel/slider.d.ts +0 -8
- package/dist/components/item-selector/carousel/slider.jsx +0 -11
- package/dist/components/item-selector/carousel/slider.jsx.map +0 -1
- package/dist/components/item-selector/index.d.ts +0 -2
- package/dist/components/item-selector/index.js +0 -3
- package/dist/components/item-selector/index.js.map +0 -1
- package/dist/components/item-selector/quantity-indicator.d.ts +0 -9
- package/dist/components/item-selector/quantity-indicator.jsx +0 -23
- package/dist/components/item-selector/quantity-indicator.jsx.map +0 -1
- package/dist/components/node-tabs/index.d.ts +0 -14
- package/dist/components/node-tabs/index.jsx +0 -48
- package/dist/components/node-tabs/index.jsx.map +0 -1
- package/dist/components/node-tabs/node-image.d.ts +0 -6
- package/dist/components/node-tabs/node-image.jsx +0 -12
- package/dist/components/node-tabs/node-image.jsx.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
- package/dist/service/context.d.ts +0 -8
- package/dist/service/context.jsx +0 -20
- package/dist/service/context.jsx.map +0 -1
- package/dist/service/debug.d.ts +0 -10
- package/dist/service/debug.js +0 -30
- package/dist/service/debug.js.map +0 -1
- package/dist/service/impls/standalone/actual-line-item.d.ts +0 -40
- package/dist/service/impls/standalone/actual-line-item.js +0 -84
- package/dist/service/impls/standalone/actual-line-item.js.map +0 -1
- package/dist/service/impls/standalone/get-instance.d.ts +0 -2
- package/dist/service/impls/standalone/get-instance.js +0 -39
- package/dist/service/impls/standalone/get-instance.js.map +0 -1
- package/dist/service/impls/standalone/index.d.ts +0 -67
- package/dist/service/impls/standalone/index.js +0 -416
- package/dist/service/impls/standalone/index.js.map +0 -1
- package/dist/service/impls/standalone/order/firebase.d.ts +0 -2
- package/dist/service/impls/standalone/order/firebase.js +0 -13
- package/dist/service/impls/standalone/order/firebase.js.map +0 -1
- package/dist/service/impls/standalone/order/index.d.ts +0 -24
- package/dist/service/impls/standalone/order/index.js +0 -61
- package/dist/service/impls/standalone/order/index.js.map +0 -1
- package/dist/service/impls/standalone/persistence.d.ts +0 -4
- package/dist/service/impls/standalone/persistence.js +0 -22
- package/dist/service/impls/standalone/persistence.js.map +0 -1
- package/dist/service/path-utils.d.ts +0 -7
- package/dist/service/path-utils.js +0 -16
- package/dist/service/path-utils.js.map +0 -1
- package/dist/service/sep.d.ts +0 -6
- package/dist/service/sep.js +0 -6
- package/dist/service/sep.js.map +0 -1
- package/dist/types/category-node.d.ts +0 -36
- package/dist/types/category-node.js +0 -2
- package/dist/types/category-node.js.map +0 -1
- package/dist/types/checkout.d.ts +0 -33
- package/dist/types/checkout.js +0 -2
- package/dist/types/checkout.js.map +0 -1
- package/dist/types/commerce-config.d.ts +0 -11
- package/dist/types/commerce-config.js +0 -2
- package/dist/types/commerce-config.js.map +0 -1
- package/dist/types/commerce-service.d.ts +0 -109
- package/dist/types/commerce-service.js +0 -2
- package/dist/types/commerce-service.js.map +0 -1
- package/dist/types/components/Icons.d.ts +0 -18
- package/dist/types/components/add-to-cart-widget.d.ts +0 -11
- package/dist/types/components/buy/buy-card.d.ts +0 -30
- package/dist/types/components/buy/carousel-buy-card.d.ts +0 -12
- package/dist/types/components/buy/multi-family/all-variants-carousel.d.ts +0 -4
- package/dist/types/components/buy/multi-family/family-carousel/index.d.ts +0 -4
- package/dist/types/components/buy/multi-family/family-carousel/slide.d.ts +0 -11
- package/dist/types/components/buy/multi-family/family-carousel/state.d.ts +0 -20
- package/dist/types/components/buy/multi-family/index.d.ts +0 -2
- package/dist/types/components/buy/single-family-selector.d.ts +0 -15
- package/dist/types/components/buy/title-and-byline.d.ts +0 -8
- package/dist/types/components/cart/cart-panel/cart-line-item.d.ts +0 -11
- package/dist/types/components/cart/cart-panel/index.d.ts +0 -19
- package/dist/types/components/cart/cart-panel/promo-code.d.ts +0 -4
- package/dist/types/components/cart/cart-panel/total-area.d.ts +0 -7
- package/dist/types/components/checkout/payment-step-form/card-icon-row.d.ts +0 -2
- package/dist/types/components/checkout/payment-step-form/card-icons/amex.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/card-icons/diners-club.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/card-icons/discover.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/card-icons/jcb.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/card-icons/mastercard.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/card-icons/visa.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/cc-button.d.ts +0 -3
- package/dist/types/components/checkout/payment-step-form/contact-form.d.ts +0 -5
- package/dist/types/components/checkout/payment-step-form/crypto-icons/btc.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/crypto-icons/eth.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/crypto-icons/usdt.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/index.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/methods/bank-transfer.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/methods/card.d.ts +0 -4
- package/dist/types/components/checkout/payment-step-form/methods/crypto.d.ts +0 -9
- package/dist/types/components/checkout/payment-step-form/methods/index.d.ts +0 -6
- package/dist/types/components/checkout/shipping-step-form.d.ts +0 -3
- package/dist/types/components/index.d.ts +0 -8
- package/dist/types/components/item/product-card.d.ts +0 -7
- package/dist/types/components/item-selector/button.d.ts +0 -4
- package/dist/types/components/item-selector/carousel/index.d.ts +0 -12
- package/dist/types/components/item-selector/carousel/slider.d.ts +0 -8
- package/dist/types/components/item-selector/index.d.ts +0 -2
- package/dist/types/components/item-selector/quantity-indicator.d.ts +0 -9
- package/dist/types/components/node-tabs/index.d.ts +0 -14
- package/dist/types/components/node-tabs/node-image.d.ts +0 -6
- package/dist/types/family.d.ts +0 -16
- package/dist/types/family.js +0 -2
- package/dist/types/family.js.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/types/item-selector.d.ts +0 -72
- package/dist/types/item-selector.js +0 -2
- package/dist/types/item-selector.js.map +0 -1
- package/dist/types/line-item.d.ts +0 -14
- package/dist/types/line-item.js +0 -2
- package/dist/types/line-item.js.map +0 -1
- package/dist/types/multi-family-selector-props.d.ts +0 -16
- package/dist/types/multi-family-selector-props.js +0 -2
- package/dist/types/multi-family-selector-props.js.map +0 -1
- package/dist/types/product.d.ts +0 -15
- package/dist/types/product.js +0 -2
- package/dist/types/product.js.map +0 -1
- package/dist/types/promo.d.ts +0 -7
- package/dist/types/promo.js +0 -2
- package/dist/types/promo.js.map +0 -1
- package/dist/types/selection-ui-specifier.d.ts +0 -40
- package/dist/types/selection-ui-specifier.js +0 -2
- package/dist/types/selection-ui-specifier.js.map +0 -1
- package/dist/types/service/context.d.ts +0 -8
- package/dist/types/service/debug.d.ts +0 -10
- package/dist/types/service/impls/standalone/actual-line-item.d.ts +0 -40
- package/dist/types/service/impls/standalone/get-instance.d.ts +0 -2
- package/dist/types/service/impls/standalone/index.d.ts +0 -67
- package/dist/types/service/impls/standalone/order/firebase.d.ts +0 -2
- package/dist/types/service/impls/standalone/order/index.d.ts +0 -24
- package/dist/types/service/impls/standalone/persistence.d.ts +0 -4
- package/dist/types/service/path-utils.d.ts +0 -7
- package/dist/types/service/sep.d.ts +0 -6
- package/dist/types/string-mutator.d.ts +0 -9
- package/dist/types/string-mutator.js +0 -2
- package/dist/types/string-mutator.js.map +0 -1
- package/dist/types/token-separators.d.ts +0 -6
- package/dist/types/token-separators.js +0 -2
- package/dist/types/token-separators.js.map +0 -1
- package/dist/types/types/category-node.d.ts +0 -36
- package/dist/types/types/checkout.d.ts +0 -33
- package/dist/types/types/commerce-config.d.ts +0 -11
- package/dist/types/types/commerce-service.d.ts +0 -109
- package/dist/types/types/family.d.ts +0 -16
- package/dist/types/types/index.d.ts +0 -13
- package/dist/types/types/item-selector.d.ts +0 -72
- package/dist/types/types/line-item.d.ts +0 -14
- package/dist/types/types/multi-family-selector-props.d.ts +0 -16
- package/dist/types/types/product.d.ts +0 -15
- package/dist/types/types/promo.d.ts +0 -7
- package/dist/types/types/selection-ui-specifier.d.ts +0 -40
- package/dist/types/types/string-mutator.d.ts +0 -9
- package/dist/types/types/token-separators.d.ts +0 -6
- package/dist/types/util/analytics.d.ts +0 -9
- package/dist/types/util/countries.d.ts +0 -7
- package/dist/types/util/error.d.ts +0 -1
- package/dist/types/util/index.d.ts +0 -15
- package/dist/types/util/item-selector-options-accessor.d.ts +0 -3
- package/dist/types/util/line-item-ref.d.ts +0 -8
- package/dist/types/util/multi-family-selector-options-accessor.d.ts +0 -3
- package/dist/types/util/obs-string-mutator.d.ts +0 -8
- package/dist/types/util/product-media-accessor.d.ts +0 -29
- package/dist/types/util/promo-codes.d.ts +0 -3
- package/dist/types/util/selection-ui-specifiers.d.ts +0 -3
- package/dist/types/util/square-payment.d.ts +0 -7
- package/dist/types/util/use-sync-sku-param-w-current-item.d.ts +0 -2
- package/dist/util/analytics.d.ts +0 -9
- package/dist/util/analytics.js +0 -10
- package/dist/util/analytics.js.map +0 -1
- package/dist/util/countries.d.ts +0 -7
- package/dist/util/countries.js +0 -197
- package/dist/util/countries.js.map +0 -1
- package/dist/util/error.d.ts +0 -1
- package/dist/util/error.js +0 -22
- package/dist/util/error.js.map +0 -1
- package/dist/util/index.d.ts +0 -15
- package/dist/util/index.js +0 -54
- package/dist/util/index.js.map +0 -1
- package/dist/util/item-selector-options-accessor.d.ts +0 -3
- package/dist/util/item-selector-options-accessor.js +0 -27
- package/dist/util/item-selector-options-accessor.js.map +0 -1
- package/dist/util/line-item-ref.d.ts +0 -8
- package/dist/util/line-item-ref.js +0 -15
- package/dist/util/line-item-ref.js.map +0 -1
- package/dist/util/multi-family-selector-options-accessor.d.ts +0 -3
- package/dist/util/multi-family-selector-options-accessor.js +0 -11
- package/dist/util/multi-family-selector-options-accessor.js.map +0 -1
- package/dist/util/obs-string-mutator.d.ts +0 -8
- package/dist/util/obs-string-mutator.js +0 -15
- package/dist/util/obs-string-mutator.js.map +0 -1
- package/dist/util/product-media-accessor.d.ts +0 -29
- package/dist/util/product-media-accessor.js +0 -22
- package/dist/util/product-media-accessor.js.map +0 -1
- package/dist/util/promo-codes.d.ts +0 -3
- package/dist/util/promo-codes.js +0 -101
- package/dist/util/promo-codes.js.map +0 -1
- package/dist/util/selection-ui-specifiers.d.ts +0 -3
- package/dist/util/selection-ui-specifiers.js +0 -24
- package/dist/util/selection-ui-specifiers.js.map +0 -1
- package/dist/util/square-payment.d.ts +0 -7
- package/dist/util/square-payment.js +0 -30
- package/dist/util/square-payment.js.map +0 -1
- package/dist/util/use-sync-sku-param-w-current-item.d.ts +0 -2
- package/dist/util/use-sync-sku-param-w-current-item.js +0 -61
- package/dist/util/use-sync-sku-param-w-current-item.js.map +0 -1
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
interface CategoryNode {
|
|
3
|
-
skuToken: string;
|
|
4
|
-
label: string;
|
|
5
|
-
/**
|
|
6
|
-
* Explicitly marks this node as a "last user-visible" / "outermost" Category.
|
|
7
|
-
* Normally, a node is "outermost" when it has no subnodes
|
|
8
|
-
* (and thus is a family with products -- "single-family")
|
|
9
|
-
* But if it *has* subnodes, and its subNodes are actually sibling families
|
|
10
|
-
* of a Category, it must be marked as "outermost" ("multi-family")
|
|
11
|
-
* */
|
|
12
|
-
outermost?: boolean;
|
|
13
|
-
img?: string | ReactNode;
|
|
14
|
-
imgAR?: number;
|
|
15
|
-
/**
|
|
16
|
-
* One word prompt that describes the 'meaning' of
|
|
17
|
-
* the subnodes.
|
|
18
|
-
* For example, if a node is 'Lux Credit',
|
|
19
|
-
* it's subNodesLabel might be 'Level', so some UI's
|
|
20
|
-
* might be configured to render 'Level: Black'
|
|
21
|
-
*
|
|
22
|
-
* or something like...
|
|
23
|
-
*
|
|
24
|
-
* <Tabs title={parentNode.label + ': ' + parentNode.subNodesLabel} values={families.map((f) => (f.shortName))} />
|
|
25
|
-
*
|
|
26
|
-
* ...which renders
|
|
27
|
-
*
|
|
28
|
-
* Lux Credit Levels:
|
|
29
|
-
* Black Elite Founder Sovereign
|
|
30
|
-
*/
|
|
31
|
-
subNodesLabel?: string;
|
|
32
|
-
subNodes?: CategoryNode[];
|
|
33
|
-
}
|
|
34
|
-
type CategoryNodeRole = 'single-family' | 'family-in-multi-family' | 'multi-family' | 'non-outermost';
|
|
35
|
-
type SelectedPaths = Record<number, string[]>;
|
|
36
|
-
export type { CategoryNodeRole, CategoryNode, SelectedPaths };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"category-node.js","sourceRoot":"","sources":["../../types/category-node.ts"],"names":[],"mappings":""}
|
package/dist/types/checkout.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
|
-
import type { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
type TransactionStatus = 'unpaid' | 'paid' | 'confirmed' | 'error';
|
|
4
|
-
interface CheckoutStepComponentProps {
|
|
5
|
-
onDone: () => void;
|
|
6
|
-
orderId: string | undefined;
|
|
7
|
-
setOrderId: (orderId: string | undefined) => void;
|
|
8
|
-
}
|
|
9
|
-
interface CheckoutStep {
|
|
10
|
-
name: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
Comp: ComponentType<CheckoutStepComponentProps>;
|
|
13
|
-
}
|
|
14
|
-
type ContactFormType = UseFormReturn<{
|
|
15
|
-
name: string;
|
|
16
|
-
email: string;
|
|
17
|
-
}, any, {
|
|
18
|
-
name: string;
|
|
19
|
-
email: string;
|
|
20
|
-
}>;
|
|
21
|
-
interface PaymentMethodComponentProps {
|
|
22
|
-
onDone: () => void;
|
|
23
|
-
transactionStatus: TransactionStatus;
|
|
24
|
-
setTransactionStatus: (status: TransactionStatus) => void;
|
|
25
|
-
storePaymentInfo: (paymentInfo: any) => Promise<void>;
|
|
26
|
-
contactForm: ContactFormType;
|
|
27
|
-
}
|
|
28
|
-
interface PaymentMethodDesc {
|
|
29
|
-
value: string;
|
|
30
|
-
label: string;
|
|
31
|
-
Comp: ComponentType<PaymentMethodComponentProps>;
|
|
32
|
-
}
|
|
33
|
-
export { type TransactionStatus, type CheckoutStepComponentProps, type CheckoutStep, type PaymentMethodComponentProps, type PaymentMethodDesc, type ContactFormType, };
|
package/dist/types/checkout.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../types/checkout.ts"],"names":[],"mappings":"AAuCA,OAAO,EAON,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ServiceOptions } from '..';
|
|
2
|
-
import type { CategoryNode } from './category-node';
|
|
3
|
-
import type { Family } from './family';
|
|
4
|
-
import type { SelectionUISpecifier } from './selection-ui-specifier';
|
|
5
|
-
interface CommerceConfig {
|
|
6
|
-
families: Family[];
|
|
7
|
-
rootNode: CategoryNode;
|
|
8
|
-
options?: ServiceOptions;
|
|
9
|
-
uiSpecifiers?: Record<string, SelectionUISpecifier>;
|
|
10
|
-
}
|
|
11
|
-
export { type CommerceConfig as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commerce-config.js","sourceRoot":"","sources":["../../types/commerce-config.ts"],"names":[],"mappings":"AAYA,OAAO,EAAkC,CAAA"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { LineItem, ObsLineItemRef } from './line-item';
|
|
2
|
-
import type { CategoryNode, SelectedPaths, CategoryNodeRole } from './category-node';
|
|
3
|
-
import type { Family, ObsFamilyRef } from './family';
|
|
4
|
-
import type Promo from './promo';
|
|
5
|
-
interface CommerceService extends ObsLineItemRef, ObsFamilyRef {
|
|
6
|
-
/** Items in cart */
|
|
7
|
-
get cartItems(): LineItem[];
|
|
8
|
-
/** Total of all quantities of all items in cart */
|
|
9
|
-
get cartQuantity(): number;
|
|
10
|
-
/** Total of all prices x quantities of items in cart */
|
|
11
|
-
get cartTotal(): number;
|
|
12
|
-
/** cartItem whose quantity was modified most recently
|
|
13
|
-
* item: LineItem
|
|
14
|
-
* modified: number (timestamp)
|
|
15
|
-
* (undefined if cartEmpty)
|
|
16
|
-
*/
|
|
17
|
-
get recentItem(): {
|
|
18
|
-
item: LineItem;
|
|
19
|
-
modified: number;
|
|
20
|
-
} | undefined;
|
|
21
|
-
get promoAppliedCartTotal(): number;
|
|
22
|
-
get cartEmpty(): boolean;
|
|
23
|
-
get appliedPromo(): Promo | null;
|
|
24
|
-
setAppliedPromo(promo: Promo | null): void;
|
|
25
|
-
/** returns the price with promo applied, of undefined if no promo or promo does not apply */
|
|
26
|
-
itemPromoPrice(item: LineItem): number | undefined;
|
|
27
|
-
getFamilySubtotal(familyId: string): number;
|
|
28
|
-
createOrder(email: string, name?: string): Promise<string | undefined>;
|
|
29
|
-
updateOrderShippingInfo(orderId: string, shippingInfo: any): Promise<void>;
|
|
30
|
-
updateOrderPaymentInfo(orderId: string, paymentInfo: any): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the tokens at each level supplied.
|
|
33
|
-
* If a level is selected as [], nothing will be selected.
|
|
34
|
-
* If a level is missing (undefined), everything at that level is selected
|
|
35
|
-
*
|
|
36
|
-
* This selects one or more Family's, and all the LineItem's in them.
|
|
37
|
-
*
|
|
38
|
-
* An empty value object selects all Family's and all LineItem's,
|
|
39
|
-
* */
|
|
40
|
-
selectPaths(value: SelectedPaths): Family[];
|
|
41
|
-
selectPath(skuPath: string): Family[];
|
|
42
|
-
/**
|
|
43
|
-
* With role as ...
|
|
44
|
-
*
|
|
45
|
-
* 'single-family':
|
|
46
|
-
* item: item with skuPath as SKU, otherwise undefined
|
|
47
|
-
* node: node at path (or item's parent node),
|
|
48
|
-
* family: node at path as family (or item's parent node as family),
|
|
49
|
-
* families: undefined
|
|
50
|
-
*
|
|
51
|
-
* 'family-in-multi-family':
|
|
52
|
-
* item: item with skuPath as SKU, otherwise undefined
|
|
53
|
-
* node: parent node of this family (or parent node of item's family)
|
|
54
|
-
* family: this family (or item's family)
|
|
55
|
-
* families: this family (or item's family) and siblings
|
|
56
|
-
*
|
|
57
|
-
* 'multi-family':
|
|
58
|
-
* item: undefined
|
|
59
|
-
* node: node at path
|
|
60
|
-
* family: undefined
|
|
61
|
-
* families: subnodes / families of this node
|
|
62
|
-
*
|
|
63
|
-
* 'non-outermost':
|
|
64
|
-
* item: undefined
|
|
65
|
-
* node: node at path
|
|
66
|
-
* family: undefined
|
|
67
|
-
* families: undefined
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
peek(skuPath: string): {
|
|
71
|
-
role: CategoryNodeRole;
|
|
72
|
-
family: Family | undefined;
|
|
73
|
-
families: Family[] | undefined;
|
|
74
|
-
node: CategoryNode | undefined;
|
|
75
|
-
item: LineItem | undefined;
|
|
76
|
-
} | string;
|
|
77
|
-
/** @deprecated
|
|
78
|
-
* Whether this path defines a Family, or if it has further levels
|
|
79
|
-
* */
|
|
80
|
-
getNodeAtPath(skuPath: string): CategoryNode | undefined;
|
|
81
|
-
get selectedPaths(): SelectedPaths;
|
|
82
|
-
get selectedItems(): LineItem[];
|
|
83
|
-
get selectedFamilies(): Family[];
|
|
84
|
-
get hasSelection(): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Who are the subnodes selected at 'level'?
|
|
87
|
-
* If more than one value is selected at 'level',
|
|
88
|
-
* the returned CategoryNode[] may represent multiple sets.
|
|
89
|
-
* */
|
|
90
|
-
getSelectedNodesAtLevel(level: number): CategoryNode[] | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* For convenience, so widgets can share state.
|
|
93
|
-
* "current" is unrelated to what branches and items are
|
|
94
|
-
* "selected" (with CategoryNode's and paths)
|
|
95
|
-
*
|
|
96
|
-
* SEE ALSO: from ObsLineItemRef and ObsFamilyRef, there are also
|
|
97
|
-
* get item(): LineItem | undefined
|
|
98
|
-
* get family(): Family | undefined
|
|
99
|
-
*
|
|
100
|
-
* These simply delegate to these functions
|
|
101
|
-
* */
|
|
102
|
-
setCurrentItem(sku: string | undefined): boolean;
|
|
103
|
-
get currentItem(): LineItem | undefined;
|
|
104
|
-
setCurrentFamily(id: string | undefined): boolean;
|
|
105
|
-
get currentFamily(): Family | undefined;
|
|
106
|
-
getFamilyById(id: string): Family | undefined;
|
|
107
|
-
getItemBySku(sku: string): LineItem | undefined;
|
|
108
|
-
}
|
|
109
|
-
export { type CommerceService as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commerce-service.js","sourceRoot":"","sources":["../../types/commerce-service.ts"],"names":[],"mappings":"AA6HA,OAAO,EAEN,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
shoppingCart: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
3
|
-
menu: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
|
-
chevronLeft: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
5
|
-
chevronRight: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
6
|
-
spinner: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
7
|
-
check: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
8
|
-
plus: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
9
|
-
minus: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
10
|
-
chevronDown: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
11
|
-
chevronsLeft: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
12
|
-
chevronsRight: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
13
|
-
placeholder: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
14
|
-
trash: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
15
|
-
search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
16
|
-
barcode: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LineItem } from '../types';
|
|
3
|
-
declare const AddToCartWidget: React.FC<{
|
|
4
|
-
item: LineItem;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
buttonClx?: string;
|
|
8
|
-
variant?: 'minimal' | 'primary' | 'primary-smaller' | 'outline';
|
|
9
|
-
onQuantityChanged?: (sku: string, oldV: number, newV: number) => void;
|
|
10
|
-
}>;
|
|
11
|
-
export default AddToCartWidget;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentType } from 'react';
|
|
2
|
-
import type { ItemSelectorProps, ItemSelectorCompProps } from '../../types';
|
|
3
|
-
declare const BuyCard: React.FC<{
|
|
4
|
-
skuPath: string;
|
|
5
|
-
/** For any selectors that show a list of choices,
|
|
6
|
-
* starting with 'scrollAfter' elements,
|
|
7
|
-
* the list will scroll, and the card will
|
|
8
|
-
* have 'scrollHeightClx' applied to it to define and fix the height.
|
|
9
|
-
* This is most like something like '80vh'
|
|
10
|
-
* defaults are '5' and 'h-[70vh]'
|
|
11
|
-
* */
|
|
12
|
-
scrollAfter?: number;
|
|
13
|
-
scrollHeightClx?: string;
|
|
14
|
-
clx?: string;
|
|
15
|
-
famWidgetClx?: string;
|
|
16
|
-
addWidgetClx?: string;
|
|
17
|
-
selector: ComponentType<ItemSelectorProps>;
|
|
18
|
-
selectorProps?: ItemSelectorCompProps;
|
|
19
|
-
/** Show all items from all sibling families
|
|
20
|
-
* If skuPath defines a Family, the first of it's items will
|
|
21
|
-
* be selected. The facet widget will just select a the first
|
|
22
|
-
* item in the chosen Family without changings the overall set
|
|
23
|
-
* of choices. */
|
|
24
|
-
allVariants?: boolean;
|
|
25
|
-
familyTabAs?: 'image' | 'label' | 'image-and-label';
|
|
26
|
-
showItemMedia?: boolean;
|
|
27
|
-
onQuantityChanged?: (sku: string, oldV: number, newV: number) => void;
|
|
28
|
-
mobile?: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
export default BuyCard;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const CarouselBuyCard: React.FC<{
|
|
3
|
-
skuPath: string;
|
|
4
|
-
checkoutButton: React.ReactNode;
|
|
5
|
-
clx?: string;
|
|
6
|
-
selectorClx?: string;
|
|
7
|
-
addBtnClx?: string;
|
|
8
|
-
buttonsAreaClx?: string;
|
|
9
|
-
mobile?: boolean;
|
|
10
|
-
onQuantityChanged?: (sku: string, oldV: number, newV: number) => void;
|
|
11
|
-
}>;
|
|
12
|
-
export default CarouselBuyCard;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Dimensions } from '@hanzo/ui/types';
|
|
3
|
-
import type { ItemSelectorOptions, Family, ItemSelector } from '../../../../types';
|
|
4
|
-
declare const FamilySlide: React.FC<Omit<ItemSelector, 'items'> & {
|
|
5
|
-
family: Family;
|
|
6
|
-
mediaConstraint: Dimensions;
|
|
7
|
-
clx?: string;
|
|
8
|
-
mobile?: boolean;
|
|
9
|
-
options?: ItemSelectorOptions;
|
|
10
|
-
}>;
|
|
11
|
-
export default FamilySlide;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Family, LineItem, ObsLineItemRef, Product } from '../../../../types';
|
|
2
|
-
declare class SlideState implements ObsLineItemRef {
|
|
3
|
-
_fam: Family;
|
|
4
|
-
_item: Product;
|
|
5
|
-
_syncSku: (sku: string) => void;
|
|
6
|
-
_selected: boolean;
|
|
7
|
-
constructor(fam: Family, initiallySelected: boolean, sync: (sku: string) => void);
|
|
8
|
-
selectSku: (sku: string) => void;
|
|
9
|
-
setSelected: (b: boolean) => void;
|
|
10
|
-
get id(): string;
|
|
11
|
-
get item(): LineItem | undefined;
|
|
12
|
-
}
|
|
13
|
-
declare class FamilyCarouselState {
|
|
14
|
-
_map: Map<string, SlideState>;
|
|
15
|
-
_syncSku: (sku: string) => void;
|
|
16
|
-
constructor(fams: Family[], syncSkuToCurrentSlide: (sku: string) => void);
|
|
17
|
-
setCurrentFamily: (id: string) => void;
|
|
18
|
-
getSlideState: (familyId: string) => SlideState | undefined;
|
|
19
|
-
}
|
|
20
|
-
export { SlideState, FamilyCarouselState };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Dimensions } from '@hanzo/ui/types';
|
|
3
|
-
import type { ItemSelectorOptions, ItemSelectorProps, LineItem } from '../../types';
|
|
4
|
-
declare const SingleFamilySelector: React.FC<{
|
|
5
|
-
items: LineItem[];
|
|
6
|
-
Selector: React.ComponentType<ItemSelectorProps>;
|
|
7
|
-
selOptions: ItemSelectorOptions | undefined;
|
|
8
|
-
scrollable?: boolean;
|
|
9
|
-
showItemMedia?: boolean;
|
|
10
|
-
mediaConstraint?: Dimensions;
|
|
11
|
-
mobile?: boolean;
|
|
12
|
-
clx?: string;
|
|
13
|
-
titleAreaClx?: string;
|
|
14
|
-
}>;
|
|
15
|
-
export default SingleFamilySelector;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LineItem } from '../../../types';
|
|
3
|
-
declare const CartLineItem: React.FC<{
|
|
4
|
-
item: LineItem;
|
|
5
|
-
className?: string;
|
|
6
|
-
imgSizePx?: number;
|
|
7
|
-
showPromoCode?: boolean;
|
|
8
|
-
itemClicked?: (item: LineItem) => void;
|
|
9
|
-
selected?: boolean;
|
|
10
|
-
}>;
|
|
11
|
-
export default CartLineItem;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
declare const CartPanel: React.FC<PropsWithChildren & {
|
|
3
|
-
/** fix size and scroll after 'scrollAfter items in teh cart. */
|
|
4
|
-
scrollAfter?: number;
|
|
5
|
-
scrollHeightClx?: string;
|
|
6
|
-
imgSizePx?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
itemClx?: string;
|
|
9
|
-
listClx?: string;
|
|
10
|
-
noItemsClx?: string;
|
|
11
|
-
totalClx?: string;
|
|
12
|
-
buttonClx?: string;
|
|
13
|
-
showPromoCode?: boolean;
|
|
14
|
-
showShipping?: boolean;
|
|
15
|
-
selectItems?: boolean;
|
|
16
|
-
/** if not provided, 'checkout' button will be rendered */
|
|
17
|
-
handleCheckout?: () => void;
|
|
18
|
-
}>;
|
|
19
|
-
export default CartPanel;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PaymentMethodComponentProps } from '../../../../types';
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
ethereum?: any;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
declare const PayWithCrypto: React.FC<PaymentMethodComponentProps>;
|
|
9
|
-
export default PayWithCrypto;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as AddToCartWidget } from './add-to-cart-widget';
|
|
2
|
-
export { default as CarouselBuyCard } from './buy/carousel-buy-card';
|
|
3
|
-
export { default as CartPanel } from './cart/cart-panel';
|
|
4
|
-
export { default as Icons } from './Icons';
|
|
5
|
-
export { default as PaymentStepForm } from './checkout/payment-step-form';
|
|
6
|
-
export { default as ProductCard } from './item/product-card';
|
|
7
|
-
export { default as ShippingStepForm } from './checkout/shipping-step-form';
|
|
8
|
-
export * from './item-selector';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Dimensions } from '@hanzo/ui/types';
|
|
3
|
-
import { type CarouselOptions } from '@hanzo/ui/primitives';
|
|
4
|
-
import type { ItemSelectorProps } from '../../../types';
|
|
5
|
-
interface CarouselItemSelectorPropsExt {
|
|
6
|
-
constrainTo: Dimensions;
|
|
7
|
-
options?: CarouselOptions;
|
|
8
|
-
/** Do not show Family and / or Item title and Price */
|
|
9
|
-
imageOnly?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const CarouselItemSelector: React.FC<ItemSelectorProps>;
|
|
12
|
-
export { type CarouselItemSelectorPropsExt, CarouselItemSelector as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CategoryNode, StringMutator, StringArrayMutator } from '../../types';
|
|
3
|
-
declare const NodeTabs: React.FC<{
|
|
4
|
-
levelNodes: CategoryNode[];
|
|
5
|
-
mutator: StringMutator | StringArrayMutator;
|
|
6
|
-
multiple?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
buttonClx?: string;
|
|
9
|
-
itemClx?: string;
|
|
10
|
-
mobile?: boolean;
|
|
11
|
-
tabSize?: string;
|
|
12
|
-
show?: 'image' | 'label' | 'image-and-label';
|
|
13
|
-
}>;
|
|
14
|
-
export default NodeTabs;
|