@snabcentr/client-ui 3.36.2 → 3.37.2

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,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injectable, Directive, ContentChildren, HostListener, NgModule, EventEmitter, signal, ChangeDetectorRef, Input, Output, Component, ChangeDetectionStrategy, Inject, HostBinding, ElementRef, Pipe, Renderer2, input, model, output, SkipSelf, DestroyRef, effect, ContentChild, ViewChild, Optional, computed, viewChild, forwardRef } from '@angular/core';
2
+ import { inject, Injectable, InjectionToken, Directive, ContentChildren, HostListener, NgModule, EventEmitter, signal, ChangeDetectorRef, Input, Output, Component, ChangeDetectionStrategy, Inject, HostBinding, ElementRef, Pipe, Renderer2, input, model, output, SkipSelf, DestroyRef, effect, ContentChild, ViewChild, Optional, computed, viewChild, forwardRef } from '@angular/core';
3
3
  import * as i1 from '@snabcentr/client-core';
4
- import { ScContactsService, ScUserService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, IS_RUNNING_ON_TERMINAL, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, ScVerificationService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScConvertersService, ScOpfList, ScMediaImageTransformerPipe, ScLocationsService, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScCartService, ScUploadedFile, ScMimeTypes, ScCatalogService, SC_URLS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFrequentlyAskedQuestionsService, ScFeedbackService } from '@snabcentr/client-core';
4
+ import { ScContactsService, ScUserService, ScVerificationService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, IS_RUNNING_ON_TERMINAL, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScConvertersService, ScOpfList, ScMediaImageTransformerPipe, ScLocationsService, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScCartService, ScUploadedFile, ScMimeTypes, ScCatalogService, SC_URLS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFrequentlyAskedQuestionsService, ScFeedbackService } from '@snabcentr/client-core';
5
5
  import * as i6 from 'rxjs';
6
6
  import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, Subject, map, filter, tap, catchError, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, debounceTime, throwError, combineLatest, Observable, pairwise, noop, first, merge, skip } from 'rxjs';
7
7
  import * as i7 from '@taiga-ui/cdk';
@@ -230,6 +230,22 @@ const scPhoneVerificationCodeMask = {
230
230
  */
231
231
  const SC_VERIFICATION_CODE_TIMEOUT = tuiCreateToken(60);
232
232
 
233
+ /**
234
+ * Токен для получения кода подтверждения телефона.
235
+ * Позволяет подключать внешнюю логику получения кода подтверждения.
236
+ */
237
+ const SC_PHONE_APPROVE_CODE_SENDER = new InjectionToken('SC_PHONE_APPROVE_CODE_SENDER');
238
+
239
+ /**
240
+ * Провайдер по умолчанию для получения кода подтверждения телефона.
241
+ * Использует ScVerificationService для отправки кода.
242
+ */
243
+ const SC_PHONE_APPROVE_CODE_SENDER_PROVIDER = {
244
+ provide: SC_PHONE_APPROVE_CODE_SENDER,
245
+ useFactory: (verificationService) => (phoneNumber) => verificationService.sendPhoneApproveCode(phoneNumber),
246
+ deps: [ScVerificationService],
247
+ };
248
+
233
249
  /* eslint-disable lodash/prefer-lodash-method */
234
250
  /**
235
251
  * Директива для перехода по нажатию клавиши enter на следующее поле ввода формы.
@@ -939,6 +955,10 @@ class ScVerificationPhoneCheckFormComponent {
939
955
  * Сервис верификации.
940
956
  */
941
957
  this.verificationService = inject(ScVerificationService);
958
+ /**
959
+ * Функция отправки кода подтверждения телефона.
960
+ */
961
+ this.sendPhoneApproveCode = inject(SC_PHONE_APPROVE_CODE_SENDER);
942
962
  /**
943
963
  * Директива c `FormGroup` из DOM.
944
964
  */
@@ -1006,20 +1026,33 @@ class ScVerificationPhoneCheckFormComponent {
1006
1026
  /**
1007
1027
  * {@link Observable} запроса данных получения кода подтверждения.
1008
1028
  */
1009
- this.loadingApproveCode$ = this.onSendCode.pipe(map(() => this.phoneControl.value), filter((value) => this.phoneControl.valid), switchMap((value) => this.verificationService.sendPhoneApproveCode(value).pipe(tap(() => {
1029
+ this.loadingApproveCode$ = this.onSendCode.pipe(map(() => this.phoneControl.value), filter((value) => this.phoneControl.valid), switchMap((value) => this.sendPhoneApproveCode(value).pipe(tap(() => {
1010
1030
  this.reloadTimer$.next(this.codeTimeout);
1011
1031
  }), map(() => false), catchError((error) => {
1012
1032
  if (error instanceof HttpErrorResponse) {
1013
- const errorResponse = error.error;
1014
- const regex = /(\d{2}):\d{2}/;
1015
- const match = regex.exec(errorResponse.message);
1016
- if (match && match.length > 1) {
1017
- const timeParts = match[0].split(':');
1018
- const seconds = Number.parseInt(timeParts[1], 10);
1033
+ let seconds = null;
1034
+ if ('error' in error.error) {
1035
+ const errorResponse = error.error;
1036
+ const regex = /(\d{1,3})\s+seconds/;
1037
+ const match = regex.exec(errorResponse.error);
1038
+ if (match) {
1039
+ seconds = Number.parseInt(match[1], 10);
1040
+ }
1041
+ }
1042
+ else {
1043
+ const errorResponse = error.error;
1044
+ const regex = /(\d{2}):\d{2}/;
1045
+ const match = regex.exec(errorResponse.message);
1046
+ if (match && match.length > 1) {
1047
+ const timeParts = match[0].split(':');
1048
+ seconds = Number.parseInt(timeParts[1], 10);
1049
+ }
1050
+ }
1051
+ if (seconds) {
1019
1052
  this.reloadTimer$.next(seconds);
1020
1053
  }
1021
1054
  else {
1022
- this.phoneControl.setErrors({ serverResponse: errorResponse.errors?.['phone'] ?? [errorResponse.message] });
1055
+ this.phoneControl.setErrors({ serverResponse: ['Неизвестная ошибка, попробуйте позже.'] });
1023
1056
  }
1024
1057
  }
1025
1058
  return of(false);
@@ -1539,17 +1572,31 @@ class ScSignInFormByPhoneComponent {
1539
1572
  /**
1540
1573
  * {@link Observable} запроса данных аутентификации.
1541
1574
  */
1542
- this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), switchMap((value) => this.authService.getSignIn$(value).pipe(catchError((error) => {
1575
+ this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), switchMap((value) => this.authService.getSignIn$(value).pipe(
1576
+ // eslint-disable-next-line sonarjs/cognitive-complexity
1577
+ catchError((error) => {
1543
1578
  if (error instanceof HttpErrorResponse) {
1544
- const { errors, message } = error.error;
1545
- for (const key in errors) {
1546
- if (Object.hasOwn(errors, key)) {
1547
- // eslint-disable-next-line security/detect-object-injection
1548
- this.form.get(key)?.setErrors({ serverResponse: errors[key] });
1579
+ if ('error' in error.error) {
1580
+ const errorResponse = error.error;
1581
+ if (errorResponse.error.includes('invalid_credentials')) {
1582
+ this.form.setErrors({ serverResponse: ['Неверный код подтверждения.'] });
1583
+ }
1584
+ else {
1585
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1586
+ this.form.setErrors({ serverResponse: [errorResponse.errorDescription ?? errorResponse.error] });
1549
1587
  }
1550
1588
  }
1551
- if (!errors && message) {
1552
- this.form.setErrors({ serverResponse: [message] });
1589
+ else {
1590
+ const { errors, message } = error.error;
1591
+ for (const key in errors) {
1592
+ if (Object.hasOwn(errors, key)) {
1593
+ // eslint-disable-next-line security/detect-object-injection
1594
+ this.form.get(key)?.setErrors({ serverResponse: errors[key] });
1595
+ }
1596
+ }
1597
+ if (!errors && message) {
1598
+ this.form.setErrors({ serverResponse: [message] });
1599
+ }
1553
1600
  }
1554
1601
  }
1555
1602
  return of({});
@@ -1583,7 +1630,7 @@ class ScSignInFormByEmailComponent {
1583
1630
  * Группа полей ввода для формы «Вход на сайт».
1584
1631
  */
1585
1632
  this.formByEmail = new FormGroup({
1586
- login: new FormControl(null, [Validators.required, Validators.email]),
1633
+ username: new FormControl(null, [Validators.required, Validators.email]),
1587
1634
  password: new FormControl(null, Validators.required),
1588
1635
  });
1589
1636
  /**
@@ -1593,17 +1640,31 @@ class ScSignInFormByEmailComponent {
1593
1640
  /**
1594
1641
  * {@link Observable} запроса данных аутентификации.
1595
1642
  */
1596
- this.emailRequest$ = this.onSubmit.pipe(filter(() => this.formByEmail.valid), map(() => this.formByEmail.value), switchMap((value) => this.authService.getSignIn$(value).pipe(catchError((error) => {
1643
+ this.emailRequest$ = this.onSubmit.pipe(filter(() => this.formByEmail.valid), map(() => this.formByEmail.value), switchMap((value) => this.authService.getSignIn$(value).pipe(
1644
+ // eslint-disable-next-line sonarjs/cognitive-complexity
1645
+ catchError((error) => {
1597
1646
  if (error instanceof HttpErrorResponse) {
1598
- const { errors, message } = error.error;
1599
- for (const key in errors) {
1600
- if (Object.hasOwn(errors, key)) {
1601
- // eslint-disable-next-line security/detect-object-injection
1602
- this.formByEmail.get(key)?.setErrors({ serverResponse: errors[key] });
1647
+ if ('error' in error.error) {
1648
+ const errorResponse = error.error;
1649
+ if (errorResponse.error.includes('invalid_credentials')) {
1650
+ this.formByEmail.setErrors({ serverResponse: ['Пользователь с указанными учетными данными не найден. Проверьте правильность ввода.'] });
1651
+ }
1652
+ else {
1653
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1654
+ this.formByEmail.setErrors({ serverResponse: [errorResponse.errorDescription ?? errorResponse.error] });
1603
1655
  }
1604
1656
  }
1605
- if (!errors && message) {
1606
- this.formByEmail.setErrors({ serverResponse: [message] });
1657
+ else {
1658
+ const { errors, message } = error.error;
1659
+ for (const key in errors) {
1660
+ if (Object.hasOwn(errors, key)) {
1661
+ // eslint-disable-next-line security/detect-object-injection
1662
+ this.formByEmail.get(key)?.setErrors({ serverResponse: errors[key] });
1663
+ }
1664
+ }
1665
+ if (!errors && message) {
1666
+ this.formByEmail.setErrors({ serverResponse: [message] });
1667
+ }
1607
1668
  }
1608
1669
  }
1609
1670
  return of({});
@@ -1618,11 +1679,11 @@ class ScSignInFormByEmailComponent {
1618
1679
  this.forgotPassword = new EventEmitter();
1619
1680
  }
1620
1681
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
1621
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form\n [formGroup]=\"formByEmail\"\n (ngSubmit)=\"onSubmit.next()\"\n>\n <div class=\"mb-8 flex flex-col gap-4\">\n <label tuiLabel\n >\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\n tuiTextfieldLegacy\n autocomplete=\"email\"\n />\n </tui-input>\n <tui-error\n formControlName=\"login\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"current-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"mb-4 flex flex-col items-center gap-4\">\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"forgotPassword.emit()\"\n class=\"text-base\"\n >\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a\n >\n <button\n tuiButton\n type=\"submit\"\n [loading]=\"!!(loadingEmailAuth$ | async)\"\n [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\"\n iconStart=\"@tui.sc.circle-arrow-in-right\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "component", type: i3.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i1$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i1$1.TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: i2$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1682
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form\n [formGroup]=\"formByEmail\"\n (ngSubmit)=\"onSubmit.next()\"\n>\n <div class=\"mb-8 flex flex-col gap-4\">\n <label tuiLabel\n >\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=\"username\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input\n tuiTextfieldLegacy\n autocomplete=\"email\"\n />\n </tui-input>\n <tui-error\n formControlName=\"username\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"current-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"mb-4 flex flex-col items-center gap-4\">\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"forgotPassword.emit()\"\n class=\"text-base\"\n >\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a\n >\n <button\n tuiButton\n type=\"submit\"\n [loading]=\"!!(loadingEmailAuth$ | async)\"\n [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\"\n iconStart=\"@tui.sc.circle-arrow-in-right\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "component", type: i3.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i1$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i1$1.TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: i2$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1622
1683
  }
1623
1684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
1624
1685
  type: Component,
1625
- args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"formByEmail\"\n (ngSubmit)=\"onSubmit.next()\"\n>\n <div class=\"mb-8 flex flex-col gap-4\">\n <label tuiLabel\n >\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\n tuiTextfieldLegacy\n autocomplete=\"email\"\n />\n </tui-input>\n <tui-error\n formControlName=\"login\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"current-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"mb-4 flex flex-col items-center gap-4\">\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"forgotPassword.emit()\"\n class=\"text-base\"\n >\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a\n >\n <button\n tuiButton\n type=\"submit\"\n [loading]=\"!!(loadingEmailAuth$ | async)\"\n [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\"\n iconStart=\"@tui.sc.circle-arrow-in-right\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
1686
+ args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"formByEmail\"\n (ngSubmit)=\"onSubmit.next()\"\n>\n <div class=\"mb-8 flex flex-col gap-4\">\n <label tuiLabel\n >\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=\"username\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input\n tuiTextfieldLegacy\n autocomplete=\"email\"\n />\n </tui-input>\n <tui-error\n formControlName=\"username\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"current-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"mb-4 flex flex-col items-center gap-4\">\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"forgotPassword.emit()\"\n class=\"text-base\"\n >\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a\n >\n <button\n tuiButton\n type=\"submit\"\n [loading]=\"!!(loadingEmailAuth$ | async)\"\n [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\"\n iconStart=\"@tui.sc.circle-arrow-in-right\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
1626
1687
  }], ctorParameters: () => [{ type: i1.ScAuthService }], propDecorators: { forgotPassword: [{
1627
1688
  type: Output
1628
1689
  }] } });
@@ -7785,5 +7846,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7785
7846
  * Generated bundle index. Do not edit.
7786
7847
  */
7787
7848
 
7788
- export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, FilesAndDocumentsComponent, FilesAndDocumentsModule, FinishDateTimeTransformerDirective, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_DATE_FORMATTER, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_PAGE_SIZE_OPTIONS$1 as SC_PAGE_SIZE_OPTIONS, SC_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
7849
+ export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, FilesAndDocumentsComponent, FilesAndDocumentsModule, FinishDateTimeTransformerDirective, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_DATE_FORMATTER, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_PAGE_SIZE_OPTIONS$1 as SC_PAGE_SIZE_OPTIONS, SC_PHONE_APPROVE_CODE_SENDER, SC_PHONE_APPROVE_CODE_SENDER_PROVIDER, SC_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
7789
7850
  //# sourceMappingURL=snabcentr-client-ui.mjs.map