@snabcentr/client-ui 0.5.1 → 0.6.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.

Potentially problematic release.


This version of @snabcentr/client-ui might be problematic. Click here for more details.

@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input, NgModule, Injectable, ElementRef, Inject, ContentChildren, ViewChild, HostBinding, HostListener, ChangeDetectorRef, Optional, Self, inject, Directive, forwardRef } from '@angular/core';
3
- import { Subject, filter, map, switchMap, catchError, of, startWith, share, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip } from 'rxjs';
2
+ import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input, NgModule, Injectable, ElementRef, Inject, ContentChildren, ViewChild, HostBinding, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, Directive, forwardRef } from '@angular/core';
3
+ import { Subject, filter, map, switchMap, catchError, of, startWith, share, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge } from 'rxjs';
4
4
  import * as i1 from '@snabcentr/client-core';
5
- import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScIconTypesEnum } from '@snabcentr/client-core';
5
+ import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScIconTypesEnum } from '@snabcentr/client-core';
6
6
  import * as i3 from '@angular/common';
7
7
  import { CommonModule, formatDate } from '@angular/common';
8
8
  import * as i4 from '@taiga-ui/core';
@@ -10,7 +10,7 @@ import { TuiTextfieldControllerModule, TuiLinkModule, TuiButtonModule, TuiLabelM
10
10
  import * as i3$1 from '@angular/forms';
11
11
  import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
12
12
  import * as i7 from '@taiga-ui/cdk';
13
- import { tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE } from '@taiga-ui/cdk';
13
+ import { tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE, tuiIsPresent, TuiDestroyService } from '@taiga-ui/cdk';
14
14
  import * as i3$2 from '@taiga-ui/kit';
15
15
  import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiElasticContainerModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule } from '@taiga-ui/kit';
16
16
  import * as i7$1 from '@maskito/angular';
@@ -21,7 +21,7 @@ import * as i8 from '@ng-web-apis/intersection-observer';
21
21
  import { IntersectionObserverService, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
22
22
  import * as i5 from '@angular/material/core';
23
23
  import { MatRippleModule } from '@angular/material/core';
24
- import { RouterModule } from '@angular/router';
24
+ import { RouterModule, NavigationEnd, ActivatedRoute, Router } from '@angular/router';
25
25
  import * as i7$2 from '@taiga-ui/addon-preview';
26
26
  import { TuiPreviewDialogService, TuiPreviewModule } from '@taiga-ui/addon-preview';
27
27
  import * as i8$1 from '@tinkoff/ng-polymorpheus';
@@ -180,10 +180,10 @@ class ScSignInFormByPhoneComponent {
180
180
  }
181
181
  }
182
182
  ScSignInFormByPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, deps: [{ token: i1.ScAuthService }, { token: i1.ScVerificationService }], target: i0.ɵɵFactoryTarget.Component });
183
- ScSignInFormByPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone", ngImport: i0, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i7.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i3$2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i3$2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7$1.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7$1.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
183
+ ScSignInFormByPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone", ngImport: i0, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n size=\"s\"\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n size=\"s\"\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i7.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i3$2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i3$2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7$1.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7$1.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
184
184
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, decorators: [{
185
185
  type: Component,
186
- args: [{ selector: 'sc-sign-in-form-by-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
186
+ args: [{ selector: 'sc-sign-in-form-by-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n size=\"s\"\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n size=\"s\"\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
187
187
  }], ctorParameters: function () { return [{ type: i1.ScAuthService }, { type: i1.ScVerificationService }]; } });
188
188
 
189
189
  /**
@@ -233,10 +233,10 @@ class ScSignInFormByEmailComponent {
233
233
  }
234
234
  }
235
235
  ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
236
- ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3$2.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
236
+ ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" size=\"s\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3$2.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
237
237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
238
238
  type: Component,
239
- args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
239
+ args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" size=\"s\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
240
240
  }], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { forgotPassword: [{
241
241
  type: Output
242
242
  }] } });
@@ -289,10 +289,10 @@ class ScSignInFormComponent {
289
289
  }
290
290
  }
291
291
  ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
292
- ScSignInFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormComponent, selector: "sc-sign-in-form", inputs: { authMethod: "authMethod" }, outputs: { forgotPassword: "forgotPassword", signUp: "signUp", successAuth: "successAuth" }, ngImport: i0, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? 'onLight' : null\"\n [appearance]=\"authMethod === 'by_phone' ? 'secondary' : 'outline'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? 'onLight' : null\"\n [appearance]=\"authMethod === 'by_email' ? 'secondary' : 'outline'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone" }, { kind: "component", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: ["forgotPassword"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
292
+ ScSignInFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormComponent, selector: "sc-sign-in-form", inputs: { authMethod: "authMethod" }, outputs: { forgotPassword: "forgotPassword", signUp: "signUp", successAuth: "successAuth" }, ngImport: i0, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" size=\"s\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone" }, { kind: "component", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: ["forgotPassword"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
293
293
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, decorators: [{
294
294
  type: Component,
295
- args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? 'onLight' : null\"\n [appearance]=\"authMethod === 'by_phone' ? 'secondary' : 'outline'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? 'onLight' : null\"\n [appearance]=\"authMethod === 'by_email' ? 'secondary' : 'outline'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n" }]
295
+ args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" size=\"s\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n" }]
296
296
  }], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { authMethod: [{
297
297
  type: Input
298
298
  }], forgotPassword: [{
@@ -864,7 +864,7 @@ class ScPriceWarehouseStockComponent {
864
864
  }
865
865
  /** @inheritDoc */
866
866
  ngOnInit() {
867
- this.selectedWarehouse$ = this.fromMain ? this.warehouseService.getMainWarehouseChange$() : this.warehouseService.getWarehouseSelectChange$();
867
+ this.selectedWarehouse$ = this.fromMain ? this.warehouseService.getCatalogWarehouseChange$() : this.warehouseService.getWarehouseSelectChange$();
868
868
  this.warehousesList$ = this.selectedWarehouse$.pipe(switchMap((warehouse) => this.warehouseService.getWarehouses$().pipe(map((warehouses) => { var _a; return (_a = this.product.stockCount) === null || _a === void 0 ? void 0 : _a.map((sc) => ({ w: warehouses.find((w) => w.id === sc.warehouseId), sc: sc })); }), map((items) => items === null || items === void 0 ? void 0 : items.sort((item) => { var _a; return (((_a = item.w) === null || _a === void 0 ? void 0 : _a.id) === (warehouse === null || warehouse === void 0 ? void 0 : warehouse.id) ? -1 : 1); })))));
869
869
  }
870
870
  }
@@ -1480,6 +1480,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
1480
1480
  type: Input
1481
1481
  }] } });
1482
1482
 
1483
+ /**
1484
+ * Значения пагинации списка товаров категории по умолчанию.
1485
+ */
1486
+ const SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS = {
1487
+ perPage: 20,
1488
+ page: 0,
1489
+ };
1490
+ /**
1491
+ * Токен значений пагинации списка товаров категории по умолчанию.
1492
+ */
1493
+ const SC_PRODUCT_PAGINATION_OPTIONS = tuiCreateToken(SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS);
1494
+ /**
1495
+ * {@link Subject} параметров пагинации списка товаров категории.
1496
+ */
1497
+ const paginationParams$ = new Subject();
1498
+ /**
1499
+ * Токен {@link Subject} параметров пагинации списка товаров категории для получения их из вне.
1500
+ */
1501
+ const SC_PRODUCT_PAGINATION_PARAMS = tuiCreateToken(paginationParams$);
1502
+ /**
1503
+ * Фабрика создания потока данных о товарах категории c пагинацией, включая данные о количестве этих товаров в корзине.
1504
+ *
1505
+ * @param catalogService Сервис для работы с каталогом.
1506
+ * @param cartService Сервис для работы с корзиной.
1507
+ * @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
1508
+ */
1509
+ function productsPaginationChangeFactory({ paramMap }, catalogService, cartService, destroy$) {
1510
+ return paramMap.pipe(map((params) => params.get('categoryId')), filter(tuiIsPresent), switchMap((categoryId) => paginationParams$.pipe(debounceTime(20), switchMap((paginationParams) => catalogService.getCategoryProducts$(Number(categoryId), paginationParams)), filter(tuiIsPresent), scan((acc, value) => {
1511
+ if (acc && value && value.meta.currentPage > 1)
1512
+ value.data.unshift(...acc.data);
1513
+ return value;
1514
+ }, null), switchMap((productsPaginate) => cartService.getCartChange$().pipe(map((cart) => {
1515
+ productsPaginate === null || productsPaginate === void 0 ? void 0 : productsPaginate.data.forEach((product) => (product.cartItem = cart.items.find((cartItem) => cartItem.product.id === product.id)));
1516
+ return productsPaginate;
1517
+ }))), startWith(null))), share(), takeUntil(destroy$));
1518
+ }
1519
+ /**
1520
+ * Токен потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
1521
+ */
1522
+ const SC_PRODUCT_PAGINATION_CHANGE_INFO = new InjectionToken('SC_PRODUCT_PAGINATION_CHANGE_INFO');
1523
+ /**
1524
+ * {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
1525
+ */
1526
+ const nextPageClickEvent = new EventEmitter();
1527
+ /**
1528
+ * Токен {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
1529
+ */
1530
+ const SC_NEXT_PAGE_PAGINATION_CLICK = tuiCreateToken(nextPageClickEvent);
1531
+ /**
1532
+ * Фабрика создания потока данных о состоянии загрузки запроса списка товаров с пагинацией пагинации.
1533
+ */
1534
+ function loadingPaginationFactory(productsData$, destroy$) {
1535
+ return merge(paginationParams$.pipe(map(() => true)), productsData$.pipe(map((data) => data === null))).pipe(share(), takeUntil(destroy$));
1536
+ }
1537
+ /**
1538
+ * Токен потока данных о состоянии загрузки товаров пагинации.
1539
+ */
1540
+ const SC_LOADING_PAGINATION_CHANGE_INFO = new InjectionToken('SC_LOADING_PAGINATION_CHANGE_INFO');
1541
+ /**
1542
+ * Фабрика создания потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
1543
+ */
1544
+ function nextPagePaginationChangeFactory({ events }, nextPagePaginationClick, productsData$, destroy$) {
1545
+ return nextPagePaginationClick
1546
+ .pipe(scan((acc) => ++acc, 1), startWith(1))
1547
+ .pipe(takeUntil(merge(events.pipe(filter((e) => e instanceof NavigationEnd)), productsData$.pipe(filter((paginate) => paginate !== null && paginate.meta.currentPage >= paginate.meta.lastPage)), destroy$)));
1548
+ }
1549
+ /**
1550
+ * Токен потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
1551
+ */
1552
+ const SC_NEXT_PAGE_PAGINATION_CHANGE_INFO = new InjectionToken('SC_NEXT_PAGE_PAGINATION_CHANGE_INFO');
1553
+ /**
1554
+ * Провайдеры потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
1555
+ */
1556
+ const SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS = [
1557
+ TuiDestroyService,
1558
+ {
1559
+ provide: SC_PRODUCT_PAGINATION_CHANGE_INFO,
1560
+ deps: [ActivatedRoute, ScCatalogService, ScCartService, TuiDestroyService],
1561
+ useFactory: productsPaginationChangeFactory,
1562
+ },
1563
+ {
1564
+ provide: SC_NEXT_PAGE_PAGINATION_CHANGE_INFO,
1565
+ deps: [Router, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
1566
+ useFactory: nextPagePaginationChangeFactory,
1567
+ },
1568
+ {
1569
+ provide: SC_LOADING_PAGINATION_CHANGE_INFO,
1570
+ deps: [SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
1571
+ useFactory: loadingPaginationFactory,
1572
+ },
1573
+ ];
1574
+
1575
+ /**
1576
+ * Компонент элементов управления пагинацией списка товаров.
1577
+ */
1578
+ class ScPriceListPaginationComponent {
1579
+ /**
1580
+ * Инициализирует экземпляр класса {@link ScPriceListPaginationComponent}.
1581
+ *
1582
+ * @param nextPageClickEvent Событие нажатия на кнопку "Показать следующие N позиций".
1583
+ * @param options Значения пагинации списка товаров категории по умолчанию.
1584
+ */
1585
+ constructor(nextPageClickEvent, options) {
1586
+ this.nextPageClickEvent = nextPageClickEvent;
1587
+ this.options = options;
1588
+ }
1589
+ }
1590
+ ScPriceListPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceListPaginationComponent, deps: [{ token: SC_NEXT_PAGE_PAGINATION_CLICK }, { token: SC_PRODUCT_PAGINATION_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
1591
+ ScPriceListPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceListPaginationComponent, selector: "sc-price-list-pagination", inputs: { meta: "meta", loadingPagination: "loadingPagination" }, providers: [SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS], ngImport: i0, template: "<button *ngIf=\"meta?.currentPage !== meta?.lastPage\" tuiButton (click)=\"nextPageClickEvent.emit()\" [disabled]=\"loadingPagination\" appearance=\"secondary\" size=\"l\" class=\"w-full\">\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n</button>\n<!-- \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043C \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044E \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. -->\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceListPaginationComponent, decorators: [{
1593
+ type: Component,
1594
+ args: [{ selector: 'sc-price-list-pagination', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS], template: "<button *ngIf=\"meta?.currentPage !== meta?.lastPage\" tuiButton (click)=\"nextPageClickEvent.emit()\" [disabled]=\"loadingPagination\" appearance=\"secondary\" size=\"l\" class=\"w-full\">\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n</button>\n<!-- \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043C \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044E \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. -->\n" }]
1595
+ }], ctorParameters: function () {
1596
+ return [{ type: i0.EventEmitter, decorators: [{
1597
+ type: Inject,
1598
+ args: [SC_NEXT_PAGE_PAGINATION_CLICK]
1599
+ }] }, { type: undefined, decorators: [{
1600
+ type: Inject,
1601
+ args: [SC_PRODUCT_PAGINATION_OPTIONS]
1602
+ }] }];
1603
+ }, propDecorators: { meta: [{
1604
+ type: Input
1605
+ }], loadingPagination: [{
1606
+ type: Input
1607
+ }] } });
1608
+
1483
1609
  /**
1484
1610
  * Language: Russian.
1485
1611
  */
@@ -1601,7 +1727,13 @@ echarts.use([TitleComponent, TooltipComponent, GridComponent, LineChart, SVGRend
1601
1727
  class ScCatalogModule {
1602
1728
  }
1603
1729
  ScCatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1604
- ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, declarations: [ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScPriceCardComponent, ScPriceWarehouseStockComponent, ScPriceHistoryComponent], imports: [CommonModule,
1730
+ ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, declarations: [ScPriceListPaginationComponent,
1731
+ ScCategoryCardComponent,
1732
+ ScFavoriteBtnComponent,
1733
+ ScInputQuantityComponent,
1734
+ ScPriceCardComponent,
1735
+ ScPriceWarehouseStockComponent,
1736
+ ScPriceHistoryComponent], imports: [CommonModule,
1605
1737
  RouterModule,
1606
1738
  TuiButtonModule,
1607
1739
  TuiSvgModule,
@@ -1616,7 +1748,13 @@ ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
1616
1748
  TuiFieldErrorPipeModule,
1617
1749
  TuiLoaderModule,
1618
1750
  TuiLinkModule,
1619
- TuiElasticContainerModule, i2.NgxEchartsModule], exports: [ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScPriceCardComponent, ScPriceWarehouseStockComponent, ScPriceHistoryComponent] });
1751
+ TuiElasticContainerModule, i2.NgxEchartsModule, TuiLetModule], exports: [ScPriceListPaginationComponent,
1752
+ ScCategoryCardComponent,
1753
+ ScFavoriteBtnComponent,
1754
+ ScInputQuantityComponent,
1755
+ ScPriceCardComponent,
1756
+ ScPriceWarehouseStockComponent,
1757
+ ScPriceHistoryComponent] });
1620
1758
  ScCatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, imports: [CommonModule,
1621
1759
  RouterModule,
1622
1760
  TuiButtonModule,
@@ -1633,12 +1771,29 @@ ScCatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
1633
1771
  TuiLoaderModule,
1634
1772
  TuiLinkModule,
1635
1773
  TuiElasticContainerModule,
1636
- NgxEchartsModule.forRoot({ echarts })] });
1774
+ NgxEchartsModule.forRoot({ echarts }),
1775
+ TuiLetModule] });
1637
1776
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, decorators: [{
1638
1777
  type: NgModule,
1639
1778
  args: [{
1640
- declarations: [ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScPriceCardComponent, ScPriceWarehouseStockComponent, ScPriceHistoryComponent],
1641
- exports: [ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScPriceCardComponent, ScPriceWarehouseStockComponent, ScPriceHistoryComponent],
1779
+ declarations: [
1780
+ ScPriceListPaginationComponent,
1781
+ ScCategoryCardComponent,
1782
+ ScFavoriteBtnComponent,
1783
+ ScInputQuantityComponent,
1784
+ ScPriceCardComponent,
1785
+ ScPriceWarehouseStockComponent,
1786
+ ScPriceHistoryComponent,
1787
+ ],
1788
+ exports: [
1789
+ ScPriceListPaginationComponent,
1790
+ ScCategoryCardComponent,
1791
+ ScFavoriteBtnComponent,
1792
+ ScInputQuantityComponent,
1793
+ ScPriceCardComponent,
1794
+ ScPriceWarehouseStockComponent,
1795
+ ScPriceHistoryComponent,
1796
+ ],
1642
1797
  imports: [
1643
1798
  CommonModule,
1644
1799
  RouterModule,
@@ -1657,6 +1812,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
1657
1812
  TuiLinkModule,
1658
1813
  TuiElasticContainerModule,
1659
1814
  NgxEchartsModule.forRoot({ echarts }),
1815
+ TuiLetModule,
1660
1816
  ],
1661
1817
  }]
1662
1818
  }] });
@@ -2302,5 +2458,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2302
2458
  * Generated bundle index. Do not edit.
2303
2459
  */
2304
2460
 
2305
- export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceWarehouseStockComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneApproveCodeMask, scClientUiIconsName, stepValidator };
2461
+ export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, phoneApproveCodeMask, scClientUiIconsName, stepValidator };
2306
2462
  //# sourceMappingURL=snabcentr-client-ui.mjs.map