@snabcentr/client-ui 0.14.3 → 0.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/accordion/sc-accordion.component.d.ts +9 -0
  2. package/auth/index.d.ts +0 -1
  3. package/catalog/input-quantity/sc-input-quantity.component.d.ts +3 -0
  4. package/contacts/add-contact-dialog/sc-add-contact-dialog.component.d.ts +44 -0
  5. package/contacts/contacts-accordion/sc-contacts-accordion.component.d.ts +3 -3
  6. package/contacts/index.d.ts +2 -2
  7. package/contacts/new-contact-form/sc-new-contact-form.component.d.ts +23 -0
  8. package/contacts/sc-contacts.module.d.ts +3 -3
  9. package/{contacts → contragents}/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.d.ts +1 -1
  10. package/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.d.ts +147 -0
  11. package/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.d.ts +24 -6
  12. package/contragents/contragents-accordion/sc-contragents-accordion.component.d.ts +19 -8
  13. package/contragents/index.d.ts +4 -0
  14. package/contragents/new-contragent-form/sc-new-contragent-form.component.d.ts +100 -0
  15. package/contragents/sc-contragents.module.d.ts +15 -6
  16. package/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.d.ts +53 -0
  17. package/delivery-address/delivery-address-accordion/delivery-address-accordion-item/sc-delivery-address-accordion-item.component.d.ts +23 -5
  18. package/delivery-address/delivery-address-accordion/sc-delivery-address-accordion.component.d.ts +17 -2
  19. package/delivery-address/index.d.ts +1 -0
  20. package/delivery-address/sc-delivery-address.module.d.ts +10 -6
  21. package/directives/carousel-item-hidden/sc-carousel-item-hidden.directive.d.ts +24 -0
  22. package/directives/carousel-item-hidden/sc-carousel-item-hidden.module.d.ts +11 -0
  23. package/directives/index.d.ts +2 -0
  24. package/esm2020/accordion/sc-accordion.component.mjs +14 -4
  25. package/esm2020/auth/index.mjs +1 -2
  26. package/esm2020/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +3 -3
  27. package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +6 -1
  28. package/esm2020/contacts/add-contact-dialog/sc-add-contact-dialog.component.mjs +71 -0
  29. package/esm2020/contacts/contacts-accordion/sc-contacts-accordion.component.mjs +6 -6
  30. package/esm2020/contacts/index.mjs +3 -3
  31. package/esm2020/contacts/new-contact-form/sc-new-contact-form.component.mjs +28 -0
  32. package/esm2020/contacts/sc-contacts.module.mjs +7 -7
  33. package/esm2020/contragents/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.mjs +71 -0
  34. package/esm2020/contragents/add-contragent-dialog/sc-add-contragent-dialog.component.mjs +249 -0
  35. package/esm2020/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.mjs +32 -11
  36. package/esm2020/contragents/contragents-accordion/sc-contragents-accordion.component.mjs +24 -12
  37. package/esm2020/contragents/index.mjs +5 -1
  38. package/esm2020/contragents/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +61 -0
  39. package/esm2020/contragents/new-contragent-form/sc-new-contragent-form.component.mjs +183 -0
  40. package/esm2020/contragents/sc-contragents.module.mjs +84 -7
  41. package/esm2020/delivery-address/add-delivery-address-dialog/sc-add-delivery-address-dialog.component.mjs +79 -0
  42. package/esm2020/delivery-address/delivery-address-accordion/delivery-address-accordion-item/sc-delivery-address-accordion-item.component.mjs +28 -8
  43. package/esm2020/delivery-address/delivery-address-accordion/sc-delivery-address-accordion.component.mjs +21 -3
  44. package/esm2020/delivery-address/index.mjs +2 -1
  45. package/esm2020/delivery-address/sc-delivery-address.module.mjs +58 -7
  46. package/esm2020/directives/carousel-item-hidden/sc-carousel-item-hidden.directive.mjs +40 -0
  47. package/esm2020/directives/carousel-item-hidden/sc-carousel-item-hidden.module.mjs +21 -0
  48. package/esm2020/directives/index.mjs +3 -0
  49. package/esm2020/form-fields/index.mjs +4 -0
  50. package/esm2020/masks/index.mjs +5 -1
  51. package/esm2020/masks/sc-inn-mask.mjs +13 -0
  52. package/esm2020/masks/sc-kpp-mask.mjs +7 -0
  53. package/esm2020/masks/sc-okpo-mask.mjs +13 -0
  54. package/esm2020/masks/sc-phone-verification-code-mask.mjs +7 -0
  55. package/esm2020/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.mjs +67 -8
  56. package/esm2020/profile/sc-profile.module.mjs +8 -4
  57. package/esm2020/public-api.mjs +3 -1
  58. package/esm2020/user/reset-user-password/sc-reset-user-password.component.mjs +24 -18
  59. package/esm2020/verification/verification-phone-check-form/sc-verification-phone-check-form.component.mjs +3 -3
  60. package/fesm2015/snabcentr-client-ui.mjs +1177 -265
  61. package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
  62. package/fesm2020/snabcentr-client-ui.mjs +1156 -263
  63. package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
  64. package/form-fields/index.d.ts +3 -0
  65. package/masks/index.d.ts +4 -0
  66. package/masks/sc-inn-mask.d.ts +9 -0
  67. package/masks/sc-kpp-mask.d.ts +5 -0
  68. package/masks/sc-okpo-mask.d.ts +9 -0
  69. package/{auth/constants/phone-approve-code-mask.d.ts → masks/sc-phone-verification-code-mask.d.ts} +1 -1
  70. package/package.json +2 -2
  71. package/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.d.ts +50 -4
  72. package/profile/sc-profile.module.d.ts +2 -1
  73. package/public-api.d.ts +2 -0
  74. package/styles/tailwind/tailwind.scss +62 -36
  75. package/user/reset-user-password/sc-reset-user-password.component.d.ts +11 -3
  76. package/esm2020/auth/constants/phone-approve-code-mask.mjs +0 -7
  77. package/esm2020/contacts/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.mjs +0 -72
  78. package/esm2020/contacts/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +0 -61
  79. /package/{contacts → contragents}/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, NgModule, Directive, HostBinding, ContentChild, Injectable, ElementRef, ContentChildren, ViewChild, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, SkipSelf, forwardRef } from '@angular/core';
2
+ import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, NgModule, Directive, HostBinding, ContentChild, ViewChild, Injectable, ElementRef, ContentChildren, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, SkipSelf, forwardRef } from '@angular/core';
3
3
  import * as i1 from '@snabcentr/client-core';
4
- import { ScUserMetrikaGoalsEnum, SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScAuthService, ScISuggestionType, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
4
+ import { ScUserMetrikaGoalsEnum, SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScAuthService, ScISuggestionType, ScOpfList, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
5
5
  import * as i10 from 'rxjs';
6
6
  import { Subject, filter, map, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge, throwError, combineLatest } from 'rxjs';
7
7
  import * as i2 from '@angular/common';
@@ -9,12 +9,12 @@ import { CommonModule, formatDate } from '@angular/common';
9
9
  import * as i4 from '@taiga-ui/core';
10
10
  import { TuiTextfieldControllerModule, TuiLinkModule, TuiButtonModule, TuiLabelModule, TuiModeModule, TuiErrorModule, TuiLoaderModule, tuiFadeIn, tuiFormatNumber, TuiSvgModule, TuiHintModule, TuiFormatNumberPipeModule, TuiDataListModule, TuiNotificationModule, TuiFormatPhonePipeModule } from '@taiga-ui/core';
11
11
  import * as i3 from '@angular/forms';
12
- import { FormGroupDirective, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
12
+ import { FormGroupDirective, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl, FormArray } from '@angular/forms';
13
13
  import * as i5 from '@taiga-ui/cdk';
14
14
  import { tuiControlValue, tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE, tuiPure, tuiIsPresent, TuiDestroyService, TuiRepeatTimesModule, tuiMarkControlAsTouchedAndValidate, ALWAYS_TRUE_HANDLER } from '@taiga-ui/cdk';
15
- import * as i6 from '@taiga-ui/kit';
16
- import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiAccordionModule, TuiElasticContainerModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, TuiStringifyContentPipeModule, TuiSelectModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule, TuiCheckboxModule, TuiCheckboxLabeledModule } from '@taiga-ui/kit';
17
- import * as i7 from '@maskito/angular';
15
+ import * as i4$1 from '@taiga-ui/kit';
16
+ import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiAccordionItemComponent, TuiAccordionModule, TuiElasticContainerModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiCarouselComponent, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, TuiStringifyContentPipeModule, TuiSelectModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule, TuiCheckboxModule, TuiCheckboxLabeledModule } from '@taiga-ui/kit';
17
+ import * as i6 from '@maskito/angular';
18
18
  import { MaskitoModule } from '@maskito/angular';
19
19
  import * as i2$1 from '@tinkoff/ng-polymorpheus';
20
20
  import { PolymorpheusTemplate, PolymorpheusModule, POLYMORPHEUS_CONTEXT, PolymorpheusComponent } from '@tinkoff/ng-polymorpheus';
@@ -25,7 +25,7 @@ import { IntersectionObserverService, IntersectionObserverModule } from '@ng-web
25
25
  import * as i5$1 from '@angular/material/core';
26
26
  import { MatRippleModule } from '@angular/material/core';
27
27
  import { RouterModule, NavigationEnd, ActivatedRoute, Router } from '@angular/router';
28
- import * as i7$1 from '@taiga-ui/addon-preview';
28
+ import * as i7 from '@taiga-ui/addon-preview';
29
29
  import { TuiPreviewDialogService, TuiPreviewModule } from '@taiga-ui/addon-preview';
30
30
  import * as i9 from '@taiga-ui/addon-commerce';
31
31
  import { TuiCurrencyPipeModule } from '@taiga-ui/addon-commerce';
@@ -53,10 +53,64 @@ var AuthMethod;
53
53
  AuthMethod["byEmail"] = "by_email";
54
54
  })(AuthMethod || (AuthMethod = {}));
55
55
 
56
+ /**
57
+ * Маска поля ввода номера счета.
58
+ */
59
+ const scAccountNumberMask = {
60
+ mask: /^\d{0,20}$/
61
+ };
62
+
63
+ /**
64
+ * Маска поля ввода БИК.
65
+ */
66
+ const scBicMask = {
67
+ mask: /^\d{0,9}$/
68
+ };
69
+
70
+ /**
71
+ * Маска поля ввода номера корреспондентского счета.
72
+ */
73
+ const scCorrespondentAccount = {
74
+ mask: /^\d{0,20}$/
75
+ };
76
+
77
+ /**
78
+ * Маска поля ввода ИНН индивидуального предпринимателя.
79
+ */
80
+ const scEntrepreneurInnMask = {
81
+ mask: /^\d{0,12}$/
82
+ };
83
+ /**
84
+ * Маска поля ввода ИНН юридического лица.
85
+ */
86
+ const scLegalInnMask = {
87
+ mask: /^\d{0,10}$/
88
+ };
89
+
90
+ /**
91
+ * Маска поля ввода КПП.
92
+ */
93
+ const scKppMask = {
94
+ mask: /^\d{0,9}$/
95
+ };
96
+
97
+ /**
98
+ * Маска поля ввода ОКПО индивидуального предпринимателя.
99
+ */
100
+ const scEntrepreneurOkpoMask = {
101
+ mask: /^\d{0,10}$/
102
+ };
103
+ /**
104
+ * Маска поля ввода ОКПО юридического лица.
105
+ */
106
+ const scLegalOkpoMask = {
107
+ mask: /^\d{0,8}$/
108
+ };
109
+
56
110
  /**
57
111
  * Маска поля ввода кода подтверждения телефона.
58
112
  */
59
- const verificationCodeMask = {
113
+ const scPhoneVerificationCodeMask = {
60
114
  mask: /^\d{0,6}$/
61
115
  };
62
116
 
@@ -121,7 +175,7 @@ class ScVerificationPhoneCheckFormComponent {
121
175
  /**
122
176
  * Маска поля ввода кода для подтверждения.
123
177
  */
124
- this.verificationCodeMask = verificationCodeMask;
178
+ this.verificationCodeMask = scPhoneVerificationCodeMask;
125
179
  /**
126
180
  * {@link Subject} события запуска/остановки таймера.
127
181
  */
@@ -210,7 +264,7 @@ class ScVerificationPhoneCheckFormComponent {
210
264
  }
211
265
  }
212
266
  ScVerificationPhoneCheckFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScVerificationPhoneCheckFormComponent, deps: [{ token: i1.ScVerificationService }, { token: FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component });
213
- ScVerificationPhoneCheckFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: { showCodeFields: "showCodeFields", readOnly: "readOnly", shouldBeBusy: "shouldBeBusy", shouldBeConfirmed: "shouldBeConfirmed", haveCode: "haveCode" }, outputs: { haveCodeChange: "haveCodeChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { 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: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i6.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i6.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
267
+ ScVerificationPhoneCheckFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: { showCodeFields: "showCodeFields", readOnly: "readOnly", shouldBeBusy: "shouldBeBusy", shouldBeConfirmed: "shouldBeConfirmed", haveCode: "haveCode" }, outputs: { haveCodeChange: "haveCodeChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.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: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { 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: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { 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: "directive", type: i6.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i6.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
214
268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScVerificationPhoneCheckFormComponent, decorators: [{
215
269
  type: Component,
216
270
  args: [{ selector: 'sc-verification-phone-check-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
@@ -330,7 +384,7 @@ class ScSignInFormByEmailComponent {
330
384
  }
331
385
  }
332
386
  ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
333
- ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i6.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
387
+ ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i4$1.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
334
388
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
335
389
  type: Component,
336
390
  args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
@@ -587,12 +641,18 @@ class ScAccordionComponent {
587
641
  */
588
642
  this.deleteButtonClick = new EventEmitter();
589
643
  }
644
+ /**
645
+ * Закрывает акордион.
646
+ */
647
+ close() {
648
+ this.accordion?.close();
649
+ }
590
650
  }
591
651
  ScAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
592
- ScAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAccordionComponent, selector: "sc-accordion", inputs: { showAddButton: "showAddButton", showDeleteButton: "showDeleteButton", showArrow: "showArrow", open: "open", size: "size" }, outputs: { addButtonClick: "addButtonClick", deleteButtonClick: "deleteButtonClick" }, host: { properties: { "class._has-add-button": "this.showAddButton", "class._has-delete-button": "this.showDeleteButton", "class._has-arrow": "this.showArrow", "attr.data-size": "this.size" } }, queries: [{ propertyName: "content", first: true, predicate: ScAccordionContentDirective, descendants: true }], ngImport: i0, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { 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: i6.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { kind: "component", type: i6.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { kind: "directive", type: i6.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i6.TuiElasticContainerComponent, selector: "tui-elastic-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
652
+ ScAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAccordionComponent, selector: "sc-accordion", inputs: { showAddButton: "showAddButton", showDeleteButton: "showDeleteButton", showArrow: "showArrow", open: "open", size: "size" }, outputs: { addButtonClick: "addButtonClick", deleteButtonClick: "deleteButtonClick" }, host: { properties: { "class._has-add-button": "this.showAddButton", "class._has-delete-button": "this.showDeleteButton", "class._has-arrow": "this.showArrow", "attr.data-size": "this.size" } }, queries: [{ propertyName: "content", first: true, predicate: ScAccordionContentDirective, descendants: true }], viewQueries: [{ propertyName: "accordion", first: true, predicate: TuiAccordionItemComponent, descendants: true }], ngImport: i0, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item #accordion [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { 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$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { kind: "component", type: i4$1.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { kind: "directive", type: i4$1.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
593
653
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionComponent, decorators: [{
594
654
  type: Component,
595
- args: [{ selector: 'sc-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"] }]
655
+ args: [{ selector: 'sc-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item #accordion [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"] }]
596
656
  }], propDecorators: { showAddButton: [{
597
657
  type: Input
598
658
  }, {
@@ -618,6 +678,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
618
678
  }], content: [{
619
679
  type: ContentChild,
620
680
  args: [ScAccordionContentDirective]
681
+ }], accordion: [{
682
+ type: ViewChild,
683
+ args: [TuiAccordionItemComponent]
621
684
  }], addButtonClick: [{
622
685
  type: Output
623
686
  }], deleteButtonClick: [{
@@ -827,7 +890,7 @@ let ScBannerComponent = class ScBannerComponent {
827
890
  }
828
891
  };
829
892
  ScBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScBannerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ScBannerService }, { token: IntersectionObserverService }, { token: ElementRef }, { token: ScPxConverter }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
830
- ScBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBannerComponent, selector: "sc-banner", inputs: { navigateButton: "navigateButton", playerInterval: "playerInterval", disabled: "disabled", bannerLocation: "bannerLocation", resizable: "resizable" }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { listeners: { "mouseenter": "mouseEnterHandler()", "mouseleave": "mouseLeaveHandler()" }, properties: { "class.!hidden": "this.isHidden", "style.height": "this.height", "style.width": "this.width", "style.aspect-ratio": "this.aspectRatio" } }, providers: [IntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "videoRef", first: true, predicate: ["videoPlayer"], descendants: true }], ngImport: i0, template: "<ng-container *tuiLet=\"banners$ | async\">\n <tui-carousel class=\"bg-white w-full h-full shadow-sc-2 rounded-xl overflow-hidden\" [(index)]=\"currentBannerId\">\n <ng-container *ngFor=\"let banner of banners; let index = index\">\n <a\n *tuiItem\n (click)=\"onClick(banner)\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n target=\"_blank\"\n [title]=\"banner.title\"\n class=\"relative\"\n >\n <ng-container [ngSwitch]=\"banner.mediaType\">\n <ng-container *ngSwitchCase=\"'video'\">\n <video\n #videoPlayer\n (suspend)=\"showPlayBtn = true\"\n (play)=\"showPlayBtn = false\"\n [src]=\"banner.mediaFile\"\n (ended)=\"onEndedVideo()\"\n (mouseover)=\"videoPlayer.pause()\"\n (mouseout)=\"videoPlayer.play()\"\n class=\"object-cover h-full\"\n muted\n autoplay\n ></video>\n <button\n *ngIf=\"showPlayBtn\"\n tuiIconButton\n [@tuiFadeIn]=\"200\"\n matRipple\n (click)=\"$event.preventDefault(); videoPlayer.play()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"!absolute left-8 bottom-4\"\n >\n <i class=\"icon-refresh text-black\"></i>\n </button>\n </ng-container>\n\n <img *ngSwitchCase=\"'image'\" [src]=\"banner.mediaFile\" alt=\"\u0411\u0430\u043D\u043D\u0435\u0440\" class=\"object-cover h-full\" />\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngFor=\"let item of bannersListRef\">\n <div *tuiItem [style.height]=\"height\" [style.width]=\"width\" [style.aspect-ratio]=\"aspectRatio\" class=\"overflow-hidden\">\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </div>\n </ng-container>\n </tui-carousel>\n</ng-container>\n<div *ngIf=\"navigateButton && !disabled && this.banners && (this.bannersListRef.length + this.banners.length) > 1\" tuiMode=\"onLight\" class=\"flex items-center\">\n <button tuiIconButton icon=\"tuiIconChevronLeftLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onPreviousBanner()\" class=\"!absolute left-2\"></button>\n <button tuiIconButton icon=\"tuiIconChevronRightLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onNextBanner()\" class=\"!absolute right-2\"></button>\n</div>\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}\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: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i6.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i6.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i5.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
893
+ ScBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBannerComponent, selector: "sc-banner", inputs: { navigateButton: "navigateButton", playerInterval: "playerInterval", disabled: "disabled", bannerLocation: "bannerLocation", resizable: "resizable" }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { listeners: { "mouseenter": "mouseEnterHandler()", "mouseleave": "mouseLeaveHandler()" }, properties: { "class.!hidden": "this.isHidden", "style.height": "this.height", "style.width": "this.width", "style.aspect-ratio": "this.aspectRatio" } }, providers: [IntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "videoRef", first: true, predicate: ["videoPlayer"], descendants: true }], ngImport: i0, template: "<ng-container *tuiLet=\"banners$ | async\">\n <tui-carousel class=\"bg-white w-full h-full shadow-sc-2 rounded-xl overflow-hidden\" [(index)]=\"currentBannerId\">\n <ng-container *ngFor=\"let banner of banners; let index = index\">\n <a\n *tuiItem\n (click)=\"onClick(banner)\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n target=\"_blank\"\n [title]=\"banner.title\"\n class=\"relative\"\n >\n <ng-container [ngSwitch]=\"banner.mediaType\">\n <ng-container *ngSwitchCase=\"'video'\">\n <video\n #videoPlayer\n (suspend)=\"showPlayBtn = true\"\n (play)=\"showPlayBtn = false\"\n [src]=\"banner.mediaFile\"\n (ended)=\"onEndedVideo()\"\n (mouseover)=\"videoPlayer.pause()\"\n (mouseout)=\"videoPlayer.play()\"\n class=\"object-cover h-full\"\n muted\n autoplay\n ></video>\n <button\n *ngIf=\"showPlayBtn\"\n tuiIconButton\n [@tuiFadeIn]=\"200\"\n matRipple\n (click)=\"$event.preventDefault(); videoPlayer.play()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"!absolute left-8 bottom-4\"\n >\n <i class=\"icon-refresh text-black\"></i>\n </button>\n </ng-container>\n\n <img *ngSwitchCase=\"'image'\" [src]=\"banner.mediaFile\" alt=\"\u0411\u0430\u043D\u043D\u0435\u0440\" class=\"object-cover h-full\" />\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngFor=\"let item of bannersListRef\">\n <div *tuiItem [style.height]=\"height\" [style.width]=\"width\" [style.aspect-ratio]=\"aspectRatio\" class=\"overflow-hidden\">\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </div>\n </ng-container>\n </tui-carousel>\n</ng-container>\n<div *ngIf=\"navigateButton && !disabled && this.banners && (this.bannersListRef.length + this.banners.length) > 1\" tuiMode=\"onLight\" class=\"flex items-center\">\n <button tuiIconButton icon=\"tuiIconChevronLeftLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onPreviousBanner()\" class=\"!absolute left-2\"></button>\n <button tuiIconButton icon=\"tuiIconChevronRightLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onNextBanner()\" class=\"!absolute right-2\"></button>\n</div>\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}\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: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i4$1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i4$1.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i5.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
831
894
  ScBannerComponent = __decorate([
832
895
  UntilDestroy({ checkProperties: true })
833
896
  ], ScBannerComponent);
@@ -996,6 +1059,9 @@ function stepValidator(step, precision = 3) {
996
1059
  };
997
1060
  }
998
1061
 
1062
+ /**
1063
+ * Компонент поля ввода количества.
1064
+ */
999
1065
  class ScInputQuantityComponent extends AbstractTuiNullableControl {
1000
1066
  /**
1001
1067
  * Инициализирует экземпляр класса {@link ScInputQuantityComponent}.
@@ -1074,12 +1140,14 @@ class ScInputQuantityComponent extends AbstractTuiNullableControl {
1074
1140
  */
1075
1141
  incident() {
1076
1142
  this.numberInput.onArrow(this.step - ((this.numberInput.value || 0) % this.step));
1143
+ this.numberInput.nativeFocusableElement?.blur();
1077
1144
  }
1078
1145
  /**
1079
1146
  * Уменьшает значение в поле ввода на 1 шаг. Если число в поле ввода не кратно шагу, то уменьшит до ближайшего кратного значения.
1080
1147
  */
1081
1148
  decrement() {
1082
1149
  this.numberInput.onArrow(-((this.numberInput.value || 0) % this.step) || -this.step);
1150
+ this.numberInput.nativeFocusableElement?.blur();
1083
1151
  }
1084
1152
  /**
1085
1153
  * Очищает поля ввода.
@@ -1090,7 +1158,7 @@ class ScInputQuantityComponent extends AbstractTuiNullableControl {
1090
1158
  }
1091
1159
  }
1092
1160
  ScInputQuantityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_NUMBER_VALUE_TRANSFORMER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1093
- ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n (focusin)=\"$any($event.target).select()\"\n oncontextmenu=\"return false;\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i6.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { kind: "directive", type: i6.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "directive", type: i4.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i4.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1161
+ ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n (focusin)=\"$any($event.target).select()\"\n oncontextmenu=\"return false;\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i4$1.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { kind: "directive", type: i4$1.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "directive", type: i4.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i4.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1094
1162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, decorators: [{
1095
1163
  type: Component,
1096
1164
  args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n (focusin)=\"$any($event.target).select()\"\n oncontextmenu=\"return false;\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"] }]
@@ -1261,11 +1329,11 @@ class ScCartItemMobileComponent {
1261
1329
  }
1262
1330
  }
1263
1331
  ScCartItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: UnitsHelper }, { token: TuiPreviewDialogService }, { token: SC_URLS }, { token: SC_PATH_IMAGE_NOT_FOUND }], target: i0.ɵɵFactoryTarget.Component });
1264
- ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button> -->\n <div class=\"flex relative bg-white border border-tui-base-04 shadow-sc-2 rounded-xl min-w-72 p-4\">\n <button\n tuiIconButton\n size=\"m\"\n icon=\"tuiIconTrash2Large\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n (click)=\"clickDeleteEvent.emit()\"\n class=\"shadow-sc-2 !absolute -left-2 -top-2\"\n ></button>\n <div class=\"flex mr-5 max-h-52 min-w-[30%] items-center\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" class=\"rounded-xl w-full max-h-full object-cover\" />\n </div>\n <div class=\"flex flex-col items-start w-full\">\n <a tuiLink (click)=\"clickCardEvent.emit()\" class=\"mb-1\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"text-tui-text-02 text-xs\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <div class=\"flex flex-col self-center gap-y-0.5\">\n <p class=\"flex flex-col items-baseline gap-x-2 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span *ngIf=\"!product.priceInRub\">{{ product.costString }}</span>\n </p>\n <span *ngIf=\"product.discount\" class=\"flex items-center\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> &nbsp;\n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"!text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n\n <div *ngIf=\"cartItem.height || cartItem.length || cartItem.width\" class=\"flex my-0.5 items-center\">\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n class=\"mr-2 !self-center\"\n ></button>\n <div>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n </div>\n </div>\n\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n <p class=\"font-bold text-tui-text-01 text-sm\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-full mt-2\"\n ></sc-input-quantity>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl\"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i4.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1332
+ ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button> -->\n <div class=\"flex bg-white border border-tui-base-04 shadow-sc-2 rounded-xl min-w-[18rem] gap-2 p-2\">\n <div class=\"flex w-40 items-center\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" class=\"rounded-xl w-full max-h-full object-cover\" />\n </div>\n <div class=\"flex flex-col sm:flex-row sm:gap-5 items-center gap-2 justify-between w-full\">\n <div class=\"flex flex-col max-w-full gap-1\">\n <a tuiLink (click)=\"clickCardEvent.emit()\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex flex-wrap gap-y-1 gap-x-2 w-full text-xs text-tui-base-05\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex flex-wrap items-center gap-y-1 gap-x-2 w-full\">\n <p *ngIf=\"!product.priceInRub\" class=\"font-bold\">{{ product.costString }}</p>\n <p class=\"font-bold text-xs text-tui-base-05\">{{ product.costRubString }}</p>\n <span *ngIf=\"product.discount\" class=\"flex items-center\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> &nbsp;\n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"!text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div *ngIf=\"cartItem.height || cartItem.length || cartItem.width\" class=\"flex gap-1 items-center\">\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n class=\"mr-2 !self-center\"\n ></button>\n <div class=\"flex flex-wrap gap-x-2 font-thin text-xs text-tui-base-04\">\n <p *ngIf=\"cartItem.marker\">\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430: {{ cartItem.marker }}</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n </div>\n </div>\n\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n <div class=\"flex flex-col self-start gap-1 sm:mr-9 sm:self-center\">\n <div class=\"flex gap-2\">\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-28\"\n ></sc-input-quantity>\n <button tuiIconButton icon=\"tuiIconTrash2\" shape=\"rounded\" size=\"xs\" (click)=\"clickDeleteEvent.emit()\"></button>\n </div>\n <p class=\"font-bold text-tui-text-01 text-sm\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl\"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i4.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1265
1333
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
1266
1334
  type: Component,
1267
- args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button> -->\n <div class=\"flex relative bg-white border border-tui-base-04 shadow-sc-2 rounded-xl min-w-72 p-4\">\n <button\n tuiIconButton\n size=\"m\"\n icon=\"tuiIconTrash2Large\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n (click)=\"clickDeleteEvent.emit()\"\n class=\"shadow-sc-2 !absolute -left-2 -top-2\"\n ></button>\n <div class=\"flex mr-5 max-h-52 min-w-[30%] items-center\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" class=\"rounded-xl w-full max-h-full object-cover\" />\n </div>\n <div class=\"flex flex-col items-start w-full\">\n <a tuiLink (click)=\"clickCardEvent.emit()\" class=\"mb-1\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"text-tui-text-02 text-xs\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <div class=\"flex flex-col self-center gap-y-0.5\">\n <p class=\"flex flex-col items-baseline gap-x-2 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span *ngIf=\"!product.priceInRub\">{{ product.costString }}</span>\n </p>\n <span *ngIf=\"product.discount\" class=\"flex items-center\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> &nbsp;\n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"!text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n\n <div *ngIf=\"cartItem.height || cartItem.length || cartItem.width\" class=\"flex my-0.5 items-center\">\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n class=\"mr-2 !self-center\"\n ></button>\n <div>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n </div>\n </div>\n\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n <p class=\"font-bold text-tui-text-01 text-sm\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-full mt-2\"\n ></sc-input-quantity>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl\"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n" }]
1268
- }], ctorParameters: function () { return [{ type: UnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
1335
+ args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button> -->\n <div class=\"flex bg-white border border-tui-base-04 shadow-sc-2 rounded-xl min-w-[18rem] gap-2 p-2\">\n <div class=\"flex w-40 items-center\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" class=\"rounded-xl w-full max-h-full object-cover\" />\n </div>\n <div class=\"flex flex-col sm:flex-row sm:gap-5 items-center gap-2 justify-between w-full\">\n <div class=\"flex flex-col max-w-full gap-1\">\n <a tuiLink (click)=\"clickCardEvent.emit()\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex flex-wrap gap-y-1 gap-x-2 w-full text-xs text-tui-base-05\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex flex-wrap items-center gap-y-1 gap-x-2 w-full\">\n <p *ngIf=\"!product.priceInRub\" class=\"font-bold\">{{ product.costString }}</p>\n <p class=\"font-bold text-xs text-tui-base-05\">{{ product.costRubString }}</p>\n <span *ngIf=\"product.discount\" class=\"flex items-center\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> &nbsp;\n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"!text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div *ngIf=\"cartItem.height || cartItem.length || cartItem.width\" class=\"flex gap-1 items-center\">\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n class=\"mr-2 !self-center\"\n ></button>\n <div class=\"flex flex-wrap gap-x-2 font-thin text-xs text-tui-base-04\">\n <p *ngIf=\"cartItem.marker\">\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430: {{ cartItem.marker }}</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n </div>\n </div>\n\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n <div class=\"flex flex-col self-start gap-1 sm:mr-9 sm:self-center\">\n <div class=\"flex gap-2\">\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-28\"\n ></sc-input-quantity>\n <button tuiIconButton icon=\"tuiIconTrash2\" shape=\"rounded\" size=\"xs\" (click)=\"clickDeleteEvent.emit()\"></button>\n </div>\n <p class=\"font-bold text-tui-text-01 text-sm\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl\"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n" }]
1336
+ }], ctorParameters: function () { return [{ type: UnitsHelper }, { type: i7.TuiPreviewDialogService, decorators: [{
1269
1337
  type: Inject,
1270
1338
  args: [TuiPreviewDialogService]
1271
1339
  }] }, { type: undefined, decorators: [{
@@ -2224,148 +2292,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2224
2292
  }]
2225
2293
  }] });
2226
2294
 
2227
- /**
2228
- * Компонент контактного лица в списке.
2229
- */
2230
- class ScContactsAccordionComponent {
2231
- constructor() {
2232
- /**
2233
- * Событие нажатия на кнопку добавления контактного лица.
2234
- */
2235
- this.addContactClick = new EventEmitter();
2236
- /**
2237
- * Событие нажатия на кнопку редактирование контактного лица.
2238
- */
2239
- this.editContactClick = new EventEmitter();
2240
- }
2241
- }
2242
- ScContactsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2243
- ScContactsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: { contacts$: "contacts$" }, outputs: { addContactClick: "addContactClick", editContactClick: "editContactClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContactClick.emit()\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contacts$ | async as contacts\" [overlay]=\"true\" [showLoader]=\"contacts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div *ngFor=\"let contact of contacts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contact.name }}\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMailLarge\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ contact.email }}\"> {{ contact.email }} </a>\n </div>\n <div class=\"flex flex-col gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContactClick.emit()\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #contactsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContactClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, decorators: [{
2245
- type: Component,
2246
- args: [{ selector: 'sc-contacts-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContactClick.emit()\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contacts$ | async as contacts\" [overlay]=\"true\" [showLoader]=\"contacts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div *ngFor=\"let contact of contacts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contact.name }}\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMailLarge\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ contact.email }}\"> {{ contact.email }} </a>\n </div>\n <div class=\"flex flex-col gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContactClick.emit()\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #contactsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContactClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
2247
- }], propDecorators: { contacts$: [{
2248
- type: Input
2249
- }], addContactClick: [{
2250
- type: Output
2251
- }], editContactClick: [{
2252
- type: Output
2253
- }] } });
2254
-
2255
- /**
2256
- * Компонент контрагента пользователя.
2257
- */
2258
- class ScContragentsAccordionItemComponent {
2259
- /**
2260
- * Инициализирует экземпляр класса {@link ScContragentsAccordionItemComponent}.
2261
- *
2262
- * @param contragentService Сервис работы с контрагентами.
2263
- */
2264
- constructor(contragentService) {
2265
- this.contragentService = contragentService;
2266
- /**
2267
- * Событие нажатия на кнопку добавления банковского счёта контрагенту.
2268
- */
2269
- this.addBankAccountsClick = new EventEmitter();
2270
- /**
2271
- * Событие нажатия на кнопку редактирования банковского счёта контрагента.
2272
- */
2273
- this.editBankAccountsContragentClick = new EventEmitter();
2274
- /**
2275
- * Событие нажатия на кнопку редактирования контрагента.
2276
- */
2277
- this.editContragentClick = new EventEmitter();
2278
- }
2279
- /** @inheritDoc */
2280
- ngOnInit() {
2281
- this.bankAccounts$ = this.contragentService.getContragentBankAccounts$(this.contragent.id);
2282
- this.contacts$ = this.contragentService.getContragentContacts$(this.contragent.id);
2283
- }
2284
- }
2285
- ScContragentsAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
2286
- ScContragentsAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: { contragent: "contragent" }, outputs: { addBankAccountsClick: "addBankAccountsClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit(contragent.id)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit(contragent.id)\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "editContactClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, decorators: [{
2288
- type: Component,
2289
- args: [{ selector: 'sc-contragents-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit(contragent.id)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit(contragent.id)\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
2290
- }], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { contragent: [{
2291
- type: Input
2292
- }], addBankAccountsClick: [{
2293
- type: Output
2294
- }], editBankAccountsContragentClick: [{
2295
- type: Output
2296
- }], editContragentClick: [{
2297
- type: Output
2298
- }] } });
2299
-
2300
- /**
2301
- * Компонент контрагента пользователя.
2302
- */
2303
- class ScContragentsAccordionComponent {
2304
- /**
2305
- * Инициализирует экземпляр класса {@link ScContragentsAccordionComponent}.
2306
- *
2307
- * @param contragentService Сервис работы с контрагентами.
2308
- */
2309
- constructor(contragentService) {
2310
- this.contragentService = contragentService;
2311
- /**
2312
- * {@link Observable} данных о контрагентах пользователя.
2313
- */
2314
- this.contragents$ = this.contragentService.contragents$;
2315
- /**
2316
- * Событие нажатия на кнопку добавления контрагента.
2317
- */
2318
- this.addContragentClick = new EventEmitter();
2319
- /**
2320
- * Событие нажатия на кнопку редактирования банковского счёта контрагента.
2321
- */
2322
- this.editBankAccountsContragentClick = new EventEmitter();
2323
- /**
2324
- * Событие нажатия на кнопку добавления банковского счёта контрагенту.
2325
- */
2326
- this.addBankAccountsClick = new EventEmitter();
2327
- /**
2328
- * Событие нажатия на кнопку редактирования контрагента.
2329
- */
2330
- this.editContragentClick = new EventEmitter();
2331
- }
2332
- }
2333
- ScContragentsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
2334
- ScContragentsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: { addContragentClick: "addContragentClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", addBankAccountsClick: "addBankAccountsClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit($event)\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { 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.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: ["contragent"], outputs: ["addBankAccountsClick", "editBankAccountsContragentClick", "editContragentClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, decorators: [{
2336
- type: Component,
2337
- args: [{ selector: 'sc-contragents-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit($event)\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
2338
- }], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { addContragentClick: [{
2339
- type: Output
2340
- }], editBankAccountsContragentClick: [{
2341
- type: Output
2342
- }], addBankAccountsClick: [{
2343
- type: Output
2344
- }], editContragentClick: [{
2345
- type: Output
2346
- }] } });
2347
-
2348
- /**
2349
- * Маска поля ввода номера счета.
2350
- */
2351
- const scAccountNumberMask = {
2352
- mask: /^\d{0,20}$/
2353
- };
2354
-
2355
- /**
2356
- * Маска поля ввода БИК.
2357
- */
2358
- const scBicMask = {
2359
- mask: /^\d{0,9}$/
2360
- };
2361
-
2362
- /**
2363
- * Маска поля ввода номера корреспондентского счета.
2364
- */
2365
- const scCorrespondentAccount = {
2366
- mask: /^\d{0,20}$/
2367
- };
2368
-
2369
2295
  /**
2370
2296
  * Компонент подсказок для поля ввода.
2371
2297
  */
@@ -2508,7 +2434,7 @@ class ScNewContragentBankAccountsFormComponent {
2508
2434
  }
2509
2435
  }
2510
2436
  ScNewContragentBankAccountsFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentBankAccountsFormComponent, deps: [{ token: i1.ScReferencesService }], target: i0.ɵɵFactoryTarget.Component });
2511
- ScNewContragentBankAccountsFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: { form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\">\n <tui-input formControlName=\"bankName\">\n \u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bankName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0411\u0418\u041A\">\n <tui-input formControlName=\"bic\">\n \u0411\u0418\u041A\n <input tuiTextfield [maskito]=\"bicMask\" autocomplete=\"bic\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bic\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\">\n <tui-input formControlName=\"accountNumber\">\n \u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\n <input tuiTextfield [maskito]=\"accountNumberMask\" autocomplete=\"accountNumber\" />\n </tui-input>\n <tui-error formControlName=\"accountNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\">\n <tui-input formControlName=\"correspondentAccount\">\n \u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\n <input tuiTextfield [maskito]=\"correspondentAccount\" autocomplete=\"correspondentAccount\" />\n </tui-input>\n <tui-error formControlName=\"correspondentAccount\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\">\n <tui-select formControlName=\"currencyId\" [valueContent]=\"currencyContent\">\n \u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of currencies$ | async; let index = index\" tuiOption [value]=\"item.id\">{{ item.name }} ({{ item.symbol }})</button>\n </tui-data-list>\n </tui-select>\n <ng-template #currencyContent let-data>\n <div>{{ (getCurrencyById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"currencyId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "directive", type: i7.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "component", type: i6.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i6.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { 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.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2437
+ ScNewContragentBankAccountsFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: { form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\">\n <tui-input formControlName=\"bankName\">\n \u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bankName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0411\u0418\u041A\">\n <tui-input formControlName=\"bic\">\n \u0411\u0418\u041A\n <input tuiTextfield [maskito]=\"bicMask\" autocomplete=\"bic\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bic\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\">\n <tui-input formControlName=\"accountNumber\">\n \u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\n <input tuiTextfield [maskito]=\"accountNumberMask\" autocomplete=\"accountNumber\" />\n </tui-input>\n <tui-error formControlName=\"accountNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\">\n <tui-input formControlName=\"correspondentAccount\">\n \u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\n <input tuiTextfield [maskito]=\"correspondentAccount\" autocomplete=\"correspondentAccount\" />\n </tui-input>\n <tui-error formControlName=\"correspondentAccount\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\">\n <tui-select formControlName=\"currencyId\" [valueContent]=\"currencyContent\">\n \u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of currencies$ | async; let index = index\" tuiOption [value]=\"item.id\">{{ item.name }} ({{ item.symbol }})</button>\n </tui-data-list>\n </tui-select>\n <ng-template #currencyContent let-data>\n <div>{{ (getCurrencyById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"currencyId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ 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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { 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: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { 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.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i6.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i6.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2512
2438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentBankAccountsFormComponent, decorators: [{
2513
2439
  type: Component,
2514
2440
  args: [{ selector: 'sc-new-contragent-bank-account-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\">\n <tui-input formControlName=\"bankName\">\n \u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bankName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0411\u0418\u041A\">\n <tui-input formControlName=\"bic\">\n \u0411\u0418\u041A\n <input tuiTextfield [maskito]=\"bicMask\" autocomplete=\"bic\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bic\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\">\n <tui-input formControlName=\"accountNumber\">\n \u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\n <input tuiTextfield [maskito]=\"accountNumberMask\" autocomplete=\"accountNumber\" />\n </tui-input>\n <tui-error formControlName=\"accountNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\">\n <tui-input formControlName=\"correspondentAccount\">\n \u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\n <input tuiTextfield [maskito]=\"correspondentAccount\" autocomplete=\"correspondentAccount\" />\n </tui-input>\n <tui-error formControlName=\"correspondentAccount\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\">\n <tui-select formControlName=\"currencyId\" [valueContent]=\"currencyContent\">\n \u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of currencies$ | async; let index = index\" tuiOption [value]=\"item.id\">{{ item.name }} ({{ item.symbol }})</button>\n </tui-data-list>\n </tui-select>\n <ng-template #currencyContent let-data>\n <div>{{ (getCurrencyById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"currencyId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n" }]
@@ -2517,59 +2443,722 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2517
2443
  }] } });
2518
2444
 
2519
2445
  /**
2520
- * Компонент поля ввода страны/региона/города.
2446
+ * Компонент формы создания нового банковского счета контрагента.
2521
2447
  */
2522
- let ScAddressesSelectionFieldComponent = class ScAddressesSelectionFieldComponent {
2448
+ class ScAddContragentBankAccountsDialogComponent {
2523
2449
  /**
2524
- * Инициализирует экземпляр класса {@link ScAddressesSelectionFieldComponent}.
2450
+ * Инициализирует экземпляр класса {@link ScAddContragentBankAccountsFormComponent}.
2525
2451
  *
2526
- * @param formGroupDirective Директива c `FormGroup` из DOM.
2527
- * @param locationsService Сервис для получения списков стран, регионов, городов.
2452
+ * @param contragentService Сервис работы с контрагентами.
2453
+ * @param context Контекст диалогового окна, в котором открыт компонент.
2528
2454
  */
2529
- constructor(formGroupDirective, locationsService) {
2530
- this.formGroupDirective = formGroupDirective;
2531
- this.locationsService = locationsService;
2532
- /**
2533
- * FormControl для поля страны.
2534
- */
2535
- this.countryControl = new FormControl({
2536
- id: 3159,
2537
- name: 'Россия'
2538
- }, Validators.required);
2539
- /**
2540
- * FormControl для поля региона.
2541
- */
2542
- this.regionControl = new FormControl(null, Validators.required);
2455
+ constructor(contragentService, context) {
2456
+ this.contragentService = contragentService;
2457
+ this.context = context;
2543
2458
  /**
2544
- * FormControl для поля города.
2459
+ * Группа с полем банковских реквизитов.
2545
2460
  */
2546
- this.cityControl = new FormControl(null, Validators.required);
2461
+ this.form = new FormGroup({
2462
+ bankName: new FormControl(null, Validators.required),
2463
+ bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
2464
+ accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
2465
+ correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
2466
+ currencyId: new FormControl(null, Validators.required)
2467
+ });
2547
2468
  /**
2548
- * {@link Observable} изменения списка стран.
2469
+ * {@link Subject} события отправки формы.
2549
2470
  */
2550
- this.countries$ = this.locationsService.getCountries$().pipe(share(), startWith(null));
2471
+ this.onSubmit = new Subject();
2551
2472
  /**
2552
- * {@link Observable} изменения списка регионов.
2473
+ * {@link Observable} запроса создания банковского счёта контрагента.
2553
2474
  */
2554
- this.regions$ = tuiControlValue(this.countryControl).pipe(filter(tuiIsPresent), switchMap((country) => this.locationsService.getRegions$(country.id).pipe(startWith(null))), share());
2475
+ this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), switchMap((value) => {
2476
+ return this.contragentService.createContragentBankAccount$(this.context.data.contragentId, value).pipe(tap((bankAccount) => this.context?.completeWith(bankAccount)), catchError((error) => {
2477
+ tuiMarkControlAsTouchedAndValidate(this.form);
2478
+ const errorResponse = error.error;
2479
+ for (const key in errorResponse.errors) {
2480
+ this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
2481
+ }
2482
+ if (!errorResponse.errors && errorResponse.message) {
2483
+ this.form.setErrors({ serverResponse: [errorResponse.message] });
2484
+ }
2485
+ return of({});
2486
+ }), startWith(null));
2487
+ }), share());
2555
2488
  /**
2556
- * {@link Observable} изменения списка городов.
2489
+ * {@link Observable} изменения состояния загрузки данных аутентификации по номеру телефона.
2557
2490
  */
2558
- this.cities$ = combineLatest({
2559
- country: tuiControlValue(this.countryControl),
2560
- region: tuiControlValue(this.regionControl)
2561
- }).pipe(debounceTime(0), switchMap(({ country, region }) => country && region ? this.locationsService.getCities$(country.id, region.id).pipe(startWith(null)) : of([])), share());
2491
+ this.loading$ = this.request$.pipe(map(tuiIsFalsy));
2492
+ }
2493
+ }
2494
+ ScAddContragentBankAccountsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, deps: [{ token: i1.ScContragentService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
2495
+ ScAddContragentBankAccountsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentBankAccountsDialogComponent, selector: "sc-add-contragent-bank-account-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, decorators: [{
2497
+ type: Component,
2498
+ args: [{ selector: 'sc-add-contragent-bank-account-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>" }]
2499
+ }], ctorParameters: function () { return [{ type: i1.ScContragentService }, { type: undefined, decorators: [{
2500
+ type: Inject,
2501
+ args: [POLYMORPHEUS_CONTEXT]
2502
+ }] }]; } });
2503
+
2504
+ /**
2505
+ * Компонент формы контактного лица.
2506
+ */
2507
+ class ScNewContactFormComponent {
2508
+ constructor() {
2562
2509
  /**
2563
- * Функция преобразования объекта сортировки в значение, отображаемое в поле ввода.
2564
- *
2565
- * @param item Выбранный объект выпадающего списка.
2510
+ * Перечисление типов подсказок.
2566
2511
  */
2567
- this.stringify = (item) => `${item.name}`;
2512
+ this.suggestionType = ScISuggestionType;
2568
2513
  }
2514
+ }
2515
+ ScNewContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContactFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2516
+ ScNewContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: { form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { 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: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContactFormComponent, decorators: [{
2518
+ type: Component,
2519
+ args: [{ selector: 'sc-new-contact-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n" }]
2520
+ }], propDecorators: { form: [{
2521
+ type: Input
2522
+ }] } });
2523
+
2524
+ /**
2525
+ * Директива для скрытия элементов карусели тайги.
2526
+ */
2527
+ class ScCarouselItemHiddenDirective {
2569
2528
  /**
2570
- * `FormControl` поля идентификатора города.
2529
+ * Инициализирует экземпляр класса {@link CarouselItemHiddenDirective}.
2530
+ *
2531
+ * @param carouselComponent Компонент карусели, взятый из DI.
2571
2532
  */
2572
- get cityIdControl() {
2533
+ constructor(carouselComponent) {
2534
+ this.carouselComponent = carouselComponent;
2535
+ }
2536
+ /**
2537
+ * Свойство, от которого зависит наличие класса `!hidden` у `:host` компонента.
2538
+ */
2539
+ get isHidden() {
2540
+ return this.index !== this.carouselComponent.index;
2541
+ }
2542
+ }
2543
+ ScCarouselItemHiddenDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenDirective, deps: [{ token: TuiCarouselComponent }], target: i0.ɵɵFactoryTarget.Directive });
2544
+ ScCarouselItemHiddenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ScCarouselItemHiddenDirective, selector: "[tuiItem], [scCarouselItemHidden]", inputs: { index: "index" }, host: { properties: { "class.!hidden": "this.isHidden" } }, ngImport: i0 });
2545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenDirective, decorators: [{
2546
+ type: Directive,
2547
+ args: [{
2548
+ selector: '[tuiItem], [scCarouselItemHidden]'
2549
+ }]
2550
+ }], ctorParameters: function () { return [{ type: i4$1.TuiCarouselComponent, decorators: [{
2551
+ type: Inject,
2552
+ args: [TuiCarouselComponent]
2553
+ }] }]; }, propDecorators: { index: [{
2554
+ type: Input
2555
+ }], isHidden: [{
2556
+ type: HostBinding,
2557
+ args: ['class.!hidden']
2558
+ }] } });
2559
+
2560
+ /**
2561
+ * Форма создания нового контрагента.
2562
+ */
2563
+ let ScNewContragentFormComponent = class ScNewContragentFormComponent {
2564
+ /**
2565
+ * Инициализирует экземпляр класса {@link ScNewContragentFormComponent}.
2566
+ *
2567
+ * @param referencesService Сервис справочников.
2568
+ * @param locationsService Сервис для получения списков стран, регионов, городов.
2569
+ * @param formGroupDirective Директива c `FormGroup` из DOM.
2570
+ */
2571
+ constructor(referencesService, locationsService, formGroupDirective) {
2572
+ this.referencesService = referencesService;
2573
+ this.locationsService = locationsService;
2574
+ this.formGroupDirective = formGroupDirective;
2575
+ /**
2576
+ * Группа полей информации о контрагенте индивидуальном предпринимателе.
2577
+ */
2578
+ this.entrepreneurGroup = new FormGroup({
2579
+ inn: new FormControl(null, Validators.required),
2580
+ okpo: new FormControl(null, Validators.required),
2581
+ directorName: new FormControl(null, Validators.required),
2582
+ directorPosition: new FormControl(null, Validators.required),
2583
+ directorActsOn: new FormControl(null, Validators.required),
2584
+ legalAddress: new FormControl(null, Validators.required),
2585
+ postalAddress: new FormControl(null, Validators.required),
2586
+ actualAddress: new FormControl(null, Validators.required),
2587
+ bankAccounts: new FormArray([], [Validators.minLength(1), Validators.required])
2588
+ });
2589
+ /**
2590
+ * Группа полей информации о контрагенте юридическом лице.
2591
+ */
2592
+ this.legalGroup = new FormGroup({
2593
+ kpp: new FormControl(null, [Validators.required, Validators.minLength(9)])
2594
+ });
2595
+ /**
2596
+ * Группа полей информации о контрагенте юридическом лице нерезиденте.
2597
+ */
2598
+ this.nonResidentLegalGroup = new FormGroup({
2599
+ registrationCountryId: new FormControl(null, Validators.required),
2600
+ registrationNumber: new FormControl(null, Validators.required),
2601
+ taxNumber: new FormControl(null, Validators.required)
2602
+ });
2603
+ /**
2604
+ * Форма для создания нового контрагента физического лица.
2605
+ */
2606
+ this.form = new FormGroup({
2607
+ name: new FormControl(null, Validators.required),
2608
+ opf: new FormControl('individual', Validators.required),
2609
+ salesDirectionId: new FormControl(null, Validators.required),
2610
+ contacts: new FormArray([], [Validators.minLength(1), Validators.required])
2611
+ });
2612
+ /**
2613
+ * Перечисление типов подсказок.
2614
+ */
2615
+ this.suggestionType = ScISuggestionType;
2616
+ /**
2617
+ * {@link Observable} выбора ОПФ.
2618
+ */
2619
+ this.selectOpf$ = tuiControlValue(this.form.controls.opf).pipe(tap((opf) => {
2620
+ Object.keys({ ...this.entrepreneurGroup.controls, ...this.legalGroup.controls, ...this.nonResidentLegalGroup.controls }).forEach((key) => {
2621
+ this.form.removeControl(key);
2622
+ });
2623
+ const addControls = (formGroup) => {
2624
+ Object.keys({ ...formGroup.controls }).forEach((key) => {
2625
+ this.form.addControl(key, formGroup.get(key));
2626
+ });
2627
+ };
2628
+ if (ScOpfList[opf] > ScOpfList.individual) {
2629
+ addControls(this.entrepreneurGroup);
2630
+ this.entrepreneurGroup.controls.inn.setValidators([Validators.required, Validators.minLength(12)]);
2631
+ this.entrepreneurGroup.controls.okpo.setValidators([Validators.required, Validators.minLength(10)]);
2632
+ }
2633
+ if (ScOpfList[opf] > ScOpfList.entrepreneur) {
2634
+ addControls(this.legalGroup);
2635
+ this.entrepreneurGroup.controls.inn.setValidators([Validators.required, Validators.minLength(10)]);
2636
+ this.entrepreneurGroup.controls.okpo.setValidators([Validators.required, Validators.minLength(8)]);
2637
+ }
2638
+ if (ScOpfList[opf] > ScOpfList.legal) {
2639
+ addControls(this.nonResidentLegalGroup);
2640
+ }
2641
+ }));
2642
+ /**
2643
+ * Маска поля ввода ИНН.
2644
+ */
2645
+ this.innMask = (opf) => (ScOpfList[opf] > ScOpfList.entrepreneur ? scLegalInnMask : scEntrepreneurInnMask);
2646
+ /**
2647
+ * Маска поля ввода ОКПО.
2648
+ */
2649
+ this.okpoMask = (opf) => (ScOpfList[opf] > ScOpfList.entrepreneur ? scLegalOkpoMask : scEntrepreneurOkpoMask);
2650
+ /**
2651
+ * Маска поля ввода КПП.
2652
+ */
2653
+ this.kppMask = scKppMask;
2654
+ /**
2655
+ * Перечисление организационно-правовых форм.
2656
+ */
2657
+ this.opfListEnum = ScOpfList;
2658
+ this.referencesService.directions$
2659
+ .pipe(untilDestroyed(this), filter(tuiIsPresent), filter((directions) => !!directions.length))
2660
+ .subscribe((directions) => this.form.patchValue({ salesDirectionId: directions[0].id }));
2661
+ }
2662
+ /**
2663
+ * Родительская `FormGroup`.
2664
+ */
2665
+ get parentForm() {
2666
+ return this.formGroupDirective?.form;
2667
+ }
2668
+ /** @inheritDoc */
2669
+ ngOnInit() {
2670
+ this.parentForm?.setControl('contragent', this.form);
2671
+ }
2672
+ /** @inheritDoc */
2673
+ ngOnDestroy() {
2674
+ this.parentForm?.removeControl('contragent');
2675
+ }
2676
+ /**
2677
+ * Возвращает {@link Observable} списка направлений продаж.
2678
+ */
2679
+ getDirectionById$(directionId) {
2680
+ return this.referencesService.getDirectionById$(directionId);
2681
+ }
2682
+ /**
2683
+ * Возвращает {@link Observable} список организационно-правовых форм..
2684
+ */
2685
+ getOpf$() {
2686
+ return this.referencesService.opf$;
2687
+ }
2688
+ /**
2689
+ * Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
2690
+ *
2691
+ * @param slug Символьное обозначение (slug).
2692
+ */
2693
+ getOpfBySlug$(slug) {
2694
+ return this.referencesService.getOpfBySlug$(slug);
2695
+ }
2696
+ /**
2697
+ * Возвращает {@link Observable} списка стран
2698
+ */
2699
+ getCountries$() {
2700
+ return this.locationsService.getCountries$();
2701
+ }
2702
+ /**
2703
+ * Возвращает {@link Observable} страны по идентификатору.
2704
+ *
2705
+ * @param countryId — Идентификатор страны.
2706
+ */
2707
+ getCountriesById$(countryId) {
2708
+ return this.locationsService.getCountries$().pipe(map((countries) => countries.find((country) => country.id === countryId)));
2709
+ }
2710
+ };
2711
+ ScNewContragentFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentFormComponent, deps: [{ token: i1.ScReferencesService }, { token: i1.ScLocationsService }, { token: FormGroupDirective, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
2712
+ ScNewContragentFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", ngImport: i0, template: "<div [formGroup]=\"form\" *ngIf=\"selectOpf$ | async as selectOpf\" class=\"flex flex-col gap-3 pb-1\">\n <p class=\"font-bold text-lg\">\u041E\u0431\u0449\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430</p>\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 (\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u043E\u043D\u043D\u043E-\u043F\u0440\u0430\u0432\u043E\u0432\u0430\u044F \u0444\u043E\u0440\u043C\u0430)\">\n <tui-select formControlName=\"opf\" [valueContent]=\"opfContent\">\n \u0422\u0438\u043F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 (\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u043E\u043D\u043D\u043E-\u043F\u0440\u0430\u0432\u043E\u0432\u0430\u044F \u0444\u043E\u0440\u043C\u0430)\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of getOpf$() | async; let index = index\" tuiOption [value]=\"item.slug\">\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template #opfContent let-data>\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"opf\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label [tuiLabel]=\"opfListEnum[selectOpf] > opfListEnum.individual ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n <ng-template #fio>\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </ng-template>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.individual; else fio\">\n \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.individual\">\n <label tuiLabel=\"\u0418\u041D\u041D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F\">\n <tui-input formControlName=\"inn\">\n \u0418\u041D\u041D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F\n <input tuiTextfield [maskito]=\"innMask(selectOpf)\" autocomplete=\"inn\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"inn\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0434 \u041E\u041A\u041F\u041E\">\n <tui-input formControlName=\"okpo\">\n \u041A\u043E\u0434 \u041E\u041A\u041F\u041E\n <input tuiTextfield [maskito]=\"okpoMask(selectOpf)\" autocomplete=\"okpo\" />\n </tui-input>\n <tui-error formControlName=\"okpo\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0424.\u0418.\u041E. \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorName\">\n \u0424.\u0418.\u041E. \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"directorName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorPosition\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F </tui-input>\n <tui-error formControlName=\"directorPosition\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u043D\u043E\u043C\u043E\u0447\u0438\u0439 \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorActsOn\"> \u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u043D\u043E\u043C\u043E\u0447\u0438\u0439 \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F </tui-input>\n <tui-error formControlName=\"directorActsOn\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"legalAddress\">\n \u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"legalAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"postalAddress\">\n \u041F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"postalAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"actualAddress\">\n \u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"actualAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.entrepreneur\">\n <label tuiLabel=\"\u041A\u041F\u041F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\">\n <tui-input formControlName=\"kpp\">\n \u041A\u041F\u041F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\n <input tuiTextfield [maskito]=\"kppMask\" autocomplete=\"kpp\" />\n </tui-input>\n <tui-error formControlName=\"kpp\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.legal\">\n <label tuiLabel=\" \u0421\u0442\u0440\u0430\u043D\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-select formControlName=\"registrationCountryId\" [valueContent]=\"CountryContent\">\n \u0421\u0442\u0440\u0430\u043D\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of getCountries$() | async; let index = index\" tuiOption [value]=\"item.id\">\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template #CountryContent let-data>\n <div>{{ (getCountriesById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"registrationCountryId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"registrationNumber\"> \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"registrationNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"taxNumber\"> \u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"taxNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n </ng-container>\n</div>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"], dependencies: [{ 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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { 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: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { 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.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i6.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i6.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2713
+ ScNewContragentFormComponent = __decorate([
2714
+ UntilDestroy({ checkProperties: true })
2715
+ ], ScNewContragentFormComponent);
2716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentFormComponent, decorators: [{
2717
+ type: Component,
2718
+ args: [{ selector: 'sc-new-contragent-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [formGroup]=\"form\" *ngIf=\"selectOpf$ | async as selectOpf\" class=\"flex flex-col gap-3 pb-1\">\n <p class=\"font-bold text-lg\">\u041E\u0431\u0449\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430</p>\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 (\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u043E\u043D\u043D\u043E-\u043F\u0440\u0430\u0432\u043E\u0432\u0430\u044F \u0444\u043E\u0440\u043C\u0430)\">\n <tui-select formControlName=\"opf\" [valueContent]=\"opfContent\">\n \u0422\u0438\u043F \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 (\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u043E\u043D\u043D\u043E-\u043F\u0440\u0430\u0432\u043E\u0432\u0430\u044F \u0444\u043E\u0440\u043C\u0430)\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of getOpf$() | async; let index = index\" tuiOption [value]=\"item.slug\">\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template #opfContent let-data>\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"opf\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label [tuiLabel]=\"opfListEnum[selectOpf] > opfListEnum.individual ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n <ng-template #fio>\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </ng-template>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.individual; else fio\">\n \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.individual\">\n <label tuiLabel=\"\u0418\u041D\u041D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F\">\n <tui-input formControlName=\"inn\">\n \u0418\u041D\u041D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F\n <input tuiTextfield [maskito]=\"innMask(selectOpf)\" autocomplete=\"inn\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"inn\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0434 \u041E\u041A\u041F\u041E\">\n <tui-input formControlName=\"okpo\">\n \u041A\u043E\u0434 \u041E\u041A\u041F\u041E\n <input tuiTextfield [maskito]=\"okpoMask(selectOpf)\" autocomplete=\"okpo\" />\n </tui-input>\n <tui-error formControlName=\"okpo\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0424.\u0418.\u041E. \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorName\">\n \u0424.\u0418.\u041E. \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"directorName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorPosition\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F </tui-input>\n <tui-error formControlName=\"directorPosition\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u043D\u043E\u043C\u043E\u0447\u0438\u0439 \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F\">\n <tui-input formControlName=\"directorActsOn\"> \u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u043D\u043E\u043C\u043E\u0447\u0438\u0439 \u0440\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044F </tui-input>\n <tui-error formControlName=\"directorActsOn\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"legalAddress\">\n \u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"legalAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"postalAddress\">\n \u041F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"postalAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\">\n <tui-input formControlName=\"actualAddress\">\n \u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"actualAddress\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.entrepreneur\">\n <label tuiLabel=\"\u041A\u041F\u041F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\">\n <tui-input formControlName=\"kpp\">\n \u041A\u041F\u041F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\n <input tuiTextfield [maskito]=\"kppMask\" autocomplete=\"kpp\" />\n </tui-input>\n <tui-error formControlName=\"kpp\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n <ng-container *ngIf=\"opfListEnum[selectOpf] > opfListEnum.legal\">\n <label tuiLabel=\" \u0421\u0442\u0440\u0430\u043D\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-select formControlName=\"registrationCountryId\" [valueContent]=\"CountryContent\">\n \u0421\u0442\u0440\u0430\u043D\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of getCountries$() | async; let index = index\" tuiOption [value]=\"item.id\">\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template #CountryContent let-data>\n <div>{{ (getCountriesById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"registrationCountryId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"registrationNumber\"> \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"registrationNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430\">\n <tui-input formControlName=\"taxNumber\"> \u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430 </tui-input>\n <tui-error formControlName=\"taxNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </ng-container>\n </ng-container>\n</div>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
2719
+ }], ctorParameters: function () { return [{ type: i1.ScReferencesService }, { type: i1.ScLocationsService }, { type: i3.FormGroupDirective, decorators: [{
2720
+ type: SkipSelf
2721
+ }, {
2722
+ type: Inject,
2723
+ args: [FormGroupDirective]
2724
+ }] }]; } });
2725
+
2726
+ /**
2727
+ * Компотен добавления контрагента.
2728
+ */
2729
+ let ScAddContragentDialogComponent = class ScAddContragentDialogComponent {
2730
+ /**
2731
+ * Инициализирует экземпляр класса {@link ScAddContragentDialogComponent}.
2732
+ *
2733
+ * @param referencesService Сервис справочников.
2734
+ * @param contragentService Сервис работы с контрагентами.
2735
+ * @param convertersService Сервис конвертации данных.
2736
+ * @param context Контекст диалогового окна, в котором открыт компонент.
2737
+ */
2738
+ constructor(referencesService, contragentService, convertersService, locationsService, context) {
2739
+ this.referencesService = referencesService;
2740
+ this.contragentService = contragentService;
2741
+ this.convertersService = convertersService;
2742
+ this.locationsService = locationsService;
2743
+ this.context = context;
2744
+ /**
2745
+ * Перечисление организационно-правовых форм.
2746
+ */
2747
+ this.opfListEnum = ScOpfList;
2748
+ /**
2749
+ * Расположение баннера.
2750
+ */
2751
+ this.stepIndex = 0;
2752
+ /**
2753
+ * Родительская `FormGroup`.
2754
+ */
2755
+ this.form = new FormGroup({
2756
+ contragent: new FormGroup({})
2757
+ });
2758
+ /**
2759
+ * {@link Subject} события отправки формы.
2760
+ */
2761
+ this.onSubmit = new Subject();
2762
+ /**
2763
+ * {@link Observable} запроса добавления контрагента.
2764
+ */
2765
+ this.request$ = this.onSubmit.pipe(map(() => this.form.value.contragent), filter((value) => this.form.valid), switchMap((value) => {
2766
+ return this.contragentService.createContragent$(this.convertersService.removeNullRecursive(value)).pipe(tap((contragent) => this.context?.completeWith(contragent)), catchError((error) => {
2767
+ tuiMarkControlAsTouchedAndValidate(this.form);
2768
+ const errorResponse = error.error;
2769
+ for (const key in errorResponse.errors) {
2770
+ this.form.controls.contragent.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
2771
+ }
2772
+ if (!errorResponse.errors && errorResponse.message) {
2773
+ this.form.setErrors({ serverResponse: [errorResponse.message] });
2774
+ }
2775
+ return of({});
2776
+ }), startWith(null));
2777
+ }), share());
2778
+ /**
2779
+ * {@link Observable} изменения состояния загрузки данных аутентификации по номеру телефона.
2780
+ */
2781
+ this.loading$ = this.request$.pipe(map(tuiIsFalsy));
2782
+ }
2783
+ /**
2784
+ * Текущий выбранный ОПФ.
2785
+ */
2786
+ get selectOpf() {
2787
+ return this.opfListEnum[this.form.controls.contragent.controls['opf'].value];
2788
+ }
2789
+ /**
2790
+ * Список групп полей банковских реквизитов.
2791
+ */
2792
+ get bankAccounts() {
2793
+ return this.form.controls.contragent.get('bankAccounts');
2794
+ }
2795
+ /**
2796
+ * Список групп полей контактных лиц.
2797
+ */
2798
+ get contacts() {
2799
+ return this.form.controls.contragent.get('contacts');
2800
+ }
2801
+ /**
2802
+ * Выполняет навигацию по форме создания контрагента.
2803
+ *
2804
+ * @param delta Значение, на которое необходимо выполнить навигацию.
2805
+ */
2806
+ navigate(delta) {
2807
+ this.stepIndex = (this.stepIndex + delta) % 3;
2808
+ }
2809
+ /**
2810
+ * Проверяет, может ли пользователь перейти к следующему шагу создания контрагента.
2811
+ *
2812
+ * @returns Выводит значение `boolean` на основании {@link stepIndex}.
2813
+ */
2814
+ canNextStep() {
2815
+ switch (this.stepIndex) {
2816
+ case 0:
2817
+ for (const key in this.form.controls.contragent.controls) {
2818
+ if (Object.prototype.hasOwnProperty.call(this.form.controls.contragent.controls, key) && !Array.isArray(this.form.controls.contragent.controls[key].value)) {
2819
+ if (this.form.controls.contragent.controls[key].invalid) {
2820
+ return false;
2821
+ }
2822
+ }
2823
+ }
2824
+ return true;
2825
+ case 1:
2826
+ return this.form.controls.contragent.controls['contacts'].valid;
2827
+ case 2:
2828
+ return this.form.controls.contragent.controls['bankAccounts'].valid;
2829
+ default:
2830
+ return true;
2831
+ }
2832
+ }
2833
+ /**
2834
+ * Возвращает {@link Observable} списка направлений продаж.
2835
+ */
2836
+ getSalesDirections$() {
2837
+ return this.referencesService.directions$;
2838
+ }
2839
+ /**
2840
+ * Возвращает {@link Observable} списка направлений продаж.
2841
+ */
2842
+ getDirectionById$(directionId) {
2843
+ return this.referencesService.getDirectionById$(directionId);
2844
+ }
2845
+ /**
2846
+ * Возвращает {@link Observable} список организационно-правовых форм.
2847
+ */
2848
+ getOpf$() {
2849
+ return this.referencesService.opf$;
2850
+ }
2851
+ /**
2852
+ * Возвращает {@link Observable} организационно-правовой формы, соответствующий символьному обозначению (slug) на входе.
2853
+ *
2854
+ * @param slug Символьное обозначение (slug).
2855
+ */
2856
+ getOpfBySlug$(slug) {
2857
+ return this.referencesService.getOpfBySlug$(slug);
2858
+ }
2859
+ /**
2860
+ * Возвращает {@link Observable} списка валют.
2861
+ */
2862
+ getCurrencies$() {
2863
+ return this.referencesService.currencies$;
2864
+ }
2865
+ /**
2866
+ * Возвращает {@link Observable} валюты, соответствующий идентификатору на входе.
2867
+ *
2868
+ * @param currencyId — Идентификатор валюты.
2869
+ */
2870
+ getCurrencyById$(currencyId) {
2871
+ return this.referencesService.getCurrencyById$(currencyId);
2872
+ }
2873
+ /**
2874
+ * Возвращает {@link Observable} списка стран.
2875
+ */
2876
+ getCountries$() {
2877
+ return this.locationsService.getCountries$();
2878
+ }
2879
+ /**
2880
+ * Возвращает {@link Observable} страны, соответствующий идентификатору на входе.
2881
+ *
2882
+ * @param countryId — Идентификатор страны.
2883
+ */
2884
+ getCountriesById$(countryId) {
2885
+ return this.locationsService.getCountries$().pipe(map((countries) => countries.find((country) => country.id === countryId)));
2886
+ }
2887
+ /**
2888
+ * Создаёт группу полей банковских реквизитов.
2889
+ */
2890
+ createBankAccountGroup() {
2891
+ return new FormGroup({
2892
+ bankName: new FormControl(null, Validators.required),
2893
+ bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
2894
+ accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
2895
+ correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
2896
+ currencyId: new FormControl(null, Validators.required)
2897
+ });
2898
+ }
2899
+ /**
2900
+ * Добавляет Банковские реквизиты.
2901
+ */
2902
+ addBankAccountGroup() {
2903
+ this.bankAccounts.push(this.createBankAccountGroup());
2904
+ }
2905
+ /**
2906
+ * Удаляет банковские реквизиты.
2907
+ *
2908
+ * @param index Индекс банковских реквизитов.
2909
+ */
2910
+ removeBankAccountGroup(index) {
2911
+ this.bankAccounts.removeAt(index);
2912
+ }
2913
+ /**
2914
+ * Создаёт группу полей контактного лица.
2915
+ */
2916
+ createContactGroup() {
2917
+ return new FormGroup({
2918
+ name: new FormControl(null, Validators.required),
2919
+ phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
2920
+ email: new FormControl(null, Validators.email),
2921
+ position: new FormControl(null)
2922
+ });
2923
+ }
2924
+ /**
2925
+ * Добавляет контактное лицо контрагента.
2926
+ */
2927
+ addContactGroup() {
2928
+ this.contacts.push(this.createContactGroup());
2929
+ }
2930
+ /**
2931
+ * Удаляет контактное лицо контрагента.
2932
+ *
2933
+ * @param index Индекс контактного лица.
2934
+ */
2935
+ removeContactGroup(index) {
2936
+ this.contacts.removeAt(index);
2937
+ }
2938
+ };
2939
+ ScAddContragentDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, deps: [{ token: i1.ScReferencesService }, { token: i1.ScContragentService }, { token: i1.ScConvertersService }, { token: i1.ScLocationsService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2940
+ ScAddContragentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentDialogComponent, selector: "sc-add-contragent-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <tui-elastic-container>\n <tui-carousel [(index)]=\"stepIndex\" [draggable]=\"false\">\n <sc-new-contragent-form *tuiItem scCarouselItemHidden [index]=\"0\"></sc-new-contragent-form>\n\n <div *tuiItem scCarouselItemHidden [index]=\"1\">\n <div *ngIf=\"contacts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div *ngFor=\"let contact of contacts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-10\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeContactGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addContactGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442</button>\n </div>\n </div>\n\n <div *tuiItem scCarouselItemHidden [index]=\"2\">\n <div *ngIf=\"bankAccounts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div *ngFor=\"let bankAccount of bankAccounts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-12\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeBankAccountGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addBankAccountGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex gap-2 justify-center\">\n <button *ngIf=\"stepIndex > 0\" tuiButton appearance=\"secondary\" type=\"button\" (click)=\"stepIndex = (stepIndex - 1) % 3;\">\u041D\u0430\u0437\u0430\u0434</button>\n <button\n *ngIf=\"stepIndex === 2 || stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <button tuiButton [disabled]=\"!canNextStep()\" type=\"button\" (click)=\"stepIndex = (stepIndex + 1) % 3;\">\u0414\u0430\u043B\u0435\u0435</button>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i4$1.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i5.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: ScCarouselItemHiddenDirective, selector: "[tuiItem], [scCarouselItemHidden]", inputs: ["index"] }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2941
+ ScAddContragentDialogComponent = __decorate([
2942
+ UntilDestroy({ checkProperties: true })
2943
+ ], ScAddContragentDialogComponent);
2944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentDialogComponent, decorators: [{
2945
+ type: Component,
2946
+ args: [{ selector: 'sc-add-contragent-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <tui-elastic-container>\n <tui-carousel [(index)]=\"stepIndex\" [draggable]=\"false\">\n <sc-new-contragent-form *tuiItem scCarouselItemHidden [index]=\"0\"></sc-new-contragent-form>\n\n <div *tuiItem scCarouselItemHidden [index]=\"1\">\n <div *ngIf=\"contacts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div *ngFor=\"let contact of contacts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-10\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeContactGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addContactGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442</button>\n </div>\n </div>\n\n <div *tuiItem scCarouselItemHidden [index]=\"2\">\n <div *ngIf=\"bankAccounts\" class=\"flex flex-col gap-5 pb-1\">\n <p class=\"font-bold text-lg\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div *ngFor=\"let bankAccount of bankAccounts.controls; let index = index, let count = count, let last = last\" class=\"flex flex-col gap-3\">\n <div class=\"flex justify-between items-center h-12\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button *ngIf=\"count - 1\" tuiIconButton appearance=\"secondary\" (click)=\"removeBankAccountGroup(index)\" icon=\"tuiIconTrash2Large\"></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr *ngIf=\"!last\" class=\"w-full h-px bg-tui-base-04\" />\n </div>\n <button tuiButton icon=\"tuiIconPlusLarge\" [appearance]=\"'secondary'\" (click)=\"addBankAccountGroup()\" type=\"button\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</button>\n </div>\n </div>\n </tui-carousel>\n </tui-elastic-container>\n <div class=\"flex gap-2 justify-center\">\n <button *ngIf=\"stepIndex > 0\" tuiButton appearance=\"secondary\" type=\"button\" (click)=\"stepIndex = (stepIndex - 1) % 3;\">\u041D\u0430\u0437\u0430\u0434</button>\n <button\n *ngIf=\"stepIndex === 2 || stepIndex === 1 && !form.controls.contragent.controls['bankAccounts']; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n class=\"self-center\"\n >\n \u0421\u043E\u0437\u0434\u0430\u0442\u044C\n </button>\n <ng-template #nextIndexBtn>\n <button tuiButton [disabled]=\"!canNextStep()\" type=\"button\" (click)=\"stepIndex = (stepIndex + 1) % 3;\">\u0414\u0430\u043B\u0435\u0435</button>\n </ng-template>\n </div>\n</form>\n", styles: ["tui-carousel{--tui-carousel-padding: .5rem}\n"] }]
2947
+ }], ctorParameters: function () { return [{ type: i1.ScReferencesService }, { type: i1.ScContragentService }, { type: i1.ScConvertersService }, { type: i1.ScLocationsService }, { type: undefined, decorators: [{
2948
+ type: Optional
2949
+ }, {
2950
+ type: Inject,
2951
+ args: [POLYMORPHEUS_CONTEXT]
2952
+ }] }]; } });
2953
+
2954
+ /**
2955
+ * Компонент контактного лица в списке.
2956
+ */
2957
+ class ScContactsAccordionComponent {
2958
+ constructor() {
2959
+ /**
2960
+ * Событие нажатия на кнопку добавления контактного лица.
2961
+ */
2962
+ this.addContactClick = new EventEmitter();
2963
+ /**
2964
+ * Событие нажатия на кнопку удаления контактного лица.
2965
+ */
2966
+ this.deleteButtonClick = new EventEmitter();
2967
+ }
2968
+ }
2969
+ ScContactsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2970
+ ScContactsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: { contacts$: "contacts$" }, outputs: { addContactClick: "addContactClick", deleteButtonClick: "deleteButtonClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContactClick.emit()\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contacts$ | async as contacts\" [overlay]=\"true\" [showLoader]=\"contacts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div *ngFor=\"let contact of contacts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contact.name }}\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMailLarge\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ contact.email }}\"> {{ contact.email }} </a>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <div class=\"flex flex-col md:flex-row gap-1\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteButtonClick.emit(contact)\"\n ></button>\n </div> -->\n </div>\n </ng-container>\n\n <ng-template #contactsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, decorators: [{
2972
+ type: Component,
2973
+ args: [{ selector: 'sc-contacts-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContactClick.emit()\">\n \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contacts$ | async as contacts\" [overlay]=\"true\" [showLoader]=\"contacts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div *ngFor=\"let contact of contacts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contact.name }}\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMailLarge\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ contact.email }}\"> {{ contact.email }} </a>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <div class=\"flex flex-col md:flex-row gap-1\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteButtonClick.emit(contact)\"\n ></button>\n </div> -->\n </div>\n </ng-container>\n\n <ng-template #contactsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
2974
+ }], propDecorators: { contacts$: [{
2975
+ type: Input
2976
+ }], addContactClick: [{
2977
+ type: Output
2978
+ }], deleteButtonClick: [{
2979
+ type: Output
2980
+ }] } });
2981
+
2982
+ /**
2983
+ * Компонент контрагента пользователя.
2984
+ */
2985
+ class ScContragentsAccordionItemComponent {
2986
+ /**
2987
+ * Инициализирует экземпляр класса {@link ScContragentsAccordionItemComponent}.
2988
+ *
2989
+ * @param contragentService Сервис работы с контрагентами.
2990
+ */
2991
+ constructor(contragentService) {
2992
+ this.contragentService = contragentService;
2993
+ /**
2994
+ * Событие нажатия на кнопку удаления контрагента.
2995
+ */
2996
+ this.deleteContragentClick = new EventEmitter();
2997
+ /**
2998
+ * Событие нажатия на кнопку добавления банковского счёта контрагенту.
2999
+ */
3000
+ this.addContragentBankAccountClick = new EventEmitter();
3001
+ /**
3002
+ * Событие нажатия на кнопку удаления банковского счёта контрагента.
3003
+ */
3004
+ this.deleteContragentBankAccountClick = new EventEmitter();
3005
+ /**
3006
+ * Событие нажатия на кнопку добавления контактного лица контрагенту.
3007
+ */
3008
+ this.addContragentContactClick = new EventEmitter();
3009
+ /**
3010
+ * Событие нажатия на кнопку удаления контактного лица у контрагента.
3011
+ */
3012
+ this.deleteContragentContactClick = new EventEmitter();
3013
+ }
3014
+ /** @inheritDoc */
3015
+ ngOnInit() {
3016
+ this.bankAccounts$ = this.contragentService.getContragentBankAccounts$(this.contragent.id);
3017
+ this.contacts$ = this.contragentService.getContragentContacts$(this.contragent.id);
3018
+ }
3019
+ /**
3020
+ * Обработчик нажатия на кнопку удаления контактного лица у контрагента.
3021
+ *
3022
+ * @param contact Контактное лицо.
3023
+ * @param contragent Контрагент.
3024
+ */
3025
+ onDeleteContragentContactClick(contact, contragent) {
3026
+ this.deleteContragentContactClick.emit({ contact: contact, contragent: contragent });
3027
+ }
3028
+ }
3029
+ ScContragentsAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
3030
+ ScContragentsAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: { contragent: "contragent" }, outputs: { deleteContragentClick: "deleteContragentClick", addContragentBankAccountClick: "addContragentBankAccountClick", deleteContragentBankAccountClick: "deleteContragentBankAccountClick", addContragentContactClick: "addContragentContactClick", deleteContragentContactClick: "deleteContragentContactClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit(contragent.id)\"\n ></button>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteContragentClick.emit(contragent)\"\n ></button> -->\n </div>\n\n <sc-accordion (addButtonClick)=\"addContragentBankAccountClick.emit(contragent)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <!-- <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editBankAccountsContragentClick.emit(bankAccount.id)\"\n ></button>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteContragentBankAccountClick.emit(bankAccount)\"\n ></button>\n </div> -->\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion\n *ngIf=\"contacts$\"\n [contacts$]=\"contacts$\"\n (addContactClick)=\"addContragentContactClick.emit(contragent)\"\n (deleteButtonClick)=\"onDeleteContragentContactClick($event, contragent)\"\n ></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "deleteButtonClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, decorators: [{
3032
+ type: Component,
3033
+ args: [{ selector: 'sc-contragents-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit(contragent.id)\"\n ></button>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteContragentClick.emit(contragent)\"\n ></button> -->\n </div>\n\n <sc-accordion (addButtonClick)=\"addContragentBankAccountClick.emit(contragent)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <!-- <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editBankAccountsContragentClick.emit(bankAccount.id)\"\n ></button>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteContragentBankAccountClick.emit(bankAccount)\"\n ></button>\n </div> -->\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion\n *ngIf=\"contacts$\"\n [contacts$]=\"contacts$\"\n (addContactClick)=\"addContragentContactClick.emit(contragent)\"\n (deleteButtonClick)=\"onDeleteContragentContactClick($event, contragent)\"\n ></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
3034
+ }], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { contragent: [{
3035
+ type: Input
3036
+ }], deleteContragentClick: [{
3037
+ type: Output
3038
+ }], addContragentBankAccountClick: [{
3039
+ type: Output
3040
+ }], deleteContragentBankAccountClick: [{
3041
+ type: Output
3042
+ }], addContragentContactClick: [{
3043
+ type: Output
3044
+ }], deleteContragentContactClick: [{
3045
+ type: Output
3046
+ }] } });
3047
+
3048
+ /**
3049
+ * Компонент контрагента пользователя.
3050
+ */
3051
+ class ScContragentsAccordionComponent {
3052
+ /**
3053
+ * Инициализирует экземпляр класса {@link ScContragentsAccordionComponent}.
3054
+ *
3055
+ * @param contragentService Сервис работы с контрагентами.
3056
+ */
3057
+ constructor(contragentService) {
3058
+ this.contragentService = contragentService;
3059
+ /**
3060
+ * {@link Observable} данных о контрагентах пользователя.
3061
+ */
3062
+ this.contragents$ = this.contragentService.contragents$;
3063
+ /**
3064
+ * Событие нажатия на кнопку удаления контрагента.
3065
+ */
3066
+ this.addContragentClick = new EventEmitter();
3067
+ /**
3068
+ * Событие нажатия на кнопку удаления контрагента.
3069
+ */
3070
+ this.deleteContragentClick = new EventEmitter();
3071
+ /**
3072
+ * Событие нажатия на кнопку добавления банковского счёта контрагенту.
3073
+ */
3074
+ this.addContragentBankAccountClick = new EventEmitter();
3075
+ /**
3076
+ * Событие нажатия на кнопку удаления банковского счёта контрагента.
3077
+ */
3078
+ this.deleteContragentBankAccountClick = new EventEmitter();
3079
+ /**
3080
+ * Событие нажатия на кнопку добавления контактного лица контрагенту.
3081
+ */
3082
+ this.addContragentContactClick = new EventEmitter();
3083
+ /**
3084
+ * Событие нажатия на кнопку удаления контактного лица у контрагента.
3085
+ */
3086
+ this.deleteContragentContactClick = new EventEmitter();
3087
+ }
3088
+ }
3089
+ ScContragentsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
3090
+ ScContragentsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: { addContragentClick: "addContragentClick", deleteContragentClick: "deleteContragentClick", addContragentBankAccountClick: "addContragentBankAccountClick", deleteContragentBankAccountClick: "deleteContragentBankAccountClick", addContragentContactClick: "addContragentContactClick", deleteContragentContactClick: "deleteContragentContactClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (deleteContragentClick)=\"deleteContragentClick.emit($event)\"\n (addContragentBankAccountClick)=\"addContragentBankAccountClick.emit($event)\"\n (deleteContragentBankAccountClick)=\"deleteContragentBankAccountClick.emit($event)\"\n (addContragentContactClick)=\"addContragentContactClick.emit($event)\"\n (deleteContragentContactClick)=\"deleteContragentContactClick.emit($event)\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: ["contragent"], outputs: ["deleteContragentClick", "addContragentBankAccountClick", "deleteContragentBankAccountClick", "addContragentContactClick", "deleteContragentContactClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, decorators: [{
3092
+ type: Component,
3093
+ args: [{ selector: 'sc-contragents-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (deleteContragentClick)=\"deleteContragentClick.emit($event)\"\n (addContragentBankAccountClick)=\"addContragentBankAccountClick.emit($event)\"\n (deleteContragentBankAccountClick)=\"deleteContragentBankAccountClick.emit($event)\"\n (addContragentContactClick)=\"addContragentContactClick.emit($event)\"\n (deleteContragentContactClick)=\"deleteContragentContactClick.emit($event)\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
3094
+ }], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { addContragentClick: [{
3095
+ type: Output
3096
+ }], deleteContragentClick: [{
3097
+ type: Output
3098
+ }], addContragentBankAccountClick: [{
3099
+ type: Output
3100
+ }], deleteContragentBankAccountClick: [{
3101
+ type: Output
3102
+ }], addContragentContactClick: [{
3103
+ type: Output
3104
+ }], deleteContragentContactClick: [{
3105
+ type: Output
3106
+ }] } });
3107
+
3108
+ /**
3109
+ * Компонент поля ввода страны/региона/города.
3110
+ */
3111
+ let ScAddressesSelectionFieldComponent = class ScAddressesSelectionFieldComponent {
3112
+ /**
3113
+ * Инициализирует экземпляр класса {@link ScAddressesSelectionFieldComponent}.
3114
+ *
3115
+ * @param formGroupDirective Директива c `FormGroup` из DOM.
3116
+ * @param locationsService Сервис для получения списков стран, регионов, городов.
3117
+ */
3118
+ constructor(formGroupDirective, locationsService) {
3119
+ this.formGroupDirective = formGroupDirective;
3120
+ this.locationsService = locationsService;
3121
+ /**
3122
+ * FormControl для поля страны.
3123
+ */
3124
+ this.countryControl = new FormControl({
3125
+ id: 3159,
3126
+ name: 'Россия'
3127
+ }, Validators.required);
3128
+ /**
3129
+ * FormControl для поля региона.
3130
+ */
3131
+ this.regionControl = new FormControl(null, Validators.required);
3132
+ /**
3133
+ * FormControl для поля города.
3134
+ */
3135
+ this.cityControl = new FormControl(null, Validators.required);
3136
+ /**
3137
+ * {@link Observable} изменения списка стран.
3138
+ */
3139
+ this.countries$ = this.locationsService.getCountries$().pipe(share(), startWith(null));
3140
+ /**
3141
+ * {@link Observable} изменения списка регионов.
3142
+ */
3143
+ this.regions$ = tuiControlValue(this.countryControl).pipe(filter(tuiIsPresent), switchMap((country) => this.locationsService.getRegions$(country.id).pipe(startWith(null))), share());
3144
+ /**
3145
+ * {@link Observable} изменения списка городов.
3146
+ */
3147
+ this.cities$ = combineLatest({
3148
+ country: tuiControlValue(this.countryControl),
3149
+ region: tuiControlValue(this.regionControl)
3150
+ }).pipe(debounceTime(0), switchMap(({ country, region }) => country && region ? this.locationsService.getCities$(country.id, region.id).pipe(startWith(null)) : of([])), share());
3151
+ /**
3152
+ * Функция преобразования объекта сортировки в значение, отображаемое в поле ввода.
3153
+ *
3154
+ * @param item Выбранный объект выпадающего списка.
3155
+ */
3156
+ this.stringify = (item) => `${item.name}`;
3157
+ }
3158
+ /**
3159
+ * `FormControl` поля идентификатора города.
3160
+ */
3161
+ get cityIdControl() {
2573
3162
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2574
3163
  return this.formGroupDirective.form.get('cityId');
2575
3164
  }
@@ -2610,7 +3199,7 @@ let ScAddressesSelectionFieldComponent = class ScAddressesSelectionFieldComponen
2610
3199
  }
2611
3200
  };
2612
3201
  ScAddressesSelectionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddressesSelectionFieldComponent, deps: [{ token: FormGroupDirective, skipSelf: true }, { token: i1.ScLocationsService }], target: i0.ɵɵFactoryTarget.Component });
2613
- ScAddressesSelectionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field", ngImport: i0, template: "<div class=\"flex flex-col sm:flex-row gap-4 items-start\">\n <!-- TODO: \u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0438 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u0434\u043B\u044F \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <!-- <label tuiLabel=\"\u0421\u0442\u0440\u0430\u043D\u0430\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"countries$ | async as countries\" [formControl]=\"countryControl\" [stringify]=\"stringify\">\n \u0421\u0442\u0440\u0430\u043D\u0430\n <input tuiTextfield autocomplete=\"new-password\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"countries | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"countryControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label> -->\n <!-- TODO: [TASK:9383]: \u0414\u043E\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u0433\u043E\u0440\u043E\u0434\u0430, \u043A\u0430\u043A \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 -->\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u043E\u043D\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"regions$ | async as regions\" [formControl]=\"regionControl\" [stringify]=\"stringify\">\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"regions | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"regionControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0413\u043E\u0440\u043E\u0434\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"cities$ | async as cities\" [formControl]=\"cityControl\" [stringify]=\"stringify\" (ngModelChange)=\"onSelectedCity($event)\">\n \u0413\u043E\u0440\u043E\u0434\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"cities | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"cityIdControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n <tui-error *ngIf=\"cityIdControl.untouched\" [formControl]=\"cityControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i6.TuiComboBoxComponent, selector: "tui-combo-box", inputs: ["stringify", "strictMatcher", "identityMatcher", "valueContent", "strict", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i6.TuiComboBoxDirective, selector: "tui-combo-box" }, { kind: "component", type: i6.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "pipe", type: i6.TuiFilterByInputWithPipe, name: "tuiFilterByInputWith" }, { kind: "pipe", type: i6.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3202
+ ScAddressesSelectionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field", ngImport: i0, template: "<div class=\"flex flex-col sm:flex-row gap-4 items-start\">\n <!-- TODO: \u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0438 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u0434\u043B\u044F \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <!-- <label tuiLabel=\"\u0421\u0442\u0440\u0430\u043D\u0430\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"countries$ | async as countries\" [formControl]=\"countryControl\" [stringify]=\"stringify\">\n \u0421\u0442\u0440\u0430\u043D\u0430\n <input tuiTextfield autocomplete=\"new-password\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"countries | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"countryControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label> -->\n <!-- TODO: [TASK:9383]: \u0414\u043E\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u0433\u043E\u0440\u043E\u0434\u0430, \u043A\u0430\u043A \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 -->\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u043E\u043D\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"regions$ | async as regions\" [formControl]=\"regionControl\" [stringify]=\"stringify\">\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"regions | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"regionControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0413\u043E\u0440\u043E\u0434\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"cities$ | async as cities\" [formControl]=\"cityControl\" [stringify]=\"stringify\" (ngModelChange)=\"onSelectedCity($event)\">\n \u0413\u043E\u0440\u043E\u0434\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"cities | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"cityIdControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n <tui-error *ngIf=\"cityIdControl.untouched\" [formControl]=\"cityControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiComboBoxComponent, selector: "tui-combo-box", inputs: ["stringify", "strictMatcher", "identityMatcher", "valueContent", "strict", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiComboBoxDirective, selector: "tui-combo-box" }, { kind: "component", type: i4$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "pipe", type: i4$1.TuiFilterByInputWithPipe, name: "tuiFilterByInputWith" }, { kind: "pipe", type: i4$1.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2614
3203
  ScAddressesSelectionFieldComponent = __decorate([
2615
3204
  UntilDestroy({ checkProperties: true })
2616
3205
  ], ScAddressesSelectionFieldComponent);
@@ -2695,38 +3284,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2695
3284
  }] });
2696
3285
 
2697
3286
  /**
2698
- * Компонент формы создания нового банковского счета контрагента.
3287
+ * Компонент формы создания нового контактного лица.
2699
3288
  */
2700
- class ScAddContragentBankAccountsDialogComponent {
3289
+ class ScAddContactDialogComponent {
2701
3290
  /**
2702
- * Инициализирует экземпляр класса {@link ScAddContragentBankAccountsFormComponent}.
3291
+ * Инициализирует экземпляр класса {@link ScAddContactDialogComponent}.
2703
3292
  *
2704
- * @param contragentService Сервис работы с контрагентами.
3293
+ * @param contactsService Сервис для работы с контактными лицами.
3294
+ * @param convertersService Сервис конвертации данных.
2705
3295
  * @param context Контекст диалогового окна, в котором открыт компонент.
2706
3296
  */
2707
- constructor(contragentService, context) {
2708
- this.contragentService = contragentService;
3297
+ constructor(contactsService, convertersService, context) {
3298
+ this.contactsService = contactsService;
3299
+ this.convertersService = convertersService;
2709
3300
  this.context = context;
2710
3301
  /**
2711
- * Группа с полем банковских реквизитов.
3302
+ * Группа с полями контактного лица.
2712
3303
  */
2713
3304
  this.form = new FormGroup({
2714
- bankName: new FormControl(null, Validators.required),
2715
- bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
2716
- accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
2717
- correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
2718
- currencyId: new FormControl(null, Validators.required)
3305
+ name: new FormControl(null, Validators.required),
3306
+ phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
3307
+ email: new FormControl(null, Validators.email),
3308
+ position: new FormControl(null, Validators.required)
2719
3309
  });
2720
3310
  /**
2721
3311
  * {@link Subject} события отправки формы.
2722
3312
  */
2723
3313
  this.onSubmit = new Subject();
2724
3314
  /**
2725
- * {@link Observable} запроса данных аутентификации.
3315
+ * {@link Observable} запроса добавления контактного лица.
2726
3316
  */
2727
- this.request$ = this.onSubmit.pipe(map(() => this.form.value), tap((i) => console.log(i)), filter((value) => this.form.valid), switchMap((value) => {
2728
- console.log(this.context.data.contragentId);
2729
- return this.contragentService.createContragentBankAccount$(this.context.data.contragentId, value).pipe(tap((bankAccount) => this.context?.completeWith(bankAccount)), catchError((error) => {
3317
+ this.request$ = this.onSubmit.pipe(map(() => this.form.value), filter((value) => this.form.valid), map((value) => this.convertersService.removeNull({ ...value, ...this.context.data })), switchMap((data) => {
3318
+ return this.contactsService.createContact$(data).pipe(tap((contact) => this.context?.completeWith(contact)), catchError((error) => {
2730
3319
  tuiMarkControlAsTouchedAndValidate(this.form);
2731
3320
  const errorResponse = error.error;
2732
3321
  for (const key in errorResponse.errors) {
@@ -2744,12 +3333,12 @@ class ScAddContragentBankAccountsDialogComponent {
2744
3333
  this.loading$ = this.request$.pipe(map(tuiIsFalsy));
2745
3334
  }
2746
3335
  }
2747
- ScAddContragentBankAccountsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, deps: [{ token: i1.ScContragentService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
2748
- ScAddContragentBankAccountsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentBankAccountsDialogComponent, selector: "sc-add-contragent-bank-account-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, decorators: [{
3336
+ ScAddContactDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContactDialogComponent, deps: [{ token: i1.ScContactsService }, { token: i1.ScConvertersService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
3337
+ ScAddContactDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContactDialogComponent, selector: "sc-add-contact-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contact-form [form]=\"form\"></sc-new-contact-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContactDialogComponent, decorators: [{
2750
3339
  type: Component,
2751
- args: [{ selector: 'sc-add-contragent-bank-account-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>" }]
2752
- }], ctorParameters: function () { return [{ type: i1.ScContragentService }, { type: undefined, decorators: [{
3340
+ args: [{ selector: 'sc-add-contact-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contact-form [form]=\"form\"></sc-new-contact-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n" }]
3341
+ }], ctorParameters: function () { return [{ type: i1.ScContactsService }, { type: i1.ScConvertersService }, { type: undefined, decorators: [{
2753
3342
  type: Inject,
2754
3343
  args: [POLYMORPHEUS_CONTEXT]
2755
3344
  }] }]; } });
@@ -2760,7 +3349,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2760
3349
  class ScContactsModule {
2761
3350
  }
2762
3351
  ScContactsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2763
- ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, declarations: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent], imports: [CommonModule,
3352
+ ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, declarations: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent], imports: [CommonModule,
2764
3353
  FormsModule,
2765
3354
  ReactiveFormsModule,
2766
3355
  ScAccordionModule,
@@ -2780,7 +3369,7 @@ ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
2780
3369
  TuiLabelModule,
2781
3370
  TuiInputModule,
2782
3371
  TuiInputPhoneModule,
2783
- TuiErrorModule], exports: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent] });
3372
+ TuiErrorModule], exports: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent] });
2784
3373
  ScContactsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, imports: [CommonModule,
2785
3374
  FormsModule,
2786
3375
  ReactiveFormsModule,
@@ -2805,7 +3394,7 @@ ScContactsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
2805
3394
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, decorators: [{
2806
3395
  type: NgModule,
2807
3396
  args: [{
2808
- declarations: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent],
3397
+ declarations: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent],
2809
3398
  imports: [
2810
3399
  CommonModule,
2811
3400
  FormsModule,
@@ -2829,7 +3418,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2829
3418
  TuiInputPhoneModule,
2830
3419
  TuiErrorModule
2831
3420
  ],
2832
- exports: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent]
3421
+ exports: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent]
3422
+ }]
3423
+ }] });
3424
+
3425
+ /**
3426
+ * Модуль директивы для скрытия элементов карусели тайги.
3427
+ */
3428
+ class ScCarouselItemHiddenModule {
3429
+ }
3430
+ ScCarouselItemHiddenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3431
+ ScCarouselItemHiddenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenModule, declarations: [ScCarouselItemHiddenDirective], imports: [TuiCarouselModule], exports: [ScCarouselItemHiddenDirective] });
3432
+ ScCarouselItemHiddenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenModule, imports: [TuiCarouselModule] });
3433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCarouselItemHiddenModule, decorators: [{
3434
+ type: NgModule,
3435
+ args: [{
3436
+ imports: [TuiCarouselModule],
3437
+ declarations: [ScCarouselItemHiddenDirective],
3438
+ exports: [ScCarouselItemHiddenDirective]
2833
3439
  }]
2834
3440
  }] });
2835
3441
 
@@ -2839,17 +3445,151 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2839
3445
  class ScContragentsModule {
2840
3446
  }
2841
3447
  ScContragentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2842
- ScContragentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScContragentsAccordionComponent] });
2843
- ScContragentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
3448
+ ScContragentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScNewContragentFormComponent], imports: [FormsModule,
3449
+ ReactiveFormsModule,
3450
+ CommonModule,
3451
+ ScAccordionModule,
3452
+ TuiButtonModule,
3453
+ TuiModeModule,
3454
+ TuiLoaderModule,
3455
+ TuiLetModule,
3456
+ TuiNotificationModule,
3457
+ ScContactsModule,
3458
+ TuiFieldErrorPipeModule,
3459
+ TuiErrorModule,
3460
+ TuiSelectModule,
3461
+ TuiDataListModule,
3462
+ TuiDataListWrapperModule,
3463
+ TuiLabelModule,
3464
+ TuiInputModule,
3465
+ TuiInputPhoneModule,
3466
+ MaskitoModule,
3467
+ ScFormFieldsModule,
3468
+ TuiElasticContainerModule,
3469
+ TuiCarouselModule,
3470
+ ScCarouselItemHiddenModule], exports: [ScContragentsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScNewContragentFormComponent] });
3471
+ ScContragentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, imports: [FormsModule,
3472
+ ReactiveFormsModule,
3473
+ CommonModule,
3474
+ ScAccordionModule,
3475
+ TuiButtonModule,
3476
+ TuiModeModule,
3477
+ TuiLoaderModule,
3478
+ TuiLetModule,
3479
+ TuiNotificationModule,
3480
+ ScContactsModule,
3481
+ TuiFieldErrorPipeModule,
3482
+ TuiErrorModule,
3483
+ TuiSelectModule,
3484
+ TuiDataListModule,
3485
+ TuiDataListWrapperModule,
3486
+ TuiLabelModule,
3487
+ TuiInputModule,
3488
+ TuiInputPhoneModule,
3489
+ MaskitoModule,
3490
+ ScFormFieldsModule,
3491
+ TuiElasticContainerModule,
3492
+ TuiCarouselModule,
3493
+ ScCarouselItemHiddenModule] });
2844
3494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, decorators: [{
2845
3495
  type: NgModule,
2846
3496
  args: [{
2847
- declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent],
2848
- imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
2849
- exports: [ScContragentsAccordionComponent]
3497
+ declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScNewContragentFormComponent],
3498
+ imports: [
3499
+ FormsModule,
3500
+ ReactiveFormsModule,
3501
+ CommonModule,
3502
+ ScAccordionModule,
3503
+ TuiButtonModule,
3504
+ TuiModeModule,
3505
+ TuiLoaderModule,
3506
+ TuiLetModule,
3507
+ TuiNotificationModule,
3508
+ ScContactsModule,
3509
+ TuiFieldErrorPipeModule,
3510
+ TuiErrorModule,
3511
+ TuiSelectModule,
3512
+ TuiDataListModule,
3513
+ TuiDataListWrapperModule,
3514
+ TuiLabelModule,
3515
+ TuiInputModule,
3516
+ TuiInputPhoneModule,
3517
+ MaskitoModule,
3518
+ ScFormFieldsModule,
3519
+ TuiElasticContainerModule,
3520
+ TuiCarouselModule,
3521
+ ScCarouselItemHiddenModule
3522
+ ],
3523
+ exports: [ScContragentsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScNewContragentFormComponent]
2850
3524
  }]
2851
3525
  }] });
2852
3526
 
3527
+ /**
3528
+ * Компонент добавления адреса доставки.
3529
+ *
3530
+ * TODO: TASK[8813] Добавить карту, и поведение выбора адреса доставки через карту. При этом вынести форму в отдельный компонент AddDeliveryAddressForm или submit логику в директиву.
3531
+ */
3532
+ class ScAddDeliveryAddressDialogComponent {
3533
+ /**
3534
+ * Инициализирует экземпляр класса {@link ScAddDeliveryAddressDialogComponent}.
3535
+ *
3536
+ * @param deliveryAddressService Сервис работы с адресами доставки.
3537
+ * @param context Контекст диалогового окна, в котором открыт компонент.
3538
+ * @param convertersService Сервис конвертации данных.
3539
+ */
3540
+ constructor(deliveryAddressService, context, convertersService) {
3541
+ this.deliveryAddressService = deliveryAddressService;
3542
+ this.context = context;
3543
+ this.convertersService = convertersService;
3544
+ /**
3545
+ * Перечисление типов подсказок.
3546
+ */
3547
+ this.suggestionType = ScISuggestionType;
3548
+ /**
3549
+ * {@link Subject} события отправки формы.
3550
+ */
3551
+ this.onSubmit$ = new Subject();
3552
+ /**
3553
+ * {@link Observable} запроса данных добавления адрес доставки.
3554
+ */
3555
+ this.request$ = this.onSubmit$.pipe(tap(() => tuiMarkControlAsTouchedAndValidate(this.form)), filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.deliveryAddressService.createDeliveryAddress$(this.convertersService.removeNullRecursive(value)).pipe(catchError((error) => {
3556
+ const errorResponse = error.error;
3557
+ for (const key in errorResponse.errors) {
3558
+ this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
3559
+ }
3560
+ if (!errorResponse.errors && errorResponse.message) {
3561
+ this.form.setErrors({ serverResponse: [errorResponse.message] });
3562
+ }
3563
+ return of(undefined);
3564
+ }), tap(() => this.context.completeWith()), startWith(null))), share());
3565
+ /**
3566
+ * {@link Observable} изменения состояния загрузки данных.
3567
+ */
3568
+ this.loading$ = this.request$.pipe(map((data) => data === null));
3569
+ /**
3570
+ * Форма для создания адреса доставки.
3571
+ */
3572
+ this.form = new FormGroup({
3573
+ address: new FormControl(null, Validators.required),
3574
+ contact: new FormGroup({
3575
+ name: new FormControl(null, Validators.required),
3576
+ phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
3577
+ email: new FormControl(null, Validators.email),
3578
+ position: new FormControl(null)
3579
+ })
3580
+ });
3581
+ }
3582
+ }
3583
+ ScAddDeliveryAddressDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, deps: [{ token: i1.ScDeliveryAddressService }, { token: POLYMORPHEUS_CONTEXT }, { token: i1.ScConvertersService }], target: i0.ɵɵFactoryTarget.Component });
3584
+ ScAddDeliveryAddressDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddDeliveryAddressDialogComponent, selector: "sc-add-delivery-address-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit$.next()\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"address\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <div formGroupName=\"contact\" class=\"flex flex-col gap-2 grow\">\n <p class=\"font-bold w-full\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n <input tuiTextfield type=\"email\" />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button tuiButton matRipple [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" class=\"self-center\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n</form>\n", dependencies: [{ kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddDeliveryAddressDialogComponent, decorators: [{
3586
+ type: Component,
3587
+ args: [{ selector: 'sc-add-delivery-address-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit$.next()\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\">\n <tui-input formControlName=\"address\">\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.address\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"address\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <div formGroupName=\"contact\" class=\"flex flex-col gap-2 grow\">\n <p class=\"font-bold w-full\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E:</p>\n <label tuiLabel=\"\u0424.\u0418.\u041E.\">\n <tui-input formControlName=\"name\">\n \u0424.\u0418.\u041E.\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.fio\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"email\">\n <input tuiTextfield type=\"email\" />\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C\">\n <tui-input formControlName=\"position\"> \u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C </tui-input>\n <tui-error formControlName=\"position\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button tuiButton matRipple [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" class=\"self-center\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n</form>\n" }]
3588
+ }], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }, { type: undefined, decorators: [{
3589
+ type: Inject,
3590
+ args: [POLYMORPHEUS_CONTEXT]
3591
+ }] }, { type: i1.ScConvertersService }]; } });
3592
+
2853
3593
  /**
2854
3594
  * Компонент адреса доставки.
2855
3595
  */
@@ -2862,23 +3602,44 @@ class ScDeliveryAddressAccordionItemComponent {
2862
3602
  constructor(deliveryAddressService) {
2863
3603
  this.deliveryAddressService = deliveryAddressService;
2864
3604
  /**
2865
- * Событие нажатия на кнопку редактирования контрагента.
3605
+ * Событие нажатия на кнопку удаления адреса доставки.
3606
+ */
3607
+ this.deleteDeliveryAddressClick = new EventEmitter();
3608
+ /**
3609
+ * Событие нажатия на кнопку добавления контактного лица адресу доставки.
3610
+ */
3611
+ this.addDeliveryAddressContactClick = new EventEmitter();
3612
+ /**
3613
+ * Событие нажатия на кнопку удаления контактного лица адреса доставки.
2866
3614
  */
2867
- this.editDeliveryAddressClick = new EventEmitter();
3615
+ this.deleteDeliveryAddressContactClick = new EventEmitter();
2868
3616
  }
2869
3617
  /** @inheritDoc */
2870
3618
  ngOnInit() {
2871
3619
  this.contacts$ = this.deliveryAddressService.getDeliveryAddressContacts$(this.deliveryAddress.id);
2872
3620
  }
3621
+ /**
3622
+ * Обработчик нажатия на кнопку удаления контактного лица у адреса доставки.
3623
+ *
3624
+ * @param contact Контактное лицо.
3625
+ * @param address Адрес доставки клиента.
3626
+ */
3627
+ onDeleteContragentContactClick(contact, address) {
3628
+ this.deleteDeliveryAddressContactClick.emit({ contact: contact, address: address });
3629
+ }
2873
3630
  }
2874
3631
  ScDeliveryAddressAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionItemComponent, deps: [{ token: i1.ScDeliveryAddressService }], target: i0.ɵɵFactoryTarget.Component });
2875
- ScDeliveryAddressAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: { deliveryAddress: "deliveryAddress" }, outputs: { editDeliveryAddressClick: "editDeliveryAddressClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"$event.stopPropagation();\"></button>\n </div>\n\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "editContactClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3632
+ ScDeliveryAddressAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: { deliveryAddress: "deliveryAddress" }, outputs: { deleteDeliveryAddressClick: "deleteDeliveryAddressClick", addDeliveryAddressContactClick: "addDeliveryAddressContactClick", deleteDeliveryAddressContactClick: "deleteDeliveryAddressContactClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteDeliveryAddressClick.emit(deliveryAddress)\"\n ></button> -->\n </div>\n\n <sc-contacts-accordion\n *ngIf=\"contacts$\"\n [contacts$]=\"contacts$\"\n (addContactClick)=\"addDeliveryAddressContactClick.next(deliveryAddress)\"\n (deleteButtonClick)=\"onDeleteContragentContactClick($event, deliveryAddress)\"\n ></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "deleteButtonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2876
3633
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionItemComponent, decorators: [{
2877
3634
  type: Component,
2878
- args: [{ selector: 'sc-delivery-address-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"$event.stopPropagation();\"></button>\n </div>\n\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
3635
+ args: [{ selector: 'sc-delivery-address-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <!-- \u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044E. -->\n <!-- <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); deleteDeliveryAddressClick.emit(deliveryAddress)\"\n ></button> -->\n </div>\n\n <sc-contacts-accordion\n *ngIf=\"contacts$\"\n [contacts$]=\"contacts$\"\n (addContactClick)=\"addDeliveryAddressContactClick.next(deliveryAddress)\"\n (deleteButtonClick)=\"onDeleteContragentContactClick($event, deliveryAddress)\"\n ></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
2879
3636
  }], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }]; }, propDecorators: { deliveryAddress: [{
2880
3637
  type: Input
2881
- }], editDeliveryAddressClick: [{
3638
+ }], deleteDeliveryAddressClick: [{
3639
+ type: Output
3640
+ }], addDeliveryAddressContactClick: [{
3641
+ type: Output
3642
+ }], deleteDeliveryAddressContactClick: [{
2882
3643
  type: Output
2883
3644
  }] } });
2884
3645
 
@@ -2901,15 +3662,33 @@ class ScDeliveryAddressAccordionComponent {
2901
3662
  * Событие нажатия на кнопку добавления адреса доставки клиента.
2902
3663
  */
2903
3664
  this.addDeliveryAddressClick = new EventEmitter();
3665
+ /**
3666
+ * Событие нажатия на кнопку удаления адреса доставки клиента.
3667
+ */
3668
+ this.deleteDeliveryAddressClick = new EventEmitter();
3669
+ /**
3670
+ * Событие нажатия на кнопку добавления контактного лица для адреса доставки.
3671
+ */
3672
+ this.addDeliveryAddressContactClick = new EventEmitter();
3673
+ /**
3674
+ * Событие нажатия на кнопку удаления контактного лица у адреса доставки.
3675
+ */
3676
+ this.deleteDeliveryAddressContactClick = new EventEmitter();
2904
3677
  }
2905
3678
  }
2906
3679
  ScDeliveryAddressAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionComponent, deps: [{ token: i1.ScDeliveryAddressService }], target: i0.ɵɵFactoryTarget.Component });
2907
- ScDeliveryAddressAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: { addDeliveryAddressClick: "addDeliveryAddressClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item *ngFor=\"let address of deliveryAddress\" [deliveryAddress]=\"address\"></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addDeliveryAddressClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { 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.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: ["deliveryAddress"], outputs: ["editDeliveryAddressClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3680
+ ScDeliveryAddressAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: { addDeliveryAddressClick: "addDeliveryAddressClick", deleteDeliveryAddressClick: "deleteDeliveryAddressClick", addDeliveryAddressContactClick: "addDeliveryAddressContactClick", deleteDeliveryAddressContactClick: "deleteDeliveryAddressContactClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item\n *ngFor=\"let address of deliveryAddress\"\n [deliveryAddress]=\"address\"\n (deleteDeliveryAddressClick)=\"deleteDeliveryAddressClick.emit($event)\"\n (addDeliveryAddressContactClick)=\"addDeliveryAddressContactClick.emit($event)\"\n (deleteDeliveryAddressContactClick)=\"deleteDeliveryAddressContactClick.emit($event)\"\n ></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\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: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: ["deliveryAddress"], outputs: ["deleteDeliveryAddressClick", "addDeliveryAddressContactClick", "deleteDeliveryAddressContactClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2908
3681
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionComponent, decorators: [{
2909
3682
  type: Component,
2910
- args: [{ selector: 'sc-delivery-address-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item *ngFor=\"let address of deliveryAddress\" [deliveryAddress]=\"address\"></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addDeliveryAddressClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
3683
+ args: [{ selector: 'sc-delivery-address-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item\n *ngFor=\"let address of deliveryAddress\"\n [deliveryAddress]=\"address\"\n (deleteDeliveryAddressClick)=\"deleteDeliveryAddressClick.emit($event)\"\n (addDeliveryAddressContactClick)=\"addDeliveryAddressContactClick.emit($event)\"\n (deleteDeliveryAddressContactClick)=\"deleteDeliveryAddressContactClick.emit($event)\"\n ></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.</div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
2911
3684
  }], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }]; }, propDecorators: { addDeliveryAddressClick: [{
2912
3685
  type: Output
3686
+ }], deleteDeliveryAddressClick: [{
3687
+ type: Output
3688
+ }], addDeliveryAddressContactClick: [{
3689
+ type: Output
3690
+ }], deleteDeliveryAddressContactClick: [{
3691
+ type: Output
2913
3692
  }] } });
2914
3693
 
2915
3694
  /**
@@ -2918,14 +3697,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2918
3697
  class ScDeliveryAddressModule {
2919
3698
  }
2920
3699
  ScDeliveryAddressModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2921
- ScDeliveryAddressModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScDeliveryAddressAccordionComponent] });
2922
- ScDeliveryAddressModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
3700
+ ScDeliveryAddressModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScAddDeliveryAddressDialogComponent], imports: [CommonModule,
3701
+ ScAccordionModule,
3702
+ TuiButtonModule,
3703
+ TuiModeModule,
3704
+ TuiLoaderModule,
3705
+ TuiLetModule,
3706
+ TuiNotificationModule,
3707
+ ScContactsModule,
3708
+ FormsModule,
3709
+ ReactiveFormsModule,
3710
+ TuiLabelModule,
3711
+ TuiFieldErrorPipeModule,
3712
+ TuiErrorModule,
3713
+ TuiInputModule,
3714
+ TuiInputPhoneModule,
3715
+ ScFormFieldsModule], exports: [ScDeliveryAddressAccordionComponent, ScAddDeliveryAddressDialogComponent] });
3716
+ ScDeliveryAddressModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, imports: [CommonModule,
3717
+ ScAccordionModule,
3718
+ TuiButtonModule,
3719
+ TuiModeModule,
3720
+ TuiLoaderModule,
3721
+ TuiLetModule,
3722
+ TuiNotificationModule,
3723
+ ScContactsModule,
3724
+ FormsModule,
3725
+ ReactiveFormsModule,
3726
+ TuiLabelModule,
3727
+ TuiFieldErrorPipeModule,
3728
+ TuiErrorModule,
3729
+ TuiInputModule,
3730
+ TuiInputPhoneModule,
3731
+ ScFormFieldsModule] });
2923
3732
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, decorators: [{
2924
3733
  type: NgModule,
2925
3734
  args: [{
2926
- declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent],
2927
- imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
2928
- exports: [ScDeliveryAddressAccordionComponent]
3735
+ declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScAddDeliveryAddressDialogComponent],
3736
+ imports: [
3737
+ CommonModule,
3738
+ ScAccordionModule,
3739
+ TuiButtonModule,
3740
+ TuiModeModule,
3741
+ TuiLoaderModule,
3742
+ TuiLetModule,
3743
+ TuiNotificationModule,
3744
+ ScContactsModule,
3745
+ FormsModule,
3746
+ ReactiveFormsModule,
3747
+ TuiLabelModule,
3748
+ TuiFieldErrorPipeModule,
3749
+ TuiErrorModule,
3750
+ TuiInputModule,
3751
+ TuiInputPhoneModule,
3752
+ ScFormFieldsModule
3753
+ ],
3754
+ exports: [ScDeliveryAddressAccordionComponent, ScAddDeliveryAddressDialogComponent]
2929
3755
  }]
2930
3756
  }] });
2931
3757
 
@@ -3061,7 +3887,7 @@ class TreeDirective {
3061
3887
  this.service.loadChildren(node);
3062
3888
  }
3063
3889
  }
3064
- TreeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, deps: [{ token: i6.TuiTreeService }], target: i0.ɵɵFactoryTarget.Directive });
3890
+ TreeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, deps: [{ token: i4$1.TuiTreeService }], target: i0.ɵɵFactoryTarget.Directive });
3065
3891
  TreeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TreeDirective, selector: "[scTree]", providers: [TuiTreeService], exportAs: ["scTree"], ngImport: i0 });
3066
3892
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, decorators: [{
3067
3893
  type: Directive,
@@ -3070,7 +3896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3070
3896
  exportAs: 'scTree',
3071
3897
  providers: [TuiTreeService]
3072
3898
  }]
3073
- }], ctorParameters: function () { return [{ type: i6.TuiTreeService }]; } });
3899
+ }], ctorParameters: function () { return [{ type: i4$1.TuiTreeService }]; } });
3074
3900
 
3075
3901
  /**
3076
3902
  * Компонент для удаления стандартного значка элемента дерева.
@@ -3178,7 +4004,7 @@ FilesAndDocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
3178
4004
  provide: TUI_TREE_LOADER,
3179
4005
  useClass: TreeLoaderService
3180
4006
  }
3181
- ], ngImport: i0, template: "<ng-container *ngIf=\"data$ | async as data; else skeleton\">\n <tui-tree\n *ngFor=\"let node of data\"\n #tree=\"scTree\"\n scTree\n [scTopNodeText]=\"node.text\"\n [scTopNodeIcon]=\"node.icon\"\n [scTopNodeLink]=\"node.link\"\n [scTopNodeChilds]=\"node.hasChildren\"\n [scTopNodeParent]=\"node.id\"\n [scTopNodeDate]=\"node.createdAt\"\n [childrenHandler]=\"tree.childrenHandler\"\n [content]=\"content\"\n [map]=\"tree.map\"\n [tuiTreeController]=\"false\"\n [value]=\"tree.service.data$ | async\"\n (toggled)=\"tree.onToggled($event)\"\n class=\"overflow-hidden\"\n ></tui-tree>\n</ng-container>\n\n<ng-template #content let-item>\n <tui-loader *ngIf=\"item === loading; else text\" class=\"w-8 my-4\"></tui-loader>\n <ng-template #text>\n <tui-svg [src]=\"item.icon\" class=\"tui-space_right-2\"></tui-svg>\n <a tuiLink [pseudo]=\"true\" *ngIf=\"item.link\" href=\"{{ item.link }}\" class=\"grow\">{{ item.text }}</a>\n <p *ngIf=\"!item.link\" class=\"grow\">{{ item.text }}</p>\n <p>{{ item.createdAt }}</p>\n </ng-template>\n</ng-template>\n\n<ng-template #skeleton>\n <div class=\"flex flex-col gap-2\">\n <div *ngFor=\"let _ of [].constructor(7)\" class=\"flex items-center gap-2\">\n <div class=\"tui-skeleton h-6 w-6\"></div>\n <div class=\"tui-skeleton h-4 w-40\"></div>\n </div>\n </div>\n</ng-template>\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: "component", type: i6.TuiTreeComponent, selector: "tui-tree[value]", inputs: ["value", "trackBy", "content"] }, { kind: "directive", type: i6.TuiTreeChildrenDirective, selector: "tui-tree[childrenHandler]", inputs: ["childrenHandler"] }, { kind: "directive", type: i6.TuiTreeControllerDirective, selector: "[tuiTreeController][map]", inputs: ["tuiTreeController", "map"], outputs: ["toggled"], exportAs: ["tuiTreeController"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: TreeDirective, selector: "[scTree]", exportAs: ["scTree"] }, { kind: "directive", type: TreeTopDirective, selector: "[scTopNodeText]", inputs: ["scTopNodeText", "scTopNodeIcon", "scTopNodeLink", "scTopNodeChilds", "scTopNodeParent", "scTopNodeDate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4007
+ ], ngImport: i0, template: "<ng-container *ngIf=\"data$ | async as data; else skeleton\">\n <tui-tree\n *ngFor=\"let node of data\"\n #tree=\"scTree\"\n scTree\n [scTopNodeText]=\"node.text\"\n [scTopNodeIcon]=\"node.icon\"\n [scTopNodeLink]=\"node.link\"\n [scTopNodeChilds]=\"node.hasChildren\"\n [scTopNodeParent]=\"node.id\"\n [scTopNodeDate]=\"node.createdAt\"\n [childrenHandler]=\"tree.childrenHandler\"\n [content]=\"content\"\n [map]=\"tree.map\"\n [tuiTreeController]=\"false\"\n [value]=\"tree.service.data$ | async\"\n (toggled)=\"tree.onToggled($event)\"\n class=\"overflow-hidden\"\n ></tui-tree>\n</ng-container>\n\n<ng-template #content let-item>\n <tui-loader *ngIf=\"item === loading; else text\" class=\"w-8 my-4\"></tui-loader>\n <ng-template #text>\n <tui-svg [src]=\"item.icon\" class=\"tui-space_right-2\"></tui-svg>\n <a tuiLink [pseudo]=\"true\" *ngIf=\"item.link\" href=\"{{ item.link }}\" class=\"grow\">{{ item.text }}</a>\n <p *ngIf=\"!item.link\" class=\"grow\">{{ item.text }}</p>\n <p>{{ item.createdAt }}</p>\n </ng-template>\n</ng-template>\n\n<ng-template #skeleton>\n <div class=\"flex flex-col gap-2\">\n <div *ngFor=\"let _ of [].constructor(7)\" class=\"flex items-center gap-2\">\n <div class=\"tui-skeleton h-6 w-6\"></div>\n <div class=\"tui-skeleton h-4 w-40\"></div>\n </div>\n </div>\n</ng-template>\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: "component", type: i4$1.TuiTreeComponent, selector: "tui-tree[value]", inputs: ["value", "trackBy", "content"] }, { kind: "directive", type: i4$1.TuiTreeChildrenDirective, selector: "tui-tree[childrenHandler]", inputs: ["childrenHandler"] }, { kind: "directive", type: i4$1.TuiTreeControllerDirective, selector: "[tuiTreeController][map]", inputs: ["tuiTreeController", "map"], outputs: ["toggled"], exportAs: ["tuiTreeController"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: TreeDirective, selector: "[scTree]", exportAs: ["scTree"] }, { kind: "directive", type: TreeTopDirective, selector: "[scTopNodeText]", inputs: ["scTopNodeText", "scTopNodeIcon", "scTopNodeLink", "scTopNodeChilds", "scTopNodeParent", "scTopNodeDate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3182
4008
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilesAndDocumentsComponent, decorators: [{
3183
4009
  type: Component,
3184
4010
  args: [{ selector: 'sc-files-and-documents', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
@@ -3464,7 +4290,7 @@ ScOrderItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
3464
4290
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, decorators: [{
3465
4291
  type: Component,
3466
4292
  args: [{ selector: 'sc-order-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative p-4 gap-y-2 gap-x-4 flex flex-wrap bg-white border border-tui-base-04 shadow-sc-2 rounded-xl\">\n <ng-container *ngIf=\"orderItem && product; else skeleton\">\n <button\n tuiIconButton\n (click)=\"clickActionsEvent.emit()\"\n size=\"m\"\n icon=\"scIconVerticalThreeDots\"\n appearance=\"float\"\n tuiMode=\"onLight\"\n class=\"!hidden !absolute right-0 top-0\"\n ></button>\n <div class=\"flex gap-2 grow\">\n <div class=\"flex shrink-0 h-20 w-20 justify-center items-center overflow-hidden\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" [class.p-5]=\"!product.images?.length\" class=\"cursor-pointer\" />\n </div>\n\n <div class=\"flex flex-wrap self-center gap-x-8 grow\">\n <div class=\"basis-min-content flex flex-col grow\">\n <a tuiLink (click)=\"clickCardEvent.emit()\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"text-tui-text-02 text-xs flex flex-col gap-y-0.5\">\n <div class=\"flex flex-wrap gap-y-0.5\">\n <p class=\"w-40\">\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p class=\"w-40\" *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n </div>\n <a tuiLink *ngIf=\"orderItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n </div>\n </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"flex flex-col w-40 gap-x-8 gap-y-0.5\">\n <span *ngIf=\"product.discount\" class=\"flex items-center text-xs text-tui-text-02\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> &nbsp;\n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"flex flex-col items-baseline gap-x-2 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span *ngIf=\"!product.priceInRub\" class=\"text-xs text-tui-text-02\">{{ product.costString }}</span>\n </p>\n <sc-price-warehouse-stock [product]=\"product\" [fromMain]=\"false\"></sc-price-warehouse-stock>\n </div>\n\n <div class=\"w-40 text-xs text-tui-text-02\">\n <ng-container *ngIf=\"orderItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ orderItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"orderItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ orderItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"orderItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ orderItem.width }} \u043C.</p>\n <p class=\"text-tui-base-09 text-sm\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"font-bold whitespace-nowrap\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl \"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n </ng-template>\n</div>\n" }]
3467
- }], ctorParameters: function () { return [{ type: UnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
4293
+ }], ctorParameters: function () { return [{ type: UnitsHelper }, { type: i7.TuiPreviewDialogService, decorators: [{
3468
4294
  type: Inject,
3469
4295
  args: [TuiPreviewDialogService]
3470
4296
  }] }, { type: undefined, decorators: [{
@@ -3572,10 +4398,10 @@ class ScResetUserPasswordComponent {
3572
4398
  * Форма для изменения пароля пользователя.
3573
4399
  */
3574
4400
  this.form = new FormGroup({
3575
- currentPassword: new FormControl(null, Validators.required),
3576
- newPassword: new FormControl(null, [Validators.required, Validators.minLength(8)]),
3577
- newPasswordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8)])
3578
- }, { validators: scPasswordConfirmMatchingValidator('newPassword', 'newPasswordConfirm') });
4401
+ currentPassword: new FormControl(null, [Validators.required, Validators.minLength(8)]),
4402
+ password: new FormControl(null, [Validators.required, Validators.minLength(8)]),
4403
+ passwordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8)])
4404
+ }, { validators: scPasswordConfirmMatchingValidator('password', 'passwordConfirm') });
3579
4405
  /**
3580
4406
  * {@link Subject} события отправки формы.
3581
4407
  */
@@ -3583,7 +4409,7 @@ class ScResetUserPasswordComponent {
3583
4409
  /**
3584
4410
  * {@link Observable} запроса данных аутентификации.
3585
4411
  */
3586
- this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(catchError((error) => {
4412
+ this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(map(() => ({ success: true })), tap(() => this.form.reset()), catchError((error) => {
3587
4413
  const errorResponse = error.error;
3588
4414
  for (const key in errorResponse.errors) {
3589
4415
  this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
@@ -3591,20 +4417,26 @@ class ScResetUserPasswordComponent {
3591
4417
  if (!errorResponse.errors && errorResponse.message) {
3592
4418
  this.form.setErrors({ serverResponse: [errorResponse.message] });
3593
4419
  }
3594
- return of(void {});
4420
+ return of({ success: false });
3595
4421
  }), startWith(null))), share());
3596
4422
  /**
3597
4423
  * {@link Observable} изменения состояния загрузки данных аутентификации по email.
3598
4424
  */
3599
4425
  this.loading$ = this.request$.pipe(map(tuiIsFalsy));
4426
+ /**
4427
+ * Сигнал события события смены пароля.
4428
+ */
4429
+ this.successResetPassword = this.request$.pipe(filter(tuiIsPresent), filter(({ success }) => success));
3600
4430
  }
3601
4431
  }
3602
4432
  ScResetUserPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, deps: [{ token: i1.ScUserService }], target: i0.ɵɵFactoryTarget.Component });
3603
- ScResetUserPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid grid-rows-3 gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"self-center lg:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i6.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4433
+ ScResetUserPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password", outputs: { successResetPassword: "successResetPassword" }, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow items-start\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"password\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"passwordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error *ngIf=\"form.invalid\" class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col lg:h-11 lg:mt-5 justify-center\">\n <button *tuiLet=\"!!(loading$ | async) as loading\" tuiButton [showLoader]=\"loading\" type=\"submit\" [disabled]=\"form.invalid || loading\" icon=\"scIconSave\" class=\"font-medium\">\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n </div>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$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.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3604
4434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, decorators: [{
3605
4435
  type: Component,
3606
- args: [{ selector: 'sc-reset-user-password', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid grid-rows-3 gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"self-center lg:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n" }]
3607
- }], ctorParameters: function () { return [{ type: i1.ScUserService }]; } });
4436
+ args: [{ selector: 'sc-reset-user-password', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow items-start\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"password\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"passwordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error *ngIf=\"form.invalid\" class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col lg:h-11 lg:mt-5 justify-center\">\n <button *tuiLet=\"!!(loading$ | async) as loading\" tuiButton [showLoader]=\"loading\" type=\"submit\" [disabled]=\"form.invalid || loading\" icon=\"scIconSave\" class=\"font-medium\">\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n </div>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n" }]
4437
+ }], ctorParameters: function () { return [{ type: i1.ScUserService }]; }, propDecorators: { successResetPassword: [{
4438
+ type: Output
4439
+ }] } });
3608
4440
 
3609
4441
  /**
3610
4442
  * Диалоговое окно изменения данных пользователя.
@@ -3675,7 +4507,7 @@ class ScUpdateUserInfoDialogComponent {
3675
4507
  }
3676
4508
  }
3677
4509
  ScUpdateUserInfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, deps: [{ token: SC_USER_INFO }, { token: i1.ScUserService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
3678
- ScUpdateUserInfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUpdateUserInfoDialogComponent, selector: "sc-update-user-info-dialog", outputs: { cancelButtonClick: "cancelButtonClick", successUpdateDate: "successUpdateDate" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i6.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4510
+ ScUpdateUserInfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUpdateUserInfoDialogComponent, selector: "sc-update-user-info-dialog", outputs: { cancelButtonClick: "cancelButtonClick", successUpdateDate: "successUpdateDate" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3679
4511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, decorators: [{
3680
4512
  type: Component,
3681
4513
  args: [{ selector: 'sc-update-user-info-dialog', providers: [SC_USER_PROVIDERS], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n" }]
@@ -3889,7 +4721,11 @@ class ScProfileAccordionsContentComponent {
3889
4721
  */
3890
4722
  this.isSendApproveEmail$ = this.sendApproveEmailRequest$.pipe(filter(tuiIsPresent));
3891
4723
  /**
3892
- * Событие нажатия на кнопку редактирование контактного лица.
4724
+ * {@link Observable} изменения списка контактных лиц пользователя.
4725
+ */
4726
+ this.userContacts$ = this.userService.getUserContacts$();
4727
+ /**
4728
+ * Событие нажатия на кнопку редактирование профиля пользователя.
3893
4729
  */
3894
4730
  this.editProfileClick = new EventEmitter();
3895
4731
  /**
@@ -3900,14 +4736,50 @@ class ScProfileAccordionsContentComponent {
3900
4736
  * Событие нажатия на кнопку добавления контрагента.
3901
4737
  */
3902
4738
  this.addContragentClick = new EventEmitter();
4739
+ /**
4740
+ * Событие нажатия на кнопку удаления контрагента.
4741
+ */
4742
+ this.deleteContragentClick = new EventEmitter();
3903
4743
  /**
3904
4744
  * Событие нажатия на кнопку добавления банковского счёта контрагенту.
3905
4745
  */
3906
- this.addContragentBankAccountsClick = new EventEmitter();
4746
+ this.addContragentBankAccountClick = new EventEmitter();
4747
+ /**
4748
+ * Событие нажатия на кнопку удаления банковского счёта контрагента.
4749
+ */
4750
+ this.deleteContragentBankAccountClick = new EventEmitter();
4751
+ /**
4752
+ * Событие нажатия на кнопку добавления контактного лица контрагенту.
4753
+ */
4754
+ this.addContragentContactClick = new EventEmitter();
4755
+ /**
4756
+ * Событие нажатия на кнопку удаления контактного лица у контрагента.
4757
+ */
4758
+ this.deleteContragentContactClick = new EventEmitter();
3907
4759
  /**
3908
4760
  * Событие нажатия на кнопку добавления адреса доставки клиента.
3909
4761
  */
3910
4762
  this.addDeliveryAddressClick = new EventEmitter();
4763
+ /**
4764
+ * Событие нажатия на кнопку удаления адреса доставки у клиента.
4765
+ */
4766
+ this.deleteDeliveryAddressClick = new EventEmitter();
4767
+ /**
4768
+ * Событие нажатия на кнопку добавления контактного лица для адреса доставки.
4769
+ */
4770
+ this.addDeliveryAddressContactClick = new EventEmitter();
4771
+ /**
4772
+ * Событие нажатия на кнопку удаления контактного лица у адреса доставки.
4773
+ */
4774
+ this.deleteDeliveryAddressContactClick = new EventEmitter();
4775
+ /**
4776
+ * Событие нажатия на кнопку добавления контактного лица клиенту.
4777
+ */
4778
+ this.addUserContactClick = new EventEmitter();
4779
+ /**
4780
+ * Событие нажатия на кнопку удаления контактного лица у клиента.
4781
+ */
4782
+ this.deleteUserContactClick = new EventEmitter();
3911
4783
  }
3912
4784
  /**
3913
4785
  * Создает запрос получения информации о городе текущего пользователя по идентификатору города.
@@ -3919,13 +4791,13 @@ class ScProfileAccordionsContentComponent {
3919
4791
  }
3920
4792
  }
3921
4793
  ScProfileAccordionsContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileAccordionsContentComponent, deps: [{ token: SC_USER_INFO }, { token: i1.ScLocationsService }, { token: i1.ScUserService }, { token: i1.ScVerificationService }], target: i0.ɵɵFactoryTarget.Component });
3922
- ScProfileAccordionsContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScProfileAccordionsContentComponent, selector: "sc-profile-accordions-content", outputs: { editProfileClick: "editProfileClick", approvePhoneClick: "approvePhoneClick", addContragentClick: "addContragentClick", addContragentBankAccountsClick: "addContragentBankAccountsClick", addDeliveryAddressClick: "addDeliveryAddressClick" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\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-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\" (addBankAccountsClick)=\"addContragentBankAccountsClick.emit($event)\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password" }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: ["addContragentClick", "editBankAccountsContragentClick", "addBankAccountsClick", "editContragentClick"] }, { kind: "component", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: ["addDeliveryAddressClick"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i6.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4794
+ ScProfileAccordionsContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScProfileAccordionsContentComponent, selector: "sc-profile-accordions-content", outputs: { editProfileClick: "editProfileClick", approvePhoneClick: "approvePhoneClick", addContragentClick: "addContragentClick", deleteContragentClick: "deleteContragentClick", addContragentBankAccountClick: "addContragentBankAccountClick", deleteContragentBankAccountClick: "deleteContragentBankAccountClick", addContragentContactClick: "addContragentContactClick", deleteContragentContactClick: "deleteContragentContactClick", addDeliveryAddressClick: "addDeliveryAddressClick", deleteDeliveryAddressClick: "deleteDeliveryAddressClick", addDeliveryAddressContactClick: "addDeliveryAddressContactClick", deleteDeliveryAddressContactClick: "deleteDeliveryAddressContactClick", addUserContactClick: "addUserContactClick", deleteUserContactClick: "deleteUserContactClick" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<div *tuiLet=\"user$ | async as user\" class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\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-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion\n (addContragentClick)=\"addContragentClick.emit()\"\n (deleteContragentClick)=\"deleteContragentClick.emit($event)\"\n (addContragentBankAccountClick)=\"addContragentBankAccountClick.emit($event)\"\n (deleteContragentBankAccountClick)=\"deleteContragentBankAccountClick.emit($event)\"\n (addContragentContactClick)=\"addContragentContactClick.emit($event)\"\n (deleteContragentContactClick)=\"deleteContragentContactClick.emit($event)\"\n ></sc-contragents-accordion>\n <sc-delivery-address-accordion\n (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"\n (deleteDeliveryAddressClick)=\"deleteDeliveryAddressClick.emit($event)\"\n (addDeliveryAddressContactClick)=\"addDeliveryAddressContactClick.emit($event)\"\n (deleteDeliveryAddressContactClick)=\"deleteDeliveryAddressContactClick.emit($event)\"\n ></sc-delivery-address-accordion>\n <sc-contacts-accordion *ngIf=\"user\" [contacts$]=\"userContacts$\" (addContactClick)=\"addUserContactClick.emit(user.id)\" (deleteButtonClick)=\"deleteUserContactClick.emit($event)\"></sc-contacts-accordion>\n <sc-accordion #passwordAccordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password (successResetPassword)=\"passwordAccordion.close()\"></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password", outputs: ["successResetPassword"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: ["addContragentClick", "deleteContragentClick", "addContragentBankAccountClick", "deleteContragentBankAccountClick", "addContragentContactClick", "deleteContragentContactClick"] }, { kind: "component", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: ["addDeliveryAddressClick", "deleteDeliveryAddressClick", "addDeliveryAddressContactClick", "deleteDeliveryAddressContactClick"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "deleteButtonClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3923
4795
  __decorate([
3924
4796
  tuiPure // TODO: TASK[#7615] Удалить поле рефакторинга сервиса работы с пользователем.
3925
4797
  ], ScProfileAccordionsContentComponent.prototype, "getUserCity$", null);
3926
4798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileAccordionsContentComponent, decorators: [{
3927
4799
  type: Component,
3928
- args: [{ selector: 'sc-profile-accordions-content', providers: [SC_USER_PROVIDERS], animations: [tuiFadeIn], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\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-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\" (addBankAccountsClick)=\"addContragentBankAccountsClick.emit($event)\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n" }]
4800
+ args: [{ selector: 'sc-profile-accordions-content', providers: [SC_USER_PROVIDERS], animations: [tuiFadeIn], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *tuiLet=\"user$ | async as user\" class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\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-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion\n (addContragentClick)=\"addContragentClick.emit()\"\n (deleteContragentClick)=\"deleteContragentClick.emit($event)\"\n (addContragentBankAccountClick)=\"addContragentBankAccountClick.emit($event)\"\n (deleteContragentBankAccountClick)=\"deleteContragentBankAccountClick.emit($event)\"\n (addContragentContactClick)=\"addContragentContactClick.emit($event)\"\n (deleteContragentContactClick)=\"deleteContragentContactClick.emit($event)\"\n ></sc-contragents-accordion>\n <sc-delivery-address-accordion\n (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"\n (deleteDeliveryAddressClick)=\"deleteDeliveryAddressClick.emit($event)\"\n (addDeliveryAddressContactClick)=\"addDeliveryAddressContactClick.emit($event)\"\n (deleteDeliveryAddressContactClick)=\"deleteDeliveryAddressContactClick.emit($event)\"\n ></sc-delivery-address-accordion>\n <sc-contacts-accordion *ngIf=\"user\" [contacts$]=\"userContacts$\" (addContactClick)=\"addUserContactClick.emit(user.id)\" (deleteButtonClick)=\"deleteUserContactClick.emit($event)\"></sc-contacts-accordion>\n <sc-accordion #passwordAccordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password (successResetPassword)=\"passwordAccordion.close()\"></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n" }]
3929
4801
  }], ctorParameters: function () { return [{ type: i10.Observable, decorators: [{
3930
4802
  type: Inject,
3931
4803
  args: [SC_USER_INFO]
@@ -3935,10 +4807,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3935
4807
  type: Output
3936
4808
  }], addContragentClick: [{
3937
4809
  type: Output
3938
- }], addContragentBankAccountsClick: [{
4810
+ }], deleteContragentClick: [{
4811
+ type: Output
4812
+ }], addContragentBankAccountClick: [{
4813
+ type: Output
4814
+ }], deleteContragentBankAccountClick: [{
4815
+ type: Output
4816
+ }], addContragentContactClick: [{
4817
+ type: Output
4818
+ }], deleteContragentContactClick: [{
3939
4819
  type: Output
3940
4820
  }], addDeliveryAddressClick: [{
3941
4821
  type: Output
4822
+ }], deleteDeliveryAddressClick: [{
4823
+ type: Output
4824
+ }], addDeliveryAddressContactClick: [{
4825
+ type: Output
4826
+ }], deleteDeliveryAddressContactClick: [{
4827
+ type: Output
4828
+ }], addUserContactClick: [{
4829
+ type: Output
4830
+ }], deleteUserContactClick: [{
4831
+ type: Output
3942
4832
  }], getUserCity$: [] } });
3943
4833
 
3944
4834
  /**
@@ -3962,7 +4852,8 @@ ScProfileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
3962
4852
  FormsModule,
3963
4853
  ReactiveFormsModule,
3964
4854
  TuiLoaderModule,
3965
- TuiButtonModule], exports: [ScProfileAccordionsContentComponent] });
4855
+ TuiButtonModule,
4856
+ ScContactsModule], exports: [ScProfileAccordionsContentComponent] });
3966
4857
  ScProfileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileModule, imports: [CommonModule,
3967
4858
  ScUserModule,
3968
4859
  ScAccordionModule,
@@ -3978,7 +4869,8 @@ ScProfileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
3978
4869
  FormsModule,
3979
4870
  ReactiveFormsModule,
3980
4871
  TuiLoaderModule,
3981
- TuiButtonModule] });
4872
+ TuiButtonModule,
4873
+ ScContactsModule] });
3982
4874
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileModule, decorators: [{
3983
4875
  type: NgModule,
3984
4876
  args: [{
@@ -3999,7 +4891,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3999
4891
  FormsModule,
4000
4892
  ReactiveFormsModule,
4001
4893
  TuiLoaderModule,
4002
- TuiButtonModule
4894
+ TuiButtonModule,
4895
+ ScContactsModule
4003
4896
  ],
4004
4897
  exports: [ScProfileAccordionsContentComponent]
4005
4898
  }]
@@ -4013,5 +4906,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
4013
4906
  * Generated bundle index. Do not edit.
4014
4907
  */
4015
4908
 
4016
- export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, SC_USER_INFO, SC_USER_PROVIDERS, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContragentBankAccountsDialogComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewContragentBankAccountsFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScUpdateUserInfoDialogComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator, verificationCodeMask };
4909
+ export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, SC_USER_INFO, SC_USER_PROVIDERS, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScCarouselItemHiddenDirective, ScCarouselItemHiddenModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScFormFieldsModule, ScInputQuantityComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSuggestionFieldComponent, ScUpdateUserInfoDialogComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator };
4017
4910
  //# sourceMappingURL=snabcentr-client-ui.mjs.map