@rokt/dcui-orchestrator 0.2.1-rc.11 → 0.2.1-rc.13
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/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LayoutSchemaModel, EqualityWhenCondition, OrderableWhenCondition } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export type QuantityCondition = EqualityWhenCondition | OrderableWhenCondition;
|
|
3
|
+
export interface QuantityPredicate {
|
|
4
|
+
condition: QuantityCondition;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WhenCatalogQuantityModel {
|
|
8
|
+
cartItemId: string;
|
|
9
|
+
predicates: Array<QuantityPredicate>;
|
|
10
|
+
children: Array<LayoutSchemaModel>;
|
|
11
|
+
}
|
|
12
|
+
export interface WhenCatalogQuantityProps {
|
|
13
|
+
schema: WhenCatalogQuantityModel;
|
|
14
|
+
testId?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The WhenCatalogQuantity component conditionally renders children based on
|
|
18
|
+
* catalog item quantity conditions using multiple predicates.
|
|
19
|
+
* ALL predicates must pass for the children to be displayed.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare function WhenCatalogQuantity({ schema, testId, }: WhenCatalogQuantityProps): import("react/jsx-runtime").JSX.Element | null;
|