@snabcentr/client-ui 4.9.2 → 4.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/pages/frequently-asked-questions/sc-faq-query-params.mjs +9 -0
- package/esm2022/pages/frequently-asked-questions/sc-get-faq-group-query-params.mjs +13 -0
- package/esm2022/pages/frequently-asked-questions-group-selector/sc-frequently-asked-questions-group-selector.component.mjs +46 -17
- package/esm2022/pages/frequently-asked-questions-with-groups/sc-frequently-asked-questions-with-groups.component.mjs +31 -31
- package/esm2022/pages/index.mjs +3 -1
- package/esm2022/pagination/index.mjs +2 -0
- package/esm2022/pagination/sc-pagination-links/sc-pagination-links.component.mjs +98 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/snabcentr-client-ui.mjs +181 -43
- package/fesm2022/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/pages/frequently-asked-questions/sc-faq-query-params.d.ts +8 -0
- package/pages/frequently-asked-questions/sc-get-faq-group-query-params.d.ts +10 -0
- package/pages/frequently-asked-questions-group-selector/sc-frequently-asked-questions-group-selector.component.d.ts +23 -4
- package/pages/frequently-asked-questions-with-groups/sc-frequently-asked-questions-with-groups.component.d.ts +16 -14
- package/pages/index.d.ts +2 -0
- package/pagination/index.d.ts +1 -0
- package/pagination/sc-pagination-links/sc-pagination-links.component.d.ts +60 -0
- package/public-api.d.ts +1 -0
- package/release_notes.tmp +2 -4
- package/styles/tailwind/tailwind.scss +0 -4
package/esm2022/public-api.mjs
CHANGED
|
@@ -21,6 +21,7 @@ export * from './news';
|
|
|
21
21
|
export * from './noindex-wrapper';
|
|
22
22
|
export * from './order';
|
|
23
23
|
export * from './pages';
|
|
24
|
+
export * from './pagination';
|
|
24
25
|
export * from './pipes';
|
|
25
26
|
export * from './samples';
|
|
26
27
|
export * from './methods';
|
|
@@ -32,4 +33,4 @@ export * from './user';
|
|
|
32
33
|
export * from './validators';
|
|
33
34
|
export * from './verification';
|
|
34
35
|
export * from './profile';
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC11aS9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsUUFBUSxDQUFDO0FBQ3ZCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsUUFBUSxDQUFDO0FBQ3ZCLGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsU0FBUyxDQUFDO0FBQ3hCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsU0FBUyxDQUFDO0FBQ3hCLGNBQWMsVUFBVSxDQUFDO0FBQ3pCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsUUFBUSxDQUFDO0FBQ3ZCLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLFFBQVEsQ0FBQztBQUN2QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsV0FBVyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9tb2RlbHMnO1xuZXhwb3J0ICogZnJvbSAnLi9zZXJ2aWNlcyc7XG5leHBvcnQgKiBmcm9tICcuL2F1dGgnO1xuZXhwb3J0ICogZnJvbSAnLi9hY2NvcmRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9iYW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9jYXJ0JztcbmV4cG9ydCAqIGZyb20gJy4vY2F0YWxvZyc7XG5leHBvcnQgKiBmcm9tICcuL2NvbmZpZ3VyYXRvcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9jb250cmFnZW50cyc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRhY3RzJztcbmV4cG9ydCAqIGZyb20gJy4vZGVsaXZlcnktYWRkcmVzcyc7XG5leHBvcnQgKiBmcm9tICcuL2RpYWxvZ3MnO1xuZXhwb3J0ICogZnJvbSAnLi9kaXJlY3RpdmVzJztcbmV4cG9ydCAqIGZyb20gJy4vZXJyb3ItaGFuZGxlcic7XG5leHBvcnQgKiBmcm9tICcuL2ZpbGVzJztcbmV4cG9ydCAqIGZyb20gJy4vZm9ybS1maWVsZHMnO1xuZXhwb3J0ICogZnJvbSAnLi9pY29ucyc7XG5leHBvcnQgKiBmcm9tICcuL2xvYWRlcic7XG5leHBvcnQgKiBmcm9tICcuL2JyYW5kcy1saXN0JztcbmV4cG9ydCAqIGZyb20gJy4vbmV3cyc7XG5leHBvcnQgKiBmcm9tICcuL25vaW5kZXgtd3JhcHBlcic7XG5leHBvcnQgKiBmcm9tICcuL29yZGVyJztcbmV4cG9ydCAqIGZyb20gJy4vcGFnZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9wYWdpbmF0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vcGlwZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zYW1wbGVzJztcbmV4cG9ydCAqIGZyb20gJy4vbWV0aG9kcyc7XG5leHBvcnQgKiBmcm9tICcuL3Byb3ZpZGVycyc7XG5leHBvcnQgKiBmcm9tICcuL2ZlZWRiYWNrJztcbmV4cG9ydCAqIGZyb20gJy4vcXJjb2RlJztcbmV4cG9ydCAqIGZyb20gJy4vc2hhcmUtYnV0dG9uJztcbmV4cG9ydCAqIGZyb20gJy4vdXNlcic7XG5leHBvcnQgKiBmcm9tICcuL3ZhbGlkYXRvcnMnO1xuZXhwb3J0ICogZnJvbSAnLi92ZXJpZmljYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9wcm9maWxlJztcbiJdfQ==
|
|
@@ -7,14 +7,14 @@ import { EMPTY, BehaviorSubject, switchMap, of, shareReplay, map, Subject, filte
|
|
|
7
7
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
8
8
|
import { takeUntilDestroyed, toSignal, outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
9
9
|
import * as i4$1 from '@taiga-ui/cdk';
|
|
10
|
-
import { TuiDay, TuiTime, TuiValueTransformer, TUI_IS_MOBILE, tuiControlValue, tuiIsPresent, tuiMarkControlAsTouchedAndValidate, tuiIsFalsy, TuiAutoFocus, TuiRepeatTimes, TuiHovered, TuiDayRange, TuiMonth, tuiPure, tuiProvide, TuiValidationError, TUI_WINDOW_SIZE, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
10
|
+
import { TuiDay, TuiTime, TuiValueTransformer, TUI_IS_MOBILE, tuiControlValue, tuiIsPresent, tuiMarkControlAsTouchedAndValidate, tuiIsFalsy, TuiAutoFocus, TuiRepeatTimes, TuiHovered, TuiDayRange, TuiMonth, tuiPure, tuiProvide, TuiValidationError, tuiClamp, TUI_WINDOW_SIZE, TUI_TRUE_HANDLER } from '@taiga-ui/cdk';
|
|
11
11
|
import * as i2$1 from '@taiga-ui/kit';
|
|
12
|
-
import { TUI_DATE_VALUE_TRANSFORMER, TuiPreview, TuiAvatar, TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiSortCountriesPipe, TuiStepper, TuiCarousel, TuiPush, TuiCheckbox, TuiFiles, TuiChip, TuiInputNumber, TuiBadge, TuiTooltip, TuiHighlight, TuiLineClamp, TuiFade, TuiRange, tuiInputNumberOptionsProvider, TuiDataListWrapperComponent, TuiChevron, TuiSelect, TuiInputSlider, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree, TuiPreviewDialogService, tuiFilesAccepted, TuiInputFiles, TuiInputFilesDirective, TuiFilesComponent, TuiFile, TuiFileRejectedPipe, TUI_CONFIRM, tuiItemsHandlersProvider as tuiItemsHandlersProvider$1,
|
|
12
|
+
import { TUI_DATE_VALUE_TRANSFORMER, TuiPreview, TuiAvatar, TuiAccordionItem, TuiElasticContainer, TuiAccordion, TuiFieldErrorPipe, TuiFilterByInputPipe, TuiStringifyContentPipe, TuiDataListWrapper, TuiButtonLoading, TuiSortCountriesPipe, TuiStepper, TuiCarousel, TuiPush, TuiCheckbox, TuiFiles, TuiChip, TuiInputNumber, TuiBadge, TuiTooltip, TuiHighlight, TuiLineClamp, TuiFade, TuiRange, tuiInputNumberOptionsProvider, TuiDataListWrapperComponent, TuiChevron, TuiSelect, TuiInputSlider, TuiTreeService, TuiTreeItemContent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTree, TuiPreviewDialogService, tuiFilesAccepted, TuiInputFiles, TuiInputFilesDirective, TuiFilesComponent, TuiFile, TuiFileRejectedPipe, TUI_CONFIRM, tuiItemsHandlersProvider as tuiItemsHandlersProvider$1, TUI_PAGINATION_TEXTS, TuiAccordionDirective, TuiAccordionItemContent } from '@taiga-ui/kit';
|
|
13
13
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
14
14
|
import * as i1$1 from '@angular/forms';
|
|
15
15
|
import { FormControl, FormGroupDirective, NgControl, FormGroup, Validators, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
16
16
|
import * as i1$2 from '@taiga-ui/core';
|
|
17
|
-
import { TuiButton, TuiDialog, TuiDialogService, TuiLink, TuiFallbackSrcPipe, TuiInitialsPipe, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TUI_DATA_LIST_HOST, tuiDropdownOptionsProvider, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiTextfield, TuiTitle, TuiNumberFormat, TuiHint, TUI_MONTHS, TuiScrollbar, tuiNumberFormatProvider, tuiItemsHandlersProvider, tuiTextfieldOptionsProvider, tuiHintOptionsProvider, TuiFormatNumberPipe, TuiHintDriver, TuiHintHover, TuiHintPosition, TuiHintDirective, TuiDataListComponent, TuiOption, TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TuiSurface, tuiFadeIn } from '@taiga-ui/core';
|
|
17
|
+
import { TuiButton, TuiDialog, TuiDialogService, TuiLink, TuiFallbackSrcPipe, TuiInitialsPipe, TuiIcon, TuiAppearance, TuiWithAppearance, TuiIcons, TuiWithIcons, TUI_DATA_LIST_HOST, tuiDropdownOptionsProvider, TuiLabel, TuiError, TuiLoader, TuiDataList, TuiNotification, TuiTextfield, TuiTitle, TuiNumberFormat, TuiHint, TUI_MONTHS, TuiScrollbar, tuiNumberFormatProvider, tuiItemsHandlersProvider, tuiTextfieldOptionsProvider, tuiHintOptionsProvider, TuiFormatNumberPipe, TuiHintDriver, TuiHintHover, TuiHintPosition, TuiHintDirective, TuiDataListComponent, TuiOption, TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TUI_SPIN_ICONS, TuiSurface, tuiFadeIn } from '@taiga-ui/core';
|
|
18
18
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
19
19
|
import * as i4 from '@taiga-ui/legacy/components/primitive-textfield';
|
|
20
20
|
import * as i3 from '@taiga-ui/legacy';
|
|
@@ -9454,6 +9454,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
9454
9454
|
}]
|
|
9455
9455
|
}] });
|
|
9456
9456
|
|
|
9457
|
+
/**
|
|
9458
|
+
* Наименование query-параметра идентификатора группы часто задаваемых вопросов.
|
|
9459
|
+
*/
|
|
9460
|
+
const SC_FAQ_GROUP_QUERY_PARAM = 'group';
|
|
9461
|
+
/**
|
|
9462
|
+
* Наименование query-параметра номера страницы пагинации часто задаваемых вопросов.
|
|
9463
|
+
*/
|
|
9464
|
+
const SC_FAQ_PAGE_QUERY_PARAM = 'page';
|
|
9465
|
+
|
|
9457
9466
|
/**
|
|
9458
9467
|
* Компонент часто задаваемых вопросов.
|
|
9459
9468
|
*/
|
|
@@ -9496,48 +9505,178 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
9496
9505
|
], host: { ngSkipHydration: 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader\n [showLoader]=\"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);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"] }]
|
|
9497
9506
|
}] });
|
|
9498
9507
|
|
|
9508
|
+
/**
|
|
9509
|
+
* Возвращает query-параметры ссылки на группу часто задаваемых вопросов.
|
|
9510
|
+
*
|
|
9511
|
+
* При смене группы пагинация сбрасывается на первую страницу.
|
|
9512
|
+
*
|
|
9513
|
+
* @param group Группа вопросов.
|
|
9514
|
+
*/
|
|
9515
|
+
const scGetFaqGroupQueryParams = (group) => ({
|
|
9516
|
+
[SC_FAQ_GROUP_QUERY_PARAM]: group.id ?? null,
|
|
9517
|
+
[SC_FAQ_PAGE_QUERY_PARAM]: null,
|
|
9518
|
+
});
|
|
9519
|
+
|
|
9499
9520
|
/**
|
|
9500
9521
|
* Компонент выбора группы часто задаваемых вопросов.
|
|
9522
|
+
*
|
|
9523
|
+
* TODO: [TAIGA:5]: Заменить legacy tui-select и tuiItemsHandlersProvider на актуальные аналоги.
|
|
9501
9524
|
*/
|
|
9502
9525
|
class ScFrequentlyAskedQuestionsGroupSelectorComponent {
|
|
9526
|
+
/**
|
|
9527
|
+
* Инициализирует экземпляр класса {@link ScFrequentlyAskedQuestionsGroupSelectorComponent}.
|
|
9528
|
+
*/
|
|
9503
9529
|
constructor() {
|
|
9530
|
+
/**
|
|
9531
|
+
* Сервис маршрутизации.
|
|
9532
|
+
*/
|
|
9533
|
+
this.router = inject(Router);
|
|
9534
|
+
/**
|
|
9535
|
+
* Активный маршрут.
|
|
9536
|
+
*/
|
|
9537
|
+
this.route = inject(ActivatedRoute);
|
|
9504
9538
|
/**
|
|
9505
9539
|
* {@link Observable} списка группы часто задаваемых вопросов.
|
|
9506
9540
|
*/
|
|
9507
|
-
this.groups$ = inject(ScFrequentlyAskedQuestionsService).groups
|
|
9508
|
-
if (groups.length > 0) {
|
|
9509
|
-
this.groupControl.setValue(groups[0]);
|
|
9510
|
-
}
|
|
9511
|
-
}));
|
|
9541
|
+
this.groups$ = inject(ScFrequentlyAskedQuestionsService).groups$;
|
|
9512
9542
|
/**
|
|
9513
9543
|
* {@link FormControl} выбранной группы.
|
|
9514
9544
|
*/
|
|
9515
9545
|
this.groupControl = new FormControl(null);
|
|
9516
9546
|
/**
|
|
9517
|
-
* {@link
|
|
9547
|
+
* {@link InputSignal} идентификатора выбранной группы.
|
|
9518
9548
|
*/
|
|
9519
|
-
this.
|
|
9520
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
9521
|
-
map((group) => group.id)));
|
|
9549
|
+
this.selectedGroupId = input(null);
|
|
9522
9550
|
/**
|
|
9523
9551
|
* Формат отображения. 'list' - в виде списка, 'select' в виде выпадающего списка.
|
|
9524
9552
|
*/
|
|
9525
9553
|
this.viewMode = input('list');
|
|
9554
|
+
/**
|
|
9555
|
+
* Возвращает query-параметры ссылки на группу вопросов.
|
|
9556
|
+
*/
|
|
9557
|
+
this.getGroupQueryParams = scGetFaqGroupQueryParams;
|
|
9558
|
+
// Синхронизирует значение выпадающего списка с выбранной группой.
|
|
9559
|
+
combineLatest([this.groups$, toObservable(this.selectedGroupId)])
|
|
9560
|
+
.pipe(takeUntilDestroyed())
|
|
9561
|
+
.subscribe(([groups, selectedGroupId]) => {
|
|
9562
|
+
this.groupControl.setValue(groups.find((group) => (group.id ?? null) === selectedGroupId) ?? null, { emitEvent: false });
|
|
9563
|
+
});
|
|
9564
|
+
// Выбор группы в выпадающем списке переводит на адрес этой группы.
|
|
9565
|
+
this.groupControl.valueChanges.pipe(filter(tuiIsPresent), takeUntilDestroyed()).subscribe((group) => {
|
|
9566
|
+
this.router
|
|
9567
|
+
.navigate([], {
|
|
9568
|
+
relativeTo: this.route,
|
|
9569
|
+
queryParams: this.getGroupQueryParams(group),
|
|
9570
|
+
queryParamsHandling: 'merge',
|
|
9571
|
+
})
|
|
9572
|
+
.catch(noop);
|
|
9573
|
+
});
|
|
9526
9574
|
}
|
|
9527
9575
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsGroupSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9528
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScFrequentlyAskedQuestionsGroupSelectorComponent, isStandalone: true, selector: "sc-frequently-asked-questions-group-selector", inputs: {
|
|
9576
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScFrequentlyAskedQuestionsGroupSelectorComponent, isStandalone: true, selector: "sc-frequently-asked-questions-group-selector", inputs: { selectedGroupId: { classPropertyName: "selectedGroupId", publicName: "selectedGroupId", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
9529
9577
|
tuiItemsHandlersProvider$1({
|
|
9530
9578
|
stringify: (item) => item.name,
|
|
9531
9579
|
}),
|
|
9532
|
-
], ngImport: i0, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n <
|
|
9580
|
+
], ngImport: i0, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n @let isSelected = item.id === selectedGroupId();\n\n <a\n tuiButton\n size=\"xs\"\n [tuiAppearanceState]=\"isSelected ? 'hover' : null\"\n [attr.aria-current]=\"isSelected ? 'page' : null\"\n [class.pointer-events-none]=\"isSelected\"\n [routerLink]=\"[]\"\n [queryParams]=\"getGroupQueryParams(item)\"\n queryParamsHandling=\"merge\"\n appearance=\"flat-grayscale\"\n class=\"!justify-start !text-body-s-bold\"\n >\n {{ item.name }}\n </a>\n }\n </div>\n </div>\n }\n\n @case ('select') {\n <form>\n <tui-select\n [formControl]=\"groupControl\"\n [tuiTextfieldLabelOutside]=\"true\"\n >\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"groups\"\n />\n </tui-select>\n </form>\n }\n }\n}\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i3.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i3.TuiSelectDirective, selector: "tui-select" }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i3$3.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i3.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9533
9581
|
}
|
|
9534
9582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsGroupSelectorComponent, decorators: [{
|
|
9535
9583
|
type: Component,
|
|
9536
|
-
args: [{ standalone: true, selector: 'sc-frequently-asked-questions-group-selector', imports: [AsyncPipe, TuiSelectModule, TuiTextfieldControllerModule, ReactiveFormsModule, TuiDataList, TuiDataListWrapper, NgIf, TuiButton, FormsModule], providers: [
|
|
9584
|
+
args: [{ standalone: true, selector: 'sc-frequently-asked-questions-group-selector', imports: [AsyncPipe, TuiSelectModule, TuiTextfieldControllerModule, ReactiveFormsModule, TuiDataList, TuiDataListWrapper, NgIf, TuiButton, FormsModule, RouterLink], providers: [
|
|
9537
9585
|
tuiItemsHandlersProvider$1({
|
|
9538
9586
|
stringify: (item) => item.name,
|
|
9539
9587
|
}),
|
|
9540
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n <
|
|
9588
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let groups = groups$ | async;\n\n@if (groups && groups.length) {\n @switch (viewMode()) {\n @case ('list') {\n <div class=\"flex flex-col items-center gap-3 rounded-xl p-4 shadow-sc\">\n <div class=\"flex w-full flex-col gap-2\">\n @for (item of groups; track $index) {\n @let isSelected = item.id === selectedGroupId();\n\n <a\n tuiButton\n size=\"xs\"\n [tuiAppearanceState]=\"isSelected ? 'hover' : null\"\n [attr.aria-current]=\"isSelected ? 'page' : null\"\n [class.pointer-events-none]=\"isSelected\"\n [routerLink]=\"[]\"\n [queryParams]=\"getGroupQueryParams(item)\"\n queryParamsHandling=\"merge\"\n appearance=\"flat-grayscale\"\n class=\"!justify-start !text-body-s-bold\"\n >\n {{ item.name }}\n </a>\n }\n </div>\n </div>\n }\n\n @case ('select') {\n <form>\n <tui-select\n [formControl]=\"groupControl\"\n [tuiTextfieldLabelOutside]=\"true\"\n >\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"groups\"\n />\n </tui-select>\n </form>\n }\n }\n}\n" }]
|
|
9589
|
+
}], ctorParameters: () => [] });
|
|
9590
|
+
|
|
9591
|
+
/**
|
|
9592
|
+
* Компонент пагинации, в котором страницы являются ссылками с номером страницы в query-параметрах.
|
|
9593
|
+
*
|
|
9594
|
+
* Ссылки позволяют переходить между страницами при отключенном JavaScript и корректно работают при SSR.
|
|
9595
|
+
* Внешний вид повторяет tui-pagination из @taiga-ui/kit.
|
|
9596
|
+
*
|
|
9597
|
+
* TODO: [TAIGA:5]: Проверить, появилась ли в tui-pagination поддержка ссылок, и заменить компонент на неё.
|
|
9598
|
+
*/
|
|
9599
|
+
class ScPaginationLinksComponent {
|
|
9600
|
+
constructor() {
|
|
9601
|
+
/**
|
|
9602
|
+
* Иконки стрелок переключения страниц.
|
|
9603
|
+
*/
|
|
9604
|
+
this.icons = inject(TUI_SPIN_ICONS);
|
|
9605
|
+
/**
|
|
9606
|
+
* {@link Observable} подписей стрелок переключения страниц.
|
|
9607
|
+
*/
|
|
9608
|
+
this.texts$ = inject(TUI_PAGINATION_TEXTS);
|
|
9609
|
+
/**
|
|
9610
|
+
* {@link InputSignal} общего количества страниц.
|
|
9611
|
+
*/
|
|
9612
|
+
this.length = input.required();
|
|
9613
|
+
/**
|
|
9614
|
+
* {@link InputSignal} номера текущей страницы, начиная с единицы.
|
|
9615
|
+
*/
|
|
9616
|
+
this.index = input.required();
|
|
9617
|
+
/**
|
|
9618
|
+
* {@link InputSignal} наименования query-параметра, в котором хранится номер страницы.
|
|
9619
|
+
*/
|
|
9620
|
+
this.queryParam = input('page');
|
|
9621
|
+
/**
|
|
9622
|
+
* {@link InputSignal} количества страниц, отображаемых по обе стороны от текущей.
|
|
9623
|
+
*/
|
|
9624
|
+
this.activePadding = input(1);
|
|
9625
|
+
/**
|
|
9626
|
+
* {@link InputSignal} количества страниц, отображаемых по краям.
|
|
9627
|
+
*/
|
|
9628
|
+
this.sidePadding = input(1);
|
|
9629
|
+
/**
|
|
9630
|
+
* {@link Signal} номеров отображаемых страниц, где `null` - разделитель пропущенных страниц.
|
|
9631
|
+
*
|
|
9632
|
+
* Состав страниц рассчитывается так же, как в tui-pagination: количество отображаемых элементов постоянно,
|
|
9633
|
+
* а окно вокруг текущей страницы расширяется у краёв списка.
|
|
9634
|
+
*/
|
|
9635
|
+
this.pages = computed(() => {
|
|
9636
|
+
const length = this.length();
|
|
9637
|
+
const sidePadding = this.sidePadding();
|
|
9638
|
+
// Половина элементов: страницы у края, разделитель и страницы вокруг текущей.
|
|
9639
|
+
const maxHalfLength = sidePadding + 1 + this.activePadding();
|
|
9640
|
+
const maxElementsLength = maxHalfLength * 2 + 1;
|
|
9641
|
+
const elementsLength = Math.min(length, maxElementsLength);
|
|
9642
|
+
const lastIndex = length - 1;
|
|
9643
|
+
const index = this.index() - 1;
|
|
9644
|
+
const reverseIndex = lastIndex - index;
|
|
9645
|
+
const hasCollapsedItems = (value) => length > maxElementsLength && value > maxHalfLength;
|
|
9646
|
+
return Array.from({ length: elementsLength }, (_, elementIndex) => {
|
|
9647
|
+
const reverseElementIndex = elementsLength - 1 - elementIndex;
|
|
9648
|
+
if (elementIndex < sidePadding) {
|
|
9649
|
+
return elementIndex + 1;
|
|
9650
|
+
}
|
|
9651
|
+
if (elementIndex === sidePadding && hasCollapsedItems(index)) {
|
|
9652
|
+
return null;
|
|
9653
|
+
}
|
|
9654
|
+
if (reverseElementIndex < sidePadding) {
|
|
9655
|
+
return lastIndex - reverseElementIndex + 1;
|
|
9656
|
+
}
|
|
9657
|
+
if (reverseElementIndex === sidePadding && hasCollapsedItems(reverseIndex)) {
|
|
9658
|
+
return null;
|
|
9659
|
+
}
|
|
9660
|
+
return tuiClamp(index - maxHalfLength + elementIndex, elementIndex, lastIndex - reverseElementIndex) + 1;
|
|
9661
|
+
});
|
|
9662
|
+
});
|
|
9663
|
+
}
|
|
9664
|
+
/**
|
|
9665
|
+
* Возвращает query-параметры ссылки на страницу.
|
|
9666
|
+
*
|
|
9667
|
+
* Для первой страницы параметр удаляется, чтобы её адрес совпадал с адресом страницы без пагинации.
|
|
9668
|
+
*
|
|
9669
|
+
* @param page Номер страницы.
|
|
9670
|
+
*/
|
|
9671
|
+
getPageQueryParams(page) {
|
|
9672
|
+
return { [this.queryParam()]: page > 1 ? page : null };
|
|
9673
|
+
}
|
|
9674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScPaginationLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScPaginationLinksComponent, isStandalone: true, selector: "sc-pagination-links", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, queryParam: { classPropertyName: "queryParam", publicName: "queryParam", isSignal: true, isRequired: false, transformFunction: null }, activePadding: { classPropertyName: "activePadding", publicName: "activePadding", isSignal: true, isRequired: false, transformFunction: null }, sidePadding: { classPropertyName: "sidePadding", publicName: "sidePadding", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let texts = texts$ | async;\n\n@if (texts) {\n <div class=\"t-content\">\n @if (index() > 1) {\n <a\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.decrement\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(index() - 1)\"\n queryParamsHandling=\"merge\"\n >\n {{ texts[0] }}\n </a>\n } @else {\n <button\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n type=\"button\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.decrement\"\n [disabled]=\"true\"\n >\n {{ texts[0] }}\n </button>\n }\n\n @for (page of pages(); track $index) {\n @if (page) {\n <a\n automation-id=\"sc-pagination-links__element\"\n tuiButton\n size=\"s\"\n class=\"t-button\"\n [appearance]=\"page === index() ? 'primary' : 'flat'\"\n [attr.aria-current]=\"page === index() ? 'page' : null\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(page)\"\n queryParamsHandling=\"merge\"\n >\n {{ page }}\n </a>\n } @else {\n <div class=\"t-dots\"></div>\n }\n }\n\n @if (index() < length()) {\n <a\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.increment\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(index() + 1)\"\n queryParamsHandling=\"merge\"\n >\n {{ texts[1] }}\n </a>\n } @else {\n <button\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n type=\"button\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.increment\"\n [disabled]=\"true\"\n >\n {{ texts[1] }}\n </button>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);text-align:center}.t-content{display:flex;justify-content:center}.t-button{flex-shrink:0;margin:0 .125rem}.t-button[tuiButton]{min-inline-size:var(--tui-height-s);padding:0 .5rem}.t-button:first-child{margin-inline-start:0}.t-button:last-child{margin-inline-end:0}.t-dots{flex-shrink:0;inline-size:var(--tui-height-s);block-size:var(--tui-height-s);line-height:var(--tui-height-s);margin:0 .125rem;color:var(--tui-text-action);text-align:center;cursor:default}.t-dots:before{content:\"\\2026\"}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9676
|
+
}
|
|
9677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScPaginationLinksComponent, decorators: [{
|
|
9678
|
+
type: Component,
|
|
9679
|
+
args: [{ standalone: true, selector: 'sc-pagination-links', imports: [AsyncPipe, RouterLink, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let texts = texts$ | async;\n\n@if (texts) {\n <div class=\"t-content\">\n @if (index() > 1) {\n <a\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.decrement\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(index() - 1)\"\n queryParamsHandling=\"merge\"\n >\n {{ texts[0] }}\n </a>\n } @else {\n <button\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n type=\"button\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.decrement\"\n [disabled]=\"true\"\n >\n {{ texts[0] }}\n </button>\n }\n\n @for (page of pages(); track $index) {\n @if (page) {\n <a\n automation-id=\"sc-pagination-links__element\"\n tuiButton\n size=\"s\"\n class=\"t-button\"\n [appearance]=\"page === index() ? 'primary' : 'flat'\"\n [attr.aria-current]=\"page === index() ? 'page' : null\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(page)\"\n queryParamsHandling=\"merge\"\n >\n {{ page }}\n </a>\n } @else {\n <div class=\"t-dots\"></div>\n }\n }\n\n @if (index() < length()) {\n <a\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.increment\"\n [routerLink]=\"[]\"\n [queryParams]=\"getPageQueryParams(index() + 1)\"\n queryParamsHandling=\"merge\"\n >\n {{ texts[1] }}\n </a>\n } @else {\n <button\n tuiIconButton\n size=\"s\"\n appearance=\"flat\"\n type=\"button\"\n tabIndex=\"-1\"\n class=\"t-button\"\n [iconStart]=\"icons.increment\"\n [disabled]=\"true\"\n >\n {{ texts[1] }}\n </button>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);text-align:center}.t-content{display:flex;justify-content:center}.t-button{flex-shrink:0;margin:0 .125rem}.t-button[tuiButton]{min-inline-size:var(--tui-height-s);padding:0 .5rem}.t-button:first-child{margin-inline-start:0}.t-button:last-child{margin-inline-end:0}.t-dots{flex-shrink:0;inline-size:var(--tui-height-s);block-size:var(--tui-height-s);line-height:var(--tui-height-s);margin:0 .125rem;color:var(--tui-text-action);text-align:center;cursor:default}.t-dots:before{content:\"\\2026\"}\n"] }]
|
|
9541
9680
|
}] });
|
|
9542
9681
|
|
|
9543
9682
|
/**
|
|
@@ -9572,6 +9711,14 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9572
9711
|
* Сервис маршрутизации.
|
|
9573
9712
|
*/
|
|
9574
9713
|
this.router = inject(Router);
|
|
9714
|
+
/**
|
|
9715
|
+
* Активный маршрут.
|
|
9716
|
+
*/
|
|
9717
|
+
this.route = inject(ActivatedRoute);
|
|
9718
|
+
/**
|
|
9719
|
+
* Признак, что приложение запущено на сервере.
|
|
9720
|
+
*/
|
|
9721
|
+
this.isServer = inject(IS_SERVER);
|
|
9575
9722
|
/**
|
|
9576
9723
|
* Индекс первой страницы.
|
|
9577
9724
|
*/
|
|
@@ -9585,13 +9732,15 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9585
9732
|
*/
|
|
9586
9733
|
this.perPage$ = new BehaviorSubject(this.pageSizeOptions[0]);
|
|
9587
9734
|
/**
|
|
9588
|
-
* {@link
|
|
9735
|
+
* {@link Observable} изменения номера страницы пагинации из query-параметров.
|
|
9589
9736
|
*/
|
|
9590
|
-
this.page$ =
|
|
9737
|
+
this.page$ = this.route.queryParamMap.pipe(map((params) => Number(params.get(SC_FAQ_PAGE_QUERY_PARAM)) || this.firstPageIndex), distinctUntilChanged());
|
|
9591
9738
|
/**
|
|
9592
|
-
* {@link
|
|
9739
|
+
* {@link Observable} изменения идентификатора выбранной группы.
|
|
9740
|
+
*
|
|
9741
|
+
* Идентификатор берётся из query-параметров, а если параметр не задан - используется первая группа списка.
|
|
9593
9742
|
*/
|
|
9594
|
-
this.groupId$ =
|
|
9743
|
+
this.groupId$ = combineLatest([this.route.queryParamMap, this.frequentlyAskedQuestionsService.groups$]).pipe(map(([params, groups]) => Number(params.get(SC_FAQ_GROUP_QUERY_PARAM)) || (groups[0]?.id ?? null)), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
|
|
9595
9744
|
/**
|
|
9596
9745
|
* Сигнал нажатия на кнопку "Задать вопрос".
|
|
9597
9746
|
*/
|
|
@@ -9602,7 +9751,7 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9602
9751
|
this.request$ = combineLatest({
|
|
9603
9752
|
page: this.page$,
|
|
9604
9753
|
perPage: this.perPage$,
|
|
9605
|
-
group: this.groupId
|
|
9754
|
+
group: this.groupId$.pipe(filter(tuiIsPresent)),
|
|
9606
9755
|
paginate: of(true),
|
|
9607
9756
|
}).pipe(
|
|
9608
9757
|
// Нулевой debounceTime для случая, когда меняются направление и поле сортировки одновременно.
|
|
@@ -9621,7 +9770,7 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9621
9770
|
/**
|
|
9622
9771
|
* {@link Observable} изменения номера страницы пагинации из данных пагинации запроса.
|
|
9623
9772
|
*/
|
|
9624
|
-
this.currentPage$ = this.request$.pipe(filter(tuiIsPresent), map(({ meta }) => meta.currentPage
|
|
9773
|
+
this.currentPage$ = this.request$.pipe(filter(tuiIsPresent), map(({ meta }) => meta.currentPage));
|
|
9625
9774
|
/**
|
|
9626
9775
|
* {@link Observable} изменения состояния загрузки данных.
|
|
9627
9776
|
*/
|
|
@@ -9633,31 +9782,20 @@ class ScFrequentlyAskedQuestionsWithGroupsComponent {
|
|
|
9633
9782
|
/**
|
|
9634
9783
|
* {@link Observable} изменения формата отображения фильтра групп.
|
|
9635
9784
|
*/
|
|
9636
|
-
this.viewMode$ =
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
paginationChange(pageIndex) {
|
|
9644
|
-
this.page$.next(pageIndex + 1);
|
|
9645
|
-
}
|
|
9646
|
-
/**
|
|
9647
|
-
* Устанавливает идентификатор группы.
|
|
9648
|
-
*
|
|
9649
|
-
* @param id Идентификатор группы.
|
|
9650
|
-
*/
|
|
9651
|
-
groupIdChange(id) {
|
|
9652
|
-
this.groupId$.next(id);
|
|
9653
|
-
this.paginationChange(0);
|
|
9785
|
+
this.viewMode$ = this.isServer
|
|
9786
|
+
? of('list')
|
|
9787
|
+
: inject(TUI_WINDOW_SIZE).pipe(map((rect) => (rect.width > 768 ? 'list' : 'select')));
|
|
9788
|
+
/**
|
|
9789
|
+
* Наименование query-параметра номера страницы пагинации.
|
|
9790
|
+
*/
|
|
9791
|
+
this.pageQueryParam = SC_FAQ_PAGE_QUERY_PARAM;
|
|
9654
9792
|
}
|
|
9655
9793
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsWithGroupsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9656
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScFrequentlyAskedQuestionsWithGroupsComponent, isStandalone: true, selector: "sc-frequently-asked-questions-with-groups", outputs: { clickSendQuestion: "clickSendQuestion" }, ngImport: i0, template: "@let items = data$ | async;\n@let pageCount = pageCount$ | async;\n@let viewMode = viewMode$ | async;\n\n<div\n *ngIf=\"viewMode\"\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
|
|
9794
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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<div\n *ngIf=\"viewMode\"\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\n <button\n *ngIf=\"viewMode === 'list'\"\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 </div>\n\n <div class=\"grow\">\n @if (items && items.length) {\n <sc-frequently-asked-questions\n [items]=\"items\"\n [showLoading]=\"isLoading()\"\n />\n\n <sc-pagination-links\n *ngIf=\"pageCount && pageCount > 1\"\n [length]=\"pageCount\"\n [index]=\"(currentPage$ | async) ?? 1\"\n [queryParam]=\"pageQueryParam\"\n class=\"mt-4\"\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", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9657
9795
|
}
|
|
9658
9796
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScFrequentlyAskedQuestionsWithGroupsComponent, decorators: [{
|
|
9659
9797
|
type: Component,
|
|
9660
|
-
args: [{ standalone: true, selector: 'sc-frequently-asked-questions-with-groups', imports: [AsyncPipe, NgIf, ScFrequentlyAskedQuestionsGroupSelectorComponent, TuiButton, ScFrequentlyAskedQuestionsComponent,
|
|
9798
|
+
args: [{ standalone: true, selector: 'sc-frequently-asked-questions-with-groups', imports: [AsyncPipe, NgIf, ScFrequentlyAskedQuestionsGroupSelectorComponent, TuiButton, ScFrequentlyAskedQuestionsComponent, ScPaginationLinksComponent], host: { ngSkipHydration: 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let items = data$ | async;\n@let pageCount = pageCount$ | async;\n@let viewMode = viewMode$ | async;\n\n<div\n *ngIf=\"viewMode\"\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\n <button\n *ngIf=\"viewMode === 'list'\"\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 </div>\n\n <div class=\"grow\">\n @if (items && items.length) {\n <sc-frequently-asked-questions\n [items]=\"items\"\n [showLoading]=\"isLoading()\"\n />\n\n <sc-pagination-links\n *ngIf=\"pageCount && pageCount > 1\"\n [length]=\"pageCount\"\n [index]=\"(currentPage$ | async) ?? 1\"\n [queryParam]=\"pageQueryParam\"\n class=\"mt-4\"\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" }]
|
|
9661
9799
|
}] });
|
|
9662
9800
|
|
|
9663
9801
|
/**
|
|
@@ -10819,5 +10957,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
10819
10957
|
* Generated bundle index. Do not edit.
|
|
10820
10958
|
*/
|
|
10821
10959
|
|
|
10822
|
-
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FilesAndDocumentsModule, 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, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCatalogFilterCollapsibleComponent, ScCatalogFiltersComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScDraftComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderDirectionItemsComponent, ScOrderFormComponent, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScOrderModule, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrintDirective, ScPrintService, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScPublicOfferComponent, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSandwichComponent, ScSandwichM2Component, ScSandwichM2SkeletonComponent, ScSandwichSkeletonComponent, ScSelectOnFocusinDirective, ScSeoTagsComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, cleanupRecaptchaArtifacts, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scGetCurrentRoute, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
10960
|
+
export { AbstractScPriceCard, AuthMethod, CURRENT_COUNTRY_ID, CostWithDiscountComponent, FilesAndDocumentsComponent, FilesAndDocumentsModule, 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_PAGE_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, ScAccordionModule, ScAddContactDialogComponent, ScAddContragentBankAccountsDialogComponent, ScAddContragentDialogComponent, ScAddDeliveryAddressDialogComponent, ScAddOrEditingCartItemDialogComponent, ScAddOrEditingCartItemFormComponent, ScAddressesSelectionFieldComponent, ScAuthModule, ScBannerComponent, ScBannerModule, ScBrandsListComponent, ScBrandsListModule, ScCartAddProductsFromCsvDialogComponent, ScCatalogFilterCollapsibleComponent, ScCatalogFiltersComponent, ScCatalogModule, ScCategoryCardComponent, ScContactsAccordionComponent, ScContactsModule, ScContragentsAccordionComponent, ScContragentsAccordionItemComponent, ScContragentsModule, ScDeliveryAddressAccordionComponent, ScDeliveryAddressAccordionItemComponent, ScDeliveryAddressModule, ScDownloadPriceListComponent, ScDraftComponent, ScEmailLinkDirective, ScErrorBlockStatusComponent, ScErrorHandlerComponent, ScFavoriteButtonComponent, ScFeedbackFormComponent, ScFocusFirstInvalidFieldDirective, ScFormFieldsModule, ScFormatDatePipe, ScFrequentlyAskedQuestionsComponent, ScFrequentlyAskedQuestionsGroupSelectorComponent, ScFrequentlyAskedQuestionsWithGroupsComponent, ScGratitudeComponent, ScHelpNotificationService, ScHoverImageCarouselComponent, ScInputQuantityComponent, ScLinks, ScManagerCardComponent, ScManagerCardPushComponent, ScNewContactFormComponent, ScNewContragentBankAccountsFormComponent, ScNewContragentFormComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScNextInputFocusDirective, ScNextInputFocusModule, ScNoindexDirective, ScNoindexWrapperComponent, ScNotifyWhenInStockDialogComponent, ScOrderAccessorDirective, ScOrderDirectionItemsComponent, ScOrderFormComponent, ScOrderItemComponent, ScOrderItemsByDirection, ScOrderItemsListByDirectionsComponent, ScOrderItemsListByStockComponent, ScOrderItemsListComponent, ScOrderModule, ScPaginationLinksComponent, ScPaymentStatusComponent, ScPersonalDataProcessingPolicyComponent, ScPhoneFormatPipe, ScPreviewSampleComponent, ScPreviewSampleModule, ScPreviewSamplesMosquitoComponent, ScPriceCardComponent, ScPriceCardInlineComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScPrintDirective, ScPrintService, ScPrivacyPolicyComponent, ScProductInAllWarehousesPipe, ScProfileAccordionsContentComponent, ScProfileModule, ScPublicOfferComponent, ScQRCodeDialogComponent, ScQRCodeModule, ScResetUserPasswordComponent, ScResourcePreviewComponent, ScSandwichComponent, ScSandwichM2Component, ScSandwichM2SkeletonComponent, ScSandwichSkeletonComponent, ScSelectOnFocusinDirective, ScSeoTagsComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, ScSignUpFormComponent, ScSimpleSignUpFormComponent, ScSuggestionFieldComponent, ScTelLinkDirective, ScTerminalLinkDirective, ScUpdateUserInfoDialogComponent, ScUserManagersComponent, ScUserModule, ScUserPhoneApproveDialogComponent, ScVerificationModule, ScVerificationPhoneCheckFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, cleanupRecaptchaArtifacts, phoneValidator, scAtLeastOneRequiredValidator, scBicValidator, scClientUiIconsName, scCorrespondentAccountValidator, scGetCurrentRoute, scGetFaqGroupQueryParams, scPasswordConfirmMatchingValidator, stepValidator, tuiDateValueTransformerDefaultProvider };
|
|
10823
10961
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|