@snabcentr/client-ui 5.9.0 → 5.10.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,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
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, RESPONSE_INIT, ViewEncapsulation } from '@angular/core';
|
|
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, RESPONSE_INIT, ViewEncapsulation, Injector, viewChildren, afterNextRender } from '@angular/core';
|
|
3
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, ScWarehouseService, SEARCH_TERM_PROVIDERS, ScPaginationService, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_OPTIONS, ScCatalogFilterService, ScIdOrSlugPipe, SC_CATEGORY_INFO, ScConfiguratorService, ScContragentService, ScDeliveryAddressService, SC_URLS, IS_SERVER, ScIconTypesEnum, ScDocumentInfoTypesEnum, ScFilesService, ScOrdersService, ScUIService, SC_USER_INFO as SC_USER_INFO$1, ScPaymentType, ScDeliveryType, TERMINAL_PROVIDERS, ScOrderDraftsService, ScRouteKeys, ScSeoService, scOrderIsLoaded, SC_PAGE_QUERY_PARAM, ScFrequentlyAskedQuestionsService, SchemaOrgFactory, scGetPageQueryParamChanges, ScNewsService, 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 as noop$1, first, retry } from 'rxjs';
|
|
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 as noop$1, first, retry, fromEvent, animationFrames, take, takeUntil } 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, TuiValidationError,
|
|
7
|
+
import { tuiIsPresent, TuiDay, TuiTime, TuiValueTransformer, tuiControlValue, tuiMarkControlAsTouchedAndValidate, TuiAutoFocus, TuiHovered, TuiDayRange, TuiMonth, tuiProvide, TuiValidationError, TUI_WINDOW_SIZE, tuiClamp, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1$1 from '@taiga-ui/kit';
|
|
9
9
|
import { tuiInputDateOptionsProvider, TuiAvatar, TuiInitialsPipe, TuiButtonLoading, TuiSortCountriesPipe, TuiPush, TuiInputPhoneInternational, TuiPassword, TuiChevron, TuiSelect, TuiDataListWrapperComponent, TuiStringifyContentPipe, TuiComboBox, TuiStepper, TuiAccordionDirective, TuiAccordion, TuiFiles, TuiChip, TuiInputNumber, TuiLineClamp, TuiBadge, TuiInputNumberDirective, TuiTooltip, TuiHighlight, TuiFade, TuiRange, 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, TUI_PAGINATION_TEXTS, TuiInputPhone } 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';
|
|
13
13
|
import * as i2 from '@taiga-ui/core';
|
|
14
|
-
import { TUI_DATA_LIST_HOST, TuiLoader, TuiDataList, TuiDialogService, TuiLink, TuiButton, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TuiLabel, TuiTextfield, TuiInput, TuiError, TuiCheckbox, tuiDropdownOptionsProvider, TuiOption, TuiFilterByInputPipe, TuiCarouselComponent, TuiCarousel, TuiNumberFormat, TuiHint, TuiHintDirective, TuiHintDriver, TuiHintHover, TuiHintPosition, TUI_MONTHS, TuiScrollbar, tuiNumberFormatProvider, tuiItemsHandlersProvider, TuiNotification, TuiTitle, TuiFormatNumberPipe, tuiTextfieldOptionsProvider, tuiHintOptionsProvider, TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS, TUI_COMMON_ICONS } from '@taiga-ui/core';
|
|
14
|
+
import { TUI_DATA_LIST_HOST, TuiLoader, TuiDataList, TuiDialogService, TuiLink, TuiButton, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TuiLabel, TuiTextfield, TuiInput, TuiError, TuiCheckbox, tuiDropdownOptionsProvider, TuiOption, TuiFilterByInputPipe, TuiCarouselComponent, TuiCarousel, TuiNumberFormat, TuiHint, TuiHintDirective, TuiHintDriver, TuiHintHover, TuiHintPosition, TUI_MONTHS, TuiScrollbar, tuiNumberFormatProvider, tuiItemsHandlersProvider, TuiNotification, TuiTitle, TuiFormatNumberPipe, tuiTextfieldOptionsProvider, tuiHintOptionsProvider, TuiNotificationService, TuiIconPipe, TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS, TUI_COMMON_ICONS } from '@taiga-ui/core';
|
|
15
15
|
import * as i1$2 from '@angular/common';
|
|
16
16
|
import { AsyncPipe, DOCUMENT, NgTemplateOutlet, NgClass, CommonModule, DecimalPipe } from '@angular/common';
|
|
17
17
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
@@ -44,6 +44,7 @@ import * as i6 from '@taiga-ui/core/components/slider';
|
|
|
44
44
|
import { YaMapComponent } from 'angular8-yandex-maps';
|
|
45
45
|
import { isValid, parse, format } from 'date-fns';
|
|
46
46
|
import * as i6$1 from '@taiga-ui/core/components/calendar';
|
|
47
|
+
import { Clipboard } from '@angular/cdk/clipboard';
|
|
47
48
|
import * as i6$2 from 'ng-recaptcha-2';
|
|
48
49
|
import { RecaptchaComponent, RecaptchaFormsModule, RecaptchaModule } from 'ng-recaptcha-2';
|
|
49
50
|
|
|
@@ -3187,14 +3188,14 @@ class ScBannerComponent {
|
|
|
3187
3188
|
}
|
|
3188
3189
|
}
|
|
3189
3190
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScBannerComponent, isStandalone: true, selector: "sc-banner", inputs: { navigateButton: { classPropertyName: "navigateButton", publicName: "navigateButton", isSignal: false, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: false, isRequired: false, transformFunction: null }, bannerLocation: { classPropertyName: "bannerLocation", publicName: "bannerLocation", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { attributes: { "ngSkipHydration": "true" }, properties: { "class.!hidden": "totalItems() === 0", "style.aspect-ratio": "this.aspectRatio" } }, providers: [WaIntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "carouselRef", first: true, predicate: TuiCarouselComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let effectiveDuration = totalItems() > 1 ? duration : 0;\n\n<tui-carousel\n [duration]=\"effectiveDuration\"\n [attr.resizable]=\"resizable\"\n [max]=\"maxIndex()\"\n class=\"size-full overflow-hidden rounded-xl bg-white\"\n [(index)]=\"currentBannerId\"\n>\n <ng-container *tuiItem=\"let slide\">\n @let banner = slide < banners().length ? banners()[slide] : undefined;\n @if (banner) {\n @switch (banner.mediaType) {\n @case ('image') {\n <a\n (click)=\"onClick(banner)\"\n target=\"_blank\"\n [title]=\"banner.title\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n class=\"size-full\"\n >\n <picture>\n @if (banner.mediaFileWebp) {\n <source\n type=\"image/webp\"\n [srcset]=\"banner.mediaFileWebp | scMediaImageTransformer\"\n />\n }\n <img\n [src]=\"banner.mediaFile | scMediaImageTransformer: true\"\n [alt]=\"banner.title\"\n class=\"size-full object-cover\"\n />\n </picture>\n </a>\n }\n }\n } @else {\n @let contentRef = bannersListRef.get(slide - banners().length);\n @if (contentRef) {\n <div\n [style.aspect-ratio]=\"aspectRatio\"\n class=\"size-full overflow-hidden\"\n >\n <ng-container [ngTemplateOutlet]=\"contentRef\"></ng-container>\n </div>\n }\n }\n </ng-container>\n</tui-carousel>\n\n@if (navigateButton &&
|
|
3191
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScBannerComponent, isStandalone: true, selector: "sc-banner", inputs: { navigateButton: { classPropertyName: "navigateButton", publicName: "navigateButton", isSignal: false, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: false, isRequired: false, transformFunction: null }, bannerLocation: { classPropertyName: "bannerLocation", publicName: "bannerLocation", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { loadBannersEvent: "loadBannersEvent", clickBannerEvent: "clickBannerEvent" }, host: { attributes: { "ngSkipHydration": "true" }, properties: { "class.!hidden": "totalItems() === 0", "style.aspect-ratio": "this.aspectRatio" } }, providers: [WaIntersectionObserverService], queries: [{ propertyName: "bannersListRef", predicate: ["banner"] }], viewQueries: [{ propertyName: "carouselRef", first: true, predicate: TuiCarouselComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let effectiveDuration = totalItems() > 1 ? duration : 0;\n\n<tui-carousel\n [duration]=\"effectiveDuration\"\n [attr.resizable]=\"resizable\"\n [max]=\"maxIndex()\"\n class=\"size-full overflow-hidden rounded-xl bg-white\"\n [(index)]=\"currentBannerId\"\n>\n <ng-container *tuiItem=\"let slide\">\n @let banner = slide < banners().length ? banners()[slide] : undefined;\n @if (banner) {\n @switch (banner.mediaType) {\n @case ('image') {\n <a\n (click)=\"onClick(banner)\"\n target=\"_blank\"\n [title]=\"banner.title\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n class=\"size-full\"\n >\n <picture>\n @if (banner.mediaFileWebp) {\n <source\n type=\"image/webp\"\n [srcset]=\"banner.mediaFileWebp | scMediaImageTransformer\"\n />\n }\n <img\n [src]=\"banner.mediaFile | scMediaImageTransformer: true\"\n [alt]=\"banner.title\"\n class=\"size-full object-cover\"\n />\n </picture>\n </a>\n }\n }\n } @else {\n @let contentRef = bannersListRef.get(slide - banners().length);\n @if (contentRef) {\n <div\n [style.aspect-ratio]=\"aspectRatio\"\n class=\"size-full overflow-hidden\"\n >\n <ng-container [ngTemplateOutlet]=\"contentRef\"></ng-container>\n </div>\n }\n }\n </ng-container>\n</tui-carousel>\n\n@if (navigateButton && totalItems() > 1) {\n <div\n tuiTheme=\"light\"\n class=\"flex items-center\"\n >\n <button\n tuiIconButton\n size=\"m\"\n [style.border-radius.%]=\"100\"\n appearance=\"flat\"\n (click)=\"carouselRef().prev()\"\n class=\"!absolute left-2\"\n >\n <tui-icon icon=\"@tui.chevron-left\" />\n </button>\n <button\n tuiIconButton\n size=\"m\"\n [style.border-radius.%]=\"100\"\n appearance=\"flat\"\n (click)=\"carouselRef().next()\"\n class=\"!absolute right-2\"\n >\n <tui-icon icon=\"@tui.chevron-right\" />\n </button>\n </div>\n}\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}::ng-deep tui-carousel[resizable=true] .t-scroller,::ng-deep tui-carousel[resizable=true] .t-items{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.TuiCarouselComponent, selector: "tui-carousel", inputs: ["index", "min", "max"], outputs: ["indexChange"] }, { kind: "directive", type: i2.TuiCarouselDirective, selector: "tui-carousel[duration]", inputs: ["duration"], exportAs: ["tuiCarousel"] }, { kind: "directive", type: i2$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "pipe", type: ScMediaImageTransformerPipe, name: "scMediaImageTransformer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3191
3192
|
}
|
|
3192
3193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScBannerComponent, decorators: [{
|
|
3193
3194
|
type: Component,
|
|
3194
3195
|
args: [{ selector: 'sc-banner', providers: [WaIntersectionObserverService], host: {
|
|
3195
3196
|
ngSkipHydration: 'true',
|
|
3196
3197
|
'[class.!hidden]': 'totalItems() === 0',
|
|
3197
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, TuiCarousel, TuiButton, TuiIcon, ScMediaImageTransformerPipe], template: "@let effectiveDuration = totalItems() > 1 ? duration : 0;\n\n<tui-carousel\n [duration]=\"effectiveDuration\"\n [attr.resizable]=\"resizable\"\n [max]=\"maxIndex()\"\n class=\"size-full overflow-hidden rounded-xl bg-white\"\n [(index)]=\"currentBannerId\"\n>\n <ng-container *tuiItem=\"let slide\">\n @let banner = slide < banners().length ? banners()[slide] : undefined;\n @if (banner) {\n @switch (banner.mediaType) {\n @case ('image') {\n <a\n (click)=\"onClick(banner)\"\n target=\"_blank\"\n [title]=\"banner.title\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n class=\"size-full\"\n >\n <picture>\n @if (banner.mediaFileWebp) {\n <source\n type=\"image/webp\"\n [srcset]=\"banner.mediaFileWebp | scMediaImageTransformer\"\n />\n }\n <img\n [src]=\"banner.mediaFile | scMediaImageTransformer: true\"\n [alt]=\"banner.title\"\n class=\"size-full object-cover\"\n />\n </picture>\n </a>\n }\n }\n } @else {\n @let contentRef = bannersListRef.get(slide - banners().length);\n @if (contentRef) {\n <div\n [style.aspect-ratio]=\"aspectRatio\"\n class=\"size-full overflow-hidden\"\n >\n <ng-container [ngTemplateOutlet]=\"contentRef\"></ng-container>\n </div>\n }\n }\n </ng-container>\n</tui-carousel>\n\n@if (navigateButton &&
|
|
3198
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, TuiCarousel, TuiButton, TuiIcon, ScMediaImageTransformerPipe], template: "@let effectiveDuration = totalItems() > 1 ? duration : 0;\n\n<tui-carousel\n [duration]=\"effectiveDuration\"\n [attr.resizable]=\"resizable\"\n [max]=\"maxIndex()\"\n class=\"size-full overflow-hidden rounded-xl bg-white\"\n [(index)]=\"currentBannerId\"\n>\n <ng-container *tuiItem=\"let slide\">\n @let banner = slide < banners().length ? banners()[slide] : undefined;\n @if (banner) {\n @switch (banner.mediaType) {\n @case ('image') {\n <a\n (click)=\"onClick(banner)\"\n target=\"_blank\"\n [title]=\"banner.title\"\n [style.aspect-ratio]=\"aspectRatio\"\n [attr.href]=\"banner.url ? banner.url : null\"\n class=\"size-full\"\n >\n <picture>\n @if (banner.mediaFileWebp) {\n <source\n type=\"image/webp\"\n [srcset]=\"banner.mediaFileWebp | scMediaImageTransformer\"\n />\n }\n <img\n [src]=\"banner.mediaFile | scMediaImageTransformer: true\"\n [alt]=\"banner.title\"\n class=\"size-full object-cover\"\n />\n </picture>\n </a>\n }\n }\n } @else {\n @let contentRef = bannersListRef.get(slide - banners().length);\n @if (contentRef) {\n <div\n [style.aspect-ratio]=\"aspectRatio\"\n class=\"size-full overflow-hidden\"\n >\n <ng-container [ngTemplateOutlet]=\"contentRef\"></ng-container>\n </div>\n }\n }\n </ng-container>\n</tui-carousel>\n\n@if (navigateButton && totalItems() > 1) {\n <div\n tuiTheme=\"light\"\n class=\"flex items-center\"\n >\n <button\n tuiIconButton\n size=\"m\"\n [style.border-radius.%]=\"100\"\n appearance=\"flat\"\n (click)=\"carouselRef().prev()\"\n class=\"!absolute left-2\"\n >\n <tui-icon icon=\"@tui.chevron-left\" />\n </button>\n <button\n tuiIconButton\n size=\"m\"\n [style.border-radius.%]=\"100\"\n appearance=\"flat\"\n (click)=\"carouselRef().next()\"\n class=\"!absolute right-2\"\n >\n <tui-icon icon=\"@tui.chevron-right\" />\n </button>\n </div>\n}\n", styles: [":host{--tui-carousel-padding: 0;display:flex;position:relative}::ng-deep tui-carousel[resizable=true] .t-scroller,::ng-deep tui-carousel[resizable=true] .t-items{width:100%;height:100%}\n"] }]
|
|
3198
3199
|
}], propDecorators: { carouselRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TuiCarouselComponent), { isSignal: true }] }], navigateButton: [{
|
|
3199
3200
|
type: Input
|
|
3200
3201
|
}], duration: [{
|
|
@@ -4711,7 +4712,7 @@ class ScCatalogFiltersComponent {
|
|
|
4711
4712
|
* {@link Observable} фильтров категории.
|
|
4712
4713
|
*/
|
|
4713
4714
|
this.filters = toSignal(inject(SC_CATEGORY_INFO).pipe(catchError(() => EMPTY), filter(tuiIsPresent), switchMap((category) => this.catalogFilterService.getFilters$(this.idOrSlugPipe.transform(category), this.isRecursively)), filter(tuiIsPresent), map((filters) => filters
|
|
4714
|
-
.filter((item) =>
|
|
4715
|
+
.filter((item) => this.isRenderableFilter(item))
|
|
4715
4716
|
.map((item) => (item.type === 'checkbox' ? { ...item, values: [...item.values].sort((a, b) => a.label.localeCompare(b.label)) } : item))), tap((filters) => {
|
|
4716
4717
|
this.updateFormControls(filters);
|
|
4717
4718
|
}), share()));
|
|
@@ -4728,6 +4729,22 @@ class ScCatalogFiltersComponent {
|
|
|
4728
4729
|
this.resetAllFilters(false);
|
|
4729
4730
|
});
|
|
4730
4731
|
}
|
|
4732
|
+
/**
|
|
4733
|
+
* Проверяет, что фильтр пригоден для вывода: у checkbox есть непустой список значений, у range заданы разные границы.
|
|
4734
|
+
* Некорректные фильтры из ответа API пропускаются, чтобы не ломать вывод остальных.
|
|
4735
|
+
*
|
|
4736
|
+
* @param item Фильтр каталога.
|
|
4737
|
+
*/
|
|
4738
|
+
isRenderableFilter(item) {
|
|
4739
|
+
switch (item.type) {
|
|
4740
|
+
case 'checkbox':
|
|
4741
|
+
return Array.isArray(item.values) && item.values.length > 0;
|
|
4742
|
+
case 'range':
|
|
4743
|
+
return !isNil(item.min) && !isNil(item.max) && item.min !== item.max;
|
|
4744
|
+
default:
|
|
4745
|
+
return true;
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4731
4748
|
/**
|
|
4732
4749
|
* Обновляет состав контролов формы на основе переданных фильтров.
|
|
4733
4750
|
*
|
|
@@ -7086,6 +7103,10 @@ class ScErrorBlockStatusComponent {
|
|
|
7086
7103
|
* Создает сигнал изменения строкового представления об ошибке.
|
|
7087
7104
|
*/
|
|
7088
7105
|
this.pageErrorChange = output();
|
|
7106
|
+
/**
|
|
7107
|
+
* Статус ответа, когда код ошибки не является HTTP-статусом (0 при обрыве соединения с API).
|
|
7108
|
+
*/
|
|
7109
|
+
this.unavailableResponseStatus = 503;
|
|
7089
7110
|
/**
|
|
7090
7111
|
* Признак, что текущий скрипт исполняется на сервере.
|
|
7091
7112
|
*/
|
|
@@ -7102,11 +7123,19 @@ class ScErrorBlockStatusComponent {
|
|
|
7102
7123
|
if (this.code() !== null) {
|
|
7103
7124
|
this.pageErrorChange.emit(this.error());
|
|
7104
7125
|
if (this.isServer && this.responseInit) {
|
|
7105
|
-
this.responseInit.status = this.code()
|
|
7126
|
+
this.responseInit.status = this.getResponseStatus(this.code());
|
|
7106
7127
|
}
|
|
7107
7128
|
}
|
|
7108
7129
|
});
|
|
7109
7130
|
}
|
|
7131
|
+
/**
|
|
7132
|
+
* Возвращает HTTP-статус ответа для кода ошибки; код вне 400-599 заменяется на {@link unavailableResponseStatus}.
|
|
7133
|
+
*
|
|
7134
|
+
* @param code Код ошибки.
|
|
7135
|
+
*/
|
|
7136
|
+
getResponseStatus(code) {
|
|
7137
|
+
return code !== null && code >= 400 && code <= 599 ? code : this.unavailableResponseStatus;
|
|
7138
|
+
}
|
|
7110
7139
|
/**
|
|
7111
7140
|
* Возвращает описание ошибки.
|
|
7112
7141
|
*
|
|
@@ -8928,10 +8957,365 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8928
8957
|
*/
|
|
8929
8958
|
const SC_FAQ_GROUP_QUERY_PARAM = 'group';
|
|
8930
8959
|
|
|
8960
|
+
/**
|
|
8961
|
+
* Префикс якоря (fragment) ссылки на конкретный вопрос.
|
|
8962
|
+
*/
|
|
8963
|
+
const SC_FAQ_QUESTION_ANCHOR_PREFIX = 'question-';
|
|
8964
|
+
/**
|
|
8965
|
+
* Возвращает якорь (fragment) ссылки на вопрос.
|
|
8966
|
+
*
|
|
8967
|
+
* @param questionId Идентификатор вопроса.
|
|
8968
|
+
*/
|
|
8969
|
+
const scGetFaqQuestionAnchor = (questionId) => `${SC_FAQ_QUESTION_ANCHOR_PREFIX}${questionId}`;
|
|
8970
|
+
/**
|
|
8971
|
+
* Возвращает идентификатор вопроса из якоря (fragment) ссылки или `null`, если якорь не ссылается на вопрос.
|
|
8972
|
+
*
|
|
8973
|
+
* @param fragment Якорь (fragment) адреса.
|
|
8974
|
+
*/
|
|
8975
|
+
const scGetFaqQuestionIdFromAnchor = (fragment) => {
|
|
8976
|
+
if (!fragment?.startsWith(SC_FAQ_QUESTION_ANCHOR_PREFIX)) {
|
|
8977
|
+
return null;
|
|
8978
|
+
}
|
|
8979
|
+
const questionId = Number(fragment.slice(SC_FAQ_QUESTION_ANCHOR_PREFIX.length));
|
|
8980
|
+
return Number.isInteger(questionId) && questionId > 0 ? questionId : null;
|
|
8981
|
+
};
|
|
8982
|
+
|
|
8983
|
+
/**
|
|
8984
|
+
* Диалоговое окно "Поделиться": варианты, как поделиться ссылкой.
|
|
8985
|
+
*
|
|
8986
|
+
* На терминале вместо вариантов отображается только QR-код ссылки.
|
|
8987
|
+
*/
|
|
8988
|
+
class ScShareDialogComponent {
|
|
8989
|
+
constructor() {
|
|
8990
|
+
/**
|
|
8991
|
+
* Провайдер данных о терминале.
|
|
8992
|
+
*/
|
|
8993
|
+
this.terminal = inject(IS_RUNNING_ON_TERMINAL);
|
|
8994
|
+
/**
|
|
8995
|
+
* Контекст диалогового окна, в котором открыт компонент.
|
|
8996
|
+
*/
|
|
8997
|
+
this.context = inject(POLYMORPHEUS_CONTEXT);
|
|
8998
|
+
/**
|
|
8999
|
+
* Сервис копирования текста в буфер обмена.
|
|
9000
|
+
*/
|
|
9001
|
+
this.clipboard = inject(Clipboard);
|
|
9002
|
+
/**
|
|
9003
|
+
* Ссылка на объект окна браузера.
|
|
9004
|
+
*/
|
|
9005
|
+
this.window = inject(WA_WINDOW);
|
|
9006
|
+
/**
|
|
9007
|
+
* Сервис уведомлений.
|
|
9008
|
+
*/
|
|
9009
|
+
this.alerts = inject(TuiNotificationService);
|
|
9010
|
+
/**
|
|
9011
|
+
* Сервис для работы с диалоговыми окнами.
|
|
9012
|
+
*/
|
|
9013
|
+
this.dialog = inject(TuiDialogService);
|
|
9014
|
+
/**
|
|
9015
|
+
* Сервис для сбора метрик о действиях пользователей.
|
|
9016
|
+
*/
|
|
9017
|
+
this.userMetrikaService = inject(ScUserMetrikaService);
|
|
9018
|
+
/**
|
|
9019
|
+
* {@link Signal} формата отображения вариантов: в строку на широких экранах, списком на узких.
|
|
9020
|
+
*/
|
|
9021
|
+
this.viewMode = toSignal(inject(IS_SERVER) ? of('list') : inject(TUI_WINDOW_SIZE).pipe(map((rect) => (rect.width > 768 ? 'row' : 'list'))), { initialValue: 'list' });
|
|
9022
|
+
/**
|
|
9023
|
+
* Заголовок ссылки, которой необходимо поделиться.
|
|
9024
|
+
*/
|
|
9025
|
+
this.title = this.context.data.title;
|
|
9026
|
+
/**
|
|
9027
|
+
* Ссылка, которой необходимо поделиться.
|
|
9028
|
+
*/
|
|
9029
|
+
this.shareUrl = this.context.data.shareUrl;
|
|
9030
|
+
/**
|
|
9031
|
+
* Ссылка отправки по Email.
|
|
9032
|
+
*/
|
|
9033
|
+
this.emailLink = `mailto:?subject=${encodeURIComponent(['ООО Снабцентр', this.title].filter(Boolean).join(' - '))}&body=${encodeURIComponent(this.shareUrl)}`;
|
|
9034
|
+
/**
|
|
9035
|
+
* Ссылка отправки во ВКонтакте.
|
|
9036
|
+
*/
|
|
9037
|
+
this.vkLink = `https://vk.com/share.php?url=${encodeURIComponent(this.shareUrl)}`;
|
|
9038
|
+
/**
|
|
9039
|
+
* Ссылка отправки в Telegram.
|
|
9040
|
+
*/
|
|
9041
|
+
this.telegramLink = `https://t.me/share/url?url=${encodeURIComponent(this.shareUrl)}`;
|
|
9042
|
+
}
|
|
9043
|
+
/** @inheritDoc */
|
|
9044
|
+
ngOnInit() {
|
|
9045
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
9046
|
+
target: ScUserMetrikaGoalsEnum.shareShow,
|
|
9047
|
+
});
|
|
9048
|
+
}
|
|
9049
|
+
/**
|
|
9050
|
+
* Открывает окно перехода в социальную сеть.
|
|
9051
|
+
*
|
|
9052
|
+
* @param shareLink Ссылка перехода в социальную сеть.
|
|
9053
|
+
* @param socialMedia Slug социальной сети.
|
|
9054
|
+
*/
|
|
9055
|
+
openShareWindow(shareLink, socialMedia) {
|
|
9056
|
+
this.emitShareClick(socialMedia);
|
|
9057
|
+
this.window.open(shareLink, 'sharer', 'status=0,toolbar=0,width=650,height=500');
|
|
9058
|
+
}
|
|
9059
|
+
/**
|
|
9060
|
+
* Копирует ссылку в буфер обмена.
|
|
9061
|
+
*/
|
|
9062
|
+
copyShareLink() {
|
|
9063
|
+
this.emitShareClick('copy_to_clipboard');
|
|
9064
|
+
if (this.clipboard.copy(this.shareUrl)) {
|
|
9065
|
+
this.alerts.open('Ссылка скопирована в буфер обмена.', { appearance: 'positive' }).subscribe();
|
|
9066
|
+
}
|
|
9067
|
+
else {
|
|
9068
|
+
this.alerts.open('Не удалось скопировать ссылку в буфер обмена.', { appearance: 'negative' }).subscribe();
|
|
9069
|
+
}
|
|
9070
|
+
}
|
|
9071
|
+
/**
|
|
9072
|
+
* Открывает диалоговое окно с QR-кодом ссылки.
|
|
9073
|
+
*/
|
|
9074
|
+
showQRCode() {
|
|
9075
|
+
this.emitShareClick('qr');
|
|
9076
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
9077
|
+
target: ScUserMetrikaGoalsEnum.qrShow,
|
|
9078
|
+
});
|
|
9079
|
+
this.dialog
|
|
9080
|
+
.open(new PolymorpheusComponent(ScQRCodeDialogComponent), {
|
|
9081
|
+
size: 's',
|
|
9082
|
+
label: this.title || 'QR-код',
|
|
9083
|
+
data: { qrdata: this.shareUrl },
|
|
9084
|
+
})
|
|
9085
|
+
.subscribe();
|
|
9086
|
+
}
|
|
9087
|
+
/**
|
|
9088
|
+
* Отправляет метрику выбора варианта "Поделиться".
|
|
9089
|
+
*
|
|
9090
|
+
* @param shareLinkName Наименование варианта.
|
|
9091
|
+
*/
|
|
9092
|
+
emitShareClick(shareLinkName) {
|
|
9093
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
9094
|
+
target: ScUserMetrikaGoalsEnum.shareClick,
|
|
9095
|
+
params: {
|
|
9096
|
+
share_link_name: shareLinkName,
|
|
9097
|
+
},
|
|
9098
|
+
});
|
|
9099
|
+
}
|
|
9100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9101
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScShareDialogComponent, isStandalone: true, selector: "sc-share-dialog", ngImport: i0, template: "@if (terminal.isRunningOnTerminal) {\n <p class=\"-mt-2 mb-3 text-tui-text-02\">\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434.</p>\n <qrcode\n [margin]=\"0\"\n [qrdata]=\"shareUrl\"\n [width]=\"250\"\n elementType=\"img\"\n ></qrcode>\n} @else {\n @let isRow = viewMode() === 'row';\n @let appearance = isRow ? 'flat' : 'outline';\n @let buttonClass = isRow ? 'button _row' : 'button w-full !justify-start';\n @let iconClass = isRow ? '!m-0 !size-8' : '!m-0 !size-6';\n @let iconSize = isRow ? 32 : 24;\n\n <div\n class=\"gap-2\"\n [class.flex]=\"isRow\"\n [class.grid]=\"!isRow\"\n [class.grid-cols-2]=\"!isRow\"\n >\n <a\n tuiButton\n size=\"m\"\n scEmailLink\n linkLocation=\"share-link\"\n automation-id=\"sc-share-dialog__email\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"emailLink\"\n >\n <img\n [src]=\"'@tui.sc.img.email' | tuiIcon\"\n alt=\"Email\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>Email</span>\n </a>\n <a\n tuiButton\n size=\"m\"\n target=\"_blank\"\n automation-id=\"sc-share-dialog__vk\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"vkLink\"\n (click)=\"$event.preventDefault(); openShareWindow(vkLink, 'vk')\"\n >\n <img\n [src]=\"'@tui.sc.img.vk' | tuiIcon\"\n alt=\"\u0412\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u0435\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>\u0412\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u0435</span>\n </a>\n <a\n tuiButton\n size=\"m\"\n target=\"_blank\"\n automation-id=\"sc-share-dialog__telegram\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"telegramLink\"\n (click)=\"$event.preventDefault(); openShareWindow(telegramLink, 'telegram')\"\n >\n <img\n [src]=\"'@tui.sc.img.telegram' | tuiIcon\"\n alt=\"Telegram\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>Telegram</span>\n </a>\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n automation-id=\"sc-share-dialog__copy\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n (click)=\"copyShareLink()\"\n >\n <img\n [src]=\"'@tui.sc.img.copy' | tuiIcon\"\n alt=\"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C</span>\n </button>\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n automation-id=\"sc-share-dialog__qr\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n (click)=\"showQRCode()\"\n >\n <img\n [src]=\"'@tui.sc.img.qr-code' | tuiIcon\"\n alt=\"QR-\u043A\u043E\u0434\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>QR-\u043A\u043E\u0434</span>\n </button>\n </div>\n}\n", styles: [".button._row{--tui-padding: .625rem;--t-gap: 0 !important}.button._row span{max-width:0;overflow:hidden;opacity:0;transition-duration:.5s}.button._row:hover span{opacity:1;max-width:11.5rem;padding-left:1rem}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: ScEmailLinkDirective, selector: "a[scEmailLink]", inputs: ["linkLocation"] }, { kind: "component", type: QRCodeComponent, selector: "qrcode", inputs: ["allowEmptyString", "colorDark", "colorLight", "cssClass", "elementType", "errorCorrectionLevel", "imageSrc", "imageHeight", "imageWidth", "margin", "qrdata", "scale", "version", "width", "alt", "ariaLabel", "title"], outputs: ["qrCodeURL"] }, { kind: "pipe", type: TuiIconPipe, name: "tuiIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9102
|
+
}
|
|
9103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareDialogComponent, decorators: [{
|
|
9104
|
+
type: Component,
|
|
9105
|
+
args: [{ standalone: true, selector: 'sc-share-dialog', imports: [TuiButton, TuiIconPipe, ScEmailLinkDirective, QRCodeComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (terminal.isRunningOnTerminal) {\n <p class=\"-mt-2 mb-3 text-tui-text-02\">\u0421\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043A\u043E\u0434.</p>\n <qrcode\n [margin]=\"0\"\n [qrdata]=\"shareUrl\"\n [width]=\"250\"\n elementType=\"img\"\n ></qrcode>\n} @else {\n @let isRow = viewMode() === 'row';\n @let appearance = isRow ? 'flat' : 'outline';\n @let buttonClass = isRow ? 'button _row' : 'button w-full !justify-start';\n @let iconClass = isRow ? '!m-0 !size-8' : '!m-0 !size-6';\n @let iconSize = isRow ? 32 : 24;\n\n <div\n class=\"gap-2\"\n [class.flex]=\"isRow\"\n [class.grid]=\"!isRow\"\n [class.grid-cols-2]=\"!isRow\"\n >\n <a\n tuiButton\n size=\"m\"\n scEmailLink\n linkLocation=\"share-link\"\n automation-id=\"sc-share-dialog__email\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"emailLink\"\n >\n <img\n [src]=\"'@tui.sc.img.email' | tuiIcon\"\n alt=\"Email\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>Email</span>\n </a>\n <a\n tuiButton\n size=\"m\"\n target=\"_blank\"\n automation-id=\"sc-share-dialog__vk\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"vkLink\"\n (click)=\"$event.preventDefault(); openShareWindow(vkLink, 'vk')\"\n >\n <img\n [src]=\"'@tui.sc.img.vk' | tuiIcon\"\n alt=\"\u0412\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u0435\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>\u0412\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u0435</span>\n </a>\n <a\n tuiButton\n size=\"m\"\n target=\"_blank\"\n automation-id=\"sc-share-dialog__telegram\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n [href]=\"telegramLink\"\n (click)=\"$event.preventDefault(); openShareWindow(telegramLink, 'telegram')\"\n >\n <img\n [src]=\"'@tui.sc.img.telegram' | tuiIcon\"\n alt=\"Telegram\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>Telegram</span>\n </a>\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n automation-id=\"sc-share-dialog__copy\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n (click)=\"copyShareLink()\"\n >\n <img\n [src]=\"'@tui.sc.img.copy' | tuiIcon\"\n alt=\"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C</span>\n </button>\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n automation-id=\"sc-share-dialog__qr\"\n [appearance]=\"appearance\"\n [class]=\"buttonClass\"\n (click)=\"showQRCode()\"\n >\n <img\n [src]=\"'@tui.sc.img.qr-code' | tuiIcon\"\n alt=\"QR-\u043A\u043E\u0434\"\n [width]=\"iconSize\"\n [height]=\"iconSize\"\n [class]=\"iconClass\"\n />\n <span>QR-\u043A\u043E\u0434</span>\n </button>\n </div>\n}\n", styles: [".button._row{--tui-padding: .625rem;--t-gap: 0 !important}.button._row span{max-width:0;overflow:hidden;opacity:0;transition-duration:.5s}.button._row:hover span{opacity:1;max-width:11.5rem;padding-left:1rem}\n"] }]
|
|
9106
|
+
}] });
|
|
9107
|
+
|
|
9108
|
+
/**
|
|
9109
|
+
* Сервис открытия диалогового окна "Поделиться".
|
|
9110
|
+
*/
|
|
9111
|
+
class ScShareService {
|
|
9112
|
+
constructor() {
|
|
9113
|
+
/**
|
|
9114
|
+
* Сервис для работы с диалоговыми окнами.
|
|
9115
|
+
*/
|
|
9116
|
+
this.dialog = inject(TuiDialogService);
|
|
9117
|
+
}
|
|
9118
|
+
/**
|
|
9119
|
+
* Открывает диалоговое окно "Поделиться".
|
|
9120
|
+
*
|
|
9121
|
+
* @param title Заголовок ссылки, которой необходимо поделиться.
|
|
9122
|
+
* @param shareUrl Абсолютная ссылка, которой необходимо поделиться.
|
|
9123
|
+
*/
|
|
9124
|
+
openShareDialog(title, shareUrl) {
|
|
9125
|
+
this.dialog
|
|
9126
|
+
.open(new PolymorpheusComponent(ScShareDialogComponent), {
|
|
9127
|
+
size: 's',
|
|
9128
|
+
label: 'Поделиться',
|
|
9129
|
+
data: { title, shareUrl },
|
|
9130
|
+
})
|
|
9131
|
+
.subscribe();
|
|
9132
|
+
}
|
|
9133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9134
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareService, providedIn: 'root' }); }
|
|
9135
|
+
}
|
|
9136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareService, decorators: [{
|
|
9137
|
+
type: Injectable,
|
|
9138
|
+
args: [{
|
|
9139
|
+
providedIn: 'root',
|
|
9140
|
+
}]
|
|
9141
|
+
}] });
|
|
9142
|
+
|
|
9143
|
+
/**
|
|
9144
|
+
* Кнопка "Поделиться": открывает диалоговое окно с вариантами, как поделиться ссылкой.
|
|
9145
|
+
*
|
|
9146
|
+
* Ссылка формируется из {@link routerPath} относительно маршрутизации приложения, либо берётся из {@link shareUrl},
|
|
9147
|
+
* а если не задано ни то, ни другое - используется адрес текущей страницы.
|
|
9148
|
+
*/
|
|
9149
|
+
class ScShareButtonComponent {
|
|
9150
|
+
constructor() {
|
|
9151
|
+
/**
|
|
9152
|
+
* {@link InputSignal} заголовка ссылки, которой необходимо поделиться.
|
|
9153
|
+
*/
|
|
9154
|
+
this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
9155
|
+
/**
|
|
9156
|
+
* {@link InputSignal} ссылки, которой необходимо поделиться (абсолютной или относительно корня сайта).
|
|
9157
|
+
*/
|
|
9158
|
+
this.shareUrl = input(...(ngDevMode ? [undefined, { debugName: "shareUrl" }] : /* istanbul ignore next */ []));
|
|
9159
|
+
/**
|
|
9160
|
+
* {@link InputSignal} команд маршрутизатора, из которых формируется ссылка относительно маршрутизации приложения.
|
|
9161
|
+
*/
|
|
9162
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9163
|
+
this.routerPath = input(...(ngDevMode ? [undefined, { debugName: "routerPath" }] : /* istanbul ignore next */ []));
|
|
9164
|
+
/**
|
|
9165
|
+
* {@link InputSignal} параметров формирования ссылки из {@link routerPath}.
|
|
9166
|
+
*/
|
|
9167
|
+
this.routerCreationOptions = input(...(ngDevMode ? [undefined, { debugName: "routerCreationOptions" }] : /* istanbul ignore next */ []));
|
|
9168
|
+
/**
|
|
9169
|
+
* {@link InputSignal} формата внешнего вида кнопки.
|
|
9170
|
+
*/
|
|
9171
|
+
this.appearance = input('secondary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
9172
|
+
/**
|
|
9173
|
+
* {@link InputSignal} размера кнопки.
|
|
9174
|
+
*/
|
|
9175
|
+
this.size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9176
|
+
/**
|
|
9177
|
+
* {@link InputSignal} признака, что подпись "Поделиться" отображается постоянно.
|
|
9178
|
+
*/
|
|
9179
|
+
this.showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
9180
|
+
/**
|
|
9181
|
+
* {@link InputSignal} признака, что кнопка раскрывается с появлением подписи "Поделиться" при наведении.
|
|
9182
|
+
*/
|
|
9183
|
+
this.expandable = input(false, ...(ngDevMode ? [{ debugName: "expandable" }] : /* istanbul ignore next */ []));
|
|
9184
|
+
/**
|
|
9185
|
+
* Ссылка на объект документа.
|
|
9186
|
+
*/
|
|
9187
|
+
this.document = inject(DOCUMENT);
|
|
9188
|
+
/**
|
|
9189
|
+
* Сервис маршрутизации.
|
|
9190
|
+
*/
|
|
9191
|
+
this.router = inject(Router);
|
|
9192
|
+
/**
|
|
9193
|
+
* Сервис открытия диалогового окна "Поделиться".
|
|
9194
|
+
*/
|
|
9195
|
+
this.shareService = inject(ScShareService);
|
|
9196
|
+
/**
|
|
9197
|
+
* {@link Signal} ссылки, которой необходимо поделиться, заданной через входные параметры.
|
|
9198
|
+
*/
|
|
9199
|
+
this.href = computed(() => {
|
|
9200
|
+
const routerPath = this.routerPath();
|
|
9201
|
+
const url = routerPath ? this.router.createUrlTree(routerPath, this.routerCreationOptions()).toString() : this.shareUrl();
|
|
9202
|
+
return url ? decodeURIComponent(url) : undefined;
|
|
9203
|
+
}, ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
|
|
9204
|
+
}
|
|
9205
|
+
/**
|
|
9206
|
+
* Возвращает адрес текущей страницы.
|
|
9207
|
+
*/
|
|
9208
|
+
get currentUrl() {
|
|
9209
|
+
return decodeURIComponent(this.router.url);
|
|
9210
|
+
}
|
|
9211
|
+
/**
|
|
9212
|
+
* Обработчик нажатия на кнопку: открывает диалоговое окно "Поделиться".
|
|
9213
|
+
*
|
|
9214
|
+
* @param event Событие нажатия.
|
|
9215
|
+
*/
|
|
9216
|
+
openShareDialog(event) {
|
|
9217
|
+
event.preventDefault();
|
|
9218
|
+
this.shareService.openShareDialog(this.title(), this.getAbsoluteUrl(this.href() ?? this.currentUrl));
|
|
9219
|
+
}
|
|
9220
|
+
/**
|
|
9221
|
+
* Возвращает абсолютную ссылку.
|
|
9222
|
+
*
|
|
9223
|
+
* @param url Абсолютная ссылка или ссылка относительно корня сайта.
|
|
9224
|
+
*/
|
|
9225
|
+
getAbsoluteUrl(url) {
|
|
9226
|
+
return /^https?:\/\//.test(url) ? url : `${this.document.location.origin}${url}`;
|
|
9227
|
+
}
|
|
9228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9229
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScShareButtonComponent, isStandalone: true, selector: "sc-share-button", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, shareUrl: { classPropertyName: "shareUrl", publicName: "shareUrl", isSignal: true, isRequired: false, transformFunction: null }, routerPath: { classPropertyName: "routerPath", publicName: "routerPath", isSignal: true, isRequired: false, transformFunction: null }, routerCreationOptions: { classPropertyName: "routerCreationOptions", publicName: "routerCreationOptions", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (showLabel() || expandable()) {\n <a\n tuiButton\n iconStart=\"@tui.share-2\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [attr.href]=\"href() ?? currentUrl\"\n [class._expandable]=\"expandable()\"\n (click)=\"openShareDialog($event)\"\n >\n <span>\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F</span>\n </a>\n} @else {\n <a\n tuiIconButton\n iconStart=\"@tui.share-2\"\n title=\"\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F\"\n aria-label=\"\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [attr.href]=\"href() ?? currentUrl\"\n (click)=\"openShareDialog($event)\"\n ></a>\n}\n", styles: ["a._expandable{--t-gap: 0 !important}a._expandable span{max-width:0;overflow:hidden;opacity:0;transition-duration:.5s}a._expandable:hover span{opacity:1;max-width:11.5rem;padding-left:1rem}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9230
|
+
}
|
|
9231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareButtonComponent, decorators: [{
|
|
9232
|
+
type: Component,
|
|
9233
|
+
args: [{ standalone: true, selector: 'sc-share-button', imports: [TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showLabel() || expandable()) {\n <a\n tuiButton\n iconStart=\"@tui.share-2\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [attr.href]=\"href() ?? currentUrl\"\n [class._expandable]=\"expandable()\"\n (click)=\"openShareDialog($event)\"\n >\n <span>\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F</span>\n </a>\n} @else {\n <a\n tuiIconButton\n iconStart=\"@tui.share-2\"\n title=\"\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F\"\n aria-label=\"\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [attr.href]=\"href() ?? currentUrl\"\n (click)=\"openShareDialog($event)\"\n ></a>\n}\n", styles: ["a._expandable{--t-gap: 0 !important}a._expandable span{max-width:0;overflow:hidden;opacity:0;transition-duration:.5s}a._expandable:hover span{opacity:1;max-width:11.5rem;padding-left:1rem}\n"] }]
|
|
9234
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], shareUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "shareUrl", required: false }] }], routerPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerPath", required: false }] }], routerCreationOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerCreationOptions", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }] } });
|
|
9235
|
+
|
|
9236
|
+
/**
|
|
9237
|
+
* Ссылки на мессенджеры контакта по номеру телефона.
|
|
9238
|
+
*
|
|
9239
|
+
* На терминале вместо перехода в мессенджер отображается QR-код ссылки.
|
|
9240
|
+
*/
|
|
9241
|
+
class ScShareMessengersLinksComponent {
|
|
9242
|
+
constructor() {
|
|
9243
|
+
/**
|
|
9244
|
+
* {@link InputSignal} телефона контакта.
|
|
9245
|
+
*/
|
|
9246
|
+
this.phone = input.required(...(ngDevMode ? [{ debugName: "phone" }] : /* istanbul ignore next */ []));
|
|
9247
|
+
/**
|
|
9248
|
+
* {@link InputSignal} размера кнопок.
|
|
9249
|
+
*/
|
|
9250
|
+
this.size = input('s', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9251
|
+
/**
|
|
9252
|
+
* Сервис для сбора метрик о действиях пользователей.
|
|
9253
|
+
*/
|
|
9254
|
+
this.userMetrikaService = inject(ScUserMetrikaService);
|
|
9255
|
+
/**
|
|
9256
|
+
* Ссылка на объект окна браузера.
|
|
9257
|
+
*/
|
|
9258
|
+
this.window = inject(WA_WINDOW);
|
|
9259
|
+
/**
|
|
9260
|
+
* Провайдер данных о терминале.
|
|
9261
|
+
*/
|
|
9262
|
+
this.terminal = inject(IS_RUNNING_ON_TERMINAL);
|
|
9263
|
+
/**
|
|
9264
|
+
* Сервис для работы с диалоговыми окнами.
|
|
9265
|
+
*/
|
|
9266
|
+
this.dialog = inject(TuiDialogService);
|
|
9267
|
+
}
|
|
9268
|
+
/**
|
|
9269
|
+
* Открывает окно перехода в мессенджер.
|
|
9270
|
+
*
|
|
9271
|
+
* @param shareLink Ссылка перехода в мессенджер.
|
|
9272
|
+
* @param socialMedia Slug мессенджера.
|
|
9273
|
+
*/
|
|
9274
|
+
openShareWindow(shareLink, socialMedia) {
|
|
9275
|
+
this.userMetrikaService.emitUserMetrikaEvent({
|
|
9276
|
+
target: ScUserMetrikaGoalsEnum.shareClick,
|
|
9277
|
+
params: {
|
|
9278
|
+
share_link_name: socialMedia,
|
|
9279
|
+
phone: this.phone(),
|
|
9280
|
+
},
|
|
9281
|
+
});
|
|
9282
|
+
if (this.terminal.isRunningOnTerminal) {
|
|
9283
|
+
this.dialog
|
|
9284
|
+
.open(new PolymorpheusComponent(ScQRCodeDialogComponent), {
|
|
9285
|
+
size: 's',
|
|
9286
|
+
label: socialMedia,
|
|
9287
|
+
data: { qrdata: shareLink },
|
|
9288
|
+
})
|
|
9289
|
+
.subscribe();
|
|
9290
|
+
}
|
|
9291
|
+
else {
|
|
9292
|
+
this.window.open(shareLink, 'sharer', 'status=0,toolbar=0,width=650,height=500');
|
|
9293
|
+
}
|
|
9294
|
+
}
|
|
9295
|
+
/**
|
|
9296
|
+
* Проверяет, что номер телефона подходит для использования в мессенджерах.
|
|
9297
|
+
*
|
|
9298
|
+
* @param value Номер телефона.
|
|
9299
|
+
*/
|
|
9300
|
+
// eslint-disable-next-line class-methods-use-this
|
|
9301
|
+
isValidPhoneNumberForMessenger(value) {
|
|
9302
|
+
return ScPhoneService.isValidPhoneNumberForMessenger(value);
|
|
9303
|
+
}
|
|
9304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareMessengersLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScShareMessengersLinksComponent, isStandalone: true, selector: "sc-share-messengers-links", inputs: { phone: { classPropertyName: "phone", publicName: "phone", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (isValidPhoneNumberForMessenger(phone())) {\n @let phoneNumber = phone() | scPhoneFormat: 'cleanWithPlus';\n\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"mono\"\n iconStart=\"@tui.sc.telegram\"\n title=\"Telegram\"\n aria-label=\"Telegram\"\n [size]=\"size()\"\n (click)=\"openShareWindow('https://t.me/' + phoneNumber, 'telegram')\"\n ></button>\n}\n", dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "pipe", type: ScPhoneFormatPipe, name: "scPhoneFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9306
|
+
}
|
|
9307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareMessengersLinksComponent, decorators: [{
|
|
9308
|
+
type: Component,
|
|
9309
|
+
args: [{ standalone: true, selector: 'sc-share-messengers-links', imports: [TuiButton, ScPhoneFormatPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isValidPhoneNumberForMessenger(phone())) {\n @let phoneNumber = phone() | scPhoneFormat: 'cleanWithPlus';\n\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"mono\"\n iconStart=\"@tui.sc.telegram\"\n title=\"Telegram\"\n aria-label=\"Telegram\"\n [size]=\"size()\"\n (click)=\"openShareWindow('https://t.me/' + phoneNumber, 'telegram')\"\n ></button>\n}\n" }]
|
|
9310
|
+
}], propDecorators: { phone: [{ type: i0.Input, args: [{ isSignal: true, alias: "phone", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
9311
|
+
|
|
8931
9312
|
/**
|
|
8932
9313
|
* Компонент часто задаваемых вопросов.
|
|
8933
9314
|
*/
|
|
8934
9315
|
class ScFrequentlyAskedQuestionsComponent {
|
|
9316
|
+
/**
|
|
9317
|
+
* Инициализирует экземпляр класса {@link ScFrequentlyAskedQuestionsComponent}.
|
|
9318
|
+
*/
|
|
8935
9319
|
constructor() {
|
|
8936
9320
|
/**
|
|
8937
9321
|
* {@link InputSignal} списка группы часто задаваемых вопросов.
|
|
@@ -8941,13 +9325,122 @@ class ScFrequentlyAskedQuestionsComponent {
|
|
|
8941
9325
|
* {@link InputSignal} отображения загрузки.
|
|
8942
9326
|
*/
|
|
8943
9327
|
this.showLoading = input(false, ...(ngDevMode ? [{ debugName: "showLoading" }] : /* istanbul ignore next */ []));
|
|
9328
|
+
/**
|
|
9329
|
+
* {@link InputSignal} параметров прокрутки к вопросу из якоря.
|
|
9330
|
+
*/
|
|
9331
|
+
this.scrollOptions = input({ behavior: 'instant', block: 'center' }, ...(ngDevMode ? [{ debugName: "scrollOptions" }] : /* istanbul ignore next */ []));
|
|
9332
|
+
/**
|
|
9333
|
+
* {@link InputSignal} количества кадров удержания вопроса из якоря в поле зрения (около 5 секунд).
|
|
9334
|
+
*/
|
|
9335
|
+
this.scrollHoldFrames = input(300, ...(ngDevMode ? [{ debugName: "scrollHoldFrames" }] : /* istanbul ignore next */ []));
|
|
8944
9336
|
/**
|
|
8945
9337
|
* Признак, что приложение запущено на сервере.
|
|
8946
9338
|
*/
|
|
8947
9339
|
this.isServer = inject(IS_SERVER);
|
|
9340
|
+
/**
|
|
9341
|
+
* {@link WritableSignal} идентификаторов раскрытых вопросов.
|
|
9342
|
+
*/
|
|
9343
|
+
this.openedIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []));
|
|
9344
|
+
/**
|
|
9345
|
+
* Возвращает якорь ссылки на вопрос.
|
|
9346
|
+
*/
|
|
9347
|
+
this.getAnchor = scGetFaqQuestionAnchor;
|
|
9348
|
+
/**
|
|
9349
|
+
* Активный маршрут.
|
|
9350
|
+
*/
|
|
9351
|
+
this.route = inject(ActivatedRoute);
|
|
9352
|
+
/**
|
|
9353
|
+
* Инжектор компонента.
|
|
9354
|
+
*/
|
|
9355
|
+
this.injector = inject(Injector);
|
|
9356
|
+
/**
|
|
9357
|
+
* Ссылка на уничтожение компонента.
|
|
9358
|
+
*/
|
|
9359
|
+
this.destroyRef = inject(DestroyRef);
|
|
9360
|
+
/**
|
|
9361
|
+
* {@link Signal} ссылок на заголовки вопросов.
|
|
9362
|
+
*/
|
|
9363
|
+
this.questionHeaders = viewChildren('questionHeader', ...(ngDevMode ? [{ debugName: "questionHeaders" }] : /* istanbul ignore next */ []));
|
|
9364
|
+
// На сервере все вопросы раскрыты.
|
|
9365
|
+
if (this.isServer) {
|
|
9366
|
+
return;
|
|
9367
|
+
}
|
|
9368
|
+
// Раскрываем вопрос из якоря и прокручиваем к нему: якорь может смениться на открытой странице, список загрузиться позже.
|
|
9369
|
+
combineLatest([this.route.fragment, toObservable(this.items)])
|
|
9370
|
+
.pipe(map(([fragment, items]) => {
|
|
9371
|
+
const questionId = scGetFaqQuestionIdFromAnchor(fragment);
|
|
9372
|
+
return questionId !== null && items.some((item) => item.id === questionId) ? questionId : null;
|
|
9373
|
+
}), filter(tuiIsPresent), takeUntilDestroyed())
|
|
9374
|
+
.subscribe((questionId) => {
|
|
9375
|
+
this.onOpenedChange(questionId, true);
|
|
9376
|
+
afterNextRender(() => {
|
|
9377
|
+
const header = this.getQuestionHeader(questionId);
|
|
9378
|
+
if (header) {
|
|
9379
|
+
this.scrollToHeader(header);
|
|
9380
|
+
}
|
|
9381
|
+
}, { injector: this.injector });
|
|
9382
|
+
});
|
|
9383
|
+
}
|
|
9384
|
+
/**
|
|
9385
|
+
* Возвращает параметры формирования ссылки на вопрос: текущая страница с её query-параметрами и якорем вопроса.
|
|
9386
|
+
*
|
|
9387
|
+
* @param questionId Идентификатор вопроса.
|
|
9388
|
+
*/
|
|
9389
|
+
getShareLinkOptions(questionId) {
|
|
9390
|
+
return {
|
|
9391
|
+
relativeTo: this.route,
|
|
9392
|
+
queryParamsHandling: 'preserve',
|
|
9393
|
+
fragment: scGetFaqQuestionAnchor(questionId),
|
|
9394
|
+
};
|
|
9395
|
+
}
|
|
9396
|
+
/**
|
|
9397
|
+
* Обработчик изменения состояния раскрытия вопроса.
|
|
9398
|
+
*
|
|
9399
|
+
* @param questionId Идентификатор вопроса.
|
|
9400
|
+
* @param opened Признак, что вопрос раскрыт.
|
|
9401
|
+
*/
|
|
9402
|
+
onOpenedChange(questionId, opened) {
|
|
9403
|
+
this.openedIds.update((ids) => {
|
|
9404
|
+
const nextIds = new Set(ids);
|
|
9405
|
+
if (opened) {
|
|
9406
|
+
nextIds.add(questionId);
|
|
9407
|
+
}
|
|
9408
|
+
else {
|
|
9409
|
+
nextIds.delete(questionId);
|
|
9410
|
+
}
|
|
9411
|
+
return nextIds;
|
|
9412
|
+
});
|
|
9413
|
+
}
|
|
9414
|
+
/**
|
|
9415
|
+
* Возвращает элемент заголовка вопроса.
|
|
9416
|
+
*
|
|
9417
|
+
* @param questionId Идентификатор вопроса.
|
|
9418
|
+
*/
|
|
9419
|
+
getQuestionHeader(questionId) {
|
|
9420
|
+
const anchor = scGetFaqQuestionAnchor(questionId);
|
|
9421
|
+
return this.questionHeaders().find((header) => header.nativeElement.id === anchor)?.nativeElement;
|
|
9422
|
+
}
|
|
9423
|
+
/**
|
|
9424
|
+
* Прокручивает страницу к заголовку вопроса и удерживает его в поле зрения.
|
|
9425
|
+
*
|
|
9426
|
+
* @param header Элемент заголовка вопроса.
|
|
9427
|
+
*/
|
|
9428
|
+
scrollToHeader(header) {
|
|
9429
|
+
const getTop = () => Math.round(header.getBoundingClientRect().top);
|
|
9430
|
+
const userScroll$ = merge(fromEvent(globalThis, 'wheel'), fromEvent(globalThis, 'touchstart'), fromEvent(globalThis, 'keydown'), fromEvent(globalThis, 'mousedown'));
|
|
9431
|
+
// Мгновенно: плавная прокрутка не выполняется в скрытой вкладке.
|
|
9432
|
+
header.scrollIntoView(this.scrollOptions());
|
|
9433
|
+
let expectedTop = getTop();
|
|
9434
|
+
// Повторяем прокрутку, если вопрос сдвинула догрузка страницы или чужая прокрутка, пока пользователь не начнёт прокручивать сам.
|
|
9435
|
+
animationFrames()
|
|
9436
|
+
.pipe(take(this.scrollHoldFrames()), map(getTop), filter((top) => top !== expectedTop), takeUntilDestroyed(this.destroyRef), takeUntil(userScroll$))
|
|
9437
|
+
.subscribe(() => {
|
|
9438
|
+
header.scrollIntoView(this.scrollOptions());
|
|
9439
|
+
expectedTop = getTop();
|
|
9440
|
+
});
|
|
8948
9441
|
}
|
|
8949
9442
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScFrequentlyAskedQuestionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8950
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScFrequentlyAskedQuestionsComponent, isStandalone: true, selector: "sc-frequently-asked-questions", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, showLoading: { classPropertyName: "showLoading", publicName: "showLoading", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
|
|
9443
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScFrequentlyAskedQuestionsComponent, isStandalone: true, selector: "sc-frequently-asked-questions", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, showLoading: { classPropertyName: "showLoading", publicName: "showLoading", isSignal: true, isRequired: false, transformFunction: null }, scrollOptions: { classPropertyName: "scrollOptions", publicName: "scrollOptions", isSignal: true, isRequired: false, transformFunction: null }, scrollHoldFrames: { classPropertyName: "scrollHoldFrames", publicName: "scrollHoldFrames", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [
|
|
8951
9444
|
{
|
|
8952
9445
|
provide: TUI_BUTTON_OPTIONS,
|
|
8953
9446
|
useValue: {
|
|
@@ -8955,11 +9448,11 @@ class ScFrequentlyAskedQuestionsComponent {
|
|
|
8955
9448
|
size: 'l',
|
|
8956
9449
|
},
|
|
8957
9450
|
},
|
|
8958
|
-
], ngImport: i0, template: "<tui-loader\n [loading]=\"showLoading()\"\n [overlay]=\"true\"\n>\n <tui-accordion\n class=\"accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of items(); track item.id) {\n <button\n [tuiAccordion]=\"isServer\"\n class=\"!whitespace-normal !text-body-m-bold\"\n >\n {{ item.question }}\n </button>\n <tui-expand>\n <div [innerHTML]=\"item.answer\"></div>\n </tui-expand>\n }\n </tui-accordion>\n</tui-loader>\n", styles: [".accordion{border-radius:0}.accordion,.accordion[data-size=s],.accordion[data-size=m],.accordion[data-size=l],.accordion .tui-list{font:inherit}.accordion [tuiAccordion]{border-block:1px solid var(--tui-border-normal);border-block-end-color:#fff!important;font-weight:400;border-color:var(--tui-border-normal);-webkit-mask:none;mask:none;block-size:auto;padding-block:.5rem;min-block-size:var(--t-size)}.accordion [tuiAccordion]._open{border-block-end-color:var(--tui-border-normal)!important}.accordion tui-expand,.accordion [tuiAccordion]{box-shadow:none;white-space:normal}\n"], dependencies: [{ kind: "component", type: i1$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i1$1.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i2$1.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9451
|
+
], viewQueries: [{ propertyName: "questionHeaders", predicate: ["questionHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<tui-loader\n [loading]=\"showLoading()\"\n [overlay]=\"true\"\n>\n <tui-accordion\n class=\"accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of items(); track item.id) {\n @let anchor = getAnchor(item.id);\n\n <button\n #questionHeader\n [id]=\"anchor\"\n [tuiAccordion]=\"isServer || openedIds().has(item.id)\"\n (tuiAccordionChange)=\"onOpenedChange(item.id, !!$event)\"\n class=\"!whitespace-normal !text-body-m-bold\"\n >\n <span class=\"grow\">{{ item.question }}</span>\n <sc-share-button\n appearance=\"flat\"\n size=\"s\"\n class=\"shrink-0\"\n [title]=\"item.question\"\n [routerPath]=\"[]\"\n [routerCreationOptions]=\"getShareLinkOptions(item.id)\"\n (click)=\"$event.stopPropagation()\"\n />\n </button>\n <tui-expand>\n <div [innerHTML]=\"item.answer\"></div>\n </tui-expand>\n }\n </tui-accordion>\n</tui-loader>\n", styles: [".accordion{border-radius:0}.accordion,.accordion[data-size=s],.accordion[data-size=m],.accordion[data-size=l],.accordion .tui-list{font:inherit}.accordion [tuiAccordion]{border-block:1px solid var(--tui-border-normal);border-block-end-color:#fff!important;font-weight:400;border-color:var(--tui-border-normal);-webkit-mask:none;mask:none;block-size:auto;padding-block:.5rem;min-block-size:var(--t-size)}.accordion [tuiAccordion]._open{border-block-end-color:var(--tui-border-normal)!important}.accordion tui-expand,.accordion [tuiAccordion]{box-shadow:none;white-space:normal}\n"], dependencies: [{ kind: "component", type: i1$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i1$1.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i2$1.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "component", type: ScShareButtonComponent, selector: "sc-share-button", inputs: ["title", "shareUrl", "routerPath", "routerCreationOptions", "appearance", "size", "showLabel", "expandable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8959
9452
|
}
|
|
8960
9453
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScFrequentlyAskedQuestionsComponent, decorators: [{
|
|
8961
9454
|
type: Component,
|
|
8962
|
-
args: [{ selector: 'sc-frequently-asked-questions', imports: [TuiAccordion, TuiLoader], providers: [
|
|
9455
|
+
args: [{ selector: 'sc-frequently-asked-questions', imports: [TuiAccordion, TuiLoader, ScShareButtonComponent], providers: [
|
|
8963
9456
|
{
|
|
8964
9457
|
provide: TUI_BUTTON_OPTIONS,
|
|
8965
9458
|
useValue: {
|
|
@@ -8967,8 +9460,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8967
9460
|
size: 'l',
|
|
8968
9461
|
},
|
|
8969
9462
|
},
|
|
8970
|
-
], host: { ngSkipHydration: 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader\n [loading]=\"showLoading()\"\n [overlay]=\"true\"\n>\n <tui-accordion\n class=\"accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of items(); track item.id) {\n <button\n [tuiAccordion]=\"isServer\"\n class=\"!whitespace-normal !text-body-m-bold\"\n >\n {{ item.question }}\n </button>\n <tui-expand>\n <div [innerHTML]=\"item.answer\"></div>\n </tui-expand>\n }\n </tui-accordion>\n</tui-loader>\n", styles: [".accordion{border-radius:0}.accordion,.accordion[data-size=s],.accordion[data-size=m],.accordion[data-size=l],.accordion .tui-list{font:inherit}.accordion [tuiAccordion]{border-block:1px solid var(--tui-border-normal);border-block-end-color:#fff!important;font-weight:400;border-color:var(--tui-border-normal);-webkit-mask:none;mask:none;block-size:auto;padding-block:.5rem;min-block-size:var(--t-size)}.accordion [tuiAccordion]._open{border-block-end-color:var(--tui-border-normal)!important}.accordion tui-expand,.accordion [tuiAccordion]{box-shadow:none;white-space:normal}\n"] }]
|
|
8971
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], showLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoading", required: false }] }] } });
|
|
9463
|
+
], host: { ngSkipHydration: 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader\n [loading]=\"showLoading()\"\n [overlay]=\"true\"\n>\n <tui-accordion\n class=\"accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of items(); track item.id) {\n @let anchor = getAnchor(item.id);\n\n <button\n #questionHeader\n [id]=\"anchor\"\n [tuiAccordion]=\"isServer || openedIds().has(item.id)\"\n (tuiAccordionChange)=\"onOpenedChange(item.id, !!$event)\"\n class=\"!whitespace-normal !text-body-m-bold\"\n >\n <span class=\"grow\">{{ item.question }}</span>\n <sc-share-button\n appearance=\"flat\"\n size=\"s\"\n class=\"shrink-0\"\n [title]=\"item.question\"\n [routerPath]=\"[]\"\n [routerCreationOptions]=\"getShareLinkOptions(item.id)\"\n (click)=\"$event.stopPropagation()\"\n />\n </button>\n <tui-expand>\n <div [innerHTML]=\"item.answer\"></div>\n </tui-expand>\n }\n </tui-accordion>\n</tui-loader>\n", styles: [".accordion{border-radius:0}.accordion,.accordion[data-size=s],.accordion[data-size=m],.accordion[data-size=l],.accordion .tui-list{font:inherit}.accordion [tuiAccordion]{border-block:1px solid var(--tui-border-normal);border-block-end-color:#fff!important;font-weight:400;border-color:var(--tui-border-normal);-webkit-mask:none;mask:none;block-size:auto;padding-block:.5rem;min-block-size:var(--t-size)}.accordion [tuiAccordion]._open{border-block-end-color:var(--tui-border-normal)!important}.accordion tui-expand,.accordion [tuiAccordion]{box-shadow:none;white-space:normal}\n"] }]
|
|
9464
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], showLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoading", required: false }] }], scrollOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollOptions", required: false }] }], scrollHoldFrames: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHoldFrames", required: false }] }], questionHeaders: [{ type: i0.ViewChildren, args: ['questionHeader', { isSignal: true }] }] } });
|
|
8972
9465
|
|
|
8973
9466
|
/**
|
|
8974
9467
|
* Возвращает query-параметры ссылки на группу часто задаваемых вопросов.
|
|
@@ -9219,7 +9712,9 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9219
9712
|
.pipe(startWith(null))), tap((data) => {
|
|
9220
9713
|
if (data) {
|
|
9221
9714
|
const pageTitle = 'Часто задаваемые вопросы - FAQ';
|
|
9222
|
-
|
|
9715
|
+
// Якорь вопроса не входит в адрес страницы.
|
|
9716
|
+
const pagePath = this.router.url.split('#')[0];
|
|
9717
|
+
this.seoService.setByDefault(pageTitle, undefined, this.schemaOrgFactory.generateForFaqPage(data.data, pagePath, pageTitle));
|
|
9223
9718
|
}
|
|
9224
9719
|
}), shareReplay({ refCount: true, bufferSize: 1 }));
|
|
9225
9720
|
/**
|
|
@@ -9250,7 +9745,7 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9250
9745
|
this.pageQueryParam = SC_PAGE_QUERY_PARAM;
|
|
9251
9746
|
}
|
|
9252
9747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScFrequentlyAskedQuestionsWithGroupsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9253
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScFrequentlyAskedQuestionsWithGroupsComponent, isStandalone: true, selector: "sc-frequently-asked-questions-with-groups", outputs: { clickSendQuestion: "clickSendQuestion" }, host: { attributes: { "ngSkipHydration": "true" } }, ngImport: i0, template: "@let items = data$ | async;\n@let pageCount = pageCount$ | async;\n@let viewMode = viewMode$ | async;\n\n@if (viewMode) {\n <div\n class=\"flex gap-6\"\n [class.flex-col]=\"viewMode === 'select'\"\n >\n <div class=\"flex flex-col gap-7\">\n <sc-frequently-asked-questions-group-selector\n [selectedGroupId]=\"groupId$ | async\"\n [viewMode]=\"viewMode\"\n class=\"shrink-0\"\n [class.w-64]=\"viewMode !== 'select'\"\n />\n @if (viewMode === 'list') {\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n iconStart=\"@tui.circle-help\"\n appearance=\"secondary\"\n (click)=\"clickSendQuestion.emit()\"\n class=\"self-center\"\n >\n \u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441\n </button>\n }\n </div>\n <div class=\"grow\">\n @if (items && items.length) {\n <sc-frequently-asked-questions\n [items]=\"items\"\n [showLoading]=\"isLoading()\"\n />\n @if (pageCount && pageCount > 1) {\n <sc-pagination-links\n [length]=\"pageCount\"\n [index]=\"(currentPage$ | async) ?? 1\"\n [queryParam]=\"pageQueryParam\"\n class=\"mt-4\"\n />\n }\n } @else {\n <p class=\"text-body-s-bold\">\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432 \u043F\u0443\u0441\u0442</p>\n }\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ScFrequentlyAskedQuestionsGroupSelectorComponent, selector: "sc-frequently-asked-questions-group-selector", inputs: ["selectedGroupId", "viewMode"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: ScFrequentlyAskedQuestionsComponent, selector: "sc-frequently-asked-questions", inputs: ["items", "showLoading"] }, { kind: "component", type: ScPaginationLinksComponent, selector: "sc-pagination-links", inputs: ["length", "index", "queryParam", "activePadding", "sidePadding"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: ScFrequentlyAskedQuestionsWithGroupsComponent, isStandalone: true, selector: "sc-frequently-asked-questions-with-groups", outputs: { clickSendQuestion: "clickSendQuestion" }, host: { attributes: { "ngSkipHydration": "true" } }, ngImport: i0, template: "@let items = data$ | async;\n@let pageCount = pageCount$ | async;\n@let viewMode = viewMode$ | async;\n\n@if (viewMode) {\n <div\n class=\"flex gap-6\"\n [class.flex-col]=\"viewMode === 'select'\"\n >\n <div class=\"flex flex-col gap-7\">\n <sc-frequently-asked-questions-group-selector\n [selectedGroupId]=\"groupId$ | async\"\n [viewMode]=\"viewMode\"\n class=\"shrink-0\"\n [class.w-64]=\"viewMode !== 'select'\"\n />\n @if (viewMode === 'list') {\n <button\n tuiButton\n size=\"m\"\n type=\"button\"\n iconStart=\"@tui.circle-help\"\n appearance=\"secondary\"\n (click)=\"clickSendQuestion.emit()\"\n class=\"self-center\"\n >\n \u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441\n </button>\n }\n </div>\n <div class=\"grow\">\n @if (items && items.length) {\n <sc-frequently-asked-questions\n [items]=\"items\"\n [showLoading]=\"isLoading()\"\n />\n @if (pageCount && pageCount > 1) {\n <sc-pagination-links\n [length]=\"pageCount\"\n [index]=\"(currentPage$ | async) ?? 1\"\n [queryParam]=\"pageQueryParam\"\n class=\"mt-4\"\n />\n }\n } @else {\n <p class=\"text-body-s-bold\">\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432 \u043F\u0443\u0441\u0442</p>\n }\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ScFrequentlyAskedQuestionsGroupSelectorComponent, selector: "sc-frequently-asked-questions-group-selector", inputs: ["selectedGroupId", "viewMode"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: ScFrequentlyAskedQuestionsComponent, selector: "sc-frequently-asked-questions", inputs: ["items", "showLoading", "scrollOptions", "scrollHoldFrames"] }, { kind: "component", type: ScPaginationLinksComponent, selector: "sc-pagination-links", inputs: ["length", "index", "queryParam", "activePadding", "sidePadding"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9254
9749
|
}
|
|
9255
9750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScFrequentlyAskedQuestionsWithGroupsComponent, decorators: [{
|
|
9256
9751
|
type: Component,
|
|
@@ -9879,38 +10374,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
9879
10374
|
args: [{ selector: 'sc-gratitude', imports: [TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col items-center gap-4 py-14 text-center\">\n <tui-icon\n icon=\"@tui.circle-check\"\n class=\"!size-20 !text-5xl text-tui-success-fill\"\n />\n <p class=\"text-h5\">\u0421\u043F\u0430\u0441\u0438\u0431\u043E!</p>\n <p\n [innerHTML]=\"context?.data?.subTitle ?? '\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B. \u041C\u044B \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F \u0441 \u0432\u0430\u043C\u0438 \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.'\"\n class=\"mx-2 text-body-m\"\n ></p>\n</div>\n" }]
|
|
9880
10375
|
}], ctorParameters: () => [] });
|
|
9881
10376
|
|
|
9882
|
-
/**
|
|
9883
|
-
* Компонент кнопки "Поделиться".
|
|
9884
|
-
*/
|
|
9885
|
-
class ScShareButtonComponent {
|
|
9886
|
-
constructor() {
|
|
9887
|
-
/**
|
|
9888
|
-
* Формат внешнего вида кнопки.
|
|
9889
|
-
*/
|
|
9890
|
-
this.appearance = 'secondary';
|
|
9891
|
-
/**
|
|
9892
|
-
* Размер кнопки.
|
|
9893
|
-
*/
|
|
9894
|
-
this.size = 'm';
|
|
9895
|
-
/**
|
|
9896
|
-
* Событие клика по кнопке "Поделиться".
|
|
9897
|
-
*/
|
|
9898
|
-
this.clickShareEvent = new EventEmitter();
|
|
9899
|
-
}
|
|
9900
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9901
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.16", type: ScShareButtonComponent, isStandalone: true, selector: "sc-share-button", inputs: { appearance: "appearance", size: "size" }, outputs: { clickShareEvent: "clickShareEvent" }, ngImport: i0, template: "<button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n (click)=\"$event.stopPropagation(); clickShareEvent.emit()\"\n>\n <tui-icon icon=\"@tui.share-2\" />\n</button>\n", dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9902
|
-
}
|
|
9903
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: ScShareButtonComponent, decorators: [{
|
|
9904
|
-
type: Component,
|
|
9905
|
-
args: [{ selector: 'sc-share-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [TuiButton, TuiIcon], template: "<button\n tuiIconButton\n [appearance]=\"appearance\"\n [size]=\"size\"\n (click)=\"$event.stopPropagation(); clickShareEvent.emit()\"\n>\n <tui-icon icon=\"@tui.share-2\" />\n</button>\n" }]
|
|
9906
|
-
}], propDecorators: { appearance: [{
|
|
9907
|
-
type: Input
|
|
9908
|
-
}], size: [{
|
|
9909
|
-
type: Input
|
|
9910
|
-
}], clickShareEvent: [{
|
|
9911
|
-
type: Output
|
|
9912
|
-
}] } });
|
|
9913
|
-
|
|
9914
10377
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
9915
10378
|
/**
|
|
9916
10379
|
* Компонент смены пароля пользователя.
|
|
@@ -10368,5 +10831,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
10368
10831
|
* Generated bundle index. Do not edit.
|
|
10369
10832
|
*/
|
|
10370
10833
|
|
|
10371
|
-
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_FAQ_GROUP_QUERY_PARAM, 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, ScNewsListComponent, ScNextInputFocusDirective, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderDirectionItemsComponent, ScOrderFormComponent, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScPaginationLinksComponent, 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, scGetFaqGroupQueryParams, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
10834
|
+
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_FAQ_GROUP_QUERY_PARAM, SC_FAQ_QUESTION_ANCHOR_PREFIX, 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, ScNewsListComponent, ScNextInputFocusDirective, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderDirectionItemsComponent, ScOrderFormComponent, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScPaginationLinksComponent, 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, ScShareDialogComponent, ScShareMessengersLinksComponent, ScShareService, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserPhoneApproveDialogComponent, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, cleanupRecaptchaArtifacts, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scGetCurrentRoute, scGetFaqGroupQueryParams, scGetFaqQuestionAnchor, scGetFaqQuestionIdFromAnchor, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
10372
10835
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|