@snabcentr/client-ui 0.0.14 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- package/cart/cart-item-mobile/cart-item-mobile.component.d.ts +14 -9
- package/catalog/index.d.ts +1 -0
- package/catalog/input-quantity/sc-input-quantity.component.d.ts +10 -2
- package/catalog/price-history/sc-chart-option.d.ts +7 -0
- package/catalog/price-history/sc-i-chart-data-item.d.ts +13 -0
- package/catalog/price-history/sc-lang-RU.d.ts +113 -0
- package/catalog/price-history/sc-price-history.component.d.ts +73 -0
- package/catalog/sc-catalog.module.d.ts +8 -6
- package/esm2020/banner/sc-banner.component.mjs +3 -3
- package/esm2020/cart/cart-item-mobile/cart-item-mobile.component.mjs +41 -27
- package/esm2020/catalog/category-card/sc-category-card.component.mjs +3 -3
- package/esm2020/catalog/index.mjs +2 -1
- package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +18 -4
- package/esm2020/catalog/price-card/sc-price-card.component.mjs +3 -3
- package/esm2020/catalog/price-history/sc-chart-option.mjs +72 -0
- package/esm2020/catalog/price-history/sc-i-chart-data-item.mjs +2 -0
- package/esm2020/catalog/price-history/sc-lang-RU.mjs +113 -0
- package/esm2020/catalog/price-history/sc-price-history.component.mjs +104 -0
- package/esm2020/catalog/sc-catalog.module.mjs +18 -6
- package/esm2020/catalog/sc-favorite-btn/sc-favorite-btn.component.mjs +3 -3
- package/esm2020/helpers/sc-units-helper.mjs +44 -0
- package/esm2020/loader/index.mjs +2 -0
- package/esm2020/loader/sc-i-loader.mjs +2 -0
- package/esm2020/news/news-card/sc-news-card.component.mjs +13 -7
- package/esm2020/news/news-card-skeleton/sc-news-card-skeleton.component.mjs +3 -3
- package/esm2020/order/order-item-mobile/order-item-mobile.component.mjs +14 -23
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/snabcentr-client-ui.mjs +429 -64
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +423 -64
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/helpers/sc-units-helper.d.ts +28 -0
- package/loader/index.d.ts +1 -0
- package/loader/sc-i-loader.d.ts +9 -0
- package/news/news-card/sc-news-card.component.d.ts +6 -1
- package/order/order-item-mobile/order-item-mobile.component.d.ts +6 -9
- package/package.json +3 -1
- package/public-api.d.ts +1 -0
- package/styles/tailwind/tailwind.scss +45 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
import { ScProduct } from '@snabcentr/client-core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
/**
|
4
|
+
* Класс хэлпер для работы со значениями единиц измерения товара.
|
5
|
+
*/
|
6
|
+
export declare class UnitsHelper {
|
7
|
+
readonly linearValues: string[];
|
8
|
+
/**
|
9
|
+
* Инициирует экземпляр класса {@link UnitsHelper}.
|
10
|
+
*
|
11
|
+
* @param linearValues Единицы измерения линейной величины.
|
12
|
+
*/
|
13
|
+
constructor(linearValues: string[]);
|
14
|
+
/**
|
15
|
+
* Возвращает признак возможности продажи товара на метраж.
|
16
|
+
*
|
17
|
+
* @param linearValues Товар для которого нужно проверить возможность продажи на метраж.
|
18
|
+
*/
|
19
|
+
productIsMeasurable(product: ScProduct): boolean;
|
20
|
+
/**
|
21
|
+
* Возвращает кратность количества для товара.
|
22
|
+
*
|
23
|
+
* @param linearValues Товар для которого нужно вернуть кратность количества.
|
24
|
+
*/
|
25
|
+
productMultiplicity(product: ScProduct): number;
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnitsHelper, never>;
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UnitsHelper>;
|
28
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './sc-i-loader';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
1
2
|
import { ScNewsTile } from '@snabcentr/client-core';
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
/**
|
@@ -8,6 +9,10 @@ export declare class ScNewsCardComponent {
|
|
8
9
|
* Информация о новости.
|
9
10
|
*/
|
10
11
|
news: ScNewsTile;
|
12
|
+
/**
|
13
|
+
* Событие клика по карточке новости.
|
14
|
+
*/
|
15
|
+
clickCardEvent: EventEmitter<ScNewsTile>;
|
11
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScNewsCardComponent, never>;
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewsCardComponent, "sc-news-card", never, { "news": "news"; }, {}, never, never, false>;
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScNewsCardComponent, "sc-news-card", never, { "news": "news"; }, { "clickCardEvent": "clickCardEvent"; }, never, never, false>;
|
13
18
|
}
|
@@ -1,15 +1,16 @@
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
2
2
|
import { ScCartItem, ScIUrls, ScProduct } from '@snabcentr/client-core';
|
3
3
|
import { TuiPreviewDialogService } from '@taiga-ui/addon-preview';
|
4
|
+
import { UnitsHelper } from '../../helpers/sc-units-helper';
|
4
5
|
import * as i0 from "@angular/core";
|
5
6
|
/**
|
6
7
|
* Компонент карточки элемента заказа.
|
7
8
|
*/
|
8
9
|
export declare class ScOrderItemMobileComponent {
|
10
|
+
readonly unitsHelper: UnitsHelper;
|
9
11
|
private readonly previewDialogService;
|
10
12
|
private readonly urls;
|
11
13
|
private readonly pathImageNotFound;
|
12
|
-
readonly linearValues: string[];
|
13
14
|
/**
|
14
15
|
* Ссылка на представление спецификации.
|
15
16
|
*/
|
@@ -17,7 +18,7 @@ export declare class ScOrderItemMobileComponent {
|
|
17
18
|
/**
|
18
19
|
* Элемент заказа.
|
19
20
|
*/
|
20
|
-
orderItem
|
21
|
+
orderItem?: ScCartItem;
|
21
22
|
/**
|
22
23
|
* Событие нажатия на карточку.
|
23
24
|
*/
|
@@ -29,24 +30,20 @@ export declare class ScOrderItemMobileComponent {
|
|
29
30
|
/**
|
30
31
|
* Продукт элемента заказа.
|
31
32
|
*/
|
32
|
-
get product(): ScProduct;
|
33
|
+
get product(): ScProduct | undefined;
|
33
34
|
/**
|
34
35
|
* Инициирует экземпляр класса {@link ScOrderItemMobileComponent}.
|
35
36
|
*
|
37
|
+
* @param unitsHelper Объект-хэлпер для работы со значениями единиц измерения товара.
|
36
38
|
* @param previewDialogService Сервис диалогового окна предварительного просмотра.
|
37
39
|
* @param urls Список ссылок на разделы backend'a.
|
38
40
|
* @param pathImageNotFound Путь до изображения 'Товар не найден'.
|
39
|
-
* @param linearValues Единицы измерения линейной величины.
|
40
41
|
*/
|
41
|
-
constructor(previewDialogService: TuiPreviewDialogService, urls: ScIUrls, pathImageNotFound: string
|
42
|
+
constructor(unitsHelper: UnitsHelper, previewDialogService: TuiPreviewDialogService, urls: ScIUrls, pathImageNotFound: string);
|
42
43
|
/**
|
43
44
|
* Отобразить спецификацию.
|
44
45
|
*/
|
45
46
|
showSpecification(): void;
|
46
|
-
/**
|
47
|
-
* Возвращает признак возможности продажи товара на метраж.
|
48
|
-
*/
|
49
|
-
productIsMeasurable(): number;
|
50
47
|
/**
|
51
48
|
* Возвращает ссылку на изображение карточки товара.
|
52
49
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@snabcentr/client-ui",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.17",
|
4
4
|
"author": "Snabcentr Ltd.",
|
5
5
|
"repository": "https://gitlab.snabcentr.met/web/angular/snabcentr-client-ui-lib",
|
6
6
|
"license": "Commercial",
|
@@ -29,7 +29,9 @@
|
|
29
29
|
"@taiga-ui/layout": ">=3.42.1",
|
30
30
|
"@taiga-ui/styles": ">=3.42.1",
|
31
31
|
"@tinkoff/ng-polymorpheus": ">=4.1.0",
|
32
|
+
"echarts": "^5.4.3",
|
32
33
|
"moment": ">=2.29.4",
|
34
|
+
"ngx-echarts": "^14.0.0",
|
33
35
|
"rxjs": ">=7.5.0",
|
34
36
|
"zone.js": ">=0.12.0"
|
35
37
|
},
|
package/public-api.d.ts
CHANGED
@@ -652,6 +652,10 @@ video {
|
|
652
652
|
left: 0.25rem;
|
653
653
|
}
|
654
654
|
|
655
|
+
.left-16 {
|
656
|
+
left: 4rem;
|
657
|
+
}
|
658
|
+
|
655
659
|
.left-3 {
|
656
660
|
left: 0.75rem;
|
657
661
|
}
|
@@ -696,6 +700,10 @@ video {
|
|
696
700
|
margin: 2rem;
|
697
701
|
}
|
698
702
|
|
703
|
+
.mb-1 {
|
704
|
+
margin-bottom: 0.25rem;
|
705
|
+
}
|
706
|
+
|
699
707
|
.mb-2 {
|
700
708
|
margin-bottom: 0.5rem;
|
701
709
|
}
|
@@ -775,6 +783,10 @@ video {
|
|
775
783
|
height: 1.25rem !important;
|
776
784
|
}
|
777
785
|
|
786
|
+
.\!h-full {
|
787
|
+
height: 100% !important;
|
788
|
+
}
|
789
|
+
|
778
790
|
.h-20 {
|
779
791
|
height: 5rem;
|
780
792
|
}
|
@@ -795,10 +807,18 @@ video {
|
|
795
807
|
height: 1rem;
|
796
808
|
}
|
797
809
|
|
810
|
+
.h-48 {
|
811
|
+
height: 12rem;
|
812
|
+
}
|
813
|
+
|
798
814
|
.h-50 {
|
799
815
|
height: 12.5rem;
|
800
816
|
}
|
801
817
|
|
818
|
+
.h-56 {
|
819
|
+
height: 14rem;
|
820
|
+
}
|
821
|
+
|
802
822
|
.h-64 {
|
803
823
|
height: 16rem;
|
804
824
|
}
|
@@ -843,6 +863,10 @@ video {
|
|
843
863
|
width: 1rem;
|
844
864
|
}
|
845
865
|
|
866
|
+
.w-4\/5 {
|
867
|
+
width: 80%;
|
868
|
+
}
|
869
|
+
|
846
870
|
.w-40 {
|
847
871
|
width: 10rem;
|
848
872
|
}
|
@@ -1185,6 +1209,10 @@ video {
|
|
1185
1209
|
text-align: center;
|
1186
1210
|
}
|
1187
1211
|
|
1212
|
+
.text-end {
|
1213
|
+
text-align: end;
|
1214
|
+
}
|
1215
|
+
|
1188
1216
|
.align-baseline {
|
1189
1217
|
vertical-align: baseline;
|
1190
1218
|
}
|
@@ -1199,6 +1227,11 @@ video {
|
|
1199
1227
|
line-height: 1rem !important;
|
1200
1228
|
}
|
1201
1229
|
|
1230
|
+
.text-lg {
|
1231
|
+
font-size: 1.125rem;
|
1232
|
+
line-height: 1.75rem;
|
1233
|
+
}
|
1234
|
+
|
1202
1235
|
.text-sm {
|
1203
1236
|
font-size: 0.875rem;
|
1204
1237
|
line-height: 1.25rem;
|
@@ -1268,6 +1301,10 @@ video {
|
|
1268
1301
|
color: var(--tui-success-fill);
|
1269
1302
|
}
|
1270
1303
|
|
1304
|
+
.text-tui-text-02 {
|
1305
|
+
color: var(--tui-text-02);
|
1306
|
+
}
|
1307
|
+
|
1271
1308
|
.text-white {
|
1272
1309
|
--tw-text-opacity: 1;
|
1273
1310
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
@@ -1342,6 +1379,14 @@ video {
|
|
1342
1379
|
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
1343
1380
|
}
|
1344
1381
|
|
1382
|
+
.\!transition {
|
1383
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter !important;
|
1384
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
|
1385
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter !important;
|
1386
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
1387
|
+
transition-duration: 150ms !important;
|
1388
|
+
}
|
1389
|
+
|
1345
1390
|
.\!transition-all {
|
1346
1391
|
transition-property: all !important;
|
1347
1392
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|