@soma-vertical-web/multi-lib 1.0.33 → 1.0.34
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/Search/SearchContent.d.ts +1 -1
- package/cms/Sections/ProductCarousel/request.d.ts +4 -0
- package/cms/index.d.ts +1 -1
- package/contexts/contexts/GlobalContext.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.tsx.d.ts +1 -1
- package/contexts/contexts/search/QueryFacets.d.ts +1 -1
- package/contexts/contexts/search/QueryProducts.d.ts +1 -1
- package/contexts/contexts/search/Search.d.ts +1 -1
- package/contexts/contexts/search/TopSearches.d.ts +1 -1
- package/contexts/hooks/useOperations.d.ts +1 -1
- package/contexts/hooks/useScrollRestorationInfinite.d.ts +1 -1
- package/contexts/index.d.ts +5 -17
- package/contexts/store/plp.d.ts +2 -2
- package/data/api/cms/content-type/index.d.ts +1 -1
- package/data/api/user/index.d.ts +2 -2
- package/data/helpers/plp/index.d.ts +6 -14
- 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 +7 -6
- package/index-AgO_aUeQ.mjs +2371 -0
- package/index-D0PGMDh5.js +4 -0
- package/index.js +17 -17
- package/index.mjs +11329 -8960
- package/index2.js +2 -2
- package/index2.mjs +268 -277
- package/layout/index.d.ts +9 -9
- package/layout/team-component/AddToCart/AddToCart.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/Card.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/Content.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Card/StyleSize.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Card.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/Composite/Style.d.ts +1 -1
- package/layout/template/MiniCart/Composite/Card/index.d.ts +2 -2
- package/layout/template/MiniCart/Composite/Modal/Body/Body.d.ts +1 -1
- package/layout/template/MiniCart/MiniCart.d.ts +1 -1
- package/layout/template/MiniCart/index.d.ts +2 -2
- package/layout/template/PDC/Composite/Grid/Grid.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/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/PDC.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +4 -4
- package/layout/template/QuickShop/Composite/Body.d.ts +1 -1
- package/layout/template/QuickShop/Composite/Similars.d.ts +1 -1
- package/layout/template/SearchModal/SearchModal.d.ts +1 -1
- package/layout/template/SearchResult/SearchContent.d.ts +1 -1
- package/layout/template/SearchResult/SearchResult.d.ts +1 -1
- package/package.json +1 -1
- package/server.d.ts +4 -0
- package/style.css +1 -1
- package/types/cms/Sections/SectionZone/index.d.ts +1 -0
- package/types/contexts/contexts/global.d.ts +0 -1
- package/types/contexts/contexts/plp.d.ts +65 -22
- package/types/contexts/contexts/search.d.ts +37 -30
- package/types/contexts/hooks/index.d.ts +3 -3
- package/types/layout/team-components/AddToCart/index.d.ts +5 -1
- package/types/layout/team-components/HelpButton/index.d.ts +4 -2
- package/types/layout/team-components/PLPNavigation/index.d.ts +0 -2
- package/types/layout/team-components/ProductCard/index.d.ts +1 -0
- package/types/layout/team-components/ProductList/index.d.ts +2 -1
- package/types/layout/templates/MiniCart/index.d.ts +2 -0
- package/types/layout/templates/PLP/index.d.ts +21 -4
- package/types/layout/templates/QuickShop/index.d.ts +2 -1
- package/types/layout/templates/SearchModal/index.d.ts +2 -1
- package/types/layout/templates/SearchResult/index.d.ts +3 -0
|
@@ -12,53 +12,97 @@ 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
|
-
addPage: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number) => void;
|
|
40
|
+
addPage: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number, storeId?: StoreConfigType['api']['storeId']) => void;
|
|
32
41
|
banners: number[];
|
|
33
|
-
|
|
42
|
+
createPagesScroll: (state: State, positions: PositionsGrid, callback?: DataLayerEvent, itemsPerPage?: number, storeId?: StoreConfigType['api']['storeId']) => void;
|
|
34
43
|
load: boolean;
|
|
35
44
|
pages: Page[];
|
|
36
45
|
products: number[];
|
|
37
46
|
total: number;
|
|
38
|
-
updateProducts: (state: State, callback?: DataLayerEvent) => void;
|
|
47
|
+
updateProducts: (state: State, callback?: DataLayerEvent, storeId?: StoreConfigType['api']['storeId']) => 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
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
99
|
+
};
|
|
59
100
|
collectionId?: number | null;
|
|
60
101
|
itemsPerPage?: number;
|
|
61
|
-
|
|
102
|
+
mainSeller: StoreConfigType['mainSeller']['id'];
|
|
103
|
+
pathname: string;
|
|
104
|
+
searchParams?: URLSearchParams;
|
|
105
|
+
slug: string[] | string;
|
|
62
106
|
}
|
|
63
107
|
export interface PLPConstantsProviderProps extends PropsWithChildren {
|
|
64
108
|
BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
|
|
@@ -94,6 +138,5 @@ export interface PLPConstantsProviderProps extends PropsWithChildren {
|
|
|
94
138
|
VARIANT_PAGINATION: VARIANT_PAGINATIONType;
|
|
95
139
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
96
140
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
97
|
-
searchParams: URLSearchParams;
|
|
98
141
|
}
|
|
99
142
|
export type PLPConstantsContextProps = Omit<PLPConstantsProviderProps, 'children'>;
|
|
@@ -1,28 +1,31 @@
|
|
|
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 {
|
|
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 {
|
|
4
|
+
import { FacetSearchResult, SelectedFacet } from '../../data/api/search/facets';
|
|
5
|
+
import { ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, ITEMS_PER_SECTIONType, PLP_FILTERS_SORT_OPTIONtype, SEARCH_PAGE_ITEM_THRESHOLDType, SEARCH_RESULTType, StoreConfigType, VARIANT_PAGINATIONType } from '../../constants';
|
|
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;
|
|
26
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
20
27
|
}
|
|
21
|
-
export interface
|
|
22
|
-
selectedFacets: SelectedFacet[];
|
|
23
|
-
}
|
|
24
|
-
export interface ProductsContextProps extends ProductSearchResultPage {
|
|
25
|
-
isLoading: boolean;
|
|
28
|
+
export interface QueryProductsContextProps extends ProductSearchResultPage, Pick<RootQueryContextProps, 'refetch' | 'isFetched' | 'isLoading'> {
|
|
26
29
|
total: number;
|
|
27
30
|
}
|
|
28
31
|
export interface SuggestedTermsContextProps {
|
|
@@ -32,23 +35,26 @@ export interface SuggestedTermsContextProps {
|
|
|
32
35
|
}
|
|
33
36
|
export interface SuggestedTermsProviderProps extends PropsWithChildren {
|
|
34
37
|
term?: string;
|
|
38
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
35
39
|
}
|
|
36
|
-
export interface
|
|
37
|
-
|
|
40
|
+
export interface QueryProductsProviderProps extends PropsWithChildren {
|
|
41
|
+
callback?: (data: ProductSearchResultPage) => void;
|
|
38
42
|
forceUpdate?: boolean;
|
|
39
|
-
|
|
40
|
-
export interface SearchContextProps extends Pick<SearchProviderProps, 'sort' | 'searchParams'> {
|
|
41
|
-
count: number;
|
|
43
|
+
options: Omit<UseQueryOptions<DataParams, Error, DataParams, (string | undefined)[]>, 'queryKey' | 'queryFn'>;
|
|
42
44
|
state: State;
|
|
45
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
46
|
+
queryKey: (string | undefined)[];
|
|
47
|
+
}
|
|
48
|
+
export interface ProductsProviderProps extends PropsWithChildren<State> {
|
|
49
|
+
forceUpdate?: boolean;
|
|
50
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
43
51
|
}
|
|
52
|
+
export type SearchContextProps = Pick<SearchProviderProps, 'state' | 'searchParams'>;
|
|
44
53
|
export interface SearchProviderProps extends PropsWithChildren {
|
|
54
|
+
brand?: string | null;
|
|
55
|
+
collectionId?: number | null;
|
|
45
56
|
searchParams: URLSearchParams;
|
|
46
57
|
state: State;
|
|
47
|
-
sort?: string;
|
|
48
|
-
collectionId?: number | null;
|
|
49
|
-
brand?: string | null;
|
|
50
|
-
count?: number;
|
|
51
|
-
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
52
58
|
}
|
|
53
59
|
export interface SearchItem {
|
|
54
60
|
term: string;
|
|
@@ -59,21 +65,22 @@ export interface TopSearchesContextProps {
|
|
|
59
65
|
isLoading: boolean;
|
|
60
66
|
error: string | null;
|
|
61
67
|
}
|
|
62
|
-
export
|
|
68
|
+
export interface TopSearchesProviderProps extends PropsWithChildren {
|
|
69
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
70
|
+
}
|
|
63
71
|
export type DataParams = FacetsContextProps | ProductSearchResultPage | SuggestedTermsContextProps;
|
|
64
|
-
export interface
|
|
65
|
-
data: DataParams |
|
|
72
|
+
export interface RootQueryContextProps {
|
|
73
|
+
data: DataParams | undefined;
|
|
66
74
|
isLoading: boolean;
|
|
75
|
+
refetch: UseQueryResult<DataParams, Error>['refetch'];
|
|
76
|
+
isFetched?: boolean;
|
|
77
|
+
isRefetching?: boolean;
|
|
67
78
|
isError?: boolean;
|
|
68
79
|
}
|
|
69
80
|
export interface RootProviderProps extends PropsWithChildren {
|
|
81
|
+
enabled?: boolean;
|
|
70
82
|
fetch: () => Promise<Response>;
|
|
71
83
|
}
|
|
72
|
-
export interface SearchStore extends Pick<RootContextProps, 'data'> {
|
|
73
|
-
isLoading?: boolean;
|
|
74
|
-
isError?: boolean;
|
|
75
|
-
fetchData: (fetcher: () => Promise<Response>) => Promise<void>;
|
|
76
|
-
}
|
|
77
84
|
export interface SearchConstantsProviderProps extends PropsWithChildren, Omit<ProductsProps, 'items' | 'isMobile'> {
|
|
78
85
|
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
79
86
|
ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PLP_GRID_SCROLL_BACKType } from '../../constants';
|
|
2
|
-
import { Page } from '../contexts/plp';
|
|
1
|
+
import { PLP_GRID_SCROLL_BACKType, StoreConfigType } from '../../constants';
|
|
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
|
};
|
|
@@ -21,9 +19,11 @@ export type SimilarItem = any;
|
|
|
21
19
|
export type SimilarCallback = (data: SimilarItem[]) => void;
|
|
22
20
|
export type SimilarsOptions = {
|
|
23
21
|
filterTexture?: string[];
|
|
22
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
24
23
|
};
|
|
25
24
|
export type PendingRequest = {
|
|
26
25
|
productId: string;
|
|
27
26
|
callbacks: SimilarCallback[];
|
|
28
27
|
filterTexture?: string[];
|
|
28
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
29
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ADD_TO_CARTType, TEXTURE_IMAGEType, TOGGLE_STYLE_MODIFIERType, Z_INDEX_WARType, NAME_SPLIT_SYMBOLType, OBJECT_FITS_DEFAULTType } from '../../../constants';
|
|
1
|
+
import { ADD_TO_CARTType, TEXTURE_IMAGEType, TOGGLE_STYLE_MODIFIERType, Z_INDEX_WARType, NAME_SPLIT_SYMBOLType, OBJECT_FITS_DEFAULTType, StoreConfigType } from '../../../constants';
|
|
2
2
|
import { CartItemStore } from '../../../contexts/store/cart';
|
|
3
3
|
import { Dispatch, HTMLAttributes, MutableRefObject, ReactNode, SetStateAction, VideoHTMLAttributes } from 'react';
|
|
4
4
|
|
|
@@ -15,6 +15,7 @@ type CONSTANTS_TYPE = {
|
|
|
15
15
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
16
16
|
TOGGLE_STYLE_MODIFIER: TOGGLE_STYLE_MODIFIERType;
|
|
17
17
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
18
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
18
19
|
};
|
|
19
20
|
export interface RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
20
21
|
component?: ReactNode;
|
|
@@ -46,6 +47,7 @@ export interface AddToCartProps {
|
|
|
46
47
|
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
47
48
|
item: CartItem;
|
|
48
49
|
texture?: string;
|
|
50
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
49
51
|
}
|
|
50
52
|
export interface NameProps extends HTMLAttributes<HTMLDivElement> {
|
|
51
53
|
brand?: string;
|
|
@@ -62,11 +64,13 @@ export interface StyleSizeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
62
64
|
productGroupID: string;
|
|
63
65
|
size?: string | null;
|
|
64
66
|
texture?: string;
|
|
67
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
65
68
|
}
|
|
66
69
|
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
67
70
|
item: CartItem;
|
|
68
71
|
thumbnail?: boolean;
|
|
69
72
|
texture?: string;
|
|
73
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
70
74
|
}
|
|
71
75
|
export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
72
76
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
@@ -9,8 +9,10 @@ export interface HelpButtonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
data?: FormatHelpButtonProps;
|
|
10
10
|
ICONS: ICONSType;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export interface HelpButtonWrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
}
|
|
14
|
+
export interface HelpButtonCallToActionProps extends PropsWithChildren {
|
|
15
|
+
}
|
|
14
16
|
export interface HelpButtonBodyDataProps {
|
|
15
17
|
type: HelpButtonContentType;
|
|
16
18
|
id: string;
|
|
@@ -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 = {
|
|
@@ -33,6 +33,7 @@ export interface RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
33
33
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
34
34
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
35
35
|
ICONS: ICONSType;
|
|
36
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
export type Sizes = (typeof SizesExtended)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, MutableRefObject } from 'react';
|
|
2
|
-
import { PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SIZE_ORDERType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, TEXTURE_IMAGEType } from '../../../constants';
|
|
2
|
+
import { PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SIZE_ORDERType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, StoreConfigType, TEXTURE_IMAGEType } from '../../../constants';
|
|
3
3
|
import { HasVariant, ProductType_PDC } from '../../../global/product';
|
|
4
4
|
import { ProductCardProps, RootProps as ProductCard_RootProps } from '../ProductCard';
|
|
5
5
|
import { TagCommercialConsumer } from '../../../cms/ContentTypes/FlagsAndTags';
|
|
@@ -49,5 +49,6 @@ export interface CardProps {
|
|
|
49
49
|
PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
|
|
50
50
|
PLP_SIZE_ORDER: PLP_SIZE_ORDERType;
|
|
51
51
|
TEXTURE_IMAGE?: TEXTURE_IMAGEType;
|
|
52
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
52
53
|
};
|
|
53
54
|
}
|
|
@@ -111,6 +111,7 @@ export type StyleCardProps = {
|
|
|
111
111
|
product: CartItemStore;
|
|
112
112
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
113
113
|
TOGGLE_STYLE_MODIFIER: TOGGLE_STYLE_MODIFIERType;
|
|
114
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
114
115
|
};
|
|
115
116
|
export interface SkuCardProps extends StyleCardProps {
|
|
116
117
|
NAME_SPLIT_SYMBOL: NAME_SPLIT_SYMBOLType;
|
|
@@ -168,6 +169,7 @@ export interface ModalBodyProps extends PropsWithChildren {
|
|
|
168
169
|
TOGGLE_STYLE_MODIFIER: TOGGLE_STYLE_MODIFIERType;
|
|
169
170
|
TIPBAR_CONFIGS: TIPBAR_CONFIGSType;
|
|
170
171
|
PLP_NOT_RESULT: PLP_NOT_RESULTType;
|
|
172
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
171
173
|
}
|
|
172
174
|
export type ModalHeaderProps = {
|
|
173
175
|
ICONS: ICONSType;
|
|
@@ -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,24 @@ 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
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
39
|
+
}
|
|
34
40
|
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
41
|
infinite?: boolean;
|
|
42
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
43
|
+
}
|
|
44
|
+
export interface GridInfiniteProps extends HTMLAttributes<HTMLDivElement> {
|
|
45
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
36
46
|
}
|
|
37
47
|
export interface PageSentinelProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
48
|
page: Page;
|
|
39
49
|
}
|
|
40
50
|
export interface PageCardProps {
|
|
51
|
+
empty?: boolean;
|
|
41
52
|
first?: boolean;
|
|
42
|
-
last?: boolean;
|
|
43
53
|
gap: number;
|
|
44
54
|
index: number;
|
|
45
55
|
isMobile?: boolean;
|
|
@@ -48,6 +58,11 @@ export interface PageCardProps {
|
|
|
48
58
|
page?: Page;
|
|
49
59
|
showVideo?: boolean;
|
|
50
60
|
}
|
|
61
|
+
export interface PageScrollProps {
|
|
62
|
+
count: number;
|
|
63
|
+
page: Page;
|
|
64
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
65
|
+
}
|
|
51
66
|
export interface PageProps {
|
|
52
67
|
count: number;
|
|
53
68
|
gap: number;
|
|
@@ -113,9 +128,11 @@ export interface ProductsProps {
|
|
|
113
128
|
StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
|
|
114
129
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
115
130
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
131
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
116
132
|
}
|
|
117
|
-
export interface PLPRootProps
|
|
133
|
+
export interface PLPRootProps {
|
|
118
134
|
className?: string;
|
|
135
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
119
136
|
}
|
|
120
137
|
export type EmptyProps = {
|
|
121
138
|
className?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { BUY_BUTTON_LABELSType, ICONSType, QUICKSHOPType, TEXTURE_IMAGEType, TIME_ZONEType, TOGGLE_STYLE_MODIFIERType } from '../../../constants';
|
|
1
|
+
import { BUY_BUTTON_LABELSType, ICONSType, QUICKSHOPType, StoreConfigType, TEXTURE_IMAGEType, TIME_ZONEType, TOGGLE_STYLE_MODIFIERType } from '../../../constants';
|
|
2
2
|
import { PDPSizesProps } from '../PDP';
|
|
3
3
|
|
|
4
4
|
export type SimilarsProps = {
|
|
5
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
5
6
|
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
6
7
|
TOGGLE_STYLE_MODIFIER: TOGGLE_STYLE_MODIFIERType;
|
|
7
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
2
|
-
import { ICONSType, ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, SEARCH_MODALType } from '../../../../types/constants';
|
|
2
|
+
import { ICONSType, ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, SEARCH_MODALType, StoreConfigType } from '../../../../types/constants';
|
|
3
3
|
import { SearchContentProps } from '../../../cms/ContentTypes/Search';
|
|
4
4
|
|
|
5
5
|
export interface SearchModalProps extends PropsWithChildren, Pick<SearchContentProps, 'SectionZone'> {
|
|
@@ -10,6 +10,7 @@ export interface SearchModalProps extends PropsWithChildren, Pick<SearchContentP
|
|
|
10
10
|
ICONS: ICONSType;
|
|
11
11
|
ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
|
|
12
12
|
ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
|
|
13
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
13
14
|
};
|
|
14
15
|
className?: string;
|
|
15
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SearchSort } from '../../../data/api/search';
|
|
3
3
|
import { SearchConstantsContextProps } from '../../../contexts/contexts/search';
|
|
4
|
+
import { StoreConfigType } from '../../../constants';
|
|
4
5
|
|
|
5
6
|
export interface ISearchEmpty {
|
|
6
7
|
term?: string;
|
|
@@ -38,7 +39,9 @@ export interface SearchProps {
|
|
|
38
39
|
className?: string;
|
|
39
40
|
searchParams: URLSearchParams;
|
|
40
41
|
CONSTANTS: SearchConstantsContextProps;
|
|
42
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
41
43
|
}
|
|
42
44
|
export type SearchContentProps = {
|
|
43
45
|
className?: string;
|
|
46
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
44
47
|
};
|