@soma-vertical-web/multi-lib 1.0.33 → 1.0.35
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/constants.d.ts +1 -0
- package/contexts/contexts/newsletter/Context.d.ts +1 -1
- package/contexts/contexts/plp/FilterContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPInfiniteContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
- package/contexts/contexts/search/Search.d.ts +1 -1
- package/contexts/hooks/useScrollRestorationInfinite.d.ts +1 -1
- package/contexts/index.d.ts +4 -16
- package/contexts/store/plp.d.ts +2 -2
- package/data/api/DitoIngest/authorization/index.d.ts +1 -0
- package/data/api/DitoIngest/ditoIngestService.d.ts +3 -0
- package/data/helpers/plp/index.d.ts +4 -13
- package/data/helpers/search/facets.d.ts +1 -0
- package/data/helpers/search/index.d.ts +4 -0
- package/data/helpers/search/product/index.d.ts +13 -1
- package/data/helpers/search/search.d.ts +1 -0
- package/data/index.d.ts +2 -0
- package/index-AgO_aUeQ.mjs +2371 -0
- package/index-Cqk3VcE0.js +4 -0
- package/index-D0PGMDh5.js +4 -0
- package/index-DctCSt6v.mjs +2695 -0
- package/index.js +17 -17
- package/index.mjs +11380 -9243
- package/index2.js +2 -2
- package/index2.mjs +736 -653
- package/layout/index.d.ts +4 -4
- package/layout/team-component/Newsletter/index.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Banners/Banners.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Filters/Filters.d.ts +2 -6
- package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +3 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Card.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Loader.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/NextPage.d.ts +4 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +2 -2
- package/layout/template/PDC/Composite/InfiniteScroller/Page/index.d.ts +10 -3
- package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
- package/layout/template/PDC/PDC.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +2 -2
- package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
- package/layout/template/SearchResult/Composite/Products.d.ts +1 -1
- package/package.json +1 -1
- package/server.d.ts +6 -0
- package/style.css +1 -1
- package/types/cms/Sections/Newsletter/index.d.ts +4 -0
- package/types/contexts/contexts/plp.d.ts +62 -20
- package/types/contexts/contexts/search.d.ts +29 -28
- package/types/contexts/hooks/index.d.ts +0 -2
- package/types/data/api/dito-ingest/index.d.ts +12 -1
- package/types/layout/team-components/Newsletter/index.d.ts +6 -0
- package/types/layout/team-components/PLPNavigation/index.d.ts +0 -2
- package/types/layout/templates/PDP/index.d.ts +0 -1
- package/types/layout/templates/PLP/index.d.ts +14 -4
|
@@ -12,53 +12,96 @@ export type PLPBanners = ({
|
|
|
12
12
|
export interface Page {
|
|
13
13
|
page: number;
|
|
14
14
|
loading: boolean;
|
|
15
|
-
products: any[];
|
|
16
|
-
pagination: {
|
|
17
|
-
nextPage?: boolean;
|
|
18
|
-
previousPage?: boolean;
|
|
19
|
-
startCursor: string;
|
|
20
|
-
endCursor: string;
|
|
21
|
-
count: number;
|
|
22
|
-
total: number;
|
|
23
|
-
};
|
|
24
15
|
}
|
|
25
16
|
export type PositionsGrid = {
|
|
26
17
|
banners: number[];
|
|
27
18
|
products: number[];
|
|
28
19
|
};
|
|
29
20
|
export type DataLayerEvent = (data: ProductSearchResultPage) => void;
|
|
21
|
+
export type ScrollPagePositions = {
|
|
22
|
+
banners: number[];
|
|
23
|
+
products: number[];
|
|
24
|
+
};
|
|
25
|
+
export interface ScrollPageState {
|
|
26
|
+
banners: number[];
|
|
27
|
+
empty?: boolean;
|
|
28
|
+
load: boolean;
|
|
29
|
+
pages: Page[];
|
|
30
|
+
products: number[];
|
|
31
|
+
addPage: (page: number, positions: ScrollPagePositions) => void;
|
|
32
|
+
createPagesScroll: (page: number, positions: ScrollPagePositions, itemsPerPage?: number) => void;
|
|
33
|
+
reset: () => void;
|
|
34
|
+
setLoad: (value: boolean) => void;
|
|
35
|
+
setPositions: (positions: ScrollPagePositions) => void;
|
|
36
|
+
trimPages: (maxPage: number) => void;
|
|
37
|
+
updateProducts: (page: number) => void;
|
|
38
|
+
}
|
|
30
39
|
export interface PageState {
|
|
31
40
|
addPage: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number) => void;
|
|
32
41
|
banners: number[];
|
|
33
|
-
|
|
42
|
+
createPagesScroll: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number) => void;
|
|
34
43
|
load: boolean;
|
|
35
44
|
pages: Page[];
|
|
36
45
|
products: number[];
|
|
37
46
|
total: number;
|
|
38
47
|
updateProducts: (state: State, callback?: DataLayerEvent) => void;
|
|
39
48
|
}
|
|
40
|
-
export interface PLPInfiniteContextProps extends PropsWithChildren
|
|
41
|
-
addNewPage(page: Page): void;
|
|
49
|
+
export interface PLPInfiniteContextProps extends PropsWithChildren {
|
|
50
|
+
addNewPage(page: Page, total: number, nextPage?: boolean): void;
|
|
42
51
|
columns: number;
|
|
43
52
|
gap: number;
|
|
44
|
-
updateParamPage(page: Page): void;
|
|
45
|
-
updatePage(page: Page): void;
|
|
46
53
|
handleNotify(skus: ProductType_PDC['isVariantOf']['hasVariant'], item: HasVariant | null): void;
|
|
54
|
+
updateParamPage(page: number): void;
|
|
47
55
|
}
|
|
48
56
|
export interface PLPInfiniteProviderProps extends PropsWithChildren {
|
|
49
57
|
banners: PLPBanners;
|
|
50
58
|
}
|
|
51
|
-
export interface PLPContextProps {
|
|
59
|
+
export interface PLPContextProps extends Pick<PLPProviderProps, 'constants' | 'mainSeller'> {
|
|
52
60
|
openFilters: boolean;
|
|
53
61
|
setOpenFilters: Dispatch<SetStateAction<boolean>>;
|
|
54
62
|
}
|
|
55
63
|
export interface PLPProviderProps extends PropsWithChildren {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
brand?: string | null;
|
|
65
|
+
constants: {
|
|
66
|
+
BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
|
|
67
|
+
ICONS: ICONSType;
|
|
68
|
+
ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
|
|
69
|
+
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
70
|
+
ITEMS_PER_SECTION: ITEMS_PER_SECTIONType;
|
|
71
|
+
MAIN_IMAGE: MAIN_IMAGEType;
|
|
72
|
+
NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGSType;
|
|
73
|
+
NOTIFY_INFO: NOTIFY_INFOType;
|
|
74
|
+
PDC_NAVIGATION: PDC_NAVIGATIONType;
|
|
75
|
+
PLP_FILTERS: PLP_FILTERSType;
|
|
76
|
+
PLP_FILTERS_COLORS: PLP_FILTERS_COLORSType;
|
|
77
|
+
PLP_FILTERS_EMPTY: PLP_FILTERS_EMPTYType;
|
|
78
|
+
PLP_FILTERS_TITLE: PLP_FILTERS_TITLEType;
|
|
79
|
+
PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
|
|
80
|
+
PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
|
|
81
|
+
PLP_NOT_RESULT: PLP_NOT_RESULTType;
|
|
82
|
+
PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
|
|
83
|
+
PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
|
|
84
|
+
PLP_SIZE_ORDER: PLP_SIZE_ORDERType;
|
|
85
|
+
PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
|
|
86
|
+
PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
|
|
87
|
+
PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
|
|
88
|
+
PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
|
|
89
|
+
PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
|
|
90
|
+
SEARCH_PAGE_ITEM_THRESHOLD: SEARCH_PAGE_ITEM_THRESHOLDType;
|
|
91
|
+
SEARCH_TOTAL_PORTAL_ID: SEARCH_TOTAL_PORTAL_IDType;
|
|
92
|
+
SECOND_IMAGE: SECOND_IMAGEType;
|
|
93
|
+
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
94
|
+
TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
|
|
95
|
+
TIME_ZONE: TIME_ZONEType;
|
|
96
|
+
VARIANT_PAGINATION: VARIANT_PAGINATIONType;
|
|
97
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
98
|
+
};
|
|
59
99
|
collectionId?: number | null;
|
|
60
100
|
itemsPerPage?: number;
|
|
61
|
-
|
|
101
|
+
mainSeller: StoreConfigType['mainSeller']['id'];
|
|
102
|
+
pathname: string;
|
|
103
|
+
searchParams?: URLSearchParams;
|
|
104
|
+
slug: string[] | string;
|
|
62
105
|
}
|
|
63
106
|
export interface PLPConstantsProviderProps extends PropsWithChildren {
|
|
64
107
|
BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
|
|
@@ -94,6 +137,5 @@ export interface PLPConstantsProviderProps extends PropsWithChildren {
|
|
|
94
137
|
VARIANT_PAGINATION: VARIANT_PAGINATIONType;
|
|
95
138
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
96
139
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
97
|
-
searchParams: URLSearchParams;
|
|
98
140
|
}
|
|
99
141
|
export type PLPConstantsContextProps = Omit<PLPConstantsProviderProps, 'children'>;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
2
2
|
import { ProductSearchResultPage } from '../../data/api/search/product';
|
|
3
3
|
import { State, Suggestion } from '../../data/api/search';
|
|
4
|
-
import {
|
|
4
|
+
import { FacetSearchResult, SelectedFacet } from '../../data/api/search/facets';
|
|
5
5
|
import { ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, ITEMS_PER_SECTIONType, PLP_FILTERS_SORT_OPTIONtype, SEARCH_PAGE_ITEM_THRESHOLDType, SEARCH_RESULTType, VARIANT_PAGINATIONType } from '../../constants';
|
|
6
|
-
import {
|
|
6
|
+
import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
7
7
|
import { ProductsProps } from '../../layout/templates/PLP';
|
|
8
8
|
|
|
9
|
+
export interface QueryFacetsContextProps extends FacetSearchResult {
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
deleteAllFacets(): void;
|
|
12
|
+
selectedFacets: SelectedFacet[];
|
|
13
|
+
onToggleFacet(value: SelectedFacet): void;
|
|
14
|
+
onSort(sort: PLP_FILTERS_SORT_OPTIONtype): void;
|
|
15
|
+
}
|
|
9
16
|
export interface FacetsContextProps {
|
|
10
|
-
breadcrumb: BreadCrumbItemLinkProps[];
|
|
11
17
|
deleteAllFacets(): void;
|
|
12
|
-
facets: Facet[];
|
|
13
|
-
isLoading: boolean;
|
|
14
18
|
selectedFacets: SelectedFacet[];
|
|
15
19
|
onToggleFacet(value: SelectedFacet): void;
|
|
16
20
|
onSort(sort: PLP_FILTERS_SORT_OPTIONtype): void;
|
|
17
21
|
}
|
|
18
|
-
export interface
|
|
22
|
+
export interface QueryFacetsProviderProps extends PropsWithChildren {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
state: State;
|
|
19
25
|
forceUpdate?: boolean;
|
|
20
26
|
}
|
|
21
|
-
export interface
|
|
22
|
-
selectedFacets: SelectedFacet[];
|
|
23
|
-
}
|
|
24
|
-
export interface ProductsContextProps extends ProductSearchResultPage {
|
|
25
|
-
isLoading: boolean;
|
|
27
|
+
export interface QueryProductsContextProps extends ProductSearchResultPage, Pick<RootQueryContextProps, 'refetch' | 'isFetched' | 'isLoading'> {
|
|
26
28
|
total: number;
|
|
27
29
|
}
|
|
28
30
|
export interface SuggestedTermsContextProps {
|
|
@@ -33,22 +35,22 @@ export interface SuggestedTermsContextProps {
|
|
|
33
35
|
export interface SuggestedTermsProviderProps extends PropsWithChildren {
|
|
34
36
|
term?: string;
|
|
35
37
|
}
|
|
36
|
-
export interface
|
|
37
|
-
|
|
38
|
+
export interface QueryProductsProviderProps extends PropsWithChildren {
|
|
39
|
+
callback?: (data: ProductSearchResultPage) => void;
|
|
38
40
|
forceUpdate?: boolean;
|
|
39
|
-
|
|
40
|
-
export interface SearchContextProps extends Pick<SearchProviderProps, 'sort' | 'searchParams'> {
|
|
41
|
-
count: number;
|
|
41
|
+
options: Omit<UseQueryOptions<DataParams, Error, DataParams, (string | undefined)[]>, 'queryKey' | 'queryFn'>;
|
|
42
42
|
state: State;
|
|
43
|
+
queryKey: (string | undefined)[];
|
|
44
|
+
}
|
|
45
|
+
export interface ProductsProviderProps extends PropsWithChildren<State> {
|
|
46
|
+
forceUpdate?: boolean;
|
|
43
47
|
}
|
|
48
|
+
export type SearchContextProps = Pick<SearchProviderProps, 'state' | 'searchParams'>;
|
|
44
49
|
export interface SearchProviderProps extends PropsWithChildren {
|
|
50
|
+
brand?: string | null;
|
|
51
|
+
collectionId?: number | null;
|
|
45
52
|
searchParams: URLSearchParams;
|
|
46
53
|
state: State;
|
|
47
|
-
sort?: string;
|
|
48
|
-
collectionId?: number | null;
|
|
49
|
-
brand?: string | null;
|
|
50
|
-
count?: number;
|
|
51
|
-
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
52
54
|
}
|
|
53
55
|
export interface SearchItem {
|
|
54
56
|
term: string;
|
|
@@ -61,19 +63,18 @@ export interface TopSearchesContextProps {
|
|
|
61
63
|
}
|
|
62
64
|
export type TopSearchesProviderProps = PropsWithChildren;
|
|
63
65
|
export type DataParams = FacetsContextProps | ProductSearchResultPage | SuggestedTermsContextProps;
|
|
64
|
-
export interface
|
|
65
|
-
data: DataParams |
|
|
66
|
+
export interface RootQueryContextProps {
|
|
67
|
+
data: DataParams | undefined;
|
|
66
68
|
isLoading: boolean;
|
|
69
|
+
refetch: UseQueryResult<DataParams, Error>['refetch'];
|
|
70
|
+
isFetched?: boolean;
|
|
71
|
+
isRefetching?: boolean;
|
|
67
72
|
isError?: boolean;
|
|
68
73
|
}
|
|
69
74
|
export interface RootProviderProps extends PropsWithChildren {
|
|
75
|
+
enabled?: boolean;
|
|
70
76
|
fetch: () => Promise<Response>;
|
|
71
77
|
}
|
|
72
|
-
export interface SearchStore extends Pick<RootContextProps, 'data'> {
|
|
73
|
-
isLoading?: boolean;
|
|
74
|
-
isError?: boolean;
|
|
75
|
-
fetchData: (fetcher: () => Promise<Response>) => Promise<void>;
|
|
76
|
-
}
|
|
77
78
|
export interface SearchConstantsProviderProps extends PropsWithChildren, Omit<ProductsProps, 'items' | 'isMobile'> {
|
|
78
79
|
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
79
80
|
ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PLP_GRID_SCROLL_BACKType } from '../../constants';
|
|
2
|
-
import { Page } from '../contexts/plp';
|
|
3
2
|
|
|
4
3
|
export interface UseBackPDCProps {
|
|
5
4
|
gridScrollBack?: {
|
|
@@ -13,7 +12,6 @@ export type UseScrollRestorationProps = {
|
|
|
13
12
|
PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
|
|
14
13
|
};
|
|
15
14
|
export type UseScrollRestorationInfiniteProps = {
|
|
16
|
-
pages: Page[];
|
|
17
15
|
load: boolean;
|
|
18
16
|
PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
|
|
19
17
|
};
|
|
@@ -28,7 +28,7 @@ export interface DitoIdentifyBody {
|
|
|
28
28
|
}
|
|
29
29
|
export interface DitoTrackBody {
|
|
30
30
|
user_id: string;
|
|
31
|
-
action: string;
|
|
31
|
+
action: string | undefined;
|
|
32
32
|
timestamp: string;
|
|
33
33
|
type: DitoEventType;
|
|
34
34
|
context?: {
|
|
@@ -62,4 +62,15 @@ export type DitoAuthResponse = {
|
|
|
62
62
|
token: string;
|
|
63
63
|
refresh_token: string;
|
|
64
64
|
};
|
|
65
|
+
export type DitoIngestParams = {
|
|
66
|
+
body: Array<DitoIdentifyBody | DitoTrackBody>;
|
|
67
|
+
userToken?: string;
|
|
68
|
+
headers: Record<string, string | null>;
|
|
69
|
+
dito: {
|
|
70
|
+
authUrl: string;
|
|
71
|
+
ingestUrl: string;
|
|
72
|
+
brandName: string;
|
|
73
|
+
};
|
|
74
|
+
apiUrl: string;
|
|
75
|
+
};
|
|
65
76
|
export {};
|
|
@@ -46,6 +46,8 @@ export interface RootProps extends HTMLAttributes<HTMLDivElement>, TextCommonPro
|
|
|
46
46
|
banner: string;
|
|
47
47
|
altBanner: string;
|
|
48
48
|
bannerBackground: boolean;
|
|
49
|
+
actionName?: string;
|
|
50
|
+
originName?: string;
|
|
49
51
|
}
|
|
50
52
|
export interface TextProps extends HTMLAttributes<HTMLDivElement>, Omit<TextCommonProps, 'lgpd'> {
|
|
51
53
|
}
|
|
@@ -81,6 +83,10 @@ export interface NewsletterProviderProps extends PropsWithChildren {
|
|
|
81
83
|
NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGS;
|
|
82
84
|
ICONS: ICONSType;
|
|
83
85
|
};
|
|
86
|
+
dito?: {
|
|
87
|
+
actionName: string;
|
|
88
|
+
originName: string;
|
|
89
|
+
};
|
|
84
90
|
}
|
|
85
91
|
export interface NewsletterContextProps {
|
|
86
92
|
formStatus: FormStatus;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Dispatch, HTMLAttributes, SetStateAction } from 'react';
|
|
2
2
|
import { SearchSort } from '../../../data/api/search';
|
|
3
3
|
import { FacetsContextProps } from '../../../contexts/contexts/search';
|
|
4
|
-
import { ICONSType } from '../../../constants';
|
|
5
4
|
|
|
6
5
|
export interface BreadCrumbItemLinkProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
6
|
isLast?: boolean;
|
|
8
7
|
href?: string;
|
|
9
8
|
name?: string;
|
|
10
|
-
ICONS: ICONSType;
|
|
11
9
|
}
|
|
12
10
|
export type RootProps = HTMLAttributes<HTMLDivElement>;
|
|
13
11
|
export type Order = {
|
|
@@ -114,7 +114,6 @@ export type ProductMeasurementsProps = {
|
|
|
114
114
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
115
115
|
};
|
|
116
116
|
export interface PDPSimilarsType extends PropsWithChildren {
|
|
117
|
-
storeId: string;
|
|
118
117
|
productId: string;
|
|
119
118
|
PDP_INFO: PDP_INFOType;
|
|
120
119
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { AvailabilityNotifyProps } from '../../../../types/layout/team-components/Notify';
|
|
3
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, PLP_SIZE_ORDERType } from '../../../constants';
|
|
5
|
-
import { Page
|
|
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, PLP_SIZE_ORDERType, PLP_SORT_DEFAULTType } from '../../../constants';
|
|
5
|
+
import { Page } from '../../../contexts/contexts/plp';
|
|
6
6
|
import { ProductType_PDC } from '../../../global/product';
|
|
7
7
|
import { ProductCardProps } from '../../team-components/ProductCard';
|
|
8
|
+
import { State } from '../../../data/api/search';
|
|
8
9
|
|
|
9
10
|
export type PLPNavigationRootProps = {
|
|
10
11
|
searchParams: {
|
|
@@ -31,15 +32,20 @@ export interface InfiniteBannersProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
32
|
count: number;
|
|
32
33
|
gap: number;
|
|
33
34
|
}
|
|
35
|
+
export interface FiltersProps {
|
|
36
|
+
state: State;
|
|
37
|
+
sort: PLP_SORT_DEFAULTType;
|
|
38
|
+
}
|
|
34
39
|
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
40
|
infinite?: boolean;
|
|
36
41
|
}
|
|
42
|
+
export type GridInfiniteProps = HTMLAttributes<HTMLDivElement>;
|
|
37
43
|
export interface PageSentinelProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
44
|
page: Page;
|
|
39
45
|
}
|
|
40
46
|
export interface PageCardProps {
|
|
47
|
+
empty?: boolean;
|
|
41
48
|
first?: boolean;
|
|
42
|
-
last?: boolean;
|
|
43
49
|
gap: number;
|
|
44
50
|
index: number;
|
|
45
51
|
isMobile?: boolean;
|
|
@@ -48,6 +54,10 @@ export interface PageCardProps {
|
|
|
48
54
|
page?: Page;
|
|
49
55
|
showVideo?: boolean;
|
|
50
56
|
}
|
|
57
|
+
export interface PageScrollProps {
|
|
58
|
+
count: number;
|
|
59
|
+
page: Page;
|
|
60
|
+
}
|
|
51
61
|
export interface PageProps {
|
|
52
62
|
count: number;
|
|
53
63
|
gap: number;
|
|
@@ -114,7 +124,7 @@ export interface ProductsProps {
|
|
|
114
124
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
115
125
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
116
126
|
}
|
|
117
|
-
export interface PLPRootProps
|
|
127
|
+
export interface PLPRootProps {
|
|
118
128
|
className?: string;
|
|
119
129
|
}
|
|
120
130
|
export type EmptyProps = {
|