@snabcentr/client-ui 5.0.1 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import * as i1$3 from '@snabcentr/client-core';
4
4
  import { ScContactsService, ScUserService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScSuggestionService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScVCardService, IS_RUNNING_ON_TERMINAL, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVerificationService, ScConvertersService, ScReferencesService, ScOpfList, ScLocationsService, ScBannerService, ScMediaImageTransformerPipe, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScCartService, ScUploadedFile, ScMimeTypes, ScCatalogService, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScContragentService, ScDeliveryAddressService, SC_URLS, IS_SERVER, RESPONSE, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFilesService, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService, ScIdOrSlugPipe, ScJsonLdComponent } from '@snabcentr/client-core';
5
5
  import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, debounceTime, filter, map, startWith, catchError, throwError, share, Subject, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, Observable, pairwise, noop, first, merge, skip } from 'rxjs';
6
6
  import * as i1$1 from '@angular/common';
7
- import { AsyncPipe, NgTemplateOutlet, CommonModule, NgClass } from '@angular/common';
7
+ import { AsyncPipe, DOCUMENT, NgTemplateOutlet, CommonModule, NgClass } from '@angular/common';
8
8
  import { HttpErrorResponse, HttpClient } from '@angular/common/http';
9
9
  import { toSignal, outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import * as i1 from '@angular/forms';
@@ -896,6 +896,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
896
896
  }]
897
897
  }] });
898
898
 
899
+ /**
900
+ * Директива для автоматической установки фокуса на первое невалидное поле формы при submit.
901
+ */
902
+ class ScFocusFirstInvalidFieldDirective {
903
+ constructor() {
904
+ /**
905
+ * Порядок проверки полей формы.
906
+ */
907
+ this.fieldOrder = input([], ...(ngDevMode ? [{ debugName: "fieldOrder" }] : []));
908
+ /**
909
+ * Объект {@link Document}, предоставляющий доступ к DOM страницы.
910
+ */
911
+ this.document = inject(DOCUMENT);
912
+ /**
913
+ * Директива формы.
914
+ */
915
+ this.formGroupDirective = inject(FormGroupDirective);
916
+ }
917
+ /**
918
+ * Обработчик события submit формы.
919
+ */
920
+ onSubmit() {
921
+ const { form } = this.formGroupDirective;
922
+ if (this.fieldOrder().length === 0) {
923
+ return;
924
+ }
925
+ if (form.valid) {
926
+ return;
927
+ }
928
+ const firstInvalidFieldName = this.fieldOrder().find((fieldName) => {
929
+ const control = form.get(fieldName);
930
+ return control && control.invalid && !control.disabled;
931
+ });
932
+ const firstInvalidField = firstInvalidFieldName ? form.get(firstInvalidFieldName) : null;
933
+ if (firstInvalidField) {
934
+ firstInvalidField.markAsTouched();
935
+ firstInvalidField.updateValueAndValidity();
936
+ }
937
+ setTimeout(() => {
938
+ this.focusFirstInvalidField(form);
939
+ }, 0);
940
+ }
941
+ /**
942
+ * Устанавливает фокус на первое поле формы с ошибкой.
943
+ *
944
+ * @param form Форма для проверки.
945
+ */
946
+ focusFirstInvalidField(form) {
947
+ const firstInvalidField = this.fieldOrder().find((fieldName) => {
948
+ const control = form.get(fieldName);
949
+ return control && control.invalid && control.touched && !control.disabled;
950
+ });
951
+ if (!firstInvalidField) {
952
+ return;
953
+ }
954
+ const element = this.document.querySelector(`[formControlName="${firstInvalidField}"]`);
955
+ if (!element) {
956
+ return;
957
+ }
958
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
959
+ const queryResult = element.querySelector('input, select, textarea');
960
+ const nativeElement = element.nativeFocusableElement ?? (queryResult ? queryResult : null) ?? element;
961
+ if (nativeElement instanceof HTMLElement) {
962
+ nativeElement.focus();
963
+ nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
964
+ }
965
+ }
966
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScFocusFirstInvalidFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
967
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ScFocusFirstInvalidFieldDirective, isStandalone: true, selector: "form[formGroup][scFocusFirstInvalidField]", inputs: { fieldOrder: { classPropertyName: "fieldOrder", publicName: "fieldOrder", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "ngSubmit": "onSubmit()" } }, ngImport: i0 }); }
968
+ }
969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScFocusFirstInvalidFieldDirective, decorators: [{
970
+ type: Directive,
971
+ args: [{
972
+ standalone: true,
973
+ selector: 'form[formGroup][scFocusFirstInvalidField]',
974
+ host: {
975
+ '(ngSubmit)': 'onSubmit()',
976
+ },
977
+ }]
978
+ }], propDecorators: { fieldOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldOrder", required: false }] }] } });
979
+
899
980
  /**
900
981
  * Директива для обработки события фокуса поля ввода, для последующего выделения содержимого поля ввода.
901
982
  */
@@ -1316,6 +1397,9 @@ class ScVerificationPhoneCheckFormComponent {
1316
1397
  * @param haveCode Признак того есть ли код подтверждения или нет.
1317
1398
  */
1318
1399
  setHaveCode(haveCode) {
1400
+ if (haveCode) {
1401
+ this.form.controls.verificationCode.reset();
1402
+ }
1319
1403
  this.haveCode.set(haveCode);
1320
1404
  }
1321
1405
  /**
@@ -3439,14 +3523,23 @@ class ScPriceWarehouseStockComponent {
3439
3523
  /** @inheritDoc */
3440
3524
  ngOnInit() {
3441
3525
  this.selectedWarehouse$ = this.fromMain ? this.warehouseService.getCatalogWarehouseChange$() : this.warehouseService.getWarehouseSelectChange$();
3442
- this.warehousesList$ = this.selectedWarehouse$.pipe(switchMap((warehouse) => this.warehouseService.getWarehouses$().pipe(map((warehouses) => this.product.stockCount?.map((sc) => ({ w: warehouses.find((w) => w.id === sc.warehouseId), sc: sc }))), map((items) => items?.sort((item) => (item.w?.id === warehouse?.id ? -1 : 1))))));
3526
+ this.warehousesList$ = this.selectedWarehouse$.pipe(switchMap((warehouse) => this.warehouseService.getWarehouses$().pipe(map((warehouses) => {
3527
+ const items = warehouses.map((w) => {
3528
+ const stockCount = this.product.stockCount?.find((sc) => sc.warehouseId === w.id);
3529
+ return {
3530
+ w: w,
3531
+ sc: stockCount ?? { warehouseId: w.id, count: 0 },
3532
+ };
3533
+ });
3534
+ return items.sort((item) => (item.w.id === warehouse?.id ? -1 : 1));
3535
+ }))));
3443
3536
  }
3444
3537
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceWarehouseStockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3445
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ScPriceWarehouseStockComponent, isStandalone: true, selector: "sc-price-warehouse-stock", inputs: { classList: "classList", product: "product", withStockHint: "withStockHint", fromMain: "fromMain" }, ngImport: i0, template: "@if (product) {\n @let isDisabled = product.isHidden || product.isNull;\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <span *tuiLet=\"withStockHint && !!(warehousesList$ | async)?.length as showStockHint\">\n @if (!product.stockCount?.length && product.getNotStockMessage(warehouseSelect); as message) {\n <a\n *tuiLet=\"!!(product.properties?.planingIncomingDate || product.properties?.planingProductionDate) as showPlaningHint\"\n tuiLink\n [pseudo]=\"showPlaningHint\"\n [tuiHint]=\"showPlaningHint && planingHint\"\n [class.disabled]=\"isDisabled\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [style.color]=\"'var(--tui-status-negative)'\"\n [style.cursor]=\"showPlaningHint && planingHint ? 'pointer' : 'default'\"\n [ngClass]=\"classList\"\n >\n {{ message }}\n </a>\n }\n <ng-template #planingHint>\n @if (product.properties?.planingIncomingDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F <br />\n \u043D\u0430 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0441\u043A\u043B\u0430\u0434:\n <span class=\"font-bold\">{{ product.properties?.planingIncomingDate }}</span>\n </span>\n }\n @if (product.properties?.planingProductionDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u0430:\n <span class=\"font-bold\">{{ product.properties?.planingProductionDate }}</span>\n </span>\n }\n </ng-template>\n @if (product.stockCount && product.stockCount.length && !product.onOrder) {\n <span>\n <span\n tuiLink\n [style.color]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"showStockHint && stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [ngClass]=\"classList\"\n [class.disabled]=\"isDisabled\"\n class=\"!underline\"\n >\n \u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043D\u0430\u043B\u0438\u0447\u0438\u0435\n </span>\n </span>\n }\n @if (product.onOrder) {\n <span\n [style.color]=\"'var(--tui-status-warning)'\"\n [ngClass]=\"classList\"\n >\n \u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437\n </span>\n }\n </span>\n }\n <ng-template #stockHint>\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <table\n class=\"stock-table table-auto text-body-s\"\n [ngClass]=\"classList\"\n >\n <tbody>\n @for (item of warehousesList$ | async; track item) {\n <tr class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item.w?.name }}:</td>\n <td class=\"px-1\">{{ item.sc.count ? item.sc.count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n }\n </tbody>\n </table>\n }\n </ng-template>\n}\n", styles: ["::ng-deep tui-hint:has(.stock-table){max-inline-size:22rem}[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3538
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ScPriceWarehouseStockComponent, isStandalone: true, selector: "sc-price-warehouse-stock", inputs: { classList: "classList", product: "product", withStockHint: "withStockHint", fromMain: "fromMain" }, ngImport: i0, template: "@if (product) {\n @let isDisabled = product.isHidden || product.isNull;\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <span *tuiLet=\"withStockHint && !!(warehousesList$ | async)?.length as showStockHint\">\n @if (!product.stockCount?.length && product.getNotStockMessage(warehouseSelect); as message) {\n <a\n *tuiLet=\"!!(product.properties?.planingIncomingDate || product.properties?.planingProductionDate) as showPlaningHint\"\n tuiLink\n [pseudo]=\"showPlaningHint\"\n [tuiHint]=\"showPlaningHint && planingHint\"\n [class.disabled]=\"isDisabled\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [style.color]=\"'var(--tui-status-negative)'\"\n [style.cursor]=\"showPlaningHint && planingHint ? 'pointer' : 'default'\"\n [ngClass]=\"classList\"\n >\n {{ message }}\n </a>\n }\n <ng-template #planingHint>\n @if (product.properties?.planingIncomingDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F <br />\n \u043D\u0430 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0441\u043A\u043B\u0430\u0434:\n <span class=\"font-bold\">{{ product.properties?.planingIncomingDate }}</span>\n </span>\n }\n @if (product.properties?.planingProductionDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u0430:\n <span class=\"font-bold\">{{ product.properties?.planingProductionDate }}</span>\n </span>\n }\n </ng-template>\n @if (product.stockCount && product.stockCount.length && !product.onOrder) {\n <span>\n <span\n tuiLink\n [style.color]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"showStockHint && stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [ngClass]=\"classList\"\n [class.disabled]=\"isDisabled\"\n class=\"!underline\"\n >\n \u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043D\u0430\u043B\u0438\u0447\u0438\u0435\n </span>\n </span>\n }\n @if (product.onOrder) {\n <span\n [style.color]=\"'var(--tui-status-warning)'\"\n [ngClass]=\"classList\"\n >\n \u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437\n </span>\n }\n </span>\n }\n <ng-template #stockHint>\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <table\n class=\"stock-table table-auto text-body-s\"\n [ngClass]=\"classList\"\n >\n <tbody>\n @for (item of warehousesList$ | async; track item) {\n <tr class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item.w?.name }}:</td>\n <td class=\"px-1\">{{ item.sc.count !== undefined && item.sc.count !== null ? item.sc.count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n }\n </tbody>\n </table>\n }\n </ng-template>\n}\n", styles: ["::ng-deep tui-hint:has(.stock-table){max-inline-size:22rem}[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3446
3539
  }
3447
3540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceWarehouseStockComponent, decorators: [{
3448
3541
  type: Component,
3449
- args: [{ selector: 'sc-price-warehouse-stock', imports: [CommonModule, RouterModule, TuiTextfieldControllerModule, FormsModule, ReactiveFormsModule, ...TuiHint, TuiLink, TuiLet, ScFormatDatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (product) {\n @let isDisabled = product.isHidden || product.isNull;\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <span *tuiLet=\"withStockHint && !!(warehousesList$ | async)?.length as showStockHint\">\n @if (!product.stockCount?.length && product.getNotStockMessage(warehouseSelect); as message) {\n <a\n *tuiLet=\"!!(product.properties?.planingIncomingDate || product.properties?.planingProductionDate) as showPlaningHint\"\n tuiLink\n [pseudo]=\"showPlaningHint\"\n [tuiHint]=\"showPlaningHint && planingHint\"\n [class.disabled]=\"isDisabled\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [style.color]=\"'var(--tui-status-negative)'\"\n [style.cursor]=\"showPlaningHint && planingHint ? 'pointer' : 'default'\"\n [ngClass]=\"classList\"\n >\n {{ message }}\n </a>\n }\n <ng-template #planingHint>\n @if (product.properties?.planingIncomingDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F <br />\n \u043D\u0430 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0441\u043A\u043B\u0430\u0434:\n <span class=\"font-bold\">{{ product.properties?.planingIncomingDate }}</span>\n </span>\n }\n @if (product.properties?.planingProductionDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u0430:\n <span class=\"font-bold\">{{ product.properties?.planingProductionDate }}</span>\n </span>\n }\n </ng-template>\n @if (product.stockCount && product.stockCount.length && !product.onOrder) {\n <span>\n <span\n tuiLink\n [style.color]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"showStockHint && stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [ngClass]=\"classList\"\n [class.disabled]=\"isDisabled\"\n class=\"!underline\"\n >\n \u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043D\u0430\u043B\u0438\u0447\u0438\u0435\n </span>\n </span>\n }\n @if (product.onOrder) {\n <span\n [style.color]=\"'var(--tui-status-warning)'\"\n [ngClass]=\"classList\"\n >\n \u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437\n </span>\n }\n </span>\n }\n <ng-template #stockHint>\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <table\n class=\"stock-table table-auto text-body-s\"\n [ngClass]=\"classList\"\n >\n <tbody>\n @for (item of warehousesList$ | async; track item) {\n <tr class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item.w?.name }}:</td>\n <td class=\"px-1\">{{ item.sc.count ? item.sc.count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n }\n </tbody>\n </table>\n }\n </ng-template>\n}\n", styles: ["::ng-deep tui-hint:has(.stock-table){max-inline-size:22rem}[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"] }]
3542
+ args: [{ selector: 'sc-price-warehouse-stock', imports: [CommonModule, RouterModule, TuiTextfieldControllerModule, FormsModule, ReactiveFormsModule, ...TuiHint, TuiLink, TuiLet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (product) {\n @let isDisabled = product.isHidden || product.isNull;\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <span *tuiLet=\"withStockHint && !!(warehousesList$ | async)?.length as showStockHint\">\n @if (!product.stockCount?.length && product.getNotStockMessage(warehouseSelect); as message) {\n <a\n *tuiLet=\"!!(product.properties?.planingIncomingDate || product.properties?.planingProductionDate) as showPlaningHint\"\n tuiLink\n [pseudo]=\"showPlaningHint\"\n [tuiHint]=\"showPlaningHint && planingHint\"\n [class.disabled]=\"isDisabled\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [style.color]=\"'var(--tui-status-negative)'\"\n [style.cursor]=\"showPlaningHint && planingHint ? 'pointer' : 'default'\"\n [ngClass]=\"classList\"\n >\n {{ message }}\n </a>\n }\n <ng-template #planingHint>\n @if (product.properties?.planingIncomingDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F <br />\n \u043D\u0430 \u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0441\u043A\u043B\u0430\u0434:\n <span class=\"font-bold\">{{ product.properties?.planingIncomingDate }}</span>\n </span>\n }\n @if (product.properties?.planingProductionDate) {\n <span>\n \u041F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 <br />\n \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u0430:\n <span class=\"font-bold\">{{ product.properties?.planingProductionDate }}</span>\n </span>\n }\n </ng-template>\n @if (product.stockCount && product.stockCount.length && !product.onOrder) {\n <span>\n <span\n tuiLink\n [style.color]=\"'var(--tui-status-positive)'\"\n [tuiHint]=\"showStockHint && stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n [ngClass]=\"classList\"\n [class.disabled]=\"isDisabled\"\n class=\"!underline\"\n >\n \u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043D\u0430\u043B\u0438\u0447\u0438\u0435\n </span>\n </span>\n }\n @if (product.onOrder) {\n <span\n [style.color]=\"'var(--tui-status-warning)'\"\n [ngClass]=\"classList\"\n >\n \u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437\n </span>\n }\n </span>\n }\n <ng-template #stockHint>\n @if (selectedWarehouse$ | async; as warehouseSelect) {\n <table\n class=\"stock-table table-auto text-body-s\"\n [ngClass]=\"classList\"\n >\n <tbody>\n @for (item of warehousesList$ | async; track item) {\n <tr class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item.w?.name }}:</td>\n <td class=\"px-1\">{{ item.sc.count !== undefined && item.sc.count !== null ? item.sc.count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n }\n </tbody>\n </table>\n }\n </ng-template>\n}\n", styles: ["::ng-deep tui-hint:has(.stock-table){max-inline-size:22rem}[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"] }]
3450
3543
  }], propDecorators: { classList: [{
3451
3544
  type: Input
3452
3545
  }], product: [{
@@ -4486,11 +4579,11 @@ class ScPriceListPaginationComponent {
4486
4579
  });
4487
4580
  }
4488
4581
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceListPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4489
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ScPriceListPaginationComponent, isStandalone: true, selector: "sc-price-list-pagination", ngImport: i0, template: "@if (meta$ | async; as meta) {\n @if (meta?.currentPage !== meta?.lastPage) {\n <button\n tuiButton\n (click)=\"showMore()\"\n [disabled]=\"!!(disabled$ | async)\"\n appearance=\"secondary\"\n class=\"!font-bold\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n </button>\n }\n}\n", dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4582
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ScPriceListPaginationComponent, isStandalone: true, selector: "sc-price-list-pagination", ngImport: i0, template: "@let meta = meta$ | async;\n@let disabled = disabled$ | async;\n\n@if (meta) {\n @let isLastPage = meta.currentPage === meta.lastPage;\n\n @if (!isLastPage) {\n <button\n tuiButton\n (click)=\"showMore()\"\n [disabled]=\"disabled\"\n appearance=\"secondary\"\n class=\"!font-bold\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451\n </button>\n }\n}\n", dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4490
4583
  }
4491
4584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceListPaginationComponent, decorators: [{
4492
4585
  type: Component,
4493
- args: [{ selector: 'sc-price-list-pagination', changeDetection: ChangeDetectionStrategy.OnPush, imports: [TuiTransitioned, TuiAppearance$1, TuiWithAppearance$1, TuiIcons, TuiWithIcons, TuiButton, AsyncPipe], template: "@if (meta$ | async; as meta) {\n @if (meta?.currentPage !== meta?.lastPage) {\n <button\n tuiButton\n (click)=\"showMore()\"\n [disabled]=\"!!(disabled$ | async)\"\n appearance=\"secondary\"\n class=\"!font-bold\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n </button>\n }\n}\n" }]
4586
+ args: [{ selector: 'sc-price-list-pagination', changeDetection: ChangeDetectionStrategy.OnPush, imports: [TuiTransitioned, TuiAppearance$1, TuiWithAppearance$1, TuiIcons, TuiWithIcons, TuiButton, AsyncPipe], template: "@let meta = meta$ | async;\n@let disabled = disabled$ | async;\n\n@if (meta) {\n @let isLastPage = meta.currentPage === meta.lastPage;\n\n @if (!isLastPage) {\n <button\n tuiButton\n (click)=\"showMore()\"\n [disabled]=\"disabled\"\n appearance=\"secondary\"\n class=\"!font-bold\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451\n </button>\n }\n}\n" }]
4494
4587
  }] });
4495
4588
 
4496
4589
  /* eslint-disable no-restricted-syntax,@typescript-eslint/unbound-method */
@@ -7760,5 +7853,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
7760
7853
  * Generated bundle index. Do not edit.
7761
7854
  */
7762
7855
 
7763
- export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, FilesAndDocumentsComponent, FinishDateTimeTransformerDirective, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_BANNER_DURATION, SC_DATE_FORMATTER, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_PAGE_SIZE_OPTIONS$1 as SC_PAGE_SIZE_OPTIONS, SC_PHONE_APPROVE_CODE_SENDER, SC_PHONE_APPROVE_CODE_SENDER_PROVIDER, SC_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScBannerComponent, ScBrandsListComponent, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScJsonLdCategoryComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNextInputFocusDirective, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScPublicOfferComponent, ScQRCodeDialogComponent, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserPhoneApproveDialogComponent, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
7856
+ export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, FilesAndDocumentsComponent, FinishDateTimeTransformerDirective, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_BANNER_DURATION, SC_DATE_FORMATTER, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_PAGE_SIZE_OPTIONS$1 as SC_PAGE_SIZE_OPTIONS, SC_PHONE_APPROVE_CODE_SENDER, SC_PHONE_APPROVE_CODE_SENDER_PROVIDER, SC_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScBannerComponent, ScBrandsListComponent, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScJsonLdCategoryComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNextInputFocusDirective, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScPublicOfferComponent, ScQRCodeDialogComponent, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserPhoneApproveDialogComponent, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
7764
7857
  //# sourceMappingURL=snabcentr-client-ui.mjs.map