@soma-vertical-web/multi-lib 0.0.17 → 0.0.19
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/product-card/ProductCardContext.d.ts +6 -0
- package/data/helpers/product/generalInfo.d.ts +7 -0
- package/data/helpers/product/image.d.ts +17 -0
- package/data/helpers/product/index.d.ts +1 -1
- package/data/helpers/product/skuInfos.d.ts +11 -0
- package/index.js +4 -4
- package/index.mjs +3660 -2884
- package/layout/index.d.ts +50 -0
- package/layout/team-component/ProductCard/Composite/Actions/Actions.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Actions/BuyButton.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Actions/Header.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Media/Media.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Media/Video.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/OutStock.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Price.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Root.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Selectors/SizeSelector/Item.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Selectors/SizeSelector/SkuItem.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Selectors/SizeSelector.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Selectors/StyleSelector.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Title.d.ts +7 -0
- package/layout/team-component/ProductCard/Composite/Wrapper.d.ts +7 -0
- package/layout/team-component/ProductCard/ProductCard.d.ts +51 -0
- package/layout/team-component/ProductCard/helpers.d.ts +18 -0
- package/layout/team-component/ProductCard/index.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/constants.d.ts +26 -0
- package/types/data/helpers/index.d.ts +9 -1
- package/types/layout/team-components/ProductCard/index.d.ts +45 -6
- package/contexts/helpers/cart.d.ts +0 -188
- package/contexts/store/freight.d.ts +0 -0
- package/layout/team-component/Header/Header.d.ts +0 -7
- package/layout/template/PDP/PDPDataContext.d.ts +0 -10
- package/types/layout/core-components/Header/index.d.ts +0 -33
- package/types/layout/team-components/BuyKit/index.d.ts +0 -43
- package/types/layout/team-components/Header/intex.d.ts +0 -24
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProductCardContextProps, ProductCardProviderProps } from '../../../types/layout/team-components/ProductCard';
|
|
2
|
+
|
|
3
|
+
declare const ProductCardContext: import('react').Context<ProductCardContextProps>;
|
|
4
|
+
declare const ProductCardProvider: ({ children, item, index, shelfTitle, ...props }: ProductCardProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const useProductCardContext: () => ProductCardContextProps;
|
|
6
|
+
export { ProductCardContext, ProductCardProvider, useProductCardContext };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HasVariant } from '../../../types/global/product';
|
|
2
|
+
|
|
1
3
|
export declare const splitNameAndSizeFromFullName: (fullName: string, NAME_SPLIT_SYMBOL: string) => {
|
|
2
4
|
name: string;
|
|
3
5
|
size: string;
|
|
@@ -9,3 +11,8 @@ export declare const getColorAndSizeFromSkuName: (skuName: string, NAME_SPLIT_SY
|
|
|
9
11
|
color: string;
|
|
10
12
|
size: string;
|
|
11
13
|
};
|
|
14
|
+
export declare const getSKUName: (item: HasVariant, key?: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* TODO: check if this function is still needed
|
|
17
|
+
*/
|
|
18
|
+
export declare const removeSlashes: (text: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProductCardProps } from '../../../types/layout/team-components/ProductCard';
|
|
2
|
+
import { GetFirstImagesProps } from '../../../types/data/helpers';
|
|
3
|
+
|
|
4
|
+
export declare const resizingImg: (url: string, imageResize: {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}) => string;
|
|
8
|
+
export declare const updatedResizedImg: (url: string, imageResize: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}) => string;
|
|
12
|
+
export declare const getFirstImages: ({ images, label }: GetFirstImagesProps) => ProductCardProps["image"];
|
|
13
|
+
/**
|
|
14
|
+
* TODO: check if this function is still needed
|
|
15
|
+
*/
|
|
16
|
+
export declare const getAspectRatio: (aspectRatio: string) => number;
|
|
17
|
+
export declare const setVideoPlay: (isIntersection: boolean, element: HTMLVideoElement | null, url?: string) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HasVariant } from '../../../types/global/product';
|
|
1
2
|
import { Sizes } from '../../../types/contexts/contexts/pdp';
|
|
2
3
|
import { GetSkuInfosProps } from '../../../types/data/helpers';
|
|
3
4
|
|
|
@@ -8,3 +9,13 @@ export declare const getSkuInfos: ({ items, NAME_SPLIT_SYMBOL }: GetSkuInfosProp
|
|
|
8
9
|
listPrice: number;
|
|
9
10
|
installments: import('../../../types/contexts/contexts/pdp').Installments;
|
|
10
11
|
};
|
|
12
|
+
export declare const disableSKU: (item: HasVariant) => boolean;
|
|
13
|
+
export declare const getValidOffer: (offers: HasVariant["offers"]["offers"], mainSellerId: string) => {
|
|
14
|
+
listPrice: number;
|
|
15
|
+
price: number;
|
|
16
|
+
availability: string;
|
|
17
|
+
quantity?: number;
|
|
18
|
+
seller: {
|
|
19
|
+
identifier: string;
|
|
20
|
+
};
|
|
21
|
+
} | undefined;
|