@snabcentr/client-ui 5.0.1 → 5.1.4
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.
- package/fesm2022/snabcentr-client-ui.mjs +105 -10
- package/fesm2022/snabcentr-client-ui.mjs.map +1 -1
- package/index.d.ts +31 -1
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -2401,10 +2485,12 @@ class ScAddressesSelectionFieldComponent {
|
|
|
2401
2485
|
.getCityById$(Number(this.cityIdControl.value))
|
|
2402
2486
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2403
2487
|
.subscribe((city) => {
|
|
2404
|
-
this.countryControl.patchValue(city.region.country);
|
|
2405
|
-
this.regionControl.patchValue(city.region);
|
|
2406
|
-
this.cityControl.patchValue(city);
|
|
2407
2488
|
this.canSelectCountry.set(city.region.country.id !== this.russiaCountryId);
|
|
2489
|
+
setTimeout(() => {
|
|
2490
|
+
this.countryControl.patchValue(city.region.country);
|
|
2491
|
+
this.regionControl.patchValue(city.region);
|
|
2492
|
+
this.cityControl.patchValue(city);
|
|
2493
|
+
});
|
|
2408
2494
|
});
|
|
2409
2495
|
}
|
|
2410
2496
|
this.countryControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((country) => {
|
|
@@ -3439,14 +3525,23 @@ class ScPriceWarehouseStockComponent {
|
|
|
3439
3525
|
/** @inheritDoc */
|
|
3440
3526
|
ngOnInit() {
|
|
3441
3527
|
this.selectedWarehouse$ = this.fromMain ? this.warehouseService.getCatalogWarehouseChange$() : this.warehouseService.getWarehouseSelectChange$();
|
|
3442
|
-
this.warehousesList$ = this.selectedWarehouse$.pipe(switchMap((warehouse) => this.warehouseService.getWarehouses$().pipe(map((warehouses) =>
|
|
3528
|
+
this.warehousesList$ = this.selectedWarehouse$.pipe(switchMap((warehouse) => this.warehouseService.getWarehouses$().pipe(map((warehouses) => {
|
|
3529
|
+
const items = warehouses.map((w) => {
|
|
3530
|
+
const stockCount = this.product.stockCount?.find((sc) => sc.warehouseId === w.id);
|
|
3531
|
+
return {
|
|
3532
|
+
w: w,
|
|
3533
|
+
sc: stockCount ?? { warehouseId: w.id, count: 0 },
|
|
3534
|
+
};
|
|
3535
|
+
});
|
|
3536
|
+
return items.sort((item) => (item.w.id === warehouse?.id ? -1 : 1));
|
|
3537
|
+
}))));
|
|
3443
3538
|
}
|
|
3444
3539
|
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 }); }
|
|
3540
|
+
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
3541
|
}
|
|
3447
3542
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceWarehouseStockComponent, decorators: [{
|
|
3448
3543
|
type: Component,
|
|
3449
|
-
args: [{ selector: 'sc-price-warehouse-stock', imports: [CommonModule, RouterModule, TuiTextfieldControllerModule, FormsModule, ReactiveFormsModule, ...TuiHint, TuiLink, TuiLet
|
|
3544
|
+
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
3545
|
}], propDecorators: { classList: [{
|
|
3451
3546
|
type: Input
|
|
3452
3547
|
}], product: [{
|
|
@@ -4486,11 +4581,11 @@ class ScPriceListPaginationComponent {
|
|
|
4486
4581
|
});
|
|
4487
4582
|
}
|
|
4488
4583
|
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: "@
|
|
4584
|
+
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
4585
|
}
|
|
4491
4586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ScPriceListPaginationComponent, decorators: [{
|
|
4492
4587
|
type: Component,
|
|
4493
|
-
args: [{ selector: 'sc-price-list-pagination', changeDetection: ChangeDetectionStrategy.OnPush, imports: [TuiTransitioned, TuiAppearance$1, TuiWithAppearance$1, TuiIcons, TuiWithIcons, TuiButton, AsyncPipe], template: "@
|
|
4588
|
+
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
4589
|
}] });
|
|
4495
4590
|
|
|
4496
4591
|
/* eslint-disable no-restricted-syntax,@typescript-eslint/unbound-method */
|
|
@@ -7760,5 +7855,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
7760
7855
|
* Generated bundle index. Do not edit.
|
|
7761
7856
|
*/
|
|
7762
7857
|
|
|
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 };
|
|
7858
|
+
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
7859
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|