@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,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';
|
@@ -3557,10 +3557,10 @@ class ScPriceCardComponent extends AbstractScPriceCard {
|
|
3557
3557
|
}
|
3558
3558
|
}
|
3559
3559
|
ScPriceCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceCardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
3560
|
-
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 });
|
3560
|
+
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 });
|
3561
3561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceCardComponent, decorators: [{
|
3562
3562
|
type: Component,
|
3563
|
-
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"] }]
|
3563
|
+
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"] }]
|
3564
3564
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { size: [{
|
3565
3565
|
type: Input
|
3566
3566
|
}, {
|
@@ -3617,7 +3617,7 @@ class ScPriceHistoryComponent {
|
|
3617
3617
|
}
|
3618
3618
|
/** @inheritDoc */
|
3619
3619
|
ngOnInit() {
|
3620
|
-
this.history$ = this.catalogService.getPriceHistory$(this.product).pipe(map((history) => Object.keys(history)
|
3620
|
+
this.history$ = this.catalogService.getPriceHistory$(this.product).pipe(filter(tuiIsPresent), map((history) => Object.keys(history)
|
3621
3621
|
.map((item) => [TuiDay.normalizeParse(item, 'DMY'), history[String(item)].cost])
|
3622
3622
|
.sort((a, b) => (a[0] > b[0] ? 1 : -1))), startWith(null), shareReplay({ bufferSize: 1, refCount: true }));
|
3623
3623
|
this.loadingHistory$ = this.history$.pipe(map(tuiIsFalsy));
|
@@ -3924,10 +3924,10 @@ class ScCartItemMobileComponent {
|
|
3924
3924
|
}
|
3925
3925
|
}
|
3926
3926
|
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 });
|
3927
|
-
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 });
|
3927
|
+
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 });
|
3928
3928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
|
3929
3929
|
type: Component,
|
3930
|
-
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" }]
|
3930
|
+
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" }]
|
3931
3931
|
}], ctorParameters: function () { return [{ type: i1.ScUnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
3932
3932
|
type: Inject,
|
3933
3933
|
args: [TuiPreviewDialogService]
|
@@ -5041,12 +5041,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
5041
5041
|
}]
|
5042
5042
|
}] });
|
5043
5043
|
|
5044
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
5045
5044
|
/**
|
5046
5045
|
* Компонент формы запроса бесплатного образца.
|
5047
5046
|
*/
|
5048
|
-
class ScAskToSampleFormComponent {
|
5047
|
+
let ScAskToSampleFormComponent = class ScAskToSampleFormComponent {
|
5049
5048
|
constructor() {
|
5049
|
+
/**
|
5050
|
+
* Сервис работы с образцами.
|
5051
|
+
*/
|
5052
|
+
this.samplesService = inject(ScSamplesService);
|
5053
|
+
/**
|
5054
|
+
* Сервис информации о пользователе.
|
5055
|
+
*/
|
5056
|
+
this.user$ = inject(ScUserService)
|
5057
|
+
.getUserChange$()
|
5058
|
+
.pipe(tap((user) => {
|
5059
|
+
if (user.isGuest) {
|
5060
|
+
this.form.controls.email.reset();
|
5061
|
+
this.form.controls.name.reset();
|
5062
|
+
this.form.controls.phone.reset();
|
5063
|
+
}
|
5064
|
+
else {
|
5065
|
+
this.form.patchValue({
|
5066
|
+
name: user.name,
|
5067
|
+
phone: user.contacts.phone.value,
|
5068
|
+
email: user.contacts.email.value,
|
5069
|
+
});
|
5070
|
+
}
|
5071
|
+
}), untilDestroyed(this));
|
5072
|
+
this.context = inject(POLYMORPHEUS_CONTEXT, {
|
5073
|
+
optional: true,
|
5074
|
+
});
|
5050
5075
|
/**
|
5051
5076
|
* Группа полей ввода для формы «Пожелания и предложения по улучшению сайта».
|
5052
5077
|
*/
|
@@ -5054,19 +5079,80 @@ class ScAskToSampleFormComponent {
|
|
5054
5079
|
name: new FormControl(null, [Validators.required, Validators.minLength(3)]),
|
5055
5080
|
phone: new FormControl(null, [Validators.required, Validators.minLength(12)]),
|
5056
5081
|
email: new FormControl(null, [Validators.required, Validators.email]),
|
5082
|
+
description: new FormControl('Неизвестная форма', [Validators.required, Validators.minLength(3)]),
|
5057
5083
|
});
|
5058
5084
|
/**
|
5059
5085
|
* Перечисление типов подсказок.
|
5060
5086
|
*/
|
5061
5087
|
this.suggestionType = ScISuggestionType;
|
5088
|
+
/**
|
5089
|
+
* {@link Subject} события отправки формы.
|
5090
|
+
*/
|
5091
|
+
this.onSubmit = new Subject();
|
5092
|
+
/**
|
5093
|
+
* {@link Observable} запроса на отправку данных.
|
5094
|
+
*/
|
5095
|
+
this.request$ = this.onSubmit.pipe(filter(() => this.form.valid), map(() => this.form.value), switchMap((value) => this.samplesService.getSamples(value).pipe(tap(() => {
|
5096
|
+
if (this.context) {
|
5097
|
+
this.context.completeWith();
|
5098
|
+
}
|
5099
|
+
else {
|
5100
|
+
this.form.controls.email.reset();
|
5101
|
+
this.form.controls.name.reset();
|
5102
|
+
this.form.controls.phone.reset();
|
5103
|
+
}
|
5104
|
+
}),
|
5105
|
+
// eslint-disable-next-line rxjs/no-implicit-any-catch
|
5106
|
+
catchError((error) => {
|
5107
|
+
this.form.markAllAsTouched();
|
5108
|
+
const { errors, message } = error.error;
|
5109
|
+
if (errors) {
|
5110
|
+
Object.keys(errors).forEach((key) => {
|
5111
|
+
const control = this.form.get(key);
|
5112
|
+
if (control) {
|
5113
|
+
// eslint-disable-next-line security/detect-object-injection
|
5114
|
+
control.setErrors({ serverResponse: errors[key] });
|
5115
|
+
}
|
5116
|
+
});
|
5117
|
+
}
|
5118
|
+
else if (message) {
|
5119
|
+
this.form.setErrors({ serverResponse: [message] });
|
5120
|
+
}
|
5121
|
+
return of(null);
|
5122
|
+
}),
|
5123
|
+
// eslint-disable-next-line unicorn/no-useless-undefined
|
5124
|
+
startWith(undefined))), share());
|
5125
|
+
/**
|
5126
|
+
* {@link Observable} изменения состояния загрузки данных.
|
5127
|
+
*/
|
5128
|
+
this.loading$ = this.request$.pipe(map((value) => value === undefined));
|
5062
5129
|
}
|
5063
|
-
|
5130
|
+
/** @inheritdoc */
|
5131
|
+
ngOnInit() {
|
5132
|
+
switch (this.formName ?? this.context?.data.formName) {
|
5133
|
+
case 'order-sample':
|
5134
|
+
this.form.controls.description.patchValue('Форма "Получите бесплатный образец"');
|
5135
|
+
break;
|
5136
|
+
case 'buy-products':
|
5137
|
+
this.form.controls.description.patchValue('Форма "Оставить заявку на покупку"');
|
5138
|
+
break;
|
5139
|
+
default:
|
5140
|
+
this.form.controls.description.patchValue('Неизвестная форма');
|
5141
|
+
break;
|
5142
|
+
}
|
5143
|
+
}
|
5144
|
+
};
|
5064
5145
|
ScAskToSampleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
5065
|
-
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 });
|
5146
|
+
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 });
|
5147
|
+
ScAskToSampleFormComponent = __decorate([
|
5148
|
+
UntilDestroy({ checkProperties: true })
|
5149
|
+
], ScAskToSampleFormComponent);
|
5066
5150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScAskToSampleFormComponent, decorators: [{
|
5067
5151
|
type: Component,
|
5068
|
-
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" }]
|
5069
|
-
}]
|
5152
|
+
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" }]
|
5153
|
+
}], propDecorators: { formName: [{
|
5154
|
+
type: Input
|
5155
|
+
}] } });
|
5070
5156
|
|
5071
5157
|
/**
|
5072
5158
|
* Компонент представления образцов товара.
|