@snabcentr/client-ui 0.21.0 → 0.23.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.

Potentially problematic release.


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

@@ -2648,6 +2648,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2648
2648
  * @param referencesService Сервис справочников.
2649
2649
  * @param contragentService Сервис работы с контрагентами.
2650
2650
  * @param convertersService Сервис конвертации данных.
2651
+ * @param locationsService
2651
2652
  * @param context Контекст диалогового окна, в котором открыт компонент.
2652
2653
  */
2653
2654
  constructor(referencesService, contragentService, convertersService, locationsService, context) {
@@ -2668,7 +2669,8 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2668
2669
  * Родительская `FormGroup`.
2669
2670
  */
2670
2671
  this.form = new FormGroup({
2671
- contragent: new FormGroup({})
2672
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2673
+ contragent: new FormGroup({}),
2672
2674
  });
2673
2675
  /**
2674
2676
  * {@link Subject} события отправки формы.
@@ -2678,12 +2680,17 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2678
2680
  * {@link Observable} запроса добавления контрагента.
2679
2681
  */
2680
2682
  this.request$ = this.onSubmit.pipe(map(() => this.form.value.contragent), filter((value) => this.form.valid), switchMap((value) => {
2681
- return this.contragentService.createContragent$(this.convertersService.removeNullRecursive(value)).pipe(tap((contragent) => { var _a; return (_a = this.context) === null || _a === void 0 ? void 0 : _a.completeWith(contragent); }), catchError((error) => {
2683
+ return this.contragentService.createContragent$(this.convertersService.removeNullRecursive(value)).pipe(tap((contragent) => {
2684
+ this.context.completeWith(contragent);
2685
+ }),
2686
+ // eslint-disable-next-line rxjs/no-implicit-any-catch
2687
+ catchError((error) => {
2682
2688
  var _a;
2683
2689
  tuiMarkControlAsTouchedAndValidate(this.form);
2684
2690
  const errorResponse = error.error;
2691
+ // eslint-disable-next-line no-restricted-syntax, guard-for-in
2685
2692
  for (const key in errorResponse.errors) {
2686
- (_a = this.form.controls.contragent.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
2693
+ (_a = this.form.controls.contragent.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[key] });
2687
2694
  }
2688
2695
  if (!errorResponse.errors && errorResponse.message) {
2689
2696
  this.form.setErrors({ serverResponse: [errorResponse.message] });
@@ -2731,10 +2738,10 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2731
2738
  switch (this.stepIndex) {
2732
2739
  case 0:
2733
2740
  for (const key in this.form.controls.contragent.controls) {
2734
- if (Object.prototype.hasOwnProperty.call(this.form.controls.contragent.controls, key) && !Array.isArray(this.form.controls.contragent.controls[key].value)) {
2735
- if (this.form.controls.contragent.controls[key].invalid) {
2736
- return false;
2737
- }
2741
+ if (Object.prototype.hasOwnProperty.call(this.form.controls.contragent.controls, key) &&
2742
+ !Array.isArray(this.form.controls.contragent.controls[key].value) &&
2743
+ this.form.controls.contragent.controls[key].invalid) {
2744
+ return false;
2738
2745
  }
2739
2746
  }
2740
2747
  return true;
@@ -2754,6 +2761,8 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2754
2761
  }
2755
2762
  /**
2756
2763
  * Возвращает {@link Observable} списка направлений продаж.
2764
+ *
2765
+ * @param directionId
2757
2766
  */
2758
2767
  getDirectionById$(directionId) {
2759
2768
  return this.referencesService.getDirectionById$(directionId);
@@ -2809,7 +2818,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2809
2818
  bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
2810
2819
  accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
2811
2820
  correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
2812
- currencyId: new FormControl(null, Validators.required)
2821
+ currencyId: new FormControl(null, Validators.required),
2813
2822
  });
2814
2823
  }
2815
2824
  /**
@@ -2834,7 +2843,7 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2834
2843
  name: new FormControl(null, Validators.required),
2835
2844
  phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
2836
2845
  email: new FormControl(null, Validators.email),
2837
- position: new FormControl(null)
2846
+ position: new FormControl(null),
2838
2847
  });
2839
2848
  }
2840
2849
  /**
@@ -2853,13 +2862,13 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2853
2862
  }
2854
2863
  };
2855
2864
  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 });
2856
- ScAddContragentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentDialogComponent, selector: "sc-add-contragent-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <tui-elastic-container>\n <tui-carousel [(index)]=\"stepIndex\" [draggable]=\"false\">\n <sc-new-contragent-form *tuiItem scCarouselItemHidden [index]=\"0\"></sc-new-contragent-form>\n\n <div *tuiItem scCarouselItemHidden [index]=\"1\">\n <div *ngIf=\"contacts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div *ngFor=\"let contact of contacts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-10\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeContactGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addContactGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442</button>\n </div>\n </div>\n\n <div *tuiItem scCarouselItemHidden [index]=\"2\">\n <div *ngIf=\"bankAccounts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div *ngFor=\"let bankAccount of bankAccounts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-12\">\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 *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeBankAccountGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addBankAccountGroup()\" type=\"button\">\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</button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex gap-2 justify-center\">\n <button *ngIf=\"stepIndex > 0\" tuiButton appearance=\"secondary\" type=\"button\" (click)=\"stepIndex = (stepIndex - 1) % 3;\">\u041D\u0430\u0437\u0430\u0434</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 tuiButton [disabled]=\"!canNextStep()\" type=\"button\" (click)=\"stepIndex = (stepIndex + 1) % 3;\">\u0414\u0430\u043B\u0435\u0435</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: i4$1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i4$1.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i6.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: ScCarouselItemHiddenDirective, selector: "[tuiItem], [scCarouselItemHidden]", inputs: ["index"] }, { 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 });
2865
+ 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 <tui-carousel\n [(index)]=\"stepIndex\"\n [draggable]=\"false\"\n >\n <sc-new-contragent-form\n *tuiItem\n scCarouselItemHidden\n [index]=\"0\"\n ></sc-new-contragent-form>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"1\"\n >\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\n *tuiItem\n scCarouselItemHidden\n [index]=\"2\"\n >\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-carousel>\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 === 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 <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\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 </div>\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: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i4$1.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i6.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: ScCarouselItemHiddenDirective, selector: "[tuiItem], [scCarouselItemHidden]", inputs: ["index"] }, { 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 });
2857
2866
  ScAddContragentDialogComponent = __decorate([
2858
2867
  UntilDestroy({ checkProperties: true })
2859
2868
  ], ScAddContragentDialogComponent);
2860
2869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, decorators: [{
2861
2870
  type: Component,
2862
- args: [{ selector: 'sc-add-contragent-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <tui-elastic-container>\n <tui-carousel [(index)]=\"stepIndex\" [draggable]=\"false\">\n <sc-new-contragent-form *tuiItem scCarouselItemHidden [index]=\"0\"></sc-new-contragent-form>\n\n <div *tuiItem scCarouselItemHidden [index]=\"1\">\n <div *ngIf=\"contacts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div *ngFor=\"let contact of contacts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-10\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeContactGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addContactGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442</button>\n </div>\n </div>\n\n <div *tuiItem scCarouselItemHidden [index]=\"2\">\n <div *ngIf=\"bankAccounts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div *ngFor=\"let bankAccount of bankAccounts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-12\">\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 *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeBankAccountGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addBankAccountGroup()\" type=\"button\">\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</button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex gap-2 justify-center\">\n <button *ngIf=\"stepIndex > 0\" tuiButton appearance=\"secondary\" type=\"button\" (click)=\"stepIndex = (stepIndex - 1) % 3;\">\u041D\u0430\u0437\u0430\u0434</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 tuiButton [disabled]=\"!canNextStep()\" type=\"button\" (click)=\"stepIndex = (stepIndex + 1) % 3;\">\u0414\u0430\u043B\u0435\u0435</button>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
2871
+ 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 <tui-carousel\n [(index)]=\"stepIndex\"\n [draggable]=\"false\"\n >\n <sc-new-contragent-form\n *tuiItem\n scCarouselItemHidden\n [index]=\"0\"\n ></sc-new-contragent-form>\n\n <div\n *tuiItem\n scCarouselItemHidden\n [index]=\"1\"\n >\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\n *tuiItem\n scCarouselItemHidden\n [index]=\"2\"\n >\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-carousel>\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 === 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 <div class=\"flex justify-center gap-8\">\n <button\n tuiButton\n (click)=\"context.$implicit.complete()\"\n type=\"button\"\n tuiMode=\"onLight\"\n appearance=\"secondary\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </button>\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 </div>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
2863
2872
  }], ctorParameters: function () {
2864
2873
  return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
2865
2874
  type: Optional
@@ -3467,6 +3476,10 @@ class ScAddDeliveryAddressDialogComponent {
3467
3476
  this.deliveryAddressService = deliveryAddressService;
3468
3477
  this.context = context;
3469
3478
  this.convertersService = convertersService;
3479
+ /**
3480
+ * Признак того, отображается этот компонент на мобильном устройстве или нет.
3481
+ */
3482
+ this.isMobile = inject(TUI_IS_MOBILE);
3470
3483
  /**
3471
3484
  * Перечисление типов подсказок.
3472
3485
  */
@@ -3478,17 +3491,21 @@ class ScAddDeliveryAddressDialogComponent {
3478
3491
  /**
3479
3492
  * {@link Observable} запроса данных добавления адрес доставки.
3480
3493
  */
3481
- this.request$ = this.onSubmit$.pipe(tap(() => tuiMarkControlAsTouchedAndValidate(this.form)), filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.deliveryAddressService.createDeliveryAddress$(this.convertersService.removeNullRecursive(value)).pipe(catchError((error) => {
3494
+ this.request$ = this.onSubmit$.pipe(tap(() => {
3495
+ tuiMarkControlAsTouchedAndValidate(this.form);
3496
+ }), filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.deliveryAddressService.createDeliveryAddress$(this.convertersService.removeNullRecursive(value)).pipe(catchError((error) => {
3482
3497
  var _a;
3483
3498
  const errorResponse = error.error;
3484
3499
  for (const key in errorResponse.errors) {
3485
- (_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
3500
+ (_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[key] });
3486
3501
  }
3487
3502
  if (!errorResponse.errors && errorResponse.message) {
3488
3503
  this.form.setErrors({ serverResponse: [errorResponse.message] });
3489
3504
  }
3490
- return of(undefined);
3491
- }), tap(() => this.context.completeWith()), startWith(null))), share());
3505
+ return of();
3506
+ }), tap(() => {
3507
+ this.context.completeWith();
3508
+ }), startWith(null))), share());
3492
3509
  /**
3493
3510
  * {@link Observable} изменения состояния загрузки данных.
3494
3511
  */
@@ -3502,16 +3519,16 @@ class ScAddDeliveryAddressDialogComponent {
3502
3519
  name: new FormControl(null, Validators.required),
3503
3520
  phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
3504
3521
  email: new FormControl(null, Validators.email),
3505
- position: new FormControl(null)
3506
- })
3522
+ position: new FormControl(null),
3523
+ }),
3507
3524
  });
3508
3525
  }
3509
3526
  }
3510
3527
  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 });
3511
- ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit$.next()\" class=\"flex flex-col gap-3\">\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 *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"address\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <div formGroupName=\"contact\" class=\"flex flex-col gap-2 grow\">\n <p class=\"font-bold w-full\">\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 *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></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 formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></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 tuiTextfield type=\"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 <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 formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button tuiButton matRipple [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" class=\"self-center\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\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: 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 });
3528
+ 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 });
3512
3529
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, decorators: [{
3513
3530
  type: Component,
3514
- args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit$.next()\" class=\"flex flex-col gap-3\">\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 *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"address\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <div formGroupName=\"contact\" class=\"flex flex-col gap-2 grow\">\n <p class=\"font-bold w-full\">\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 *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></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 formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></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 tuiTextfield type=\"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 <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 formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button tuiButton matRipple [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" class=\"self-center\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n</form>\n" }]
3531
+ 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" }]
3515
3532
  }], ctorParameters: function () {
3516
3533
  return [{ type: i1.ScDeliveryAddressService }, { type: undefined, decorators: [{
3517
3534
  type: Inject,