@soma-vertical-web/multi-lib 0.0.63 → 0.0.66

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 (99) hide show
  1. package/cms/Sections/EmbedLive/Component.d.ts +4 -0
  2. package/cms/Sections/ProductCarousel/Composite/CommonShelf.d.ts +4 -0
  3. package/cms/Sections/ProductCarousel/Composite/RecommendationShelf.d.ts +4 -0
  4. package/cms/Sections/ProductCarousel/ProductCarousel.d.ts +4 -0
  5. package/cms/Sections/ProductCarousel/request.d.ts +24 -0
  6. package/cms/index.d.ts +3 -0
  7. package/contexts/contexts/plp/PLPConstants.d.ts +6 -0
  8. package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
  9. package/contexts/contexts/search/Constants.d.ts +6 -0
  10. package/contexts/contexts/search/Facets.d.ts +1 -1
  11. package/contexts/contexts/search/Products.d.ts +1 -1
  12. package/contexts/contexts/search/Search.d.ts +1 -1
  13. package/contexts/hooks/useScrollRestoration.d.ts +3 -0
  14. package/contexts/hooks/useScrollRestorationInfinite.d.ts +4 -0
  15. package/contexts/index.d.ts +4 -4
  16. package/data/helpers/search/search.d.ts +2 -0
  17. package/index-BBxYNFkz.mjs +416 -0
  18. package/index-CiMxj6Pg.mjs +412 -0
  19. package/index-CwBIv223.js +1 -0
  20. package/index-DKnolQoT.mjs +412 -0
  21. package/index.js +21 -21
  22. package/index.mjs +9059 -7695
  23. package/index2.js +1 -1
  24. package/index2.mjs +97 -94
  25. package/layout/index.d.ts +54 -8
  26. package/layout/team-component/PLPNavigation/Composite/BreadCrumb.d.ts +1 -3
  27. package/layout/team-component/PLPNavigation/Composite/Content.d.ts +1 -1
  28. package/layout/team-component/PLPNavigation/Composite/Filters.d.ts +1 -3
  29. package/layout/team-component/PLPNavigation/Composite/Root.d.ts +2 -2
  30. package/layout/team-component/PLPNavigation/Composite/Selected/Item.d.ts +1 -1
  31. package/layout/team-component/PLPNavigation/Composite/Selected/Selected.d.ts +1 -1
  32. package/layout/team-component/PLPNavigation/Composite/Selected/interfaces.d.ts +1 -7
  33. package/layout/team-component/PLPNavigation/PLPNavigation.d.ts +6 -6
  34. package/layout/team-component/Sort/Sort.d.ts +1 -1
  35. package/layout/template/PDC/Composite/Empty/Empty.d.ts +7 -0
  36. package/layout/template/PDC/Composite/Empty/index.d.ts +1 -0
  37. package/layout/template/PDC/Composite/Filters/Filters.d.ts +5 -0
  38. package/layout/template/PDC/Composite/Filters/helpers.d.ts +4 -0
  39. package/layout/template/PDC/Composite/Filters/index.d.ts +1 -0
  40. package/layout/template/PDC/Composite/Grid/Banners.d.ts +7 -0
  41. package/layout/template/PDC/Composite/Grid/Grid.d.ts +7 -0
  42. package/layout/template/PDC/Composite/Grid/NavigationTotal.d.ts +7 -0
  43. package/layout/template/PDC/Composite/Grid/index.d.ts +1 -0
  44. package/layout/template/PDC/Composite/InfiniteScroller/Banners/Banners.d.ts +7 -0
  45. package/layout/template/PDC/Composite/InfiniteScroller/Banners/index.d.ts +1 -0
  46. package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +5 -0
  47. package/layout/template/PDC/Composite/InfiniteScroller/Loading/Loading.d.ts +7 -0
  48. package/layout/template/PDC/Composite/InfiniteScroller/Loading/index.d.ts +1 -0
  49. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Anchor.d.ts +7 -0
  50. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Card.d.ts +7 -0
  51. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Loader.d.ts +9 -0
  52. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/NextPage.d.ts +7 -0
  53. package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +7 -0
  54. package/layout/template/PDC/Composite/InfiniteScroller/Page/index.d.ts +21 -0
  55. package/layout/template/PDC/Composite/InfiniteScroller/index.d.ts +1 -0
  56. package/layout/template/PDC/Composite/Navigation/Navigation.d.ts +5 -0
  57. package/layout/template/PDC/Composite/Navigation/index.d.ts +1 -0
  58. package/layout/template/PDC/Composite/Notification/Notification.d.ts +7 -0
  59. package/layout/template/PDC/Composite/Notification/index.d.ts +1 -0
  60. package/layout/template/PDC/Composite/Pagination/Arrow/Arrow.d.ts +7 -0
  61. package/layout/template/PDC/Composite/Pagination/Arrow/index.d.ts +1 -0
  62. package/layout/template/PDC/Composite/Pagination/Arrow/interfaces.d.ts +8 -0
  63. package/layout/template/PDC/Composite/Pagination/Layout/Layout.d.ts +7 -0
  64. package/layout/template/PDC/Composite/Pagination/Layout/index.d.ts +1 -0
  65. package/layout/template/PDC/Composite/Pagination/PageEllipses/PageEllipses.d.ts +7 -0
  66. package/layout/template/PDC/Composite/Pagination/PageEllipses/index.d.ts +1 -0
  67. package/layout/template/PDC/Composite/Pagination/PageEllipses/interfaces.d.ts +10 -0
  68. package/layout/template/PDC/Composite/Pagination/Pages/Pages.d.ts +7 -0
  69. package/layout/template/PDC/Composite/Pagination/Pages/index.d.ts +1 -0
  70. package/layout/template/PDC/Composite/Pagination/Pages/interfaces.d.ts +7 -0
  71. package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +7 -0
  72. package/layout/template/PDC/Composite/Pagination/helpers.d.ts +11 -0
  73. package/layout/template/PDC/Composite/Pagination/index.d.ts +1 -0
  74. package/layout/template/PDC/Composite/Products/Products.d.ts +7 -0
  75. package/layout/template/PDC/Composite/Products/index.d.ts +1 -0
  76. package/layout/template/PDC/Composite/Spinner/index.d.ts +7 -0
  77. package/layout/template/PDC/PDC.d.ts +7 -0
  78. package/layout/template/PDC/index.d.ts +39 -0
  79. package/layout/template/SearchResult/Composite/Empty.d.ts +7 -0
  80. package/layout/template/SearchResult/Composite/Grid.d.ts +7 -0
  81. package/layout/template/SearchResult/Composite/GridHeader.d.ts +3 -0
  82. package/layout/template/SearchResult/Composite/Loading.d.ts +7 -0
  83. package/layout/template/SearchResult/Composite/Sort.d.ts +4 -0
  84. package/layout/template/SearchResult/SearchContent.d.ts +4 -0
  85. package/layout/template/SearchResult/SearchResult.d.ts +7 -0
  86. package/layout/template/SearchResult/index.d.ts +1 -0
  87. package/package.json +1 -1
  88. package/style.css +1 -1
  89. package/types/cms/ContentTypes/Search/index.d.ts +2 -2
  90. package/types/cms/Sections/EmbedLive/index.d.ts +13 -0
  91. package/types/cms/Sections/ProductCarousel/index.d.ts +36 -2
  92. package/types/constants.d.ts +41 -1
  93. package/types/contexts/contexts/plp.d.ts +38 -7
  94. package/types/contexts/contexts/search.d.ts +18 -16
  95. package/types/contexts/hooks/index.d.ts +12 -0
  96. package/types/layout/team-components/PLPNavigation/index.d.ts +3 -14
  97. package/types/layout/team-components/Sort/index.d.ts +2 -5
  98. package/types/layout/templates/PLP/index.d.ts +122 -3
  99. package/types/layout/templates/SearchResult/index.d.ts +44 -0
@@ -1,4 +1,5 @@
1
1
  import { PDPShelfType } from '../../../../constants';
2
+ import { BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PLP_SORT_DEFAULTType, 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
3
  import { BuyPackageProductCardProps, CarouselController, CarouselPagination } from '../../../layout/team-components/BuyPackage';
3
4
  import { ProductNode } from '../../../layout/team-components/ProductCard';
4
5
  import { ISectionResponseBase } from '../../Factories';
@@ -25,11 +26,34 @@ export interface ICollectionSearch {
25
26
  }[];
26
27
  sort?: string;
27
28
  }
28
- export interface IRecomendationShelf {
29
+ export interface ConstantsType {
30
+ CONSTANTS: {
31
+ BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
32
+ BUY_PACKAGE: BUY_PACKAGEType;
33
+ FREIGHT_CALCULATION: FREIGHT_CALCULATIONType;
34
+ ICONS: ICONSType;
35
+ ITEMS_DEFAULT_SORT: PLP_SORT_DEFAULTType;
36
+ MAIN_IMAGE: MAIN_IMAGEType;
37
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
38
+ PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
39
+ PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
40
+ PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
41
+ PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
42
+ PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
43
+ PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
44
+ PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
45
+ SECOND_IMAGE: SECOND_IMAGEType;
46
+ TEXTURE_IMAGE: TEXTURE_IMAGEType;
47
+ Z_INDEX_WAR: Z_INDEX_WARType;
48
+ StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
49
+ };
50
+ WishListToggle: React.ComponentType<any>;
51
+ }
52
+ export interface IRecomendationShelf extends ConstantsType {
29
53
  recommendationSearch?: IRecomendationSearch;
30
54
  title?: string;
31
55
  }
32
- export interface ICommonShelf {
56
+ export interface ICommonShelf extends ConstantsType {
33
57
  collectionSearch?: ICollectionSearch;
34
58
  title?: string;
35
59
  }
@@ -49,6 +73,11 @@ export interface ProductCarouselSectionType extends ISectionResponseBase {
49
73
  }[];
50
74
  };
51
75
  }
76
+ export interface ProductCarouselProps {
77
+ data: ProductCarouselSectionType;
78
+ CONSTANTS: ConstantsType['CONSTANTS'];
79
+ WishListToggle: ConstantsType['WishListToggle'];
80
+ }
52
81
  export interface PDPProductCarouselSectionType extends ISectionResponseBase {
53
82
  data: {
54
83
  config: {
@@ -62,6 +91,11 @@ export interface PDPProductCarouselSectionType extends ISectionResponseBase {
62
91
  }[];
63
92
  };
64
93
  }
94
+ export interface PDPProductCarouselProps {
95
+ data: PDPProductCarouselSectionType;
96
+ CONSTANTS: ConstantsType['CONSTANTS'];
97
+ WishListToggle: ConstantsType['WishListToggle'];
98
+ }
65
99
  export interface ProductShelfProps {
66
100
  products: ProductNode[];
67
101
  title?: string;
@@ -48,7 +48,9 @@ export type FREIGHT_CALCULATIONType = {
48
48
  };
49
49
  };
50
50
  export type ICONSType = Record<string, string>;
51
+ export type ITEMS_DEFAULT_SORTType = PLP_SORT_DEFAULTType;
51
52
  export type ITEMS_PER_PAGEType = number;
53
+ export type ITEMS_PER_SECTIONType = number;
52
54
  export type LEGAL_INFORMATION_TEXTType = string;
53
55
  export type MAIN_IMAGEType = string;
54
56
  export type MENU_MOB_BTN_SIDEType = 'left' | 'right';
@@ -209,6 +211,22 @@ export type PRODUCT_IMAGE_DIMENSIONSType = {
209
211
  export type QUICKSHOPType = {
210
212
  title: string;
211
213
  };
214
+ export type SEARCH_PAGE_ITEM_THRESHOLDType = number;
215
+ export type SEARCH_RESULTType = {
216
+ EMPTY: {
217
+ ALL_TERMS: string;
218
+ ALL_TERMS_LABEL: string;
219
+ NOT_FOUND: string;
220
+ NOT_FOUND_P: string;
221
+ };
222
+ SEARCH: {
223
+ SEARCHING: string;
224
+ SEARCHED: string;
225
+ SEARCHED_P_START: string;
226
+ SEARCHED_P_END: string;
227
+ };
228
+ };
229
+ export type SEARCH_TOTAL_PORTAL_IDType = string;
212
230
  export type SECOND_IMAGEType = string;
213
231
  export type MEASUREMENTS_SIZESType = {
214
232
  bannerImage: string;
@@ -232,7 +250,29 @@ export type TIPBAR_CONFIGSType = {
232
250
  coupon_cart_empty_message: string;
233
251
  };
234
252
  export type TOGGLE_STYLE_MODIFIERType = React.CSSProperties;
235
- export type Z_INDEX_WARType = Record<string, number>;
253
+ export type VARIANT_PAGINATIONType = {
254
+ active: VariantsExtended;
255
+ default: VariantsExtended;
256
+ };
257
+ export type Z_INDEX_WARType = {
258
+ menu_mobile_navigation_bar: number;
259
+ plp_navigation: number;
260
+ product_card_header: number;
261
+ fixed_buttons: number;
262
+ pdp_bottom_navigation: number;
263
+ header: number;
264
+ header_desktop: number;
265
+ user_menu: number;
266
+ user_menu_mobile: number;
267
+ menu_desktop: number;
268
+ snackbar: number;
269
+ add_to_cart_feedback: number;
270
+ pdp_image_zoom: number;
271
+ minicart: number;
272
+ header_mobile: number;
273
+ menu_mobile: number;
274
+ modal: number;
275
+ };
236
276
  export type StoreConfigType = {
237
277
  checkoutUrl: string;
238
278
  secureSubdomain: string;
@@ -3,9 +3,7 @@ import { ProductSearchResultPage } from '../../data/api/search/product';
3
3
  import { State } from '../../data/api/search';
4
4
  import { BannerType } from '../../cms/Sections/Banner';
5
5
  import { HasVariant, ProductType_PDC } from '../../global/product';
6
- import { ReadonlyURLSearchParams } from 'next/navigation';
7
- import { PLPSearchParamsType } from '../../layout/templates/PLP';
8
- import { PLP_SORT_DEFAULTType } from '../../constants';
6
+ import { BUY_BUTTON_LABELSType, ICONSType, ITEMS_DEFAULT_SORTType, ITEMS_PER_PAGEType, ITEMS_PER_SECTIONType, MAIN_IMAGEType, NEWSLETTER_CONFIGSType, NOTIFY_INFOType, PDC_NAVIGATIONType, PLP_FILTERS_COLORSType, PLP_FILTERS_EMPTYType, PLP_FILTERS_TITLEType, PLP_FILTERSType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_NOT_RESULTType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PLP_SIZE_ORDERType, PLP_SORT_DEFAULTType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SEARCH_PAGE_ITEM_THRESHOLDType, SEARCH_TOTAL_PORTAL_IDType, SECOND_IMAGEType, StoreConfigType, TEXTURE_IMAGEType, VARIANT_PAGINATIONType, Z_INDEX_WARType } from '../../constants';
9
7
 
10
8
  export type PLPBanners = ({
11
9
  columns: number;
@@ -49,9 +47,6 @@ export interface PLPInfiniteContextProps extends PropsWithChildren<Omit<PageStat
49
47
  }
50
48
  export interface PLPInfiniteProviderProps extends PropsWithChildren {
51
49
  banners: PLPBanners;
52
- itemsPerPage?: number;
53
- searchParams?: ReadonlyURLSearchParams;
54
- Notification: React.ComponentType<any>;
55
50
  }
56
51
  export interface PLPContextProps {
57
52
  openFilters: boolean;
@@ -60,8 +55,44 @@ export interface PLPContextProps {
60
55
  export interface PLPProviderProps extends PropsWithChildren {
61
56
  slug: string[] | string;
62
57
  PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
63
- searchParams?: PLPSearchParamsType;
58
+ searchParams?: URLSearchParams;
64
59
  collectionId?: number | null;
65
60
  itemsPerPage?: number;
66
61
  brand?: string | null;
67
62
  }
63
+ export interface PLPConstantsProviderProps extends PropsWithChildren {
64
+ BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
65
+ ICONS: ICONSType;
66
+ ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
67
+ ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
68
+ ITEMS_PER_SECTION: ITEMS_PER_SECTIONType;
69
+ MAIN_IMAGE: MAIN_IMAGEType;
70
+ NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGSType;
71
+ NOTIFY_INFO: NOTIFY_INFOType;
72
+ PDC_NAVIGATION: PDC_NAVIGATIONType;
73
+ PLP_FILTERS: PLP_FILTERSType;
74
+ PLP_FILTERS_COLORS: PLP_FILTERS_COLORSType;
75
+ PLP_FILTERS_EMPTY: PLP_FILTERS_EMPTYType;
76
+ PLP_FILTERS_TITLE: PLP_FILTERS_TITLEType;
77
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
78
+ PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
79
+ PLP_NOT_RESULT: PLP_NOT_RESULTType;
80
+ PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
81
+ PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
82
+ PLP_SIZE_ORDER: PLP_SIZE_ORDERType;
83
+ PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
84
+ PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
85
+ PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
86
+ PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
87
+ PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
88
+ SEARCH_PAGE_ITEM_THRESHOLD: SEARCH_PAGE_ITEM_THRESHOLDType;
89
+ SEARCH_TOTAL_PORTAL_ID: SEARCH_TOTAL_PORTAL_IDType;
90
+ SECOND_IMAGE: SECOND_IMAGEType;
91
+ TEXTURE_IMAGE: TEXTURE_IMAGEType;
92
+ VARIANT_PAGINATION: VARIANT_PAGINATIONType;
93
+ Z_INDEX_WAR: Z_INDEX_WARType;
94
+ StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
95
+ WishListToggle: React.ComponentType<any>;
96
+ searchParams: URLSearchParams;
97
+ }
98
+ export type PLPConstantsContextProps = Omit<PLPConstantsProviderProps, 'children'>;
@@ -2,8 +2,9 @@ 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
4
  import { Facet, SelectedFacet } from '../../data/api/search/facets';
5
- import { ITEMS_PER_PAGEType, PLP_FILTERS_SORT_OPTIONtype, PLP_SORT_DEFAULTType } from '../../constants';
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
6
  import { BreadCrumbItemLinkProps } from '../../layout/team-components/PLPNavigation';
7
+ import { ProductsProps } from '../../layout/templates/PLP';
7
8
 
8
9
  export interface FacetsContextProps {
9
10
  breadcrumb: BreadCrumbItemLinkProps[];
@@ -11,19 +12,14 @@ export interface FacetsContextProps {
11
12
  facets: Facet[];
12
13
  isLoading: boolean;
13
14
  selectedFacets: SelectedFacet[];
14
- searchParams: FacetsProviderProps['searchParams'];
15
15
  onToggleFacet(value: SelectedFacet): void;
16
16
  onSort(sort: PLP_FILTERS_SORT_OPTIONtype): void;
17
17
  }
18
- export interface FacetsProviderProps extends PropsWithChildren, Pick<ProductsProviderProps, 'state' | 'forceUpdate'> {
19
- searchParams: {
20
- [key: string]: string | string[] | undefined;
21
- };
22
- PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
18
+ export interface FacetsProviderProps extends PropsWithChildren {
19
+ forceUpdate?: boolean;
23
20
  }
24
- export interface FacetsProviderContentProps extends FacetsProviderProps {
21
+ export interface FacetsProviderContentProps extends Omit<FacetsProviderProps, 'forceUpdate'> {
25
22
  selectedFacets: SelectedFacet[];
26
- PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
27
23
  }
28
24
  export interface ProductsContextProps extends ProductSearchResultPage {
29
25
  isLoading: boolean;
@@ -38,24 +34,21 @@ export interface SuggestedTermsProviderProps extends PropsWithChildren {
38
34
  term?: string;
39
35
  }
40
36
  export interface ProductsProviderProps extends PropsWithChildren {
41
- state?: State;
42
37
  query?: string;
43
- selectedFacets?: SelectedFacet[];
44
38
  forceUpdate?: boolean;
45
39
  }
46
- export interface SearchContextProps extends Pick<SearchProviderProps, 'sort'> {
40
+ export interface SearchContextProps extends Pick<SearchProviderProps, 'sort' | 'searchParams'> {
47
41
  count: number;
48
42
  state: State;
49
43
  }
50
44
  export interface SearchProviderProps extends PropsWithChildren {
51
- sort?: string;
45
+ searchParams: URLSearchParams;
52
46
  state: State;
47
+ sort?: string;
53
48
  collectionId?: number | null;
54
49
  brand?: string | null;
55
50
  count?: number;
56
- CONSTANTS: {
57
- ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
58
- };
51
+ ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
59
52
  }
60
53
  export interface SearchItem {
61
54
  term: string;
@@ -80,3 +73,12 @@ export interface SearchStore extends Pick<RootContextProps, 'data'> {
80
73
  isError?: boolean;
81
74
  fetchData: (fetcher: () => Promise<Response>) => Promise<void>;
82
75
  }
76
+ export interface SearchConstantsProviderProps extends PropsWithChildren, Omit<ProductsProps, 'items' | 'isMobile'> {
77
+ ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
78
+ ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
79
+ ITEMS_PER_SECTION: ITEMS_PER_SECTIONType;
80
+ SEARCH_PAGE_ITEM_THRESHOLD: SEARCH_PAGE_ITEM_THRESHOLDType;
81
+ SEARCH_RESULT: SEARCH_RESULTType;
82
+ VARIANT_PAGINATION: VARIANT_PAGINATIONType;
83
+ }
84
+ export type SearchConstantsContextProps = Omit<SearchConstantsProviderProps, 'children'>;
@@ -1,3 +1,6 @@
1
+ import { PLP_GRID_SCROLL_BACKType } from '../../constants';
2
+ import { Page } from '../contexts/plp';
3
+
1
4
  export interface UseBackPDCProps {
2
5
  gridScrollBack?: {
3
6
  refer: string;
@@ -5,3 +8,12 @@ export interface UseBackPDCProps {
5
8
  };
6
9
  }
7
10
  export type FetchPriority = 'auto' | 'high' | 'low';
11
+ export type UseScrollRestorationProps = {
12
+ productCount: number;
13
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
14
+ };
15
+ export type UseScrollRestorationInfiniteProps = {
16
+ pages: Page[];
17
+ load: boolean;
18
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
19
+ };
@@ -1,8 +1,7 @@
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, PDC_NAVIGATIONType } from '../../../constants';
5
- import { ReadonlyURLSearchParams } from 'next/navigation';
4
+ import { ICONSType } from '../../../constants';
6
5
 
7
6
  export interface BreadCrumbItemLinkProps extends HTMLAttributes<HTMLDivElement> {
8
7
  isLast?: boolean;
@@ -24,15 +23,5 @@ export interface PDCNavigationContextProps extends PDCNavigationProviderProps {
24
23
  openOrderBy: boolean;
25
24
  setOpenOrderBy: Dispatch<SetStateAction<boolean>>;
26
25
  }
27
- export type PLPNavigationFiltersProps = {
28
- PDC_NAVIGATION: PDC_NAVIGATIONType;
29
- ICONS: ICONSType;
30
- searchParams: ReadonlyURLSearchParams;
31
- };
32
- export interface PLPContentProps extends HTMLAttributes<HTMLDivElement>, PLPNavigationFiltersProps {
33
- }
34
- export interface PLPBreadcrumbProps extends HTMLAttributes<HTMLDivElement> {
35
- ICONS: ICONSType;
36
- }
37
- export interface PLPRootProps extends PDCNavigationProviderProps, PLPNavigationFiltersProps {
38
- }
26
+ export type PLPContentProps = HTMLAttributes<HTMLDivElement>;
27
+ export type PLPNavigationRootProps = PDCNavigationProviderProps;
@@ -2,7 +2,6 @@ import { ButtonProps } from '@soma-vertical-web/core-components/src/lib/Button/i
2
2
  import { Dispatch, HTMLAttributes, ReactNode, SetStateAction } from 'react';
3
3
  import { ICONSType, PLP_FILTERS_SORT_OPTIONtype } from '../../../constants';
4
4
  import { PLP_FILTERS_SORT } from '../../../../constants';
5
- import { ReadonlyURLSearchParams } from 'next/navigation';
6
5
 
7
6
  export type RootProps = HTMLAttributes<HTMLDivElement>;
8
7
  export interface SortButtonProps extends Omit<ButtonProps, 'adornment' | 'iconNameStart' | 'iconNameEnd'> {
@@ -16,9 +15,7 @@ export interface SortProps extends RootProps {
16
15
  handleSelectValue?: (value?: PLP_FILTERS_SORT_OPTIONtype) => void;
17
16
  sortListOpen: boolean;
18
17
  setSortListOpen: Dispatch<SetStateAction<boolean>>;
19
- searchParams: ReadonlyURLSearchParams;
20
- CONSTANTS: {
21
- ICONS: ICONSType;
22
- };
18
+ searchParams: URLSearchParams;
19
+ ICONS: ICONSType;
23
20
  }
24
21
  export type PLPFilterOption = keyof typeof PLP_FILTERS_SORT.options;
@@ -1,9 +1,128 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { BannerType } from '../../../cms/Sections/Banner';
3
+ import { Page, PLPConstantsContextProps } from '../../../contexts/contexts/plp';
4
+ import { ProductCardProps } from '../../team-components/ProductCard';
5
+ import { AvailabilityNotifyProps } from '../../../../types/layout/team-components/Notify';
6
+ import { ProductType_PDC } from '../../../global/product';
7
+ 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, Z_INDEX_WARType } from '../../../constants';
8
+
9
+ export type PLPNavigationRootProps = {
10
+ searchParams: {
11
+ [key: string]: string | string[] | undefined;
12
+ };
13
+ className?: string;
14
+ };
1
15
  export type PLPProps = {
2
16
  slug: string[] | string;
3
- searchParams: PLPSearchParamsType;
17
+ searchParams: URLSearchParams;
4
18
  collectionId?: number | null;
5
19
  brand?: string | null;
6
20
  };
7
- export type PLPSearchParamsType = {
8
- [key: string]: string | string[] | undefined;
21
+ export interface BannerPropsExtended extends BannerType {
22
+ columns: number;
23
+ position_grid: number;
24
+ }
25
+ export interface BannersProps {
26
+ gap: number;
27
+ isMobile: boolean;
28
+ }
29
+ export interface InfiniteBannersProps {
30
+ columns: number;
31
+ count: number;
32
+ gap: number;
33
+ }
34
+ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
35
+ infinite?: boolean;
36
+ }
37
+ export interface PageSentinelProps extends HTMLAttributes<HTMLDivElement> {
38
+ page: Page;
39
+ }
40
+ export interface PageCardProps {
41
+ first?: boolean;
42
+ last?: boolean;
43
+ gap: number;
44
+ index: number;
45
+ isMobile?: boolean;
46
+ item: ProductCardProps;
47
+ order: number;
48
+ page?: Page;
49
+ showVideo?: boolean;
50
+ }
51
+ export interface PageProps {
52
+ count: number;
53
+ gap: number;
54
+ page: Page;
55
+ }
56
+ export interface NotificationProps extends Pick<AvailabilityNotifyProps, 'open' | 'sku' | 'setSku' | 'setVisible'> {
57
+ skus: ProductType_PDC['isVariantOf']['hasVariant'];
58
+ ICONS: ICONSType;
59
+ NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGSType;
60
+ NOTIFY_INFO: NOTIFY_INFOType;
61
+ PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
62
+ Z_INDEX_WAR: Z_INDEX_WARType;
63
+ }
64
+ export interface LayoutProps extends PropsWithChildren {
65
+ endPage: number;
66
+ page: number;
67
+ total: number;
68
+ selectedPage(page: number): void;
69
+ ITEMS_PER_SECTION: ITEMS_PER_SECTIONType;
70
+ }
71
+ export interface PagesProps {
72
+ currentPage: number;
73
+ searchParams: URLSearchParams;
74
+ pages: number[];
75
+ VARIANT_PAGINATION: VARIANT_PAGINATIONType;
76
+ }
77
+ export type PaginantionOptionsProps = {
78
+ currentPage: number;
79
+ total: number;
80
+ maxVisiblePages: number;
81
+ SEARCH_PAGE_ITEM_THRESHOLD: SEARCH_PAGE_ITEM_THRESHOLDType;
82
+ };
83
+ export interface PaginationProps extends HTMLAttributes<HTMLDivElement> {
84
+ query?: string;
85
+ type?: 'search' | 'default';
86
+ searchParams: URLSearchParams;
87
+ ITEMS_DEFAULT_SORT: ITEMS_DEFAULT_SORTType;
88
+ ITEMS_PER_SECTION: ITEMS_PER_SECTIONType;
89
+ ITEMS_PER_PAGE: ITEMS_PER_PAGEType;
90
+ SEARCH_PAGE_ITEM_THRESHOLD: SEARCH_PAGE_ITEM_THRESHOLDType;
91
+ VARIANT_PAGINATION: VARIANT_PAGINATIONType;
92
+ }
93
+ export interface ProductsProps {
94
+ items: {
95
+ node: ProductCardProps;
96
+ }[];
97
+ isMobile?: boolean;
98
+ BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
99
+ ICONS: ICONSType;
100
+ MAIN_IMAGE: MAIN_IMAGEType;
101
+ NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGSType;
102
+ NOTIFY_INFO: NOTIFY_INFOType;
103
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
104
+ PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
105
+ PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
106
+ PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
107
+ PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
108
+ PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
109
+ PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
110
+ PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
111
+ SECOND_IMAGE: SECOND_IMAGEType;
112
+ StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
113
+ TEXTURE_IMAGE: TEXTURE_IMAGEType;
114
+ Z_INDEX_WAR: Z_INDEX_WARType;
115
+ WishListToggle: React.ComponentType<any>;
116
+ }
117
+ export interface PLPRootProps extends PLPConstantsContextProps {
118
+ className?: string;
119
+ }
120
+ export type EmptyProps = {
121
+ className?: string;
122
+ content?: {
123
+ link: string;
124
+ text: string;
125
+ title: string;
126
+ subtitle: string;
127
+ };
9
128
  };
@@ -0,0 +1,44 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { SearchSort } from '../../../data/api/search';
3
+ import { SearchConstantsContextProps } from '../../../contexts/contexts/search';
4
+
5
+ export interface ISearchEmpty {
6
+ term?: string;
7
+ }
8
+ export interface ISearchSort {
9
+ term?: string;
10
+ }
11
+ export interface ISearchLoading {
12
+ isLoading: boolean;
13
+ quantity: number;
14
+ term?: string;
15
+ }
16
+ export interface SearchResultContentProps extends HTMLAttributes<HTMLDivElement> {
17
+ isMobile?: boolean;
18
+ banners?: any[];
19
+ sort?: SearchSort;
20
+ query?: string;
21
+ currentPage: number;
22
+ className?: string;
23
+ }
24
+ export interface IPaginationProps {
25
+ currentPage: number;
26
+ firstPageSpread: boolean;
27
+ lastPageSpread: boolean;
28
+ totalPages: number;
29
+ onPageChange: (page: number) => void;
30
+ hasNextPage: boolean;
31
+ hasPreviousPage: boolean;
32
+ slices: {
33
+ start: number;
34
+ end: number;
35
+ };
36
+ }
37
+ export interface SearchProps {
38
+ className?: string;
39
+ searchParams: URLSearchParams;
40
+ CONSTANTS: SearchConstantsContextProps;
41
+ }
42
+ export type SearchContentProps = {
43
+ className?: string;
44
+ };