@soma-vertical-web/multi-lib 0.0.66 → 0.0.68
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/cms/ContentTypes/HelpButton/HelpButtonContent.d.ts +1 -1
- package/cms/Sections/BannerCarousel/BannerCarousel.d.ts +1 -1
- package/cms/Sections/BannerCarousel/index.d.ts +1 -1
- package/cms/Sections/BennefitsBar/Component.d.ts +2 -2
- package/cms/Sections/BennefitsBar/index.d.ts +1 -1
- package/cms/Sections/Newsletter/Component.d.ts +1 -3
- package/cms/Sections/ProductCarousel/Composite/CommonShelf.d.ts +1 -1
- package/cms/Sections/ProductCarousel/Composite/RecommendationShelf.d.ts +1 -1
- package/cms/Sections/ProductCarousel/ProductCarousel.d.ts +2 -2
- package/cms/Sections/SectionZone.d.ts +5 -0
- package/cms/index.d.ts +6 -7
- package/cms/server.d.ts +1 -1
- package/index.js +18 -18
- package/index.mjs +6145 -5898
- package/index2.js +1 -1
- package/index2.mjs +0 -1
- package/layout/index.d.ts +28 -5
- package/layout/team-component/BuyPackage/BuyPackage.d.ts +1 -1
- package/layout/team-component/ProductCard/Composite/Root.d.ts +1 -1
- package/layout/team-component/ProductCard/ProductCard.d.ts +1 -1
- package/layout/team-component/ProductList/Composite/Card/Card.d.ts +1 -1
- package/layout/team-component/ProductList/ProductList.d.ts +1 -1
- package/layout/template/PDC/Composite/Empty/Empty.d.ts +1 -1
- package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +2 -2
- package/layout/template/WishList/Composite/Feedback.d.ts +11 -0
- package/layout/template/WishList/Composite/Grid.d.ts +7 -0
- package/layout/template/WishList/Composite/Init.d.ts +11 -0
- package/layout/template/WishList/Composite/Toggle.d.ts +7 -0
- package/layout/template/WishList/WishList.d.ts +26 -0
- package/layout/template/WishList/helpers.d.ts +12 -0
- package/layout/template/WishList/index.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cms/Sections/BannerCarousel/index.d.ts +2 -3
- package/types/cms/Sections/BennefitsBar/index.d.ts +2 -0
- package/types/cms/Sections/Newsletter/index.d.ts +6 -0
- package/types/cms/Sections/ProductCarousel/index.d.ts +2 -7
- package/types/cms/Sections/SectionZone/intex.d.ts +64 -0
- package/types/constants.d.ts +12 -0
- package/types/contexts/contexts/plp.d.ts +0 -1
- package/types/layout/team-components/BuyPackage/index.d.ts +0 -1
- package/types/layout/team-components/ProductCard/index.d.ts +3 -3
- package/types/layout/team-components/ProductList/index.d.ts +0 -1
- package/types/layout/templates/PLP/index.d.ts +5 -10
- package/types/layout/templates/Wishlist/index.d.ts +21 -0
- package/types/layout/utils/index.d.ts +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BENNEFITS_BAR_TITLEType, BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, MASTER_DATA_ENTITY, NEWSLETTER_CONFIGS, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PLP_SORT_DEFAULTType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType, StoreConfigType, TEXTURE_IMAGEType, Z_INDEX_WARType } from '../../../constants';
|
|
2
|
+
import { ISectionResponseBase } from '../../Factories';
|
|
3
|
+
|
|
4
|
+
type BannerConstants = {
|
|
5
|
+
ICONS: ICONSType;
|
|
6
|
+
};
|
|
7
|
+
type ProductCarouselConstants = {
|
|
8
|
+
BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
|
|
9
|
+
BUY_PACKAGE: BUY_PACKAGEType;
|
|
10
|
+
FREIGHT_CALCULATION: FREIGHT_CALCULATIONType;
|
|
11
|
+
ICONS: ICONSType;
|
|
12
|
+
ITEMS_DEFAULT_SORT: PLP_SORT_DEFAULTType;
|
|
13
|
+
MAIN_IMAGE: MAIN_IMAGEType;
|
|
14
|
+
PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
|
|
15
|
+
PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
|
|
16
|
+
PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
|
|
17
|
+
PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
|
|
18
|
+
PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
|
|
19
|
+
PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
|
|
20
|
+
PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
|
|
21
|
+
PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
|
|
22
|
+
SECOND_IMAGE: SECOND_IMAGEType;
|
|
23
|
+
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
24
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
25
|
+
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
26
|
+
};
|
|
27
|
+
type PDPProductCarouselConstants = ProductCarouselConstants;
|
|
28
|
+
type BennefitsBarConstants = {
|
|
29
|
+
BENNEFITS_BAR_TITLE: BENNEFITS_BAR_TITLEType;
|
|
30
|
+
ICONS: ICONSType;
|
|
31
|
+
};
|
|
32
|
+
type NewsletterConstants = {
|
|
33
|
+
MASTER_DATA_ENTITY: MASTER_DATA_ENTITY;
|
|
34
|
+
NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGS;
|
|
35
|
+
ICONS: ICONSType;
|
|
36
|
+
};
|
|
37
|
+
type TextContentConstants = {
|
|
38
|
+
ICONS: ICONSType;
|
|
39
|
+
};
|
|
40
|
+
type TextAccordionConstants = {
|
|
41
|
+
ICONS: ICONSType;
|
|
42
|
+
};
|
|
43
|
+
type BannerCarouselConstants = {
|
|
44
|
+
ICONS: ICONSType;
|
|
45
|
+
};
|
|
46
|
+
export type SectionConstants = {
|
|
47
|
+
Banner: BannerConstants;
|
|
48
|
+
'Product Carousel': ProductCarouselConstants;
|
|
49
|
+
'PDP Product Carousel': PDPProductCarouselConstants;
|
|
50
|
+
'Bennefits Bar': BennefitsBarConstants;
|
|
51
|
+
newsletter: NewsletterConstants;
|
|
52
|
+
TextContent: TextContentConstants;
|
|
53
|
+
TextAccordion: TextAccordionConstants;
|
|
54
|
+
'Banner Carousel': BannerCarouselConstants;
|
|
55
|
+
};
|
|
56
|
+
export type SectionName = keyof SectionConstants;
|
|
57
|
+
export interface SectionZoneProps {
|
|
58
|
+
data: Array<ISectionResponseBase & {
|
|
59
|
+
data?: any;
|
|
60
|
+
}>;
|
|
61
|
+
identifyWhoIsFirst?: boolean;
|
|
62
|
+
componentConfigs: Record<string, any>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
package/types/constants.d.ts
CHANGED
|
@@ -330,3 +330,15 @@ export type NEWSLETTER_CONFIGS = {
|
|
|
330
330
|
};
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
|
+
export type WISHLIST_INFOType = {
|
|
334
|
+
messages: {
|
|
335
|
+
add: string;
|
|
336
|
+
remove: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
export type WISHLIST_NOT_RESULTType = {
|
|
340
|
+
link: string;
|
|
341
|
+
text: string;
|
|
342
|
+
title: string;
|
|
343
|
+
subtitle: string;
|
|
344
|
+
};
|
|
@@ -92,7 +92,6 @@ export interface PLPConstantsProviderProps extends PropsWithChildren {
|
|
|
92
92
|
VARIANT_PAGINATION: VARIANT_PAGINATIONType;
|
|
93
93
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
94
94
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
95
|
-
WishListToggle: React.ComponentType<any>;
|
|
96
95
|
searchParams: URLSearchParams;
|
|
97
96
|
}
|
|
98
97
|
export type PLPConstantsContextProps = Omit<PLPConstantsProviderProps, 'children'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SizesExtended } from '@soma-vertical-web/foundations';
|
|
2
|
-
import {
|
|
2
|
+
import { Dispatch, HTMLAttributes, PropsWithChildren, RefObject, SetStateAction } from 'react';
|
|
3
3
|
import { TagProps } from '@soma-vertical-web/core-components/src/lib/Tag/interfaces';
|
|
4
4
|
import { HasVariant, ProductType_PDC } from '../../../global/product';
|
|
5
5
|
import { TagCommercialConsumer } from '../../../cms/ContentTypes/FlagsAndTags';
|
|
6
|
-
import { BUY_BUTTON_LABELSType, PLP_INFINITE_SCROLLType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType, TEXTURE_IMAGEType, Z_INDEX_WARType, StoreConfigType } from '../../../constants';
|
|
6
|
+
import { BUY_BUTTON_LABELSType, PLP_INFINITE_SCROLLType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType, TEXTURE_IMAGEType, Z_INDEX_WARType, StoreConfigType, ICONSType } from '../../../constants';
|
|
7
7
|
import { SizeSkuItemProps, StyleSelectorProps } from './Selectors';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -31,8 +31,8 @@ export interface RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
31
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
32
32
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
33
33
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
34
|
+
ICONS: ICONSType;
|
|
34
35
|
};
|
|
35
|
-
WishListToggle: ComponentType<any>;
|
|
36
36
|
}
|
|
37
37
|
export type Sizes = (typeof SizesExtended)[number];
|
|
38
38
|
export interface ProductCardContextProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>>, Omit<RootProps, 'callback'> {
|
|
@@ -35,7 +35,6 @@ export interface ProductListCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
35
35
|
hasMaxWidth?: boolean;
|
|
36
36
|
setSkuSelected?(skus: ProductType_PDC['isVariantOf']['hasVariant'] | null, sku: HasVariant | null): void;
|
|
37
37
|
CONSTANTS: ProductListCard_CONSTANTS;
|
|
38
|
-
WishListToggle: ProductCard_RootProps['WishListToggle'];
|
|
39
38
|
}
|
|
40
39
|
export type RootProps = HTMLAttributes<HTMLDivElement>;
|
|
41
40
|
export type ProductListProps = HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
import { AvailabilityNotifyProps } from '../../../../types/layout/team-components/Notify';
|
|
2
3
|
import { BannerType } from '../../../cms/Sections/Banner';
|
|
4
|
+
import { BUY_BUTTON_LABELSType, ICONSType, ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, ITEMS_PER_SECTIONType, MAIN_IMAGEType, NEWSLETTER_CONFIGSType, NOTIFY_INFOType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SEARCH_PAGE_ITEM_THRESHOLDType, SECOND_IMAGEType, StoreConfigType, TEXTURE_IMAGEType, VARIANT_PAGINATIONType, PLP_NOT_RESULTType, Z_INDEX_WARType } from '../../../constants';
|
|
3
5
|
import { Page, PLPConstantsContextProps } from '../../../contexts/contexts/plp';
|
|
4
|
-
import { ProductCardProps } from '../../team-components/ProductCard';
|
|
5
|
-
import { AvailabilityNotifyProps } from '../../../../types/layout/team-components/Notify';
|
|
6
6
|
import { ProductType_PDC } from '../../../global/product';
|
|
7
|
-
import {
|
|
7
|
+
import { ProductCardProps } from '../../team-components/ProductCard';
|
|
8
8
|
|
|
9
9
|
export type PLPNavigationRootProps = {
|
|
10
10
|
searchParams: {
|
|
@@ -112,17 +112,12 @@ export interface ProductsProps {
|
|
|
112
112
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
113
113
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
114
114
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
115
|
-
WishListToggle: React.ComponentType<any>;
|
|
116
115
|
}
|
|
117
116
|
export interface PLPRootProps extends PLPConstantsContextProps {
|
|
118
117
|
className?: string;
|
|
119
118
|
}
|
|
120
119
|
export type EmptyProps = {
|
|
121
120
|
className?: string;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
text: string;
|
|
125
|
-
title: string;
|
|
126
|
-
subtitle: string;
|
|
127
|
-
};
|
|
121
|
+
ICONS: ICONSType;
|
|
122
|
+
PLP_NOT_RESULT: PLP_NOT_RESULTType;
|
|
128
123
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IconProps } from '@soma-vertical-web/core-components/src/lib/Icon/interfaces';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { ProductType_PDC } from '../../../global/product';
|
|
4
|
+
import { ICONSType, WISHLIST_NOT_RESULTType } from '../../../constants';
|
|
5
|
+
import { ProductListCard_CONSTANTS } from '../../../layout/team-components/ProductList';
|
|
6
|
+
|
|
7
|
+
export interface ToggleProps {
|
|
8
|
+
product: ProductType_PDC;
|
|
9
|
+
priceInfo: Record<string, string | number>;
|
|
10
|
+
size?: IconProps['size'];
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
variant: 'card' | 'modal';
|
|
13
|
+
ICONS: ICONSType;
|
|
14
|
+
}
|
|
15
|
+
export interface WishListGrid_CONSTANTS extends ProductListCard_CONSTANTS {
|
|
16
|
+
WISHLIST_NOT_RESULT: WISHLIST_NOT_RESULTType;
|
|
17
|
+
ICONS: ICONSType;
|
|
18
|
+
}
|
|
19
|
+
export interface WishListGridProps {
|
|
20
|
+
CONSTANTS: WishListGrid_CONSTANTS;
|
|
21
|
+
}
|
|
@@ -29,7 +29,7 @@ export interface SnackBarComponentProps extends StructureProps {
|
|
|
29
29
|
adornment?: ContentProps['adornment'];
|
|
30
30
|
supportChildren?: ReactNode;
|
|
31
31
|
}
|
|
32
|
-
export interface CardProps extends Omit<ProductListCardProps, 'CONSTANTS'>, Pick<RootProps, 'size' | 'shelfTitle' | 'CONSTANTS'
|
|
32
|
+
export interface CardProps extends Omit<ProductListCardProps, 'CONSTANTS'>, Pick<RootProps, 'size' | 'shelfTitle' | 'CONSTANTS'> {
|
|
33
33
|
onSkuSelection?: (sku: ProductType_PDC | null, skuList?: ProductType_PDC[]) => void;
|
|
34
34
|
}
|
|
35
35
|
export interface ShelfProps extends PropsWithChildren {
|