@snabcentr/client-ui 3.36.0 → 3.37.0

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';
@@ -229,6 +229,22 @@ const scPhoneVerificationCodeMask = {
229
229
  */
230
230
  const SC_VERIFICATION_CODE_TIMEOUT = tuiCreateToken(60);
231
231
 
232
+ /**
233
+ * Токен для получения кода подтверждения телефона.
234
+ * Позволяет подключать внешнюю логику получения кода подтверждения.
235
+ */
236
+ const SC_PHONE_APPROVE_CODE_SENDER = new InjectionToken('SC_PHONE_APPROVE_CODE_SENDER');
237
+
238
+ /**
239
+ * Провайдер по умолчанию для получения кода подтверждения телефона.
240
+ * Использует ScVerificationService для отправки кода.
241
+ */
242
+ const SC_PHONE_APPROVE_CODE_SENDER_PROVIDER = {
243
+ provide: SC_PHONE_APPROVE_CODE_SENDER,
244
+ useFactory: (verificationService) => (phoneNumber) => verificationService.sendPhoneApproveCode(phoneNumber),
245
+ deps: [ScVerificationService],
246
+ };
247
+
232
248
  /* eslint-disable lodash/prefer-lodash-method */
233
249
  /**
234
250
  * Директива для перехода по нажатию клавиши enter на следующее поле ввода формы.
@@ -938,6 +954,10 @@ class ScVerificationPhoneCheckFormComponent {
938
954
  * Сервис верификации.
939
955
  */
940
956
  this.verificationService = inject(ScVerificationService);
957
+ /**
958
+ * Функция отправки кода подтверждения телефона.
959
+ */
960
+ this.sendPhoneApproveCode = inject(SC_PHONE_APPROVE_CODE_SENDER);
941
961
  /**
942
962
  * Директива c `FormGroup` из DOM.
943
963
  */
@@ -1005,20 +1025,33 @@ class ScVerificationPhoneCheckFormComponent {
1005
1025
  /**
1006
1026
  * {@link Observable} запроса данных получения кода подтверждения.
1007
1027
  */
1008
- this.loadingApproveCode$ = this.onSendCode.pipe(map(() => this.phoneControl.value), filter((value) => this.phoneControl.valid), switchMap((value) => this.verificationService.sendPhoneApproveCode(value).pipe(tap(() => {
1028
+ this.loadingApproveCode$ = this.onSendCode.pipe(map(() => this.phoneControl.value), filter((value) => this.phoneControl.valid), switchMap((value) => this.sendPhoneApproveCode(value).pipe(tap(() => {
1009
1029
  this.reloadTimer$.next(this.codeTimeout);
1010
1030
  }), map(() => false), catchError((error) => {
1011
1031
  if (error instanceof HttpErrorResponse) {
1012
- const errorResponse = error.error;
1013
- const regex = /(\d{2}):\d{2}/;
1014
- const match = regex.exec(errorResponse.message);
1015
- if (match && match.length > 1) {
1016
- const timeParts = match[0].split(':');
1017
- const seconds = Number.parseInt(timeParts[1], 10);
1032
+ let seconds = null;
1033
+ if ('error' in error.error) {
1034
+ const errorResponse = error.error;
1035
+ const regex = /(\d{1,3})\s+seconds/;
1036
+ const match = regex.exec(errorResponse.error);
1037
+ if (match) {
1038
+ seconds = Number.parseInt(match[1], 10);
1039
+ }
1040
+ }
1041
+ else {
1042
+ const errorResponse = error.error;
1043
+ const regex = /(\d{2}):\d{2}/;
1044
+ const match = regex.exec(errorResponse.message);
1045
+ if (match && match.length > 1) {
1046
+ const timeParts = match[0].split(':');
1047
+ seconds = Number.parseInt(timeParts[1], 10);
1048
+ }
1049
+ }
1050
+ if (seconds) {
1018
1051
  this.reloadTimer$.next(seconds);
1019
1052
  }
1020
1053
  else {
1021
- this.phoneControl.setErrors({ serverResponse: errorResponse.errors?.['phone'] ?? [errorResponse.message] });
1054
+ this.phoneControl.setErrors({ serverResponse: ['Неизвестная ошибка, попробуйте позже.'] });
1022
1055
  }
1023
1056
  }
1024
1057
  return of(false);
@@ -1538,17 +1571,31 @@ class ScSignInFormByPhoneComponent {
1538
1571
  /**
1539
1572
  * {@link Observable} запроса данных аутентификации.
1540
1573
  */
1541
- this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), switchMap((value) => this.authService.getSignIn$(value).pipe(catchError((error) => {
1574
+ this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), switchMap((value) => this.authService.getSignIn$(value).pipe(
1575
+ // eslint-disable-next-line sonarjs/cognitive-complexity
1576
+ catchError((error) => {
1542
1577
  if (error instanceof HttpErrorResponse) {
1543
- const { errors, message } = error.error;
1544
- for (const key in errors) {
1545
- if (Object.hasOwn(errors, key)) {
1546
- // eslint-disable-next-line security/detect-object-injection
1547
- this.form.get(key)?.setErrors({ serverResponse: errors[key] });
1578
+ if ('error' in error.error) {
1579
+ const errorResponse = error.error;
1580
+ if (errorResponse.error.includes('invalid_credentials')) {
1581
+ this.form.setErrors({ serverResponse: ['Неверный код подтверждения.'] });
1582
+ }
1583
+ else {
1584
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1585
+ this.form.setErrors({ serverResponse: [errorResponse.errorDescription ?? errorResponse.error] });
1548
1586
  }
1549
1587
  }
1550
- if (!errors && message) {
1551
- this.form.setErrors({ serverResponse: [message] });
1588
+ else {
1589
+ const { errors, message } = error.error;
1590
+ for (const key in errors) {
1591
+ if (Object.hasOwn(errors, key)) {
1592
+ // eslint-disable-next-line security/detect-object-injection
1593
+ this.form.get(key)?.setErrors({ serverResponse: errors[key] });
1594
+ }
1595
+ }
1596
+ if (!errors && message) {
1597
+ this.form.setErrors({ serverResponse: [message] });
1598
+ }
1552
1599
  }
1553
1600
  }
1554
1601
  return of({});
@@ -1582,7 +1629,7 @@ class ScSignInFormByEmailComponent {
1582
1629
  * Группа полей ввода для формы «Вход на сайт».
1583
1630
  */
1584
1631
  this.formByEmail = new FormGroup({
1585
- login: new FormControl(null, [Validators.required, Validators.email]),
1632
+ username: new FormControl(null, [Validators.required, Validators.email]),
1586
1633
  password: new FormControl(null, Validators.required),
1587
1634
  });
1588
1635
  /**
@@ -1592,17 +1639,31 @@ class ScSignInFormByEmailComponent {
1592
1639
  /**
1593
1640
  * {@link Observable} запроса данных аутентификации.
1594
1641
  */
1595
- this.emailRequest$ = this.onSubmit.pipe(filter(() => this.formByEmail.valid), map(() => this.formByEmail.value), switchMap((value) => this.authService.getSignIn$(value).pipe(catchError((error) => {
1642
+ this.emailRequest$ = this.onSubmit.pipe(filter(() => this.formByEmail.valid), map(() => this.formByEmail.value), switchMap((value) => this.authService.getSignIn$(value).pipe(
1643
+ // eslint-disable-next-line sonarjs/cognitive-complexity
1644
+ catchError((error) => {
1596
1645
  if (error instanceof HttpErrorResponse) {
1597
- const { errors, message } = error.error;
1598
- for (const key in errors) {
1599
- if (Object.hasOwn(errors, key)) {
1600
- // eslint-disable-next-line security/detect-object-injection
1601
- this.formByEmail.get(key)?.setErrors({ serverResponse: errors[key] });
1646
+ if ('error' in error.error) {
1647
+ const errorResponse = error.error;
1648
+ if (errorResponse.error.includes('invalid_credentials')) {
1649
+ this.formByEmail.setErrors({ serverResponse: ['Пользователь с указанными учетными данными не найден. Проверьте правильность ввода.'] });
1650
+ }
1651
+ else {
1652
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1653
+ this.formByEmail.setErrors({ serverResponse: [errorResponse.errorDescription ?? errorResponse.error] });
1602
1654
  }
1603
1655
  }
1604
- if (!errors && message) {
1605
- this.formByEmail.setErrors({ serverResponse: [message] });
1656
+ else {
1657
+ const { errors, message } = error.error;
1658
+ for (const key in errors) {
1659
+ if (Object.hasOwn(errors, key)) {
1660
+ // eslint-disable-next-line security/detect-object-injection
1661
+ this.formByEmail.get(key)?.setErrors({ serverResponse: errors[key] });
1662
+ }
1663
+ }
1664
+ if (!errors && message) {
1665
+ this.formByEmail.setErrors({ serverResponse: [message] });
1666
+ }
1606
1667
  }
1607
1668
  }
1608
1669
  return of({});
@@ -1617,11 +1678,11 @@ class ScSignInFormByEmailComponent {
1617
1678
  this.forgotPassword = new EventEmitter();
1618
1679
  }
1619
1680
  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 }); }
1620
- 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 }); }
1681
+ 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 }); }
1621
1682
  }
1622
1683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
1623
1684
  type: Component,
1624
- 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" }]
1685
+ 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" }]
1625
1686
  }], ctorParameters: () => [{ type: i1.ScAuthService }], propDecorators: { forgotPassword: [{
1626
1687
  type: Output
1627
1688
  }] } });
@@ -7782,5 +7843,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7782
7843
  * Generated bundle index. Do not edit.
7783
7844
  */
7784
7845
 
7785
- 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 };
7846
+ 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 };
7786
7847
  //# sourceMappingURL=snabcentr-client-ui.mjs.map