@snabcentr/client-ui 3.46.1 → 3.47.7
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/configurators/index.d.ts +2 -0
- package/configurators/models/index.d.ts +2 -0
- package/configurators/models/sandwich/sc-i-configurator-search-product-sandwich.d.ts +22 -0
- package/configurators/models/sandwich/sc-i-sandwich-settings.d.ts +18 -0
- package/configurators/sandwich/index.d.ts +3 -0
- package/configurators/sandwich/sandwich-skeleton/sc-sandwich-skeleton.component.d.ts +8 -0
- package/configurators/sandwich/sc-i-new-cart-item-sandwich.d.ts +14 -0
- package/configurators/sandwich/sc-sandwich.component.d.ts +138 -0
- package/directives/select-on-focusin/sc-select-on-focusin.directive.d.ts +1 -1
- package/esm2022/cart/add-or-editing-cart-item-dialog/add-or-editing-cart-item-form/sc-add-or-editing-cart-item-form.component.mjs +2 -2
- package/esm2022/configurators/index.mjs +3 -0
- package/esm2022/configurators/models/index.mjs +3 -0
- package/esm2022/configurators/models/sandwich/sc-i-configurator-search-product-sandwich.mjs +2 -0
- package/esm2022/configurators/models/sandwich/sc-i-sandwich-settings.mjs +2 -0
- package/esm2022/configurators/sandwich/index.mjs +4 -0
- package/esm2022/configurators/sandwich/sandwich-skeleton/sc-sandwich-skeleton.component.mjs +14 -0
- package/esm2022/configurators/sandwich/sc-i-new-cart-item-sandwich.mjs +2 -0
- package/esm2022/configurators/sandwich/sc-sandwich.component.mjs +311 -0
- package/esm2022/directives/select-on-focusin/sc-select-on-focusin.directive.mjs +3 -3
- package/esm2022/providers/index.mjs +2 -1
- package/esm2022/providers/sc-debounce-time-default.mjs +9 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/snabcentr-client-ui.mjs +320 -11
- package/fesm2022/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/index.d.ts +1 -0
- package/providers/sc-debounce-time-default.d.ts +5 -0
- package/public-api.d.ts +1 -0
- package/styles/tailwind/tailwind.scss +69 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, EventEmitter, signal, ChangeDetectorRef, Directive, Input, Output, Pipe, ElementRef, HostListener, Renderer2, ContentChildren, NgModule, input, Component, ChangeDetectionStrategy, Inject, HostBinding, model, output, SkipSelf, DestroyRef, effect, ContentChild, ViewChild, computed, Optional, viewChild, forwardRef } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, EventEmitter, signal, ChangeDetectorRef, Directive, Input, Output, InjectionToken, Pipe, ElementRef, HostListener, Renderer2, ContentChildren, NgModule, input, Component, ChangeDetectionStrategy, Inject, HostBinding, model, output, SkipSelf, DestroyRef, effect, ContentChild, ViewChild, computed, Optional, viewChild, forwardRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@snabcentr/client-core';
|
|
4
|
-
import { ScContactsService, ScUserService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScLocationsService, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, IS_RUNNING_ON_TERMINAL, ScVCardService, ScVerificationService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScConvertersService, ScOpfList, ScReferencesService, ScContragentService, ScMediaImageTransformerPipe, ScMimeTypes, ScCatalogService, SC_URLS, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCartService, ScUploadedFile, RESPONSE, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService, ScIdOrSlugPipe, ScJsonLdModule } from '@snabcentr/client-core';
|
|
4
|
+
import { ScContactsService, ScUserService, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScLocationsService, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, IS_RUNNING_ON_TERMINAL, ScVCardService, ScVerificationService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScConvertersService, ScOpfList, ScReferencesService, ScContragentService, ScMediaImageTransformerPipe, ScMimeTypes, ScCatalogService, SC_URLS, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCartService, ScUploadedFile, ScConfiguratorService, RESPONSE, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService, ScIdOrSlugPipe, ScJsonLdModule } from '@snabcentr/client-core';
|
|
5
5
|
import * as i6$1 from 'rxjs';
|
|
6
6
|
import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, map, Subject, filter, tap, catchError, finalize, startWith, share, timer, scan, takeWhile, endWith, distinctUntilChanged, debounceTime, throwError, combineLatest, Observable, pairwise, noop, first, merge, skip } from 'rxjs';
|
|
7
7
|
import * as i6 from '@taiga-ui/cdk';
|
|
8
8
|
import { tuiCreateToken, tuiCreateTokenFromFactory, TUI_IS_MOBILE, TuiDay, TuiTime, TuiValueTransformer, tuiControlValue, tuiIsPresent, tuiMarkControlAsTouchedAndValidate, tuiIsFalsy, TuiLet, TuiAutoFocus, TuiRepeatTimes, TuiHovered, TuiDayRange, TuiMonth, tuiPure, TUI_WINDOW_SIZE, TuiValidationError, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
9
9
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
10
|
-
import { takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
10
|
+
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
12
12
|
import { FormControl, FormGroupDirective, NgControl, FormGroup, Validators, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
13
|
import * as i1$2 from '@taiga-ui/core';
|
|
14
|
-
import { TuiButton, TuiDialog, TuiDialogService, TuiLink, TuiFallbackSrcPipe, TuiInitialsPipe, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TUI_DATA_LIST_HOST, tuiDropdownOptionsProvider, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiTextfield, TuiTitle, TuiHint, TUI_MONTHS, TuiFormatNumberPipe, TuiNumberFormat, TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TuiScrollbar, TuiSurface, tuiFadeIn } from '@taiga-ui/core';
|
|
14
|
+
import { TuiButton, TuiDialog, TuiDialogService, TuiLink, TuiFallbackSrcPipe, TuiInitialsPipe, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TUI_DATA_LIST_HOST, tuiDropdownOptionsProvider, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiTextfield, TuiTitle, TuiHint, TUI_MONTHS, TuiFormatNumberPipe, TuiNumberFormat, tuiNumberFormatProvider, tuiItemsHandlersProvider, TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TuiScrollbar, TuiSurface, tuiFadeIn } from '@taiga-ui/core';
|
|
15
15
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
16
16
|
import * as i4 from '@taiga-ui/legacy/components/primitive-textfield';
|
|
17
17
|
import * as i3 from '@taiga-ui/legacy';
|
|
@@ -22,7 +22,7 @@ import * as i5 from '@taiga-ui/core/components/label';
|
|
|
22
22
|
import * as i8 from '@maskito/angular';
|
|
23
23
|
import { MaskitoDirective } from '@maskito/angular';
|
|
24
24
|
import * as i2$1 from '@taiga-ui/kit';
|
|
25
|
-
import { TUI_DATE_VALUE_TRANSFORMER, TuiPreview, TuiAvatar, TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiSortCountriesPipe, TuiStepper, TuiCarousel, TuiPush, TuiCheckbox, TuiBadge, TuiTooltip, TuiHighlight, TuiLineClamp, TuiPreviewDialogService, TuiFiles, TuiChip, TuiInputNumber, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree, tuiItemsHandlersProvider, TuiPagination, TuiAccordionDirective, TuiAccordionItemContent, tuiFilesAccepted } from '@taiga-ui/kit';
|
|
25
|
+
import { TUI_DATE_VALUE_TRANSFORMER, TuiPreview, TuiAvatar, TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiSortCountriesPipe, TuiStepper, TuiCarousel, TuiPush, TuiCheckbox, TuiBadge, TuiTooltip, TuiHighlight, TuiLineClamp, TuiPreviewDialogService, TuiFiles, TuiChip, TuiInputNumber, tuiInputNumberOptionsProvider, TuiDataListWrapperComponent, TuiChevron, TuiSelect, TuiInputSlider, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree, tuiItemsHandlersProvider as tuiItemsHandlersProvider$1, TuiPagination, TuiAccordionDirective, TuiAccordionItemContent, tuiFilesAccepted } from '@taiga-ui/kit';
|
|
26
26
|
import * as i2$2 from '@angular/common';
|
|
27
27
|
import { DOCUMENT, CommonModule, NgIf, AsyncPipe, NgFor, NgClass } from '@angular/common';
|
|
28
28
|
import * as i2$3 from '@taiga-ui/polymorpheus';
|
|
@@ -46,6 +46,7 @@ import * as i5$1 from '@taiga-ui/addon-charts';
|
|
|
46
46
|
import { TuiLineDaysChart, TuiLineDaysChartHint, TuiAxes } from '@taiga-ui/addon-charts';
|
|
47
47
|
import { TuiAppearance as TuiAppearance$1, TuiWithAppearance as TuiWithAppearance$1 } from '@taiga-ui/core/directives/appearance';
|
|
48
48
|
import { TuiIcons as TuiIcons$1, TuiWithIcons as TuiWithIcons$1 } from '@taiga-ui/core/directives/icons';
|
|
49
|
+
import * as i5$2 from '@taiga-ui/kit/components/slider';
|
|
49
50
|
import * as i9 from 'angular8-yandex-maps';
|
|
50
51
|
import { AngularYandexMapsModule } from 'angular8-yandex-maps';
|
|
51
52
|
import * as i2$5 from '@taiga-ui/experimental/components/expand';
|
|
@@ -542,6 +543,14 @@ const SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS = tuiCreateToken([]);
|
|
|
542
543
|
*/
|
|
543
544
|
const SC_BANNER_DURATION = tuiCreateToken(5000);
|
|
544
545
|
|
|
546
|
+
/**
|
|
547
|
+
* Длительность {@link debounceTime} в миллисекундах по умолчанию.
|
|
548
|
+
*/
|
|
549
|
+
const SC_DEBOUNCE_TIME_DEFAULT = new InjectionToken('scDebounceTimeDefault', {
|
|
550
|
+
providedIn: 'root',
|
|
551
|
+
factory: () => 300,
|
|
552
|
+
});
|
|
553
|
+
|
|
545
554
|
/**
|
|
546
555
|
* Пайп для форматирования даты и времени.
|
|
547
556
|
*/
|
|
@@ -919,13 +928,13 @@ class ScSelectOnFocusinDirective {
|
|
|
919
928
|
}
|
|
920
929
|
}
|
|
921
930
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSelectOnFocusinDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
922
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ScSelectOnFocusinDirective, isStandalone: true, selector: "tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber]", host: { listeners: { "focusin": "onFocusIn($event.target)" } }, ngImport: i0 }); }
|
|
931
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ScSelectOnFocusinDirective, isStandalone: true, selector: "tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber], input[tuiTextfield], input[tuiInputSlider]", host: { listeners: { "focusin": "onFocusIn($event.target)" } }, ngImport: i0 }); }
|
|
923
932
|
}
|
|
924
933
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSelectOnFocusinDirective, decorators: [{
|
|
925
934
|
type: Directive,
|
|
926
935
|
args: [{
|
|
927
936
|
standalone: true,
|
|
928
|
-
selector: 'tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber]',
|
|
937
|
+
selector: 'tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber], input[tuiTextfield], input[tuiInputSlider]',
|
|
929
938
|
host: {
|
|
930
939
|
'(focusin)': 'onFocusIn($event.target)',
|
|
931
940
|
},
|
|
@@ -5438,7 +5447,7 @@ class ScAddOrEditingCartItemFormComponent {
|
|
|
5438
5447
|
}
|
|
5439
5448
|
}
|
|
5440
5449
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAddOrEditingCartItemFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5441
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScAddOrEditingCartItemFormComponent, isStandalone: true, selector: "sc-add-or-editing-cart-item-form", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, cartItem: { classPropertyName: "cartItem", publicName: "cartItem", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", editCartItem: "editCartItem" }, ngImport: i0, template: "<!-- \u0424\u043E\u0440\u043C\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u0440\u044F\u0435\u043C\u043E\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430. -->\n<form\n *ngIf=\"product\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit()\"\n ScNextInputFocus\n class=\"flex flex-col gap-2\"\n>\n @let step = lengthStep();\n\n <!-- \u0414\u043B\u0438\u043D\u0430 \u0442\u043E\u0432\u0430\u0440\u0430 (\u043C\u0435\u0442\u0440\u0430\u0436) -->\n <label\n *ngIf=\"productIsMeasurable()\"\n tuiLabel\n >\n \u041C\u0435\u0442\u0440\u0430\u0436, {{ product().unit.name }}\n @if (!step || maxLength()) {\n {{ lengthHint() }}\n }\n\n <tui-textfield>\n <input\n tuiInputNumber\n formControlName=\"length\"\n [tuiNumberFormat]=\"{ precision: 2 }\"\n [max]=\"maxLength() || null\"\n [min]=\"minLength() || null\"\n (keydown.arrowDown)=\"onStepLength(-(lengthStep() ?? 0.01))\"\n (keydown.arrowUp)=\"onStepLength(lengthStep() ?? 0.01)\"\n autocomplete=\"length\"\n />\n </tui-textfield>\n <tui-error\n formControlName=\"length\"\n [error]=\"[] | tuiFieldError | async\"\n />\n <p\n *ngIf=\"lengthStep()\"\n class=\"tui-form__field-note\"\n >\n \u041C\u0435\u0442\u0440\u0430\u0436 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u0435\u043D {{ lengthStep() }}\n </p>\n </label>\n\n <!-- \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <label tuiLabel>\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u0448\u0442.\n <tui-textfield>\n <tui-chip\n *ngIf=\"isLengthConfigurator() && productMultiplicity() && step\"\n size=\"s\"\n appearance=\"negative\"\n class=\"font-bold\"\n >\n x {{ step }} {{ product().unit.name }}\n </tui-chip>\n\n <input\n placeholder=\"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\"\n tuiInputNumber\n [tuiNumberFormat]=\"{ decimalMode: 'not-zero' }\"\n [min]=\"productMultiplicity()\"\n (keydown.arrowDown)=\"onStepQuantity(-productMultiplicity())\"\n (keydown.arrowUp)=\"onStepQuantity(productMultiplicity())\"\n formControlName=\"quantity\"\n autocomplete=\"quantity\"\n />\n </tui-textfield>\n <p class=\"tui-form__field-note\">\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u043E {{ productMultiplicity() }}</p>\n <tui-error\n formControlName=\"quantity\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <!-- \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 -->\n <label tuiLabel>\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\n <tui-input formControlName=\"marker\">\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\n <input\n tuiTextfieldLegacy\n autocomplete=\"marker\"\n />\n </tui-input>\n <tui-error\n formControlName=\"marker\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F / \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0442\u043E\u0432\u0430\u0440\u0430 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 -->\n <div class=\"flex flex-col items-center\">\n @let cost = totalCost$ | async;\n\n <div *ngIf=\"cost\">\n \u0418\u0442\u043E\u0433\u043E:<span class=\"text-2xl font-bold\">\n {{ cost | tuiAmount | async }}\n {{ product().currency.symbol }}\n </span>\n </div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F / \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0442\u043E\u0432\u0430\u0440\u0430 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 -->\n <button\n tuiButton\n iconStart=\"@tui.check\"\n [disabled]=\"form.invalid\"\n [loading]=\"isLoading()\"\n type=\"submit\"\n class=\"mt-2\"\n >\n {{ cartItem() ? '\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C' : '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443' }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ScNextInputFocusModule }, { kind: "directive", type: ScNextInputFocusDirective, selector: "form[ScNextInputFocus]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: ScSelectOnFocusinDirective, selector: "tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber]" }, { kind: "directive", type: TuiNumberFormat, selector: "[tuiNumberFormat]", inputs: ["tuiNumberFormat"] }, { kind: "component", type: TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "component", type: i3.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "directive", type: i2$1.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: i1$2.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "pipe", type: TuiAmountPipe, name: "tuiAmount" }, { kind: "directive", type: TuiChip, selector: "tui-chip,[tuiChip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5450
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScAddOrEditingCartItemFormComponent, isStandalone: true, selector: "sc-add-or-editing-cart-item-form", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, cartItem: { classPropertyName: "cartItem", publicName: "cartItem", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", editCartItem: "editCartItem" }, ngImport: i0, template: "<!-- \u0424\u043E\u0440\u043C\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u0440\u044F\u0435\u043C\u043E\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430. -->\n<form\n *ngIf=\"product\"\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit()\"\n ScNextInputFocus\n class=\"flex flex-col gap-2\"\n>\n @let step = lengthStep();\n\n <!-- \u0414\u043B\u0438\u043D\u0430 \u0442\u043E\u0432\u0430\u0440\u0430 (\u043C\u0435\u0442\u0440\u0430\u0436) -->\n <label\n *ngIf=\"productIsMeasurable()\"\n tuiLabel\n >\n \u041C\u0435\u0442\u0440\u0430\u0436, {{ product().unit.name }}\n @if (!step || maxLength()) {\n {{ lengthHint() }}\n }\n\n <tui-textfield>\n <input\n tuiInputNumber\n formControlName=\"length\"\n [tuiNumberFormat]=\"{ precision: 2 }\"\n [max]=\"maxLength() || null\"\n [min]=\"minLength() || null\"\n (keydown.arrowDown)=\"onStepLength(-(lengthStep() ?? 0.01))\"\n (keydown.arrowUp)=\"onStepLength(lengthStep() ?? 0.01)\"\n autocomplete=\"length\"\n />\n </tui-textfield>\n <tui-error\n formControlName=\"length\"\n [error]=\"[] | tuiFieldError | async\"\n />\n <p\n *ngIf=\"lengthStep()\"\n class=\"tui-form__field-note\"\n >\n \u041C\u0435\u0442\u0440\u0430\u0436 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u0435\u043D {{ lengthStep() }}\n </p>\n </label>\n\n <!-- \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0442\u043E\u0432\u0430\u0440\u0430 -->\n <label tuiLabel>\n \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u0448\u0442.\n <tui-textfield>\n <tui-chip\n *ngIf=\"isLengthConfigurator() && productMultiplicity() && step\"\n size=\"s\"\n appearance=\"negative\"\n class=\"font-bold\"\n >\n x {{ step }} {{ product().unit.name }}\n </tui-chip>\n\n <input\n placeholder=\"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\"\n tuiInputNumber\n [tuiNumberFormat]=\"{ decimalMode: 'not-zero' }\"\n [min]=\"productMultiplicity()\"\n (keydown.arrowDown)=\"onStepQuantity(-productMultiplicity())\"\n (keydown.arrowUp)=\"onStepQuantity(productMultiplicity())\"\n formControlName=\"quantity\"\n autocomplete=\"quantity\"\n />\n </tui-textfield>\n <p class=\"tui-form__field-note\">\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u043E {{ productMultiplicity() }}</p>\n <tui-error\n formControlName=\"quantity\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <!-- \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 -->\n <label tuiLabel>\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\n <tui-input formControlName=\"marker\">\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\n <input\n tuiTextfieldLegacy\n autocomplete=\"marker\"\n />\n </tui-input>\n <tui-error\n formControlName=\"marker\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F / \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0442\u043E\u0432\u0430\u0440\u0430 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 -->\n <div class=\"flex flex-col items-center\">\n @let cost = totalCost$ | async;\n\n <div *ngIf=\"cost\">\n \u0418\u0442\u043E\u0433\u043E:<span class=\"text-2xl font-bold\">\n {{ cost | tuiAmount | async }}\n {{ product().currency.symbol }}\n </span>\n </div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F / \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0442\u043E\u0432\u0430\u0440\u0430 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 -->\n <button\n tuiButton\n iconStart=\"@tui.check\"\n [disabled]=\"form.invalid\"\n [loading]=\"isLoading()\"\n type=\"submit\"\n class=\"mt-2\"\n >\n {{ cartItem() ? '\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C' : '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443' }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ScNextInputFocusModule }, { kind: "directive", type: ScNextInputFocusDirective, selector: "form[ScNextInputFocus]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: ScSelectOnFocusinDirective, selector: "tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber], input[tuiTextfield], input[tuiInputSlider]" }, { kind: "directive", type: TuiNumberFormat, selector: "[tuiNumberFormat]", inputs: ["tuiNumberFormat"] }, { kind: "component", type: TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "component", type: i3.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiButtonLoading, selector: "[tuiButton][loading],[tuiIconButton][loading]", inputs: ["size", "loading"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "directive", type: i2$1.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: i1$2.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "pipe", type: TuiAmountPipe, name: "tuiAmount" }, { kind: "directive", type: TuiChip, selector: "tui-chip,[tuiChip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5442
5451
|
}
|
|
5443
5452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScAddOrEditingCartItemFormComponent, decorators: [{
|
|
5444
5453
|
type: Component,
|
|
@@ -5532,6 +5541,306 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5532
5541
|
args: [{ standalone: true, selector: 'sc-add-or-editing-cart-item-dialog', imports: [ScAddOrEditingCartItemFormComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (product) {\n <sc-add-or-editing-cart-item-form\n [product]=\"product\"\n [cartItem]=\"cartItem\"\n (addToCart)=\"onSubmit.next($event)\"\n (editCartItem)=\"onSubmit.next($event)\"\n [isLoading]=\"loading()\"\n ></sc-add-or-editing-cart-item-form>\n}\n" }]
|
|
5533
5542
|
}] });
|
|
5534
5543
|
|
|
5544
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
5545
|
+
/**
|
|
5546
|
+
* Конфигуратор распила сэндвич-панелей.
|
|
5547
|
+
*/
|
|
5548
|
+
class ScSandwichComponent {
|
|
5549
|
+
constructor() {
|
|
5550
|
+
/**
|
|
5551
|
+
* Данные настроек окружения.
|
|
5552
|
+
*/
|
|
5553
|
+
this.debounceTimeDefault = inject(SC_DEBOUNCE_TIME_DEFAULT);
|
|
5554
|
+
/**
|
|
5555
|
+
* Настройки для конфигуратора сэндвич-панелей.
|
|
5556
|
+
*/
|
|
5557
|
+
this.settings = input();
|
|
5558
|
+
/**
|
|
5559
|
+
* Идентификатор категории.
|
|
5560
|
+
*/
|
|
5561
|
+
this.categoryId = input.required();
|
|
5562
|
+
/**
|
|
5563
|
+
* Название конфигуратора.
|
|
5564
|
+
*/
|
|
5565
|
+
this.editor = input.required();
|
|
5566
|
+
/**
|
|
5567
|
+
* Позиция товара/услуги в корзине.
|
|
5568
|
+
*/
|
|
5569
|
+
this.cartItem = input.required();
|
|
5570
|
+
/**
|
|
5571
|
+
* Событие переключения отображения товаров.
|
|
5572
|
+
*/
|
|
5573
|
+
this.toggleShowEvent = output();
|
|
5574
|
+
/**
|
|
5575
|
+
* Форма добавления/редактирования продукта в корзине.
|
|
5576
|
+
*/
|
|
5577
|
+
this.form = new FormGroup({
|
|
5578
|
+
productCategoryId: new FormControl(null, { validators: Validators.required, nonNullable: false }),
|
|
5579
|
+
configurator: new FormControl(null, { validators: Validators.required, nonNullable: false }),
|
|
5580
|
+
quantity: new FormControl(null, { validators: [Validators.required, stepValidator(1)], nonNullable: false }),
|
|
5581
|
+
marker: new FormControl('', { nonNullable: true }),
|
|
5582
|
+
items: new FormArray([]),
|
|
5583
|
+
calculationId: new FormControl(null, { nonNullable: false }),
|
|
5584
|
+
});
|
|
5585
|
+
/**
|
|
5586
|
+
* Сервис для работы с корзиной.
|
|
5587
|
+
*/
|
|
5588
|
+
this.cartService = inject(ScCartService);
|
|
5589
|
+
/**
|
|
5590
|
+
* Сервис конвертации данных.
|
|
5591
|
+
*/
|
|
5592
|
+
this.convertersService = inject(ScConvertersService);
|
|
5593
|
+
/**
|
|
5594
|
+
* Контекст диалогового окна, в котором открыт компонент.
|
|
5595
|
+
*/
|
|
5596
|
+
this.context = inject(POLYMORPHEUS_CONTEXT, { optional: true });
|
|
5597
|
+
/**
|
|
5598
|
+
* Сервис для работы с каталогом.
|
|
5599
|
+
*/
|
|
5600
|
+
this.catalogService = inject(ScCatalogService);
|
|
5601
|
+
/**
|
|
5602
|
+
* Сервис для работы с конфигураторами.
|
|
5603
|
+
*/
|
|
5604
|
+
this.configuratorService = inject(ScConfiguratorService);
|
|
5605
|
+
/**
|
|
5606
|
+
* {@link Observable} списка товаров категории.
|
|
5607
|
+
*/
|
|
5608
|
+
this.products$ = toObservable(this.categoryId).pipe(switchMap((categoryId) => {
|
|
5609
|
+
if (!categoryId) {
|
|
5610
|
+
return of([]);
|
|
5611
|
+
}
|
|
5612
|
+
return this.catalogService.getProductsCategoryCached$({ categoryId: Number(categoryId) }).pipe(map((products) => products ?? []));
|
|
5613
|
+
}));
|
|
5614
|
+
/**
|
|
5615
|
+
* Выбранный продукт (материал для раскроя).
|
|
5616
|
+
*/
|
|
5617
|
+
this.product = new FormControl(null, { validators: Validators.required, nonNullable: false });
|
|
5618
|
+
/**
|
|
5619
|
+
* Результат расчета оптимизации раскладки.
|
|
5620
|
+
*/
|
|
5621
|
+
this.calculateResult$ = combineLatest({
|
|
5622
|
+
productId: tuiControlValue(this.product).pipe(map((product) => product?.id ?? null)),
|
|
5623
|
+
items: tuiControlValue(this.items),
|
|
5624
|
+
}).pipe(debounceTime(this.debounceTimeDefault), filter(() => this.product.valid && this.form.controls.items.valid), switchMap(({ productId, items }) => {
|
|
5625
|
+
if (productId === null || items.length === 0) {
|
|
5626
|
+
return of(null);
|
|
5627
|
+
}
|
|
5628
|
+
return this.configuratorService.calculate$(this.categoryId(), this.editor(), { productId, items }).pipe(tap((calculateResult) => {
|
|
5629
|
+
this.form.get('quantity')?.setValue(calculateResult.quantity);
|
|
5630
|
+
}), catchError(() => of(null)));
|
|
5631
|
+
}));
|
|
5632
|
+
/**
|
|
5633
|
+
* Валидатор для ширины изделия.
|
|
5634
|
+
*/
|
|
5635
|
+
this.validatorWidth$ = tuiControlValue(this.product).pipe(map((product) => Validators.min(product?.properties?.width ?? 0)));
|
|
5636
|
+
/**
|
|
5637
|
+
* Валидатор для длины изделия.
|
|
5638
|
+
*/
|
|
5639
|
+
this.validatorLength$ = tuiControlValue(this.product).pipe(map((product) => Validators.min(product?.properties?.length ?? 0)));
|
|
5640
|
+
/**
|
|
5641
|
+
* Признак того, что выполняется запрос на отправку данных выполняется.
|
|
5642
|
+
*/
|
|
5643
|
+
this.isSubmitLoading = signal(false);
|
|
5644
|
+
/**
|
|
5645
|
+
* Ссылка для автоматического управления уничтожением зависимостей.
|
|
5646
|
+
*/
|
|
5647
|
+
this.destroyRef = inject(DestroyRef);
|
|
5648
|
+
}
|
|
5649
|
+
/**
|
|
5650
|
+
* Массив изделий.
|
|
5651
|
+
*/
|
|
5652
|
+
get items() {
|
|
5653
|
+
return this.form.controls.items;
|
|
5654
|
+
}
|
|
5655
|
+
/** @inheritDoc */
|
|
5656
|
+
ngOnInit() {
|
|
5657
|
+
this.setDefaultFormValue();
|
|
5658
|
+
this.product.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((product) => {
|
|
5659
|
+
if (product) {
|
|
5660
|
+
this.items.controls.forEach((item) => {
|
|
5661
|
+
const value = item.getRawValue();
|
|
5662
|
+
if ((product.properties?.width && value.width < product.properties.width) || (product.properties?.length && value.length < product.properties.length)) {
|
|
5663
|
+
item.patchValue({
|
|
5664
|
+
width: Math.min(value.width, product.properties.width ?? value.width),
|
|
5665
|
+
length: Math.min(value.length, product.properties.length ?? value.length),
|
|
5666
|
+
});
|
|
5667
|
+
}
|
|
5668
|
+
});
|
|
5669
|
+
}
|
|
5670
|
+
});
|
|
5671
|
+
}
|
|
5672
|
+
/**
|
|
5673
|
+
* Создает группу для изделия.
|
|
5674
|
+
*
|
|
5675
|
+
* @param item Параметры изделия.
|
|
5676
|
+
*/
|
|
5677
|
+
createItemGroup(item) {
|
|
5678
|
+
return new FormGroup({
|
|
5679
|
+
width: new FormControl(item?.width ?? 0, {
|
|
5680
|
+
validators: [Validators.required, Validators.min(this.settings()?.minWidth ?? 0.01)],
|
|
5681
|
+
nonNullable: true,
|
|
5682
|
+
}),
|
|
5683
|
+
length: new FormControl(item?.length ?? 0, {
|
|
5684
|
+
validators: [Validators.required, Validators.min(this.settings()?.minLength ?? 0.01)],
|
|
5685
|
+
nonNullable: true,
|
|
5686
|
+
}),
|
|
5687
|
+
quantity: new FormControl(item?.quantity ?? 1, {
|
|
5688
|
+
validators: [Validators.required, Validators.min(1)],
|
|
5689
|
+
nonNullable: true,
|
|
5690
|
+
}),
|
|
5691
|
+
});
|
|
5692
|
+
}
|
|
5693
|
+
/**
|
|
5694
|
+
* Добавляет новое изделие в форму.
|
|
5695
|
+
*/
|
|
5696
|
+
addItem() {
|
|
5697
|
+
this.items.push(this.createItemGroup());
|
|
5698
|
+
}
|
|
5699
|
+
/**
|
|
5700
|
+
* Удаляет изделие из формы.
|
|
5701
|
+
*
|
|
5702
|
+
* @param index Индекс изделия.
|
|
5703
|
+
*/
|
|
5704
|
+
removeItem(index) {
|
|
5705
|
+
this.items.removeAt(index);
|
|
5706
|
+
}
|
|
5707
|
+
/**
|
|
5708
|
+
* Возвращает итоговую стоимость.
|
|
5709
|
+
*
|
|
5710
|
+
* @param calculateResult Результат расчета оптимизации раскладки.
|
|
5711
|
+
*/
|
|
5712
|
+
getTotalCost(calculateResult) {
|
|
5713
|
+
if (!this.product.value?.costRub) {
|
|
5714
|
+
return 0;
|
|
5715
|
+
}
|
|
5716
|
+
const quantity = this.form.get('quantity')?.value ?? 1;
|
|
5717
|
+
const totalCost = calculateResult.quantity * this.product.value.costRub * quantity;
|
|
5718
|
+
return Math.round(totalCost * 100) / 100;
|
|
5719
|
+
}
|
|
5720
|
+
/**
|
|
5721
|
+
* Обработчик добавления/редактирования продукта в корзине.
|
|
5722
|
+
*
|
|
5723
|
+
* @param calculateResult Результат расчета оптимизации раскладки.
|
|
5724
|
+
*/
|
|
5725
|
+
onSubmit(calculateResult) {
|
|
5726
|
+
if (!calculateResult || this.form.invalid) {
|
|
5727
|
+
return;
|
|
5728
|
+
}
|
|
5729
|
+
const formValue = { ...this.form.value, productId: this.product.value?.id ?? null, calculationId: calculateResult.id };
|
|
5730
|
+
// Удаляем items, так как они не нужны в {@link ScINewCartItemSandwich}.
|
|
5731
|
+
delete formValue.items;
|
|
5732
|
+
const cartItem = this.cartItem();
|
|
5733
|
+
const newCartItem$ = cartItem
|
|
5734
|
+
? this.cartService.patchCartItem$(cartItem.id, this.convertersService.removeNull(formValue))
|
|
5735
|
+
: this.cartService.addToCart$(this.convertersService.removeNull(formValue));
|
|
5736
|
+
this.isSubmitLoading.set(true);
|
|
5737
|
+
newCartItem$
|
|
5738
|
+
.pipe(tap(() => {
|
|
5739
|
+
if (this.context) {
|
|
5740
|
+
this.context.$implicit.complete();
|
|
5741
|
+
}
|
|
5742
|
+
else {
|
|
5743
|
+
this.setDefaultFormValue();
|
|
5744
|
+
}
|
|
5745
|
+
}), catchError((error) => {
|
|
5746
|
+
if (error instanceof HttpErrorResponse) {
|
|
5747
|
+
const { errors, message } = error.error;
|
|
5748
|
+
if (errors) {
|
|
5749
|
+
Object.keys(errors).forEach((key) => {
|
|
5750
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
5751
|
+
this.form.get(key)?.setErrors({ serverResponse: errors[key] });
|
|
5752
|
+
});
|
|
5753
|
+
}
|
|
5754
|
+
else if (message) {
|
|
5755
|
+
this.form.setErrors({ serverResponse: [message] });
|
|
5756
|
+
}
|
|
5757
|
+
}
|
|
5758
|
+
return of();
|
|
5759
|
+
}), finalize(() => {
|
|
5760
|
+
this.isSubmitLoading.set(false);
|
|
5761
|
+
}))
|
|
5762
|
+
.subscribe();
|
|
5763
|
+
}
|
|
5764
|
+
/**
|
|
5765
|
+
* Устанавливает начальные значения для полей формы.
|
|
5766
|
+
*/
|
|
5767
|
+
setDefaultFormValue() {
|
|
5768
|
+
this.form.reset({
|
|
5769
|
+
productCategoryId: Number(this.categoryId()),
|
|
5770
|
+
configurator: this.editor(),
|
|
5771
|
+
quantity: this.cartItem()?.quantity ?? null,
|
|
5772
|
+
marker: this.cartItem()?.marker ?? '',
|
|
5773
|
+
});
|
|
5774
|
+
this.items.clear();
|
|
5775
|
+
this.product.reset(this.cartItem()?.product ?? null);
|
|
5776
|
+
const configuratorParameters = this.cartItem()?.configuratorParams;
|
|
5777
|
+
configuratorParameters?.items.forEach((item) => {
|
|
5778
|
+
this.items.push(this.createItemGroup({ width: item.width, length: item.length, quantity: item.quantity }));
|
|
5779
|
+
});
|
|
5780
|
+
if (!configuratorParameters?.items.length) {
|
|
5781
|
+
this.addItem();
|
|
5782
|
+
}
|
|
5783
|
+
}
|
|
5784
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSandwichComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5785
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScSandwichComponent, isStandalone: true, selector: "sc-sandwich", inputs: { settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, categoryId: { classPropertyName: "categoryId", publicName: "categoryId", isSignal: true, isRequired: true, transformFunction: null }, editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, cartItem: { classPropertyName: "cartItem", publicName: "cartItem", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { toggleShowEvent: "toggleShowEvent" }, providers: [
|
|
5786
|
+
tuiNumberFormatProvider({ precision: 0 }),
|
|
5787
|
+
tuiInputNumberOptionsProvider({
|
|
5788
|
+
min: 0,
|
|
5789
|
+
}),
|
|
5790
|
+
tuiItemsHandlersProvider({
|
|
5791
|
+
stringify: signal((x) => x.name),
|
|
5792
|
+
identityMatcher: signal((a, b) => a.id === b.id),
|
|
5793
|
+
}),
|
|
5794
|
+
], ngImport: i0, template: "@if (!cartItem() && settings()?.allowShowTable) {\n <div class=\"mb-5 flex justify-center\">\n <button\n tuiButton\n appearance=\"secondary\"\n (click)=\"toggleShowEvent.emit()\"\n type=\"button\"\n iconStart=\"@tui.layout-list\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u0432\u0438\u0434\u0435 \u0441\u043F\u0438\u0441\u043A\u0430\n </button>\n </div>\n}\n<div class=\"\">\n @let calculateResult = calculateResult$ | async;\n @let products = products$ | async;\n @let productValue = product.value;\n @let validatorWidth = validatorWidth$ | async;\n @let validatorLength = validatorLength$ | async;\n\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit(calculateResult)\"\n ScNextInputFocus\n class=\"flex flex-col gap-3\"\n >\n <label\n tuiLabel\n class=\"grow\"\n >\n \u0422\u043E\u0432\u0430\u0440\n <tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n tuiChevron\n tuiSelect\n [formControl]=\"product\"\n placeholder=\"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\"\n />\n\n <tui-data-list-wrapper\n *tuiTextfieldDropdown\n new\n [items]=\"products\"\n />\n </tui-textfield>\n @if (productValue) {\n <div class=\"ml-2 text-tui-text-secondary\">\n \u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C:\n <span class=\"font-bold\">{{ productValue.costRub?.toLocaleString() }} {{ productValue.currency.symbol }}/\u0448\u0442.</span>\n </div>\n }\n <tui-error\n [formControl]=\"product\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n @if (product.value && validatorWidth && validatorLength) {\n <p class=\"w-full font-bold\">\u0420\u0430\u0437\u043C\u0435\u0440\u044B \u0438\u0437\u0434\u0435\u043B\u0438\u0439</p>\n <p class=\"w-full\">\n \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430: {{ settings()?.minWidth }} \u043C\u043C.\n <br />\n \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430: {{ product.value.properties?.width }} \u043C\u043C.\n <br />\n \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ settings()?.minLength }} \u043C\u043C.\n <br />\n \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ product.value.properties?.length }} \u043C\u043C.\n <br />\n </p>\n <div\n formArrayName=\"items\"\n class=\"flex flex-col gap-3\"\n >\n @for (item of items.controls; track item) {\n <div\n class=\"flex grow gap-2\"\n [formGroupName]=\"$index\"\n >\n <div class=\"grid grow grid-cols-3 gap-2\">\n <label tuiLabel>\n \u0428\u0438\u0440\u0438\u043D\u0430, \u043C\u043C\n <tui-textfield>\n <input\n tuiInputSlider\n formControlName=\"width\"\n [min]=\"settings()?.minWidth ?? 0\"\n [max]=\"product.value.properties?.width ?? 0\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u0428\u0438\u0440\u0438\u043D\u0430\"\n autocomplete=\"off\"\n />\n @if (product.value) {\n <input\n tuiSlider\n type=\"range\"\n />\n }\n </tui-textfield>\n @if (product.value) {\n <div class=\"slider-ticks-labels\">\n <span> 0 </span>\n <span>{{ product.value.properties?.width }}</span>\n </div>\n }\n <tui-error\n formControlName=\"width\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <label tuiLabel>\n \u0414\u043B\u0438\u043D\u0430, \u043C\u043C\n <tui-textfield>\n <input\n tuiInputSlider\n formControlName=\"length\"\n [min]=\"settings()?.minLength ?? 0\"\n [max]=\"product.value.properties?.length ?? 0\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u0414\u043B\u0438\u043D\u0430\"\n autocomplete=\"off\"\n />\n @if (product.value) {\n <input\n tuiSlider\n type=\"range\"\n />\n }\n </tui-textfield>\n @if (product.value) {\n <div class=\"slider-ticks-labels\">\n <span> 0 </span>\n <span>{{ product.value.properties?.length }}</span>\n </div>\n }\n <tui-error\n formControlName=\"length\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n <label tuiLabel>\n <span class=\"whitespace-nowrap\">\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u0448\u0442</span>\n <tui-textfield [tuiTextfieldCleaner]=\"false\">\n <input\n tuiInputNumber\n formControlName=\"quantity\"\n [min]=\"1\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\"\n autocomplete=\"off\"\n />\n </tui-textfield>\n <tui-error\n formControlName=\"quantity\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n </div>\n <button\n tuiIconButton\n (click)=\"removeItem($index)\"\n [disabled]=\"items.length <= 1\"\n size=\"m\"\n type=\"button\"\n iconStart=\"@tui.trash-2\"\n appearance=\"secondary\"\n class=\"mt-6\"\n [style.flex]=\"'0 0 auto'\"\n ></button>\n </div>\n }\n </div>\n <button\n tuiButton\n appearance=\"secondary\"\n [disabled]=\"items.invalid\"\n (click)=\"addItem()\"\n type=\"button\"\n class=\"self-center\"\n iconStart=\"@tui.plus\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u0434\u0435\u043B\u0438\u0435\n </button>\n } @else if (product.value) {\n <tui-error error=\"\u0420\u0430\u0441\u0447\u0435\u0442 \u043F\u043E \u043F\u0440\u043E\u0434\u0443\u043A\u0442\u0443 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u0435\u043D. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u0443\" />\n }\n\n <label tuiLabel>\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 \u0440\u0430\u0441\u043F\u0438\u043B\u0430\n <tui-textfield>\n <input\n tuiTextfield\n formControlName=\"marker\"\n placeholder=\"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 \u0440\u0430\u0441\u043F\u0438\u043B\u0430\"\n autocomplete=\"marker\"\n />\n </tui-textfield>\n\n <tui-error\n formControlName=\"marker\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n @if (calculateResult && product.value) {\n <div class=\"mt-2 flex items-end gap-2\">\n <div>\n \u0418\u0442\u043E\u0433\u043E: <span class=\"text-xl font-bold\">{{ getTotalCost(calculateResult).toLocaleString() }} {{ product.value.currency.symbol }}</span>\n </div>\n @if (calculateResult?.quantity && productValue) {\n <div class=\"text-lg text-sc-dark-grey\">\n <span class=\"font-bold\"> ({{ calculateResult.quantity }} \u0448\u0442. </span> x\n <span class=\"font-bold\">{{ productValue.costRub?.toLocaleString() }} {{ productValue.currency.symbol }}/\u0448\u0442.) </span>\n </div>\n }\n </div>\n }\n\n <tui-error [error]=\"[] | tuiFieldError | async\" />\n <button\n [disabled]=\"form.invalid || !calculateResult || isSubmitLoading()\"\n tuiButton\n class=\"self-center\"\n iconStart=\"@tui.check\"\n >\n {{ !cartItem() ? '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443' : '\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C' }}\n </button>\n </form>\n</div>\n", styles: [":host{display:block;width:100%;max-width:30rem}.slider-ticks-labels{--t-offset: calc($thumb / 2);display:flex;font:var(--tui-font-text-s);margin-inline-start:var(--t-offset);margin-inline-end:var(--t-offset);color:var(--tui-text-secondary)}.slider-ticks-labels>*{position:relative;flex:2;text-align:center}.slider-ticks-labels>*:first-child{left:calc(-1 * var(--t-offset));inset-inline-start:calc(-1 * var(--t-offset));flex:1;text-align:start}.slider-ticks-labels>*:last-child{right:calc(-1 * var(--t-offset));flex:1;text-align:end}@supports (inset-inline-end: 0){.slider-ticks-labels>*:last-child{right:unset;inset-inline-end:calc(-1 * var(--t-offset))}}tui-input-slider+.slider-ticks-labels{margin-inline-start:calc(var(--tui-radius-m) / 2 + var(--t-offset))}tui-textfield+.slider-ticks-labels{--t-offset: calc(var(--tui-radius-m) / 2 + $thumb / 2)}tui-textfield[data-size=l]+.slider-ticks-labels{--t-offset: calc(var(--tui-radius-l) / 2 + $thumb / 2)}tui-input-range:not([new])+.slider-ticks-labels,tui-range+.slider-ticks-labels{--t-offset: $thumb}tui-input-range[new]+.slider-ticks-labels{--t-offset: calc(map-get($track-inset, $input-size) + $thumb)}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: ScNextInputFocusModule }, { kind: "directive", type: ScNextInputFocusDirective, selector: "form[ScNextInputFocus]" }, { kind: "directive", type: TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "component", type: TuiError, selector: "tui-error", inputs: ["error"] }, { kind: "component", type: i1$2.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i1$2.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i1$2.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i1$2.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: i2$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i2$1.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "directive", type: TuiNumberFormat, selector: "[tuiNumberFormat]", inputs: ["tuiNumberFormat"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TuiFieldErrorPipe, name: "tuiFieldError" }, { kind: "component", type: i5$2.TuiSliderComponent, selector: "input[type=range][tuiSlider]", inputs: ["size", "segments"] }, { kind: "directive", type: i2$1.TuiInputSliderDirective, selector: "input[tuiInputSlider]" }, { kind: "directive", type: ScSelectOnFocusinDirective, selector: "tui-input-number, tui-input, tui-input-phone, tui-input-date, tui-input-password, input[tuiInputNumber], input[tuiTextfield], input[tuiInputSlider]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5795
|
+
}
|
|
5796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSandwichComponent, decorators: [{
|
|
5797
|
+
type: Component,
|
|
5798
|
+
args: [{ standalone: true, selector: 'sc-sandwich', imports: [
|
|
5799
|
+
TuiAppearance$1,
|
|
5800
|
+
TuiWithAppearance$1,
|
|
5801
|
+
TuiIcons$1,
|
|
5802
|
+
TuiWithIcons$1,
|
|
5803
|
+
TuiButton,
|
|
5804
|
+
FormsModule,
|
|
5805
|
+
ReactiveFormsModule,
|
|
5806
|
+
ScNextInputFocusModule,
|
|
5807
|
+
TuiLabel,
|
|
5808
|
+
TuiDataListWrapperComponent,
|
|
5809
|
+
TuiError,
|
|
5810
|
+
TuiTextfield,
|
|
5811
|
+
TuiChevron,
|
|
5812
|
+
TuiSelect,
|
|
5813
|
+
TuiInputNumber,
|
|
5814
|
+
TuiNumberFormat,
|
|
5815
|
+
AsyncPipe,
|
|
5816
|
+
TuiFieldErrorPipe,
|
|
5817
|
+
TuiInputSlider,
|
|
5818
|
+
TuiDataList,
|
|
5819
|
+
ScSelectOnFocusinDirective,
|
|
5820
|
+
], providers: [
|
|
5821
|
+
tuiNumberFormatProvider({ precision: 0 }),
|
|
5822
|
+
tuiInputNumberOptionsProvider({
|
|
5823
|
+
min: 0,
|
|
5824
|
+
}),
|
|
5825
|
+
tuiItemsHandlersProvider({
|
|
5826
|
+
stringify: signal((x) => x.name),
|
|
5827
|
+
identityMatcher: signal((a, b) => a.id === b.id),
|
|
5828
|
+
}),
|
|
5829
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!cartItem() && settings()?.allowShowTable) {\n <div class=\"mb-5 flex justify-center\">\n <button\n tuiButton\n appearance=\"secondary\"\n (click)=\"toggleShowEvent.emit()\"\n type=\"button\"\n iconStart=\"@tui.layout-list\"\n >\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u0432\u0438\u0434\u0435 \u0441\u043F\u0438\u0441\u043A\u0430\n </button>\n </div>\n}\n<div class=\"\">\n @let calculateResult = calculateResult$ | async;\n @let products = products$ | async;\n @let productValue = product.value;\n @let validatorWidth = validatorWidth$ | async;\n @let validatorLength = validatorLength$ | async;\n\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"onSubmit(calculateResult)\"\n ScNextInputFocus\n class=\"flex flex-col gap-3\"\n >\n <label\n tuiLabel\n class=\"grow\"\n >\n \u0422\u043E\u0432\u0430\u0440\n <tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n tuiChevron\n tuiSelect\n [formControl]=\"product\"\n placeholder=\"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\"\n />\n\n <tui-data-list-wrapper\n *tuiTextfieldDropdown\n new\n [items]=\"products\"\n />\n </tui-textfield>\n @if (productValue) {\n <div class=\"ml-2 text-tui-text-secondary\">\n \u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C:\n <span class=\"font-bold\">{{ productValue.costRub?.toLocaleString() }} {{ productValue.currency.symbol }}/\u0448\u0442.</span>\n </div>\n }\n <tui-error\n [formControl]=\"product\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n @if (product.value && validatorWidth && validatorLength) {\n <p class=\"w-full font-bold\">\u0420\u0430\u0437\u043C\u0435\u0440\u044B \u0438\u0437\u0434\u0435\u043B\u0438\u0439</p>\n <p class=\"w-full\">\n \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430: {{ settings()?.minWidth }} \u043C\u043C.\n <br />\n \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0448\u0438\u0440\u0438\u043D\u0430: {{ product.value.properties?.width }} \u043C\u043C.\n <br />\n \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ settings()?.minLength }} \u043C\u043C.\n <br />\n \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ product.value.properties?.length }} \u043C\u043C.\n <br />\n </p>\n <div\n formArrayName=\"items\"\n class=\"flex flex-col gap-3\"\n >\n @for (item of items.controls; track item) {\n <div\n class=\"flex grow gap-2\"\n [formGroupName]=\"$index\"\n >\n <div class=\"grid grow grid-cols-3 gap-2\">\n <label tuiLabel>\n \u0428\u0438\u0440\u0438\u043D\u0430, \u043C\u043C\n <tui-textfield>\n <input\n tuiInputSlider\n formControlName=\"width\"\n [min]=\"settings()?.minWidth ?? 0\"\n [max]=\"product.value.properties?.width ?? 0\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u0428\u0438\u0440\u0438\u043D\u0430\"\n autocomplete=\"off\"\n />\n @if (product.value) {\n <input\n tuiSlider\n type=\"range\"\n />\n }\n </tui-textfield>\n @if (product.value) {\n <div class=\"slider-ticks-labels\">\n <span> 0 </span>\n <span>{{ product.value.properties?.width }}</span>\n </div>\n }\n <tui-error\n formControlName=\"width\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n <label tuiLabel>\n \u0414\u043B\u0438\u043D\u0430, \u043C\u043C\n <tui-textfield>\n <input\n tuiInputSlider\n formControlName=\"length\"\n [min]=\"settings()?.minLength ?? 0\"\n [max]=\"product.value.properties?.length ?? 0\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u0414\u043B\u0438\u043D\u0430\"\n autocomplete=\"off\"\n />\n @if (product.value) {\n <input\n tuiSlider\n type=\"range\"\n />\n }\n </tui-textfield>\n @if (product.value) {\n <div class=\"slider-ticks-labels\">\n <span> 0 </span>\n <span>{{ product.value.properties?.length }}</span>\n </div>\n }\n <tui-error\n formControlName=\"length\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n <label tuiLabel>\n <span class=\"whitespace-nowrap\">\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u0448\u0442</span>\n <tui-textfield [tuiTextfieldCleaner]=\"false\">\n <input\n tuiInputNumber\n formControlName=\"quantity\"\n [min]=\"1\"\n [tuiNumberFormat]=\"{ precision: 0 }\"\n placeholder=\"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\"\n autocomplete=\"off\"\n />\n </tui-textfield>\n <tui-error\n formControlName=\"quantity\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n </div>\n <button\n tuiIconButton\n (click)=\"removeItem($index)\"\n [disabled]=\"items.length <= 1\"\n size=\"m\"\n type=\"button\"\n iconStart=\"@tui.trash-2\"\n appearance=\"secondary\"\n class=\"mt-6\"\n [style.flex]=\"'0 0 auto'\"\n ></button>\n </div>\n }\n </div>\n <button\n tuiButton\n appearance=\"secondary\"\n [disabled]=\"items.invalid\"\n (click)=\"addItem()\"\n type=\"button\"\n class=\"self-center\"\n iconStart=\"@tui.plus\"\n >\n \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u0434\u0435\u043B\u0438\u0435\n </button>\n } @else if (product.value) {\n <tui-error error=\"\u0420\u0430\u0441\u0447\u0435\u0442 \u043F\u043E \u043F\u0440\u043E\u0434\u0443\u043A\u0442\u0443 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u0435\u043D. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u0443\" />\n }\n\n <label tuiLabel>\n \u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 \u0440\u0430\u0441\u043F\u0438\u043B\u0430\n <tui-textfield>\n <input\n tuiTextfield\n formControlName=\"marker\"\n placeholder=\"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430 \u0440\u0430\u0441\u043F\u0438\u043B\u0430\"\n autocomplete=\"marker\"\n />\n </tui-textfield>\n\n <tui-error\n formControlName=\"marker\"\n [error]=\"[] | tuiFieldError | async\"\n />\n </label>\n\n @if (calculateResult && product.value) {\n <div class=\"mt-2 flex items-end gap-2\">\n <div>\n \u0418\u0442\u043E\u0433\u043E: <span class=\"text-xl font-bold\">{{ getTotalCost(calculateResult).toLocaleString() }} {{ product.value.currency.symbol }}</span>\n </div>\n @if (calculateResult?.quantity && productValue) {\n <div class=\"text-lg text-sc-dark-grey\">\n <span class=\"font-bold\"> ({{ calculateResult.quantity }} \u0448\u0442. </span> x\n <span class=\"font-bold\">{{ productValue.costRub?.toLocaleString() }} {{ productValue.currency.symbol }}/\u0448\u0442.) </span>\n </div>\n }\n </div>\n }\n\n <tui-error [error]=\"[] | tuiFieldError | async\" />\n <button\n [disabled]=\"form.invalid || !calculateResult || isSubmitLoading()\"\n tuiButton\n class=\"self-center\"\n iconStart=\"@tui.check\"\n >\n {{ !cartItem() ? '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443' : '\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C' }}\n </button>\n </form>\n</div>\n", styles: [":host{display:block;width:100%;max-width:30rem}.slider-ticks-labels{--t-offset: calc($thumb / 2);display:flex;font:var(--tui-font-text-s);margin-inline-start:var(--t-offset);margin-inline-end:var(--t-offset);color:var(--tui-text-secondary)}.slider-ticks-labels>*{position:relative;flex:2;text-align:center}.slider-ticks-labels>*:first-child{left:calc(-1 * var(--t-offset));inset-inline-start:calc(-1 * var(--t-offset));flex:1;text-align:start}.slider-ticks-labels>*:last-child{right:calc(-1 * var(--t-offset));flex:1;text-align:end}@supports (inset-inline-end: 0){.slider-ticks-labels>*:last-child{right:unset;inset-inline-end:calc(-1 * var(--t-offset))}}tui-input-slider+.slider-ticks-labels{margin-inline-start:calc(var(--tui-radius-m) / 2 + var(--t-offset))}tui-textfield+.slider-ticks-labels{--t-offset: calc(var(--tui-radius-m) / 2 + $thumb / 2)}tui-textfield[data-size=l]+.slider-ticks-labels{--t-offset: calc(var(--tui-radius-l) / 2 + $thumb / 2)}tui-input-range:not([new])+.slider-ticks-labels,tui-range+.slider-ticks-labels{--t-offset: $thumb}tui-input-range[new]+.slider-ticks-labels{--t-offset: calc(map-get($track-inset, $input-size) + $thumb)}\n"] }]
|
|
5830
|
+
}] });
|
|
5831
|
+
|
|
5832
|
+
/**
|
|
5833
|
+
* Skeleton конфигуратора сэндвич-панелей.
|
|
5834
|
+
*/
|
|
5835
|
+
class ScSandwichSkeletonComponent {
|
|
5836
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSandwichSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ScSandwichSkeletonComponent, isStandalone: true, selector: "sc-sandwich-skeleton", ngImport: i0, template: "<div class=\"w-100\">\n <div class=\"flex flex-col gap-3\">\n <!-- \u041F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0442\u043E\u0432\u0430\u0440\u0430. -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \"\u0420\u0430\u0437\u043C\u0435\u0440\u044B \u0438\u0437\u0434\u0435\u043B\u0438\u0439\". -->\n <div class=\"my-1.5 h-5 w-1/3 rounded bg-sc-light-grey\"></div>\n\n <!-- \u0422\u0435\u043A\u0441\u0442 \u0441 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n\n <!-- \u0411\u043B\u043E\u043A \u0441 \u0438\u0437\u0434\u0435\u043B\u0438\u044F\u043C\u0438. -->\n <div class=\"flex flex-col gap-3\">\n <!-- \u041F\u0435\u0440\u0432\u043E\u0435 \u0438\u0437\u0434\u0435\u043B\u0438\u0435. -->\n <div class=\"flex grow gap-4\">\n <div class=\"grid grow grid-cols-3 gap-4\">\n <!-- \u0428\u0438\u0440\u0438\u043D\u0430. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-1/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-2 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n <!-- \u0414\u043B\u0438\u043D\u0430. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-1/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-2 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n <!-- \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n </div>\n </div>\n <div class=\"mt-6 size-8 shrink-0 rounded-sm bg-sc-light-grey\"></div>\n </div>\n </div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u0434\u0435\u043B\u0438\u0435\". -->\n <button\n tuiButton\n appearance=\"secondary\"\n class=\"sc-skeleton self-center\"\n ></button>\n\n <!-- \u041F\u043E\u043B\u0435 \"\u0418\u0442\u043E\u0433\u043E\u0432\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0438\u0441\u0442\u043E\u0432\". -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u041F\u043E\u043B\u0435 \"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\". -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u0418\u0442\u043E\u0433\u043E\u0432\u0430\u044F \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C. -->\n <div class=\"my-2.5 h-6 w-1/3 rounded bg-sc-light-grey\"></div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438. -->\n <button\n tuiButton\n class=\"sc-skeleton self-center\"\n ></button>\n </div>\n</div>\n" }); }
|
|
5838
|
+
}
|
|
5839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScSandwichSkeletonComponent, decorators: [{
|
|
5840
|
+
type: Component,
|
|
5841
|
+
args: [{ standalone: true, selector: 'sc-sandwich-skeleton', template: "<div class=\"w-100\">\n <div class=\"flex flex-col gap-3\">\n <!-- \u041F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0442\u043E\u0432\u0430\u0440\u0430. -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \"\u0420\u0430\u0437\u043C\u0435\u0440\u044B \u0438\u0437\u0434\u0435\u043B\u0438\u0439\". -->\n <div class=\"my-1.5 h-5 w-1/3 rounded bg-sc-light-grey\"></div>\n\n <!-- \u0422\u0435\u043A\u0441\u0442 \u0441 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n\n <!-- \u0411\u043B\u043E\u043A \u0441 \u0438\u0437\u0434\u0435\u043B\u0438\u044F\u043C\u0438. -->\n <div class=\"flex flex-col gap-3\">\n <!-- \u041F\u0435\u0440\u0432\u043E\u0435 \u0438\u0437\u0434\u0435\u043B\u0438\u0435. -->\n <div class=\"flex grow gap-4\">\n <div class=\"grid grow grid-cols-3 gap-4\">\n <!-- \u0428\u0438\u0440\u0438\u043D\u0430. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-1/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-2 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n <!-- \u0414\u043B\u0438\u043D\u0430. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n <div class=\"my-1 h-3 w-1/3 rounded bg-sc-light-grey\"></div>\n <div class=\"my-1 h-2 w-2/3 rounded bg-sc-light-grey\"></div>\n </div>\n <!-- \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E. -->\n <div class=\"flex flex-col gap-1\">\n <div class=\"my-1 h-3 w-1/2 rounded bg-sc-light-grey\"></div>\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n </div>\n </div>\n <div class=\"mt-6 size-8 shrink-0 rounded-sm bg-sc-light-grey\"></div>\n </div>\n </div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u0434\u0435\u043B\u0438\u0435\". -->\n <button\n tuiButton\n appearance=\"secondary\"\n class=\"sc-skeleton self-center\"\n ></button>\n\n <!-- \u041F\u043E\u043B\u0435 \"\u0418\u0442\u043E\u0433\u043E\u0432\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0438\u0441\u0442\u043E\u0432\". -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u041F\u043E\u043B\u0435 \"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u043A\u0430\". -->\n <div class=\"mb-4 mt-2 h-10 w-full rounded-sm bg-sc-light-grey\"></div>\n\n <!-- \u0418\u0442\u043E\u0433\u043E\u0432\u0430\u044F \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C. -->\n <div class=\"my-2.5 h-6 w-1/3 rounded bg-sc-light-grey\"></div>\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438. -->\n <button\n tuiButton\n class=\"sc-skeleton self-center\"\n ></button>\n </div>\n</div>\n" }]
|
|
5842
|
+
}] });
|
|
5843
|
+
|
|
5535
5844
|
/**
|
|
5536
5845
|
* Компонент карточки менеджера Push-уведомлений.
|
|
5537
5846
|
*/
|
|
@@ -6898,7 +7207,7 @@ class ScFrequentlyAskedQuestionsGroupSelectorComponent {
|
|
|
6898
7207
|
}
|
|
6899
7208
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsGroupSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6900
7209
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScFrequentlyAskedQuestionsGroupSelectorComponent, isStandalone: true, selector: "sc-frequently-asked-questions-group-selector", inputs: { viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { groupIdChange: "groupIdChange" }, providers: [
|
|
6901
|
-
tuiItemsHandlersProvider({
|
|
7210
|
+
tuiItemsHandlersProvider$1({
|
|
6902
7211
|
stringify: (item) => item.name,
|
|
6903
7212
|
}),
|
|
6904
7213
|
], ngImport: i0, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n <button\n tuiButton\n size=\"xs\"\n [tuiAppearanceState]=\"groupControl.value === item ? 'hover' : null\"\n [disabled]=\"groupControl.value === item\"\n (click)=\"groupControl.patchValue(item)\"\n appearance=\"flat-grayscale\"\n class=\"!justify-start !text-body-s-bold\"\n >\n {{ item.name }}\n </button>\n }\n </div>\n </div>\n }\n\n @case ('select') {\n <form>\n <tui-select\n [formControl]=\"groupControl\"\n [tuiTextfieldLabelOutside]=\"true\"\n >\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"groups\"\n />\n </tui-select>\n </form>\n }\n }\n}\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i3.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i3.TuiSelectDirective, selector: "tui-select" }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i3$3.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i3.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -6906,7 +7215,7 @@ class ScFrequentlyAskedQuestionsGroupSelectorComponent {
|
|
|
6906
7215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsGroupSelectorComponent, decorators: [{
|
|
6907
7216
|
type: Component,
|
|
6908
7217
|
args: [{ standalone: true, selector: 'sc-frequently-asked-questions-group-selector', imports: [AsyncPipe, TuiSelectModule, TuiTextfieldControllerModule, ReactiveFormsModule, TuiDataList, TuiDataListWrapper, NgIf, TuiButton, FormsModule], providers: [
|
|
6909
|
-
tuiItemsHandlersProvider({
|
|
7218
|
+
tuiItemsHandlersProvider$1({
|
|
6910
7219
|
stringify: (item) => item.name,
|
|
6911
7220
|
}),
|
|
6912
7221
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n <button\n tuiButton\n size=\"xs\"\n [tuiAppearanceState]=\"groupControl.value === item ? 'hover' : null\"\n [disabled]=\"groupControl.value === item\"\n (click)=\"groupControl.patchValue(item)\"\n appearance=\"flat-grayscale\"\n class=\"!justify-start !text-body-s-bold\"\n >\n {{ item.name }}\n </button>\n }\n </div>\n </div>\n }\n\n @case ('select') {\n <form>\n <tui-select\n [formControl]=\"groupControl\"\n [tuiTextfieldLabelOutside]=\"true\"\n >\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"groups\"\n />\n </tui-select>\n </form>\n }\n }\n}\n" }]
|
|
@@ -8355,5 +8664,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8355
8664
|
* Generated bundle index. Do not edit.
|
|
8356
8665
|
*/
|
|
8357
8666
|
|
|
8358
|
-
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FilesAndDocumentsModule, 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_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScJsonLdCategoryComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScPublicOfferComponent, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
8667
|
+
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FilesAndDocumentsModule, FinishDateTimeTransformerDirective, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_BANNER_DURATION, SC_DATE_FORMATTER, SC_DEBOUNCE_TIME_DEFAULT, 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_SHOW_HELP_NOTIFICATION_IN_PHONE_INPUT, SC_USER_CITY_INFO, SC_USER_INFO, SC_USER_PROVIDERS, SC_VERIFICATION_CODE_TIMEOUT, ScAccordionComponent, ScAccordionContentDirective, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCartItemComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScJsonLdCategoryComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderItemMobileComponent, ScOrderModule, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScPublicOfferComponent, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSandwichComponent, ScSandwichSkeletonComponent, ScSelectOnFocusinDirective, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
8359
8668
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|