@soma-vertical-web/multi-lib 1.0.19 → 1.0.20

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.
Files changed (36) hide show
  1. package/contexts/contexts/plp/FilterContext.d.ts +1 -1
  2. package/contexts/contexts/plp/PLPContext.d.ts +1 -1
  3. package/contexts/contexts/search/Facets.d.ts +1 -1
  4. package/contexts/contexts/search/Search.d.ts +1 -1
  5. package/contexts/hooks/useSimilars.d.ts +7 -0
  6. package/contexts/index.d.ts +4 -4
  7. package/data/helpers/plp/index.d.ts +2 -2
  8. package/data/helpers/search/facets.d.ts +0 -1
  9. package/data/helpers/search/index.d.ts +0 -4
  10. package/data/helpers/search/search.d.ts +0 -1
  11. package/data/index.d.ts +0 -2
  12. package/index-CpUjW-m9.mjs +1877 -0
  13. package/index-xWhZ_YcF.js +4 -0
  14. package/index.js +17 -17
  15. package/index.mjs +8437 -10416
  16. package/index2.js +1 -1
  17. package/index2.mjs +613 -685
  18. package/layout/index.d.ts +3 -3
  19. package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
  20. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  21. package/layout/template/PDC/PDC.d.ts +1 -1
  22. package/layout/template/PDC/index.d.ts +2 -2
  23. package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
  24. package/layout/template/PDP/index.d.ts +2 -2
  25. package/package.json +1 -1
  26. package/server.d.ts +1 -7
  27. package/style.css +1 -1
  28. package/types/cms/Sections/SectionZone/index.d.ts +1 -0
  29. package/types/contexts/contexts/plp.d.ts +9 -42
  30. package/types/contexts/contexts/search.d.ts +15 -34
  31. package/types/contexts/hooks/index.d.ts +12 -0
  32. package/types/layout/team-components/PLPNavigation/index.d.ts +2 -0
  33. package/types/layout/team-components/ProductCard/index.d.ts +1 -0
  34. package/types/layout/team-components/ProductList/index.d.ts +2 -1
  35. package/types/layout/templates/PDP/index.d.ts +1 -2
  36. package/types/layout/templates/PLP/index.d.ts +3 -2
@@ -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, ...props }: FilterProviderProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const FilterProvider: ({ children, filters, PLP_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: ({ brand, constants, collectionId, children, itemsPerPage, pathname, searchParams, slug, ...props }: PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const PLPProvider: ({ children, slug, searchParams, collectionId, brand, itemsPerPage, PLP_SORT_DEFAULT }: PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
5
5
  declare const usePLPContext: () => PLPContextProps;
6
6
  export { PLPContext, PLPProvider, usePLPContext };
@@ -1,5 +1,5 @@
1
1
  import { FacetsContextProps, FacetsProviderProps } from '../../../types/contexts/contexts/search';
2
2
 
3
- declare const FacetsProvider: ({ children, searchParams, PLP_SORT_DEFAULT }: FacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const FacetsProvider: ({ children, forceUpdate, }: FacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
4
4
  declare const useFacetsContext: () => FacetsContextProps;
5
5
  export { FacetsProvider, useFacetsContext };
@@ -1,5 +1,5 @@
1
1
  import { SearchProviderProps, SearchContextProps } from '../../../types/contexts/contexts/search';
2
2
 
3
- declare const SearchProvider: ({ children, state, collectionId, brand, searchParams, }: SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const SearchProvider: ({ children, sort, state, count, collectionId, brand, searchParams, ITEMS_PER_PAGE }: SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
4
4
  declare const useSearchContext: () => SearchContextProps;
5
5
  export { SearchProvider, useSearchContext };
@@ -0,0 +1,7 @@
1
+ import { SimilarsOptions } from '../../types/contexts/hooks';
2
+
3
+ export declare function useSimilars(productId: string | undefined, options: SimilarsOptions): {
4
+ items: any[];
5
+ loadSimilars: () => void;
6
+ clearCache: () => void;
7
+ };
@@ -81,12 +81,12 @@ export declare const contexts: {
81
81
  };
82
82
  };
83
83
  plp: {
84
- provider: ({ brand, constants, collectionId, children, itemsPerPage, pathname, searchParams, slug, ...props }: import('../types/contexts/contexts/plp').PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
84
+ provider: ({ children, slug, searchParams, collectionId, brand, itemsPerPage, PLP_SORT_DEFAULT }: 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, ...props }: import('../types/layout/team-components/Filter').FilterProviderProps) => import("react/jsx-runtime").JSX.Element;
89
+ provider: ({ children, filters, PLP_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;
@@ -101,7 +101,7 @@ export declare const contexts: {
101
101
  };
102
102
  searchFacets: {
103
103
  hook: () => import('../types/contexts/contexts/search').FacetsContextProps;
104
- provider: ({ children, searchParams, PLP_SORT_DEFAULT }: import('../types/contexts/contexts/search').FacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
104
+ provider: ({ children, forceUpdate, }: import('../types/contexts/contexts/search').FacetsProviderProps) => import("react/jsx-runtime").JSX.Element;
105
105
  };
106
106
  searchProducts: {
107
107
  hook: () => import('../types/contexts/contexts/search').ProductsContextProps;
@@ -113,7 +113,7 @@ export declare const contexts: {
113
113
  };
114
114
  searchSearch: {
115
115
  hook: () => import('../types/contexts/contexts/search').SearchContextProps;
116
- provider: ({ children, state, collectionId, brand, searchParams, }: import('../types/contexts/contexts/search').SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
116
+ provider: ({ children, sort, state, count, collectionId, brand, searchParams, ITEMS_PER_PAGE }: import('../types/contexts/contexts/search').SearchProviderProps) => import("react/jsx-runtime").JSX.Element;
117
117
  };
118
118
  session: {
119
119
  hook: () => import('../types/contexts/contexts/session').ISessionContext;
@@ -1,7 +1,7 @@
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 { PageState, PLPBanners, Page } from '../../../types/contexts/contexts/plp';
4
+ import { PLPBanners, Page, PLPInfiniteContextProps } from '../../../types/contexts/contexts/plp';
5
5
 
6
6
  export declare const deepEqual: (a: any, b: any) => boolean;
7
7
  export declare const hasStateChangedExceptPage: (prev: State, next: State, excludeKey?: keyof State) => boolean;
@@ -37,7 +37,7 @@ export declare const createPagination: () => {
37
37
  count: number;
38
38
  total: number;
39
39
  };
40
- export declare const getVisibleBanners: (pages: Page[], banners: PLPBanners, products: PageState["products"], bannersPositions: PageState["banners"], count: number) => ({
40
+ export declare const getVisibleBanners: (pages: Page[], banners: PLPBanners, products: PLPInfiniteContextProps["products"], bannersPositions: PLPInfiniteContextProps["banners"], count: number) => ({
41
41
  columns: number;
42
42
  position_grid: number;
43
43
  } & {
@@ -46,4 +46,3 @@ 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,10 +7,6 @@ declare const searchHelpers: {
7
7
  value: string;
8
8
  key: string;
9
9
  }[];
10
- selectedFacets: (facets: string[]) => {
11
- key: string;
12
- value: string;
13
- }[];
14
10
  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>[];
15
11
  };
16
12
  export default searchHelpers;
@@ -2,7 +2,6 @@ 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;
6
5
  export declare const createCategorySlug: (slug: string[] | string, facets: string[]) => string;
7
6
  export declare const convertSearchParams: (searchParams: {
8
7
  [key: string]: string | string[] | undefined;
package/data/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import * as cart from "./helpers/cart";
2
2
  import * as events from "./helpers/events";
3
3
  import * as plp from "./helpers/plp";
4
4
  import * as product from "./helpers/product";
5
- import * as search from "./helpers/search";
6
5
  import * as utils from "./helpers/utils";
7
6
  export declare const data: {
8
7
  helpers: {
@@ -11,6 +10,5 @@ export declare const data: {
11
10
  plp: typeof plp;
12
11
  product: typeof product;
13
12
  utils: typeof utils;
14
- search: typeof search;
15
13
  };
16
14
  };