@soma-vertical-web/multi-lib 0.0.38 → 0.0.40
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/Footer/Footer.d.ts +3 -0
- package/cms/ContentTypes/Header/index.d.ts +1 -1
- package/cms/ContentTypes/PLP/PLPContent.d.ts +3 -0
- package/cms/ContentTypes/PLP/PLPContentContext.d.ts +4 -0
- package/cms/ContentTypes/Tipbar/Tipbar.d.ts +3 -0
- package/cms/ContentTypes/Tipbar/TipbarScreening.d.ts +3 -0
- package/cms/Sections/ImageGrid/Component.d.ts +3 -0
- package/cms/Sections/TextContent/Component.d.ts +1 -2
- package/cms/index.d.ts +3 -1
- package/cms/server.d.ts +7 -4
- package/constants.d.ts +15 -0
- package/contexts/contexts/Session.d.ts +5 -0
- package/contexts/contexts/header/UserMenuContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +6 -0
- package/contexts/hooks/useOnClickOutside.d.ts +3 -0
- package/contexts/index.d.ts +12 -0
- package/contexts/store/plp.d.ts +3 -0
- package/data/api/checkout/order-form/items/index.d.ts +1 -1
- package/data/api/checkout/order-form/items/update/index.d.ts +1 -1
- package/data/api/checkout/order-form/shipping/update/index.d.ts +1 -1
- package/data/helpers/plp/index.d.ts +81 -0
- package/index.js +21 -21
- package/index.mjs +6133 -5210
- package/index2.js +1 -1
- package/index2.mjs +261 -243
- package/layout/index.d.ts +3 -3
- package/layout/team-component/Header/Composite/HeaderDesktopWrapper.d.ts +1 -1
- package/layout/team-component/Header/Composite/HeaderMobileWrapper.d.ts +1 -1
- package/layout/team-component/Header/index.d.ts +1 -1
- package/layout/team-component/Menu/Composite/Desktop/MenuRoot.d.ts +5 -2
- package/layout/team-component/Menu/Composite/Mobile/MenuRoot.d.ts +7 -4
- package/layout/team-component/Menu/MenuDesktop.d.ts +4 -1
- package/layout/team-component/Menu/MenuMobile.d.ts +4 -3
- package/layout/team-component/UserMenu/Composite/Content.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Credits.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Login.d.ts +10 -0
- package/layout/team-component/UserMenu/Composite/Menu.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Modal.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Root.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Tooltip.d.ts +7 -0
- package/layout/team-component/UserMenu/UserMenu.d.ts +34 -0
- package/layout/team-component/UserMenu/helpers.d.ts +7 -0
- package/layout/team-component/UserMenu/index.d.ts +5 -0
- package/layout/utils/SessionEvent/index.d.ts +1 -0
- package/package.json +1 -1
- package/server.d.ts +2 -5
- package/style.css +1 -1
- package/types/cms/ContentTypes/Footer/index.d.ts +6 -2
- package/types/cms/ContentTypes/PLP/index.d.ts +45 -0
- package/types/cms/ContentTypes/Tipbar/index.d.ts +9 -0
- package/types/cms/Sections/ProductCarousel/index.d.ts +77 -0
- package/types/constants.d.ts +19 -1
- package/types/contexts/contexts/plp.d.ts +48 -1
- package/types/contexts/contexts/session.d.ts +84 -0
- package/types/layout/team-components/BuyPackage/index.d.ts +2 -2
- package/types/layout/team-components/Header/index.d.ts +4 -3
- package/types/layout/team-components/ProductCard/index.d.ts +5 -2
- package/types/layout/team-components/UserMenu/index.d.ts +52 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { PDPShelfType } from 'libs/multi-lib/src/constants';
|
|
2
|
+
import { BuyPackageProductCardProps, CarouselController, CarouselPagination } from '../../../layout/team-components/BuyPackage';
|
|
3
|
+
import { ProductNode } from '../../../layout/team-components/ProductCard';
|
|
4
|
+
import { ISectionResponseBase } from '../../Factories';
|
|
5
|
+
|
|
6
|
+
export type StructureType = 'shelf_recommendation' | 'buy_package';
|
|
7
|
+
export type TPDPShelfType = (typeof PDPShelfType)[number];
|
|
8
|
+
export interface IRecomendationSearch {
|
|
9
|
+
type?: TPDPShelfType;
|
|
10
|
+
productId?: string;
|
|
11
|
+
params?: {
|
|
12
|
+
sort?: string;
|
|
13
|
+
count?: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface ICollectionSearch {
|
|
17
|
+
params?: {
|
|
18
|
+
count: number;
|
|
19
|
+
sort: string;
|
|
20
|
+
};
|
|
21
|
+
term?: string;
|
|
22
|
+
facets?: {
|
|
23
|
+
key: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
sort?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IRecomendationShelf {
|
|
29
|
+
recommendationSearch?: IRecomendationSearch;
|
|
30
|
+
title?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ICommonShelf {
|
|
33
|
+
collectionSearch?: ICollectionSearch;
|
|
34
|
+
title?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ProductCarouselSectionType extends ISectionResponseBase {
|
|
37
|
+
data: {
|
|
38
|
+
config: {
|
|
39
|
+
gap: number;
|
|
40
|
+
items_per_page: number;
|
|
41
|
+
};
|
|
42
|
+
productLists: {
|
|
43
|
+
title: string;
|
|
44
|
+
search_base_name: string;
|
|
45
|
+
collectionId: number;
|
|
46
|
+
search_base_key: string;
|
|
47
|
+
number_of_items: number;
|
|
48
|
+
sort: string;
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface PDPProductCarouselSectionType extends ISectionResponseBase {
|
|
53
|
+
data: {
|
|
54
|
+
config: {
|
|
55
|
+
gap: number;
|
|
56
|
+
items_per_page: number;
|
|
57
|
+
};
|
|
58
|
+
productLists: {
|
|
59
|
+
title: string;
|
|
60
|
+
product_group_option: TPDPShelfType;
|
|
61
|
+
number_of_items: number;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface ProductShelfProps {
|
|
66
|
+
products: ProductNode[];
|
|
67
|
+
title?: string;
|
|
68
|
+
itemsPerPage?: number;
|
|
69
|
+
onSkuSelection?: BuyPackageProductCardProps['onSkuSelection'];
|
|
70
|
+
structureType?: StructureType;
|
|
71
|
+
onCarouselControls?: (controller: CarouselController, pagination: CarouselPagination) => void;
|
|
72
|
+
}
|
|
73
|
+
export interface ProductShelfCardProps extends Omit<BuyPackageProductCardProps, 'onSkuSelection'> {
|
|
74
|
+
structureType: StructureType;
|
|
75
|
+
onSkuSelection?: BuyPackageProductCardProps['onSkuSelection'];
|
|
76
|
+
tag?: string;
|
|
77
|
+
}
|
package/types/constants.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface CrossSellingFacet {
|
|
|
13
13
|
export type InputSizes = Exclude<Size, 'textarea-size'>;
|
|
14
14
|
export type ADD_TO_CARTType = Record<string, Record<string, string>>;
|
|
15
15
|
export type ALIGNMENT_MENUType = 'flex-start' | 'center' | 'flex-end';
|
|
16
|
+
export type AUTH_TOKEN_COOKIEType = string;
|
|
16
17
|
export type BENNEFITS_BAR_TITLEType = string;
|
|
17
18
|
export type BUY_BUTTON_LABELSType = Record<string, string>;
|
|
18
19
|
export type BUY_PACKAGEType = {
|
|
@@ -26,6 +27,7 @@ export type BUY_PACKAGEType = {
|
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
export type COMMON_PAGE_COLUMN_GAPType = CSSProperties['gap'];
|
|
30
|
+
export type COMMON_PAGE_COLUMN_GAP_PDCType = CSSProperties['gap'];
|
|
29
31
|
export type COMPONENT_LISTType = Record<string, string>;
|
|
30
32
|
export type CREATE_CONTENTType = (jsonData: string) => EditorState;
|
|
31
33
|
export type EXTENDED_BLOCK_RENDER_MAPType = Immutable.Map<any, any>;
|
|
@@ -52,6 +54,7 @@ export type NAME_SPLIT_SYMBOLType = string;
|
|
|
52
54
|
export type OBJECT_FITS_DEFAULTType = (typeof ObjectFitsDefault)[number];
|
|
53
55
|
export type PAYMENT_FLAGS_DICTIONARYType = Record<string, string>;
|
|
54
56
|
export type PAYMENT_FLAGSType = any;
|
|
57
|
+
export type LEGAL_INFORMATION_TEXTType = string;
|
|
55
58
|
export type PDP_INFOType = Record<string, Record<string, string>>;
|
|
56
59
|
export type PLP_FILTERSType = {
|
|
57
60
|
key: string;
|
|
@@ -98,4 +101,19 @@ export type TIPBAR_CONFIGSType = {
|
|
|
98
101
|
};
|
|
99
102
|
export type TOGGLE_STYLE_MODIFIERType = React.CSSProperties;
|
|
100
103
|
export type Z_INDEX_WARType = Record<string, number>;
|
|
101
|
-
export type
|
|
104
|
+
export type StoreConfigType = {
|
|
105
|
+
secureSubdomain: string;
|
|
106
|
+
storeUrl: string;
|
|
107
|
+
mainSeller: {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
wishlistConfig: {
|
|
112
|
+
path: string;
|
|
113
|
+
label: string;
|
|
114
|
+
};
|
|
115
|
+
termsConfig: {
|
|
116
|
+
path: string;
|
|
117
|
+
label: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
2
|
+
import { ProductSearchResultPage } from '../../data/api/search/product';
|
|
3
|
+
import { State } from '../../data/api/search';
|
|
4
|
+
import { BannerType } from '../../cms/Sections/Banner';
|
|
5
|
+
import { ProductNode_PDC } from '../../global/product';
|
|
6
|
+
|
|
7
|
+
export type PLPBanners = ({
|
|
8
|
+
columns: number;
|
|
9
|
+
position_grid: number;
|
|
10
|
+
} & BannerType)[];
|
|
1
11
|
export interface Page {
|
|
2
12
|
page: number;
|
|
3
13
|
loading: boolean;
|
|
4
|
-
products:
|
|
14
|
+
products: ProductNode_PDC[];
|
|
5
15
|
pagination: {
|
|
6
16
|
nextPage?: boolean;
|
|
7
17
|
previousPage?: boolean;
|
|
@@ -11,3 +21,40 @@ export interface Page {
|
|
|
11
21
|
total: number;
|
|
12
22
|
};
|
|
13
23
|
}
|
|
24
|
+
export type PositionsGrid = {
|
|
25
|
+
banners: number[];
|
|
26
|
+
products: number[];
|
|
27
|
+
};
|
|
28
|
+
export type DataLayerEvent = (data: ProductSearchResultPage) => void;
|
|
29
|
+
export interface PageState {
|
|
30
|
+
addPage: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number) => void;
|
|
31
|
+
banners: number[];
|
|
32
|
+
createPages: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number) => void;
|
|
33
|
+
load: boolean;
|
|
34
|
+
pages: Page[];
|
|
35
|
+
products: number[];
|
|
36
|
+
total: number;
|
|
37
|
+
updateProducts: (state: State, callback?: DataLayerEvent) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface PLPInfiniteContextProps extends PropsWithChildren<Omit<PageState, 'init'>> {
|
|
40
|
+
addNewPage(page: Page): void;
|
|
41
|
+
columns: number;
|
|
42
|
+
gap: number;
|
|
43
|
+
updateParamPage(page: Page): void;
|
|
44
|
+
updatePage(page: Page): void;
|
|
45
|
+
}
|
|
46
|
+
export interface PLPInfiniteProviderProps extends PropsWithChildren {
|
|
47
|
+
banners: PLPBanners;
|
|
48
|
+
itemsPerPage?: number;
|
|
49
|
+
searchParams?: Record<string, string>;
|
|
50
|
+
}
|
|
51
|
+
export interface PLPContextProps {
|
|
52
|
+
openFilters: boolean;
|
|
53
|
+
setOpenFilters: Dispatch<SetStateAction<boolean>>;
|
|
54
|
+
}
|
|
55
|
+
export interface PLPProviderProps extends PropsWithChildren {
|
|
56
|
+
slug: string[] | string;
|
|
57
|
+
searchParams?: Record<string, string>;
|
|
58
|
+
collectionId?: number | null;
|
|
59
|
+
itemsPerPage?: number;
|
|
60
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { AUTH_TOKEN_COOKIEType } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export interface SessionProviderProps extends PropsWithChildren {
|
|
5
|
+
AUTH_TOKEN_COOKIE: AUTH_TOKEN_COOKIEType;
|
|
6
|
+
}
|
|
7
|
+
interface BrandRef {
|
|
8
|
+
refid: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
interface ValueBox {
|
|
12
|
+
code: string;
|
|
13
|
+
document: string;
|
|
14
|
+
user_code: string;
|
|
15
|
+
cnpj: string;
|
|
16
|
+
value: number;
|
|
17
|
+
value_used: number;
|
|
18
|
+
trigger_amount: number;
|
|
19
|
+
type: any;
|
|
20
|
+
expiration_date: string | Date;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
created_at: string | Date;
|
|
23
|
+
gift_card_box: {
|
|
24
|
+
refid: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
old_reference: any;
|
|
28
|
+
gift_card_property_enable: {
|
|
29
|
+
type_trigger_id: string;
|
|
30
|
+
trigger_amount: number;
|
|
31
|
+
trigger_amount_generation: number;
|
|
32
|
+
minimum_discount_value: number;
|
|
33
|
+
maximum_discount_value: number | null;
|
|
34
|
+
start_date_utilization: string | Date;
|
|
35
|
+
limit_percentage_discount: number | null;
|
|
36
|
+
requires_authentication: boolean;
|
|
37
|
+
start_days_utilization: number | null;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
brand_creation: BrandRef;
|
|
41
|
+
brands_gift_card: BrandRef[];
|
|
42
|
+
remaining_value: number;
|
|
43
|
+
}
|
|
44
|
+
export type Boxes = {
|
|
45
|
+
gift_card_box: {
|
|
46
|
+
name: string;
|
|
47
|
+
refid: string;
|
|
48
|
+
};
|
|
49
|
+
amount: number;
|
|
50
|
+
};
|
|
51
|
+
export interface ISessionContext {
|
|
52
|
+
loading: boolean;
|
|
53
|
+
amount?: number | null;
|
|
54
|
+
boxes?: Boxes[] | null;
|
|
55
|
+
toExpire?: {
|
|
56
|
+
credito: ValueBox[] | null;
|
|
57
|
+
cashback: ValueBox[] | null;
|
|
58
|
+
} | null;
|
|
59
|
+
user?: {
|
|
60
|
+
userId: string;
|
|
61
|
+
email: string;
|
|
62
|
+
firstName: string;
|
|
63
|
+
lastName: string;
|
|
64
|
+
homePhone: string;
|
|
65
|
+
phone: string;
|
|
66
|
+
gender: string;
|
|
67
|
+
document: string;
|
|
68
|
+
number: string;
|
|
69
|
+
city: string;
|
|
70
|
+
street: string;
|
|
71
|
+
postalCode: string;
|
|
72
|
+
};
|
|
73
|
+
token?: string;
|
|
74
|
+
texts?: {
|
|
75
|
+
welcome?: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
};
|
|
78
|
+
logout: () => void;
|
|
79
|
+
getCurrentCredits: () => {
|
|
80
|
+
credits: number;
|
|
81
|
+
cashback: number;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType,
|
|
1
|
+
import { BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, 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
2
|
import { ProductType_PDC, HasVariant, ProductNode_PDC } from '../../../global/product';
|
|
3
3
|
|
|
4
4
|
export interface SelectedItemType {
|
|
@@ -44,7 +44,7 @@ export interface BuyPackageProps {
|
|
|
44
44
|
PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
|
|
45
45
|
PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
|
|
46
46
|
SECOND_IMAGE: SECOND_IMAGEType;
|
|
47
|
-
StoreConfig_MainSellerId:
|
|
47
|
+
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
48
48
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
49
49
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
50
50
|
};
|
|
@@ -2,7 +2,7 @@ import { SolidVariantsType, VariantsType } from '@soma-vertical-web/core-compone
|
|
|
2
2
|
import { ComponentType, PropsWithChildren, ReactNode, RefObject } from 'react';
|
|
3
3
|
import { HeaderCategories, HeaderNavLinks } from '../../../cms/ContentTypes/Header';
|
|
4
4
|
import { AddToCartProviderProps } from '../../team-components/AddToCart';
|
|
5
|
-
import { ALIGNMENT_MENUType, COMPONENT_LISTType, ICONSType, MENU_MOB_BTN_SIDEType, MENU_INFOType, MENU_NAVIGATION_BAR_ALLOWEDType, Z_INDEX_WARType } from '../../../constants';
|
|
5
|
+
import { ALIGNMENT_MENUType, COMPONENT_LISTType, ICONSType, MENU_MOB_BTN_SIDEType, MENU_INFOType, MENU_NAVIGATION_BAR_ALLOWEDType, Z_INDEX_WARType, StoreConfigType } from '../../../constants';
|
|
6
6
|
import { DataSubmenu } from '../../../cms/Sections/HeaderSubmenu';
|
|
7
7
|
|
|
8
8
|
export type HeaderPositionsType = 'absolute' | 'relative';
|
|
@@ -23,6 +23,8 @@ export interface HeaderContextProps extends HeaderProviderProps {
|
|
|
23
23
|
structureRef: RefObject<HTMLDivElement | null>;
|
|
24
24
|
rootRef: RefObject<HTMLDivElement | null>;
|
|
25
25
|
tipbarRef: RefObject<HTMLDivElement | null>;
|
|
26
|
+
userMenuMobileRef: RefObject<HTMLButtonElement | null>;
|
|
27
|
+
userMenuDesktopRef: RefObject<HTMLButtonElement | null>;
|
|
26
28
|
}
|
|
27
29
|
export interface HeaderProviderProps extends PropsWithChildren {
|
|
28
30
|
headerData: {
|
|
@@ -34,6 +36,7 @@ export interface HeaderProviderProps extends PropsWithChildren {
|
|
|
34
36
|
subMenus: DataSubmenu[];
|
|
35
37
|
};
|
|
36
38
|
CONSTANTS: HEADER_CONSTANTS;
|
|
39
|
+
storeConfig: StoreConfigType;
|
|
37
40
|
}
|
|
38
41
|
export type HeaderScrollBehaviorType = {
|
|
39
42
|
[key1 in 'desktop' | 'mobile']: {
|
|
@@ -53,12 +56,10 @@ export type HeaderConfigsType = {
|
|
|
53
56
|
};
|
|
54
57
|
export type HeaderContainerProps = {
|
|
55
58
|
miniCart: ReactNode;
|
|
56
|
-
UserMenu: ComponentType<any>;
|
|
57
59
|
SearchModal: ComponentType<any>;
|
|
58
60
|
tipBar?: ReactNode;
|
|
59
61
|
};
|
|
60
62
|
export type HeaderWrappersProps = {
|
|
61
|
-
UserMenu: ComponentType<any>;
|
|
62
63
|
SearchModal: ComponentType<any>;
|
|
63
64
|
};
|
|
64
65
|
export {};
|
|
@@ -3,7 +3,7 @@ import { ComponentType, Dispatch, HTMLAttributes, PropsWithChildren, RefObject,
|
|
|
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,
|
|
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';
|
|
7
7
|
import { SizeSkuItemProps, StyleSelectorProps } from './Selectors';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -30,7 +30,7 @@ export interface RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
30
30
|
SECOND_IMAGE: SECOND_IMAGEType;
|
|
31
31
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
32
32
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
33
|
-
StoreConfig_MainSellerId:
|
|
33
|
+
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
34
34
|
};
|
|
35
35
|
WishListToggle: ComponentType<any>;
|
|
36
36
|
}
|
|
@@ -54,6 +54,9 @@ export interface ProductCardMediaProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
54
54
|
hasPriority?: boolean;
|
|
55
55
|
showVideo?: boolean;
|
|
56
56
|
}
|
|
57
|
+
export type ProductNode = {
|
|
58
|
+
node: ProductCardProps;
|
|
59
|
+
};
|
|
57
60
|
export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
58
61
|
product: ProductType_PDC;
|
|
59
62
|
tag?: TagCommercialConsumer;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Dispatch, HTMLAttributes, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
import { ICONSType, StoreConfigType, Z_INDEX_WARType } from '../../../constants';
|
|
3
|
+
|
|
4
|
+
export interface UserMenu_RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
6
|
+
component?: ReactNode;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
setIsOpen: (value: boolean) => void;
|
|
9
|
+
isMobile?: boolean | null;
|
|
10
|
+
target?: HTMLButtonElement | null;
|
|
11
|
+
}
|
|
12
|
+
export interface UserMenuContextProps extends Omit<UserMenu_RootProps, 'Z_INDEX_WAR'> {
|
|
13
|
+
setIsLeaving: Dispatch<SetStateAction<boolean>>;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
setIsOpen: (value: boolean) => void;
|
|
16
|
+
isMobile?: boolean | null;
|
|
17
|
+
contentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
18
|
+
isLeaving: boolean;
|
|
19
|
+
left?: number;
|
|
20
|
+
top?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface UserMenuProviderProps extends Omit<UserMenu_RootProps, 'Z_INDEX_WAR'> {
|
|
23
|
+
delay?: number;
|
|
24
|
+
gap?: number;
|
|
25
|
+
}
|
|
26
|
+
export type LOGIN_MENU_OPTIONS_ARRAYProps = {
|
|
27
|
+
ICONS: ICONSType;
|
|
28
|
+
storeConfig: StoreConfigType;
|
|
29
|
+
};
|
|
30
|
+
export interface UserMenu_MenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
31
|
+
ICONS: ICONSType;
|
|
32
|
+
storeConfig: StoreConfigType;
|
|
33
|
+
onLogoutClick: () => void;
|
|
34
|
+
isLogged?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface UserMenu_ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
38
|
+
isMobile?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface UserMenu_TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
41
|
+
component: ReactNode;
|
|
42
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
43
|
+
}
|
|
44
|
+
export declare enum CreditTypeEnum {
|
|
45
|
+
Account = "account"
|
|
46
|
+
}
|
|
47
|
+
export interface CreditsProps extends HTMLAttributes<HTMLDivElement> {
|
|
48
|
+
cashBack: number;
|
|
49
|
+
credits: number;
|
|
50
|
+
link?: string;
|
|
51
|
+
total: number;
|
|
52
|
+
}
|