@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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchContentProps } from '../../../types/cms/ContentTypes/Search';
|
|
2
2
|
|
|
3
|
-
export declare const SearchContent: ({ SectionZone, name, previewId, }: SearchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const SearchContent: ({ SectionZone, name, storeId, previewId, }: SearchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { StoreConfigType } from '../../../types/constants';
|
|
2
|
+
|
|
1
3
|
type Params = {
|
|
2
4
|
count: number;
|
|
3
5
|
sort: string;
|
|
@@ -10,6 +12,7 @@ type CollectionSearchArgs = {
|
|
|
10
12
|
value: string;
|
|
11
13
|
}[];
|
|
12
14
|
params?: Params;
|
|
15
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
13
16
|
};
|
|
14
17
|
type RecommendationSearchArgs = {
|
|
15
18
|
type: 'recommendationSearch';
|
|
@@ -18,6 +21,7 @@ type RecommendationSearchArgs = {
|
|
|
18
21
|
value: string | undefined;
|
|
19
22
|
}[];
|
|
20
23
|
params?: Params;
|
|
24
|
+
storeId: StoreConfigType['api']['storeId'];
|
|
21
25
|
};
|
|
22
26
|
type ProductsApiArgs = CollectionSearchArgs | RecommendationSearchArgs;
|
|
23
27
|
export declare const productsApi: (args: ProductsApiArgs) => Promise<any>;
|
package/cms/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const clientCMS: {
|
|
|
15
15
|
TipbarScreening: ({ CONSTANTS, data }: import('../types/cms/ContentTypes/Tipbar').TipbarScreeningProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
ImageGrid: (data: import('../types/cms/Sections/ImageGrid').ImageGridSectionType) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
SearchPageScreening: ({ children, data, SectionZone, className, }: import('../types/cms/ContentTypes/Search').SearchPageScrenningProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
SearchContent: ({ SectionZone, name, previewId, }: import('../types/cms/ContentTypes/Search').SearchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
SearchContent: ({ SectionZone, name, storeId, previewId, }: import('../types/cms/ContentTypes/Search').SearchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
NewsletterSection: ({ data: { componentIndex, ...props }, name, CONSTANTS, }: import('../types/cms/Sections/Newsletter').NewsLetterSectionType) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
PDPProductCarousel: ({ data, name, CONSTANTS, }: import('../types/cms/Sections/ProductCarousel').PDPProductCarouselProps) => import("react/jsx-runtime").JSX.Element[] | null;
|
|
21
21
|
ProductCarousel: ({ data, CONSTANTS, searchModal, name }: import('../types/cms/Sections/ProductCarousel').ProductCarouselProps) => import("react/jsx-runtime").JSX.Element[] | null;
|
|
@@ -7,6 +7,6 @@ export declare class Mediator {
|
|
|
7
7
|
publish<T>(event: string, data: T): void;
|
|
8
8
|
}
|
|
9
9
|
declare const GlobalContext: import('react').Context<GlobalContextProps>;
|
|
10
|
-
declare const GlobalProvider: ({ children, headerConfigs, pathname,
|
|
10
|
+
declare const GlobalProvider: ({ children, headerConfigs, pathname, ...props }: GlobalProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare const useGlobalContext: () => GlobalContextProps;
|
|
12
12
|
export { GlobalContext, GlobalProvider, useGlobalContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FilterContextProps, FilterProviderProps } from '../../../types/layout/team-components/Filter';
|
|
2
2
|
|
|
3
3
|
declare const FilterContext: import('react').Context<FilterContextProps>;
|
|
4
|
-
declare const FilterProvider: ({ children, filters,
|
|
4
|
+
declare const FilterProvider: ({ children, filters, ...props }: FilterProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const useFilterContext: () => FilterContextProps;
|
|
6
6
|
export { FilterContext, FilterProvider, useFilterContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLPContextProps, PLPProviderProps } from '../../../types/contexts/contexts/plp';
|
|
2
2
|
|
|
3
3
|
declare const PLPContext: import('react').Context<PLPContextProps>;
|
|
4
|
-
declare const PLPProvider: ({
|
|
4
|
+
declare const PLPProvider: ({ brand, constants, collectionId, children, itemsPerPage, pathname, searchParams, slug, ...props }: PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const usePLPContext: () => PLPContextProps;
|
|
6
6
|
export { PLPContext, PLPProvider, usePLPContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLPInfiniteContextProps, PLPInfiniteProviderProps } from '../../../types/contexts/contexts/plp';
|
|
2
2
|
|
|
3
3
|
declare const PLPInfiniteContext: import('react').Context<PLPInfiniteContextProps>;
|
|
4
|
-
declare const PLPInfiniteProvider: ({ banners, children
|
|
4
|
+
declare const PLPInfiniteProvider: ({ banners, children }: PLPInfiniteProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const usePLPInfiniteContext: () => PLPInfiniteContextProps;
|
|
6
6
|
export { PLPInfiniteContext, PLPInfiniteProvider, usePLPInfiniteContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryFacetsContextProps, QueryFacetsProviderProps } from '../../../types/contexts/contexts/search';
|
|
2
2
|
|
|
3
|
-
declare const QueryFacetsProvider: ({ children, enabled, ...props }: QueryFacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const QueryFacetsProvider: ({ children, enabled, storeId, ...props }: QueryFacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const useQueryFacetsContext: () => QueryFacetsContextProps;
|
|
5
5
|
export { QueryFacetsProvider, useQueryFacetsContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryProductsContextProps, QueryProductsProviderProps } from '../../../types/contexts/contexts/search';
|
|
2
2
|
|
|
3
|
-
declare const QueryProductsProvider: ({ callback, children, forceUpdate, options, state, queryKey, }: QueryProductsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const QueryProductsProvider: ({ callback, children, forceUpdate, storeId, options, state, queryKey, }: QueryProductsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const useQueryProductsContext: () => QueryProductsContextProps;
|
|
5
5
|
export { QueryProductsProvider, useQueryProductsContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchProviderProps, SearchContextProps } from '../../../types/contexts/contexts/search';
|
|
2
2
|
|
|
3
|
-
declare const SearchProvider: ({ children,
|
|
3
|
+
declare const SearchProvider: ({ children, state, collectionId, brand, searchParams, }: SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const useSearchContext: () => SearchContextProps;
|
|
5
5
|
export { SearchProvider, useSearchContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TopSearchesContextProps, TopSearchesProviderProps } from '../../../types/contexts/contexts/search';
|
|
2
2
|
|
|
3
|
-
declare const TopSearchesProvider: ({ children }: TopSearchesProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const TopSearchesProvider: ({ children, storeId }: TopSearchesProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const useTopSearches: () => TopSearchesContextProps;
|
|
5
5
|
export { TopSearchesProvider, useTopSearches };
|
|
@@ -9,7 +9,7 @@ declare const useOperations: () => {
|
|
|
9
9
|
addMarketingData: (orderFormId: string, marketingData: any) => Promise<any>;
|
|
10
10
|
giftItem: (orderFormId: string, id: string, itemIndex: number, remove?: boolean) => Promise<any>;
|
|
11
11
|
emptyCart: (orderFormId: string) => Promise<any>;
|
|
12
|
-
getOrderForm: (orderFormId?: string) => Promise<any>;
|
|
12
|
+
getOrderForm: (orderFormId?: string, priority?: "low" | "high") => Promise<any>;
|
|
13
13
|
insertProfileEmail: (orderFormId: string, email: string) => Promise<any>;
|
|
14
14
|
removeItem: (orderFormId: string, itemsStore: CartItemStore[], productId: string) => Promise<any>;
|
|
15
15
|
shipping: (orderFormId: string, postalCode: string, country: string, index: number, selectedAddresses: SelectedAddress[], deliveryMode?: DeliveryMode | null, setDeliveryWindow?: boolean) => Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UseScrollRestorationInfiniteProps } from '../../types/contexts/hooks';
|
|
2
2
|
|
|
3
|
-
export declare const useScrollRestorationInfinite: ({
|
|
3
|
+
export declare const useScrollRestorationInfinite: ({ load, PLP_GRID_SCROLL_BACK }: UseScrollRestorationInfiniteProps) => void;
|
|
4
4
|
export default useScrollRestorationInfinite;
|
package/contexts/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare const contexts: {
|
|
|
52
52
|
};
|
|
53
53
|
global: {
|
|
54
54
|
hook: () => import('../types/contexts/contexts/global').GlobalContextProps;
|
|
55
|
-
provider: ({ children, headerConfigs, pathname,
|
|
55
|
+
provider: ({ children, headerConfigs, pathname, ...props }: import('../types/contexts/contexts/global').GlobalProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
mediator: typeof Mediator;
|
|
57
57
|
};
|
|
58
58
|
header: {
|
|
@@ -81,39 +81,27 @@ export declare const contexts: {
|
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
plp: {
|
|
84
|
-
provider: ({
|
|
84
|
+
provider: ({ brand, constants, collectionId, children, itemsPerPage, pathname, searchParams, slug, ...props }: import('../types/contexts/contexts/plp').PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
85
|
hook: () => import('../types/contexts/contexts/plp').PLPContextProps;
|
|
86
86
|
};
|
|
87
87
|
plpFilter: {
|
|
88
88
|
hook: () => import('../types/layout/team-components/Filter').FilterContextProps;
|
|
89
|
-
provider: ({ children, filters,
|
|
89
|
+
provider: ({ children, filters, ...props }: import('../types/layout/team-components/Filter').FilterProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
90
90
|
};
|
|
91
91
|
PLPContent: {
|
|
92
92
|
provider: ({ children, data, device, SectionZone, COMMON_PAGE_COLUMN_GAP_PDC, }: import('../types/cms/ContentTypes/PLP').PLPContentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
93
93
|
hook: () => import('../types/cms/ContentTypes/PLP').PLPContentContextProps;
|
|
94
94
|
};
|
|
95
95
|
plpInfinite: {
|
|
96
|
-
provider: ({ banners, children
|
|
96
|
+
provider: ({ banners, children }: import('../types/contexts/contexts/plp').PLPInfiniteProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
97
97
|
hook: () => import('../types/contexts/contexts/plp').PLPInfiniteContextProps;
|
|
98
98
|
};
|
|
99
99
|
pdpdata: {
|
|
100
100
|
provider: ({ children, productData, isKit, PDP_INFO, NAME_SPLIT_SYMBOL, TEXTURE_IMAGE, }: import('../types/contexts/contexts/pdp').PDPDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
101
101
|
};
|
|
102
|
-
searchFacets: {
|
|
103
|
-
hook: () => import('../types/contexts/contexts/search').FacetsContextProps;
|
|
104
|
-
provider: ({ children, forceUpdate, }: import('../types/contexts/contexts/search').FacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
105
|
-
};
|
|
106
|
-
searchProducts: {
|
|
107
|
-
hook: () => import('../types/contexts/contexts/search').ProductsContextProps;
|
|
108
|
-
provider: ({ children, query, forceUpdate, }: import('../types/contexts/contexts/search').ProductsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
109
|
-
};
|
|
110
|
-
searchRoot: {
|
|
111
|
-
hook: () => import('../types/contexts/contexts/search').RootContextProps;
|
|
112
|
-
provider: ({ children, fetch }: import('../types/contexts/contexts/search').RootProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
113
|
-
};
|
|
114
102
|
searchSearch: {
|
|
115
103
|
hook: () => import('../types/contexts/contexts/search').SearchContextProps;
|
|
116
|
-
provider: ({ children,
|
|
104
|
+
provider: ({ children, state, collectionId, brand, searchParams, }: import('../types/contexts/contexts/search').SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
117
105
|
};
|
|
118
106
|
session: {
|
|
119
107
|
hook: () => import('../types/contexts/contexts/session').ISessionContext;
|
package/contexts/store/plp.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScrollPageState } from '../../types/contexts/contexts/plp';
|
|
2
2
|
|
|
3
|
-
export declare const usePLPInfiniteScroll: import('zustand').UseBoundStore<import('zustand').StoreApi<
|
|
3
|
+
export declare const usePLPInfiniteScroll: import('zustand').UseBoundStore<import('zustand').StoreApi<ScrollPageState>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetCMSContentTypeProps } from '../../../../types/data/api/cms';
|
|
2
2
|
|
|
3
|
-
export declare function getCMSContentType({ contentType, documentId, versionId, CMS_PROJECT_NAME, }: GetCMSContentTypeProps): Promise<Response>;
|
|
3
|
+
export declare function getCMSContentType({ contentType, documentId, versionId, storeId, CMS_PROJECT_NAME, }: GetCMSContentTypeProps): Promise<Response>;
|
package/data/api/user/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FetchFunctionsProps } from '
|
|
1
|
+
import { FetchFunctionsProps } from 'libs/multi-lib/src/types/data/api';
|
|
2
2
|
|
|
3
|
-
export declare function getUserData({ apiUrl, extraData, fetchOptions
|
|
3
|
+
export declare function getUserData({ apiUrl, extraData, fetchOptions }: FetchFunctionsProps<any>): Promise<any>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { State } from '../../../types/data/api/search/index';
|
|
2
2
|
import { ProductSearchResultPage } from '../../../types/data/api/search/product';
|
|
3
3
|
import { ProductNode_PDC } from '../../../types/global/product';
|
|
4
|
-
import { PLPBanners, Page
|
|
4
|
+
import { PageState, PLPBanners, Page } from '../../../types/contexts/contexts/plp';
|
|
5
|
+
import { StoreConfigType } from '../../../types/constants';
|
|
5
6
|
|
|
6
7
|
export declare const deepEqual: (a: any, b: any) => boolean;
|
|
7
8
|
export declare const hasStateChangedExceptPage: (prev: State, next: State, excludeKey?: keyof State) => boolean;
|
|
8
|
-
export declare const fetchPage: (payload: State) => Promise<ProductSearchResultPage>;
|
|
9
|
+
export declare const fetchPage: (payload: State, storeId: StoreConfigType["api"]["storeId"]) => Promise<ProductSearchResultPage>;
|
|
9
10
|
export declare const createProduct: () => ProductNode_PDC;
|
|
10
11
|
export declare const getBanners: (banners: PLPBanners, page: number, columns: number, itemsPerPage?: number) => {
|
|
11
12
|
placedBanners: number[];
|
|
@@ -15,21 +16,12 @@ export declare const getPositions: (banners: PLPBanners, page: number, columns:
|
|
|
15
16
|
banners: number[];
|
|
16
17
|
products: number[];
|
|
17
18
|
};
|
|
18
|
-
export declare const createPages: (page: number,
|
|
19
|
+
export declare const createPages: (page: number, initial?: boolean) => {
|
|
19
20
|
loading: boolean;
|
|
20
21
|
page: number;
|
|
21
|
-
pagination: {
|
|
22
|
-
nextPage: boolean;
|
|
23
|
-
previousPage: boolean;
|
|
24
|
-
startCursor: string;
|
|
25
|
-
endCursor: string;
|
|
26
|
-
count: number;
|
|
27
|
-
total: number;
|
|
28
|
-
};
|
|
29
|
-
products: ProductNode_PDC[];
|
|
30
22
|
}[];
|
|
31
23
|
export declare const createPage: (pages: Page[], newPage: number) => Page[];
|
|
32
|
-
export declare const createPagination: () => {
|
|
24
|
+
export declare const createPagination: (page?: number, itemsPerPage?: number) => {
|
|
33
25
|
nextPage: boolean;
|
|
34
26
|
previousPage: boolean;
|
|
35
27
|
startCursor: string;
|
|
@@ -37,7 +29,7 @@ export declare const createPagination: () => {
|
|
|
37
29
|
count: number;
|
|
38
30
|
total: number;
|
|
39
31
|
};
|
|
40
|
-
export declare const getVisibleBanners: (pages: Page[], banners: PLPBanners, products:
|
|
32
|
+
export declare const getVisibleBanners: (pages: Page[], banners: PLPBanners, products: PageState["products"], bannersPositions: PageState["banners"], count: number) => ({
|
|
41
33
|
columns: number;
|
|
42
34
|
position_grid: number;
|
|
43
35
|
} & {
|
|
@@ -46,3 +46,4 @@ export declare const filterNonRootFacets: (selectedFacets: SelectedFacet[], base
|
|
|
46
46
|
export declare const addDefaultFacets: (facets: SelectedFacet[], channel: Channel, policy?: string, region?: string) => SelectedFacet[];
|
|
47
47
|
export declare const getRegionFacet: (channel: Channel, region?: string) => StoreSelectedFacet | null;
|
|
48
48
|
export declare const getPolicyFacet: (channel: Channel, key?: string) => StoreSelectedFacet | null;
|
|
49
|
+
export declare const getFacetsActiveSearchParams: (searchParams: URLSearchParams) => SelectedFacet[];
|
|
@@ -7,6 +7,10 @@ declare const searchHelpers: {
|
|
|
7
7
|
value: string;
|
|
8
8
|
key: string;
|
|
9
9
|
}[];
|
|
10
|
+
selectedFacets: (facets: string[]) => {
|
|
11
|
+
key: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
10
14
|
filterNonCategorySelected: (facets: import('../../../types/data/api/search/facets').Facet[], base?: string | null) => import('../../../types/data/api/search/facets').Facet<import('../../../types/data/api/search/facets').FacetValueBoolean | import('../../../types/data/api/search/facets').FacetValueRange>[];
|
|
11
15
|
};
|
|
12
16
|
export default searchHelpers;
|
|
@@ -268,7 +268,19 @@ export declare const createPages: ({ page, count, ...props }: SearchCreatePages)
|
|
|
268
268
|
};
|
|
269
269
|
products: ProductNode_PDC[];
|
|
270
270
|
}[];
|
|
271
|
-
export declare const createPage: (pages: Page[], newPage: number) => Page
|
|
271
|
+
export declare const createPage: (pages: Page[], newPage: number) => (Page | {
|
|
272
|
+
loading: boolean;
|
|
273
|
+
page: number;
|
|
274
|
+
pagination: {
|
|
275
|
+
nextPage: boolean;
|
|
276
|
+
previousPage: boolean;
|
|
277
|
+
startCursor: string;
|
|
278
|
+
endCursor: string;
|
|
279
|
+
count: number;
|
|
280
|
+
total: number;
|
|
281
|
+
};
|
|
282
|
+
products: never[];
|
|
283
|
+
})[];
|
|
272
284
|
export declare const createPagination: () => {
|
|
273
285
|
nextPage: boolean;
|
|
274
286
|
previousPage: boolean;
|
|
@@ -2,6 +2,7 @@ import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.share
|
|
|
2
2
|
import { State } from '../../../types/data/api/search';
|
|
3
3
|
|
|
4
4
|
export declare const parseSearchState: ({ pathname, searchParams }: URL, facets: string[]) => State;
|
|
5
|
+
export declare const parsePLPState: (pathname: string, { searchParams }: URL, facets: string[]) => State;
|
|
5
6
|
export declare const createCategorySlug: (slug: string[] | string, facets: string[]) => string;
|
|
6
7
|
export declare const convertSearchParams: (searchParams: {
|
|
7
8
|
[key: string]: string | string[] | undefined;
|
package/data/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as cart from
|
|
2
|
-
import * as events from
|
|
3
|
-
import * as plp from
|
|
4
|
-
import * as product from
|
|
5
|
-
import * as
|
|
6
|
-
|
|
1
|
+
import * as cart from "./helpers/cart";
|
|
2
|
+
import * as events from "./helpers/events";
|
|
3
|
+
import * as plp from "./helpers/plp";
|
|
4
|
+
import * as product from "./helpers/product";
|
|
5
|
+
import * as search from "./helpers/search";
|
|
6
|
+
import * as utils from "./helpers/utils";
|
|
7
7
|
export declare const data: {
|
|
8
8
|
helpers: {
|
|
9
9
|
cart: typeof cart;
|
|
@@ -11,5 +11,6 @@ export declare const data: {
|
|
|
11
11
|
plp: typeof plp;
|
|
12
12
|
product: typeof product;
|
|
13
13
|
utils: typeof utils;
|
|
14
|
+
search: typeof search;
|
|
14
15
|
};
|
|
15
16
|
};
|