@snabcentr/client-ui 0.26.1 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/order/order-item-mobile/order-item-mobile.component.mjs +8 -7
- package/esm2020/order/sc-order.module.mjs +10 -8
- package/fesm2015/snabcentr-client-ui.mjs +7 -6
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +6 -6
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/order/order-item-mobile/order-item-mobile.component.d.ts +4 -4
- package/order/sc-order.module.d.ts +4 -2
- package/package.json +1 -1
- package/styles/tailwind/tailwind.scss +6 -1
@@ -4546,7 +4546,7 @@ class ScOrderItemMobileComponent {
|
|
4546
4546
|
* Отобразить спецификацию.
|
4547
4547
|
*/
|
4548
4548
|
showSpecification() {
|
4549
|
-
this.previewDialogService.open(this.specificationPreviewRef
|
4549
|
+
this.previewDialogService.open(this.specificationPreviewRef ?? '').subscribe();
|
4550
4550
|
}
|
4551
4551
|
/**
|
4552
4552
|
* Возвращает ссылку на изображение карточки товара.
|
@@ -4556,10 +4556,10 @@ class ScOrderItemMobileComponent {
|
|
4556
4556
|
}
|
4557
4557
|
}
|
4558
4558
|
ScOrderItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, deps: [{ token: UnitsHelper }, { token: TuiPreviewDialogService }, { token: SC_URLS }, { token: SC_PATH_IMAGE_NOT_FOUND }], target: i0.ɵɵFactoryTarget.Component });
|
4559
|
-
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
|
4559
|
+
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 tuiMode=\"onLight\"\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-xs text-tui-text-02\">\n <div class=\"flex flex-wrap gap-y-0.5\">\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 </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"flex w-40 flex-col gap-x-8 gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"flex items-center 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=\"flex flex-col items-baseline gap-x-2 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 <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\n\n <div class=\"w-40 text-xs text-tui-text-02\">\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=\"text-sm text-tui-base-09\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap font-bold\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\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: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { 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 });
|
4560
4560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderItemMobileComponent, decorators: [{
|
4561
4561
|
type: Component,
|
4562
|
-
args: [{ selector: 'sc-order-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative
|
4562
|
+
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 tuiMode=\"onLight\"\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-xs text-tui-text-02\">\n <div class=\"flex flex-wrap gap-y-0.5\">\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 </div>\n <div class=\"flex flex-wrap content-center\">\n <div class=\"flex w-40 flex-col gap-x-8 gap-y-0.5\">\n <span\n *ngIf=\"product.discount\"\n class=\"flex items-center 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=\"flex flex-col items-baseline gap-x-2 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 <sc-price-warehouse-stock\n [product]=\"product\"\n [fromMain]=\"false\"\n ></sc-price-warehouse-stock>\n </div>\n\n <div class=\"w-40 text-xs text-tui-text-02\">\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=\"text-sm text-tui-base-09\">\n \u0421\u0443\u043C\u043C\u0430: <span class=\"whitespace-nowrap font-bold\"> {{ orderItem.getCostRubStr() }} </span>\n </p>\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" }]
|
4563
4563
|
}], ctorParameters: function () { return [{ type: UnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
4564
4564
|
type: Inject,
|
4565
4565
|
args: [TuiPreviewDialogService]
|
@@ -4616,14 +4616,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
4616
4616
|
class ScOrderModule {
|
4617
4617
|
}
|
4618
4618
|
ScOrderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
4619
|
-
ScOrderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, declarations: [ScOrderItemMobileComponent, ScPaymentStatusComponent], imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule], exports: [ScOrderItemMobileComponent, ScPaymentStatusComponent] });
|
4620
|
-
ScOrderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule] });
|
4619
|
+
ScOrderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, declarations: [ScOrderItemMobileComponent, ScPaymentStatusComponent], imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, TuiPreviewModule, ScCatalogModule, PolymorpheusModule], exports: [ScOrderItemMobileComponent, ScPaymentStatusComponent] });
|
4620
|
+
ScOrderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, TuiPreviewModule, ScCatalogModule, PolymorpheusModule] });
|
4621
4621
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScOrderModule, decorators: [{
|
4622
4622
|
type: NgModule,
|
4623
4623
|
args: [{
|
4624
4624
|
declarations: [ScOrderItemMobileComponent, ScPaymentStatusComponent],
|
4625
4625
|
exports: [ScOrderItemMobileComponent, ScPaymentStatusComponent],
|
4626
|
-
imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, ScCatalogModule]
|
4626
|
+
imports: [CommonModule, TuiLinkModule, TuiButtonModule, TuiModeModule, TuiSvgModule, TuiBlockStatusModule, TuiPreviewModule, ScCatalogModule, PolymorpheusModule],
|
4627
4627
|
}]
|
4628
4628
|
}] });
|
4629
4629
|
|