@propeller-commerce/propeller-v2-react-ui 0.18.0 → 0.19.0
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 +84 -12
- package/dist/index.cjs +332 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -10
- package/dist/index.d.ts +94 -10
- package/dist/index.js +334 -216
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +16 -14
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +38 -1
- package/dist/pure.d.ts +38 -1
- package/dist/pure.js +17 -15
- package/dist/pure.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -555,7 +555,7 @@ interface AddItemOptions {
|
|
|
555
555
|
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: {
|
|
556
556
|
productId: number;
|
|
557
557
|
quantity: number;
|
|
558
|
-
}[], notes?: string, price?: number) => Cart
|
|
558
|
+
}[], notes?: string, price?: number) => Cart | Promise<Cart>;
|
|
559
559
|
/** Fires after the item is added — receives the updated cart and the matched line item. */
|
|
560
560
|
afterAddToCart?: (cart: Cart, item: CartMainItem | null) => void;
|
|
561
561
|
/** When `true`, rejects the add if `product.inventory.totalQuantity` is below `quantity`. */
|
|
@@ -597,6 +597,15 @@ interface UseCartReturn {
|
|
|
597
597
|
cart: Cart;
|
|
598
598
|
item: CartMainItem | null;
|
|
599
599
|
}, string>>;
|
|
600
|
+
/**
|
|
601
|
+
* Adds several products in one call, sequentially, threading the resolved
|
|
602
|
+
* cart id from each add into the next. Use this instead of looping over
|
|
603
|
+
* `addItem` yourself. Stops at the first failure and returns that error.
|
|
604
|
+
*/
|
|
605
|
+
addItems: (items: AddItemOptions[]) => Promise<Result<{
|
|
606
|
+
cart: Cart;
|
|
607
|
+
items: (CartMainItem | null)[];
|
|
608
|
+
}, string>>;
|
|
600
609
|
/** Updates a line item's quantity. */
|
|
601
610
|
updateItemQuantity: (cartItemId: string, quantity: number) => Promise<Cart | undefined>;
|
|
602
611
|
/** Debounced update of a line item's notes (`debounceMs` defaults to 500). */
|
|
@@ -1428,7 +1437,7 @@ interface UseProductSearchOptions {
|
|
|
1428
1437
|
configuration: {
|
|
1429
1438
|
baseCategoryId?: number;
|
|
1430
1439
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1431
|
-
* listings exactly like the SSR seed does
|
|
1440
|
+
* listings exactly like the SSR seed does. */
|
|
1432
1441
|
anonymousUserId?: number;
|
|
1433
1442
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
1434
1443
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -1566,7 +1575,7 @@ interface UseQuickOrderOptions {
|
|
|
1566
1575
|
/** Catalog root. Without it the search returns nothing — see `searchProducts`. */
|
|
1567
1576
|
baseCategoryId?: number;
|
|
1568
1577
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1569
|
-
* listings exactly like the SSR seed does
|
|
1578
|
+
* listings exactly like the SSR seed does. */
|
|
1570
1579
|
anonymousUserId?: number;
|
|
1571
1580
|
};
|
|
1572
1581
|
/** Fires when `submit` creates a fresh cart — persist the cart id. */
|
|
@@ -1681,7 +1690,7 @@ interface UseSparePartsOptions {
|
|
|
1681
1690
|
/** Image filter config, mirroring `useProductSearch`'s `configuration`. */
|
|
1682
1691
|
configuration?: {
|
|
1683
1692
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1684
|
-
* listings exactly like the SSR seed does
|
|
1693
|
+
* listings exactly like the SSR seed does. */
|
|
1685
1694
|
anonymousUserId?: number;
|
|
1686
1695
|
imageSearchFiltersGrid?: unknown;
|
|
1687
1696
|
imageVariantFiltersMedium?: unknown;
|
|
@@ -1798,7 +1807,7 @@ interface UseProductSliderOptions {
|
|
|
1798
1807
|
/** Portal configuration: image search/variant filters. */
|
|
1799
1808
|
configuration?: {
|
|
1800
1809
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1801
|
-
* listings exactly like the SSR seed does
|
|
1810
|
+
* listings exactly like the SSR seed does. */
|
|
1802
1811
|
anonymousUserId?: number;
|
|
1803
1812
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
1804
1813
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -2700,7 +2709,7 @@ interface AddToCartProps {
|
|
|
2700
2709
|
* Callback to handle adding the product to cart.
|
|
2701
2710
|
* If not provided the component calls CartService.addItemToCart internally.
|
|
2702
2711
|
*/
|
|
2703
|
-
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart
|
|
2712
|
+
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart | Promise<Cart>;
|
|
2704
2713
|
/**
|
|
2705
2714
|
* Callback triggered after adding the product to cart.
|
|
2706
2715
|
*/
|
|
@@ -2725,6 +2734,11 @@ interface AddToCartProps {
|
|
|
2725
2734
|
language?: string;
|
|
2726
2735
|
/** Additional CSS class for the root element */
|
|
2727
2736
|
className?: string;
|
|
2737
|
+
/**
|
|
2738
|
+
* Labels for the bonus-items block in the success modal.
|
|
2739
|
+
* Keys: `title` ('Bonus items'), `sku` ('SKU').
|
|
2740
|
+
*/
|
|
2741
|
+
bonusItemsLabels?: Record<string, string>;
|
|
2728
2742
|
/** Callback fired when the "Proceed to checkout" modal button is clicked */
|
|
2729
2743
|
onProceedToCheckout?: () => void;
|
|
2730
2744
|
/** Callback fired when the "Request a Quote" modal button is clicked */
|
|
@@ -3127,6 +3141,12 @@ declare function CartBonusItems(rawProps: CartBonusItemsProps): React$1.JSX.Elem
|
|
|
3127
3141
|
*/
|
|
3128
3142
|
|
|
3129
3143
|
interface CartCarriersProps {
|
|
3144
|
+
/**
|
|
3145
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3146
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3147
|
+
* the language the shopper is reading.
|
|
3148
|
+
*/
|
|
3149
|
+
language?: string;
|
|
3130
3150
|
/** Shopping cart object from which the carriers will be displayed */
|
|
3131
3151
|
cart: Cart;
|
|
3132
3152
|
/** The CSS class for the carriers container */
|
|
@@ -3368,7 +3388,8 @@ interface CartIconAndSidebarProps {
|
|
|
3368
3388
|
/**
|
|
3369
3389
|
* Labels for the component.
|
|
3370
3390
|
* Available keys: cartIconLabel, totalLabel, itemsLabel, emptyCart,
|
|
3371
|
-
* continueShopping, qty, total, checkoutButton, cartPageButton,
|
|
3391
|
+
* continueShopping, qty, total, totalExclVat, checkoutButton, cartPageButton,
|
|
3392
|
+
* closeLabel
|
|
3372
3393
|
*/
|
|
3373
3394
|
labels?: Record<string, string>;
|
|
3374
3395
|
/**
|
|
@@ -3475,6 +3496,12 @@ declare function CartOverview(props: CartOverviewProps): React$1.JSX.Element;
|
|
|
3475
3496
|
*/
|
|
3476
3497
|
|
|
3477
3498
|
interface CartPaymethodsProps {
|
|
3499
|
+
/**
|
|
3500
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3501
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3502
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
3503
|
+
*/
|
|
3504
|
+
language?: string;
|
|
3478
3505
|
/** Shopping cart object from which the payment methods will be displayed */
|
|
3479
3506
|
cart: Cart;
|
|
3480
3507
|
/** Authenticated user — used for cart creation / lookup. Resolved from `<PropellerProvider>` when not passed explicitly. */
|
|
@@ -3516,10 +3543,18 @@ declare function CartPaymethods(rawProps: CartPaymethodsProps): React$1.JSX.Elem
|
|
|
3516
3543
|
*/
|
|
3517
3544
|
|
|
3518
3545
|
interface CartSummaryProps {
|
|
3546
|
+
/**
|
|
3547
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3548
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3549
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
3550
|
+
*/
|
|
3551
|
+
language?: string;
|
|
3519
3552
|
/** The shopping cart used to populate the cart summary data */
|
|
3520
3553
|
cart: Cart;
|
|
3521
3554
|
/** Cart summary block title */
|
|
3522
3555
|
title?: string;
|
|
3556
|
+
/** Extra classes for the panel root, merged over the defaults via tailwind-merge. */
|
|
3557
|
+
className?: string;
|
|
3523
3558
|
/** Labels for the component */
|
|
3524
3559
|
labels?: Record<string, string>;
|
|
3525
3560
|
/** Display the subtotal of the shopping cart. Defaults to `true`. */
|
|
@@ -4724,6 +4759,8 @@ interface GridFiltersProps {
|
|
|
4724
4759
|
/** Translated labels keyed by the slugs used inside the component (see
|
|
4725
4760
|
* `getLabel` calls). Missing keys fall back to the English defaults. */
|
|
4726
4761
|
labels?: Record<string, string>;
|
|
4762
|
+
/** Currency symbol shown in the price-range inputs. Falls back to PropellerInfra.currency, then `'€'`. */
|
|
4763
|
+
currency?: string;
|
|
4727
4764
|
}
|
|
4728
4765
|
/**
|
|
4729
4766
|
* Faceted filter sidebar for a product grid: collapsible attribute checkbox
|
|
@@ -5242,9 +5279,22 @@ interface OrderItemCardProps {
|
|
|
5242
5279
|
* This component is RSC-safe (no hooks, no context), so the host has to pass
|
|
5243
5280
|
* it — there is nothing to read it from. Without it a non-default storefront
|
|
5244
5281
|
* renders default-language names and, worse, default-language slugs in the
|
|
5245
|
-
* links
|
|
5282
|
+
* links.
|
|
5246
5283
|
*/
|
|
5247
5284
|
language?: string;
|
|
5285
|
+
/**
|
|
5286
|
+
* URL builders from the host's configuration. Supply them and the item link
|
|
5287
|
+
* is generated the same way every other link on the storefront is — which is
|
|
5288
|
+
* what carries the locale prefix. Without it the component falls back to a
|
|
5289
|
+
* bare `/product/:id/:slug`, and on a prefixed storefront that link drops the
|
|
5290
|
+
* visitor onto the default language.
|
|
5291
|
+
*/
|
|
5292
|
+
configuration?: {
|
|
5293
|
+
urls?: {
|
|
5294
|
+
getProductUrl?: (product: Product, language?: string) => string;
|
|
5295
|
+
getClusterUrl?: (cluster: Cluster, language?: string) => string;
|
|
5296
|
+
};
|
|
5297
|
+
};
|
|
5248
5298
|
/** Should the item title be a link to the PDP */
|
|
5249
5299
|
titleLinkable?: boolean;
|
|
5250
5300
|
/** Display a small thumbnail of the order item */
|
|
@@ -5319,6 +5369,12 @@ declare function OrderBonusItems(rawProps: OrderBonusItemsProps): React$1.JSX.El
|
|
|
5319
5369
|
*/
|
|
5320
5370
|
|
|
5321
5371
|
interface OrderListProps {
|
|
5372
|
+
/**
|
|
5373
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5374
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5375
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
5376
|
+
*/
|
|
5377
|
+
language?: string;
|
|
5322
5378
|
/** The authenticated user (Contact or Customer). Resolved from PropellerProvider when omitted. */
|
|
5323
5379
|
user?: Contact | Customer | null;
|
|
5324
5380
|
/** The initialized GraphQL Client instance. Resolved from PropellerProvider when omitted. */
|
|
@@ -5465,7 +5521,7 @@ interface QuickOrderProps {
|
|
|
5465
5521
|
*/
|
|
5466
5522
|
baseCategoryId?: number;
|
|
5467
5523
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
5468
|
-
* listings exactly like the SSR seed does
|
|
5524
|
+
* listings exactly like the SSR seed does. */
|
|
5469
5525
|
anonymousUserId?: number;
|
|
5470
5526
|
};
|
|
5471
5527
|
/** Tax zone for price calculation. Defaults to `'NL'`. */
|
|
@@ -5564,6 +5620,12 @@ declare function OrderShipments(props: OrderShipmentsProps): React$1.JSX.Element
|
|
|
5564
5620
|
*/
|
|
5565
5621
|
|
|
5566
5622
|
interface OrderSummaryProps {
|
|
5623
|
+
/**
|
|
5624
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5625
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5626
|
+
* the language the shopper is reading.
|
|
5627
|
+
*/
|
|
5628
|
+
language?: string;
|
|
5567
5629
|
/** The order object from propeller-sdk-v2 */
|
|
5568
5630
|
order: any;
|
|
5569
5631
|
/** The CSS class for the order summary container */
|
|
@@ -5627,6 +5689,12 @@ declare function OrderSummary(props: OrderSummaryProps): React$1.JSX.Element;
|
|
|
5627
5689
|
*/
|
|
5628
5690
|
|
|
5629
5691
|
interface OrderTotalsProps {
|
|
5692
|
+
/**
|
|
5693
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5694
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5695
|
+
* the language the shopper is reading.
|
|
5696
|
+
*/
|
|
5697
|
+
language?: string;
|
|
5630
5698
|
/** The order/quote used to populate the summary data */
|
|
5631
5699
|
order: Order;
|
|
5632
5700
|
/** Order summary block title */
|
|
@@ -5709,6 +5777,12 @@ declare function PriceToggle(props: PriceToggleProps): React$1.JSX.Element;
|
|
|
5709
5777
|
*/
|
|
5710
5778
|
|
|
5711
5779
|
interface ProductBulkPricesProps {
|
|
5780
|
+
/**
|
|
5781
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5782
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5783
|
+
* the language the shopper is reading.
|
|
5784
|
+
*/
|
|
5785
|
+
language?: string;
|
|
5712
5786
|
/**
|
|
5713
5787
|
* Bulk price tiers from the product.
|
|
5714
5788
|
* Obtain from `product.bulkPrices`.
|
|
@@ -5995,6 +6069,8 @@ interface ProductCardProps {
|
|
|
5995
6069
|
* See `ProductPriceProps.labels` for slugs (inclTax, exclTax, loginToSeePrices). */
|
|
5996
6070
|
priceLabels?: Record<string, string>;
|
|
5997
6071
|
/** Replaces the default price block. Receives `PriceComponentProps`. */
|
|
6072
|
+
/** Currency symbol used when formatting the price. Falls back to PropellerInfra.currency, then `'€'`. */
|
|
6073
|
+
currency?: string;
|
|
5998
6074
|
priceComponent?: React$1.ComponentType<_propeller_commerce_propeller_v2_core_ui.PriceComponentProps>;
|
|
5999
6075
|
/** Replaces the default stock/availability block. Receives `StockComponentProps`. */
|
|
6000
6076
|
stockComponent?: React$1.ComponentType<_propeller_commerce_propeller_v2_core_ui.StockComponentProps>;
|
|
@@ -6368,7 +6444,7 @@ interface ProductGridProps {
|
|
|
6368
6444
|
configuration?: {
|
|
6369
6445
|
baseCategoryId?: number;
|
|
6370
6446
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
6371
|
-
* listings exactly like the SSR seed does
|
|
6447
|
+
* listings exactly like the SSR seed does. */
|
|
6372
6448
|
anonymousUserId?: number;
|
|
6373
6449
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
6374
6450
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -6692,6 +6768,12 @@ declare const ProductInfoExport: ProductInfoComponent;
|
|
|
6692
6768
|
*/
|
|
6693
6769
|
|
|
6694
6770
|
interface ProductPriceProps {
|
|
6771
|
+
/**
|
|
6772
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
6773
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
6774
|
+
* the language the shopper is reading.
|
|
6775
|
+
*/
|
|
6776
|
+
language?: string;
|
|
6695
6777
|
/**
|
|
6696
6778
|
* ProductPrice object from the product.
|
|
6697
6779
|
* Obtain from `product.price`.
|
|
@@ -7461,6 +7543,8 @@ interface SearchBarProps {
|
|
|
7461
7543
|
priceLabels?: Record<string, string>;
|
|
7462
7544
|
/** Additional class name for the container */
|
|
7463
7545
|
containerClassName?: string;
|
|
7546
|
+
/** Extra classes for the search input, merged over the defaults via tailwind-merge. */
|
|
7547
|
+
inputClassName?: string;
|
|
7464
7548
|
/** Tax zone used for price calculation. Defaults to 'NL'. */
|
|
7465
7549
|
taxZone?: string;
|
|
7466
7550
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -555,7 +555,7 @@ interface AddItemOptions {
|
|
|
555
555
|
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: {
|
|
556
556
|
productId: number;
|
|
557
557
|
quantity: number;
|
|
558
|
-
}[], notes?: string, price?: number) => Cart
|
|
558
|
+
}[], notes?: string, price?: number) => Cart | Promise<Cart>;
|
|
559
559
|
/** Fires after the item is added — receives the updated cart and the matched line item. */
|
|
560
560
|
afterAddToCart?: (cart: Cart, item: CartMainItem | null) => void;
|
|
561
561
|
/** When `true`, rejects the add if `product.inventory.totalQuantity` is below `quantity`. */
|
|
@@ -597,6 +597,15 @@ interface UseCartReturn {
|
|
|
597
597
|
cart: Cart;
|
|
598
598
|
item: CartMainItem | null;
|
|
599
599
|
}, string>>;
|
|
600
|
+
/**
|
|
601
|
+
* Adds several products in one call, sequentially, threading the resolved
|
|
602
|
+
* cart id from each add into the next. Use this instead of looping over
|
|
603
|
+
* `addItem` yourself. Stops at the first failure and returns that error.
|
|
604
|
+
*/
|
|
605
|
+
addItems: (items: AddItemOptions[]) => Promise<Result<{
|
|
606
|
+
cart: Cart;
|
|
607
|
+
items: (CartMainItem | null)[];
|
|
608
|
+
}, string>>;
|
|
600
609
|
/** Updates a line item's quantity. */
|
|
601
610
|
updateItemQuantity: (cartItemId: string, quantity: number) => Promise<Cart | undefined>;
|
|
602
611
|
/** Debounced update of a line item's notes (`debounceMs` defaults to 500). */
|
|
@@ -1428,7 +1437,7 @@ interface UseProductSearchOptions {
|
|
|
1428
1437
|
configuration: {
|
|
1429
1438
|
baseCategoryId?: number;
|
|
1430
1439
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1431
|
-
* listings exactly like the SSR seed does
|
|
1440
|
+
* listings exactly like the SSR seed does. */
|
|
1432
1441
|
anonymousUserId?: number;
|
|
1433
1442
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
1434
1443
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -1566,7 +1575,7 @@ interface UseQuickOrderOptions {
|
|
|
1566
1575
|
/** Catalog root. Without it the search returns nothing — see `searchProducts`. */
|
|
1567
1576
|
baseCategoryId?: number;
|
|
1568
1577
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1569
|
-
* listings exactly like the SSR seed does
|
|
1578
|
+
* listings exactly like the SSR seed does. */
|
|
1570
1579
|
anonymousUserId?: number;
|
|
1571
1580
|
};
|
|
1572
1581
|
/** Fires when `submit` creates a fresh cart — persist the cart id. */
|
|
@@ -1681,7 +1690,7 @@ interface UseSparePartsOptions {
|
|
|
1681
1690
|
/** Image filter config, mirroring `useProductSearch`'s `configuration`. */
|
|
1682
1691
|
configuration?: {
|
|
1683
1692
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1684
|
-
* listings exactly like the SSR seed does
|
|
1693
|
+
* listings exactly like the SSR seed does. */
|
|
1685
1694
|
anonymousUserId?: number;
|
|
1686
1695
|
imageSearchFiltersGrid?: unknown;
|
|
1687
1696
|
imageVariantFiltersMedium?: unknown;
|
|
@@ -1798,7 +1807,7 @@ interface UseProductSliderOptions {
|
|
|
1798
1807
|
/** Portal configuration: image search/variant filters. */
|
|
1799
1808
|
configuration?: {
|
|
1800
1809
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
1801
|
-
* listings exactly like the SSR seed does
|
|
1810
|
+
* listings exactly like the SSR seed does. */
|
|
1802
1811
|
anonymousUserId?: number;
|
|
1803
1812
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
1804
1813
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -2700,7 +2709,7 @@ interface AddToCartProps {
|
|
|
2700
2709
|
* Callback to handle adding the product to cart.
|
|
2701
2710
|
* If not provided the component calls CartService.addItemToCart internally.
|
|
2702
2711
|
*/
|
|
2703
|
-
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart
|
|
2712
|
+
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart | Promise<Cart>;
|
|
2704
2713
|
/**
|
|
2705
2714
|
* Callback triggered after adding the product to cart.
|
|
2706
2715
|
*/
|
|
@@ -2725,6 +2734,11 @@ interface AddToCartProps {
|
|
|
2725
2734
|
language?: string;
|
|
2726
2735
|
/** Additional CSS class for the root element */
|
|
2727
2736
|
className?: string;
|
|
2737
|
+
/**
|
|
2738
|
+
* Labels for the bonus-items block in the success modal.
|
|
2739
|
+
* Keys: `title` ('Bonus items'), `sku` ('SKU').
|
|
2740
|
+
*/
|
|
2741
|
+
bonusItemsLabels?: Record<string, string>;
|
|
2728
2742
|
/** Callback fired when the "Proceed to checkout" modal button is clicked */
|
|
2729
2743
|
onProceedToCheckout?: () => void;
|
|
2730
2744
|
/** Callback fired when the "Request a Quote" modal button is clicked */
|
|
@@ -3127,6 +3141,12 @@ declare function CartBonusItems(rawProps: CartBonusItemsProps): React$1.JSX.Elem
|
|
|
3127
3141
|
*/
|
|
3128
3142
|
|
|
3129
3143
|
interface CartCarriersProps {
|
|
3144
|
+
/**
|
|
3145
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3146
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3147
|
+
* the language the shopper is reading.
|
|
3148
|
+
*/
|
|
3149
|
+
language?: string;
|
|
3130
3150
|
/** Shopping cart object from which the carriers will be displayed */
|
|
3131
3151
|
cart: Cart;
|
|
3132
3152
|
/** The CSS class for the carriers container */
|
|
@@ -3368,7 +3388,8 @@ interface CartIconAndSidebarProps {
|
|
|
3368
3388
|
/**
|
|
3369
3389
|
* Labels for the component.
|
|
3370
3390
|
* Available keys: cartIconLabel, totalLabel, itemsLabel, emptyCart,
|
|
3371
|
-
* continueShopping, qty, total, checkoutButton, cartPageButton,
|
|
3391
|
+
* continueShopping, qty, total, totalExclVat, checkoutButton, cartPageButton,
|
|
3392
|
+
* closeLabel
|
|
3372
3393
|
*/
|
|
3373
3394
|
labels?: Record<string, string>;
|
|
3374
3395
|
/**
|
|
@@ -3475,6 +3496,12 @@ declare function CartOverview(props: CartOverviewProps): React$1.JSX.Element;
|
|
|
3475
3496
|
*/
|
|
3476
3497
|
|
|
3477
3498
|
interface CartPaymethodsProps {
|
|
3499
|
+
/**
|
|
3500
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3501
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3502
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
3503
|
+
*/
|
|
3504
|
+
language?: string;
|
|
3478
3505
|
/** Shopping cart object from which the payment methods will be displayed */
|
|
3479
3506
|
cart: Cart;
|
|
3480
3507
|
/** Authenticated user — used for cart creation / lookup. Resolved from `<PropellerProvider>` when not passed explicitly. */
|
|
@@ -3516,10 +3543,18 @@ declare function CartPaymethods(rawProps: CartPaymethodsProps): React$1.JSX.Elem
|
|
|
3516
3543
|
*/
|
|
3517
3544
|
|
|
3518
3545
|
interface CartSummaryProps {
|
|
3546
|
+
/**
|
|
3547
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
3548
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
3549
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
3550
|
+
*/
|
|
3551
|
+
language?: string;
|
|
3519
3552
|
/** The shopping cart used to populate the cart summary data */
|
|
3520
3553
|
cart: Cart;
|
|
3521
3554
|
/** Cart summary block title */
|
|
3522
3555
|
title?: string;
|
|
3556
|
+
/** Extra classes for the panel root, merged over the defaults via tailwind-merge. */
|
|
3557
|
+
className?: string;
|
|
3523
3558
|
/** Labels for the component */
|
|
3524
3559
|
labels?: Record<string, string>;
|
|
3525
3560
|
/** Display the subtotal of the shopping cart. Defaults to `true`. */
|
|
@@ -4724,6 +4759,8 @@ interface GridFiltersProps {
|
|
|
4724
4759
|
/** Translated labels keyed by the slugs used inside the component (see
|
|
4725
4760
|
* `getLabel` calls). Missing keys fall back to the English defaults. */
|
|
4726
4761
|
labels?: Record<string, string>;
|
|
4762
|
+
/** Currency symbol shown in the price-range inputs. Falls back to PropellerInfra.currency, then `'€'`. */
|
|
4763
|
+
currency?: string;
|
|
4727
4764
|
}
|
|
4728
4765
|
/**
|
|
4729
4766
|
* Faceted filter sidebar for a product grid: collapsible attribute checkbox
|
|
@@ -5242,9 +5279,22 @@ interface OrderItemCardProps {
|
|
|
5242
5279
|
* This component is RSC-safe (no hooks, no context), so the host has to pass
|
|
5243
5280
|
* it — there is nothing to read it from. Without it a non-default storefront
|
|
5244
5281
|
* renders default-language names and, worse, default-language slugs in the
|
|
5245
|
-
* links
|
|
5282
|
+
* links.
|
|
5246
5283
|
*/
|
|
5247
5284
|
language?: string;
|
|
5285
|
+
/**
|
|
5286
|
+
* URL builders from the host's configuration. Supply them and the item link
|
|
5287
|
+
* is generated the same way every other link on the storefront is — which is
|
|
5288
|
+
* what carries the locale prefix. Without it the component falls back to a
|
|
5289
|
+
* bare `/product/:id/:slug`, and on a prefixed storefront that link drops the
|
|
5290
|
+
* visitor onto the default language.
|
|
5291
|
+
*/
|
|
5292
|
+
configuration?: {
|
|
5293
|
+
urls?: {
|
|
5294
|
+
getProductUrl?: (product: Product, language?: string) => string;
|
|
5295
|
+
getClusterUrl?: (cluster: Cluster, language?: string) => string;
|
|
5296
|
+
};
|
|
5297
|
+
};
|
|
5248
5298
|
/** Should the item title be a link to the PDP */
|
|
5249
5299
|
titleLinkable?: boolean;
|
|
5250
5300
|
/** Display a small thumbnail of the order item */
|
|
@@ -5319,6 +5369,12 @@ declare function OrderBonusItems(rawProps: OrderBonusItemsProps): React$1.JSX.El
|
|
|
5319
5369
|
*/
|
|
5320
5370
|
|
|
5321
5371
|
interface OrderListProps {
|
|
5372
|
+
/**
|
|
5373
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5374
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5375
|
+
* the language the shopper is reading. Resolved from `<PropellerProvider>` when omitted.
|
|
5376
|
+
*/
|
|
5377
|
+
language?: string;
|
|
5322
5378
|
/** The authenticated user (Contact or Customer). Resolved from PropellerProvider when omitted. */
|
|
5323
5379
|
user?: Contact | Customer | null;
|
|
5324
5380
|
/** The initialized GraphQL Client instance. Resolved from PropellerProvider when omitted. */
|
|
@@ -5465,7 +5521,7 @@ interface QuickOrderProps {
|
|
|
5465
5521
|
*/
|
|
5466
5522
|
baseCategoryId?: number;
|
|
5467
5523
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
5468
|
-
* listings exactly like the SSR seed does
|
|
5524
|
+
* listings exactly like the SSR seed does. */
|
|
5469
5525
|
anonymousUserId?: number;
|
|
5470
5526
|
};
|
|
5471
5527
|
/** Tax zone for price calculation. Defaults to `'NL'`. */
|
|
@@ -5564,6 +5620,12 @@ declare function OrderShipments(props: OrderShipmentsProps): React$1.JSX.Element
|
|
|
5564
5620
|
*/
|
|
5565
5621
|
|
|
5566
5622
|
interface OrderSummaryProps {
|
|
5623
|
+
/**
|
|
5624
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5625
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5626
|
+
* the language the shopper is reading.
|
|
5627
|
+
*/
|
|
5628
|
+
language?: string;
|
|
5567
5629
|
/** The order object from propeller-sdk-v2 */
|
|
5568
5630
|
order: any;
|
|
5569
5631
|
/** The CSS class for the order summary container */
|
|
@@ -5627,6 +5689,12 @@ declare function OrderSummary(props: OrderSummaryProps): React$1.JSX.Element;
|
|
|
5627
5689
|
*/
|
|
5628
5690
|
|
|
5629
5691
|
interface OrderTotalsProps {
|
|
5692
|
+
/**
|
|
5693
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5694
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5695
|
+
* the language the shopper is reading.
|
|
5696
|
+
*/
|
|
5697
|
+
language?: string;
|
|
5630
5698
|
/** The order/quote used to populate the summary data */
|
|
5631
5699
|
order: Order;
|
|
5632
5700
|
/** Order summary block title */
|
|
@@ -5709,6 +5777,12 @@ declare function PriceToggle(props: PriceToggleProps): React$1.JSX.Element;
|
|
|
5709
5777
|
*/
|
|
5710
5778
|
|
|
5711
5779
|
interface ProductBulkPricesProps {
|
|
5780
|
+
/**
|
|
5781
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
5782
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
5783
|
+
* the language the shopper is reading.
|
|
5784
|
+
*/
|
|
5785
|
+
language?: string;
|
|
5712
5786
|
/**
|
|
5713
5787
|
* Bulk price tiers from the product.
|
|
5714
5788
|
* Obtain from `product.bulkPrices`.
|
|
@@ -5995,6 +6069,8 @@ interface ProductCardProps {
|
|
|
5995
6069
|
* See `ProductPriceProps.labels` for slugs (inclTax, exclTax, loginToSeePrices). */
|
|
5996
6070
|
priceLabels?: Record<string, string>;
|
|
5997
6071
|
/** Replaces the default price block. Receives `PriceComponentProps`. */
|
|
6072
|
+
/** Currency symbol used when formatting the price. Falls back to PropellerInfra.currency, then `'€'`. */
|
|
6073
|
+
currency?: string;
|
|
5998
6074
|
priceComponent?: React$1.ComponentType<_propeller_commerce_propeller_v2_core_ui.PriceComponentProps>;
|
|
5999
6075
|
/** Replaces the default stock/availability block. Receives `StockComponentProps`. */
|
|
6000
6076
|
stockComponent?: React$1.ComponentType<_propeller_commerce_propeller_v2_core_ui.StockComponentProps>;
|
|
@@ -6368,7 +6444,7 @@ interface ProductGridProps {
|
|
|
6368
6444
|
configuration?: {
|
|
6369
6445
|
baseCategoryId?: number;
|
|
6370
6446
|
/** The channel's anonymous user, seeded by the host. Scopes logged-out
|
|
6371
|
-
* listings exactly like the SSR seed does
|
|
6447
|
+
* listings exactly like the SSR seed does. */
|
|
6372
6448
|
anonymousUserId?: number;
|
|
6373
6449
|
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
6374
6450
|
imageVariantFiltersMedium?: TransformationsInput;
|
|
@@ -6692,6 +6768,12 @@ declare const ProductInfoExport: ProductInfoComponent;
|
|
|
6692
6768
|
*/
|
|
6693
6769
|
|
|
6694
6770
|
interface ProductPriceProps {
|
|
6771
|
+
/**
|
|
6772
|
+
* Storefront language ('EN', 'NL', …). Decides the number format prices are
|
|
6773
|
+
* rendered in — without it they fall back to Dutch separators regardless of
|
|
6774
|
+
* the language the shopper is reading.
|
|
6775
|
+
*/
|
|
6776
|
+
language?: string;
|
|
6695
6777
|
/**
|
|
6696
6778
|
* ProductPrice object from the product.
|
|
6697
6779
|
* Obtain from `product.price`.
|
|
@@ -7461,6 +7543,8 @@ interface SearchBarProps {
|
|
|
7461
7543
|
priceLabels?: Record<string, string>;
|
|
7462
7544
|
/** Additional class name for the container */
|
|
7463
7545
|
containerClassName?: string;
|
|
7546
|
+
/** Extra classes for the search input, merged over the defaults via tailwind-merge. */
|
|
7547
|
+
inputClassName?: string;
|
|
7464
7548
|
/** Tax zone used for price calculation. Defaults to 'NL'. */
|
|
7465
7549
|
taxZone?: string;
|
|
7466
7550
|
/**
|