@snabcentr/client-ui 0.19.0 → 1.18.1
Sign up to get free protection for your applications and to get access to all the features.
- package/auth/sc-sign-in-form/sc-sign-in-form-by-email/sc-sign-in-form-by-email.component.d.ts +8 -4
- package/auth/sc-sign-in-form/sc-sign-in-form-by-phone/sc-sign-in-form-by-phone.component.d.ts +8 -3
- package/auth/sc-sign-in-form/sc-sign-in-form.component.d.ts +4 -8
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-email/sc-sign-in-form-by-email.component.mjs +16 -4
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-phone/sc-sign-in-form-by-phone.component.mjs +16 -4
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form.component.mjs +6 -24
- package/esm2020/banner/sc-banner.component.mjs +2 -4
- package/fesm2015/snabcentr-client-ui.mjs +36 -33
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +36 -33
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +2 -2
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, NgModule, Directive, HostBinding, ContentChild, ViewChild, Injectable, ElementRef, ContentChildren, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, SkipSelf, forwardRef } from '@angular/core';
|
3
|
-
import * as i1 from '@snabcentr/client-core';
|
4
|
-
import { ScUserMetrikaGoalsEnum, SC_URLS, SC_PATH_IMAGE_NOT_FOUND, SEARCH_TERM, SEARCH_TERM_PROVIDERS, ScCatalogService, ScCartService, ScAuthService, ScISuggestionType, ScOpfList, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
|
5
3
|
import * as i10 from 'rxjs';
|
6
4
|
import { Subject, filter, map, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge, throwError, combineLatest } from 'rxjs';
|
5
|
+
import * as i1 from '@snabcentr/client-core';
|
6
|
+
import { ScUserMetrikaGoalsEnum, SC_URLS, SC_PATH_IMAGE_NOT_FOUND, SEARCH_TERM, SEARCH_TERM_PROVIDERS, ScCatalogService, ScCartService, ScAuthService, ScISuggestionType, ScOpfList, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
|
7
7
|
import * as i2 from '@angular/common';
|
8
8
|
import { CommonModule } from '@angular/common';
|
9
9
|
import * as i4 from '@taiga-ui/core';
|
@@ -288,9 +288,11 @@ class ScSignInFormByPhoneComponent {
|
|
288
288
|
* Инициализирует экземпляр класса {@link ScSignInFormByPhoneComponent}.
|
289
289
|
*
|
290
290
|
* @param authService Сервис аутентификации.
|
291
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
291
292
|
*/
|
292
|
-
constructor(authService) {
|
293
|
+
constructor(authService, userMetrikaService) {
|
293
294
|
this.authService = authService;
|
295
|
+
this.userMetrikaService = userMetrikaService;
|
294
296
|
/**
|
295
297
|
* Наличие кода подтверждения у пользователя.
|
296
298
|
*/
|
@@ -324,13 +326,22 @@ class ScSignInFormByPhoneComponent {
|
|
324
326
|
*/
|
325
327
|
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
326
328
|
}
|
329
|
+
/** @inheritDoc */
|
330
|
+
ngOnInit() {
|
331
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
332
|
+
target: ScUserMetrikaGoalsEnum.signInShow,
|
333
|
+
params: {
|
334
|
+
type: 'phone',
|
335
|
+
},
|
336
|
+
});
|
337
|
+
}
|
327
338
|
}
|
328
|
-
ScSignInFormByPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
339
|
+
ScSignInFormByPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, deps: [{ token: i1.ScAuthService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
|
329
340
|
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]=\"form\" *tuiLet=\"!!(loading$ | async) as loading\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4 items-center mb-4\">\n <sc-verification-phone-check-form [(haveCode)]=\"haveCode\" [shouldBeBusy]=\"true\" [shouldBeConfirmed]=\"true\" class=\"w-full\"></sc-verification-phone-check-form>\n <button *ngIf=\"haveCode\" tuiButton type=\"submit\" [showLoader]=\"loading\" [disabled]=\"form.invalid || loading\" icon=\"scIconLogIn\">\u0412\u043E\u0439\u0442\u0438</button>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
330
341
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, decorators: [{
|
331
342
|
type: Component,
|
332
343
|
args: [{ selector: 'sc-sign-in-form-by-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" *tuiLet=\"!!(loading$ | async) as loading\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4 items-center mb-4\">\n <sc-verification-phone-check-form [(haveCode)]=\"haveCode\" [shouldBeBusy]=\"true\" [shouldBeConfirmed]=\"true\" class=\"w-full\"></sc-verification-phone-check-form>\n <button *ngIf=\"haveCode\" tuiButton type=\"submit\" [showLoader]=\"loading\" [disabled]=\"form.invalid || loading\" icon=\"scIconLogIn\">\u0412\u043E\u0439\u0442\u0438</button>\n</form>\n" }]
|
333
|
-
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; } });
|
344
|
+
}], ctorParameters: function () { return [{ type: i1.ScAuthService }, { type: i1.ScUserMetrikaService }]; } });
|
334
345
|
|
335
346
|
/**
|
336
347
|
* Компонент аутентификации по адресу электронной почты и паролю.
|
@@ -340,9 +351,11 @@ class ScSignInFormByEmailComponent {
|
|
340
351
|
* Инициализирует экземпляр класса {@link ScSignInFormByEmailComponent}.
|
341
352
|
*
|
342
353
|
* @param authService Сервис аутентификации.
|
354
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
343
355
|
*/
|
344
|
-
constructor(authService) {
|
356
|
+
constructor(authService, userMetrikaService) {
|
345
357
|
this.authService = authService;
|
358
|
+
this.userMetrikaService = userMetrikaService;
|
346
359
|
/**
|
347
360
|
* Группа полей ввода для формы «Вход на сайт».
|
348
361
|
*/
|
@@ -376,13 +389,22 @@ class ScSignInFormByEmailComponent {
|
|
376
389
|
*/
|
377
390
|
this.forgotPassword = new EventEmitter();
|
378
391
|
}
|
392
|
+
/** @inheritDoc */
|
393
|
+
ngOnInit() {
|
394
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
395
|
+
target: ScUserMetrikaGoalsEnum.signInShow,
|
396
|
+
params: {
|
397
|
+
type: 'email',
|
398
|
+
},
|
399
|
+
});
|
400
|
+
}
|
379
401
|
}
|
380
|
-
ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
402
|
+
ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
|
381
403
|
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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i4$1.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.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: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
382
404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
|
383
405
|
type: Component,
|
384
406
|
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" }]
|
385
|
-
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { forgotPassword: [{
|
407
|
+
}], ctorParameters: function () { return [{ type: i1.ScAuthService }, { type: i1.ScUserMetrikaService }]; }, propDecorators: { forgotPassword: [{
|
386
408
|
type: Output
|
387
409
|
}] } });
|
388
410
|
|
@@ -394,11 +416,9 @@ class ScSignInFormComponent {
|
|
394
416
|
* Инициализирует экземпляр класса {@link ScSignInFormComponent}.
|
395
417
|
*
|
396
418
|
* @param authService Сервис аутентификации.
|
397
|
-
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
398
419
|
*/
|
399
|
-
constructor(authService
|
420
|
+
constructor(authService) {
|
400
421
|
this.authService = authService;
|
401
|
-
this.userMetrikaService = userMetrikaService;
|
402
422
|
/**
|
403
423
|
* Выбранный способ аутентификации.
|
404
424
|
*/
|
@@ -420,15 +440,6 @@ class ScSignInFormComponent {
|
|
420
440
|
*/
|
421
441
|
this.successAuth = this.authService.getAuthChange().pipe(filter((state) => state));
|
422
442
|
}
|
423
|
-
/** @inheritDoc */
|
424
|
-
ngOnInit() {
|
425
|
-
this.userMetrikaService.emitUserMetrikaEvent({
|
426
|
-
target: ScUserMetrikaGoalsEnum.signInShow,
|
427
|
-
params: {
|
428
|
-
type: this.authMethod,
|
429
|
-
},
|
430
|
-
});
|
431
|
-
}
|
432
443
|
/**
|
433
444
|
* Осуществляет переключение способов аутентификации.
|
434
445
|
*
|
@@ -436,12 +447,6 @@ class ScSignInFormComponent {
|
|
436
447
|
*/
|
437
448
|
switchAuth(authMethod) {
|
438
449
|
this.authMethod = authMethod;
|
439
|
-
this.userMetrikaService.emitUserMetrikaEvent({
|
440
|
-
target: ScUserMetrikaGoalsEnum.signInShow,
|
441
|
-
params: {
|
442
|
-
type: authMethod,
|
443
|
-
},
|
444
|
-
});
|
445
450
|
}
|
446
451
|
/**
|
447
452
|
* Обрабатывает нажатие на кнопку "Забыли пароль" и выдает сигнал об этом.
|
@@ -450,12 +455,12 @@ class ScSignInFormComponent {
|
|
450
455
|
this.forgotPassword.emit();
|
451
456
|
}
|
452
457
|
}
|
453
|
-
ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }
|
454
|
-
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=\"
|
458
|
+
ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
459
|
+
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 (click)=\"switchAuth(method.byPhone)\"\n class=\"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 (click)=\"switchAuth(method.byEmail)\"\n class=\"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: i2.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 });
|
455
460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, decorators: [{
|
456
461
|
type: Component,
|
457
|
-
args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"
|
458
|
-
}], ctorParameters: function () { return [{ type: i1.ScAuthService }
|
462
|
+
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 (click)=\"switchAuth(method.byPhone)\"\n class=\"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 (click)=\"switchAuth(method.byEmail)\"\n class=\"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" }]
|
463
|
+
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { authMethod: [{
|
459
464
|
type: Input
|
460
465
|
}], forgotPassword: [{
|
461
466
|
type: Output
|
@@ -887,9 +892,7 @@ let ScBannerComponent = class ScBannerComponent {
|
|
887
892
|
onClick(banner) {
|
888
893
|
this.userMetrikaService.emitUserMetrikaEvent({
|
889
894
|
target: ScUserMetrikaGoalsEnum.bannerClick,
|
890
|
-
params: {
|
891
|
-
banner_id: banner.id,
|
892
|
-
},
|
895
|
+
params: { banner_id: banner.id },
|
893
896
|
});
|
894
897
|
if (banner.url) {
|
895
898
|
this.clickBannerEvent.emit(banner);
|