formica-ui-lib 1.0.348 → 1.0.350

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.
@@ -1,5 +1,13 @@
1
+ /** Availability of the current SKU and purchase tab, supplied by the app. */
2
+ export type ProductPurchaseAvailability = {
3
+ status: "available";
4
+ } | {
5
+ status: "outOfStock";
6
+ label?: string;
7
+ };
1
8
  export type CartActionsProps = {
2
- /** App-provided validation error for the purchase quantity or selected item. */
9
+ availability?: ProductPurchaseAvailability;
10
+ /** App-provided validation or availability message displayed above the purchase controls. */
3
11
  errorMessage?: string;
4
12
  initialQuantity?: number;
5
13
  minQuantity?: number;
@@ -1,3 +1,4 @@
1
+ import type { ProductPurchaseAvailability } from "../../../molecules/cart/cartactions/CartActionsProps";
1
2
  import type { ButtonGridItem } from "../../../molecules/buttons/buttongrid/ButtonGridProps";
2
3
  import type { ReactNode } from "react";
3
4
  import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
@@ -56,6 +57,8 @@ export type PurchasePanelLeftPanelProps = {
56
57
  showCartActions?: boolean;
57
58
  showFavorites?: boolean;
58
59
  actionMode?: PurchasePanelActionMode;
60
+ /** Availability of the current selection and tab; omitted means available. */
61
+ availability?: ProductPurchaseAvailability;
59
62
  contactActions?: [ProductContactAction, ProductContactAction];
60
63
  onQuantityChange?: (quantity: number) => void;
61
64
  onAddToWishlist?: () => void;
@@ -1,3 +1,4 @@
1
+ import type { ProductPurchaseAvailability } from "../../../molecules/cart/cartactions/CartActionsProps";
1
2
  import type { SwatchPurchasePanelCarousel } from "./PurchasePanelRightPanelProps";
2
3
  import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
3
4
  import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
@@ -108,13 +109,15 @@ export type PurchasePanelProps = {
108
109
  priceLabel?: string;
109
110
  priceValue?: number;
110
111
  currency?: string;
111
- /** App-provided validation error for the purchase quantity or selected item. */
112
+ /** App-provided validation or availability message displayed above the purchase controls. */
112
113
  errorMessage?: string;
113
114
  initialQuantity?: number;
114
115
  minQuantity?: number;
115
116
  maxQuantity?: number;
116
117
  showFavorites?: boolean;
117
118
  actionMode?: PurchasePanelActionMode;
119
+ /** Availability of the current selection and tab; omitted means available. */
120
+ availability?: ProductPurchaseAvailability;
118
121
  contactActions?: [ProductContactAction, ProductContactAction];
119
122
  onAddToWishlist?: (payload: AddToFavoritesPayloadProps) => void;
120
123
  onAddToCart?: (order: CartOrderProps) => void;
@@ -1,3 +1,4 @@
1
+ import type { ProductPurchaseAvailability } from "../../molecules/cart/cartactions/CartActionsProps";
1
2
  import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
2
3
  import { ProductInformationTabLabels, ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
3
4
  import { CartFlyoutProps } from "../../organisms/cart/cartflyout/CartFlyoutProps";
@@ -248,11 +249,13 @@ export type ProductDetailCartFlyoutProps = CartFlyoutProps;
248
249
  export type ProductDetailPageTemplateProps = {
249
250
  breadcrumbsProps?: BreadcrumbsProps;
250
251
  productData: ProductDetailData;
251
- /** App-provided validation error displayed above the purchase quantity controls. */
252
+ /** App-provided validation or availability message displayed above the purchase controls. */
252
253
  errorMessage?: string;
253
254
  /** Reports initial selection and subsequent quantity, tab, or option changes. */
254
255
  onSelectionChange?: (selection: ProductDetailOrder) => void;
255
256
  showFavorites?: boolean;
257
+ /** Availability of the current selection and tab; omitted means available. */
258
+ availability?: ProductPurchaseAvailability;
256
259
  onDownloadSwatch?: (productData: ProductDetailData) => void;
257
260
  onDownloadFullSheet?: (productData: ProductDetailData) => void;
258
261
  onAddToWishlist?: (payload: ProductDetailWishlistPayload, productData: ProductDetailData) => void;