@sentecacommerce-theme/lib 0.13.19 → 0.13.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/checkout/hooks/useBnpCalculateForCart.js +1 -0
- package/dist/cjs/hooks/useProduct/index.js +2 -2
- package/dist/cjs/hooks/useProduct/utils/index.js +1 -1
- package/dist/cjs/product/hooks/useBnpOffers.js +1 -0
- package/dist/cjs/seo/api/ssr/fetchRedirectByFrom.js +2 -5
- package/dist/cjs/seo/components/ProductSEO/index.js +5 -5
- package/dist/esm/checkout/hooks/useBnpCalculateForCart.js +1 -0
- package/dist/esm/hooks/useProduct/index.js +2 -2
- package/dist/esm/hooks/useProduct/utils/index.js +1 -1
- package/dist/esm/product/hooks/useBnpOffers.js +1 -0
- package/dist/esm/seo/api/ssr/fetchRedirectByFrom.js +2 -5
- package/dist/esm/seo/components/ProductSEO/index.js +5 -5
- package/dist/types/checkout/hooks/useBnpCalculateForCart.d.ts +1 -0
- package/dist/types/hooks/useProduct/index.d.ts +2 -1
- package/dist/types/product/hooks/useBnpOffers.d.ts +1 -0
- package/dist/types/seo/components/ProductSEO/index.d.ts +2 -1
- package/package.json +4 -4
@@ -69,6 +69,7 @@ var useBnpCalculateForCart = function(props) {
|
|
69
69
|
var ref;
|
70
70
|
return {
|
71
71
|
name: options.scheme.name,
|
72
|
+
scheme: options.scheme,
|
72
73
|
offers: (ref = options.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
|
73
74
|
var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
|
74
75
|
var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
|
@@ -19,7 +19,7 @@ function _interopRequireDefault(obj) {
|
|
19
19
|
var ProductStateContext = /*#__PURE__*/ _react.default.createContext(undefined);
|
20
20
|
var CountDispatchContext = /*#__PURE__*/ _react.default.createContext(undefined);
|
21
21
|
function ProductProvider(param) {
|
22
|
-
var product = param.product, children = param.children, defaultVariantId = param.defaultVariantId, _includeBrandInName = param.includeBrandInName, includeBrandInName = _includeBrandInName === void 0 ? false : _includeBrandInName;
|
22
|
+
var product = param.product, children = param.children, defaultVariantId = param.defaultVariantId, _includeBrandInName = param.includeBrandInName, includeBrandInName = _includeBrandInName === void 0 ? false : _includeBrandInName, _withShortTitle = param.withShortTitle, withShortTitle = _withShortTitle === void 0 ? false : _withShortTitle;
|
23
23
|
var ref38 = (0, _useProductVariants).useProductVariants({
|
24
24
|
product: product,
|
25
25
|
defaultVariantId: defaultVariantId
|
@@ -30,7 +30,7 @@ function ProductProvider(param) {
|
|
30
30
|
var rootCategoryId = rootCategory === null || rootCategory === void 0 ? void 0 : rootCategory.resourceId;
|
31
31
|
var metaObj = {
|
32
32
|
_id: product === null || product === void 0 ? void 0 : product._id,
|
33
|
-
name: includeBrandInName && (product === null || product === void 0 ? void 0 : (ref1 = product.brands) === null || ref1 === void 0 ? void 0 : (ref2 = ref1[0]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.resource) === null || ref3 === void 0 ? void 0 : ref3.name) ? "".concat((0, _).getTranslatableField(product === null || product === void 0 ? void 0 : (ref4 = product.brands) === null || ref4 === void 0 ? void 0 : (ref5 = ref4[0]) === null || ref5 === void 0 ? void 0 : (ref6 = ref5.resource) === null || ref6 === void 0 ? void 0 : ref6.name), " ").concat((0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.name)) : (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.name),
|
33
|
+
name: includeBrandInName && !withShortTitle && (product === null || product === void 0 ? void 0 : (ref1 = product.brands) === null || ref1 === void 0 ? void 0 : (ref2 = ref1[0]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.resource) === null || ref3 === void 0 ? void 0 : ref3.name) ? "".concat((0, _).getTranslatableField(product === null || product === void 0 ? void 0 : (ref4 = product.brands) === null || ref4 === void 0 ? void 0 : (ref5 = ref4[0]) === null || ref5 === void 0 ? void 0 : (ref6 = ref5.resource) === null || ref6 === void 0 ? void 0 : ref6.name), " ").concat((0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.name)) : (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.name),
|
34
34
|
slug: (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.slug),
|
35
35
|
description: (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.description) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.description),
|
36
36
|
shortDescription: (0, _).getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaDescription) || (0, _).getTranslatableField(product === null || product === void 0 ? void 0 : product.metaDescription),
|
@@ -226,7 +226,7 @@ exports.createMappedAttributes = createMappedAttributes;
|
|
226
226
|
var processAvailabilityPerStore = function(availabilities) {
|
227
227
|
var ref;
|
228
228
|
return (ref = availabilities === null || availabilities === void 0 ? void 0 : availabilities.filter(function(x) {
|
229
|
-
return
|
229
|
+
return x.availableQuantity > 0;
|
230
230
|
})) === null || ref === void 0 ? void 0 : ref.map(function(param) {
|
231
231
|
var acceptsBackorders = param.acceptsBackorders, stockLocationName = param.stockLocationName, restockableInDays = param.restockableInDays, availableQuantity = param.availableQuantity;
|
232
232
|
return {
|
@@ -44,6 +44,7 @@ var useBnpOffers = function(props) {
|
|
44
44
|
var ref;
|
45
45
|
return {
|
46
46
|
name: result.scheme.name,
|
47
|
+
scheme: result.scheme,
|
47
48
|
offers: (ref = result.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
|
48
49
|
var _totalRepaymentAmount = (0, _index).decodePrice(offer.totalRepaymentAmount);
|
49
50
|
var _correctDownPaymentAmount = (0, _index).decodePrice(offer.correctDownPaymentAmount);
|
@@ -40,17 +40,14 @@ function _interopRequireDefault(obj) {
|
|
40
40
|
}
|
41
41
|
var fetchRedirectByFrom = function() {
|
42
42
|
var _ref = _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee(from) {
|
43
|
-
var redirectUrl;
|
44
43
|
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
45
44
|
while(1)switch(_ctx.prev = _ctx.next){
|
46
45
|
case 0:
|
47
46
|
_ctx.next = 2;
|
48
47
|
return (0, _sdk).RedirectsGetByFrom(from);
|
49
48
|
case 2:
|
50
|
-
|
51
|
-
|
52
|
-
return _ctx.abrupt("return", redirectUrl);
|
53
|
-
case 5:
|
49
|
+
return _ctx.abrupt("return", _ctx.sent);
|
50
|
+
case 3:
|
54
51
|
case "end":
|
55
52
|
return _ctx.stop();
|
56
53
|
}
|
@@ -28,17 +28,17 @@ function _interopRequireDefault(obj) {
|
|
28
28
|
*
|
29
29
|
*/ var truncateToCharLength = function(text, maxLenChars) {
|
30
30
|
var separator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ' ';
|
31
|
-
var cut = text.indexOf(separator, maxLenChars);
|
31
|
+
var cut = text === null || text === void 0 ? void 0 : text.indexOf(separator, maxLenChars);
|
32
32
|
if (cut === -1) return text;
|
33
|
-
return text.substring(0, cut);
|
33
|
+
return text === null || text === void 0 ? void 0 : text.substring(0, cut);
|
34
34
|
};
|
35
35
|
function ProductSEO() {
|
36
|
-
var ref16 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _favorTitleTemplateOverMeta = ref16.favorTitleTemplateOverMeta, favorTitleTemplateOverMeta = _favorTitleTemplateOverMeta === void 0 ? false : _favorTitleTemplateOverMeta, _favorDescriptionTemplateOverMeta = ref16.favorDescriptionTemplateOverMeta, favorDescriptionTemplateOverMeta = _favorDescriptionTemplateOverMeta === void 0 ? false : _favorDescriptionTemplateOverMeta, _titleTemplate = ref16.titleTemplate, titleTemplate = _titleTemplate === void 0 ? ':title:' : _titleTemplate, _descriptionTemplate = ref16.descriptionTemplate, descriptionTemplate = _descriptionTemplate === void 0 ? ':description:' : _descriptionTemplate;
|
36
|
+
var ref16 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _favorTitleTemplateOverMeta = ref16.favorTitleTemplateOverMeta, favorTitleTemplateOverMeta = _favorTitleTemplateOverMeta === void 0 ? false : _favorTitleTemplateOverMeta, _favorDescriptionTemplateOverMeta = ref16.favorDescriptionTemplateOverMeta, favorDescriptionTemplateOverMeta = _favorDescriptionTemplateOverMeta === void 0 ? false : _favorDescriptionTemplateOverMeta, _titleTemplate = ref16.titleTemplate, titleTemplate = _titleTemplate === void 0 ? ':title:' : _titleTemplate, _descriptionTemplate = ref16.descriptionTemplate, descriptionTemplate = _descriptionTemplate === void 0 ? ':description:' : _descriptionTemplate, _withShortTitle = ref16.withShortTitle, withShortTitle = _withShortTitle === void 0 ? false : _withShortTitle;
|
37
37
|
var ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14;
|
38
38
|
var ref15 = (0, _useProduct).useProductState(), selectedVariant = ref15.selectedVariant, metaData = ref15.metaData, seoData = ref15.seoData;
|
39
39
|
var domain = (0, _useConfig).useConfigState().domain;
|
40
40
|
var description = (0, _utils).escape(seoData.description || metaData.shortDescription || truncateToCharLength(metaData === null || metaData === void 0 ? void 0 : metaData.description, 200) || '');
|
41
|
-
var title = seoData.title || metaData.name || '';
|
41
|
+
var title = withShortTitle ? metaData.name || '' : seoData.title || metaData.name || '';
|
42
42
|
var price = (0, _usePrice).usePrice({
|
43
43
|
price: selectedVariant === null || selectedVariant === void 0 ? void 0 : (ref1 = selectedVariant.offer) === null || ref1 === void 0 ? void 0 : ref1.originalPrice
|
44
44
|
}).price;
|
@@ -63,7 +63,7 @@ function ProductSEO() {
|
|
63
63
|
type: "application/ld+json",
|
64
64
|
dangerouslySetInnerHTML: (0, _utils).createDangerousMarkup(productJSONLd)
|
65
65
|
})), /*#__PURE__*/ _react.default.createElement(_basicSEO.BasicSEO, {
|
66
|
-
title: formattedTitle,
|
66
|
+
title: withShortTitle ? title : formattedTitle,
|
67
67
|
description: formattedDescription,
|
68
68
|
keywords: seoData.keywords
|
69
69
|
}), /*#__PURE__*/ _react.default.createElement(_openGraph.OpenGraph, {
|
@@ -44,6 +44,7 @@ export var useBnpCalculateForCart = function(props) {
|
|
44
44
|
var ref;
|
45
45
|
return {
|
46
46
|
name: options.scheme.name,
|
47
|
+
scheme: options.scheme,
|
47
48
|
offers: (ref = options.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
|
48
49
|
var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
|
49
50
|
var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
|
@@ -7,7 +7,7 @@ import { useProductVariants } from '../useProductVariants';
|
|
7
7
|
var ProductStateContext = /*#__PURE__*/ React.createContext(undefined);
|
8
8
|
var CountDispatchContext = /*#__PURE__*/ React.createContext(undefined);
|
9
9
|
export function ProductProvider(param) {
|
10
|
-
var product = param.product, children = param.children, defaultVariantId = param.defaultVariantId, _includeBrandInName = param.includeBrandInName, includeBrandInName = _includeBrandInName === void 0 ? false : _includeBrandInName;
|
10
|
+
var product = param.product, children = param.children, defaultVariantId = param.defaultVariantId, _includeBrandInName = param.includeBrandInName, includeBrandInName = _includeBrandInName === void 0 ? false : _includeBrandInName, _withShortTitle = param.withShortTitle, withShortTitle = _withShortTitle === void 0 ? false : _withShortTitle;
|
11
11
|
var ref38 = useProductVariants({
|
12
12
|
product: product,
|
13
13
|
defaultVariantId: defaultVariantId
|
@@ -18,7 +18,7 @@ export function ProductProvider(param) {
|
|
18
18
|
var rootCategoryId = rootCategory === null || rootCategory === void 0 ? void 0 : rootCategory.resourceId;
|
19
19
|
var metaObj = {
|
20
20
|
_id: product === null || product === void 0 ? void 0 : product._id,
|
21
|
-
name: includeBrandInName && (product === null || product === void 0 ? void 0 : (ref1 = product.brands) === null || ref1 === void 0 ? void 0 : (ref2 = ref1[0]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.resource) === null || ref3 === void 0 ? void 0 : ref3.name) ? "".concat(getTranslatableField(product === null || product === void 0 ? void 0 : (ref4 = product.brands) === null || ref4 === void 0 ? void 0 : (ref5 = ref4[0]) === null || ref5 === void 0 ? void 0 : (ref6 = ref5.resource) === null || ref6 === void 0 ? void 0 : ref6.name), " ").concat(getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || getTranslatableField(product === null || product === void 0 ? void 0 : product.name)) : getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || getTranslatableField(product === null || product === void 0 ? void 0 : product.name),
|
21
|
+
name: includeBrandInName && !withShortTitle && (product === null || product === void 0 ? void 0 : (ref1 = product.brands) === null || ref1 === void 0 ? void 0 : (ref2 = ref1[0]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.resource) === null || ref3 === void 0 ? void 0 : ref3.name) ? "".concat(getTranslatableField(product === null || product === void 0 ? void 0 : (ref4 = product.brands) === null || ref4 === void 0 ? void 0 : (ref5 = ref4[0]) === null || ref5 === void 0 ? void 0 : (ref6 = ref5.resource) === null || ref6 === void 0 ? void 0 : ref6.name), " ").concat(getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || getTranslatableField(product === null || product === void 0 ? void 0 : product.name)) : getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.name) || getTranslatableField(product === null || product === void 0 ? void 0 : product.name),
|
22
22
|
slug: getTranslatableField(product === null || product === void 0 ? void 0 : product.slug),
|
23
23
|
description: getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.description) || getTranslatableField(product === null || product === void 0 ? void 0 : product.description),
|
24
24
|
shortDescription: getTranslatableField(selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.metaDescription) || getTranslatableField(product === null || product === void 0 ? void 0 : product.metaDescription),
|
@@ -230,7 +230,7 @@ export var createMappedAttributes = function(currentVariant) {
|
|
230
230
|
export var processAvailabilityPerStore = function(availabilities) {
|
231
231
|
var ref;
|
232
232
|
return (ref = availabilities === null || availabilities === void 0 ? void 0 : availabilities.filter(function(x) {
|
233
|
-
return
|
233
|
+
return x.availableQuantity > 0;
|
234
234
|
})) === null || ref === void 0 ? void 0 : ref.map(function(param) {
|
235
235
|
var acceptsBackorders = param.acceptsBackorders, stockLocationName = param.stockLocationName, restockableInDays = param.restockableInDays, availableQuantity = param.availableQuantity;
|
236
236
|
return {
|
@@ -40,6 +40,7 @@ export var useBnpOffers = function(props) {
|
|
40
40
|
var ref;
|
41
41
|
return {
|
42
42
|
name: result.scheme.name,
|
43
|
+
scheme: result.scheme,
|
43
44
|
offers: (ref = result.offers) === null || ref === void 0 ? void 0 : ref.map(function(offer) {
|
44
45
|
var _totalRepaymentAmount = decodePrice(offer.totalRepaymentAmount);
|
45
46
|
var _correctDownPaymentAmount = decodePrice(offer.correctDownPaymentAmount);
|
@@ -31,17 +31,14 @@ function _asyncToGenerator(fn) {
|
|
31
31
|
}
|
32
32
|
export var fetchRedirectByFrom = function() {
|
33
33
|
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(from) {
|
34
|
-
var redirectUrl;
|
35
34
|
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
36
35
|
while(1)switch(_ctx.prev = _ctx.next){
|
37
36
|
case 0:
|
38
37
|
_ctx.next = 2;
|
39
38
|
return RedirectsGetByFrom(from);
|
40
39
|
case 2:
|
41
|
-
|
42
|
-
|
43
|
-
return _ctx.abrupt("return", redirectUrl);
|
44
|
-
case 5:
|
40
|
+
return _ctx.abrupt("return", _ctx.sent);
|
41
|
+
case 3:
|
45
42
|
case "end":
|
46
43
|
return _ctx.stop();
|
47
44
|
}
|
@@ -18,17 +18,17 @@ import { useConfigState } from '../../../hooks/useConfig';
|
|
18
18
|
*
|
19
19
|
*/ var truncateToCharLength = function(text, maxLenChars) {
|
20
20
|
var separator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ' ';
|
21
|
-
var cut = text.indexOf(separator, maxLenChars);
|
21
|
+
var cut = text === null || text === void 0 ? void 0 : text.indexOf(separator, maxLenChars);
|
22
22
|
if (cut === -1) return text;
|
23
|
-
return text.substring(0, cut);
|
23
|
+
return text === null || text === void 0 ? void 0 : text.substring(0, cut);
|
24
24
|
};
|
25
25
|
export function ProductSEO() {
|
26
|
-
var ref16 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _favorTitleTemplateOverMeta = ref16.favorTitleTemplateOverMeta, favorTitleTemplateOverMeta = _favorTitleTemplateOverMeta === void 0 ? false : _favorTitleTemplateOverMeta, _favorDescriptionTemplateOverMeta = ref16.favorDescriptionTemplateOverMeta, favorDescriptionTemplateOverMeta = _favorDescriptionTemplateOverMeta === void 0 ? false : _favorDescriptionTemplateOverMeta, _titleTemplate = ref16.titleTemplate, titleTemplate = _titleTemplate === void 0 ? ':title:' : _titleTemplate, _descriptionTemplate = ref16.descriptionTemplate, descriptionTemplate = _descriptionTemplate === void 0 ? ':description:' : _descriptionTemplate;
|
26
|
+
var ref16 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _favorTitleTemplateOverMeta = ref16.favorTitleTemplateOverMeta, favorTitleTemplateOverMeta = _favorTitleTemplateOverMeta === void 0 ? false : _favorTitleTemplateOverMeta, _favorDescriptionTemplateOverMeta = ref16.favorDescriptionTemplateOverMeta, favorDescriptionTemplateOverMeta = _favorDescriptionTemplateOverMeta === void 0 ? false : _favorDescriptionTemplateOverMeta, _titleTemplate = ref16.titleTemplate, titleTemplate = _titleTemplate === void 0 ? ':title:' : _titleTemplate, _descriptionTemplate = ref16.descriptionTemplate, descriptionTemplate = _descriptionTemplate === void 0 ? ':description:' : _descriptionTemplate, _withShortTitle = ref16.withShortTitle, withShortTitle = _withShortTitle === void 0 ? false : _withShortTitle;
|
27
27
|
var ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14;
|
28
28
|
var ref15 = useProductState(), selectedVariant = ref15.selectedVariant, metaData = ref15.metaData, seoData = ref15.seoData;
|
29
29
|
var domain = useConfigState().domain;
|
30
30
|
var description = escape(seoData.description || metaData.shortDescription || truncateToCharLength(metaData === null || metaData === void 0 ? void 0 : metaData.description, 200) || '');
|
31
|
-
var title = seoData.title || metaData.name || '';
|
31
|
+
var title = withShortTitle ? metaData.name || '' : seoData.title || metaData.name || '';
|
32
32
|
var price = usePrice({
|
33
33
|
price: selectedVariant === null || selectedVariant === void 0 ? void 0 : (ref1 = selectedVariant.offer) === null || ref1 === void 0 ? void 0 : ref1.originalPrice
|
34
34
|
}).price;
|
@@ -53,7 +53,7 @@ export function ProductSEO() {
|
|
53
53
|
type: "application/ld+json",
|
54
54
|
dangerouslySetInnerHTML: createDangerousMarkup(productJSONLd)
|
55
55
|
})), /*#__PURE__*/ React.createElement(BasicSEO, {
|
56
|
-
title: formattedTitle,
|
56
|
+
title: withShortTitle ? title : formattedTitle,
|
57
57
|
description: formattedDescription,
|
58
58
|
keywords: seoData.keywords
|
59
59
|
}), /*#__PURE__*/ React.createElement(OpenGraph, {
|
@@ -4,6 +4,7 @@ export declare const useBnpCalculateForCart: (props?: {
|
|
4
4
|
} | undefined) => {
|
5
5
|
data: {
|
6
6
|
name: string;
|
7
|
+
scheme: import("@sentecacommerce/sdk").PricingSchemesDTO;
|
7
8
|
offers: {
|
8
9
|
offerRaw: import("@sentecacommerce/sdk").LoanVariantDTO;
|
9
10
|
totalRepaymentAmount: import("../../index").FormattedPriceType;
|
@@ -55,6 +55,7 @@ declare type ProductProviderProps = {
|
|
55
55
|
project?: string;
|
56
56
|
};
|
57
57
|
includeBrandInName?: boolean;
|
58
|
+
withShortTitle?: boolean;
|
58
59
|
};
|
59
60
|
declare type ProductStateContextType = {
|
60
61
|
attributeRules: AttributeRulesMap;
|
@@ -91,7 +92,7 @@ declare type CountFunctionsContextType = {
|
|
91
92
|
};
|
92
93
|
getProductVideos: () => VideoType[];
|
93
94
|
};
|
94
|
-
export declare function ProductProvider({ product, children, defaultVariantId, includeBrandInName, }: ProductProviderProps): JSX.Element;
|
95
|
+
export declare function ProductProvider({ product, children, defaultVariantId, includeBrandInName, withShortTitle, }: ProductProviderProps): JSX.Element;
|
95
96
|
export declare function useProductState(): ProductStateContextType;
|
96
97
|
export declare function useProductFunctions(): CountFunctionsContextType;
|
97
98
|
export declare function useProduct(slug: string, config?: getProductBySlugConfig): import("react-query").QueryResult<ProductDTO, unknown>;
|
@@ -5,6 +5,7 @@ export declare const useBnpOffers: (props: {
|
|
5
5
|
}) => {
|
6
6
|
data: {
|
7
7
|
name: string;
|
8
|
+
scheme: import("@sentecacommerce/sdk").PricingSchemesDTO;
|
8
9
|
offers: {
|
9
10
|
totalRepaymentAmount: import("../../index").FormattedPriceType;
|
10
11
|
correctDownPaymentAmount: import("../../index").FormattedPriceType;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
export declare function ProductSEO({ favorTitleTemplateOverMeta, favorDescriptionTemplateOverMeta, titleTemplate, descriptionTemplate, }?: {
|
1
|
+
export declare function ProductSEO({ favorTitleTemplateOverMeta, favorDescriptionTemplateOverMeta, titleTemplate, descriptionTemplate, withShortTitle, }?: {
|
2
2
|
favorTitleTemplateOverMeta?: boolean;
|
3
3
|
favorDescriptionTemplateOverMeta?: boolean;
|
4
4
|
titleTemplate?: string;
|
5
5
|
descriptionTemplate?: string;
|
6
|
+
withShortTitle?: boolean;
|
6
7
|
}): JSX.Element;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentecacommerce-theme/lib",
|
3
3
|
"sideEffects": false,
|
4
|
-
"version": "0.13.
|
4
|
+
"version": "0.13.21",
|
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": "b2055eb08ee6b288207b4745eeb2d632bb2bc872",
|
35
35
|
"peerDependencies": {
|
36
36
|
"react-query": "^2.26.2"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@sentecacommerce-theme/base": "^0.13.
|
40
|
-
"@sentecacommerce-theme/cms": "^0.13.
|
39
|
+
"@sentecacommerce-theme/base": "^0.13.21",
|
40
|
+
"@sentecacommerce-theme/cms": "^0.13.21",
|
41
41
|
"@sentecacommerce/sdk": "2.0.175",
|
42
42
|
"body-scroll-lock": "^3.1.5",
|
43
43
|
"copy-to-clipboard": "^3.3.1",
|