@soma-vertical-web/multi-lib 0.0.14 → 0.0.15
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/contexts/contexts/pdp/PDPDataContext.d.ts +2 -8
- package/contexts/index.d.ts +1 -5
- package/data/helpers/cart/index.d.ts +1 -1
- package/data/helpers/product/generalInfo.d.ts +2 -2
- package/data/helpers/product/skuInfos.d.ts +2 -2
- package/index.js +3 -3
- package/index.mjs +1242 -1238
- package/package.json +1 -1
- package/types/constants.d.ts +10 -0
- package/types/contexts/contexts/pdp.d.ts +7 -0
- package/types/data/events/index.d.ts +4 -7
- package/types/data/helpers/index.d.ts +6 -178
- package/types/layout/team-components/AddToCart/index.d.ts +3 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PDPDataContextProps } from '../../../types/contexts/contexts/pdp';
|
|
3
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PDPDataContextProps, PDPDataProviderProps } from '../../../types/contexts/contexts/pdp';
|
|
4
2
|
|
|
5
|
-
export declare const PDPDataProvider: ({ children, productData, isKit, PDP_INFO, }:
|
|
6
|
-
productData: ProductType_PDP;
|
|
7
|
-
isKit: boolean;
|
|
8
|
-
PDP_INFO: any;
|
|
9
|
-
}>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const PDPDataProvider: ({ children, productData, isKit, PDP_INFO, NAME_SPLIT_SYMBOL }: PDPDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
4
|
export declare const usePDPDataContext: () => PDPDataContextProps;
|
package/contexts/index.d.ts
CHANGED
|
@@ -62,11 +62,7 @@ export declare const contexts: {
|
|
|
62
62
|
};
|
|
63
63
|
pdpdata: {
|
|
64
64
|
hook: () => import('../types/contexts/contexts/pdp').PDPDataContextProps;
|
|
65
|
-
provider: ({ children, productData, isKit, PDP_INFO, }: import('
|
|
66
|
-
productData: import('../types/global/product').ProductType_PDP;
|
|
67
|
-
isKit: boolean;
|
|
68
|
-
PDP_INFO: any;
|
|
69
|
-
}>) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
provider: ({ children, productData, isKit, PDP_INFO, NAME_SPLIT_SYMBOL }: import('../types/contexts/contexts/pdp').PDPDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
66
|
};
|
|
71
67
|
ui: {
|
|
72
68
|
hook: () => import('../types/contexts/contexts/cart').UIContextProps;
|
|
@@ -172,7 +172,7 @@ export declare const wishlistArray: (productNode: CartItem, wishlist: CartItem[]
|
|
|
172
172
|
}>;
|
|
173
173
|
};
|
|
174
174
|
}[];
|
|
175
|
-
export declare const getRemoveId: (productId: string, items?: CartItemStore[] | boolean) => Promise<
|
|
175
|
+
export declare const getRemoveId: (productId: string, items?: CartItemStore[] | boolean) => Promise<string> | Promise<boolean>;
|
|
176
176
|
export declare const getValue: <K extends keyof OptionalOrderForm>(order: OptionalOrderForm, key?: K) => Promise<boolean> | Promise<Awaited<OptionalOrderForm[K]>>;
|
|
177
177
|
export declare const updateOrderFormPromise: (callback: () => Promise<OptionalOrderForm | boolean>) => Promise<false | OptionalOrderForm>;
|
|
178
178
|
export declare const getQuantity: (quantity: number, index: number) => number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const splitNameAndSizeFromFullName: (fullName: string) => {
|
|
1
|
+
export declare const splitNameAndSizeFromFullName: (fullName: string, NAME_SPLIT_SYMBOL: string) => {
|
|
2
2
|
name: string;
|
|
3
3
|
size: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const getColorAndSizeFromSkuName: (skuName
|
|
5
|
+
export declare const getColorAndSizeFromSkuName: (skuName: string, NAME_SPLIT_SYMBOL: string) => {
|
|
6
6
|
color?: undefined;
|
|
7
7
|
size?: undefined;
|
|
8
8
|
} | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ItemType_PDP } from '../../../types/global/product';
|
|
2
1
|
import { Sizes } from '../../../types/contexts/contexts/pdp';
|
|
2
|
+
import { GetSkuInfosProps } from '../../../types/data/helpers';
|
|
3
3
|
|
|
4
|
-
export declare const getSkuInfos: (items:
|
|
4
|
+
export declare const getSkuInfos: ({ items, NAME_SPLIT_SYMBOL }: GetSkuInfosProps) => {
|
|
5
5
|
sizes: Sizes;
|
|
6
6
|
allSizesAvailable: boolean;
|
|
7
7
|
price: number;
|