@sentecacommerce-theme/lib 0.13.1 → 0.13.2

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 (89) hide show
  1. package/dist/cjs/analytics/Pixel/mainScript.js +2 -1
  2. package/dist/cjs/api/getSDKConfig.js +4 -2
  3. package/dist/cjs/api/myCartApi/index.js +8 -2
  4. package/dist/cjs/basket/api/mutations/index.js +14 -0
  5. package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +116 -0
  6. package/dist/cjs/basket/hooks/index.js +12 -0
  7. package/dist/cjs/basket/hooks/useChangeGiftVariant.js +16 -0
  8. package/dist/cjs/config/SentecaProvider.js +3 -1
  9. package/dist/cjs/hooks/useAggregateResult/index.js +5 -1
  10. package/dist/cjs/hooks/useAvailability/index.js +1 -1
  11. package/dist/cjs/hooks/useClearAllFilters/index.js +2 -0
  12. package/dist/cjs/hooks/useProduct/index.js +36 -26
  13. package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +39 -15
  14. package/dist/cjs/listing/api/queries/useListingQuery.js +1 -1
  15. package/dist/cjs/listing/hooks/useListingBreadcrumbs.js +20 -8
  16. package/dist/cjs/listing/hooks/useListingCategories.js +2 -2
  17. package/dist/cjs/listing/hooks/useListingFilters.js +7 -1
  18. package/dist/cjs/listing/hooks/useListingMeta.js +51 -40
  19. package/dist/cjs/listing/hooks/useSlideFilter.js +27 -4
  20. package/dist/cjs/listing/ssr/prefetchCategories.js +5 -6
  21. package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
  22. package/dist/cjs/listing/utils/buildCategoryQuery.js +22 -1
  23. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  24. package/dist/cjs/navigation/components/SearchBox/index.js +4 -4
  25. package/dist/cjs/seo/components/TranslationsMeta/index.js +43 -14
  26. package/dist/cjs/seo/components/index.js +12 -0
  27. package/dist/cjs/seo/hooks/useSeoTranslations.js +55 -14
  28. package/dist/cjs/ui/components/GridStyles.js +2 -2
  29. package/dist/cjs/ui/components/RangeSliderInput.js +14 -1
  30. package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +49 -3
  31. package/dist/cjs/utils/getLocaleFromPath.js +13 -0
  32. package/dist/cjs/utils/getSelectedFilters.js +3 -1
  33. package/dist/cjs/utils/index.js +12 -0
  34. package/dist/cjs/utils/isTouchDevice.js +2 -1
  35. package/dist/cjs/utils/localStorage.js +7 -2
  36. package/dist/esm/analytics/Pixel/mainScript.js +2 -1
  37. package/dist/esm/api/getSDKConfig.js +5 -3
  38. package/dist/esm/api/myCartApi/index.js +8 -2
  39. package/dist/esm/basket/api/mutations/index.js +1 -0
  40. package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +106 -0
  41. package/dist/esm/basket/hooks/index.js +1 -0
  42. package/dist/esm/basket/hooks/useChangeGiftVariant.js +3 -0
  43. package/dist/esm/config/SentecaProvider.js +3 -1
  44. package/dist/esm/hooks/useAggregateResult/index.js +5 -1
  45. package/dist/esm/hooks/useAvailability/index.js +1 -1
  46. package/dist/esm/hooks/useClearAllFilters/index.js +2 -0
  47. package/dist/esm/hooks/useProduct/index.js +28 -18
  48. package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +21 -13
  49. package/dist/esm/listing/api/queries/useListingQuery.js +1 -1
  50. package/dist/esm/listing/hooks/useListingBreadcrumbs.js +15 -3
  51. package/dist/esm/listing/hooks/useListingCategories.js +2 -2
  52. package/dist/esm/listing/hooks/useListingFilters.js +7 -1
  53. package/dist/esm/listing/hooks/useListingMeta.js +51 -42
  54. package/dist/esm/listing/hooks/useSlideFilter.js +27 -4
  55. package/dist/esm/listing/ssr/prefetchCategories.js +6 -7
  56. package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
  57. package/dist/esm/listing/utils/buildCategoryQuery.js +22 -1
  58. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  59. package/dist/esm/navigation/components/SearchBox/index.js +4 -4
  60. package/dist/esm/seo/components/TranslationsMeta/index.js +43 -14
  61. package/dist/esm/seo/components/index.js +1 -0
  62. package/dist/esm/seo/hooks/useSeoTranslations.js +55 -14
  63. package/dist/esm/ui/components/GridStyles.js +2 -2
  64. package/dist/esm/ui/components/RangeSliderInput.js +14 -1
  65. package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +44 -3
  66. package/dist/esm/utils/getLocaleFromPath.js +8 -0
  67. package/dist/esm/utils/getSelectedFilters.js +3 -1
  68. package/dist/esm/utils/index.js +1 -0
  69. package/dist/esm/utils/isTouchDevice.js +2 -1
  70. package/dist/esm/utils/localStorage.js +7 -2
  71. package/dist/types/basket/api/mutations/index.d.ts +1 -0
  72. package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +2 -0
  73. package/dist/types/basket/hooks/index.d.ts +1 -0
  74. package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +2 -0
  75. package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +1 -2
  76. package/dist/types/hooks/useProduct/index.d.ts +2 -1
  77. package/dist/types/listing/hooks/useListingMeta.d.ts +4 -0
  78. package/dist/types/listing/hooks/useSlideFilter.d.ts +4 -0
  79. package/dist/types/listing/types.d.ts +10 -0
  80. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +5 -4
  81. package/dist/types/navigation/components/SearchBox/index.d.ts +7 -6
  82. package/dist/types/seo/components/TranslationsMeta/index.d.ts +1 -0
  83. package/dist/types/seo/components/index.d.ts +1 -0
  84. package/dist/types/seo/hooks/useSeoTranslations.d.ts +5 -3
  85. package/dist/types/ui/components/GridStyles.d.ts +2 -1
  86. package/dist/types/ui/components/RangeSliderInput.d.ts +2 -1
  87. package/dist/types/utils/getLocaleFromPath.d.ts +1 -0
  88. package/dist/types/utils/index.d.ts +1 -0
  89. package/package.json +2 -2
@@ -1,38 +1,79 @@
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
+ }
2
31
  var SeoTranslationsContext = /*#__PURE__*/ React.createContext({});
3
32
  export var SeoTranslationsProvider = function(param) {
4
33
  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;
5
37
  var data1 = React.useMemo(function() {
6
- var defaultLocaleSlug = '';
7
- var list = Object.keys(translations || {}).filter(function(lang) {
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) {
8
45
  return Boolean(localesMap[lang]);
9
- }).map(function(lang) {
46
+ }).reduce(function(acc, lang) {
47
+ var ref;
10
48
  var data = translations === null || translations === void 0 ? void 0 : translations[lang];
11
49
  var localeData = localesMap[lang];
12
50
  var isDefault = defaultLocale === lang;
13
- var slug = "".concat(localeData.domain, "/").concat(isDefault ? lang + '/' : '').concat(data.slug);
14
- if (isDefault) defaultLocaleSlug = slug;
15
- return {
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, {
16
55
  slug: slug,
17
- title: data.title,
18
56
  locale: lang,
19
- isDefault: isDefault
20
- };
21
- });
57
+ isDefault: isDefault,
58
+ domain: "https://".concat(localeData.domain)
59
+ }));
60
+ }, {});
22
61
  return {
23
- translations: list,
62
+ translationsMap: map,
24
63
  defaultLocale: defaultLocale,
25
- defaultLocaleSlug: defaultLocaleSlug
64
+ allLocales: Object.keys(localesMap)
26
65
  };
27
66
  }, [
28
67
  defaultLocale,
29
68
  translations,
30
- localesMap
69
+ localesMap,
70
+ currentLocale,
71
+ currentPath
31
72
  ]);
32
73
  return(/*#__PURE__*/ React.createElement(SeoTranslationsContext.Provider, {
33
74
  value: data1
34
75
  }, children));
35
76
  };
36
77
  export var useSeoTranslations = function() {
37
- return React.useContext(SeoTranslationsContext);
78
+ return React.useContext(SeoTranslationsContext) || {};
38
79
  };
@@ -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;
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;
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: 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 ")
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 ")
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, _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, 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;
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,6 +130,17 @@ 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
+ };
133
144
  var updateLeftValue = useCallback(function() {
134
145
  var inputLeft = inputLeftRef.current;
135
146
  var inputRight = inputRightRef.current;
@@ -138,6 +149,7 @@ export var RangeSliderInput = function(param) {
138
149
  setValue(_objectSpread({}, value, {
139
150
  left: leftValue
140
151
  }));
152
+ onSlideGeneric();
141
153
  }, [
142
154
  setValue,
143
155
  value
@@ -150,6 +162,7 @@ export var RangeSliderInput = function(param) {
150
162
  setValue(_objectSpread({}, value, {
151
163
  right: rightValue
152
164
  }));
165
+ onSlideGeneric();
153
166
  }, [
154
167
  setValue,
155
168
  value
@@ -1,9 +1,50 @@
1
+ import regeneratorRuntime from "regenerator-runtime";
1
2
  import { MyWalletGetByType } from '@sentecacommerce/sdk';
2
3
  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
+ }
3
33
  export var useGetMyLoyaltyCardQuery = function(callback) {
4
- return useQuery('get-loyalty-card-key', function() {
5
- return MyWalletGetByType('loyalty-program');
6
- }, {
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,
7
48
  onSuccess: function() {
8
49
  var ref;
9
50
  return callback === null || callback === void 0 ? void 0 : (ref = callback.onSuccess) === null || ref === void 0 ? void 0 : ref.call(callback);
@@ -0,0 +1,8 @@
1
+ import { canUseDOM } from './canUseDom';
2
+ export var getLocaleFromPath = function() {
3
+ if (!canUseDOM()) return '';
4
+ var locale = window.location.pathname.split('/')[1] || '';
5
+ // the allowed standards: bg bg-BG, en en-US/en-UK
6
+ if (locale.length !== 2 && locale.length !== 5) return '';
7
+ return locale;
8
+ };
@@ -95,7 +95,9 @@ 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));
98
+ }, true, router), undefined, {
99
+ shallow: true
100
+ });
99
101
  },
100
102
  selected: true,
101
103
  data: _objectSpread({}, data.raw, {
@@ -13,6 +13,7 @@ export * from './getTranslatableField';
13
13
  export * from './formatAsCurrency';
14
14
  export * from './createCatalogBreadcrumb';
15
15
  export * from './adjustColor';
16
+ export * from './getLocaleFromPath';
16
17
  export * from './calcDiscount';
17
18
  export * from './canUseDom';
18
19
  export * from './getFirst';
@@ -1,3 +1,4 @@
1
+ import { canUseDOM } from "./canUseDom";
1
2
  export function isTouchDevice() {
2
- return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
3
+ return canUseDOM() && ('ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
3
4
  }
@@ -1,10 +1,15 @@
1
1
  export var readFromLocalStorage = function(key) {
2
2
  if (typeof window !== 'undefined') {
3
- return JSON.parse(localStorage.getItem(key));
3
+ try {
4
+ return JSON.parse(localStorage.getItem(key));
5
+ } catch (e) {
6
+ console.log(e);
7
+ return null;
8
+ }
4
9
  }
5
10
  };
6
11
  export var writeToLocalStorage = function(key, data) {
7
- if (typeof window !== 'undefined') {
12
+ if (typeof window !== 'undefined' && data !== undefined) {
8
13
  localStorage.setItem(key, JSON.stringify(data));
9
14
  }
10
15
  };
@@ -1 +1,2 @@
1
1
  export * from './useReplaceBasketMutation';
2
+ export * from './useChangeGiftVariant';
@@ -0,0 +1,2 @@
1
+ import { OrderSelectableGiftVariantUpdateDTO, OrderDTO } from '@sentecacommerce/sdk';
2
+ export declare const useChangeGiftVariantMutation: () => import("react-query").MutationResultPair<OrderDTO, unknown, OrderSelectableGiftVariantUpdateDTO, unknown>;
@@ -1,2 +1,3 @@
1
1
  export * from './useReplaceBasket';
2
2
  export * from './useBasketCrossSaleItems';
3
+ export * from './useChangeGiftVariant';
@@ -0,0 +1,2 @@
1
+ import { useChangeGiftVariantMutation } from '../api/mutations';
2
+ export { useChangeGiftVariantMutation as 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
- interface BasketLineItemProps extends BaseProductType {
5
+ export interface BasketLineItemProps extends BaseProductType {
6
6
  productId: string;
7
7
  lineItemId: string;
8
8
  quantityInBasket: number;
@@ -36,4 +36,3 @@ export declare const useBasketLineItem: (props: {
36
36
  item: LineItemDTO;
37
37
  expiry?: number;
38
38
  }) => BasketLineItemProps;
39
- export {};
@@ -128,6 +128,7 @@ declare type ProductProviderProps = {
128
128
  expand?: string;
129
129
  project?: string;
130
130
  };
131
+ includeBrandInName?: boolean;
131
132
  };
132
133
  declare type ProductStateContextType = {
133
134
  attributeRules: AttributeRulesMap;
@@ -163,7 +164,7 @@ declare type CountFunctionsContextType = {
163
164
  };
164
165
  getProductVideos: () => VideoType[];
165
166
  };
166
- export declare function ProductProvider({ product, children, defaultVariantId, }: ProductProviderProps): JSX.Element;
167
+ export declare function ProductProvider({ product, children, defaultVariantId, includeBrandInName, }: ProductProviderProps): JSX.Element;
167
168
  export declare function useProductState(): ProductStateContextType;
168
169
  export declare function useProductFunctions(): CountFunctionsContextType;
169
170
  export declare function useProduct(slug: string, config?: getProductBySlugConfig): import("react-query").QueryResult<ProductDTO, unknown>;
@@ -1,4 +1,6 @@
1
1
  import { AssetType } from '../../utils/assetsToMap';
2
+ import { NextRouter } from 'next/router';
3
+ import { Node } from './useListingCategories';
2
4
  export declare type UseListingMetaResult = {
3
5
  displayName: string;
4
6
  description: string;
@@ -10,3 +12,5 @@ export declare type UseListingMetaResult = {
10
12
  getCustomFieldByKey: (key: string) => any | undefined;
11
13
  };
12
14
  export declare const useListingMeta: () => UseListingMetaResult;
15
+ export declare function getFilterByType(filterType: string, router?: NextRouter): string;
16
+ export declare function getCategoryName(router?: NextRouter, categories?: Node[] | null): string | undefined;
@@ -3,6 +3,10 @@ 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;
6
10
  updateValue: (data: {
7
11
  from: number;
8
12
  to: number;
@@ -84,4 +84,14 @@ export interface ListingPageMeta {
84
84
  collapseMode?: StringField;
85
85
  limit: NumberField;
86
86
  includeVariants?: BooleanField;
87
+ getTitle?: GetListingPageTitle;
87
88
  }
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,11 +3,12 @@ interface EmptyBoxProps {
3
3
  backgroundColor?: StringField;
4
4
  searchHistory?: any[];
5
5
  labels: GroupField<{
6
- promoOffersLabel: StringField;
7
- productsLabel: StringField;
8
- recentSearchesLabel: StringField;
9
- popularSearchesLabel: StringField;
6
+ promoOffers: StringField;
7
+ products: StringField;
8
+ recentSearches: StringField;
9
+ popularSearches: StringField;
10
10
  blogLabel: StringField;
11
+ noResults: StringField;
11
12
  blog: GroupField<{
12
13
  blogTitle: StringField;
13
14
  image: StringField;
@@ -1,12 +1,13 @@
1
1
  import { StringField, GroupField, BooleanField, NumberField } from '@sentecacommerce-theme/cms';
2
2
  interface SearchLabels {
3
- recentSearchesLabel: StringField;
4
- popularSearchesLabel: StringField;
5
- suggestedBrandsLabel: StringField;
6
- suggestedCategoriesLabel: StringField;
7
- promoOffersLabel: StringField;
8
- productsLabel: StringField;
3
+ recentSearches: StringField;
4
+ popularSearches: StringField;
5
+ suggestedBrands: StringField;
6
+ suggestedCategories: StringField;
7
+ promoOffers: StringField;
8
+ products: StringField;
9
9
  blogLabel: StringField;
10
+ noResults: StringField;
10
11
  blog: GroupField<{
11
12
  blogTitle: StringField;
12
13
  image: StringField;
@@ -0,0 +1 @@
1
+ export declare const TranslationsMeta: () => JSX.Element | null;
@@ -4,3 +4,4 @@ export * from './GlobalSEO';
4
4
  export * from './OpenGraph';
5
5
  export * from './ProductSEO';
6
6
  export * from './HiddenBreadcrumb';
7
+ export * from './TranslationsMeta';
@@ -10,13 +10,15 @@ 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
- translations: SeoTranslationType[];
13
+ translationsMap: {
14
+ [key: string]: SeoTranslationType;
15
+ };
14
16
  defaultLocale: string;
15
- defaultLocaleSlug: string;
17
+ allLocales: string[];
16
18
  };
17
19
  export declare type SeoTranslationType = {
18
20
  slug: string;
19
- title: string;
20
21
  locale: string;
21
22
  isDefault: boolean;
23
+ domain: string;
22
24
  };
@@ -1,5 +1,5 @@
1
1
  import { StringField } from '@sentecacommerce-theme/cms';
2
- export declare const GridStyles: ({ spaceX, breakpoints, remSize, }: {
2
+ export declare const GridStyles: ({ spaceX, breakpoints, remSize, spaceBetweenSections, }: {
3
3
  breakpoints?: {
4
4
  [key: string]: {
5
5
  min: StringField;
@@ -7,4 +7,5 @@ export declare const GridStyles: ({ spaceX, breakpoints, remSize, }: {
7
7
  } | undefined;
8
8
  spaceX: number;
9
9
  remSize?: number | undefined;
10
+ spaceBetweenSections?: number | undefined;
10
11
  }) => JSX.Element;
@@ -15,11 +15,12 @@ export declare const RangeSlideClasses: {
15
15
  thumbHover: string;
16
16
  thumbActive: string;
17
17
  };
18
- export declare const RangeSliderInput: ({ defaultValue, onChange, min, max, step, }: {
18
+ export declare const RangeSliderInput: ({ defaultValue, onChange, onSlide, 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;
24
25
  }) => JSX.Element;
25
26
  export {};
@@ -0,0 +1 @@
1
+ export declare const getLocaleFromPath: () => string;
@@ -13,6 +13,7 @@ export * from './getTranslatableField';
13
13
  export * from './formatAsCurrency';
14
14
  export * from './createCatalogBreadcrumb';
15
15
  export * from './adjustColor';
16
+ export * from './getLocaleFromPath';
16
17
  export * from './calcDiscount';
17
18
  export * from './canUseDom';
18
19
  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.13.1",
4
+ "version": "0.13.2",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,7 +31,7 @@
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": "2a9d7fd163520fde743840e137093cc0acc9d2d7",
34
+ "gitHead": "a02a163a7ab04039fc81e5e8ce3c38e93131968c",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },