@snabcentr/common-lib 1.61.0 → 1.61.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/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +95 -83
- 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/catalog/providers/price-template-provider.d.ts +6 -2
- package/dist/src/catalog/providers/price-template-provider.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
|
-
## 1.61.
|
|
1
|
+
## 1.61.1 (2025-07-11)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#11871: Добавлена возможность рекурсивного сохранения и удаления цен шаблонов...](web_soft/libs/ts/snabcentr-common-lib@724ae72c62167ab0f2f19e2296fe5931e0b2acae) ([merge request](web_soft/libs/ts/snabcentr-common-lib!114))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var nr = Object.defineProperty;
|
|
2
2
|
var or = (n, r, e) => r in n ? nr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => or(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { isNil as K, toUpper as cr, constant as lr, isUndefined as pr, isString as m, cloneDeep as ur, noop as y, toLower as hr, isEmpty as
|
|
5
|
-
import { parseISO as f, format as B, addSeconds as wr, isAfter as Cr, startOfToday as Be, addBusinessDays as vr, endOfTomorrow as Pr, startOfTomorrow as Rr, endOfYesterday as
|
|
4
|
+
import { isNil as K, toUpper as cr, constant as lr, isUndefined as pr, isString as m, cloneDeep as ur, noop as y, toLower as hr, isEmpty as ae, isFunction as Le, map as ce, forEach as gr, isDate as mr, isArray as ze, omitBy as fr, isObject as yr } from "lodash-es";
|
|
5
|
+
import { parseISO as f, format as B, addSeconds as wr, isAfter as Cr, startOfToday as Be, addBusinessDays as vr, endOfTomorrow as Pr, startOfTomorrow as Rr, endOfYesterday as Dr, startOfYesterday as Ar, endOfToday as $r, endOfDay as br, startOfDay as Tr } from "date-fns";
|
|
6
6
|
import _r from "axios";
|
|
7
7
|
import { objectToSnake as Oe, objectToCamel as Sr } from "ts-case-convert";
|
|
8
8
|
import { defineStore as me } from "pinia";
|
|
@@ -221,7 +221,7 @@ class ye extends w {
|
|
|
221
221
|
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 J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Ve(e == null ? void 0 : e.coordinates);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
class
|
|
224
|
+
class ar {
|
|
225
225
|
/**
|
|
226
226
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
227
227
|
*
|
|
@@ -276,7 +276,7 @@ const j = class j {
|
|
|
276
276
|
*/
|
|
277
277
|
t(j, "config");
|
|
278
278
|
let b = j;
|
|
279
|
-
class
|
|
279
|
+
class Lr extends We {
|
|
280
280
|
/**
|
|
281
281
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
282
282
|
*
|
|
@@ -314,7 +314,7 @@ class Ir {
|
|
|
314
314
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
class _ extends
|
|
317
|
+
class _ extends Lr {
|
|
318
318
|
/**
|
|
319
319
|
* Инициализирует экземпляр класса {@link Product}.
|
|
320
320
|
*
|
|
@@ -399,7 +399,7 @@ class _ extends ar {
|
|
|
399
399
|
* Список коэффициентов цен на продукт.
|
|
400
400
|
*/
|
|
401
401
|
t(this, "priceCoefficients");
|
|
402
|
-
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 = m(e == null ? void 0 : e.costDate) ? f(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((g) => new
|
|
402
|
+
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 = m(e == null ? void 0 : e.costDate) ? f(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((g) => new ar(g))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
403
403
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
404
404
|
s && (this.category = new $e({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new $e(g))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((g) => new Ir(g, b.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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new Ie(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
405
405
|
}
|
|
@@ -719,7 +719,7 @@ class xe {
|
|
|
719
719
|
return new r(e);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
const
|
|
722
|
+
const a = class a {
|
|
723
723
|
/**
|
|
724
724
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
725
725
|
*
|
|
@@ -740,7 +740,7 @@ const L = class L {
|
|
|
740
740
|
*/
|
|
741
741
|
t(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
742
742
|
const s = b.getConfig().version;
|
|
743
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
743
|
+
this.defaultInstanceNotificationErrorResponseHandler = a.baseDefaultNotificationErrorResponseHandler, this.httpClient = _r.create({
|
|
744
744
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
745
745
|
baseURL: r,
|
|
746
746
|
headers: {
|
|
@@ -755,7 +755,7 @@ const L = class L {
|
|
|
755
755
|
), this.httpClient.interceptors.response.use(
|
|
756
756
|
(i) => (i.data && (i.data = Sr(i.data)), i),
|
|
757
757
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
758
|
-
(i) =>
|
|
758
|
+
(i) => a.convertHttpErrorResponse(i)
|
|
759
759
|
);
|
|
760
760
|
}
|
|
761
761
|
/**
|
|
@@ -764,7 +764,7 @@ const L = class L {
|
|
|
764
764
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
765
765
|
*/
|
|
766
766
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
767
|
-
|
|
767
|
+
a.baseDefaultNotificationErrorResponseHandler = r;
|
|
768
768
|
}
|
|
769
769
|
/**
|
|
770
770
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -772,7 +772,7 @@ const L = class L {
|
|
|
772
772
|
* @param type Тип данных, которыми оперирует метод.
|
|
773
773
|
*/
|
|
774
774
|
static getInstance(r) {
|
|
775
|
-
return Object.prototype.hasOwnProperty.call(
|
|
775
|
+
return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = xe.simpleInstanceInitializer(r)), a.instances[r.name];
|
|
776
776
|
}
|
|
777
777
|
/**
|
|
778
778
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -867,15 +867,15 @@ const L = class L {
|
|
|
867
867
|
* Экземпляр объекта текущего класса.
|
|
868
868
|
*/
|
|
869
869
|
// eslint-disable-next-line no-use-before-define
|
|
870
|
-
t(
|
|
870
|
+
t(a, "instances", {}), /**
|
|
871
871
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
872
872
|
*
|
|
873
873
|
* Параметры:
|
|
874
874
|
* - error Данные об ошибке.
|
|
875
875
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
876
876
|
*/
|
|
877
|
-
t(
|
|
878
|
-
let be =
|
|
877
|
+
t(a, "baseDefaultNotificationErrorResponseHandler", y);
|
|
878
|
+
let be = a;
|
|
879
879
|
const V = class V extends be {
|
|
880
880
|
/**
|
|
881
881
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
@@ -926,9 +926,9 @@ const V = class V extends be {
|
|
|
926
926
|
*/
|
|
927
927
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
928
928
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
929
|
-
const c = s + (
|
|
929
|
+
const c = s + (ae(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
930
930
|
return p ? Promise.resolve(p) : this.get(s, o).then((g) => {
|
|
931
|
-
const R = g.map((
|
|
931
|
+
const R = g.map((A) => xe.instanceInitializer(e, A));
|
|
932
932
|
return i && R && this.cacheResponse(s, R), R;
|
|
933
933
|
});
|
|
934
934
|
}
|
|
@@ -1690,7 +1690,7 @@ class Rt {
|
|
|
1690
1690
|
return Object.keys(this).forEach((c) => {
|
|
1691
1691
|
const p = this[c];
|
|
1692
1692
|
// eslint-disable-next-line prettier/prettier
|
|
1693
|
-
K(p) || m(p) && p.trim().length === 0 ||
|
|
1693
|
+
K(p) || m(p) && p.trim().length === 0 || Le(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
1694
1694
|
}), !((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;
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
@@ -1698,7 +1698,7 @@ class Br extends w {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
class Ye extends w {
|
|
1700
1700
|
}
|
|
1701
|
-
class
|
|
1701
|
+
class Dt extends w {
|
|
1702
1702
|
}
|
|
1703
1703
|
class Wr extends w {
|
|
1704
1704
|
}
|
|
@@ -1749,7 +1749,7 @@ class Xe extends w {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
class Ze extends w {
|
|
1751
1751
|
}
|
|
1752
|
-
class
|
|
1752
|
+
class D extends u {
|
|
1753
1753
|
/**
|
|
1754
1754
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
1755
1755
|
*
|
|
@@ -2037,7 +2037,7 @@ class qe {
|
|
|
2037
2037
|
this.role = new ee(r == null ? void 0 : r.role), this.category = new ie(r == null ? void 0 : r.category), this.minCoefficient = new fe(r == null ? void 0 : r.minCoefficient);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
class
|
|
2040
|
+
class At extends u {
|
|
2041
2041
|
/**
|
|
2042
2042
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2043
2043
|
*
|
|
@@ -2573,7 +2573,7 @@ class St extends u {
|
|
|
2573
2573
|
);
|
|
2574
2574
|
}
|
|
2575
2575
|
}
|
|
2576
|
-
class
|
|
2576
|
+
class at extends u {
|
|
2577
2577
|
/**
|
|
2578
2578
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2579
2579
|
*
|
|
@@ -2659,7 +2659,7 @@ class se {
|
|
|
2659
2659
|
toPrimitive() {
|
|
2660
2660
|
return {
|
|
2661
2661
|
groupOp: this.groupOp,
|
|
2662
|
-
filters: this.filters.map((r) => r instanceof Ue &&
|
|
2662
|
+
filters: this.filters.map((r) => r instanceof Ue && Le(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2663
2663
|
groups: this.groups.map((r) => r instanceof se ? r.toPrimitive() : r)
|
|
2664
2664
|
};
|
|
2665
2665
|
}
|
|
@@ -2681,10 +2681,10 @@ class Ce extends u {
|
|
|
2681
2681
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2682
2682
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2683
2683
|
};
|
|
2684
|
-
return e && (g.filters = JSON.stringify((e instanceof se ? e : new se(e)).toPrimitive())),
|
|
2684
|
+
return e && (g.filters = JSON.stringify((e instanceof se ? e : new se(e)).toPrimitive())), ae(s) || (g.sort = ze(s) ? s : [s]), o && (g = { ...g, ...o }), this.get(r, g, c, p);
|
|
2685
2685
|
}
|
|
2686
2686
|
}
|
|
2687
|
-
class
|
|
2687
|
+
class Lt extends Ce {
|
|
2688
2688
|
/**
|
|
2689
2689
|
* Возвращает список шаблонов прайс-листа.
|
|
2690
2690
|
*
|
|
@@ -2836,18 +2836,24 @@ class at extends Ce {
|
|
|
2836
2836
|
* @param priceTemplateId Идентификатор шаблона прайс-листа.
|
|
2837
2837
|
* @param productCategoryId Идентификатор категории продуктов.
|
|
2838
2838
|
* @param data Данные для сохранения цены.
|
|
2839
|
+
* @param recursively Признак того, что действие необходимо осуществить
|
|
2840
|
+
* рекурсивно для всех дочерних категорий.
|
|
2839
2841
|
*
|
|
2840
2842
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
|
|
2841
2843
|
*/
|
|
2842
|
-
saveCategoryTemplatePrice(r, e, s) {
|
|
2843
|
-
var
|
|
2844
|
-
return this.
|
|
2845
|
-
`/internal/price/templates/${r}/categories/${e}`,
|
|
2844
|
+
saveCategoryTemplatePrice(r, e, s, i = !1) {
|
|
2845
|
+
var o;
|
|
2846
|
+
return this.request(
|
|
2846
2847
|
{
|
|
2847
|
-
|
|
2848
|
-
|
|
2848
|
+
method: "POST",
|
|
2849
|
+
url: `/internal/price/templates/${r}/categories/${e}`,
|
|
2850
|
+
data: {
|
|
2851
|
+
price_coefficient_id: (o = s.coefficient) == null ? void 0 : o.id,
|
|
2852
|
+
increase_percent: s.value
|
|
2853
|
+
},
|
|
2854
|
+
params: i ? { recursively: !0 } : {}
|
|
2849
2855
|
},
|
|
2850
|
-
(
|
|
2856
|
+
(c) => new ve(c.data)
|
|
2851
2857
|
);
|
|
2852
2858
|
}
|
|
2853
2859
|
/**
|
|
@@ -2855,11 +2861,17 @@ class at extends Ce {
|
|
|
2855
2861
|
*
|
|
2856
2862
|
* @param priceTemplateId Идентификатор шаблона прайс-листа.
|
|
2857
2863
|
* @param productCategoryId Идентификатор категории продуктов.
|
|
2864
|
+
* @param recursively Признак того, что действие необходимо осуществить
|
|
2865
|
+
* рекурсивно для всех дочерних категорий.
|
|
2858
2866
|
*
|
|
2859
2867
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_delete
|
|
2860
2868
|
*/
|
|
2861
|
-
deleteCategoryTemplatePrice(r, e) {
|
|
2862
|
-
return this.
|
|
2869
|
+
deleteCategoryTemplatePrice(r, e, s = !1) {
|
|
2870
|
+
return this.request({
|
|
2871
|
+
method: "DELETE",
|
|
2872
|
+
url: `/internal/price/templates/${r}/categories/${e}`,
|
|
2873
|
+
params: s ? { recursively: !0 } : {}
|
|
2874
|
+
});
|
|
2863
2875
|
}
|
|
2864
2876
|
/**
|
|
2865
2877
|
* Возвращает список клиентов, привязанных к шаблону прайс-листа.
|
|
@@ -3945,7 +3957,7 @@ class Nt {
|
|
|
3945
3957
|
return Object.keys(this).forEach((c) => {
|
|
3946
3958
|
const p = this[c];
|
|
3947
3959
|
// eslint-disable-next-line prettier/prettier
|
|
3948
|
-
K(p) || m(p) && p.trim().length === 0 ||
|
|
3960
|
+
K(p) || m(p) && p.trim().length === 0 || Le(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
3949
3961
|
}), !((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;
|
|
3950
3962
|
}
|
|
3951
3963
|
}
|
|
@@ -4277,7 +4289,7 @@ class qt extends Ce {
|
|
|
4277
4289
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4278
4290
|
*/
|
|
4279
4291
|
createContragentClientData(r, e, s = {}) {
|
|
4280
|
-
var g, R,
|
|
4292
|
+
var g, R, A, L, I, x, k, N;
|
|
4281
4293
|
let i;
|
|
4282
4294
|
const o = e, c = e, p = e;
|
|
4283
4295
|
switch (e.opf.slug) {
|
|
@@ -4304,8 +4316,8 @@ class qt extends Ce {
|
|
|
4304
4316
|
opf: c.opf.slug,
|
|
4305
4317
|
name: c.name,
|
|
4306
4318
|
alternative_name: c.alternativeName,
|
|
4307
|
-
partner_group_id: (
|
|
4308
|
-
manager_id: (
|
|
4319
|
+
partner_group_id: (A = c.partnerGroup) == null ? void 0 : A.id,
|
|
4320
|
+
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4309
4321
|
comment: c.comment,
|
|
4310
4322
|
inn: c.inn,
|
|
4311
4323
|
kpp: c.kpp,
|
|
@@ -4366,7 +4378,7 @@ class qt extends Ce {
|
|
|
4366
4378
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4367
4379
|
*/
|
|
4368
4380
|
updateContragentClientData(r, e, s = {}) {
|
|
4369
|
-
var g, R,
|
|
4381
|
+
var g, R, A, L, I, x, k, N;
|
|
4370
4382
|
let i;
|
|
4371
4383
|
const o = e, c = e, p = e;
|
|
4372
4384
|
switch (e.opf.slug) {
|
|
@@ -4393,8 +4405,8 @@ class qt extends Ce {
|
|
|
4393
4405
|
opf: c.opf.slug,
|
|
4394
4406
|
name: c.name,
|
|
4395
4407
|
alternative_name: c.alternativeName,
|
|
4396
|
-
partner_group_id: (
|
|
4397
|
-
manager_id: (
|
|
4408
|
+
partner_group_id: (A = c.partnerGroup) == null ? void 0 : A.id,
|
|
4409
|
+
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4398
4410
|
comment: c.comment,
|
|
4399
4411
|
inn: c.inn,
|
|
4400
4412
|
kpp: c.kpp,
|
|
@@ -4897,7 +4909,7 @@ class Mt {
|
|
|
4897
4909
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
4898
4910
|
nextWorkingDay: { label: "Следующий рабочий день", from: Tr(r), to: br(r) },
|
|
4899
4911
|
today: { label: "Сегодня", from: Be(), to: $r() },
|
|
4900
|
-
yesterday: { label: "Вчера", from:
|
|
4912
|
+
yesterday: { label: "Вчера", from: Ar(), to: Dr() },
|
|
4901
4913
|
tomorrow: { label: "Завтра", from: Rr(), to: Pr() }
|
|
4902
4914
|
};
|
|
4903
4915
|
}
|
|
@@ -4978,7 +4990,7 @@ class ir extends sr {
|
|
|
4978
4990
|
* @param data Данные для первоначальной инициализации.
|
|
4979
4991
|
*/
|
|
4980
4992
|
constructor(e) {
|
|
4981
|
-
var s, i, o, c, p, g, R,
|
|
4993
|
+
var s, i, o, c, p, g, R, A;
|
|
4982
4994
|
super(e);
|
|
4983
4995
|
/**
|
|
4984
4996
|
* Краткие данные о клиенте.
|
|
@@ -5028,7 +5040,7 @@ class ir extends sr {
|
|
|
5028
5040
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5029
5041
|
date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
|
|
5030
5042
|
address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new ge(e.delivery.address) : void 0,
|
|
5031
|
-
warehouse: (
|
|
5043
|
+
warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new ye(e.delivery.warehouse) : void 0
|
|
5032
5044
|
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(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;
|
|
5033
5045
|
}
|
|
5034
5046
|
}
|
|
@@ -5192,7 +5204,7 @@ class Ht extends Ce {
|
|
|
5192
5204
|
return this.get(`/internal/orders/${r}`, {}, (e) => new ct(e.data));
|
|
5193
5205
|
}
|
|
5194
5206
|
}
|
|
5195
|
-
class
|
|
5207
|
+
class De {
|
|
5196
5208
|
/**
|
|
5197
5209
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5198
5210
|
*
|
|
@@ -5222,7 +5234,7 @@ class Ae {
|
|
|
5222
5234
|
this.client = new ne(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? ke.Product;
|
|
5223
5235
|
}
|
|
5224
5236
|
}
|
|
5225
|
-
const
|
|
5237
|
+
const Ae = (n) => {
|
|
5226
5238
|
var r, e, s, i, o;
|
|
5227
5239
|
return n ? fr(
|
|
5228
5240
|
{
|
|
@@ -5233,7 +5245,7 @@ const De = (n) => {
|
|
|
5233
5245
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5234
5246
|
hideNotActive: n.hideNotActive
|
|
5235
5247
|
},
|
|
5236
|
-
(c) => K(c) || (ze(c) || yr(c)) &&
|
|
5248
|
+
(c) => K(c) || (ze(c) || yr(c)) && ae(c)
|
|
5237
5249
|
) : {};
|
|
5238
5250
|
}, Fe = (n) => {
|
|
5239
5251
|
const r = {};
|
|
@@ -5254,9 +5266,9 @@ class zt extends u {
|
|
|
5254
5266
|
`/internal/price/products/${r}/analyze`,
|
|
5255
5267
|
{
|
|
5256
5268
|
...Fe(e),
|
|
5257
|
-
filters:
|
|
5269
|
+
filters: Ae(s)
|
|
5258
5270
|
},
|
|
5259
|
-
(i) => i.data.map((o) => new
|
|
5271
|
+
(i) => i.data.map((o) => new De(o))
|
|
5260
5272
|
);
|
|
5261
5273
|
}
|
|
5262
5274
|
/**
|
|
@@ -5273,9 +5285,9 @@ class zt extends u {
|
|
|
5273
5285
|
`/internal/price/categories/${r}/analyze`,
|
|
5274
5286
|
{
|
|
5275
5287
|
...Fe(e),
|
|
5276
|
-
filters:
|
|
5288
|
+
filters: Ae(s)
|
|
5277
5289
|
},
|
|
5278
|
-
(i) => i.data.map((o) => new
|
|
5290
|
+
(i) => i.data.map((o) => new De(o))
|
|
5279
5291
|
);
|
|
5280
5292
|
}
|
|
5281
5293
|
/**
|
|
@@ -5294,9 +5306,9 @@ class zt extends u {
|
|
|
5294
5306
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5295
5307
|
{
|
|
5296
5308
|
...e,
|
|
5297
|
-
filters:
|
|
5309
|
+
filters: Ae(s)
|
|
5298
5310
|
},
|
|
5299
|
-
(i) => i.data.map((o) => new
|
|
5311
|
+
(i) => i.data.map((o) => new De(o))
|
|
5300
5312
|
);
|
|
5301
5313
|
}
|
|
5302
5314
|
}
|
|
@@ -5389,7 +5401,7 @@ class Bt extends u {
|
|
|
5389
5401
|
}
|
|
5390
5402
|
}
|
|
5391
5403
|
const P = me("__references_private", () => {
|
|
5392
|
-
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), p = C(void 0), g = C(void 0), R = C(void 0),
|
|
5404
|
+
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), p = C(void 0), g = C(void 0), R = C(void 0), A = C(void 0), L = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), N = C(void 0), d = C(void 0), l = C(void 0);
|
|
5393
5405
|
return {
|
|
5394
5406
|
/**
|
|
5395
5407
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5434,11 +5446,11 @@ const P = me("__references_private", () => {
|
|
|
5434
5446
|
/**
|
|
5435
5447
|
* Справочник групп партнеров.
|
|
5436
5448
|
*/
|
|
5437
|
-
partnerGroupReference:
|
|
5449
|
+
partnerGroupReference: A,
|
|
5438
5450
|
/**
|
|
5439
5451
|
* Справочник типов файлов продукктов/категорий.
|
|
5440
5452
|
*/
|
|
5441
|
-
productFileTypeReference:
|
|
5453
|
+
productFileTypeReference: L,
|
|
5442
5454
|
/**
|
|
5443
5455
|
* Справочник типов ресурсов.
|
|
5444
5456
|
*/
|
|
@@ -5467,67 +5479,67 @@ const P = me("__references_private", () => {
|
|
|
5467
5479
|
}), Wt = me("references", () => {
|
|
5468
5480
|
const n = v(() => {
|
|
5469
5481
|
const l = P();
|
|
5470
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(
|
|
5482
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(D).getChannelPrimaryInterest().then((h) => {
|
|
5471
5483
|
l.channelPrimaryInterestReference = h;
|
|
5472
5484
|
}).catch(y)), l.channelPrimaryInterestReference;
|
|
5473
5485
|
}), r = v(() => {
|
|
5474
5486
|
const l = P();
|
|
5475
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, u.getInstance(
|
|
5487
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, u.getInstance(D).getContactPositions().then((h) => {
|
|
5476
5488
|
l.contactPositionsReference = h;
|
|
5477
5489
|
}).catch(y)), l.contactPositionsReference;
|
|
5478
5490
|
}), e = v(() => {
|
|
5479
5491
|
const l = P();
|
|
5480
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, u.getInstance(
|
|
5492
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, u.getInstance(D).getCurrency().then((h) => {
|
|
5481
5493
|
l.currencyReference = h;
|
|
5482
5494
|
}).catch(y)), l.currencyReference;
|
|
5483
5495
|
}), s = v(() => {
|
|
5484
5496
|
const l = P();
|
|
5485
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, u.getInstance(
|
|
5497
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, u.getInstance(D).getOpf().then((h) => {
|
|
5486
5498
|
l.opfReference = h;
|
|
5487
5499
|
}).catch(y)), l.opfReference;
|
|
5488
5500
|
}), i = v(() => {
|
|
5489
5501
|
const l = P();
|
|
5490
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, u.getInstance(
|
|
5502
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, u.getInstance(D).getOrderPaymentStatuses().then((h) => {
|
|
5491
5503
|
l.orderPaymentStatusReference = h;
|
|
5492
5504
|
}).catch(y)), l.orderPaymentStatusReference;
|
|
5493
5505
|
}), o = v(() => {
|
|
5494
5506
|
const l = P();
|
|
5495
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, u.getInstance(
|
|
5507
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, u.getInstance(D).getOrderStatuses().then((h) => {
|
|
5496
5508
|
l.orderStatusReference = h;
|
|
5497
5509
|
}).catch(y)), l.orderStatusReference;
|
|
5498
5510
|
}), c = v(() => {
|
|
5499
5511
|
const l = P();
|
|
5500
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, u.getInstance(
|
|
5512
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, u.getInstance(D).getPaymentTypes().then((h) => {
|
|
5501
5513
|
l.paymentTypeReference = h;
|
|
5502
5514
|
}).catch(y)), l.paymentTypeReference;
|
|
5503
5515
|
}), p = v(() => {
|
|
5504
5516
|
const l = P();
|
|
5505
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, u.getInstance(
|
|
5517
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, u.getInstance(D).getPartnerGroup().then((h) => {
|
|
5506
5518
|
l.partnerGroupReference = h;
|
|
5507
5519
|
}).catch(y)), l.partnerGroupReference;
|
|
5508
5520
|
}), g = v(() => {
|
|
5509
5521
|
const l = P();
|
|
5510
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, u.getInstance(
|
|
5522
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, u.getInstance(D).getProductFileType().then((h) => {
|
|
5511
5523
|
l.productFileTypeReference = h;
|
|
5512
5524
|
}).catch(y)), l.productFileTypeReference;
|
|
5513
5525
|
}), R = v(() => {
|
|
5514
5526
|
const l = P();
|
|
5515
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, u.getInstance(
|
|
5527
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, u.getInstance(D).getResourceTypes().then((h) => {
|
|
5516
5528
|
l.resourceTypesReference = h;
|
|
5517
5529
|
}).catch(y)), l.resourceTypesReference;
|
|
5518
|
-
}),
|
|
5530
|
+
}), A = v(() => {
|
|
5519
5531
|
const l = P();
|
|
5520
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, u.getInstance(
|
|
5532
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, u.getInstance(D).getSalesDirections().then((h) => {
|
|
5521
5533
|
l.salesDirectionsReference = h;
|
|
5522
5534
|
}).catch(y)), l.salesDirectionsReference;
|
|
5523
|
-
}),
|
|
5535
|
+
}), L = v(() => {
|
|
5524
5536
|
const l = P();
|
|
5525
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(
|
|
5537
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(D).getSourcePrimaryInterest().then((h) => {
|
|
5526
5538
|
l.sourcePrimaryInterestReference = h;
|
|
5527
5539
|
}).catch(y)), l.sourcePrimaryInterestReference;
|
|
5528
5540
|
}), I = v(() => {
|
|
5529
5541
|
const l = P();
|
|
5530
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, u.getInstance(
|
|
5542
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, u.getInstance(D).getDeliveryTypes().then((h) => {
|
|
5531
5543
|
l.deliveryTypeReference = h;
|
|
5532
5544
|
}).catch(y)), l.deliveryTypeReference;
|
|
5533
5545
|
}), x = v(() => {
|
|
@@ -5537,17 +5549,17 @@ const P = me("__references_private", () => {
|
|
|
5537
5549
|
}).catch(y)), l.managersList;
|
|
5538
5550
|
}), k = v(() => {
|
|
5539
5551
|
const l = P();
|
|
5540
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, u.getInstance(
|
|
5552
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, u.getInstance(D).getWarehouses().then((h) => {
|
|
5541
5553
|
l.warehousesReference = h;
|
|
5542
5554
|
}).catch(y)), l.warehousesReference;
|
|
5543
5555
|
}), N = v(() => {
|
|
5544
5556
|
const l = P();
|
|
5545
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, u.getInstance(
|
|
5557
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, u.getInstance(D).getPropertyTypes().then((h) => {
|
|
5546
5558
|
l.propertyTypesReference = h;
|
|
5547
5559
|
}).catch(y)), l.propertyTypesReference;
|
|
5548
5560
|
}), d = v(() => {
|
|
5549
5561
|
const l = P();
|
|
5550
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(
|
|
5562
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(D).getPriceCoefficients().then((h) => {
|
|
5551
5563
|
l.priceCoefficientsReference = h;
|
|
5552
5564
|
}).catch(y)), l.priceCoefficientsReference;
|
|
5553
5565
|
});
|
|
@@ -5595,11 +5607,11 @@ const P = me("__references_private", () => {
|
|
|
5595
5607
|
/**
|
|
5596
5608
|
* Справочник направлений продаж.
|
|
5597
5609
|
*/
|
|
5598
|
-
salesDirectionsReference:
|
|
5610
|
+
salesDirectionsReference: A,
|
|
5599
5611
|
/**
|
|
5600
5612
|
* Справочник каналов первичного интереса.
|
|
5601
5613
|
*/
|
|
5602
|
-
sourcePrimaryInterestsReference:
|
|
5614
|
+
sourcePrimaryInterestsReference: L,
|
|
5603
5615
|
/**
|
|
5604
5616
|
* Справочник типов доставки.
|
|
5605
5617
|
*/
|
|
@@ -5725,12 +5737,12 @@ export {
|
|
|
5725
5737
|
kr as CartItem,
|
|
5726
5738
|
xr as CartItemBase,
|
|
5727
5739
|
vt as CartProvider,
|
|
5728
|
-
|
|
5740
|
+
At as CatalogProvider,
|
|
5729
5741
|
We as CatalogableItem,
|
|
5730
5742
|
q as Category,
|
|
5731
5743
|
qe as CategoryPricingRule,
|
|
5732
5744
|
Ye as ChannelPrimaryInterest,
|
|
5733
|
-
|
|
5745
|
+
Dt as City,
|
|
5734
5746
|
pe as CityWithRegionAndCountry,
|
|
5735
5747
|
Ge as Client,
|
|
5736
5748
|
st as ClientAdditionalData,
|
|
@@ -5740,7 +5752,7 @@ export {
|
|
|
5740
5752
|
bt as ClientPriceTemplateProvider,
|
|
5741
5753
|
Q as ClientProduct,
|
|
5742
5754
|
St as ClientProductCategoryDataProvider,
|
|
5743
|
-
|
|
5755
|
+
at as ClientProductDataProvider,
|
|
5744
5756
|
ne as ClientShortInfo,
|
|
5745
5757
|
Zr as ClientsAdditionalDataRequestTypeEnum,
|
|
5746
5758
|
Nt as ClientsListFilters,
|
|
@@ -5775,7 +5787,7 @@ export {
|
|
|
5775
5787
|
Ue as FilterItem,
|
|
5776
5788
|
Ne as FilterOpEnum,
|
|
5777
5789
|
Ve as GeoCoordinates,
|
|
5778
|
-
|
|
5790
|
+
Lr as HiddenCatalogableItem,
|
|
5779
5791
|
Te as HttpBaseCachedRequester,
|
|
5780
5792
|
be as HttpBaseRequester,
|
|
5781
5793
|
Or as HttpParamsConfig,
|
|
@@ -5800,7 +5812,7 @@ export {
|
|
|
5800
5812
|
M as PartnerGroup,
|
|
5801
5813
|
Er as PaymentType,
|
|
5802
5814
|
Pt as PreferencesStorageProvider,
|
|
5803
|
-
|
|
5815
|
+
De as PriceAnalyze,
|
|
5804
5816
|
zt as PriceAnalyzeProvider,
|
|
5805
5817
|
fe as PriceCoefficient,
|
|
5806
5818
|
je as PriceCoefficientEnum,
|
|
@@ -5809,7 +5821,7 @@ export {
|
|
|
5809
5821
|
X as PriceTemplateClient,
|
|
5810
5822
|
Ke as PriceTemplateICatalogableItem,
|
|
5811
5823
|
Pe as PriceTemplateProduct,
|
|
5812
|
-
|
|
5824
|
+
Lt as PriceTemplateProvider,
|
|
5813
5825
|
ee as PricingRole,
|
|
5814
5826
|
It as PricingRoleProvider,
|
|
5815
5827
|
$e as PrimaryCatalogableItem,
|
|
@@ -5827,7 +5839,7 @@ export {
|
|
|
5827
5839
|
kt as RecommendationsDataProvider,
|
|
5828
5840
|
de as RecommendationsList,
|
|
5829
5841
|
w as Reference,
|
|
5830
|
-
|
|
5842
|
+
D as ReferenceDataProvider,
|
|
5831
5843
|
te as Region,
|
|
5832
5844
|
Xe as ResourceType,
|
|
5833
5845
|
S as SalesDirection,
|
|
@@ -5835,7 +5847,7 @@ export {
|
|
|
5835
5847
|
He as Seo,
|
|
5836
5848
|
Bt as SeoDataProvider,
|
|
5837
5849
|
Ze as SourcePrimaryInterest,
|
|
5838
|
-
|
|
5850
|
+
ar as StockCount,
|
|
5839
5851
|
Rt as TemplatesListFilters,
|
|
5840
5852
|
xe as TypedInstanceFactory,
|
|
5841
5853
|
Me as UnitsHelper,
|