@snabcentr/client-core 2.66.16 → 2.66.18
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
|
getOrderStatusById$(statusId) {
|
|
2601
|
-
return this.orderStatuses$.pipe(map((types) => types.find((type) => type.id === statusId)));
|
|
2644
|
+
return this.orderStatuses$.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 statusId Идентификатор типа статуса.
|
|
2607
2650
|
*/
|
|
2608
2651
|
getReclamationStatusById$(statusId) {
|
|
2609
|
-
return this.reclamationStatuses$.pipe(map((types) => types.find((type) => type.id === statusId)));
|
|
2652
|
+
return this.reclamationStatuses$.pipe(map$1((types) => types.find((type) => type.id === statusId)));
|
|
2610
2653
|
}
|
|
2611
2654
|
/**
|
|
2612
2655
|
* Возвращает {@link Observable} тип оплаты, соответствующий идентификатору на входе.
|
|
@@ -2614,7 +2657,7 @@ class ScReferencesService {
|
|
|
2614
2657
|
* @param typeId Идентификатор типа оплаты.
|
|
2615
2658
|
*/
|
|
2616
2659
|
getPaymentTypeById$(typeId) {
|
|
2617
|
-
return this.paymentTypes$.pipe(map((types) => types.find((type) => type.id === typeId)));
|
|
2660
|
+
return this.paymentTypes$.pipe(map$1((types) => types.find((type) => type.id === typeId)));
|
|
2618
2661
|
}
|
|
2619
2662
|
/**
|
|
2620
2663
|
* Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
|
|
@@ -2622,7 +2665,7 @@ class ScReferencesService {
|
|
|
2622
2665
|
* @param slug Символьное обозначение (slug).
|
|
2623
2666
|
*/
|
|
2624
2667
|
getOpfBySlug$(slug) {
|
|
2625
|
-
return this.opf$.pipe(map((types) => types.find((type) => type.slug === slug)));
|
|
2668
|
+
return this.opf$.pipe(map$1((types) => types.find((type) => type.slug === slug)));
|
|
2626
2669
|
}
|
|
2627
2670
|
/**
|
|
2628
2671
|
* Возвращает {@link Observable} валюты, соответствующий идентификатору на входе.
|
|
@@ -2630,7 +2673,7 @@ class ScReferencesService {
|
|
|
2630
2673
|
* @param currencyId Идентификатор валюты.
|
|
2631
2674
|
*/
|
|
2632
2675
|
getCurrencyById$(currencyId) {
|
|
2633
|
-
return this.currencies$.pipe(map((types) => types.find((type) => type.id === currencyId)));
|
|
2676
|
+
return this.currencies$.pipe(map$1((types) => types.find((type) => type.id === currencyId)));
|
|
2634
2677
|
}
|
|
2635
2678
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScReferencesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2636
2679
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScReferencesService, providedIn: 'root' }); }
|
|
@@ -2673,7 +2716,7 @@ class ScWarehouseService {
|
|
|
2673
2716
|
*/
|
|
2674
2717
|
initSubscriptionOnUser() {
|
|
2675
2718
|
// Observable данных для обработки сигналов изменения пользователя.
|
|
2676
|
-
const data$ = this.warehouses$.pipe(switchMap((warehouses) => this.user$.pipe(map((user) => ({
|
|
2719
|
+
const data$ = this.warehouses$.pipe(switchMap((warehouses) => this.user$.pipe(map$1((user) => ({
|
|
2677
2720
|
warehouses: warehouses,
|
|
2678
2721
|
selectedIdMetadata: user.metadata.selectedWarehouseId,
|
|
2679
2722
|
city: user.city,
|
|
@@ -2684,7 +2727,7 @@ class ScWarehouseService {
|
|
|
2684
2727
|
data$
|
|
2685
2728
|
.pipe(
|
|
2686
2729
|
// eslint-disable-next-line unicorn/no-negation-in-equality-check
|
|
2687
|
-
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) => {
|
|
2730
|
+
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) => {
|
|
2688
2731
|
this.warehouseIdSelectSubject.next(selectedId);
|
|
2689
2732
|
}))
|
|
2690
2733
|
.subscribe();
|
|
@@ -2694,9 +2737,9 @@ class ScWarehouseService {
|
|
|
2694
2737
|
// eslint-disable-next-line unicorn/no-negation-in-equality-check
|
|
2695
2738
|
distinctUntilChanged((previous, current) => !previous.id !== !current.id || previous.city === current.city), skip(1), // distinctUntilChanged() всегда выдаёт первое значение, поэтому пропускаем его и реагируем только на изменение.
|
|
2696
2739
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2697
|
-
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),
|
|
2740
|
+
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),
|
|
2698
2741
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2699
|
-
map((selectedId) => selectedId), tap((selectedId) => {
|
|
2742
|
+
map$1((selectedId) => selectedId), tap((selectedId) => {
|
|
2700
2743
|
this.setWarehouseIdSelectChange(selectedId);
|
|
2701
2744
|
}))
|
|
2702
2745
|
.subscribe();
|
|
@@ -2714,13 +2757,13 @@ class ScWarehouseService {
|
|
|
2714
2757
|
* Возвращает {@link Observable} выбранного склада.
|
|
2715
2758
|
*/
|
|
2716
2759
|
getWarehouseSelectChange$() {
|
|
2717
|
-
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));
|
|
2760
|
+
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));
|
|
2718
2761
|
}
|
|
2719
2762
|
/**
|
|
2720
2763
|
* Возвращает {@link Observable} склада для доставки.
|
|
2721
2764
|
*/
|
|
2722
2765
|
getDeliveryWarehouse$() {
|
|
2723
|
-
return this.warehouses$.pipe(map((warehouses) => warehouses.find((item) => item.isMain)), filter(tuiIsPresent));
|
|
2766
|
+
return this.warehouses$.pipe(map$1((warehouses) => warehouses.find((item) => item.isMain)), filter(tuiIsPresent));
|
|
2724
2767
|
}
|
|
2725
2768
|
/**
|
|
2726
2769
|
* Возвращает {@link Observable} склада в зависимости от того, где запущено приложение.
|
|
@@ -2729,7 +2772,7 @@ class ScWarehouseService {
|
|
|
2729
2772
|
* во всех остальных случаях возвращает основной склад.
|
|
2730
2773
|
*/
|
|
2731
2774
|
getCatalogWarehouseChange$() {
|
|
2732
|
-
return this.warehouses$.pipe(map((warehouses) => warehouses.find((w) => w.id === this.terminal.warehouseId) ?? warehouses.find((w) => w.isMain)), filter(tuiIsPresent));
|
|
2775
|
+
return this.warehouses$.pipe(map$1((warehouses) => warehouses.find((w) => w.id === this.terminal.warehouseId) ?? warehouses.find((w) => w.isMain)), filter(tuiIsPresent));
|
|
2733
2776
|
}
|
|
2734
2777
|
/**
|
|
2735
2778
|
* Возвращает {@link Observable} списка складов.
|
|
@@ -2803,9 +2846,9 @@ class ScCartService {
|
|
|
2803
2846
|
* Создаёт запрос получения содержимого корзины и обновляет корзину, возвращая {@link Observable} содержимого корзины.
|
|
2804
2847
|
*/
|
|
2805
2848
|
getCartData$() {
|
|
2806
|
-
return this.user$.pipe(first(), switchMap((user) => this.http.get(`${this.urls.apiUrl}/cart`).pipe(map((cartDTO) => new ScCart(cartDTO)),
|
|
2849
|
+
return this.user$.pipe(first(), switchMap((user) => this.http.get(`${this.urls.apiUrl}/cart`).pipe(map$1((cartDTO) => new ScCart(cartDTO)),
|
|
2807
2850
|
// TODO: Пересмотреть механизмы перехвата HTTP-ошибок 401/403/0 централизованно (с использованием interceptors).
|
|
2808
|
-
catchError((error) => {
|
|
2851
|
+
catchError$1((error) => {
|
|
2809
2852
|
if (user.isGuest && error instanceof HttpErrorResponse && [0, 401, 403].includes(error.status)) {
|
|
2810
2853
|
// Для гостя в неавторизованных/сетевых кейсах отдаём пустую корзину,
|
|
2811
2854
|
// чтобы не пробрасывать ошибку во все подписки UI.
|
|
@@ -2824,7 +2867,7 @@ class ScCartService {
|
|
|
2824
2867
|
* Возвращает список элементов корзины.
|
|
2825
2868
|
*/
|
|
2826
2869
|
getItems$() {
|
|
2827
|
-
return this.get$().pipe(map((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items)));
|
|
2870
|
+
return this.get$().pipe(map$1((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items)));
|
|
2828
2871
|
}
|
|
2829
2872
|
/**
|
|
2830
2873
|
* Добавляет продукт в корзину.
|
|
@@ -2832,7 +2875,7 @@ class ScCartService {
|
|
|
2832
2875
|
* @param data Данные добавляемого продукта.
|
|
2833
2876
|
*/
|
|
2834
2877
|
addProduct$(data) {
|
|
2835
|
-
return this.http.patch(`${this.urls.apiUrl}/cart`, data).pipe(map((cartDTO) => new ScCart(cartDTO)), tap(() => {
|
|
2878
|
+
return this.http.patch(`${this.urls.apiUrl}/cart`, data).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap(() => {
|
|
2836
2879
|
if (data.productId) {
|
|
2837
2880
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2838
2881
|
target: ScUserMetrikaGoalsEnum.cartItemAdded,
|
|
@@ -2850,7 +2893,7 @@ class ScCartService {
|
|
|
2850
2893
|
* @param patch Частичные данные для обновления.
|
|
2851
2894
|
*/
|
|
2852
2895
|
updateProduct$(id, patch) {
|
|
2853
|
-
return this.http.patch(`${this.urls.apiUrl}/cart/${id}`, patch).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2896
|
+
return this.http.patch(`${this.urls.apiUrl}/cart/${id}`, patch).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2854
2897
|
this.cartCachedItem$.setValue(cart);
|
|
2855
2898
|
}));
|
|
2856
2899
|
}
|
|
@@ -2860,7 +2903,7 @@ class ScCartService {
|
|
|
2860
2903
|
* @param item Удаляемая позиция.
|
|
2861
2904
|
*/
|
|
2862
2905
|
deleteProduct$(item) {
|
|
2863
|
-
return this.http.delete(`${this.urls.apiUrl}/cart/${item.id}`).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2906
|
+
return this.http.delete(`${this.urls.apiUrl}/cart/${item.id}`).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2864
2907
|
this.cartCachedItem$.setValue(cart);
|
|
2865
2908
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2866
2909
|
target: ScUserMetrikaGoalsEnum.cartItemDeleted,
|
|
@@ -2893,7 +2936,7 @@ class ScCartService {
|
|
|
2893
2936
|
* @deprecated
|
|
2894
2937
|
*/
|
|
2895
2938
|
getNullCartItems$() {
|
|
2896
|
-
return this.get$().pipe(map((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items.filter((item) => item.product.isNull || item.product.isHidden))));
|
|
2939
|
+
return this.get$().pipe(map$1((cart) => (cart === loadingPlaceholder ? loadingPlaceholder : cart.items.filter((item) => item.product.isNull || item.product.isHidden))));
|
|
2897
2940
|
}
|
|
2898
2941
|
/**
|
|
2899
2942
|
* Возвращает объект {@link ScCart} корзины, созданный из объекта заказа.
|
|
@@ -2916,7 +2959,7 @@ class ScCartService {
|
|
|
2916
2959
|
.get(`${this.urls.apiUrl}/cart/csv/example`, {
|
|
2917
2960
|
responseType: 'blob',
|
|
2918
2961
|
})
|
|
2919
|
-
.pipe(map((blob) => new Blob([blob], { type: 'text/csv' })));
|
|
2962
|
+
.pipe(map$1((blob) => new Blob([blob], { type: 'text/csv' })));
|
|
2920
2963
|
}
|
|
2921
2964
|
/**
|
|
2922
2965
|
* Добавляет товары в корзину из файла CSV.
|
|
@@ -2924,7 +2967,7 @@ class ScCartService {
|
|
|
2924
2967
|
* @param file Загружаемый файл в формате base64.
|
|
2925
2968
|
*/
|
|
2926
2969
|
addProductsFromCsv$(file) {
|
|
2927
|
-
return this.http.post(`${this.urls.apiUrl}/cart/csv`, { file }).pipe(map((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2970
|
+
return this.http.post(`${this.urls.apiUrl}/cart/csv`, { file }).pipe(map$1((cartDTO) => new ScCart(cartDTO)), tap((cart) => {
|
|
2928
2971
|
this.cartCachedItem$.setValue(cart);
|
|
2929
2972
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
2930
2973
|
target: ScUserMetrikaGoalsEnum.cartCsvUpload,
|
|
@@ -3228,11 +3271,11 @@ class ScCatalogService {
|
|
|
3228
3271
|
/**
|
|
3229
3272
|
* {@link Observable} изменения списка из первых товаров со скидкой.
|
|
3230
3273
|
*/
|
|
3231
|
-
this.firstDiscountedProducts$ = this.firstDiscounted$.pipe(map((data) => data?.data ?? []));
|
|
3274
|
+
this.firstDiscountedProducts$ = this.firstDiscounted$.pipe(map$1((data) => data?.data ?? []));
|
|
3232
3275
|
/**
|
|
3233
3276
|
* {@link Observable} изменения общего колличества товара со скидкой.
|
|
3234
3277
|
*/
|
|
3235
|
-
this.countDiscountedProducts$ = this.firstDiscounted$.pipe(map((data) => data?.meta.total ?? 0));
|
|
3278
|
+
this.countDiscountedProducts$ = this.firstDiscounted$.pipe(map$1((data) => data?.meta.total ?? 0));
|
|
3236
3279
|
this.userService
|
|
3237
3280
|
.getUserChange$()
|
|
3238
3281
|
.pipe(skip(1))
|
|
@@ -3266,7 +3309,7 @@ class ScCatalogService {
|
|
|
3266
3309
|
* @param categoryIdOrSlug Идентификатор или slug категории товаров.
|
|
3267
3310
|
*/
|
|
3268
3311
|
getCategoryData$(categoryIdOrSlug) {
|
|
3269
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug ?? ''}`).pipe(map((category) => new ScCategory(category)), tap((category) => {
|
|
3312
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug ?? ''}`).pipe(map$1((category) => new ScCategory(category)), tap((category) => {
|
|
3270
3313
|
if (categoryIdOrSlug) {
|
|
3271
3314
|
this.categoryIdOrSlugMap.set(typeof categoryIdOrSlug === 'string' ? category.id : category.slug, categoryIdOrSlug);
|
|
3272
3315
|
}
|
|
@@ -3276,7 +3319,7 @@ class ScCatalogService {
|
|
|
3276
3319
|
* Возвращает {@link Observable} корневых категорий с настройками отображения, чтобы реагировать на изменения.
|
|
3277
3320
|
*/
|
|
3278
3321
|
getFilteredRootCategories$() {
|
|
3279
|
-
return this.uiService.getHiddenCategoriesList$().pipe(switchMap((filters) => this.getRootCategories$().pipe(filter(tuiIsPresent), map((data) => data.filter((category) => category.id && !filters.includes(category.id))))));
|
|
3322
|
+
return this.uiService.getHiddenCategoriesList$().pipe(switchMap((filters) => this.getRootCategories$().pipe(filter(tuiIsPresent), map$1((data) => data.filter((category) => category.id && !filters.includes(category.id))))));
|
|
3280
3323
|
}
|
|
3281
3324
|
/**
|
|
3282
3325
|
* Возвращает {@link Observable} содержимого виртуальной категории.
|
|
@@ -3286,7 +3329,7 @@ class ScCatalogService {
|
|
|
3286
3329
|
getVirtualCategoryCached$(slug) {
|
|
3287
3330
|
let cachedItem = this.virtualCategoryMap.get(slug);
|
|
3288
3331
|
if (!cachedItem) {
|
|
3289
|
-
cachedItem = new ScCachedItem(this.cacheLifeTime.categoryData, this.http.get(`${this.urls.apiUrl}/catalog/v-categories/${slug}`).pipe(map((category) => new ScVirtualCategory(category))), null);
|
|
3332
|
+
cachedItem = new ScCachedItem(this.cacheLifeTime.categoryData, this.http.get(`${this.urls.apiUrl}/catalog/v-categories/${slug}`).pipe(map$1((category) => new ScVirtualCategory(category))), null);
|
|
3290
3333
|
this.virtualCategoryMap.set(slug, cachedItem);
|
|
3291
3334
|
}
|
|
3292
3335
|
if (!cachedItem.cachedDataIsActual()) {
|
|
@@ -3324,7 +3367,7 @@ class ScCatalogService {
|
|
|
3324
3367
|
* Создает запрос получения корневых категорий.
|
|
3325
3368
|
*/
|
|
3326
3369
|
getRootCategories$() {
|
|
3327
|
-
return this.getNullCategory$().pipe(map((nullCategory) => nullCategory?.categories ?? null));
|
|
3370
|
+
return this.getNullCategory$().pipe(map$1((nullCategory) => nullCategory?.categories ?? null));
|
|
3328
3371
|
}
|
|
3329
3372
|
/**
|
|
3330
3373
|
* Раскрывает каталог до указанной категории.
|
|
@@ -3337,7 +3380,7 @@ class ScCatalogService {
|
|
|
3337
3380
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition,sonarjs/different-types-comparison
|
|
3338
3381
|
takeWhile((parentCategory) => parentCategory.parentCategory !== undefined, true), toArray(),
|
|
3339
3382
|
// eslint-disable-next-line sonarjs/no-misleading-array-reverse
|
|
3340
|
-
map((categories) => categories.reverse()));
|
|
3383
|
+
map$1((categories) => categories.reverse()));
|
|
3341
3384
|
}
|
|
3342
3385
|
/**
|
|
3343
3386
|
* Возвращает {@link Observable} получения истории изменения цен на продукт для клиента.
|
|
@@ -3352,7 +3395,7 @@ class ScCatalogService {
|
|
|
3352
3395
|
.get(`${this.urls.apiUrl}/catalog/products/${product.id}/price-history`, {
|
|
3353
3396
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3354
3397
|
})
|
|
3355
|
-
.pipe(catchError(() => of({}))), null);
|
|
3398
|
+
.pipe(catchError$1(() => of({}))), null);
|
|
3356
3399
|
this.productHistoryMap.set(product.id.toString(), cachedItem);
|
|
3357
3400
|
}
|
|
3358
3401
|
return cachedItem.item$;
|
|
@@ -3366,7 +3409,7 @@ class ScCatalogService {
|
|
|
3366
3409
|
})
|
|
3367
3410
|
.pipe(
|
|
3368
3411
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
3369
|
-
map((data) => {
|
|
3412
|
+
map$1((data) => {
|
|
3370
3413
|
if ('meta' in data) {
|
|
3371
3414
|
const cloneData = structuredClone(data);
|
|
3372
3415
|
cloneData.data = cloneData.data.map((item) => new ScProduct(item));
|
|
@@ -3405,7 +3448,7 @@ class ScCatalogService {
|
|
|
3405
3448
|
* @param productIdOrSlug Идентификатор или slug товара/услуги.
|
|
3406
3449
|
*/
|
|
3407
3450
|
getProductData$(productIdOrSlug) {
|
|
3408
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}`).pipe(map((productDTO) => new ScProduct(productDTO)), tap((product) => {
|
|
3451
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}`).pipe(map$1((productDTO) => new ScProduct(productDTO)), tap((product) => {
|
|
3409
3452
|
if (productIdOrSlug) {
|
|
3410
3453
|
this.productIdOrSlugMap.set(typeof productIdOrSlug === 'string' ? product.id : product.slug, productIdOrSlug);
|
|
3411
3454
|
}
|
|
@@ -3438,7 +3481,7 @@ class ScCatalogService {
|
|
|
3438
3481
|
format: Object.keys(ScMimeTypes)[Object.values(ScMimeTypes).indexOf(type)],
|
|
3439
3482
|
category_id: categoryId ?? null,
|
|
3440
3483
|
}, { nonNullable: true });
|
|
3441
|
-
return this.http.get(`${this.urls.apiUrl}/catalog/download`, { responseType: 'blob', params: params }).pipe(map((blob) => new Blob([blob], { type: type })), tap(() => {
|
|
3484
|
+
return this.http.get(`${this.urls.apiUrl}/catalog/download`, { responseType: 'blob', params: params }).pipe(map$1((blob) => new Blob([blob], { type: type })), tap(() => {
|
|
3442
3485
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
3443
3486
|
target: ScUserMetrikaGoalsEnum.catalogPriceDownload,
|
|
3444
3487
|
params: {
|
|
@@ -3507,7 +3550,7 @@ class ScFavoriteService {
|
|
|
3507
3550
|
getFavoriteCategories$() {
|
|
3508
3551
|
return this.http
|
|
3509
3552
|
.get(`${this.urls.apiUrl}/favorites/categories`)
|
|
3510
|
-
.pipe(map((categoriesDTO) => categoriesDTO.map((categoryDTO) => new ScCategory(categoryDTO))));
|
|
3553
|
+
.pipe(map$1((categoriesDTO) => categoriesDTO.map((categoryDTO) => new ScCategory(categoryDTO))));
|
|
3511
3554
|
}
|
|
3512
3555
|
/**
|
|
3513
3556
|
* Запрос добавления указанной категории в избранное.
|
|
@@ -3609,8 +3652,8 @@ class ScRecommendationService {
|
|
|
3609
3652
|
.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/recommendations`, {
|
|
3610
3653
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3611
3654
|
})
|
|
3612
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3613
|
-
.pipe(startWith(null)), null);
|
|
3655
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3656
|
+
.pipe(startWith$1(null)), null);
|
|
3614
3657
|
this.productsByCategoryMap.set(categoryIdOrSlug.toString(), cachedItem);
|
|
3615
3658
|
}
|
|
3616
3659
|
return cachedItem.item$;
|
|
@@ -3628,8 +3671,8 @@ class ScRecommendationService {
|
|
|
3628
3671
|
.get(`${this.urls.apiUrl}/catalog/products/${productIdOrSlug}/recommendations`, {
|
|
3629
3672
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3630
3673
|
})
|
|
3631
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3632
|
-
.pipe(startWith(null)), null);
|
|
3674
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))))
|
|
3675
|
+
.pipe(startWith$1(null)), null);
|
|
3633
3676
|
this.productsByProductMap.set(productIdOrSlug.toString(), cachedItem);
|
|
3634
3677
|
}
|
|
3635
3678
|
return cachedItem.item$;
|
|
@@ -3645,16 +3688,16 @@ class ScRecommendationService {
|
|
|
3645
3688
|
params: this.convertersService.toHttpParams({ products: productIds }, { nonNullable: true }),
|
|
3646
3689
|
context: SC_IS_HIDDEN_ERROR_ALERT_HTTP_CONTEXT,
|
|
3647
3690
|
})
|
|
3648
|
-
.pipe(catchError(() => of([])), map((productsDTO) => productsDTO.map((product) => new ScProduct(product))));
|
|
3691
|
+
.pipe(catchError$1(() => of([])), map$1((productsDTO) => productsDTO.map((product) => new ScProduct(product))));
|
|
3649
3692
|
}
|
|
3650
3693
|
/**
|
|
3651
3694
|
* Создает запрос на получение списка рекомендованных товаров для корзины клиента.
|
|
3652
3695
|
*/
|
|
3653
3696
|
getProductsByCart$() {
|
|
3654
|
-
return this.cartService.get$().pipe(map((cart) => (cart !== loadingPlaceholder && 'items' in cart ? cart.items.map((item) => item.product.id) : [])),
|
|
3697
|
+
return this.cartService.get$().pipe(map$1((cart) => (cart !== loadingPlaceholder && 'items' in cart ? cart.items.map((item) => item.product.id) : [])),
|
|
3655
3698
|
// Отфильтровываем повторения. Они возникнут если было изменено количество товара без удаления\добавления новых товаров.
|
|
3656
3699
|
// eslint-disable-next-line sonarjs/no-misleading-array-reverse
|
|
3657
|
-
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))));
|
|
3700
|
+
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))));
|
|
3658
3701
|
}
|
|
3659
3702
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScRecommendationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3660
3703
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScRecommendationService, providedIn: 'root' }); }
|
|
@@ -3875,7 +3918,7 @@ class ScConfiguratorService {
|
|
|
3875
3918
|
}
|
|
3876
3919
|
return this.http.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/configurators/${editor}/settings`).pipe(
|
|
3877
3920
|
// eslint-disable-next-line security/detect-object-injection
|
|
3878
|
-
map((settings) => (this.configuratorSettings && editor in this.configuratorSettings ? new this.configuratorSettings[editor](settings) : settings)), tap((settings) => {
|
|
3921
|
+
map$1((settings) => (this.configuratorSettings && editor in this.configuratorSettings ? new this.configuratorSettings[editor](settings) : settings)), tap((settings) => {
|
|
3879
3922
|
if (category) {
|
|
3880
3923
|
category.configuratorSettings = settings;
|
|
3881
3924
|
}
|
|
@@ -3891,7 +3934,7 @@ class ScConfiguratorService {
|
|
|
3891
3934
|
getProduct$(categoryIdOrSlug, editor, params) {
|
|
3892
3935
|
return this.http
|
|
3893
3936
|
.get(`${this.urls.apiUrl}/catalog/categories/${categoryIdOrSlug}/configurators/${editor}/product`, { params: params })
|
|
3894
|
-
.pipe(map((productDTO) => new ScProduct(productDTO)));
|
|
3937
|
+
.pipe(map$1((productDTO) => new ScProduct(productDTO)));
|
|
3895
3938
|
}
|
|
3896
3939
|
/**
|
|
3897
3940
|
* Создаёт пользовательский шаблон конфигуратора.
|
|
@@ -4308,7 +4351,7 @@ const SC_CATEGORY_INFO = new InjectionToken('A stream with current category info
|
|
|
4308
4351
|
* @param catalogService Сервис для работы с каталогом.
|
|
4309
4352
|
*/
|
|
4310
4353
|
function categoryFactory(router, route, catalogService) {
|
|
4311
|
-
return router.events.pipe(filter((event) => event instanceof NavigationEnd)).pipe(startWith(null), switchMap(() => {
|
|
4354
|
+
return router.events.pipe(filter((event) => event instanceof NavigationEnd)).pipe(startWith$1(null), switchMap(() => {
|
|
4312
4355
|
const categoryIdOrSlug = scGetCurrentRoute(route).snapshot.paramMap.get('categoryIdOrSlug');
|
|
4313
4356
|
if (categoryIdOrSlug) {
|
|
4314
4357
|
return catalogService.getCategoryCached$(categoryIdOrSlug);
|
|
@@ -4377,7 +4420,7 @@ class ScSearchService {
|
|
|
4377
4420
|
term: term,
|
|
4378
4421
|
},
|
|
4379
4422
|
});
|
|
4380
|
-
}), map((categories) => categories.map((item) => new ScCategory(item))));
|
|
4423
|
+
}), map$1((categories) => categories.map((item) => new ScCategory(item))));
|
|
4381
4424
|
}
|
|
4382
4425
|
/**
|
|
4383
4426
|
* Выполняет полный поиск по всему прайс-листу.
|
|
@@ -4463,7 +4506,7 @@ const SC_MAX_LENGTH_SEARCH_TERM = new InjectionToken('SC_MAX_LENGTH_SEARCH_TERM'
|
|
|
4463
4506
|
function searchTermFactory(searchService, minLengthSearchTerm, maxLengthSearchTerm) {
|
|
4464
4507
|
return searchService
|
|
4465
4508
|
.getSearchTermChange$()
|
|
4466
|
-
.pipe(map((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4509
|
+
.pipe(map$1((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4467
4510
|
}
|
|
4468
4511
|
/**
|
|
4469
4512
|
* Провайдеры данных о поиске введенного терма.
|
|
@@ -4490,7 +4533,7 @@ const SC_VIRTUAL_CATEGORY_INFO = new InjectionToken('A stream with current virtu
|
|
|
4490
4533
|
* @param catalogService Сервис для работы с каталогом.
|
|
4491
4534
|
*/
|
|
4492
4535
|
function virtualCategoryFactory({ paramMap }, catalogService) {
|
|
4493
|
-
return paramMap.pipe(map((params) => params.get('categorySlug')), filter(tuiIsPresent), switchMap((categorySlug) => catalogService.getVirtualCategoryCached$(categorySlug).pipe(shareReplay())), takeUntilDestroyed());
|
|
4536
|
+
return paramMap.pipe(map$1((params) => params.get('categorySlug')), filter(tuiIsPresent), switchMap((categorySlug) => catalogService.getVirtualCategoryCached$(categorySlug).pipe(shareReplay())), takeUntilDestroyed());
|
|
4494
4537
|
}
|
|
4495
4538
|
/**
|
|
4496
4539
|
* Провайдеры потока данных о виртуальной категории.
|
|
@@ -4546,17 +4589,17 @@ class ScUTMService {
|
|
|
4546
4589
|
/**
|
|
4547
4590
|
* {@link Observable} UTM-метка страницы.
|
|
4548
4591
|
*/
|
|
4549
|
-
this.utm$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utm'), toValue(), startWith(this.getUTMParams()), map((utmString) => (utmString === null ? utmString : JSON.parse(utmString))));
|
|
4592
|
+
this.utm$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utm'), toValue(), startWith$1(this.getUTMParams()), map$1((utmString) => (utmString === null ? utmString : JSON.parse(utmString))));
|
|
4550
4593
|
/**
|
|
4551
4594
|
* {@link Observable} timestamp сохранения UTM в {@link Storage}.
|
|
4552
4595
|
*/
|
|
4553
|
-
this.utmTimestamp$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utmTimestamp'), toValue(), startWith(this.getUTMTimestamp()), map((timestamp) => (isString(timestamp) ? Number(timestamp) : timestamp)));
|
|
4596
|
+
this.utmTimestamp$ = inject(WA_STORAGE_EVENT).pipe(filterByKey('utmTimestamp'), toValue(), startWith$1(this.getUTMTimestamp()), map$1((timestamp) => (isString(timestamp) ? Number(timestamp) : timestamp)));
|
|
4554
4597
|
/**
|
|
4555
4598
|
* {@link Observable} UTM-метки страницы из параметров роутинга.
|
|
4556
4599
|
*/
|
|
4557
|
-
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),
|
|
4600
|
+
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),
|
|
4558
4601
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4559
|
-
filter((params) => params['utm_source'] && params['utm_medium'] && params['utm_campaign']), map((params) => {
|
|
4602
|
+
filter((params) => params['utm_source'] && params['utm_medium'] && params['utm_campaign']), map$1((params) => {
|
|
4560
4603
|
return {
|
|
4561
4604
|
source: params.utm_source,
|
|
4562
4605
|
medium: params.utm_medium,
|
|
@@ -4612,7 +4655,7 @@ class ScUTMService {
|
|
|
4612
4655
|
return combineLatest({
|
|
4613
4656
|
utm: this.utm$,
|
|
4614
4657
|
timestamp: this.utmTimestamp$,
|
|
4615
|
-
}).pipe(map(({ utm, timestamp }) => (!this.utmLifeTime || (timestamp && timestamp + this.utmLifeTime > Date.now()) ? utm : null)));
|
|
4658
|
+
}).pipe(map$1(({ utm, timestamp }) => (!this.utmLifeTime || (timestamp && timestamp + this.utmLifeTime > Date.now()) ? utm : null)));
|
|
4616
4659
|
}
|
|
4617
4660
|
/**
|
|
4618
4661
|
* Возвращает {@link Observable} сохранения {@link ScUTM}.
|
|
@@ -4687,7 +4730,7 @@ class ScFeedbackService {
|
|
|
4687
4730
|
* @param feedbackMessage Объект сообщения обратной связи.
|
|
4688
4731
|
*/
|
|
4689
4732
|
sendFeedback(formSlug, feedbackMessage) {
|
|
4690
|
-
return this.utmService.getUTM$().pipe(first(), map((utm) => (utm ? { ...feedbackMessage, utm } : feedbackMessage)), switchMap((data) => this.http.post(`${this.feedbackApi.apiUrl}/feedback/${formSlug}`, data, {
|
|
4733
|
+
return this.utmService.getUTM$().pipe(first(), map$1((utm) => (utm ? { ...feedbackMessage, utm } : feedbackMessage)), switchMap((data) => this.http.post(`${this.feedbackApi.apiUrl}/feedback/${formSlug}`, data, {
|
|
4691
4734
|
context: new HttpContext().set(SC_AUTH_ADD_HEADER_REQUIRED, false).set(SC_IS_HEADER_REQUIRED, false),
|
|
4692
4735
|
headers: {
|
|
4693
4736
|
[this.feedbackApi.authTokenName]: this.feedbackApi.authToken,
|
|
@@ -4741,19 +4784,19 @@ class ScRequisitesService {
|
|
|
4741
4784
|
/**
|
|
4742
4785
|
* Создаёт запрос получения списка контактов для решения возникающих вопросов.
|
|
4743
4786
|
*/
|
|
4744
|
-
this.personal$ = this.contacts$.pipe(map((contacts) => contacts.personal));
|
|
4787
|
+
this.personal$ = this.contacts$.pipe(map$1((contacts) => contacts.personal));
|
|
4745
4788
|
/**
|
|
4746
4789
|
* Создаёт запрос получения списка контактов розничных магазинов.
|
|
4747
4790
|
*/
|
|
4748
|
-
this.retail$ = this.contacts$.pipe(map((contacts) => contacts.retail), first(), shareReplay(1));
|
|
4791
|
+
this.retail$ = this.contacts$.pipe(map$1((contacts) => contacts.retail), first(), shareReplay(1));
|
|
4749
4792
|
/**
|
|
4750
4793
|
* Создаёт запрос получения списка ссылок на социальные сети и другие каналы коммуникации.
|
|
4751
4794
|
*/
|
|
4752
|
-
this.socialMedia$ = this.contacts$.pipe(map((contacts) => contacts.socialMedia), first(), shareReplay(1));
|
|
4795
|
+
this.socialMedia$ = this.contacts$.pipe(map$1((contacts) => contacts.socialMedia), first(), shareReplay(1));
|
|
4753
4796
|
/**
|
|
4754
4797
|
* Создаёт запрос получения списка контактов менеджеров по направлениям продаж.
|
|
4755
4798
|
*/
|
|
4756
|
-
this.directions$ = this.contacts$.pipe(map((contacts) => contacts.directions), tap((directions) => {
|
|
4799
|
+
this.directions$ = this.contacts$.pipe(map$1((contacts) => contacts.directions), tap((directions) => {
|
|
4757
4800
|
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
4758
4801
|
for (const key in directions) {
|
|
4759
4802
|
directions[Number.parseFloat(key)]?.forEach((manager) => {
|
|
@@ -4885,7 +4928,7 @@ class ScContragentService {
|
|
|
4885
4928
|
/**
|
|
4886
4929
|
* {@link Observable} данных о контрагентах пользователя.
|
|
4887
4930
|
*/
|
|
4888
|
-
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));
|
|
4931
|
+
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));
|
|
4889
4932
|
this.user$.pipe(filter((user) => user.isGuest)).subscribe(() => {
|
|
4890
4933
|
this.contactsService.contragentContactsMap.clear();
|
|
4891
4934
|
this.contragentBankAccountsMap.clear();
|
|
@@ -4930,7 +4973,7 @@ class ScContragentService {
|
|
|
4930
4973
|
let cachedItem = this.contactsService.contragentContactsMap.get(contragentId);
|
|
4931
4974
|
if (!cachedItem) {
|
|
4932
4975
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update() в будущем.
|
|
4933
|
-
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/contacts`).pipe(startWith(null)), null);
|
|
4976
|
+
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/contacts`).pipe(startWith$1(null)), null);
|
|
4934
4977
|
this.contactsService.contragentContactsMap.set(contragentId, cachedItem);
|
|
4935
4978
|
}
|
|
4936
4979
|
return cachedItem.item$;
|
|
@@ -4963,7 +5006,7 @@ class ScContragentService {
|
|
|
4963
5006
|
let cachedItem = this.contragentBankAccountsMap.get(contragentId);
|
|
4964
5007
|
if (!cachedItem) {
|
|
4965
5008
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
4966
|
-
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/bank-accounts`).pipe(startWith(null)), null);
|
|
5009
|
+
cachedItem = new ScCachedItem(0, this.http.get(`${this.urls.apiUrl}/user/contragents/${contragentId}/bank-accounts`).pipe(startWith$1(null)), null);
|
|
4967
5010
|
this.contragentBankAccountsMap.set(contragentId, cachedItem);
|
|
4968
5011
|
}
|
|
4969
5012
|
return cachedItem.item$;
|
|
@@ -5033,7 +5076,7 @@ class ScDeliveryAddressService {
|
|
|
5033
5076
|
/**
|
|
5034
5077
|
* {@link Observable} данных адресов доставки.
|
|
5035
5078
|
*/
|
|
5036
|
-
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));
|
|
5079
|
+
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));
|
|
5037
5080
|
}
|
|
5038
5081
|
/**
|
|
5039
5082
|
* Создаёт запрос создания нового адреса доставки.
|
|
@@ -5077,7 +5120,7 @@ class ScDeliveryAddressService {
|
|
|
5077
5120
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
5078
5121
|
cachedItem = new ScCachedItem(0, this.http
|
|
5079
5122
|
.get(`${this.urls.apiUrl}/user/delivery-addresses/${addressId}/contacts`)
|
|
5080
|
-
.pipe(startWith(null)), null);
|
|
5123
|
+
.pipe(startWith$1(null)), null);
|
|
5081
5124
|
this.contactsService.deliveryAddressContactsMap.set(addressId, cachedItem);
|
|
5082
5125
|
}
|
|
5083
5126
|
return cachedItem.item$;
|
|
@@ -5337,7 +5380,7 @@ class ScAuthAsClientGuard {
|
|
|
5337
5380
|
canActivate(route) {
|
|
5338
5381
|
const expiredAt = new Date();
|
|
5339
5382
|
expiredAt.setMinutes(new Date().getMinutes() + this.options.expiredAtMinute);
|
|
5340
|
-
return this.authService.getAuthChange().pipe(
|
|
5383
|
+
return this.authService.getAuthChange().pipe(take(1), defaultIfEmpty(false),
|
|
5341
5384
|
// Если пользователь авторизирован, то завершаем сеанс.
|
|
5342
5385
|
concatMap((state) => (state ? this.authService.getSignOut$(false) : of(null))),
|
|
5343
5386
|
// Обновляем полученные ключи, чтобы они перестали действовать. getRefreshTokenObservable() запишет новые ключи в систему, после чего проложение само запросит нового пользователя.
|
|
@@ -5350,7 +5393,7 @@ class ScAuthAsClientGuard {
|
|
|
5350
5393
|
token: route.paramMap.get('rtoken') ?? '',
|
|
5351
5394
|
expiredAt: expiredAt,
|
|
5352
5395
|
},
|
|
5353
|
-
})),
|
|
5396
|
+
})), take(1), defaultIfEmpty(null), map$1(() => this.router.createUrlTree(this.options.urlTree)));
|
|
5354
5397
|
}
|
|
5355
5398
|
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 }); }
|
|
5356
5399
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAuthAsClientGuard }); }
|
|
@@ -5379,14 +5422,14 @@ const ScIdOrSlugGuard = (route) => {
|
|
|
5379
5422
|
.getCategoryCached$(categoryIdOrSlug)
|
|
5380
5423
|
.pipe(filter(tuiIsPresent),
|
|
5381
5424
|
// eslint-disable-next-line security/detect-object-injection
|
|
5382
|
-
map((category) => router.createUrlTree(['/catalog', category[idOrSlug]])), catchError(() => of(TUI_TRUE_HANDLER())));
|
|
5425
|
+
map$1((category) => router.createUrlTree(['/catalog', category[idOrSlug]])), catchError$1(() => of(TUI_TRUE_HANDLER())));
|
|
5383
5426
|
}
|
|
5384
5427
|
if (productIdOrSlug && /^\d+$/.test(productIdOrSlug) !== (idOrSlug === 'id')) {
|
|
5385
5428
|
return inject(ScCatalogService)
|
|
5386
5429
|
.getProductData$(productIdOrSlug)
|
|
5387
5430
|
.pipe(filter(tuiIsPresent),
|
|
5388
5431
|
// eslint-disable-next-line security/detect-object-injection
|
|
5389
|
-
map((product) => router.createUrlTree(['/catalog', 'product', product[idOrSlug]])), catchError(() => of(TUI_TRUE_HANDLER())));
|
|
5432
|
+
map$1((product) => router.createUrlTree(['/catalog', 'product', product[idOrSlug]])), catchError$1(() => of(TUI_TRUE_HANDLER())));
|
|
5390
5433
|
}
|
|
5391
5434
|
return true;
|
|
5392
5435
|
};
|
|
@@ -5523,14 +5566,14 @@ class ScConvertInterceptor {
|
|
|
5523
5566
|
if (request.responseType !== 'json' || !request.url.includes(this.urls.apiUrl)) {
|
|
5524
5567
|
return next.handle(request);
|
|
5525
5568
|
}
|
|
5526
|
-
return next.handle(request.clone({ params: this.httpParamsToSnake(request.params), body: objectToSnake(request.body) })).pipe(map((event) => {
|
|
5569
|
+
return next.handle(request.clone({ params: this.httpParamsToSnake(request.params), body: objectToSnake(request.body) })).pipe(map$1((event) => {
|
|
5527
5570
|
if (event instanceof HttpResponse) {
|
|
5528
5571
|
return event.clone({
|
|
5529
5572
|
body: objectToCamel(event.body),
|
|
5530
5573
|
});
|
|
5531
5574
|
}
|
|
5532
5575
|
return event;
|
|
5533
|
-
}), catchError((error) => throwError(() => new HttpErrorResponse({
|
|
5576
|
+
}), catchError$1((error) => throwError(() => new HttpErrorResponse({
|
|
5534
5577
|
error: objectToCamel(error.error),
|
|
5535
5578
|
headers: error.headers,
|
|
5536
5579
|
status: error.status,
|
|
@@ -5585,7 +5628,7 @@ class ScErrorsInterceptor {
|
|
|
5585
5628
|
/** @inheritDoc */
|
|
5586
5629
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5587
5630
|
intercept(request, next) {
|
|
5588
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5631
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5589
5632
|
// TODO: TASK[#4511]: Обработка и вывод ошибок работы с API.
|
|
5590
5633
|
// eslint-disable-next-line sonarjs/no-small-switch
|
|
5591
5634
|
switch (error.status) {
|
|
@@ -5622,7 +5665,7 @@ class ScErrorsInterceptor {
|
|
|
5622
5665
|
return this.authService.getRefreshToken$().pipe(switchMap(() => {
|
|
5623
5666
|
this.isTokenRefreshing$.next(false);
|
|
5624
5667
|
return next.handle(request.clone(this.tokenService.addAuthHeader(request)));
|
|
5625
|
-
}), catchError((error) => {
|
|
5668
|
+
}), catchError$1((error) => {
|
|
5626
5669
|
if (error.status === 401) {
|
|
5627
5670
|
this.tokenService.removeAuthToken();
|
|
5628
5671
|
return of();
|
|
@@ -5728,7 +5771,7 @@ class ScDateFormatInterceptor {
|
|
|
5728
5771
|
}
|
|
5729
5772
|
/** @inheritDoc */
|
|
5730
5773
|
intercept(request, next) {
|
|
5731
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5774
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5732
5775
|
const errorData = error.error;
|
|
5733
5776
|
this.formatDatesInErrors(errorData);
|
|
5734
5777
|
return throwError(() => error);
|
|
@@ -6119,7 +6162,7 @@ class ScNewsService {
|
|
|
6119
6162
|
* @param newsId Идентификатор новости.
|
|
6120
6163
|
*/
|
|
6121
6164
|
getNews$(newsId) {
|
|
6122
|
-
return this.http.get(`${this.urls.apiUrl}/news/${newsId}`).pipe(map((category) => new ScNews(category)));
|
|
6165
|
+
return this.http.get(`${this.urls.apiUrl}/news/${newsId}`).pipe(map$1((category) => new ScNews(category)));
|
|
6123
6166
|
}
|
|
6124
6167
|
/**
|
|
6125
6168
|
* Возвращает {@link Observable} получения списка последних новостей.
|
|
@@ -6698,7 +6741,7 @@ class ScOrderDraftsService {
|
|
|
6698
6741
|
* @param params Параметры запроса получения списка.
|
|
6699
6742
|
*/
|
|
6700
6743
|
getList$(params) {
|
|
6701
|
-
return this.http.get(`${this.urls.apiUrl}/orders/offers`, { params: params }).pipe(map((offersPaginateDTO) => {
|
|
6744
|
+
return this.http.get(`${this.urls.apiUrl}/orders/offers`, { params: params }).pipe(map$1((offersPaginateDTO) => {
|
|
6702
6745
|
offersPaginateDTO.data = offersPaginateDTO.data.map((item) => new ScOrderDraftShort(item));
|
|
6703
6746
|
return offersPaginateDTO;
|
|
6704
6747
|
}));
|
|
@@ -6709,7 +6752,7 @@ class ScOrderDraftsService {
|
|
|
6709
6752
|
* @param data Данные для создания.
|
|
6710
6753
|
*/
|
|
6711
6754
|
create$(data) {
|
|
6712
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers`, data).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6755
|
+
return this.http.post(`${this.urls.apiUrl}/orders/offers`, data).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6713
6756
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6714
6757
|
target: ScUserMetrikaGoalsEnum.orderDraftCreated,
|
|
6715
6758
|
params: { offer_id: offer.id },
|
|
@@ -6727,7 +6770,7 @@ class ScOrderDraftsService {
|
|
|
6727
6770
|
get$(draftId, cacheable = true) {
|
|
6728
6771
|
let cachedItem = this.offerMap.get(draftId);
|
|
6729
6772
|
if (!cachedItem) {
|
|
6730
|
-
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/offers/${draftId}`).pipe(map((data) => new ScOrderDraft(data))), loadingPlaceholder);
|
|
6773
|
+
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/offers/${draftId}`).pipe(map$1((data) => new ScOrderDraft(data))), loadingPlaceholder);
|
|
6731
6774
|
if (cacheable) {
|
|
6732
6775
|
this.offerMap.set(draftId, cachedItem);
|
|
6733
6776
|
}
|
|
@@ -6743,7 +6786,7 @@ class ScOrderDraftsService {
|
|
|
6743
6786
|
* @param id Идентификатор коммерческого предложения/черновика.
|
|
6744
6787
|
*/
|
|
6745
6788
|
getItems$(id) {
|
|
6746
|
-
return this.get$(id).pipe(map((draft) => (draft === loadingPlaceholder ? loadingPlaceholder : draft.products)));
|
|
6789
|
+
return this.get$(id).pipe(map$1((draft) => (draft === loadingPlaceholder ? loadingPlaceholder : draft.products)));
|
|
6747
6790
|
}
|
|
6748
6791
|
/**
|
|
6749
6792
|
* Обновляет данные коммерческого предложения/черновика.
|
|
@@ -6753,7 +6796,7 @@ class ScOrderDraftsService {
|
|
|
6753
6796
|
*/
|
|
6754
6797
|
update$(draftId, patch) {
|
|
6755
6798
|
const cachedItem = this.offerMap.get(draftId);
|
|
6756
|
-
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${draftId}`, patch).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6799
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${draftId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6757
6800
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6758
6801
|
target: ScUserMetrikaGoalsEnum.orderDraftUpdated,
|
|
6759
6802
|
params: { offer_id: draftId },
|
|
@@ -6782,7 +6825,7 @@ class ScOrderDraftsService {
|
|
|
6782
6825
|
* @param data Данные заказа.
|
|
6783
6826
|
*/
|
|
6784
6827
|
createOrder$(offerId, data) {
|
|
6785
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/create-order`, data).pipe(map((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6828
|
+
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) => {
|
|
6786
6829
|
orders.forEach((order) => {
|
|
6787
6830
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6788
6831
|
target: ScUserMetrikaGoalsEnum.orderCreatedFromDraft,
|
|
@@ -6799,7 +6842,7 @@ class ScOrderDraftsService {
|
|
|
6799
6842
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6800
6843
|
*/
|
|
6801
6844
|
addProduct$(productData, offerId) {
|
|
6802
|
-
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/products`, productData).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6845
|
+
return this.http.post(`${this.urls.apiUrl}/orders/offers/${offerId}/products`, productData).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6803
6846
|
if (this.offerMap.has(offerId)) {
|
|
6804
6847
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6805
6848
|
}
|
|
@@ -6813,7 +6856,7 @@ class ScOrderDraftsService {
|
|
|
6813
6856
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6814
6857
|
*/
|
|
6815
6858
|
updateProduct$(productId, patch, offerId) {
|
|
6816
|
-
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${productId}`, patch).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6859
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${productId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6817
6860
|
if (this.offerMap.has(offerId)) {
|
|
6818
6861
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6819
6862
|
}
|
|
@@ -6826,7 +6869,7 @@ class ScOrderDraftsService {
|
|
|
6826
6869
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6827
6870
|
*/
|
|
6828
6871
|
deleteProduct$(item, offerId) {
|
|
6829
|
-
return this.http.delete(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${item.id}`).pipe(map((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6872
|
+
return this.http.delete(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${item.id}`).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6830
6873
|
if (this.offerMap.has(offerId)) {
|
|
6831
6874
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6832
6875
|
}
|
|
@@ -6898,7 +6941,7 @@ class ScOrdersService {
|
|
|
6898
6941
|
* @param newOrder Данные нового заказа.
|
|
6899
6942
|
*/
|
|
6900
6943
|
createOrder$(directionId, newOrder) {
|
|
6901
|
-
return this.http.post(`${this.urls.apiUrl}/orders/${directionId}`, newOrder).pipe(map((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6944
|
+
return this.http.post(`${this.urls.apiUrl}/orders/${directionId}`, newOrder).pipe(map$1((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6902
6945
|
orders.forEach((order) => {
|
|
6903
6946
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6904
6947
|
target: ScUserMetrikaGoalsEnum.orderCreated,
|
|
@@ -6931,7 +6974,7 @@ class ScOrdersService {
|
|
|
6931
6974
|
* @param params Параметры запроса получения заказов.
|
|
6932
6975
|
*/
|
|
6933
6976
|
getOrders$(params) {
|
|
6934
|
-
return this.http.get(`${this.urls.apiUrl}/orders`, { params: params }).pipe(map((ordersPaginateDTO) => {
|
|
6977
|
+
return this.http.get(`${this.urls.apiUrl}/orders`, { params: params }).pipe(map$1((ordersPaginateDTO) => {
|
|
6935
6978
|
ordersPaginateDTO.data = ordersPaginateDTO.data.map((item) => new ScOrderShort(item));
|
|
6936
6979
|
return ordersPaginateDTO;
|
|
6937
6980
|
}));
|
|
@@ -6945,7 +6988,7 @@ class ScOrdersService {
|
|
|
6945
6988
|
get$(orderId, cacheable = true) {
|
|
6946
6989
|
let cachedItem = this.orderMap.get(orderId);
|
|
6947
6990
|
if (!cachedItem) {
|
|
6948
|
-
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/${orderId}`).pipe(map((data) => new ScOrder(data))), loadingPlaceholder);
|
|
6991
|
+
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/${orderId}`).pipe(map$1((data) => new ScOrder(data))), loadingPlaceholder);
|
|
6949
6992
|
if (cacheable) {
|
|
6950
6993
|
this.orderMap.set(orderId, cachedItem);
|
|
6951
6994
|
}
|
|
@@ -6962,7 +7005,7 @@ class ScOrdersService {
|
|
|
6962
7005
|
* @param cacheable Признак возможности получения списка элементов заказа из кэшированных данных.
|
|
6963
7006
|
*/
|
|
6964
7007
|
getItems$(id, cacheable = true) {
|
|
6965
|
-
return this.get$(id, cacheable).pipe(map((order) => (order === loadingPlaceholder ? loadingPlaceholder : order.products)));
|
|
7008
|
+
return this.get$(id, cacheable).pipe(map$1((order) => (order === loadingPlaceholder ? loadingPlaceholder : order.products)));
|
|
6966
7009
|
}
|
|
6967
7010
|
/**
|
|
6968
7011
|
* Копирует товары заказа в корзину текущего пользователя.
|
|
@@ -7007,7 +7050,7 @@ class ScOrdersService {
|
|
|
7007
7050
|
date: date,
|
|
7008
7051
|
},
|
|
7009
7052
|
})
|
|
7010
|
-
.pipe(map((ordersPaginateDTO) => {
|
|
7053
|
+
.pipe(map$1((ordersPaginateDTO) => {
|
|
7011
7054
|
const formattedDate = format(parse(date, this.dateFormats.api, new Date()), this.dateFormats.uiDate);
|
|
7012
7055
|
return new ScDeliveryCost(ordersPaginateDTO, formattedDate);
|
|
7013
7056
|
}));
|
|
@@ -7045,7 +7088,7 @@ class ScPaginationService {
|
|
|
7045
7088
|
/**
|
|
7046
7089
|
* {@link Observable} изменения статуса аутентификации.
|
|
7047
7090
|
*/
|
|
7048
|
-
this.authStatus$ = inject(SC_USER_INFO).pipe(map((user) => user.isGuest));
|
|
7091
|
+
this.authStatus$ = inject(SC_USER_INFO).pipe(map$1((user) => user.isGuest));
|
|
7049
7092
|
/**
|
|
7050
7093
|
* Сервис работы с каталогом.
|
|
7051
7094
|
*/
|
|
@@ -7057,18 +7100,18 @@ class ScPaginationService {
|
|
|
7057
7100
|
// Избегаем множественных сигналов при одновременном изменении фильтров page$ и others$.
|
|
7058
7101
|
debounceTime(0),
|
|
7059
7102
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
7060
|
-
map((page) => ({ ...params, ...page })),
|
|
7103
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7061
7104
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7062
|
-
switchMap((paginationParams) => this.authStatus$.pipe(switchMap(() => this.catalogService.getProducts$(paginationParams).pipe(startWith(null))))))), share());
|
|
7105
|
+
switchMap((paginationParams) => this.authStatus$.pipe(switchMap(() => this.catalogService.getProducts$(paginationParams).pipe(startWith$1(null))))))), share());
|
|
7063
7106
|
/**
|
|
7064
7107
|
* Объект данных пагинации с сохранением предыдущих значений для "разворачивания" списка товаров.
|
|
7065
7108
|
* Список сохраняется при переходе по страницам, до тех пор пока не будет получен сигнал `others$`.
|
|
7066
7109
|
*/
|
|
7067
|
-
this.dataAccumulated$ = this.others$.pipe(filter(tuiIsPresent), switchMap((params) => this.authStatus$.pipe(map(() => params))), switchMap((params) => this.page$.pipe(
|
|
7110
|
+
this.dataAccumulated$ = this.others$.pipe(filter(tuiIsPresent), switchMap((params) => this.authStatus$.pipe(map$1(() => params))), switchMap((params) => this.page$.pipe(
|
|
7068
7111
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
|
7069
|
-
map((page) => ({ ...params, ...page })),
|
|
7112
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7070
7113
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7071
|
-
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith(null))),
|
|
7114
|
+
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith$1(null))),
|
|
7072
7115
|
// TODO: Заменить `ScProduct` на T тип.
|
|
7073
7116
|
scan(
|
|
7074
7117
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -7080,9 +7123,9 @@ class ScPaginationService {
|
|
|
7080
7123
|
value.data.unshift(...accumulator.data);
|
|
7081
7124
|
}
|
|
7082
7125
|
return [value, value];
|
|
7083
|
-
}, [null, null]), map(([paginate]) => paginate), takeWhile((paginate) => paginate === null || paginate.meta.currentPage < paginate.meta.lastPage, true))), share());
|
|
7126
|
+
}, [null, null]), map$1(([paginate]) => paginate), takeWhile((paginate) => paginate === null || paginate.meta.currentPage < paginate.meta.lastPage, true))), share());
|
|
7084
7127
|
this.others$
|
|
7085
|
-
.pipe(filter(tuiIsPresent), switchMap(() => this.nextPageClickEvent.pipe(scan((accumulator) => accumulator + 1, 1), startWith(1))), takeUntilDestroyed())
|
|
7128
|
+
.pipe(filter(tuiIsPresent), switchMap(() => this.nextPageClickEvent.pipe(scan((accumulator) => accumulator + 1, 1), startWith$1(1))), takeUntilDestroyed())
|
|
7086
7129
|
.subscribe((page) => {
|
|
7087
7130
|
this.patchPage({ page: page });
|
|
7088
7131
|
});
|
|
@@ -7315,7 +7358,7 @@ class ScReclamationService {
|
|
|
7315
7358
|
downloadReclamation$(reclamationId) {
|
|
7316
7359
|
return this.http
|
|
7317
7360
|
.get(`${this.urls.apiUrl}/reclamations/${reclamationId}/download`, { responseType: 'blob' })
|
|
7318
|
-
.pipe(map((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7361
|
+
.pipe(map$1((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7319
7362
|
}
|
|
7320
7363
|
/**
|
|
7321
7364
|
* Отправляет новое сообщение рекламации.
|
|
@@ -8074,7 +8117,7 @@ class ScVacanciesService {
|
|
|
8074
8117
|
.get(`${this.vacanciesData.apiUrl}?employer_id=${this.vacanciesData.employerId}&per_page=${perPage}&page=${page}`, {
|
|
8075
8118
|
context: new HttpContext().set(SC_IS_HEADER_REQUIRED, false).set(SC_CACHE_SETTINGS, new ScCacheSettings(true, this.cacheLifeTime.vacanciesData)),
|
|
8076
8119
|
})
|
|
8077
|
-
.pipe(map((result) => new ScVacanciesList(result)));
|
|
8120
|
+
.pipe(map$1((result) => new ScVacanciesList(result)));
|
|
8078
8121
|
}
|
|
8079
8122
|
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 }); }
|
|
8080
8123
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScVacanciesService, providedIn: 'root' }); }
|
|
@@ -8258,5 +8301,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8258
8301
|
* Generated bundle index. Do not edit.
|
|
8259
8302
|
*/
|
|
8260
8303
|
|
|
8261
|
-
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 };
|
|
8304
|
+
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 };
|
|
8262
8305
|
//# sourceMappingURL=snabcentr-client-core.mjs.map
|