@snabcentr/common-lib 1.45.2 → 1.45.3
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/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 1.45.
|
|
1
|
+
## 1.45.3 (2025-04-29)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### fixed (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#11597: Исправлена ошибка проверки значений фильтров](web_soft/libs/ts/snabcentr-common-lib@e4129df162a00aaf1d0c51515e4eba8e2ffb023f) ([merge request](web_soft/libs/ts/snabcentr-common-lib!74))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ve = Object.defineProperty;
|
|
2
2
|
var Ee = (i, r, e) => r in i ? Ve(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
3
|
var s = (i, r, e) => Ee(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { isUndefined as
|
|
4
|
+
import { isUndefined as Ke, cloneDeep as Je, noop as m, toLower as Qe, isString as D, map as Z, forEach as Ye, isNil as Ie, isEmpty as Xe, isArray as Ze, isFunction as er } from "lodash-es";
|
|
5
5
|
import { format as rr, addSeconds as sr, parseISO as N, isAfter as tr, startOfToday as me, parse as j, getDay as nr, startOfTomorrow as he, nextMonday as ir, getUnixTime as k, endOfTomorrow as or, endOfYesterday as cr, startOfYesterday as lr, endOfToday as ur, endOfDay as pr, startOfDay as hr } from "date-fns";
|
|
6
6
|
import gr from "axios";
|
|
7
7
|
import { objectToSnake as be, objectToCamel as mr } from "ts-case-convert";
|
|
@@ -242,7 +242,7 @@ const B = class B {
|
|
|
242
242
|
*/
|
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
244
244
|
static getConfig() {
|
|
245
|
-
if (
|
|
245
|
+
if (Ke(B.config))
|
|
246
246
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
247
247
|
return B.config;
|
|
248
248
|
}
|
|
@@ -440,7 +440,7 @@ class Cr extends K {
|
|
|
440
440
|
* Признак того, что позиция является дополнительной продажей.
|
|
441
441
|
*/
|
|
442
442
|
s(this, "isAdditionalSale");
|
|
443
|
-
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ce(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams &&
|
|
443
|
+
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ce(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Je(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
class vr extends Cr {
|
|
@@ -731,7 +731,7 @@ const b = class b {
|
|
|
731
731
|
...e
|
|
732
732
|
}
|
|
733
733
|
}), this.httpClient.interceptors.request.use(
|
|
734
|
-
(n) => (n.method && (n.method === "get" && n.params && (n.params = be(n.params)), ["put", "patch", "post"].includes(
|
|
734
|
+
(n) => (n.method && (n.method === "get" && n.params && (n.params = be(n.params)), ["put", "patch", "post"].includes(Qe(n.method)) && n.data && (n.data = be(n.data))), n),
|
|
735
735
|
(n) => Promise.reject(n)
|
|
736
736
|
), this.httpClient.interceptors.response.use(
|
|
737
737
|
(n) => (n.data && (n.data = mr(n.data)), n),
|
|
@@ -1907,7 +1907,7 @@ class us extends p {
|
|
|
1907
1907
|
getCategoryProductsCoefficients(r) {
|
|
1908
1908
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
1909
1909
|
const { data: t } = e;
|
|
1910
|
-
return
|
|
1910
|
+
return Ye(t, (n) => n.map((o) => new De(o))), t;
|
|
1911
1911
|
});
|
|
1912
1912
|
}
|
|
1913
1913
|
/**
|
|
@@ -1970,7 +1970,7 @@ class ps extends p {
|
|
|
1970
1970
|
*/
|
|
1971
1971
|
getProductPriceHistory(r, e) {
|
|
1972
1972
|
const t = {};
|
|
1973
|
-
return
|
|
1973
|
+
return Ie(e) || (t.clientId = e), this.get(`/internal/price/products/${r}/history`, t, (n) => Z(n.data, (o) => new Mr(o)));
|
|
1974
1974
|
}
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Выполняет публичный поиск данных о продуктах по терму.
|