@snabcentr/common-lib 2.0.6 → 2.0.7
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 +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +65 -61
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/config/classes/app-base-config.d.ts +4 -0
- package/dist/src/config/classes/app-base-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-app-base-config.d.ts +4 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 2.0.
|
|
1
|
+
## 2.0.7 (2025-10-20)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### changed (1 change)
|
|
4
4
|
|
|
5
|
-
- [
|
|
5
|
+
- [#: Доработана конфигурация приложения](web_soft/libs/ts/snabcentr-common-lib@33e29006a13846cb6d69eb0a9d06bc36983b1a46) ([merge request](web_soft/libs/ts/snabcentr-common-lib!145))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,13 +2,13 @@ var Ar = Object.defineProperty;
|
|
|
2
2
|
var Dr = (n, r, e) => r in n ? Ar(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Dr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as tr } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
5
|
+
import { merge as Ue, isUndefined as Tr, isNil as D, isEmpty as Y, noop as f, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as Sr, constant as ar, isString as y, cloneDeep as Ir, toLower as xr, isFunction as de, map as he, forEach as Lr, isDate as ke, omitBy as ir, isObject as nr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
|
-
import { isAfter as ze, parseISO as w, startOfToday as _e, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as Nr, startOfYesterday as
|
|
7
|
+
import { isAfter as ze, parseISO as w, startOfToday as _e, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as Nr, startOfYesterday as Ur, endOfToday as dr, endOfDay as Fr, startOfDay as Mr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
9
9
|
import { ref as m, markRaw as jr, computed as P } from "vue";
|
|
10
10
|
import Gr from "axios";
|
|
11
|
-
class
|
|
11
|
+
class U {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class d {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
Ue(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class d {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e = tr(r), s = new
|
|
110
|
+
const e = tr(r), s = new U(Fe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class Nt extends
|
|
114
|
+
class Nt extends U {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class Nt extends d {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
Ue(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,7 +151,7 @@ class Nt extends d {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new
|
|
154
|
+
return new U(Fe(tr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
const J = class J {
|
|
@@ -302,13 +302,13 @@ class ye {
|
|
|
302
302
|
}
|
|
303
303
|
function We(n) {
|
|
304
304
|
try {
|
|
305
|
-
const r =
|
|
305
|
+
const r = U.getJwtPayload(n);
|
|
306
306
|
return new Date(r.exp * 1e3);
|
|
307
307
|
} catch {
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const B = te("__auth_state_private", () => {
|
|
312
312
|
const n = m(
|
|
313
313
|
(() => {
|
|
314
314
|
var u;
|
|
@@ -324,7 +324,7 @@ const H = te("__auth_state_private", () => {
|
|
|
324
324
|
), r = m(void 0), e = m(void 0), s = jr(/* @__PURE__ */ new Map());
|
|
325
325
|
function i() {
|
|
326
326
|
e.value = void 0, D(n.value) || n.value.then((o) => {
|
|
327
|
-
const c =
|
|
327
|
+
const c = U.getJwtPayload(o);
|
|
328
328
|
e.value = c.exp * 1e3 > Date.now() ? sr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
329
329
|
}).catch(f);
|
|
330
330
|
}
|
|
@@ -352,7 +352,7 @@ const H = te("__auth_state_private", () => {
|
|
|
352
352
|
};
|
|
353
353
|
}), be = te("__auth_state", () => {
|
|
354
354
|
const n = P(() => {
|
|
355
|
-
const o =
|
|
355
|
+
const o = B();
|
|
356
356
|
if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
|
|
357
357
|
const c = o.jwtTokenUpdater();
|
|
358
358
|
o.jwtToken = c, c.then((u) => {
|
|
@@ -362,20 +362,20 @@ const H = te("__auth_state_private", () => {
|
|
|
362
362
|
return o.jwtToken;
|
|
363
363
|
});
|
|
364
364
|
function r(o) {
|
|
365
|
-
|
|
365
|
+
B().jwtTokenUpdater = o;
|
|
366
366
|
}
|
|
367
367
|
function e(o) {
|
|
368
|
-
const c =
|
|
368
|
+
const c = B();
|
|
369
369
|
c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
|
|
370
370
|
}
|
|
371
371
|
function s() {
|
|
372
|
-
const o =
|
|
372
|
+
const o = B();
|
|
373
373
|
o.jwtToken = void 0, o.userPermissions = void 0, ye.saveActualDataToStorage("sc.token", void 0);
|
|
374
374
|
}
|
|
375
375
|
function i(o) {
|
|
376
|
-
const c =
|
|
376
|
+
const c = B();
|
|
377
377
|
!D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((v) => {
|
|
378
|
-
const R =
|
|
378
|
+
const R = U.getJwtPayload(v);
|
|
379
379
|
c.userPermissions = R.exp * 1e3 > Date.now() ? sr(R.resourceAccess, (S) => (S == null ? void 0 : S.roles) ?? []) : void 0;
|
|
380
380
|
}).catch(f);
|
|
381
381
|
const u = Q(o) ? o.join(" && ") : o;
|
|
@@ -383,11 +383,11 @@ const H = te("__auth_state_private", () => {
|
|
|
383
383
|
return c.userPermissionsComputedRefs.get(u);
|
|
384
384
|
const p = P(() => {
|
|
385
385
|
const v = (R) => {
|
|
386
|
-
var
|
|
386
|
+
var H;
|
|
387
387
|
const S = br(R, ".");
|
|
388
388
|
if (S.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [_, O] = S, G = (
|
|
390
|
+
const [_, O] = S, G = (H = B().userPermissions) == null ? void 0 : H[_];
|
|
391
391
|
return Q(G) && G.includes(O);
|
|
392
392
|
};
|
|
393
393
|
return Q(o) ? $r(o, (R) => v(R)) : v(o);
|
|
@@ -649,7 +649,7 @@ class Ae extends C {
|
|
|
649
649
|
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new lr(e == null ? void 0 : e.coordinates);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
class
|
|
652
|
+
class Hr {
|
|
653
653
|
/**
|
|
654
654
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
655
655
|
*
|
|
@@ -667,7 +667,7 @@ class Br {
|
|
|
667
667
|
this.warehouse = new Ae(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
class
|
|
670
|
+
class Br extends or {
|
|
671
671
|
/**
|
|
672
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
673
673
|
*
|
|
@@ -705,7 +705,7 @@ class Er {
|
|
|
705
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
class I extends
|
|
708
|
+
class I extends Br {
|
|
709
709
|
/**
|
|
710
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
711
711
|
*
|
|
@@ -790,7 +790,7 @@ class I extends Hr {
|
|
|
790
790
|
* Список коэффициентов цен на продукт.
|
|
791
791
|
*/
|
|
792
792
|
t(this, "priceCoefficients");
|
|
793
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = y(e == null ? void 0 : e.costDate) ? w(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new
|
|
793
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = y(e == null ? void 0 : e.costDate) ? w(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Hr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
795
795
|
s && (this.category = new Oe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Oe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Er(p, T.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
@@ -1165,7 +1165,7 @@ t(a, "instances", {}), /**
|
|
|
1165
1165
|
*/
|
|
1166
1166
|
t(a, "defaultErrorsResponseHandler", f);
|
|
1167
1167
|
let h = a;
|
|
1168
|
-
class
|
|
1168
|
+
class Ut extends h {
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
1171
1171
|
*
|
|
@@ -1330,7 +1330,7 @@ class Kr extends ur {
|
|
|
1330
1330
|
this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
class
|
|
1333
|
+
class d extends b {
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1336
1336
|
*
|
|
@@ -1381,7 +1381,7 @@ class Qr extends b {
|
|
|
1381
1381
|
* Дата и время удаления.
|
|
1382
1382
|
*/
|
|
1383
1383
|
t(this, "deletedAt");
|
|
1384
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = y(e == null ? void 0 : e.publishedAt) ? w(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new
|
|
1384
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = y(e == null ? void 0 : e.publishedAt) ? w(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new d(e == null ? void 0 : e.owner), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
class W extends ur {
|
|
@@ -1652,7 +1652,7 @@ class le extends C {
|
|
|
1652
1652
|
e && (this.country = new ee(e.country));
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
|
-
class
|
|
1655
|
+
class He extends C {
|
|
1656
1656
|
/**
|
|
1657
1657
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1658
1658
|
*
|
|
@@ -1748,7 +1748,7 @@ class me extends hr {
|
|
|
1748
1748
|
* Список менеджеров клиента.
|
|
1749
1749
|
*/
|
|
1750
1750
|
t(this, "managers");
|
|
1751
|
-
this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new
|
|
1751
|
+
this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new He(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ce(i))) ?? [];
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
class se extends j {
|
|
@@ -1855,7 +1855,7 @@ class k {
|
|
|
1855
1855
|
this.from = y(r == null ? void 0 : r.from) ? w(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = y(r == null ? void 0 : r.to) ? w(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
|
-
class
|
|
1858
|
+
class dt {
|
|
1859
1859
|
/**
|
|
1860
1860
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1861
1861
|
*
|
|
@@ -1915,7 +1915,7 @@ class Ut {
|
|
|
1915
1915
|
return Object.keys(this).forEach((c) => {
|
|
1916
1916
|
const u = this[c];
|
|
1917
1917
|
// eslint-disable-next-line prettier/prettier
|
|
1918
|
-
D(u) || y(u) && u.trim().length === 0 ||
|
|
1918
|
+
D(u) || y(u) && u.trim().length === 0 || de(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
1919
1919
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
@@ -2161,6 +2161,10 @@ class Ft {
|
|
|
2161
2161
|
* @inheritDoc
|
|
2162
2162
|
*/
|
|
2163
2163
|
t(this, "sentry");
|
|
2164
|
+
/**
|
|
2165
|
+
* @inheritDoc
|
|
2166
|
+
*/
|
|
2167
|
+
t(this, "tableDefaultHeightCoefficient");
|
|
2164
2168
|
/**
|
|
2165
2169
|
* @inheritDoc
|
|
2166
2170
|
*/
|
|
@@ -2181,7 +2185,7 @@ class Ft {
|
|
|
2181
2185
|
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new rt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new et(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new tt({
|
|
2182
2186
|
environment: this.environment,
|
|
2183
2187
|
...r == null ? void 0 : r.sentry
|
|
2184
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
|
|
2188
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
|
|
2185
2189
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2186
2190
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2187
2191
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
@@ -2510,7 +2514,7 @@ class Gt extends h {
|
|
|
2510
2514
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2511
2515
|
}
|
|
2512
2516
|
}
|
|
2513
|
-
class
|
|
2517
|
+
class Ht extends h {
|
|
2514
2518
|
/**
|
|
2515
2519
|
* Возвращает список данных о корневых категориях.
|
|
2516
2520
|
*
|
|
@@ -2602,7 +2606,7 @@ class Bt extends h {
|
|
|
2602
2606
|
});
|
|
2603
2607
|
}
|
|
2604
2608
|
}
|
|
2605
|
-
class
|
|
2609
|
+
class Bt extends h {
|
|
2606
2610
|
/**
|
|
2607
2611
|
* Возвращает данные об указанном продукте.
|
|
2608
2612
|
*
|
|
@@ -2735,7 +2739,7 @@ class zt extends h {
|
|
|
2735
2739
|
);
|
|
2736
2740
|
}
|
|
2737
2741
|
}
|
|
2738
|
-
var
|
|
2742
|
+
var Be = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Be || {});
|
|
2739
2743
|
class Ve {
|
|
2740
2744
|
/**
|
|
2741
2745
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2755,7 +2759,7 @@ class Ve {
|
|
|
2755
2759
|
* Значение с которым сравнивается поле.
|
|
2756
2760
|
*/
|
|
2757
2761
|
t(this, "value");
|
|
2758
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2762
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Be.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2759
2763
|
}
|
|
2760
2764
|
/**
|
|
2761
2765
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2800,7 +2804,7 @@ class ue {
|
|
|
2800
2804
|
toPrimitive() {
|
|
2801
2805
|
return {
|
|
2802
2806
|
groupOp: this.groupOp,
|
|
2803
|
-
filters: this.filters.map((r) => r instanceof Ve &&
|
|
2807
|
+
filters: this.filters.map((r) => r instanceof Ve && de(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2804
2808
|
groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
|
|
2805
2809
|
};
|
|
2806
2810
|
}
|
|
@@ -3709,7 +3713,7 @@ class wr extends b {
|
|
|
3709
3713
|
*/
|
|
3710
3714
|
t(this, "updater");
|
|
3711
3715
|
if (e) {
|
|
3712
|
-
if (this.opf = new F(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e.createdAt, this.creator = e.creator ? new
|
|
3716
|
+
if (this.opf = new F(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3713
3717
|
const s = [];
|
|
3714
3718
|
e.contacts.forEach((i) => {
|
|
3715
3719
|
s.push(new M(i));
|
|
@@ -4078,7 +4082,7 @@ class Qt {
|
|
|
4078
4082
|
*/
|
|
4079
4083
|
t(this, "isExcludedFromMsCallsToClients");
|
|
4080
4084
|
var e, s, i, o, c, u;
|
|
4081
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new
|
|
4085
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new He(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new De(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new x(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4082
4086
|
createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4083
4087
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4084
4088
|
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
@@ -4143,7 +4147,7 @@ class Qt {
|
|
|
4143
4147
|
return Object.keys(this).forEach((c) => {
|
|
4144
4148
|
const u = this[c];
|
|
4145
4149
|
// eslint-disable-next-line prettier/prettier
|
|
4146
|
-
D(u) || y(u) && u.trim().length === 0 ||
|
|
4150
|
+
D(u) || y(u) && u.trim().length === 0 || de(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
4147
4151
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4148
4152
|
}
|
|
4149
4153
|
}
|
|
@@ -4167,7 +4171,7 @@ class Pr extends j {
|
|
|
4167
4171
|
* Признак того, что заказ подтвержден в 1С.
|
|
4168
4172
|
*/
|
|
4169
4173
|
t(this, "isApproved1c");
|
|
4170
|
-
this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4174
|
+
this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new d(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4171
4175
|
}
|
|
4172
4176
|
}
|
|
4173
4177
|
class yt extends b {
|
|
@@ -4446,7 +4450,7 @@ class L extends Te {
|
|
|
4446
4450
|
return this.getClientsList({
|
|
4447
4451
|
groupOp: "and",
|
|
4448
4452
|
groups: [],
|
|
4449
|
-
filters: [{ field: "phone", op:
|
|
4453
|
+
filters: [{ field: "phone", op: Be.Contains, value: r }]
|
|
4450
4454
|
});
|
|
4451
4455
|
}
|
|
4452
4456
|
/**
|
|
@@ -5060,8 +5064,8 @@ class rs {
|
|
|
5060
5064
|
return {
|
|
5061
5065
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5062
5066
|
nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
|
|
5063
|
-
today: { label: "Сегодня", from: _e(), to:
|
|
5064
|
-
yesterday: { label: "Вчера", from:
|
|
5067
|
+
today: { label: "Сегодня", from: _e(), to: dr() },
|
|
5068
|
+
yesterday: { label: "Вчера", from: Ur(), to: Nr() },
|
|
5065
5069
|
tomorrow: { label: "Завтра", from: qr(), to: Or() }
|
|
5066
5070
|
};
|
|
5067
5071
|
}
|
|
@@ -5193,7 +5197,7 @@ class Rr extends Pr {
|
|
|
5193
5197
|
date: y((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? w(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5194
5198
|
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
|
|
5195
5199
|
warehouse: (R = e == null ? void 0 : e.delivery) != null && R.warehouse ? new Ae(e.delivery.warehouse) : void 0
|
|
5196
|
-
}, this.attachedUser = new
|
|
5200
|
+
}, this.attachedUser = new d(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? w(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? w(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5197
5201
|
}
|
|
5198
5202
|
}
|
|
5199
5203
|
class vt extends j {
|
|
@@ -5511,7 +5515,7 @@ class Rt {
|
|
|
5511
5515
|
* @inheritDoc
|
|
5512
5516
|
*/
|
|
5513
5517
|
t(this, "currency");
|
|
5514
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? w(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new
|
|
5518
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? w(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
|
|
5515
5519
|
}
|
|
5516
5520
|
}
|
|
5517
5521
|
class At extends oe {
|
|
@@ -5546,7 +5550,7 @@ class ns extends h {
|
|
|
5546
5550
|
getProductPriceHistory(r) {
|
|
5547
5551
|
var i, o, c, u;
|
|
5548
5552
|
const e = T.getConfig().dateFormats.api, s = ir(
|
|
5549
|
-
|
|
5553
|
+
Ue(r, {
|
|
5550
5554
|
costDate: {
|
|
5551
5555
|
from: ke((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
5552
5556
|
to: ke((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (u = r.costDate) == null ? void 0 : u.to
|
|
@@ -5712,7 +5716,7 @@ class $ extends pe {
|
|
|
5712
5716
|
* @param term Терм поиска.
|
|
5713
5717
|
*/
|
|
5714
5718
|
searchCity(r) {
|
|
5715
|
-
return this.getTypedDataArrayRequester(
|
|
5719
|
+
return this.getTypedDataArrayRequester(He, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5716
5720
|
}
|
|
5717
5721
|
/**
|
|
5718
5722
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5762,7 +5766,7 @@ class $ extends pe {
|
|
|
5762
5766
|
}
|
|
5763
5767
|
}
|
|
5764
5768
|
const A = te("__references_private", () => {
|
|
5765
|
-
const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0), S = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0),
|
|
5769
|
+
const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0), S = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0), H = m(void 0), $e = m(void 0), l = m(void 0);
|
|
5766
5770
|
return {
|
|
5767
5771
|
/**
|
|
5768
5772
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5827,7 +5831,7 @@ const A = te("__references_private", () => {
|
|
|
5827
5831
|
/**
|
|
5828
5832
|
* Справочник складов.
|
|
5829
5833
|
*/
|
|
5830
|
-
warehousesReference:
|
|
5834
|
+
warehousesReference: H,
|
|
5831
5835
|
/**
|
|
5832
5836
|
* Справочник типов свойств.
|
|
5833
5837
|
*/
|
|
@@ -5913,7 +5917,7 @@ const A = te("__references_private", () => {
|
|
|
5913
5917
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
|
|
5914
5918
|
l.warehousesReference = g;
|
|
5915
5919
|
}).catch(f)), l.warehousesReference;
|
|
5916
|
-
}),
|
|
5920
|
+
}), H = P(() => {
|
|
5917
5921
|
const l = A();
|
|
5918
5922
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
|
|
5919
5923
|
l.propertyTypesReference = g;
|
|
@@ -5988,7 +5992,7 @@ const A = te("__references_private", () => {
|
|
|
5988
5992
|
/**
|
|
5989
5993
|
* Справочник типов свойств.
|
|
5990
5994
|
*/
|
|
5991
|
-
propertyTypesReference:
|
|
5995
|
+
propertyTypesReference: H,
|
|
5992
5996
|
/**
|
|
5993
5997
|
* Справочник коэффициентов цен.
|
|
5994
5998
|
*/
|
|
@@ -6237,14 +6241,14 @@ export {
|
|
|
6237
6241
|
fe as Cart,
|
|
6238
6242
|
Wr as CartItem,
|
|
6239
6243
|
zr as CartItemBase,
|
|
6240
|
-
|
|
6244
|
+
Ut as CartProvider,
|
|
6241
6245
|
Mt as CatalogProvider,
|
|
6242
6246
|
or as CatalogableItem,
|
|
6243
6247
|
z as Category,
|
|
6244
6248
|
Je as CategoryPricingRule,
|
|
6245
6249
|
mr as ChannelPrimaryInterest,
|
|
6246
6250
|
Kt as City,
|
|
6247
|
-
|
|
6251
|
+
He as CityWithRegionAndCountry,
|
|
6248
6252
|
Ye as Client,
|
|
6249
6253
|
yt as ClientAdditionalData,
|
|
6250
6254
|
we as ClientCategory,
|
|
@@ -6288,15 +6292,15 @@ export {
|
|
|
6288
6292
|
gs as FieldValidationResultData,
|
|
6289
6293
|
ue as FilterGroup,
|
|
6290
6294
|
Ve as FilterItem,
|
|
6291
|
-
|
|
6295
|
+
Be as FilterOpEnum,
|
|
6292
6296
|
lr as GeoCoordinates,
|
|
6293
|
-
|
|
6297
|
+
Br as HiddenCatalogableItem,
|
|
6294
6298
|
pe as HttpCachedRequester,
|
|
6295
6299
|
rt as HttpParamsConfig,
|
|
6296
6300
|
h as HttpRequester,
|
|
6297
6301
|
j as Identity,
|
|
6298
6302
|
Er as Image,
|
|
6299
|
-
|
|
6303
|
+
U as JwtPayload,
|
|
6300
6304
|
De as Manager,
|
|
6301
6305
|
ce as ManagerCommon,
|
|
6302
6306
|
ts as ManagerDataFactory,
|
|
@@ -6331,8 +6335,8 @@ export {
|
|
|
6331
6335
|
Jt as PricingRoleProvider,
|
|
6332
6336
|
Oe as PrimaryCatalogableItem,
|
|
6333
6337
|
I as Product,
|
|
6334
|
-
|
|
6335
|
-
|
|
6338
|
+
Ht as ProductCategoryDataProvider,
|
|
6339
|
+
Bt as ProductDataProvider,
|
|
6336
6340
|
ht as ProductFileType,
|
|
6337
6341
|
Me as ProductPriceCoefficient,
|
|
6338
6342
|
At as ProductPriceHistory,
|
|
@@ -6352,8 +6356,8 @@ export {
|
|
|
6352
6356
|
rr as Seo,
|
|
6353
6357
|
ls as SeoDataProvider,
|
|
6354
6358
|
yr as SourcePrimaryInterest,
|
|
6355
|
-
|
|
6356
|
-
|
|
6359
|
+
Hr as StockCount,
|
|
6360
|
+
dt as TemplatesListFilters,
|
|
6357
6361
|
je as TypedInstanceFactory,
|
|
6358
6362
|
Xe as UnitsHelper,
|
|
6359
6363
|
Zt as UnknownClientDataProvider,
|
|
@@ -6363,7 +6367,7 @@ export {
|
|
|
6363
6367
|
hr as UserCommonInfo,
|
|
6364
6368
|
bt as UserDataProvider,
|
|
6365
6369
|
Xr as UserPricingRole,
|
|
6366
|
-
|
|
6370
|
+
d as UserShortInfo,
|
|
6367
6371
|
Tt as UserTypeEnum,
|
|
6368
6372
|
st as VersionConfig,
|
|
6369
6373
|
Ae as Warehouse,
|