@snabcentr/client-ui 0.0.13 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/cart/cart-item-mobile/cart-item-mobile.component.d.ts +14 -9
  2. package/catalog/index.d.ts +1 -0
  3. package/catalog/input-quantity/sc-input-quantity.component.d.ts +10 -2
  4. package/catalog/price-history/sc-chart-option.d.ts +7 -0
  5. package/catalog/price-history/sc-i-chart-data-item.d.ts +13 -0
  6. package/catalog/price-history/sc-lang-RU.d.ts +113 -0
  7. package/catalog/price-history/sc-price-history.component.d.ts +73 -0
  8. package/catalog/sc-catalog.module.d.ts +8 -6
  9. package/esm2020/banner/sc-banner.component.mjs +3 -3
  10. package/esm2020/cart/cart-item-mobile/cart-item-mobile.component.mjs +41 -27
  11. package/esm2020/catalog/category-card/sc-category-card.component.mjs +3 -3
  12. package/esm2020/catalog/index.mjs +2 -1
  13. package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +18 -4
  14. package/esm2020/catalog/price-card/sc-price-card.component.mjs +4 -4
  15. package/esm2020/catalog/price-history/sc-chart-option.mjs +72 -0
  16. package/esm2020/catalog/price-history/sc-i-chart-data-item.mjs +2 -0
  17. package/esm2020/catalog/price-history/sc-lang-RU.mjs +113 -0
  18. package/esm2020/catalog/price-history/sc-price-history.component.mjs +104 -0
  19. package/esm2020/catalog/sc-catalog.module.mjs +18 -6
  20. package/esm2020/catalog/sc-favorite-btn/sc-favorite-btn.component.mjs +3 -3
  21. package/esm2020/helpers/sc-units-helper.mjs +44 -0
  22. package/esm2020/loader/index.mjs +2 -0
  23. package/esm2020/loader/sc-i-loader.mjs +2 -0
  24. package/esm2020/news/news-card/sc-news-card.component.mjs +13 -7
  25. package/esm2020/news/news-card-skeleton/sc-news-card-skeleton.component.mjs +3 -3
  26. package/esm2020/order/order-item-mobile/order-item-mobile.component.mjs +14 -23
  27. package/esm2020/public-api.mjs +2 -1
  28. package/fesm2015/snabcentr-client-ui.mjs +430 -65
  29. package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
  30. package/fesm2020/snabcentr-client-ui.mjs +424 -65
  31. package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
  32. package/helpers/sc-units-helper.d.ts +28 -0
  33. package/loader/index.d.ts +1 -0
  34. package/loader/sc-i-loader.d.ts +9 -0
  35. package/news/news-card/sc-news-card.component.d.ts +6 -1
  36. package/order/order-item-mobile/order-item-mobile.component.d.ts +6 -9
  37. package/package.json +3 -1
  38. package/public-api.d.ts +1 -0
  39. package/styles/taiga/taiga-tailwind-preset.js +1 -0
  40. package/styles/taiga/variables.less +1 -0
  41. package/styles/tailwind/tailwind.scss +49 -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';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Интерфейс для реализации компонентами, отображающими индикатор выполнения запросов.
3
+ */
4
+ export interface ScILoader {
5
+ /**
6
+ * Набор признаков выполнения запросов.
7
+ */
8
+ loadingList: Set<string>;
9
+ }
@@ -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: ScCartItem;
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, linearValues: 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.13",
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
@@ -2,6 +2,7 @@ export * from './banner';
2
2
  export * from './cart';
3
3
  export * from './catalog';
4
4
  export * from './icons';
5
+ export * from './loader';
5
6
  export * from './news';
6
7
  export * from './order';
7
8
  export * from './share-button';
@@ -18,6 +18,7 @@ module.exports = {
18
18
  'tui-radius-m': 'var(--tui-radius-m)',
19
19
  'tui-radius-l': 'var(--tui-radius-l)',
20
20
  'tui-radius-xl': 'var(--tui-radius-xl)',
21
+ 'tui-skeleton-radius': 'var(--tui-skeleton-radius)',
21
22
  },
22
23
  flexBasis: {
23
24
  'min-content': 'min-content',
@@ -27,6 +27,7 @@
27
27
  --tui-radius-m: 0.75rem;
28
28
  --tui-radius-l: 0.75rem;
29
29
  --tui-radius-xl: 1.5rem;
30
+ --tui-skeleton-radius: var(--tui-radius-m);
30
31
  --tui-height-xs: 1.5rem;
31
32
  --tui-height-s: 2rem;
32
33
  --tui-height-m: 2.75rem;
@@ -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
  }
@@ -1145,6 +1169,10 @@ video {
1145
1169
  object-fit: cover;
1146
1170
  }
1147
1171
 
1172
+ .p-12 {
1173
+ padding: 3rem;
1174
+ }
1175
+
1148
1176
  .p-3 {
1149
1177
  padding: 0.75rem;
1150
1178
  }
@@ -1181,6 +1209,10 @@ video {
1181
1209
  text-align: center;
1182
1210
  }
1183
1211
 
1212
+ .text-end {
1213
+ text-align: end;
1214
+ }
1215
+
1184
1216
  .align-baseline {
1185
1217
  vertical-align: baseline;
1186
1218
  }
@@ -1195,6 +1227,11 @@ video {
1195
1227
  line-height: 1rem !important;
1196
1228
  }
1197
1229
 
1230
+ .text-lg {
1231
+ font-size: 1.125rem;
1232
+ line-height: 1.75rem;
1233
+ }
1234
+
1198
1235
  .text-sm {
1199
1236
  font-size: 0.875rem;
1200
1237
  line-height: 1.25rem;
@@ -1264,6 +1301,10 @@ video {
1264
1301
  color: var(--tui-success-fill);
1265
1302
  }
1266
1303
 
1304
+ .text-tui-text-02 {
1305
+ color: var(--tui-text-02);
1306
+ }
1307
+
1267
1308
  .text-white {
1268
1309
  --tw-text-opacity: 1;
1269
1310
  color: rgb(255 255 255 / var(--tw-text-opacity));
@@ -1338,6 +1379,14 @@ video {
1338
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);
1339
1380
  }
1340
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
+
1341
1390
  .\!transition-all {
1342
1391
  transition-property: all !important;
1343
1392
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;