@snabcentr/client-ui 5.3.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, NgZone, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, ChangeDetectorRef, Directive, Pipe, ElementRef, Renderer2, HostListener, input, computed, model, output, DestroyRef, effect, ViewChild, ContentChild, viewChild, HostBinding, ContentChildren, forwardRef, contentChild, TemplateRef } from '@angular/core';
|
|
3
|
-
import { ScContactsService, ScUserService, ScLocationsService, ScSuggestionService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, IS_RUNNING_ON_TERMINAL, ScVerificationService, ScConvertersService, ScReferencesService, ScOpfList, ScBannerService, ScMediaImageTransformerPipe, ScCartService, ScUploadedFile, loadingPlaceholder, SC_ORDER_LOADER, ScMimeTypes, ScCatalogService, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCatalogFilterService, ScIdOrSlugPipe, SC_CATEGORY_INFO, ScConfiguratorService, ScContragentService, ScDeliveryAddressService, SC_URLS,
|
|
2
|
+
import { InjectionToken, inject, Injectable, NgZone, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, ChangeDetectorRef, Directive, Pipe, ElementRef, Renderer2, HostListener, input, computed, model, output, DestroyRef, effect, ViewChild, ContentChild, viewChild, HostBinding, ContentChildren, forwardRef, contentChild, TemplateRef, RESPONSE_INIT } from '@angular/core';
|
|
3
|
+
import { ScContactsService, ScUserService, ScLocationsService, ScSuggestionService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, IS_RUNNING_ON_TERMINAL, ScVerificationService, ScConvertersService, ScReferencesService, ScOpfList, ScBannerService, ScMediaImageTransformerPipe, ScCartService, ScUploadedFile, loadingPlaceholder, SC_ORDER_LOADER, ScMimeTypes, ScCatalogService, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCatalogFilterService, ScIdOrSlugPipe, SC_CATEGORY_INFO, ScConfiguratorService, ScContragentService, ScDeliveryAddressService, SC_URLS, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFilesService, ScOrdersService, ScUIService, SC_USER_INFO as SC_USER_INFO$1, ScPaymentType, ScDeliveryType, TERMINAL_PROVIDERS, ScOrderDraftsService, ScRouteKeys, ScSeoService, scOrderIsLoaded, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService } from '@snabcentr/client-core';
|
|
4
4
|
import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, filter, map, debounceTime, startWith, catchError, throwError, share, Subject, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, Observable, pairwise, Subscription, merge, skip, from, concatMap, noop, first, retry } from 'rxjs';
|
|
5
5
|
import { WA_WINDOW, WA_NAVIGATOR } from '@ng-web-apis/common';
|
|
6
6
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
@@ -7096,9 +7096,9 @@ class ScErrorBlockStatusComponent {
|
|
|
7096
7096
|
*/
|
|
7097
7097
|
this.isServer = inject(IS_SERVER);
|
|
7098
7098
|
/**
|
|
7099
|
-
*
|
|
7099
|
+
* Мутируемый объект инициализации SSR-ответа (нативный `RESPONSE_INIT`); доступен при `RenderMode.Server`.
|
|
7100
7100
|
*/
|
|
7101
|
-
this.
|
|
7101
|
+
this.responseInit = inject(RESPONSE_INIT, { optional: true });
|
|
7102
7102
|
// Если компонент отображён маршрутизацией из-за перехода по неизвестному маршруту, то устанавливаем код 404.
|
|
7103
7103
|
if (inject(ActivatedRoute).snapshot.data['routes_key'] === 'error') {
|
|
7104
7104
|
this.errorHandlerComponent.setErrorCode(404);
|
|
@@ -7106,8 +7106,8 @@ class ScErrorBlockStatusComponent {
|
|
|
7106
7106
|
effect(() => {
|
|
7107
7107
|
if (this.code() !== null) {
|
|
7108
7108
|
this.pageErrorChange.emit(this.error());
|
|
7109
|
-
if (this.isServer) {
|
|
7110
|
-
this.
|
|
7109
|
+
if (this.isServer && this.responseInit) {
|
|
7110
|
+
this.responseInit.status = this.code() ?? 0;
|
|
7111
7111
|
}
|
|
7112
7112
|
}
|
|
7113
7113
|
});
|