@snabcentr/client-core 3.5.2 → 3.5.4
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/common/enums/index.d.ts +1 -0
- package/common/enums/request-state-status-enum.d.ts +17 -0
- package/common/index.d.ts +1 -0
- package/common/interfaces/index.d.ts +1 -0
- package/common/interfaces/sc-i-request-state.d.ts +35 -0
- package/esm2022/common/enums/index.mjs +2 -0
- package/esm2022/common/enums/request-state-status-enum.mjs +19 -0
- package/esm2022/common/index.mjs +2 -1
- package/esm2022/common/interfaces/index.mjs +2 -1
- package/esm2022/common/interfaces/sc-i-request-state.mjs +26 -0
- package/esm2022/guards/sc-auth-as-client.guard.mjs +4 -4
- package/fesm2022/snabcentr-client-core.mjs +156 -113
- package/fesm2022/snabcentr-client-core.mjs.map +1 -1
- package/package.json +1 -1
- package/release_notes.tmp +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import * as i1 from 'rxjs';
|
|
2
|
+
import { of, startWith as startWith$1, Subject, ReplaySubject, partition, combineLatest, map as map$1, debounceTime, switchMap, tap, filter, shareReplay, distinctUntilChanged, BehaviorSubject, materialize, dematerialize, merge, distinctUntilKeyChanged, skip, first, catchError as catchError$1, throwError, expand, takeWhile, toArray, take, defaultIfEmpty, concatMap, finalize, takeUntil, interval, share, scan } from 'rxjs';
|
|
3
|
+
import { map, startWith, catchError } from 'rxjs/operators';
|
|
1
4
|
import { parseISO, parse, isValid, format } from 'date-fns';
|
|
2
5
|
import { isString, isNil, isMatch, isArray, get } from 'lodash-es';
|
|
3
6
|
import * as i0 from '@angular/core';
|
|
4
7
|
import { InjectionToken, inject, PLATFORM_ID, Injectable, Inject, Optional, EventEmitter, DestroyRef, LOCALE_ID, Pipe, RendererFactory2 } from '@angular/core';
|
|
5
8
|
import { WA_LOCAL_STORAGE, WA_USER_AGENT, WA_WINDOW } from '@ng-web-apis/common';
|
|
6
9
|
import { filterByKey, toValue, WA_STORAGE_EVENT, StorageService } from '@ng-web-apis/storage';
|
|
7
|
-
import * as i1 from 'rxjs';
|
|
8
|
-
import { startWith, Subject, ReplaySubject, partition, combineLatest, map, debounceTime, switchMap, of, tap, filter, shareReplay, distinctUntilChanged, BehaviorSubject, materialize, dematerialize, merge, distinctUntilKeyChanged, skip, first, catchError, throwError, expand, takeWhile, toArray, concatMap, finalize, takeUntil, interval, share, scan } from 'rxjs';
|
|
9
10
|
import { isPlatformBrowser, isPlatformServer, DOCUMENT, formatDate } from '@angular/common';
|
|
10
11
|
import * as i1$1 from '@angular/common/http';
|
|
11
12
|
import { HttpContextToken, HttpContext, HttpHeaders, HttpClient, HttpParams, HttpErrorResponse, HttpResponse } from '@angular/common/http';
|
|
@@ -18,6 +19,48 @@ import { NavigationEnd, Router, ActivatedRoute } from '@angular/router';
|
|
|
18
19
|
import { objectToSnake, objectToCamel, toSnake } from 'ts-case-convert';
|
|
19
20
|
import { Meta, Title } from '@angular/platform-browser';
|
|
20
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Статусы состояния запроса.
|
|
24
|
+
*/
|
|
25
|
+
var ScRequestStateStatusEnum;
|
|
26
|
+
(function (ScRequestStateStatusEnum) {
|
|
27
|
+
/**
|
|
28
|
+
* Статус загрузки.
|
|
29
|
+
*/
|
|
30
|
+
ScRequestStateStatusEnum["Loading"] = "loading";
|
|
31
|
+
/**
|
|
32
|
+
* Статус успешного выполнения запроса.
|
|
33
|
+
*/
|
|
34
|
+
ScRequestStateStatusEnum["Success"] = "success";
|
|
35
|
+
/**
|
|
36
|
+
* Статус ошибки.
|
|
37
|
+
*/
|
|
38
|
+
ScRequestStateStatusEnum["Error"] = "error";
|
|
39
|
+
})(ScRequestStateStatusEnum || (ScRequestStateStatusEnum = {}));
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Состояние загрузки.
|
|
43
|
+
*/
|
|
44
|
+
const ScLoadingRequestState = { status: ScRequestStateStatusEnum.Loading };
|
|
45
|
+
/**
|
|
46
|
+
* Состояние успешного выполнения запроса.
|
|
47
|
+
*
|
|
48
|
+
* @param requestData Данные запроса.
|
|
49
|
+
*/
|
|
50
|
+
const ScSuccessRequestState = (requestData) => ({ status: ScRequestStateStatusEnum.Success, data: requestData });
|
|
51
|
+
/**
|
|
52
|
+
* Состояние ошибки.
|
|
53
|
+
*/
|
|
54
|
+
const ScErrorRequestState = { status: ScRequestStateStatusEnum.Error };
|
|
55
|
+
/**
|
|
56
|
+
* Преобразует поток данных в поток с состояниями запроса.
|
|
57
|
+
*/
|
|
58
|
+
const mapToRequestState = () => (source$) => source$.pipe(map((requestData) => ScSuccessRequestState(requestData)), startWith(ScLoadingRequestState), catchError(() => of(ScErrorRequestState)));
|
|
59
|
+
/**
|
|
60
|
+
* Извлекает данные из потока состояний запроса или возвращает null.
|
|
61
|
+
*/
|
|
62
|
+
const mapRequestStateToDataOrNull = () => (source$) => source$.pipe(map((requestState) => (requestState.status === ScRequestStateStatusEnum.Success ? requestState.data : null)));
|
|
63
|
+
|
|
21
64
|
/**
|
|
22
65
|
* Базовая идентифицируемая сущность.
|
|
23
66
|
*/
|
|
@@ -265,11 +308,11 @@ class ScTokenService {
|
|
|
265
308
|
/**
|
|
266
309
|
* {@link Observable} ключа доступа гостя к API в {@link Storage}.
|
|
267
310
|
*/
|
|
268
|
-
this.guestToken$ = this.event$.pipe(filterByKey(this.guestStorageKey), toValue(), startWith(this.getGuestToken()));
|
|
311
|
+
this.guestToken$ = this.event$.pipe(filterByKey(this.guestStorageKey), toValue(), startWith$1(this.getGuestToken()));
|
|
269
312
|
/**
|
|
270
313
|
* {@link Observable} ключа доступа пользователя к API в {@link Storage}.
|
|
271
314
|
*/
|
|
272
|
-
this.accessAuthToken$ = this.event$.pipe(filterByKey(this.accessAuthStorageKey), toValue(), startWith(this.getAccessToken()));
|
|
315
|
+
this.accessAuthToken$ = this.event$.pipe(filterByKey(this.accessAuthStorageKey), toValue(), startWith$1(this.getAccessToken()));
|
|
273
316
|
this.apiKeys = apiKeys ?? DEFAULT_API_KEYS;
|
|
274
317
|
}
|
|
275
318
|
/**
|
|
@@ -986,8 +1029,8 @@ class ScAuthService {
|
|
|
986
1029
|
*/
|
|
987
1030
|
this.destroyRef = inject(DestroyRef);
|
|
988
1031
|
const [authState$, actions$] = partition(combineLatest({
|
|
989
|
-
access: this.tokenService.accessAuthToken$.pipe(map((token) => token !== null)),
|
|
990
|
-
guest: this.tokenService.guestToken$.pipe(map((token) => token !== null)),
|
|
1032
|
+
access: this.tokenService.accessAuthToken$.pipe(map$1((token) => token !== null)),
|
|
1033
|
+
guest: this.tokenService.guestToken$.pipe(map$1((token) => token !== null)),
|
|
991
1034
|
}).pipe(debounceTime(0)), // Исправляет ошибку одновременного удаления ключа гостя и ключа пользователя. Возникает при очистке Storage.
|
|
992
1035
|
({ access, guest }) => (access && !guest) || (!access && guest));
|
|
993
1036
|
authState$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ access }) => {
|
|
@@ -1234,7 +1277,7 @@ class ScUserService {
|
|
|
1234
1277
|
/**
|
|
1235
1278
|
* {@link Observable} ключа доступа пользователя к API в {@link Storage}.
|
|
1236
1279
|
*/
|
|
1237
|
-
this.user$ = this.storageEvent$.pipe(filterByKey('userData'), toValue(), map((userData) => (userData ? new ScUser(JSON.parse(userData)) : null)), startWith(this.storage && this.isBrowser ? null : new ScUser({ metadata: {} })), // Инициализация пользователя при SSR для корректной работы связанных сервисов.
|
|
1280
|
+
this.user$ = this.storageEvent$.pipe(filterByKey('userData'), toValue(), map$1((userData) => (userData ? new ScUser(JSON.parse(userData)) : null)), startWith$1(this.storage && this.isBrowser ? null : new ScUser({ metadata: {} })), // Инициализация пользователя при SSR для корректной работы связанных сервисов.
|
|
1238
1281
|
filter(tuiIsPresent), shareReplay({ refCount: true, bufferSize: 1 }));
|
|
1239
1282
|
/**
|
|
1240
1283
|
* Сервис для работы с токенами.
|
|
@@ -1354,7 +1397,7 @@ class ScUserService {
|
|
|
1354
1397
|
* Возвращает {@link Observable} запроса на получение информации о текущем пользователе.
|
|
1355
1398
|
*/
|
|
1356
1399
|
getUserInfo$() {
|
|
1357
|
-
return this.http.get(`${this.urls.apiUrl}/user`).pipe(map((user) => new ScUser(user)));
|
|
1400
|
+
return this.http.get(`${this.urls.apiUrl}/user`).pipe(map$1((user) => new ScUser(user)));
|
|
1358
1401
|
}
|
|
1359
1402
|
/**
|
|
1360
1403
|
* Обновляет данные {@link Observable} текущего пользователя.
|
|
@@ -1368,7 +1411,7 @@ class ScUserService {
|
|
|
1368
1411
|
* Возвращает {@link Observable} запроса на получение информации о текущем пользователе.
|
|
1369
1412
|
*/
|
|
1370
1413
|
getGuestInfo$() {
|
|
1371
|
-
return this.http.get(`${this.urls.apiUrl}/guest`).pipe(map((user) => new ScUser(user)));
|
|
1414
|
+
return this.http.get(`${this.urls.apiUrl}/guest`).pipe(map$1((user) => new ScUser(user)));
|
|
1372
1415
|
}
|
|
1373
1416
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScUserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1374
1417
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScUserService, providedIn: 'root' }); }
|
|
@@ -1405,7 +1448,7 @@ class ScBannerService {
|
|
|
1405
1448
|
/**
|
|
1406
1449
|
* Список баннеров.
|
|
1407
1450
|
*/
|
|
1408
|
-
this.banners$ = inject(SC_USER_INFO).pipe(switchMap(() => this.http.get(`${this.urls.apiUrl}/banners`)), map((banners) => banners.map((banner) => new ScBanner(banner))), shareReplay(1));
|
|
1451
|
+
this.banners$ = inject(SC_USER_INFO).pipe(switchMap(() => this.http.get(`${this.urls.apiUrl}/banners`)), map$1((banners) => banners.map((banner) => new ScBanner(banner))), shareReplay(1));
|
|
1409
1452
|
}
|
|
1410
1453
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScBannerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1411
1454
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScBannerService, providedIn: 'root' }); }
|
|
@@ -1885,7 +1928,7 @@ class ScCachedItem {
|
|
|
1885
1928
|
this.lifeTime = lifeTime;
|
|
1886
1929
|
const requestData$ = this.update$.pipe(switchMap(() => item$.pipe(tap(() => {
|
|
1887
1930
|
this.updateCacheTime();
|
|
1888
|
-
}), startWith((initialValue ?? null)))), materialize(), shareReplay(1), dematerialize());
|
|
1931
|
+
}), startWith$1((initialValue ?? null)))), materialize(), shareReplay(1), dematerialize());
|
|
1889
1932
|
this.item$ = merge(this.currentValue$, requestData$).pipe(shareReplay(1));
|
|
1890
1933
|
}
|
|
1891
1934
|
/**
|
|
@@ -2050,7 +2093,7 @@ class ScUIService {
|
|
|
2050
2093
|
* @param target Свойство для которого отслеживается изменение.
|
|
2051
2094
|
*/
|
|
2052
2095
|
getMetadataChangeByKey$(target) {
|
|
2053
|
-
return this.userMetadataSubject.pipe(filterChangedByKey(target), map((metadata) => metadata[target]));
|
|
2096
|
+
return this.userMetadataSubject.pipe(filterChangedByKey(target), map$1((metadata) => metadata[target]));
|
|
2054
2097
|
}
|
|
2055
2098
|
/**
|
|
2056
2099
|
* Возвращает {@link Observable} метаданных, когда изменяется значение переданного свойства.
|
|
@@ -2116,7 +2159,7 @@ class ScUIService {
|
|
|
2116
2159
|
*/
|
|
2117
2160
|
getNewOrderMetadata$(directionsId) {
|
|
2118
2161
|
// Данные представлены массивом объектов, поэтому не используется getMetadataChangeByKey$().
|
|
2119
|
-
return this.userMetadataSubject.pipe(map((metadata) => metadata.newOrdersMetadata), distinctUntilChanged(), map((ordersMetadata) => ordersMetadata[directionsId]), distinctUntilChanged());
|
|
2162
|
+
return this.userMetadataSubject.pipe(map$1((metadata) => metadata.newOrdersMetadata), distinctUntilChanged(), map$1((ordersMetadata) => ordersMetadata[directionsId]), distinctUntilChanged());
|
|
2120
2163
|
}
|
|
2121
2164
|
/**
|
|
2122
2165
|
* Устанавливает метаданные неоформленного заказа по направлению продаж.
|
|
@@ -2563,7 +2606,7 @@ class ScReferencesService {
|
|
|
2563
2606
|
* @param directionId Идентификатор направления продаж.
|
|
2564
2607
|
*/
|
|
2565
2608
|
getDirectionById$(directionId) {
|
|
2566
|
-
return this.directions$.pipe(map((directions) => directions.find((direction) => direction.id === directionId)));
|
|
2609
|
+
return this.directions$.pipe(map$1((directions) => directions.find((direction) => direction.id === directionId)));
|
|
2567
2610
|
}
|
|
2568
2611
|
/**
|
|
2569
2612
|
* Возвращает {@link Observable} типа клиента, соответствующий символьному обозначению (slug) на входе.
|
|
@@ -2574,7 +2617,7 @@ class ScReferencesService {
|
|
|
2574
2617
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2575
2618
|
getClientTypesBySlug$(slug) {
|
|
2576
2619
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
|
|
2577
|
-
return this.clientTypes$.pipe(map((types) => types.find((type) => type.name === slug)));
|
|
2620
|
+
return this.clientTypes$.pipe(map$1((types) => types.find((type) => type.name === slug)));
|
|
2578
2621
|
}
|
|
2579
2622
|
/**
|
|
2580
2623
|
* Возвращает {@link Observable} статус оплаты, соответствующий идентификатору на входе.
|
|
@@ -2582,7 +2625,7 @@ class ScReferencesService {
|
|
|
2582
2625
|
* @param typeId Идентификатор статуса оплаты.
|
|
2583
2626
|
*/
|
|
2584
2627
|
getPaymentStatusById$(typeId) {
|
|
2585
|
-
return this.paymentStatuses$.pipe(map((types) => types.find((type) => type.id === typeId)));
|
|
2628
|
+
return this.paymentStatuses$.pipe(map$1((types) => types.find((type) => type.id === typeId)));
|
|
2586
2629
|
}
|
|
2587
2630
|
/**
|
|
2588
2631
|
* Возвращает {@link Observable} тип доставки, соответствующий идентификатору на входе.
|
|
@@ -2590,7 +2633,7 @@ class ScReferencesService {
|
|
|
2590
2633
|
* @param typeId Идентификатор типа доставки.
|
|
2591
2634
|
*/
|
|
2592
2635
|
getDeliveryTypeById$(typeId) {
|
|
2593
|
-
return this.deliveryTypes$.pipe(map((types) => types.find((type) => type.id === typeId)));
|
|
2636
|
+
return this.deliveryTypes$.pipe(map$1((types) => types.find((type) => type.id === typeId)));
|
|
2594
2637
|
}
|
|
2595
2638
|
/**
|
|
2596
2639
|
* Возвращает {@link Observable} типа статуса рекламаций, соответствующий указанному идентификатору.
|
|
@@ -2598,7 +2641,7 @@ class ScReferencesService {
|
|
|
2598
2641
|
* @param statusId Идентификатор типа статуса.
|
|
2599
2642
|
*/
|
|
2600
2643
|
getReclamationStatusById$(statusId) {
|
|
2601
|
-
return this.reclamationStatuses$.pipe(map((types) => types.find((type) => type.id === statusId)));
|
|
2644
|
+
return this.reclamationStatuses$.pipe(map$1((types) => types.find((type) => type.id === statusId)));
|
|
2602
2645
|
}
|
|
2603
2646
|
/**
|
|
2604
2647
|
* Возвращает {@link Observable} тип оплаты, соответствующий идентификатору на входе.
|
|
@@ -2606,7 +2649,7 @@ class ScReferencesService {
|
|
|
2606
2649
|
* @param typeId Идентификатор типа оплаты.
|
|
2607
2650
|
*/
|
|
2608
2651
|
getPaymentTypeById$(typeId) {
|
|
2609
|
-
return this.paymentTypes$.pipe(map((types) => types.find((type) => type.id === typeId)));
|
|
2652
|
+
return this.paymentTypes$.pipe(map$1((types) => types.find((type) => type.id === typeId)));
|
|
2610
2653
|
}
|
|
2611
2654
|
/**
|
|
2612
2655
|
* Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
|
|
@@ -2614,7 +2657,7 @@ class ScReferencesService {
|
|
|
2614
2657
|
* @param slug Символьное обозначение (slug).
|
|
2615
2658
|
*/
|
|
2616
2659
|
getOpfBySlug$(slug) {
|
|
2617
|
-
return this.opf$.pipe(map((types) => types.find((type) => type.slug === slug)));
|
|
2660
|
+
return this.opf$.pipe(map$1((types) => types.find((type) => type.slug === slug)));
|
|
2618
2661
|
}
|
|
2619
2662
|
/**
|
|
2620
2663
|
* Возвращает {@link Observable} валюты, соответствующий идентификатору на входе.
|
|
@@ -2622,7 +2665,7 @@ class ScReferencesService {
|
|
|
2622
2665
|
* @param currencyId Идентификатор валюты.
|
|
2623
2666
|
*/
|
|
2624
2667
|
getCurrencyById$(currencyId) {
|
|
2625
|
-
return this.currencies$.pipe(map((types) => types.find((type) => type.id === currencyId)));
|
|
2668
|
+
return this.currencies$.pipe(map$1((types) => types.find((type) => type.id === currencyId)));
|
|
2626
2669
|
}
|
|
2627
2670
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScReferencesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2628
2671
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScReferencesService, providedIn: 'root' }); }
|
|
@@ -2665,7 +2708,7 @@ class ScWarehouseService {
|
|
|
2665
2708
|
*/
|
|
2666
2709
|
initSubscriptionOnUser() {
|
|
2667
2710
|
// Observable данных для обработки сигналов изменения пользователя.
|
|
2668
|
-
const data$ = this.warehouses$.pipe(switchMap((warehouses) => this.user$.pipe(map((user) => ({
|
|
2711
|
+
const data$ = this.warehouses$.pipe(switchMap((warehouses) => this.user$.pipe(map$1((user) => ({
|
|
2669
2712
|
warehouses: warehouses,
|
|
2670
2713
|
selectedIdMetadata: user.metadata.selectedWarehouseId,
|
|
2671
2714
|
city: user.city,
|
|
@@ -2676,7 +2719,7 @@ class ScWarehouseService {
|
|
|
2676
2719
|
data$
|
|
2677
2720
|
.pipe(
|
|
2678
2721
|
// eslint-disable-next-line unicorn/no-negation-in-equality-check
|
|
2679
|
-
distinctUntilChanged((previous, current) => !previous.id === !current.id), map((data) => /** data.selectedIdMetadata || */ data.warehouses.find((warehouse) => data.region && warehouse.regions?.includes(data.region))?.id ?? null), filter((selectedId) => this.warehouseIdSelectSubject.value !== selectedId), tap((selectedId) => {
|
|
2722
|
+
distinctUntilChanged((previous, current) => !previous.id === !current.id), map$1((data) => /** data.selectedIdMetadata || */ data.warehouses.find((warehouse) => data.region && warehouse.regions?.includes(data.region))?.id ?? null), filter((selectedId) => this.warehouseIdSelectSubject.value !== selectedId), tap((selectedId) => {
|
|
2680
2723
|
this.warehouseIdSelectSubject.next(selectedId);
|
|
2681
2724
|
}))
|
|
2682
2725
|
.subscribe();
|
|
@@ -2686,9 +2729,9 @@ class ScWarehouseService {
|
|
|
2686
2729
|
// eslint-disable-next-line unicorn/no-negation-in-equality-check
|
|
2687
2730
|
distinctUntilChanged((previous, current) => !previous.id !== !current.id || previous.city === current.city), skip(1), // distinctUntilChanged() всегда выдаёт первое значение, поэтому пропускаем его и реагируем только на изменение.
|
|
2688
2731
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2689
|
-
map((data) => data.warehouses.find((warehouse) => data.region && warehouse.regions?.includes(data.region))?.id || data.warehouses.find((item) => item.isMain)?.id), filter((selectedId) => selectedId !== undefined && this.warehouseIdSelectSubject.value !== selectedId),
|
|
2732
|
+
map$1((data) => data.warehouses.find((warehouse) => data.region && warehouse.regions?.includes(data.region))?.id || data.warehouses.find((item) => item.isMain)?.id), filter((selectedId) => selectedId !== undefined && this.warehouseIdSelectSubject.value !== selectedId),
|
|
2690
2733
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2691
|
-
map((selectedId) => selectedId), tap((selectedId) => {
|
|
2734
|
+
map$1((selectedId) => selectedId), tap((selectedId) => {
|
|
2692
2735
|
this.setWarehouseIdSelectChange(selectedId);
|
|
2693
2736
|
}))
|
|
2694
2737
|
.subscribe();
|
|
@@ -2706,13 +2749,13 @@ class ScWarehouseService {
|
|
|
2706
2749
|
* Возвращает {@link Observable} выбранного склада.
|
|
2707
2750
|
*/
|
|
2708
2751
|
getWarehouseSelectChange$() {
|
|
2709
|
-
return this.warehouses$.pipe(switchMap((warehouses) => this.warehouseIdSelectSubject.pipe(map((id) => warehouses.find((item) => item.id === id) ?? warehouses.find((item) => item.isMain)), filter((warehouse) => warehouse !== undefined))), map((warehouse) => warehouse));
|
|
2752
|
+
return this.warehouses$.pipe(switchMap((warehouses) => this.warehouseIdSelectSubject.pipe(map$1((id) => warehouses.find((item) => item.id === id) ?? warehouses.find((item) => item.isMain)), filter((warehouse) => warehouse !== undefined))), map$1((warehouse) => warehouse));
|
|
2710
2753
|
}
|
|
2711
2754
|
/**
|
|
2712
2755
|
* Возвращает {@link Observable} склада для доставки.
|
|
2713
2756
|
*/
|
|
2714
2757
|
getDeliveryWarehouse$() {
|
|
2715
|
-
return this.warehouses$.pipe(map((warehouses) => warehouses.find((item) => item.isMain)), filter(tuiIsPresent));
|
|
2758
|
+
return this.warehouses$.pipe(map$1((warehouses) => warehouses.find((item) => item.isMain)), filter(tuiIsPresent));
|
|
2716
2759
|
}
|
|
2717
2760
|
/**
|
|
2718
2761
|
* Возвращает {@link Observable} склада в зависимости от того, где запущено приложение.
|
|
@@ -2721,7 +2764,7 @@ class ScWarehouseService {
|
|
|
2721
2764
|
* во всех остальных случаях возвращает основной склад.
|
|
2722
2765
|
*/
|
|
2723
2766
|
getCatalogWarehouseChange$() {
|
|
2724
|
-
return this.warehouses$.pipe(map((warehouses) => warehouses.find((w) => w.id === this.terminal.warehouseId) ?? warehouses.find((w) => w.isMain)), filter(tuiIsPresent));
|
|
2767
|
+
return this.warehouses$.pipe(map$1((warehouses) => warehouses.find((w) => w.id === this.terminal.warehouseId) ?? warehouses.find((w) => w.isMain)), filter(tuiIsPresent));
|
|
2725
2768
|
}
|
|
2726
2769
|
/**
|
|
2727
2770
|
* Возвращает {@link Observable} списка складов.
|
|
@@ -2795,9 +2838,9 @@ class ScCartService {
|
|
|
2795
2838
|
* Создаёт запрос получения содержимого корзины и обновляет корзину, возвращая {@link Observable} содержимого корзины.
|
|
2796
2839
|
*/
|
|
2797
2840
|
getCartData$() {
|
|
2798
|
-
return this.user$.pipe(first(), switchMap((user) => this.http.get(`${this.urls.apiUrl}/cart`).pipe(map((cartDTO) => new ScCart(cartDTO)),
|
|
2841
|
+
return this.user$.pipe(first(), switchMap((user) => this.http.get(`${this.urls.apiUrl}/cart`).pipe(map$1((cartDTO) => new ScCart(cartDTO)),
|
|
2799
2842
|
// TODO: Пересмотреть механизмы перехвата HTTP-ошибок 401/403/0 централизованно (с использованием interceptors).
|
|
2800
|
-
catchError((error) => {
|
|
2843
|
+
catchError$1((error) => {
|
|
2801
2844
|
if (user.isGuest && error instanceof HttpErrorResponse && [0, 401, 403].includes(error.status)) {
|
|
2802
2845
|
// Для гостя в неавторизованных/сетевых кейсах отдаём пустую корзину,
|
|
2803
2846
|
// чтобы не пробрасывать ошибку во все подписки UI.
|
|
@@ -2816,7 +2859,7 @@ class ScCartService {
|
|
|
2816
2859
|
* Возвращает список элементов корзины.
|
|
2817
2860
|
*/
|
|
2818
2861
|
getItems$() {
|
|
2819
|
-
return this.get$().pipe(map((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items)));
|
|
2862
|
+
return this.get$().pipe(map$1((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items)));
|
|
2820
2863
|
}
|
|
2821
2864
|
/**
|
|
2822
2865
|
* Добавляет продукт в корзину.
|
|
@@ -2824,7 +2867,7 @@ class ScCartService {
|
|
|
2824
2867
|
* @param data Данные добавляемого продукта.
|
|
2825
2868
|
*/
|
|
2826
2869
|
addProduct$(data) {
|
|
2827
|
-
return this.http.patch(`${this.urls.apiUrl}/cart`, data).pipe(map((cartDTO) => new ScCart(cartDTO)), tap(() => {
|
|
2870
|
+
return this.http.patch(`${this.urls.apiUrl}/cart`, data).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap(() => {
|
|
2828
2871
|
if (data.productId) {
|
|
2829
2872
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2830
2873
|
target: ScUserMetrikaGoalsEnum.cartItemAdded,
|
|
@@ -2842,7 +2885,7 @@ class ScCartService {
|
|
|
2842
2885
|
* @param patch Частичные данные для обновления.
|
|
2843
2886
|
*/
|
|
2844
2887
|
updateProduct$(id, patch) {
|
|
2845
|
-
return this.http.patch(`${this.urls.apiUrl}/cart/${id}`, patch).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2888
|
+
return this.http.patch(`${this.urls.apiUrl}/cart/${id}`, patch).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2846
2889
|
this.cartCachedItem$.setValue(cart);
|
|
2847
2890
|
}));
|
|
2848
2891
|
}
|
|
@@ -2852,7 +2895,7 @@ class ScCartService {
|
|
|
2852
2895
|
* @param item Удаляемая позиция.
|
|
2853
2896
|
*/
|
|
2854
2897
|
deleteProduct$(item) {
|
|
2855
|
-
return this.http.delete(`${this.urls.apiUrl}/cart/${item.id}`).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2898
|
+
return this.http.delete(`${this.urls.apiUrl}/cart/${item.id}`).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2856
2899
|
this.cartCachedItem$.setValue(cart);
|
|
2857
2900
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2858
2901
|
target: ScUserMetrikaGoalsEnum.cartItemDeleted,
|
|
@@ -2885,7 +2928,7 @@ class ScCartService {
|
|
|
2885
2928
|
* @deprecated
|
|
2886
2929
|
*/
|
|
2887
2930
|
getNullCartItems$() {
|
|
2888
|
-
return this.get$().pipe(map((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items.filter((item) => item.product.isNull || item.product.isHidden))));
|
|
2931
|
+
return this.get$().pipe(map$1((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items.filter((item) => item.product.isNull || item.product.isHidden))));
|
|
2889
2932
|
}
|
|
2890
2933
|
/**
|
|
2891
2934
|
* Возвращает объект {@link ScCart} корзины, созданный из объекта заказа.
|
|
@@ -2908,7 +2951,7 @@ class ScCartService {
|
|
|
2908
2951
|
.get(`${this.urls.apiUrl}/cart/csv/example`, {
|
|
2909
2952
|
responseType: 'blob',
|
|
2910
2953
|
})
|
|
2911
|
-
.pipe(map((blob) => new Blob([blob], { type: 'text/csv' })));
|
|
2954
|
+
.pipe(map$1((blob) => new Blob([blob], { type: 'text/csv' })));
|
|
2912
2955
|
}
|
|
2913
2956
|
/**
|
|
2914
2957
|
* Добавляет товары в корзину из файла CSV.
|
|
@@ -2916,7 +2959,7 @@ class ScCartService {
|
|
|
2916
2959
|
* @param file Загружаемый файл в формате base64.
|
|
2917
2960
|
*/
|
|
2918
2961
|
addProductsFromCsv$(file) {
|
|
2919
|
-
return this.http.post(`${this.urls.apiUrl}/cart/csv`, { file }).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2962
|
+
return this.http.post(`${this.urls.apiUrl}/cart/csv`, { file }).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2920
2963
|
this.cartCachedItem$.setValue(cart);
|
|
2921
2964
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2922
2965
|
target: ScUserMetrikaGoalsEnum.cartCsvUpload,
|
|
@@ -3220,11 +3263,11 @@ class ScCatalogService {
|
|
|
3220
3263
|
/**
|
|
3221
3264
|
* {@link Observable} изменения списка из первых товаров со скидкой.
|
|
3222
3265
|
*/
|
|
3223
|
-
this.firstDiscountedProducts$ = this.firstDiscounted$.pipe(map((data) => data?.data ?? []));
|
|
3266
|
+
this.firstDiscountedProducts$ = this.firstDiscounted$.pipe(map$1((data) => data?.data ?? []));
|
|
3224
3267
|
/**
|
|
3225
3268
|
* {@link Observable} изменения общего колличества товара со скидкой.
|
|
3226
3269
|
*/
|
|
3227
|
-
this.countDiscountedProducts$ = this.firstDiscounted$.pipe(map((data) => data?.meta.total ?? 0));
|
|
3270
|
+
this.countDiscountedProducts$ = this.firstDiscounted$.pipe(map$1((data) => data?.meta.total ?? 0));
|
|
3228
3271
|
this.userService
|
|
3229
3272
|
.getUserChange$()
|
|
3230
3273
|
.pipe(skip(1))
|
|
@@ -3258,7 +3301,7 @@ class ScCatalogService {
|
|
|
3258
3301
|
* @param categoryIdOrSlug Идентификатор или slug категории товаров.
|
|
3259
3302
|
*/
|
|
3260
3303
|
getCategoryData$(categoryIdOrSlug) {
|
|
3261
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug ?? ''}`).pipe(map((category) => new ScCategory(category)), tap((category) => {
|
|
3304
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug ?? ''}`).pipe(map$1((category) => new ScCategory(category)), tap((category) => {
|
|
3262
3305
|
if (categoryIdOrSlug) {
|
|
3263
3306
|
this.categoryIdOrSlugMap.set(typeof categoryIdOrSlug === 'string' ? category.id : category.slug, categoryIdOrSlug);
|
|
3264
3307
|
}
|
|
@@ -3268,7 +3311,7 @@ class ScCatalogService {
|
|
|
3268
3311
|
* Возвращает {@link Observable} корневых категорий с настройками отображения, чтобы реагировать на изменения.
|
|
3269
3312
|
*/
|
|
3270
3313
|
getFilteredRootCategories$() {
|
|
3271
|
-
return this.uiService.getHiddenCategoriesList$().pipe(switchMap((filters) => this.getRootCategories$().pipe(filter(tuiIsPresent), map((data) => data.filter((category) => category.id && !filters.includes(category.id))))));
|
|
3314
|
+
return this.uiService.getHiddenCategoriesList$().pipe(switchMap((filters) => this.getRootCategories$().pipe(filter(tuiIsPresent), map$1((data) => data.filter((category) => category.id && !filters.includes(category.id))))));
|
|
3272
3315
|
}
|
|
3273
3316
|
/**
|
|
3274
3317
|
* Возвращает {@link Observable} содержимого виртуальной категории.
|
|
@@ -3278,7 +3321,7 @@ class ScCatalogService {
|
|
|
3278
3321
|
getVirtualCategoryCached$(slug) {
|
|
3279
3322
|
let cachedItem = this.virtualCategoryMap.get(slug);
|
|
3280
3323
|
if (!cachedItem) {
|
|
3281
|
-
cachedItem = new ScCachedItem(this.cacheLifeTime.categoryData, this.http.get(`${this.urls.apiUrl}/catalog/v-categories/${slug}`).pipe(map((category) => new ScVirtualCategory(category))), null);
|
|
3324
|
+
cachedItem = new ScCachedItem(this.cacheLifeTime.categoryData, this.http.get(`${this.urls.apiUrl}/catalog/v-categories/${slug}`).pipe(map$1((category) => new ScVirtualCategory(category))), null);
|
|
3282
3325
|
this.virtualCategoryMap.set(slug, cachedItem);
|
|
3283
3326
|
}
|
|
3284
3327
|
if (!cachedItem.cachedDataIsActual()) {
|
|
@@ -3316,7 +3359,7 @@ class ScCatalogService {
|
|
|
3316
3359
|
* Создает запрос получения корневых категорий.
|
|
3317
3360
|
*/
|
|
3318
3361
|
getRootCategories$() {
|
|
3319
|
-
return this.getNullCategory$().pipe(map((nullCategory) => nullCategory?.categories ?? null));
|
|
3362
|
+
return this.getNullCategory$().pipe(map$1((nullCategory) => nullCategory?.categories ?? null));
|
|
3320
3363
|
}
|
|
3321
3364
|
/**
|
|
3322
3365
|
* Раскрывает каталог до указанной категории.
|
|
@@ -3329,7 +3372,7 @@ class ScCatalogService {
|
|
|
3329
3372
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition,sonarjs/different-types-comparison
|
|
3330
3373
|
takeWhile((parentCategory) => parentCategory.parentCategory !== undefined, true), toArray(),
|
|
3331
3374
|
// eslint-disable-next-line sonarjs/no-misleading-array-reverse
|
|
3332
|
-
map((categories) => categories.reverse()));
|
|
3375
|
+
map$1((categories) => categories.reverse()));
|
|
3333
3376
|
}
|
|
3334
3377
|
/**
|
|
3335
3378
|
* Возвращает {@link Observable} получения истории изменения цен на продукт для клиента.
|
|
@@ -3344,7 +3387,7 @@ class ScCatalogService {
|
|
|
3344
3387
|
.get(`${this.urls.apiUrl}/catalog/products/${product.id}/price-history`, {
|
|
3345
3388
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3346
3389
|
})
|
|
3347
|
-
.pipe(catchError(() => of({}))), null);
|
|
3390
|
+
.pipe(catchError$1(() => of({}))), null);
|
|
3348
3391
|
this.productHistoryMap.set(product.id.toString(), cachedItem);
|
|
3349
3392
|
}
|
|
3350
3393
|
return cachedItem.item$;
|
|
@@ -3358,7 +3401,7 @@ class ScCatalogService {
|
|
|
3358
3401
|
})
|
|
3359
3402
|
.pipe(
|
|
3360
3403
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
3361
|
-
map((data) => {
|
|
3404
|
+
map$1((data) => {
|
|
3362
3405
|
if ('meta' in data) {
|
|
3363
3406
|
const cloneData = structuredClone(data);
|
|
3364
3407
|
cloneData.data = cloneData.data.map((item) => new ScProduct(item));
|
|
@@ -3397,7 +3440,7 @@ class ScCatalogService {
|
|
|
3397
3440
|
* @param productIdOrSlug Идентификатор или slug товара/услуги.
|
|
3398
3441
|
*/
|
|
3399
3442
|
getProductData$(productIdOrSlug) {
|
|
3400
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}`).pipe(map((productDTO) => new ScProduct(productDTO)), tap((product) => {
|
|
3443
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}`).pipe(map$1((productDTO) => new ScProduct(productDTO)), tap((product) => {
|
|
3401
3444
|
if (productIdOrSlug) {
|
|
3402
3445
|
this.productIdOrSlugMap.set(typeof productIdOrSlug === 'string' ? product.id : product.slug, productIdOrSlug);
|
|
3403
3446
|
}
|
|
@@ -3430,7 +3473,7 @@ class ScCatalogService {
|
|
|
3430
3473
|
format: Object.keys(ScMimeTypes)[Object.values(ScMimeTypes).indexOf(type)],
|
|
3431
3474
|
category_id: categoryId ?? null,
|
|
3432
3475
|
}, { nonNullable: true });
|
|
3433
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/download`, { responseType: 'blob', params: params }).pipe(map((blob) => new Blob([blob], { type: type })), tap(() => {
|
|
3476
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/download`, { responseType: 'blob', params: params }).pipe(map$1((blob) => new Blob([blob], { type: type })), tap(() => {
|
|
3434
3477
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
3435
3478
|
target: ScUserMetrikaGoalsEnum.catalogPriceDownload,
|
|
3436
3479
|
params: {
|
|
@@ -3499,7 +3542,7 @@ class ScFavoriteService {
|
|
|
3499
3542
|
getFavoriteCategories$() {
|
|
3500
3543
|
return this.http
|
|
3501
3544
|
.get(`${this.urls.apiUrl}/favorites/categories`)
|
|
3502
|
-
.pipe(map((categoriesDTO) => categoriesDTO.map((categoryDTO) => new ScCategory(categoryDTO))));
|
|
3545
|
+
.pipe(map$1((categoriesDTO) => categoriesDTO.map((categoryDTO) => new ScCategory(categoryDTO))));
|
|
3503
3546
|
}
|
|
3504
3547
|
/**
|
|
3505
3548
|
* Запрос добавления указанной категории в избранное.
|
|
@@ -3601,8 +3644,8 @@ class ScRecommendationService {
|
|
|
3601
3644
|
.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/recommendations`, {
|
|
3602
3645
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3603
3646
|
})
|
|
3604
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3605
|
-
.pipe(startWith(null)), null);
|
|
3647
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3648
|
+
.pipe(startWith$1(null)), null);
|
|
3606
3649
|
this.productsByCategoryMap.set(categoryIdOrSlug.toString(), cachedItem);
|
|
3607
3650
|
}
|
|
3608
3651
|
return cachedItem.item$;
|
|
@@ -3620,8 +3663,8 @@ class ScRecommendationService {
|
|
|
3620
3663
|
.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}/recommendations`, {
|
|
3621
3664
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3622
3665
|
})
|
|
3623
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3624
|
-
.pipe(startWith(null)), null);
|
|
3666
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3667
|
+
.pipe(startWith$1(null)), null);
|
|
3625
3668
|
this.productsByProductMap.set(productIdOrSlug.toString(), cachedItem);
|
|
3626
3669
|
}
|
|
3627
3670
|
return cachedItem.item$;
|
|
@@ -3637,16 +3680,16 @@ class ScRecommendationService {
|
|
|
3637
3680
|
params: this.convertersService.toHttpParams({ products: productIds }, { nonNullable: true }),
|
|
3638
3681
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3639
3682
|
})
|
|
3640
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))));
|
|
3683
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))));
|
|
3641
3684
|
}
|
|
3642
3685
|
/**
|
|
3643
3686
|
* Создает запрос на получение списка рекомендованных товаров для корзины клиента.
|
|
3644
3687
|
*/
|
|
3645
3688
|
getProductsByCart$() {
|
|
3646
|
-
return this.cartService.get$().pipe(map((cart) => (cart !== loadingPlaceholder && 'items' in cart ? cart.items.map((item) => item.product.id) : [])),
|
|
3689
|
+
return this.cartService.get$().pipe(map$1((cart) => (cart !== loadingPlaceholder && 'items' in cart ? cart.items.map((item) => item.product.id) : [])),
|
|
3647
3690
|
// Отфильтровываем повторения. Они возникнут если было изменено количество товара без удаления\добавления новых товаров.
|
|
3648
3691
|
// eslint-disable-next-line sonarjs/no-misleading-array-reverse
|
|
3649
|
-
distinctUntilChanged((previous, current) => JSON.stringify([...previous].sort((a, b) => a - b)) === JSON.stringify([...current].sort((a, b) => a - b))), switchMap((productIds) => this.getProductsByProductIds$(productIds).pipe(startWith(null))));
|
|
3692
|
+
distinctUntilChanged((previous, current) => JSON.stringify([...previous].sort((a, b) => a - b)) === JSON.stringify([...current].sort((a, b) => a - b))), switchMap((productIds) => this.getProductsByProductIds$(productIds).pipe(startWith$1(null))));
|
|
3650
3693
|
}
|
|
3651
3694
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScRecommendationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3652
3695
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScRecommendationService, providedIn: 'root' }); }
|
|
@@ -3867,7 +3910,7 @@ class ScConfiguratorService {
|
|
|
3867
3910
|
}
|
|
3868
3911
|
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/configurators/${editor}/settings`).pipe(
|
|
3869
3912
|
// eslint-disable-next-line security/detect-object-injection
|
|
3870
|
-
map((settings) => (this.configuratorSettings && editor in this.configuratorSettings ? new this.configuratorSettings[editor](settings) : settings)), tap((settings) => {
|
|
3913
|
+
map$1((settings) => (this.configuratorSettings && editor in this.configuratorSettings ? new this.configuratorSettings[editor](settings) : settings)), tap((settings) => {
|
|
3871
3914
|
if (category) {
|
|
3872
3915
|
category.configuratorSettings = settings;
|
|
3873
3916
|
}
|
|
@@ -3883,7 +3926,7 @@ class ScConfiguratorService {
|
|
|
3883
3926
|
getProduct$(categoryIdOrSlug, editor, params) {
|
|
3884
3927
|
return this.http
|
|
3885
3928
|
.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/configurators/${editor}/product`, { params: params })
|
|
3886
|
-
.pipe(map((productDTO) => new ScProduct(productDTO)));
|
|
3929
|
+
.pipe(map$1((productDTO) => new ScProduct(productDTO)));
|
|
3887
3930
|
}
|
|
3888
3931
|
/**
|
|
3889
3932
|
* Создаёт пользовательский шаблон конфигуратора.
|
|
@@ -4300,7 +4343,7 @@ const SC_CATEGORY_INFO = new InjectionToken('A stream with current category info
|
|
|
4300
4343
|
* @param catalogService Сервис для работы с каталогом.
|
|
4301
4344
|
*/
|
|
4302
4345
|
function categoryFactory(router, route, catalogService) {
|
|
4303
|
-
return router.events.pipe(filter((event) => event instanceof NavigationEnd)).pipe(startWith(null), switchMap(() => {
|
|
4346
|
+
return router.events.pipe(filter((event) => event instanceof NavigationEnd)).pipe(startWith$1(null), switchMap(() => {
|
|
4304
4347
|
const categoryIdOrSlug = scGetCurrentRoute(route).snapshot.paramMap.get('categoryIdOrSlug');
|
|
4305
4348
|
if (categoryIdOrSlug) {
|
|
4306
4349
|
return catalogService.getCategoryCached$(categoryIdOrSlug);
|
|
@@ -4369,7 +4412,7 @@ class ScSearchService {
|
|
|
4369
4412
|
term: term,
|
|
4370
4413
|
},
|
|
4371
4414
|
});
|
|
4372
|
-
}), map((categories) => categories.map((item) => new ScCategory(item))));
|
|
4415
|
+
}), map$1((categories) => categories.map((item) => new ScCategory(item))));
|
|
4373
4416
|
}
|
|
4374
4417
|
/**
|
|
4375
4418
|
* Выполняет полный поиск по всему прайс-листу.
|
|
@@ -4455,7 +4498,7 @@ const SC_MAX_LENGTH_SEARCH_TERM = new InjectionToken('SC_MAX_LENGTH_SEARCH_TERM'
|
|
|
4455
4498
|
function searchTermFactory(searchService, minLengthSearchTerm, maxLengthSearchTerm) {
|
|
4456
4499
|
return searchService
|
|
4457
4500
|
.getSearchTermChange$()
|
|
4458
|
-
.pipe(map((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4501
|
+
.pipe(map$1((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4459
4502
|
}
|
|
4460
4503
|
/**
|
|
4461
4504
|
* Провайдеры данных о поиске введенного терма.
|
|
@@ -4482,7 +4525,7 @@ const SC_VIRTUAL_CATEGORY_INFO = new InjectionToken('A stream with current virtu
|
|
|
4482
4525
|
* @param catalogService Сервис для работы с каталогом.
|
|
4483
4526
|
*/
|
|
4484
4527
|
function virtualCategoryFactory({ paramMap }, catalogService) {
|
|
4485
|
-
return paramMap.pipe(map((params) => params.get('categorySlug')), filter(tuiIsPresent), switchMap((categorySlug) => catalogService.getVirtualCategoryCached$(categorySlug).pipe(shareReplay())), takeUntilDestroyed());
|
|
4528
|
+
return paramMap.pipe(map$1((params) => params.get('categorySlug')), filter(tuiIsPresent), switchMap((categorySlug) => catalogService.getVirtualCategoryCached$(categorySlug).pipe(shareReplay())), takeUntilDestroyed());
|
|
4486
4529
|
}
|
|
4487
4530
|
/**
|
|
4488
4531
|
* Провайдеры потока данных о виртуальной категории.
|
|
@@ -4538,17 +4581,17 @@ class ScUTMService {
|
|
|
4538
4581
|
/**
|
|
4539
4582
|
* {@link Observable} UTM-метка страницы.
|
|
4540
4583
|
*/
|
|
4541
|
-
this.utm$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utm'), toValue(), startWith(this.getUTMParams()), map((utmString) => (utmString === null ? utmString : JSON.parse(utmString))));
|
|
4584
|
+
this.utm$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utm'), toValue(), startWith$1(this.getUTMParams()), map$1((utmString) => (utmString === null ? utmString : JSON.parse(utmString))));
|
|
4542
4585
|
/**
|
|
4543
4586
|
* {@link Observable} timestamp сохранения UTM в {@link Storage}.
|
|
4544
4587
|
*/
|
|
4545
|
-
this.utmTimestamp$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utmTimestamp'), toValue(), startWith(this.getUTMTimestamp()), map((timestamp) => (isString(timestamp) ? Number(timestamp) : timestamp)));
|
|
4588
|
+
this.utmTimestamp$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utmTimestamp'), toValue(), startWith$1(this.getUTMTimestamp()), map$1((timestamp) => (isString(timestamp) ? Number(timestamp) : timestamp)));
|
|
4546
4589
|
/**
|
|
4547
4590
|
* {@link Observable} UTM-метки страницы из параметров роутинга.
|
|
4548
4591
|
*/
|
|
4549
|
-
this.utmParamsFromRoute$ = this.router.events.pipe(filter((event) => Boolean(this.storage) && this.isBrowser && event instanceof NavigationEnd), map(() => this.activatedRoute), startWith(this.activatedRoute), map((route) => route.snapshot.queryParams),
|
|
4592
|
+
this.utmParamsFromRoute$ = this.router.events.pipe(filter((event) => Boolean(this.storage) && this.isBrowser && event instanceof NavigationEnd), map$1(() => this.activatedRoute), startWith$1(this.activatedRoute), map$1((route) => route.snapshot.queryParams),
|
|
4550
4593
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4551
|
-
filter((params) => params['utm_source'] && params['utm_medium'] && params['utm_campaign']), map((params) => {
|
|
4594
|
+
filter((params) => params['utm_source'] && params['utm_medium'] && params['utm_campaign']), map$1((params) => {
|
|
4552
4595
|
return {
|
|
4553
4596
|
source: params.utm_source,
|
|
4554
4597
|
medium: params.utm_medium,
|
|
@@ -4604,7 +4647,7 @@ class ScUTMService {
|
|
|
4604
4647
|
return combineLatest({
|
|
4605
4648
|
utm: this.utm$,
|
|
4606
4649
|
timestamp: this.utmTimestamp$,
|
|
4607
|
-
}).pipe(map(({ utm, timestamp }) => (!this.utmLifeTime || (timestamp && timestamp + this.utmLifeTime > Date.now()) ? utm : null)));
|
|
4650
|
+
}).pipe(map$1(({ utm, timestamp }) => (!this.utmLifeTime || (timestamp && timestamp + this.utmLifeTime > Date.now()) ? utm : null)));
|
|
4608
4651
|
}
|
|
4609
4652
|
/**
|
|
4610
4653
|
* Возвращает {@link Observable} сохранения {@link ScUTM}.
|
|
@@ -4679,7 +4722,7 @@ class ScFeedbackService {
|
|
|
4679
4722
|
* @param feedbackMessage Объект сообщения обратной связи.
|
|
4680
4723
|
*/
|
|
4681
4724
|
sendFeedback(formSlug, feedbackMessage) {
|
|
4682
|
-
return this.utmService.getUTM$().pipe(first(), map((utm) => (utm ? { ...feedbackMessage, utm } : feedbackMessage)), switchMap((data) => this.http.post(`${this.feedbackApi.apiUrl}/feedback/${formSlug}`, data, {
|
|
4725
|
+
return this.utmService.getUTM$().pipe(first(), map$1((utm) => (utm ? { ...feedbackMessage, utm } : feedbackMessage)), switchMap((data) => this.http.post(`${this.feedbackApi.apiUrl}/feedback/${formSlug}`, data, {
|
|
4683
4726
|
context: new HttpContext().set(SC_AUTH_ADD_HEADER_REQUIRED, false).set(SC_IS_HEADER_REQUIRED, false),
|
|
4684
4727
|
headers: {
|
|
4685
4728
|
[this.feedbackApi.authTokenName]: this.feedbackApi.authToken,
|
|
@@ -4733,19 +4776,19 @@ class ScRequisitesService {
|
|
|
4733
4776
|
/**
|
|
4734
4777
|
* Создаёт запрос получения списка контактов для решения возникающих вопросов.
|
|
4735
4778
|
*/
|
|
4736
|
-
this.personal$ = this.contacts$.pipe(map((contacts) => contacts.personal));
|
|
4779
|
+
this.personal$ = this.contacts$.pipe(map$1((contacts) => contacts.personal));
|
|
4737
4780
|
/**
|
|
4738
4781
|
* Создаёт запрос получения списка контактов розничных магазинов.
|
|
4739
4782
|
*/
|
|
4740
|
-
this.retail$ = this.contacts$.pipe(map((contacts) => contacts.retail), first(), shareReplay(1));
|
|
4783
|
+
this.retail$ = this.contacts$.pipe(map$1((contacts) => contacts.retail), first(), shareReplay(1));
|
|
4741
4784
|
/**
|
|
4742
4785
|
* Создаёт запрос получения списка ссылок на социальные сети и другие каналы коммуникации.
|
|
4743
4786
|
*/
|
|
4744
|
-
this.socialMedia$ = this.contacts$.pipe(map((contacts) => contacts.socialMedia), first(), shareReplay(1));
|
|
4787
|
+
this.socialMedia$ = this.contacts$.pipe(map$1((contacts) => contacts.socialMedia), first(), shareReplay(1));
|
|
4745
4788
|
/**
|
|
4746
4789
|
* Создаёт запрос получения списка контактов менеджеров по направлениям продаж.
|
|
4747
4790
|
*/
|
|
4748
|
-
this.directions$ = this.contacts$.pipe(map((contacts) => contacts.directions), tap((directions) => {
|
|
4791
|
+
this.directions$ = this.contacts$.pipe(map$1((contacts) => contacts.directions), tap((directions) => {
|
|
4749
4792
|
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
4750
4793
|
for (const key in directions) {
|
|
4751
4794
|
directions[Number.parseFloat(key)]?.forEach((manager) => {
|
|
@@ -4877,7 +4920,7 @@ class ScContragentService {
|
|
|
4877
4920
|
/**
|
|
4878
4921
|
* {@link Observable} данных о контрагентах пользователя.
|
|
4879
4922
|
*/
|
|
4880
|
-
this.contragents$ = this.contragentsUpdate$.pipe(switchMap(() => this.user$), switchMap((user) => (user.isGuest ? of(null) : this.http.get(`${this.urls.apiUrl}/user/contragents`).pipe(startWith(null)))), shareReplay(1));
|
|
4923
|
+
this.contragents$ = this.contragentsUpdate$.pipe(switchMap(() => this.user$), switchMap((user) => (user.isGuest ? of(null) : this.http.get(`${this.urls.apiUrl}/user/contragents`).pipe(startWith$1(null)))), shareReplay(1));
|
|
4881
4924
|
this.user$.pipe(filter((user) => user.isGuest)).subscribe(() => {
|
|
4882
4925
|
this.contactsService.contragentContactsMap.clear();
|
|
4883
4926
|
this.contragentBankAccountsMap.clear();
|
|
@@ -4922,7 +4965,7 @@ class ScContragentService {
|
|
|
4922
4965
|
let cachedItem = this.contactsService.contragentContactsMap.get(contragentId);
|
|
4923
4966
|
if (!cachedItem) {
|
|
4924
4967
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update() в будущем.
|
|
4925
|
-
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/contacts`).pipe(startWith(null)), null);
|
|
4968
|
+
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/contacts`).pipe(startWith$1(null)), null);
|
|
4926
4969
|
this.contactsService.contragentContactsMap.set(contragentId, cachedItem);
|
|
4927
4970
|
}
|
|
4928
4971
|
return cachedItem.item$;
|
|
@@ -4955,7 +4998,7 @@ class ScContragentService {
|
|
|
4955
4998
|
let cachedItem = this.contragentBankAccountsMap.get(contragentId);
|
|
4956
4999
|
if (!cachedItem) {
|
|
4957
5000
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
4958
|
-
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/bank-accounts`).pipe(startWith(null)), null);
|
|
5001
|
+
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/bank-accounts`).pipe(startWith$1(null)), null);
|
|
4959
5002
|
this.contragentBankAccountsMap.set(contragentId, cachedItem);
|
|
4960
5003
|
}
|
|
4961
5004
|
return cachedItem.item$;
|
|
@@ -5025,7 +5068,7 @@ class ScDeliveryAddressService {
|
|
|
5025
5068
|
/**
|
|
5026
5069
|
* {@link Observable} данных адресов доставки.
|
|
5027
5070
|
*/
|
|
5028
|
-
this.deliveryAddresses$ = this.deliveryAddressesUpdate$.pipe(switchMap(() => this.user$), switchMap((user) => (user.isGuest ? of(null) : this.http.get(`${this.urls.apiUrl}/user/delivery-addresses`).pipe(startWith(null)))), shareReplay(1));
|
|
5071
|
+
this.deliveryAddresses$ = this.deliveryAddressesUpdate$.pipe(switchMap(() => this.user$), switchMap((user) => (user.isGuest ? of(null) : this.http.get(`${this.urls.apiUrl}/user/delivery-addresses`).pipe(startWith$1(null)))), shareReplay(1));
|
|
5029
5072
|
}
|
|
5030
5073
|
/**
|
|
5031
5074
|
* Создаёт запрос создания нового адреса доставки.
|
|
@@ -5069,7 +5112,7 @@ class ScDeliveryAddressService {
|
|
|
5069
5112
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
5070
5113
|
cachedItem = new ScCachedItem(0, this.http
|
|
5071
5114
|
.get(`${this.urls.apiUrl}/user/delivery-addresses/${addressId}/contacts`)
|
|
5072
|
-
.pipe(startWith(null)), null);
|
|
5115
|
+
.pipe(startWith$1(null)), null);
|
|
5073
5116
|
this.contactsService.deliveryAddressContactsMap.set(addressId, cachedItem);
|
|
5074
5117
|
}
|
|
5075
5118
|
return cachedItem.item$;
|
|
@@ -5329,7 +5372,7 @@ class ScAuthAsClientGuard {
|
|
|
5329
5372
|
canActivate(route) {
|
|
5330
5373
|
const expiredAt = new Date();
|
|
5331
5374
|
expiredAt.setMinutes(new Date().getMinutes() + this.options.expiredAtMinute);
|
|
5332
|
-
return this.authService.getAuthChange().pipe(
|
|
5375
|
+
return this.authService.getAuthChange().pipe(take(1), defaultIfEmpty(false),
|
|
5333
5376
|
// Если пользователь авторизирован, то завершаем сеанс.
|
|
5334
5377
|
concatMap((state) => (state ? this.authService.getSignOut$(false) : of(null))),
|
|
5335
5378
|
// Обновляем полученные ключи, чтобы они перестали действовать. getRefreshTokenObservable() запишет новые ключи в систему, после чего проложение само запросит нового пользователя.
|
|
@@ -5342,7 +5385,7 @@ class ScAuthAsClientGuard {
|
|
|
5342
5385
|
token: route.paramMap.get('rtoken') ?? '',
|
|
5343
5386
|
expiredAt: expiredAt,
|
|
5344
5387
|
},
|
|
5345
|
-
})),
|
|
5388
|
+
})), take(1), defaultIfEmpty(null), map$1(() => this.router.createUrlTree(this.options.urlTree)));
|
|
5346
5389
|
}
|
|
5347
5390
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAuthAsClientGuard, deps: [{ token: ScAuthService }, { token: i2.Router }, { token: SC_AUTH_AS_CLIENT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5348
5391
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAuthAsClientGuard }); }
|
|
@@ -5371,14 +5414,14 @@ const ScIdOrSlugGuard = (route) => {
|
|
|
5371
5414
|
.getCategoryCached$(categoryIdOrSlug)
|
|
5372
5415
|
.pipe(filter(tuiIsPresent),
|
|
5373
5416
|
// eslint-disable-next-line security/detect-object-injection
|
|
5374
|
-
map((category) => router.createUrlTree(['/catalog', category[idOrSlug]])), catchError(() => of(TUI_TRUE_HANDLER())));
|
|
5417
|
+
map$1((category) => router.createUrlTree(['/catalog', category[idOrSlug]])), catchError$1(() => of(TUI_TRUE_HANDLER())));
|
|
5375
5418
|
}
|
|
5376
5419
|
if (productIdOrSlug && /^\d+$/.test(productIdOrSlug) !== (idOrSlug === 'id')) {
|
|
5377
5420
|
return inject(ScCatalogService)
|
|
5378
5421
|
.getProductData$(productIdOrSlug)
|
|
5379
5422
|
.pipe(filter(tuiIsPresent),
|
|
5380
5423
|
// eslint-disable-next-line security/detect-object-injection
|
|
5381
|
-
map((product) => router.createUrlTree(['/catalog', 'product', product[idOrSlug]])), catchError(() => of(TUI_TRUE_HANDLER())));
|
|
5424
|
+
map$1((product) => router.createUrlTree(['/catalog', 'product', product[idOrSlug]])), catchError$1(() => of(TUI_TRUE_HANDLER())));
|
|
5382
5425
|
}
|
|
5383
5426
|
return true;
|
|
5384
5427
|
};
|
|
@@ -5515,14 +5558,14 @@ class ScConvertInterceptor {
|
|
|
5515
5558
|
if (request.responseType !== 'json' || !request.url.includes(this.urls.apiUrl)) {
|
|
5516
5559
|
return next.handle(request);
|
|
5517
5560
|
}
|
|
5518
|
-
return next.handle(request.clone({ params: this.httpParamsToSnake(request.params), body: objectToSnake(request.body) })).pipe(map((event) => {
|
|
5561
|
+
return next.handle(request.clone({ params: this.httpParamsToSnake(request.params), body: objectToSnake(request.body) })).pipe(map$1((event) => {
|
|
5519
5562
|
if (event instanceof HttpResponse) {
|
|
5520
5563
|
return event.clone({
|
|
5521
5564
|
body: objectToCamel(event.body),
|
|
5522
5565
|
});
|
|
5523
5566
|
}
|
|
5524
5567
|
return event;
|
|
5525
|
-
}), catchError((error) => throwError(() => new HttpErrorResponse({
|
|
5568
|
+
}), catchError$1((error) => throwError(() => new HttpErrorResponse({
|
|
5526
5569
|
error: objectToCamel(error.error),
|
|
5527
5570
|
headers: error.headers,
|
|
5528
5571
|
status: error.status,
|
|
@@ -5577,7 +5620,7 @@ class ScErrorsInterceptor {
|
|
|
5577
5620
|
/** @inheritDoc */
|
|
5578
5621
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5579
5622
|
intercept(request, next) {
|
|
5580
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5623
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5581
5624
|
// TODO: TASK[#4511]: Обработка и вывод ошибок работы с API.
|
|
5582
5625
|
// eslint-disable-next-line sonarjs/no-small-switch
|
|
5583
5626
|
switch (error.status) {
|
|
@@ -5614,7 +5657,7 @@ class ScErrorsInterceptor {
|
|
|
5614
5657
|
return this.authService.getRefreshToken$().pipe(switchMap(() => {
|
|
5615
5658
|
this.isTokenRefreshing$.next(false);
|
|
5616
5659
|
return next.handle(request.clone(this.tokenService.addAuthHeader(request)));
|
|
5617
|
-
}), catchError((error) => {
|
|
5660
|
+
}), catchError$1((error) => {
|
|
5618
5661
|
if (error.status === 401) {
|
|
5619
5662
|
this.tokenService.removeAuthToken();
|
|
5620
5663
|
return of();
|
|
@@ -5720,7 +5763,7 @@ class ScDateFormatInterceptor {
|
|
|
5720
5763
|
}
|
|
5721
5764
|
/** @inheritDoc */
|
|
5722
5765
|
intercept(request, next) {
|
|
5723
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5766
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5724
5767
|
const errorData = error.error;
|
|
5725
5768
|
this.formatDatesInErrors(errorData);
|
|
5726
5769
|
return throwError(() => error);
|
|
@@ -6123,7 +6166,7 @@ class ScNewsService {
|
|
|
6123
6166
|
* @param newsId Идентификатор новости.
|
|
6124
6167
|
*/
|
|
6125
6168
|
getNews$(newsId) {
|
|
6126
|
-
return this.http.get(`${this.urls.apiUrl}/news/${newsId}`).pipe(map((category) => new ScNews(category)));
|
|
6169
|
+
return this.http.get(`${this.urls.apiUrl}/news/${newsId}`).pipe(map$1((category) => new ScNews(category)));
|
|
6127
6170
|
}
|
|
6128
6171
|
/**
|
|
6129
6172
|
* Возвращает {@link Observable} получения списка последних новостей.
|
|
@@ -6705,7 +6748,7 @@ class ScOrderDraftsService {
|
|
|
6705
6748
|
* @param params Параметры запроса получения списка.
|
|
6706
6749
|
*/
|
|
6707
6750
|
getList$(params) {
|
|
6708
|
-
return this.http.get(`${this.urls.apiUrl}/orders/offers`, { params: params }).pipe(map((offersPaginateDTO) => {
|
|
6751
|
+
return this.http.get(`${this.urls.apiUrl}/orders/offers`, { params: params }).pipe(map$1((offersPaginateDTO) => {
|
|
6709
6752
|
offersPaginateDTO.data = offersPaginateDTO.data.map((item) => new ScOrderDraftShort(item));
|
|
6710
6753
|
return offersPaginateDTO;
|
|
6711
6754
|
}));
|
|
@@ -6716,7 +6759,7 @@ class ScOrderDraftsService {
|
|
|
6716
6759
|
* @param data Данные для создания.
|
|
6717
6760
|
*/
|
|
6718
6761
|
create$(data) {
|
|
6719
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers`, data).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6762
|
+
return this.http.post(`${this.urls.apiUrl}/orders/offers`, data).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6720
6763
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6721
6764
|
target: ScUserMetrikaGoalsEnum.orderDraftCreated,
|
|
6722
6765
|
params: { offer_id: offer.id },
|
|
@@ -6734,7 +6777,7 @@ class ScOrderDraftsService {
|
|
|
6734
6777
|
get$(draftId, cacheable = true) {
|
|
6735
6778
|
let cachedItem = this.offerMap.get(draftId);
|
|
6736
6779
|
if (!cachedItem) {
|
|
6737
|
-
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/offers/${draftId}`).pipe(map((data) => new ScOrderDraft(data))), loadingPlaceholder);
|
|
6780
|
+
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/offers/${draftId}`).pipe(map$1((data) => new ScOrderDraft(data))), loadingPlaceholder);
|
|
6738
6781
|
if (cacheable) {
|
|
6739
6782
|
this.offerMap.set(draftId, cachedItem);
|
|
6740
6783
|
}
|
|
@@ -6750,7 +6793,7 @@ class ScOrderDraftsService {
|
|
|
6750
6793
|
* @param id Идентификатор коммерческого предложения/черновика.
|
|
6751
6794
|
*/
|
|
6752
6795
|
getItems$(id) {
|
|
6753
|
-
return this.get$(id).pipe(map((draft) => (draft === loadingPlaceholder ? loadingPlaceholder : draft.products)));
|
|
6796
|
+
return this.get$(id).pipe(map$1((draft) => (draft === loadingPlaceholder ? loadingPlaceholder : draft.products)));
|
|
6754
6797
|
}
|
|
6755
6798
|
/**
|
|
6756
6799
|
* Обновляет данные коммерческого предложения/черновика.
|
|
@@ -6760,7 +6803,7 @@ class ScOrderDraftsService {
|
|
|
6760
6803
|
*/
|
|
6761
6804
|
update$(draftId, patch) {
|
|
6762
6805
|
const cachedItem = this.offerMap.get(draftId);
|
|
6763
|
-
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${draftId}`, patch).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6806
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${draftId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6764
6807
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6765
6808
|
target: ScUserMetrikaGoalsEnum.orderDraftUpdated,
|
|
6766
6809
|
params: { offer_id: draftId },
|
|
@@ -6789,7 +6832,7 @@ class ScOrderDraftsService {
|
|
|
6789
6832
|
* @param data Данные заказа.
|
|
6790
6833
|
*/
|
|
6791
6834
|
createOrder$(offerId, data) {
|
|
6792
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/create-order`, data).pipe(map((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6835
|
+
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/create-order`, data).pipe(map$1((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6793
6836
|
orders.forEach((order) => {
|
|
6794
6837
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6795
6838
|
target: ScUserMetrikaGoalsEnum.orderCreatedFromDraft,
|
|
@@ -6806,7 +6849,7 @@ class ScOrderDraftsService {
|
|
|
6806
6849
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6807
6850
|
*/
|
|
6808
6851
|
addProduct$(productData, offerId) {
|
|
6809
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/products`, productData).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6852
|
+
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/products`, productData).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6810
6853
|
if (this.offerMap.has(offerId)) {
|
|
6811
6854
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6812
6855
|
}
|
|
@@ -6820,7 +6863,7 @@ class ScOrderDraftsService {
|
|
|
6820
6863
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6821
6864
|
*/
|
|
6822
6865
|
updateProduct$(productId, patch, offerId) {
|
|
6823
|
-
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${productId}`, patch).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6866
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${productId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6824
6867
|
if (this.offerMap.has(offerId)) {
|
|
6825
6868
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6826
6869
|
}
|
|
@@ -6833,7 +6876,7 @@ class ScOrderDraftsService {
|
|
|
6833
6876
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6834
6877
|
*/
|
|
6835
6878
|
deleteProduct$(item, offerId) {
|
|
6836
|
-
return this.http.delete(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${item.id}`).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6879
|
+
return this.http.delete(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${item.id}`).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6837
6880
|
if (this.offerMap.has(offerId)) {
|
|
6838
6881
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6839
6882
|
}
|
|
@@ -6905,7 +6948,7 @@ class ScOrdersService {
|
|
|
6905
6948
|
* @param newOrder Данные нового заказа.
|
|
6906
6949
|
*/
|
|
6907
6950
|
createOrder$(directionId, newOrder) {
|
|
6908
|
-
return this.http.post(`${this.urls.apiUrl}/orders/${directionId}`, newOrder).pipe(map((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6951
|
+
return this.http.post(`${this.urls.apiUrl}/orders/${directionId}`, newOrder).pipe(map$1((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6909
6952
|
orders.forEach((order) => {
|
|
6910
6953
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6911
6954
|
target: ScUserMetrikaGoalsEnum.orderCreated,
|
|
@@ -6938,7 +6981,7 @@ class ScOrdersService {
|
|
|
6938
6981
|
* @param params Параметры запроса получения заказов.
|
|
6939
6982
|
*/
|
|
6940
6983
|
getOrders$(params) {
|
|
6941
|
-
return this.http.get(`${this.urls.apiUrl}/orders`, { params: params }).pipe(map((ordersPaginateDTO) => {
|
|
6984
|
+
return this.http.get(`${this.urls.apiUrl}/orders`, { params: params }).pipe(map$1((ordersPaginateDTO) => {
|
|
6942
6985
|
ordersPaginateDTO.data = ordersPaginateDTO.data.map((item) => new ScOrderShort(item));
|
|
6943
6986
|
return ordersPaginateDTO;
|
|
6944
6987
|
}));
|
|
@@ -6952,7 +6995,7 @@ class ScOrdersService {
|
|
|
6952
6995
|
get$(orderId, cacheable = true) {
|
|
6953
6996
|
let cachedItem = this.orderMap.get(orderId);
|
|
6954
6997
|
if (!cachedItem) {
|
|
6955
|
-
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/${orderId}`).pipe(map((data) => new ScOrder(data))), loadingPlaceholder);
|
|
6998
|
+
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/${orderId}`).pipe(map$1((data) => new ScOrder(data))), loadingPlaceholder);
|
|
6956
6999
|
if (cacheable) {
|
|
6957
7000
|
this.orderMap.set(orderId, cachedItem);
|
|
6958
7001
|
}
|
|
@@ -6969,7 +7012,7 @@ class ScOrdersService {
|
|
|
6969
7012
|
* @param cacheable Признак возможности получения списка элементов заказа из кэшированных данных.
|
|
6970
7013
|
*/
|
|
6971
7014
|
getItems$(id, cacheable = true) {
|
|
6972
|
-
return this.get$(id, cacheable).pipe(map((order) => (order === loadingPlaceholder ? loadingPlaceholder : order.products)));
|
|
7015
|
+
return this.get$(id, cacheable).pipe(map$1((order) => (order === loadingPlaceholder ? loadingPlaceholder : order.products)));
|
|
6973
7016
|
}
|
|
6974
7017
|
/**
|
|
6975
7018
|
* Копирует товары заказа в корзину текущего пользователя.
|
|
@@ -6999,7 +7042,7 @@ class ScOrdersService {
|
|
|
6999
7042
|
status,
|
|
7000
7043
|
statusDetail,
|
|
7001
7044
|
})
|
|
7002
|
-
.pipe(map((dto) => new ScOrder(dto)), tap((order) => {
|
|
7045
|
+
.pipe(map$1((dto) => new ScOrder(dto)), tap((order) => {
|
|
7003
7046
|
this.syncOrderCache(orderId, order);
|
|
7004
7047
|
}));
|
|
7005
7048
|
}
|
|
@@ -7026,7 +7069,7 @@ class ScOrdersService {
|
|
|
7026
7069
|
date: date,
|
|
7027
7070
|
},
|
|
7028
7071
|
})
|
|
7029
|
-
.pipe(map((ordersPaginateDTO) => {
|
|
7072
|
+
.pipe(map$1((ordersPaginateDTO) => {
|
|
7030
7073
|
const formattedDate = format(parse(date, this.dateFormats.api, new Date()), this.dateFormats.uiDate);
|
|
7031
7074
|
return new ScDeliveryCost(ordersPaginateDTO, formattedDate);
|
|
7032
7075
|
}));
|
|
@@ -7076,7 +7119,7 @@ class ScPaginationService {
|
|
|
7076
7119
|
/**
|
|
7077
7120
|
* {@link Observable} изменения статуса аутентификации.
|
|
7078
7121
|
*/
|
|
7079
|
-
this.authStatus$ = inject(SC_USER_INFO).pipe(map((user) => user.isGuest));
|
|
7122
|
+
this.authStatus$ = inject(SC_USER_INFO).pipe(map$1((user) => user.isGuest));
|
|
7080
7123
|
/**
|
|
7081
7124
|
* Сервис работы с каталогом.
|
|
7082
7125
|
*/
|
|
@@ -7088,18 +7131,18 @@ class ScPaginationService {
|
|
|
7088
7131
|
// Избегаем множественных сигналов при одновременном изменении фильтров page$ и others$.
|
|
7089
7132
|
debounceTime(0),
|
|
7090
7133
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
7091
|
-
map((page) => ({ ...params, ...page })),
|
|
7134
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7092
7135
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7093
|
-
switchMap((paginationParams) => this.authStatus$.pipe(switchMap(() => this.catalogService.getProducts$(paginationParams).pipe(startWith(null))))))), share());
|
|
7136
|
+
switchMap((paginationParams) => this.authStatus$.pipe(switchMap(() => this.catalogService.getProducts$(paginationParams).pipe(startWith$1(null))))))), share());
|
|
7094
7137
|
/**
|
|
7095
7138
|
* Объект данных пагинации с сохранением предыдущих значений для "разворачивания" списка товаров.
|
|
7096
7139
|
* Список сохраняется при переходе по страницам, до тех пор пока не будет получен сигнал `others$`.
|
|
7097
7140
|
*/
|
|
7098
|
-
this.dataAccumulated$ = this.others$.pipe(filter(tuiIsPresent), switchMap((params) => this.authStatus$.pipe(map(() => params))), switchMap((params) => this.page$.pipe(
|
|
7141
|
+
this.dataAccumulated$ = this.others$.pipe(filter(tuiIsPresent), switchMap((params) => this.authStatus$.pipe(map$1(() => params))), switchMap((params) => this.page$.pipe(
|
|
7099
7142
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
|
7100
|
-
map((page) => ({ ...params, ...page })),
|
|
7143
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7101
7144
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7102
|
-
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith(null))),
|
|
7145
|
+
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith$1(null))),
|
|
7103
7146
|
// TODO: Заменить `ScProduct` на T тип.
|
|
7104
7147
|
scan(
|
|
7105
7148
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -7111,9 +7154,9 @@ class ScPaginationService {
|
|
|
7111
7154
|
value.data.unshift(...accumulator.data);
|
|
7112
7155
|
}
|
|
7113
7156
|
return [value, value];
|
|
7114
|
-
}, [null, null]), map(([paginate]) => paginate), takeWhile((paginate) => paginate === null || paginate.meta.currentPage < paginate.meta.lastPage, true))), share());
|
|
7157
|
+
}, [null, null]), map$1(([paginate]) => paginate), takeWhile((paginate) => paginate === null || paginate.meta.currentPage < paginate.meta.lastPage, true))), share());
|
|
7115
7158
|
this.others$
|
|
7116
|
-
.pipe(filter(tuiIsPresent), switchMap(() => this.nextPageClickEvent.pipe(scan((accumulator) => accumulator + 1, 1), startWith(1))), takeUntilDestroyed())
|
|
7159
|
+
.pipe(filter(tuiIsPresent), switchMap(() => this.nextPageClickEvent.pipe(scan((accumulator) => accumulator + 1, 1), startWith$1(1))), takeUntilDestroyed())
|
|
7117
7160
|
.subscribe((page) => {
|
|
7118
7161
|
this.patchPage({ page: page });
|
|
7119
7162
|
});
|
|
@@ -7346,7 +7389,7 @@ class ScReclamationService {
|
|
|
7346
7389
|
downloadReclamation$(reclamationId) {
|
|
7347
7390
|
return this.http
|
|
7348
7391
|
.get(`${this.urls.apiUrl}/reclamations/${reclamationId}/download`, { responseType: 'blob' })
|
|
7349
|
-
.pipe(map((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7392
|
+
.pipe(map$1((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7350
7393
|
}
|
|
7351
7394
|
/**
|
|
7352
7395
|
* Отправляет новое сообщение рекламации.
|
|
@@ -8105,7 +8148,7 @@ class ScVacanciesService {
|
|
|
8105
8148
|
.get(`${this.vacanciesData.apiUrl}?employer_id=${this.vacanciesData.employerId}&per_page=${perPage}&page=${page}`, {
|
|
8106
8149
|
context: new HttpContext().set(SC_IS_HEADER_REQUIRED, false).set(SC_CACHE_SETTINGS, new ScCacheSettings(true, this.cacheLifeTime.vacanciesData)),
|
|
8107
8150
|
})
|
|
8108
|
-
.pipe(map((result) => new ScVacanciesList(result)));
|
|
8151
|
+
.pipe(map$1((result) => new ScVacanciesList(result)));
|
|
8109
8152
|
}
|
|
8110
8153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScVacanciesService, deps: [{ token: i1$1.HttpClient }, { token: SC_VACANCIES_DATA_SOURCE }, { token: SC_CACHE_LIFETIME }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8111
8154
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScVacanciesService, providedIn: 'root' }); }
|
|
@@ -8289,5 +8332,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8289
8332
|
* Generated bundle index. Do not edit.
|
|
8290
8333
|
*/
|
|
8291
8334
|
|
|
8292
|
-
export { CATEGORY_PROVIDERS, EMPTY_CART, IS_BROWSER, IS_RUNNING_ON_TERMINAL, IS_SERVER, RESPONSE, SC_ACCESS_AUTH_TOKEN_STORAGE_KEY, SC_API_KEYS, SC_AUTH_ADD_HEADER_REQUIRED, SC_AUTH_AS_CLIENT_DEFAULT_OPTIONS, SC_AUTH_AS_CLIENT_OPTIONS, SC_CACHE_LIFETIME, SC_CACHE_SETTINGS, SC_CATALOG_ITEM_PAGE_META, SC_CATALOG_ROOT_PAGE_META, SC_CATEGORY_INFO, SC_COMPANY_INFO, SC_COMPANY_NAME, SC_CONFIGURATOR_COMPONENTS, SC_CONFIGURATOR_SETTINGS, SC_COUNT_FIRST_DISCOUNTED_PRODUCTS, SC_COUNT_LAST_NEWS, SC_DATE_FORMAT, SC_DEFAULT_PAGE_META, SC_FEEDBACK_API, SC_GUEST_ENDPOINTS_TOKEN, SC_GUEST_PARAMETER_NAME_TOKEN, SC_GUEST_TOKEN_STORAGE_KEY, SC_ID_OR_SLUG_IN_ROUTE, SC_IS_HEADER_REQUIRED, SC_IS_HIDDEN_ERROR_ALERT, SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT, SC_IS_LOGOUT_REQUEST, SC_IS_REFRESH_REQUIRED, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_MAX_LENGTH_SEARCH_TERM, SC_MIN_LENGTH_SEARCH_TERM, SC_NEXT_PAGE_PAGINATION_CLICK, SC_ORDER_LOADER, SC_ORDER_LOADING, SC_PATH_IMAGE_NOT_FOUND, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_REFRESH_AUTH_TOKEN_STORAGE_KEY, SC_RELEASE, SC_UPDATE_INTERVAL, SC_URLS, SC_USER_INFO, SC_VACANCIES_DATA_SOURCE, SC_VIRTUAL_CATEGORY_INFO, SC_VIRTUAL_CATEGORY_PROVIDERS, SEARCH_TERM, SEARCH_TERM_PROVIDERS, ScAuthAsClientGuard, ScAuthInterceptor, ScAuthService, ScBanner, ScBannerService, ScCacheInterceptor, ScCacheSettings, ScCachedData, ScCachedItem, ScCart, ScCartService, ScCatalogFilterService, ScCatalogFormat, ScCatalogItem, ScCatalogService, ScCatalogableItem, ScCategory, ScClientType, ScCodedIdentity, ScConfiguratorService, ScContactsService, ScContragentService, ScConvertInterceptor, ScConvertersService, ScDateFormatInterceptor, ScDeletableNamedIdentity, ScDeliveryAddressService, ScDeliveryCost, ScDeliveryType, ScDocumentInfoNode, ScDocumentInfoTypesEnum, ScErrorsInterceptor, ScFavoriteService, ScFeedbackForms, ScFeedbackService, ScFilesService, ScFrequentlyAskedQuestionsService, ScGuestInterceptor, ScHiddenCatalogableItem, ScIBreadcrumbItem, ScISuggestionType, ScIconTypesEnum, ScIdOrSlugGuard, ScIdOrSlugPipe, ScIdentity, ScImage, ScImageHelper, ScLocationsService, ScMediaImageTransformerPipe, ScMimeTypes, ScNamedIdentity, ScNews, ScNewsService, ScNotificationActionTypes, ScNotificationLevelNames, ScNotificationsService, ScOpfList, ScOptionsInterceptor, ScOrder, ScOrderBase, ScOrderDraft, ScOrderDraftShort, ScOrderDraftType, ScOrderDraftsService, ScOrderItem, ScOrderShort, ScOrderStateStatus, ScOrdersService, ScPaginationService, ScPaymentStatus, ScPaymentType, ScPhoneService, ScPrimaryCatalogableItem, ScProduct, ScProductTileType, ScQuestionnaireService, ScQuestionnaireStatusEnum, ScReclamationService, ScReclamationStatus, ScRecommendationService, ScReference, ScReferenceName, ScReferencesService, ScRequisitesService, ScRouteKeys, ScSearchService, ScSeoService, ScSocialType, ScSuggestionService, ScSum, ScTokenService, ScUIService, ScUTMService, ScUnitsHelper, ScUpdatableNamedIdentity, ScUploadedFile, ScUser, ScUserMetadata, ScUserMetrikaGoalsEnum, ScUserMetrikaService, ScUserService, ScUserType, ScVCardService, ScVacanciesList, ScVacanciesService, ScVacancy, ScVerificationService, ScVirtualCategory, ScWarehouseService, SchemaOrgFactory, TERMINAL_PROVIDERS, USER_AGENT_TERMINAL, filterChangedByKey, loadingPlaceholder, runningOnTerminalFactory, scGetCurrentRoute, scOrderIsLoaded, searchTermFactory };
|
|
8335
|
+
export { CATEGORY_PROVIDERS, EMPTY_CART, IS_BROWSER, IS_RUNNING_ON_TERMINAL, IS_SERVER, RESPONSE, SC_ACCESS_AUTH_TOKEN_STORAGE_KEY, SC_API_KEYS, SC_AUTH_ADD_HEADER_REQUIRED, SC_AUTH_AS_CLIENT_DEFAULT_OPTIONS, SC_AUTH_AS_CLIENT_OPTIONS, SC_CACHE_LIFETIME, SC_CACHE_SETTINGS, SC_CATALOG_ITEM_PAGE_META, SC_CATALOG_ROOT_PAGE_META, SC_CATEGORY_INFO, SC_COMPANY_INFO, SC_COMPANY_NAME, SC_CONFIGURATOR_COMPONENTS, SC_CONFIGURATOR_SETTINGS, SC_COUNT_FIRST_DISCOUNTED_PRODUCTS, SC_COUNT_LAST_NEWS, SC_DATE_FORMAT, SC_DEFAULT_PAGE_META, SC_FEEDBACK_API, SC_GUEST_ENDPOINTS_TOKEN, SC_GUEST_PARAMETER_NAME_TOKEN, SC_GUEST_TOKEN_STORAGE_KEY, SC_ID_OR_SLUG_IN_ROUTE, SC_IS_HEADER_REQUIRED, SC_IS_HIDDEN_ERROR_ALERT, SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT, SC_IS_LOGOUT_REQUEST, SC_IS_REFRESH_REQUIRED, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_MAX_LENGTH_SEARCH_TERM, SC_MIN_LENGTH_SEARCH_TERM, SC_NEXT_PAGE_PAGINATION_CLICK, SC_ORDER_LOADER, SC_ORDER_LOADING, SC_PATH_IMAGE_NOT_FOUND, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_REFRESH_AUTH_TOKEN_STORAGE_KEY, SC_RELEASE, SC_UPDATE_INTERVAL, SC_URLS, SC_USER_INFO, SC_VACANCIES_DATA_SOURCE, SC_VIRTUAL_CATEGORY_INFO, SC_VIRTUAL_CATEGORY_PROVIDERS, SEARCH_TERM, SEARCH_TERM_PROVIDERS, ScAuthAsClientGuard, ScAuthInterceptor, ScAuthService, ScBanner, ScBannerService, ScCacheInterceptor, ScCacheSettings, ScCachedData, ScCachedItem, ScCart, ScCartService, ScCatalogFilterService, ScCatalogFormat, ScCatalogItem, ScCatalogService, ScCatalogableItem, ScCategory, ScClientType, ScCodedIdentity, ScConfiguratorService, ScContactsService, ScContragentService, ScConvertInterceptor, ScConvertersService, ScDateFormatInterceptor, ScDeletableNamedIdentity, ScDeliveryAddressService, ScDeliveryCost, ScDeliveryType, ScDocumentInfoNode, ScDocumentInfoTypesEnum, ScErrorRequestState, ScErrorsInterceptor, ScFavoriteService, ScFeedbackForms, ScFeedbackService, ScFilesService, ScFrequentlyAskedQuestionsService, ScGuestInterceptor, ScHiddenCatalogableItem, ScIBreadcrumbItem, ScISuggestionType, ScIconTypesEnum, ScIdOrSlugGuard, ScIdOrSlugPipe, ScIdentity, ScImage, ScImageHelper, ScLoadingRequestState, ScLocationsService, ScMediaImageTransformerPipe, ScMimeTypes, ScNamedIdentity, ScNews, ScNewsService, ScNotificationActionTypes, ScNotificationLevelNames, ScNotificationsService, ScOpfList, ScOptionsInterceptor, ScOrder, ScOrderBase, ScOrderDraft, ScOrderDraftShort, ScOrderDraftType, ScOrderDraftsService, ScOrderItem, ScOrderShort, ScOrderStateStatus, ScOrdersService, ScPaginationService, ScPaymentStatus, ScPaymentType, ScPhoneService, ScPrimaryCatalogableItem, ScProduct, ScProductTileType, ScQuestionnaireService, ScQuestionnaireStatusEnum, ScReclamationService, ScReclamationStatus, ScRecommendationService, ScReference, ScReferenceName, ScReferencesService, ScRequestStateStatusEnum, ScRequisitesService, ScRouteKeys, ScSearchService, ScSeoService, ScSocialType, ScSuccessRequestState, ScSuggestionService, ScSum, ScTokenService, ScUIService, ScUTMService, ScUnitsHelper, ScUpdatableNamedIdentity, ScUploadedFile, ScUser, ScUserMetadata, ScUserMetrikaGoalsEnum, ScUserMetrikaService, ScUserService, ScUserType, ScVCardService, ScVacanciesList, ScVacanciesService, ScVacancy, ScVerificationService, ScVirtualCategory, ScWarehouseService, SchemaOrgFactory, TERMINAL_PROVIDERS, USER_AGENT_TERMINAL, filterChangedByKey, loadingPlaceholder, mapRequestStateToDataOrNull, mapToRequestState, runningOnTerminalFactory, scGetCurrentRoute, scOrderIsLoaded, searchTermFactory };
|
|
8293
8336
|
//# sourceMappingURL=snabcentr-client-core.mjs.map
|