@snabcentr/client-ui 0.11.3 → 0.14.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-sign-in-form/sc-sign-in-form.component.d.ts +8 -4
- package/banner/sc-banner.component.d.ts +7 -3
- package/cart/cart-item-mobile/sc-cart-item-mobile.component.d.ts +1 -1
- package/contacts/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.d.ts +47 -0
- package/contacts/index.d.ts +2 -0
- package/contacts/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.d.ts +55 -0
- package/contacts/sc-contacts.module.d.ts +11 -5
- package/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.d.ts +2 -3
- package/contragents/contragents-accordion/sc-contragents-accordion.component.d.ts +1 -1
- package/esm2020/accordion/sc-accordion-content.directive.mjs +2 -2
- package/esm2020/accordion/sc-accordion.component.mjs +1 -1
- package/esm2020/accordion/sc-accordion.module.mjs +2 -2
- package/esm2020/auth/constants/phone-approve-code-mask.mjs +2 -2
- package/esm2020/auth/sc-auth.module.mjs +3 -3
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-email/sc-sign-in-form-by-email.component.mjs +2 -2
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-phone/sc-sign-in-form-by-phone.component.mjs +2 -2
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form.component.mjs +14 -5
- package/esm2020/banner/sc-banner.component.mjs +17 -8
- package/esm2020/banner/sc-banner.module.mjs +2 -2
- package/esm2020/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +2 -2
- package/esm2020/cart/sc-cart.module.mjs +3 -3
- package/esm2020/catalog/categories-list/sc-categories-list.component.mjs +1 -1
- package/esm2020/catalog/category-card/sc-category-card.component.mjs +2 -2
- package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +3 -3
- package/esm2020/catalog/price-card/sc-price-card.component.mjs +1 -1
- package/esm2020/catalog/price-history/sc-chart-option.mjs +18 -18
- package/esm2020/catalog/price-history/sc-lang-RU.mjs +25 -25
- package/esm2020/catalog/price-history/sc-price-history.component.mjs +2 -2
- package/esm2020/catalog/price-list-pagination/sc-price-list-pagination.component.mjs +1 -1
- package/esm2020/catalog/price-warehouse-stock/sc-price-warehouse-stock.component.mjs +1 -1
- package/esm2020/catalog/sc-catalog.module.mjs +5 -5
- package/esm2020/catalog/sc-favorite-btn/sc-favorite-btn.component.mjs +1 -1
- package/esm2020/contacts/add-contragent-bank-account-dialog/sc-add-contragent-bank-account-dialog.component.mjs +72 -0
- package/esm2020/contacts/contacts-accordion/sc-contacts-accordion.component.mjs +1 -1
- package/esm2020/contacts/index.mjs +3 -1
- package/esm2020/contacts/new-contragent-bank-account-form/sc-new-contragent-bank-account-form.component.mjs +61 -0
- package/esm2020/contacts/sc-contacts.module.mjs +75 -7
- package/esm2020/contragents/contragents-accordion/contragents-accordion-item/sc-contragents-accordion-item.component.mjs +3 -3
- package/esm2020/contragents/contragents-accordion/sc-contragents-accordion.component.mjs +3 -3
- package/esm2020/contragents/sc-contragents.module.mjs +2 -2
- package/esm2020/delivery-address/delivery-address-accordion/delivery-address-accordion-item/sc-delivery-address-accordion-item.component.mjs +1 -1
- package/esm2020/delivery-address/delivery-address-accordion/sc-delivery-address-accordion.component.mjs +1 -1
- package/esm2020/delivery-address/sc-delivery-address.module.mjs +2 -2
- package/esm2020/files/directives/tree-top.directive.mjs +8 -8
- package/esm2020/files/directives/tree.directive.mjs +2 -2
- package/esm2020/files/file-tree-item/file-tree-item.component.mjs +2 -2
- package/esm2020/files/files-and-documents.component.mjs +6 -6
- package/esm2020/files/files-and-documents.module.mjs +2 -2
- package/esm2020/files/services/tree-icon.service.mjs +3 -3
- package/esm2020/files/services/tree-loader.service.mjs +2 -2
- package/esm2020/form-fields/addresses-selection-field/sc-addresses-selection-field.component.mjs +21 -16
- package/esm2020/form-fields/form-fields.module.mjs +4 -4
- package/esm2020/form-fields/suggestion-field/sc-suggestion-field.component.mjs +5 -5
- package/esm2020/helpers/sc-px-converter.mjs +2 -2
- package/esm2020/helpers/sc-units-helper.mjs +2 -2
- package/esm2020/icons/sc-client-ui-icons-name.mjs +2 -2
- package/esm2020/masks/index.mjs +4 -0
- package/esm2020/masks/sc-account-number-mask.mjs +7 -0
- package/esm2020/masks/sc-bic-mask.mjs +7 -0
- package/esm2020/masks/sc-correspondent-account-mask.mjs +7 -0
- package/esm2020/news/news-card/sc-news-card.component.mjs +1 -1
- package/esm2020/news/news-card-skeleton/sc-news-card-skeleton.component.mjs +1 -1
- package/esm2020/news/sc-news.module.mjs +2 -2
- package/esm2020/order/index.mjs +2 -1
- package/esm2020/order/order-item-mobile/order-item-mobile.component.mjs +1 -1
- package/esm2020/order/sc-order.module.mjs +8 -6
- package/esm2020/order/sc-payment-status/sc-payment-status.component.mjs +35 -0
- package/esm2020/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.mjs +9 -3
- package/esm2020/profile/sc-profile.module.mjs +3 -3
- package/esm2020/providers/productsPagination.mjs +16 -14
- package/esm2020/providers/scUserProviders.mjs +3 -3
- package/esm2020/share-button/sc-share-button.component.mjs +1 -1
- package/esm2020/share-button/sc-share-button.module.mjs +2 -2
- package/esm2020/tokens/sc-linear-values-token.mjs +2 -2
- package/esm2020/user/reset-user-password/sc-reset-user-password.component.mjs +5 -5
- package/esm2020/user/sc-user.module.mjs +3 -3
- package/esm2020/user/update-user-info-dialog/sc-update-user-info-dialog.component.mjs +4 -4
- package/esm2020/user/user-phone-approve-dialog/sc-user-phone-approve-dialog.component.mjs +3 -3
- package/esm2020/validators/index.mjs +3 -1
- package/esm2020/validators/scBicValidator.mjs +7 -0
- package/esm2020/validators/scCorrespondentAccountValidator.mjs +7 -0
- package/esm2020/validators/scPasswordConfirmMatchingValidator.mjs +8 -9
- package/esm2020/verification/sc-verification.module.mjs +3 -3
- package/esm2020/verification/verification-phone-check-form/sc-verification-phone-check-form.component.mjs +7 -7
- package/fesm2015/snabcentr-client-ui.mjs +882 -612
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +879 -612
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/files/services/tree-icon.service.d.ts +2 -2
- package/form-fields/addresses-selection-field/sc-addresses-selection-field.component.d.ts +1 -1
- package/masks/index.d.ts +3 -0
- package/masks/sc-account-number-mask.d.ts +5 -0
- package/masks/sc-bic-mask.d.ts +5 -0
- package/masks/sc-correspondent-account-mask.d.ts +5 -0
- package/order/index.d.ts +1 -0
- package/order/sc-order.module.d.ts +6 -4
- package/order/sc-payment-status/sc-payment-status.component.d.ts +25 -0
- package/package.json +1 -1
- package/profile/sc-profile-accordions-content/sc-profile-accordions-content.component.d.ts +5 -1
- package/providers/productsPagination.d.ts +3 -3
- package/styles/tailwind/tailwind.scss +55 -8
- package/validators/index.d.ts +2 -0
- package/validators/scBicValidator.d.ts +5 -0
- package/validators/scCorrespondentAccountValidator.d.ts +5 -0
- package/validators/scPasswordConfirmMatchingValidator.d.ts +2 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, NgModule, Directive, HostBinding, ContentChild, Injectable, ElementRef, ContentChildren, ViewChild, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken,
|
|
3
|
-
import * as i10 from 'rxjs';
|
|
4
|
-
import { Subject, filter, map, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge, combineLatest, throwError } from 'rxjs';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, NgModule, Directive, HostBinding, ContentChild, Injectable, ElementRef, ContentChildren, ViewChild, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, SkipSelf, forwardRef } from '@angular/core';
|
|
5
3
|
import * as i1 from '@snabcentr/client-core';
|
|
6
|
-
import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScIconTypesEnum, ScUserService
|
|
4
|
+
import { ScUserMetrikaGoalsEnum, SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScAuthService, ScISuggestionType, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
|
|
5
|
+
import * as i10 from 'rxjs';
|
|
6
|
+
import { Subject, filter, map, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge, throwError, combineLatest } from 'rxjs';
|
|
7
7
|
import * as i2 from '@angular/common';
|
|
8
8
|
import { CommonModule, formatDate } from '@angular/common';
|
|
9
9
|
import * as i4 from '@taiga-ui/core';
|
|
10
|
-
import { TuiTextfieldControllerModule, TuiLinkModule, TuiButtonModule, TuiLabelModule, TuiModeModule, TuiErrorModule, TuiLoaderModule, tuiFadeIn, tuiFormatNumber, TuiSvgModule, TuiHintModule, TuiFormatNumberPipeModule, TuiNotificationModule, TuiFormatPhonePipeModule
|
|
10
|
+
import { TuiTextfieldControllerModule, TuiLinkModule, TuiButtonModule, TuiLabelModule, TuiModeModule, TuiErrorModule, TuiLoaderModule, tuiFadeIn, tuiFormatNumber, TuiSvgModule, TuiHintModule, TuiFormatNumberPipeModule, TuiDataListModule, TuiNotificationModule, TuiFormatPhonePipeModule } from '@taiga-ui/core';
|
|
11
11
|
import * as i3 from '@angular/forms';
|
|
12
12
|
import { FormGroupDirective, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
13
13
|
import * as i5 from '@taiga-ui/cdk';
|
|
14
14
|
import { tuiControlValue, tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE, tuiIsPresent, TuiDestroyService, TuiRepeatTimesModule, tuiMarkControlAsTouchedAndValidate, ALWAYS_TRUE_HANDLER, tuiPure } from '@taiga-ui/cdk';
|
|
15
|
-
import * as
|
|
16
|
-
import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiAccordionModule, TuiElasticContainerModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule,
|
|
15
|
+
import * as i6 from '@taiga-ui/kit';
|
|
16
|
+
import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiAccordionModule, TuiElasticContainerModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, TuiStringifyContentPipeModule, TuiSelectModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule, TuiCheckboxModule, TuiCheckboxLabeledModule } from '@taiga-ui/kit';
|
|
17
17
|
import * as i7 from '@maskito/angular';
|
|
18
18
|
import { MaskitoModule } from '@maskito/angular';
|
|
19
19
|
import * as i2$1 from '@tinkoff/ng-polymorpheus';
|
|
20
|
-
import { PolymorpheusTemplate, PolymorpheusModule,
|
|
20
|
+
import { PolymorpheusTemplate, PolymorpheusModule, POLYMORPHEUS_CONTEXT, PolymorpheusComponent } from '@tinkoff/ng-polymorpheus';
|
|
21
21
|
import { __decorate } from 'tslib';
|
|
22
22
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
23
23
|
import * as i8 from '@ng-web-apis/intersection-observer';
|
|
@@ -35,6 +35,8 @@ import * as echarts from 'echarts/core';
|
|
|
35
35
|
import { LineChart } from 'echarts/charts';
|
|
36
36
|
import { TitleComponent, TooltipComponent, GridComponent } from 'echarts/components';
|
|
37
37
|
import { SVGRenderer } from 'echarts/renderers';
|
|
38
|
+
import * as i3$1 from '@taiga-ui/layout';
|
|
39
|
+
import { TuiBlockStatusModule } from '@taiga-ui/layout';
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* Перечисление типов аутентификации.
|
|
@@ -55,7 +57,7 @@ var AuthMethod;
|
|
|
55
57
|
* Маска поля ввода кода подтверждения телефона.
|
|
56
58
|
*/
|
|
57
59
|
const verificationCodeMask = {
|
|
58
|
-
mask: /^\d{0,6}
|
|
60
|
+
mask: /^\d{0,6}$/
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
/**
|
|
@@ -112,7 +114,7 @@ class ScVerificationPhoneCheckFormComponent {
|
|
|
112
114
|
this.reloadTimer$.next(seconds);
|
|
113
115
|
}
|
|
114
116
|
else {
|
|
115
|
-
this.phoneControl.setErrors({ serverResponse: errorResponse?.errors?.[
|
|
117
|
+
this.phoneControl.setErrors({ serverResponse: errorResponse?.errors?.['phone'] ?? [errorResponse.message] });
|
|
116
118
|
}
|
|
117
119
|
return of(false);
|
|
118
120
|
}), finalize(() => this.setHaveCode(true)), startWith(true))), startWith(false), share());
|
|
@@ -168,8 +170,8 @@ class ScVerificationPhoneCheckFormComponent {
|
|
|
168
170
|
if (this.shouldBeBusy !== result.isBusy) {
|
|
169
171
|
this.phoneControl.setErrors({
|
|
170
172
|
serverResponse: [
|
|
171
|
-
result.isBusy ? 'Пользователь с таким номером телефона уже существует' : 'Пользователя с таким номером телефона не существует'
|
|
172
|
-
]
|
|
173
|
+
result.isBusy ? 'Пользователь с таким номером телефона уже существует' : 'Пользователя с таким номером телефона не существует'
|
|
174
|
+
]
|
|
173
175
|
});
|
|
174
176
|
this.phoneControl.markAsTouched();
|
|
175
177
|
return false;
|
|
@@ -179,8 +181,8 @@ class ScVerificationPhoneCheckFormComponent {
|
|
|
179
181
|
serverResponse: [
|
|
180
182
|
result.isConfirmed
|
|
181
183
|
? 'Телефон уже подтверждён'
|
|
182
|
-
: 'Номер телефона не подтверждён или вход по нему невозможен. Обратитесь к вашему персональному менеджеру или войдите с использованием e-mail и пароля.'
|
|
183
|
-
]
|
|
184
|
+
: 'Номер телефона не подтверждён или вход по нему невозможен. Обратитесь к вашему персональному менеджеру или войдите с использованием e-mail и пароля.'
|
|
185
|
+
]
|
|
184
186
|
});
|
|
185
187
|
this.phoneControl.markAsTouched();
|
|
186
188
|
return false;
|
|
@@ -188,7 +190,7 @@ class ScVerificationPhoneCheckFormComponent {
|
|
|
188
190
|
return true;
|
|
189
191
|
}), catchError((error) => {
|
|
190
192
|
const errorResponse = error.error;
|
|
191
|
-
this.phoneControl.setErrors({ serverResponse: errorResponse?.errors?.[
|
|
193
|
+
this.phoneControl.setErrors({ serverResponse: errorResponse?.errors?.['phone'] ?? [errorResponse.message] });
|
|
192
194
|
return of(false);
|
|
193
195
|
}), startWith(null));
|
|
194
196
|
}
|
|
@@ -208,7 +210,7 @@ class ScVerificationPhoneCheckFormComponent {
|
|
|
208
210
|
}
|
|
209
211
|
}
|
|
210
212
|
ScVerificationPhoneCheckFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScVerificationPhoneCheckFormComponent, deps: [{ token: i1.ScVerificationService }, { token: FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component });
|
|
211
|
-
ScVerificationPhoneCheckFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: { showCodeFields: "showCodeFields", readOnly: "readOnly", shouldBeBusy: "shouldBeBusy", shouldBeConfirmed: "shouldBeConfirmed", haveCode: "haveCode" }, outputs: { haveCodeChange: "haveCodeChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type:
|
|
213
|
+
ScVerificationPhoneCheckFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: { showCodeFields: "showCodeFields", readOnly: "readOnly", shouldBeBusy: "shouldBeBusy", shouldBeConfirmed: "shouldBeConfirmed", haveCode: "haveCode" }, outputs: { haveCodeChange: "haveCodeChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i6.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i6.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
212
214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScVerificationPhoneCheckFormComponent, decorators: [{
|
|
213
215
|
type: Component,
|
|
214
216
|
args: [{ selector: 'sc-verification-phone-check-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [readOnly]=\"readOnly\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <ng-container *ngIf=\"showCodeFields && form.enabled\">\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"verificationCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"verificationCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"verificationCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex gap-4 justify-center\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(phoneCheck$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(phoneCheck$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n </div>\n </ng-container>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(phoneCheck$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
|
|
@@ -250,7 +252,7 @@ class ScSignInFormByPhoneComponent {
|
|
|
250
252
|
*/
|
|
251
253
|
this.form = new FormGroup({
|
|
252
254
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
|
253
|
-
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)])
|
|
255
|
+
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)])
|
|
254
256
|
});
|
|
255
257
|
/**
|
|
256
258
|
* {@link Subject} события отправки формы.
|
|
@@ -298,7 +300,7 @@ class ScSignInFormByEmailComponent {
|
|
|
298
300
|
*/
|
|
299
301
|
this.formByEmail = new FormGroup({
|
|
300
302
|
login: new FormControl(null, [Validators.required, Validators.email]),
|
|
301
|
-
password: new FormControl(null, Validators.required)
|
|
303
|
+
password: new FormControl(null, Validators.required)
|
|
302
304
|
});
|
|
303
305
|
/**
|
|
304
306
|
* {@link Subject} события отправки формы.
|
|
@@ -328,7 +330,7 @@ class ScSignInFormByEmailComponent {
|
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
331
|
-
ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type:
|
|
333
|
+
ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i6.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
332
334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
|
|
333
335
|
type: Component,
|
|
334
336
|
args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
|
|
@@ -344,9 +346,11 @@ class ScSignInFormComponent {
|
|
|
344
346
|
* Инициализирует экземпляр класса {@link ScSignInFormComponent}.
|
|
345
347
|
*
|
|
346
348
|
* @param authService Сервис аутентификации.
|
|
349
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
|
347
350
|
*/
|
|
348
|
-
constructor(authService) {
|
|
351
|
+
constructor(authService, userMetrikaService) {
|
|
349
352
|
this.authService = authService;
|
|
353
|
+
this.userMetrikaService = userMetrikaService;
|
|
350
354
|
/**
|
|
351
355
|
* Выбранный способ аутентификации.
|
|
352
356
|
*/
|
|
@@ -368,6 +372,12 @@ class ScSignInFormComponent {
|
|
|
368
372
|
*/
|
|
369
373
|
this.successAuth = this.authService.getAuthChange().pipe(filter((state) => state));
|
|
370
374
|
}
|
|
375
|
+
/** @inheritDoc */
|
|
376
|
+
ngOnInit() {
|
|
377
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
378
|
+
target: ScUserMetrikaGoalsEnum.signInShow
|
|
379
|
+
});
|
|
380
|
+
}
|
|
371
381
|
/**
|
|
372
382
|
* Осуществляет переключение способов аутентификации.
|
|
373
383
|
*
|
|
@@ -383,12 +393,12 @@ class ScSignInFormComponent {
|
|
|
383
393
|
this.forgotPassword.emit();
|
|
384
394
|
}
|
|
385
395
|
}
|
|
386
|
-
ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
+
ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
387
397
|
ScSignInFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormComponent, selector: "sc-sign-in-form", inputs: { authMethod: "authMethod" }, outputs: { forgotPassword: "forgotPassword", signUp: "signUp", successAuth: "successAuth" }, ngImport: i0, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone" }, { kind: "component", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: ["forgotPassword"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
388
398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, decorators: [{
|
|
389
399
|
type: Component,
|
|
390
400
|
args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n" }]
|
|
391
|
-
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { authMethod: [{
|
|
401
|
+
}], ctorParameters: function () { return [{ type: i1.ScAuthService }, { type: i1.ScUserMetrikaService }]; }, propDecorators: { authMethod: [{
|
|
392
402
|
type: Input
|
|
393
403
|
}], forgotPassword: [{
|
|
394
404
|
type: Output
|
|
@@ -455,10 +465,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
455
465
|
TuiLetModule,
|
|
456
466
|
TuiLoaderModule,
|
|
457
467
|
TuiInputPhoneModule,
|
|
458
|
-
MaskitoModule
|
|
468
|
+
MaskitoModule
|
|
459
469
|
],
|
|
460
470
|
exports: [ScVerificationPhoneCheckFormComponent],
|
|
461
|
-
declarations: [ScVerificationPhoneCheckFormComponent]
|
|
471
|
+
declarations: [ScVerificationPhoneCheckFormComponent]
|
|
462
472
|
}]
|
|
463
473
|
}] });
|
|
464
474
|
|
|
@@ -523,9 +533,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
523
533
|
TuiLoaderModule,
|
|
524
534
|
TuiInputPhoneModule,
|
|
525
535
|
MaskitoModule,
|
|
526
|
-
ScVerificationModule
|
|
536
|
+
ScVerificationModule
|
|
527
537
|
],
|
|
528
|
-
exports: [ScSignInFormComponent, ScSignInFormByPhoneComponent, ScSignInFormByEmailComponent]
|
|
538
|
+
exports: [ScSignInFormComponent, ScSignInFormByPhoneComponent, ScSignInFormByEmailComponent]
|
|
529
539
|
}]
|
|
530
540
|
}] });
|
|
531
541
|
|
|
@@ -539,7 +549,7 @@ ScAccordionContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.
|
|
|
539
549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionContentDirective, decorators: [{
|
|
540
550
|
type: Directive,
|
|
541
551
|
args: [{
|
|
542
|
-
selector: 'ng-template[scAccordionContent]'
|
|
552
|
+
selector: 'ng-template[scAccordionContent]'
|
|
543
553
|
}]
|
|
544
554
|
}] });
|
|
545
555
|
|
|
@@ -579,7 +589,7 @@ class ScAccordionComponent {
|
|
|
579
589
|
}
|
|
580
590
|
}
|
|
581
591
|
ScAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
582
|
-
ScAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAccordionComponent, selector: "sc-accordion", inputs: { showAddButton: "showAddButton", showDeleteButton: "showDeleteButton", showArrow: "showArrow", open: "open", size: "size" }, outputs: { addButtonClick: "addButtonClick", deleteButtonClick: "deleteButtonClick" }, host: { properties: { "class._has-add-button": "this.showAddButton", "class._has-delete-button": "this.showDeleteButton", "class._has-arrow": "this.showArrow", "attr.data-size": "this.size" } }, queries: [{ propertyName: "content", first: true, predicate: ScAccordionContentDirective, descendants: true }], ngImport: i0, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type:
|
|
592
|
+
ScAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAccordionComponent, selector: "sc-accordion", inputs: { showAddButton: "showAddButton", showDeleteButton: "showDeleteButton", showArrow: "showArrow", open: "open", size: "size" }, outputs: { addButtonClick: "addButtonClick", deleteButtonClick: "deleteButtonClick" }, host: { properties: { "class._has-add-button": "this.showAddButton", "class._has-delete-button": "this.showDeleteButton", "class._has-arrow": "this.showArrow", "attr.data-size": "this.size" } }, queries: [{ propertyName: "content", first: true, predicate: ScAccordionContentDirective, descendants: true }], ngImport: i0, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i6.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { kind: "component", type: i6.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { kind: "directive", type: i6.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i6.TuiElasticContainerComponent, selector: "tui-elastic-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
583
593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAccordionComponent, decorators: [{
|
|
584
594
|
type: Component,
|
|
585
595
|
args: [{ selector: 'sc-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-accordion [rounded]=\"false\">\n <tui-accordion-item [size]=\"size\" [borders]=\"null\" [showArrow]=\"showArrow\" [open]=\"open\">\n <div class=\"flex grow justify-between\">\n <div class=\"font-bold self-center\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showAddButton || showDeleteButton\" class=\"flex\">\n <ng-container *ngIf=\"showDeleteButton\">\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconTrash2Large\" appearance=\"flat\" (click)=\"$event.stopPropagation(); deleteButtonClick.emit()\"></button>\n </ng-container>\n <ng-container *ngIf=\"showAddButton\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconPlusLarge\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); addButtonClick.emit()\"\n ></button>\n </ng-container>\n </div>\n </div>\n <ng-template tuiAccordionItemContent>\n <tui-elastic-container *ngIf=\"content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </tui-elastic-container>\n </ng-template>\n </tui-accordion-item>\n</tui-accordion>\n", styles: ["::ng-deep tui-accordion-item>.t-wrapper .t-header{border-radius:.75rem;flex-direction:row-reverse;min-height:var(--tui-height-m);font:var(--tui-font-text-m);padding:0 .5rem 0 1rem;gap:.75rem;background:var(--tui-base-02)}:host[data-size=s] ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding:0 .5rem 0 1rem;font:var(--tui-font-text-s)}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-left:.75rem}:host._has-add-button ::ng-deep tui-accordion-item>.t-wrapper .t-header,:host._has-delete-button ::ng-deep tui-accordion-item>.t-wrapper .t-header{padding-right:0}::ng-deep tui-accordion-item>.t-wrapper .t-header_hoverable:hover:not([data-mode]){background:var(--tui-base-03)!important}::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}:host:hover:not([data-mode]) ::ng-deep tui-accordion-item>.t-wrapper .t-header .t-icon{color:#000}::ng-deep tui-accordion-item>.t-wrapper .t-title{white-space:normal}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper .t-title{margin-right:0}::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-inline:0!important;padding-block:1rem}:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content,:host[data-size=s]:host._has-arrow ::ng-deep tui-accordion-item>.t-wrapper tui-expand>.t-wrapper>.t-content{padding-left:1rem!important}\n"] }]
|
|
@@ -627,7 +637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
627
637
|
args: [{
|
|
628
638
|
declarations: [ScAccordionComponent, ScAccordionContentDirective],
|
|
629
639
|
imports: [CommonModule, PolymorpheusModule, TuiButtonModule, TuiAccordionModule, TuiModeModule, TuiElasticContainerModule],
|
|
630
|
-
exports: [ScAccordionComponent, ScAccordionContentDirective]
|
|
640
|
+
exports: [ScAccordionComponent, ScAccordionContentDirective]
|
|
631
641
|
}]
|
|
632
642
|
}] });
|
|
633
643
|
|
|
@@ -652,7 +662,7 @@ ScPxConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", versio
|
|
|
652
662
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPxConverter, decorators: [{
|
|
653
663
|
type: Injectable,
|
|
654
664
|
args: [{
|
|
655
|
-
providedIn: 'root'
|
|
665
|
+
providedIn: 'root'
|
|
656
666
|
}]
|
|
657
667
|
}] });
|
|
658
668
|
|
|
@@ -665,14 +675,18 @@ let ScBannerComponent = class ScBannerComponent {
|
|
|
665
675
|
*
|
|
666
676
|
* @param cdr Объект для работы с обнаружением изменений.
|
|
667
677
|
* @param bannerService Сервис для работы с баннерами.
|
|
668
|
-
* @param
|
|
678
|
+
* @param entries$
|
|
679
|
+
* @param element
|
|
680
|
+
* @param pxConverter Экземпляр класса-помощника для конвертации пикселей.
|
|
681
|
+
* @param userMetrikaService Сервис для сбора метрик о действиях пользователей.
|
|
669
682
|
*/
|
|
670
|
-
constructor(cdr, bannerService, entries$, element, pxConverter) {
|
|
683
|
+
constructor(cdr, bannerService, entries$, element, pxConverter, userMetrikaService) {
|
|
671
684
|
this.cdr = cdr;
|
|
672
685
|
this.bannerService = bannerService;
|
|
673
686
|
this.entries$ = entries$;
|
|
674
687
|
this.element = element;
|
|
675
688
|
this.pxConverter = pxConverter;
|
|
689
|
+
this.userMetrikaService = userMetrikaService;
|
|
676
690
|
/**
|
|
677
691
|
* Признак, что необходимо показывать кнопки навигации.
|
|
678
692
|
*/
|
|
@@ -715,7 +729,7 @@ let ScBannerComponent = class ScBannerComponent {
|
|
|
715
729
|
this.banners$ = this.bannerService.banners$.pipe(map((banners) => banners.filter((banner) => banner.location === this.bannerLocation).reverse()), tap((banners) => {
|
|
716
730
|
if (banners.length) {
|
|
717
731
|
if (this.resizable) {
|
|
718
|
-
this.width =
|
|
732
|
+
this.width = '100%';
|
|
719
733
|
}
|
|
720
734
|
else {
|
|
721
735
|
this.height = `${this.pxConverter.pxToRem(banners[0].height)}rem`;
|
|
@@ -768,7 +782,7 @@ let ScBannerComponent = class ScBannerComponent {
|
|
|
768
782
|
.pipe(filter((toggle) => toggle), switchMap(() => interval(this.playerInterval).pipe(takeUntil(this.toggleTimer$))), filter(() => !this.disabled && (this.banners?.[this.currentBannerId]?.mediaType === 'image' || this.showPlayBtn)), untilDestroyed(this))
|
|
769
783
|
.subscribe(() => this.onNextBanner());
|
|
770
784
|
// Отслеживание пересечения компонента с экраном пользователя.
|
|
771
|
-
// Если баннера не находится в поле видимости пользователя, то он перестаёт
|
|
785
|
+
// Если баннера не находится в поле видимости пользователя, то он перестаёт переключаться, а видео останавливается.
|
|
772
786
|
this.entries$.pipe(map((entries) => entries.find((item) => item.target === this.element.nativeElement))).subscribe((entry) => {
|
|
773
787
|
this.toggleTimer$.next(!!entry?.isIntersecting);
|
|
774
788
|
});
|
|
@@ -803,13 +817,17 @@ let ScBannerComponent = class ScBannerComponent {
|
|
|
803
817
|
* @param banner Баннер, по ссылке которого совершён переход.
|
|
804
818
|
*/
|
|
805
819
|
onClick(banner) {
|
|
820
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
821
|
+
target: ScUserMetrikaGoalsEnum.bannerClick,
|
|
822
|
+
params: { banner_id: banner.id }
|
|
823
|
+
});
|
|
806
824
|
if (banner.url) {
|
|
807
825
|
this.clickBannerEvent.emit(banner);
|
|
808
826
|
}
|
|
809
827
|
}
|
|
810
828
|
};
|
|
811
|
-
ScBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScBannerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ScBannerService }, { token: IntersectionObserverService }, { token: ElementRef }, { token: ScPxConverter }], target: i0.ɵɵFactoryTarget.Component });
|
|
812
|
-
ScBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBannerComponent, selector: "sc-banner", inputs: { navigateButton: "navigateButton", playerInterval: "playerInterval", disabled: "disabled", bannerLocation: "bannerLocation", resizable: "resizable" }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { listeners: { "mouseenter": "mouseEnterHandler()", "mouseleave": "mouseLeaveHandler()" }, properties: { "class.!hidden": "this.isHidden", "style.height": "this.height", "style.width": "this.width", "style.aspect-ratio": "this.aspectRatio" } }, providers: [IntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "videoRef", first: true, predicate: ["videoPlayer"], descendants: true }], ngImport: i0, template: "<ng-container *tuiLet=\"banners$ | async\">\n <tui-carousel class=\"bg-white w-full h-full shadow-sc-2 rounded-xl overflow-hidden\" [(index)]=\"currentBannerId\">\n <ng-container *ngFor=\"let banner of banners; let index = index\">\n <a\n *tuiItem\n (click)=\"onClick(banner)\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n target=\"_blank\"\n [title]=\"banner.title\"\n class=\"relative\"\n >\n <ng-container [ngSwitch]=\"banner.mediaType\">\n <ng-container *ngSwitchCase=\"'video'\">\n <video\n #videoPlayer\n (suspend)=\"showPlayBtn = true\"\n (play)=\"showPlayBtn = false\"\n [src]=\"banner.mediaFile\"\n (ended)=\"onEndedVideo()\"\n (mouseover)=\"videoPlayer.pause()\"\n (mouseout)=\"videoPlayer.play()\"\n class=\"object-cover h-full\"\n muted\n autoplay\n ></video>\n <button\n *ngIf=\"showPlayBtn\"\n tuiIconButton\n [@tuiFadeIn]=\"200\"\n matRipple\n (click)=\"$event.preventDefault(); videoPlayer.play()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"!absolute left-8 bottom-4\"\n >\n <i class=\"icon-refresh text-black\"></i>\n </button>\n </ng-container>\n\n <img *ngSwitchCase=\"'image'\" [src]=\"banner.mediaFile\" alt=\"\u0411\u0430\u043D\u043D\u0435\u0440\" class=\"object-cover h-full\" />\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngFor=\"let item of bannersListRef\">\n <div *tuiItem [style.height]=\"height\" [style.width]=\"width\" [style.aspect-ratio]=\"aspectRatio\" class=\"overflow-hidden\">\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </div>\n </ng-container>\n </tui-carousel>\n</ng-container>\n<div *ngIf=\"navigateButton && !disabled && this.banners && (this.bannersListRef.length + this.banners.length) > 1\" tuiMode=\"onLight\" class=\"flex items-center\">\n <button tuiIconButton icon=\"tuiIconChevronLeftLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onPreviousBanner()\" class=\"!absolute left-2\"></button>\n <button tuiIconButton icon=\"tuiIconChevronRightLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onNextBanner()\" class=\"!absolute right-2\"></button>\n</div>\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type:
|
|
829
|
+
ScBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScBannerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ScBannerService }, { token: IntersectionObserverService }, { token: ElementRef }, { token: ScPxConverter }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
830
|
+
ScBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScBannerComponent, selector: "sc-banner", inputs: { navigateButton: "navigateButton", playerInterval: "playerInterval", disabled: "disabled", bannerLocation: "bannerLocation", resizable: "resizable" }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { listeners: { "mouseenter": "mouseEnterHandler()", "mouseleave": "mouseLeaveHandler()" }, properties: { "class.!hidden": "this.isHidden", "style.height": "this.height", "style.width": "this.width", "style.aspect-ratio": "this.aspectRatio" } }, providers: [IntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "videoRef", first: true, predicate: ["videoPlayer"], descendants: true }], ngImport: i0, template: "<ng-container *tuiLet=\"banners$ | async\">\n <tui-carousel class=\"bg-white w-full h-full shadow-sc-2 rounded-xl overflow-hidden\" [(index)]=\"currentBannerId\">\n <ng-container *ngFor=\"let banner of banners; let index = index\">\n <a\n *tuiItem\n (click)=\"onClick(banner)\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n target=\"_blank\"\n [title]=\"banner.title\"\n class=\"relative\"\n >\n <ng-container [ngSwitch]=\"banner.mediaType\">\n <ng-container *ngSwitchCase=\"'video'\">\n <video\n #videoPlayer\n (suspend)=\"showPlayBtn = true\"\n (play)=\"showPlayBtn = false\"\n [src]=\"banner.mediaFile\"\n (ended)=\"onEndedVideo()\"\n (mouseover)=\"videoPlayer.pause()\"\n (mouseout)=\"videoPlayer.play()\"\n class=\"object-cover h-full\"\n muted\n autoplay\n ></video>\n <button\n *ngIf=\"showPlayBtn\"\n tuiIconButton\n [@tuiFadeIn]=\"200\"\n matRipple\n (click)=\"$event.preventDefault(); videoPlayer.play()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"!absolute left-8 bottom-4\"\n >\n <i class=\"icon-refresh text-black\"></i>\n </button>\n </ng-container>\n\n <img *ngSwitchCase=\"'image'\" [src]=\"banner.mediaFile\" alt=\"\u0411\u0430\u043D\u043D\u0435\u0440\" class=\"object-cover h-full\" />\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngFor=\"let item of bannersListRef\">\n <div *tuiItem [style.height]=\"height\" [style.width]=\"width\" [style.aspect-ratio]=\"aspectRatio\" class=\"overflow-hidden\">\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </div>\n </ng-container>\n </tui-carousel>\n</ng-container>\n<div *ngIf=\"navigateButton && !disabled && this.banners && (this.bannersListRef.length + this.banners.length) > 1\" tuiMode=\"onLight\" class=\"flex items-center\">\n <button tuiIconButton icon=\"tuiIconChevronLeftLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onPreviousBanner()\" class=\"!absolute left-2\"></button>\n <button tuiIconButton icon=\"tuiIconChevronRightLarge\" size=\"m\" shape=\"rounded\" appearance=\"flat\" (click)=\"onNextBanner()\" class=\"!absolute right-2\"></button>\n</div>\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i6.TuiCarouselComponent, selector: "tui-carousel", inputs: ["draggable", "itemsCount", "index"], outputs: ["indexChange"] }, { kind: "directive", type: i6.TuiCarouselDirective, selector: "tui-carousel", inputs: ["duration", "index"] }, { kind: "directive", type: i5.TuiItemDirective, selector: "[tuiItem]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
813
831
|
ScBannerComponent = __decorate([
|
|
814
832
|
UntilDestroy({ checkProperties: true })
|
|
815
833
|
], ScBannerComponent);
|
|
@@ -822,7 +840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
822
840
|
}] }, { type: i0.ElementRef, decorators: [{
|
|
823
841
|
type: Inject,
|
|
824
842
|
args: [ElementRef]
|
|
825
|
-
}] }, { type: ScPxConverter }]; }, propDecorators: { navigateButton: [{
|
|
843
|
+
}] }, { type: ScPxConverter }, { type: i1.ScUserMetrikaService }]; }, propDecorators: { navigateButton: [{
|
|
826
844
|
type: Input
|
|
827
845
|
}], playerInterval: [{
|
|
828
846
|
type: Input
|
|
@@ -875,14 +893,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
875
893
|
args: [{
|
|
876
894
|
declarations: [ScBannerComponent],
|
|
877
895
|
imports: [CommonModule, RouterModule, TuiButtonModule, MatRippleModule, TuiCarouselModule, TuiModeModule, TuiLoaderModule, IntersectionObserverModule, TuiLetModule],
|
|
878
|
-
exports: [ScBannerComponent]
|
|
896
|
+
exports: [ScBannerComponent]
|
|
879
897
|
}]
|
|
880
898
|
}] });
|
|
881
899
|
|
|
882
900
|
/**
|
|
883
901
|
* Единицы измерения линейной величины по умолчанию.
|
|
884
902
|
*/
|
|
885
|
-
const SC_LINEAR_VALUES = ['пог.м.', 'м.',
|
|
903
|
+
const SC_LINEAR_VALUES = ['пог.м.', 'м.', 'м2'];
|
|
886
904
|
/**
|
|
887
905
|
* Токен единиц измерения линейной величины по умолчанию.
|
|
888
906
|
*/
|
|
@@ -922,13 +940,44 @@ UnitsHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version:
|
|
|
922
940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UnitsHelper, decorators: [{
|
|
923
941
|
type: Injectable,
|
|
924
942
|
args: [{
|
|
925
|
-
providedIn: 'root'
|
|
943
|
+
providedIn: 'root'
|
|
926
944
|
}]
|
|
927
945
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
928
946
|
type: Inject,
|
|
929
947
|
args: [SC_LINEAR_VALUES_TOKEN]
|
|
930
948
|
}] }]; } });
|
|
931
949
|
|
|
950
|
+
/**
|
|
951
|
+
* Проверяет БИК.
|
|
952
|
+
*/
|
|
953
|
+
const scBicValidator = ({ value }) => {
|
|
954
|
+
return !value || /^0[1,4]\d{7}$/.test(value) ? null : { bic: true };
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Проверяет корреспондентский счет.
|
|
959
|
+
*/
|
|
960
|
+
const scCorrespondentAccountValidator = ({ value }) => {
|
|
961
|
+
return !value || /^[3,4]01\d{17}$|^03\d{18}$/.test(value) ? null : { correspondentAccount: true };
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Проверяет повторный ввод пароля на эквивалентность паролю.
|
|
966
|
+
*
|
|
967
|
+
* @param passwordKey Ключ поля ввода пароля.
|
|
968
|
+
* @param passwordKey Ключ поля повторного ввода пароля.
|
|
969
|
+
*/
|
|
970
|
+
function scPasswordConfirmMatchingValidator(passwordKey, passwordConfirmKey) {
|
|
971
|
+
return (control) => {
|
|
972
|
+
const passwordInput = control.get(passwordKey);
|
|
973
|
+
const passwordConfirmInput = control.get(passwordConfirmKey);
|
|
974
|
+
if (!passwordInput || !passwordConfirmInput || passwordInput.invalid || passwordConfirmInput.invalid || !passwordInput.value || !passwordConfirmInput.value) {
|
|
975
|
+
return null;
|
|
976
|
+
}
|
|
977
|
+
return passwordInput?.value !== passwordConfirmInput?.value ? { passwordNotEquivalent: true } : null;
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
|
|
932
981
|
/**
|
|
933
982
|
* Проверяет кратность значения.
|
|
934
983
|
*
|
|
@@ -1041,7 +1090,7 @@ class ScInputQuantityComponent extends AbstractTuiNullableControl {
|
|
|
1041
1090
|
}
|
|
1042
1091
|
}
|
|
1043
1092
|
ScInputQuantityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_NUMBER_VALUE_TRANSFORMER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
-
ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type:
|
|
1093
|
+
ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i6.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { kind: "directive", type: i6.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "directive", type: i4.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i4.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1045
1094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, decorators: [{
|
|
1046
1095
|
type: Component,
|
|
1047
1096
|
args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"] }]
|
|
@@ -1142,7 +1191,7 @@ class ScCartItemMobileComponent {
|
|
|
1142
1191
|
/**
|
|
1143
1192
|
* Инициирует экземпляр класса {@link ScCartItemMobileComponent}.
|
|
1144
1193
|
*
|
|
1145
|
-
* @param unitsHelper
|
|
1194
|
+
* @param unitsHelper Экземпляр класса-помощника для работы со значениями единиц измерения товара.
|
|
1146
1195
|
* @param previewDialogService Сервис диалогового окна предварительного просмотра.
|
|
1147
1196
|
* @param urls Список ссылок на разделы backend'a.
|
|
1148
1197
|
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
|
@@ -1598,7 +1647,7 @@ const scChartOption = {
|
|
|
1598
1647
|
top: 12,
|
|
1599
1648
|
left: 64,
|
|
1600
1649
|
right: 0,
|
|
1601
|
-
bottom: 24
|
|
1650
|
+
bottom: 24
|
|
1602
1651
|
},
|
|
1603
1652
|
tooltip: {
|
|
1604
1653
|
trigger: 'axis',
|
|
@@ -1616,43 +1665,43 @@ const scChartOption = {
|
|
|
1616
1665
|
},
|
|
1617
1666
|
axisPointer: {
|
|
1618
1667
|
animation: false,
|
|
1619
|
-
type: 'cross'
|
|
1668
|
+
type: 'cross'
|
|
1620
1669
|
},
|
|
1621
1670
|
textStyle: {
|
|
1622
|
-
fontFamily: 'Roboto, "Helvetica Neue", sans-serif'
|
|
1623
|
-
}
|
|
1671
|
+
fontFamily: 'Roboto, "Helvetica Neue", sans-serif'
|
|
1672
|
+
}
|
|
1624
1673
|
},
|
|
1625
1674
|
xAxis: {
|
|
1626
1675
|
type: 'time',
|
|
1627
1676
|
splitLine: {
|
|
1628
|
-
show: false
|
|
1677
|
+
show: false
|
|
1629
1678
|
},
|
|
1630
1679
|
axisLine: {
|
|
1631
|
-
show: false
|
|
1680
|
+
show: false
|
|
1632
1681
|
},
|
|
1633
1682
|
axisTick: {
|
|
1634
|
-
show: false
|
|
1683
|
+
show: false
|
|
1635
1684
|
},
|
|
1636
1685
|
axisLabel: {
|
|
1637
|
-
hideOverlap: true
|
|
1686
|
+
hideOverlap: true
|
|
1638
1687
|
},
|
|
1639
|
-
boundaryGap: ['3%', '3%']
|
|
1688
|
+
boundaryGap: ['3%', '3%']
|
|
1640
1689
|
},
|
|
1641
1690
|
yAxis: {
|
|
1642
1691
|
splitLine: {
|
|
1643
|
-
show: false
|
|
1692
|
+
show: false
|
|
1644
1693
|
},
|
|
1645
1694
|
axisLine: {
|
|
1646
|
-
show: false
|
|
1695
|
+
show: false
|
|
1647
1696
|
},
|
|
1648
1697
|
axisTick: {
|
|
1649
|
-
show: false
|
|
1698
|
+
show: false
|
|
1650
1699
|
},
|
|
1651
1700
|
axisLabel: {
|
|
1652
|
-
formatter: (value) => tuiFormatNumber(value)
|
|
1701
|
+
formatter: (value) => tuiFormatNumber(value)
|
|
1653
1702
|
},
|
|
1654
1703
|
type: 'value',
|
|
1655
|
-
boundaryGap: [0, '100%']
|
|
1704
|
+
boundaryGap: [0, '100%']
|
|
1656
1705
|
},
|
|
1657
1706
|
series: {
|
|
1658
1707
|
name: 'История цены',
|
|
@@ -1660,9 +1709,9 @@ const scChartOption = {
|
|
|
1660
1709
|
showSymbol: false,
|
|
1661
1710
|
symbolSize: 12,
|
|
1662
1711
|
itemStyle: {
|
|
1663
|
-
color: '#ffcc40'
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1712
|
+
color: '#ffcc40'
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1666
1715
|
};
|
|
1667
1716
|
|
|
1668
1717
|
/**
|
|
@@ -1751,7 +1800,7 @@ class ScPriceHistoryComponent {
|
|
|
1751
1800
|
pushDataItem(value, date, nextDate) {
|
|
1752
1801
|
this.data.push({
|
|
1753
1802
|
name: date.toString(),
|
|
1754
|
-
value: [date, value, nextDate]
|
|
1803
|
+
value: [date, value, nextDate]
|
|
1755
1804
|
});
|
|
1756
1805
|
}
|
|
1757
1806
|
}
|
|
@@ -1769,29 +1818,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1769
1818
|
*/
|
|
1770
1819
|
const SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS = {
|
|
1771
1820
|
perPage: 20,
|
|
1772
|
-
page: 0
|
|
1821
|
+
page: 0
|
|
1773
1822
|
};
|
|
1774
1823
|
/**
|
|
1775
|
-
* Токен значений пагинации списка товаров категории по умолчанию.
|
|
1824
|
+
* Токен значений пагинации списка товаров в категории по умолчанию.
|
|
1776
1825
|
*/
|
|
1777
1826
|
const SC_PRODUCT_PAGINATION_OPTIONS = tuiCreateToken(SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS);
|
|
1778
1827
|
/**
|
|
1779
|
-
* {@link Subject} параметров пагинации списка товаров категории.
|
|
1828
|
+
* {@link Subject} параметров пагинации списка товаров в категории.
|
|
1780
1829
|
*/
|
|
1781
1830
|
const paginationParams$ = new Subject();
|
|
1782
1831
|
/**
|
|
1783
|
-
* Токен {@link Subject} параметров пагинации списка товаров категории для получения их из вне.
|
|
1832
|
+
* Токен {@link Subject} параметров пагинации списка товаров в категории для получения их из вне.
|
|
1784
1833
|
*/
|
|
1785
1834
|
const SC_PRODUCT_PAGINATION_PARAMS = tuiCreateToken(paginationParams$);
|
|
1786
1835
|
/**
|
|
1787
|
-
* Фабрика создания потока данных о товарах категории
|
|
1836
|
+
* Фабрика создания потока данных о товарах категории с пагинацией, включая данные о количестве этих товаров в корзине.
|
|
1788
1837
|
*
|
|
1838
|
+
* @param paramMap Данные о параметрах запроса.
|
|
1789
1839
|
* @param catalogService Сервис для работы с каталогом.
|
|
1790
1840
|
* @param cartService Сервис для работы с корзиной.
|
|
1841
|
+
* @param authService Сервис для работы с аутентификации пользователей.
|
|
1791
1842
|
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
|
1792
1843
|
*/
|
|
1793
|
-
function productsPaginationChangeFactory({ paramMap }, catalogService, cartService, destroy$) {
|
|
1794
|
-
return paramMap.pipe(map((params) => params.get('categoryId')), filter(tuiIsPresent), switchMap((categoryId) => paginationParams$.pipe(debounceTime(20), switchMap((paginationParams) => catalogService.getCategoryProducts$(Number(categoryId), paginationParams)), filter(tuiIsPresent), scan((acc, value) => {
|
|
1844
|
+
function productsPaginationChangeFactory({ paramMap }, catalogService, cartService, authService, destroy$) {
|
|
1845
|
+
return paramMap.pipe(map((params) => params.get('categoryId')), filter(tuiIsPresent), switchMap((categoryId) => paginationParams$.pipe(debounceTime(20), switchMap((paginationParams) => authService.getAuthChange().pipe(switchMap(() => catalogService.getCategoryProducts$(Number(categoryId), paginationParams)))), filter(tuiIsPresent), scan((acc, value) => {
|
|
1795
1846
|
if (acc && value && value.meta.currentPage > 1)
|
|
1796
1847
|
value.data.unshift(...acc.data);
|
|
1797
1848
|
return value;
|
|
@@ -1841,19 +1892,19 @@ const SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS = [
|
|
|
1841
1892
|
TuiDestroyService,
|
|
1842
1893
|
{
|
|
1843
1894
|
provide: SC_PRODUCT_PAGINATION_CHANGE_INFO,
|
|
1844
|
-
deps: [ActivatedRoute, ScCatalogService, ScCartService, TuiDestroyService],
|
|
1845
|
-
useFactory: productsPaginationChangeFactory
|
|
1895
|
+
deps: [ActivatedRoute, ScCatalogService, ScCartService, ScAuthService, TuiDestroyService],
|
|
1896
|
+
useFactory: productsPaginationChangeFactory
|
|
1846
1897
|
},
|
|
1847
1898
|
{
|
|
1848
1899
|
provide: SC_NEXT_PAGE_PAGINATION_CHANGE_INFO,
|
|
1849
1900
|
deps: [Router, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
|
1850
|
-
useFactory: nextPagePaginationChangeFactory
|
|
1901
|
+
useFactory: nextPagePaginationChangeFactory
|
|
1851
1902
|
},
|
|
1852
1903
|
{
|
|
1853
1904
|
provide: SC_LOADING_PAGINATION_CHANGE_INFO,
|
|
1854
1905
|
deps: [SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
|
1855
|
-
useFactory: loadingPaginationFactory
|
|
1856
|
-
}
|
|
1906
|
+
useFactory: loadingPaginationFactory
|
|
1907
|
+
}
|
|
1857
1908
|
];
|
|
1858
1909
|
|
|
1859
1910
|
/**
|
|
@@ -1896,13 +1947,13 @@ var scLangRU = {
|
|
|
1896
1947
|
month: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
|
|
1897
1948
|
monthAbbr: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
|
|
1898
1949
|
dayOfWeek: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
|
|
1899
|
-
dayOfWeekAbbr: ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб']
|
|
1950
|
+
dayOfWeekAbbr: ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб']
|
|
1900
1951
|
},
|
|
1901
1952
|
legend: {
|
|
1902
1953
|
selector: {
|
|
1903
1954
|
all: 'Всё',
|
|
1904
|
-
inverse: 'Обратить'
|
|
1905
|
-
}
|
|
1955
|
+
inverse: 'Обратить'
|
|
1956
|
+
}
|
|
1906
1957
|
},
|
|
1907
1958
|
toolbox: {
|
|
1908
1959
|
brush: {
|
|
@@ -1912,34 +1963,34 @@ var scLangRU = {
|
|
|
1912
1963
|
lineX: 'Горизонтальное выделение',
|
|
1913
1964
|
lineY: 'Вертикальное выделение',
|
|
1914
1965
|
keep: 'Оставить выбранное',
|
|
1915
|
-
clear: 'Очистить выбранное'
|
|
1916
|
-
}
|
|
1966
|
+
clear: 'Очистить выбранное'
|
|
1967
|
+
}
|
|
1917
1968
|
},
|
|
1918
1969
|
dataView: {
|
|
1919
1970
|
title: 'Данные',
|
|
1920
|
-
lang: ['Данные', 'Закрыть', 'Обновить']
|
|
1971
|
+
lang: ['Данные', 'Закрыть', 'Обновить']
|
|
1921
1972
|
},
|
|
1922
1973
|
dataZoom: {
|
|
1923
1974
|
title: {
|
|
1924
1975
|
zoom: 'Увеличить',
|
|
1925
|
-
back: 'Сбросить увеличение'
|
|
1926
|
-
}
|
|
1976
|
+
back: 'Сбросить увеличение'
|
|
1977
|
+
}
|
|
1927
1978
|
},
|
|
1928
1979
|
magicType: {
|
|
1929
1980
|
title: {
|
|
1930
1981
|
line: 'Переключиться на линейный график',
|
|
1931
1982
|
bar: 'Переключиться на столбчатую диаграмму',
|
|
1932
1983
|
stack: 'Стопка',
|
|
1933
|
-
tiled: 'Плитка'
|
|
1934
|
-
}
|
|
1984
|
+
tiled: 'Плитка'
|
|
1985
|
+
}
|
|
1935
1986
|
},
|
|
1936
1987
|
restore: {
|
|
1937
|
-
title: 'Восстановить'
|
|
1988
|
+
title: 'Восстановить'
|
|
1938
1989
|
},
|
|
1939
1990
|
saveAsImage: {
|
|
1940
1991
|
title: 'Сохранить картинку',
|
|
1941
|
-
lang: ['Правый клик, чтобы сохранить картинку']
|
|
1942
|
-
}
|
|
1992
|
+
lang: ['Правый клик, чтобы сохранить картинку']
|
|
1993
|
+
}
|
|
1943
1994
|
},
|
|
1944
1995
|
series: {
|
|
1945
1996
|
typeNames: {
|
|
@@ -1964,19 +2015,19 @@ var scLangRU = {
|
|
|
1964
2015
|
gauge: 'Шкала',
|
|
1965
2016
|
pictorialBar: 'Столбец-картинка',
|
|
1966
2017
|
themeRiver: 'Тематическая река',
|
|
1967
|
-
sunburst: 'Солнечные лучи'
|
|
1968
|
-
}
|
|
2018
|
+
sunburst: 'Солнечные лучи'
|
|
2019
|
+
}
|
|
1969
2020
|
},
|
|
1970
2021
|
aria: {
|
|
1971
2022
|
general: {
|
|
1972
2023
|
withTitle: 'Это график, показывающий "{title}"',
|
|
1973
|
-
withoutTitle: 'Это график'
|
|
2024
|
+
withoutTitle: 'Это график'
|
|
1974
2025
|
},
|
|
1975
2026
|
series: {
|
|
1976
2027
|
single: {
|
|
1977
2028
|
prefix: '',
|
|
1978
2029
|
withName: ' с типом {seriesType} и именем {seriesName}.',
|
|
1979
|
-
withoutName: ' с типом {seriesType}.'
|
|
2030
|
+
withoutName: ' с типом {seriesType}.'
|
|
1980
2031
|
},
|
|
1981
2032
|
multiple: {
|
|
1982
2033
|
prefix: '. Он состоит из {seriesCount} серий.',
|
|
@@ -1984,9 +2035,9 @@ var scLangRU = {
|
|
|
1984
2035
|
withoutName: ' Серия {seriesId} имеет тип {seriesType}.',
|
|
1985
2036
|
separator: {
|
|
1986
2037
|
middle: '',
|
|
1987
|
-
end: ''
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
2038
|
+
end: ''
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
1990
2041
|
},
|
|
1991
2042
|
data: {
|
|
1992
2043
|
allData: 'Данные таковы: ',
|
|
@@ -1995,10 +2046,10 @@ var scLangRU = {
|
|
|
1995
2046
|
withoutName: '{value}',
|
|
1996
2047
|
separator: {
|
|
1997
2048
|
middle: ', ',
|
|
1998
|
-
end: '. '
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2049
|
+
end: '. '
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2002
2053
|
};
|
|
2003
2054
|
|
|
2004
2055
|
echarts.registerLocale('RU', scLangRU);
|
|
@@ -2070,7 +2121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2070
2121
|
ScPriceCardComponent,
|
|
2071
2122
|
ScPriceWarehouseStockComponent,
|
|
2072
2123
|
ScPriceHistoryComponent,
|
|
2073
|
-
ScCategoriesListComponent
|
|
2124
|
+
ScCategoriesListComponent
|
|
2074
2125
|
],
|
|
2075
2126
|
exports: [
|
|
2076
2127
|
ScPriceListPaginationComponent,
|
|
@@ -2080,7 +2131,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2080
2131
|
ScPriceCardComponent,
|
|
2081
2132
|
ScPriceWarehouseStockComponent,
|
|
2082
2133
|
ScPriceHistoryComponent,
|
|
2083
|
-
ScCategoriesListComponent
|
|
2134
|
+
ScCategoriesListComponent
|
|
2084
2135
|
],
|
|
2085
2136
|
imports: [
|
|
2086
2137
|
CommonModule,
|
|
@@ -2101,8 +2152,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2101
2152
|
TuiElasticContainerModule,
|
|
2102
2153
|
NgxEchartsModule.forRoot({ echarts }),
|
|
2103
2154
|
TuiLetModule,
|
|
2104
|
-
TuiRepeatTimesModule
|
|
2105
|
-
]
|
|
2155
|
+
TuiRepeatTimesModule
|
|
2156
|
+
]
|
|
2106
2157
|
}]
|
|
2107
2158
|
}] });
|
|
2108
2159
|
|
|
@@ -2156,8 +2207,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2156
2207
|
FormsModule,
|
|
2157
2208
|
ReactiveFormsModule,
|
|
2158
2209
|
TuiPreviewModule,
|
|
2159
|
-
PolymorpheusModule
|
|
2160
|
-
]
|
|
2210
|
+
PolymorpheusModule
|
|
2211
|
+
]
|
|
2161
2212
|
}]
|
|
2162
2213
|
}] });
|
|
2163
2214
|
|
|
@@ -2220,10 +2271,10 @@ class ScContragentsAccordionItemComponent {
|
|
|
2220
2271
|
}
|
|
2221
2272
|
}
|
|
2222
2273
|
ScContragentsAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2223
|
-
ScContragentsAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: { contragent: "contragent" }, outputs: { addBankAccountsClick: "addBankAccountsClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit()\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "editContactClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2274
|
+
ScContragentsAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: { contragent: "contragent" }, outputs: { addBankAccountsClick: "addBankAccountsClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit(contragent.id)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit(contragent.id)\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "editContactClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2224
2275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionItemComponent, decorators: [{
|
|
2225
2276
|
type: Component,
|
|
2226
|
-
args: [{ selector: 'sc-contragents-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit()\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2277
|
+
args: [{ selector: 'sc-contragents-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n {{ contragent.name }}\n <span *ngIf=\"$any(contragent).inn as inn\">\u0418\u041D\u041D: {{ inn }}</span>\n <span *ngIf=\"$any(contragent).kpp as kpp\">\u041A\u041F\u041F: {{ kpp }}</span>\n </div>\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation(); editContragentClick.emit()\"\n ></button>\n </div>\n\n <sc-accordion (addButtonClick)=\"addBankAccountsClick.emit(contragent.id)\">\n \u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"bankAccounts$ | async as bankAccounts\" [overlay]=\"true\" [showLoader]=\"bankAccounts === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!bankAccounts || bankAccounts.length; else bankAccountsNotExist\">\n <div *ngFor=\"let bankAccount of bankAccounts\" class=\"flex gap-2 border-b border-tui-base-03\">\n <div class=\"flex flex-col gap-2 grow\">\n <span>\u0411\u0430\u043D\u043A: {{ bankAccount.bankName }}</span>\n <span>\u0411\u0418\u041A: {{ bankAccount.bic }}</span>\n <span>\u0420/\u0441\u0447\u0451\u0442: {{ bankAccount.accountNumber }}</span>\n <span>\u041A\u043E\u0440/\u0441\u0447\u0451\u0442: {{ bankAccount.correspondentAccount }}</span>\n <span>\u0412\u0430\u043B\u044E\u0442\u0430: {{ bankAccount.currency.name }}</span>\n </div>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconEdit3Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n\n <button\n tuiIconButton\n size=\"m\"\n type=\"button\"\n icon=\"tuiIconTrash2Large\"\n tuiMode=\"onLight\"\n appearance=\"flat\"\n (click)=\"$event.stopPropagation();\"\n ></button>\n </div>\n </div>\n </ng-container>\n\n <ng-template #bankAccountsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 <span class=\"font-bold\">{{ contragent.name }}</span> \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addBankAccountsClick.emit(contragent.id)\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2227
2278
|
}], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { contragent: [{
|
|
2228
2279
|
type: Input
|
|
2229
2280
|
}], addBankAccountsClick: [{
|
|
@@ -2268,10 +2319,10 @@ class ScContragentsAccordionComponent {
|
|
|
2268
2319
|
}
|
|
2269
2320
|
}
|
|
2270
2321
|
ScContragentsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, deps: [{ token: i1.ScContragentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2271
|
-
ScContragentsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: { addContragentClick: "addContragentClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", addBankAccountsClick: "addBankAccountsClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit()\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: ["contragent"], outputs: ["addBankAccountsClick", "editBankAccountsContragentClick", "editContragentClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2322
|
+
ScContragentsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: { addContragentClick: "addContragentClick", editBankAccountsContragentClick: "editBankAccountsContragentClick", addBankAccountsClick: "addBankAccountsClick", editContragentClick: "editContragentClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit($event)\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScContragentsAccordionItemComponent, selector: "sc-contragents-accordion-item", inputs: ["contragent"], outputs: ["addBankAccountsClick", "editBankAccountsContragentClick", "editContragentClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2272
2323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsAccordionComponent, decorators: [{
|
|
2273
2324
|
type: Component,
|
|
2274
|
-
args: [{ selector: 'sc-contragents-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit()\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2325
|
+
args: [{ selector: 'sc-contragents-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addContragentClick.emit()\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"contragents$ | async as contragents\" [overlay]=\"true\" [showLoader]=\"contragents === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!contragents || contragents.length; else contragentsNotExist\">\n <sc-contragents-accordion-item\n *ngFor=\"let contragent of contragents\"\n [contragent]=\"contragent\"\n (addBankAccountsClick)=\"addBankAccountsClick.emit($event)\"\n (editContragentClick)=\"editContragentClick.emit()\"\n (editBankAccountsContragentClick)=\"editBankAccountsContragentClick.emit()\"\n ></sc-contragents-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u044B \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addContragentClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2275
2326
|
}], ctorParameters: function () { return [{ type: i1.ScContragentService }]; }, propDecorators: { addContragentClick: [{
|
|
2276
2327
|
type: Output
|
|
2277
2328
|
}], editBankAccountsContragentClick: [{
|
|
@@ -2283,149 +2334,620 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2283
2334
|
}] } });
|
|
2284
2335
|
|
|
2285
2336
|
/**
|
|
2286
|
-
*
|
|
2337
|
+
* Маска поля ввода номера счета.
|
|
2287
2338
|
*/
|
|
2288
|
-
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
|
-
ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, declarations: [ScContactsAccordionComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, TuiLinkModule, TuiFormatPhonePipeModule], exports: [ScContactsAccordionComponent] });
|
|
2292
|
-
ScContactsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, TuiLinkModule, TuiFormatPhonePipeModule] });
|
|
2293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, decorators: [{
|
|
2294
|
-
type: NgModule,
|
|
2295
|
-
args: [{
|
|
2296
|
-
declarations: [ScContactsAccordionComponent],
|
|
2297
|
-
imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, TuiLinkModule, TuiFormatPhonePipeModule],
|
|
2298
|
-
exports: [ScContactsAccordionComponent],
|
|
2299
|
-
}]
|
|
2300
|
-
}] });
|
|
2339
|
+
const scAccountNumberMask = {
|
|
2340
|
+
mask: /^\d{0,20}$/
|
|
2341
|
+
};
|
|
2301
2342
|
|
|
2302
2343
|
/**
|
|
2303
|
-
*
|
|
2344
|
+
* Маска поля ввода БИК.
|
|
2304
2345
|
*/
|
|
2305
|
-
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
ScContragentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScContragentsAccordionComponent] });
|
|
2309
|
-
ScContragentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
|
|
2310
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, decorators: [{
|
|
2311
|
-
type: NgModule,
|
|
2312
|
-
args: [{
|
|
2313
|
-
declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent],
|
|
2314
|
-
imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
|
|
2315
|
-
exports: [ScContragentsAccordionComponent],
|
|
2316
|
-
}]
|
|
2317
|
-
}] });
|
|
2346
|
+
const scBicMask = {
|
|
2347
|
+
mask: /^\d{0,9}$/
|
|
2348
|
+
};
|
|
2318
2349
|
|
|
2319
2350
|
/**
|
|
2320
|
-
*
|
|
2351
|
+
* Маска поля ввода номера корреспондентского счета.
|
|
2321
2352
|
*/
|
|
2322
|
-
|
|
2353
|
+
const scCorrespondentAccount = {
|
|
2354
|
+
mask: /^\d{0,20}$/
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Компонент подсказок для поля ввода.
|
|
2359
|
+
*/
|
|
2360
|
+
class ScSuggestionFieldComponent {
|
|
2323
2361
|
/**
|
|
2324
|
-
* Инициализирует экземпляр класса {@link
|
|
2362
|
+
* Инициализирует экземпляр класса {@link ScSuggestionFieldComponent}.
|
|
2325
2363
|
*
|
|
2326
|
-
* @param
|
|
2364
|
+
* @param control Контрол поля ввода.
|
|
2365
|
+
* @param suggestionService Сервис работы с API подсказок.
|
|
2327
2366
|
*/
|
|
2328
|
-
constructor(
|
|
2329
|
-
this.
|
|
2367
|
+
constructor(control, suggestionService) {
|
|
2368
|
+
this.control = control;
|
|
2369
|
+
this.suggestionService = suggestionService;
|
|
2330
2370
|
/**
|
|
2331
|
-
*
|
|
2371
|
+
* Тип подсказок.
|
|
2332
2372
|
*/
|
|
2333
|
-
this.
|
|
2373
|
+
this.type = ScISuggestionType.fio;
|
|
2374
|
+
/**
|
|
2375
|
+
* Перечисление типов подсказок.
|
|
2376
|
+
*/
|
|
2377
|
+
this.suggestionType = ScISuggestionType;
|
|
2334
2378
|
}
|
|
2335
2379
|
/** @inheritDoc */
|
|
2336
2380
|
ngOnInit() {
|
|
2337
|
-
|
|
2381
|
+
const request$ = tuiControlValue(this.control).pipe(debounceTime(300), filter(tuiIsPresent), map((term) => term.trim()), filter((term) => term.length >= 3), switchMap((term) => this.suggestionService.getData(term, this.type).pipe(startWith(null))), catchError((error) => {
|
|
2382
|
+
const errorResponse = error.error;
|
|
2383
|
+
if (this.control.control) {
|
|
2384
|
+
tuiMarkControlAsTouchedAndValidate(this.control.control);
|
|
2385
|
+
this.control.control.setErrors({
|
|
2386
|
+
serverResponse: [errorResponse.message || 'Ошибка сервера: пожалуйста, перезагрузите страницу и/или выполните запрос позже.']
|
|
2387
|
+
});
|
|
2388
|
+
}
|
|
2389
|
+
return throwError(() => of([]));
|
|
2390
|
+
}), share());
|
|
2391
|
+
this.suggestions$ = request$?.pipe(filter(tuiIsPresent), startWith(null));
|
|
2392
|
+
this.loading$ = request$.pipe(map(tuiIsFalsy));
|
|
2393
|
+
}
|
|
2394
|
+
/**
|
|
2395
|
+
* Заполнение полей основе выбранной подсказки.
|
|
2396
|
+
*
|
|
2397
|
+
* @param suggestion Объект подсказки.
|
|
2398
|
+
*/
|
|
2399
|
+
onSelected(suggestion) {
|
|
2400
|
+
switch (this.type) {
|
|
2401
|
+
case ScISuggestionType.fio:
|
|
2402
|
+
if ('fio' in suggestion) {
|
|
2403
|
+
this.control.control?.patchValue(suggestion.fio);
|
|
2404
|
+
}
|
|
2405
|
+
break;
|
|
2406
|
+
case ScISuggestionType.address:
|
|
2407
|
+
if ('addressString' in suggestion) {
|
|
2408
|
+
this.control.control?.patchValue(suggestion.addressString, { emitEvent: false });
|
|
2409
|
+
}
|
|
2410
|
+
break;
|
|
2411
|
+
case ScISuggestionType.bank:
|
|
2412
|
+
if ('inn' in suggestion && 'bic' in suggestion) {
|
|
2413
|
+
this.control.control?.parent?.patchValue({
|
|
2414
|
+
bankName: suggestion.name,
|
|
2415
|
+
bic: suggestion.bic,
|
|
2416
|
+
correspondentAccount: suggestion.correspondentAccount
|
|
2417
|
+
}, { emitEvent: false });
|
|
2418
|
+
}
|
|
2419
|
+
break;
|
|
2420
|
+
case ScISuggestionType.organization:
|
|
2421
|
+
if ('inn' in suggestion && !('bic' in suggestion)) {
|
|
2422
|
+
this.control.control?.parent?.patchValue({
|
|
2423
|
+
name: suggestion.name,
|
|
2424
|
+
inn: suggestion.inn,
|
|
2425
|
+
kpp: suggestion.kpp,
|
|
2426
|
+
okpo: suggestion.okpo,
|
|
2427
|
+
directorName: suggestion.directorName,
|
|
2428
|
+
directorPosition: suggestion.directorPosition,
|
|
2429
|
+
legalAddress: suggestion.legalAddress,
|
|
2430
|
+
postalAddress: suggestion.postalAddress,
|
|
2431
|
+
actualAddress: suggestion.actualAddress
|
|
2432
|
+
}, { emitEvent: false });
|
|
2433
|
+
}
|
|
2434
|
+
break;
|
|
2435
|
+
case ScISuggestionType.email:
|
|
2436
|
+
if ('email' in suggestion) {
|
|
2437
|
+
this.control.control?.patchValue(suggestion.email, { emitEvent: false });
|
|
2438
|
+
}
|
|
2439
|
+
break;
|
|
2440
|
+
}
|
|
2338
2441
|
}
|
|
2339
2442
|
}
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type:
|
|
2443
|
+
ScSuggestionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSuggestionFieldComponent, deps: [{ token: NgControl, skipSelf: true }, { token: i1.ScSuggestionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2444
|
+
ScSuggestionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: { type: "type" }, ngImport: i0, template: "<tui-loader size=\"m\" [overlay]=\"true\" [showLoader]=\"!!(loading$ | async)\">\n <tui-data-list *tuiLet=\"suggestions$ | async as options\">\n <button *ngFor=\"let option of options\" tuiOption (click)=\"onSelected(option)\" class=\"flex-col !items-start\">\n <ng-container *tuiLet=\"$any(option) as option\">\n <ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"suggestionType.fio\">\n <span class=\"text-tui-link\">{{ option.fio }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.organization\">\n <span class=\"text-tui-link\">\n {{ option.name }}\n <span class=\"ml-2 text-tui-text-02\">\u0438\u043D\u043D: {{ option.inn }}</span>\n </span>\n <span class=\"text-tui-text-02\">{{ option?.legalAddress }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.bank\">\n <span class=\"text-tui-link\">{{ option.name }}</span>\n <span class=\"text-tui-text-02\">{{ option.bic }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.email\">\n <span class=\"text-tui-link\">{{ option.email }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.address\">\n <span class=\"text-tui-link\">{{ option.addressString }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </button>\n </tui-data-list>\n</tui-loader>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { 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: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
2445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSuggestionFieldComponent, decorators: [{
|
|
2343
2446
|
type: Component,
|
|
2344
|
-
args: [{ selector: 'sc-
|
|
2345
|
-
}], ctorParameters: function () { return [{ type:
|
|
2447
|
+
args: [{ selector: 'sc-suggestion-field', template: "<tui-loader size=\"m\" [overlay]=\"true\" [showLoader]=\"!!(loading$ | async)\">\n <tui-data-list *tuiLet=\"suggestions$ | async as options\">\n <button *ngFor=\"let option of options\" tuiOption (click)=\"onSelected(option)\" class=\"flex-col !items-start\">\n <ng-container *tuiLet=\"$any(option) as option\">\n <ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"suggestionType.fio\">\n <span class=\"text-tui-link\">{{ option.fio }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.organization\">\n <span class=\"text-tui-link\">\n {{ option.name }}\n <span class=\"ml-2 text-tui-text-02\">\u0438\u043D\u043D: {{ option.inn }}</span>\n </span>\n <span class=\"text-tui-text-02\">{{ option?.legalAddress }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.bank\">\n <span class=\"text-tui-link\">{{ option.name }}</span>\n <span class=\"text-tui-text-02\">{{ option.bic }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.email\">\n <span class=\"text-tui-link\">{{ option.email }}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"suggestionType.address\">\n <span class=\"text-tui-link\">{{ option.addressString }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </button>\n </tui-data-list>\n</tui-loader>\n" }]
|
|
2448
|
+
}], ctorParameters: function () { return [{ type: i3.NgControl, decorators: [{
|
|
2449
|
+
type: SkipSelf
|
|
2450
|
+
}, {
|
|
2451
|
+
type: Inject,
|
|
2452
|
+
args: [NgControl]
|
|
2453
|
+
}] }, { type: i1.ScSuggestionService }]; }, propDecorators: { type: [{
|
|
2346
2454
|
type: Input
|
|
2347
|
-
}], editDeliveryAddressClick: [{
|
|
2348
|
-
type: Output
|
|
2349
2455
|
}] } });
|
|
2350
2456
|
|
|
2351
2457
|
/**
|
|
2352
|
-
* Компонент
|
|
2458
|
+
* Компонент формы банковских реквизитов.
|
|
2353
2459
|
*/
|
|
2354
|
-
class
|
|
2460
|
+
class ScNewContragentBankAccountsFormComponent {
|
|
2355
2461
|
/**
|
|
2356
|
-
* Инициализирует экземпляр класса {@link
|
|
2462
|
+
* Инициализирует экземпляр класса {@link ScContragentBankAccountsFormComponent}.
|
|
2357
2463
|
*
|
|
2358
|
-
* @param
|
|
2464
|
+
* @param referencesService Сервис справочников.
|
|
2359
2465
|
*/
|
|
2360
|
-
constructor(
|
|
2361
|
-
this.
|
|
2466
|
+
constructor(referencesService) {
|
|
2467
|
+
this.referencesService = referencesService;
|
|
2362
2468
|
/**
|
|
2363
|
-
*
|
|
2469
|
+
* Перечисление типов подсказок.
|
|
2364
2470
|
*/
|
|
2365
|
-
this.
|
|
2471
|
+
this.suggestionType = ScISuggestionType;
|
|
2366
2472
|
/**
|
|
2367
|
-
*
|
|
2473
|
+
* Маска поля ввода БИК.
|
|
2368
2474
|
*/
|
|
2369
|
-
this.
|
|
2475
|
+
this.bicMask = scBicMask;
|
|
2476
|
+
/**
|
|
2477
|
+
* Маска поля ввода номера счета.
|
|
2478
|
+
*/
|
|
2479
|
+
this.accountNumberMask = scAccountNumberMask;
|
|
2480
|
+
/**
|
|
2481
|
+
* Маска поля ввода номера корреспондентского счета.
|
|
2482
|
+
*/
|
|
2483
|
+
this.correspondentAccount = scCorrespondentAccount;
|
|
2484
|
+
/**
|
|
2485
|
+
* {@link Observable} списка валют.
|
|
2486
|
+
*/
|
|
2487
|
+
this.currencies$ = this.referencesService.currencies$;
|
|
2488
|
+
}
|
|
2489
|
+
/**
|
|
2490
|
+
* Возвращает {@link Observable} валюты по идентификатору.
|
|
2491
|
+
*
|
|
2492
|
+
* @param currencyId Идентификатор валюты.
|
|
2493
|
+
*/
|
|
2494
|
+
getCurrencyById$(currencyId) {
|
|
2495
|
+
return this.referencesService.getCurrencyById$(currencyId);
|
|
2370
2496
|
}
|
|
2371
2497
|
}
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type:
|
|
2498
|
+
ScNewContragentBankAccountsFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentBankAccountsFormComponent, deps: [{ token: i1.ScReferencesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2499
|
+
ScNewContragentBankAccountsFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: { form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\">\n <tui-input formControlName=\"bankName\">\n \u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bankName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0411\u0418\u041A\">\n <tui-input formControlName=\"bic\">\n \u0411\u0418\u041A\n <input tuiTextfield [maskito]=\"bicMask\" autocomplete=\"bic\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bic\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\">\n <tui-input formControlName=\"accountNumber\">\n \u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\n <input tuiTextfield [maskito]=\"accountNumberMask\" autocomplete=\"accountNumber\" />\n </tui-input>\n <tui-error formControlName=\"accountNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\">\n <tui-input formControlName=\"correspondentAccount\">\n \u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\n <input tuiTextfield [maskito]=\"correspondentAccount\" autocomplete=\"correspondentAccount\" />\n </tui-input>\n <tui-error formControlName=\"correspondentAccount\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\">\n <tui-select formControlName=\"currencyId\" [valueContent]=\"currencyContent\">\n \u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of currencies$ | async; let index = index\" tuiOption [value]=\"item.id\">{{ item.name }} ({{ item.symbol }})</button>\n </tui-data-list>\n </tui-select>\n <ng-template #currencyContent let-data>\n <div>{{ (getCurrencyById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"currencyId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "directive", type: i7.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "component", type: i6.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i6.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { kind: "component", type: i4.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScNewContragentBankAccountsFormComponent, decorators: [{
|
|
2375
2501
|
type: Component,
|
|
2376
|
-
args: [{ selector: 'sc-
|
|
2377
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
2378
|
-
type:
|
|
2502
|
+
args: [{ selector: 'sc-new-contragent-bank-account-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [formGroup]=\"form\" class=\"flex flex-col gap-3\">\n <label tuiLabel=\"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\">\n <tui-input formControlName=\"bankName\">\n \u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bankName\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0411\u0418\u041A\">\n <tui-input formControlName=\"bic\">\n \u0411\u0418\u041A\n <input tuiTextfield [maskito]=\"bicMask\" autocomplete=\"bic\" />\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.bank\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"bic\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\">\n <tui-input formControlName=\"accountNumber\">\n \u041D\u043E\u043C\u0435\u0440 \u0441\u0447\u0435\u0442\u0430\n <input tuiTextfield [maskito]=\"accountNumberMask\" autocomplete=\"accountNumber\" />\n </tui-input>\n <tui-error formControlName=\"accountNumber\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\">\n <tui-input formControlName=\"correspondentAccount\">\n \u041A\u043E\u0440\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0447\u0435\u0442\n <input tuiTextfield [maskito]=\"correspondentAccount\" autocomplete=\"correspondentAccount\" />\n </tui-input>\n <tui-error formControlName=\"correspondentAccount\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\">\n <tui-select formControlName=\"currencyId\" [valueContent]=\"currencyContent\">\n \u0412\u0430\u043B\u044E\u0442\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u043E\u0432\n <tui-data-list *tuiDataList>\n <button *ngFor=\"let item of currencies$ | async; let index = index\" tuiOption [value]=\"item.id\">{{ item.name }} ({{ item.symbol }})</button>\n </tui-data-list>\n </tui-select>\n <ng-template #currencyContent let-data>\n <div>{{ (getCurrencyById$(data) | async)?.name }}</div>\n </ng-template>\n <tui-error formControlName=\"currencyId\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n" }]
|
|
2503
|
+
}], ctorParameters: function () { return [{ type: i1.ScReferencesService }]; }, propDecorators: { form: [{
|
|
2504
|
+
type: Input
|
|
2379
2505
|
}] } });
|
|
2380
2506
|
|
|
2381
2507
|
/**
|
|
2382
|
-
*
|
|
2383
|
-
*/
|
|
2384
|
-
class ScDeliveryAddressModule {
|
|
2385
|
-
}
|
|
2386
|
-
ScDeliveryAddressModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2387
|
-
ScDeliveryAddressModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScDeliveryAddressAccordionComponent] });
|
|
2388
|
-
ScDeliveryAddressModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
|
|
2389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, decorators: [{
|
|
2390
|
-
type: NgModule,
|
|
2391
|
-
args: [{
|
|
2392
|
-
declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent],
|
|
2393
|
-
imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
|
|
2394
|
-
exports: [ScDeliveryAddressAccordionComponent],
|
|
2395
|
-
}]
|
|
2396
|
-
}] });
|
|
2397
|
-
|
|
2398
|
-
/**
|
|
2399
|
-
* Сервис работающий с значками элементов дерева.
|
|
2508
|
+
* Компонент поля ввода страны/региона/города.
|
|
2400
2509
|
*/
|
|
2401
|
-
class
|
|
2510
|
+
let ScAddressesSelectionFieldComponent = class ScAddressesSelectionFieldComponent {
|
|
2402
2511
|
/**
|
|
2403
|
-
*
|
|
2512
|
+
* Инициализирует экземпляр класса {@link ScAddressesSelectionFieldComponent}.
|
|
2404
2513
|
*
|
|
2405
|
-
* @param
|
|
2406
|
-
* @
|
|
2514
|
+
* @param formGroupDirective Директива c `FormGroup` из DOM.
|
|
2515
|
+
* @param locationsService Сервис для получения списков стран, регионов, городов.
|
|
2407
2516
|
*/
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2517
|
+
constructor(formGroupDirective, locationsService) {
|
|
2518
|
+
this.formGroupDirective = formGroupDirective;
|
|
2519
|
+
this.locationsService = locationsService;
|
|
2520
|
+
/**
|
|
2521
|
+
* FormControl для поля страны.
|
|
2522
|
+
*/
|
|
2523
|
+
this.countryControl = new FormControl({
|
|
2524
|
+
id: 3159,
|
|
2525
|
+
name: 'Россия'
|
|
2526
|
+
}, Validators.required);
|
|
2527
|
+
/**
|
|
2528
|
+
* FormControl для поля региона.
|
|
2529
|
+
*/
|
|
2530
|
+
this.regionControl = new FormControl(null, Validators.required);
|
|
2531
|
+
/**
|
|
2532
|
+
* FormControl для поля города.
|
|
2533
|
+
*/
|
|
2534
|
+
this.cityControl = new FormControl(null, Validators.required);
|
|
2535
|
+
/**
|
|
2536
|
+
* {@link Observable} изменения списка стран.
|
|
2537
|
+
*/
|
|
2538
|
+
this.countries$ = this.locationsService.getCountries$().pipe(share(), startWith(null));
|
|
2539
|
+
/**
|
|
2540
|
+
* {@link Observable} изменения списка регионов.
|
|
2541
|
+
*/
|
|
2542
|
+
this.regions$ = tuiControlValue(this.countryControl).pipe(filter(tuiIsPresent), switchMap((country) => this.locationsService.getRegions$(country.id).pipe(startWith(null))), share());
|
|
2543
|
+
/**
|
|
2544
|
+
* {@link Observable} изменения списка городов.
|
|
2545
|
+
*/
|
|
2546
|
+
this.cities$ = combineLatest({
|
|
2547
|
+
country: tuiControlValue(this.countryControl),
|
|
2548
|
+
region: tuiControlValue(this.regionControl)
|
|
2549
|
+
}).pipe(debounceTime(0), switchMap(({ country, region }) => country && region ? this.locationsService.getCities$(country.id, region.id).pipe(startWith(null)) : of([])), share());
|
|
2550
|
+
/**
|
|
2551
|
+
* Функция преобразования объекта сортировки в значение, отображаемое в поле ввода.
|
|
2552
|
+
*
|
|
2553
|
+
* @param item Выбранный объект выпадающего списка.
|
|
2554
|
+
*/
|
|
2555
|
+
this.stringify = (item) => `${item.name}`;
|
|
2556
|
+
}
|
|
2557
|
+
/**
|
|
2558
|
+
* `FormControl` поля идентификатора города.
|
|
2559
|
+
*/
|
|
2560
|
+
get cityIdControl() {
|
|
2561
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2562
|
+
return this.formGroupDirective.form.get('cityId');
|
|
2563
|
+
}
|
|
2564
|
+
/** @inheritDoc */
|
|
2565
|
+
ngOnInit() {
|
|
2566
|
+
if (this.cityIdControl.valid) {
|
|
2567
|
+
this.locationsService
|
|
2568
|
+
.getUserCity$(Number(this.cityIdControl?.value))
|
|
2569
|
+
.pipe(untilDestroyed(this))
|
|
2570
|
+
.subscribe((city) => {
|
|
2571
|
+
this.countryControl.patchValue(city?.region?.country ?? null);
|
|
2572
|
+
this.regionControl.patchValue(city?.region ?? null);
|
|
2573
|
+
this.cityControl.patchValue(city);
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2576
|
+
this.countryControl.valueChanges.pipe(untilDestroyed(this)).subscribe((country) => {
|
|
2577
|
+
this.regionControl.reset(null);
|
|
2578
|
+
this.cityControl.reset(null);
|
|
2579
|
+
country ? this.regionControl.enable() : this.regionControl.disable();
|
|
2580
|
+
this.cityControl.disable();
|
|
2581
|
+
});
|
|
2582
|
+
this.regionControl.valueChanges.pipe(untilDestroyed(this)).subscribe((region) => {
|
|
2583
|
+
this.cityControl.reset(null);
|
|
2584
|
+
this.cityIdControl.reset(null);
|
|
2585
|
+
region ? this.cityControl.enable() : this.cityControl.disable();
|
|
2586
|
+
});
|
|
2587
|
+
}
|
|
2588
|
+
/**
|
|
2589
|
+
* Заполнение полей банковских реквизитов на основе выбранной подсказки.
|
|
2590
|
+
*
|
|
2591
|
+
* @param suggestion Объект подсказки по банку.
|
|
2592
|
+
*/
|
|
2593
|
+
onSelectedCity(city) {
|
|
2594
|
+
if (this.cityIdControl) {
|
|
2595
|
+
this.cityIdControl.setValue(city?.id.toString() ?? null);
|
|
2596
|
+
tuiMarkControlAsTouchedAndValidate(this.cityIdControl);
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
};
|
|
2600
|
+
ScAddressesSelectionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddressesSelectionFieldComponent, deps: [{ token: FormGroupDirective, skipSelf: true }, { token: i1.ScLocationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2601
|
+
ScAddressesSelectionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field", ngImport: i0, template: "<div class=\"flex flex-col sm:flex-row gap-4 items-start\">\n <!-- TODO: \u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0438 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u0434\u043B\u044F \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <!-- <label tuiLabel=\"\u0421\u0442\u0440\u0430\u043D\u0430\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"countries$ | async as countries\" [formControl]=\"countryControl\" [stringify]=\"stringify\">\n \u0421\u0442\u0440\u0430\u043D\u0430\n <input tuiTextfield autocomplete=\"new-password\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"countries | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"countryControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label> -->\n <!-- TODO: [TASK:9383]: \u0414\u043E\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u0433\u043E\u0440\u043E\u0434\u0430, \u043A\u0430\u043A \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 -->\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u043E\u043D\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"regions$ | async as regions\" [formControl]=\"regionControl\" [stringify]=\"stringify\">\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"regions | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"regionControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0413\u043E\u0440\u043E\u0434\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"cities$ | async as cities\" [formControl]=\"cityControl\" [stringify]=\"stringify\" (ngModelChange)=\"onSelectedCity($event)\">\n \u0413\u043E\u0440\u043E\u0434\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"cities | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"cityIdControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n <tui-error *ngIf=\"cityIdControl.untouched\" [formControl]=\"cityControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i6.TuiComboBoxComponent, selector: "tui-combo-box", inputs: ["stringify", "strictMatcher", "identityMatcher", "valueContent", "strict", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i6.TuiComboBoxDirective, selector: "tui-combo-box" }, { kind: "component", type: i6.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "pipe", type: i6.TuiFilterByInputWithPipe, name: "tuiFilterByInputWith" }, { kind: "pipe", type: i6.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2602
|
+
ScAddressesSelectionFieldComponent = __decorate([
|
|
2603
|
+
UntilDestroy({ checkProperties: true })
|
|
2604
|
+
], ScAddressesSelectionFieldComponent);
|
|
2605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddressesSelectionFieldComponent, decorators: [{
|
|
2606
|
+
type: Component,
|
|
2607
|
+
args: [{ selector: 'sc-addresses-selection-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col sm:flex-row gap-4 items-start\">\n <!-- TODO: \u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0438 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0442\u0440\u0430\u043D\u044B \u0434\u043B\u044F \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <!-- <label tuiLabel=\"\u0421\u0442\u0440\u0430\u043D\u0430\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"countries$ | async as countries\" [formControl]=\"countryControl\" [stringify]=\"stringify\">\n \u0421\u0442\u0440\u0430\u043D\u0430\n <input tuiTextfield autocomplete=\"new-password\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"countries | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"countryControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label> -->\n <!-- TODO: [TASK:9383]: \u0414\u043E\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u0433\u043E\u0440\u043E\u0434\u0430, \u043A\u0430\u043A \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 -->\n <label tuiLabel=\"\u0420\u0435\u0433\u0438\u043E\u043D\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"regions$ | async as regions\" [formControl]=\"regionControl\" [stringify]=\"stringify\">\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"regions | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"regionControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u0413\u043E\u0440\u043E\u0434\" class=\"w-full\">\n <tui-combo-box *tuiLet=\"cities$ | async as cities\" [formControl]=\"cityControl\" [stringify]=\"stringify\" (ngModelChange)=\"onSelectedCity($event)\">\n \u0413\u043E\u0440\u043E\u0434\n <input tuiTextfield autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" />\n <tui-data-list-wrapper *tuiDataList [itemContent]=\"stringify | tuiStringifyContent\" [items]=\"cities | tuiFilterByInputWith: stringify\"></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error [formControl]=\"cityIdControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n <tui-error *ngIf=\"cityIdControl.untouched\" [formControl]=\"cityControl\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n</div>\n" }]
|
|
2608
|
+
}], ctorParameters: function () { return [{ type: i3.FormGroupDirective, decorators: [{
|
|
2609
|
+
type: SkipSelf
|
|
2610
|
+
}, {
|
|
2611
|
+
type: Inject,
|
|
2612
|
+
args: [FormGroupDirective]
|
|
2613
|
+
}] }, { type: i1.ScLocationsService }]; } });
|
|
2614
|
+
|
|
2615
|
+
/**
|
|
2616
|
+
* Модуль полей ввода.
|
|
2617
|
+
*/
|
|
2618
|
+
class ScFormFieldsModule {
|
|
2619
|
+
}
|
|
2620
|
+
ScFormFieldsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2621
|
+
ScFormFieldsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, declarations: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent], imports: [CommonModule,
|
|
2622
|
+
FormsModule,
|
|
2623
|
+
ReactiveFormsModule,
|
|
2624
|
+
TuiInputModule,
|
|
2625
|
+
TuiTextfieldControllerModule,
|
|
2626
|
+
TuiLabelModule,
|
|
2627
|
+
TuiLetModule,
|
|
2628
|
+
TuiFieldErrorPipeModule,
|
|
2629
|
+
TuiErrorModule,
|
|
2630
|
+
TuiDataListModule,
|
|
2631
|
+
TuiLoaderModule,
|
|
2632
|
+
TuiComboBoxModule,
|
|
2633
|
+
TuiDataListWrapperModule,
|
|
2634
|
+
TuiFilterByInputPipeModule,
|
|
2635
|
+
TuiStringifyContentPipeModule,
|
|
2636
|
+
TuiInputPhoneModule,
|
|
2637
|
+
TuiButtonModule,
|
|
2638
|
+
MaskitoModule], exports: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent] });
|
|
2639
|
+
ScFormFieldsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, imports: [CommonModule,
|
|
2640
|
+
FormsModule,
|
|
2641
|
+
ReactiveFormsModule,
|
|
2642
|
+
TuiInputModule,
|
|
2643
|
+
TuiTextfieldControllerModule,
|
|
2644
|
+
TuiLabelModule,
|
|
2645
|
+
TuiLetModule,
|
|
2646
|
+
TuiFieldErrorPipeModule,
|
|
2647
|
+
TuiErrorModule,
|
|
2648
|
+
TuiDataListModule,
|
|
2649
|
+
TuiLoaderModule,
|
|
2650
|
+
TuiComboBoxModule,
|
|
2651
|
+
TuiDataListWrapperModule,
|
|
2652
|
+
TuiFilterByInputPipeModule,
|
|
2653
|
+
TuiStringifyContentPipeModule,
|
|
2654
|
+
TuiInputPhoneModule,
|
|
2655
|
+
TuiButtonModule,
|
|
2656
|
+
MaskitoModule] });
|
|
2657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, decorators: [{
|
|
2658
|
+
type: NgModule,
|
|
2659
|
+
args: [{
|
|
2660
|
+
declarations: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent],
|
|
2661
|
+
imports: [
|
|
2662
|
+
CommonModule,
|
|
2663
|
+
FormsModule,
|
|
2664
|
+
ReactiveFormsModule,
|
|
2665
|
+
TuiInputModule,
|
|
2666
|
+
TuiTextfieldControllerModule,
|
|
2667
|
+
TuiLabelModule,
|
|
2668
|
+
TuiLetModule,
|
|
2669
|
+
TuiFieldErrorPipeModule,
|
|
2670
|
+
TuiErrorModule,
|
|
2671
|
+
TuiDataListModule,
|
|
2672
|
+
TuiLoaderModule,
|
|
2673
|
+
TuiComboBoxModule,
|
|
2674
|
+
TuiDataListWrapperModule,
|
|
2675
|
+
TuiFilterByInputPipeModule,
|
|
2676
|
+
TuiStringifyContentPipeModule,
|
|
2677
|
+
TuiInputPhoneModule,
|
|
2678
|
+
TuiButtonModule,
|
|
2679
|
+
MaskitoModule
|
|
2680
|
+
],
|
|
2681
|
+
exports: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent]
|
|
2682
|
+
}]
|
|
2683
|
+
}] });
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Компонент формы создания нового банковского счета контрагента.
|
|
2687
|
+
*/
|
|
2688
|
+
class ScAddContragentBankAccountsDialogComponent {
|
|
2689
|
+
/**
|
|
2690
|
+
* Инициализирует экземпляр класса {@link ScAddContragentBankAccountsFormComponent}.
|
|
2691
|
+
*
|
|
2692
|
+
* @param contragentService Сервис работы с контрагентами.
|
|
2693
|
+
* @param context Контекст диалогового окна, в котором открыт компонент.
|
|
2694
|
+
*/
|
|
2695
|
+
constructor(contragentService, context) {
|
|
2696
|
+
this.contragentService = contragentService;
|
|
2697
|
+
this.context = context;
|
|
2698
|
+
/**
|
|
2699
|
+
* Группа с полем банковских реквизитов.
|
|
2700
|
+
*/
|
|
2701
|
+
this.form = new FormGroup({
|
|
2702
|
+
bankName: new FormControl(null, Validators.required),
|
|
2703
|
+
bic: new FormControl(null, [Validators.required, Validators.minLength(9), scBicValidator]),
|
|
2704
|
+
accountNumber: new FormControl(null, [Validators.required, Validators.minLength(20)]),
|
|
2705
|
+
correspondentAccount: new FormControl(null, [Validators.required, Validators.minLength(20), scCorrespondentAccountValidator]),
|
|
2706
|
+
currencyId: new FormControl(null, Validators.required)
|
|
2707
|
+
});
|
|
2708
|
+
/**
|
|
2709
|
+
* {@link Subject} события отправки формы.
|
|
2710
|
+
*/
|
|
2711
|
+
this.onSubmit = new Subject();
|
|
2712
|
+
/**
|
|
2713
|
+
* {@link Observable} запроса данных аутентификации.
|
|
2714
|
+
*/
|
|
2715
|
+
this.request$ = this.onSubmit.pipe(map(() => this.form.value), tap((i) => console.log(i)), filter((value) => this.form.valid), switchMap((value) => {
|
|
2716
|
+
console.log(this.context.data.contragentId);
|
|
2717
|
+
return this.contragentService.createContragentBankAccount$(this.context.data.contragentId, value).pipe(tap((bankAccount) => this.context?.completeWith(bankAccount)), catchError((error) => {
|
|
2718
|
+
tuiMarkControlAsTouchedAndValidate(this.form);
|
|
2719
|
+
const errorResponse = error.error;
|
|
2720
|
+
for (const key in errorResponse.errors) {
|
|
2721
|
+
this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
|
|
2722
|
+
}
|
|
2723
|
+
if (!errorResponse.errors && errorResponse.message) {
|
|
2724
|
+
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
|
2725
|
+
}
|
|
2726
|
+
return of({});
|
|
2727
|
+
}), startWith(null));
|
|
2728
|
+
}), share());
|
|
2729
|
+
/**
|
|
2730
|
+
* {@link Observable} изменения состояния загрузки данных аутентификации по номеру телефона.
|
|
2731
|
+
*/
|
|
2732
|
+
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
ScAddContragentBankAccountsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, deps: [{ token: i1.ScContragentService }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
|
|
2736
|
+
ScAddContragentBankAccountsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAddContragentBankAccountsDialogComponent, selector: "sc-add-contragent-bank-account-dialog", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddContragentBankAccountsDialogComponent, decorators: [{
|
|
2738
|
+
type: Component,
|
|
2739
|
+
args: [{ selector: 'sc-add-contragent-bank-account-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-3\">\n <sc-new-contragent-bank-account-form [form]=\"form\"></sc-new-contragent-bank-account-form>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context.$implicit.complete()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>" }]
|
|
2740
|
+
}], ctorParameters: function () { return [{ type: i1.ScContragentService }, { type: undefined, decorators: [{
|
|
2741
|
+
type: Inject,
|
|
2742
|
+
args: [POLYMORPHEUS_CONTEXT]
|
|
2743
|
+
}] }]; } });
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Модуль контактных лиц.
|
|
2747
|
+
*/
|
|
2748
|
+
class ScContactsModule {
|
|
2749
|
+
}
|
|
2750
|
+
ScContactsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2751
|
+
ScContactsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, declarations: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent], imports: [CommonModule,
|
|
2752
|
+
FormsModule,
|
|
2753
|
+
ReactiveFormsModule,
|
|
2754
|
+
ScAccordionModule,
|
|
2755
|
+
TuiButtonModule,
|
|
2756
|
+
TuiModeModule,
|
|
2757
|
+
TuiLoaderModule,
|
|
2758
|
+
TuiLetModule,
|
|
2759
|
+
TuiNotificationModule,
|
|
2760
|
+
TuiLinkModule,
|
|
2761
|
+
TuiFormatPhonePipeModule,
|
|
2762
|
+
ScFormFieldsModule,
|
|
2763
|
+
MaskitoModule,
|
|
2764
|
+
TuiFieldErrorPipeModule,
|
|
2765
|
+
TuiSelectModule,
|
|
2766
|
+
TuiDataListModule,
|
|
2767
|
+
TuiDataListWrapperModule,
|
|
2768
|
+
TuiLabelModule,
|
|
2769
|
+
TuiInputModule,
|
|
2770
|
+
TuiInputPhoneModule,
|
|
2771
|
+
TuiErrorModule], exports: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent] });
|
|
2772
|
+
ScContactsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, imports: [CommonModule,
|
|
2773
|
+
FormsModule,
|
|
2774
|
+
ReactiveFormsModule,
|
|
2775
|
+
ScAccordionModule,
|
|
2776
|
+
TuiButtonModule,
|
|
2777
|
+
TuiModeModule,
|
|
2778
|
+
TuiLoaderModule,
|
|
2779
|
+
TuiLetModule,
|
|
2780
|
+
TuiNotificationModule,
|
|
2781
|
+
TuiLinkModule,
|
|
2782
|
+
TuiFormatPhonePipeModule,
|
|
2783
|
+
ScFormFieldsModule,
|
|
2784
|
+
MaskitoModule,
|
|
2785
|
+
TuiFieldErrorPipeModule,
|
|
2786
|
+
TuiSelectModule,
|
|
2787
|
+
TuiDataListModule,
|
|
2788
|
+
TuiDataListWrapperModule,
|
|
2789
|
+
TuiLabelModule,
|
|
2790
|
+
TuiInputModule,
|
|
2791
|
+
TuiInputPhoneModule,
|
|
2792
|
+
TuiErrorModule] });
|
|
2793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContactsModule, decorators: [{
|
|
2794
|
+
type: NgModule,
|
|
2795
|
+
args: [{
|
|
2796
|
+
declarations: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent],
|
|
2797
|
+
imports: [
|
|
2798
|
+
CommonModule,
|
|
2799
|
+
FormsModule,
|
|
2800
|
+
ReactiveFormsModule,
|
|
2801
|
+
ScAccordionModule,
|
|
2802
|
+
TuiButtonModule,
|
|
2803
|
+
TuiModeModule,
|
|
2804
|
+
TuiLoaderModule,
|
|
2805
|
+
TuiLetModule,
|
|
2806
|
+
TuiNotificationModule,
|
|
2807
|
+
TuiLinkModule,
|
|
2808
|
+
TuiFormatPhonePipeModule,
|
|
2809
|
+
ScFormFieldsModule,
|
|
2810
|
+
MaskitoModule,
|
|
2811
|
+
TuiFieldErrorPipeModule,
|
|
2812
|
+
TuiSelectModule,
|
|
2813
|
+
TuiDataListModule,
|
|
2814
|
+
TuiDataListWrapperModule,
|
|
2815
|
+
TuiLabelModule,
|
|
2816
|
+
TuiInputModule,
|
|
2817
|
+
TuiInputPhoneModule,
|
|
2818
|
+
TuiErrorModule
|
|
2819
|
+
],
|
|
2820
|
+
exports: [ScContactsAccordionComponent, ScNewContragentBankAccountsFormComponent, ScAddContragentBankAccountsDialogComponent]
|
|
2821
|
+
}]
|
|
2822
|
+
}] });
|
|
2823
|
+
|
|
2824
|
+
/**
|
|
2825
|
+
* Модуль для отображение контента разделами, с возможностью скрывать и отображать содержимое.
|
|
2826
|
+
*/
|
|
2827
|
+
class ScContragentsModule {
|
|
2828
|
+
}
|
|
2829
|
+
ScContragentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2830
|
+
ScContragentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScContragentsAccordionComponent] });
|
|
2831
|
+
ScContragentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
|
|
2832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScContragentsModule, decorators: [{
|
|
2833
|
+
type: NgModule,
|
|
2834
|
+
args: [{
|
|
2835
|
+
declarations: [ScContragentsAccordionComponent, ScContragentsAccordionItemComponent],
|
|
2836
|
+
imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
|
|
2837
|
+
exports: [ScContragentsAccordionComponent]
|
|
2838
|
+
}]
|
|
2839
|
+
}] });
|
|
2840
|
+
|
|
2841
|
+
/**
|
|
2842
|
+
* Компонент адреса доставки.
|
|
2843
|
+
*/
|
|
2844
|
+
class ScDeliveryAddressAccordionItemComponent {
|
|
2845
|
+
/**
|
|
2846
|
+
* Инициализирует экземпляр класса {@link ScDeliveryAddressAccordionItemComponent}.
|
|
2847
|
+
*
|
|
2848
|
+
* @param deliveryAddressService Сервис работы с адресами доставки.
|
|
2849
|
+
*/
|
|
2850
|
+
constructor(deliveryAddressService) {
|
|
2851
|
+
this.deliveryAddressService = deliveryAddressService;
|
|
2852
|
+
/**
|
|
2853
|
+
* Событие нажатия на кнопку редактирования контрагента.
|
|
2854
|
+
*/
|
|
2855
|
+
this.editDeliveryAddressClick = new EventEmitter();
|
|
2856
|
+
}
|
|
2857
|
+
/** @inheritDoc */
|
|
2858
|
+
ngOnInit() {
|
|
2859
|
+
this.contacts$ = this.deliveryAddressService.getDeliveryAddressContacts$(this.deliveryAddress.id);
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
ScDeliveryAddressAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionItemComponent, deps: [{ token: i1.ScDeliveryAddressService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2863
|
+
ScDeliveryAddressAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: { deliveryAddress: "deliveryAddress" }, outputs: { editDeliveryAddressClick: "editDeliveryAddressClick" }, ngImport: i0, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"$event.stopPropagation();\"></button>\n </div>\n\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScContactsAccordionComponent, selector: "sc-contacts-accordion", inputs: ["contacts$"], outputs: ["addContactClick", "editContactClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionItemComponent, decorators: [{
|
|
2865
|
+
type: Component,
|
|
2866
|
+
args: [{ selector: 'sc-delivery-address-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion [showAddButton]=\"false\">\n {{ deliveryAddress.address }}\n\n <ng-template scAccordionContent>\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-col gap-2 grow\">\n <span> \u0410\u0434\u0440\u0435\u0441: {{ deliveryAddress.address }} </span>\n <span *ngIf=\"deliveryAddress.comment\"> \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439: {{ deliveryAddress.comment }} </span>\n </div>\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"$event.stopPropagation();\"></button>\n </div>\n\n <sc-contacts-accordion *ngIf=\"contacts$\" [contacts$]=\"contacts$\"></sc-contacts-accordion>\n </div>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2867
|
+
}], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }]; }, propDecorators: { deliveryAddress: [{
|
|
2868
|
+
type: Input
|
|
2869
|
+
}], editDeliveryAddressClick: [{
|
|
2870
|
+
type: Output
|
|
2871
|
+
}] } });
|
|
2872
|
+
|
|
2873
|
+
/**
|
|
2874
|
+
* Компонент адресов доставки.
|
|
2875
|
+
*/
|
|
2876
|
+
class ScDeliveryAddressAccordionComponent {
|
|
2877
|
+
/**
|
|
2878
|
+
* Инициализирует экземпляр класса {@link ScDeliveryAddressAccordionComponent}.
|
|
2879
|
+
*
|
|
2880
|
+
* @param deliveryAddressService Сервис работы с адресами доставки.
|
|
2881
|
+
*/
|
|
2882
|
+
constructor(deliveryAddressService) {
|
|
2883
|
+
this.deliveryAddressService = deliveryAddressService;
|
|
2884
|
+
/**
|
|
2885
|
+
* {@link Observable} данных адресов доставки.
|
|
2886
|
+
*/
|
|
2887
|
+
this.deliveryAddress$ = this.deliveryAddressService.deliveryAddresses$;
|
|
2888
|
+
/**
|
|
2889
|
+
* Событие нажатия на кнопку добавления адреса доставки клиента.
|
|
2890
|
+
*/
|
|
2891
|
+
this.addDeliveryAddressClick = new EventEmitter();
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
ScDeliveryAddressAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionComponent, deps: [{ token: i1.ScDeliveryAddressService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2895
|
+
ScDeliveryAddressAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: { addDeliveryAddressClick: "addDeliveryAddressClick" }, ngImport: i0, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item *ngFor=\"let address of deliveryAddress\" [deliveryAddress]=\"address\"></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addDeliveryAddressClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }, { kind: "component", type: ScDeliveryAddressAccordionItemComponent, selector: "sc-delivery-address-accordion-item", inputs: ["deliveryAddress"], outputs: ["editDeliveryAddressClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressAccordionComponent, decorators: [{
|
|
2897
|
+
type: Component,
|
|
2898
|
+
args: [{ selector: 'sc-delivery-address-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sc-accordion (addButtonClick)=\"addDeliveryAddressClick.emit()\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"deliveryAddress$ | async as deliveryAddress\" [overlay]=\"true\" [showLoader]=\"deliveryAddress === null\">\n <div class=\"flex flex-col gap-2\">\n <ng-container *ngIf=\"!deliveryAddress || deliveryAddress.length; else contragentsNotExist\">\n <sc-delivery-address-accordion-item *ngFor=\"let address of deliveryAddress\" [deliveryAddress]=\"address\"></sc-delivery-address-accordion-item>\n </ng-container>\n\n <ng-template #contragentsNotExist>\n <tui-notification size=\"l\">\n <div class=\"flex flex-wrap gap-2 font-medium\">\n \u0410\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u044B.\n <button tuiButton size=\"s\" icon=\"tuiIconPlusLarge\" (click)=\"addDeliveryAddressClick.emit()\">\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C</button>\n </div>\n </tui-notification>\n </ng-template>\n </div>\n </tui-loader>\n </ng-template>\n</sc-accordion>\n" }]
|
|
2899
|
+
}], ctorParameters: function () { return [{ type: i1.ScDeliveryAddressService }]; }, propDecorators: { addDeliveryAddressClick: [{
|
|
2900
|
+
type: Output
|
|
2901
|
+
}] } });
|
|
2902
|
+
|
|
2903
|
+
/**
|
|
2904
|
+
* Модуль для отображение адресов доставки разделами, с возможностью скрывать и отображать содержимое.
|
|
2905
|
+
*/
|
|
2906
|
+
class ScDeliveryAddressModule {
|
|
2907
|
+
}
|
|
2908
|
+
ScDeliveryAddressModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2909
|
+
ScDeliveryAddressModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent], imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule], exports: [ScDeliveryAddressAccordionComponent] });
|
|
2910
|
+
ScDeliveryAddressModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule] });
|
|
2911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScDeliveryAddressModule, decorators: [{
|
|
2912
|
+
type: NgModule,
|
|
2913
|
+
args: [{
|
|
2914
|
+
declarations: [ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent],
|
|
2915
|
+
imports: [CommonModule, ScAccordionModule, TuiButtonModule, TuiModeModule, TuiLoaderModule, TuiLetModule, TuiNotificationModule, ScContactsModule],
|
|
2916
|
+
exports: [ScDeliveryAddressAccordionComponent]
|
|
2917
|
+
}]
|
|
2918
|
+
}] });
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* Сервис работающий с значками элементов дерева.
|
|
2922
|
+
*/
|
|
2923
|
+
class TreeIconService {
|
|
2924
|
+
/**
|
|
2925
|
+
* Назначает значок элементу дерева в зависимости от типа файла.
|
|
2926
|
+
*
|
|
2927
|
+
* @param info Объект пришедших данных о файле.
|
|
2928
|
+
* @returns Возвращает название значка в виде строки.
|
|
2929
|
+
*/
|
|
2930
|
+
getIconName(info) {
|
|
2931
|
+
switch (info.icon) {
|
|
2932
|
+
case ScIconTypesEnum.iconImage:
|
|
2933
|
+
return 'tuiIconImageLarge';
|
|
2934
|
+
case ScIconTypesEnum.iconPdfFile:
|
|
2935
|
+
return 'scIconPdfFile';
|
|
2936
|
+
case ScIconTypesEnum.iconWordFile:
|
|
2937
|
+
return 'scIconWordFile';
|
|
2938
|
+
case ScIconTypesEnum.iconExcelFile:
|
|
2939
|
+
return 'scIconExcelFile';
|
|
2940
|
+
case ScIconTypesEnum.iconFolder:
|
|
2941
|
+
return 'scIconFolder';
|
|
2942
|
+
default:
|
|
2943
|
+
return 'scIconFile';
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
/**
|
|
2425
2947
|
* Проверяет на признак наличия дочерних элементов.
|
|
2426
2948
|
*
|
|
2427
2949
|
* @param info Объект пришедших данных о файле.
|
|
2428
|
-
* @returns Возвращает true при наличии дочерних элементов и false при их
|
|
2950
|
+
* @returns Возвращает true при наличии дочерних элементов и false при их отсутствии.
|
|
2429
2951
|
*/
|
|
2430
2952
|
hasChildren(info) {
|
|
2431
2953
|
return info.type === 'dir';
|
|
@@ -2436,7 +2958,7 @@ TreeIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", vers
|
|
|
2436
2958
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeIconService, decorators: [{
|
|
2437
2959
|
type: Injectable,
|
|
2438
2960
|
args: [{
|
|
2439
|
-
providedIn: 'root'
|
|
2961
|
+
providedIn: 'root'
|
|
2440
2962
|
}]
|
|
2441
2963
|
}] });
|
|
2442
2964
|
|
|
@@ -2485,7 +3007,7 @@ class TreeLoaderService {
|
|
|
2485
3007
|
hasChildren: this.iconService.hasChildren(item),
|
|
2486
3008
|
createdAt: item.createdAt,
|
|
2487
3009
|
id: item.id,
|
|
2488
|
-
link: item.link
|
|
3010
|
+
link: item.link
|
|
2489
3011
|
}))));
|
|
2490
3012
|
}
|
|
2491
3013
|
}
|
|
@@ -2527,16 +3049,16 @@ class TreeDirective {
|
|
|
2527
3049
|
this.service.loadChildren(node);
|
|
2528
3050
|
}
|
|
2529
3051
|
}
|
|
2530
|
-
TreeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, deps: [{ token:
|
|
3052
|
+
TreeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, deps: [{ token: i6.TuiTreeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2531
3053
|
TreeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TreeDirective, selector: "[scTree]", providers: [TuiTreeService], exportAs: ["scTree"], ngImport: i0 });
|
|
2532
3054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeDirective, decorators: [{
|
|
2533
3055
|
type: Directive,
|
|
2534
3056
|
args: [{
|
|
2535
3057
|
selector: '[scTree]',
|
|
2536
3058
|
exportAs: 'scTree',
|
|
2537
|
-
providers: [TuiTreeService]
|
|
3059
|
+
providers: [TuiTreeService]
|
|
2538
3060
|
}]
|
|
2539
|
-
}], ctorParameters: function () { return [{ type:
|
|
3061
|
+
}], ctorParameters: function () { return [{ type: i6.TuiTreeService }]; } });
|
|
2540
3062
|
|
|
2541
3063
|
/**
|
|
2542
3064
|
* Компонент для удаления стандартного значка элемента дерева.
|
|
@@ -2548,7 +3070,7 @@ FileTreeItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
2548
3070
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileTreeItemComponent, decorators: [{
|
|
2549
3071
|
type: Component,
|
|
2550
3072
|
args: [{ selector: 'sc-file-tree-item', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2551
|
-
'(click)':
|
|
3073
|
+
'(click)': 'onClick()'
|
|
2552
3074
|
}, template: "<ng-container [ngTemplateOutlet]=\"context.template\"></ng-container>\n", styles: [":host{position:relative;min-height:var(--tui-height-s);display:flex;align-items:center;padding:.5rem;margin:.5rem 0;border-radius:12px;background:var(--tui-base-03)}:host._expandable:hover{cursor:pointer;background:var(--tui-base-03)}tui-svg{position:relative;background:inherit;z-index:1}\n"] }]
|
|
2553
3075
|
}] });
|
|
2554
3076
|
|
|
@@ -2568,12 +3090,12 @@ TreeTopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version
|
|
|
2568
3090
|
TreeTopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TreeTopDirective, selector: "[scTopNodeText]", inputs: { text: ["scTopNodeText", "text"], icon: ["scTopNodeIcon", "icon"], link: ["scTopNodeLink", "link"], hasChildren: ["scTopNodeChilds", "hasChildren"], id: ["scTopNodeParent", "id"], createdAt: ["scTopNodeDate", "createdAt"] }, providers: [
|
|
2569
3091
|
{
|
|
2570
3092
|
provide: TUI_TREE_START,
|
|
2571
|
-
useExisting: forwardRef(() => TreeTopDirective)
|
|
3093
|
+
useExisting: forwardRef(() => TreeTopDirective)
|
|
2572
3094
|
},
|
|
2573
3095
|
{
|
|
2574
3096
|
provide: TUI_TREE_CONTENT,
|
|
2575
|
-
useValue: new PolymorpheusComponent(FileTreeItemComponent)
|
|
2576
|
-
}
|
|
3097
|
+
useValue: new PolymorpheusComponent(FileTreeItemComponent)
|
|
3098
|
+
}
|
|
2577
3099
|
], ngImport: i0 });
|
|
2578
3100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeTopDirective, decorators: [{
|
|
2579
3101
|
type: Directive,
|
|
@@ -2582,13 +3104,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2582
3104
|
providers: [
|
|
2583
3105
|
{
|
|
2584
3106
|
provide: TUI_TREE_START,
|
|
2585
|
-
useExisting: forwardRef(() => TreeTopDirective)
|
|
3107
|
+
useExisting: forwardRef(() => TreeTopDirective)
|
|
2586
3108
|
},
|
|
2587
3109
|
{
|
|
2588
3110
|
provide: TUI_TREE_CONTENT,
|
|
2589
|
-
useValue: new PolymorpheusComponent(FileTreeItemComponent)
|
|
2590
|
-
}
|
|
2591
|
-
]
|
|
3111
|
+
useValue: new PolymorpheusComponent(FileTreeItemComponent)
|
|
3112
|
+
}
|
|
3113
|
+
]
|
|
2592
3114
|
}]
|
|
2593
3115
|
}], propDecorators: { text: [{
|
|
2594
3116
|
type: Input,
|
|
@@ -2634,7 +3156,7 @@ class FilesAndDocumentsComponent {
|
|
|
2634
3156
|
hasChildren: this.iconService.hasChildren(item),
|
|
2635
3157
|
createdAt: item.createdAt,
|
|
2636
3158
|
id: item.id,
|
|
2637
|
-
link: item.link
|
|
3159
|
+
link: item.link
|
|
2638
3160
|
}))));
|
|
2639
3161
|
}
|
|
2640
3162
|
}
|
|
@@ -2642,16 +3164,16 @@ FilesAndDocumentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0
|
|
|
2642
3164
|
FilesAndDocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FilesAndDocumentsComponent, selector: "sc-files-and-documents", providers: [
|
|
2643
3165
|
{
|
|
2644
3166
|
provide: TUI_TREE_LOADER,
|
|
2645
|
-
useClass: TreeLoaderService
|
|
2646
|
-
}
|
|
2647
|
-
], ngImport: i0, template: "<ng-container *ngIf=\"data$ | async as data; else skeleton\">\n <tui-tree\n *ngFor=\"let node of data\"\n #tree=\"scTree\"\n scTree\n [scTopNodeText]=\"node.text\"\n [scTopNodeIcon]=\"node.icon\"\n [scTopNodeLink]=\"node.link\"\n [scTopNodeChilds]=\"node.hasChildren\"\n [scTopNodeParent]=\"node.id\"\n [scTopNodeDate]=\"node.createdAt\"\n [childrenHandler]=\"tree.childrenHandler\"\n [content]=\"content\"\n [map]=\"tree.map\"\n [tuiTreeController]=\"false\"\n [value]=\"tree.service.data$ | async\"\n (toggled)=\"tree.onToggled($event)\"\n class=\"overflow-hidden\"\n ></tui-tree>\n</ng-container>\n\n<ng-template #content let-item>\n <tui-loader *ngIf=\"item === loading; else text\" class=\"w-8 my-4\"></tui-loader>\n <ng-template #text>\n <tui-svg [src]=\"item.icon\" class=\"tui-space_right-2\"></tui-svg>\n <a tuiLink [pseudo]=\"true\" *ngIf=\"item.link\" href=\"{{ item.link }}\" class=\"grow\">{{ item.text }}</a>\n <p *ngIf=\"!item.link\" class=\"grow\">{{ item.text }}</p>\n <p>{{ item.createdAt }}</p>\n </ng-template>\n</ng-template>\n\n<ng-template #skeleton>\n <div class=\"flex flex-col gap-2\">\n <div *ngFor=\"let _ of [].constructor(7)\" class=\"flex items-center gap-2\">\n <div class=\"tui-skeleton h-6 w-6\"></div>\n <div class=\"tui-skeleton h-4 w-40\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
3167
|
+
useClass: TreeLoaderService
|
|
3168
|
+
}
|
|
3169
|
+
], ngImport: i0, template: "<ng-container *ngIf=\"data$ | async as data; else skeleton\">\n <tui-tree\n *ngFor=\"let node of data\"\n #tree=\"scTree\"\n scTree\n [scTopNodeText]=\"node.text\"\n [scTopNodeIcon]=\"node.icon\"\n [scTopNodeLink]=\"node.link\"\n [scTopNodeChilds]=\"node.hasChildren\"\n [scTopNodeParent]=\"node.id\"\n [scTopNodeDate]=\"node.createdAt\"\n [childrenHandler]=\"tree.childrenHandler\"\n [content]=\"content\"\n [map]=\"tree.map\"\n [tuiTreeController]=\"false\"\n [value]=\"tree.service.data$ | async\"\n (toggled)=\"tree.onToggled($event)\"\n class=\"overflow-hidden\"\n ></tui-tree>\n</ng-container>\n\n<ng-template #content let-item>\n <tui-loader *ngIf=\"item === loading; else text\" class=\"w-8 my-4\"></tui-loader>\n <ng-template #text>\n <tui-svg [src]=\"item.icon\" class=\"tui-space_right-2\"></tui-svg>\n <a tuiLink [pseudo]=\"true\" *ngIf=\"item.link\" href=\"{{ item.link }}\" class=\"grow\">{{ item.text }}</a>\n <p *ngIf=\"!item.link\" class=\"grow\">{{ item.text }}</p>\n <p>{{ item.createdAt }}</p>\n </ng-template>\n</ng-template>\n\n<ng-template #skeleton>\n <div class=\"flex flex-col gap-2\">\n <div *ngFor=\"let _ of [].constructor(7)\" class=\"flex items-center gap-2\">\n <div class=\"tui-skeleton h-6 w-6\"></div>\n <div class=\"tui-skeleton h-4 w-40\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.TuiTreeComponent, selector: "tui-tree[value]", inputs: ["value", "trackBy", "content"] }, { kind: "directive", type: i6.TuiTreeChildrenDirective, selector: "tui-tree[childrenHandler]", inputs: ["childrenHandler"] }, { kind: "directive", type: i6.TuiTreeControllerDirective, selector: "[tuiTreeController][map]", inputs: ["tuiTreeController", "map"], outputs: ["toggled"], exportAs: ["tuiTreeController"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: TreeDirective, selector: "[scTree]", exportAs: ["scTree"] }, { kind: "directive", type: TreeTopDirective, selector: "[scTopNodeText]", inputs: ["scTopNodeText", "scTopNodeIcon", "scTopNodeLink", "scTopNodeChilds", "scTopNodeParent", "scTopNodeDate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2648
3170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilesAndDocumentsComponent, decorators: [{
|
|
2649
3171
|
type: Component,
|
|
2650
3172
|
args: [{ selector: 'sc-files-and-documents', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2651
3173
|
{
|
|
2652
3174
|
provide: TUI_TREE_LOADER,
|
|
2653
|
-
useClass: TreeLoaderService
|
|
2654
|
-
}
|
|
3175
|
+
useClass: TreeLoaderService
|
|
3176
|
+
}
|
|
2655
3177
|
], template: "<ng-container *ngIf=\"data$ | async as data; else skeleton\">\n <tui-tree\n *ngFor=\"let node of data\"\n #tree=\"scTree\"\n scTree\n [scTopNodeText]=\"node.text\"\n [scTopNodeIcon]=\"node.icon\"\n [scTopNodeLink]=\"node.link\"\n [scTopNodeChilds]=\"node.hasChildren\"\n [scTopNodeParent]=\"node.id\"\n [scTopNodeDate]=\"node.createdAt\"\n [childrenHandler]=\"tree.childrenHandler\"\n [content]=\"content\"\n [map]=\"tree.map\"\n [tuiTreeController]=\"false\"\n [value]=\"tree.service.data$ | async\"\n (toggled)=\"tree.onToggled($event)\"\n class=\"overflow-hidden\"\n ></tui-tree>\n</ng-container>\n\n<ng-template #content let-item>\n <tui-loader *ngIf=\"item === loading; else text\" class=\"w-8 my-4\"></tui-loader>\n <ng-template #text>\n <tui-svg [src]=\"item.icon\" class=\"tui-space_right-2\"></tui-svg>\n <a tuiLink [pseudo]=\"true\" *ngIf=\"item.link\" href=\"{{ item.link }}\" class=\"grow\">{{ item.text }}</a>\n <p *ngIf=\"!item.link\" class=\"grow\">{{ item.text }}</p>\n <p>{{ item.createdAt }}</p>\n </ng-template>\n</ng-template>\n\n<ng-template #skeleton>\n <div class=\"flex flex-col gap-2\">\n <div *ngFor=\"let _ of [].constructor(7)\" class=\"flex items-center gap-2\">\n <div class=\"tui-skeleton h-6 w-6\"></div>\n <div class=\"tui-skeleton h-4 w-40\"></div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
2656
3178
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2657
3179
|
type: Inject,
|
|
@@ -2671,7 +3193,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2671
3193
|
args: [{
|
|
2672
3194
|
imports: [CommonModule, TuiTreeModule, TuiSvgModule, TuiLoaderModule, TuiLinkModule],
|
|
2673
3195
|
declarations: [FilesAndDocumentsComponent, TreeDirective, TreeTopDirective, FileTreeItemComponent],
|
|
2674
|
-
exports: [FilesAndDocumentsComponent]
|
|
3196
|
+
exports: [FilesAndDocumentsComponent]
|
|
2675
3197
|
}]
|
|
2676
3198
|
}] });
|
|
2677
3199
|
|
|
@@ -2763,7 +3285,7 @@ const scClientUiIconsName = [
|
|
|
2763
3285
|
'scIconArrowLargeEnd',
|
|
2764
3286
|
'scIconArrowForward',
|
|
2765
3287
|
'scIconApplication',
|
|
2766
|
-
'scIconAddProfile'
|
|
3288
|
+
'scIconAddProfile'
|
|
2767
3289
|
];
|
|
2768
3290
|
|
|
2769
3291
|
/**
|
|
@@ -2859,7 +3381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2859
3381
|
args: [{
|
|
2860
3382
|
declarations: [ScShareButtonComponent],
|
|
2861
3383
|
imports: [CommonModule, TuiButtonModule],
|
|
2862
|
-
exports: [ScShareButtonComponent]
|
|
3384
|
+
exports: [ScShareButtonComponent]
|
|
2863
3385
|
}]
|
|
2864
3386
|
}] });
|
|
2865
3387
|
|
|
@@ -2876,7 +3398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2876
3398
|
args: [{
|
|
2877
3399
|
declarations: [ScNewsCardComponent, ScNewsCardSkeletonComponent],
|
|
2878
3400
|
imports: [CommonModule, RouterModule, ScShareButtonModule],
|
|
2879
|
-
exports: [ScNewsCardComponent, ScNewsCardSkeletonComponent]
|
|
3401
|
+
exports: [ScNewsCardComponent, ScNewsCardSkeletonComponent]
|
|
2880
3402
|
}]
|
|
2881
3403
|
}] });
|
|
2882
3404
|
|
|
@@ -2944,324 +3466,133 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2944
3466
|
args: ['specificationPreview']
|
|
2945
3467
|
}], orderItem: [{
|
|
2946
3468
|
type: Input
|
|
2947
|
-
}], clickCardEvent: [{
|
|
2948
|
-
type: Output
|
|
2949
|
-
}], clickActionsEvent: [{
|
|
2950
|
-
type: Output
|
|
2951
|
-
}] } });
|
|
2952
|
-
|
|
2953
|
-
/**
|
|
2954
|
-
*
|
|
2955
|
-
*/
|
|
2956
|
-
class
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, ScCatalogModule],
|
|
2967
|
-
}]
|
|
2968
|
-
}] });
|
|
2969
|
-
|
|
2970
|
-
/**
|
|
2971
|
-
* Токен потока данных о текущем пользователе.
|
|
2972
|
-
*/
|
|
2973
|
-
const SC_USER_INFO = new InjectionToken('A stream with current user information');
|
|
2974
|
-
/**
|
|
2975
|
-
* Фабрика создания потока данных о текущем пользователе.
|
|
2976
|
-
*
|
|
2977
|
-
* @param userService Сервис информации о пользователе.
|
|
2978
|
-
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
|
2979
|
-
*/
|
|
2980
|
-
function scUserFactory(userService, destroy$) {
|
|
2981
|
-
//TODO: TASK[#7615] Отслеживать выполнение запроса изменения информации о пользователе после доработки snabcentr-core-lib.
|
|
2982
|
-
return userService.getUserChange$().pipe(takeUntil(destroy$));
|
|
2983
|
-
}
|
|
2984
|
-
/**
|
|
2985
|
-
* Провайдер потока данных о текущем пользователе.
|
|
2986
|
-
*/
|
|
2987
|
-
const SC_USER_PROVIDERS = [
|
|
2988
|
-
TuiDestroyService,
|
|
2989
|
-
{
|
|
2990
|
-
provide: SC_USER_INFO,
|
|
2991
|
-
deps: [ScUserService, TuiDestroyService],
|
|
2992
|
-
useFactory: scUserFactory,
|
|
2993
|
-
},
|
|
2994
|
-
];
|
|
2995
|
-
|
|
2996
|
-
/**
|
|
2997
|
-
* Проверяет повторный ввод пароля на эквивалентность паролю.
|
|
2998
|
-
*
|
|
2999
|
-
* @param passwordKey Ключ поля ввода пароля.
|
|
3000
|
-
*/
|
|
3001
|
-
function scPasswordConfirmMatchingValidator(passwordKey) {
|
|
3002
|
-
return ({ value, parent }) => {
|
|
3003
|
-
if (!parent || !value) {
|
|
3004
|
-
return null;
|
|
3005
|
-
}
|
|
3006
|
-
const passwordInput = parent.get(passwordKey);
|
|
3007
|
-
if (passwordInput && passwordInput.value) {
|
|
3008
|
-
return value !== passwordInput.value ? { passwordNotEquivalent: true } : null;
|
|
3009
|
-
}
|
|
3010
|
-
return null;
|
|
3011
|
-
};
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
/**
|
|
3015
|
-
* Компонент смены пароля пользователя.
|
|
3016
|
-
*/
|
|
3017
|
-
class ScResetUserPasswordComponent {
|
|
3018
|
-
/**
|
|
3019
|
-
* Инициализирует экземпляр класса {@link ScResetUserPasswordComponent}.
|
|
3020
|
-
*
|
|
3021
|
-
* @param userService Сервис информации о пользователе.
|
|
3022
|
-
*/
|
|
3023
|
-
constructor(userService) {
|
|
3024
|
-
this.userService = userService;
|
|
3025
|
-
/**
|
|
3026
|
-
* Форма для изменения пароля пользователя.
|
|
3027
|
-
*/
|
|
3028
|
-
this.form = new FormGroup({
|
|
3029
|
-
currentPassword: new FormControl(null, Validators.required),
|
|
3030
|
-
newPassword: new FormControl(null, [Validators.required, Validators.minLength(8)]),
|
|
3031
|
-
newPasswordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8), scPasswordConfirmMatchingValidator('newPassword')]),
|
|
3032
|
-
});
|
|
3033
|
-
/**
|
|
3034
|
-
* {@link Subject} события отправки формы.
|
|
3035
|
-
*/
|
|
3036
|
-
this.onSubmit = new Subject();
|
|
3037
|
-
/**
|
|
3038
|
-
* {@link Observable} запроса данных аутентификации.
|
|
3039
|
-
*/
|
|
3040
|
-
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(catchError((error) => {
|
|
3041
|
-
const errorResponse = error.error;
|
|
3042
|
-
for (const key in errorResponse.errors) {
|
|
3043
|
-
this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
|
|
3044
|
-
}
|
|
3045
|
-
if (!errorResponse.errors && errorResponse.message) {
|
|
3046
|
-
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
|
3047
|
-
}
|
|
3048
|
-
return of(void {});
|
|
3049
|
-
}), startWith(null))), share());
|
|
3050
|
-
/**
|
|
3051
|
-
* {@link Observable} изменения состояния загрузки данных аутентификации по email.
|
|
3052
|
-
*/
|
|
3053
|
-
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
ScResetUserPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, deps: [{ token: i1.ScUserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3057
|
-
ScResetUserPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col md:flex-row gap-4 p-1\">\n <div class=\"flex flex-col items-start gap-2 md:flex-row md:gap-4 md:flex-grow justify-between\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"md:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$1.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3$1.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, decorators: [{
|
|
3059
|
-
type: Component,
|
|
3060
|
-
args: [{ selector: 'sc-reset-user-password', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col md:flex-row gap-4 p-1\">\n <div class=\"flex flex-col items-start gap-2 md:flex-row md:gap-4 md:flex-grow justify-between\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\" class=\"flex w-full\">\n <tui-input-password formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"md:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n" }]
|
|
3061
|
-
}], ctorParameters: function () { return [{ type: i1.ScUserService }]; } });
|
|
3062
|
-
|
|
3063
|
-
/**
|
|
3064
|
-
* Компонент поля ввода страны/региона/города.
|
|
3065
|
-
*/
|
|
3066
|
-
let ScAddressesSelectionFieldComponent = class ScAddressesSelectionFieldComponent {
|
|
3067
|
-
/**
|
|
3068
|
-
* Инициализирует экземпляр класса {@link BankSuggestionFieldsComponent}.
|
|
3069
|
-
*
|
|
3070
|
-
* @param formGroupDirective Директива c `FormGroup` из DOM.
|
|
3071
|
-
* @param locationsService Сервис для получения списков стран, регионов, городов.
|
|
3072
|
-
*/
|
|
3073
|
-
constructor(formGroupDirective, locationsService) {
|
|
3074
|
-
this.formGroupDirective = formGroupDirective;
|
|
3075
|
-
this.locationsService = locationsService;
|
|
3076
|
-
/**
|
|
3077
|
-
* FormControl для поля страны.
|
|
3078
|
-
*/
|
|
3079
|
-
this.countryControl = new FormControl({
|
|
3080
|
-
id: 3159,
|
|
3081
|
-
name: 'Россия',
|
|
3082
|
-
}, Validators.required);
|
|
3083
|
-
/**
|
|
3084
|
-
* FormControl для поля региона.
|
|
3085
|
-
*/
|
|
3086
|
-
this.regionControl = new FormControl(null, Validators.required);
|
|
3087
|
-
/**
|
|
3088
|
-
* FormControl для поля города.
|
|
3089
|
-
*/
|
|
3090
|
-
this.cityControl = new FormControl(null, Validators.required);
|
|
3091
|
-
/**
|
|
3092
|
-
* {@link Observable} изменения списка стран.
|
|
3093
|
-
*/
|
|
3094
|
-
this.countries$ = this.locationsService.getCountries$().pipe(share(), startWith(null));
|
|
3095
|
-
/**
|
|
3096
|
-
* {@link Observable} изменения списка регионов.
|
|
3097
|
-
*/
|
|
3098
|
-
this.regions$ = tuiControlValue(this.countryControl).pipe(filter(tuiIsPresent), switchMap((country) => this.locationsService.getRegions$(country.id).pipe(startWith(null))));
|
|
3099
|
-
/**
|
|
3100
|
-
* {@link Observable} изменения списка городов.
|
|
3101
|
-
*/
|
|
3102
|
-
this.cities$ = combineLatest({
|
|
3103
|
-
country: tuiControlValue(this.countryControl).pipe(tap((country) => (country ? this.regionControl.enable() : this.regionControl.disable())), tap(() => {
|
|
3104
|
-
this.regionControl.reset(null);
|
|
3105
|
-
this.cityControl.reset(null);
|
|
3106
|
-
this.cityControl.disable();
|
|
3107
|
-
})),
|
|
3108
|
-
region: tuiControlValue(this.regionControl).pipe(tap(() => {
|
|
3109
|
-
this.cityControl.reset(null);
|
|
3110
|
-
this.cityIdControl.reset(null);
|
|
3111
|
-
}), tap((region) => (region ? this.cityControl.enable() : this.cityControl.disable()))),
|
|
3112
|
-
}).pipe(debounceTime(0), switchMap(({ country, region }) => country && region ? this.locationsService.getCities$(country.id, region.id).pipe(startWith(null)) : of([])), share());
|
|
3113
|
-
/**
|
|
3114
|
-
* Функция преобразования объекта сортировки в значение, отображаемое в поле ввода.
|
|
3115
|
-
*
|
|
3116
|
-
* @param item Выбранный объект выпадающего списка.
|
|
3117
|
-
*/
|
|
3118
|
-
this.stringify = (item) => `${item.name}`;
|
|
3119
|
-
}
|
|
3120
|
-
/**
|
|
3121
|
-
* `FormControl` поля идентификатора города.
|
|
3122
|
-
*/
|
|
3123
|
-
get cityIdControl() {
|
|
3124
|
-
return this.formGroupDirective.form.get('cityId');
|
|
3125
|
-
}
|
|
3126
|
-
/** @inheritDoc */
|
|
3127
|
-
ngOnInit() {
|
|
3128
|
-
if (this.cityIdControl && this.cityIdControl.valid) {
|
|
3129
|
-
this.locationsService
|
|
3130
|
-
.getUserCity$(Number(this.cityIdControl?.value))
|
|
3131
|
-
.pipe(filter((city) => city?.region?.country?.id === 3159), untilDestroyed(this))
|
|
3132
|
-
.subscribe((city) => {
|
|
3133
|
-
this.countryControl.patchValue(city?.region?.country ?? null);
|
|
3134
|
-
this.regionControl.patchValue(city?.region ?? null);
|
|
3135
|
-
this.cityControl.patchValue(city);
|
|
3136
|
-
});
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
/**
|
|
3140
|
-
* Заполнение полей банковских реквизитов на основе выбранной подсказки.
|
|
3141
|
-
*
|
|
3142
|
-
* @param suggestion Объект подсказки по банку.
|
|
3143
|
-
*/
|
|
3144
|
-
onSelectedCity(city) {
|
|
3145
|
-
if (this.cityIdControl) {
|
|
3146
|
-
this.cityIdControl.setValue(city?.id.toString() ?? null);
|
|
3147
|
-
tuiMarkControlAsTouchedAndValidate(this.cityIdControl);
|
|
3148
|
-
}
|
|
3469
|
+
}], clickCardEvent: [{
|
|
3470
|
+
type: Output
|
|
3471
|
+
}], clickActionsEvent: [{
|
|
3472
|
+
type: Output
|
|
3473
|
+
}] } });
|
|
3474
|
+
|
|
3475
|
+
/**
|
|
3476
|
+
* Компонент статуса оплаты заказа.
|
|
3477
|
+
*/
|
|
3478
|
+
class ScPaymentStatusComponent {
|
|
3479
|
+
constructor() {
|
|
3480
|
+
/**
|
|
3481
|
+
* Событие нажатия на кнопку "Вернуться к списку заказов".
|
|
3482
|
+
*/
|
|
3483
|
+
this.backToOrdersClick = new EventEmitter();
|
|
3484
|
+
/**
|
|
3485
|
+
* Событие нажатия на кнопку "На главную".
|
|
3486
|
+
*/
|
|
3487
|
+
this.backToOrderClick = new EventEmitter();
|
|
3149
3488
|
}
|
|
3150
|
-
}
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
UntilDestroy({ checkProperties: true })
|
|
3155
|
-
], ScAddressesSelectionFieldComponent);
|
|
3156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAddressesSelectionFieldComponent, decorators: [{
|
|
3489
|
+
}
|
|
3490
|
+
ScPaymentStatusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPaymentStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3491
|
+
ScPaymentStatusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPaymentStatusComponent, selector: "sc-payment-status", inputs: { status: "status", orderId: "orderId" }, outputs: { backToOrdersClick: "backToOrdersClick", backToOrderClick: "backToOrderClick" }, ngImport: i0, template: "<ng-container *ngIf=\"status && orderId; else failed\">\n <ng-container [ngSwitch]=\"status\">\n <tui-block-status *ngSwitchCase=\"'success'\">\n <tui-svg src=\"tuiIconCheckCircleLarge\" tuiSlot=\"top\" class=\"scale-[3] !h-20 !text-green-500\"></tui-svg>\n <h4>\u0421\u043F\u0430\u0441\u0438\u0431\u043E!</h4>\n <br />\n <div class=\"font-bold\">\u0412\u0430\u0448 \u0437\u0430\u043A\u0430\u0437 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u043F\u043B\u0430\u0447\u0435\u043D. \u041C\u044B \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F \u0441 \u0432\u0430\u043C\u0438 \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.</div>\n <br />\n <div class=\"font-bold\">\n \u041D\u043E\u043C\u0435\u0440 \u0432\u0430\u0448\u0435\u0433\u043E \u0437\u0430\u043A\u0430\u0437\u0430: <a tuiLink [pseudo]=\"true\" (click)=\"backToOrderClick.emit()\">{{orderId}}</a>\n </div>\n\n <button tuiButton (click)=\"backToOrdersClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0430\u043C</button>\n </tui-block-status>\n <tui-block-status *ngSwitchCase=\"'error'\">\n <tui-svg src=\"tuiIconXCircleLarge\" class=\"scale-[3] !h-20 !text-red-500\" tuiSlot=\"top\"></tui-svg>\n <h4>\u041E\u043F\u043B\u0430\u0442\u0430 \u043D\u0435 \u043F\u0440\u043E\u0448\u043B\u0430!</h4>\n <br />\n <div class=\"font-bold\">\u041F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 \u043F\u043B\u0430\u0442\u0435\u0436\u0430 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430.</div>\n <button tuiButton tuiItem (click)=\"backToOrderClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0443</button>\n </tui-block-status>\n </ng-container>\n</ng-container>\n\n<ng-template #failed>\n <tui-block-status>\n <tui-svg src=\"tuiIconInfoLarge\" class=\"scale-[3] !h-20 !text-yellow-500\" tuiSlot=\"top\"></tui-svg>\n <h4>\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A!</h4>\n <button tuiButton tuiItem (click)=\"backToOrdersClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0430\u043C</button>\n </tui-block-status>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i3$1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card"] }, { kind: "directive", type: i3$1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPaymentStatusComponent, decorators: [{
|
|
3157
3493
|
type: Component,
|
|
3158
|
-
args: [{ selector: 'sc-
|
|
3159
|
-
}],
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3494
|
+
args: [{ selector: 'sc-payment-status', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"status && orderId; else failed\">\n <ng-container [ngSwitch]=\"status\">\n <tui-block-status *ngSwitchCase=\"'success'\">\n <tui-svg src=\"tuiIconCheckCircleLarge\" tuiSlot=\"top\" class=\"scale-[3] !h-20 !text-green-500\"></tui-svg>\n <h4>\u0421\u043F\u0430\u0441\u0438\u0431\u043E!</h4>\n <br />\n <div class=\"font-bold\">\u0412\u0430\u0448 \u0437\u0430\u043A\u0430\u0437 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u043F\u043B\u0430\u0447\u0435\u043D. \u041C\u044B \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F \u0441 \u0432\u0430\u043C\u0438 \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.</div>\n <br />\n <div class=\"font-bold\">\n \u041D\u043E\u043C\u0435\u0440 \u0432\u0430\u0448\u0435\u0433\u043E \u0437\u0430\u043A\u0430\u0437\u0430: <a tuiLink [pseudo]=\"true\" (click)=\"backToOrderClick.emit()\">{{orderId}}</a>\n </div>\n\n <button tuiButton (click)=\"backToOrdersClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0430\u043C</button>\n </tui-block-status>\n <tui-block-status *ngSwitchCase=\"'error'\">\n <tui-svg src=\"tuiIconXCircleLarge\" class=\"scale-[3] !h-20 !text-red-500\" tuiSlot=\"top\"></tui-svg>\n <h4>\u041E\u043F\u043B\u0430\u0442\u0430 \u043D\u0435 \u043F\u0440\u043E\u0448\u043B\u0430!</h4>\n <br />\n <div class=\"font-bold\">\u041F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 \u043F\u043B\u0430\u0442\u0435\u0436\u0430 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430.</div>\n <button tuiButton tuiItem (click)=\"backToOrderClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0443</button>\n </tui-block-status>\n </ng-container>\n</ng-container>\n\n<ng-template #failed>\n <tui-block-status>\n <tui-svg src=\"tuiIconInfoLarge\" class=\"scale-[3] !h-20 !text-yellow-500\" tuiSlot=\"top\"></tui-svg>\n <h4>\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A!</h4>\n <button tuiButton tuiItem (click)=\"backToOrdersClick.emit()\">\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0437\u0430\u043A\u0430\u0437\u0430\u043C</button>\n </tui-block-status>\n</ng-template>\n" }]
|
|
3495
|
+
}], propDecorators: { status: [{
|
|
3496
|
+
type: Input
|
|
3497
|
+
}], orderId: [{
|
|
3498
|
+
type: Input
|
|
3499
|
+
}], backToOrdersClick: [{
|
|
3500
|
+
type: Output
|
|
3501
|
+
}], backToOrderClick: [{
|
|
3502
|
+
type: Output
|
|
3503
|
+
}] } });
|
|
3165
3504
|
|
|
3166
3505
|
/**
|
|
3167
|
-
*
|
|
3506
|
+
* Модуль заказов.
|
|
3168
3507
|
*/
|
|
3169
|
-
class
|
|
3508
|
+
class ScOrderModule {
|
|
3509
|
+
}
|
|
3510
|
+
ScOrderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3511
|
+
ScOrderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, declarations: [ScOrderItemMobileComponent, ScPaymentStatusComponent], imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule], exports: [ScOrderItemMobileComponent, ScPaymentStatusComponent] });
|
|
3512
|
+
ScOrderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule] });
|
|
3513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, decorators: [{
|
|
3514
|
+
type: NgModule,
|
|
3515
|
+
args: [{
|
|
3516
|
+
declarations: [ScOrderItemMobileComponent, ScPaymentStatusComponent],
|
|
3517
|
+
exports: [ScOrderItemMobileComponent, ScPaymentStatusComponent],
|
|
3518
|
+
imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule]
|
|
3519
|
+
}]
|
|
3520
|
+
}] });
|
|
3521
|
+
|
|
3522
|
+
/**
|
|
3523
|
+
* Токен потока данных о текущем пользователе.
|
|
3524
|
+
*/
|
|
3525
|
+
const SC_USER_INFO = new InjectionToken('A stream with current user information');
|
|
3526
|
+
/**
|
|
3527
|
+
* Фабрика создания потока данных о текущем пользователе.
|
|
3528
|
+
*
|
|
3529
|
+
* @param userService Сервис информации о пользователе.
|
|
3530
|
+
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
|
3531
|
+
*/
|
|
3532
|
+
function scUserFactory(userService, destroy$) {
|
|
3533
|
+
//TODO: TASK[#7615] Отслеживать выполнение запроса изменения информации о пользователе после доработки snabcentr-core-lib.
|
|
3534
|
+
return userService.getUserChange$().pipe(takeUntil(destroy$));
|
|
3535
|
+
}
|
|
3536
|
+
/**
|
|
3537
|
+
* Провайдер потока данных о текущем пользователе.
|
|
3538
|
+
*/
|
|
3539
|
+
const SC_USER_PROVIDERS = [
|
|
3540
|
+
TuiDestroyService,
|
|
3541
|
+
{
|
|
3542
|
+
provide: SC_USER_INFO,
|
|
3543
|
+
deps: [ScUserService, TuiDestroyService],
|
|
3544
|
+
useFactory: scUserFactory
|
|
3545
|
+
}
|
|
3546
|
+
];
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Компонент смены пароля пользователя.
|
|
3550
|
+
*/
|
|
3551
|
+
class ScResetUserPasswordComponent {
|
|
3170
3552
|
/**
|
|
3171
|
-
* Инициализирует экземпляр класса {@link
|
|
3553
|
+
* Инициализирует экземпляр класса {@link ScResetUserPasswordComponent}.
|
|
3172
3554
|
*
|
|
3173
|
-
* @param
|
|
3174
|
-
* @param suggestionService Сервис работы с API подсказок.
|
|
3555
|
+
* @param userService Сервис информации о пользователе.
|
|
3175
3556
|
*/
|
|
3176
|
-
constructor(
|
|
3177
|
-
this.
|
|
3178
|
-
this.suggestionService = suggestionService;
|
|
3557
|
+
constructor(userService) {
|
|
3558
|
+
this.userService = userService;
|
|
3179
3559
|
/**
|
|
3180
|
-
*
|
|
3560
|
+
* Форма для изменения пароля пользователя.
|
|
3181
3561
|
*/
|
|
3182
|
-
this.
|
|
3562
|
+
this.form = new FormGroup({
|
|
3563
|
+
currentPassword: new FormControl(null, Validators.required),
|
|
3564
|
+
newPassword: new FormControl(null, [Validators.required, Validators.minLength(8)]),
|
|
3565
|
+
newPasswordConfirm: new FormControl(null, [Validators.required, Validators.minLength(8)])
|
|
3566
|
+
}, { validators: scPasswordConfirmMatchingValidator('newPassword', 'newPasswordConfirm') });
|
|
3183
3567
|
/**
|
|
3184
|
-
*
|
|
3568
|
+
* {@link Subject} события отправки формы.
|
|
3185
3569
|
*/
|
|
3186
|
-
this.
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3570
|
+
this.onSubmit = new Subject();
|
|
3571
|
+
/**
|
|
3572
|
+
* {@link Observable} запроса данных аутентификации.
|
|
3573
|
+
*/
|
|
3574
|
+
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.userService.updateUserInfo$(value).pipe(catchError((error) => {
|
|
3191
3575
|
const errorResponse = error.error;
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
this.control.control.setErrors({
|
|
3195
|
-
serverResponse: [errorResponse.message || `Ошибка сервера: пожалуйста, перезагрузите страницу и/или выполните запрос позже.`],
|
|
3196
|
-
});
|
|
3576
|
+
for (const key in errorResponse.errors) {
|
|
3577
|
+
this.form.get(key)?.setErrors({ serverResponse: errorResponse.errors[`${key}`] });
|
|
3197
3578
|
}
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
*/
|
|
3208
|
-
onSelected(suggestion) {
|
|
3209
|
-
switch (this.type) {
|
|
3210
|
-
case ScISuggestionType.fio:
|
|
3211
|
-
if ('fio' in suggestion) {
|
|
3212
|
-
this.control.control?.patchValue(suggestion.fio);
|
|
3213
|
-
}
|
|
3214
|
-
break;
|
|
3215
|
-
case ScISuggestionType.address:
|
|
3216
|
-
if ('addressString' in suggestion) {
|
|
3217
|
-
this.control.control?.patchValue(suggestion.addressString, { emitEvent: false });
|
|
3218
|
-
}
|
|
3219
|
-
break;
|
|
3220
|
-
case ScISuggestionType.bank:
|
|
3221
|
-
if ('inn' in suggestion && 'bic' in suggestion) {
|
|
3222
|
-
this.control.control?.parent?.patchValue({
|
|
3223
|
-
bankName: suggestion.name,
|
|
3224
|
-
bic: suggestion.bic,
|
|
3225
|
-
correspondentAccount: suggestion.correspondentAccount,
|
|
3226
|
-
}, { emitEvent: false });
|
|
3227
|
-
}
|
|
3228
|
-
break;
|
|
3229
|
-
case ScISuggestionType.organization:
|
|
3230
|
-
if ('inn' in suggestion && !('bic' in suggestion)) {
|
|
3231
|
-
this.control.control?.parent?.patchValue({
|
|
3232
|
-
name: suggestion.name,
|
|
3233
|
-
inn: suggestion.inn,
|
|
3234
|
-
kpp: suggestion.kpp,
|
|
3235
|
-
okpo: suggestion.okpo,
|
|
3236
|
-
directorName: suggestion.directorName,
|
|
3237
|
-
directorPosition: suggestion.directorPosition,
|
|
3238
|
-
legalAddress: suggestion.legalAddress,
|
|
3239
|
-
postalAddress: suggestion.postalAddress,
|
|
3240
|
-
actualAddress: suggestion.actualAddress,
|
|
3241
|
-
}, { emitEvent: false });
|
|
3242
|
-
}
|
|
3243
|
-
break;
|
|
3244
|
-
case ScISuggestionType.email:
|
|
3245
|
-
if ('email' in suggestion) {
|
|
3246
|
-
this.control.control?.patchValue(suggestion.email, { emitEvent: false });
|
|
3247
|
-
}
|
|
3248
|
-
break;
|
|
3249
|
-
}
|
|
3579
|
+
if (!errorResponse.errors && errorResponse.message) {
|
|
3580
|
+
this.form.setErrors({ serverResponse: [errorResponse.message] });
|
|
3581
|
+
}
|
|
3582
|
+
return of(void {});
|
|
3583
|
+
}), startWith(null))), share());
|
|
3584
|
+
/**
|
|
3585
|
+
* {@link Observable} изменения состояния загрузки данных аутентификации по email.
|
|
3586
|
+
*/
|
|
3587
|
+
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
|
3250
3588
|
}
|
|
3251
3589
|
}
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type:
|
|
3590
|
+
ScResetUserPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, deps: [{ token: i1.ScUserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3591
|
+
ScResetUserPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password", ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid grid-rows-3 gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"self-center lg:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i6.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScResetUserPasswordComponent, decorators: [{
|
|
3255
3593
|
type: Component,
|
|
3256
|
-
args: [{ selector: 'sc-
|
|
3257
|
-
}], ctorParameters: function () { return [{ type:
|
|
3258
|
-
type: SkipSelf
|
|
3259
|
-
}, {
|
|
3260
|
-
type: Inject,
|
|
3261
|
-
args: [NgControl]
|
|
3262
|
-
}] }, { type: i1.ScSuggestionService }]; }, propDecorators: { type: [{
|
|
3263
|
-
type: Input
|
|
3264
|
-
}] } });
|
|
3594
|
+
args: [{ selector: 'sc-reset-user-password', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col lg:flex-row gap-4 p-1\">\n <div class=\"grid grid-rows-3 gap-2 lg:grid-cols-3 lg:grid-rows-1 lg:gap-4 lg:flex-grow\">\n <label tuiLabel=\"\u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"currentPassword\">\n \u0421\u0442\u0430\u0440\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"currentPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPassword\">\n \u041F\u0440\u0438\u0434\u0443\u043C\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPassword\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password [pseudoInvalid]=\"form.hasError('passwordNotEquivalent')\" formControlName=\"newPasswordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"new-password\" />\n </tui-input-password>\n <tui-error formControlName=\"newPasswordConfirm\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error class=\"lg:!hidden\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <button\n *tuiLet=\"!!(loading$ | async) as loading\"\n tuiButton\n [showLoader]=\"loading\"\n type=\"submit\"\n [disabled]=\"form.invalid || loading\"\n icon=\"scIconSave\"\n class=\"self-center lg:mt-6 font-medium\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </button>\n</form>\n<tui-error class=\"!hidden lg:!block\" [formGroup]=\"form\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n" }]
|
|
3595
|
+
}], ctorParameters: function () { return [{ type: i1.ScUserService }]; } });
|
|
3265
3596
|
|
|
3266
3597
|
/**
|
|
3267
3598
|
* Диалоговое окно изменения данных пользователя.
|
|
@@ -3291,7 +3622,7 @@ class ScUpdateUserInfoDialogComponent {
|
|
|
3291
3622
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
|
3292
3623
|
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)]),
|
|
3293
3624
|
cityId: new FormControl(null, Validators.required),
|
|
3294
|
-
getNews: new FormControl(false)
|
|
3625
|
+
getNews: new FormControl(false)
|
|
3295
3626
|
});
|
|
3296
3627
|
/**
|
|
3297
3628
|
* Сигнал нажатия на кнопку "Отмена".
|
|
@@ -3327,12 +3658,12 @@ class ScUpdateUserInfoDialogComponent {
|
|
|
3327
3658
|
email: user.contacts.email.value,
|
|
3328
3659
|
phone: user.contacts.phone.value,
|
|
3329
3660
|
cityId: user.city,
|
|
3330
|
-
getNews: user.getNews
|
|
3661
|
+
getNews: user.getNews
|
|
3331
3662
|
}, { emitEvent: false }));
|
|
3332
3663
|
}
|
|
3333
3664
|
}
|
|
3334
3665
|
ScUpdateUserInfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, deps: [{ token: SC_USER_INFO }, { token: i1.ScUserService }, { token: POLYMORPHEUS_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3335
|
-
ScUpdateUserInfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUpdateUserInfoDialogComponent, selector: "sc-update-user-info-dialog", outputs: { cancelButtonClick: "cancelButtonClick", successUpdateDate: "successUpdateDate" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "component", type:
|
|
3666
|
+
ScUpdateUserInfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScUpdateUserInfoDialogComponent, selector: "sc-update-user-info-dialog", outputs: { cancelButtonClick: "cancelButtonClick", successUpdateDate: "successUpdateDate" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"] }, { kind: "component", type: i6.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i6.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i6.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "directive", type: i4.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3336
3667
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScUpdateUserInfoDialogComponent, decorators: [{
|
|
3337
3668
|
type: Component,
|
|
3338
3669
|
args: [{ selector: 'sc-update-user-info-dialog', providers: [SC_USER_PROVIDERS], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" *ngIf=\"user$ | async as user\" (ngSubmit)=\"onSubmit.next()\" class=\"flex flex-col gap-4\">\n <label [tuiLabel]=\"user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.'\">\n <tui-input formControlName=\"name\">\n {{ user.isOrg ? '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' : '\u0424.\u0418.\u041E.' }}\n <ng-container *ngIf=\"user.isOrg\">\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.organization\"></sc-suggestion-field>\n </ng-container>\n </tui-input>\n <tui-error formControlName=\"name\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-verification-phone-check-form\n *tuiLet=\"user.contacts.phone.value === form.value.phone as phoneIsChange\"\n [showCodeFields]=\"!phoneIsChange\"\n [shouldBeBusy]=\"phoneIsChange\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\" class=\"w-full\">\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field *tuiDataList [type]=\"suggestionType.email\"></sc-suggestion-field>\n </tui-input>\n <tui-error formControlName=\"email\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <sc-addresses-selection-field></sc-addresses-selection-field>\n <tui-checkbox-labeled formControlName=\"getNews\" class=\"w-full\"> \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435. </tui-checkbox-labeled>\n <div class=\"flex gap-4 justify-center\">\n <button tuiButton (click)=\"context ? context.$implicit.complete() : cancelButtonClick.emit()\" type=\"button\" icon=\"tuiIconXLarge\" appearance=\"secondary\">\u041E\u0442\u043C\u0435\u043D\u0430</button>\n <button tuiButton tuiMode=\"onLight\" [disabled]=\"form.invalid\" [showLoader]=\"!!(loading$ | async)\" type=\"submit\" icon=\"scIconSave\">\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C</button>\n </div>\n</form>\n" }]
|
|
@@ -3376,7 +3707,7 @@ let ScUserPhoneApproveDialogComponent = class ScUserPhoneApproveDialogComponent
|
|
|
3376
3707
|
*/
|
|
3377
3708
|
this.form = new FormGroup({
|
|
3378
3709
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
|
3379
|
-
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)])
|
|
3710
|
+
verificationCode: new FormControl(null, [Validators.required, Validators.minLength(6)])
|
|
3380
3711
|
});
|
|
3381
3712
|
/**
|
|
3382
3713
|
* {@link Subject} события отправки формы.
|
|
@@ -3401,7 +3732,7 @@ let ScUserPhoneApproveDialogComponent = class ScUserPhoneApproveDialogComponent
|
|
|
3401
3732
|
this.loading$ = this.request$.pipe(map(tuiIsFalsy));
|
|
3402
3733
|
this.user$.pipe(untilDestroyed(this)).subscribe((user) => {
|
|
3403
3734
|
this.form.patchValue({
|
|
3404
|
-
phone: user.contacts.phone.value
|
|
3735
|
+
phone: user.contacts.phone.value
|
|
3405
3736
|
});
|
|
3406
3737
|
});
|
|
3407
3738
|
}
|
|
@@ -3424,76 +3755,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3424
3755
|
args: [POLYMORPHEUS_CONTEXT]
|
|
3425
3756
|
}] }]; } });
|
|
3426
3757
|
|
|
3427
|
-
/**
|
|
3428
|
-
* Модуль полей ввода.
|
|
3429
|
-
*/
|
|
3430
|
-
class ScFormFieldsModule {
|
|
3431
|
-
}
|
|
3432
|
-
ScFormFieldsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3433
|
-
ScFormFieldsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, declarations: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent], imports: [CommonModule,
|
|
3434
|
-
FormsModule,
|
|
3435
|
-
ReactiveFormsModule,
|
|
3436
|
-
TuiInputModule,
|
|
3437
|
-
TuiTextfieldControllerModule,
|
|
3438
|
-
TuiLabelModule,
|
|
3439
|
-
TuiLetModule,
|
|
3440
|
-
TuiFieldErrorPipeModule,
|
|
3441
|
-
TuiErrorModule,
|
|
3442
|
-
TuiDataListModule,
|
|
3443
|
-
TuiLoaderModule,
|
|
3444
|
-
TuiComboBoxModule,
|
|
3445
|
-
TuiDataListWrapperModule,
|
|
3446
|
-
TuiFilterByInputPipeModule,
|
|
3447
|
-
TuiStringifyContentPipeModule,
|
|
3448
|
-
TuiInputPhoneModule,
|
|
3449
|
-
TuiButtonModule,
|
|
3450
|
-
MaskitoModule], exports: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent] });
|
|
3451
|
-
ScFormFieldsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, imports: [CommonModule,
|
|
3452
|
-
FormsModule,
|
|
3453
|
-
ReactiveFormsModule,
|
|
3454
|
-
TuiInputModule,
|
|
3455
|
-
TuiTextfieldControllerModule,
|
|
3456
|
-
TuiLabelModule,
|
|
3457
|
-
TuiLetModule,
|
|
3458
|
-
TuiFieldErrorPipeModule,
|
|
3459
|
-
TuiErrorModule,
|
|
3460
|
-
TuiDataListModule,
|
|
3461
|
-
TuiLoaderModule,
|
|
3462
|
-
TuiComboBoxModule,
|
|
3463
|
-
TuiDataListWrapperModule,
|
|
3464
|
-
TuiFilterByInputPipeModule,
|
|
3465
|
-
TuiStringifyContentPipeModule,
|
|
3466
|
-
TuiInputPhoneModule,
|
|
3467
|
-
TuiButtonModule,
|
|
3468
|
-
MaskitoModule] });
|
|
3469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScFormFieldsModule, decorators: [{
|
|
3470
|
-
type: NgModule,
|
|
3471
|
-
args: [{
|
|
3472
|
-
declarations: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent],
|
|
3473
|
-
imports: [
|
|
3474
|
-
CommonModule,
|
|
3475
|
-
FormsModule,
|
|
3476
|
-
ReactiveFormsModule,
|
|
3477
|
-
TuiInputModule,
|
|
3478
|
-
TuiTextfieldControllerModule,
|
|
3479
|
-
TuiLabelModule,
|
|
3480
|
-
TuiLetModule,
|
|
3481
|
-
TuiFieldErrorPipeModule,
|
|
3482
|
-
TuiErrorModule,
|
|
3483
|
-
TuiDataListModule,
|
|
3484
|
-
TuiLoaderModule,
|
|
3485
|
-
TuiComboBoxModule,
|
|
3486
|
-
TuiDataListWrapperModule,
|
|
3487
|
-
TuiFilterByInputPipeModule,
|
|
3488
|
-
TuiStringifyContentPipeModule,
|
|
3489
|
-
TuiInputPhoneModule,
|
|
3490
|
-
TuiButtonModule,
|
|
3491
|
-
MaskitoModule,
|
|
3492
|
-
],
|
|
3493
|
-
exports: [ScAddressesSelectionFieldComponent, ScSuggestionFieldComponent],
|
|
3494
|
-
}]
|
|
3495
|
-
}] });
|
|
3496
|
-
|
|
3497
3758
|
/**
|
|
3498
3759
|
* Модуль компонентов пользователя.
|
|
3499
3760
|
*/
|
|
@@ -3564,9 +3825,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3564
3825
|
TuiCheckboxLabeledModule,
|
|
3565
3826
|
TuiDataListModule,
|
|
3566
3827
|
TuiSelectModule,
|
|
3567
|
-
TuiModeModule
|
|
3828
|
+
TuiModeModule
|
|
3568
3829
|
],
|
|
3569
|
-
exports: [ScResetUserPasswordComponent, ScUpdateUserInfoDialogComponent, ScUserPhoneApproveDialogComponent]
|
|
3830
|
+
exports: [ScResetUserPasswordComponent, ScUpdateUserInfoDialogComponent, ScUserPhoneApproveDialogComponent]
|
|
3570
3831
|
}]
|
|
3571
3832
|
}] });
|
|
3572
3833
|
|
|
@@ -3627,6 +3888,10 @@ class ScProfileAccordionsContentComponent {
|
|
|
3627
3888
|
* Событие нажатия на кнопку добавления контрагента.
|
|
3628
3889
|
*/
|
|
3629
3890
|
this.addContragentClick = new EventEmitter();
|
|
3891
|
+
/**
|
|
3892
|
+
* Событие нажатия на кнопку добавления банковского счёта контрагенту.
|
|
3893
|
+
*/
|
|
3894
|
+
this.addContragentBankAccountsClick = new EventEmitter();
|
|
3630
3895
|
/**
|
|
3631
3896
|
* Событие нажатия на кнопку добавления адреса доставки клиента.
|
|
3632
3897
|
*/
|
|
@@ -3642,13 +3907,13 @@ class ScProfileAccordionsContentComponent {
|
|
|
3642
3907
|
}
|
|
3643
3908
|
}
|
|
3644
3909
|
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 });
|
|
3645
|
-
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", addDeliveryAddressClick: "addDeliveryAddressClick" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password" }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: ["addContragentClick", "editBankAccountsContragentClick", "addBankAccountsClick", "editContragentClick"] }, { kind: "component", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: ["addDeliveryAddressClick"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type:
|
|
3910
|
+
ScProfileAccordionsContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScProfileAccordionsContentComponent, selector: "sc-profile-accordions-content", outputs: { editProfileClick: "editProfileClick", approvePhoneClick: "approvePhoneClick", addContragentClick: "addContragentClick", addContragentBankAccountsClick: "addContragentBankAccountsClick", addDeliveryAddressClick: "addDeliveryAddressClick" }, providers: [SC_USER_PROVIDERS], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\" (addBankAccountsClick)=\"addContragentBankAccountsClick.emit($event)\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ScResetUserPasswordComponent, selector: "sc-reset-user-password" }, { kind: "component", type: ScAccordionComponent, selector: "sc-accordion", inputs: ["showAddButton", "showDeleteButton", "showArrow", "open", "size"], outputs: ["addButtonClick", "deleteButtonClick"] }, { kind: "directive", type: ScAccordionContentDirective, selector: "ng-template[scAccordionContent]" }, { kind: "component", type: ScContragentsAccordionComponent, selector: "sc-contragents-accordion", outputs: ["addContragentClick", "editBankAccountsContragentClick", "addBankAccountsClick", "editContragentClick"] }, { kind: "component", type: ScDeliveryAddressAccordionComponent, selector: "sc-delivery-address-accordion", outputs: ["addDeliveryAddressClick"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i6.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFormatPhonePipe, name: "tuiFormatPhone" }], animations: [tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3646
3911
|
__decorate([
|
|
3647
3912
|
tuiPure // TODO: TASK[#7615] Удалить поле рефакторинга сервиса работы с пользователем.
|
|
3648
3913
|
], ScProfileAccordionsContentComponent.prototype, "getUserCity$", null);
|
|
3649
3914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScProfileAccordionsContentComponent, decorators: [{
|
|
3650
3915
|
type: Component,
|
|
3651
|
-
args: [{ selector: 'sc-profile-accordions-content', providers: [SC_USER_PROVIDERS], animations: [tuiFadeIn], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n" }]
|
|
3916
|
+
args: [{ selector: 'sc-profile-accordions-content', providers: [SC_USER_PROVIDERS], animations: [tuiFadeIn], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-4\">\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\" [open]=\"true\">\n \u041E\u0431\u0449\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\n <ng-template scAccordionContent>\n <tui-loader *tuiLet=\"user$ | async as user\" [overlay]=\"true\" [showLoader]=\"user === null\">\n <div class=\"flex gap-2 pl-4\">\n <div *ngIf=\"user\" class=\"flex flex-col flex-grow gap-2\">\n <span class=\"font-medium\">{{ user.name }}</span>\n <div *ngIf=\"user.city && (getUserCity$(user.city) | async) as city\" class=\"flex items-center gap-1\">\n <tui-svg src=\"tuiIconMapPin\"></tui-svg>\n <div class=\"flex flex-wrap\">\n <span>\u0433. {{ city.name }}, </span>\n <span *ngIf=\"city.region\">{{ city.region.name }}</span>\n </div>\n </div>\n <div class=\"flex flex-wrap gap-2\">\n <a\n tuiLink\n tuiMode=\"onLight\"\n icon=\"tuiIconPhone\"\n iconAlign=\"left\"\n [pseudo]=\"true\"\n href=\"tel:{{ user.contacts.phone.value}}\"\n >{{ user.contacts.phone.value | tuiFormatPhone }}</a\n >\n <span *ngIf=\"!user.contacts.phone.isApproved\" class=\"text-tui-text-03\">\n (\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D. <button tuiLink [pseudo]=\"true\" (click)=\"approvePhoneClick.emit()\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>)\n </span>\n </div>\n <div *tuiLet=\"!!(isSendApproveEmail$ | async) as isSendApproveEmail\" class=\"flex flex-wrap gap-x-2\">\n <a tuiLink tuiMode=\"onLight\" icon=\"tuiIconMail\" iconAlign=\"left\" [pseudo]=\"true\" href=\"mailto:{{ user.contacts.email.value }}\">\n {{ user.contacts.email.value }}\n </a>\n <span *ngIf=\"!isSendApproveEmail && !user.contacts.email.isApproved\" class=\"text-tui-text-03 inline-flex flex-wrap gap-1\">\n E-mail \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D.\n <tui-loader [showLoader]=\"!!(approveEmailLoading$ | async)\" [overlay]=\"true\">\n <button tuiLink [pseudo]=\"true\" (click)=\"onSendApproveEmail.next(user.contacts.email.value)\">\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C</button>\n </tui-loader>\n </span>\n <span *ngIf=\"isSendApproveEmail\" class=\"text-tui-success-fill\" @tuiFadeIn>\n \u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432 \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.\n </span>\n </div>\n <tui-loader [showLoader]=\"!!(getNewsLoading$ | async)\" [overlay]=\"true\">\n <tui-checkbox-labeled size=\"m\" class=\"w-full\" [formControl]=\"getNewsControl\" [ngModel]=\"user.getNews\">\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </tui-checkbox-labeled>\n </tui-loader>\n </div>\n\n <button tuiIconButton size=\"m\" type=\"button\" icon=\"tuiIconEdit3Large\" tuiMode=\"onLight\" appearance=\"flat\" (click)=\"editProfileClick.emit()\"></button>\n </div>\n </tui-loader>\n </ng-template>\n </sc-accordion>\n <sc-contragents-accordion (addContragentClick)=\"addContragentClick.emit()\" (addBankAccountsClick)=\"addContragentBankAccountsClick.emit($event)\"></sc-contragents-accordion>\n <sc-delivery-address-accordion (addDeliveryAddressClick)=\"addDeliveryAddressClick.emit()\"></sc-delivery-address-accordion>\n <sc-accordion [showArrow]=\"false\" [showAddButton]=\"false\">\n \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C\n <ng-template scAccordionContent>\n <sc-reset-user-password></sc-reset-user-password>\n </ng-template>\n </sc-accordion>\n</div>\n" }]
|
|
3652
3917
|
}], ctorParameters: function () { return [{ type: i10.Observable, decorators: [{
|
|
3653
3918
|
type: Inject,
|
|
3654
3919
|
args: [SC_USER_INFO]
|
|
@@ -3658,6 +3923,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3658
3923
|
type: Output
|
|
3659
3924
|
}], addContragentClick: [{
|
|
3660
3925
|
type: Output
|
|
3926
|
+
}], addContragentBankAccountsClick: [{
|
|
3927
|
+
type: Output
|
|
3661
3928
|
}], addDeliveryAddressClick: [{
|
|
3662
3929
|
type: Output
|
|
3663
3930
|
}], getUserCity$: [] } });
|
|
@@ -3720,9 +3987,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3720
3987
|
FormsModule,
|
|
3721
3988
|
ReactiveFormsModule,
|
|
3722
3989
|
TuiLoaderModule,
|
|
3723
|
-
TuiButtonModule
|
|
3990
|
+
TuiButtonModule
|
|
3724
3991
|
],
|
|
3725
|
-
exports: [ScProfileAccordionsContentComponent]
|
|
3992
|
+
exports: [ScProfileAccordionsContentComponent]
|
|
3726
3993
|
}]
|
|
3727
3994
|
}] });
|
|
3728
3995
|
|
|
@@ -3734,5 +4001,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3734
4001
|
* Generated bundle index. Do not edit.
|
|
3735
4002
|
*/
|
|
3736
4003
|
|
|
3737
|
-
export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, SC_USER_INFO, SC_USER_PROVIDERS, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScUpdateUserInfoDialogComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scClientUiIconsName, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator, verificationCodeMask };
|
|
4004
|
+
export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, SC_USER_INFO, SC_USER_PROVIDERS, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContragentBankAccountsDialogComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoriesListComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewContragentBankAccountsFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScProfileAccordionsContentComponent, ScProfileModule, ScResetUserPasswordComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScUpdateUserInfoDialogComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, scUserFactory, stepValidator, verificationCodeMask };
|
|
3738
4005
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|