@snabcentr/client-ui 0.5.2 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/catalog/index.d.ts +1 -0
- package/catalog/price-list-pagination/sc-price-list-pagination.component.d.ts +27 -0
- package/catalog/sc-catalog.module.d.ts +15 -13
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-email/sc-sign-in-form-by-email.component.mjs +3 -3
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form-by-phone/sc-sign-in-form-by-phone.component.mjs +3 -3
- package/esm2020/auth/sc-sign-in-form/sc-sign-in-form.component.mjs +3 -3
- package/esm2020/catalog/index.mjs +2 -1
- package/esm2020/catalog/price-list-pagination/sc-price-list-pagination.component.mjs +37 -0
- package/esm2020/catalog/sc-catalog.module.mjs +38 -6
- package/esm2020/providers/index.mjs +2 -0
- package/esm2020/providers/productsPagination.mjs +97 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/snabcentr-client-ui.mjs +173 -17
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +171 -17
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/index.d.ts +1 -0
- package/providers/productsPagination.d.ts +43 -0
- package/public-api.d.ts +1 -0
@@ -0,0 +1,97 @@
|
|
1
|
+
import { EventEmitter, InjectionToken } from '@angular/core';
|
2
|
+
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
3
|
+
import { ScCartService, ScCatalogService } from '@snabcentr/client-core';
|
4
|
+
import { TuiDestroyService, tuiCreateToken, tuiIsPresent } from '@taiga-ui/cdk';
|
5
|
+
import { Subject, debounceTime, filter, map, merge, scan, share, startWith, switchMap, takeUntil } from 'rxjs';
|
6
|
+
/**
|
7
|
+
* Значения пагинации списка товаров категории по умолчанию.
|
8
|
+
*/
|
9
|
+
export const SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS = {
|
10
|
+
perPage: 20,
|
11
|
+
page: 0,
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Токен значений пагинации списка товаров категории по умолчанию.
|
15
|
+
*/
|
16
|
+
export const SC_PRODUCT_PAGINATION_OPTIONS = tuiCreateToken(SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS);
|
17
|
+
/**
|
18
|
+
* {@link Subject} параметров пагинации списка товаров категории.
|
19
|
+
*/
|
20
|
+
export const paginationParams$ = new Subject();
|
21
|
+
/**
|
22
|
+
* Токен {@link Subject} параметров пагинации списка товаров категории для получения их из вне.
|
23
|
+
*/
|
24
|
+
export const SC_PRODUCT_PAGINATION_PARAMS = tuiCreateToken(paginationParams$);
|
25
|
+
/**
|
26
|
+
* Фабрика создания потока данных о товарах категории c пагинацией, включая данные о количестве этих товаров в корзине.
|
27
|
+
*
|
28
|
+
* @param catalogService Сервис для работы с каталогом.
|
29
|
+
* @param cartService Сервис для работы с корзиной.
|
30
|
+
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
31
|
+
*/
|
32
|
+
function productsPaginationChangeFactory({ paramMap }, catalogService, cartService, destroy$) {
|
33
|
+
return paramMap.pipe(map((params) => params.get('categoryId')), filter(tuiIsPresent), switchMap((categoryId) => paginationParams$.pipe(debounceTime(20), switchMap((paginationParams) => catalogService.getCategoryProducts$(Number(categoryId), paginationParams)), filter(tuiIsPresent), scan((acc, value) => {
|
34
|
+
if (acc && value && value.meta.currentPage > 1)
|
35
|
+
value.data.unshift(...acc.data);
|
36
|
+
return value;
|
37
|
+
}, null), switchMap((productsPaginate) => cartService.getCartChange$().pipe(map((cart) => {
|
38
|
+
productsPaginate?.data.forEach((product) => (product.cartItem = cart.items.find((cartItem) => cartItem.product.id === product.id)));
|
39
|
+
return productsPaginate;
|
40
|
+
}))), startWith(null))), share(), takeUntil(destroy$));
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Токен потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
|
44
|
+
*/
|
45
|
+
export const SC_PRODUCT_PAGINATION_CHANGE_INFO = new InjectionToken('SC_PRODUCT_PAGINATION_CHANGE_INFO');
|
46
|
+
/**
|
47
|
+
* {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
|
48
|
+
*/
|
49
|
+
export const nextPageClickEvent = new EventEmitter();
|
50
|
+
/**
|
51
|
+
* Токен {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
|
52
|
+
*/
|
53
|
+
export const SC_NEXT_PAGE_PAGINATION_CLICK = tuiCreateToken(nextPageClickEvent);
|
54
|
+
/**
|
55
|
+
* Фабрика создания потока данных о состоянии загрузки запроса списка товаров с пагинацией пагинации.
|
56
|
+
*/
|
57
|
+
function loadingPaginationFactory(productsData$, destroy$) {
|
58
|
+
return merge(paginationParams$.pipe(map(() => true)), productsData$.pipe(map((data) => data === null))).pipe(share(), takeUntil(destroy$));
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Токен потока данных о состоянии загрузки товаров пагинации.
|
62
|
+
*/
|
63
|
+
export const SC_LOADING_PAGINATION_CHANGE_INFO = new InjectionToken('SC_LOADING_PAGINATION_CHANGE_INFO');
|
64
|
+
/**
|
65
|
+
* Фабрика создания потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
|
66
|
+
*/
|
67
|
+
function nextPagePaginationChangeFactory({ events }, nextPagePaginationClick, productsData$, destroy$) {
|
68
|
+
return nextPagePaginationClick
|
69
|
+
.pipe(scan((acc) => ++acc, 1), startWith(1))
|
70
|
+
.pipe(takeUntil(merge(events.pipe(filter((e) => e instanceof NavigationEnd)), productsData$.pipe(filter((paginate) => paginate !== null && paginate.meta.currentPage >= paginate.meta.lastPage)), destroy$)));
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* Токен потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
|
74
|
+
*/
|
75
|
+
export const SC_NEXT_PAGE_PAGINATION_CHANGE_INFO = new InjectionToken('SC_NEXT_PAGE_PAGINATION_CHANGE_INFO');
|
76
|
+
/**
|
77
|
+
* Провайдеры потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
|
78
|
+
*/
|
79
|
+
export const SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS = [
|
80
|
+
TuiDestroyService,
|
81
|
+
{
|
82
|
+
provide: SC_PRODUCT_PAGINATION_CHANGE_INFO,
|
83
|
+
deps: [ActivatedRoute, ScCatalogService, ScCartService, TuiDestroyService],
|
84
|
+
useFactory: productsPaginationChangeFactory,
|
85
|
+
},
|
86
|
+
{
|
87
|
+
provide: SC_NEXT_PAGE_PAGINATION_CHANGE_INFO,
|
88
|
+
deps: [Router, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
89
|
+
useFactory: nextPagePaginationChangeFactory,
|
90
|
+
},
|
91
|
+
{
|
92
|
+
provide: SC_LOADING_PAGINATION_CHANGE_INFO,
|
93
|
+
deps: [SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
94
|
+
useFactory: loadingPaginationFactory,
|
95
|
+
},
|
96
|
+
];
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdHNQYWdpbmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXVpL3Byb3ZpZGVycy9wcm9kdWN0c1BhZ2luYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxjQUFjLEVBQVksTUFBTSxlQUFlLENBQUM7QUFDdkUsT0FBTyxFQUFFLGNBQWMsRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEUsT0FBTyxFQUFFLGFBQWEsRUFBRSxnQkFBZ0IsRUFBOEQsTUFBTSx3QkFBd0IsQ0FBQztBQUNySSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsY0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NlcnZhYmxlPG51bWJlcj4ge1xuICAgIHJldHVybiBuZXh0UGFnZVBhZ2luYXRpb25DbGlja1xuICAgICAgICAucGlwZShcbiAgICAgICAgICAgIHNjYW4oKGFjYykgPT4gKythY2MsIDEpLFxuICAgICAgICAgICAgc3RhcnRXaXRoKDEpXG4gICAgICAgIClcbiAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICB0YWtlVW50aWwoXG4gICAgICAgICAgICAgICAgbWVyZ2UoXG4gICAgICAgICAgICAgICAgICAgIGV2ZW50cy5waXBlKGZpbHRlcigoZSkgPT4gZSBpbnN0YW5jZW9mIE5hdmlnYXRpb25FbmQpKSxcbiAgICAgICAgICAgICAgICAgICAgcHJvZHVjdHNEYXRhJC5waXBlKGZpbHRlcigocGFnaW5hdGUpID0+IHBhZ2luYXRlICE9PSBudWxsICYmIHBhZ2luYXRlLm1ldGEuY3VycmVudFBhZ2UgPj0gcGFnaW5hdGUubWV0YS5sYXN0UGFnZSkpLFxuICAgICAgICAgICAgICAgICAgICBkZXN0cm95JFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgKTtcbn1cblxuLyoqXG4gKiAg0KLQvtC60LXQvSDQv9C+0YLQvtC60LAg0LTQsNC90L3Ri9GFINC/0YDQvtC60YDRg9GC0LrQuCDRgdGC0YDQsNC90LjRhtGLINGBINGB0LjQs9C90LDQu9Cw0LzQuCDQviDQvdC10L7QsdGF0L7QtNC40LzQvtGB0YLQuCDQv9Cw0LPQuNC90LDRhtC40Lgg0YLQvtCy0LDRgNCwLlxuICovXG5leHBvcnQgY29uc3QgU0NfTkVYVF9QQUdFX1BBR0lOQVRJT05fQ0hBTkdFX0lORk86IEluamVjdGlvblRva2VuPE9ic2VydmFibGU8bnVtYmVyPj4gPSBuZXcgSW5qZWN0aW9uVG9rZW48T2JzZXJ2YWJsZTxudW1iZXI+PignU0NfTkVYVF9QQUdFX1BBR0lOQVRJT05fQ0hBTkdFX0lORk8nKTtcblxuL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RJT05fQ0hBTkdFX0lORk8sIFR1aURlc3Ryb3lTZXJ2aWNlXSxcbiAgICAgICAgdXNlRmFjdG9yeTogbG9hZGluZ1BhZ2luYXRpb25GYWN0b3J5LFxuICAgIH0sXG5dO1xuIl19
|
package/esm2020/public-api.mjs
CHANGED
@@ -10,7 +10,8 @@ export * from './icons';
|
|
10
10
|
export * from './loader';
|
11
11
|
export * from './news';
|
12
12
|
export * from './order';
|
13
|
+
export * from './providers';
|
13
14
|
export * from './share-button';
|
14
15
|
export * from './validators';
|
15
16
|
export * from './tokens';
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC11aS9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxRQUFRLENBQUM7QUFDdkIsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxRQUFRLENBQUM7QUFDdkIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxRQUFRLENBQUM7QUFDdkIsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLFVBQVUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgdWlcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2F1dGgnO1xuZXhwb3J0ICogZnJvbSAnLi9iYW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9jYXJ0JztcbmV4cG9ydCAqIGZyb20gJy4vY2F0YWxvZyc7XG5leHBvcnQgKiBmcm9tICcuL2ZpbGVzJztcbmV4cG9ydCAqIGZyb20gJy4vaWNvbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9sb2FkZXInO1xuZXhwb3J0ICogZnJvbSAnLi9uZXdzJztcbmV4cG9ydCAqIGZyb20gJy4vb3JkZXInO1xuZXhwb3J0ICogZnJvbSAnLi9wcm92aWRlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zaGFyZS1idXR0b24nO1xuZXhwb3J0ICogZnJvbSAnLi92YWxpZGF0b3JzJztcbmV4cG9ydCAqIGZyb20gJy4vdG9rZW5zJztcbiJdfQ==
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input, NgModule, Injectable, ElementRef, Inject, ContentChildren, ViewChild, HostBinding, HostListener, ChangeDetectorRef, Optional, Self, inject, Directive, forwardRef } from '@angular/core';
|
3
|
-
import { Subject, filter, map, switchMap, catchError, of, startWith, share, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip } from 'rxjs';
|
2
|
+
import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input, NgModule, Injectable, ElementRef, Inject, ContentChildren, ViewChild, HostBinding, HostListener, ChangeDetectorRef, Optional, Self, inject, InjectionToken, Directive, forwardRef } from '@angular/core';
|
3
|
+
import { Subject, filter, map, switchMap, catchError, of, startWith, share, tap, finalize, timer, scan, takeWhile, endWith, distinctUntilChanged, shareReplay, interval, takeUntil, skip, debounceTime, merge } from 'rxjs';
|
4
4
|
import * as i1 from '@snabcentr/client-core';
|
5
|
-
import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScIconTypesEnum } from '@snabcentr/client-core';
|
5
|
+
import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScCatalogService, ScCartService, ScIconTypesEnum } from '@snabcentr/client-core';
|
6
6
|
import * as i3 from '@angular/common';
|
7
7
|
import { CommonModule, formatDate } from '@angular/common';
|
8
8
|
import * as i4 from '@taiga-ui/core';
|
@@ -10,7 +10,7 @@ import { TuiTextfieldControllerModule, TuiLinkModule, TuiButtonModule, TuiLabelM
|
|
10
10
|
import * as i3$1 from '@angular/forms';
|
11
11
|
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
12
12
|
import * as i7 from '@taiga-ui/cdk';
|
13
|
-
import { tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE } from '@taiga-ui/cdk';
|
13
|
+
import { tuiIsFalsy, TuiLetModule, tuiCreateToken, AbstractTuiNullableControl, TUI_IS_MOBILE, tuiIsPresent, TuiDestroyService } from '@taiga-ui/cdk';
|
14
14
|
import * as i3$2 from '@taiga-ui/kit';
|
15
15
|
import { TuiInputPasswordModule, TuiInputModule, TuiFieldErrorPipeModule, TuiInputPhoneModule, TuiCarouselModule, TUI_NUMBER_VALUE_TRANSFORMER, TuiInputNumberComponent, TuiIslandModule, TuiInputNumberModule, TuiElasticContainerModule, TuiTreeService, TuiTreeItemContentComponent, TUI_TREE_START, TUI_TREE_CONTENT, TUI_TREE_LOADING, TUI_TREE_LOADER, TuiTreeModule } from '@taiga-ui/kit';
|
16
16
|
import * as i7$1 from '@maskito/angular';
|
@@ -21,7 +21,7 @@ import * as i8 from '@ng-web-apis/intersection-observer';
|
|
21
21
|
import { IntersectionObserverService, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
|
22
22
|
import * as i5 from '@angular/material/core';
|
23
23
|
import { MatRippleModule } from '@angular/material/core';
|
24
|
-
import { RouterModule } from '@angular/router';
|
24
|
+
import { RouterModule, NavigationEnd, ActivatedRoute, Router } from '@angular/router';
|
25
25
|
import * as i7$2 from '@taiga-ui/addon-preview';
|
26
26
|
import { TuiPreviewDialogService, TuiPreviewModule } from '@taiga-ui/addon-preview';
|
27
27
|
import * as i8$1 from '@tinkoff/ng-polymorpheus';
|
@@ -180,10 +180,10 @@ class ScSignInFormByPhoneComponent {
|
|
180
180
|
}
|
181
181
|
}
|
182
182
|
ScSignInFormByPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, deps: [{ token: i1.ScAuthService }, { token: i1.ScVerificationService }], target: i0.ɵɵFactoryTarget.Component });
|
183
|
-
ScSignInFormByPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone", ngImport: i0, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i7.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i3$2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i3$2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7$1.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7$1.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
183
|
+
ScSignInFormByPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone", ngImport: i0, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n size=\"s\"\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n size=\"s\"\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "directive", type: i4.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i7.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: i4.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: i3$2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { kind: "directive", type: i3$2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "directive", type: i7$1.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: i7$1.MaskitoCva, selector: "input[maskito], textarea[maskito]", inputs: ["maskito"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
184
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByPhoneComponent, decorators: [{
|
185
185
|
type: Component,
|
186
|
-
args: [{ selector: 'sc-sign-in-form-by-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
|
186
|
+
args: [{ selector: 'sc-sign-in-form-by-phone', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByPhone\" *tuiLet=\"(loadingApproveCode$ | async) as loadingApproveCode\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\">\n <tui-input-phone formControlName=\"phone\" [tuiTextfieldCustomContent]=\"checkingPhone\">\n \u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\n <input tuiTextfield autocomplete=\"phone\" />\n </tui-input-phone>\n <tui-error formControlName=\"phone\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n\n <label *ngIf=\"loadingApproveCode === false && haveCode\" tuiLabel=\"\u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\">\n <tui-input formControlName=\"phoneApproveCode\">\n \u041A\u043E\u0434 \u0438\u0437 \u0421\u041C\u0421\n <input tuiTextfield [maskito]=\"approveCodeMask\" autocomplete=\"new-password\" />\n </tui-input>\n <tui-error formControlName=\"phoneApproveCode\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n </div>\n\n <div *tuiLet=\"!!loadingApproveCode as loadingApproveCode\" class=\"flex flex-col gap-4 items-center mb-4\">\n <button\n *ngIf=\"!haveCode\"\n tuiButton\n size=\"s\"\n (click)=\"onSendCode.next()\"\n [disabled]=\"loadingApproveCode || !!!(isPhoneNotBusy$ | async) || phoneControl.invalid\"\n [showLoader]=\"loadingApproveCode\"\n icon=\"scIconLogIn\"\n >\n \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u0434\n </button>\n <button *ngIf=\"!loadingApproveCode && !haveCode\" tuiLink [pseudo]=\"true\" [disabled]=\"!!!(isPhoneNotBusy$ | async) || phoneControl.invalid\" (click)=\"setHaveCode(true)\">\n \u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u043A\u043E\u0434\n </button>\n\n <ng-container *tuiLet=\"timer$ | async as timer\">\n <tui-loader *ngIf=\"haveCode\" [showLoader]=\"loadingApproveCode\">\n <button tuiLink [pseudo]=\"true\" [disabled]=\"loadingApproveCode || timer\" (click)=\"onSendCode.next()\">\n \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434\n <ng-container *ngIf=\"timer\" class=\"!text-tui-base-08\">(\u0447\u0435\u0440\u0435\u0437 {{ timer }})</ng-container>\n </button>\n </tui-loader>\n </ng-container>\n <button\n *ngIf=\"haveCode\"\n tuiButton\n size=\"s\"\n type=\"submit\"\n [showLoader]=\"!!(loadingPhoneAuth$ | async)\"\n [disabled]=\"formByPhone.invalid || !!(loadingPhoneAuth$ | async)\"\n icon=\"scIconLogIn\"\n >\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n\n<ng-template #checkingPhone>\n <tui-loader *ngIf=\"!!!(isPhoneNotBusy$ | async) && phoneControl.valid\" class=\"w-4 h-4\"> </tui-loader>\n</ng-template>\n" }]
|
187
187
|
}], ctorParameters: function () { return [{ type: i1.ScAuthService }, { type: i1.ScVerificationService }]; } });
|
188
188
|
|
189
189
|
/**
|
@@ -233,10 +233,10 @@ class ScSignInFormByEmailComponent {
|
|
233
233
|
}
|
234
234
|
}
|
235
235
|
ScSignInFormByEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
236
|
-
ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3$2.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
236
|
+
ScSignInFormByEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: { forgotPassword: "forgotPassword" }, ngImport: i0, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" size=\"s\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.TuiInputPasswordComponent, selector: "tui-input-password" }, { kind: "directive", type: i3$2.TuiInputPasswordDirective, selector: "tui-input-password" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { kind: "component", type: i3$2.TuiInputComponent, selector: "tui-input" }, { kind: "directive", type: i3$2.TuiInputDirective, selector: "tui-input" }, { kind: "component", type: i4.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i4.TuiLabelComponent, selector: "label[tuiLabel]", inputs: ["tuiLabel", "context"] }, { kind: "component", type: i4.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
237
237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormByEmailComponent, decorators: [{
|
238
238
|
type: Component,
|
239
|
-
args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
|
239
|
+
args: [{ selector: 'sc-sign-in-form-by-email', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formByEmail\" (ngSubmit)=\"onSubmit.next()\">\n <div class=\"flex flex-col gap-4 mb-8\">\n <label tuiLabel=\"\u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\">\n <tui-input formControlName=\"login\">\n \u0410\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B\n <input tuiTextfield autocomplete=\"email\" />\n </tui-input>\n <tui-error formControlName=\"login\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <label tuiLabel=\"\u041F\u0430\u0440\u043E\u043B\u044C\">\n <tui-input-password formControlName=\"password\">\n \u041F\u0430\u0440\u043E\u043B\u044C\n <input tuiTextfield autocomplete=\"current-password\" />\n </tui-input-password>\n <tui-error formControlName=\"password\" [error]=\"[] | tuiFieldError | async\"></tui-error>\n </label>\n <tui-error [error]=\"[] | tuiFieldError | async\"></tui-error>\n </div>\n <div class=\"flex flex-col gap-4 items-center mb-4\">\n <a tuiLink [pseudo]=\"true\" (click)=\"forgotPassword.emit()\" class=\"text-base\">\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?</a>\n <button tuiButton type=\"submit\" [showLoader]=\"!!(loadingEmailAuth$ | async)\" size=\"s\" [disabled]=\"formByEmail.invalid || !!(loadingEmailAuth$ | async)\" icon=\"scIconLogIn\">\n \u0412\u043E\u0439\u0442\u0438\n </button>\n </div>\n</form>\n" }]
|
240
240
|
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { forgotPassword: [{
|
241
241
|
type: Output
|
242
242
|
}] } });
|
@@ -289,10 +289,10 @@ class ScSignInFormComponent {
|
|
289
289
|
}
|
290
290
|
}
|
291
291
|
ScSignInFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, deps: [{ token: i1.ScAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
292
|
-
ScSignInFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormComponent, selector: "sc-sign-in-form", inputs: { authMethod: "authMethod" }, outputs: { forgotPassword: "forgotPassword", signUp: "signUp", successAuth: "successAuth" }, ngImport: i0, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? 'onLight'
|
292
|
+
ScSignInFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScSignInFormComponent, selector: "sc-sign-in-form", inputs: { authMethod: "authMethod" }, outputs: { forgotPassword: "forgotPassword", signUp: "signUp", successAuth: "successAuth" }, ngImport: i0, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" size=\"s\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i4.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: ScSignInFormByPhoneComponent, selector: "sc-sign-in-form-by-phone" }, { kind: "component", type: ScSignInFormByEmailComponent, selector: "sc-sign-in-form-by-email", outputs: ["forgotPassword"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
293
293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScSignInFormComponent, decorators: [{
|
294
294
|
type: Component,
|
295
|
-
args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? 'onLight'
|
295
|
+
args: [{ selector: 'sc-sign-in-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex justify-center mb-4\">\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_phone' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_phone' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byPhone)\"\n class=\"!w-36 !min-w-0 tui-space_right-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443\n </button>\n\n <button\n tuiButton\n [tuiMode]=\"authMethod === 'by_email' ? null : 'onLight'\"\n [appearance]=\"authMethod === 'by_email' ? 'primary' : 'secondary'\"\n size=\"s\"\n (click)=\"switchAuth(method.byEmail)\"\n class=\"!w-36 !min-w-0 tui-space_left-3 tui-space_bottom-3 !font-bold\"\n >\n \u041F\u043E e-mail\n </button>\n</div>\n\n<sc-sign-in-form-by-email *ngIf=\"authMethod === 'by_email'\" (forgotPassword)=\"onForgotPassword()\"></sc-sign-in-form-by-email>\n\n<sc-sign-in-form-by-phone [class.hidden]=\"authMethod !== 'by_phone'\"></sc-sign-in-form-by-phone>\n\n<div class=\"flex flex-col gap-4 items-center\">\n <span class=\"font-medium text-tui-text-02\">\u0415\u0449\u0435 \u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B?</span>\n <button tuiButton tuiMode=\"onLight\" (click)=\"signUp.emit()\" size=\"s\" type=\"button\" icon=\"scIconAddProfile\" appearance=\"secondary\">\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F</button>\n</div>\n" }]
|
296
296
|
}], ctorParameters: function () { return [{ type: i1.ScAuthService }]; }, propDecorators: { authMethod: [{
|
297
297
|
type: Input
|
298
298
|
}], forgotPassword: [{
|
@@ -1480,6 +1480,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1480
1480
|
type: Input
|
1481
1481
|
}] } });
|
1482
1482
|
|
1483
|
+
/**
|
1484
|
+
* Значения пагинации списка товаров категории по умолчанию.
|
1485
|
+
*/
|
1486
|
+
const SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS = {
|
1487
|
+
perPage: 20,
|
1488
|
+
page: 0,
|
1489
|
+
};
|
1490
|
+
/**
|
1491
|
+
* Токен значений пагинации списка товаров категории по умолчанию.
|
1492
|
+
*/
|
1493
|
+
const SC_PRODUCT_PAGINATION_OPTIONS = tuiCreateToken(SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS);
|
1494
|
+
/**
|
1495
|
+
* {@link Subject} параметров пагинации списка товаров категории.
|
1496
|
+
*/
|
1497
|
+
const paginationParams$ = new Subject();
|
1498
|
+
/**
|
1499
|
+
* Токен {@link Subject} параметров пагинации списка товаров категории для получения их из вне.
|
1500
|
+
*/
|
1501
|
+
const SC_PRODUCT_PAGINATION_PARAMS = tuiCreateToken(paginationParams$);
|
1502
|
+
/**
|
1503
|
+
* Фабрика создания потока данных о товарах категории c пагинацией, включая данные о количестве этих товаров в корзине.
|
1504
|
+
*
|
1505
|
+
* @param catalogService Сервис для работы с каталогом.
|
1506
|
+
* @param cartService Сервис для работы с корзиной.
|
1507
|
+
* @param destroy$ Сервис завершения {@link Observable} через `takeUntil`.
|
1508
|
+
*/
|
1509
|
+
function productsPaginationChangeFactory({ paramMap }, catalogService, cartService, destroy$) {
|
1510
|
+
return paramMap.pipe(map((params) => params.get('categoryId')), filter(tuiIsPresent), switchMap((categoryId) => paginationParams$.pipe(debounceTime(20), switchMap((paginationParams) => catalogService.getCategoryProducts$(Number(categoryId), paginationParams)), filter(tuiIsPresent), scan((acc, value) => {
|
1511
|
+
if (acc && value && value.meta.currentPage > 1)
|
1512
|
+
value.data.unshift(...acc.data);
|
1513
|
+
return value;
|
1514
|
+
}, null), switchMap((productsPaginate) => cartService.getCartChange$().pipe(map((cart) => {
|
1515
|
+
productsPaginate === null || productsPaginate === void 0 ? void 0 : productsPaginate.data.forEach((product) => (product.cartItem = cart.items.find((cartItem) => cartItem.product.id === product.id)));
|
1516
|
+
return productsPaginate;
|
1517
|
+
}))), startWith(null))), share(), takeUntil(destroy$));
|
1518
|
+
}
|
1519
|
+
/**
|
1520
|
+
* Токен потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
|
1521
|
+
*/
|
1522
|
+
const SC_PRODUCT_PAGINATION_CHANGE_INFO = new InjectionToken('SC_PRODUCT_PAGINATION_CHANGE_INFO');
|
1523
|
+
/**
|
1524
|
+
* {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
|
1525
|
+
*/
|
1526
|
+
const nextPageClickEvent = new EventEmitter();
|
1527
|
+
/**
|
1528
|
+
* Токен {@link EventEmitter} событие нажатия на кнопку "Показать следующие позиции категории".
|
1529
|
+
*/
|
1530
|
+
const SC_NEXT_PAGE_PAGINATION_CLICK = tuiCreateToken(nextPageClickEvent);
|
1531
|
+
/**
|
1532
|
+
* Фабрика создания потока данных о состоянии загрузки запроса списка товаров с пагинацией пагинации.
|
1533
|
+
*/
|
1534
|
+
function loadingPaginationFactory(productsData$, destroy$) {
|
1535
|
+
return merge(paginationParams$.pipe(map(() => true)), productsData$.pipe(map((data) => data === null))).pipe(share(), takeUntil(destroy$));
|
1536
|
+
}
|
1537
|
+
/**
|
1538
|
+
* Токен потока данных о состоянии загрузки товаров пагинации.
|
1539
|
+
*/
|
1540
|
+
const SC_LOADING_PAGINATION_CHANGE_INFO = new InjectionToken('SC_LOADING_PAGINATION_CHANGE_INFO');
|
1541
|
+
/**
|
1542
|
+
* Фабрика создания потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
|
1543
|
+
*/
|
1544
|
+
function nextPagePaginationChangeFactory({ events }, nextPagePaginationClick, productsData$, destroy$) {
|
1545
|
+
return nextPagePaginationClick
|
1546
|
+
.pipe(scan((acc) => ++acc, 1), startWith(1))
|
1547
|
+
.pipe(takeUntil(merge(events.pipe(filter((e) => e instanceof NavigationEnd)), productsData$.pipe(filter((paginate) => paginate !== null && paginate.meta.currentPage >= paginate.meta.lastPage)), destroy$)));
|
1548
|
+
}
|
1549
|
+
/**
|
1550
|
+
* Токен потока данных прокрутки страницы с сигналами о необходимости пагинации товара.
|
1551
|
+
*/
|
1552
|
+
const SC_NEXT_PAGE_PAGINATION_CHANGE_INFO = new InjectionToken('SC_NEXT_PAGE_PAGINATION_CHANGE_INFO');
|
1553
|
+
/**
|
1554
|
+
* Провайдеры потока данных о товарах категории, включая данные о количестве этих товаров в корзине.
|
1555
|
+
*/
|
1556
|
+
const SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS = [
|
1557
|
+
TuiDestroyService,
|
1558
|
+
{
|
1559
|
+
provide: SC_PRODUCT_PAGINATION_CHANGE_INFO,
|
1560
|
+
deps: [ActivatedRoute, ScCatalogService, ScCartService, TuiDestroyService],
|
1561
|
+
useFactory: productsPaginationChangeFactory,
|
1562
|
+
},
|
1563
|
+
{
|
1564
|
+
provide: SC_NEXT_PAGE_PAGINATION_CHANGE_INFO,
|
1565
|
+
deps: [Router, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
1566
|
+
useFactory: nextPagePaginationChangeFactory,
|
1567
|
+
},
|
1568
|
+
{
|
1569
|
+
provide: SC_LOADING_PAGINATION_CHANGE_INFO,
|
1570
|
+
deps: [SC_PRODUCT_PAGINATION_CHANGE_INFO, TuiDestroyService],
|
1571
|
+
useFactory: loadingPaginationFactory,
|
1572
|
+
},
|
1573
|
+
];
|
1574
|
+
|
1575
|
+
/**
|
1576
|
+
* Компонент элементов управления пагинацией списка товаров.
|
1577
|
+
*/
|
1578
|
+
class ScPriceListPaginationComponent {
|
1579
|
+
/**
|
1580
|
+
* Инициализирует экземпляр класса {@link ScPriceListPaginationComponent}.
|
1581
|
+
*
|
1582
|
+
* @param nextPageClickEvent Событие нажатия на кнопку "Показать следующие N позиций".
|
1583
|
+
* @param options Значения пагинации списка товаров категории по умолчанию.
|
1584
|
+
*/
|
1585
|
+
constructor(nextPageClickEvent, options) {
|
1586
|
+
this.nextPageClickEvent = nextPageClickEvent;
|
1587
|
+
this.options = options;
|
1588
|
+
}
|
1589
|
+
}
|
1590
|
+
ScPriceListPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceListPaginationComponent, deps: [{ token: SC_NEXT_PAGE_PAGINATION_CLICK }, { token: SC_PRODUCT_PAGINATION_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
1591
|
+
ScPriceListPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceListPaginationComponent, selector: "sc-price-list-pagination", inputs: { meta: "meta", loadingPagination: "loadingPagination" }, providers: [SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS], ngImport: i0, template: "<button *ngIf=\"meta?.currentPage !== meta?.lastPage\" tuiButton (click)=\"nextPageClickEvent.emit()\" [disabled]=\"loadingPagination\" appearance=\"secondary\" size=\"l\" class=\"w-full\">\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n</button>\n<!-- \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043C \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044E \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. -->\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceListPaginationComponent, decorators: [{
|
1593
|
+
type: Component,
|
1594
|
+
args: [{ selector: 'sc-price-list-pagination', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS], template: "<button *ngIf=\"meta?.currentPage !== meta?.lastPage\" tuiButton (click)=\"nextPageClickEvent.emit()\" [disabled]=\"loadingPagination\" appearance=\"secondary\" size=\"l\" class=\"w-full\">\n \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {{ options.perPage }} \u0442\u043E\u0432\u0430\u0440\u043E\u0432\n</button>\n<!-- \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043C \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044E \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. -->\n" }]
|
1595
|
+
}], ctorParameters: function () {
|
1596
|
+
return [{ type: i0.EventEmitter, decorators: [{
|
1597
|
+
type: Inject,
|
1598
|
+
args: [SC_NEXT_PAGE_PAGINATION_CLICK]
|
1599
|
+
}] }, { type: undefined, decorators: [{
|
1600
|
+
type: Inject,
|
1601
|
+
args: [SC_PRODUCT_PAGINATION_OPTIONS]
|
1602
|
+
}] }];
|
1603
|
+
}, propDecorators: { meta: [{
|
1604
|
+
type: Input
|
1605
|
+
}], loadingPagination: [{
|
1606
|
+
type: Input
|
1607
|
+
}] } });
|
1608
|
+
|
1483
1609
|
/**
|
1484
1610
|
* Language: Russian.
|
1485
1611
|
*/
|
@@ -1601,7 +1727,13 @@ echarts.use([TitleComponent, TooltipComponent, GridComponent, LineChart, SVGRend
|
|
1601
1727
|
class ScCatalogModule {
|
1602
1728
|
}
|
1603
1729
|
ScCatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1604
|
-
ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, declarations: [
|
1730
|
+
ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, declarations: [ScPriceListPaginationComponent,
|
1731
|
+
ScCategoryCardComponent,
|
1732
|
+
ScFavoriteBtnComponent,
|
1733
|
+
ScInputQuantityComponent,
|
1734
|
+
ScPriceCardComponent,
|
1735
|
+
ScPriceWarehouseStockComponent,
|
1736
|
+
ScPriceHistoryComponent], imports: [CommonModule,
|
1605
1737
|
RouterModule,
|
1606
1738
|
TuiButtonModule,
|
1607
1739
|
TuiSvgModule,
|
@@ -1616,7 +1748,13 @@ ScCatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
1616
1748
|
TuiFieldErrorPipeModule,
|
1617
1749
|
TuiLoaderModule,
|
1618
1750
|
TuiLinkModule,
|
1619
|
-
TuiElasticContainerModule, i2.NgxEchartsModule], exports: [
|
1751
|
+
TuiElasticContainerModule, i2.NgxEchartsModule, TuiLetModule], exports: [ScPriceListPaginationComponent,
|
1752
|
+
ScCategoryCardComponent,
|
1753
|
+
ScFavoriteBtnComponent,
|
1754
|
+
ScInputQuantityComponent,
|
1755
|
+
ScPriceCardComponent,
|
1756
|
+
ScPriceWarehouseStockComponent,
|
1757
|
+
ScPriceHistoryComponent] });
|
1620
1758
|
ScCatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, imports: [CommonModule,
|
1621
1759
|
RouterModule,
|
1622
1760
|
TuiButtonModule,
|
@@ -1633,12 +1771,29 @@ ScCatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
|
|
1633
1771
|
TuiLoaderModule,
|
1634
1772
|
TuiLinkModule,
|
1635
1773
|
TuiElasticContainerModule,
|
1636
|
-
NgxEchartsModule.forRoot({ echarts })
|
1774
|
+
NgxEchartsModule.forRoot({ echarts }),
|
1775
|
+
TuiLetModule] });
|
1637
1776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCatalogModule, decorators: [{
|
1638
1777
|
type: NgModule,
|
1639
1778
|
args: [{
|
1640
|
-
declarations: [
|
1641
|
-
|
1779
|
+
declarations: [
|
1780
|
+
ScPriceListPaginationComponent,
|
1781
|
+
ScCategoryCardComponent,
|
1782
|
+
ScFavoriteBtnComponent,
|
1783
|
+
ScInputQuantityComponent,
|
1784
|
+
ScPriceCardComponent,
|
1785
|
+
ScPriceWarehouseStockComponent,
|
1786
|
+
ScPriceHistoryComponent,
|
1787
|
+
],
|
1788
|
+
exports: [
|
1789
|
+
ScPriceListPaginationComponent,
|
1790
|
+
ScCategoryCardComponent,
|
1791
|
+
ScFavoriteBtnComponent,
|
1792
|
+
ScInputQuantityComponent,
|
1793
|
+
ScPriceCardComponent,
|
1794
|
+
ScPriceWarehouseStockComponent,
|
1795
|
+
ScPriceHistoryComponent,
|
1796
|
+
],
|
1642
1797
|
imports: [
|
1643
1798
|
CommonModule,
|
1644
1799
|
RouterModule,
|
@@ -1657,6 +1812,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1657
1812
|
TuiLinkModule,
|
1658
1813
|
TuiElasticContainerModule,
|
1659
1814
|
NgxEchartsModule.forRoot({ echarts }),
|
1815
|
+
TuiLetModule,
|
1660
1816
|
],
|
1661
1817
|
}]
|
1662
1818
|
}] });
|
@@ -2302,5 +2458,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
2302
2458
|
* Generated bundle index. Do not edit.
|
2303
2459
|
*/
|
2304
2460
|
|
2305
|
-
export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceWarehouseStockComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, phoneApproveCodeMask, scClientUiIconsName, stepValidator };
|
2461
|
+
export { AuthMethod, FilesAndDocumentsComponent, FilesAndDocumentsModule, SC_LINEAR_VALUES, SC_LINEAR_VALUES_TOKEN, SC_LOADING_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CHANGE_INFO, SC_NEXT_PAGE_PAGINATION_CLICK, SC_PRODUCT_PAGINATION_CHANGE_INFO, SC_PRODUCT_PAGINATION_CHANGE_PROVIDERS, SC_PRODUCT_PAGINATION_DEFAULT_OPTIONS, SC_PRODUCT_PAGINATION_OPTIONS, SC_PRODUCT_PAGINATION_PARAMS, ScAuthModule, ScBannerComponent, ScBannerModule, ScCartItemMobileComponent, ScCartModule, ScCatalogModule, ScCategoryCardComponent, ScFavoriteBtnComponent, ScInputQuantityComponent, ScNewsCardComponent, ScNewsCardSkeletonComponent, ScNewsModule, ScOrderItemMobileComponent, ScOrderModule, ScPriceCardComponent, ScPriceHistoryComponent, ScPriceListPaginationComponent, ScPriceWarehouseStockComponent, ScShareButtonComponent, ScShareButtonModule, ScSignInFormByEmailComponent, ScSignInFormByPhoneComponent, ScSignInFormComponent, TreeDirective, TreeIconService, TreeLoaderService, TreeTopDirective, nextPageClickEvent, paginationParams$, phoneApproveCodeMask, scClientUiIconsName, stepValidator };
|
2306
2462
|
//# sourceMappingURL=snabcentr-client-ui.mjs.map
|