@snabcentr/client-ui 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -673,7 +673,7 @@ class ScSuggestionFieldComponent {
673
673
  }
674
674
  /** @inheritDoc */
675
675
  ngOnInit() {
676
- const request$ = tuiControlValue(this.control).pipe(debounceTime(300), filter(tuiIsPresent), map((term) => term.trim()), filter((term) => term.length >= 3), switchMap((term) => this.suggestionService.getData(term, this.type).pipe(startWith(null))), catchError((error) => {
676
+ const request$ = tuiControlValue(this.control).pipe(debounceTime(500), filter(tuiIsPresent), map((term) => term.trim()), filter((term) => term.length >= 3), switchMap((term) => this.suggestionService.getData(term, this.type).pipe(startWith(null))), catchError((error) => {
677
677
  if (error instanceof HttpErrorResponse) {
678
678
  const errorResponse = error.error;
679
679
  if (this.control.control) {
@@ -694,7 +694,6 @@ class ScSuggestionFieldComponent {
694
694
  * @param suggestion Объект подсказки.
695
695
  */
696
696
  onSelected(suggestion) {
697
- this.selectedClick.emit(suggestion);
698
697
  switch (this.type) {
699
698
  case ScISuggestionType.fio:
700
699
  if ('fio' in suggestion) {
@@ -738,6 +737,7 @@ class ScSuggestionFieldComponent {
738
737
  default:
739
738
  break;
740
739
  }
740
+ this.selectedClick.emit(suggestion);
741
741
  }
742
742
  }
743
743
  ScSuggestionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSuggestionFieldComponent, deps: [{ token: NgControl, skipSelf: true }, { token: i1.ScSuggestionService }], target: i0.ɵɵFactoryTarget.Component });
@@ -833,7 +833,15 @@ let ScNewContragentFormComponent = class ScNewContragentFormComponent {
833
833
  legalAddress: new FormControl(null, Validators.required),
834
834
  postalAddress: new FormControl(null, Validators.required),
835
835
  actualAddress: new FormControl(null, Validators.required),
836
- bankAccounts: new FormArray([], [Validators.minLength(1), Validators.required]),
836
+ bankAccounts: new FormArray([
837
+ new FormGroup({
838
+ bankName: new FormControl(null, Validators.required),
839
+ bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
840
+ accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
841
+ correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
842
+ currencyId: new FormControl(null, Validators.required),
843
+ }),
844
+ ], [Validators.minLength(1), Validators.required]),
837
845
  });
838
846
  /**
839
847
  * Группа полей информации о контрагенте юридическом лице.
@@ -856,7 +864,14 @@ let ScNewContragentFormComponent = class ScNewContragentFormComponent {
856
864
  name: new FormControl(null, Validators.required),
857
865
  opf: new FormControl('individual', Validators.required),
858
866
  salesDirectionId: new FormControl(null, Validators.required),
859
- contacts: new FormArray([], [Validators.minLength(1), Validators.required]),
867
+ contacts: new FormArray([
868
+ new FormGroup({
869
+ name: new FormControl(null, Validators.required),
870
+ phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
871
+ email: new FormControl(null, Validators.email),
872
+ position: new FormControl(null),
873
+ }),
874
+ ], [Validators.minLength(1), Validators.required]),
860
875
  });
861
876
  /**
862
877
  * Перечисление типов подсказок.
@@ -865,13 +880,14 @@ let ScNewContragentFormComponent = class ScNewContragentFormComponent {
865
880
  /**
866
881
  * {@link Observable} выбора ОПФ.
867
882
  */
868
- this.selectOpf$ = tuiControlValue(this.form.controls.opf).pipe(tap((opf) => {
883
+ this.selectOpf$ = tuiControlValue(this.form.controls.opf).pipe(distinctUntilChanged(), tap((opf) => {
869
884
  Object.keys({ ...this.entrepreneurGroup.controls, ...this.legalGroup.controls, ...this.nonResidentLegalGroup.controls }).forEach((key) => {
870
- this.form.removeControl(key);
885
+ this.form.get(key)?.disable();
871
886
  });
872
887
  const addControls = (formGroup) => {
873
888
  Object.keys({ ...formGroup.controls }).forEach((key) => {
874
- this.form.addControl(key, formGroup.get(key));
889
+ formGroup.get(key)?.enable();
890
+ this.form.setControl(key, formGroup.get(key));
875
891
  });
876
892
  };
877
893
  if (ScOpfList[opf] > ScOpfList.individual) {
@@ -1097,8 +1113,8 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
1097
1113
  */
1098
1114
  this.successAuth = this.authService.getAuthChange().pipe(filter((state) => state));
1099
1115
  this.opfControl.valueChanges.pipe(distinctUntilChanged(), untilDestroyed(this)).subscribe(() => {
1100
- this.form.patchValue({ name: '' });
1101
- this.form.controls.name.markAsUntouched();
1116
+ this.form.patchValue({ name: null });
1117
+ this.form.get('contragent')?.reset();
1102
1118
  });
1103
1119
  }
1104
1120
  /**
@@ -1241,16 +1257,19 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
1241
1257
  onSelectedOrganization(suggestion) {
1242
1258
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1243
1259
  if (this.form.controls.contragent && 'inn' in suggestion && !('bic' in suggestion)) {
1260
+ if (suggestion.opf && suggestion.opf.slug !== this.opfControl.value) {
1261
+ this.opfControl.setValue(suggestion.opf.slug);
1262
+ }
1244
1263
  this.form.controls.contragent.patchValue({
1245
1264
  name: suggestion.name,
1246
1265
  inn: suggestion.inn,
1247
- kpp: suggestion.kpp,
1248
- okpo: suggestion.okpo,
1249
- directorName: suggestion.directorName,
1250
- directorPosition: suggestion.directorPosition,
1251
- legalAddress: suggestion.legalAddress,
1252
- postalAddress: suggestion.postalAddress,
1253
- actualAddress: suggestion.actualAddress,
1266
+ kpp: suggestion.kpp ?? null,
1267
+ okpo: suggestion.okpo ?? null,
1268
+ directorName: suggestion.directorName ?? null,
1269
+ directorPosition: suggestion.directorPosition ?? null,
1270
+ legalAddress: suggestion.legalAddress ?? null,
1271
+ postalAddress: suggestion.postalAddress ?? null,
1272
+ actualAddress: suggestion.actualAddress ?? null,
1254
1273
  });
1255
1274
  tuiMarkControlAsTouchedAndValidate(this.form.controls.contragent);
1256
1275
  }
@@ -1271,13 +1290,13 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
1271
1290
  }
1272
1291
  };
1273
1292
  ScSignUpFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignUpFormComponent, deps: [{ token: i1.ScUserService }, { token: i1.ScAuthService }, { token: i1.ScReferencesService }, { token: i1.ScConvertersService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
1274
- ScSignUpFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth" }, ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\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\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 </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \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.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\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\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \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 !== 3\">\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 </ng-container>\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)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["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: "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"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { kind: "component", type: i4.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1293
+ ScSignUpFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth" }, ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\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\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 </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \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.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\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\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \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 class=\"self-center\"\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 !== 3\">\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 class=\"self-center\"\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 </ng-container>\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)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["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: "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"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { kind: "component", type: i4.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1275
1294
  ScSignUpFormComponent = __decorate([
1276
1295
  UntilDestroy({ checkProperties: true })
1277
1296
  ], ScSignUpFormComponent);
1278
1297
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignUpFormComponent, decorators: [{
1279
1298
  type: Component,
1280
- args: [{ selector: 'sc-sign-up-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\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\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 </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \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.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\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\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \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 !== 3\">\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 </ng-container>\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)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
1299
+ args: [{ selector: 'sc-sign-up-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\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\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 </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \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.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\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\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \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 class=\"self-center\"\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 !== 3\">\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 class=\"self-center\"\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 </ng-container>\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)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
1281
1300
  }], ctorParameters: function () { return [{ type: i1.ScUserService }, { type: i1.ScAuthService }, { type: i1.ScReferencesService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }]; }, propDecorators: { successAuth: [{
1282
1301
  type: Output
1283
1302
  }] } });
@@ -1941,13 +1960,13 @@ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
1941
1960
  }
1942
1961
  };
1943
1962
  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 });
1944
- 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", inputs: ["opfControl"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1963
+ 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 class=\"self-center\"\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 class=\"self-center\"\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", inputs: ["opfControl"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1945
1964
  ScAddContragentDialogComponent = __decorate([
1946
1965
  UntilDestroy({ checkProperties: true })
1947
1966
  ], ScAddContragentDialogComponent);
1948
1967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, decorators: [{
1949
1968
  type: Component,
1950
- 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"] }]
1969
+ 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 class=\"self-center\"\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 class=\"self-center\"\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"] }]
1951
1970
  }], ctorParameters: function () { return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
1952
1971
  type: Optional
1953
1972
  }, {
@@ -3810,11 +3829,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3810
3829
  }]
3811
3830
  }] });
3812
3831
 
3813
- /* eslint-disable @typescript-eslint/unbound-method,lodash/prefer-lodash-method */
3814
3832
  /**
3815
3833
  * Компонент добавления адреса доставки.
3816
3834
  */
3817
- class ScAddDeliveryAddressDialogComponent {
3835
+ let ScAddDeliveryAddressDialogComponent = class ScAddDeliveryAddressDialogComponent {
3818
3836
  /**
3819
3837
  * Инициализирует экземпляр класса {@link ScAddDeliveryAddressDialogComponent}.
3820
3838
  *
@@ -3840,6 +3858,14 @@ class ScAddDeliveryAddressDialogComponent {
3840
3858
  * {@link Subject} события отправки формы.
3841
3859
  */
3842
3860
  this.onSubmit$ = new Subject();
3861
+ /**
3862
+ * Координаты центра карты по умолчанию.
3863
+ */
3864
+ this.defaultCenterMap = [57.000353, 40.97393];
3865
+ /**
3866
+ * Масштаб карты по умолчанию.
3867
+ */
3868
+ this.defaultZoomMap = 11;
3843
3869
  /**
3844
3870
  * {@link Observable} запроса данных добавления адрес доставки.
3845
3871
  */
@@ -3875,7 +3901,7 @@ class ScAddDeliveryAddressDialogComponent {
3875
3901
  this.options = {
3876
3902
  autoFitToViewport: 'always',
3877
3903
  yandexMapDisablePoiInteractivity: false,
3878
- maxZoom: 17,
3904
+ maxZoom: 19,
3879
3905
  };
3880
3906
  /**
3881
3907
  * Форма для создания адреса доставки.
@@ -3899,6 +3925,10 @@ class ScAddDeliveryAddressDialogComponent {
3899
3925
  this.userMetrikaService.emitUserMetrikaEvent({
3900
3926
  target: ScUserMetrikaGoalsEnum.userProfileDeliveryAddressAddShow,
3901
3927
  });
3928
+ this.addressControl.valueChanges.pipe(untilDestroyed(this)).subscribe((index) => {
3929
+ console.log(index);
3930
+ this.removeGeoCoordinates();
3931
+ });
3902
3932
  }
3903
3933
  /**
3904
3934
  * Обработчик загрузки карты на странице.
@@ -3928,6 +3958,14 @@ class ScAddDeliveryAddressDialogComponent {
3928
3958
  this.addressPlacemark = this.createPlacemark(coords);
3929
3959
  }
3930
3960
  this.setGeoCoordinates(coords);
3961
+ if (!this.yaMap?.geoObjects.getLength()) {
3962
+ this.yaMap?.geoObjects.add(this.addressPlacemark);
3963
+ }
3964
+ const bounds = this.addressPlacemark.geometry?.getBounds();
3965
+ if (bounds) {
3966
+ this.yaMap?.setBounds(bounds);
3967
+ this.yaMap?.setZoom(17);
3968
+ }
3931
3969
  }
3932
3970
  }
3933
3971
  /**
@@ -3938,13 +3976,29 @@ class ScAddDeliveryAddressDialogComponent {
3938
3976
  setGeoCoordinates(coords) {
3939
3977
  if (this.addressPlacemark) {
3940
3978
  this.addressPlacemark.geometry?.setCoordinates(coords);
3979
+ this.form.patchValue({
3980
+ coordinates: {
3981
+ lat: coords[0],
3982
+ long: coords[1],
3983
+ },
3984
+ });
3985
+ }
3986
+ }
3987
+ /**
3988
+ * Устанавливает {@link addressPlacemark} точку на определённые координаты.
3989
+ */
3990
+ removeGeoCoordinates() {
3991
+ if (this.addressPlacemark) {
3992
+ this.yaMap?.geoObjects.remove(this.addressPlacemark);
3993
+ this.form.patchValue({
3994
+ coordinates: {
3995
+ lat: null,
3996
+ long: null,
3997
+ },
3998
+ });
3999
+ this.yaMap?.setCenter(this.defaultCenterMap);
4000
+ this.yaMap?.setZoom(this.defaultZoomMap);
3941
4001
  }
3942
- this.form.patchValue({
3943
- coordinates: {
3944
- lat: coords[0],
3945
- long: coords[1],
3946
- },
3947
- });
3948
4002
  }
3949
4003
  /**
3950
4004
  * Создаёт объект точки и устанавливает события для него.
@@ -3958,11 +4012,6 @@ class ScAddDeliveryAddressDialogComponent {
3958
4012
  preset: 'islands',
3959
4013
  draggable: true,
3960
4014
  });
3961
- this.yaMap?.geoObjects.add(placemark);
3962
- const bounds = placemark.geometry?.getBounds();
3963
- if (bounds) {
3964
- this.yaMap?.setBounds(bounds);
3965
- }
3966
4015
  placemark.events.add('dragend', () => {
3967
4016
  const coord = this.addressPlacemark?.geometry?.getCoordinates();
3968
4017
  if (coord) {
@@ -3971,12 +4020,15 @@ class ScAddDeliveryAddressDialogComponent {
3971
4020
  });
3972
4021
  return placemark;
3973
4022
  }
3974
- }
4023
+ };
3975
4024
  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 });
3976
- ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<div class=\"relative flex flex-col gap-3 md:flex-row\">\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex w-full 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 (selectedClick)=\"onSelectedAddress($event)\"\n ></sc-suggestion-field>\n <input\n tuiTextfield\n autocomplete=\"off\"\n />\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 [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\n <div\n class=\"absolute -z-10 flex size-full md:w-1/2\"\n [ngClass]=\"{ 'z-0 relative': addressPlacemark }\"\n >\n <div class=\"flex-auto\">\n <ya-map\n [zoom]=\"11\"\n [state]=\"{ controls: [] }\"\n (ready)=\"onMapReadyHandle($event)\"\n [options]=\"options\"\n ></ya-map>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"], outputs: ["selectedClick"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i7$2.YaMapComponent, selector: "ya-map", inputs: ["center", "zoom", "state", "options"], outputs: ["ready", "actionbegin", "actionbreak", "actionend", "actiontick", "actiontickcomplete", "balloonclose", "balloonopen", "boundschange", "yaclick", "yacontextmenu", "yadblclick", "destroy", "hintclose", "hintopen", "marginchange", "yamousedown", "yamouseenter", "yamouseleave", "yamousemove", "yamouseup", "multitouchend", "multitouchmove", "multitouchstart", "optionschange", "sizechange", "typechange", "yawheel"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4025
+ ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<div class=\"relative flex flex-col gap-3 md:flex-row\">\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex w-full flex-col gap-3\"\n >\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input\n [pseudoInvalid]=\"(addressControl.valid && form.controls.coordinates.invalid) || null\"\n formControlName=\"address\"\n >\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 (selectedClick)=\"onSelectedAddress($event)\"\n ></sc-suggestion-field>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n <tui-error\n *ngIf=\"addressControl.valid && form.controls.coordinates.invalid\"\n formControlName=\"address\"\n error=\"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430\"\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 [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\n <div\n class=\"absolute -z-10 flex size-full md:w-1/2\"\n [ngClass]=\"{ 'z-0 relative': addressPlacemark }\"\n >\n <div\n class=\"flex-auto\"\n [ngClass]=\"{ 'pointer-events-none opacity-50': form.controls.coordinates.invalid }\"\n >\n <ya-map\n [zoom]=\"11\"\n [state]=\"{ controls: [] }\"\n (ready)=\"onMapReadyHandle($event)\"\n [options]=\"options\"\n ></ya-map>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: 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"], outputs: ["selectedClick"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i7$2.YaMapComponent, selector: "ya-map", inputs: ["center", "zoom", "state", "options"], outputs: ["ready", "actionbegin", "actionbreak", "actionend", "actiontick", "actiontickcomplete", "balloonclose", "balloonopen", "boundschange", "yaclick", "yacontextmenu", "yadblclick", "destroy", "hintclose", "hintopen", "marginchange", "yamousedown", "yamouseenter", "yamouseleave", "yamousemove", "yamouseup", "multitouchend", "multitouchmove", "multitouchstart", "optionschange", "sizechange", "typechange", "yawheel"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4026
+ ScAddDeliveryAddressDialogComponent = __decorate([
4027
+ UntilDestroy({ checkProperties: true })
4028
+ ], ScAddDeliveryAddressDialogComponent);
3977
4029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, decorators: [{
3978
4030
  type: Component,
3979
- args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative flex flex-col gap-3 md:flex-row\">\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex w-full 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 (selectedClick)=\"onSelectedAddress($event)\"\n ></sc-suggestion-field>\n <input\n tuiTextfield\n autocomplete=\"off\"\n />\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 [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\n <div\n class=\"absolute -z-10 flex size-full md:w-1/2\"\n [ngClass]=\"{ 'z-0 relative': addressPlacemark }\"\n >\n <div class=\"flex-auto\">\n <ya-map\n [zoom]=\"11\"\n [state]=\"{ controls: [] }\"\n (ready)=\"onMapReadyHandle($event)\"\n [options]=\"options\"\n ></ya-map>\n </div>\n </div>\n</div>\n" }]
4031
+ args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative flex flex-col gap-3 md:flex-row\">\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit$.next()\"\n class=\"flex w-full flex-col gap-3\"\n >\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input\n [pseudoInvalid]=\"(addressControl.valid && form.controls.coordinates.invalid) || null\"\n formControlName=\"address\"\n >\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 (selectedClick)=\"onSelectedAddress($event)\"\n ></sc-suggestion-field>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"address\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n <tui-error\n *ngIf=\"addressControl.valid && form.controls.coordinates.invalid\"\n formControlName=\"address\"\n error=\"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430\"\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 [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\n <div\n class=\"absolute -z-10 flex size-full md:w-1/2\"\n [ngClass]=\"{ 'z-0 relative': addressPlacemark }\"\n >\n <div\n class=\"flex-auto\"\n [ngClass]=\"{ 'pointer-events-none opacity-50': form.controls.coordinates.invalid }\"\n >\n <ya-map\n [zoom]=\"11\"\n [state]=\"{ controls: [] }\"\n (ready)=\"onMapReadyHandle($event)\"\n [options]=\"options\"\n ></ya-map>\n </div>\n </div>\n</div>\n" }]
3980
4032
  }], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }, { type: i1.ScUserMetrikaService }, { type: undefined, decorators: [{
3981
4033
  type: Inject,
3982
4034
  args: [POLYMORPHEUS_CONTEXT]