@snabcentr/client-core 3.5.1 → 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/esm2022/providers/sc-category.providers.mjs +13 -7
- package/fesm2022/snabcentr-client-core.mjs +166 -116
- 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';
|
|
@@ -14,10 +15,52 @@ import { tuiIsPresent, TuiDay, tuiPure, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
|
14
15
|
import { tuiCleanObject } from '@taiga-ui/addon-doc/utils';
|
|
15
16
|
import { __decorate } from 'tslib';
|
|
16
17
|
import * as i2 from '@angular/router';
|
|
17
|
-
import {
|
|
18
|
+
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
|
* Создаёт пользовательский шаблон конфигуратора.
|
|
@@ -4295,11 +4338,18 @@ const SC_CATEGORY_INFO = new InjectionToken('A stream with current category info
|
|
|
4295
4338
|
/**
|
|
4296
4339
|
* Фабрика создания потока данных о категории.
|
|
4297
4340
|
*
|
|
4341
|
+
* @param router Сервис для работы с маршрутом.
|
|
4298
4342
|
* @param route Маршрут.
|
|
4299
4343
|
* @param catalogService Сервис для работы с каталогом.
|
|
4300
4344
|
*/
|
|
4301
|
-
function categoryFactory(route, catalogService) {
|
|
4302
|
-
return
|
|
4345
|
+
function categoryFactory(router, route, catalogService) {
|
|
4346
|
+
return router.events.pipe(filter((event) => event instanceof NavigationEnd)).pipe(startWith$1(null), switchMap(() => {
|
|
4347
|
+
const categoryIdOrSlug = scGetCurrentRoute(route).snapshot.paramMap.get('categoryIdOrSlug');
|
|
4348
|
+
if (categoryIdOrSlug) {
|
|
4349
|
+
return catalogService.getCategoryCached$(categoryIdOrSlug);
|
|
4350
|
+
}
|
|
4351
|
+
return of(null);
|
|
4352
|
+
}), shareReplay({ bufferSize: 1, refCount: true }), takeUntilDestroyed());
|
|
4303
4353
|
}
|
|
4304
4354
|
/**
|
|
4305
4355
|
* Провайдеры потока данных о категории.
|
|
@@ -4307,7 +4357,7 @@ function categoryFactory(route, catalogService) {
|
|
|
4307
4357
|
const CATEGORY_PROVIDERS = [
|
|
4308
4358
|
{
|
|
4309
4359
|
provide: SC_CATEGORY_INFO,
|
|
4310
|
-
deps: [ActivatedRoute, ScCatalogService],
|
|
4360
|
+
deps: [Router, ActivatedRoute, ScCatalogService],
|
|
4311
4361
|
useFactory: categoryFactory,
|
|
4312
4362
|
},
|
|
4313
4363
|
];
|
|
@@ -4362,7 +4412,7 @@ class ScSearchService {
|
|
|
4362
4412
|
term: term,
|
|
4363
4413
|
},
|
|
4364
4414
|
});
|
|
4365
|
-
}), map((categories) => categories.map((item) => new ScCategory(item))));
|
|
4415
|
+
}), map$1((categories) => categories.map((item) => new ScCategory(item))));
|
|
4366
4416
|
}
|
|
4367
4417
|
/**
|
|
4368
4418
|
* Выполняет полный поиск по всему прайс-листу.
|
|
@@ -4448,7 +4498,7 @@ const SC_MAX_LENGTH_SEARCH_TERM = new InjectionToken('SC_MAX_LENGTH_SEARCH_TERM'
|
|
|
4448
4498
|
function searchTermFactory(searchService, minLengthSearchTerm, maxLengthSearchTerm) {
|
|
4449
4499
|
return searchService
|
|
4450
4500
|
.getSearchTermChange$()
|
|
4451
|
-
.pipe(map((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4501
|
+
.pipe(map$1((searchTerm) => (searchTerm && searchTerm.length >= minLengthSearchTerm && searchTerm.length <= maxLengthSearchTerm ? searchTerm : '')));
|
|
4452
4502
|
}
|
|
4453
4503
|
/**
|
|
4454
4504
|
* Провайдеры данных о поиске введенного терма.
|
|
@@ -4475,7 +4525,7 @@ const SC_VIRTUAL_CATEGORY_INFO = new InjectionToken('A stream with current virtu
|
|
|
4475
4525
|
* @param catalogService Сервис для работы с каталогом.
|
|
4476
4526
|
*/
|
|
4477
4527
|
function virtualCategoryFactory({ paramMap }, catalogService) {
|
|
4478
|
-
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());
|
|
4479
4529
|
}
|
|
4480
4530
|
/**
|
|
4481
4531
|
* Провайдеры потока данных о виртуальной категории.
|
|
@@ -4531,17 +4581,17 @@ class ScUTMService {
|
|
|
4531
4581
|
/**
|
|
4532
4582
|
* {@link Observable} UTM-метка страницы.
|
|
4533
4583
|
*/
|
|
4534
|
-
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))));
|
|
4535
4585
|
/**
|
|
4536
4586
|
* {@link Observable} timestamp сохранения UTM в {@link Storage}.
|
|
4537
4587
|
*/
|
|
4538
|
-
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)));
|
|
4539
4589
|
/**
|
|
4540
4590
|
* {@link Observable} UTM-метки страницы из параметров роутинга.
|
|
4541
4591
|
*/
|
|
4542
|
-
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),
|
|
4543
4593
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4544
|
-
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) => {
|
|
4545
4595
|
return {
|
|
4546
4596
|
source: params.utm_source,
|
|
4547
4597
|
medium: params.utm_medium,
|
|
@@ -4597,7 +4647,7 @@ class ScUTMService {
|
|
|
4597
4647
|
return combineLatest({
|
|
4598
4648
|
utm: this.utm$,
|
|
4599
4649
|
timestamp: this.utmTimestamp$,
|
|
4600
|
-
}).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)));
|
|
4601
4651
|
}
|
|
4602
4652
|
/**
|
|
4603
4653
|
* Возвращает {@link Observable} сохранения {@link ScUTM}.
|
|
@@ -4672,7 +4722,7 @@ class ScFeedbackService {
|
|
|
4672
4722
|
* @param feedbackMessage Объект сообщения обратной связи.
|
|
4673
4723
|
*/
|
|
4674
4724
|
sendFeedback(formSlug, feedbackMessage) {
|
|
4675
|
-
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, {
|
|
4676
4726
|
context: new HttpContext().set(SC_AUTH_ADD_HEADER_REQUIRED, false).set(SC_IS_HEADER_REQUIRED, false),
|
|
4677
4727
|
headers: {
|
|
4678
4728
|
[this.feedbackApi.authTokenName]: this.feedbackApi.authToken,
|
|
@@ -4726,19 +4776,19 @@ class ScRequisitesService {
|
|
|
4726
4776
|
/**
|
|
4727
4777
|
* Создаёт запрос получения списка контактов для решения возникающих вопросов.
|
|
4728
4778
|
*/
|
|
4729
|
-
this.personal$ = this.contacts$.pipe(map((contacts) => contacts.personal));
|
|
4779
|
+
this.personal$ = this.contacts$.pipe(map$1((contacts) => contacts.personal));
|
|
4730
4780
|
/**
|
|
4731
4781
|
* Создаёт запрос получения списка контактов розничных магазинов.
|
|
4732
4782
|
*/
|
|
4733
|
-
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));
|
|
4734
4784
|
/**
|
|
4735
4785
|
* Создаёт запрос получения списка ссылок на социальные сети и другие каналы коммуникации.
|
|
4736
4786
|
*/
|
|
4737
|
-
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));
|
|
4738
4788
|
/**
|
|
4739
4789
|
* Создаёт запрос получения списка контактов менеджеров по направлениям продаж.
|
|
4740
4790
|
*/
|
|
4741
|
-
this.directions$ = this.contacts$.pipe(map((contacts) => contacts.directions), tap((directions) => {
|
|
4791
|
+
this.directions$ = this.contacts$.pipe(map$1((contacts) => contacts.directions), tap((directions) => {
|
|
4742
4792
|
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
4743
4793
|
for (const key in directions) {
|
|
4744
4794
|
directions[Number.parseFloat(key)]?.forEach((manager) => {
|
|
@@ -4870,7 +4920,7 @@ class ScContragentService {
|
|
|
4870
4920
|
/**
|
|
4871
4921
|
* {@link Observable} данных о контрагентах пользователя.
|
|
4872
4922
|
*/
|
|
4873
|
-
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));
|
|
4874
4924
|
this.user$.pipe(filter((user) => user.isGuest)).subscribe(() => {
|
|
4875
4925
|
this.contactsService.contragentContactsMap.clear();
|
|
4876
4926
|
this.contragentBankAccountsMap.clear();
|
|
@@ -4915,7 +4965,7 @@ class ScContragentService {
|
|
|
4915
4965
|
let cachedItem = this.contactsService.contragentContactsMap.get(contragentId);
|
|
4916
4966
|
if (!cachedItem) {
|
|
4917
4967
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update() в будущем.
|
|
4918
|
-
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);
|
|
4919
4969
|
this.contactsService.contragentContactsMap.set(contragentId, cachedItem);
|
|
4920
4970
|
}
|
|
4921
4971
|
return cachedItem.item$;
|
|
@@ -4948,7 +4998,7 @@ class ScContragentService {
|
|
|
4948
4998
|
let cachedItem = this.contragentBankAccountsMap.get(contragentId);
|
|
4949
4999
|
if (!cachedItem) {
|
|
4950
5000
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
4951
|
-
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);
|
|
4952
5002
|
this.contragentBankAccountsMap.set(contragentId, cachedItem);
|
|
4953
5003
|
}
|
|
4954
5004
|
return cachedItem.item$;
|
|
@@ -5018,7 +5068,7 @@ class ScDeliveryAddressService {
|
|
|
5018
5068
|
/**
|
|
5019
5069
|
* {@link Observable} данных адресов доставки.
|
|
5020
5070
|
*/
|
|
5021
|
-
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));
|
|
5022
5072
|
}
|
|
5023
5073
|
/**
|
|
5024
5074
|
* Создаёт запрос создания нового адреса доставки.
|
|
@@ -5062,7 +5112,7 @@ class ScDeliveryAddressService {
|
|
|
5062
5112
|
// Устанавливаем время жизни cachedItem равное, потому что нам не важно время жизни. Нам нужен функционал update().
|
|
5063
5113
|
cachedItem = new ScCachedItem(0, this.http
|
|
5064
5114
|
.get(`${this.urls.apiUrl}/user/delivery-addresses/${addressId}/contacts`)
|
|
5065
|
-
.pipe(startWith(null)), null);
|
|
5115
|
+
.pipe(startWith$1(null)), null);
|
|
5066
5116
|
this.contactsService.deliveryAddressContactsMap.set(addressId, cachedItem);
|
|
5067
5117
|
}
|
|
5068
5118
|
return cachedItem.item$;
|
|
@@ -5322,7 +5372,7 @@ class ScAuthAsClientGuard {
|
|
|
5322
5372
|
canActivate(route) {
|
|
5323
5373
|
const expiredAt = new Date();
|
|
5324
5374
|
expiredAt.setMinutes(new Date().getMinutes() + this.options.expiredAtMinute);
|
|
5325
|
-
return this.authService.getAuthChange().pipe(
|
|
5375
|
+
return this.authService.getAuthChange().pipe(take(1), defaultIfEmpty(false),
|
|
5326
5376
|
// Если пользователь авторизирован, то завершаем сеанс.
|
|
5327
5377
|
concatMap((state) => (state ? this.authService.getSignOut$(false) : of(null))),
|
|
5328
5378
|
// Обновляем полученные ключи, чтобы они перестали действовать. getRefreshTokenObservable() запишет новые ключи в систему, после чего проложение само запросит нового пользователя.
|
|
@@ -5335,7 +5385,7 @@ class ScAuthAsClientGuard {
|
|
|
5335
5385
|
token: route.paramMap.get('rtoken') ?? '',
|
|
5336
5386
|
expiredAt: expiredAt,
|
|
5337
5387
|
},
|
|
5338
|
-
})),
|
|
5388
|
+
})), take(1), defaultIfEmpty(null), map$1(() => this.router.createUrlTree(this.options.urlTree)));
|
|
5339
5389
|
}
|
|
5340
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 }); }
|
|
5341
5391
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAuthAsClientGuard }); }
|
|
@@ -5364,14 +5414,14 @@ const ScIdOrSlugGuard = (route) => {
|
|
|
5364
5414
|
.getCategoryCached$(categoryIdOrSlug)
|
|
5365
5415
|
.pipe(filter(tuiIsPresent),
|
|
5366
5416
|
// eslint-disable-next-line security/detect-object-injection
|
|
5367
|
-
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())));
|
|
5368
5418
|
}
|
|
5369
5419
|
if (productIdOrSlug && /^\d+$/.test(productIdOrSlug) !== (idOrSlug === 'id')) {
|
|
5370
5420
|
return inject(ScCatalogService)
|
|
5371
5421
|
.getProductData$(productIdOrSlug)
|
|
5372
5422
|
.pipe(filter(tuiIsPresent),
|
|
5373
5423
|
// eslint-disable-next-line security/detect-object-injection
|
|
5374
|
-
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())));
|
|
5375
5425
|
}
|
|
5376
5426
|
return true;
|
|
5377
5427
|
};
|
|
@@ -5508,14 +5558,14 @@ class ScConvertInterceptor {
|
|
|
5508
5558
|
if (request.responseType !== 'json' || !request.url.includes(this.urls.apiUrl)) {
|
|
5509
5559
|
return next.handle(request);
|
|
5510
5560
|
}
|
|
5511
|
-
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) => {
|
|
5512
5562
|
if (event instanceof HttpResponse) {
|
|
5513
5563
|
return event.clone({
|
|
5514
5564
|
body: objectToCamel(event.body),
|
|
5515
5565
|
});
|
|
5516
5566
|
}
|
|
5517
5567
|
return event;
|
|
5518
|
-
}), catchError((error) => throwError(() => new HttpErrorResponse({
|
|
5568
|
+
}), catchError$1((error) => throwError(() => new HttpErrorResponse({
|
|
5519
5569
|
error: objectToCamel(error.error),
|
|
5520
5570
|
headers: error.headers,
|
|
5521
5571
|
status: error.status,
|
|
@@ -5570,7 +5620,7 @@ class ScErrorsInterceptor {
|
|
|
5570
5620
|
/** @inheritDoc */
|
|
5571
5621
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5572
5622
|
intercept(request, next) {
|
|
5573
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5623
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5574
5624
|
// TODO: TASK[#4511]: Обработка и вывод ошибок работы с API.
|
|
5575
5625
|
// eslint-disable-next-line sonarjs/no-small-switch
|
|
5576
5626
|
switch (error.status) {
|
|
@@ -5607,7 +5657,7 @@ class ScErrorsInterceptor {
|
|
|
5607
5657
|
return this.authService.getRefreshToken$().pipe(switchMap(() => {
|
|
5608
5658
|
this.isTokenRefreshing$.next(false);
|
|
5609
5659
|
return next.handle(request.clone(this.tokenService.addAuthHeader(request)));
|
|
5610
|
-
}), catchError((error) => {
|
|
5660
|
+
}), catchError$1((error) => {
|
|
5611
5661
|
if (error.status === 401) {
|
|
5612
5662
|
this.tokenService.removeAuthToken();
|
|
5613
5663
|
return of();
|
|
@@ -5713,7 +5763,7 @@ class ScDateFormatInterceptor {
|
|
|
5713
5763
|
}
|
|
5714
5764
|
/** @inheritDoc */
|
|
5715
5765
|
intercept(request, next) {
|
|
5716
|
-
return next.handle(request).pipe(catchError((error) => {
|
|
5766
|
+
return next.handle(request).pipe(catchError$1((error) => {
|
|
5717
5767
|
const errorData = error.error;
|
|
5718
5768
|
this.formatDatesInErrors(errorData);
|
|
5719
5769
|
return throwError(() => error);
|
|
@@ -6116,7 +6166,7 @@ class ScNewsService {
|
|
|
6116
6166
|
* @param newsId Идентификатор новости.
|
|
6117
6167
|
*/
|
|
6118
6168
|
getNews$(newsId) {
|
|
6119
|
-
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)));
|
|
6120
6170
|
}
|
|
6121
6171
|
/**
|
|
6122
6172
|
* Возвращает {@link Observable} получения списка последних новостей.
|
|
@@ -6698,7 +6748,7 @@ class ScOrderDraftsService {
|
|
|
6698
6748
|
* @param params Параметры запроса получения списка.
|
|
6699
6749
|
*/
|
|
6700
6750
|
getList$(params) {
|
|
6701
|
-
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) => {
|
|
6702
6752
|
offersPaginateDTO.data = offersPaginateDTO.data.map((item) => new ScOrderDraftShort(item));
|
|
6703
6753
|
return offersPaginateDTO;
|
|
6704
6754
|
}));
|
|
@@ -6709,7 +6759,7 @@ class ScOrderDraftsService {
|
|
|
6709
6759
|
* @param data Данные для создания.
|
|
6710
6760
|
*/
|
|
6711
6761
|
create$(data) {
|
|
6712
|
-
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) => {
|
|
6713
6763
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6714
6764
|
target: ScUserMetrikaGoalsEnum.orderDraftCreated,
|
|
6715
6765
|
params: { offer_id: offer.id },
|
|
@@ -6727,7 +6777,7 @@ class ScOrderDraftsService {
|
|
|
6727
6777
|
get$(draftId, cacheable = true) {
|
|
6728
6778
|
let cachedItem = this.offerMap.get(draftId);
|
|
6729
6779
|
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);
|
|
6780
|
+
cachedItem = new ScCachedItem(this.updateInterval.orderData, this.http.get(`${this.urls.apiUrl}/orders/offers/${draftId}`).pipe(map$1((data) => new ScOrderDraft(data))), loadingPlaceholder);
|
|
6731
6781
|
if (cacheable) {
|
|
6732
6782
|
this.offerMap.set(draftId, cachedItem);
|
|
6733
6783
|
}
|
|
@@ -6743,7 +6793,7 @@ class ScOrderDraftsService {
|
|
|
6743
6793
|
* @param id Идентификатор коммерческого предложения/черновика.
|
|
6744
6794
|
*/
|
|
6745
6795
|
getItems$(id) {
|
|
6746
|
-
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)));
|
|
6747
6797
|
}
|
|
6748
6798
|
/**
|
|
6749
6799
|
* Обновляет данные коммерческого предложения/черновика.
|
|
@@ -6753,7 +6803,7 @@ class ScOrderDraftsService {
|
|
|
6753
6803
|
*/
|
|
6754
6804
|
update$(draftId, patch) {
|
|
6755
6805
|
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) => {
|
|
6806
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${draftId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6757
6807
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6758
6808
|
target: ScUserMetrikaGoalsEnum.orderDraftUpdated,
|
|
6759
6809
|
params: { offer_id: draftId },
|
|
@@ -6782,7 +6832,7 @@ class ScOrderDraftsService {
|
|
|
6782
6832
|
* @param data Данные заказа.
|
|
6783
6833
|
*/
|
|
6784
6834
|
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) => {
|
|
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) => {
|
|
6786
6836
|
orders.forEach((order) => {
|
|
6787
6837
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6788
6838
|
target: ScUserMetrikaGoalsEnum.orderCreatedFromDraft,
|
|
@@ -6799,7 +6849,7 @@ class ScOrderDraftsService {
|
|
|
6799
6849
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6800
6850
|
*/
|
|
6801
6851
|
addProduct$(productData, offerId) {
|
|
6802
|
-
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) => {
|
|
6803
6853
|
if (this.offerMap.has(offerId)) {
|
|
6804
6854
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6805
6855
|
}
|
|
@@ -6813,7 +6863,7 @@ class ScOrderDraftsService {
|
|
|
6813
6863
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6814
6864
|
*/
|
|
6815
6865
|
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) => {
|
|
6866
|
+
return this.http.patch(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${productId}`, patch).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6817
6867
|
if (this.offerMap.has(offerId)) {
|
|
6818
6868
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6819
6869
|
}
|
|
@@ -6826,7 +6876,7 @@ class ScOrderDraftsService {
|
|
|
6826
6876
|
* @param offerId Идентификатор коммерческого предложения/черновика.
|
|
6827
6877
|
*/
|
|
6828
6878
|
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) => {
|
|
6879
|
+
return this.http.delete(`${this.urls.apiUrl}/orders/offers/${offerId}/products/${item.id}`).pipe(map$1((offerDTO) => new ScOrderDraft(offerDTO)), tap((offer) => {
|
|
6830
6880
|
if (this.offerMap.has(offerId)) {
|
|
6831
6881
|
this.offerMap.get(offerId)?.setValue(offer);
|
|
6832
6882
|
}
|
|
@@ -6898,7 +6948,7 @@ class ScOrdersService {
|
|
|
6898
6948
|
* @param newOrder Данные нового заказа.
|
|
6899
6949
|
*/
|
|
6900
6950
|
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) => {
|
|
6951
|
+
return this.http.post(`${this.urls.apiUrl}/orders/${directionId}`, newOrder).pipe(map$1((orders) => orders.map((item) => new ScOrderShort(item))), tap((orders) => {
|
|
6902
6952
|
orders.forEach((order) => {
|
|
6903
6953
|
this.userMetrikaService.emitUserMetrikaEvent({
|
|
6904
6954
|
target: ScUserMetrikaGoalsEnum.orderCreated,
|
|
@@ -6931,7 +6981,7 @@ class ScOrdersService {
|
|
|
6931
6981
|
* @param params Параметры запроса получения заказов.
|
|
6932
6982
|
*/
|
|
6933
6983
|
getOrders$(params) {
|
|
6934
|
-
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) => {
|
|
6935
6985
|
ordersPaginateDTO.data = ordersPaginateDTO.data.map((item) => new ScOrderShort(item));
|
|
6936
6986
|
return ordersPaginateDTO;
|
|
6937
6987
|
}));
|
|
@@ -6945,7 +6995,7 @@ class ScOrdersService {
|
|
|
6945
6995
|
get$(orderId, cacheable = true) {
|
|
6946
6996
|
let cachedItem = this.orderMap.get(orderId);
|
|
6947
6997
|
if (!cachedItem) {
|
|
6948
|
-
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);
|
|
6949
6999
|
if (cacheable) {
|
|
6950
7000
|
this.orderMap.set(orderId, cachedItem);
|
|
6951
7001
|
}
|
|
@@ -6962,7 +7012,7 @@ class ScOrdersService {
|
|
|
6962
7012
|
* @param cacheable Признак возможности получения списка элементов заказа из кэшированных данных.
|
|
6963
7013
|
*/
|
|
6964
7014
|
getItems$(id, cacheable = true) {
|
|
6965
|
-
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)));
|
|
6966
7016
|
}
|
|
6967
7017
|
/**
|
|
6968
7018
|
* Копирует товары заказа в корзину текущего пользователя.
|
|
@@ -6992,7 +7042,7 @@ class ScOrdersService {
|
|
|
6992
7042
|
status,
|
|
6993
7043
|
statusDetail,
|
|
6994
7044
|
})
|
|
6995
|
-
.pipe(map((dto) => new ScOrder(dto)), tap((order) => {
|
|
7045
|
+
.pipe(map$1((dto) => new ScOrder(dto)), tap((order) => {
|
|
6996
7046
|
this.syncOrderCache(orderId, order);
|
|
6997
7047
|
}));
|
|
6998
7048
|
}
|
|
@@ -7019,7 +7069,7 @@ class ScOrdersService {
|
|
|
7019
7069
|
date: date,
|
|
7020
7070
|
},
|
|
7021
7071
|
})
|
|
7022
|
-
.pipe(map((ordersPaginateDTO) => {
|
|
7072
|
+
.pipe(map$1((ordersPaginateDTO) => {
|
|
7023
7073
|
const formattedDate = format(parse(date, this.dateFormats.api, new Date()), this.dateFormats.uiDate);
|
|
7024
7074
|
return new ScDeliveryCost(ordersPaginateDTO, formattedDate);
|
|
7025
7075
|
}));
|
|
@@ -7069,7 +7119,7 @@ class ScPaginationService {
|
|
|
7069
7119
|
/**
|
|
7070
7120
|
* {@link Observable} изменения статуса аутентификации.
|
|
7071
7121
|
*/
|
|
7072
|
-
this.authStatus$ = inject(SC_USER_INFO).pipe(map((user) => user.isGuest));
|
|
7122
|
+
this.authStatus$ = inject(SC_USER_INFO).pipe(map$1((user) => user.isGuest));
|
|
7073
7123
|
/**
|
|
7074
7124
|
* Сервис работы с каталогом.
|
|
7075
7125
|
*/
|
|
@@ -7081,18 +7131,18 @@ class ScPaginationService {
|
|
|
7081
7131
|
// Избегаем множественных сигналов при одновременном изменении фильтров page$ и others$.
|
|
7082
7132
|
debounceTime(0),
|
|
7083
7133
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
7084
|
-
map((page) => ({ ...params, ...page })),
|
|
7134
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7085
7135
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7086
|
-
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());
|
|
7087
7137
|
/**
|
|
7088
7138
|
* Объект данных пагинации с сохранением предыдущих значений для "разворачивания" списка товаров.
|
|
7089
7139
|
* Список сохраняется при переходе по страницам, до тех пор пока не будет получен сигнал `others$`.
|
|
7090
7140
|
*/
|
|
7091
|
-
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(
|
|
7092
7142
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
|
7093
|
-
map((page) => ({ ...params, ...page })),
|
|
7143
|
+
map$1((page) => ({ ...params, ...page })),
|
|
7094
7144
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
7095
|
-
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith(null))),
|
|
7145
|
+
concatMap((paginationParams) => this.catalogService.getProducts$(paginationParams).pipe(startWith$1(null))),
|
|
7096
7146
|
// TODO: Заменить `ScProduct` на T тип.
|
|
7097
7147
|
scan(
|
|
7098
7148
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -7104,9 +7154,9 @@ class ScPaginationService {
|
|
|
7104
7154
|
value.data.unshift(...accumulator.data);
|
|
7105
7155
|
}
|
|
7106
7156
|
return [value, value];
|
|
7107
|
-
}, [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());
|
|
7108
7158
|
this.others$
|
|
7109
|
-
.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())
|
|
7110
7160
|
.subscribe((page) => {
|
|
7111
7161
|
this.patchPage({ page: page });
|
|
7112
7162
|
});
|
|
@@ -7339,7 +7389,7 @@ class ScReclamationService {
|
|
|
7339
7389
|
downloadReclamation$(reclamationId) {
|
|
7340
7390
|
return this.http
|
|
7341
7391
|
.get(`${this.urls.apiUrl}/reclamations/${reclamationId}/download`, { responseType: 'blob' })
|
|
7342
|
-
.pipe(map((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7392
|
+
.pipe(map$1((reclamation) => new Blob([reclamation], { type: 'application/pdf' })));
|
|
7343
7393
|
}
|
|
7344
7394
|
/**
|
|
7345
7395
|
* Отправляет новое сообщение рекламации.
|
|
@@ -8098,7 +8148,7 @@ class ScVacanciesService {
|
|
|
8098
8148
|
.get(`${this.vacanciesData.apiUrl}?employer_id=${this.vacanciesData.employerId}&per_page=${perPage}&page=${page}`, {
|
|
8099
8149
|
context: new HttpContext().set(SC_IS_HEADER_REQUIRED, false).set(SC_CACHE_SETTINGS, new ScCacheSettings(true, this.cacheLifeTime.vacanciesData)),
|
|
8100
8150
|
})
|
|
8101
|
-
.pipe(map((result) => new ScVacanciesList(result)));
|
|
8151
|
+
.pipe(map$1((result) => new ScVacanciesList(result)));
|
|
8102
8152
|
}
|
|
8103
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 }); }
|
|
8104
8154
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScVacanciesService, providedIn: 'root' }); }
|
|
@@ -8282,5 +8332,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8282
8332
|
* Generated bundle index. Do not edit.
|
|
8283
8333
|
*/
|
|
8284
8334
|
|
|
8285
|
-
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 };
|
|
8286
8336
|
//# sourceMappingURL=snabcentr-client-core.mjs.map
|