@snabcentr/client-ui 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cart/cart-item-mobile/sc-cart-item-mobile.component.d.ts +9 -5
- package/esm2020/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +15 -17
- package/esm2020/order/order-item-mobile/sc-order-item-mobile.component.mjs +15 -19
- package/fesm2015/snabcentr-client-ui.mjs +24 -32
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +24 -30
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/order/order-item-mobile/sc-order-item-mobile.component.d.ts +9 -7
- package/package.json +2 -2
- package/release_notes.tmp +7 -5
- package/styles/tailwind/tailwind.scss +2 -2
@@ -3861,11 +3861,9 @@ class ScCartItemMobileComponent {
|
|
3861
3861
|
* @param urls Список ссылок на разделы backend'a.
|
3862
3862
|
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
3863
3863
|
*/
|
3864
|
-
constructor(unitsHelper, previewDialogService
|
3864
|
+
constructor(unitsHelper, previewDialogService) {
|
3865
3865
|
this.unitsHelper = unitsHelper;
|
3866
3866
|
this.previewDialogService = previewDialogService;
|
3867
|
-
this.urls = urls;
|
3868
|
-
this.pathImageNotFound = pathImageNotFound;
|
3869
3867
|
/**
|
3870
3868
|
* {@link FormControl} поля ввода количества товара в корзине.
|
3871
3869
|
*/
|
@@ -3886,6 +3884,10 @@ class ScCartItemMobileComponent {
|
|
3886
3884
|
* Событие нажатия на карточку.
|
3887
3885
|
*/
|
3888
3886
|
this.clickCardEvent = new EventEmitter();
|
3887
|
+
/**
|
3888
|
+
* Хелпер для работы с изображениями товара.
|
3889
|
+
*/
|
3890
|
+
this.imageHelper = inject(ScImageHelper);
|
3889
3891
|
}
|
3890
3892
|
/**
|
3891
3893
|
* Элемент корзины.
|
@@ -3920,25 +3922,21 @@ class ScCartItemMobileComponent {
|
|
3920
3922
|
}
|
3921
3923
|
/**
|
3922
3924
|
* Возвращает ссылку на изображение карточки товара.
|
3925
|
+
*
|
3926
|
+
* @param product Позиция товара/услуги.
|
3923
3927
|
*/
|
3924
|
-
getCardImage() {
|
3925
|
-
return this.product
|
3928
|
+
getCardImage(product) {
|
3929
|
+
return this.imageHelper.getImage(product);
|
3926
3930
|
}
|
3927
3931
|
}
|
3928
|
-
ScCartItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }
|
3929
|
-
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 });
|
3932
|
+
ScCartItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
3933
|
+
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(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-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 });
|
3930
3934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
|
3931
3935
|
type: Component,
|
3932
|
-
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" }]
|
3936
|
+
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(product)\"\n [alt]=\"product.name\"\n class=\"max-h-full w-full rounded-xl object-cover\"\n />\n </div>\n <div class=\"flex w-full flex-col items-center justify-between gap-2 sm:flex-row sm:gap-5\">\n <div class=\"flex max-w-full flex-col gap-1 self-start\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n\n <div class=\"flex w-full flex-wrap gap-x-2 gap-y-1 text-xs text-tui-base-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" }]
|
3933
3937
|
}], ctorParameters: function () { return [{ type: i1.ScUnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
3934
3938
|
type: Inject,
|
3935
3939
|
args: [TuiPreviewDialogService]
|
3936
|
-
}] }, { type: undefined, decorators: [{
|
3937
|
-
type: Inject,
|
3938
|
-
args: [SC_URLS]
|
3939
|
-
}] }, { type: undefined, decorators: [{
|
3940
|
-
type: Inject,
|
3941
|
-
args: [SC_PATH_IMAGE_NOT_FOUND]
|
3942
3940
|
}] }]; }, propDecorators: { cartItem: [{
|
3943
3941
|
type: Input
|
3944
3942
|
}], specificationPreviewRef: [{
|
@@ -4935,14 +4933,10 @@ class ScOrderItemMobileComponent {
|
|
4935
4933
|
*
|
4936
4934
|
* @param unitsHelper Объект-хэлпер для работы со значениями единиц измерения товара.
|
4937
4935
|
* @param previewDialogService Сервис диалогового окна предварительного просмотра.
|
4938
|
-
* @param urls Список ссылок на разделы backend'a.
|
4939
|
-
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
4940
4936
|
*/
|
4941
|
-
constructor(unitsHelper, previewDialogService
|
4937
|
+
constructor(unitsHelper, previewDialogService) {
|
4942
4938
|
this.unitsHelper = unitsHelper;
|
4943
4939
|
this.previewDialogService = previewDialogService;
|
4944
|
-
this.urls = urls;
|
4945
|
-
this.pathImageNotFound = pathImageNotFound;
|
4946
4940
|
/**
|
4947
4941
|
* Событие нажатия на карточку.
|
4948
4942
|
*/
|
@@ -4951,6 +4945,10 @@ class ScOrderItemMobileComponent {
|
|
4951
4945
|
* Событие нажатия на дополнительные действия.
|
4952
4946
|
*/
|
4953
4947
|
this.clickActionsEvent = new EventEmitter();
|
4948
|
+
/**
|
4949
|
+
* Хелпер для работы с изображениями товара.
|
4950
|
+
*/
|
4951
|
+
this.imageHelper = inject(ScImageHelper);
|
4954
4952
|
}
|
4955
4953
|
/**
|
4956
4954
|
* Продукт элемента заказа.
|
@@ -4966,25 +4964,21 @@ class ScOrderItemMobileComponent {
|
|
4966
4964
|
}
|
4967
4965
|
/**
|
4968
4966
|
* Возвращает ссылку на изображение карточки товара.
|
4967
|
+
*
|
4968
|
+
* @param product Позиция товара/услуги.
|
4969
4969
|
*/
|
4970
|
-
getCardImage() {
|
4971
|
-
return this.
|
4970
|
+
getCardImage(product) {
|
4971
|
+
return this.imageHelper.getImage(product);
|
4972
4972
|
}
|
4973
4973
|
}
|
4974
|
-
ScOrderItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }
|
4975
|
-
ScOrderItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScOrderItemMobileComponent, selector: "sc-order-item-mobile", inputs: { orderItem: "orderItem" }, outputs: { clickCardEvent: "clickCardEvent", clickActionsEvent: "clickActionsEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<div class=\"relative flex flex-wrap gap-x-4 gap-y-2 rounded-xl border border-tui-base-04 bg-white p-4 shadow-sc-2\">\n <ng-container *ngIf=\"orderItem && product; else skeleton\">\n <button\n tuiIconButton\n (click)=\"clickActionsEvent.emit()\"\n size=\"m\"\n icon=\"scIconVerticalThreeDots\"\n appearance=\"float\"\n class=\"!absolute right-0 top-0 !hidden\"\n ></button>\n <div class=\"flex grow gap-2\">\n <div class=\"flex size-20 shrink-0 items-center justify-center overflow-hidden\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage()\"\n [alt]=\"product.name\"\n [class.p-5]=\"!product.images?.length\"\n class=\"cursor-pointer\"\n />\n </div>\n\n <div class=\"flex grow flex-wrap gap-x-8 self-center\">\n <div class=\"flex grow basis-min-content flex-col\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"flex flex-col gap-y-0.5 text-tui-text-02\">\n <div class=\"flex flex-wrap\">\n <p class=\"w-40\">\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p\n class=\"w-40\"\n *ngIf=\"product.pack\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n </div>\n <a\n tuiLink\n *ngIf=\"orderItem.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=\"orderItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"orderItem.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\n <div class=\"flex flex-wrap gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"w-50 items-center gap-x-2 gap-y-0.5 text-xs 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 <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"w-50 flex items-baseline gap-x-2 gap-y-0.5 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-xs text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </p>\n </div>\n </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"w-50 flex flex-col gap-x-8 gap-y-0.5\">\n <ng-container *ngIf=\"orderItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ orderItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"orderItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ orderItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"orderItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ orderItem.width }} \u043C.</p>\n <p class=\"flex flex-col items-baseline gap-x-2\">\n <span class=\"whitespace-nowrap text-body-m-bold\">\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: <span class=\"whitespace-nowrap\">{{ orderItem.quantity }}</span>\n </span>\n </p>\n </div>\n\n <div class=\"w-50 flex flex-col gap-y-0.5\">\n <p class=\"whitespace-nowrap text-body-m-bold\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\n <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\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</div>\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: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
4974
|
+
ScOrderItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, deps: [{ token: i1.ScUnitsHelper }, { token: TuiPreviewDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
4975
|
+
ScOrderItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScOrderItemMobileComponent, selector: "sc-order-item-mobile", inputs: { orderItem: "orderItem" }, outputs: { clickCardEvent: "clickCardEvent", clickActionsEvent: "clickActionsEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<div class=\"relative flex flex-wrap gap-x-4 gap-y-2 rounded-xl border border-tui-base-04 bg-white p-4 shadow-sc-2\">\n <ng-container *ngIf=\"orderItem && product; else skeleton\">\n <button\n tuiIconButton\n (click)=\"clickActionsEvent.emit()\"\n size=\"m\"\n icon=\"scIconVerticalThreeDots\"\n appearance=\"float\"\n class=\"!absolute right-0 top-0 !hidden\"\n ></button>\n <div class=\"flex grow gap-2\">\n <div class=\"flex size-20 shrink-0 items-center justify-center overflow-hidden\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n [class.p-5]=\"!product.images?.length\"\n class=\"cursor-pointer\"\n />\n </div>\n\n <div class=\"flex grow flex-wrap gap-x-8 self-center\">\n <div class=\"flex grow basis-min-content flex-col\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"flex flex-col gap-y-0.5 text-tui-text-02\">\n <div class=\"flex flex-wrap\">\n <p class=\"w-40\">\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p\n class=\"w-40\"\n *ngIf=\"product.pack\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n </div>\n <a\n tuiLink\n *ngIf=\"orderItem.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=\"orderItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"orderItem.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\n <div class=\"flex flex-wrap gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"w-50 items-center gap-x-2 gap-y-0.5 text-xs 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 <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"w-50 flex items-baseline gap-x-2 gap-y-0.5 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-xs text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </p>\n </div>\n </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"w-50 flex flex-col gap-x-8 gap-y-0.5\">\n <ng-container *ngIf=\"orderItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ orderItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"orderItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ orderItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"orderItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ orderItem.width }} \u043C.</p>\n <p class=\"flex flex-col items-baseline gap-x-2\">\n <span class=\"whitespace-nowrap text-body-m-bold\">\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: <span class=\"whitespace-nowrap\">{{ orderItem.quantity }}</span>\n </span>\n </p>\n </div>\n\n <div class=\"w-50 flex flex-col gap-y-0.5\">\n <p class=\"whitespace-nowrap text-body-m-bold\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\n <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\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</div>\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: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint", "fromMain"] }, { kind: "directive", type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
4976
4976
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, decorators: [{
|
4977
4977
|
type: Component,
|
4978
|
-
args: [{ selector: 'sc-order-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative flex flex-wrap gap-x-4 gap-y-2 rounded-xl border border-tui-base-04 bg-white p-4 shadow-sc-2\">\n <ng-container *ngIf=\"orderItem && product; else skeleton\">\n <button\n tuiIconButton\n (click)=\"clickActionsEvent.emit()\"\n size=\"m\"\n icon=\"scIconVerticalThreeDots\"\n appearance=\"float\"\n class=\"!absolute right-0 top-0 !hidden\"\n ></button>\n <div class=\"flex grow gap-2\">\n <div class=\"flex size-20 shrink-0 items-center justify-center overflow-hidden\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage()\"\n [alt]=\"product.name\"\n [class.p-5]=\"!product.images?.length\"\n class=\"cursor-pointer\"\n />\n </div>\n\n <div class=\"flex grow flex-wrap gap-x-8 self-center\">\n <div class=\"flex grow basis-min-content flex-col\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"flex flex-col gap-y-0.5 text-tui-text-02\">\n <div class=\"flex flex-wrap\">\n <p class=\"w-40\">\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p\n class=\"w-40\"\n *ngIf=\"product.pack\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n </div>\n <a\n tuiLink\n *ngIf=\"orderItem.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=\"orderItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"orderItem.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\n <div class=\"flex flex-wrap gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"w-50 items-center gap-x-2 gap-y-0.5 text-xs 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 <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"w-50 flex items-baseline gap-x-2 gap-y-0.5 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-xs text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </p>\n </div>\n </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"w-50 flex flex-col gap-x-8 gap-y-0.5\">\n <ng-container *ngIf=\"orderItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ orderItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"orderItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ orderItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"orderItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ orderItem.width }} \u043C.</p>\n <p class=\"flex flex-col items-baseline gap-x-2\">\n <span class=\"whitespace-nowrap text-body-m-bold\">\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: <span class=\"whitespace-nowrap\">{{ orderItem.quantity }}</span>\n </span>\n </p>\n </div>\n\n <div class=\"w-50 flex flex-col gap-y-0.5\">\n <p class=\"whitespace-nowrap text-body-m-bold\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\n <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\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</div>\n" }]
|
4978
|
+
args: [{ selector: 'sc-order-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative flex flex-wrap gap-x-4 gap-y-2 rounded-xl border border-tui-base-04 bg-white p-4 shadow-sc-2\">\n <ng-container *ngIf=\"orderItem && product; else skeleton\">\n <button\n tuiIconButton\n (click)=\"clickActionsEvent.emit()\"\n size=\"m\"\n icon=\"scIconVerticalThreeDots\"\n appearance=\"float\"\n class=\"!absolute right-0 top-0 !hidden\"\n ></button>\n <div class=\"flex grow gap-2\">\n <div class=\"flex size-20 shrink-0 items-center justify-center overflow-hidden\">\n <img\n (click)=\"clickCardEvent.emit()\"\n [src]=\"getCardImage(product)\"\n [alt]=\"product.name\"\n [class.p-5]=\"!product.images?.length\"\n class=\"cursor-pointer\"\n />\n </div>\n\n <div class=\"flex grow flex-wrap gap-x-8 self-center\">\n <div class=\"flex grow basis-min-content flex-col\">\n <a\n tuiLink\n (click)=\"clickCardEvent.emit()\"\n >\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"flex flex-col gap-y-0.5 text-tui-text-02\">\n <div class=\"flex flex-wrap\">\n <p class=\"w-40\">\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p\n class=\"w-40\"\n *ngIf=\"product.pack\"\n >\n \u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}\n </p>\n </div>\n <a\n tuiLink\n *ngIf=\"orderItem.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=\"orderItem.specificationImgUrl as src\"\n alt=\"preview\"\n [src]=\"orderItem.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\n <div class=\"flex flex-wrap gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"w-50 items-center gap-x-2 gap-y-0.5 text-xs 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 <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"w-50 flex items-baseline gap-x-2 gap-y-0.5 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span\n *ngIf=\"!product.priceInRub\"\n class=\"text-xs text-tui-text-02\"\n >{{ product.costString }}</span\n >\n </p>\n </div>\n </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"w-50 flex flex-col gap-x-8 gap-y-0.5\">\n <ng-container *ngIf=\"orderItem.height; else length\">\n <p>\u0412\u044B\u0441\u043E\u0442\u0430: {{ orderItem.height }} \u043C.</p>\n </ng-container>\n <ng-template #length>\n <p *ngIf=\"orderItem.length\">\u0414\u043B\u0438\u043D\u0430: {{ orderItem.length }} \u043C.</p>\n </ng-template>\n <p *ngIf=\"orderItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ orderItem.width }} \u043C.</p>\n <p class=\"flex flex-col items-baseline gap-x-2\">\n <span class=\"whitespace-nowrap text-body-m-bold\">\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: <span class=\"whitespace-nowrap\">{{ orderItem.quantity }}</span>\n </span>\n </p>\n </div>\n\n <div class=\"w-50 flex flex-col gap-y-0.5\">\n <p class=\"whitespace-nowrap text-body-m-bold\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\n <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\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</div>\n" }]
|
4979
4979
|
}], ctorParameters: function () { return [{ type: i1.ScUnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
4980
4980
|
type: Inject,
|
4981
4981
|
args: [TuiPreviewDialogService]
|
4982
|
-
}] }, { type: undefined, decorators: [{
|
4983
|
-
type: Inject,
|
4984
|
-
args: [SC_URLS]
|
4985
|
-
}] }, { type: undefined, decorators: [{
|
4986
|
-
type: Inject,
|
4987
|
-
args: [SC_PATH_IMAGE_NOT_FOUND]
|
4988
4982
|
}] }]; }, propDecorators: { specificationPreviewRef: [{
|
4989
4983
|
type: ViewChild,
|
4990
4984
|
args: ['specificationPreview']
|