gantri-components 2.129.0-beta.7 → 2.129.0-beta.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/dist/components/components.types.d.ts +4 -1
- package/dist/helpers/generate-skus-functions/get-sku-details/get-sku-details.d.ts +31 -0
- package/dist/helpers/generate-skus-functions/get-sku-details/get-sku-details.types.d.ts +18 -0
- package/dist/helpers/generate-skus-functions/get-sku-details/index.d.ts +1 -0
- package/dist/helpers/generate-skus-functions/index.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { TooltipProps } from './tooltip/tooltip.types';
|
|
1
2
|
export type DynamicListItem<T extends Record<any, any>> = T & {
|
|
2
3
|
disabled?: boolean;
|
|
3
|
-
|
|
4
|
+
/** @deprecated use `disabledTooltipProps` to provide any overrides. */
|
|
5
|
+
disabledTooltipDescription?: TooltipProps['description'];
|
|
6
|
+
disabledTooltipProps?: TooltipProps;
|
|
4
7
|
};
|
|
5
8
|
export type DynamicListItemDefaultData = {
|
|
6
9
|
label: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GetSkuDetailsProps } from './get-sku-details.types';
|
|
2
|
+
/**
|
|
3
|
+
* Provide a sku and the variant options and get all the product option codes back.
|
|
4
|
+
*
|
|
5
|
+
* *`variantOptions` must be input in the same index order they were provided in!*
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSkuDetails: (props: GetSkuDetailsProps) => {
|
|
8
|
+
color: string;
|
|
9
|
+
productId: number;
|
|
10
|
+
size: string;
|
|
11
|
+
/**
|
|
12
|
+
* The partial codes that make up the full variant code.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```
|
|
16
|
+
* // variants === ['black_7_10_feet_cord', 'chrome_rod_finish']
|
|
17
|
+
*
|
|
18
|
+
* [
|
|
19
|
+
* ['black', '7_10_feet'],
|
|
20
|
+
* ['chrome']
|
|
21
|
+
* ]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
variantPartials: string[][];
|
|
25
|
+
/**
|
|
26
|
+
* The full variant codes.
|
|
27
|
+
*
|
|
28
|
+
* @example ['black_7_10_feet_cord', 'chrome_rod_finish']
|
|
29
|
+
*/
|
|
30
|
+
variants: string[];
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface GetSkuDetailsProps {
|
|
2
|
+
sku: string;
|
|
3
|
+
skuPartialCodes: SkuPartialCode[][];
|
|
4
|
+
}
|
|
5
|
+
export interface SkuPartialCode {
|
|
6
|
+
/**
|
|
7
|
+
* The full variant code.
|
|
8
|
+
*
|
|
9
|
+
* @example 'black_7_10_feet_cord'
|
|
10
|
+
*/
|
|
11
|
+
code: string;
|
|
12
|
+
/**
|
|
13
|
+
* The partial codes that make up the full variant code.
|
|
14
|
+
*
|
|
15
|
+
* @example ['black', '7_10_feet']
|
|
16
|
+
*/
|
|
17
|
+
partialCodes: string[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-sku-details';
|