@sentecacommerce-theme/lib 0.13.5-alpha.9 → 0.13.7-alpha.7

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 (131) hide show
  1. package/dist/cjs/analytics/Pixel/hooks/usePixelProductClick.js +1 -1
  2. package/dist/cjs/analytics/Pixel/hooks/usePixelProductDetails.js +1 -1
  3. package/dist/cjs/analytics/Pixel/hooks/usePixelProductsImpression.js +1 -1
  4. package/dist/cjs/analytics/Pixel/usePixel.js +1 -1
  5. package/dist/cjs/analytics/Releva/useReleva.js +1 -1
  6. package/dist/cjs/analytics/addToCart.js +0 -1
  7. package/dist/cjs/analytics/initiateCheckout.js +0 -1
  8. package/dist/cjs/analytics/viewContent.js +0 -1
  9. package/dist/cjs/api.v2/core/checkout/payments/useSetMerchantPaymentMethod.js +1 -1
  10. package/dist/cjs/checkout/hooks/useBnpCalculateForCart.js +1 -1
  11. package/dist/cjs/components/Html/index.js +1 -1
  12. package/dist/cjs/components/Portal/index.js +1 -1
  13. package/dist/cjs/hooks/ui-hooks/useIsDesktop/index.js +2 -2
  14. package/dist/cjs/hooks/useAllSelectedFilters/index.js +3 -3
  15. package/dist/cjs/hooks/usePrice/index.js +1 -1
  16. package/dist/cjs/hooks/useProgressBar/hooks/useGetSetState.js +1 -24
  17. package/dist/cjs/hooks/useSelectedFilters/index.js +3 -3
  18. package/dist/cjs/hooks/useVouchers/index.js +1 -2
  19. package/dist/cjs/listing/api/queries/useAggregateQuery.js +7 -7
  20. package/dist/cjs/listing/api/queries/useInfiniteListing.js +4 -4
  21. package/dist/cjs/listing/api/queries/useListingQuery.js +18 -21
  22. package/dist/cjs/listing/api/queries/usePredicate.js +4 -4
  23. package/dist/cjs/listing/components/BasicListingSEO.js +1 -1
  24. package/dist/cjs/listing/hooks/useListingAlias.js +2 -4
  25. package/dist/cjs/listing/hooks/useListingBreadcrumbs.js +4 -4
  26. package/dist/cjs/listing/hooks/useListingCategories.js +7 -8
  27. package/dist/cjs/listing/hooks/useListingConfig.js +3 -5
  28. package/dist/cjs/listing/hooks/useListingFilters.js +18 -19
  29. package/dist/cjs/listing/hooks/useListingItems.js +2 -2
  30. package/dist/cjs/listing/hooks/useListingMeta.js +5 -4
  31. package/dist/cjs/listing/hooks/useListingPagination.js +3 -4
  32. package/dist/cjs/listing/hooks/useListingSlug.js +3 -1
  33. package/dist/cjs/listing/hooks/useSlideFilter.js +4 -3
  34. package/dist/cjs/listing/hooks/useSort.js +48 -17
  35. package/dist/cjs/listing/hooks/utils.js +2 -1
  36. package/dist/cjs/listing/ssr/prefetchCategories.js +1 -1
  37. package/dist/cjs/listing/ssr/prefetchListing.js +7 -8
  38. package/dist/cjs/listing/utils/buildCategoryQuery.js +8 -9
  39. package/dist/cjs/listing/utils/buildFilterQuery.js +5 -7
  40. package/dist/cjs/listing/utils/calculateOffset.js +1 -1
  41. package/dist/cjs/listing/utils/getListingAlias.js +5 -6
  42. package/dist/cjs/listing/utils/getListingPageType.js +4 -3
  43. package/dist/cjs/navigation/components/SearchBox/Components/Container/index.js +1 -1
  44. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +19 -18
  45. package/dist/cjs/navigation/components/SearchBox/Components/PopularSearches/index.js +1 -1
  46. package/dist/cjs/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -1
  47. package/dist/cjs/navigation/components/SearchBox/Components/Products/index.js +2 -2
  48. package/dist/cjs/navigation/components/SearchBox/Components/RecentSearches/index.js +1 -1
  49. package/dist/cjs/navigation/components/SearchBox/index.js +11 -11
  50. package/dist/cjs/product/hooks/useBnpOffers.js +2 -25
  51. package/dist/cjs/seo/components/GlobalSEO/index.js +3 -3
  52. package/dist/esm/analytics/Pixel/hooks/usePixelProductClick.js +1 -1
  53. package/dist/esm/analytics/Pixel/hooks/usePixelProductDetails.js +1 -1
  54. package/dist/esm/analytics/Pixel/hooks/usePixelProductsImpression.js +1 -1
  55. package/dist/esm/analytics/Pixel/mainScript.js +0 -1
  56. package/dist/esm/analytics/Pixel/usePixel.js +1 -1
  57. package/dist/esm/analytics/Releva/useReleva.js +1 -1
  58. package/dist/esm/analytics/addToCart.js +0 -1
  59. package/dist/esm/analytics/initiateCheckout.js +0 -1
  60. package/dist/esm/analytics/pageView.js +1 -1
  61. package/dist/esm/analytics/viewContent.js +0 -1
  62. package/dist/esm/api.v2/core/checkout/payments/useSetMerchantPaymentMethod.js +1 -1
  63. package/dist/esm/checkout/hooks/useBnpCalculateForCart.js +1 -1
  64. package/dist/esm/components/GoogleOneTap/index.js +1 -1
  65. package/dist/esm/components/Html/index.js +1 -1
  66. package/dist/esm/components/Portal/index.js +1 -1
  67. package/dist/esm/hooks/ui-hooks/useIsDesktop/index.js +2 -2
  68. package/dist/esm/hooks/useAllSelectedFilters/index.js +4 -4
  69. package/dist/esm/hooks/usePrice/index.js +1 -1
  70. package/dist/esm/hooks/useProgressBar/hooks/useGetSetState.js +1 -1
  71. package/dist/esm/hooks/useSelectedFilters/index.js +4 -4
  72. package/dist/esm/hooks/useVouchers/index.js +1 -2
  73. package/dist/esm/listing/api/queries/useAggregateQuery.js +7 -7
  74. package/dist/esm/listing/api/queries/useInfiniteListing.js +4 -4
  75. package/dist/esm/listing/api/queries/useListingQuery.js +18 -21
  76. package/dist/esm/listing/api/queries/usePredicate.js +4 -4
  77. package/dist/esm/listing/components/BasicListingSEO.js +1 -1
  78. package/dist/esm/listing/hooks/useListingAlias.js +2 -4
  79. package/dist/esm/listing/hooks/useListingBreadcrumbs.js +5 -5
  80. package/dist/esm/listing/hooks/useListingCategories.js +8 -9
  81. package/dist/esm/listing/hooks/useListingConfig.js +4 -6
  82. package/dist/esm/listing/hooks/useListingFilters.js +18 -19
  83. package/dist/esm/listing/hooks/useListingItems.js +2 -2
  84. package/dist/esm/listing/hooks/useListingMeta.js +6 -5
  85. package/dist/esm/listing/hooks/useListingPagination.js +3 -4
  86. package/dist/esm/listing/hooks/useListingSlug.js +3 -1
  87. package/dist/esm/listing/hooks/useSlideFilter.js +5 -4
  88. package/dist/esm/listing/hooks/useSort.js +48 -17
  89. package/dist/esm/listing/hooks/utils.js +2 -1
  90. package/dist/esm/listing/ssr/prefetchCategories.js +2 -2
  91. package/dist/esm/listing/ssr/prefetchListing.js +7 -8
  92. package/dist/esm/listing/utils/buildCategoryQuery.js +8 -9
  93. package/dist/esm/listing/utils/buildFilterQuery.js +5 -7
  94. package/dist/esm/listing/utils/calculateOffset.js +1 -1
  95. package/dist/esm/listing/utils/getListingAlias.js +5 -6
  96. package/dist/esm/listing/utils/getListingPageType.js +4 -3
  97. package/dist/esm/navigation/components/SearchBox/Components/Container/index.js +1 -1
  98. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +19 -18
  99. package/dist/esm/navigation/components/SearchBox/Components/PopularSearches/index.js +1 -1
  100. package/dist/esm/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.js +1 -1
  101. package/dist/esm/navigation/components/SearchBox/Components/Products/index.js +2 -2
  102. package/dist/esm/navigation/components/SearchBox/Components/RecentSearches/index.js +1 -1
  103. package/dist/esm/navigation/components/SearchBox/index.js +11 -11
  104. package/dist/esm/product/hooks/useBnpOffers.js +2 -2
  105. package/dist/esm/seo/components/GlobalSEO/index.js +3 -3
  106. package/dist/types/listing/api/queries/useAggregateQuery.d.ts +2 -1
  107. package/dist/types/listing/api/queries/useListingQuery.d.ts +4 -2
  108. package/dist/types/listing/api/queries/usePredicate.d.ts +2 -1
  109. package/dist/types/listing/hooks/useListingAlias.d.ts +2 -1
  110. package/dist/types/listing/hooks/useListingFilters.d.ts +0 -1
  111. package/dist/types/listing/hooks/useListingItems.d.ts +3 -2
  112. package/dist/types/listing/hooks/useListingSEOCategories.d.ts +6 -4
  113. package/dist/types/listing/hooks/useSort.d.ts +6 -5
  114. package/dist/types/listing/hooks/utils.d.ts +3 -2
  115. package/dist/types/listing/ssr/prefetchCategories.d.ts +2 -2
  116. package/dist/types/listing/ssr/prefetchListing.d.ts +4 -5
  117. package/dist/types/listing/ssr/prefetchPredicate.d.ts +2 -1
  118. package/dist/types/listing/types.d.ts +27 -16
  119. package/dist/types/listing/utils/buildCategoryQuery.d.ts +2 -1
  120. package/dist/types/listing/utils/buildFilterQuery.d.ts +2 -1
  121. package/dist/types/listing/utils/extendFilter.d.ts +3 -2
  122. package/dist/types/listing/utils/getListingAlias.d.ts +2 -1
  123. package/dist/types/listing/utils/getListingPageType.d.ts +2 -2
  124. package/dist/types/navigation/components/SearchBox/Components/Container/index.d.ts +10 -9
  125. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +22 -21
  126. package/dist/types/navigation/components/SearchBox/Components/Products/Components/ProductCard/index.d.ts +8 -7
  127. package/dist/types/navigation/components/SearchBox/Components/Products/index.d.ts +9 -8
  128. package/dist/types/navigation/components/SearchBox/index.d.ts +31 -30
  129. package/dist/types/types/index.d.ts +38 -40
  130. package/dist/types/utils/getSelectedFilters.d.ts +2 -1
  131. package/package.json +11 -5
@@ -1,5 +1,5 @@
1
1
  import { ListingTypesEnum } from '..';
2
- export var getListingPageType = function(router, slug, config) {
2
+ export var getListingPageType = function(router, slug, meta) {
3
3
  var ref;
4
4
  var pageTypeMap = {
5
5
  '/[slug]/c': ListingTypesEnum.Category,
@@ -11,8 +11,9 @@ export var getListingPageType = function(router, slug, config) {
11
11
  };
12
12
  var slugAliases = {
13
13
  };
14
- if (config) slugAliases = config.listing;
15
- if ((((ref = Object.keys(slugAliases)) === null || ref === void 0 ? void 0 : ref.includes(slug)) || (slug === null || slug === void 0 ? void 0 : slug.includes('sex'))) && !router.query.cat) {
14
+ if (meta) slugAliases = meta.slugAliases;
15
+ if ((((ref = Object.keys(slugAliases || {
16
+ })) === null || ref === void 0 ? void 0 : ref.includes(slug)) || (slug === null || slug === void 0 ? void 0 : slug.includes('sex'))) && !router.query.cat) {
16
17
  return ListingTypesEnum.AttrPage;
17
18
  }
18
19
  if (router.query.q || router.query.search) {
@@ -48,7 +48,7 @@ export var Container = function(param) {
48
48
  mobile: onlyMobile,
49
49
  desktop: onlyDesktop
50
50
  }, Boolean(title) && /*#__PURE__*/ React.createElement(Headline, {
51
- color: labelsColor
51
+ color: labelsColor || ''
52
52
  }, title), /*#__PURE__*/ React.createElement(Flex, null, children)));
53
53
  };
54
54
  var Wrapper = styled.div.attrs(function(props) {
@@ -62,6 +62,7 @@ function _templateObject4() {
62
62
  }
63
63
  export var EmptyBox = function(param) {
64
64
  var backgroundColor = param.backgroundColor, searchHistory = param.searchHistory, labels = param.labels, labelsColor = param.labelsColor, textColor = param.textColor, onClose = param.onClose, canDisplayPopular = param.canDisplayPopular, canDisplayRecent = param.canDisplayRecent, withRecent = param.withRecent, promoOffers = param.promoOffers, searchValue = param.searchValue, isLoading = param.isLoading;
65
+ var ref, ref1, ref2, ref3;
65
66
  return(/*#__PURE__*/ React.createElement(React.Fragment, null, isLoading ? /*#__PURE__*/ React.createElement("div", {
66
67
  style: {
67
68
  width: '100%',
@@ -70,28 +71,28 @@ export var EmptyBox = function(param) {
70
71
  }, /*#__PURE__*/ React.createElement(Spinner, null)) : /*#__PURE__*/ React.createElement(Wrapper, null, !searchValue || (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length) < 3 ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(BlogCol, {
71
72
  backgroundColor: backgroundColor
72
73
  }, /*#__PURE__*/ React.createElement(BlogContainer, {
73
- blogTitle: labels.blog.blogTitle,
74
- image: labels.blog.image,
75
- url: labels.blog.url,
76
- description: labels.blog.description,
77
- title: labels.blogLabel,
78
- labelsColor: labelsColor,
79
- textColor: textColor,
74
+ blogTitle: (labels === null || labels === void 0 ? void 0 : (ref = labels.blog) === null || ref === void 0 ? void 0 : ref.blogTitle) || '',
75
+ image: (labels === null || labels === void 0 ? void 0 : (ref1 = labels.blog) === null || ref1 === void 0 ? void 0 : ref1.image) || '',
76
+ url: (labels === null || labels === void 0 ? void 0 : (ref2 = labels.blog) === null || ref2 === void 0 ? void 0 : ref2.url) || '',
77
+ description: (labels === null || labels === void 0 ? void 0 : (ref3 = labels.blog) === null || ref3 === void 0 ? void 0 : ref3.description) || '',
78
+ title: (labels === null || labels === void 0 ? void 0 : labels.blogLabel) || '',
79
+ labelsColor: labelsColor || '',
80
+ textColor: textColor || '',
80
81
  onClose: onClose
81
82
  })), /*#__PURE__*/ React.createElement(SuggestedSearches, null, canDisplayPopular && /*#__PURE__*/ React.createElement(PopularSearches, {
82
- title: labels.popularSearchesLabel,
83
+ title: (labels === null || labels === void 0 ? void 0 : labels.popularSearchesLabel) || '',
83
84
  onClose: onClose,
84
- textColor: textColor,
85
- labelsColor: labelsColor
85
+ textColor: textColor || '',
86
+ labelsColor: labelsColor || ''
86
87
  }), withRecent && canDisplayRecent && /*#__PURE__*/ React.createElement(RecentSearches, {
87
- title: labels.recentSearchesLabel,
88
+ title: (labels === null || labels === void 0 ? void 0 : labels.recentSearchesLabel) || '',
88
89
  data: searchHistory,
89
90
  onClose: onClose,
90
- textColor: textColor,
91
- labelsColor: labelsColor
91
+ textColor: textColor || '',
92
+ labelsColor: labelsColor || ''
92
93
  }))) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Container, {
93
94
  labelsColor: labelsColor,
94
- title: labels.productsLabel,
95
+ title: (labels === null || labels === void 0 ? void 0 : labels.productsLabel) || '',
95
96
  onlyMobile: true
96
97
  }, /*#__PURE__*/ React.createElement(NoResultsDesc, {
97
98
  className: "SEARCH_BOX_NO_RESULT"
@@ -99,14 +100,14 @@ export var EmptyBox = function(param) {
99
100
  backgroundColor: backgroundColor
100
101
  }, /*#__PURE__*/ React.createElement(Products, {
101
102
  data: promoOffers,
102
- textColor: textColor,
103
- labelsColor: labelsColor,
103
+ textColor: textColor || '',
104
+ labelsColor: labelsColor || '',
104
105
  onClose: onClose,
105
- title: labels.promoOffersLabel,
106
+ title: (labels === null || labels === void 0 ? void 0 : labels.promoOffersLabel) || '',
106
107
  offers: true
107
108
  })), /*#__PURE__*/ React.createElement(Container, {
108
109
  labelsColor: labelsColor,
109
- title: labels.productsLabel,
110
+ title: (labels === null || labels === void 0 ? void 0 : labels.productsLabel) || '',
110
111
  onlyDesktop: true
111
112
  }, /*#__PURE__*/ React.createElement(NoResultsDesc, {
112
113
  className: "SEARCH_BOX_NO_RESULT"
@@ -6,7 +6,7 @@ export var PopularSearches = function(param) {
6
6
  var title = param.title, data = param.data, onClose = param.onClose, labelsColor = param.labelsColor, textColor = param.textColor, searchValue = param.searchValue;
7
7
  var config = useConfigState();
8
8
  var ref = usePopularSearches({
9
- key: config.interfaceKey
9
+ key: config.interfaceKey || ''
10
10
  }), popularSearches = ref.popularSearches, arePopularLoading = ref.isLoading, status = ref.status;
11
11
  return(/*#__PURE__*/ React.createElement(Container, {
12
12
  labelsColor: labelsColor,
@@ -151,7 +151,7 @@ export var ProductCard = function(param) {
151
151
  fontWeight: 400
152
152
  }
153
153
  }, name), /*#__PURE__*/ React.createElement(PriceContainer, null, discountPrice ? /*#__PURE__*/ React.createElement(Price, null, /*#__PURE__*/ React.createElement(NewPrice, null, discountPrice.displayValue), /*#__PURE__*/ React.createElement(OriginalPrice, null, price.displayValue)) : /*#__PURE__*/ React.createElement(ProductCardPrice, {
154
- color: priceColor
154
+ color: priceColor || ''
155
155
  }, price.displayValue)))))), /*#__PURE__*/ React.createElement(Divider, {
156
156
  isLast: isLast
157
157
  })));
@@ -28,7 +28,7 @@ export var Products = function(param) {
28
28
  labelsColor: labelsColor,
29
29
  title: title,
30
30
  offers: offers,
31
- noData: !data || (data === null || data === void 0 ? void 0 : data.length) < 1
31
+ noData: !data || (data === null || data === void 0 ? void 0 : data.length) < 1 || null
32
32
  }, Boolean(data === null || data === void 0 ? void 0 : data.length) ? /*#__PURE__*/ React.createElement("div", {
33
33
  className: "row ".concat(offers ? 'flex-column' : '')
34
34
  }, data === null || data === void 0 ? void 0 : data.map(function(product, index) {
@@ -39,7 +39,7 @@ export var Products = function(param) {
39
39
  labelsColor: labelsColor,
40
40
  priceColor: priceColor,
41
41
  onClose: onClose,
42
- isLast: index === (data === null || data === void 0 ? void 0 : data.length) - 1,
42
+ isLast: index === (data === null || data === void 0 ? void 0 : data.length) - 1 || null,
43
43
  offers: offers,
44
44
  productSpacing: productSpacing
45
45
  }));
@@ -6,7 +6,7 @@ export var RecentSearches = function(param) {
6
6
  return(/*#__PURE__*/ React.createElement(Container, {
7
7
  labelsColor: labelsColor,
8
8
  title: title,
9
- noData: !data || (data === null || data === void 0 ? void 0 : data.length) < 1
9
+ noData: !data || (data === null || data === void 0 ? void 0 : data.length) < 1 || null
10
10
  }, data && /*#__PURE__*/ React.createElement(RecentSearchesList, {
11
11
  data: data,
12
12
  onClose: onClose,
@@ -141,7 +141,7 @@ var BottomMenuEnum1;
141
141
  })(BottomMenuEnum1 || (BottomMenuEnum1 = {
142
142
  }));
143
143
  export var SearchBox = function(param) {
144
- var isLoading = param.isLoading, onClose = param.onClose, suggestedBrands = param.suggestedBrands, suggestedCategories = param.suggestedCategories, suggestions = param.suggestions, searchValue = param.searchValue, _withRecent = param.withRecent, withRecent = _withRecent === void 0 ? true : _withRecent, labels = param.labels, bottomMenu = param.bottomMenu, labelsColor = param.labelsColor, textColor = param.textColor, priceColor = param.priceColor, backgroundColor = param.backgroundColor, onSearchSubmit = param.onSearchSubmit, top = param.top, delay = param.delay, isContainer = param.isContainer, noCloseButton = param.noCloseButton, productSpacing = param.productSpacing, closeButtonOnTop = param.closeButtonOnTop, _hasPopularSearches = param.hasPopularSearches, hasPopularSearches = _hasPopularSearches === void 0 ? false : _hasPopularSearches;
144
+ var isLoading = param.isLoading, onClose = param.onClose, suggestedBrands = param.suggestedBrands, suggestedCategories = param.suggestedCategories, suggestions = param.suggestions, searchValue = param.searchValue, _withRecent = param.withRecent, withRecent = _withRecent === void 0 ? true : _withRecent, labels = param.labels, bottomMenu = param.bottomMenu, labelsColor = param.labelsColor, textColor = param.textColor, priceColor = param.priceColor, backgroundColor = param.backgroundColor, onSearchSubmit = param.onSearchSubmit, top = param.top, delay = param.delay, isContainer = param.isContainer, noCloseButton = param.noCloseButton, productSpacing = param.productSpacing, closeButtonOnTop = param.closeButtonOnTop, _hasPopularSearches = param.hasPopularSearches, hasPopularSearches = _hasPopularSearches === void 0 ? null : _hasPopularSearches;
145
145
  var ref = useSearchHistory(), data = ref.data, loadingRecent = ref.isLoading;
146
146
  var canDisplayRecent = !loadingRecent;
147
147
  var searchHistory = data === null || data === void 0 ? void 0 : data.results;
@@ -169,21 +169,21 @@ export var SearchBox = function(param) {
169
169
  }, /*#__PURE__*/ React.createElement(SearchBoxContent, {
170
170
  isContainer: isContainer
171
171
  }, /*#__PURE__*/ React.createElement(Row, null, /*#__PURE__*/ React.createElement(Placeholder, null), showResults ? /*#__PURE__*/ React.createElement(ResultsBox, null, /*#__PURE__*/ React.createElement(SuggestedBrandsCol, {
172
- backgroundColor: backgroundColor
172
+ backgroundColor: backgroundColor || ''
173
173
  }, suggestedBrands.length !== 0 && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Suggestions, {
174
174
  data: displayableBrands,
175
175
  onClose: onClose,
176
- searchValue: searchValue,
177
- title: labels.suggestedBrandsLabel,
178
- labelsColor: labelsColor,
179
- textColor: textColor
176
+ searchValue: searchValue || '',
177
+ title: (labels === null || labels === void 0 ? void 0 : labels.suggestedBrandsLabel) || '',
178
+ labelsColor: labelsColor || '',
179
+ textColor: textColor || ''
180
180
  })), suggestedCategories.length > 0 && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Suggestions, {
181
181
  data: suggestedCategories,
182
182
  onClose: onClose,
183
- searchValue: searchValue,
184
- title: labels.suggestedCategoriesLabel,
185
- labelsColor: labelsColor,
186
- textColor: textColor
183
+ searchValue: searchValue || '',
184
+ title: (labels === null || labels === void 0 ? void 0 : labels.suggestedCategoriesLabel) || '',
185
+ labelsColor: labelsColor || '',
186
+ textColor: textColor || ''
187
187
  }))), /*#__PURE__*/ React.createElement(ProductsWrapper, {
188
188
  backgroundColor: backgroundColor
189
189
  }, /*#__PURE__*/ React.createElement(Products, {
@@ -212,7 +212,7 @@ export var SearchBox = function(param) {
212
212
  onClose: onClose,
213
213
  searchHistory: searchHistory,
214
214
  textColor: textColor,
215
- canDisplayRecent: canDisplayRecent,
215
+ canDisplayRecent: canDisplayRecent || null,
216
216
  withRecent: withRecent,
217
217
  promoOffers: promoOffers,
218
218
  searchValue: searchValue
@@ -1,4 +1,4 @@
1
- import React, { useMemo } from 'react';
1
+ import { useMemo } from 'react';
2
2
  import { useBnpOffersQuery } from '../api/queries';
3
3
  import { decodePrice, formatAsCurrency, useConfigState } from '../../index';
4
4
  function _defineProperty(obj, key, value) {
@@ -32,7 +32,7 @@ function _objectSpread(target) {
32
32
  }
33
33
  export var useBnpOffers = function(props) {
34
34
  var ref6, ref1, ref2, ref3;
35
- var configLocale = (ref6 = useConfigState()) === null || ref6 === void 0 ? void 0 : (ref1 = ref6.price) === null || ref1 === void 0 ? void 0 : ref1.locale;
35
+ var configLocale = ((ref6 = useConfigState()) === null || ref6 === void 0 ? void 0 : (ref1 = ref6.price) === null || ref1 === void 0 ? void 0 : ref1.locale) || '';
36
36
  var response = useBnpOffersQuery(props);
37
37
  return useMemo(function() {
38
38
  var ref, ref4, ref5;
@@ -21,13 +21,13 @@ export function GlobalSEO() {
21
21
  dangerouslySetInnerHTML: createDangerousMarkup(organizationJSONLd)
22
22
  }), Boolean(defaultIcon) && /*#__PURE__*/ React.createElement("link", {
23
23
  rel: "icon",
24
- href: defaultIcon
24
+ href: defaultIcon || ''
25
25
  }), Boolean(favicon === null || favicon === void 0 ? void 0 : favicon.svg) && /*#__PURE__*/ React.createElement("link", {
26
26
  rel: "icon",
27
- href: favicon === null || favicon === void 0 ? void 0 : favicon.svg,
27
+ href: (favicon === null || favicon === void 0 ? void 0 : favicon.svg) || '',
28
28
  type: "image/svg+xml"
29
29
  }), Boolean(favicon === null || favicon === void 0 ? void 0 : favicon.medium) && /*#__PURE__*/ React.createElement("link", {
30
30
  rel: "apple-touch-icon",
31
- href: favicon === null || favicon === void 0 ? void 0 : favicon.medium
31
+ href: (favicon === null || favicon === void 0 ? void 0 : favicon.medium) || ''
32
32
  })));
33
33
  }
@@ -2,6 +2,7 @@ import { RangeAggregationResult, TermAggregationResult, RangeAggregation, TermAg
2
2
  import { NextRouter } from 'next/router';
3
3
  import { PredicateType } from './usePredicate';
4
4
  import { Aggregate, AggregateSortEnum } from '../../types';
5
+ import { ListingPageMeta } from '../..';
5
6
  export declare type AggregationResultType = RangeAggregationResult & TermAggregationResult & RangeAggregationResult;
6
7
  export declare type AggregateType = TermAggregation & StatAggregation & RangeAggregation;
7
8
  export declare enum AggregateRequestEnum {
@@ -15,7 +16,7 @@ export declare function prepareAggregateQuery({ request, predicate, aggregates,
15
16
  router: NextRouter;
16
17
  postFilter: string | undefined;
17
18
  predicate?: PredicateType;
18
- config?: any;
19
+ config?: ListingPageMeta;
19
20
  slug: string;
20
21
  attributeSortType?: AggregateSortEnum;
21
22
  }): any;
@@ -2,6 +2,8 @@ import { CatalogFilterResultDTO } from '@sentecacommerce/sdk';
2
2
  import { QueryResult } from 'react-query';
3
3
  import { NextRouter } from 'next/router';
4
4
  import { PredicateType } from '..';
5
+ import { ListingPageMeta } from '../..';
6
+ import { StringField } from '@sentecacommerce-theme/cms';
5
7
  export declare const useListingQuery: () => QueryResult<CatalogFilterResultDTO, unknown>;
6
8
  export declare function processListingQuery({ predicate, router, limit, sort, postFilter, offset, config, slug, }: {
7
9
  predicate?: PredicateType;
@@ -10,7 +12,7 @@ export declare function processListingQuery({ predicate, router, limit, sort, po
10
12
  offset: number;
11
13
  sort?: string;
12
14
  postFilter?: string;
13
- config?: any;
15
+ config?: ListingPageMeta;
14
16
  slug?: string;
15
17
  }): Promise<CatalogFilterResultDTO>;
16
- export declare function isListingQueryEnabled(type: string, predicate?: PredicateType): boolean;
18
+ export declare function isListingQueryEnabled(type: StringField, predicate?: PredicateType): boolean;
@@ -1,8 +1,9 @@
1
1
  import { CategoryDTO, ViewDTO, BrandDTO } from '@sentecacommerce/sdk';
2
2
  import { QueryResult } from 'react-query';
3
3
  import { NextRouter } from 'next/router';
4
+ import { ListingPageMeta } from '../..';
4
5
  export declare type PredicateType = CategoryDTO & ViewDTO & BrandDTO & {
5
6
  breadcrumb?: any;
6
7
  };
7
8
  export declare const usePredicate: () => QueryResult<PredicateType | undefined, unknown>;
8
- export declare function processPredicateRequest(slug: string, router: NextRouter, aliasedSlug: string, mainConfig?: any): Promise<any>;
9
+ export declare function processPredicateRequest(slug: string, router: NextRouter, aliasedSlug: string, mainConfig?: ListingPageMeta): Promise<any>;
@@ -1,3 +1,4 @@
1
- export declare const useListingAlias: () => {
1
+ import { ListingPageMeta } from '..';
2
+ export declare const useListingAlias: (meta: ListingPageMeta) => {
2
3
  slug: string;
3
4
  };
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AggregationResultType } from '../api';
3
3
  import { RangeAggregation, StatAggregation, TermAggregation } from '@sentecacommerce/sdk';
4
- export type { RangeAggregation, StatAggregation, TermAggregation, } from '@sentecacommerce/sdk';
5
4
  export declare type ListingAggregationResultType = {
6
5
  selected: boolean;
7
6
  data: AggregationResultType;
@@ -1,11 +1,12 @@
1
1
  import { SearchResultDTO } from '@sentecacommerce/sdk';
2
+ import type { NumberField, StringField } from '@sentecacommerce-theme/cms';
2
3
  export declare type SearchResultItem = {
3
4
  isPlaceholder?: boolean;
4
5
  } & SearchResultDTO;
5
6
  export declare type UseListingItemsProps = {
6
7
  items?: SearchResultItem[];
7
- total?: number;
8
- didYouMean?: string;
8
+ total?: NumberField;
9
+ didYouMean?: StringField;
9
10
  isLoading: boolean;
10
11
  isFetching: boolean;
11
12
  };
@@ -1,9 +1,11 @@
1
+ import type { EnumField, StringField } from '@sentecacommerce-theme/cms';
2
+ import { ComponentTypeEnum } from '..';
1
3
  export declare type SeoFilter = {
2
- name?: string;
3
- component?: string;
4
+ name?: StringField;
5
+ component?: EnumField<ComponentTypeEnum>;
4
6
  items?: {
5
- name: string;
6
- url: string;
7
+ name: StringField;
8
+ url: StringField;
7
9
  }[];
8
10
  };
9
11
  export declare type UseListingSEOCategoriesPropsResult = {
@@ -1,9 +1,10 @@
1
+ import { StringField } from '@sentecacommerce-theme/cms';
1
2
  declare type Props = {
2
- sorts: {
3
- key: string;
4
- label: string;
3
+ sorts?: {
4
+ key: StringField;
5
+ label: StringField;
5
6
  }[];
6
- defaultSortKey: string;
7
+ defaultSortKey?: StringField;
7
8
  onSelect?: () => void;
8
9
  };
9
10
  declare type SortOptionType = {
@@ -17,5 +18,5 @@ export declare type UseSortResults = {
17
18
  selectedSort: SortOptionType;
18
19
  resetSort: () => void;
19
20
  };
20
- export declare const useSort: ({ onSelect, sorts, defaultSortKey, }: Props) => UseSortResults;
21
+ export declare const useSort: (props?: Props | undefined) => UseSortResults;
21
22
  export {};
@@ -2,9 +2,10 @@ import { AggregationResultType } from '../api';
2
2
  import { CatalogAggregateResponseDTO } from '@sentecacommerce/sdk';
3
3
  import { Aggregate } from '../types';
4
4
  import { NextRouter } from 'next/router';
5
- export declare function processCategoriesResponse(response?: CatalogAggregateResponseDTO, type?: string, term?: string): AggregationResultType[];
5
+ import type { StringField } from '@sentecacommerce-theme/cms';
6
+ export declare function processCategoriesResponse(response?: CatalogAggregateResponseDTO, type?: StringField, term?: StringField): AggregationResultType[];
6
7
  export declare function getAggregateTypeAndTerm(aggregates?: Aggregate): {
7
8
  type: string;
8
- term: string | undefined;
9
+ term: import("@sentecacommerce-theme/cms").EnumField<StringField>;
9
10
  };
10
11
  export declare function getAttributePageType(router: NextRouter, slug: string): string[];
@@ -1,5 +1,5 @@
1
1
  import { NextRouter } from 'next/router';
2
2
  import type { QueryCache } from 'react-query';
3
- import { Aggregate } from '../types';
3
+ import { Aggregate, ListingPageMeta } from '../types';
4
4
  import { PredicateType } from '../api';
5
- export declare function prefetchCategories(queryCache: QueryCache, router: NextRouter, predicate: PredicateType, aggregates: Aggregate[], config?: any): Promise<import("@sentecacommerce/sdk").CatalogAggregateResponseDTO>;
5
+ export declare function prefetchCategories(queryCache: QueryCache, router: NextRouter, predicate: PredicateType, aggregates: Aggregate[], config: ListingPageMeta): Promise<import("@sentecacommerce/sdk").CatalogAggregateResponseDTO>;
@@ -1,12 +1,11 @@
1
1
  import { NextRouter } from 'next/router';
2
2
  import type { QueryCache } from 'react-query';
3
3
  import { PredicateType } from '../api';
4
- export declare function prefetchListing({ queryCache, router, predicate, config, }: {
4
+ import { ListingPageMeta } from '..';
5
+ export declare function prefetchListing({ queryCache, router, predicate, config, defaultSortKey, }: {
5
6
  queryCache: QueryCache;
6
7
  router: NextRouter;
7
8
  predicate?: PredicateType;
8
- filterExtension?: string;
9
- defaultLimit?: number;
10
- defaultSortKey?: string;
11
- config?: any;
9
+ defaultSortKey: string;
10
+ config: ListingPageMeta;
12
11
  }): Promise<import("@sentecacommerce/sdk").CatalogFilterResultDTO>;
@@ -1,3 +1,4 @@
1
1
  import { NextRouter } from 'next/router';
2
2
  import type { QueryCache } from 'react-query';
3
- export declare function prefetchPredicate(queryCache: QueryCache, router: NextRouter, config: any): Promise<any>;
3
+ import { ListingPageMeta } from '..';
4
+ export declare function prefetchPredicate(queryCache: QueryCache, router: NextRouter, config: ListingPageMeta): Promise<any>;
@@ -1,4 +1,4 @@
1
- import { BooleanField, TextField, NumberField } from '@sentecacommerce-theme/base';
1
+ import { BooleanField, StringField, NumberField, EnumField, ListField, GroupField } from '@sentecacommerce-theme/cms';
2
2
  export declare type FiltersQuery = {
3
3
  storeKey?: string;
4
4
  currencyCode?: string;
@@ -50,26 +50,37 @@ export declare enum ComponentTypeEnum {
50
50
  RangeSlider = "range-slider"
51
51
  }
52
52
  export declare type Aggregate = {
53
- label: TextField;
54
- aggregationType: AggregationTypeEnum;
55
- aggregationDefinition: TextField;
56
- filterDefinition: TextField;
57
- order: NumberField;
58
- collapsed?: BooleanField;
59
- component: ComponentTypeEnum;
53
+ label: StringField;
54
+ aggregationType: EnumField<AggregationTypeEnum>;
55
+ aggregationDefinition: EnumField<StringField>;
56
+ filterDefinition: StringField;
57
+ order?: NumberField;
58
+ collapsed: BooleanField;
59
+ hideOn?: ListField<ListingTypesEnum>;
60
+ component: EnumField<ComponentTypeEnum>;
60
61
  };
61
62
  export declare type ListingPageSortOption = {
62
- key: TextField;
63
- label: TextField;
63
+ key: StringField;
64
+ label: StringField;
64
65
  };
65
66
  export interface DefaultListingPageProps {
66
67
  type: ListingTypesEnum;
67
- seoAggregates?: Aggregate;
68
- aggregates?: Aggregate[];
69
- defaultSortKey: TextField;
68
+ seoAggregates?: GroupField<Aggregate>;
69
+ aggregates?: ListField<Aggregate>;
70
+ defaultSortKey?: StringField;
70
71
  categoryTreeConfig?: Aggregate;
71
- sortOptions: ListingPageSortOption[];
72
- productsPerPage?: NumberField;
72
+ sortOptions?: ListField<ListingPageSortOption>;
73
73
  attributeSortType?: AggregateSortEnum;
74
- filterExtension?: TextField;
74
+ meta: ListingPageMeta;
75
+ }
76
+ export interface ListingPageMeta {
77
+ slugAliases: {
78
+ [key: string]: string;
79
+ };
80
+ titleAliases: {
81
+ [key: string]: string;
82
+ };
83
+ filterExtension: StringField;
84
+ collapseMode: StringField;
85
+ limit: NumberField;
75
86
  }
@@ -1,5 +1,6 @@
1
1
  import { NextRouter } from 'next/router';
2
2
  import { ListingTypesEnum, Aggregate, PredicateType } from '../index';
3
+ import { ListingPageMeta } from '../types';
3
4
  export declare const buildCategoryQuery: ({ aggregates, predicate, postFilter, pageType, config, router, slug, }: {
4
5
  pageType: ListingTypesEnum;
5
6
  aggregates: Aggregate[];
@@ -7,7 +8,7 @@ export declare const buildCategoryQuery: ({ aggregates, predicate, postFilter, p
7
8
  postFilter?: string | undefined;
8
9
  predicate?: PredicateType | undefined;
9
10
  slug: string;
10
- config?: any;
11
+ config?: ListingPageMeta | undefined;
11
12
  }) => {
12
13
  [x: string]: string;
13
14
  filter: string;
@@ -1,5 +1,6 @@
1
1
  import { NextRouter } from 'next/router';
2
2
  import { Aggregate, ListingTypesEnum, PredicateType } from '../index';
3
+ import { ListingPageMeta } from '../types';
3
4
  export declare const buildFilterQuery: ({ predicate, slug, pageType, router, aggregates, config, postFilter, }: {
4
5
  aggregates: Aggregate[];
5
6
  router: NextRouter;
@@ -7,5 +8,5 @@ export declare const buildFilterQuery: ({ predicate, slug, pageType, router, agg
7
8
  predicate?: PredicateType | undefined;
8
9
  slug: string;
9
10
  pageType: ListingTypesEnum;
10
- config: any;
11
+ config?: ListingPageMeta | undefined;
11
12
  }) => any;
@@ -1,5 +1,6 @@
1
+ import { StringField, BooleanField } from "@sentecacommerce-theme/cms";
1
2
  export declare const extendFilter: ({ slug, filterExtension, noSplit, }: {
2
3
  slug: string;
3
- filterExtension?: string | undefined;
4
- noSplit?: boolean | undefined;
4
+ filterExtension?: StringField;
5
+ noSplit?: BooleanField;
5
6
  }) => string;
@@ -1,5 +1,6 @@
1
1
  import { NextRouter } from 'next/router';
2
+ import { ListingPageMeta } from '..';
2
3
  export declare const getListingAlias: ({ router, config, }: {
3
4
  router: NextRouter;
4
- config: any;
5
+ config: ListingPageMeta;
5
6
  }) => string;
@@ -1,3 +1,3 @@
1
1
  import { NextRouter } from 'next/router';
2
- import { ListingTypesEnum } from '..';
3
- export declare const getListingPageType: (router: NextRouter, slug?: string | undefined, config?: any) => ListingTypesEnum;
2
+ import { ListingPageMeta, ListingTypesEnum } from '..';
3
+ export declare const getListingPageType: (router: NextRouter, slug?: string | undefined, meta?: ListingPageMeta | undefined) => ListingTypesEnum;
@@ -1,15 +1,16 @@
1
1
  import React from 'react';
2
+ import { BooleanField, StringField } from '@sentecacommerce-theme/cms';
2
3
  interface ContainerProps {
3
- title?: string;
4
- labelsColor: string;
4
+ title?: StringField;
5
+ labelsColor: StringField;
5
6
  children: React.ReactNode;
6
- isBottom?: boolean;
7
- noData?: boolean;
8
- backgroundColor?: string;
9
- products?: boolean;
10
- onlyMobile?: boolean;
11
- onlyDesktop?: boolean;
12
- offers?: boolean;
7
+ isBottom?: BooleanField;
8
+ noData?: BooleanField;
9
+ backgroundColor?: StringField;
10
+ products?: BooleanField;
11
+ onlyMobile?: BooleanField;
12
+ onlyDesktop?: BooleanField;
13
+ offers?: BooleanField;
13
14
  }
14
15
  export declare const Container: ({ title, labelsColor, children, backgroundColor, onlyMobile, onlyDesktop, }: ContainerProps) => JSX.Element;
15
16
  export {};
@@ -1,28 +1,29 @@
1
+ import type { BooleanField, GroupField, StringField } from '@sentecacommerce-theme/cms';
1
2
  interface EmptyBoxProps {
2
- backgroundColor?: string;
3
+ backgroundColor?: StringField;
3
4
  searchHistory?: any[];
4
- labels: {
5
- promoOffersLabel: string;
6
- productsLabel: string;
7
- recentSearchesLabel: string;
8
- popularSearchesLabel: string;
9
- blogLabel: string;
10
- blog: {
11
- blogTitle: string;
12
- image: string;
13
- url: string;
14
- description: string;
15
- };
16
- };
17
- labelsColor: string;
18
- textColor: string;
5
+ labels: GroupField<{
6
+ promoOffersLabel: StringField;
7
+ productsLabel: StringField;
8
+ recentSearchesLabel: StringField;
9
+ popularSearchesLabel: StringField;
10
+ blogLabel: StringField;
11
+ blog: GroupField<{
12
+ blogTitle: StringField;
13
+ image: StringField;
14
+ url: StringField;
15
+ description: StringField;
16
+ }>;
17
+ }>;
18
+ labelsColor: StringField;
19
+ textColor: StringField;
19
20
  onClose?: () => void;
20
- canDisplayPopular: boolean;
21
- withRecent?: boolean;
22
- canDisplayRecent?: boolean;
21
+ canDisplayPopular: BooleanField;
22
+ withRecent?: BooleanField;
23
+ canDisplayRecent?: BooleanField;
23
24
  promoOffers?: any[];
24
- searchValue?: string;
25
- isLoading?: boolean;
25
+ searchValue?: StringField;
26
+ isLoading?: BooleanField;
26
27
  }
27
28
  export declare const EmptyBox: ({ backgroundColor, searchHistory, labels, labelsColor, textColor, onClose, canDisplayPopular, canDisplayRecent, withRecent, promoOffers, searchValue, isLoading, }: EmptyBoxProps) => JSX.Element;
28
29
  export {};
@@ -1,12 +1,13 @@
1
1
  import { SearchResultDTO } from '@sentecacommerce/sdk';
2
+ import { BooleanField, NumberField, StringField } from '@sentecacommerce-theme/cms';
2
3
  export declare const ProductCard: ({ item, bottomMenu, priceColor, textColor, labelsColor, onClose, isLast, offers, productSpacing, }: {
3
4
  item: SearchResultDTO;
4
- bottomMenu?: string | undefined;
5
- priceColor?: string | undefined;
6
- textColor: string;
7
- labelsColor: string;
5
+ bottomMenu?: StringField;
6
+ priceColor?: StringField;
7
+ textColor: StringField;
8
+ labelsColor: StringField;
8
9
  onClose?: (() => void) | undefined;
9
- isLast: boolean;
10
- offers?: boolean | undefined;
11
- productSpacing?: number | undefined;
10
+ isLast: BooleanField;
11
+ offers?: BooleanField;
12
+ productSpacing?: NumberField;
12
13
  }) => JSX.Element;