@snabcentr/client-ui 5.2.0 → 5.3.0
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, NgZone, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, ChangeDetectorRef, Directive, Pipe, ElementRef, Renderer2, HostListener, input, computed, model, output, DestroyRef, effect, ViewChild, ContentChild, viewChild, HostBinding, ContentChildren, forwardRef, contentChild, TemplateRef } from '@angular/core';
|
|
3
|
-
import { ScContactsService, ScUserService, ScLocationsService, ScSuggestionService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, IS_RUNNING_ON_TERMINAL, ScVerificationService, ScConvertersService, ScReferencesService, ScOpfList, ScBannerService, ScMediaImageTransformerPipe, ScCartService, ScUploadedFile, loadingPlaceholder, SC_ORDER_LOADER, ScMimeTypes, ScCatalogService, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCatalogFilterService, ScIdOrSlugPipe, SC_CATEGORY_INFO, ScConfiguratorService, ScContragentService, ScDeliveryAddressService, SC_URLS, RESPONSE, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFilesService, ScOrderDraftsService, ScRouteKeys, ScSeoService, scOrderIsLoaded, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService } from '@snabcentr/client-core';
|
|
4
|
-
import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, filter, map, debounceTime, startWith, catchError, throwError, share, Subject, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, Observable, pairwise, Subscription, merge, skip, from, concatMap, noop, first } from 'rxjs';
|
|
3
|
+
import { ScContactsService, ScUserService, ScLocationsService, ScSuggestionService, ScISuggestionType, SC_MIN_LENGTH_SEARCH_TERM, ScAuthService, SEARCH_TERM, ScUnitsHelper, ScImageHelper, SC_PATH_IMAGE_NOT_FOUND, ScImage, ScPhoneService, ScUserMetrikaService, ScUserMetrikaGoalsEnum, ScVCardService, IS_RUNNING_ON_TERMINAL, ScVerificationService, ScConvertersService, ScReferencesService, ScOpfList, ScBannerService, ScMediaImageTransformerPipe, ScCartService, ScUploadedFile, loadingPlaceholder, SC_ORDER_LOADER, ScMimeTypes, ScCatalogService, IS_SERVER, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCatalogFilterService, ScIdOrSlugPipe, SC_CATEGORY_INFO, ScConfiguratorService, ScContragentService, ScDeliveryAddressService, SC_URLS, RESPONSE, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFilesService, ScOrdersService, ScUIService, SC_USER_INFO as SC_USER_INFO$1, ScPaymentType, ScDeliveryType, TERMINAL_PROVIDERS, ScOrderDraftsService, ScRouteKeys, ScSeoService, scOrderIsLoaded, ScFrequentlyAskedQuestionsService, SC_COMPANY_INFO, ScFeedbackService } from '@snabcentr/client-core';
|
|
4
|
+
import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, filter, map, debounceTime, startWith, catchError, throwError, share, Subject, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, combineLatest, Observable, pairwise, Subscription, merge, skip, from, concatMap, noop, first, retry } from 'rxjs';
|
|
5
5
|
import { WA_WINDOW, WA_NAVIGATOR } from '@ng-web-apis/common';
|
|
6
6
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
7
|
-
import { tuiIsPresent, TuiDay, TuiTime, TuiValueTransformer, tuiControlValue, tuiMarkControlAsTouchedAndValidate, TuiAutoFocus, TuiHovered, TuiDayRange, TuiMonth, tuiProvide,
|
|
7
|
+
import { tuiIsPresent, TuiDay, TuiTime, TuiValueTransformer, tuiControlValue, tuiMarkControlAsTouchedAndValidate, TuiAutoFocus, TuiHovered, TuiDayRange, TuiMonth, tuiProvide, TuiValidationError, TUI_WINDOW_SIZE, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1$1 from '@taiga-ui/kit';
|
|
9
|
-
import { tuiInputDateOptionsProvider, TuiAvatar, TuiInitialsPipe, TuiButtonLoading, TuiSortCountriesPipe, TuiPush, TuiInputPhoneInternational, TuiSelect, TuiDataListWrapperComponent, TuiStringifyContentPipe, TuiComboBox, TuiStepper, TuiAccordionDirective, TuiAccordion, TuiFiles, TuiChip, TuiInputNumber, TuiLineClamp, TuiBadge, TuiInputNumberDirective, TuiTooltip, TuiHighlight, TuiFade, TuiRange, TuiChevron, tuiInputNumberOptionsProvider, TuiInputSlider, TuiPushComponent, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TuiTreeComponent, TuiTreeChildren, TuiTreeControllerDirective, TUI_TREE_LOADER, TuiPreviewDialogService, TuiPreview, TUI_CONFIRM, TuiDataListWrapper, TuiPagination,
|
|
9
|
+
import { tuiInputDateOptionsProvider, TuiAvatar, TuiInitialsPipe, TuiButtonLoading, TuiSortCountriesPipe, TuiPush, TuiInputPhoneInternational, TuiSelect, TuiDataListWrapperComponent, TuiStringifyContentPipe, TuiComboBox, TuiStepper, TuiAccordionDirective, TuiAccordion, TuiFiles, TuiChip, TuiInputNumber, TuiLineClamp, TuiBadge, TuiInputNumberDirective, TuiTooltip, TuiHighlight, TuiFade, TuiRange, TuiChevron, tuiInputNumberOptionsProvider, TuiInputSlider, TuiPushComponent, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TuiTreeComponent, TuiTreeChildren, TuiTreeControllerDirective, TUI_TREE_LOADER, TuiPreviewDialogService, TuiPreview, tuiFilesAccepted, TuiInputDate, TuiTextarea, TUI_CONFIRM, TuiDataListWrapper, TuiPagination, TuiInputPhone, TuiPassword } from '@taiga-ui/kit';
|
|
10
10
|
import { HttpErrorResponse, HttpClient } from '@angular/common/http';
|
|
11
11
|
import * as i1 from '@angular/forms';
|
|
12
12
|
import { NgControl, FormControl, FormGroupDirective, ReactiveFormsModule, FormGroup, Validators, FormsModule, FormArray, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -17,7 +17,7 @@ import { AsyncPipe, DOCUMENT, NgTemplateOutlet, NgClass, CommonModule, DecimalPi
|
|
|
17
17
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
18
18
|
import { MaskitoDirective } from '@maskito/angular';
|
|
19
19
|
import { getCountries } from 'libphonenumber-js';
|
|
20
|
-
import { isNil, isUndefined, isObject } from 'lodash-es';
|
|
20
|
+
import { isNil, isUndefined, isObject, isArray, isString } from 'lodash-es';
|
|
21
21
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet, injectContext } from '@taiga-ui/polymorpheus';
|
|
22
22
|
import { QRCodeComponent } from 'angularx-qrcode';
|
|
23
23
|
import * as i3 from '@taiga-ui/core/portals/dropdown';
|
|
@@ -42,6 +42,8 @@ import { TuiAxes, TuiLineDaysChart } from '@taiga-ui/addon-charts';
|
|
|
42
42
|
import { tuiPure } from '@taiga-ui/legacy';
|
|
43
43
|
import * as i6 from '@taiga-ui/core/components/slider';
|
|
44
44
|
import { YaMapComponent } from 'angular8-yandex-maps';
|
|
45
|
+
import { isValid, parse, format } from 'date-fns';
|
|
46
|
+
import * as i6$1 from '@taiga-ui/core/components/calendar';
|
|
45
47
|
import * as i5 from 'ng-recaptcha-2';
|
|
46
48
|
import { RecaptchaComponent, RecaptchaFormsModule, RecaptchaModule } from 'ng-recaptcha-2';
|
|
47
49
|
|
|
@@ -8066,6 +8068,562 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8066
8068
|
args: [{ standalone: true, selector: 'sc-order-items-list-by-directions', imports: [ScOrderItemsListComponent, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-5\">\n <!-- \u0413\u0440\u0443\u043F\u043F\u044B \u0442\u043E\u0432\u0430\u0440\u043E\u0432 \u043F\u043E \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F\u043C \u043F\u0440\u043E\u0434\u0430\u0436. -->\n @for (direction of itemsByDirections(); track direction.direction?.id; let groupIndex = $index) {\n <div class=\"flex flex-col gap-2.5\">\n @if (direction.direction && itemsByDirections().length > 1) {\n <div class=\"text-base font-bold\">\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0434\u0430\u0436: {{ direction.direction.description }}</div>\n }\n\n <sc-order-items-list\n [items]=\"direction.items\"\n [selectable]=\"selectable()\"\n [editable]=\"editable()\"\n (selectedItemsIdsChange)=\"selectedItemsHandler($event, direction)\"\n />\n\n <!-- \u0424\u0443\u0442\u0435\u0440 \u0433\u0440\u0443\u043F\u043F\u044B \u0442\u043E\u0432\u0430\u0440\u043E\u0432. -->\n <div class=\"flex flex-col items-center sm:flex-row sm:items-start sm:flex-wrap-reverse grow gap-x-2.5 gap-y-4\">\n <ng-content select=\"[footerActions]\" />\n\n <!-- \u041A\u043D\u043E\u043F\u043A\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F. -->\n @if (showContinueButton()) {\n <button\n tuiButton\n type=\"button\"\n [disabled]=\"direction.getItemsByIds(selectedItemsIds()).length === 0\"\n [iconStart]=\"continueButtonText().iconStart\"\n class=\"sm:ml-auto\"\n (click)=\"continueClick.emit(direction)\"\n >\n {{ continueButtonText().title }}\n </button>\n }\n </div>\n </div>\n }\n\n @if (nullItems().length) {\n <div class=\"flex flex-col gap-2.5\">\n <div class=\"text-base font-bold\">\u0422\u043E\u0432\u0430\u0440\u044B \u0438 \u0443\u0441\u043B\u0443\u0433\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F.</div>\n\n <sc-order-items-list\n [items]=\"nullItems()\"\n [selectable]=\"false\"\n [editable]=\"editable()\"\n />\n </div>\n }\n</div>\n" }]
|
|
8067
8069
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], showContinueButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showContinueButton", required: false }] }], continueButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "continueButtonText", required: false }] }], continueClick: [{ type: i0.Output, args: ["continueClick"] }], selectedItemsIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsIds", required: false }] }, { type: i0.Output, args: ["selectedItemsIdsChange"] }] } });
|
|
8068
8070
|
|
|
8071
|
+
/**
|
|
8072
|
+
* Список товаров заказа по направлению продаж с выбором позиций для оформления.
|
|
8073
|
+
*/
|
|
8074
|
+
class ScOrderDirectionItemsComponent {
|
|
8075
|
+
constructor() {
|
|
8076
|
+
/**
|
|
8077
|
+
* Товары направления.
|
|
8078
|
+
*/
|
|
8079
|
+
this.items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
8080
|
+
/**
|
|
8081
|
+
* Разрешить редактирование позиций (количество, удаление).
|
|
8082
|
+
*/
|
|
8083
|
+
this.editable = input(false, ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
8084
|
+
/**
|
|
8085
|
+
* Включить выбор позиций чекбоксами.
|
|
8086
|
+
*/
|
|
8087
|
+
this.selectable = input(true, ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
8088
|
+
/**
|
|
8089
|
+
* Время обработки и принятия заказов (из настроек окружения приложения).
|
|
8090
|
+
*/
|
|
8091
|
+
this.orderProcessingAcceptanceTime = input('', ...(ngDevMode ? [{ debugName: "orderProcessingAcceptanceTime" }] : /* istanbul ignore next */ []));
|
|
8092
|
+
/**
|
|
8093
|
+
* Изменение выбора позиций для оформления.
|
|
8094
|
+
*/
|
|
8095
|
+
this.selectedItemsIdsChange = output();
|
|
8096
|
+
}
|
|
8097
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScOrderDirectionItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8098
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.16", type: ScOrderDirectionItemsComponent, isStandalone: true, selector: "sc-order-direction-items", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, orderProcessingAcceptanceTime: { classPropertyName: "orderProcessingAcceptanceTime", publicName: "orderProcessingAcceptanceTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedItemsIdsChange: "selectedItemsIdsChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-5\">\n <ul class=\"ml-4 list-disc text-tui-success-fill\">\n <li>\u0417\u0430\u044F\u0432\u043A\u0438 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u044E\u0442\u0441\u044F \u043D\u0435 \u043F\u043E\u0437\u0434\u043D\u0435\u0435 {{ orderProcessingAcceptanceTime() }} \u043F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u0434\u043D\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u043A\u0438.</li>\n <li>\u0417\u0430\u043A\u0430\u0437\u044B \u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u043E\u0439 \u043D\u0430 \u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u044E\u0442\u0441\u044F \u0434\u043E {{ orderProcessingAcceptanceTime() }} \u043F\u044F\u0442\u043D\u0438\u0446\u044B.</li>\n <li>\u0417\u0430\u043A\u0430\u0437\u044B, \u0441\u043E\u0437\u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u0437\u0434\u043D\u0435\u0435 {{ orderProcessingAcceptanceTime() }} \u043F\u044F\u0442\u043D\u0438\u0446\u044B \u0438\u043B\u0438 \u0432 \u0441\u0443\u0431\u0431\u043E\u0442\u0443/\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u044B \u0432 \u0431\u0443\u0434\u043D\u0438\u0435 \u0434\u043D\u0438.</li>\n <li>\n \u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u043F\u0438\u0441\u043A\u043E\u043C \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\n <a\n tuiLink\n routerLink=\"/profile\"\n >\n \u043B\u0438\u0447\u043D\u043E\u043C \u043A\u0430\u0431\u0438\u043D\u0435\u0442\u0435\n </a>\n .\n </li>\n </ul>\n\n <div class=\"sub-title\">\u0421\u043E\u0441\u0442\u0430\u0432 \u0437\u0430\u043A\u0430\u0437\u0430</div>\n\n <sc-order-items-list-by-directions\n [items]=\"items()\"\n [editable]=\"editable()\"\n [selectable]=\"selectable()\"\n [showContinueButton]=\"false\"\n (selectedItemsIdsChange)=\"selectedItemsIdsChange.emit($event)\"\n >\n <ng-content\n select=\"[footerActions]\"\n ngProjectAs=\"[footerActions]\"\n />\n </sc-order-items-list-by-directions>\n</div>\n", dependencies: [{ kind: "component", type: ScOrderItemsListByDirectionsComponent, selector: "sc-order-items-list-by-directions", inputs: ["items", "selectable", "editable", "showContinueButton", "continueButtonText", "selectedItemsIds"], outputs: ["continueClick", "selectedItemsIdsChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8099
|
+
}
|
|
8100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScOrderDirectionItemsComponent, decorators: [{
|
|
8101
|
+
type: Component,
|
|
8102
|
+
args: [{ selector: 'sc-order-direction-items', imports: [ScOrderItemsListByDirectionsComponent, RouterLink, TuiLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-5\">\n <ul class=\"ml-4 list-disc text-tui-success-fill\">\n <li>\u0417\u0430\u044F\u0432\u043A\u0438 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u044E\u0442\u0441\u044F \u043D\u0435 \u043F\u043E\u0437\u0434\u043D\u0435\u0435 {{ orderProcessingAcceptanceTime() }} \u043F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u0434\u043D\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u043A\u0438.</li>\n <li>\u0417\u0430\u043A\u0430\u0437\u044B \u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u043E\u0439 \u043D\u0430 \u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u044E\u0442\u0441\u044F \u0434\u043E {{ orderProcessingAcceptanceTime() }} \u043F\u044F\u0442\u043D\u0438\u0446\u044B.</li>\n <li>\u0417\u0430\u043A\u0430\u0437\u044B, \u0441\u043E\u0437\u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u0437\u0434\u043D\u0435\u0435 {{ orderProcessingAcceptanceTime() }} \u043F\u044F\u0442\u043D\u0438\u0446\u044B \u0438\u043B\u0438 \u0432 \u0441\u0443\u0431\u0431\u043E\u0442\u0443/\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u044B \u0432 \u0431\u0443\u0434\u043D\u0438\u0435 \u0434\u043D\u0438.</li>\n <li>\n \u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u043F\u0438\u0441\u043A\u043E\u043C \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\n <a\n tuiLink\n routerLink=\"/profile\"\n >\n \u043B\u0438\u0447\u043D\u043E\u043C \u043A\u0430\u0431\u0438\u043D\u0435\u0442\u0435\n </a>\n .\n </li>\n </ul>\n\n <div class=\"sub-title\">\u0421\u043E\u0441\u0442\u0430\u0432 \u0437\u0430\u043A\u0430\u0437\u0430</div>\n\n <sc-order-items-list-by-directions\n [items]=\"items()\"\n [editable]=\"editable()\"\n [selectable]=\"selectable()\"\n [showContinueButton]=\"false\"\n (selectedItemsIdsChange)=\"selectedItemsIdsChange.emit($event)\"\n >\n <ng-content\n select=\"[footerActions]\"\n ngProjectAs=\"[footerActions]\"\n />\n </sc-order-items-list-by-directions>\n</div>\n" }]
|
|
8103
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], orderProcessingAcceptanceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderProcessingAcceptanceTime", required: false }] }], selectedItemsIdsChange: [{ type: i0.Output, args: ["selectedItemsIdsChange"] }] } });
|
|
8104
|
+
|
|
8105
|
+
/**
|
|
8106
|
+
* Токен настроек {@link ScOrderFormComponent}.
|
|
8107
|
+
* Если не предоставлен, сохранение и восстановление метаданных формы отключены.
|
|
8108
|
+
*/
|
|
8109
|
+
const SC_ORDER_FORM_CONFIG = new InjectionToken('SC_ORDER_FORM_CONFIG');
|
|
8110
|
+
|
|
8111
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion,rxjs/no-sharereplay,@typescript-eslint/no-unsafe-enum-comparison,@typescript-eslint/unbound-method,@typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument,security/detect-object-injection */
|
|
8112
|
+
/**
|
|
8113
|
+
* Форма оформления заказа.
|
|
8114
|
+
*/
|
|
8115
|
+
class ScOrderFormComponent {
|
|
8116
|
+
/**
|
|
8117
|
+
* Инициализирует экземпляр класса {@link ScOrderFormComponent}.
|
|
8118
|
+
*/
|
|
8119
|
+
constructor() {
|
|
8120
|
+
/**
|
|
8121
|
+
* Идентификатор направления продаж заказа.
|
|
8122
|
+
*/
|
|
8123
|
+
this.directionId = input.required(...(ngDevMode ? [{ debugName: "directionId" }] : /* istanbul ignore next */ []));
|
|
8124
|
+
/**
|
|
8125
|
+
* Требовать подтверждённые контактные данные для оформления. Для черновика — `false`.
|
|
8126
|
+
*/
|
|
8127
|
+
this.enforceApprovedContacts = input(true, ...(ngDevMode ? [{ debugName: "enforceApprovedContacts" }] : /* istanbul ignore next */ []));
|
|
8128
|
+
/**
|
|
8129
|
+
* Сохранять и восстанавливать черновые данные формы по направлению (метаданные). Для черновика — `false`.
|
|
8130
|
+
* Работает только если предоставлен токен {@link SC_ORDER_FORM_CONFIG}.
|
|
8131
|
+
*/
|
|
8132
|
+
this.persistMetadata = input(true, ...(ngDevMode ? [{ debugName: "persistMetadata" }] : /* istanbul ignore next */ []));
|
|
8133
|
+
/**
|
|
8134
|
+
* Событие отправки валидной формы оформления. Полезная нагрузка — сырые значения формы.
|
|
8135
|
+
*/
|
|
8136
|
+
this.orderSubmit = output();
|
|
8137
|
+
/**
|
|
8138
|
+
* Сервис справочников.
|
|
8139
|
+
*/
|
|
8140
|
+
this.referencesService = inject(ScReferencesService);
|
|
8141
|
+
/**
|
|
8142
|
+
* Сервис работы с контрагентами.
|
|
8143
|
+
*/
|
|
8144
|
+
this.contragentService = inject(ScContragentService);
|
|
8145
|
+
/**
|
|
8146
|
+
* Сервис работы с адресами доставки.
|
|
8147
|
+
*/
|
|
8148
|
+
this.deliveryAddressService = inject(ScDeliveryAddressService);
|
|
8149
|
+
/**
|
|
8150
|
+
* Сервис для работы со складами.
|
|
8151
|
+
*/
|
|
8152
|
+
this.warehouseService = inject(ScWarehouseService);
|
|
8153
|
+
/**
|
|
8154
|
+
* Сервис для работы с заказами (загрузка дат доставки/самовывоза).
|
|
8155
|
+
*/
|
|
8156
|
+
this.ordersService = inject(ScOrdersService);
|
|
8157
|
+
/**
|
|
8158
|
+
* Сервис для работы с UI.
|
|
8159
|
+
*/
|
|
8160
|
+
this.uiService = inject(ScUIService);
|
|
8161
|
+
/**
|
|
8162
|
+
* Сервис конвертации данных.
|
|
8163
|
+
*/
|
|
8164
|
+
this.convertersService = inject(ScConvertersService);
|
|
8165
|
+
/**
|
|
8166
|
+
* Сервис работы с диалоговым окном.
|
|
8167
|
+
*/
|
|
8168
|
+
this.dialog = inject(TuiDialogService);
|
|
8169
|
+
/**
|
|
8170
|
+
* Провайдер данных о терминале.
|
|
8171
|
+
*/
|
|
8172
|
+
this.terminal = inject(IS_RUNNING_ON_TERMINAL);
|
|
8173
|
+
/**
|
|
8174
|
+
* Поток данных о текущем пользователе.
|
|
8175
|
+
*/
|
|
8176
|
+
this.user$ = inject(SC_USER_INFO$1);
|
|
8177
|
+
/**
|
|
8178
|
+
* Настройки формы оформления заказа. Если не предоставлены, метаданные формы не сохраняются.
|
|
8179
|
+
*/
|
|
8180
|
+
this.config = inject(SC_ORDER_FORM_CONFIG, { optional: true });
|
|
8181
|
+
/**
|
|
8182
|
+
* Признак выполнения скрипта на сервере.
|
|
8183
|
+
*/
|
|
8184
|
+
this.isServer = inject(IS_SERVER);
|
|
8185
|
+
/**
|
|
8186
|
+
* Ссылка для автоматического управления уничтожением зависимостей.
|
|
8187
|
+
*/
|
|
8188
|
+
this.destroyRef = inject(DestroyRef);
|
|
8189
|
+
/**
|
|
8190
|
+
* Задержка считывания сигналов формы, для избежания лишних обработок при смене значений.
|
|
8191
|
+
*/
|
|
8192
|
+
this.debounceTimeFormChange = 50;
|
|
8193
|
+
/**
|
|
8194
|
+
* Форма создания заказа.
|
|
8195
|
+
*/
|
|
8196
|
+
this.form = new FormGroup({
|
|
8197
|
+
contragentId: new FormControl(null, Validators.required),
|
|
8198
|
+
paymentType: new FormControl({ value: null, disabled: true }, Validators.required),
|
|
8199
|
+
deliveryType: new FormControl({ value: null, disabled: true }, Validators.required),
|
|
8200
|
+
deliveryDate: new FormControl({ value: null, disabled: true }, [
|
|
8201
|
+
Validators.required,
|
|
8202
|
+
({ value }) => {
|
|
8203
|
+
if (!value || this.deliveryDates().length === 0) {
|
|
8204
|
+
return null;
|
|
8205
|
+
}
|
|
8206
|
+
if (value && !this.deliveryDates().includes(value)) {
|
|
8207
|
+
return { serverResponse: 'Укажите корректную дату, или выберите из активных дат календаря' };
|
|
8208
|
+
}
|
|
8209
|
+
return null;
|
|
8210
|
+
},
|
|
8211
|
+
]),
|
|
8212
|
+
warehouseId: new FormControl({ value: null, disabled: true }, Validators.required),
|
|
8213
|
+
addressId: new FormControl({ value: null, disabled: true }, Validators.required),
|
|
8214
|
+
comment: new FormControl(null),
|
|
8215
|
+
image: new FormControl(null),
|
|
8216
|
+
});
|
|
8217
|
+
/**
|
|
8218
|
+
* Поле файла.
|
|
8219
|
+
*/
|
|
8220
|
+
this.controlFile = new FormControl(null);
|
|
8221
|
+
/**
|
|
8222
|
+
* {@link Observable} списка подтверждённых файлов.
|
|
8223
|
+
*/
|
|
8224
|
+
this.accepted$ = this.controlFile.valueChanges.pipe(map(() => tuiFilesAccepted(this.controlFile)));
|
|
8225
|
+
/**
|
|
8226
|
+
* Признак, что включён режим анимации предупреждения о неподтверждённых данных.
|
|
8227
|
+
*/
|
|
8228
|
+
this.warningShake = signal(false, ...(ngDevMode ? [{ debugName: "warningShake" }] : /* istanbul ignore next */ []));
|
|
8229
|
+
/**
|
|
8230
|
+
* Признак, что контрагент является физическим лицом.
|
|
8231
|
+
*/
|
|
8232
|
+
this.isIndividual = signal(true, ...(ngDevMode ? [{ debugName: "isIndividual" }] : /* istanbul ignore next */ []));
|
|
8233
|
+
/**
|
|
8234
|
+
* Список возможных дат самовывоза со склада.
|
|
8235
|
+
*/
|
|
8236
|
+
this.warehouseDeliveryDates = signal([], ...(ngDevMode ? [{ debugName: "warehouseDeliveryDates" }] : /* istanbul ignore next */ []));
|
|
8237
|
+
/**
|
|
8238
|
+
* Список возможных дат доставки.
|
|
8239
|
+
*/
|
|
8240
|
+
this.addressDeliveryDates = signal([], ...(ngDevMode ? [{ debugName: "addressDeliveryDates" }] : /* istanbul ignore next */ []));
|
|
8241
|
+
/**
|
|
8242
|
+
* {@link Observable} списка контрагентов пользователя.
|
|
8243
|
+
*/
|
|
8244
|
+
this.contragents$ = this.contragentService.contragents$;
|
|
8245
|
+
/**
|
|
8246
|
+
* {@link Observable} списка адресов контрагента.
|
|
8247
|
+
*/
|
|
8248
|
+
this.addresses$ = this.deliveryAddressService.deliveryAddresses$.pipe(tap((deliveryAddresses) => {
|
|
8249
|
+
if (deliveryAddresses && this.form.controls.addressId.value && !deliveryAddresses.some((delivery) => delivery.id === this.form.controls.addressId.value)) {
|
|
8250
|
+
this.form.controls.addressId.reset();
|
|
8251
|
+
}
|
|
8252
|
+
}));
|
|
8253
|
+
/**
|
|
8254
|
+
* {@link Observable} списка складов.
|
|
8255
|
+
*/
|
|
8256
|
+
this.warehouses$ = this.warehouseService.getWarehouses$();
|
|
8257
|
+
/**
|
|
8258
|
+
* {@link Observable} ОПФ выбранного контрагента.
|
|
8259
|
+
*/
|
|
8260
|
+
this.opf$ = tuiControlValue(this.form.controls.contragentId).pipe(filter(tuiIsPresent), tap(() => {
|
|
8261
|
+
this.form.controls.paymentType.enable();
|
|
8262
|
+
this.form.controls.deliveryType.enable();
|
|
8263
|
+
}), switchMap((selectContragentId) => this.contragents$.pipe(filter(tuiIsPresent), map((contragents) => contragents.find((contragent) => contragent.id === selectContragentId)), map((contragent) => contragent?.opf), tap((opf) => {
|
|
8264
|
+
this.isIndividual.set(opf?.id === ScOpfList.individual.valueOf());
|
|
8265
|
+
}))), shareReplay(1), takeUntilDestroyed(this.destroyRef));
|
|
8266
|
+
/**
|
|
8267
|
+
* {@link Observable} типов оплаты заказа.
|
|
8268
|
+
*/
|
|
8269
|
+
this.paymentTypes$ = this.opf$.pipe(map((opf) => opf && (opf.id === ScOpfList.individual ? ScPaymentType.beznal2 : ScPaymentType.online)), switchMap((paymentTypeFilter) => this.referencesService.paymentTypes$.pipe(map((paymentTypes) => (paymentTypeFilter ? paymentTypes : [])), map((paymentTypes) => paymentTypes.filter((type) => type.id !== paymentTypeFilter)), tap((paymentTypes) => {
|
|
8270
|
+
if (this.form.controls.paymentType.value && !paymentTypes.some((payment) => payment.id === this.form.controls.paymentType.value)) {
|
|
8271
|
+
this.form.controls.paymentType.reset();
|
|
8272
|
+
}
|
|
8273
|
+
if (!this.form.controls.paymentType.value && paymentTypes.length === 1) {
|
|
8274
|
+
this.form.controls.paymentType.patchValue(paymentTypes[0].id);
|
|
8275
|
+
}
|
|
8276
|
+
}))));
|
|
8277
|
+
/**
|
|
8278
|
+
* {@link Observable} типов доставки заказа.
|
|
8279
|
+
*/
|
|
8280
|
+
this.deliveryTypes$ = this.opf$.pipe(switchMap((opf) => this.referencesService.deliveryTypes$.pipe(map((deliveryTypes) => (opf ? deliveryTypes : [])), switchMap((deliveryTypes) => this.deliveryAddressService.deliveryAddresses$.pipe(map((deliveryAddresses) => opf?.id === ScOpfList.individual && !(deliveryAddresses && deliveryAddresses.length > 0)
|
|
8281
|
+
? deliveryTypes.filter((type) => type.id !== ScDeliveryType.delivery)
|
|
8282
|
+
: deliveryTypes))), tap((deliveryTypes) => {
|
|
8283
|
+
if (this.form.controls.deliveryType.value && !deliveryTypes.some((delivery) => delivery.id === this.form.controls.deliveryType.value)) {
|
|
8284
|
+
this.form.controls.deliveryType.reset();
|
|
8285
|
+
}
|
|
8286
|
+
if (!this.form.controls.deliveryType.value && deliveryTypes.length === 1) {
|
|
8287
|
+
this.form.controls.deliveryType.patchValue(deliveryTypes[0].id);
|
|
8288
|
+
}
|
|
8289
|
+
}))));
|
|
8290
|
+
/**
|
|
8291
|
+
* Признак, что выбран тип оплаты наличными.
|
|
8292
|
+
*/
|
|
8293
|
+
this.isCashPaymentSelected = toSignal(tuiControlValue(this.form.controls.paymentType).pipe(map((paymentType) => paymentType === ScPaymentType.nal)), { initialValue: false });
|
|
8294
|
+
/**
|
|
8295
|
+
* Признак, что номер телефона подтверждён.
|
|
8296
|
+
*/
|
|
8297
|
+
this.isPhoneApproved = toSignal(this.user$.pipe(filter((user) => !user.isGuest), map((user) => user.contacts.phone.isApproved)), { initialValue: true });
|
|
8298
|
+
/**
|
|
8299
|
+
* Признак, что адрес электронной почты подтверждён пользователем.
|
|
8300
|
+
*/
|
|
8301
|
+
this.isEmailApprovedUser = toSignal(this.user$.pipe(filter((user) => !user.isGuest), map((user) => user.contacts.email.isApproved)), { initialValue: true });
|
|
8302
|
+
/**
|
|
8303
|
+
* Признак, что адрес электронной почты подтверждён или контрагент является физическим лицом.
|
|
8304
|
+
*/
|
|
8305
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
8306
|
+
this.isEmailApproved = computed(() => this.isEmailApprovedUser() || this.isIndividual(), ...(ngDevMode ? [{ debugName: "isEmailApproved" }] : /* istanbul ignore next */ []));
|
|
8307
|
+
/**
|
|
8308
|
+
* Значение выбранного типа доставки.
|
|
8309
|
+
*/
|
|
8310
|
+
this.deliveryTypeValue = toSignal(tuiControlValue(this.form.controls.deliveryType), { initialValue: null });
|
|
8311
|
+
/**
|
|
8312
|
+
* Признак, что выбран тип доставки "Доставка".
|
|
8313
|
+
*/
|
|
8314
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
8315
|
+
this.isDelivery = computed(() => this.deliveryTypeValue() === ScDeliveryType.delivery, ...(ngDevMode ? [{ debugName: "isDelivery" }] : /* istanbul ignore next */ []));
|
|
8316
|
+
/**
|
|
8317
|
+
* Набор доступных дат в зависимости от типа доставки.
|
|
8318
|
+
*/
|
|
8319
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
8320
|
+
this.deliveryDates = computed(() => this.deliveryTypeValue() === ScDeliveryType.self_delivery ? this.warehouseDeliveryDates() : this.addressDeliveryDates(), ...(ngDevMode ? [{ debugName: "deliveryDates" }] : /* istanbul ignore next */ []));
|
|
8321
|
+
/**
|
|
8322
|
+
* Ссылка на элемент с предупреждением о неподтверждённых данных.
|
|
8323
|
+
*/
|
|
8324
|
+
this.unconfirmedDataWarning = viewChild('unconfirmedDataWarning', ...(ngDevMode ? [{ debugName: "unconfirmedDataWarning" }] : /* istanbul ignore next */ []));
|
|
8325
|
+
/**
|
|
8326
|
+
* Возвращает признак, что указанная дата недоступна для выбора.
|
|
8327
|
+
*
|
|
8328
|
+
* @param date Дата.
|
|
8329
|
+
*/
|
|
8330
|
+
this.deliveryDateFilter = (date) => !this.deliveryDates().includes(`${date.toString('yyyy/mm/dd', '-')} 00:00:00`);
|
|
8331
|
+
// Автоматически выбираем единственного контрагента-физлицо.
|
|
8332
|
+
this.contragents$
|
|
8333
|
+
.pipe(filter((contragents) => !!contragents && contragents.length === 1), first(), filter(([contragent]) => contragent.opf.id === ScOpfList.individual.valueOf()), takeUntilDestroyed(this.destroyRef))
|
|
8334
|
+
.subscribe(([contragent]) => {
|
|
8335
|
+
this.form.controls.contragentId?.patchValue(contragent.id);
|
|
8336
|
+
});
|
|
8337
|
+
this.initFormChanges();
|
|
8338
|
+
}
|
|
8339
|
+
/** @inheritdoc */
|
|
8340
|
+
ngOnInit() {
|
|
8341
|
+
// Восстанавливаем и сохраняем черновые данные формы по направлению.
|
|
8342
|
+
if (this.persistMetadata()) {
|
|
8343
|
+
this.initMetadata();
|
|
8344
|
+
}
|
|
8345
|
+
}
|
|
8346
|
+
/**
|
|
8347
|
+
* Преобразует объекты в значения, отображаемое в поле ввода.
|
|
8348
|
+
*
|
|
8349
|
+
* @param items Выбранные объекты выпадающего списка.
|
|
8350
|
+
*/
|
|
8351
|
+
// eslint-disable-next-line class-methods-use-this
|
|
8352
|
+
stringify(items) {
|
|
8353
|
+
const itemsMap = new Map(items.map((item) => {
|
|
8354
|
+
// eslint-disable-next-line unicorn/no-nested-ternary,sonarjs/no-nested-conditional
|
|
8355
|
+
const name = 'name' in item ? item.name : 'address' in item ? item.address : '';
|
|
8356
|
+
return [item.id, name];
|
|
8357
|
+
}));
|
|
8358
|
+
return ({ $implicit }) => itemsMap.get($implicit) ?? '';
|
|
8359
|
+
}
|
|
8360
|
+
/**
|
|
8361
|
+
* Обрабатывает отправку формы: валидирует и эмитит данные заказа родителю.
|
|
8362
|
+
*/
|
|
8363
|
+
submit() {
|
|
8364
|
+
this.form.markAllAsTouched();
|
|
8365
|
+
if (!this.form.valid) {
|
|
8366
|
+
return;
|
|
8367
|
+
}
|
|
8368
|
+
const contactsApproved = !this.enforceApprovedContacts() || (this.isPhoneApproved() && this.isEmailApproved());
|
|
8369
|
+
if (!contactsApproved) {
|
|
8370
|
+
this.triggerUnconfirmedWarning();
|
|
8371
|
+
return;
|
|
8372
|
+
}
|
|
8373
|
+
this.orderSubmit.emit(this.form.getRawValue());
|
|
8374
|
+
}
|
|
8375
|
+
/**
|
|
8376
|
+
* Применяет к полям формы ошибки, пришедшие от сервера.
|
|
8377
|
+
*
|
|
8378
|
+
* @param error Ответ сервера с ошибками.
|
|
8379
|
+
*/
|
|
8380
|
+
applyServerErrors(error) {
|
|
8381
|
+
const { errors, message } = error.error;
|
|
8382
|
+
if (errors) {
|
|
8383
|
+
Object.keys(errors).forEach((key) => {
|
|
8384
|
+
if (key === 'deliveryDate' && isArray(errors[key])) {
|
|
8385
|
+
this.form.get(key)?.setErrors({ serverResponse: new TuiValidationError(errors[key].at(1) ?? errors[key].at(0)) });
|
|
8386
|
+
}
|
|
8387
|
+
else {
|
|
8388
|
+
this.form.get(key)?.setErrors({ serverResponse: new TuiValidationError(errors[key]) });
|
|
8389
|
+
}
|
|
8390
|
+
this.form.get(key)?.markAsTouched();
|
|
8391
|
+
});
|
|
8392
|
+
}
|
|
8393
|
+
else if (message) {
|
|
8394
|
+
this.form.setErrors({ serverResponse: new TuiValidationError(message) });
|
|
8395
|
+
}
|
|
8396
|
+
}
|
|
8397
|
+
/**
|
|
8398
|
+
* Удаляет файл из формы заказа.
|
|
8399
|
+
*/
|
|
8400
|
+
removeFile() {
|
|
8401
|
+
this.controlFile.reset();
|
|
8402
|
+
}
|
|
8403
|
+
/**
|
|
8404
|
+
* Открывает диалоговое окно добавления адреса доставки.
|
|
8405
|
+
*/
|
|
8406
|
+
addDeliveryAddress() {
|
|
8407
|
+
this.dialog
|
|
8408
|
+
.open(new PolymorpheusComponent(ScAddDeliveryAddressDialogComponent), {
|
|
8409
|
+
size: 'l',
|
|
8410
|
+
label: 'Добавление адреса доставки',
|
|
8411
|
+
})
|
|
8412
|
+
.subscribe();
|
|
8413
|
+
}
|
|
8414
|
+
/**
|
|
8415
|
+
* Открывает диалоговое окно добавления контрагента.
|
|
8416
|
+
*/
|
|
8417
|
+
addContragent() {
|
|
8418
|
+
this.dialog
|
|
8419
|
+
.open(new PolymorpheusComponent(ScAddContragentDialogComponent), {
|
|
8420
|
+
size: 'm',
|
|
8421
|
+
label: 'Добавление контрагента',
|
|
8422
|
+
})
|
|
8423
|
+
.subscribe();
|
|
8424
|
+
}
|
|
8425
|
+
/**
|
|
8426
|
+
* Запускает анимацию предупреждения о неподтверждённых данных и прокручивает к нему.
|
|
8427
|
+
*/
|
|
8428
|
+
triggerUnconfirmedWarning() {
|
|
8429
|
+
const element = this.unconfirmedDataWarning()?.nativeElement;
|
|
8430
|
+
if (!this.isServer && element) {
|
|
8431
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
8432
|
+
}
|
|
8433
|
+
this.warningShake.set(false);
|
|
8434
|
+
setTimeout(() => {
|
|
8435
|
+
this.warningShake.set(true);
|
|
8436
|
+
});
|
|
8437
|
+
}
|
|
8438
|
+
/**
|
|
8439
|
+
* Восстанавливает черновые данные формы из метаданных и инициализирует их сохранение.
|
|
8440
|
+
*/
|
|
8441
|
+
initMetadata() {
|
|
8442
|
+
const { config } = this;
|
|
8443
|
+
if (!config) {
|
|
8444
|
+
return;
|
|
8445
|
+
}
|
|
8446
|
+
combineLatest({
|
|
8447
|
+
orderMetadata: this.uiService.getNewOrderMetadata$(this.directionId()),
|
|
8448
|
+
user: this.user$.pipe(filter((user) => !user.isGuest)),
|
|
8449
|
+
})
|
|
8450
|
+
.pipe(first(), takeUntilDestroyed(this.destroyRef))
|
|
8451
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
8452
|
+
.subscribe(({ orderMetadata }) => {
|
|
8453
|
+
let deliveryDate = orderMetadata?.deliveryDate && isValid(parse(orderMetadata.deliveryDate, config.dateFormats.api, new Date())) ? orderMetadata.deliveryDate : null;
|
|
8454
|
+
// Если дата старого формата, то преобразуем её в новый формат.
|
|
8455
|
+
// TODO: Убрать этот блок когда все даты у клиентов встанут в нормальном формате.
|
|
8456
|
+
if (orderMetadata?.deliveryDate && !deliveryDate && isValid(parse(orderMetadata.deliveryDate, config.dateFormats.uiDate, new Date()))) {
|
|
8457
|
+
deliveryDate = format(parse(orderMetadata.deliveryDate, config.dateFormats.uiDate, new Date()), config.dateFormats.api);
|
|
8458
|
+
}
|
|
8459
|
+
if (tuiIsPresent(orderMetadata)) {
|
|
8460
|
+
this.form.patchValue({
|
|
8461
|
+
contragentId: orderMetadata.contragentId,
|
|
8462
|
+
paymentType: orderMetadata.contragentId ? orderMetadata.paymentType : null,
|
|
8463
|
+
deliveryType: orderMetadata.contragentId ? orderMetadata.deliveryType : null,
|
|
8464
|
+
deliveryDate: orderMetadata.contragentId && Boolean(orderMetadata.deliveryType) && deliveryDate ? deliveryDate : null,
|
|
8465
|
+
addressId: orderMetadata.deliveryType === ScDeliveryType.delivery && orderMetadata.addressId ? orderMetadata.addressId : null,
|
|
8466
|
+
warehouseId: orderMetadata.contragentId && Boolean(orderMetadata.deliveryType) ? orderMetadata.warehouseId : null,
|
|
8467
|
+
comment: orderMetadata.comment,
|
|
8468
|
+
});
|
|
8469
|
+
}
|
|
8470
|
+
});
|
|
8471
|
+
this.form.valueChanges.pipe(debounceTime(config.debounceTime), takeUntilDestroyed(this.destroyRef)).subscribe((newOrder) => {
|
|
8472
|
+
this.uiService.setNewOrderMetadata(this.directionId(), this.convertersService.removeNull(newOrder));
|
|
8473
|
+
});
|
|
8474
|
+
}
|
|
8475
|
+
/**
|
|
8476
|
+
* Инициализирует подписки на изменения полей формы.
|
|
8477
|
+
*/
|
|
8478
|
+
initFormChanges() {
|
|
8479
|
+
this.initFileChange();
|
|
8480
|
+
this.initWarehouseChange();
|
|
8481
|
+
this.initDeliveryDatesChange();
|
|
8482
|
+
this.initDateFieldActivationChange();
|
|
8483
|
+
}
|
|
8484
|
+
/**
|
|
8485
|
+
* Инициализирует подписку на изменение поля прикрепления файла.
|
|
8486
|
+
*/
|
|
8487
|
+
initFileChange() {
|
|
8488
|
+
this.controlFile.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((file) => {
|
|
8489
|
+
if (file && this.form.controls.image) {
|
|
8490
|
+
this.onUploadFile(file, this.form.controls.image);
|
|
8491
|
+
}
|
|
8492
|
+
else {
|
|
8493
|
+
this.form.controls.image?.reset();
|
|
8494
|
+
}
|
|
8495
|
+
});
|
|
8496
|
+
}
|
|
8497
|
+
/**
|
|
8498
|
+
* Инициализирует подписку на изменение выбранного склада.
|
|
8499
|
+
*/
|
|
8500
|
+
initWarehouseChange() {
|
|
8501
|
+
this.form.controls.warehouseId.valueChanges
|
|
8502
|
+
.pipe(filter((warehouseId) => tuiIsPresent(warehouseId) && this.warehouseService.getCurrentWarehouseIdSelect() !== warehouseId), debounceTime(0), takeUntilDestroyed(this.destroyRef))
|
|
8503
|
+
.subscribe((id) => {
|
|
8504
|
+
this.warehouseService.setWarehouseIdSelectChange(id);
|
|
8505
|
+
});
|
|
8506
|
+
}
|
|
8507
|
+
/**
|
|
8508
|
+
* Инициализирует подписку на изменение адреса доставки и выбранного склада для получения списка доступных дат доставки.
|
|
8509
|
+
*/
|
|
8510
|
+
initDeliveryDatesChange() {
|
|
8511
|
+
merge(tuiControlValue(this.form.controls.addressId).pipe(filter(tuiIsPresent), debounceTime(this.debounceTimeFormChange), switchMap((addressId) => this.deliveriesByAddress(addressId))), tuiControlValue(this.form.controls.warehouseId).pipe(filter(tuiIsPresent), debounceTime(this.debounceTimeFormChange), filter(() => this.form.controls.deliveryType.value === ScDeliveryType.self_delivery), switchMap((warehouseId) => this.deliveriesByWarehouse(warehouseId))))
|
|
8512
|
+
.pipe(catchError((error) => {
|
|
8513
|
+
this.form.controls.deliveryDate.disable();
|
|
8514
|
+
return throwError(() => error);
|
|
8515
|
+
}), retry(), takeUntilDestroyed(this.destroyRef))
|
|
8516
|
+
.subscribe((deliveryDates) => {
|
|
8517
|
+
const deliveryDateValue = this.form.controls.deliveryDate.value;
|
|
8518
|
+
if (deliveryDateValue && !deliveryDates.includes(deliveryDateValue)) {
|
|
8519
|
+
this.form.controls.deliveryDate.reset();
|
|
8520
|
+
}
|
|
8521
|
+
});
|
|
8522
|
+
}
|
|
8523
|
+
/**
|
|
8524
|
+
* Инициализирует подписку на изменение полей формы для блокирования/активации поля выбора даты.
|
|
8525
|
+
*/
|
|
8526
|
+
initDateFieldActivationChange() {
|
|
8527
|
+
merge(tuiControlValue(this.form.controls.deliveryType), this.form.controls.contragentId?.valueChanges.pipe(filter(() => this.form.controls.deliveryType.value === ScDeliveryType.delivery)) ?? of())
|
|
8528
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
8529
|
+
.subscribe(() => {
|
|
8530
|
+
this.form.controls.deliveryDate.disable();
|
|
8531
|
+
this.form.controls.warehouseId.disable();
|
|
8532
|
+
this.addressDeliveryDates.set([]);
|
|
8533
|
+
if (this.form.controls.deliveryType.value === ScDeliveryType.delivery) {
|
|
8534
|
+
this.form.controls.addressId.enable();
|
|
8535
|
+
this.warehouseService
|
|
8536
|
+
.getDeliveryWarehouse$()
|
|
8537
|
+
.pipe(first(), takeUntilDestroyed(this.destroyRef))
|
|
8538
|
+
// eslint-disable-next-line rxjs/no-nested-subscribe
|
|
8539
|
+
.subscribe((warehouse) => {
|
|
8540
|
+
this.form.controls.warehouseId.patchValue(warehouse.id);
|
|
8541
|
+
});
|
|
8542
|
+
}
|
|
8543
|
+
if (this.form.controls.deliveryType.value === ScDeliveryType.self_delivery) {
|
|
8544
|
+
this.form.controls.addressId.disable();
|
|
8545
|
+
this.form.controls.warehouseId.enable();
|
|
8546
|
+
}
|
|
8547
|
+
});
|
|
8548
|
+
}
|
|
8549
|
+
/**
|
|
8550
|
+
* Запрашивает даты доставки по адресу.
|
|
8551
|
+
*
|
|
8552
|
+
* @param addressId Идентификатор адреса доставки.
|
|
8553
|
+
*/
|
|
8554
|
+
deliveriesByAddress(addressId) {
|
|
8555
|
+
return this.ordersService.getDeliveriesData$(addressId).pipe(catchError((error) => {
|
|
8556
|
+
const message = error instanceof HttpErrorResponse ? error.error.message : undefined;
|
|
8557
|
+
this.form.controls.addressId.setErrors({
|
|
8558
|
+
serverResponse: message ?? `Ошибка сервера: пожалуйста, перезагрузите страницу и/или выполните запрос позже.`,
|
|
8559
|
+
});
|
|
8560
|
+
this.addressDeliveryDates.set([]);
|
|
8561
|
+
return throwError(() => error);
|
|
8562
|
+
}), tap((deliveryDates) => {
|
|
8563
|
+
this.addressDeliveryDates.set(deliveryDates);
|
|
8564
|
+
this.form.controls.deliveryDate.enable();
|
|
8565
|
+
}));
|
|
8566
|
+
}
|
|
8567
|
+
/**
|
|
8568
|
+
* Запрашивает даты самовывоза по складу.
|
|
8569
|
+
*
|
|
8570
|
+
* @param warehouseId Идентификатор склада.
|
|
8571
|
+
*/
|
|
8572
|
+
deliveriesByWarehouse(warehouseId) {
|
|
8573
|
+
return this.ordersService.getSelfDeliveriesData$(warehouseId).pipe(catchError((error) => {
|
|
8574
|
+
const message = error instanceof HttpErrorResponse ? error.error.message : undefined;
|
|
8575
|
+
this.form.controls.warehouseId.setErrors({
|
|
8576
|
+
serverResponse: message ?? `Ошибка сервера: пожалуйста, перезагрузите страницу и/или выполните запрос позже.`,
|
|
8577
|
+
});
|
|
8578
|
+
this.warehouseDeliveryDates.set([]);
|
|
8579
|
+
return throwError(() => error);
|
|
8580
|
+
}), tap((deliveryDates) => {
|
|
8581
|
+
this.warehouseDeliveryDates.set(deliveryDates);
|
|
8582
|
+
this.form.controls.deliveryDate.enable();
|
|
8583
|
+
}));
|
|
8584
|
+
}
|
|
8585
|
+
/**
|
|
8586
|
+
* Загружает файл в форму.
|
|
8587
|
+
*
|
|
8588
|
+
* @param file Файл.
|
|
8589
|
+
* @param filesControl Поле файла заказа.
|
|
8590
|
+
*/
|
|
8591
|
+
// eslint-disable-next-line class-methods-use-this
|
|
8592
|
+
onUploadFile(file, filesControl) {
|
|
8593
|
+
const reader = new FileReader();
|
|
8594
|
+
reader.addEventListener('load', () => {
|
|
8595
|
+
const { result } = reader;
|
|
8596
|
+
if (isString(result)) {
|
|
8597
|
+
filesControl.setValue(new ScUploadedFile(file.name, result));
|
|
8598
|
+
}
|
|
8599
|
+
});
|
|
8600
|
+
reader.readAsDataURL(file);
|
|
8601
|
+
}
|
|
8602
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScOrderFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8603
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScOrderFormComponent, isStandalone: true, selector: "sc-order-form", inputs: { directionId: { classPropertyName: "directionId", publicName: "directionId", isSignal: true, isRequired: true, transformFunction: null }, enforceApprovedContacts: { classPropertyName: "enforceApprovedContacts", publicName: "enforceApprovedContacts", isSignal: true, isRequired: false, transformFunction: null }, persistMetadata: { classPropertyName: "persistMetadata", publicName: "persistMetadata", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { orderSubmit: "orderSubmit" }, providers: [TERMINAL_PROVIDERS], viewQueries: [{ propertyName: "unconfirmedDataWarning", first: true, predicate: ["unconfirmedDataWarning"], descendants: true, isSignal: true }], ngImport: i0, template: "@let user = user$ | async;\n\n<form\n [formGroup]=\"form\"\n scFocusFirstInvalidField\n [fieldOrder]=\"['contragentId', 'paymentType', 'deliveryType', 'warehouseId', 'addressId', 'deliveryDate', 'comment']\"\n (ngSubmit)=\"submit()\"\n class=\"flex flex-col gap-4\"\n>\n <ng-template #selectLoading> <tui-loader /> </ng-template>\n\n <!-- \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442. -->\n @if (contragents$ | async; as contragents) {\n @if (contragents.length > 1 || user?.isOrg) {\n <label tuiLabel>\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\n <tui-textfield\n tuiChevron\n [content]=\"contragents ? stringify(contragents) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"contragentId\"\n placeholder=\"\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\"\n />\n <tui-data-list *tuiDropdown>\n @for (contragent of contragents; track contragent.id) {\n <button\n tuiOption\n [value]=\"contragent.id\"\n >\n {{ contragent.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"contragentId\" />\n <a\n tuiLink\n iconStart=\"@tui.plus\"\n (click)=\"addContragent()\"\n class=\"mt-2 block\"\n >\n \u041D\u043E\u0432\u044B\u0439\n </a>\n </label>\n }\n }\n\n <!-- \u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B. -->\n <label tuiLabel>\n \u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B\n @let paymentTypes = paymentTypes$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"paymentTypes ? stringify(paymentTypes) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"paymentType\"\n placeholder=\"\u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B\"\n />\n <tui-data-list *tuiDropdown>\n @for (type of paymentTypes; track type.id) {\n <button\n tuiOption\n [value]=\"type.id\"\n >\n {{ type.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"paymentType\" />\n @if (isCashPaymentSelected()) {\n <p class=\"text-xs text-tui-status-positive\">\u0417\u0430\u043A\u0430\u0437\u044B \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u044F\u0442\u0441\u044F \u043F\u043E \u043F\u0440\u0435\u0434\u043E\u043F\u043B\u0430\u0442\u0435</p>\n }\n </label>\n\n <!-- \u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043E \u043D\u0435\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445. -->\n @if (!isPhoneApproved() || !isEmailApproved()) {\n <div\n #unconfirmedDataWarning\n class=\"text-tui-text-negative\"\n [class.warning-shake]=\"warningShake()\"\n >\n \u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435! \u0414\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u043A\u0430\u0437\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n @if (!isPhoneApproved()) {\n <span class=\"font-bold\"> \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 </span>\n }\n @if (!isPhoneApproved() && !isEmailApproved()) {\n <span> \u0438 </span>\n }\n @if (!isEmailApproved()) {\n <span class=\"font-bold\"> \u0430\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B </span>\n }\n <a\n tuiLink\n routerLink=\"/profile\"\n >\n \u0432 \u0432\u0430\u0448\u0435\u043C \u043F\u0440\u043E\u0444\u0438\u043B\u0435\n </a>\n </div>\n }\n\n <!-- \u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438. -->\n <label tuiLabel>\n \u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n @let deliveryTypes = deliveryTypes$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"deliveryTypes ? stringify(deliveryTypes) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"deliveryType\"\n placeholder=\"\u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\"\n />\n <tui-data-list *tuiDropdown>\n @for (delivery of deliveryTypes; track delivery.id) {\n <button\n tuiOption\n [value]=\"delivery.id\"\n >\n {{ delivery.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"deliveryType\" />\n </label>\n\n <!-- \u0421\u043A\u043B\u0430\u0434. -->\n <label tuiLabel>\n \u0421\u043A\u043B\u0430\u0434\n @let warehouses = warehouses$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"warehouses ? stringify(warehouses) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"warehouseId\"\n placeholder=\"\u0421\u043A\u043B\u0430\u0434\"\n />\n <tui-data-list *tuiDropdown>\n @if (!terminal.isRunningOnTerminal) {\n @for (warehouse of warehouses; track warehouse.id) {\n <button\n tuiOption\n [value]=\"warehouse.id\"\n >\n {{ warehouse.name }}\n </button>\n }\n } @else {\n @if (warehouseService.getCatalogWarehouseChange$() | async; as terminalWarehouse) {\n <button\n tuiOption\n [value]=\"terminalWarehouse.id\"\n >\n {{ terminalWarehouse.name }}\n </button>\n }\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"warehouseId\" />\n </label>\n\n <!-- \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438. -->\n @if (isDelivery()) {\n @let addresses = addresses$ | async;\n <div>\n <label tuiLabel>\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <tui-textfield\n tuiChevron\n [content]=\"addresses ? stringify(addresses) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"addressId\"\n placeholder=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\"\n />\n <tui-data-list *tuiDropdown>\n @for (address of addresses; track address.id) {\n <button\n tuiOption\n [value]=\"address.id\"\n >\n {{ address.address }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n @if (addresses && addresses.length === 0) {\n <tui-error error=\"\u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 \u043D\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\" />\n }\n <tui-error formControlName=\"addressId\" />\n </label>\n <a\n tuiLink\n iconStart=\"@tui.plus\"\n (click)=\"addDeliveryAddress()\"\n class=\"mt-2 block\"\n >\n \u041D\u043E\u0432\u044B\u0439\n </a>\n </div>\n }\n\n <!-- \u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438/\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430. -->\n <label tuiLabel>\n \u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 {{ isDelivery() ? '\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438' : '\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430' }}\n <tui-textfield [disabledItemHandler]=\"deliveryDateFilter\">\n <input\n tuiInputDate\n formControlName=\"deliveryDate\"\n [placeholder]=\"'\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 ' + (isDelivery() ? '\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438' : '\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430')\"\n />\n <tui-calendar *tuiDropdown />\n </tui-textfield>\n <tui-error formControlName=\"deliveryDate\" />\n </label>\n\n <!-- \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <label tuiLabel>\n \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u043A \u0437\u0430\u043A\u0430\u0437\u0443\n <tui-textfield>\n <textarea\n tuiTextarea\n formControlName=\"comment\"\n placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\"\n [max]=\"15\"\n ></textarea>\n </tui-textfield>\n <tui-error formControlName=\"comment\" />\n </label>\n\n <!-- \u041F\u0440\u0438\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u0430 \u043A \u0437\u0430\u043A\u0430\u0437\u0443. -->\n <div>\n @if (!controlFile.value) {\n <label tuiInputFiles>\n <input\n accept=\"image/*\"\n tuiInputFiles\n [formControl]=\"controlFile\"\n />\n </label>\n }\n\n <tui-files class=\"tui-space_top-1\">\n @if (controlFile.value | tuiFileRejected: { accept: 'image/*' } | async; as file) {\n <tui-file\n state=\"error\"\n [file]=\"file\"\n (remove)=\"removeFile()\"\n />\n }\n\n @for (file of accepted$ | async; track file.name) {\n <tui-file\n [file]=\"file\"\n (remove)=\"removeFile()\"\n />\n }\n </tui-files>\n\n <tui-error\n [order]=\"['maxLength']\"\n [formControl]=\"controlFile\"\n />\n <p class=\"tui-form__field-note\">\u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u044E \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439 \u0438 \u0434\u0435\u0444\u0444\u0435\u043A\u0442\u043E\u0432, \u0447\u0442\u043E \u043F\u043E\u0441\u043B\u0443\u0436\u0438\u0442 \u0434\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u043E\u043C \u043D\u0435\u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u0437\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043E\u0432\u0430\u0440\u0430.</p>\n </div>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "directive", type: TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "directive", type: i1$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: i2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i2.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "component", type: i2.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i2.TuiErrorDirective, selector: "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]", inputs: ["order"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "directive", type: i1$1.TuiInputDateDirective, selector: "input[tuiInputDate]", inputs: ["max", "min"] }, { kind: "component", type: i6$1.TuiCalendar, selector: "tui-calendar", inputs: ["disabledItemHandler", "min", "max", "minViewedMonth", "maxViewedMonth", "showAdjacent", "markerHandler", "initialView", "month", "hoveredItem", "value"], outputs: ["monthChange", "hoveredItemChange", "valueChange", "dayClick"] }, { kind: "component", type: i1$1.TuiTextareaComponent, selector: "textarea[tuiTextarea]", inputs: ["min", "max", "content"] }, { kind: "component", type: i1$1.TuiFile, selector: "tui-file,a[tuiFile],button[tuiFile]", inputs: ["file", "state", "size", "showDelete", "showSize", "leftContent"], outputs: ["remove"] }, { kind: "component", type: i1$1.TuiInputFiles, selector: "label[tuiInputFiles]", inputs: ["tuiInputFiles"] }, { kind: "component", type: i1$1.TuiFilesComponent, selector: "tui-files", inputs: ["max", "expanded"], outputs: ["expandedChange"] }, { kind: "directive", type: i1$1.TuiInputFilesDirective, selector: "input[tuiInputFiles]", outputs: ["reject"] }, { kind: "directive", type: ScFocusFirstInvalidFieldDirective, selector: "form[formGroup][scFocusFirstInvalidField]", inputs: ["fieldOrder"] }, { kind: "pipe", type: i1$1.TuiFileRejectedPipe, name: "tuiFileRejected" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8604
|
+
}
|
|
8605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScOrderFormComponent, decorators: [{
|
|
8606
|
+
type: Component,
|
|
8607
|
+
args: [{ selector: 'sc-order-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
8608
|
+
FormsModule,
|
|
8609
|
+
ReactiveFormsModule,
|
|
8610
|
+
RouterLink,
|
|
8611
|
+
TuiLoader,
|
|
8612
|
+
TuiLabel,
|
|
8613
|
+
TuiChevron,
|
|
8614
|
+
TuiSelect,
|
|
8615
|
+
...TuiDataList,
|
|
8616
|
+
TuiError,
|
|
8617
|
+
TuiLink,
|
|
8618
|
+
TuiTextfield,
|
|
8619
|
+
...TuiInputDate,
|
|
8620
|
+
...TuiTextarea,
|
|
8621
|
+
...TuiFiles,
|
|
8622
|
+
AsyncPipe,
|
|
8623
|
+
ScFocusFirstInvalidFieldDirective,
|
|
8624
|
+
], providers: [TERMINAL_PROVIDERS], template: "@let user = user$ | async;\n\n<form\n [formGroup]=\"form\"\n scFocusFirstInvalidField\n [fieldOrder]=\"['contragentId', 'paymentType', 'deliveryType', 'warehouseId', 'addressId', 'deliveryDate', 'comment']\"\n (ngSubmit)=\"submit()\"\n class=\"flex flex-col gap-4\"\n>\n <ng-template #selectLoading> <tui-loader /> </ng-template>\n\n <!-- \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442. -->\n @if (contragents$ | async; as contragents) {\n @if (contragents.length > 1 || user?.isOrg) {\n <label tuiLabel>\n \u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\n <tui-textfield\n tuiChevron\n [content]=\"contragents ? stringify(contragents) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"contragentId\"\n placeholder=\"\u041A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\"\n />\n <tui-data-list *tuiDropdown>\n @for (contragent of contragents; track contragent.id) {\n <button\n tuiOption\n [value]=\"contragent.id\"\n >\n {{ contragent.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"contragentId\" />\n <a\n tuiLink\n iconStart=\"@tui.plus\"\n (click)=\"addContragent()\"\n class=\"mt-2 block\"\n >\n \u041D\u043E\u0432\u044B\u0439\n </a>\n </label>\n }\n }\n\n <!-- \u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B. -->\n <label tuiLabel>\n \u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B\n @let paymentTypes = paymentTypes$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"paymentTypes ? stringify(paymentTypes) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"paymentType\"\n placeholder=\"\u0422\u0438\u043F \u043E\u043F\u043B\u0430\u0442\u044B\"\n />\n <tui-data-list *tuiDropdown>\n @for (type of paymentTypes; track type.id) {\n <button\n tuiOption\n [value]=\"type.id\"\n >\n {{ type.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"paymentType\" />\n @if (isCashPaymentSelected()) {\n <p class=\"text-xs text-tui-status-positive\">\u0417\u0430\u043A\u0430\u0437\u044B \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u044F\u0442\u0441\u044F \u043F\u043E \u043F\u0440\u0435\u0434\u043E\u043F\u043B\u0430\u0442\u0435</p>\n }\n </label>\n\n <!-- \u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043E \u043D\u0435\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445. -->\n @if (!isPhoneApproved() || !isEmailApproved()) {\n <div\n #unconfirmedDataWarning\n class=\"text-tui-text-negative\"\n [class.warning-shake]=\"warningShake()\"\n >\n \u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435! \u0414\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u043A\u0430\u0437\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\n @if (!isPhoneApproved()) {\n <span class=\"font-bold\"> \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 </span>\n }\n @if (!isPhoneApproved() && !isEmailApproved()) {\n <span> \u0438 </span>\n }\n @if (!isEmailApproved()) {\n <span class=\"font-bold\"> \u0430\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B </span>\n }\n <a\n tuiLink\n routerLink=\"/profile\"\n >\n \u0432 \u0432\u0430\u0448\u0435\u043C \u043F\u0440\u043E\u0444\u0438\u043B\u0435\n </a>\n </div>\n }\n\n <!-- \u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438. -->\n <label tuiLabel>\n \u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n @let deliveryTypes = deliveryTypes$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"deliveryTypes ? stringify(deliveryTypes) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"deliveryType\"\n placeholder=\"\u0421\u043F\u043E\u0441\u043E\u0431 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\"\n />\n <tui-data-list *tuiDropdown>\n @for (delivery of deliveryTypes; track delivery.id) {\n <button\n tuiOption\n [value]=\"delivery.id\"\n >\n {{ delivery.name }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"deliveryType\" />\n </label>\n\n <!-- \u0421\u043A\u043B\u0430\u0434. -->\n <label tuiLabel>\n \u0421\u043A\u043B\u0430\u0434\n @let warehouses = warehouses$ | async;\n <tui-textfield\n tuiChevron\n [content]=\"warehouses ? stringify(warehouses) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"warehouseId\"\n placeholder=\"\u0421\u043A\u043B\u0430\u0434\"\n />\n <tui-data-list *tuiDropdown>\n @if (!terminal.isRunningOnTerminal) {\n @for (warehouse of warehouses; track warehouse.id) {\n <button\n tuiOption\n [value]=\"warehouse.id\"\n >\n {{ warehouse.name }}\n </button>\n }\n } @else {\n @if (warehouseService.getCatalogWarehouseChange$() | async; as terminalWarehouse) {\n <button\n tuiOption\n [value]=\"terminalWarehouse.id\"\n >\n {{ terminalWarehouse.name }}\n </button>\n }\n }\n </tui-data-list>\n </tui-textfield>\n <tui-error formControlName=\"warehouseId\" />\n </label>\n\n <!-- \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438. -->\n @if (isDelivery()) {\n @let addresses = addresses$ | async;\n <div>\n <label tuiLabel>\n \u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\n <tui-textfield\n tuiChevron\n [content]=\"addresses ? stringify(addresses) : selectLoading\"\n >\n <input\n tuiSelect\n formControlName=\"addressId\"\n placeholder=\"\u0410\u0434\u0440\u0435\u0441 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\"\n />\n <tui-data-list *tuiDropdown>\n @for (address of addresses; track address.id) {\n <button\n tuiOption\n [value]=\"address.id\"\n >\n {{ address.address }}\n </button>\n }\n </tui-data-list>\n </tui-textfield>\n @if (addresses && addresses.length === 0) {\n <tui-error error=\"\u0423 \u043A\u043E\u043D\u0442\u0440\u0430\u0433\u0435\u043D\u0442\u0430 \u043D\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\" />\n }\n <tui-error formControlName=\"addressId\" />\n </label>\n <a\n tuiLink\n iconStart=\"@tui.plus\"\n (click)=\"addDeliveryAddress()\"\n class=\"mt-2 block\"\n >\n \u041D\u043E\u0432\u044B\u0439\n </a>\n </div>\n }\n\n <!-- \u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438/\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430. -->\n <label tuiLabel>\n \u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 {{ isDelivery() ? '\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438' : '\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430' }}\n <tui-textfield [disabledItemHandler]=\"deliveryDateFilter\">\n <input\n tuiInputDate\n formControlName=\"deliveryDate\"\n [placeholder]=\"'\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 ' + (isDelivery() ? '\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438' : '\u0441\u0430\u043C\u043E\u0432\u044B\u0432\u043E\u0437\u0430')\"\n />\n <tui-calendar *tuiDropdown />\n </tui-textfield>\n <tui-error formControlName=\"deliveryDate\" />\n </label>\n\n <!-- \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A\u043B\u0438\u0435\u043D\u0442\u0430. -->\n <label tuiLabel>\n \u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u043A \u0437\u0430\u043A\u0430\u0437\u0443\n <tui-textfield>\n <textarea\n tuiTextarea\n formControlName=\"comment\"\n placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\"\n [max]=\"15\"\n ></textarea>\n </tui-textfield>\n <tui-error formControlName=\"comment\" />\n </label>\n\n <!-- \u041F\u0440\u0438\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u0430 \u043A \u0437\u0430\u043A\u0430\u0437\u0443. -->\n <div>\n @if (!controlFile.value) {\n <label tuiInputFiles>\n <input\n accept=\"image/*\"\n tuiInputFiles\n [formControl]=\"controlFile\"\n />\n </label>\n }\n\n <tui-files class=\"tui-space_top-1\">\n @if (controlFile.value | tuiFileRejected: { accept: 'image/*' } | async; as file) {\n <tui-file\n state=\"error\"\n [file]=\"file\"\n (remove)=\"removeFile()\"\n />\n }\n\n @for (file of accepted$ | async; track file.name) {\n <tui-file\n [file]=\"file\"\n (remove)=\"removeFile()\"\n />\n }\n </tui-files>\n\n <tui-error\n [order]=\"['maxLength']\"\n [formControl]=\"controlFile\"\n />\n <p class=\"tui-form__field-note\">\u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u044E \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439 \u0438 \u0434\u0435\u0444\u0444\u0435\u043A\u0442\u043E\u0432, \u0447\u0442\u043E \u043F\u043E\u0441\u043B\u0443\u0436\u0438\u0442 \u0434\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u043E\u043C \u043D\u0435\u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u0437\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043E\u0432\u0430\u0440\u0430.</p>\n </div>\n</form>\n" }]
|
|
8625
|
+
}], ctorParameters: () => [], propDecorators: { directionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "directionId", required: true }] }], enforceApprovedContacts: [{ type: i0.Input, args: [{ isSignal: true, alias: "enforceApprovedContacts", required: false }] }], persistMetadata: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistMetadata", required: false }] }], orderSubmit: [{ type: i0.Output, args: ["orderSubmit"] }], unconfirmedDataWarning: [{ type: i0.ViewChild, args: ['unconfirmedDataWarning', { isSignal: true }] }] } });
|
|
8626
|
+
|
|
8069
8627
|
/**
|
|
8070
8628
|
* Компонент списка товаров, разбитых по наличию на складе:
|
|
8071
8629
|
* - в наличии на складе;
|
|
@@ -9509,5 +10067,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
9509
10067
|
* Generated bundle index. Do not edit.
|
|
9510
10068
|
*/
|
|
9511
10069
|
|
|
9512
|
-
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FinishDateTimeTransformerDirective, IDLE_ITEM_STATE, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_BANNER_DURATION, SC_CATALOG_PRODUCTS_FILTERS, SC_CATALOG_SHOW_PRODUCTS_RECURSIVELY, SC_DATE_FORMATTER, SC_DEBOUNCE_TIME_DEFAULT, SC_DIALOG_SERVICE_TOKEN, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_HIDDEN_PRINT_ELEMENTS, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_ORDER_OPTIONS, 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, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScBannerComponent, ScBrandsListComponent, ScCartAddProductsFromCsvDialogComponent, ScCatalogFilterCollapsibleComponent, ScCatalogFiltersComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDownloadPriceListComponent, ScDraftComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNextInputFocusDirective, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrintDirective, ScPrintService, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScPublicOfferComponent, ScQRCodeDialogComponent, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSandwichComponent, ScSandwichM2Component, ScSandwichM2SkeletonComponent, ScSandwichSkeletonComponent, ScSelectOnFocusinDirective, ScSeoTagsComponent, ScShareButtonComponent, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserPhoneApproveDialogComponent, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, cleanupRecaptchaArtifacts, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scGetCurrentRoute, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
10070
|
+
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FinishDateTimeTransformerDirective, IDLE_ITEM_STATE, IS_DEFAULT_COUNTRY, MAX_FILES_IN_FORM_INPUT, SC_ALLOW_SELECT_TERMINATED, SC_BANNER_DURATION, SC_CATALOG_PRODUCTS_FILTERS, SC_CATALOG_SHOW_PRODUCTS_RECURSIVELY, SC_DATE_FORMATTER, SC_DEBOUNCE_TIME_DEFAULT, SC_DIALOG_SERVICE_TOKEN, SC_ERROR_CHANGE_HANDLER, SC_HELP_NOTIFICATION_CLOSE, SC_HELP_NOTIFICATION_LIMIT, SC_HIDDEN_PRINT_ELEMENTS, SC_MANAGER_QR_HANDLER, SC_NOTIFY_WHEN_IN_STOCK_REQUIRED_FIELDS, SC_ORDER_FORM_CONFIG, SC_ORDER_OPTIONS, 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, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScBannerComponent, ScBrandsListComponent, ScCartAddProductsFromCsvDialogComponent, ScCatalogFilterCollapsibleComponent, ScCatalogFiltersComponent, ScCategoryCardComponent, ScContactsAccordionComponent, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDownloadPriceListComponent, ScDraftComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNextInputFocusDirective, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderDirectionItemsComponent, ScOrderFormComponent, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrintDirective, ScPrintService, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScPublicOfferComponent, ScQRCodeDialogComponent, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSandwichComponent, ScSandwichM2Component, ScSandwichM2SkeletonComponent, ScSandwichSkeletonComponent, ScSelectOnFocusinDirective, ScSeoTagsComponent, ScShareButtonComponent, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserPhoneApproveDialogComponent, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, cleanupRecaptchaArtifacts, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scGetCurrentRoute, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
9513
10071
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|