@snabcentr/client-ui 3.0.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/auth/sign-up-form/sc-sign-up-form.component.d.ts +10 -2
- package/cart/cart-item-mobile/sc-cart-item-mobile.component.d.ts +0 -2
- package/catalog/category-card/sc-category-card.component.d.ts +20 -26
- package/catalog/sc-catalog.module.d.ts +1 -1
- package/esm2022/auth/sign-up-form/sc-sign-up-form.component.mjs +17 -4
- package/esm2022/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +3 -5
- package/esm2022/catalog/category-card/sc-category-card.component.mjs +32 -51
- package/esm2022/catalog/input-quantity/sc-input-quantity.component.mjs +3 -3
- package/esm2022/catalog/price-card/sc-price-card.component.mjs +3 -3
- package/esm2022/catalog/sc-catalog.module.mjs +10 -5
- package/esm2022/catalog/sc-favorite-btn/sc-favorite-btn.component.mjs +3 -3
- package/esm2022/form-fields/addresses-selection-field/sc-addresses-selection-field.component.mjs +3 -3
- package/fesm2022/snabcentr-client-ui.mjs +57 -63
- package/fesm2022/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/release_notes.tmp +4 -2
- package/styles/taiga/variables.less +29 -0
- package/styles/tailwind/tailwind.scss +13 -12
- /package/icons/svg-pack/catalog/{door-accessorie.svg → door-accessories.svg} +0 -0
@@ -7,7 +7,7 @@ import { Subject, map, filter, switchMap, tap, catchError, of, finalize, startWi
|
|
7
7
|
import * as i2 from '@angular/common';
|
8
8
|
import { CommonModule } from '@angular/common';
|
9
9
|
import * as i1$1 from '@taiga-ui/core';
|
10
|
-
import { TUI_DATA_LIST_HOST, TuiButton, TuiDialog, TuiDialogService, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiLink, tuiFadeIn, TUI_MONTHS, TuiIcon, TuiHint, TuiFormatNumberPipe } from '@taiga-ui/core';
|
10
|
+
import { TUI_DATA_LIST_HOST, tuiDropdownOptionsProvider, TuiButton, TuiDialog, TuiDialogService, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiLink, tuiFadeIn, TUI_MONTHS, TuiIcon, TuiHint, TuiFormatNumberPipe } from '@taiga-ui/core';
|
11
11
|
import { HttpErrorResponse } from '@angular/common/http';
|
12
12
|
import * as i3 from '@angular/forms';
|
13
13
|
import { FormGroupDirective, FormGroup, FormControl, Validators, NgControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
@@ -19,7 +19,7 @@ import { AbstractTuiControl, TuiInputModule, TuiTextfieldControllerModule, TuiCo
|
|
19
19
|
import * as i8 from '@maskito/angular';
|
20
20
|
import { MaskitoDirective } from '@maskito/angular';
|
21
21
|
import * as i2$1 from '@taiga-ui/kit';
|
22
|
-
import { TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiPreview, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiCarousel, TuiCheckbox, TuiStepper, TuiPagination, TuiHighlight, TuiAvatar, TuiBadge, TuiPreviewDialogService, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree } from '@taiga-ui/kit';
|
22
|
+
import { TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiPreview, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiCarousel, TuiCheckbox, TuiStepper, TuiPagination, TuiHighlight, TuiAvatar, TuiBadge, TuiLineClamp, TuiPreviewDialogService, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree } from '@taiga-ui/kit';
|
23
23
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
24
24
|
import * as i3$1 from '@taiga-ui/core/components/data-list';
|
25
25
|
import * as i2$2 from '@taiga-ui/polymorpheus';
|
@@ -645,11 +645,11 @@ class ScAddressesSelectionFieldComponent {
|
|
645
645
|
}
|
646
646
|
}
|
647
647
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScAddressesSelectionFieldComponent, deps: [{ token: FormGroupDirective, skipSelf: true }, { token: i1.ScLocationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
648
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field", ngImport: i0, template: "<div class=\"
|
648
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field", ngImport: i0, template: "<div class=\"grid items-start gap-4 sm:grid-cols-2\">\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>\n \u0420\u0435\u0433\u0438\u043E\u043D\n <tui-combo-box\n *tuiLet=\"(regions$ | async) ?? [] as regions\"\n [formControl]=\"regionControl\"\n [stringify]=\"stringify\"\n >\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input\n tuiTextfieldLegacy\n autocapitalize=\"off\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n />\n <tui-data-list-wrapper\n *tuiDataList\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"regions | tuiFilterByInput\"\n ></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error\n [formControl]=\"regionControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel>\n \u0413\u043E\u0440\u043E\u0434\n <tui-combo-box\n *tuiLet=\"(cities$ | async) ?? [] as cities\"\n [formControl]=\"cityControl\"\n [stringify]=\"stringify\"\n (ngModelChange)=\"onSelectedCity($event)\"\n >\n \u0413\u043E\u0440\u043E\u0434\n <input\n tuiTextfieldLegacy\n autocapitalize=\"off\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n />\n <tui-data-list-wrapper\n *tuiDataList\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"cities | tuiFilterByInput\"\n ></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error\n [formControl]=\"cityIdControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n <tui-error\n *ngIf=\"cityIdControl.untouched\"\n [formControl]=\"cityControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></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[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "directive", type: i1$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i6.TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i1$1.TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i5.TuiComboBoxComponent, selector: "tui-combo-box", inputs: ["stringify", "strictMatcher", "identityMatcher", "valueContent", "strict", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i5.TuiComboBoxDirective, selector: "tui-combo-box" }, { kind: "component", type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "pipe", type: i2$1.TuiFilterByInputPipe, name: "tuiFilterByInput" }, { kind: "pipe", type: i2$1.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
649
649
|
}
|
650
650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScAddressesSelectionFieldComponent, decorators: [{
|
651
651
|
type: Component,
|
652
|
-
args: [{ selector: 'sc-addresses-selection-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"
|
652
|
+
args: [{ selector: 'sc-addresses-selection-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"grid items-start gap-4 sm:grid-cols-2\">\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>\n \u0420\u0435\u0433\u0438\u043E\u043D\n <tui-combo-box\n *tuiLet=\"(regions$ | async) ?? [] as regions\"\n [formControl]=\"regionControl\"\n [stringify]=\"stringify\"\n >\n \u0420\u0435\u0433\u0438\u043E\u043D\n <input\n tuiTextfieldLegacy\n autocapitalize=\"off\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n />\n <tui-data-list-wrapper\n *tuiDataList\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"regions | tuiFilterByInput\"\n ></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error\n [formControl]=\"regionControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel>\n \u0413\u043E\u0440\u043E\u0434\n <tui-combo-box\n *tuiLet=\"(cities$ | async) ?? [] as cities\"\n [formControl]=\"cityControl\"\n [stringify]=\"stringify\"\n (ngModelChange)=\"onSelectedCity($event)\"\n >\n \u0413\u043E\u0440\u043E\u0434\n <input\n tuiTextfieldLegacy\n autocapitalize=\"off\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n />\n <tui-data-list-wrapper\n *tuiDataList\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"cities | tuiFilterByInput\"\n ></tui-data-list-wrapper>\n </tui-combo-box>\n <tui-error\n [formControl]=\"cityIdControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n <tui-error\n *ngIf=\"cityIdControl.untouched\"\n [formControl]=\"cityControl\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n</div>\n" }]
|
653
653
|
}], ctorParameters: () => [{ type: i3.FormGroupDirective, decorators: [{
|
654
654
|
type: SkipSelf
|
655
655
|
}, {
|
@@ -1140,6 +1140,10 @@ class ScSignUpFormComponent {
|
|
1140
1140
|
* Сигнал события аутентификации после успешной регистрации.
|
1141
1141
|
*/
|
1142
1142
|
this.successAuth = this.authService.getAuthChange().pipe(filter((state) => state));
|
1143
|
+
/**
|
1144
|
+
* Сигнал нажатия на "Договор оферты".
|
1145
|
+
*/
|
1146
|
+
this.clickOfferEvent = new EventEmitter();
|
1143
1147
|
/**
|
1144
1148
|
* Список этапов регистрации.
|
1145
1149
|
*/
|
@@ -1340,14 +1344,22 @@ class ScSignUpFormComponent {
|
|
1340
1344
|
removeContactGroup(index) {
|
1341
1345
|
this.contacts.removeAt(index);
|
1342
1346
|
}
|
1347
|
+
/**
|
1348
|
+
* Обрабатывает событие нажатия на "Договор оферты".
|
1349
|
+
*/
|
1350
|
+
onClickOffer() {
|
1351
|
+
this.clickOfferEvent.emit();
|
1352
|
+
}
|
1343
1353
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScSignUpFormComponent, deps: [{ token: i1.ScUserService }, { token: i1.ScAuthService }, { token: i1.ScReferencesService }, { token: i1.ScConvertersService }, { token: i1.ScUserMetrikaService }], target: i0.ɵɵFactoryTarget.Component }); }
|
1344
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth" }, ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel>\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label tuiLabel>{{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel\n class=\"w-full\"\n >\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel\n class=\"w-full\"\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel\n class=\"w-full\"\n >\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label tuiLabel> <input tuiCheckbox type=\"checkbox\"\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </label>\n <label tuiLabel> <input tuiCheckbox type=\"checkbox\"\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [loading]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i5.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "component", type: i5.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i5.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i1$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i1$1.TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i6.TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled", "value"] }, { kind: "component", type: i2$1.TuiCheckbox, selector: "input[type=\"checkbox\"][tuiCheckbox]", inputs: ["size"] }, { kind: "component", type: i2$1.TuiElasticContainer, selector: "tui-elastic-container" }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i2$1.TuiStepperComponent, selector: "tui-stepper, nav[tuiStepper]", inputs: ["orientation", "activeItemIndex"], outputs: ["activeItemIndexChange"] }, { kind: "component", type: i2$1.TuiStep, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: ["stepState", "icon"] }, { kind: "directive", type: i6.TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1354
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScSignUpFormComponent, selector: "sc-sign-up-form", outputs: { successAuth: "successAuth", clickOfferEvent: "clickOfferEvent" }, providers: [tuiDropdownOptionsProvider({ limitWidth: 'fixed' })], ngImport: i0, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel>\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label tuiLabel>\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <sc-verification-phone-check-form [shouldBeBusy]=\"false\"></sc-verification-phone-check-form>\n <label tuiLabel\n >\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <label tuiLabel>\n \u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel>\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <label tuiLabel>\n <input\n tuiCheckbox\n type=\"checkbox\"\n formControlName=\"getNews\"\n />\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </label>\n <label tuiLabel>\n <input\n tuiCheckbox\n type=\"checkbox\"\n required=\"true\"\n formControlName=\"acceptRules\"\n />\n <div>\n <span>\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"$event.preventDefault(); onClickOffer()\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.</span\n >\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </div>\n </label>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [loading]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i5.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "component", type: i5.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i5.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i1$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i1$1.TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i6.TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: ScVerificationPhoneCheckFormComponent, selector: "sc-verification-phone-check-form", inputs: ["showCodeFields", "readOnly", "shouldBeBusy", "shouldBeConfirmed", "haveCode"], outputs: ["haveCodeChange"] }, { kind: "component", type: ScAddressesSelectionFieldComponent, selector: "sc-addresses-selection-field" }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i3$1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled", "value"] }, { kind: "component", type: i2$1.TuiCheckbox, selector: "input[type=\"checkbox\"][tuiCheckbox]", inputs: ["size"] }, { kind: "component", type: i2$1.TuiElasticContainer, selector: "tui-elastic-container" }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: ScNewContragentBankAccountsFormComponent, selector: "sc-new-contragent-bank-account-form", inputs: ["form"] }, { kind: "component", type: ScNewContragentFormComponent, selector: "sc-new-contragent-form", inputs: ["opfControl"] }, { kind: "component", type: ScNewContactFormComponent, selector: "sc-new-contact-form", inputs: ["form"] }, { kind: "component", type: i2$1.TuiStepperComponent, selector: "tui-stepper, nav[tuiStepper]", inputs: ["orientation", "activeItemIndex"], outputs: ["activeItemIndexChange"] }, { kind: "component", type: i2$1.TuiStep, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: ["stepState", "icon"] }, { kind: "directive", type: i6.TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1345
1355
|
}
|
1346
1356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScSignUpFormComponent, decorators: [{
|
1347
1357
|
type: Component,
|
1348
|
-
args: [{ selector: 'sc-sign-up-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel>\u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label tuiLabel>{{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <sc-verification-phone-check-form\n [shouldBeBusy]=\"false\"\n class=\"w-full\"\n ></sc-verification-phone-check-form>\n <label\n tuiLabel\n class=\"w-full\"\n >\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label\n tuiLabel\n class=\"w-full\"\n >\u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel\n class=\"w-full\"\n >\u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"flex flex-col items-start gap-5 sm:flex-row\">\n <label tuiLabel> <input tuiCheckbox type=\"checkbox\"\n formControlName=\"getNews\"\n class=\"w-full\"\n >\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </label>\n <label tuiLabel> <input tuiCheckbox type=\"checkbox\"\n required=\"true\"\n formControlName=\"acceptRules\"\n class=\"w-full\"\n >\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [loading]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
|
1358
|
+
args: [{ selector: 'sc-sign-up-form', providers: [tuiDropdownOptionsProvider({ limitWidth: 'fixed' })], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"opfControl.value as selectOpf\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col gap-5\"\n>\n <ng-container *tuiLet=\"!!selectOpf && opfListEnum[selectOpf] === opfListEnum.individual as isIndividual\">\n <tui-stepper\n *ngIf=\"!isIndividual && form.controls.contragent\"\n [(activeItemIndex)]=\"stepIndex\"\n >\n <button\n *tuiRepeatTimes=\"let index of 4\"\n [stepState]=\"index && !canNextStep(index) ? 'error' : 'pass'\"\n [attr.disabled]=\"index && !canNextStep(index - 1) ? '' : null\"\n tuiStep\n >\n {{ steps[index] }}\n </button>\n </tui-stepper>\n <tui-elastic-container>\n <div\n [class.!hidden]=\"stepIndex !== 0\"\n class=\"flex flex-col gap-3\"\n >\n <label tuiLabel>\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-select\n [formControl]=\"opfControl\"\n [valueContent]=\"opfContent\"\n >\n \u0422\u0438\u043F \u043A\u043B\u0438\u0435\u043D\u0442\u0430\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let item of getOpf$() | async; let index = index\"\n tuiOption\n [value]=\"item.slug\"\n >\n {{ item.name }}\n </button>\n </tui-data-list>\n </tui-select>\n <ng-template\n #opfContent\n let-data\n >\n <div>{{ (getOpfBySlug$(data) | async)?.name }}</div>\n </ng-template>\n </label>\n <label tuiLabel>\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <tui-input formControlName=\"name\">\n {{ isIndividual ? '\u0424.\u0418.\u041E.' : '\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0418\u041F' }}\n <ng-container *ngIf=\"!isIndividual\">\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.organization\"\n (selectedClick)=\"onSelectedOrganization($event)\"\n ></sc-suggestion-field>\n </ng-container>\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <sc-verification-phone-check-form [shouldBeBusy]=\"false\"></sc-verification-phone-check-form>\n <label tuiLabel\n >\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n\n <sc-addresses-selection-field></sc-addresses-selection-field>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <label tuiLabel>\n \u041F\u0430\u0440\u043E\u043B\u044C\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"password\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel>\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <tui-input-password formControlName=\"passwordConfirm\">\n \u041F\u043E\u0432\u0442\u043E\u0440 \u043F\u0430\u0440\u043E\u043B\u044F\n <input\n tuiTextfieldLegacy\n autocomplete=\"new-password\"\n />\n </tui-input-password>\n <tui-error\n formControlName=\"passwordConfirm\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n </div>\n <tui-error\n [error]=\"[] | tuiFieldError | async\"\n class=\"self-center\"\n ></tui-error>\n\n <div class=\"grid items-start gap-5 sm:grid-cols-2\">\n <label tuiLabel>\n <input\n tuiCheckbox\n type=\"checkbox\"\n formControlName=\"getNews\"\n />\n \u042F \u0445\u043E\u0447\u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0421\u043D\u0430\u0431\u0446\u0435\u043D\u0442\u0440 \u043E \u0441\u043A\u0438\u0434\u043A\u0430\u0445 \u0438 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435.\n </label>\n <label tuiLabel>\n <input\n tuiCheckbox\n type=\"checkbox\"\n required=\"true\"\n formControlName=\"acceptRules\"\n />\n <div>\n <span>\n \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044F\u0441\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435, \u044F \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u044E\u0441\u044C \u0441\n <a\n tuiLink\n [pseudo]=\"true\"\n (click)=\"$event.preventDefault(); onClickOffer()\"\n >\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u043E\u043C \u043E\u0444\u0435\u0440\u0442\u044B</a\n >.</span\n >\n <tui-error\n formControlName=\"acceptRules\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </div>\n </label>\n </div>\n </div>\n <ng-container *ngIf=\"!isIndividual\">\n <sc-new-contragent-form\n [opfControl]=\"opfControl\"\n [class.!hidden]=\"stepIndex !== 1\"\n ></sc-new-contragent-form>\n\n <div [class.!hidden]=\"stepIndex !== 2\">\n <div\n *ngIf=\"contacts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B</p>\n <div\n *ngFor=\"let contact of contacts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-10 items-center justify-between\">\n <p class=\"font-bold\">\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeContactGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contact-form [form]=\"contact\"></sc-new-contact-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addContactGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\n </button>\n </div>\n </div>\n\n <div [class.!hidden]=\"stepIndex !== 3\">\n <div\n *ngIf=\"bankAccounts\"\n class=\"flex flex-col gap-5 pb-1\"\n >\n <p class=\"text-lg font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B</p>\n <div\n *ngFor=\"let bankAccount of bankAccounts.controls; let index = index; let count = count; let last = last\"\n class=\"flex flex-col gap-3\"\n >\n <div class=\"flex h-12 items-center justify-between\">\n <p class=\"font-bold\">\u0411\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u2116{{ index + 1 }}:</p>\n <button\n *ngIf=\"count - 1\"\n tuiIconButton\n appearance=\"secondary\"\n (click)=\"removeBankAccountGroup(index)\"\n iconStart=\"@tui.trash-2\"\n ></button>\n </div>\n <sc-new-contragent-bank-account-form [form]=\"bankAccount\"></sc-new-contragent-bank-account-form>\n <hr\n *ngIf=\"!last\"\n class=\"h-px w-full bg-tui-base-04\"\n />\n </div>\n <button\n tuiButton\n iconStart=\"@tui.plus\"\n appearance=\"secondary\"\n (click)=\"addBankAccountGroup()\"\n type=\"button\"\n class=\"self-center\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0435 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B\n </button>\n </div>\n </div>\n </ng-container>\n </tui-elastic-container>\n <div class=\"flex justify-center gap-2\">\n <button\n *ngIf=\"stepIndex > 0\"\n tuiButton\n appearance=\"secondary\"\n type=\"button\"\n (click)=\"navigate(-1)\"\n >\n \u041D\u0430\u0437\u0430\u0434\n </button>\n <button\n *ngIf=\"isIndividual || (stepIndex === 2 && !form.controls.contragent.controls['bankAccounts']) || stepIndex === 3; else nextIndexBtn\"\n tuiButton\n [disabled]=\"form.invalid\"\n [loading]=\"!!(loading$ | async)\"\n class=\"self-center\"\n >\n \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F\n </button>\n <ng-template #nextIndexBtn>\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"!canNextStep(stepIndex)\"\n (click)=\"navigate(1)\"\n >\n \u0414\u0430\u043B\u0435\u0435\n </button>\n </ng-template>\n </div>\n </ng-container>\n</form>\n" }]
|
1349
1359
|
}], ctorParameters: () => [{ type: i1.ScUserService }, { type: i1.ScAuthService }, { type: i1.ScReferencesService }, { type: i1.ScConvertersService }, { type: i1.ScUserMetrikaService }], propDecorators: { successAuth: [{
|
1350
1360
|
type: Output
|
1361
|
+
}], clickOfferEvent: [{
|
1362
|
+
type: Output
|
1351
1363
|
}] } });
|
1352
1364
|
|
1353
1365
|
/**
|
@@ -3138,11 +3150,11 @@ class ScFavoriteBtnComponent {
|
|
3138
3150
|
this.disabled = false;
|
3139
3151
|
}
|
3140
3152
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScFavoriteBtnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScFavoriteBtnComponent, selector: "sc-favorite-btn", inputs: { isFavorite: "isFavorite", showLoader: "showLoader", disabled: "disabled" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<button\n tuiIconButton\n (click)=\"clickEvent.emit()\"\n [disabled]=\"disabled\"\n [loading]=\"showLoader\"\n appearance=\"flat\"\n size=\"s\"\n>\n <tui-icon\n class=\"
|
3153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScFavoriteBtnComponent, selector: "sc-favorite-btn", inputs: { isFavorite: "isFavorite", showLoader: "showLoader", disabled: "disabled" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<button\n tuiIconButton\n (click)=\"clickEvent.emit()\"\n [disabled]=\"disabled\"\n [loading]=\"showLoader\"\n appearance=\"flat\"\n size=\"s\"\n>\n <tui-icon\n class=\"text-tui-primary !text-xl\"\n [icon]=\"isFavorite ? '@tui.bookmark-filled' : '@tui.bookmark'\"\n ></tui-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3142
3154
|
}
|
3143
3155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScFavoriteBtnComponent, decorators: [{
|
3144
3156
|
type: Component,
|
3145
|
-
args: [{ selector: 'sc-favorite-btn', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n tuiIconButton\n (click)=\"clickEvent.emit()\"\n [disabled]=\"disabled\"\n [loading]=\"showLoader\"\n appearance=\"flat\"\n size=\"s\"\n>\n <tui-icon\n class=\"
|
3157
|
+
args: [{ selector: 'sc-favorite-btn', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n tuiIconButton\n (click)=\"clickEvent.emit()\"\n [disabled]=\"disabled\"\n [loading]=\"showLoader\"\n appearance=\"flat\"\n size=\"s\"\n>\n <tui-icon\n class=\"text-tui-primary !text-xl\"\n [icon]=\"isFavorite ? '@tui.bookmark-filled' : '@tui.bookmark'\"\n ></tui-icon>\n</button>\n" }]
|
3146
3158
|
}], propDecorators: { clickEvent: [{
|
3147
3159
|
type: Output
|
3148
3160
|
}], isFavorite: [{
|
@@ -3161,23 +3173,17 @@ class ScCategoryCardComponent {
|
|
3161
3173
|
* Инициализирует экземпляр класса {@link CategoryCardComponent}.
|
3162
3174
|
*
|
3163
3175
|
* @param urls Список ссылок на разделы backend'a.
|
3164
|
-
* @param renderer Экземпляр базового класса для реализации пользовательского рендеринга.
|
3165
3176
|
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
3177
|
+
* @param cdr Объект для работы с обнаружением изменений.
|
3166
3178
|
*/
|
3167
|
-
constructor(urls,
|
3179
|
+
constructor(urls, pathImageNotFound, cdr) {
|
3168
3180
|
this.urls = urls;
|
3169
|
-
this.renderer = renderer;
|
3170
3181
|
this.pathImageNotFound = pathImageNotFound;
|
3171
|
-
this.authService = authService;
|
3172
3182
|
this.cdr = cdr;
|
3173
3183
|
/**
|
3174
3184
|
* Размер карточки категории.
|
3175
3185
|
*/
|
3176
3186
|
this.size = 'm';
|
3177
|
-
/**
|
3178
|
-
* Признак, что карточка является скелетоном.
|
3179
|
-
*/
|
3180
|
-
this.isSkeleton = false;
|
3181
3187
|
/**
|
3182
3188
|
* Признак, что необходимо отобразить лоадер для кнопки избранных товаров и категорий.
|
3183
3189
|
*/
|
@@ -3185,11 +3191,15 @@ class ScCategoryCardComponent {
|
|
3185
3191
|
/**
|
3186
3192
|
* {@link Observable} изменения статуса авторизации.
|
3187
3193
|
*/
|
3188
|
-
this.authStatus$ =
|
3194
|
+
this.authStatus$ = inject(ScAuthService).getAuthChange();
|
3189
3195
|
/**
|
3190
|
-
* Признак
|
3196
|
+
* Признак наведения на карточку.
|
3191
3197
|
*/
|
3192
3198
|
this.isHovered = false;
|
3199
|
+
/**
|
3200
|
+
* Признак того, отображается этот компонент на мобильном устройстве или нет.
|
3201
|
+
*/
|
3202
|
+
this.isMobile = inject(TUI_IS_MOBILE);
|
3193
3203
|
/**
|
3194
3204
|
* Событие нажатия на карточку категории.
|
3195
3205
|
*/
|
@@ -3200,71 +3210,52 @@ class ScCategoryCardComponent {
|
|
3200
3210
|
this.clickOnFavoriteEvent = new EventEmitter();
|
3201
3211
|
}
|
3202
3212
|
/**
|
3203
|
-
*
|
3213
|
+
* Обработчик события наведения.
|
3204
3214
|
*
|
3205
|
-
* @param
|
3206
|
-
*/
|
3207
|
-
getCategoryImgURL(category) {
|
3208
|
-
return category.properties?.image ? this.urls.imgServerUrl + '/' + category.properties?.image : this.pathImageNotFound;
|
3209
|
-
}
|
3210
|
-
/**
|
3211
|
-
* Обработчик события mousemove.
|
3215
|
+
* @param isHovered Признак наведения на карточку.
|
3212
3216
|
*/
|
3213
|
-
|
3214
|
-
|
3215
|
-
this.name.nativeElement.style.maxHeight = `${this.name.nativeElement.scrollHeight / 16}rem`;
|
3216
|
-
}
|
3217
|
+
onHovered(isHovered) {
|
3218
|
+
this.isHovered = isHovered;
|
3217
3219
|
}
|
3218
3220
|
/**
|
3219
|
-
*
|
3221
|
+
* Возвращает путь к изображению категории. Если путь отсутствует, то вернёт изображение по-умолчанию ("product_not_found").
|
3222
|
+
*
|
3223
|
+
* @param category Информация о категории.
|
3220
3224
|
*/
|
3221
|
-
|
3222
|
-
|
3223
|
-
this.renderer.setStyle(this.name.nativeElement, 'maxHeight', null);
|
3224
|
-
}
|
3225
|
+
getCategoryImgURL(category) {
|
3226
|
+
return category.properties?.image ? `${this.urls.imgServerUrl}/${category.properties.image}` : this.pathImageNotFound;
|
3225
3227
|
}
|
3226
3228
|
/**
|
3227
3229
|
* Устанавливает компонент в очередь на обновление.
|
3230
|
+
*
|
3231
|
+
* @deprecated
|
3228
3232
|
*/
|
3229
3233
|
markForCheck() {
|
3230
3234
|
this.cdr.markForCheck();
|
3231
3235
|
}
|
3232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCategoryCardComponent, deps: [{ token: SC_URLS }, { token:
|
3233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScCategoryCardComponent, selector: "sc-category-card", inputs: { category: "category", size: "size"
|
3236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCategoryCardComponent, deps: [{ token: SC_URLS }, { token: SC_PATH_IMAGE_NOT_FOUND }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
3237
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScCategoryCardComponent, selector: "sc-category-card", inputs: { category: "category", size: "size" }, outputs: { clickOnCardEvent: "clickOnCardEvent", clickOnFavoriteEvent: "clickOnFavoriteEvent" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0, template: "<div class=\"relative\">\n <button\n (click)=\"clickOnCardEvent.emit(category)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n class=\"category-btn rounded-tui-radius-m border-tui-base-04 flex flex-col overflow-hidden border\"\n >\n <div class=\"img-wrapper w-full grow overflow-hidden\">\n <img\n *ngIf=\"category && category.properties?.image\"\n [src]=\"getCategoryImgURL(category)\"\n [alt]=\"category.name\"\n class=\"size-full object-cover\"\n />\n\n <div\n *ngIf=\"!category\"\n class=\"img-wrapper bg-tui-base-02 size-full\"\n ></div>\n\n <img\n *ngIf=\"category && !category.properties?.image\"\n [src]=\"getCategoryImgURL(category)\"\n [alt]=\"category.name\"\n class=\"size-full rounded-xl object-contain p-2\"\n />\n </div>\n\n <div class=\"name flex w-full items-center justify-center\">\n <tui-line-clamp\n *ngIf=\"category; else skeletonName\"\n [content]=\"category.name\"\n class=\"pointer-events-none !h-auto\"\n [linesLimit]=\"isHovered || isMobile ? 4 : 2\"\n />\n </div>\n <ng-template #skeletonName>\n <div class=\"skeleton-name bg-tui-base-02 rounded-tui-radius-s\"></div>\n </ng-template>\n </button>\n <sc-favorite-btn\n *ngIf=\"category && (authStatus$ | async)\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"category.isFavorite\"\n (clickEvent)=\"clickOnFavoriteEvent.emit()\"\n class=\"absolute left-1 top-1\"\n ></sc-favorite-btn>\n</div>\n", styles: [":host{--tui-duration: .15s}:host[data-size=m] button.category-btn{width:100%;height:12.5rem}:host[data-size=m] button.category-btn .img-wrapper{max-height:8.75rem}:host[data-size=m] button.category-btn .name{padding:.25rem 1rem;margin-block:auto;font-size:.9375rem;line-height:1.5rem;font-weight:800}:host[data-size=m] button.category-btn .name .skeleton-name{width:10rem;height:1rem}:host[data-size=s] button.category-btn{width:100%;height:10rem}:host[data-size=s] button.category-btn .img-wrapper{max-height:7rem}:host[data-size=s] button.category-btn .name{padding:.25rem .5rem;margin-block:auto;font-size:.8125rem;line-height:1.25rem;font-weight:800}:host[data-size=s] button.category-btn .name .skeleton-name{width:7rem;height:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.TuiLineClamp, selector: "tui-line-clamp", inputs: ["lineHeight", "content", "linesLimit"], outputs: ["overflownChange"] }, { kind: "directive", type: i6.TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "component", type: ScFavoriteBtnComponent, selector: "sc-favorite-btn", inputs: ["isFavorite", "showLoader", "disabled"], outputs: ["clickEvent"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3234
3238
|
}
|
3235
3239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCategoryCardComponent, decorators: [{
|
3236
3240
|
type: Component,
|
3237
|
-
args: [{ selector: 'sc-category-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative
|
3241
|
+
args: [{ selector: 'sc-category-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative\">\n <button\n (click)=\"clickOnCardEvent.emit(category)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n class=\"category-btn rounded-tui-radius-m border-tui-base-04 flex flex-col overflow-hidden border\"\n >\n <div class=\"img-wrapper w-full grow overflow-hidden\">\n <img\n *ngIf=\"category && category.properties?.image\"\n [src]=\"getCategoryImgURL(category)\"\n [alt]=\"category.name\"\n class=\"size-full object-cover\"\n />\n\n <div\n *ngIf=\"!category\"\n class=\"img-wrapper bg-tui-base-02 size-full\"\n ></div>\n\n <img\n *ngIf=\"category && !category.properties?.image\"\n [src]=\"getCategoryImgURL(category)\"\n [alt]=\"category.name\"\n class=\"size-full rounded-xl object-contain p-2\"\n />\n </div>\n\n <div class=\"name flex w-full items-center justify-center\">\n <tui-line-clamp\n *ngIf=\"category; else skeletonName\"\n [content]=\"category.name\"\n class=\"pointer-events-none !h-auto\"\n [linesLimit]=\"isHovered || isMobile ? 4 : 2\"\n />\n </div>\n <ng-template #skeletonName>\n <div class=\"skeleton-name bg-tui-base-02 rounded-tui-radius-s\"></div>\n </ng-template>\n </button>\n <sc-favorite-btn\n *ngIf=\"category && (authStatus$ | async)\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"category.isFavorite\"\n (clickEvent)=\"clickOnFavoriteEvent.emit()\"\n class=\"absolute left-1 top-1\"\n ></sc-favorite-btn>\n</div>\n", styles: [":host{--tui-duration: .15s}:host[data-size=m] button.category-btn{width:100%;height:12.5rem}:host[data-size=m] button.category-btn .img-wrapper{max-height:8.75rem}:host[data-size=m] button.category-btn .name{padding:.25rem 1rem;margin-block:auto;font-size:.9375rem;line-height:1.5rem;font-weight:800}:host[data-size=m] button.category-btn .name .skeleton-name{width:10rem;height:1rem}:host[data-size=s] button.category-btn{width:100%;height:10rem}:host[data-size=s] button.category-btn .img-wrapper{max-height:7rem}:host[data-size=s] button.category-btn .name{padding:.25rem .5rem;margin-block:auto;font-size:.8125rem;line-height:1.25rem;font-weight:800}:host[data-size=s] button.category-btn .name .skeleton-name{width:7rem;height:.75rem}\n"] }]
|
3238
3242
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
3239
3243
|
type: Inject,
|
3240
3244
|
args: [SC_URLS]
|
3241
|
-
}] }, { type:
|
3245
|
+
}] }, { type: undefined, decorators: [{
|
3242
3246
|
type: Inject,
|
3243
3247
|
args: [SC_PATH_IMAGE_NOT_FOUND]
|
3244
|
-
}] }, { type:
|
3248
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { category: [{
|
3245
3249
|
type: Input
|
3246
|
-
}], name: [{
|
3247
|
-
type: ViewChild,
|
3248
|
-
args: ['name']
|
3249
3250
|
}], size: [{
|
3250
3251
|
type: Input
|
3251
3252
|
}, {
|
3252
3253
|
type: HostBinding,
|
3253
3254
|
args: ['attr.data-size']
|
3254
|
-
}], isSkeleton: [{
|
3255
|
-
type: Input
|
3256
|
-
}], isHovered: [{
|
3257
|
-
type: Input
|
3258
3255
|
}], clickOnCardEvent: [{
|
3259
3256
|
type: Output
|
3260
3257
|
}], clickOnFavoriteEvent: [{
|
3261
3258
|
type: Output
|
3262
|
-
}], moveEnterHandler: [{
|
3263
|
-
type: HostListener,
|
3264
|
-
args: ['mousemove']
|
3265
|
-
}], mouseLeaveHandler: [{
|
3266
|
-
type: HostListener,
|
3267
|
-
args: ['mouseleave']
|
3268
3259
|
}] } });
|
3269
3260
|
|
3270
3261
|
/* eslint-disable @typescript-eslint/dot-notation */
|
@@ -3377,11 +3368,11 @@ class ScInputQuantityComponent extends AbstractTuiNullableControl {
|
|
3377
3368
|
this.clickClearEvent.emit();
|
3378
3369
|
}
|
3379
3370
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScInputQuantityComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
3380
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", ignoreStepValidators: "ignoreStepValidators", 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\n *ngIf=\"formControl\"\n class=\"w-full\"\n [overlay]=\"true\"\n [showLoader]=\"showLoader\"\n [size]=\"size\"\n>\n <div class=\"flex items-center gap-1 text-center\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [
|
3371
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", showLoader: "showLoader", showCross: "showCross", ignoreStepValidators: "ignoreStepValidators", 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\n *ngIf=\"formControl\"\n class=\"w-full\"\n [overlay]=\"true\"\n [showLoader]=\"showLoader\"\n [size]=\"size\"\n>\n <div class=\"flex items-center gap-1 text-center\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canDecrement']\"\n (click.prevent)=\"decrement(true)\"\n >\n <tui-icon icon=\"@tui.minus\"></tui-icon>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async)?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"ignoreStepValidators ? 1 : step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n (focusin)=\"$any($event.target).select()\"\n oncontextmenu=\"return false;\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canIncrement']\"\n (click.prevent)=\"incident(true)\"\n >\n <tui-icon icon=\"@tui.plus\"></tui-icon>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canIncrement']\"\n (click.prevent)=\"clear()\"\n >\n <tui-icon icon=\"@tui.x\"></tui-icon>\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-background-base);box-shadow:inset 0 0 0 .0625rem var(--tui-background-neutral-1-hover)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-status-warning-pale)}:host .field-with-button:has(._invalid){background-color:var(--tui-status-negative-pale)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "component", type: i5.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "step"] }, { kind: "directive", type: i5.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "directive", type: i5.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i5.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: i1$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"] }, { kind: "component", type: i1$1.TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3381
3372
|
}
|
3382
3373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScInputQuantityComponent, decorators: [{
|
3383
3374
|
type: Component,
|
3384
|
-
args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader\n *ngIf=\"formControl\"\n class=\"w-full\"\n [overlay]=\"true\"\n [showLoader]=\"showLoader\"\n [size]=\"size\"\n>\n <div class=\"flex items-center gap-1 text-center\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [
|
3375
|
+
args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader\n *ngIf=\"formControl\"\n class=\"w-full\"\n [overlay]=\"true\"\n [showLoader]=\"showLoader\"\n [size]=\"size\"\n>\n <div class=\"flex items-center gap-1 text-center\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canDecrement']\"\n (click.prevent)=\"decrement(true)\"\n >\n <tui-icon icon=\"@tui.minus\"></tui-icon>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async)?.message\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"ignoreStepValidators ? 1 : step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n (focusin)=\"$any($event.target).select()\"\n oncontextmenu=\"return false;\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canIncrement']\"\n (click.prevent)=\"incident(true)\"\n >\n <tui-icon icon=\"@tui.plus\"></tui-icon>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput['canIncrement']\"\n (click.prevent)=\"clear()\"\n >\n <tui-icon icon=\"@tui.x\"></tui-icon>\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-background-base);box-shadow:inset 0 0 0 .0625rem var(--tui-background-neutral-1-hover)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-status-warning-pale)}:host .field-with-button:has(._invalid){background-color:var(--tui-status-negative-pale)}\n"] }]
|
3385
3376
|
}], propDecorators: { numberInput: [{
|
3386
3377
|
type: ViewChild,
|
3387
3378
|
args: [TuiInputNumberComponent]
|
@@ -3529,11 +3520,11 @@ class ScPriceCardComponent extends AbstractScPriceCard {
|
|
3529
3520
|
this.cdr.markForCheck();
|
3530
3521
|
}
|
3531
3522
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScPriceCardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
3532
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScPriceCardComponent, selector: "sc-price-card", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size" } }, providers: [SEARCH_TERM_PROVIDERS], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"\n>\n <div class=\"flex items-center justify-between\">\n <span\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </span>\n\n <div class=\"flex gap-2\">\n <sc-favorite-btn\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <tui-avatar\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"@tui.star-filled\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-negative-pale-hover)'\"\n [style.color]=\"'var(--tui-text-negative)'\"\n ></tui-avatar>\n </div>\n </div>\n\n <sc-hover-image-carousel\n (click)=\"clickCardEvent.emit()\"\n [images]=\"!isMobile ? getCardImagePreviewList(product) : [getCardImagePreview()]\"\n class=\"cursor-pointer\"\n ></sc-hover-image-carousel>\n <div class=\"flex grow flex-col justify-between gap-1\">\n <div class=\"flex flex-col gap-1\">\n <a\n tuiLink\n class=\"name\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n <div\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02 flex gap-1\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-icon\n *ngIf=\"product.ignoreMinCountCheck\"\n icon=\"@tui.package\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n class=\"text-body-xl text-tui-text-01 opacity-90\"\n tuiHintDirection=\"top\"\n ></tui-icon>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </div>\n <span *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\">\n \u0414\u0430\u0442\u0430:\n <a\n tuiLink\n [pseudo]=\"true\"\n class=\"text-tui-text-02\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n {{ product.costDate }}\n </a>\n </span>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-wrap items-center gap-x-2 gap-y-1\"\n >\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1\">\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost\"\n >{{ product.costRubString }}</span\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"m\"\n class=\"text-body-xs\"\n [style.background]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"s\"\n [style.background]=\"'var(--tui-background-base)'\"\n class=\"text-tui-text-02 text-body-xs-bold\"\n >\n {{ discount.percent }}%\n </tui-badge>\n <span class=\"line-through\">{{ product.discountCostString }}</span>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </tui-badge>\n </div>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-body-xs-bold text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </div>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"mt-1 flex gap-2\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [loading]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"grow !font-extrabold\"\n iconStart=\"@tui.shopping-cart\"\n >\n \u0412 \u043A\u043E\u0440\u0437\u0438\u043D\u0443\n </button>\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"showQuantityControl\"\n [formControl]=\"quantityControl\"\n [size]=\"size\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n [showLoader]=\"quantityShowLoader\"\n (clickClearEvent)=\"clickClearEvent.emit(cartItem)\"\n class=\"w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n <tui-avatar\n *ngIf=\"product.cartItem && !showQuantityControl\"\n src=\"@tui.check\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-warning-pale)'\"\n [style.color]=\"'var(--tui-background-accent-1)'\"\n ></tui-avatar>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"></div>\n</ng-template>\n", styles: [":host tui-badge{--t-padding: .25rem !important}:host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{font-size:.6875rem;line-height:1rem;font-weight:500}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font-size:.8125rem;line-height:1.25rem;font-weight:800}:host[data-size=m] .card-wrapper{font-size:.8125rem;line-height:1.25rem;font-weight:500}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font-size:.9375rem;line-height:1.5rem;font-weight:800}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { 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: "directive", type: i1$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"] }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i2$1.TuiHighlight, selector: "[tuiHighlight]", inputs: ["tuiHighlight", "tuiHighlightColor"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "component", type: i2$1.TuiAvatar, selector: "tui-avatar,button[tuiAvatar],a[tuiAvatar]", inputs: ["size", "round", "src"] }, { kind: "directive", type: i2$1.TuiBadge, selector: "tui-badge,[tuiBadge]", inputs: ["size"] }, { kind: "component", type: HoverImageCarouselComponent, selector: "sc-hover-image-carousel", inputs: ["images"] }, { kind: "component", type: ScFavoriteBtnComponent, selector: "sc-favorite-btn", inputs: ["isFavorite", "showLoader", "disabled"], outputs: ["clickEvent"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3523
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScPriceCardComponent, selector: "sc-price-card", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size" } }, providers: [SEARCH_TERM_PROVIDERS], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"\n>\n <div class=\"flex items-center justify-between\">\n <span\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </span>\n\n <div class=\"flex gap-2\">\n <sc-favorite-btn\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <tui-avatar\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"@tui.star-filled\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-negative-pale-hover)'\"\n [style.color]=\"'var(--tui-text-negative)'\"\n ></tui-avatar>\n </div>\n </div>\n\n <sc-hover-image-carousel\n (click)=\"clickCardEvent.emit()\"\n [images]=\"!isMobile ? getCardImagePreviewList(product) : [getCardImagePreview()]\"\n class=\"cursor-pointer\"\n ></sc-hover-image-carousel>\n <div class=\"flex grow flex-col justify-between gap-1\">\n <div class=\"flex flex-col gap-1\">\n <a\n tuiLink\n class=\"name\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n <div\n *ngIf=\"product?.pack\"\n class=\"flex items-center gap-1 text-tui-text-02\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-icon\n *ngIf=\"product.ignoreMinCountCheck\"\n icon=\"@tui.package\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n class=\"text-body-xl text-tui-text-01 opacity-90\"\n tuiHintDirection=\"top\"\n class=\"text-xl\"\n ></tui-icon>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </div>\n <span *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\">\n \u0414\u0430\u0442\u0430:\n <a\n tuiLink\n [pseudo]=\"true\"\n class=\"text-tui-text-02\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n {{ product.costDate }}\n </a>\n </span>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-wrap items-center gap-x-2 gap-y-1\"\n >\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1\">\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost\"\n >{{ product.costRubString }}</span\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"m\"\n class=\"text-body-xs\"\n [style.background]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"s\"\n [style.background]=\"'var(--tui-background-base)'\"\n class=\"text-tui-text-02 text-body-xs-bold\"\n >\n {{ discount.percent }}%\n </tui-badge>\n <span class=\"line-through\">{{ product.discountCostString }}</span>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </tui-badge>\n </div>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-body-xs-bold text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </div>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"mt-1 flex gap-2\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [loading]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"grow !font-extrabold\"\n iconStart=\"@tui.shopping-cart\"\n >\n \u0412 \u043A\u043E\u0440\u0437\u0438\u043D\u0443\n </button>\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"showQuantityControl\"\n [formControl]=\"quantityControl\"\n [size]=\"size\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n [showLoader]=\"quantityShowLoader\"\n (clickClearEvent)=\"clickClearEvent.emit(cartItem)\"\n class=\"w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n <tui-avatar\n *ngIf=\"product.cartItem && !showQuantityControl\"\n src=\"@tui.check\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-warning-pale)'\"\n [style.color]=\"'var(--tui-background-accent-1)'\"\n ></tui-avatar>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"></div>\n</ng-template>\n", styles: [":host tui-badge{--t-padding: .25rem !important}:host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{font-size:.6875rem;line-height:1rem;font-weight:500}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font-size:.8125rem;line-height:1.25rem;font-weight:800}:host[data-size=m] .card-wrapper{font-size:.8125rem;line-height:1.25rem;font-weight:500}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font-size:.9375rem;line-height:1.5rem;font-weight:800}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { 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: "directive", type: i1$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"] }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: i2$1.TuiHighlight, selector: "[tuiHighlight]", inputs: ["tuiHighlight", "tuiHighlightColor"] }, { kind: "component", type: i2$1.TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "component", type: i2$1.TuiAvatar, selector: "tui-avatar,button[tuiAvatar],a[tuiAvatar]", inputs: ["size", "round", "src"] }, { kind: "directive", type: i2$1.TuiBadge, selector: "tui-badge,[tuiBadge]", inputs: ["size"] }, { kind: "component", type: HoverImageCarouselComponent, selector: "sc-hover-image-carousel", inputs: ["images"] }, { kind: "component", type: ScFavoriteBtnComponent, selector: "sc-favorite-btn", inputs: ["isFavorite", "showLoader", "disabled"], outputs: ["clickEvent"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3533
3524
|
}
|
3534
3525
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScPriceCardComponent, decorators: [{
|
3535
3526
|
type: Component,
|
3536
|
-
args: [{ selector: 'sc-price-card', providers: [SEARCH_TERM_PROVIDERS], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"\n>\n <div class=\"flex items-center justify-between\">\n <span\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </span>\n\n <div class=\"flex gap-2\">\n <sc-favorite-btn\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <tui-avatar\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"@tui.star-filled\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-negative-pale-hover)'\"\n [style.color]=\"'var(--tui-text-negative)'\"\n ></tui-avatar>\n </div>\n </div>\n\n <sc-hover-image-carousel\n (click)=\"clickCardEvent.emit()\"\n [images]=\"!isMobile ? getCardImagePreviewList(product) : [getCardImagePreview()]\"\n class=\"cursor-pointer\"\n ></sc-hover-image-carousel>\n <div class=\"flex grow flex-col justify-between gap-1\">\n <div class=\"flex flex-col gap-1\">\n <a\n tuiLink\n class=\"name\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n <div\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02
|
3527
|
+
args: [{ selector: 'sc-price-card', providers: [SEARCH_TERM_PROVIDERS], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"\n>\n <div class=\"flex items-center justify-between\">\n <span\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </span>\n\n <div class=\"flex gap-2\">\n <sc-favorite-btn\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <tui-avatar\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"@tui.star-filled\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-negative-pale-hover)'\"\n [style.color]=\"'var(--tui-text-negative)'\"\n ></tui-avatar>\n </div>\n </div>\n\n <sc-hover-image-carousel\n (click)=\"clickCardEvent.emit()\"\n [images]=\"!isMobile ? getCardImagePreviewList(product) : [getCardImagePreview()]\"\n class=\"cursor-pointer\"\n ></sc-hover-image-carousel>\n <div class=\"flex grow flex-col justify-between gap-1\">\n <div class=\"flex flex-col gap-1\">\n <a\n tuiLink\n class=\"name\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n <div\n *ngIf=\"product?.pack\"\n class=\"flex items-center gap-1 text-tui-text-02\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-icon\n *ngIf=\"product.ignoreMinCountCheck\"\n icon=\"@tui.package\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n class=\"text-body-xl text-tui-text-01 opacity-90\"\n tuiHintDirection=\"top\"\n class=\"text-xl\"\n ></tui-icon>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </div>\n <span *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\">\n \u0414\u0430\u0442\u0430:\n <a\n tuiLink\n [pseudo]=\"true\"\n class=\"text-tui-text-02\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n {{ product.costDate }}\n </a>\n </span>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-wrap items-center gap-x-2 gap-y-1\"\n >\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1\">\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost\"\n >{{ product.costRubString }}</span\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"m\"\n class=\"text-body-xs\"\n [style.background]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n >\n <tui-badge\n *ngIf=\"product.discount as discount\"\n size=\"s\"\n [style.background]=\"'var(--tui-background-base)'\"\n class=\"text-tui-text-02 text-body-xs-bold\"\n >\n {{ discount.percent }}%\n </tui-badge>\n <span class=\"line-through\">{{ product.discountCostString }}</span>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </tui-badge>\n </div>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-body-xs-bold text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </div>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"mt-1 flex gap-2\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [loading]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"grow !font-extrabold\"\n iconStart=\"@tui.shopping-cart\"\n >\n \u0412 \u043A\u043E\u0440\u0437\u0438\u043D\u0443\n </button>\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"showQuantityControl\"\n [formControl]=\"quantityControl\"\n [size]=\"size\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n [showLoader]=\"quantityShowLoader\"\n (clickClearEvent)=\"clickClearEvent.emit(cartItem)\"\n class=\"w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n <tui-avatar\n *ngIf=\"product.cartItem && !showQuantityControl\"\n src=\"@tui.check\"\n size=\"s\"\n [style.background]=\"'var(--tui-status-warning-pale)'\"\n [style.color]=\"'var(--tui-background-accent-1)'\"\n ></tui-avatar>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper relative flex h-full w-auto flex-col rounded-xl p-1\"></div>\n</ng-template>\n", styles: [":host tui-badge{--t-padding: .25rem !important}:host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{font-size:.6875rem;line-height:1rem;font-weight:500}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font-size:.8125rem;line-height:1.25rem;font-weight:800}:host[data-size=m] .card-wrapper{font-size:.8125rem;line-height:1.25rem;font-weight:500}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font-size:.9375rem;line-height:1.5rem;font-weight:800}\n"] }]
|
3537
3528
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { size: [{
|
3538
3529
|
type: Input
|
3539
3530
|
}, {
|
@@ -3742,7 +3733,9 @@ class ScCatalogModule {
|
|
3742
3733
|
TuiButtonLoading,
|
3743
3734
|
TuiAvatar,
|
3744
3735
|
TuiBadge,
|
3745
|
-
HoverImageCarouselComponent
|
3736
|
+
HoverImageCarouselComponent,
|
3737
|
+
TuiLineClamp,
|
3738
|
+
TuiHovered], exports: [ScPriceListPaginationComponent,
|
3746
3739
|
ScCategoryCardComponent,
|
3747
3740
|
ScFavoriteBtnComponent,
|
3748
3741
|
ScInputQuantityComponent,
|
@@ -3762,7 +3755,8 @@ class ScCatalogModule {
|
|
3762
3755
|
TuiAxes,
|
3763
3756
|
TuiButtonLoading,
|
3764
3757
|
TuiAvatar,
|
3765
|
-
HoverImageCarouselComponent
|
3758
|
+
HoverImageCarouselComponent,
|
3759
|
+
TuiLineClamp] }); }
|
3766
3760
|
}
|
3767
3761
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCatalogModule, decorators: [{
|
3768
3762
|
type: NgModule,
|
@@ -3813,6 +3807,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
3813
3807
|
TuiAvatar,
|
3814
3808
|
TuiBadge,
|
3815
3809
|
HoverImageCarouselComponent,
|
3810
|
+
TuiLineClamp,
|
3811
|
+
TuiHovered,
|
3816
3812
|
],
|
3817
3813
|
}]
|
3818
3814
|
}] });
|
@@ -3842,8 +3838,6 @@ class ScCartItemMobileComponent {
|
|
3842
3838
|
*
|
3843
3839
|
* @param unitsHelper Экземпляр класса-помощника для работы со значениями единиц измерения товара.
|
3844
3840
|
* @param previewDialogService Сервис диалогового окна предварительного просмотра.
|
3845
|
-
* @param urls Список ссылок на разделы backend'a.
|
3846
|
-
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
3847
3841
|
*/
|
3848
3842
|
constructor(unitsHelper, previewDialogService) {
|
3849
3843
|
this.unitsHelper = unitsHelper;
|
@@ -3898,11 +3892,11 @@ class ScCartItemMobileComponent {
|
|
3898
3892
|
return this.imageHelper.getImage(product);
|
3899
3893
|
}
|
3900
3894
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
3901
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <div class=\"flex min-w-72 gap-2 rounded-xl border border-tui-base-04 bg-white p-2 shadow-sc-2\">\n <div class=\"flex w-40 items-center\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-07\">\n <p *ngIf=\"product.pack\">\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-svg\n *ngIf=\"product.ignoreMinCountCheck\"\n src=\"tuiIconPackage\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n ></tui-svg>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex w-full flex-wrap items-center gap-x-2 gap-y-1\">\n <p\n *ngIf=\"!product.priceInRub\"\n class=\"font-bold\"\n >\n {{ product.costString }}\n </p>\n <p class=\"text-xs font-bold text-tui-base-07\">{{ product.costRubString }}</p>\n <span\n *ngIf=\"product.discount\"\n class=\"flex items-center\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-icon\n icon=\"@tui.info\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-icon>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n iconStart=\"@tui.settings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"mr-2 !self-center\"\n ></button>\n <div class=\"flex flex-wrap gap-x-2 text-xs font-thin text-tui-base-04\">\n <p *ngIf=\"cartItem.marker\">\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430: {{ cartItem.marker }}</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n </div>\n </div>\n\n <a\n tuiLink\n *ngIf=\"cartItem.specificationImgUrl\"\n (click)=\"showSpecification()\"\n >\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a\n >\n <ng-template\n #specificationPreview\n let-preview\n >\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n >\n <img\n *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"cartItem.specificationImgUrl\"\n />\n <button\n iconStart=\"@tui.x\"\n title=\"Close\"\n tuiIconButton\n tuiPreviewAction\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n </ng-template>\n </div>\n <div class=\"flex flex-col gap-1 self-start sm:mr-9 sm:self-center\">\n <div class=\"flex gap-2\">\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-28\"\n ></sc-input-quantity>\n <button\n tuiIconButton\n iconStart=\"@tui.trash-2\"\n [style.border-radius.%]=\"100\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\n \u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber: { precision: 2, decimalSeparator: '.', rounding: 'ceil' } | async }} {{ 'RUB' | tuiCurrency }}\n </p>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex w-full gap-2\">\n <div class=\"size-20 rounded-xl bg-tui-base-02\"></div>\n <div class=\"flex grow flex-col gap-2.5 bg-white\">\n <div class=\"h-4 w-full rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-4/5 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "directive", type: i1$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"] }, { 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: i2$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i2$1.TuiPreviewAction, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i1$1.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3895
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <div class=\"flex min-w-72 gap-2 rounded-xl border border-tui-base-04 bg-white p-2 shadow-sc-2\">\n <div class=\"flex w-40 items-center\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-07\">\n <p *ngIf=\"product.pack\">\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-icon\n *ngIf=\"product.ignoreMinCountCheck\"\n icon=\"@tui.package\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"text-sm\"\n ></tui-icon>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex w-full flex-wrap items-center gap-x-2 gap-y-1\">\n <p\n *ngIf=\"!product.priceInRub\"\n class=\"font-bold\"\n >\n {{ product.costString }}\n </p>\n <p class=\"text-xs font-bold text-tui-text-01\">{{ product.costRubString }}</p>\n <span\n *ngIf=\"product.discount\"\n class=\"flex items-center\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-icon\n icon=\"@tui.info\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-icon>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n iconStart=\"@tui.settings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"mr-2 !self-center\"\n ></button>\n <div class=\"flex flex-wrap gap-x-2 text-xs text-tui-base-07\">\n <p *ngIf=\"cartItem.marker\">\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430: {{ cartItem.marker }}</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n </div>\n </div>\n\n <a\n tuiLink\n *ngIf=\"cartItem.specificationImgUrl\"\n (click)=\"showSpecification()\"\n >\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a\n >\n <ng-template\n #specificationPreview\n let-preview\n >\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n >\n <img\n *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"cartItem.specificationImgUrl\"\n />\n <button\n iconStart=\"@tui.x\"\n title=\"Close\"\n tuiIconButton\n tuiPreviewAction\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n </ng-template>\n </div>\n <div class=\"flex flex-col gap-1 self-start sm:mr-9 sm:self-center\">\n <div class=\"flex gap-2\">\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-28\"\n ></sc-input-quantity>\n <button\n tuiIconButton\n iconStart=\"@tui.trash-2\"\n [style.border-radius.%]=\"100\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\n \u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber: { precision: 2, decimalSeparator: '.', rounding: 'ceil' } | async }} {{ 'RUB' | tuiCurrency }}\n </p>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex w-full gap-2\">\n <div class=\"size-20 rounded-xl bg-tui-base-02\"></div>\n <div class=\"flex grow flex-col gap-2.5 bg-white\">\n <div class=\"h-4 w-full rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-4/5 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "directive", type: i1$1.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: i1$1.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "directive", type: i1$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"] }, { 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: i2$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i2$1.TuiPreviewAction, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i1$1.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3902
3896
|
}
|
3903
3897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
|
3904
3898
|
type: Component,
|
3905
|
-
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <div class=\"flex min-w-72 gap-2 rounded-xl border border-tui-base-04 bg-white p-2 shadow-sc-2\">\n <div class=\"flex w-40 items-center\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-07\">\n <p *ngIf=\"product.pack\">\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-
|
3899
|
+
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <div class=\"flex min-w-72 gap-2 rounded-xl border border-tui-base-04 bg-white p-2 shadow-sc-2\">\n <div class=\"flex w-40 items-center\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-07\">\n <p *ngIf=\"product.pack\">\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n <tui-icon\n *ngIf=\"product.ignoreMinCountCheck\"\n icon=\"@tui.package\"\n [tuiHint]=\"minCountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"text-sm\"\n ></tui-icon>\n <ng-template #minCountHint>\n \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0437\u0430\u043A\u0430\u0437 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E\u0433\u043E <br />\n \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430\n </ng-template>\n </p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex w-full flex-wrap items-center gap-x-2 gap-y-1\">\n <p\n *ngIf=\"!product.priceInRub\"\n class=\"font-bold\"\n >\n {{ product.costString }}\n </p>\n <p class=\"text-xs font-bold text-tui-text-01\">{{ product.costRubString }}</p>\n <span\n *ngIf=\"product.discount\"\n class=\"flex items-center\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-icon\n icon=\"@tui.info\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-icon>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n iconStart=\"@tui.settings\"\n (click)=\"clickSettingsEvent.emit()\"\n size=\"s\"\n appearance=\"secondary\"\n class=\"mr-2 !self-center\"\n ></button>\n <div class=\"flex flex-wrap gap-x-2 text-xs text-tui-base-07\">\n <p *ngIf=\"cartItem.marker\">\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430: {{ cartItem.marker }}</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <ng-container *ngIf=\"cartItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"cartItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n </ng-template>\n </div>\n </div>\n\n <a\n tuiLink\n *ngIf=\"cartItem.specificationImgUrl\"\n (click)=\"showSpecification()\"\n >\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a\n >\n <ng-template\n #specificationPreview\n let-preview\n >\n <tui-preview\n [rotatable]=\"false\"\n [zoomable]=\"false\"\n >\n <img\n *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"cartItem.specificationImgUrl\"\n />\n <button\n iconStart=\"@tui.x\"\n title=\"Close\"\n tuiIconButton\n tuiPreviewAction\n type=\"button\"\n (click)=\"preview.complete()\"\n ></button>\n </tui-preview>\n </ng-template>\n </div>\n <div class=\"flex flex-col gap-1 self-start sm:mr-9 sm:self-center\">\n <div class=\"flex gap-2\">\n <sc-input-quantity\n #inputQuantity\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n [ignoreStepValidators]=\"product.ignoreMinCountCheck\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n class=\"w-28\"\n ></sc-input-quantity>\n <button\n tuiIconButton\n iconStart=\"@tui.trash-2\"\n [style.border-radius.%]=\"100\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\n \u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber: { precision: 2, decimalSeparator: '.', rounding: 'ceil' } | async }} {{ 'RUB' | tuiCurrency }}\n </p>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template #skeleton>\n <div class=\"flex w-full gap-2\">\n <div class=\"size-20 rounded-xl bg-tui-base-02\"></div>\n <div class=\"flex grow flex-col gap-2.5 bg-white\">\n <div class=\"h-4 w-full rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded-xl bg-tui-base-02\"></div>\n <div class=\"h-4 w-4/5 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n" }]
|
3906
3900
|
}], ctorParameters: () => [{ type: i1.ScUnitsHelper }, { type: i2$1.TuiPreviewDialogService, decorators: [{
|
3907
3901
|
type: Inject,
|
3908
3902
|
args: [TuiPreviewDialogService]
|