@snabcentr/client-ui 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @snabcentr/client-ui might be problematic. Click here for more details.
- package/auth/sc-auth.module.d.ts +1 -1
- package/auth/sign-up-form/sc-sign-up-form.component.d.ts +10 -4
- package/contacts/sc-contacts.module.d.ts +2 -1
- package/directives/index.d.ts +1 -0
- package/directives/terminal-link/sc-terminal-link.directive.d.ts +34 -0
- package/esm2020/auth/sc-auth.module.mjs +11 -5
- package/esm2020/auth/sign-up-form/sc-sign-up-form.component.mjs +52 -30
- package/esm2020/brands-list/sc-brands-list.component.mjs +3 -3
- package/esm2020/contacts/contacts-accordion/sc-contacts-accordion.component.mjs +3 -2
- package/esm2020/contacts/sc-contacts.module.mjs +5 -2
- package/esm2020/directives/index.mjs +2 -1
- package/esm2020/directives/terminal-link/sc-terminal-link.directive.mjs +69 -0
- package/esm2020/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.mjs +12 -9
- package/esm2020/profile/sc-profile.module.mjs +5 -2
- package/esm2020/providers/scUserProviders.mjs +5 -5
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/qrcode/index.mjs +3 -0
- package/esm2020/qrcode/qrcode-dialog/sc-qrcode-dialog.component.mjs +51 -0
- package/esm2020/qrcode/sc-qrcode.module.mjs +24 -0
- package/esm2020/user/reset-user-password/sc-reset-user-password.component.mjs +8 -6
- package/esm2020/user/sc-user.module.mjs +5 -2
- package/esm2020/user/update-user-info-dialog/sc-update-user-info-dialog.component.mjs +2 -2
- package/esm2020/user/user-managers/sc-user-managers.component.mjs +4 -3
- package/esm2020/user/user-phone-approve-dialog/sc-user-phone-approve-dialog.component.mjs +2 -2
- package/fesm2015/snabcentr-client-ui.mjs +467 -300
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +462 -297
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +2 -1
- package/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.d.ts +2 -2
- package/profile/sc-profile.module.d.ts +2 -1
- package/providers/scUserProviders.d.ts +1 -1
- package/public-api.d.ts +1 -0
- package/qrcode/index.d.ts +2 -0
- package/qrcode/qrcode-dialog/sc-qrcode-dialog.component.d.ts +33 -0
- package/qrcode/sc-qrcode.module.d.ts +14 -0
- package/styles/taiga/taiga-tailwind-preset.js +114 -0
- package/styles/tailwind/tailwind.scss +103 -6
- package/user/reset-user-password/sc-reset-user-password.component.d.ts +2 -2
- package/user/sc-user.module.d.ts +2 -1
- package/user/update-user-info-dialog/sc-update-user-info-dialog.component.d.ts +1 -1
- package/user/user-managers/sc-user-managers.component.d.ts +1 -1
- package/user/user-phone-approve-dialog/sc-user-phone-approve-dialog.component.d.ts +1 -1
@@ -1,33 +1,35 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, SkipSelf, Directive, HostBinding, ContentChild, ViewChild, NgModule,
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, SkipSelf, Directive, HostBinding, ContentChild, ViewChild, NgModule, ContentChildren, HostListener, Injectable, inject, ElementRef, Optional, ChangeDetectorRef, Self, InjectionToken, forwardRef } from '@angular/core';
|
3
3
|
import * as i1 from '@snabcentr/client-core';
|
4
|
-
import { ScUserMetrikaGoalsEnum, ScISuggestionType, ScOpfList,
|
4
|
+
import { ScUserMetrikaGoalsEnum, ScISuggestionType, ScOpfList, ScWarehouseService, ScAuthService, SEARCH_TERM, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, IS_RUNNING_ON_TERMINAL, SC_URLS, TERMINAL_PROVIDERS, SEARCH_TERM_PROVIDERS, ScCatalogService, ScCartService, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
|
5
5
|
import * as i5 from 'rxjs';
|
6
6
|
import { Subject, map, filter, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, debounceTime, throwError, shareReplay, interval, takeUntil, merge, skip } from 'rxjs';
|
7
7
|
import * as i2 from '@angular/common';
|
8
8
|
import { CommonModule } from '@angular/common';
|
9
9
|
import * as i4 from '@taiga-ui/core';
|
10
|
-
import { TuiButtonModule, TuiTextfieldControllerModule, TuiLabelModule, TuiErrorModule, TuiDataListModule, TuiLoaderModule, TuiNotificationModule, TuiLinkModule, TuiFormatPhonePipeModule, tuiFadeIn,
|
10
|
+
import { TuiButtonModule, TuiModeModule, TuiDialogModule, TuiDialogService, TuiTextfieldControllerModule, TuiLabelModule, TuiErrorModule, TuiDataListModule, TuiLoaderModule, TuiNotificationModule, TuiLinkModule, TuiFormatPhonePipeModule, tuiFadeIn, TUI_MONTHS, TuiSvgModule, TuiHintModule, TuiFormatNumberPipeModule } from '@taiga-ui/core';
|
11
11
|
import { HttpErrorResponse } from '@angular/common/http';
|
12
12
|
import * as i3 from '@angular/forms';
|
13
13
|
import { FormGroupDirective, FormGroup, FormControl, Validators, NgControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
14
14
|
import * as i6 from '@taiga-ui/cdk';
|
15
|
-
import { tuiControlValue, tuiIsFalsy, tuiIsPresent, tuiMarkControlAsTouchedAndValidate, TuiLetModule, TUI_IS_MOBILE, tuiPure, AbstractTuiNullableControl,
|
15
|
+
import { tuiControlValue, tuiIsFalsy, tuiIsPresent, tuiMarkControlAsTouchedAndValidate, AbstractTuiControl, tuiCreateToken, TuiLetModule, TuiRepeatTimesModule, TUI_IS_MOBILE, tuiPure, AbstractTuiNullableControl, TuiDay, TuiDayRange, TuiMonth, TuiDestroyService, ALWAYS_TRUE_HANDLER } from '@taiga-ui/cdk';
|
16
16
|
import * as i4$1 from '@taiga-ui/kit';
|
17
|
-
import { TuiAccordionItemComponent, TuiAccordionModule, TuiElasticContainerModule, TuiInputModule, TuiFieldErrorPipeModule, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, TuiStringifyContentPipeModule, TuiInputPhoneModule, TuiSelectModule, TuiCarouselModule, TuiInputPasswordModule, TuiCheckboxModule, TuiCheckboxLabeledModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiHighlightModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule } from '@taiga-ui/kit';
|
17
|
+
import { TuiAccordionItemComponent, TuiAccordionModule, TuiElasticContainerModule, TuiInputModule, TuiFieldErrorPipeModule, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, TuiStringifyContentPipeModule, TuiInputPhoneModule, TuiSelectModule, TuiCarouselModule, TuiInputPasswordModule, TuiCheckboxModule, TuiCheckboxLabeledModule, TuiStepperModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiHighlightModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule } from '@taiga-ui/kit';
|
18
18
|
import * as i6$1 from '@maskito/angular';
|
19
19
|
import { MaskitoModule } from '@maskito/angular';
|
20
20
|
import { __decorate } from 'tslib';
|
21
21
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
22
22
|
import * as i2$1 from '@tinkoff/ng-polymorpheus';
|
23
23
|
import { PolymorpheusTemplate, PolymorpheusModule, POLYMORPHEUS_CONTEXT, PolymorpheusComponent } from '@tinkoff/ng-polymorpheus';
|
24
|
+
import * as i2$2 from 'angularx-qrcode';
|
25
|
+
import { QRCodeModule } from 'angularx-qrcode';
|
26
|
+
import * as i7$1 from '@taiga-ui/addon-preview';
|
27
|
+
import { TuiPreviewModule, TuiPreviewDialogService } from '@taiga-ui/addon-preview';
|
24
28
|
import * as i7 from '@ng-web-apis/intersection-observer';
|
25
29
|
import { IntersectionObserverService, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
|
26
30
|
import { RouterModule, NavigationEnd, ActivatedRoute, Router } from '@angular/router';
|
27
31
|
import * as i9 from '@taiga-ui/addon-commerce';
|
28
32
|
import { TuiCurrencyPipeModule } from '@taiga-ui/addon-commerce';
|
29
|
-
import * as i7$1 from '@taiga-ui/addon-preview';
|
30
|
-
import { TuiPreviewDialogService, TuiPreviewModule } from '@taiga-ui/addon-preview';
|
31
33
|
import * as i4$2 from '@taiga-ui/addon-charts';
|
32
34
|
import { TuiLineDaysChartModule, TuiAxesModule } from '@taiga-ui/addon-charts';
|
33
35
|
import * as i7$2 from 'angular8-yandex-maps';
|
@@ -1054,9 +1056,9 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1054
1056
|
/**
|
1055
1057
|
* Инициализирует экземпляр класса {@link ScSignUpFormComponent}.
|
1056
1058
|
*
|
1057
|
-
* @param
|
1058
|
-
* @param userService Сервис информации о пользователе.
|
1059
|
+
* @param userService Сервис данных о пользователе.
|
1059
1060
|
* @param authService Сервис аутентификации.
|
1061
|
+
* @param referencesService Сервис справочников.
|
1060
1062
|
* @param convertersService Сервис конвертации данных.
|
1061
1063
|
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
1062
1064
|
*/
|
@@ -1118,7 +1120,7 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1118
1120
|
if (!errors && message) {
|
1119
1121
|
this.form.setErrors({ serverResponse: [message] });
|
1120
1122
|
}
|
1121
|
-
this.stepIndex =
|
1123
|
+
this.stepIndex = this.steps.findIndex((_, index) => !this.canNextStep(index));
|
1122
1124
|
}
|
1123
1125
|
return of({});
|
1124
1126
|
}), startWith(null))), share());
|
@@ -1134,6 +1136,10 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1134
1136
|
* Сигнал события аутентификации после успешной регистрации.
|
1135
1137
|
*/
|
1136
1138
|
this.successAuth = this.authService.getAuthChange().pipe(filter((state) => state));
|
1139
|
+
/**
|
1140
|
+
* Список этапов регистрации.
|
1141
|
+
*/
|
1142
|
+
this.steps = ['Информация о клиенте', 'Общая информация контрагента', 'Контакты пользователя', 'Банковские реквизиты пользователя'];
|
1137
1143
|
this.opfControl.valueChanges.pipe(distinctUntilChanged(), untilDestroyed(this)).subscribe(() => {
|
1138
1144
|
var _a;
|
1139
1145
|
this.form.patchValue({ name: null });
|
@@ -1161,35 +1167,50 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1161
1167
|
}
|
1162
1168
|
/**
|
1163
1169
|
* Проверяет, может ли пользователь перейти к следующему шагу регистрации.
|
1170
|
+
* При проверке каждого этапа регистрации последовательно проверяется корректность заполнения данных на предыдущих этапах.
|
1164
1171
|
*
|
1165
|
-
* @
|
1172
|
+
* @param index Индекс этапа для которого нужно проверить валидность.
|
1173
|
+
* @returns Выводит значение `boolean` на основании {@link index}.
|
1166
1174
|
*/
|
1167
|
-
canNextStep() {
|
1175
|
+
canNextStep(index) {
|
1168
1176
|
var _a;
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1177
|
+
const { controls } = this.form;
|
1178
|
+
// Проверяем валидность данных пользователя.
|
1179
|
+
for (const key in controls) {
|
1180
|
+
if (Object.prototype.hasOwnProperty.call(controls, key) && key !== 'contragent' && controls[key].invalid) {
|
1181
|
+
return false;
|
1182
|
+
}
|
1183
|
+
}
|
1184
|
+
// Для этапа 0 просто возвращаем true, так как данные пользователя проверены.
|
1185
|
+
if (index === 0) {
|
1186
|
+
return true;
|
1187
|
+
}
|
1188
|
+
// Проверяем валидность полей контрагента.
|
1189
|
+
const contragentControls = controls.contragent.controls;
|
1190
|
+
if (contragentControls) {
|
1191
|
+
for (const key in contragentControls) {
|
1192
|
+
if (Object.prototype.hasOwnProperty.call(contragentControls, key)) {
|
1193
|
+
const control = contragentControls[key];
|
1194
|
+
if (!Array.isArray(control.value) && control.invalid) {
|
1182
1195
|
return false;
|
1183
1196
|
}
|
1184
1197
|
}
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1198
|
+
}
|
1199
|
+
}
|
1200
|
+
// Для этапа 1 возвращаем true, если все поля контрагента валидны.
|
1201
|
+
if (index === 1) {
|
1202
|
+
return true;
|
1203
|
+
}
|
1204
|
+
// Проверяем список контактов внутри контрагента.
|
1205
|
+
if (contragentControls['contacts'].invalid) {
|
1206
|
+
return false;
|
1207
|
+
}
|
1208
|
+
// Для этапа 2 возвращаем true, если список контактов внутри контрагента валидный.
|
1209
|
+
if (index === 2) {
|
1210
|
+
return true;
|
1192
1211
|
}
|
1212
|
+
// Проверяем список банковских реквизитов внутри контрагента.
|
1213
|
+
return (_a = contragentControls['bankAccounts'].valid) !== null && _a !== void 0 ? _a : false;
|
1193
1214
|
}
|
1194
1215
|
/**
|
1195
1216
|
* Выполняет навигацию по форме регистрации.
|
@@ -1283,7 +1304,10 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1283
1304
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
1284
1305
|
if (this.form.controls.contragent && 'inn' in suggestion && !('bic' in suggestion)) {
|
1285
1306
|
if (suggestion.opf && suggestion.opf.slug !== this.opfControl.value) {
|
1286
|
-
this.opfControl.
|
1307
|
+
this.opfControl.patchValue(suggestion.opf.slug, { emitEvent: false });
|
1308
|
+
this.form.controls.contragent.patchValue({
|
1309
|
+
opf: suggestion.opf.slug,
|
1310
|
+
});
|
1287
1311
|
}
|
1288
1312
|
this.form.controls.contragent.patchValue({
|
1289
1313
|
name: suggestion.name,
|
@@ -1317,13 +1341,13 @@ let ScSignUpFormComponent = class ScSignUpFormComponent {
|
|
1317
1341
|
}
|
1318
1342
|
};
|
1319
1343
|
ScSignUpFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignUpFormComponent, deps: [{ token: i1.ScUserService }, { token: i1.ScAuthService }, { token: i1.ScReferencesService }, { token: i1.ScConvertersService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
|
1320
|
-
ScSignUpFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth" }, ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i4$1.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { kind: "component", type: i4.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1344
|
+
ScSignUpFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth" }, ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i4$1.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { kind: "component", type: i4.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "component", type: i4$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i4$1.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i4$1.TuiStepperComponent, selector: "tui-stepper, nav[tuiStepper]", inputs: ["orientation", "activeItemIndex"], outputs: ["activeItemIndexChange"] }, { kind: "component", type: i4$1.TuiStepComponent, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: ["stepState", "icon"] }, { kind: "directive", type: i6.TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1321
1345
|
ScSignUpFormComponent = __decorate([
|
1322
1346
|
UntilDestroy({ checkProperties: true })
|
1323
1347
|
], ScSignUpFormComponent);
|
1324
1348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignUpFormComponent, decorators: [{
|
1325
1349
|
type: Component,
|
1326
|
-
args: [{ selector: 'sc-sign-up-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep()\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
|
1350
|
+
args: [{ selector: 'sc-sign-up-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel=\"\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\">\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label [tuiLabel]=\"isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F'\">\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\"\n class=\"w-full\"\n >\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfield\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <tui-checkbox-labeled\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n <tui-checkbox-labeled\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </tui-checkbox-labeled>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n icon=\"tuiIconTrash2Large\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n icon=\"tuiIconPlusLarge\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
|
1327
1351
|
}], ctorParameters: function () { return [{ type: i1.ScUserService }, { type: i1.ScAuthService }, { type: i1.ScReferencesService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }]; }, propDecorators: { successAuth: [{
|
1328
1352
|
type: Output
|
1329
1353
|
}] } });
|
@@ -1434,11 +1458,375 @@ ScAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
1434
1458
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionModule, decorators: [{
|
1435
1459
|
type: NgModule,
|
1436
1460
|
args: [{
|
1437
|
-
declarations: [ScAccordionComponent, ScAccordionContentDirective],
|
1438
|
-
imports: [CommonModule, PolymorpheusModule, TuiButtonModule, TuiAccordionModule, TuiElasticContainerModule],
|
1439
|
-
exports: [ScAccordionComponent, ScAccordionContentDirective],
|
1461
|
+
declarations: [ScAccordionComponent, ScAccordionContentDirective],
|
1462
|
+
imports: [CommonModule, PolymorpheusModule, TuiButtonModule, TuiAccordionModule, TuiElasticContainerModule],
|
1463
|
+
exports: [ScAccordionComponent, ScAccordionContentDirective],
|
1464
|
+
}]
|
1465
|
+
}] });
|
1466
|
+
|
1467
|
+
/* eslint-disable lodash/prefer-lodash-method */
|
1468
|
+
/**
|
1469
|
+
* Директива для перехода по нажатию клавиши enter на следующее поле ввода формы.
|
1470
|
+
*/
|
1471
|
+
class ScNextInputFocusDirective {
|
1472
|
+
/**
|
1473
|
+
* Слушатель нажатия на клавишу enter. Предотвращает событие submit, выполняет смену фокуса на следующее поле ввода TuiFocusableElementAccessor.
|
1474
|
+
*
|
1475
|
+
* @param event Объект события нажатия на клавишу.
|
1476
|
+
*/
|
1477
|
+
onFormKeyDownEnter(event) {
|
1478
|
+
var _a;
|
1479
|
+
if (event.code !== 'Enter' && event.key !== 'Enter') {
|
1480
|
+
return;
|
1481
|
+
}
|
1482
|
+
event.preventDefault();
|
1483
|
+
const elements = this.focusableElements.toArray();
|
1484
|
+
const focusedIndex = elements.findIndex((control) => control.focused);
|
1485
|
+
if (focusedIndex !== -1) {
|
1486
|
+
const nextElement = (_a = elements[focusedIndex + 1]) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement;
|
1487
|
+
if (nextElement) {
|
1488
|
+
nextElement.focus();
|
1489
|
+
}
|
1490
|
+
}
|
1491
|
+
}
|
1492
|
+
}
|
1493
|
+
ScNextInputFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1494
|
+
ScNextInputFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ScNextInputFocusDirective, selector: "form[ScNextInputFocus]", host: { listeners: { "keydown": "onFormKeyDownEnter($event)" } }, queries: [{ propertyName: "focusableElements", predicate: AbstractTuiControl, descendants: true }], ngImport: i0 });
|
1495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusDirective, decorators: [{
|
1496
|
+
type: Directive,
|
1497
|
+
args: [{
|
1498
|
+
selector: 'form[ScNextInputFocus]',
|
1499
|
+
}]
|
1500
|
+
}], propDecorators: { focusableElements: [{
|
1501
|
+
type: ContentChildren,
|
1502
|
+
args: [AbstractTuiControl, { descendants: true }]
|
1503
|
+
}], onFormKeyDownEnter: [{
|
1504
|
+
type: HostListener,
|
1505
|
+
args: ['keydown', ['$event']]
|
1506
|
+
}] } });
|
1507
|
+
|
1508
|
+
/**
|
1509
|
+
* Модуль директивы для перехода по нажатию клавиши enter на следующее поле ввода формы.
|
1510
|
+
*/
|
1511
|
+
class ScNextInputFocusModule {
|
1512
|
+
}
|
1513
|
+
ScNextInputFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1514
|
+
ScNextInputFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, declarations: [ScNextInputFocusDirective], exports: [ScNextInputFocusDirective] });
|
1515
|
+
ScNextInputFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule });
|
1516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, decorators: [{
|
1517
|
+
type: NgModule,
|
1518
|
+
args: [{
|
1519
|
+
declarations: [ScNextInputFocusDirective],
|
1520
|
+
exports: [ScNextInputFocusDirective],
|
1521
|
+
}]
|
1522
|
+
}] });
|
1523
|
+
|
1524
|
+
/**
|
1525
|
+
* Единицы измерения линейной величины по умолчанию.
|
1526
|
+
*/
|
1527
|
+
const SC_LINEAR_VALUES = ['пог.м.', 'м.', 'м2'];
|
1528
|
+
/**
|
1529
|
+
* Токен единиц измерения линейной величины по умолчанию.
|
1530
|
+
*/
|
1531
|
+
const SC_LINEAR_VALUES_TOKEN = tuiCreateToken(SC_LINEAR_VALUES);
|
1532
|
+
|
1533
|
+
/* eslint-disable lodash/prefer-lodash-method */
|
1534
|
+
/**
|
1535
|
+
* Класс хэлпер для работы со значениями единиц измерения товара.
|
1536
|
+
*/
|
1537
|
+
class ScUnitsHelper {
|
1538
|
+
/**
|
1539
|
+
* Инициирует экземпляр класса {@link ScUnitsHelper}.
|
1540
|
+
*
|
1541
|
+
* @param linearValues Единицы измерения линейной величины.
|
1542
|
+
*/
|
1543
|
+
constructor(linearValues) {
|
1544
|
+
this.linearValues = linearValues;
|
1545
|
+
}
|
1546
|
+
/**
|
1547
|
+
* Возвращает признак возможности продажи товара на метраж.
|
1548
|
+
*
|
1549
|
+
* @param product Товар для которого нужно проверить возможность продажи на метраж.
|
1550
|
+
*/
|
1551
|
+
productIsMeasurable(product) {
|
1552
|
+
return this.linearValues.includes(product.unit);
|
1553
|
+
}
|
1554
|
+
/**
|
1555
|
+
* Возвращает кратность количества для товара.
|
1556
|
+
*
|
1557
|
+
* @param product Товар для которого нужно вернуть кратность количества.
|
1558
|
+
*/
|
1559
|
+
productMultiplicity(product) {
|
1560
|
+
return product.minCount && !this.linearValues.includes(product.unit) ? product.minCount : 1;
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
ScUnitsHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, deps: [{ token: SC_LINEAR_VALUES_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
1564
|
+
ScUnitsHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, providedIn: 'root' });
|
1565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, decorators: [{
|
1566
|
+
type: Injectable,
|
1567
|
+
args: [{
|
1568
|
+
providedIn: 'root',
|
1569
|
+
}]
|
1570
|
+
}], ctorParameters: function () {
|
1571
|
+
return [{ type: undefined, decorators: [{
|
1572
|
+
type: Inject,
|
1573
|
+
args: [SC_LINEAR_VALUES_TOKEN]
|
1574
|
+
}] }];
|
1575
|
+
} });
|
1576
|
+
|
1577
|
+
/* eslint-disable no-underscore-dangle */
|
1578
|
+
/**
|
1579
|
+
* Директива абстрактной карточки товара.
|
1580
|
+
*/
|
1581
|
+
class AbstractScPriceCard {
|
1582
|
+
constructor() {
|
1583
|
+
/**
|
1584
|
+
* {@link FormControl} поля ввода количества товара в корзине.
|
1585
|
+
*/
|
1586
|
+
this.quantityControl = new FormControl(3, { updateOn: 'blur' });
|
1587
|
+
/**
|
1588
|
+
* Признак, что необходимо отобразить лоадер для поля ввода количества товара.
|
1589
|
+
*/
|
1590
|
+
this.quantityShowLoader = false;
|
1591
|
+
/**
|
1592
|
+
* Признак, что необходимо отобразить лоадер для кнопки избранных товаров и категорий.
|
1593
|
+
*/
|
1594
|
+
this.favoriteShowLoader = false;
|
1595
|
+
/**
|
1596
|
+
* {@link Observable} изменения выбранного склада.
|
1597
|
+
*/
|
1598
|
+
this.warehouseSelect$ = inject(ScWarehouseService).getWarehouseSelectChange$();
|
1599
|
+
/**
|
1600
|
+
* {@link Observable} изменения статуса авторизации.
|
1601
|
+
*/
|
1602
|
+
this.authStatus$ = inject(ScAuthService).getAuthChange();
|
1603
|
+
/**
|
1604
|
+
* {@link Observable} поиска терма.
|
1605
|
+
*/
|
1606
|
+
this.search$ = inject(SEARCH_TERM);
|
1607
|
+
/**
|
1608
|
+
* Признак, что необходимо отобразить поле ввода количества товара.
|
1609
|
+
*/
|
1610
|
+
this.showQuantityControl = false;
|
1611
|
+
/**
|
1612
|
+
* Событие нажатия на кнопку "В избранное".
|
1613
|
+
*/
|
1614
|
+
this.clickFavoriteEvent = new EventEmitter();
|
1615
|
+
/**
|
1616
|
+
* Событие нажатия на кнопку "В корзину".
|
1617
|
+
*/
|
1618
|
+
this.clickAddToCartEvent = new EventEmitter();
|
1619
|
+
/**
|
1620
|
+
* Событие нажатия на кнопку очистки количества товара.
|
1621
|
+
*/
|
1622
|
+
this.clickClearEvent = new EventEmitter();
|
1623
|
+
/**
|
1624
|
+
* Событие нажатия на карточку товара.
|
1625
|
+
*/
|
1626
|
+
this.clickCardEvent = new EventEmitter();
|
1627
|
+
/**
|
1628
|
+
* Событие нажатия на историю цен.
|
1629
|
+
*/
|
1630
|
+
this.clickPriceHistoryEvent = new EventEmitter();
|
1631
|
+
/**
|
1632
|
+
* {@link Observable} изменения количества товара в корзине.
|
1633
|
+
*/
|
1634
|
+
this.quantityValueChanges = this.quantityControl.valueChanges;
|
1635
|
+
/**
|
1636
|
+
* Экземпляр класса-помощника для работы со значениями единиц измерения товара.
|
1637
|
+
*/
|
1638
|
+
this.unitsHelper = inject(ScUnitsHelper);
|
1639
|
+
/**
|
1640
|
+
* Хелпер для работы с изображениями товара.
|
1641
|
+
*/
|
1642
|
+
this.imageHelper = inject(ScImageHelper);
|
1643
|
+
/**
|
1644
|
+
* Путь до изображения 'Товар не найден'.
|
1645
|
+
*/
|
1646
|
+
this.pathImageNotFound = inject(SC_PATH_IMAGE_NOT_FOUND);
|
1647
|
+
}
|
1648
|
+
/**
|
1649
|
+
* Позиция товара в корзине.
|
1650
|
+
*
|
1651
|
+
* TODO: Сделать товар в корзине наблюдаемой переменной после реализации TASK:[#7144].
|
1652
|
+
*/
|
1653
|
+
get cartItem() {
|
1654
|
+
return this._cartItem;
|
1655
|
+
}
|
1656
|
+
/**
|
1657
|
+
* Позиция товара в корзине
|
1658
|
+
*
|
1659
|
+
* TODO: Сделать товар в корзине наблюдаемой переменной после реализации TASK:[#7144].
|
1660
|
+
*/
|
1661
|
+
set cartItem(value) {
|
1662
|
+
var _a, _b;
|
1663
|
+
this._cartItem = value;
|
1664
|
+
this.quantityControl.patchValue((_b = (_a = this._cartItem) === null || _a === void 0 ? void 0 : _a.quantity) !== null && _b !== void 0 ? _b : null, { emitEvent: false });
|
1665
|
+
this.quantityShowLoader = false;
|
1666
|
+
}
|
1667
|
+
/**
|
1668
|
+
* Признак, что нужно показать скелетон.
|
1669
|
+
*/
|
1670
|
+
get skeletonVisible() {
|
1671
|
+
return !this.product;
|
1672
|
+
}
|
1673
|
+
/**
|
1674
|
+
* Возвращает ссылку на preview-изображение карточки товара.
|
1675
|
+
*/
|
1676
|
+
getCardImagePreview() {
|
1677
|
+
return this.product ? this.imageHelper.getImagePreview(this.product) : this.pathImageNotFound;
|
1678
|
+
}
|
1679
|
+
}
|
1680
|
+
AbstractScPriceCard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractScPriceCard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1681
|
+
AbstractScPriceCard.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AbstractScPriceCard, inputs: { cartItem: "cartItem", product: "product", showQuantityControl: "showQuantityControl" }, outputs: { clickFavoriteEvent: "clickFavoriteEvent", clickAddToCartEvent: "clickAddToCartEvent", clickClearEvent: "clickClearEvent", clickCardEvent: "clickCardEvent", clickPriceHistoryEvent: "clickPriceHistoryEvent", quantityValueChanges: "quantityValueChanges" }, ngImport: i0 });
|
1682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractScPriceCard, decorators: [{
|
1683
|
+
type: Directive
|
1684
|
+
}], propDecorators: { cartItem: [{
|
1685
|
+
type: Input
|
1686
|
+
}], product: [{
|
1687
|
+
type: Input
|
1688
|
+
}], showQuantityControl: [{
|
1689
|
+
type: Input
|
1690
|
+
}], clickFavoriteEvent: [{
|
1691
|
+
type: Output
|
1692
|
+
}], clickAddToCartEvent: [{
|
1693
|
+
type: Output
|
1694
|
+
}], clickClearEvent: [{
|
1695
|
+
type: Output
|
1696
|
+
}], clickCardEvent: [{
|
1697
|
+
type: Output
|
1698
|
+
}], clickPriceHistoryEvent: [{
|
1699
|
+
type: Output
|
1700
|
+
}], quantityValueChanges: [{
|
1701
|
+
type: Output
|
1702
|
+
}] } });
|
1703
|
+
|
1704
|
+
/**
|
1705
|
+
* Компонент QR кода.
|
1706
|
+
*/
|
1707
|
+
class ScQRCodeDialogComponent {
|
1708
|
+
/**
|
1709
|
+
* Инициализирует экземпляр класса {@link ScQRCodeDialogComponent}.
|
1710
|
+
*
|
1711
|
+
* @param vCardService Сервис для работы с vCard.
|
1712
|
+
* @param context Контекст диалогового окна, в котором открыт компонент.
|
1713
|
+
* @param terminal Провайдер данных о терминале.
|
1714
|
+
*/
|
1715
|
+
constructor(vCardService, context, terminal) {
|
1716
|
+
this.vCardService = vCardService;
|
1717
|
+
this.context = context;
|
1718
|
+
this.terminal = terminal;
|
1719
|
+
}
|
1720
|
+
/**
|
1721
|
+
* Выполняет скачивание генерируемого vCard файла контакта.
|
1722
|
+
*/
|
1723
|
+
downloadVCard() {
|
1724
|
+
if (!this.terminal.isRunningOnTerminal && this.isVCardData()) {
|
1725
|
+
this.vCardService.downloadVCard(this.context.data.qrdata);
|
1726
|
+
}
|
1727
|
+
}
|
1728
|
+
/**
|
1729
|
+
* Проверяет что в диалоговое окно были переданы данные в формате `vCard`.
|
1730
|
+
*/
|
1731
|
+
isVCardData() {
|
1732
|
+
// eslint-disable-next-line unicorn/better-regex
|
1733
|
+
return /BEGIN:VCARD[\s\S]*END:VCARD/i.test(this.context.data.qrdata);
|
1734
|
+
}
|
1735
|
+
}
|
1736
|
+
ScQRCodeDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeDialogComponent, deps: [{ token: i1.ScVCardService }, { token: POLYMORPHEUS_CONTEXT }, { token: IS_RUNNING_ON_TERMINAL }], target: i0.ɵɵFactoryTarget.Component });
|
1737
|
+
ScQRCodeDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScQRCodeDialogComponent, selector: "sc-qrcode-dialog", ngImport: i0, template: "<p class=\"-mt-2 mb-3 text-tui-text-02\">{{ terminal.isRunningOnTerminal && this.isVCardData() ? '\u041E' : '\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438\u043B\u0438 \u043E' }}\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434 \u0432\u0430\u0448\u0438\u043C \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u043C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E\u043C.</p>\n<qrcode\n (click)=\"downloadVCard()\"\n [margin]=\"0\"\n [qrdata]=\"this.context.data.qrdata\"\n [width]=\"800\"\n elementType=\"img\"\n class=\"cursor-pointer\"\n></qrcode>\n", styles: ["::ng-deep tui-dialog:has([data-terminal-view=true]){width:21rem!important}::ng-deep tui-dialog:has([data-terminal-view=true]) .t-heading{margin-bottom:.5rem!important;font:var(--tui-font-heading-6)!important}\n"], dependencies: [{ kind: "component", type: i2$2.QRCodeComponent, selector: "qrcode", inputs: ["allowEmptyString", "colorDark", "colorLight", "cssClass", "elementType", "errorCorrectionLevel", "imageSrc", "imageHeight", "imageWidth", "margin", "qrdata", "scale", "version", "width", "alt", "ariaLabel", "title"], outputs: ["qrCodeURL"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeDialogComponent, decorators: [{
|
1739
|
+
type: Component,
|
1740
|
+
args: [{ selector: 'sc-qrcode-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p class=\"-mt-2 mb-3 text-tui-text-02\">{{ terminal.isRunningOnTerminal && this.isVCardData() ? '\u041E' : '\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438\u043B\u0438 \u043E' }}\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434 \u0432\u0430\u0448\u0438\u043C \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u043C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E\u043C.</p>\n<qrcode\n (click)=\"downloadVCard()\"\n [margin]=\"0\"\n [qrdata]=\"this.context.data.qrdata\"\n [width]=\"800\"\n elementType=\"img\"\n class=\"cursor-pointer\"\n></qrcode>\n", styles: ["::ng-deep tui-dialog:has([data-terminal-view=true]){width:21rem!important}::ng-deep tui-dialog:has([data-terminal-view=true]) .t-heading{margin-bottom:.5rem!important;font:var(--tui-font-heading-6)!important}\n"] }]
|
1741
|
+
}], ctorParameters: function () {
|
1742
|
+
return [{ type: i1.ScVCardService }, { type: undefined, decorators: [{
|
1743
|
+
type: Inject,
|
1744
|
+
args: [POLYMORPHEUS_CONTEXT]
|
1745
|
+
}] }, { type: undefined, decorators: [{
|
1746
|
+
type: Inject,
|
1747
|
+
args: [IS_RUNNING_ON_TERMINAL]
|
1748
|
+
}] }];
|
1749
|
+
} });
|
1750
|
+
|
1751
|
+
/**
|
1752
|
+
* Модуль QR кода.
|
1753
|
+
*/
|
1754
|
+
class ScQRCodeModule {
|
1755
|
+
}
|
1756
|
+
ScQRCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1757
|
+
ScQRCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeModule, declarations: [ScQRCodeDialogComponent], imports: [CommonModule, QRCodeModule, TuiButtonModule, TuiModeModule, TuiDialogModule, TuiPreviewModule], exports: [ScQRCodeDialogComponent] });
|
1758
|
+
ScQRCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeModule, imports: [CommonModule, QRCodeModule, TuiButtonModule, TuiModeModule, TuiDialogModule, TuiPreviewModule] });
|
1759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScQRCodeModule, decorators: [{
|
1760
|
+
type: NgModule,
|
1761
|
+
args: [{
|
1762
|
+
declarations: [ScQRCodeDialogComponent],
|
1763
|
+
imports: [CommonModule, QRCodeModule, TuiButtonModule, TuiModeModule, TuiDialogModule, TuiPreviewModule],
|
1764
|
+
exports: [ScQRCodeDialogComponent],
|
1765
|
+
}]
|
1766
|
+
}] });
|
1767
|
+
|
1768
|
+
/* eslint-disable lodash/prefer-lodash-method */
|
1769
|
+
/**
|
1770
|
+
* Директива открытия диалогового окна с QRCode для ссылок `tel:` и `mailto:` на терминале.
|
1771
|
+
*/
|
1772
|
+
class ScTerminalLinkDirective {
|
1773
|
+
constructor() {
|
1774
|
+
/**
|
1775
|
+
* Ссылка на HTML элемент тега `<a>`.
|
1776
|
+
*/
|
1777
|
+
this.elementReference = inject(ElementRef);
|
1778
|
+
/**
|
1779
|
+
* Сервис для работы с диалоговыми окнами TuiDialog.
|
1780
|
+
*/
|
1781
|
+
this.dialog = inject(TuiDialogService);
|
1782
|
+
/**
|
1783
|
+
* Провайдер данных о терминале.
|
1784
|
+
*/
|
1785
|
+
this.terminal = inject(IS_RUNNING_ON_TERMINAL);
|
1786
|
+
}
|
1787
|
+
/**
|
1788
|
+
* Обработчик клика по ссылке.
|
1789
|
+
*
|
1790
|
+
* @param event Событие клика.
|
1791
|
+
*/
|
1792
|
+
onClick(event) {
|
1793
|
+
if (this.terminal.isRunningOnTerminal && this.isLinkTelOrMail()) {
|
1794
|
+
// Отключение базового события для терминала.
|
1795
|
+
event.preventDefault();
|
1796
|
+
this.openQRCodeDialog();
|
1797
|
+
}
|
1798
|
+
}
|
1799
|
+
/**
|
1800
|
+
* Открывает диалоговое окно с QR-кодом.
|
1801
|
+
*/
|
1802
|
+
openQRCodeDialog() {
|
1803
|
+
this.dialog
|
1804
|
+
.open(new PolymorpheusComponent(ScQRCodeDialogComponent), {
|
1805
|
+
size: 's',
|
1806
|
+
// Передаём ссылку формата `mailto:example@example.com` `tel:+70000000000` вместо vCard, так как для vCard данных недостаточно.
|
1807
|
+
data: { qrdata: this.elementReference.nativeElement.href },
|
1808
|
+
})
|
1809
|
+
.subscribe();
|
1810
|
+
}
|
1811
|
+
/**
|
1812
|
+
* Проверяет ведёт ли ссылка на телефон или адрес электронной почты.
|
1813
|
+
*/
|
1814
|
+
isLinkTelOrMail() {
|
1815
|
+
return this.elementReference.nativeElement.href.startsWith('tel:') || this.elementReference.nativeElement.href.startsWith('mailto:');
|
1816
|
+
}
|
1817
|
+
}
|
1818
|
+
ScTerminalLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScTerminalLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1819
|
+
ScTerminalLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ScTerminalLinkDirective, isStandalone: true, selector: "a[href]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
1820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScTerminalLinkDirective, decorators: [{
|
1821
|
+
type: Directive,
|
1822
|
+
args: [{
|
1823
|
+
standalone: true,
|
1824
|
+
selector: 'a[href]',
|
1440
1825
|
}]
|
1441
|
-
}]
|
1826
|
+
}], propDecorators: { onClick: [{
|
1827
|
+
type: HostListener,
|
1828
|
+
args: ['click', ['$event']]
|
1829
|
+
}] } });
|
1442
1830
|
|
1443
1831
|
/**
|
1444
1832
|
* Модуль полей ввода.
|
@@ -1604,7 +1992,7 @@ class ScContactsAccordionComponent {
|
|
1604
1992
|
}
|
1605
1993
|
}
|
1606
1994
|
ScContactsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1607
|
-
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\n *tuiLet=\"contacts$ | async as contacts\"\n [overlay]=\"true\"\n [showLoader]=\"contacts === null\"\n >\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div\n *ngFor=\"let contact of contacts\"\n class=\"flex gap-2 border-b border-tui-base-03\"\n >\n <div class=\"flex grow flex-col gap-2\">\n {{ contact.name }}\n <a\n tuiLink\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a\n tuiLink\n icon=\"tuiIconMailLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"mailto:{{ contact.email }}\"\n >\n {{ contact.email }}\n </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 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: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", 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 });
|
1995
|
+
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\n *tuiLet=\"contacts$ | async as contacts\"\n [overlay]=\"true\"\n [showLoader]=\"contacts === null\"\n >\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div\n *ngFor=\"let contact of contacts\"\n class=\"flex gap-2 border-b border-tui-base-03\"\n >\n <div class=\"flex grow flex-col gap-2\">\n {{ contact.name }}\n <a\n tuiLink\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a\n tuiLink\n icon=\"tuiIconMailLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"mailto:{{ contact.email }}\"\n >\n {{ contact.email }}\n </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 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: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", 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: "directive", type: ScTerminalLinkDirective, selector: "a[href]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1608
1996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsAccordionComponent, decorators: [{
|
1609
1997
|
type: Component,
|
1610
1998
|
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\n *tuiLet=\"contacts$ | async as contacts\"\n [overlay]=\"true\"\n [showLoader]=\"contacts === null\"\n >\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contacts || contacts.length; else contactsNotExist\">\n <div\n *ngFor=\"let contact of contacts\"\n class=\"flex gap-2 border-b border-tui-base-03\"\n >\n <div class=\"flex grow flex-col gap-2\">\n {{ contact.name }}\n <a\n tuiLink\n icon=\"tuiIconPhoneLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ contact.phone }}\"\n >{{ contact.phone | tuiFormatPhone }}</a\n >\n <a\n tuiLink\n icon=\"tuiIconMailLarge\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"mailto:{{ contact.email }}\"\n >\n {{ contact.email }}\n </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 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" }]
|
@@ -1641,7 +2029,8 @@ ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
1641
2029
|
TuiLabelModule,
|
1642
2030
|
TuiInputModule,
|
1643
2031
|
TuiInputPhoneModule,
|
1644
|
-
TuiErrorModule
|
2032
|
+
TuiErrorModule,
|
2033
|
+
ScTerminalLinkDirective], exports: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent] });
|
1645
2034
|
ScContactsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, imports: [CommonModule,
|
1646
2035
|
FormsModule,
|
1647
2036
|
ReactiveFormsModule,
|
@@ -1687,6 +2076,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1687
2076
|
TuiInputModule,
|
1688
2077
|
TuiInputPhoneModule,
|
1689
2078
|
TuiErrorModule,
|
2079
|
+
ScTerminalLinkDirective,
|
1690
2080
|
],
|
1691
2081
|
exports: [ScContactsAccordionComponent, ScNewContactFormComponent, ScAddContactDialogComponent],
|
1692
2082
|
}]
|
@@ -2330,7 +2720,9 @@ ScAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2330
2720
|
TuiSelectModule,
|
2331
2721
|
TuiElasticContainerModule,
|
2332
2722
|
ScContragentsModule,
|
2333
|
-
ScContactsModule
|
2723
|
+
ScContactsModule,
|
2724
|
+
TuiStepperModule,
|
2725
|
+
TuiRepeatTimesModule], exports: [ScSignInFormComponent, ScSignInFormByPhoneComponent, ScSignInFormByEmailComponent, ScSignUpFormComponent] });
|
2334
2726
|
ScAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAuthModule, imports: [CommonModule,
|
2335
2727
|
FormsModule,
|
2336
2728
|
ReactiveFormsModule,
|
@@ -2356,7 +2748,9 @@ ScAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2356
2748
|
TuiSelectModule,
|
2357
2749
|
TuiElasticContainerModule,
|
2358
2750
|
ScContragentsModule,
|
2359
|
-
ScContactsModule
|
2751
|
+
ScContactsModule,
|
2752
|
+
TuiStepperModule,
|
2753
|
+
TuiRepeatTimesModule] });
|
2360
2754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAuthModule, decorators: [{
|
2361
2755
|
type: NgModule,
|
2362
2756
|
args: [{
|
@@ -2388,6 +2782,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
2388
2782
|
TuiElasticContainerModule,
|
2389
2783
|
ScContragentsModule,
|
2390
2784
|
ScContactsModule,
|
2785
|
+
TuiStepperModule,
|
2786
|
+
TuiRepeatTimesModule,
|
2391
2787
|
],
|
2392
2788
|
exports: [ScSignInFormComponent, ScSignInFormByPhoneComponent, ScSignInFormByEmailComponent, ScSignUpFormComponent],
|
2393
2789
|
}]
|
@@ -3051,243 +3447,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
3051
3447
|
args: ['keydown.arrowUp', ['step']]
|
3052
3448
|
}] } });
|
3053
3449
|
|
3054
|
-
/* eslint-disable lodash/prefer-lodash-method */
|
3055
|
-
/**
|
3056
|
-
* Директива для перехода по нажатию клавиши enter на следующее поле ввода формы.
|
3057
|
-
*/
|
3058
|
-
class ScNextInputFocusDirective {
|
3059
|
-
/**
|
3060
|
-
* Слушатель нажатия на клавишу enter. Предотвращает событие submit, выполняет смену фокуса на следующее поле ввода TuiFocusableElementAccessor.
|
3061
|
-
*
|
3062
|
-
* @param event Объект события нажатия на клавишу.
|
3063
|
-
*/
|
3064
|
-
onFormKeyDownEnter(event) {
|
3065
|
-
var _a;
|
3066
|
-
if (event.code !== 'Enter' && event.key !== 'Enter') {
|
3067
|
-
return;
|
3068
|
-
}
|
3069
|
-
event.preventDefault();
|
3070
|
-
const elements = this.focusableElements.toArray();
|
3071
|
-
const focusedIndex = elements.findIndex((control) => control.focused);
|
3072
|
-
if (focusedIndex !== -1) {
|
3073
|
-
const nextElement = (_a = elements[focusedIndex + 1]) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement;
|
3074
|
-
if (nextElement) {
|
3075
|
-
nextElement.focus();
|
3076
|
-
}
|
3077
|
-
}
|
3078
|
-
}
|
3079
|
-
}
|
3080
|
-
ScNextInputFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
3081
|
-
ScNextInputFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ScNextInputFocusDirective, selector: "form[ScNextInputFocus]", host: { listeners: { "keydown": "onFormKeyDownEnter($event)" } }, queries: [{ propertyName: "focusableElements", predicate: AbstractTuiControl, descendants: true }], ngImport: i0 });
|
3082
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusDirective, decorators: [{
|
3083
|
-
type: Directive,
|
3084
|
-
args: [{
|
3085
|
-
selector: 'form[ScNextInputFocus]',
|
3086
|
-
}]
|
3087
|
-
}], propDecorators: { focusableElements: [{
|
3088
|
-
type: ContentChildren,
|
3089
|
-
args: [AbstractTuiControl, { descendants: true }]
|
3090
|
-
}], onFormKeyDownEnter: [{
|
3091
|
-
type: HostListener,
|
3092
|
-
args: ['keydown', ['$event']]
|
3093
|
-
}] } });
|
3094
|
-
|
3095
|
-
/**
|
3096
|
-
* Модуль директивы для перехода по нажатию клавиши enter на следующее поле ввода формы.
|
3097
|
-
*/
|
3098
|
-
class ScNextInputFocusModule {
|
3099
|
-
}
|
3100
|
-
ScNextInputFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3101
|
-
ScNextInputFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, declarations: [ScNextInputFocusDirective], exports: [ScNextInputFocusDirective] });
|
3102
|
-
ScNextInputFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule });
|
3103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNextInputFocusModule, decorators: [{
|
3104
|
-
type: NgModule,
|
3105
|
-
args: [{
|
3106
|
-
declarations: [ScNextInputFocusDirective],
|
3107
|
-
exports: [ScNextInputFocusDirective],
|
3108
|
-
}]
|
3109
|
-
}] });
|
3110
|
-
|
3111
|
-
/**
|
3112
|
-
* Единицы измерения линейной величины по умолчанию.
|
3113
|
-
*/
|
3114
|
-
const SC_LINEAR_VALUES = ['пог.м.', 'м.', 'м2'];
|
3115
|
-
/**
|
3116
|
-
* Токен единиц измерения линейной величины по умолчанию.
|
3117
|
-
*/
|
3118
|
-
const SC_LINEAR_VALUES_TOKEN = tuiCreateToken(SC_LINEAR_VALUES);
|
3119
|
-
|
3120
|
-
/* eslint-disable lodash/prefer-lodash-method */
|
3121
|
-
/**
|
3122
|
-
* Класс хэлпер для работы со значениями единиц измерения товара.
|
3123
|
-
*/
|
3124
|
-
class ScUnitsHelper {
|
3125
|
-
/**
|
3126
|
-
* Инициирует экземпляр класса {@link ScUnitsHelper}.
|
3127
|
-
*
|
3128
|
-
* @param linearValues Единицы измерения линейной величины.
|
3129
|
-
*/
|
3130
|
-
constructor(linearValues) {
|
3131
|
-
this.linearValues = linearValues;
|
3132
|
-
}
|
3133
|
-
/**
|
3134
|
-
* Возвращает признак возможности продажи товара на метраж.
|
3135
|
-
*
|
3136
|
-
* @param product Товар для которого нужно проверить возможность продажи на метраж.
|
3137
|
-
*/
|
3138
|
-
productIsMeasurable(product) {
|
3139
|
-
return this.linearValues.includes(product.unit);
|
3140
|
-
}
|
3141
|
-
/**
|
3142
|
-
* Возвращает кратность количества для товара.
|
3143
|
-
*
|
3144
|
-
* @param product Товар для которого нужно вернуть кратность количества.
|
3145
|
-
*/
|
3146
|
-
productMultiplicity(product) {
|
3147
|
-
return product.minCount && !this.linearValues.includes(product.unit) ? product.minCount : 1;
|
3148
|
-
}
|
3149
|
-
}
|
3150
|
-
ScUnitsHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, deps: [{ token: SC_LINEAR_VALUES_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
3151
|
-
ScUnitsHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, providedIn: 'root' });
|
3152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUnitsHelper, decorators: [{
|
3153
|
-
type: Injectable,
|
3154
|
-
args: [{
|
3155
|
-
providedIn: 'root',
|
3156
|
-
}]
|
3157
|
-
}], ctorParameters: function () {
|
3158
|
-
return [{ type: undefined, decorators: [{
|
3159
|
-
type: Inject,
|
3160
|
-
args: [SC_LINEAR_VALUES_TOKEN]
|
3161
|
-
}] }];
|
3162
|
-
} });
|
3163
|
-
|
3164
|
-
/* eslint-disable no-underscore-dangle */
|
3165
|
-
/**
|
3166
|
-
* Директива абстрактной карточки товара.
|
3167
|
-
*/
|
3168
|
-
class AbstractScPriceCard {
|
3169
|
-
constructor() {
|
3170
|
-
/**
|
3171
|
-
* {@link FormControl} поля ввода количества товара в корзине.
|
3172
|
-
*/
|
3173
|
-
this.quantityControl = new FormControl(3, { updateOn: 'blur' });
|
3174
|
-
/**
|
3175
|
-
* Признак, что необходимо отобразить лоадер для поля ввода количества товара.
|
3176
|
-
*/
|
3177
|
-
this.quantityShowLoader = false;
|
3178
|
-
/**
|
3179
|
-
* Признак, что необходимо отобразить лоадер для кнопки избранных товаров и категорий.
|
3180
|
-
*/
|
3181
|
-
this.favoriteShowLoader = false;
|
3182
|
-
/**
|
3183
|
-
* {@link Observable} изменения выбранного склада.
|
3184
|
-
*/
|
3185
|
-
this.warehouseSelect$ = inject(ScWarehouseService).getWarehouseSelectChange$();
|
3186
|
-
/**
|
3187
|
-
* {@link Observable} изменения статуса авторизации.
|
3188
|
-
*/
|
3189
|
-
this.authStatus$ = inject(ScAuthService).getAuthChange();
|
3190
|
-
/**
|
3191
|
-
* {@link Observable} поиска терма.
|
3192
|
-
*/
|
3193
|
-
this.search$ = inject(SEARCH_TERM);
|
3194
|
-
/**
|
3195
|
-
* Признак, что необходимо отобразить поле ввода количества товара.
|
3196
|
-
*/
|
3197
|
-
this.showQuantityControl = false;
|
3198
|
-
/**
|
3199
|
-
* Событие нажатия на кнопку "В избранное".
|
3200
|
-
*/
|
3201
|
-
this.clickFavoriteEvent = new EventEmitter();
|
3202
|
-
/**
|
3203
|
-
* Событие нажатия на кнопку "В корзину".
|
3204
|
-
*/
|
3205
|
-
this.clickAddToCartEvent = new EventEmitter();
|
3206
|
-
/**
|
3207
|
-
* Событие нажатия на кнопку очистки количества товара.
|
3208
|
-
*/
|
3209
|
-
this.clickClearEvent = new EventEmitter();
|
3210
|
-
/**
|
3211
|
-
* Событие нажатия на карточку товара.
|
3212
|
-
*/
|
3213
|
-
this.clickCardEvent = new EventEmitter();
|
3214
|
-
/**
|
3215
|
-
* Событие нажатия на историю цен.
|
3216
|
-
*/
|
3217
|
-
this.clickPriceHistoryEvent = new EventEmitter();
|
3218
|
-
/**
|
3219
|
-
* {@link Observable} изменения количества товара в корзине.
|
3220
|
-
*/
|
3221
|
-
this.quantityValueChanges = this.quantityControl.valueChanges;
|
3222
|
-
/**
|
3223
|
-
* Экземпляр класса-помощника для работы со значениями единиц измерения товара.
|
3224
|
-
*/
|
3225
|
-
this.unitsHelper = inject(ScUnitsHelper);
|
3226
|
-
/**
|
3227
|
-
* Хелпер для работы с изображениями товара.
|
3228
|
-
*/
|
3229
|
-
this.imageHelper = inject(ScImageHelper);
|
3230
|
-
/**
|
3231
|
-
* Путь до изображения 'Товар не найден'.
|
3232
|
-
*/
|
3233
|
-
this.pathImageNotFound = inject(SC_PATH_IMAGE_NOT_FOUND);
|
3234
|
-
}
|
3235
|
-
/**
|
3236
|
-
* Позиция товара в корзине.
|
3237
|
-
*
|
3238
|
-
* TODO: Сделать товар в корзине наблюдаемой переменной после реализации TASK:[#7144].
|
3239
|
-
*/
|
3240
|
-
get cartItem() {
|
3241
|
-
return this._cartItem;
|
3242
|
-
}
|
3243
|
-
/**
|
3244
|
-
* Позиция товара в корзине
|
3245
|
-
*
|
3246
|
-
* TODO: Сделать товар в корзине наблюдаемой переменной после реализации TASK:[#7144].
|
3247
|
-
*/
|
3248
|
-
set cartItem(value) {
|
3249
|
-
var _a, _b;
|
3250
|
-
this._cartItem = value;
|
3251
|
-
this.quantityControl.patchValue((_b = (_a = this._cartItem) === null || _a === void 0 ? void 0 : _a.quantity) !== null && _b !== void 0 ? _b : null, { emitEvent: false });
|
3252
|
-
this.quantityShowLoader = false;
|
3253
|
-
}
|
3254
|
-
/**
|
3255
|
-
* Признак, что нужно показать скелетон.
|
3256
|
-
*/
|
3257
|
-
get skeletonVisible() {
|
3258
|
-
return !this.product;
|
3259
|
-
}
|
3260
|
-
/**
|
3261
|
-
* Возвращает ссылку на preview-изображение карточки товара.
|
3262
|
-
*/
|
3263
|
-
getCardImagePreview() {
|
3264
|
-
return this.product ? this.imageHelper.getImagePreview(this.product) : this.pathImageNotFound;
|
3265
|
-
}
|
3266
|
-
}
|
3267
|
-
AbstractScPriceCard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractScPriceCard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
3268
|
-
AbstractScPriceCard.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AbstractScPriceCard, inputs: { cartItem: "cartItem", product: "product", showQuantityControl: "showQuantityControl" }, outputs: { clickFavoriteEvent: "clickFavoriteEvent", clickAddToCartEvent: "clickAddToCartEvent", clickClearEvent: "clickClearEvent", clickCardEvent: "clickCardEvent", clickPriceHistoryEvent: "clickPriceHistoryEvent", quantityValueChanges: "quantityValueChanges" }, ngImport: i0 });
|
3269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractScPriceCard, decorators: [{
|
3270
|
-
type: Directive
|
3271
|
-
}], propDecorators: { cartItem: [{
|
3272
|
-
type: Input
|
3273
|
-
}], product: [{
|
3274
|
-
type: Input
|
3275
|
-
}], showQuantityControl: [{
|
3276
|
-
type: Input
|
3277
|
-
}], clickFavoriteEvent: [{
|
3278
|
-
type: Output
|
3279
|
-
}], clickAddToCartEvent: [{
|
3280
|
-
type: Output
|
3281
|
-
}], clickClearEvent: [{
|
3282
|
-
type: Output
|
3283
|
-
}], clickCardEvent: [{
|
3284
|
-
type: Output
|
3285
|
-
}], clickPriceHistoryEvent: [{
|
3286
|
-
type: Output
|
3287
|
-
}], quantityValueChanges: [{
|
3288
|
-
type: Output
|
3289
|
-
}] } });
|
3290
|
-
|
3291
3450
|
/**
|
3292
3451
|
* Компонент информации о наличии товара на складе.
|
3293
3452
|
*/
|
@@ -4662,10 +4821,10 @@ class ScBrandsListComponent {
|
|
4662
4821
|
}
|
4663
4822
|
}
|
4664
4823
|
ScBrandsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScBrandsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
4665
|
-
ScBrandsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBrandsListComponent, selector: "sc-brands-list", inputs: { items: "items" }, ngImport: i0, template: "<!-- TODO: TASK:[#9893] \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439, \u043F\u0440\u0438 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0438 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0440\u0435\u043D\u0434\u043E\u0432. -->\n<div class=\"flex flex-col gap-4\">\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block
|
4824
|
+
ScBrandsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBrandsListComponent, selector: "sc-brands-list", inputs: { items: "items" }, ngImport: i0, template: "<!-- TODO: TASK:[#9893] \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439, \u043F\u0440\u0438 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0438 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0440\u0435\u043D\u0434\u043E\u0432. -->\n<div class=\"flex flex-col gap-4\">\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-tui-base-01 to-transparent\"></div>\n <div class=\"flex select-none items-center justify-center gap-12 overflow-hidden contrast-150 saturate-0\">\n <div\n *ngFor=\"let _ of [].constructor(3)\"\n class=\"animate-scroll-slow scroll-slow-revert flex shrink-0 items-center gap-16\"\n >\n <div\n *tuiRepeatTimes=\"let index of items.length - (items.length - (items.length % 2)) / 2\"\n class=\"flex items-center justify-center\"\n >\n <img\n [src]=\"items[index + (items.length - (items.length % 2)) / 2].src\"\n [alt]=\"items[index].alt\"\n />\n </div>\n </div>\n </div>\n <div class=\"absolute -right-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-transparent to-tui-base-01\"></div>\n </div>\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-tui-base-01 to-transparent\"></div>\n <div class=\"flex select-none items-center justify-center gap-12 overflow-hidden contrast-150 saturate-0\">\n <div\n *ngFor=\"let _ of [].constructor(3)\"\n class=\"animate-scroll-slow flex shrink-0 items-center gap-16\"\n >\n <div\n *tuiRepeatTimes=\"let index of (items.length - (items.length % 2)) / 2\"\n class=\"flex items-center justify-center\"\n >\n <img\n [src]=\"items[index].src\"\n [alt]=\"items[index].alt\"\n />\n </div>\n </div>\n </div>\n <div class=\"absolute -right-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-transparent to-tui-base-01\"></div>\n </div>\n</div>\n", styles: [".scroll-slow-revert{animation-direction:reverse!important;animation-delay:-15s!important}@keyframes scroll-slow{0%{transform:translate(0)}to{transform:translate(calc(-100% - 3rem))}}.animate-scroll-slow{animation:scroll-slow 30s linear infinite}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
4666
4825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScBrandsListComponent, decorators: [{
|
4667
4826
|
type: Component,
|
4668
|
-
args: [{ selector: 'sc-brands-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO: TASK:[#9893] \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439, \u043F\u0440\u0438 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0438 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0440\u0435\u043D\u0434\u043E\u0432. -->\n<div class=\"flex flex-col gap-4\">\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block
|
4827
|
+
args: [{ selector: 'sc-brands-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO: TASK:[#9893] \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439, \u043F\u0440\u0438 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0438 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0440\u0435\u043D\u0434\u043E\u0432. -->\n<div class=\"flex flex-col gap-4\">\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-tui-base-01 to-transparent\"></div>\n <div class=\"flex select-none items-center justify-center gap-12 overflow-hidden contrast-150 saturate-0\">\n <div\n *ngFor=\"let _ of [].constructor(3)\"\n class=\"animate-scroll-slow scroll-slow-revert flex shrink-0 items-center gap-16\"\n >\n <div\n *tuiRepeatTimes=\"let index of items.length - (items.length - (items.length % 2)) / 2\"\n class=\"flex items-center justify-center\"\n >\n <img\n [src]=\"items[index + (items.length - (items.length % 2)) / 2].src\"\n [alt]=\"items[index].alt\"\n />\n </div>\n </div>\n </div>\n <div class=\"absolute -right-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-transparent to-tui-base-01\"></div>\n </div>\n <div class=\"relative\">\n <div class=\"absolute -left-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-tui-base-01 to-transparent\"></div>\n <div class=\"flex select-none items-center justify-center gap-12 overflow-hidden contrast-150 saturate-0\">\n <div\n *ngFor=\"let _ of [].constructor(3)\"\n class=\"animate-scroll-slow flex shrink-0 items-center gap-16\"\n >\n <div\n *tuiRepeatTimes=\"let index of (items.length - (items.length % 2)) / 2\"\n class=\"flex items-center justify-center\"\n >\n <img\n [src]=\"items[index].src\"\n [alt]=\"items[index].alt\"\n />\n </div>\n </div>\n </div>\n <div class=\"absolute -right-1 top-0 z-10 block h-full w-12 bg-gradient-to-r from-transparent to-tui-base-01\"></div>\n </div>\n</div>\n", styles: [".scroll-slow-revert{animation-direction:reverse!important;animation-delay:-15s!important}@keyframes scroll-slow{0%{transform:translate(0)}to{transform:translate(calc(-100% - 3rem))}}.animate-scroll-slow{animation:scroll-slow 30s linear infinite}\n"] }]
|
4669
4828
|
}], propDecorators: { items: [{
|
4670
4829
|
type: Input
|
4671
4830
|
}] } });
|
@@ -4944,11 +5103,11 @@ const SC_USER_INFO = new InjectionToken('A stream with current user information'
|
|
4944
5103
|
/**
|
4945
5104
|
* Фабрика создания потока данных о текущем пользователе.
|
4946
5105
|
*
|
4947
|
-
* @param userService Сервис
|
5106
|
+
* @param userService Сервис данных о пользователе.
|
4948
5107
|
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
4949
5108
|
*/
|
4950
5109
|
function scUserFactory(userService, destroy$) {
|
4951
|
-
//TODO: TASK[#7615] Отслеживать выполнение запроса изменения информации о пользователе после доработки snabcentr-core-lib.
|
5110
|
+
// TODO: TASK[#7615] Отслеживать выполнение запроса изменения информации о пользователе после доработки snabcentr-core-lib.
|
4952
5111
|
return userService.getUserChange$().pipe(takeUntil(destroy$));
|
4953
5112
|
}
|
4954
5113
|
/**
|
@@ -4959,8 +5118,8 @@ const SC_USER_PROVIDERS = [
|
|
4959
5118
|
{
|
4960
5119
|
provide: SC_USER_INFO,
|
4961
5120
|
deps: [ScUserService, TuiDestroyService],
|
4962
|
-
useFactory: scUserFactory
|
4963
|
-
}
|
5121
|
+
useFactory: scUserFactory,
|
5122
|
+
},
|
4964
5123
|
];
|
4965
5124
|
|
4966
5125
|
/**
|
@@ -4970,7 +5129,7 @@ class ScResetUserPasswordComponent {
|
|
4970
5129
|
/**
|
4971
5130
|
* Инициализирует экземпляр класса {@link ScResetUserPasswordComponent}.
|
4972
5131
|
*
|
4973
|
-
* @param userService Сервис
|
5132
|
+
* @param userService Сервис данных о пользователе.
|
4974
5133
|
*/
|
4975
5134
|
constructor(userService) {
|
4976
5135
|
this.userService = userService;
|
@@ -4980,7 +5139,7 @@ class ScResetUserPasswordComponent {
|
|
4980
5139
|
this.form = new FormGroup({
|
4981
5140
|
currentPassword: new FormControl(null, [Validators.required, Validators.minLength(8)]),
|
4982
5141
|
password: new FormControl(null, [Validators.required, Validators.minLength(8)]),
|
4983
|
-
passwordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8)])
|
5142
|
+
passwordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8)]),
|
4984
5143
|
}, { validators: scPasswordConfirmMatchingValidator('password', 'passwordConfirm') });
|
4985
5144
|
/**
|
4986
5145
|
* {@link Subject} события отправки формы.
|
@@ -4989,11 +5148,13 @@ class ScResetUserPasswordComponent {
|
|
4989
5148
|
/**
|
4990
5149
|
* {@link Observable} запроса данных аутентификации.
|
4991
5150
|
*/
|
4992
|
-
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(map(() => ({ success: true })), tap(() =>
|
5151
|
+
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(map(() => ({ success: true })), tap(() => {
|
5152
|
+
this.form.reset();
|
5153
|
+
}), catchError((error) => {
|
4993
5154
|
var _a;
|
4994
5155
|
const errorResponse = error.error;
|
4995
5156
|
for (const key in errorResponse.errors) {
|
4996
|
-
(_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[
|
5157
|
+
(_a = this.form.get(key)) === null || _a === void 0 ? void 0 : _a.setErrors({ serverResponse: errorResponse.errors[key] });
|
4997
5158
|
}
|
4998
5159
|
if (!errorResponse.errors && errorResponse.message) {
|
4999
5160
|
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
@@ -5027,7 +5188,7 @@ class ScUpdateUserInfoDialogComponent {
|
|
5027
5188
|
* Инициализирует экземпляр класса {@link ScUpdateUserInfoDialogComponent}.
|
5028
5189
|
*
|
5029
5190
|
* @param user$ Поток информации о текущем пользователе.
|
5030
|
-
* @param userService Сервис
|
5191
|
+
* @param userService Сервис данных о пользователе.
|
5031
5192
|
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
5032
5193
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
5033
5194
|
*/
|
@@ -5126,7 +5287,7 @@ class ScUserManagersComponent {
|
|
5126
5287
|
/**
|
5127
5288
|
* Инициализирует экземпляр класса {@link ScUserManagersComponent}.
|
5128
5289
|
*
|
5129
|
-
* @param userService Сервис
|
5290
|
+
* @param userService Сервис данных о пользователе.
|
5130
5291
|
*/
|
5131
5292
|
constructor(userService) {
|
5132
5293
|
this.userService = userService;
|
@@ -5143,7 +5304,7 @@ class ScUserManagersComponent {
|
|
5143
5304
|
}
|
5144
5305
|
}
|
5145
5306
|
ScUserManagersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUserManagersComponent, deps: [{ token: i1.ScUserService }], target: i0.ɵɵFactoryTarget.Component });
|
5146
|
-
ScUserManagersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUserManagersComponent, selector: "sc-user-managers", outputs: { qrClickEvent: "qrClickEvent" }, ngImport: i0, template: "<p class=\"mb-2 font-extrabold\">\u0412\u0430\u0448\u0438 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u044B:</p>\n<ng-container *ngFor=\"let manager of managers$ | async; let last = last\">\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col gap-1 !font-medium text-tui-text-02\">\n {{ manager.name }}\n <a\n tuiLink\n [pseudo]=\"true\"\n href=\"mailto:{{ manager.contacts.email }}\"\n iconAlign=\"left\"\n icon=\"scIconMail\"\n >\n {{ manager.contacts.email }}\n </a>\n <a\n tuiLink\n [pseudo]=\"true\"\n iconAlign=\"left\"\n href=\"tel:{{ manager.contacts.phone }}\"\n icon=\"tuiIconPhone\"\n >\n {{ manager.contacts.phone | tuiFormatPhone }}\n </a>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n appearance=\"secondary\"\n icon=\"scIconQRCodeScan\"\n (click)=\"qrClickEvent.emit(manager)\"\n ></button>\n </div>\n <hr\n *ngIf=\"!last\"\n class=\"my-2 h-px border-0 bg-tui-base-04\"\n />\n</ng-container>\n", styles: ["a[tuiLink][data-mode=onLight]._pseudo{color:var(--tui-text-02)}a[tuiLink][data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}\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.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { 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 });
|
5307
|
+
ScUserManagersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUserManagersComponent, selector: "sc-user-managers", outputs: { qrClickEvent: "qrClickEvent" }, ngImport: i0, template: "<p class=\"mb-2 font-extrabold\">\u0412\u0430\u0448\u0438 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u044B:</p>\n<ng-container *ngFor=\"let manager of managers$ | async; let last = last\">\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col gap-1 !font-medium text-tui-text-02\">\n {{ manager.name }}\n <a\n tuiLink\n [pseudo]=\"true\"\n href=\"mailto:{{ manager.contacts.email }}\"\n iconAlign=\"left\"\n icon=\"scIconMail\"\n >\n {{ manager.contacts.email }}\n </a>\n <a\n tuiLink\n [pseudo]=\"true\"\n iconAlign=\"left\"\n href=\"tel:{{ manager.contacts.phone }}\"\n icon=\"tuiIconPhone\"\n >\n {{ manager.contacts.phone | tuiFormatPhone }}\n </a>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n appearance=\"secondary\"\n icon=\"scIconQRCodeScan\"\n (click)=\"qrClickEvent.emit(manager)\"\n ></button>\n </div>\n <hr\n *ngIf=\"!last\"\n class=\"my-2 h-px border-0 bg-tui-base-04\"\n />\n</ng-container>\n", styles: ["a[tuiLink][data-mode=onLight]._pseudo{color:var(--tui-text-02)}a[tuiLink][data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}\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.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: ScTerminalLinkDirective, selector: "a[href]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
5147
5308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUserManagersComponent, decorators: [{
|
5148
5309
|
type: Component,
|
5149
5310
|
args: [{ selector: 'sc-user-managers', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p class=\"mb-2 font-extrabold\">\u0412\u0430\u0448\u0438 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u044B:</p>\n<ng-container *ngFor=\"let manager of managers$ | async; let last = last\">\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col gap-1 !font-medium text-tui-text-02\">\n {{ manager.name }}\n <a\n tuiLink\n [pseudo]=\"true\"\n href=\"mailto:{{ manager.contacts.email }}\"\n iconAlign=\"left\"\n icon=\"scIconMail\"\n >\n {{ manager.contacts.email }}\n </a>\n <a\n tuiLink\n [pseudo]=\"true\"\n iconAlign=\"left\"\n href=\"tel:{{ manager.contacts.phone }}\"\n icon=\"tuiIconPhone\"\n >\n {{ manager.contacts.phone | tuiFormatPhone }}\n </a>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n appearance=\"secondary\"\n icon=\"scIconQRCodeScan\"\n (click)=\"qrClickEvent.emit(manager)\"\n ></button>\n </div>\n <hr\n *ngIf=\"!last\"\n class=\"my-2 h-px border-0 bg-tui-base-04\"\n />\n</ng-container>\n", styles: ["a[tuiLink][data-mode=onLight]._pseudo{color:var(--tui-text-02)}a[tuiLink][data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}\n"] }]
|
@@ -5161,7 +5322,7 @@ let ScUserPhoneApproveDialogComponent = class ScUserPhoneApproveDialogComponent
|
|
5161
5322
|
* @param verificationService Сервис верификации.
|
5162
5323
|
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
5163
5324
|
* @param user$ Поток информации о текущем пользователе.
|
5164
|
-
* @param userService Сервис
|
5325
|
+
* @param userService Сервис данных о пользователе.
|
5165
5326
|
* @param context Контекст диалогового окна, в котором открыт компонент.
|
5166
5327
|
*/
|
5167
5328
|
constructor(verificationService, userMetrikaService, user$, userService, context) {
|
@@ -5266,7 +5427,8 @@ ScUserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
5266
5427
|
TuiDataListModule,
|
5267
5428
|
TuiSelectModule,
|
5268
5429
|
TuiLinkModule,
|
5269
|
-
TuiFormatPhonePipeModule
|
5430
|
+
TuiFormatPhonePipeModule,
|
5431
|
+
ScTerminalLinkDirective], exports: [ScResetUserPasswordComponent, ScUpdateUserInfoDialogComponent, ScUserPhoneApproveDialogComponent, ScUserManagersComponent] });
|
5270
5432
|
ScUserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUserModule, imports: [CommonModule,
|
5271
5433
|
FormsModule,
|
5272
5434
|
ReactiveFormsModule,
|
@@ -5314,6 +5476,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
5314
5476
|
TuiSelectModule,
|
5315
5477
|
TuiLinkModule,
|
5316
5478
|
TuiFormatPhonePipeModule,
|
5479
|
+
ScTerminalLinkDirective,
|
5317
5480
|
],
|
5318
5481
|
exports: [ScResetUserPasswordComponent, ScUpdateUserInfoDialogComponent, ScUserPhoneApproveDialogComponent, ScUserManagersComponent],
|
5319
5482
|
}]
|
@@ -5328,7 +5491,7 @@ class ScProfileAccordionsContentComponent {
|
|
5328
5491
|
*
|
5329
5492
|
* @param user$ Поток информации о текущем пользователе.
|
5330
5493
|
* @param locationsService Сервис для получения списков стран, регионов, городов.
|
5331
|
-
* @param userService Сервис
|
5494
|
+
* @param userService Сервис данных о пользователе.
|
5332
5495
|
* @param verificationService Сервис верификации.
|
5333
5496
|
*/
|
5334
5497
|
constructor(user$, locationsService, userService, verificationService) {
|
@@ -5343,7 +5506,9 @@ class ScProfileAccordionsContentComponent {
|
|
5343
5506
|
/**
|
5344
5507
|
* {@link Observable} запроса изменения признака пользователя 'Я хочу получать рассылку'.
|
5345
5508
|
*/
|
5346
|
-
this.getNewsRequest$ = this.getNewsControl.valueChanges.pipe(skip(1), switchMap((value) => this.userService.updateUserInfo$({ getNews: value }).pipe(switchMap(() => this.userService.updateUserChange$().pipe(tap((user) =>
|
5509
|
+
this.getNewsRequest$ = this.getNewsControl.valueChanges.pipe(skip(1), switchMap((value) => this.userService.updateUserInfo$({ getNews: value }).pipe(switchMap(() => this.userService.updateUserChange$().pipe(tap((user) => {
|
5510
|
+
this.getNewsControl.patchValue(user.getNews, { emitEvent: false });
|
5511
|
+
}), startWith(null))), startWith(null))), share());
|
5347
5512
|
/**
|
5348
5513
|
* {@link Observable} изменения состояния загрузки данных изменения признака пользователя 'Я хочу получать рассылку'.
|
5349
5514
|
*/
|
@@ -5435,7 +5600,7 @@ class ScProfileAccordionsContentComponent {
|
|
5435
5600
|
}
|
5436
5601
|
}
|
5437
5602
|
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 });
|
5438
|
-
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\n *tuiLet=\"user$ | async as user\"\n class=\"flex flex-col gap-4\"\n>\n <sc-accordion\n [showArrow]=\"false\"\n [showAddButton]=\"false\"\n [open]=\"true\"\n >\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader\n [overlay]=\"true\"\n [showLoader]=\"user === null\"\n >\n <div class=\"flex gap-2 pl-4\">\n <div\n *ngIf=\"user\"\n class=\"flex grow flex-col gap-2\"\n >\n <span class=\"font-medium\">{{ user.name }}</span>\n <div\n *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\"\n class=\"flex items-center gap-1\"\n >\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 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\n *ngIf=\"!user.contacts.phone.isApproved\"\n class=\"text-tui-text-03\"\n >\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <button\n tuiLink\n [pseudo]=\"true\"\n (click)=\"approvePhoneClick.emit()\"\n >\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button\n >)\n </span>\n </div>\n <div\n *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\"\n class=\"flex flex-wrap gap-x-2\"\n >\n <a\n tuiLink\n icon=\"tuiIconMail\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"mailto:{{ user.contacts.email.value }}\"\n >\n {{ user.contacts.email.value }}\n </a>\n <span\n *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\"\n class=\"inline-flex flex-wrap gap-1 text-tui-text-03\"\n >\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader\n [showLoader]=\"!!(approveEmailLoading$ | async)\"\n [overlay]=\"true\"\n >\n <button\n tuiLink\n [pseudo]=\"true\"\n (click)=\"onSendApproveEmail.next(user.contacts.email.value)\"\n >\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n </button>\n </tui-loader>\n </span>\n <span\n *ngIf=\"isSendApproveEmail\"\n class=\"text-tui-success-fill\"\n @tuiFadeIn\n >\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\n [showLoader]=\"!!(getNewsLoading$ | async)\"\n [overlay]=\"true\"\n >\n <tui-checkbox-labeled\n size=\"m\"\n class=\"w-full\"\n [formControl]=\"getNewsControl\"\n [ngModel]=\"user.getNews\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n appearance=\"flat\"\n (click)=\"editProfileClick.emit()\"\n ></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\n *ngIf=\"user\"\n [contacts$]=\"userContacts$\"\n (addContactClick)=\"addUserContactClick.emit(user.id)\"\n (deleteButtonClick)=\"deleteUserContactClick.emit($event)\"\n ></sc-contacts-accordion>\n <sc-accordion\n #passwordAccordion\n [showArrow]=\"false\"\n [showAddButton]=\"false\"\n >\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: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { 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 });
|
5603
|
+
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\n *tuiLet=\"user$ | async as user\"\n class=\"flex flex-col gap-4\"\n>\n <sc-accordion\n [showArrow]=\"false\"\n [showAddButton]=\"false\"\n [open]=\"true\"\n >\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader\n [overlay]=\"true\"\n [showLoader]=\"user === null\"\n >\n <div class=\"flex gap-2 pl-4\">\n <div\n *ngIf=\"user\"\n class=\"flex grow flex-col gap-2\"\n >\n <span class=\"font-medium\">{{ user.name }}</span>\n <div\n *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\"\n class=\"flex items-center gap-1\"\n >\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 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\n *ngIf=\"!user.contacts.phone.isApproved\"\n class=\"text-tui-text-03\"\n >\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <button\n tuiLink\n [pseudo]=\"true\"\n (click)=\"approvePhoneClick.emit()\"\n >\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button\n >)\n </span>\n </div>\n <div\n *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\"\n class=\"flex flex-wrap gap-x-2\"\n >\n <a\n tuiLink\n icon=\"tuiIconMail\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"mailto:{{ user.contacts.email.value }}\"\n >\n {{ user.contacts.email.value }}\n </a>\n <span\n *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\"\n class=\"inline-flex flex-wrap gap-1 text-tui-text-03\"\n >\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader\n [showLoader]=\"!!(approveEmailLoading$ | async)\"\n [overlay]=\"true\"\n >\n <button\n tuiLink\n [pseudo]=\"true\"\n (click)=\"onSendApproveEmail.next(user.contacts.email.value)\"\n >\n \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n </button>\n </tui-loader>\n </span>\n <span\n *ngIf=\"isSendApproveEmail\"\n class=\"text-tui-success-fill\"\n @tuiFadeIn\n >\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\n [showLoader]=\"!!(getNewsLoading$ | async)\"\n [overlay]=\"true\"\n >\n <tui-checkbox-labeled\n size=\"m\"\n class=\"w-full\"\n [formControl]=\"getNewsControl\"\n [ngModel]=\"user.getNews\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n appearance=\"flat\"\n (click)=\"editProfileClick.emit()\"\n ></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\n *ngIf=\"user\"\n [contacts$]=\"userContacts$\"\n (addContactClick)=\"addUserContactClick.emit(user.id)\"\n (deleteButtonClick)=\"deleteUserContactClick.emit($event)\"\n ></sc-contacts-accordion>\n <sc-accordion\n #passwordAccordion\n [showArrow]=\"false\"\n [showAddButton]=\"false\"\n >\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: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { 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: "directive", type: ScTerminalLinkDirective, selector: "a[href]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
5439
5604
|
__decorate([
|
5440
5605
|
tuiPure // TODO: TASK[#7615] Удалить поле рефакторинга сервиса работы с пользователем.
|
5441
5606
|
], ScProfileAccordionsContentComponent.prototype, "getUserCity$", null);
|
@@ -5498,7 +5663,8 @@ ScProfileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
5498
5663
|
ReactiveFormsModule,
|
5499
5664
|
TuiLoaderModule,
|
5500
5665
|
TuiButtonModule,
|
5501
|
-
ScContactsModule
|
5666
|
+
ScContactsModule,
|
5667
|
+
ScTerminalLinkDirective], exports: [ScProfileAccordionsContentComponent] });
|
5502
5668
|
ScProfileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileModule, imports: [CommonModule,
|
5503
5669
|
ScUserModule,
|
5504
5670
|
ScAccordionModule,
|
@@ -5536,6 +5702,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
5536
5702
|
TuiLoaderModule,
|
5537
5703
|
TuiButtonModule,
|
5538
5704
|
ScContactsModule,
|
5705
|
+
ScTerminalLinkDirective,
|
5539
5706
|
],
|
5540
5707
|
exports: [ScProfileAccordionsContentComponent],
|
5541
5708
|
}]
|
@@ -5549,5 +5716,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
5549
5716
|
* Generated bundle index. Do not edit.
|
5550
5717
|
*/
|
5551
5718
|
|
5552
|
-
export { AbstractScPriceCard, 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, ScBrandsListComponent, ScBrandsListModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScFormFieldsModule, ScInputQuantityComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSuggestionFieldComponent, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator };
|
5719
|
+
export { AbstractScPriceCard, 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, ScBrandsListComponent, ScBrandsListModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScFormFieldsModule, ScInputQuantityComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSuggestionFieldComponent, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator };
|
5553
5720
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|