@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.
- package/dist/cjs/analytics/Pixel/mainScript.js +1 -2
- package/dist/cjs/api/getSDKConfig.js +2 -4
- package/dist/cjs/api/myCartApi/index.js +2 -8
- package/dist/cjs/basket/api/mutations/index.js +0 -14
- package/dist/cjs/basket/hooks/index.js +0 -12
- package/dist/cjs/config/SentecaProvider.js +1 -3
- package/dist/cjs/hooks/useAggregateResult/index.js +1 -5
- package/dist/cjs/hooks/useAvailability/index.js +1 -1
- package/dist/cjs/hooks/useClearAllFilters/index.js +0 -2
- package/dist/cjs/hooks/useProduct/index.js +26 -36
- package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +15 -39
- package/dist/cjs/listing/api/queries/useListingQuery.js +1 -1
- package/dist/cjs/listing/hooks/useListingFilters.js +1 -7
- package/dist/cjs/listing/hooks/useListingMeta.js +40 -49
- package/dist/cjs/listing/hooks/useSlideFilter.js +4 -27
- package/dist/cjs/listing/ssr/prefetchCategories.js +6 -5
- package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
- package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
- package/dist/cjs/navigation/components/SearchBox/index.js +4 -4
- package/dist/cjs/seo/components/TranslationsMeta/index.js +14 -43
- package/dist/cjs/seo/components/index.js +0 -12
- package/dist/cjs/seo/hooks/useSeoTranslations.js +14 -55
- package/dist/cjs/ui/components/GridStyles.js +2 -2
- package/dist/cjs/ui/components/RangeSliderInput.js +1 -14
- package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +3 -49
- package/dist/cjs/utils/getSelectedFilters.js +1 -3
- package/dist/cjs/utils/index.js +0 -12
- package/dist/cjs/utils/isTouchDevice.js +1 -2
- package/dist/esm/analytics/Pixel/mainScript.js +1 -2
- package/dist/esm/api/getSDKConfig.js +3 -5
- package/dist/esm/api/myCartApi/index.js +2 -8
- package/dist/esm/basket/api/mutations/index.js +0 -1
- package/dist/esm/basket/hooks/index.js +0 -1
- package/dist/esm/config/SentecaProvider.js +1 -3
- package/dist/esm/hooks/useAggregateResult/index.js +1 -5
- package/dist/esm/hooks/useAvailability/index.js +1 -1
- package/dist/esm/hooks/useClearAllFilters/index.js +0 -2
- package/dist/esm/hooks/useProduct/index.js +18 -28
- package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +13 -21
- package/dist/esm/listing/api/queries/useListingQuery.js +1 -1
- package/dist/esm/listing/hooks/useListingFilters.js +1 -7
- package/dist/esm/listing/hooks/useListingMeta.js +40 -49
- package/dist/esm/listing/hooks/useSlideFilter.js +4 -27
- package/dist/esm/listing/ssr/prefetchCategories.js +7 -6
- package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
- package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
- package/dist/esm/navigation/components/SearchBox/index.js +4 -4
- package/dist/esm/seo/components/TranslationsMeta/index.js +14 -43
- package/dist/esm/seo/components/index.js +0 -1
- package/dist/esm/seo/hooks/useSeoTranslations.js +14 -55
- package/dist/esm/ui/components/GridStyles.js +2 -2
- package/dist/esm/ui/components/RangeSliderInput.js +1 -14
- package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +3 -44
- package/dist/esm/utils/getSelectedFilters.js +1 -3
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/isTouchDevice.js +1 -2
- package/dist/types/basket/api/mutations/index.d.ts +0 -1
- package/dist/types/basket/hooks/index.d.ts +0 -1
- package/dist/types/hooks/basket-hooks/useBasketLineItem/index.d.ts +2 -1
- package/dist/types/hooks/useProduct/index.d.ts +1 -2
- package/dist/types/listing/hooks/useSlideFilter.d.ts +0 -4
- package/dist/types/listing/types.d.ts +0 -10
- package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +4 -5
- package/dist/types/navigation/components/SearchBox/index.d.ts +6 -7
- package/dist/types/seo/components/index.d.ts +0 -1
- package/dist/types/seo/hooks/useSeoTranslations.d.ts +3 -5
- package/dist/types/ui/components/GridStyles.d.ts +1 -2
- package/dist/types/ui/components/RangeSliderInput.d.ts +1 -2
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +4 -4
- package/dist/cjs/basket/api/mutations/useChangeGiftVariant.js +0 -116
- package/dist/cjs/basket/hooks/useChangeGiftVariant.js +0 -16
- package/dist/cjs/utils/getLocaleFromPath.js +0 -13
- package/dist/esm/basket/api/mutations/useChangeGiftVariant.js +0 -106
- package/dist/esm/basket/hooks/useChangeGiftVariant.js +0 -3
- package/dist/esm/utils/getLocaleFromPath.js +0 -8
- package/dist/types/basket/api/mutations/useChangeGiftVariant.d.ts +0 -2
- package/dist/types/basket/hooks/useChangeGiftVariant.d.ts +0 -2
- package/dist/types/seo/components/TranslationsMeta/index.d.ts +0 -1
- 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.
|
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.
|
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.
|
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.
|
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()
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
};
|
@@ -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
|
-
|
39
|
-
|
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
|
-
}).
|
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
|
52
|
-
|
53
|
-
|
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
|
-
|
59
|
-
|
60
|
-
}, {});
|
19
|
+
isDefault: isDefault
|
20
|
+
};
|
21
|
+
});
|
61
22
|
return {
|
62
|
-
|
23
|
+
translations: list,
|
63
24
|
defaultLocale: defaultLocale,
|
64
|
-
|
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
|
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:
|
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,
|
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',
|
35
|
-
return
|
36
|
-
|
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)
|
99
|
-
shallow: true
|
100
|
-
});
|
98
|
+
}, true, router));
|
101
99
|
},
|
102
100
|
selected: true,
|
103
101
|
data: _objectSpread({}, data.raw, {
|
package/dist/esm/utils/index.js
CHANGED
@@ -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
|
2
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
4
3
|
}
|
@@ -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
|
-
|
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,
|
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>;
|
@@ -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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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;
|
@@ -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
|
-
|
14
|
-
[key: string]: SeoTranslationType;
|
15
|
-
};
|
13
|
+
translations: SeoTranslationType[];
|
16
14
|
defaultLocale: string;
|
17
|
-
|
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,
|
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,
|
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.
|
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": "
|
34
|
+
"gitHead": "2a9d7fd163520fde743840e137093cc0acc9d2d7",
|
35
35
|
"peerDependencies": {
|
36
36
|
"react-query": "^2.26.2"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@sentecacommerce-theme/base": "^0.
|
40
|
-
"@sentecacommerce-theme/cms": "^0.
|
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",
|