@snabcentr/common-lib 4.5.0-dev → 4.6.0-dev
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/sc-common-lib.js +23 -6
- 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/classes/category-filter.d.ts +4 -0
- package/dist/src/catalog/classes/category-filter.d.ts.map +1 -1
- package/dist/src/catalog/classes/filter-settings.d.ts +4 -0
- package/dist/src/catalog/classes/filter-settings.d.ts.map +1 -1
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts +5 -1
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts +7 -2
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-category-filter.d.ts +4 -0
- package/dist/src/catalog/interfaces/i-category-filter.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts +5 -0
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts.map +1 -1
- package/dist/src/catalog/providers/properties-provider.d.ts +8 -0
- package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts +5 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts +5 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/manifest.json
CHANGED
package/dist/sc-common-lib.js
CHANGED
|
@@ -438,7 +438,7 @@ var ct = class extends ve {
|
|
|
438
438
|
}, jt = /* @__PURE__ */ function(e) {
|
|
439
439
|
return e.m2Cost = "m2Cost", e.percent = "percent", e.value = "value", e;
|
|
440
440
|
}({}), Mt = /* @__PURE__ */ function(e) {
|
|
441
|
-
return e.Checkbox = "checkbox", e.Range = "range", e.Toggle = "toggle", e;
|
|
441
|
+
return e.Checkbox = "checkbox", e.Range = "range", e.Toggle = "toggle", e.Group = "group", e;
|
|
442
442
|
}({}), H = class e extends B {
|
|
443
443
|
categories;
|
|
444
444
|
products;
|
|
@@ -596,8 +596,9 @@ var ct = class extends ve {
|
|
|
596
596
|
isMultiple;
|
|
597
597
|
type;
|
|
598
598
|
ord;
|
|
599
|
+
group;
|
|
599
600
|
constructor(e) {
|
|
600
|
-
this.isFake = e?.isFake ?? !1, this.isHidden = e?.isHidden ?? !1, this.isMultiple = e?.isMultiple ?? null, this.type = e?.type ?? null, this.ord = e?.ord ?? 0;
|
|
601
|
+
this.isFake = e?.isFake ?? !1, this.isHidden = e?.isHidden ?? !1, this.isMultiple = e?.isMultiple ?? null, this.type = e?.type ?? null, this.ord = e?.ord ?? 0, this.group = e?.group;
|
|
601
602
|
}
|
|
602
603
|
}, qt = class {
|
|
603
604
|
category;
|
|
@@ -612,7 +613,7 @@ var ct = class extends ve {
|
|
|
612
613
|
constructor(e) {
|
|
613
614
|
this.id = e?.id ?? "", this.label = e?.label ?? "";
|
|
614
615
|
}
|
|
615
|
-
}, Yt = class {
|
|
616
|
+
}, Yt = class e {
|
|
616
617
|
id;
|
|
617
618
|
label;
|
|
618
619
|
type;
|
|
@@ -621,8 +622,9 @@ var ct = class extends ve {
|
|
|
621
622
|
values;
|
|
622
623
|
min;
|
|
623
624
|
max;
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
filters;
|
|
626
|
+
constructor(t) {
|
|
627
|
+
this.id = t?.id ?? "", this.label = t?.label ?? "", this.type = t?.type ?? Mt.Checkbox, this.ord = t?.ord ?? 0, this.isMultiple = t?.isMultiple ?? null, this.values = t?.values?.map((e) => new Jt(e)) ?? [], this.min = t?.min ?? null, this.max = t?.max ?? null, this.filters = t?.filters?.map((t) => new e(t)) ?? [];
|
|
626
628
|
}
|
|
627
629
|
}, Xt = class extends l {
|
|
628
630
|
search(e, t = !1) {
|
|
@@ -925,6 +927,17 @@ var ct = class extends ve {
|
|
|
925
927
|
getProperties(e, t, n) {
|
|
926
928
|
return this.getTypedPaginated(G, "/internal/catalog/properties", e, t, n);
|
|
927
929
|
}
|
|
930
|
+
getFilterGroups(e) {
|
|
931
|
+
return this.getProperties({
|
|
932
|
+
groupOp: "and",
|
|
933
|
+
filters: [{
|
|
934
|
+
field: "is_filter_group",
|
|
935
|
+
op: ne.Equals,
|
|
936
|
+
value: !0
|
|
937
|
+
}],
|
|
938
|
+
groups: []
|
|
939
|
+
}, void 0, e);
|
|
940
|
+
}
|
|
928
941
|
createProperty(e) {
|
|
929
942
|
let { typeId: t, ...n } = e;
|
|
930
943
|
return this.post("/internal/catalog/properties", {
|
|
@@ -2876,9 +2889,10 @@ var tr = class e {
|
|
|
2876
2889
|
warehouses;
|
|
2877
2890
|
isLargeOrder;
|
|
2878
2891
|
isToProcess;
|
|
2892
|
+
userRegions;
|
|
2879
2893
|
onlyMyRegions;
|
|
2880
2894
|
constructor(e) {
|
|
2881
|
-
super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new d(e) : new oe(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new N(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new N(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new N(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new le(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new xe(e)), this.isToProcess = e?.isToProcess;
|
|
2895
|
+
super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new d(e) : new oe(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new N(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new N(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new N(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new le(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new xe(e)), this.isToProcess = e?.isToProcess, this.userRegions = e?.userRegions?.map((e) => new be(e));
|
|
2882
2896
|
}
|
|
2883
2897
|
resetFilterValue(e) {
|
|
2884
2898
|
switch (e) {
|
|
@@ -2911,6 +2925,9 @@ var tr = class e {
|
|
|
2911
2925
|
case "warehouses":
|
|
2912
2926
|
this.warehouses = [];
|
|
2913
2927
|
break;
|
|
2928
|
+
case "userRegions":
|
|
2929
|
+
this.userRegions = [];
|
|
2930
|
+
break;
|
|
2914
2931
|
default: this[e] = void 0;
|
|
2915
2932
|
}
|
|
2916
2933
|
return this;
|