@snabcentr/client-ui 1.10.0 → 1.12.1
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +3 -3
- package/esm2020/catalog/price-card/sc-price-card.component.mjs +3 -3
- package/esm2020/catalog/price-history/sc-price-history.component.mjs +2 -2
- package/esm2020/samples/ask-to-sample-form/sc-ask-to-sample-form.component.mjs +102 -10
- package/fesm2015/snabcentr-client-ui.mjs +99 -12
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +98 -12
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/samples/ask-to-sample-form/sc-ask-to-sample-form.component.d.ts +38 -4
- package/styles/tailwind/tailwind.scss +1 -1
@@ -1,18 +1,48 @@
|
|
1
|
-
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { ChangeDetectionStrategy, Component, inject, Input } from '@angular/core';
|
3
3
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
4
|
-
import {
|
4
|
+
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
5
|
+
import { ScISuggestionType, ScSamplesService, ScUserService } from '@snabcentr/client-core';
|
6
|
+
import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus';
|
7
|
+
import { catchError, filter, map, of, share, startWith, Subject, switchMap, tap } from 'rxjs';
|
5
8
|
import * as i0 from "@angular/core";
|
6
9
|
import * as i1 from "@angular/forms";
|
7
10
|
import * as i2 from "@taiga-ui/core";
|
8
11
|
import * as i3 from "../../form-fields/suggestion-field/sc-suggestion-field.component";
|
9
12
|
import * as i4 from "@taiga-ui/kit";
|
10
|
-
import * as i5 from "@
|
13
|
+
import * as i5 from "@taiga-ui/cdk";
|
14
|
+
import * as i6 from "@angular/common";
|
11
15
|
/**
|
12
16
|
* Компонент формы запроса бесплатного образца.
|
13
17
|
*/
|
14
|
-
|
18
|
+
let ScAskToSampleFormComponent = class ScAskToSampleFormComponent {
|
15
19
|
constructor() {
|
20
|
+
/**
|
21
|
+
* Сервис работы с образцами.
|
22
|
+
*/
|
23
|
+
this.samplesService = inject(ScSamplesService);
|
24
|
+
/**
|
25
|
+
* Сервис информации о пользователе.
|
26
|
+
*/
|
27
|
+
this.user$ = inject(ScUserService)
|
28
|
+
.getUserChange$()
|
29
|
+
.pipe(tap((user) => {
|
30
|
+
if (user.isGuest) {
|
31
|
+
this.form.controls.email.reset();
|
32
|
+
this.form.controls.name.reset();
|
33
|
+
this.form.controls.phone.reset();
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
this.form.patchValue({
|
37
|
+
name: user.name,
|
38
|
+
phone: user.contacts.phone.value,
|
39
|
+
email: user.contacts.email.value,
|
40
|
+
});
|
41
|
+
}
|
42
|
+
}), untilDestroyed(this));
|
43
|
+
this.context = inject(POLYMORPHEUS_CONTEXT, {
|
44
|
+
optional: true,
|
45
|
+
});
|
16
46
|
/**
|
17
47
|
* Группа полей ввода для формы «Пожелания и предложения по улучшению сайта».
|
18
48
|
*/
|
@@ -20,17 +50,79 @@ export class ScAskToSampleFormComponent {
|
|
20
50
|
name: new FormControl(null, [Validators.required, Validators.minLength(3)]),
|
21
51
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
22
52
|
email: new FormControl(null, [Validators.required, Validators.email]),
|
53
|
+
description: new FormControl('Неизвестная форма', [Validators.required, Validators.minLength(3)]),
|
23
54
|
});
|
24
55
|
/**
|
25
56
|
* Перечисление типов подсказок.
|
26
57
|
*/
|
27
58
|
this.suggestionType = ScISuggestionType;
|
59
|
+
/**
|
60
|
+
* {@link Subject} события отправки формы.
|
61
|
+
*/
|
62
|
+
this.onSubmit = new Subject();
|
63
|
+
/**
|
64
|
+
* {@link Observable} запроса на отправку данных.
|
65
|
+
*/
|
66
|
+
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.samplesService.getSamples(value).pipe(tap(() => {
|
67
|
+
if (this.context) {
|
68
|
+
this.context.completeWith();
|
69
|
+
}
|
70
|
+
else {
|
71
|
+
this.form.controls.email.reset();
|
72
|
+
this.form.controls.name.reset();
|
73
|
+
this.form.controls.phone.reset();
|
74
|
+
}
|
75
|
+
}),
|
76
|
+
// eslint-disable-next-line rxjs/no-implicit-any-catch
|
77
|
+
catchError((error) => {
|
78
|
+
this.form.markAllAsTouched();
|
79
|
+
const { errors, message } = error.error;
|
80
|
+
if (errors) {
|
81
|
+
Object.keys(errors).forEach((key) => {
|
82
|
+
const control = this.form.get(key);
|
83
|
+
if (control) {
|
84
|
+
// eslint-disable-next-line security/detect-object-injection
|
85
|
+
control.setErrors({ serverResponse: errors[key] });
|
86
|
+
}
|
87
|
+
});
|
88
|
+
}
|
89
|
+
else if (message) {
|
90
|
+
this.form.setErrors({ serverResponse: [message] });
|
91
|
+
}
|
92
|
+
return of(null);
|
93
|
+
}),
|
94
|
+
// eslint-disable-next-line unicorn/no-useless-undefined
|
95
|
+
startWith(undefined))), share());
|
96
|
+
/**
|
97
|
+
* {@link Observable} изменения состояния загрузки данных.
|
98
|
+
*/
|
99
|
+
this.loading$ = this.request$.pipe(map((value) => value === undefined));
|
100
|
+
}
|
101
|
+
/** @inheritdoc */
|
102
|
+
ngOnInit() {
|
103
|
+
switch (this.formName ?? this.context?.data.formName) {
|
104
|
+
case 'order-sample':
|
105
|
+
this.form.controls.description.patchValue('Форма "Получите бесплатный образец"');
|
106
|
+
break;
|
107
|
+
case 'buy-products':
|
108
|
+
this.form.controls.description.patchValue('Форма "Оставить заявку на покупку"');
|
109
|
+
break;
|
110
|
+
default:
|
111
|
+
this.form.controls.description.patchValue('Неизвестная форма');
|
112
|
+
break;
|
113
|
+
}
|
28
114
|
}
|
29
|
-
}
|
115
|
+
};
|
30
116
|
ScAskToSampleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
31
|
-
ScAskToSampleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAskToSampleFormComponent, selector: "sc-ask-to-sample-form", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i3.ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i2.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "pipe", type:
|
117
|
+
ScAskToSampleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAskToSampleFormComponent, selector: "sc-ask-to-sample-form", inputs: { formName: "formName" }, ngImport: i0, template: "<form\n *tuiLet=\"user$ | async\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i3.ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i5.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i2.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
118
|
+
ScAskToSampleFormComponent = __decorate([
|
119
|
+
UntilDestroy({ checkProperties: true })
|
120
|
+
], ScAskToSampleFormComponent);
|
121
|
+
export { ScAskToSampleFormComponent };
|
32
122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, decorators: [{
|
33
123
|
type: Component,
|
34
|
-
args: [{ selector: 'sc-ask-to-sample-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n" }]
|
35
|
-
}]
|
36
|
-
|
124
|
+
args: [{ selector: 'sc-ask-to-sample-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"user$ | async\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n" }]
|
125
|
+
}], propDecorators: { formName: [{
|
126
|
+
type: Input
|
127
|
+
}] } });
|
128
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2MtYXNrLXRvLXNhbXBsZS1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC11aS9zYW1wbGVzL2Fzay10by1zYW1wbGUtZm9ybS9zYy1hc2stdG8tc2FtcGxlLWZvcm0uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXVpL3Nhb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mVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLmNvbnRyb2xzLnBob25lLnJlc2V0KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLnBhdGNoVmFsdWUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogdXNlci5uYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGhvbmU6IHVzZXIuY29udGFjdHMucGhvbmUudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBlbWFpbDogdXNlci5jb250YWN0cy5lbWFpbC52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB1bnRpbERlc3Ryb3llZCh0aGlzKVxuICAgICAgICApO1xuXG4gICAgcHJpdmF0ZSByZWFkb25seSBjb250ZXh0ID0gaW5qZWN0PFR1aURpYWxvZ0NvbnRleHQ8dm9pZCwgeyBmb3JtTmFtZTogJ29yZGVyLXNhbXBsZScgfCAnYnV5LXByb2R1Y3RzJyB9Pj4oUE9MWU1PUlBIRVVTX0NPTlRFWFQsIHtcbiAgICAgICAgb3B0aW9uYWw6IHRydWUsXG4gICAgfSk7XG5cbiAgICAvKipcbiAgICAgKiDQndCw0LjQvNC10L3QvtCy0LDQvdC40LUg0YTQvtGA0LzRiywg0YEg0LrQvtGC0L7RgNC+0Lkg0L7RgtC/0YDQsNCy0LvRj9C10YLRgdGPINC30LDQv9GA0L7RgS5cbiAgICAgKi9cbiAgICBASW5wdXQoKVxuICAgIHB1YmxpYyBmb3JtTmFtZT86ICdvcmRlci1zYW1wbGUnIHwgJ2J1eS1wcm9kdWN0cyc7XG5cbiAgICAvKipcbiAgICAgKiDQk9GA0YPQv9C/0LAg0L/QvtC70LXQuSDQstCy0L7QtNCwINC00LvRjyDRhNC+0YDQvNGLIMKr0J/QvtC20LXQu9Cw0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VibGljIHJlYWRvbmx5IG9uU3VibWl0OiBTdWJqZWN0PHZvaWQ+ID0gbmV3IFN1YmplY3Q8dm9pZD4oKTtcblxuICAgIC8qKlxuICAgICAqIHtAbGluayBPYnNlcnZhYmxlfSDQt9Cw0L/RgNC+0YHQsCDQvdCwINC+0YLQv9GA0LDQstC60YMg0LTQsNC90L3Ri9GFLlxuICAgICAqL1xuICAgIHB1YmxpYyByZWFkb25seSByZXF1ZXN0JDogT2JzZXJ2YWJsZTx1bmRlZmluZWQgfCBudWxsPiA9IHRoaXMub25TdWJtaXQucGlwZShcbiAgICAgICAgZmlsdGVyKCgpID0+IHRoaXMuZm9ybS52YWxpZCksXG4gICAgICAgIG1hcCgoKSA9PiB0aGlzLmZvcm0udmFsdWUgYXMgU2NJR2V0U2FtcGxlc0RhdGEpLFxuICAgICAgICBzd2l0Y2hNYXAoKHZhbHVlKSA9PlxuICAgICAgICAgICAgdGhpcy5zYW1wbGVzU2VydmljZS5nZXRTYW1wbGVzKHZhbHVlKS5waXBlKFxuICAgICAgICAgICAgICAgIHRhcCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGV4dC5jb21wbGV0ZVdpdGgoKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5jb250cm9scy5lbWFpbC5yZXNldCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLmNvbnRyb2xzLm5hbWUucmVzZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5jb250cm9scy5waG9uZS5yZXNldCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIHJ4anMvbm8taW1wbGljaXQtYW55LWNhdGNoXG4gICAgICAgICAgICAgICAgY2F0Y2hFcnJvcigoZXJyb3I6IEh0dHBFcnJvclJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5tYXJrQWxsQXNUb3VjaGVkKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBlcnJvcnMsIG1lc3NhZ2UgfSA9IGVycm9yLmVycm9yIGFzIEFwaUVycm9yUmVzcG9uc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9ycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoZXJyb3JzKS5mb3JFYWNoKChrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250cm9sID0gdGhpcy5mb3JtLmdldChrZXkpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIHNlY3VyaXR5L2RldGVjdC1vYmplY3QtaW5qZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0RXJyb3JzKHsgc2VydmVyUmVzcG9uc2U6IGVycm9yc1trZXldIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5zZXRFcnJvcnMoeyBzZXJ2ZXJSZXNwb25zZTogW21lc3NhZ2VdIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9mKG51bGwpO1xuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAg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biAgICA8L2J1dHRvbj5cbjwvZm9ybT5cbiJdfQ==
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, SkipSelf, inject, Directive, HostBinding, ContentChild, ViewChild, NgModule, ContentChildren, HostListener, Renderer2, ElementRef, Pipe, Optional, Injectable, ChangeDetectorRef, Self, forwardRef, InjectionToken } from '@angular/core';
|
3
3
|
import * as i1 from '@snabcentr/client-core';
|
4
|
-
import { ScUserMetrikaGoalsEnum, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScOpfList, ScWarehouseService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScPhoneService, IS_RUNNING_ON_TERMINAL, SC_URLS, TERMINAL_PROVIDERS, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScIconTypesEnum, ScUserService } from '@snabcentr/client-core';
|
4
|
+
import { ScUserMetrikaGoalsEnum, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScOpfList, ScWarehouseService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScPhoneService, IS_RUNNING_ON_TERMINAL, SC_URLS, TERMINAL_PROVIDERS, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScIconTypesEnum, ScSamplesService, ScUserService } from '@snabcentr/client-core';
|
5
5
|
import * as i6$2 from 'rxjs';
|
6
6
|
import { Subject, map, filter, switchMap, tap, catchError, of, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, debounceTime, throwError, shareReplay, interval, takeUntil, skip } from 'rxjs';
|
7
7
|
import * as i2 from '@angular/common';
|
@@ -3613,10 +3613,10 @@ class ScPriceCardComponent extends AbstractScPriceCard {
|
|
3613
3613
|
}
|
3614
3614
|
}
|
3615
3615
|
ScPriceCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceCardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
3616
|
-
ScPriceCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceCardComponent, selector: "sc-price-card", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size", "attr.is_mobile": "this.isMobile", "attr.is_in_cart": "this.isInCart" } }, providers: [SEARCH_TERM_PROVIDERS], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex w-auto min-w-40 flex-col rounded-xl shadow-md\"\n>\n <div class=\"flex grow flex-col justify-center overflow-hidden rounded-xl p-2\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImagePreview()\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n <sc-favorite-btn\n *ngIf=\"authStatus$ | async\"\n class=\"absolute left-2 top-2\"\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <div class=\"absolute right-2 top-2 m-1 flex gap-2\">\n <tui-svg\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"tuiIconStarLarge\"\n class=\"!size-6 rounded-lg !fill-white text-tui-negative\"\n ></tui-svg>\n <tui-svg\n *ngIf=\"product.cartItem\"\n src=\"tuiIconCheck\"\n class=\"!size-6 rounded-lg bg-tui-primary text-white\"\n ></tui-svg>\n </div>\n </div>\n <div class=\"p-2\">\n <tui-elastic-container class=\"shrink-0\">\n <a\n tuiLink\n class=\"name\"\n iconAlign=\"left\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n </tui-elastic-container>\n <tui-elastic-container class=\"shrink-0\">\n <p\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n <p\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </p>\n\n <a\n tuiLink\n *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\"\n iconAlign=\"left\"\n aria-disabled=\"true\"\n class=\"history\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n \u0414\u0430\u0442\u0430: {{ product.costDate }}\n </a>\n </tui-elastic-container>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-col\"\n >\n <span\n *ngIf=\"product.discount && !isMobile\"\n class=\"flex items-center text-tui-text-02\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 text-black\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost font-bold\"\n >{{ product.costRubString }}</span\n >\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"hidden font-bold text-tui-text-02 group-hover:block\"\n >{{ product.costString }}</span\n >\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"cart-actions flex shrink-0 overflow-hidden\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [showLoader]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"mt-2 grow\"\n icon=\"tuiIconShoppingCart\"\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=\"mt-2 w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper flex flex-col overflow-hidden rounded-xl bg-white shadow-sc-1\">\n <!-- \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <div class=\"h-3/5 w-full rounded-t bg-tui-base-02\"></div>\n <!-- \u041A\u0440\u0430\u0442\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0442\u043E\u0432\u0430\u0440\u0435 -->\n <div class=\"flex grow flex-col gap-2.5 rounded-b bg-white p-5\">\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", styles: [":host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{height:16rem;font:var(--tui-font-text-xs)}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font:var(--tui-font-text-s);font-weight:800}:host[data-size=m] .card-wrapper{height:20rem;font:var(--tui-font-text-s)}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font:var(--tui-font-text-m);font-weight:800}:host[is_mobile=false][is_in_cart=false] .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}:host[is_mobile=false][is_in_cart=false] .code,:host[is_mobile=false][is_in_cart=false] .history{display:none}:host[is_mobile=false][is_in_cart=false] .cart-actions{max-height:0;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host[is_mobile=false][is_in_cart=false]:hover .code,:host[is_mobile=false][is_in_cart=false]:hover .history,:host[is_mobile=false][is_in_cart=false]:hover .name{display:-webkit-box;-webkit-line-clamp:4}:host[is_mobile=false][is_in_cart=false]:hover .cart-actions{max-height:3rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "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: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "directive", type: i4$1.TuiHighlightDirective, selector: "[tuiHighlight]", inputs: ["tuiHighlight", "tuiHighlightColor"] }, { 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 });
|
3616
|
+
ScPriceCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceCardComponent, selector: "sc-price-card", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size", "attr.is_mobile": "this.isMobile", "attr.is_in_cart": "this.isInCart" } }, providers: [SEARCH_TERM_PROVIDERS], usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"product; else skeleton\"\n class=\"card-wrapper relative flex w-auto min-w-40 flex-col rounded-xl shadow-md\"\n>\n <div class=\"flex grow flex-col justify-center overflow-hidden rounded-xl p-2\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImagePreview()\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n <sc-favorite-btn\n *ngIf=\"authStatus$ | async\"\n class=\"absolute left-2 top-2\"\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <div class=\"absolute right-2 top-2 m-1 flex gap-2\">\n <tui-svg\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"tuiIconStarLarge\"\n class=\"!size-6 rounded-lg !fill-white text-tui-negative\"\n ></tui-svg>\n <tui-svg\n *ngIf=\"product.cartItem\"\n src=\"tuiIconCheck\"\n class=\"!size-6 rounded-lg bg-tui-primary text-white\"\n ></tui-svg>\n </div>\n </div>\n <div class=\"p-2\">\n <tui-elastic-container class=\"shrink-0\">\n <a\n tuiLink\n class=\"name\"\n iconAlign=\"left\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n </tui-elastic-container>\n <tui-elastic-container class=\"shrink-0\">\n <p\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02\"\n >\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\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </p>\n\n <a\n tuiLink\n *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\"\n iconAlign=\"left\"\n aria-disabled=\"true\"\n class=\"history\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n \u0414\u0430\u0442\u0430: {{ product.costDate }}\n </a>\n </tui-elastic-container>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-col\"\n >\n <span\n *ngIf=\"product.discount && !isMobile\"\n class=\"flex items-center text-tui-text-02\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 text-black\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost font-bold\"\n >{{ product.costRubString }}</span\n >\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"hidden font-bold text-tui-text-02 group-hover:block\"\n >{{ product.costString }}</span\n >\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"cart-actions flex shrink-0 overflow-hidden\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [showLoader]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"mt-2 grow\"\n icon=\"tuiIconShoppingCart\"\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=\"mt-2 w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper flex flex-col overflow-hidden rounded-xl bg-white shadow-sc-1\">\n <!-- \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <div class=\"h-3/5 w-full rounded-t bg-tui-base-02\"></div>\n <!-- \u041A\u0440\u0430\u0442\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0442\u043E\u0432\u0430\u0440\u0435 -->\n <div class=\"flex grow flex-col gap-2.5 rounded-b bg-white p-5\">\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", styles: [":host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{height:16rem;font:var(--tui-font-text-xs)}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font:var(--tui-font-text-s);font-weight:800}:host[data-size=m] .card-wrapper{height:20rem;font:var(--tui-font-text-s)}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font:var(--tui-font-text-m);font-weight:800}:host[is_mobile=false][is_in_cart=false] .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}:host[is_mobile=false][is_in_cart=false] .code,:host[is_mobile=false][is_in_cart=false] .history{display:none}:host[is_mobile=false][is_in_cart=false] .cart-actions{max-height:0;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host[is_mobile=false][is_in_cart=false]:hover .code,:host[is_mobile=false][is_in_cart=false]:hover .history,:host[is_mobile=false][is_in_cart=false]:hover .name{display:-webkit-box;-webkit-line-clamp:4}:host[is_mobile=false][is_in_cart=false]:hover .cart-actions{max-height:3rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "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: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4$1.TuiElasticContainerComponent, selector: "tui-elastic-container" }, { kind: "directive", type: i4$1.TuiHighlightDirective, selector: "[tuiHighlight]", inputs: ["tuiHighlight", "tuiHighlightColor"] }, { 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 });
|
3617
3617
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceCardComponent, decorators: [{
|
3618
3618
|
type: Component,
|
3619
|
-
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 w-auto min-w-40 flex-col rounded-xl shadow-md\"\n>\n <div class=\"flex grow flex-col justify-center overflow-hidden rounded-xl p-2\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImagePreview()\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n <sc-favorite-btn\n *ngIf=\"authStatus$ | async\"\n class=\"absolute left-2 top-2\"\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <div class=\"absolute right-2 top-2 m-1 flex gap-2\">\n <tui-svg\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"tuiIconStarLarge\"\n class=\"!size-6 rounded-lg !fill-white text-tui-negative\"\n ></tui-svg>\n <tui-svg\n *ngIf=\"product.cartItem\"\n src=\"tuiIconCheck\"\n class=\"!size-6 rounded-lg bg-tui-primary text-white\"\n ></tui-svg>\n </div>\n </div>\n <div class=\"p-2\">\n <tui-elastic-container class=\"shrink-0\">\n <a\n tuiLink\n class=\"name\"\n iconAlign=\"left\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n </tui-elastic-container>\n <tui-elastic-container class=\"shrink-0\">\n <p\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n <p\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </p>\n\n <a\n tuiLink\n *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\"\n iconAlign=\"left\"\n aria-disabled=\"true\"\n class=\"history\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n \u0414\u0430\u0442\u0430: {{ product.costDate }}\n </a>\n </tui-elastic-container>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-col\"\n >\n <span\n *ngIf=\"product.discount && !isMobile\"\n class=\"flex items-center text-tui-text-02\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 text-black\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost font-bold\"\n >{{ product.costRubString }}</span\n >\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"hidden font-bold text-tui-text-02 group-hover:block\"\n >{{ product.costString }}</span\n >\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"cart-actions flex shrink-0 overflow-hidden\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [showLoader]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"mt-2 grow\"\n icon=\"tuiIconShoppingCart\"\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=\"mt-2 w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper flex flex-col overflow-hidden rounded-xl bg-white shadow-sc-1\">\n <!-- \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <div class=\"h-3/5 w-full rounded-t bg-tui-base-02\"></div>\n <!-- \u041A\u0440\u0430\u0442\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0442\u043E\u0432\u0430\u0440\u0435 -->\n <div class=\"flex grow flex-col gap-2.5 rounded-b bg-white p-5\">\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", styles: [":host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{height:16rem;font:var(--tui-font-text-xs)}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font:var(--tui-font-text-s);font-weight:800}:host[data-size=m] .card-wrapper{height:20rem;font:var(--tui-font-text-s)}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font:var(--tui-font-text-m);font-weight:800}:host[is_mobile=false][is_in_cart=false] .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}:host[is_mobile=false][is_in_cart=false] .code,:host[is_mobile=false][is_in_cart=false] .history{display:none}:host[is_mobile=false][is_in_cart=false] .cart-actions{max-height:0;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host[is_mobile=false][is_in_cart=false]:hover .code,:host[is_mobile=false][is_in_cart=false]:hover .history,:host[is_mobile=false][is_in_cart=false]:hover .name{display:-webkit-box;-webkit-line-clamp:4}:host[is_mobile=false][is_in_cart=false]:hover .cart-actions{max-height:3rem}\n"] }]
|
3619
|
+
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 w-auto min-w-40 flex-col rounded-xl shadow-md\"\n>\n <div class=\"flex grow flex-col justify-center overflow-hidden rounded-xl p-2\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImagePreview()\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n <sc-favorite-btn\n *ngIf=\"authStatus$ | async\"\n class=\"absolute left-2 top-2\"\n (clickEvent)=\"clickFavoriteEvent.emit()\"\n [showLoader]=\"favoriteShowLoader\"\n [isFavorite]=\"product.isFavorite\"\n [disabled]=\"!!product.primaryCategory?.isFavorite\"\n ></sc-favorite-btn>\n <div class=\"absolute right-2 top-2 m-1 flex gap-2\">\n <tui-svg\n *ngIf=\"product.isPreviouslyOrdered\"\n src=\"tuiIconStarLarge\"\n class=\"!size-6 rounded-lg !fill-white text-tui-negative\"\n ></tui-svg>\n <tui-svg\n *ngIf=\"product.cartItem\"\n src=\"tuiIconCheck\"\n class=\"!size-6 rounded-lg bg-tui-primary text-white\"\n ></tui-svg>\n </div>\n </div>\n <div class=\"p-2\">\n <tui-elastic-container class=\"shrink-0\">\n <a\n tuiLink\n class=\"name\"\n iconAlign=\"left\"\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n (click)=\"clickCardEvent.emit()\"\n >\n {{ product.name }}\n </a>\n </tui-elastic-container>\n <tui-elastic-container class=\"shrink-0\">\n <p\n *ngIf=\"product?.pack\"\n class=\"text-tui-text-02\"\n >\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\n [tuiHighlight]=\"(search$ | async) ?? ''\"\n class=\"code text-tui-text-02\"\n >\n \u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}\n </p>\n\n <a\n tuiLink\n *ngIf=\"!isMobile && (authStatus$ | async) && product?.costDate\"\n iconAlign=\"left\"\n aria-disabled=\"true\"\n class=\"history\"\n (click)=\"clickPriceHistoryEvent.emit()\"\n >\n \u0414\u0430\u0442\u0430: {{ product.costDate }}\n </a>\n </tui-elastic-container>\n <div\n *ngIf=\"warehouseSelect$ | async as warehouseSelect\"\n class=\"flex flex-col\"\n >\n <span\n *ngIf=\"product.discount && !isMobile\"\n class=\"flex items-center text-tui-text-02\"\n >\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"font-bold text-tui-success-fill\"> -{{ product.discount.percent }}% </span>\n <tui-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 text-black\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <span\n [class.text-tui-text-02]=\"!product.isWarehouseStockExist(warehouseSelect.id)\"\n class=\"cost font-bold\"\n >{{ product.costRubString }}</span\n >\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"hidden font-bold text-tui-text-02 group-hover:block\"\n >{{ product.costString }}</span\n >\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n <div class=\"cart-actions flex shrink-0 overflow-hidden\">\n <button\n *ngIf=\"!showQuantityControl\"\n tuiButton\n (click)=\"clickAddToCartEvent.emit(product)\"\n [showLoader]=\"quantityShowLoader\"\n [size]=\"size === 's' ? 'xs' : 's'\"\n class=\"mt-2 grow\"\n icon=\"tuiIconShoppingCart\"\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=\"mt-2 w-full\"\n (keydown.enter)=\"inputQuantity.nativeFocusableElement?.blur()\"\n ></sc-input-quantity>\n </div>\n </div>\n</div>\n\n<ng-template #skeleton>\n <div class=\"card-wrapper flex flex-col overflow-hidden rounded-xl bg-white shadow-sc-1\">\n <!-- \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <div class=\"h-3/5 w-full rounded-t bg-tui-base-02\"></div>\n <!-- \u041A\u0440\u0430\u0442\u043A\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0442\u043E\u0432\u0430\u0440\u0435 -->\n <div class=\"flex grow flex-col gap-2.5 rounded-b bg-white p-5\">\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-3/5 rounded bg-tui-base-02\"></div>\n <div class=\"h-4 w-full rounded bg-tui-base-02\"></div>\n </div>\n </div>\n</ng-template>\n", styles: [":host .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}:host[data-size=s] .card-wrapper{height:16rem;font:var(--tui-font-text-xs)}:host[data-size=s] .card-wrapper .name,:host[data-size=s] .card-wrapper .cost{font:var(--tui-font-text-s);font-weight:800}:host[data-size=m] .card-wrapper{height:20rem;font:var(--tui-font-text-s)}:host[data-size=m] .card-wrapper .name,:host[data-size=m] .card-wrapper .cost{font:var(--tui-font-text-m);font-weight:800}:host[is_mobile=false][is_in_cart=false] .name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}:host[is_mobile=false][is_in_cart=false] .code,:host[is_mobile=false][is_in_cart=false] .history{display:none}:host[is_mobile=false][is_in_cart=false] .cart-actions{max-height:0;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host[is_mobile=false][is_in_cart=false]:hover .code,:host[is_mobile=false][is_in_cart=false]:hover .history,:host[is_mobile=false][is_in_cart=false]:hover .name{display:-webkit-box;-webkit-line-clamp:4}:host[is_mobile=false][is_in_cart=false]:hover .cart-actions{max-height:3rem}\n"] }]
|
3620
3620
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { size: [{
|
3621
3621
|
type: Input
|
3622
3622
|
}, {
|
@@ -3673,7 +3673,7 @@ class ScPriceHistoryComponent {
|
|
3673
3673
|
}
|
3674
3674
|
/** @inheritDoc */
|
3675
3675
|
ngOnInit() {
|
3676
|
-
this.history$ = this.catalogService.getPriceHistory$(this.product).pipe(map((history) => Object.keys(history)
|
3676
|
+
this.history$ = this.catalogService.getPriceHistory$(this.product).pipe(filter(tuiIsPresent), map((history) => Object.keys(history)
|
3677
3677
|
.map((item) => [TuiDay.normalizeParse(item, 'DMY'), history[String(item)].cost])
|
3678
3678
|
.sort((a, b) => (a[0] > b[0] ? 1 : -1))), startWith(null), shareReplay({ bufferSize: 1, refCount: true }));
|
3679
3679
|
this.loadingHistory$ = this.history$.pipe(map(tuiIsFalsy));
|
@@ -3987,10 +3987,10 @@ class ScCartItemMobileComponent {
|
|
3987
3987
|
}
|
3988
3988
|
}
|
3989
3989
|
ScCartItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }, { token: SC_URLS }, { token: SC_PATH_IMAGE_NOT_FOUND }], target: i0.ɵɵFactoryTarget.Component });
|
3990
|
-
ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" class=\"!absolute right-0 top-0\"></button> -->\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()\"\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-05\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex 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-05\">{{ 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-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\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 icon=\"tuiIconClose\"\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 icon=\"tuiIconTrash2\"\n shape=\"rounded\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</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: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i4.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3990
|
+
ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" class=\"!absolute right-0 top-0\"></button> -->\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()\"\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-05\">\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-05\">{{ 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-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\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 icon=\"tuiIconClose\"\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 icon=\"tuiIconTrash2\"\n shape=\"rounded\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</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: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "showLoader", "showCross", "ignoreStepValidators", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i4.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i4.TuiHintDriverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)" }, { kind: "directive", type: i4.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i4.TuiHintPositionDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i4.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3991
3991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
|
3992
3992
|
type: Component,
|
3993
|
-
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" class=\"!absolute right-0 top-0\"></button> -->\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()\"\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-05\">\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n </div>\n\n <div class=\"flex 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-05\">{{ 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-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\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 icon=\"tuiIconClose\"\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 icon=\"tuiIconTrash2\"\n shape=\"rounded\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</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" }]
|
3993
|
+
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!-- TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" class=\"!absolute right-0 top-0\"></button> -->\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()\"\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-05\">\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-05\">{{ 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-svg\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"discountHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!h-4 !text-xs\"\n ></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n </div>\n\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n\n <div\n *ngIf=\"cartItem.height || cartItem.length || cartItem.width\"\n class=\"flex items-center gap-1\"\n >\n <button\n tuiIconButton\n icon=\"tuiIconSettings\"\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 icon=\"tuiIconClose\"\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 icon=\"tuiIconTrash2\"\n shape=\"rounded\"\n size=\"xs\"\n (click)=\"clickDeleteEvent.emit()\"\n ></button>\n </div>\n <p class=\"text-sm font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</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" }]
|
3994
3994
|
}], ctorParameters: function () {
|
3995
3995
|
return [{ type: i1.ScUnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
3996
3996
|
type: Inject,
|
@@ -5121,12 +5121,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
5121
5121
|
}]
|
5122
5122
|
}] });
|
5123
5123
|
|
5124
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
5125
5124
|
/**
|
5126
5125
|
* Компонент формы запроса бесплатного образца.
|
5127
5126
|
*/
|
5128
|
-
class ScAskToSampleFormComponent {
|
5127
|
+
let ScAskToSampleFormComponent = class ScAskToSampleFormComponent {
|
5129
5128
|
constructor() {
|
5129
|
+
/**
|
5130
|
+
* Сервис работы с образцами.
|
5131
|
+
*/
|
5132
|
+
this.samplesService = inject(ScSamplesService);
|
5133
|
+
/**
|
5134
|
+
* Сервис информации о пользователе.
|
5135
|
+
*/
|
5136
|
+
this.user$ = inject(ScUserService)
|
5137
|
+
.getUserChange$()
|
5138
|
+
.pipe(tap((user) => {
|
5139
|
+
if (user.isGuest) {
|
5140
|
+
this.form.controls.email.reset();
|
5141
|
+
this.form.controls.name.reset();
|
5142
|
+
this.form.controls.phone.reset();
|
5143
|
+
}
|
5144
|
+
else {
|
5145
|
+
this.form.patchValue({
|
5146
|
+
name: user.name,
|
5147
|
+
phone: user.contacts.phone.value,
|
5148
|
+
email: user.contacts.email.value,
|
5149
|
+
});
|
5150
|
+
}
|
5151
|
+
}), untilDestroyed(this));
|
5152
|
+
this.context = inject(POLYMORPHEUS_CONTEXT, {
|
5153
|
+
optional: true,
|
5154
|
+
});
|
5130
5155
|
/**
|
5131
5156
|
* Группа полей ввода для формы «Пожелания и предложения по улучшению сайта».
|
5132
5157
|
*/
|
@@ -5134,19 +5159,81 @@ class ScAskToSampleFormComponent {
|
|
5134
5159
|
name: new FormControl(null, [Validators.required, Validators.minLength(3)]),
|
5135
5160
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
5136
5161
|
email: new FormControl(null, [Validators.required, Validators.email]),
|
5162
|
+
description: new FormControl('Неизвестная форма', [Validators.required, Validators.minLength(3)]),
|
5137
5163
|
});
|
5138
5164
|
/**
|
5139
5165
|
* Перечисление типов подсказок.
|
5140
5166
|
*/
|
5141
5167
|
this.suggestionType = ScISuggestionType;
|
5168
|
+
/**
|
5169
|
+
* {@link Subject} события отправки формы.
|
5170
|
+
*/
|
5171
|
+
this.onSubmit = new Subject();
|
5172
|
+
/**
|
5173
|
+
* {@link Observable} запроса на отправку данных.
|
5174
|
+
*/
|
5175
|
+
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.samplesService.getSamples(value).pipe(tap(() => {
|
5176
|
+
if (this.context) {
|
5177
|
+
this.context.completeWith();
|
5178
|
+
}
|
5179
|
+
else {
|
5180
|
+
this.form.controls.email.reset();
|
5181
|
+
this.form.controls.name.reset();
|
5182
|
+
this.form.controls.phone.reset();
|
5183
|
+
}
|
5184
|
+
}),
|
5185
|
+
// eslint-disable-next-line rxjs/no-implicit-any-catch
|
5186
|
+
catchError((error) => {
|
5187
|
+
this.form.markAllAsTouched();
|
5188
|
+
const { errors, message } = error.error;
|
5189
|
+
if (errors) {
|
5190
|
+
Object.keys(errors).forEach((key) => {
|
5191
|
+
const control = this.form.get(key);
|
5192
|
+
if (control) {
|
5193
|
+
// eslint-disable-next-line security/detect-object-injection
|
5194
|
+
control.setErrors({ serverResponse: errors[key] });
|
5195
|
+
}
|
5196
|
+
});
|
5197
|
+
}
|
5198
|
+
else if (message) {
|
5199
|
+
this.form.setErrors({ serverResponse: [message] });
|
5200
|
+
}
|
5201
|
+
return of(null);
|
5202
|
+
}),
|
5203
|
+
// eslint-disable-next-line unicorn/no-useless-undefined
|
5204
|
+
startWith(undefined))), share());
|
5205
|
+
/**
|
5206
|
+
* {@link Observable} изменения состояния загрузки данных.
|
5207
|
+
*/
|
5208
|
+
this.loading$ = this.request$.pipe(map((value) => value === undefined));
|
5142
5209
|
}
|
5143
|
-
|
5210
|
+
/** @inheritdoc */
|
5211
|
+
ngOnInit() {
|
5212
|
+
var _a, _b;
|
5213
|
+
switch ((_a = this.formName) !== null && _a !== void 0 ? _a : (_b = this.context) === null || _b === void 0 ? void 0 : _b.data.formName) {
|
5214
|
+
case 'order-sample':
|
5215
|
+
this.form.controls.description.patchValue('Форма "Получите бесплатный образец"');
|
5216
|
+
break;
|
5217
|
+
case 'buy-products':
|
5218
|
+
this.form.controls.description.patchValue('Форма "Оставить заявку на покупку"');
|
5219
|
+
break;
|
5220
|
+
default:
|
5221
|
+
this.form.controls.description.patchValue('Неизвестная форма');
|
5222
|
+
break;
|
5223
|
+
}
|
5224
|
+
}
|
5225
|
+
};
|
5144
5226
|
ScAskToSampleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
5145
|
-
ScAskToSampleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAskToSampleFormComponent, selector: "sc-ask-to-sample-form", ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4$1.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
5227
|
+
ScAskToSampleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScAskToSampleFormComponent, selector: "sc-ask-to-sample-form", inputs: { formName: "formName" }, ngImport: i0, template: "<form\n *tuiLet=\"user$ | async\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: ScSuggestionFieldComponent, selector: "sc-suggestion-field", inputs: ["type"], outputs: ["selectedClick"] }, { kind: "component", type: i4$1.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i4$1.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4$1.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i4$1.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i6.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
5228
|
+
ScAskToSampleFormComponent = __decorate([
|
5229
|
+
UntilDestroy({ checkProperties: true })
|
5230
|
+
], ScAskToSampleFormComponent);
|
5146
5231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, decorators: [{
|
5147
5232
|
type: Component,
|
5148
|
-
args: [{ selector: 'sc-ask-to-sample-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n" }]
|
5149
|
-
}]
|
5233
|
+
args: [{ selector: 'sc-ask-to-sample-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form\n *tuiLet=\"user$ | async\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit.next()\"\n class=\"flex flex-col justify-between gap-4\"\n>\n <label tuiLabel=\"\u0424\u0418\u041E\">\n <tui-input formControlName=\"name\"> \u0418\u0432\u0430\u043D\u043E\u0432 \u0418\u0432\u0430\u043D \u0418\u0432\u0430\u043D\u043E\u0432\u0438\u0447 </tui-input>\n <tui-error\n formControlName=\"name\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label tuiLabel=\"\u0422\u0435\u043B\u0435\u0444\u043E\u043D\">\n <tui-input-phone formControlName=\"phone\"> \u0422\u0435\u043B\u0435\u0444\u043E\u043D </tui-input-phone>\n <tui-error\n formControlName=\"phone\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <label\n tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\"\n class=\"w-full\"\n >\n <tui-input formControlName=\"email\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <sc-suggestion-field\n *tuiDataList\n [type]=\"suggestionType.email\"\n ></sc-suggestion-field>\n </tui-input>\n <tui-error\n formControlName=\"email\"\n [error]=\"[] | tuiFieldError | async\"\n ></tui-error>\n </label>\n <button\n tuiButton\n [disabled]=\"form.invalid\"\n [showLoader]=\"!!(loading$ | async)\"\n type=\"submit\"\n icon=\"scIconSend\"\n class=\"self-center\"\n >\n \u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C\n </button>\n</form>\n" }]
|
5234
|
+
}], propDecorators: { formName: [{
|
5235
|
+
type: Input
|
5236
|
+
}] } });
|
5150
5237
|
|
5151
5238
|
/**
|
5152
5239
|
* Компонент представления образцов товара.
|