@sentecacommerce-theme/lib 0.12.103 → 0.13.1

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 (80) hide show
  1. package/dist/cjs/analytics/Pixel/mainScript.js +1 -2
  2. package/dist/cjs/api/getSDKConfig.js +2 -4
  3. package/dist/cjs/api/myCartApi/index.js +2 -8
  4. package/dist/cjs/basket/api/mutations/index.js +0 -14
  5. package/dist/cjs/basket/hooks/index.js +0 -12
  6. package/dist/cjs/config/SentecaProvider.js +1 -3
  7. package/dist/cjs/hooks/useAggregateResult/index.js +1 -5
  8. package/dist/cjs/hooks/useAvailability/index.js +1 -1
  9. package/dist/cjs/hooks/useClearAllFilters/index.js +0 -2
  10. package/dist/cjs/hooks/useProduct/index.js +26 -36
  11. package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +15 -39
  12. package/dist/cjs/listing/api/queries/useListingQuery.js +1 -1
  13. package/dist/cjs/listing/hooks/useListingFilters.js +1 -7
  14. package/dist/cjs/listing/hooks/useListingMeta.js +40 -49
  15. package/dist/cjs/listing/hooks/useSlideFilter.js +4 -27
  16. package/dist/cjs/listing/ssr/prefetchCategories.js +6 -5
  17. package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
  18. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  19. package/dist/cjs/navigation/components/SearchBox/index.js +4 -4
  20. package/dist/cjs/seo/components/TranslationsMeta/index.js +14 -43
  21. package/dist/cjs/seo/components/index.js +0 -12
  22. package/dist/cjs/seo/hooks/useSeoTranslations.js +14 -55
  23. package/dist/cjs/ui/components/GridStyles.js +2 -2
  24. package/dist/cjs/ui/components/RangeSliderInput.js +1 -14
  25. package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +3 -49
  26. package/dist/cjs/utils/getSelectedFilters.js +1 -3
  27. package/dist/cjs/utils/index.js +0 -12
  28. package/dist/cjs/utils/isTouchDevice.js +1 -2
  29. package/dist/esm/analytics/Pixel/mainScript.js +1 -2
  30. package/dist/esm/api/getSDKConfig.js +3 -5
  31. package/dist/esm/api/myCartApi/index.js +2 -8
  32. package/dist/esm/basket/api/mutations/index.js +0 -1
  33. package/dist/esm/basket/hooks/index.js +0 -1
  34. package/dist/esm/config/SentecaProvider.js +1 -3
  35. package/dist/esm/hooks/useAggregateResult/index.js +1 -5
  36. package/dist/esm/hooks/useAvailability/index.js +1 -1
  37. package/dist/esm/hooks/useClearAllFilters/index.js +0 -2
  38. package/dist/esm/hooks/useProduct/index.js +18 -28
  39. package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +13 -21
  40. package/dist/esm/listing/api/queries/useListingQuery.js +1 -1
  41. package/dist/esm/listing/hooks/useListingFilters.js +1 -7
  42. package/dist/esm/listing/hooks/useListingMeta.js +40 -49
  43. package/dist/esm/listing/hooks/useSlideFilter.js +4 -27
  44. package/dist/esm/listing/ssr/prefetchCategories.js +7 -6
  45. package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
  46. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  47. package/dist/esm/navigation/components/SearchBox/index.js +4 -4
  48. package/dist/esm/seo/components/TranslationsMeta/index.js +14 -43
  49. package/dist/esm/seo/components/index.js +0 -1
  50. package/dist/esm/seo/hooks/useSeoTranslations.js +14 -55
  51. package/dist/esm/ui/components/GridStyles.js +2 -2
  52. package/dist/esm/ui/components/RangeSliderInput.js +1 -14
  53. package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +3 -44
  54. package/dist/esm/utils/getSelectedFilters.js +1 -3
  55. package/dist/esm/utils/index.js +0 -1
  56. package/dist/esm/utils/isTouchDevice.js +1 -2
  57. package/dist/types/basket/api/mutations/index.d.ts +0 -1
  58. package/dist/types/basket/hooks/index.d.ts +0 -1
  59. package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +2 -1
  60. package/dist/types/hooks/useProduct/index.d.ts +1 -2
  61. package/dist/types/listing/hooks/useSlideFilter.d.ts +0 -4
  62. package/dist/types/listing/types.d.ts +0 -10
  63. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +4 -5
  64. package/dist/types/navigation/components/SearchBox/index.d.ts +6 -7
  65. package/dist/types/seo/components/index.d.ts +0 -1
  66. package/dist/types/seo/hooks/useSeoTranslations.d.ts +3 -5
  67. package/dist/types/ui/components/GridStyles.d.ts +1 -2
  68. package/dist/types/ui/components/RangeSliderInput.d.ts +1 -2
  69. package/dist/types/utils/index.d.ts +0 -1
  70. package/package.json +4 -4
  71. package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +0 -116
  72. package/dist/cjs/basket/hooks/useChangeGiftVariant.js +0 -16
  73. package/dist/cjs/utils/getLocaleFromPath.js +0 -13
  74. package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +0 -106
  75. package/dist/esm/basket/hooks/useChangeGiftVariant.js +0 -3
  76. package/dist/esm/utils/getLocaleFromPath.js +0 -8
  77. package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +0 -2
  78. package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +0 -2
  79. package/dist/types/seo/components/TranslationsMeta/index.d.ts +0 -1
  80. package/dist/types/utils/getLocaleFromPath.d.ts +0 -1
@@ -173,14 +173,14 @@ export var SearchBox = function(param) {
173
173
  data: displayableBrands,
174
174
  onClose: onClose,
175
175
  searchValue: searchValue || '',
176
- title: (labels === null || labels === void 0 ? void 0 : labels.suggestedBrands) || '',
176
+ title: (labels === null || labels === void 0 ? void 0 : labels.suggestedBrandsLabel) || '',
177
177
  labelsColor: labelsColor || '',
178
178
  textColor: textColor || ''
179
179
  })), suggestedCategories.length > 0 && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Suggestions, {
180
180
  data: suggestedCategories,
181
181
  onClose: onClose,
182
182
  searchValue: searchValue || '',
183
- title: (labels === null || labels === void 0 ? void 0 : labels.suggestedCategories) || '',
183
+ title: (labels === null || labels === void 0 ? void 0 : labels.suggestedCategoriesLabel) || '',
184
184
  labelsColor: labelsColor || '',
185
185
  textColor: textColor || ''
186
186
  }))), /*#__PURE__*/ React.createElement(ProductsWrapper, {
@@ -188,7 +188,7 @@ export var SearchBox = function(param) {
188
188
  }, /*#__PURE__*/ React.createElement(Products, {
189
189
  data: suggestions,
190
190
  bottomMenu: bottomMenu,
191
- title: labels === null || labels === void 0 ? void 0 : labels.products,
191
+ title: labels === null || labels === void 0 ? void 0 : labels.productsLabel,
192
192
  priceColor: priceColor,
193
193
  labelsColor: labelsColor,
194
194
  textColor: textColor,
@@ -197,7 +197,7 @@ export var SearchBox = function(param) {
197
197
  productSpacing: productSpacing
198
198
  }), bottomMenu === BottomMenuEnum.promo && promoOffers && /*#__PURE__*/ React.createElement(Products, {
199
199
  data: promoOffers,
200
- title: labels.promoOffers,
200
+ title: labels.promoOffersLabel,
201
201
  labelsColor: labelsColor,
202
202
  textColor: textColor,
203
203
  onClose: onClose,
@@ -1,48 +1,19 @@
1
1
  import React from 'react';
2
2
  import { useSeoTranslations } from '../../hooks/useSeoTranslations';
3
3
  import Head from 'next/head';
4
- import { useRouter } from 'next/router';
5
- function _extends() {
6
- _extends = Object.assign || function(target) {
7
- for(var i = 1; i < arguments.length; i++){
8
- var source = arguments[i];
9
- for(var key in source){
10
- if (Object.prototype.hasOwnProperty.call(source, key)) {
11
- target[key] = source[key];
12
- }
13
- }
14
- }
15
- return target;
16
- };
17
- return _extends.apply(this, arguments);
18
- }
19
4
  export var TranslationsMeta = function() {
20
- var ref = useSeoTranslations(), translationsMap = ref.translationsMap, allLocales = ref.allLocales, defaultLocale = ref.defaultLocale;
21
- var router = useRouter();
22
- var defaultTranslation = translationsMap[defaultLocale];
23
- var isError = router.route === '/404' || router.route === '/_error';
24
- if (isError) return null;
25
- var domain = defaultTranslation === null || defaultTranslation === void 0 ? void 0 : defaultTranslation.domain;
26
- return(/*#__PURE__*/ React.createElement(Head, null, allLocales === null || allLocales === void 0 ? void 0 : allLocales.map(function(locale) {
27
- var translation = translationsMap === null || translationsMap === void 0 ? void 0 : translationsMap[locale];
28
- var href = translation === null || translation === void 0 ? void 0 : translation.slug;
29
- // go to the same page but with the right locale.
30
- // This is for pages that does not have a translated slug
31
- // example: /checkout -> /en/checkout, /ro/checkout
32
- if (!href) href = "/".concat(locale).concat(router.asPath);
33
- return(/*#__PURE__*/ React.createElement("link", _extends({
34
- rel: "alternate"
35
- }, {
36
- hreflang: locale
37
- }, {
38
- href: domain + href,
39
- key: 'Translation__' + href
40
- })));
41
- }), defaultTranslation && /*#__PURE__*/ React.createElement("link", _extends({
42
- rel: "alternate"
43
- }, {
44
- hreflang: 'x-default'
45
- }, {
46
- href: "".concat(domain).concat(defaultTranslation === null || defaultTranslation === void 0 ? void 0 : defaultTranslation.slug)
47
- }))));
5
+ var ref = useSeoTranslations() || {}, translations = ref.translations, defaultLocaleSlug = ref.defaultLocaleSlug;
6
+ if (!translations || !defaultLocaleSlug) return null;
7
+ return(/*#__PURE__*/ React.createElement(Head, null, translations === null || translations === void 0 ? void 0 : translations.map(function(translation) {
8
+ return(/*#__PURE__*/ React.createElement("link", {
9
+ rel: "alternate",
10
+ hrefLang: translation.locale,
11
+ href: translation.slug,
12
+ key: 'Translation__' + translation.slug
13
+ }));
14
+ }), /*#__PURE__*/ React.createElement("link", {
15
+ rel: "alternate",
16
+ hrefLang: "x-default",
17
+ href: defaultLocaleSlug
18
+ })));
48
19
  };
@@ -4,4 +4,3 @@ export * from './GlobalSEO';
4
4
  export * from './OpenGraph';
5
5
  export * from './ProductSEO';
6
6
  export * from './HiddenBreadcrumb';
7
- export * from './TranslationsMeta';
@@ -1,79 +1,38 @@
1
1
  import React from 'react';
2
- import { useRouter } from 'next/router';
3
- function _defineProperty(obj, key, value) {
4
- if (key in obj) {
5
- Object.defineProperty(obj, key, {
6
- value: value,
7
- enumerable: true,
8
- configurable: true,
9
- writable: true
10
- });
11
- } else {
12
- obj[key] = value;
13
- }
14
- return obj;
15
- }
16
- function _objectSpread(target) {
17
- for(var i = 1; i < arguments.length; i++){
18
- var source = arguments[i] != null ? arguments[i] : {};
19
- var ownKeys = Object.keys(source);
20
- if (typeof Object.getOwnPropertySymbols === "function") {
21
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
22
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
23
- }));
24
- }
25
- ownKeys.forEach(function(key) {
26
- _defineProperty(target, key, source[key]);
27
- });
28
- }
29
- return target;
30
- }
31
2
  var SeoTranslationsContext = /*#__PURE__*/ React.createContext({});
32
3
  export var SeoTranslationsProvider = function(param) {
33
4
  var children = param.children, translations = param.translations, defaultLocale = param.defaultLocale, localesMap = param.localesMap;
34
- var router = useRouter();
35
- var currentLocale = router.locale;
36
- var currentPath = router.asPath;
37
5
  var data1 = React.useMemo(function() {
38
- if (!translations) translations = {};
39
- translations[currentLocale] = {
40
- slug: currentPath.split('?')[0].replace("/".concat(currentLocale), ''),
41
- title: '',
42
- id: Date.now().toString()
43
- };
44
- var map = Object.keys(translations || {}).filter(function(lang) {
6
+ var defaultLocaleSlug = '';
7
+ var list = Object.keys(translations || {}).filter(function(lang) {
45
8
  return Boolean(localesMap[lang]);
46
- }).reduce(function(acc, lang) {
47
- var ref;
9
+ }).map(function(lang) {
48
10
  var data = translations === null || translations === void 0 ? void 0 : translations[lang];
49
11
  var localeData = localesMap[lang];
50
12
  var isDefault = defaultLocale === lang;
51
- var isFrontPage = data.slug === '/';
52
- var prefix = ((ref = data.slug) === null || ref === void 0 ? void 0 : ref[0]) === '/' ? '' : '/';
53
- var slug = "".concat(isDefault ? '' : "/".concat(lang)).concat(prefix).concat(isFrontPage ? '' : data.slug);
54
- return _objectSpread({}, acc, _defineProperty({}, lang, {
13
+ var slug = "".concat(localeData.domain, "/").concat(isDefault ? lang + '/' : '').concat(data.slug);
14
+ if (isDefault) defaultLocaleSlug = slug;
15
+ return {
55
16
  slug: slug,
17
+ title: data.title,
56
18
  locale: lang,
57
- isDefault: isDefault,
58
- domain: "https://".concat(localeData.domain)
59
- }));
60
- }, {});
19
+ isDefault: isDefault
20
+ };
21
+ });
61
22
  return {
62
- translationsMap: map,
23
+ translations: list,
63
24
  defaultLocale: defaultLocale,
64
- allLocales: Object.keys(localesMap)
25
+ defaultLocaleSlug: defaultLocaleSlug
65
26
  };
66
27
  }, [
67
28
  defaultLocale,
68
29
  translations,
69
- localesMap,
70
- currentLocale,
71
- currentPath
30
+ localesMap
72
31
  ]);
73
32
  return(/*#__PURE__*/ React.createElement(SeoTranslationsContext.Provider, {
74
33
  value: data1
75
34
  }, children));
76
35
  };
77
36
  export var useSeoTranslations = function() {
78
- return React.useContext(SeoTranslationsContext) || {};
37
+ return React.useContext(SeoTranslationsContext);
79
38
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export var GridStyles = function(param) {
3
- var spaceX = param.spaceX, breakpoints = param.breakpoints, _remSize = param.remSize, remSize = _remSize === void 0 ? 10 : _remSize, _spaceBetweenSections = param.spaceBetweenSections, spaceBetweenSections = _spaceBetweenSections === void 0 ? 80 : _spaceBetweenSections;
3
+ var spaceX = param.spaceX, breakpoints = param.breakpoints, _remSize = param.remSize, remSize = _remSize === void 0 ? 10 : _remSize;
4
4
  var getSize = function getSize(width) {
5
5
  return "min-width: calc(".concat(width, "% - ").concat(spaceX / remSize, "rem);") + "max-width: calc(".concat(width, "% - ").concat(spaceX / remSize, "rem);") + "margin: 0 ".concat(spaceX / 2 / remSize, "rem;");
6
6
  };
@@ -20,7 +20,7 @@ export var GridStyles = function(param) {
20
20
  }, '');
21
21
  return(/*#__PURE__*/ React.createElement("style", {
22
22
  dangerouslySetInnerHTML: {
23
- __html: "\n .Page--row {\n display: flex;\n display: -webkit-flex;\n flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n margin: 0 -".concat(spaceX / remSize / 2, "rem;\n }\n\n .Page__section {\n padding-bottom: ").concat(spaceBetweenSections / remSize, "rem;\n }\n\n .Page--col {\n display: block;\n width: 100%;\n }\n \n .size-default-inherit {\n width: 100%;\n }\n ").concat(queries, "\n ")
23
+ __html: "\n .Page--row {\n display: flex;\n display: -webkit-flex;\n flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n margin: 0 -".concat(spaceX / remSize / 2, "rem;\n }\n\n .Page__section {\n padding-bottom: 8rem;\n }\n\n .Page--col {\n display: block;\n width: 100%;\n }\n \n .size-default-inherit {\n width: 100%;\n }\n ").concat(queries, "\n ")
24
24
  }
25
25
  }));
26
26
  };
@@ -117,7 +117,7 @@ export var RangeSlideClasses = {
117
117
  thumbActive: 'RangeSlider--thumb-active'
118
118
  };
119
119
  export var RangeSliderInput = function(param) {
120
- var defaultValue = param.defaultValue, onChange = param.onChange, onSlide = param.onSlide, _min = param.min, min = _min === void 0 ? 0 : _min, _max = param.max, max = _max === void 0 ? 100 : _max, _step = param.step, step = _step === void 0 ? 1 : _step;
120
+ var defaultValue = param.defaultValue, onChange = param.onChange, _min = param.min, min = _min === void 0 ? 0 : _min, _max = param.max, max = _max === void 0 ? 100 : _max, _step = param.step, step = _step === void 0 ? 1 : _step;
121
121
  var ref1 = _slicedToArray(useState(defaultValue), 2), value = ref1[0], setValue = ref1[1];
122
122
  var inputLeftRef = React.useRef(null);
123
123
  var inputRightRef = React.useRef(null);
@@ -130,17 +130,6 @@ export var RangeSliderInput = function(param) {
130
130
  }, [
131
131
  defaultValue
132
132
  ]);
133
- var onSlideGeneric = function() {
134
- var inputLeft = inputLeftRef.current;
135
- var inputRight = inputRightRef.current;
136
- if (!inputLeft || !inputRight) return;
137
- var leftValue = Math.min(Number(inputLeft.value), Number(inputRight.value) - 1);
138
- var rightValue = Math.max(Number(inputRight.value), Number(inputLeft.value) + 1);
139
- onSlide === null || onSlide === void 0 ? void 0 : onSlide({
140
- left: leftValue,
141
- right: rightValue
142
- });
143
- };
144
133
  var updateLeftValue = useCallback(function() {
145
134
  var inputLeft = inputLeftRef.current;
146
135
  var inputRight = inputRightRef.current;
@@ -149,7 +138,6 @@ export var RangeSliderInput = function(param) {
149
138
  setValue(_objectSpread({}, value, {
150
139
  left: leftValue
151
140
  }));
152
- onSlideGeneric();
153
141
  }, [
154
142
  setValue,
155
143
  value
@@ -162,7 +150,6 @@ export var RangeSliderInput = function(param) {
162
150
  setValue(_objectSpread({}, value, {
163
151
  right: rightValue
164
152
  }));
165
- onSlideGeneric();
166
153
  }, [
167
154
  setValue,
168
155
  value
@@ -1,50 +1,9 @@
1
- import regeneratorRuntime from "regenerator-runtime";
2
1
  import { MyWalletGetByType } from '@sentecacommerce/sdk';
3
2
  import { useQuery } from 'react-query';
4
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
5
- try {
6
- var info = gen[key](arg);
7
- var value = info.value;
8
- } catch (error) {
9
- reject(error);
10
- return;
11
- }
12
- if (info.done) {
13
- resolve(value);
14
- } else {
15
- Promise.resolve(value).then(_next, _throw);
16
- }
17
- }
18
- function _asyncToGenerator(fn) {
19
- return function() {
20
- var self = this, args = arguments;
21
- return new Promise(function(resolve, reject) {
22
- var gen = fn.apply(self, args);
23
- function _next(value) {
24
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
25
- }
26
- function _throw(err) {
27
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
28
- }
29
- _next(undefined);
30
- });
31
- };
32
- }
33
3
  export var useGetMyLoyaltyCardQuery = function(callback) {
34
- return useQuery('get-loyalty-card-key', _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
35
- return regeneratorRuntime.wrap(function _callee$(_ctx) {
36
- while(1)switch(_ctx.prev = _ctx.next){
37
- case 0:
38
- return _ctx.abrupt("return", MyWalletGetByType('loyalty-program'));
39
- case 1:
40
- case "end":
41
- return _ctx.stop();
42
- }
43
- }, _callee);
44
- })), {
45
- refetchOnMount: false,
46
- refetchOnWindowFocus: false,
47
- retry: false,
4
+ return useQuery('get-loyalty-card-key', function() {
5
+ return MyWalletGetByType('loyalty-program');
6
+ }, {
48
7
  onSuccess: function() {
49
8
  var ref;
50
9
  return callback === null || callback === void 0 ? void 0 : (ref = callback.onSuccess) === null || ref === void 0 ? void 0 : ref.call(callback);
@@ -95,9 +95,7 @@ export var getSelectedFilters = function(router, slug, data, config) {
95
95
  aggType: key,
96
96
  aggKey: "".concat(valueFrom, ",").concat(valueTo),
97
97
  aggOperator: filtersOperatorsMap.stats
98
- }, true, router), undefined, {
99
- shallow: true
100
- });
98
+ }, true, router));
101
99
  },
102
100
  selected: true,
103
101
  data: _objectSpread({}, data.raw, {
@@ -13,7 +13,6 @@ export * from './getTranslatableField';
13
13
  export * from './formatAsCurrency';
14
14
  export * from './createCatalogBreadcrumb';
15
15
  export * from './adjustColor';
16
- export * from './getLocaleFromPath';
17
16
  export * from './calcDiscount';
18
17
  export * from './canUseDom';
19
18
  export * from './getFirst';
@@ -1,4 +1,3 @@
1
- import { canUseDOM } from "./canUseDom";
2
1
  export function isTouchDevice() {
3
- return canUseDOM() && ('ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2
+ return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
4
3
  }
@@ -1,2 +1 @@
1
1
  export * from './useReplaceBasketMutation';
2
- export * from './useChangeGiftVariant';
@@ -1,3 +1,2 @@
1
1
  export * from './useReplaceBasket';
2
2
  export * from './useBasketCrossSaleItems';
3
- export * from './useChangeGiftVariant';
@@ -2,7 +2,7 @@ import { LineItemDTO, LineItemDTOLineItemModeEnum, LineItemDTOStatusEnum, MoneyD
2
2
  import { BaseProductType } from '../../useLineItem';
3
3
  import { SelectedOptionType } from '../../useProduct/utils';
4
4
  import { AssetsMap } from '../../../utils/assetsToMap';
5
- export interface BasketLineItemProps extends BaseProductType {
5
+ interface BasketLineItemProps extends BaseProductType {
6
6
  productId: string;
7
7
  lineItemId: string;
8
8
  quantityInBasket: number;
@@ -36,3 +36,4 @@ export declare const useBasketLineItem: (props: {
36
36
  item: LineItemDTO;
37
37
  expiry?: number;
38
38
  }) => BasketLineItemProps;
39
+ export {};
@@ -128,7 +128,6 @@ declare type ProductProviderProps = {
128
128
  expand?: string;
129
129
  project?: string;
130
130
  };
131
- includeBrandInName?: boolean;
132
131
  };
133
132
  declare type ProductStateContextType = {
134
133
  attributeRules: AttributeRulesMap;
@@ -164,7 +163,7 @@ declare type CountFunctionsContextType = {
164
163
  };
165
164
  getProductVideos: () => VideoType[];
166
165
  };
167
- export declare function ProductProvider({ product, children, defaultVariantId, includeBrandInName, }: ProductProviderProps): JSX.Element;
166
+ export declare function ProductProvider({ product, children, defaultVariantId, }: ProductProviderProps): JSX.Element;
168
167
  export declare function useProductState(): ProductStateContextType;
169
168
  export declare function useProductFunctions(): CountFunctionsContextType;
170
169
  export declare function useProduct(slug: string, config?: getProductBySlugConfig): import("react-query").QueryResult<ProductDTO, unknown>;
@@ -3,10 +3,6 @@ export declare const useSlideFilter: (filterName: string, min: number, max: numb
3
3
  from: number;
4
4
  to: number;
5
5
  };
6
- applyFilter: (data: {
7
- from: number;
8
- to: number;
9
- }) => void;
10
6
  updateValue: (data: {
11
7
  from: number;
12
8
  to: number;
@@ -84,14 +84,4 @@ export interface ListingPageMeta {
84
84
  collapseMode?: StringField;
85
85
  limit: NumberField;
86
86
  includeVariants?: BooleanField;
87
- getTitle?: GetListingPageTitle;
88
87
  }
89
- export declare type GetListingPageTitle = (type: ListingTypesEnum, meta: Omit<ListingPageMeta, 'getTitle'>, data: {
90
- brand?: string;
91
- category?: string;
92
- defaultName?: string;
93
- attribute?: string;
94
- search?: string;
95
- isWithAttribute: boolean;
96
- childAttribute?: string;
97
- }) => string;
@@ -3,12 +3,11 @@ interface EmptyBoxProps {
3
3
  backgroundColor?: StringField;
4
4
  searchHistory?: any[];
5
5
  labels: GroupField<{
6
- promoOffers: StringField;
7
- products: StringField;
8
- recentSearches: StringField;
9
- popularSearches: StringField;
6
+ promoOffersLabel: StringField;
7
+ productsLabel: StringField;
8
+ recentSearchesLabel: StringField;
9
+ popularSearchesLabel: StringField;
10
10
  blogLabel: StringField;
11
- noResults: StringField;
12
11
  blog: GroupField<{
13
12
  blogTitle: StringField;
14
13
  image: StringField;
@@ -1,13 +1,12 @@
1
1
  import { StringField, GroupField, BooleanField, NumberField } from '@sentecacommerce-theme/cms';
2
2
  interface SearchLabels {
3
- recentSearches: StringField;
4
- popularSearches: StringField;
5
- suggestedBrands: StringField;
6
- suggestedCategories: StringField;
7
- promoOffers: StringField;
8
- products: StringField;
3
+ recentSearchesLabel: StringField;
4
+ popularSearchesLabel: StringField;
5
+ suggestedBrandsLabel: StringField;
6
+ suggestedCategoriesLabel: StringField;
7
+ promoOffersLabel: StringField;
8
+ productsLabel: StringField;
9
9
  blogLabel: StringField;
10
- noResults: StringField;
11
10
  blog: GroupField<{
12
11
  blogTitle: StringField;
13
12
  image: StringField;
@@ -4,4 +4,3 @@ export * from './GlobalSEO';
4
4
  export * from './OpenGraph';
5
5
  export * from './ProductSEO';
6
6
  export * from './HiddenBreadcrumb';
7
- export * from './TranslationsMeta';
@@ -10,15 +10,13 @@ export declare const SeoTranslationsProvider: ({ children, translations, default
10
10
  }) => JSX.Element;
11
11
  export declare const useSeoTranslations: () => SeoTranslationContextType;
12
12
  export declare type SeoTranslationContextType = {
13
- translationsMap: {
14
- [key: string]: SeoTranslationType;
15
- };
13
+ translations: SeoTranslationType[];
16
14
  defaultLocale: string;
17
- allLocales: string[];
15
+ defaultLocaleSlug: string;
18
16
  };
19
17
  export declare type SeoTranslationType = {
20
18
  slug: string;
19
+ title: string;
21
20
  locale: string;
22
21
  isDefault: boolean;
23
- domain: string;
24
22
  };
@@ -1,5 +1,5 @@
1
1
  import { StringField } from '@sentecacommerce-theme/cms';
2
- export declare const GridStyles: ({ spaceX, breakpoints, remSize, spaceBetweenSections, }: {
2
+ export declare const GridStyles: ({ spaceX, breakpoints, remSize, }: {
3
3
  breakpoints?: {
4
4
  [key: string]: {
5
5
  min: StringField;
@@ -7,5 +7,4 @@ export declare const GridStyles: ({ spaceX, breakpoints, remSize, spaceBetweenSe
7
7
  } | undefined;
8
8
  spaceX: number;
9
9
  remSize?: number | undefined;
10
- spaceBetweenSections?: number | undefined;
11
10
  }) => JSX.Element;
@@ -15,12 +15,11 @@ export declare const RangeSlideClasses: {
15
15
  thumbHover: string;
16
16
  thumbActive: string;
17
17
  };
18
- export declare const RangeSliderInput: ({ defaultValue, onChange, onSlide, min, max, step, }: {
18
+ export declare const RangeSliderInput: ({ defaultValue, onChange, min, max, step, }: {
19
19
  min: number;
20
20
  max: number;
21
21
  step: number;
22
22
  defaultValue: ValueType;
23
23
  onChange: (data: ValueType) => void;
24
- onSlide?: ((data: ValueType) => void) | undefined;
25
24
  }) => JSX.Element;
26
25
  export {};
@@ -13,7 +13,6 @@ export * from './getTranslatableField';
13
13
  export * from './formatAsCurrency';
14
14
  export * from './createCatalogBreadcrumb';
15
15
  export * from './adjustColor';
16
- export * from './getLocaleFromPath';
17
16
  export * from './calcDiscount';
18
17
  export * from './canUseDom';
19
18
  export * from './getFirst';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.12.103",
4
+ "version": "0.13.1",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,13 +31,13 @@
31
31
  "watch:cjs": "swc src --out-dir dist/cjs -w",
32
32
  "watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
33
33
  },
34
- "gitHead": "e9fda963cf3c34b48d7e8dae9326804fa4dda4ec",
34
+ "gitHead": "2a9d7fd163520fde743840e137093cc0acc9d2d7",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.12.103",
40
- "@sentecacommerce-theme/cms": "^0.12.103",
39
+ "@sentecacommerce-theme/base": "^0.13.1",
40
+ "@sentecacommerce-theme/cms": "^0.13.1",
41
41
  "@sentecacommerce/sdk": "2.0.161",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",