@snabcentr/client-ui 0.29.1 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- package/contacts/add-contact-dialog/sc-add-contact-dialog.component.d.ts +8 -3
- package/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.d.ts +9 -4
- package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +8 -3
- package/esm2020/contacts/add-contact-dialog/sc-add-contact-dialog.component.mjs +13 -4
- package/esm2020/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.mjs +13 -5
- package/esm2020/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +13 -5
- package/esm2020/user/update-user-info-dialog/sc-update-user-info-dialog.component.mjs +27 -17
- package/esm2020/user/user-phone-approve-dialog/sc-user-phone-approve-dialog.component.mjs +13 -4
- package/fesm2015/snabcentr-client-ui.mjs +66 -24
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +66 -24
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/user/update-user-info-dialog/sc-update-user-info-dialog.component.d.ts +11 -7
- package/user/user-phone-approve-dialog/sc-user-phone-approve-dialog.component.d.ts +9 -4
@@ -1477,11 +1477,13 @@ class ScAddContactDialogComponent {
|
|
1477
1477
|
*
|
1478
1478
|
* @param contactsService Сервис для работы с контактными лицами.
|
1479
1479
|
* @param convertersService Сервис конвертации данных.
|
1480
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
1480
1481
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
1481
1482
|
*/
|
1482
|
-
constructor(contactsService, convertersService, context) {
|
1483
|
+
constructor(contactsService, convertersService, userMetrikaService, context) {
|
1483
1484
|
this.contactsService = contactsService;
|
1484
1485
|
this.convertersService = convertersService;
|
1486
|
+
this.userMetrikaService = userMetrikaService;
|
1485
1487
|
this.context = context;
|
1486
1488
|
/**
|
1487
1489
|
* Группа с полями контактного лица.
|
@@ -1524,14 +1526,20 @@ class ScAddContactDialogComponent {
|
|
1524
1526
|
*/
|
1525
1527
|
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
1526
1528
|
}
|
1529
|
+
/** @inheritdoc */
|
1530
|
+
ngAfterViewInit() {
|
1531
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
1532
|
+
target: ScUserMetrikaGoalsEnum.userProfileContactAddShow,
|
1533
|
+
});
|
1534
|
+
}
|
1527
1535
|
}
|
1528
|
-
ScAddContactDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContactDialogComponent, deps: [{ token: i1.ScContactsService }, { token: i1.ScConvertersService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
|
1536
|
+
ScAddContactDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContactDialogComponent, deps: [{ token: i1.ScContactsService }, { token: i1.ScConvertersService }, { token: i1.ScUserMetrikaService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
|
1529
1537
|
ScAddContactDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContactDialogComponent, selector: "sc-add-contact-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contact-form [form]=\"form\"></sc-new-contact-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ 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: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1530
1538
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContactDialogComponent, decorators: [{
|
1531
1539
|
type: Component,
|
1532
1540
|
args: [{ selector: 'sc-add-contact-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contact-form [form]=\"form\"></sc-new-contact-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n" }]
|
1533
1541
|
}], ctorParameters: function () {
|
1534
|
-
return [{ type: i1.ScContactsService }, { type: i1.ScConvertersService }, { type: undefined, decorators: [{
|
1542
|
+
return [{ type: i1.ScContactsService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }, { type: undefined, decorators: [{
|
1535
1543
|
type: Inject,
|
1536
1544
|
args: [POLYMORPHEUS_CONTEXT]
|
1537
1545
|
}] }];
|
@@ -1695,13 +1703,15 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
1695
1703
|
* @param referencesService Сервис справочников.
|
1696
1704
|
* @param contragentService Сервис работы с контрагентами.
|
1697
1705
|
* @param convertersService Сервис конвертации данных.
|
1706
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
1698
1707
|
* @param locationsService
|
1699
1708
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
1700
1709
|
*/
|
1701
|
-
constructor(referencesService, contragentService, convertersService, locationsService, context) {
|
1710
|
+
constructor(referencesService, contragentService, convertersService, userMetrikaService, locationsService, context) {
|
1702
1711
|
this.referencesService = referencesService;
|
1703
1712
|
this.contragentService = contragentService;
|
1704
1713
|
this.convertersService = convertersService;
|
1714
|
+
this.userMetrikaService = userMetrikaService;
|
1705
1715
|
this.locationsService = locationsService;
|
1706
1716
|
this.context = context;
|
1707
1717
|
/**
|
@@ -1752,6 +1762,12 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
1752
1762
|
*/
|
1753
1763
|
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
1754
1764
|
}
|
1765
|
+
/** @inheritdoc */
|
1766
|
+
ngAfterViewInit() {
|
1767
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
1768
|
+
target: ScUserMetrikaGoalsEnum.userProfileContragentAddShow,
|
1769
|
+
});
|
1770
|
+
}
|
1755
1771
|
/**
|
1756
1772
|
* Текущий выбранный ОПФ.
|
1757
1773
|
*/
|
@@ -1910,7 +1926,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
|
|
1910
1926
|
this.contacts.removeAt(index);
|
1911
1927
|
}
|
1912
1928
|
};
|
1913
|
-
ScAddContragentDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, deps: [{ token: i1.ScReferencesService }, { token: i1.ScContragentService }, { token: i1.ScConvertersService }, { token: i1.ScLocationsService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1929
|
+
ScAddContragentDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, deps: [{ token: i1.ScReferencesService }, { token: i1.ScContragentService }, { token: i1.ScConvertersService }, { token: i1.ScUserMetrikaService }, { token: i1.ScLocationsService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1914
1930
|
ScAddContragentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentDialogComponent, selector: "sc-add-contragent-dialog", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-4\"\n>\n <tui-elastic-container>\n <sc-new-contragent-form [class.!hidden]=\"stepIndex !== 0\"></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 1\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex - 1) % 3\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"stepIndex === 0\"\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n *ngIf=\"stepIndex === 2 || (stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']); else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n [disabled]=\"!canNextStep()\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex + 1) % 3\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"], dependencies: [{ 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: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1915
1931
|
ScAddContragentDialogComponent = __decorate([
|
1916
1932
|
UntilDestroy({ checkProperties: true })
|
@@ -1919,7 +1935,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1919
1935
|
type: Component,
|
1920
1936
|
args: [{ selector: 'sc-add-contragent-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-4\"\n>\n <tui-elastic-container>\n <sc-new-contragent-form [class.!hidden]=\"stepIndex !== 0\"></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 1\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n [appearance]=\"'secondary'\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex - 1) % 3\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"stepIndex === 0\"\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n *ngIf=\"stepIndex === 2 || (stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']); else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n [disabled]=\"!canNextStep()\"\n type=\"button\"\n (click)=\"stepIndex = (stepIndex + 1) % 3\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
|
1921
1937
|
}], ctorParameters: function () {
|
1922
|
-
return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
|
1938
|
+
return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
|
1923
1939
|
type: Optional
|
1924
1940
|
}, {
|
1925
1941
|
type: Inject,
|
@@ -3826,11 +3842,13 @@ class ScAddDeliveryAddressDialogComponent {
|
|
3826
3842
|
* Инициализирует экземпляр класса {@link ScAddDeliveryAddressDialogComponent}.
|
3827
3843
|
*
|
3828
3844
|
* @param deliveryAddressService Сервис работы с адресами доставки.
|
3845
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
3829
3846
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
3830
3847
|
* @param convertersService Сервис конвертации данных.
|
3831
3848
|
*/
|
3832
|
-
constructor(deliveryAddressService, context, convertersService) {
|
3849
|
+
constructor(deliveryAddressService, userMetrikaService, context, convertersService) {
|
3833
3850
|
this.deliveryAddressService = deliveryAddressService;
|
3851
|
+
this.userMetrikaService = userMetrikaService;
|
3834
3852
|
this.context = context;
|
3835
3853
|
this.convertersService = convertersService;
|
3836
3854
|
/**
|
@@ -3880,14 +3898,20 @@ class ScAddDeliveryAddressDialogComponent {
|
|
3880
3898
|
}),
|
3881
3899
|
});
|
3882
3900
|
}
|
3901
|
+
/** @inheritdoc */
|
3902
|
+
ngAfterViewInit() {
|
3903
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
3904
|
+
target: ScUserMetrikaGoalsEnum.userProfileDeliveryAddressAddShow,
|
3905
|
+
});
|
3906
|
+
}
|
3883
3907
|
}
|
3884
|
-
ScAddDeliveryAddressDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, deps: [{ token: i1.ScDeliveryAddressService }, { token: POLYMORPHEUS_CONTEXT }, { token: i1.ScConvertersService }], target: i0.ɵɵFactoryTarget.Component });
|
3908
|
+
ScAddDeliveryAddressDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, deps: [{ token: i1.ScDeliveryAddressService }, { token: i1.ScUserMetrikaService }, { token: POLYMORPHEUS_CONTEXT }, { token: i1.ScConvertersService }], target: i0.ɵɵFactoryTarget.Component });
|
3885
3909
|
ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex flex-col gap-3\"\n>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.address\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <div\n formGroupName=\"contact\"\n class=\"flex grow flex-col gap-2\"\n >\n <p class=\"w-full font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.fio\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\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=\"email\">\n <input\n tuiTextfield\n type=\"email\"\n />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error\n formControlName=\"position\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n [icon]=\"isMobile ? 'tuiIconX' : 'tuiIconXLarge'\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [icon]=\"isMobile ? 'tuiIconSave' : 'tuiIconSaveLarge'\"\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n</form>\n", dependencies: [{ 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: "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: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3886
3910
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, decorators: [{
|
3887
3911
|
type: Component,
|
3888
3912
|
args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex flex-col gap-3\"\n>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.address\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <div\n formGroupName=\"contact\"\n class=\"flex grow flex-col gap-2\"\n >\n <p class=\"w-full font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.fio\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\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=\"email\">\n <input\n tuiTextfield\n type=\"email\"\n />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error\n formControlName=\"position\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n [icon]=\"isMobile ? 'tuiIconX' : 'tuiIconXLarge'\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button\n tuiButton\n [icon]=\"isMobile ? 'tuiIconSave' : 'tuiIconSaveLarge'\"\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n</form>\n" }]
|
3889
3913
|
}], ctorParameters: function () {
|
3890
|
-
return [{ type: i1.ScDeliveryAddressService }, { type: undefined, decorators: [{
|
3914
|
+
return [{ type: i1.ScDeliveryAddressService }, { type: i1.ScUserMetrikaService }, { type: undefined, decorators: [{
|
3891
3915
|
type: Inject,
|
3892
3916
|
args: [POLYMORPHEUS_CONTEXT]
|
3893
3917
|
}] }, { type: i1.ScConvertersService }];
|
@@ -4772,11 +4796,13 @@ class ScUpdateUserInfoDialogComponent {
|
|
4772
4796
|
*
|
4773
4797
|
* @param user$ Поток информации о текущем пользователе.
|
4774
4798
|
* @param userService Сервис информации о пользователе.
|
4799
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
4775
4800
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
4776
4801
|
*/
|
4777
|
-
constructor(user$, userService, context) {
|
4802
|
+
constructor(user$, userService, userMetrikaService, context) {
|
4778
4803
|
this.user$ = user$;
|
4779
4804
|
this.userService = userService;
|
4805
|
+
this.userMetrikaService = userMetrikaService;
|
4780
4806
|
this.context = context;
|
4781
4807
|
/**
|
4782
4808
|
* Перечисление типов подсказок.
|
@@ -4791,7 +4817,7 @@ class ScUpdateUserInfoDialogComponent {
|
|
4791
4817
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
4792
4818
|
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)]),
|
4793
4819
|
cityId: new FormControl(null, Validators.required),
|
4794
|
-
getNews: new FormControl(false)
|
4820
|
+
getNews: new FormControl(false),
|
4795
4821
|
});
|
4796
4822
|
/**
|
4797
4823
|
* Сигнал нажатия на кнопку "Отмена".
|
@@ -4812,7 +4838,7 @@ class ScUpdateUserInfoDialogComponent {
|
|
4812
4838
|
var _a;
|
4813
4839
|
const errorResponse = error.error;
|
4814
4840
|
for (const key in errorResponse.errors) {
|
4815
|
-
(_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[
|
4841
|
+
(_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[key] });
|
4816
4842
|
}
|
4817
4843
|
if (!errorResponse.errors && errorResponse.message) {
|
4818
4844
|
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
@@ -4823,16 +4849,24 @@ class ScUpdateUserInfoDialogComponent {
|
|
4823
4849
|
* {@link Observable} изменения состояния загрузки данных аутентификации по email.
|
4824
4850
|
*/
|
4825
4851
|
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
4826
|
-
this.user$.subscribe((user) =>
|
4827
|
-
|
4828
|
-
|
4829
|
-
|
4830
|
-
|
4831
|
-
|
4832
|
-
|
4852
|
+
this.user$.subscribe((user) => {
|
4853
|
+
this.form.patchValue({
|
4854
|
+
name: user.name,
|
4855
|
+
email: user.contacts.email.value,
|
4856
|
+
phone: user.contacts.phone.value,
|
4857
|
+
cityId: user.city,
|
4858
|
+
getNews: user.getNews,
|
4859
|
+
}, { emitEvent: false });
|
4860
|
+
});
|
4861
|
+
}
|
4862
|
+
/** @inheritdoc */
|
4863
|
+
ngAfterViewInit() {
|
4864
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
4865
|
+
target: ScUserMetrikaGoalsEnum.userProfileEditShow,
|
4866
|
+
});
|
4833
4867
|
}
|
4834
4868
|
}
|
4835
|
-
ScUpdateUserInfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, deps: [{ token: SC_USER_INFO }, { token: i1.ScUserService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
4869
|
+
ScUpdateUserInfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, deps: [{ token: SC_USER_INFO }, { token: i1.ScUserService }, { token: i1.ScUserMetrikaService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
4836
4870
|
ScUpdateUserInfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUpdateUserInfoDialogComponent, selector: "sc-update-user-info-dialog", outputs: { cancelButtonClick: "cancelButtonClick", successUpdateDate: "successUpdateDate" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\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.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.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { 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: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
4837
4871
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, decorators: [{
|
4838
4872
|
type: Component,
|
@@ -4841,7 +4875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
4841
4875
|
return [{ type: i5.Observable, decorators: [{
|
4842
4876
|
type: Inject,
|
4843
4877
|
args: [SC_USER_INFO]
|
4844
|
-
}] }, { type: i1.ScUserService }, { type: undefined, decorators: [{
|
4878
|
+
}] }, { type: i1.ScUserService }, { type: i1.ScUserMetrikaService }, { type: undefined, decorators: [{
|
4845
4879
|
type: Optional
|
4846
4880
|
}, {
|
4847
4881
|
type: Inject,
|
@@ -4893,12 +4927,14 @@ let ScUserPhoneApproveDialogComponent = class ScUserPhoneApproveDialogComponent
|
|
4893
4927
|
* Инициализирует экземпляр класса {@link ScUserPhoneApproveDialogComponent}.
|
4894
4928
|
*
|
4895
4929
|
* @param verificationService Сервис верификации.
|
4930
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
4896
4931
|
* @param user$ Поток информации о текущем пользователе.
|
4897
4932
|
* @param userService Сервис информации о пользователе.
|
4898
4933
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
4899
4934
|
*/
|
4900
|
-
constructor(verificationService, user$, userService, context) {
|
4935
|
+
constructor(verificationService, userMetrikaService, user$, userService, context) {
|
4901
4936
|
this.verificationService = verificationService;
|
4937
|
+
this.userMetrikaService = userMetrikaService;
|
4902
4938
|
this.user$ = user$;
|
4903
4939
|
this.userService = userService;
|
4904
4940
|
this.context = context;
|
@@ -4945,8 +4981,14 @@ let ScUserPhoneApproveDialogComponent = class ScUserPhoneApproveDialogComponent
|
|
4945
4981
|
});
|
4946
4982
|
});
|
4947
4983
|
}
|
4984
|
+
/** @inheritdoc */
|
4985
|
+
ngAfterViewInit() {
|
4986
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
4987
|
+
target: ScUserMetrikaGoalsEnum.userProfileApprovePhoneShow,
|
4988
|
+
});
|
4989
|
+
}
|
4948
4990
|
};
|
4949
|
-
ScUserPhoneApproveDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUserPhoneApproveDialogComponent, deps: [{ token: i1.ScVerificationService }, { token: SC_USER_INFO }, { token: i1.ScUserService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
4991
|
+
ScUserPhoneApproveDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUserPhoneApproveDialogComponent, deps: [{ token: i1.ScVerificationService }, { token: i1.ScUserMetrikaService }, { token: SC_USER_INFO }, { token: i1.ScUserService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
4950
4992
|
ScUserPhoneApproveDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUserPhoneApproveDialogComponent, selector: "sc-user-phone-approve-dialog", providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<ng-container *ngIf=\"user$ | async as user\">\n <form [formGroup]=\"form\" *tuiLet=\"!!(loading$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-verification-phone-check-form\n [(haveCode)]=\"haveCode\"\n [shouldBeConfirmed]=\"false\"\n [showCodeFields]=\"!user.contacts.phone.isApproved\"\n [readOnly]=\"true\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <div *ngIf=\"user.contacts.phone.isApproved || haveCode\" class=\"flex gap-4 justify-center\">\n <button *ngIf=\"user.contacts.phone.isApproved && context\" tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" appearance=\"secondary\">\u0417\u0430\u043A\u0440\u044B\u0442\u044C</button>\n <button *ngIf=\"haveCode\" tuiButton type=\"submit\" [showLoader]=\"loadingApproveCode\" [disabled]=\"form.invalid || loadingApproveCode\" icon=\"scIconLogIn\">\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n </button>\n </div>\n </form>\n</ng-container>\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 });
|
4951
4993
|
ScUserPhoneApproveDialogComponent = __decorate([
|
4952
4994
|
UntilDestroy({ checkProperties: true })
|
@@ -4955,7 +4997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
4955
4997
|
type: Component,
|
4956
4998
|
args: [{ selector: 'sc-user-phone-approve-dialog', providers: [SC_USER_PROVIDERS], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"user$ | async as user\">\n <form [formGroup]=\"form\" *tuiLet=\"!!(loading$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-verification-phone-check-form\n [(haveCode)]=\"haveCode\"\n [shouldBeConfirmed]=\"false\"\n [showCodeFields]=\"!user.contacts.phone.isApproved\"\n [readOnly]=\"true\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <div *ngIf=\"user.contacts.phone.isApproved || haveCode\" class=\"flex gap-4 justify-center\">\n <button *ngIf=\"user.contacts.phone.isApproved && context\" tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" appearance=\"secondary\">\u0417\u0430\u043A\u0440\u044B\u0442\u044C</button>\n <button *ngIf=\"haveCode\" tuiButton type=\"submit\" [showLoader]=\"loadingApproveCode\" [disabled]=\"form.invalid || loadingApproveCode\" icon=\"scIconLogIn\">\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n </button>\n </div>\n </form>\n</ng-container>\n" }]
|
4957
4999
|
}], ctorParameters: function () {
|
4958
|
-
return [{ type: i1.ScVerificationService }, { type: i5.Observable, decorators: [{
|
5000
|
+
return [{ type: i1.ScVerificationService }, { type: i1.ScUserMetrikaService }, { type: i5.Observable, decorators: [{
|
4959
5001
|
type: Inject,
|
4960
5002
|
args: [SC_USER_INFO]
|
4961
5003
|
}] }, { type: i1.ScUserService }, { type: undefined, decorators: [{
|