@snabcentr/client-ui 0.2.11 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- package/cart/sc-cart.module.d.ts +5 -4
- package/esm2020/cart/cart-item-mobile/sc-cart-item-mobile.component.mjs +4 -3
- package/esm2020/cart/sc-cart.module.mjs +9 -2
- package/esm2020/catalog/input-quantity/sc-input-quantity.component.mjs +3 -3
- package/esm2020/catalog/price-warehouse-stock/sc-price-warehouse-stock.component.mjs +3 -3
- package/esm2020/files/services/tree-icon.service.mjs +2 -2
- package/esm2020/icons/sc-client-ui-icons-name.mjs +27 -44
- package/esm2020/tokens/sc-linear-values-token.mjs +2 -2
- package/esm2020/validators/stepValidator.mjs +10 -6
- package/fesm2015/snabcentr-client-ui.mjs +52 -57
- package/fesm2015/snabcentr-client-ui.mjs.map +1 -1
- package/fesm2020/snabcentr-client-ui.mjs +52 -57
- package/fesm2020/snabcentr-client-ui.mjs.map +1 -1
- package/icons/sc-client-ui-icons-name.d.ts +0 -1
- package/icons/svg-pack/scIconArrowForward.svg +11 -0
- package/icons/svg-pack/{scIconArrowDownLargeEnd.svg → scIconArrowLargeEnd.svg} +1 -1
- package/icons/svg-pack/scIconArrowLargeStart.svg +12 -0
- package/icons/svg-pack/scIconArrowReturn.svg +2 -2
- package/icons/svg-pack/scIconCanopy.svg +12 -0
- package/icons/svg-pack/scIconCatalogBack.svg +12 -0
- package/icons/svg-pack/scIconFastener.svg +11 -0
- package/icons/svg-pack/scIconFoam.svg +11 -0
- package/icons/svg-pack/scIconFoamBalloon.svg +13 -0
- package/icons/svg-pack/scIconMosquitoNet.svg +11 -0
- package/icons/svg-pack/scIconPlasticProfile.svg +11 -0
- package/icons/svg-pack/scIconPromoMaterials.svg +14 -0
- package/icons/svg-pack/scIconSandwich.svg +15 -0
- package/icons/svg-pack/scIconSiding.svg +14 -0
- package/icons/svg-pack/scIconSmile.svg +14 -0
- package/icons/svg-pack/scIconTemplates.svg +11 -0
- package/icons/svg-pack/scIconWindowsill.svg +15 -0
- package/package.json +1 -1
- package/styles/tailwind/tailwind.scss +4 -0
- package/validators/stepValidator.d.ts +2 -1
- package/icons/svg-pack/scIconArrowDown.svg +0 -11
- package/icons/svg-pack/scIconArrowDownLarge.svg +0 -11
- package/icons/svg-pack/scIconArrowLeft.svg +0 -11
- package/icons/svg-pack/scIconArrowRight.svg +0 -11
- package/icons/svg-pack/scIconArrowUp.svg +0 -11
- package/icons/svg-pack/scIconBasket.svg +0 -11
- package/icons/svg-pack/scIconBubble.svg +0 -11
- package/icons/svg-pack/scIconCancel.svg +0 -18
- package/icons/svg-pack/scIconCatalog.svg +0 -16
- package/icons/svg-pack/scIconClip.svg +0 -11
- package/icons/svg-pack/scIconCross.svg +0 -11
- package/icons/svg-pack/scIconDone.svg +0 -12
- package/icons/svg-pack/scIconDownloading.svg +0 -11
- package/icons/svg-pack/scIconEye.svg +0 -11
- package/icons/svg-pack/scIconFolderPlus.svg +0 -11
- package/icons/svg-pack/scIconHamburger.svg +0 -13
- package/icons/svg-pack/scIconImage.svg +0 -11
- package/icons/svg-pack/scIconLike.svg +0 -11
- package/icons/svg-pack/scIconLocation.svg +0 -11
- package/icons/svg-pack/scIconLogOut.svg +0 -13
- package/icons/svg-pack/scIconLogOut2.svg +0 -13
- package/icons/svg-pack/scIconMinus.svg +0 -11
- package/icons/svg-pack/scIconMoney2.svg +0 -11
- package/icons/svg-pack/scIconPhone.svg +0 -11
- package/icons/svg-pack/scIconPlus.svg +0 -11
- package/icons/svg-pack/scIconQuestion.svg +0 -11
- package/icons/svg-pack/scIconRefresh.svg +0 -11
- package/icons/svg-pack/scIconSettings.svg +0 -11
- package/icons/svg-pack/scIconTick.svg +0 -11
- package/icons/svg-pack/scIconVerticalThreeDots.svg +0 -11
- package/icons/svg-pack/scIconViewGrid.svg +0 -11
@@ -1,107 +1,90 @@
|
|
1
1
|
/**
|
2
2
|
* Список иконок.
|
3
|
-
* TODO: TASK[#7779] Добавить иконки отдельных значков для соц. сетей после добавления их в кит дизайна.
|
4
3
|
*/
|
5
4
|
export const scClientUiIconsName = [
|
6
|
-
'scIconCalendar',
|
7
5
|
'scIconWordFile',
|
6
|
+
'scIconWindowsill',
|
8
7
|
'scIconWarning',
|
9
8
|
'scIconWallet',
|
10
9
|
'scIconViewTree',
|
11
|
-
'scIconMinus',
|
12
10
|
'scIconViewInline',
|
13
|
-
'scIconViewGrid',
|
14
|
-
'scIconVerticalThreeDots',
|
15
11
|
'scIconTop',
|
16
|
-
'
|
12
|
+
'scIconTemplates',
|
17
13
|
'scIconTasks',
|
18
14
|
'scIconSuitcase',
|
19
15
|
'scIconStar',
|
16
|
+
'scIconSocialWhatsapp',
|
17
|
+
'scIconSocialVk',
|
18
|
+
'scIconSocialViber',
|
19
|
+
'scIconSocialTelegram',
|
20
|
+
'scIconSocialQR',
|
21
|
+
'scIconSocialInstagram',
|
22
|
+
'scIconSocialFacebook',
|
23
|
+
'scIconSocialEmail',
|
24
|
+
'scIconSocialCopy',
|
25
|
+
'scIconSmile',
|
26
|
+
'scIconSiding',
|
20
27
|
'scIconShare',
|
21
|
-
'scIconSettings',
|
22
28
|
'scIconSend',
|
23
29
|
'scIconSearch',
|
24
30
|
'scIconSave',
|
31
|
+
'scIconSandwich',
|
25
32
|
'scIconRocket',
|
26
33
|
'scIconRequisites',
|
27
34
|
'scIconRepeat',
|
28
|
-
'scIconRefresh',
|
29
35
|
'scIconReclamation',
|
30
|
-
'scIconQuestion',
|
31
36
|
'scIconQRCodeScan',
|
37
|
+
'scIconPromoMaterials',
|
32
38
|
'scIconProfile',
|
33
39
|
'scIconPrice',
|
34
|
-
'
|
35
|
-
'scIconPhone',
|
40
|
+
'scIconPlasticProfile',
|
36
41
|
'scIconPercentage',
|
37
42
|
'scIconPdfFile',
|
38
43
|
'scIconPalette',
|
39
44
|
'scIconOffer',
|
40
45
|
'scIconNews',
|
41
|
-
'
|
46
|
+
'scIconMosquitoNet',
|
42
47
|
'scIconMoney',
|
43
48
|
'scIconMail',
|
44
|
-
'scIconLogOut2',
|
45
|
-
'scIconLogOut',
|
46
49
|
'scIconLogIn',
|
47
50
|
'scIconLockOpen',
|
48
51
|
'scIconLock',
|
49
|
-
'scIconLocation',
|
50
52
|
'scIconList',
|
51
|
-
'scIconLike',
|
52
|
-
'scIconImage',
|
53
53
|
'scIconHome',
|
54
54
|
'scIconHistory',
|
55
55
|
'scIconHeartFill',
|
56
56
|
'scIconHeart',
|
57
|
-
'scIconHamburger',
|
58
57
|
'scIconGraph',
|
59
|
-
'scIconFolderPlus',
|
60
58
|
'scIconFolderOpen',
|
61
59
|
'scIconFolder',
|
60
|
+
'scIconFoam',
|
61
|
+
'scIconFoamBalloon',
|
62
62
|
'scIconFilter',
|
63
63
|
'scIconFile',
|
64
64
|
'scIconFavoriteFill',
|
65
65
|
'scIconFavorite',
|
66
|
-
'
|
66
|
+
'scIconFastener',
|
67
67
|
'scIconExcelFile',
|
68
68
|
'scIconError',
|
69
69
|
'scIconEdit',
|
70
|
-
'scIconDownloading',
|
71
|
-
'scIconDone',
|
72
70
|
'scIconDeleteProfile',
|
73
|
-
'scIconCross',
|
74
71
|
'scIconContacts',
|
75
72
|
'scIconConfigurator',
|
76
73
|
'scIconClock',
|
77
|
-
'scIconClip',
|
78
74
|
'scIconClients',
|
79
|
-
'
|
75
|
+
'scIconCatalogBack',
|
80
76
|
'scIconCart',
|
81
|
-
'
|
82
|
-
'
|
77
|
+
'scIconCanopy',
|
78
|
+
'scIconCalendar',
|
83
79
|
'scIconBook',
|
84
80
|
'scIconBell',
|
85
|
-
'scIconBasket',
|
86
81
|
'scIconBag',
|
87
82
|
'scIconAttention',
|
88
|
-
'scIconArrowUp',
|
89
|
-
'scIconArrowRight',
|
90
83
|
'scIconArrowReturn',
|
91
|
-
'
|
92
|
-
'
|
93
|
-
'
|
94
|
-
'scIconArrowDown',
|
84
|
+
'scIconArrowLargeStart',
|
85
|
+
'scIconArrowLargeEnd',
|
86
|
+
'scIconArrowForward',
|
95
87
|
'scIconApplication',
|
96
88
|
'scIconAddProfile',
|
97
|
-
'scIconSocialCopy',
|
98
|
-
'scIconSocialEmail',
|
99
|
-
'scIconSocialFacebook',
|
100
|
-
'scIconSocialInstagram',
|
101
|
-
'scIconSocialQR',
|
102
|
-
'scIconSocialTelegram',
|
103
|
-
'scIconSocialViber',
|
104
|
-
'scIconSocialVk',
|
105
|
-
'scIconSocialWhatsapp',
|
106
89
|
];
|
107
|
-
//# sourceMappingURL=data:application/json;base64,
|
90
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2MtY2xpZW50LXVpLWljb25zLW5hbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jbGllbnQtdWkvaWNvbnMvc2MtY2xpZW50LXVpLWljb25zLW5hbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxtQkFBbUIsR0FBRztJQUMvQixnQkFBZ0I7SUFDaEIsa0JBQWtCO0lBQ2xCLGVBQWU7SUFDZixjQUFjO0lBQ2QsZ0JBQWdCO0lBQ2hCLGtCQUFrQjtJQUNsQixXQUFXO0lBQ1gsaUJBQWlCO0lBQ2pCLGFBQWE7SUFDYixnQkFBZ0I7SUFDaEIsWUFBWTtJQUNaLHNCQUFzQjtJQUN0QixnQkFBZ0I7SUFDaEIsbUJBQW1CO0lBQ25CLHNCQUFzQjtJQUN0QixnQkFBZ0I7SUFDaEIsdUJBQXVCO0lBQ3ZCLHNCQUFzQjtJQUN0QixtQkFBbUI7SUFDbkIsa0JBQWtCO0lBQ2xCLGFBQWE7SUFDYixjQUFjO0lBQ2QsYUFBYTtJQUNiLFlBQVk7SUFDWixjQUFjO0lBQ2QsWUFBWTtJQUNaLGdCQUFnQjtJQUNoQixjQUFjO0lBQ2Qsa0JBQWtCO0lBQ2xCLGNBQWM7SUFDZCxtQkFBbUI7SUFDbkIsa0JBQWtCO0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vbkF0dGVudGlvbicsXG4gICAgJ3NjSWNvbkFycm93UmV0dXJuJyxcbiAgICAnc2NJY29uQXJyb3dMYXJnZVN0YXJ0JyxcbiAgICAnc2NJY29uQXJyb3dMYXJnZUVuZCcsXG4gICAgJ3NjSWNvbkFycm93Rm9yd2FyZCcsXG4gICAgJ3NjSWNvbkFwcGxpY2F0aW9uJyxcbiAgICAnc2NJY29uQWRkUHJvZmlsZScsXG5dO1xuIl19
|
@@ -2,9 +2,9 @@ import { tuiCreateToken } from '@taiga-ui/cdk';
|
|
2
2
|
/**
|
3
3
|
* Единицы измерения линейной величины по умолчанию.
|
4
4
|
*/
|
5
|
-
export const SC_LINEAR_VALUES = ['пог.м.', 'м.'];
|
5
|
+
export const SC_LINEAR_VALUES = ['пог.м.', 'м.', `м2`];
|
6
6
|
/**
|
7
7
|
* Токен единиц измерения линейной величины по умолчанию.
|
8
8
|
*/
|
9
9
|
export const SC_LINEAR_VALUES_TOKEN = tuiCreateToken(SC_LINEAR_VALUES);
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2MtbGluZWFyLXZhbHVlcy10b2tlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC11aS90b2tlbnMvc2MtbGluZWFyLXZhbHVlcy10b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRS9DOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQWEsQ0FBQyxRQUFRLEVBQUUsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBRWpFOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sc0JBQXNCLEdBQUcsY0FBYyxDQUFDLGdCQUFnQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0dWlDcmVhdGVUb2tlbiB9IGZyb20gJ0B0YWlnYS11aS9jZGsnO1xuXG4vKipcbiAqINCV0LTQuNC90LjRhtGLINC40LfQvNC10YDQtdC90LjRjyDQu9C40L3QtdC50L3QvtC5INCy0LXQu9C40YfQuNC90Ysg0L/QviDRg9C80L7Qu9GH0LDQvdC40Y4uXG4gKi9cbmV4cG9ydCBjb25zdCBTQ19MSU5FQVJfVkFMVUVTOiBzdHJpbmdbXSA9IFsn0L/QvtCzLtC8LicsICfQvC4nLCBg0LwyYF07XG5cbi8qKlxuICog0KLQvtC60LXQvSDQtdC00LjQvdC40YYg0LjQt9C80LXRgNC10L3QuNGPINC70LjQvdC10LnQvdC+0Lkg0LLQtdC70LjRh9C40L3RiyDQv9C+INGD0LzQvtC70YfQsNC90LjRji5cbiAqL1xuZXhwb3J0IGNvbnN0IFNDX0xJTkVBUl9WQUxVRVNfVE9LRU4gPSB0dWlDcmVhdGVUb2tlbihTQ19MSU5FQVJfVkFMVUVTKTtcbiJdfQ==
|
@@ -2,12 +2,16 @@
|
|
2
2
|
* Проверяет кратность значения.
|
3
3
|
*
|
4
4
|
* @param step Шаг кратности.
|
5
|
+
* @param tolerance Допустимая погрешность.
|
5
6
|
*/
|
6
|
-
export function stepValidator(step) {
|
7
|
-
return (
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
export function stepValidator(step, tolerance = 0.0001) {
|
8
|
+
return ({ value }) => {
|
9
|
+
if (value) {
|
10
|
+
const controlValue = value / step;
|
11
|
+
const closestMultiple = Math.round(controlValue / step) * step;
|
12
|
+
return Math.abs(controlValue - closestMultiple) > tolerance ? { error: `Число не кратно ${step}` } : null;
|
13
|
+
}
|
14
|
+
return null;
|
11
15
|
};
|
12
16
|
}
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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KiBAcGFyYW0gdG9sZXJhbmNlINCU0L7Qv9GD0YHRgtC40LzQsNGPINC/0L7Qs9GA0LXRiNC90L7RgdGC0YwuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBzdGVwVmFsaWRhdG9yKHN0ZXA6IG51bWJlciwgdG9sZXJhbmNlOiBudW1iZXIgPSAwLjAwMDEpOiBWYWxpZGF0b3JGbiB7XG4gICAgcmV0dXJuICh7IHZhbHVlIH06IEFic3RyYWN0Q29udHJvbDxudW1iZXIgfCBudWxsPik6IFZhbGlkYXRpb25FcnJvcnMgfCBudWxsID0+IHtcbiAgICAgICAgaWYgKHZhbHVlKSB7XG4gICAgICAgICAgICBjb25zdCBjb250cm9sVmFsdWUgPSB2YWx1ZSAvIHN0ZXA7XG4gICAgICAgICAgICBjb25zdCBjbG9zZXN0TXVsdGlwbGUgPSBNYXRoLnJvdW5kKGNvbnRyb2xWYWx1ZSAvIHN0ZXApICogc3RlcDtcblxuICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKGNvbnRyb2xWYWx1ZSAtIGNsb3Nlc3RNdWx0aXBsZSkgPiB0b2xlcmFuY2UgPyB7IGVycm9yOiBg0KfQuNGB0LvQviDQvdC1INC60YDQsNGC0L3QviAke3N0ZXB9YCB9IDogbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG59XG4iXX0=
|
@@ -6,7 +6,7 @@ import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
6
6
|
import * as i8 from '@ng-web-apis/intersection-observer';
|
7
7
|
import { IntersectionObserverService, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
|
8
8
|
import * as i3$1 from '@taiga-ui/core';
|
9
|
-
import { tuiFadeIn, TuiButtonModule, TuiModeModule, TuiLoaderModule, tuiFormatNumber, TuiSvgModule, TuiLabelModule, TuiTextfieldControllerModule, TuiHintModule, TuiLinkModule } from '@taiga-ui/core';
|
9
|
+
import { tuiFadeIn, TuiButtonModule, TuiModeModule, TuiLoaderModule, tuiFormatNumber, TuiSvgModule, TuiLabelModule, TuiTextfieldControllerModule, TuiHintModule, TuiLinkModule, TuiFormatNumberPipeModule } from '@taiga-ui/core';
|
10
10
|
import * as i1 from '@snabcentr/client-core';
|
11
11
|
import { SC_URLS, SC_PATH_IMAGE_NOT_FOUND, ScIconTypesEnum } from '@snabcentr/client-core';
|
12
12
|
import * as i3 from '@angular/common';
|
@@ -24,6 +24,8 @@ import * as i7$1 from '@taiga-ui/addon-preview';
|
|
24
24
|
import { TuiPreviewDialogService, TuiPreviewModule } from '@taiga-ui/addon-preview';
|
25
25
|
import * as i8$1 from '@tinkoff/ng-polymorpheus';
|
26
26
|
import { PolymorpheusModule, PolymorpheusComponent } from '@tinkoff/ng-polymorpheus';
|
27
|
+
import * as i9 from '@taiga-ui/addon-commerce';
|
28
|
+
import { TuiCurrencyPipeModule } from '@taiga-ui/addon-commerce';
|
27
29
|
import * as i2 from 'ngx-echarts';
|
28
30
|
import { NgxEchartsModule } from 'ngx-echarts';
|
29
31
|
import * as echarts from 'echarts/core';
|
@@ -286,7 +288,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
286
288
|
/**
|
287
289
|
* Единицы измерения линейной величины по умолчанию.
|
288
290
|
*/
|
289
|
-
const SC_LINEAR_VALUES = ['пог.м.', 'м.'];
|
291
|
+
const SC_LINEAR_VALUES = ['пог.м.', 'м.', `м2`];
|
290
292
|
/**
|
291
293
|
* Токен единиц измерения линейной величины по умолчанию.
|
292
294
|
*/
|
@@ -339,12 +341,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
339
341
|
* Проверяет кратность значения.
|
340
342
|
*
|
341
343
|
* @param step Шаг кратности.
|
344
|
+
* @param tolerance Допустимая погрешность.
|
342
345
|
*/
|
343
|
-
function stepValidator(step) {
|
344
|
-
return (
|
345
|
-
|
346
|
-
|
347
|
-
|
346
|
+
function stepValidator(step, tolerance = 0.0001) {
|
347
|
+
return ({ value }) => {
|
348
|
+
if (value) {
|
349
|
+
const controlValue = value / step;
|
350
|
+
const closestMultiple = Math.round(controlValue / step) * step;
|
351
|
+
return Math.abs(controlValue - closestMultiple) > tolerance ? { error: `Число не кратно ${step}` } : null;
|
352
|
+
}
|
353
|
+
return null;
|
348
354
|
};
|
349
355
|
}
|
350
356
|
|
@@ -438,10 +444,10 @@ class ScInputQuantityComponent extends AbstractTuiNullableControl {
|
|
438
444
|
}
|
439
445
|
}
|
440
446
|
ScInputQuantityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_NUMBER_VALUE_TRANSFORMER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
441
|
-
ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", quantityUnit: "quantityUnit", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"
|
447
|
+
ScInputQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: { step: "step", quantityUnit: "quantityUnit", showLoader: "showLoader", showCross: "showCross", appearance: "appearance", isDisabled: "isDisabled", size: "size" }, outputs: { clickClearEvent: "clickClearEvent" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-appearance": "this.appearance", "attr.data-disabled": "this.isDisabled", "attr.data-size": "this.size" } }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldPostfix]=\"quantityUnit || ''\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "component", type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "component", type: i3$2.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { kind: "directive", type: i3$2.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "directive", type: i3$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i3$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i3$1.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i3$1.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i3$1.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i3$1.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i3$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i3$1.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.TuiFieldErrorPipe, name: "tuiFieldError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
442
448
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScInputQuantityComponent, decorators: [{
|
443
449
|
type: Component,
|
444
|
-
args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"
|
450
|
+
args: [{ selector: 'sc-input-quantity', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-loader *ngIf=\"formControl\" class=\"w-full\" [overlay]=\"true\" [showLoader]=\"showLoader\" [size]=\"size\">\n <div class=\"flex items-center text-center gap-1\">\n <div class=\"field-with-button flex grow rounded-xl\">\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [disabled]=\"!numberInput.canDecrement\"\n [focusable]=\"false\"\n [size]=\"size\"\n (click.prevent)=\"decrement()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconMinusLarge\"></tui-svg>\n </button>\n <tui-input-number\n #numberInput\n [formControl]=\"formControl\"\n [tuiHint]=\"([] | tuiFieldError | async )?.message\"\n [tuiTextfieldPostfix]=\"quantityUnit || ''\"\n [tuiTextfieldLabelOutside]=\"true\"\n [min]=\"step\"\n [tuiTextfieldSize]=\"size\"\n [required]=\"true\"\n [style.text-align]=\"'center'\"\n [style.font-weight]=\"700\"\n class=\"grow\"\n >\n </tui-input-number>\n <button\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"incident()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconPlusLarge\"></tui-svg>\n </button>\n </div>\n <button\n *ngIf=\"showCross\"\n tuiIconButton\n tuiMode=\"onLight\"\n [appearance]=\"appearance\"\n [size]=\"size\"\n [disabled]=\"!numberInput.canIncrement\"\n [focusable]=\"false\"\n (click.prevent)=\"clear()\"\n (mousedown.prevent)=\"numberInput.nativeFocusableElement?.focus()\"\n >\n <tui-svg src=\"tuiIconCloseLarge\"></tui-svg>\n </button>\n </div>\n</tui-loader>\n", styles: [":host [data-size=l]{--tui-height-l: var(--tui-height-m);--tui-font-text-m: bold .875rem/1.25rem var(--tui-font-text);--tui-padding-l: 0}:host [data-size=m]{--tui-height-m: var(--tui-height-s);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-m: 0}:host [data-size=m] tui-svg{font-size:12px!important}:host [data-size=s]{--tui-height-s: var(--tui-height-xs);--tui-font-text-s: bold .75rem/1rem var(--tui-font-text);--tui-padding-s: 0}:host [data-size=s] tui-svg{font-size:12px!important}:host[data-disabled=true]{pointer-events:none;opacity:var(--tui-disabled-opacity)}:host[data-appearance=secondary] .field-with-button{background-color:var(--tui-base-01);box-shadow:inset 0 0 0 .0625rem var(--tui-base-03)}:host[data-appearance=primary] .field-with-button{background-color:var(--tui-warning-bg)}:host .field-with-button:has(._invalid){background-color:var(--tui-error-bg)}\n"] }]
|
445
451
|
}], ctorParameters: function () {
|
446
452
|
return [{ type: i4.NgControl, decorators: [{
|
447
453
|
type: Optional
|
@@ -521,10 +527,10 @@ class ScPriceWarehouseStockComponent {
|
|
521
527
|
}
|
522
528
|
}
|
523
529
|
ScPriceWarehouseStockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceWarehouseStockComponent, deps: [{ token: i1.ScWarehouseService }], target: i0.ɵɵFactoryTarget.Component });
|
524
|
-
ScPriceWarehouseStockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: { classList: "classList", product: "product", withStockHint: "withStockHint" }, ngImport: i0, template: "<ng-container *ngIf=\"product\">\n <ng-container>\n <div *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"flex items-center gap-1\">\n <span *ngIf=\"product.getNotStockMessage(warehouseSelect) as message\" class=\"text-xs min-w-2/5 text-tui-error-fill\" [ngClass]=\"classList\"> {{ message }} </span>\n <span *ngIf=\"product.isWarehouseStockExist(warehouseSelect.id)\" class=\"text-xs min-w-2/5 text-tui-success-fill\" [ngClass]=\"classList\">\n \u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438<ng-container *ngIf=\"product.getWarehouseStockCount(warehouseSelect.id) as count\"\n >:\n <span class=\"whitespace-nowrap\">{{ count }} {{ product.quantityUnit }}</span>\n </ng-container>\n </span>\n <span *ngIf=\"product.onOrder\" class=\"text-xs min-w-2/5 text-sc-yellow\" [ngClass]=\"classList\">\u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437</span>\n\n <tui-svg\n *ngIf=\"withStockHint && (stockByWarehouses$ | async)?.length\"\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!text-xs !h-3\"\n ></tui-svg>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #stockHint>\n <table *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"text-xs table-auto\" [ngClass]=\"classList\">\n <tbody>\n <tr *ngFor=\"let item of stockByWarehouses$ | async\" class=\"border-b\"
|
530
|
+
ScPriceWarehouseStockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: { classList: "classList", product: "product", withStockHint: "withStockHint" }, ngImport: i0, template: "<ng-container *ngIf=\"product\">\n <ng-container>\n <div *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"flex items-center gap-1\">\n <span *ngIf=\"product.getNotStockMessage(warehouseSelect) as message\" class=\"text-xs min-w-2/5 text-tui-error-fill\" [ngClass]=\"classList\"> {{ message }} </span>\n <span *ngIf=\"product.isWarehouseStockExist(warehouseSelect.id)\" class=\"text-xs min-w-2/5 text-tui-success-fill\" [ngClass]=\"classList\">\n \u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438<ng-container *ngIf=\"product.getWarehouseStockCount(warehouseSelect.id) as count\"\n >:\n <span class=\"whitespace-nowrap\">{{ count }} {{ product.quantityUnit }}</span>\n </ng-container>\n </span>\n <span *ngIf=\"product.onOrder\" class=\"text-xs min-w-2/5 text-sc-yellow\" [ngClass]=\"classList\">\u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437</span>\n\n <tui-svg\n *ngIf=\"withStockHint && (stockByWarehouses$ | async)?.length\"\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!text-xs !h-3\"\n ></tui-svg>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #stockHint>\n <table *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"text-xs table-auto\" [ngClass]=\"classList\">\n <tbody>\n <tr *ngFor=\"let item of stockByWarehouses$ | async\" class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item[0]?.name }}:</td>\n <td class=\"px-1\">{{ item[1].count ? item[1].count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n</ng-template>\n", styles: ["[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i3$1.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i3$1.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i3$1.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
525
531
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScPriceWarehouseStockComponent, decorators: [{
|
526
532
|
type: Component,
|
527
|
-
args: [{ selector: 'sc-price-warehouse-stock', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"product\">\n <ng-container>\n <div *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"flex items-center gap-1\">\n <span *ngIf=\"product.getNotStockMessage(warehouseSelect) as message\" class=\"text-xs min-w-2/5 text-tui-error-fill\" [ngClass]=\"classList\"> {{ message }} </span>\n <span *ngIf=\"product.isWarehouseStockExist(warehouseSelect.id)\" class=\"text-xs min-w-2/5 text-tui-success-fill\" [ngClass]=\"classList\">\n \u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438<ng-container *ngIf=\"product.getWarehouseStockCount(warehouseSelect.id) as count\"\n >:\n <span class=\"whitespace-nowrap\">{{ count }} {{ product.quantityUnit }}</span>\n </ng-container>\n </span>\n <span *ngIf=\"product.onOrder\" class=\"text-xs min-w-2/5 text-sc-yellow\" [ngClass]=\"classList\">\u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437</span>\n\n <tui-svg\n *ngIf=\"withStockHint && (stockByWarehouses$ | async)?.length\"\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!text-xs !h-3\"\n ></tui-svg>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #stockHint>\n <table *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"text-xs table-auto\" [ngClass]=\"classList\">\n <tbody>\n <tr *ngFor=\"let item of stockByWarehouses$ | async\" class=\"border-b\"
|
533
|
+
args: [{ selector: 'sc-price-warehouse-stock', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"product\">\n <ng-container>\n <div *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"flex items-center gap-1\">\n <span *ngIf=\"product.getNotStockMessage(warehouseSelect) as message\" class=\"text-xs min-w-2/5 text-tui-error-fill\" [ngClass]=\"classList\"> {{ message }} </span>\n <span *ngIf=\"product.isWarehouseStockExist(warehouseSelect.id)\" class=\"text-xs min-w-2/5 text-tui-success-fill\" [ngClass]=\"classList\">\n \u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438<ng-container *ngIf=\"product.getWarehouseStockCount(warehouseSelect.id) as count\"\n >:\n <span class=\"whitespace-nowrap\">{{ count }} {{ product.quantityUnit }}</span>\n </ng-container>\n </span>\n <span *ngIf=\"product.onOrder\" class=\"text-xs min-w-2/5 text-sc-yellow\" [ngClass]=\"classList\">\u041F\u043E\u0434 \u0437\u0430\u043A\u0430\u0437</span>\n\n <tui-svg\n *ngIf=\"withStockHint && (stockByWarehouses$ | async)?.length\"\n src=\"tuiIconInfoLarge\"\n [tuiHint]=\"stockHint\"\n [tuiHintShowDelay]=\"100\"\n tuiHintDirection=\"top\"\n class=\"!text-xs !h-3\"\n ></tui-svg>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #stockHint>\n <table *ngIf=\"warehouseSelect$ | async as warehouseSelect\" class=\"text-xs table-auto\" [ngClass]=\"classList\">\n <tbody>\n <tr *ngFor=\"let item of stockByWarehouses$ | async\" class=\"border-b\">\n <ng-container>\n <td class=\"px-1\">{{ item[0]?.name }}:</td>\n <td class=\"px-1\">{{ item[1].count ? item[1].count + ' ' + product.quantityUnit : '\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438' }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n</ng-template>\n", styles: ["[tuiIconButton]{--tui-radius-m: .75rem;--tui-height-xs: 1.25rem}\n"] }]
|
528
534
|
}], ctorParameters: function () { return [{ type: i1.ScWarehouseService }]; }, propDecorators: { classList: [{
|
529
535
|
type: Input
|
530
536
|
}], product: [{
|
@@ -612,10 +618,10 @@ class ScCartItemMobileComponent {
|
|
612
618
|
}
|
613
619
|
}
|
614
620
|
ScCartItemMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, deps: [{ token: UnitsHelper }, { token: TuiPreviewDialogService }, { token: SC_URLS }, { token: SC_PATH_IMAGE_NOT_FOUND }], target: i0.ɵɵFactoryTarget.Component });
|
615
|
-
ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<div class=\"ml-2 mt-2 relative p-4 gap-y-2 gap-x-4 flex flex-wrap bg-white border border-tui-base-04 shadow-sc-2 rounded-xl\">\n <ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button>\n -->\n <button\n tuiIconButton\n size=\"m\"\n icon=\"
|
621
|
+
ScCartItemMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ScCartItemMobileComponent, selector: "sc-cart-item-mobile", inputs: { cartItem: "cartItem" }, outputs: { quantityValueChanges: "quantityValueChanges", clickDeleteEvent: "clickDeleteEvent", clickSettingsEvent: "clickSettingsEvent", clickCardEvent: "clickCardEvent" }, viewQueries: [{ propertyName: "specificationPreviewRef", first: true, predicate: ["specificationPreview"], descendants: true }], ngImport: i0, template: "<div class=\"ml-2 mt-2 relative p-4 gap-y-2 gap-x-4 flex flex-wrap bg-white border border-tui-base-04 shadow-sc-2 rounded-xl\">\n <ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button>\n -->\n <button\n tuiIconButton\n size=\"m\"\n icon=\"tuiIconTrash2Large\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n (click)=\"clickDeleteEvent.emit()\"\n class=\"shadow-sc-2 !absolute -left-2 -top-2\"\n ></button>\n <div class=\"flex gap-2\">\n <div class=\"flex shrink-0 h-20 w-20 justify-center items-center overflow-hidden\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" [class.p-5]=\"!product.images?.length\" class=\"cursor-pointer\" />\n </div>\n\n <div class=\"flex flex-wrap self-center gap-x-8 gap-y-0.5\">\n <div class=\"w-[13rem]\">\n <a tuiLink (click)=\"clickCardEvent.emit()\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"text-tui-text-02 text-xs\">\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n </div>\n </div>\n <div class=\"flex flex-col self-center w-[10rem] gap-x-8 gap-y-0.5\">\n <span *ngIf=\"product.discount\" class=\"flex items-center text-xs text-tui-text-02\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"text-tui-text-01 !text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"flex flex-col items-baseline gap-x-2 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span *ngIf=\"!product.priceInRub\" class=\"text-xs text-tui-text-02\">{{ product.costString }}</span>\n </p>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n </div>\n </div>\n\n <div class=\"flex gap-2 items-center w-44 text-xs text-tui-text-02\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton (click)=\"clickSettingsEvent.emit()\" size=\"m\" icon=\"scIconSettings\" appearance=\"secondary\" tuiMode=\"onLight\"></button>\n -->\n <div>\n <ng-container *ngIf=\"unitsHelper.productIsMeasurable(product); else notMeasurable\">\n <p>\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} {{ product.unit }}</p>\n </ng-container>\n <ng-template #notMeasurable>\n <p *ngIf=\"cartItem.length && !unitsHelper.productIsMeasurable(product)\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <p *ngIf=\"cartItem.height\">\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-template>\n <p class=\"font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n </div>\n <div class=\"flex items-center grow justify-end\">\n <sc-input-quantity\n class=\"w-28\"\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [quantityUnit]=\"unitsHelper.productIsMeasurable(product) ? '\u0448\u0442' : product.quantityUnit\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n ></sc-input-quantity>\n </div>\n </ng-container>\n\n <ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl \"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: ScInputQuantityComponent, selector: "sc-input-quantity", inputs: ["step", "quantityUnit", "showLoader", "showCross", "appearance", "isDisabled", "size"], outputs: ["clickClearEvent"] }, { kind: "component", type: ScPriceWarehouseStockComponent, selector: "sc-price-warehouse-stock", inputs: ["classList", "product", "withStockHint"] }, { kind: "component", type: i3$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "directive", type: i3$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { kind: "component", type: i3$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { kind: "directive", type: i3$1.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { kind: "directive", type: i3$1.TuiHintDriverDirective, selector: "[tuiHint]" }, { kind: "directive", type: i3$1.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { kind: "directive", type: i3$1.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.TuiPreviewComponent, selector: "tui-preview", inputs: ["zoomable", "rotatable"] }, { kind: "directive", type: i7$1.TuiPreviewActionDirective, selector: "[tuiPreviewAction]" }, { kind: "directive", type: i8$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i9.TuiCurrencyPipe, name: "tuiCurrency" }, { kind: "pipe", type: i3$1.TuiFormatNumberPipe, name: "tuiFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
616
622
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScCartItemMobileComponent, decorators: [{
|
617
623
|
type: Component,
|
618
|
-
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ml-2 mt-2 relative p-4 gap-y-2 gap-x-4 flex flex-wrap bg-white border border-tui-base-04 shadow-sc-2 rounded-xl\">\n <ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button>\n -->\n <button\n tuiIconButton\n size=\"m\"\n icon=\"
|
624
|
+
args: [{ selector: 'sc-cart-item-mobile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ml-2 mt-2 relative p-4 gap-y-2 gap-x-4 flex flex-wrap bg-white border border-tui-base-04 shadow-sc-2 rounded-xl\">\n <ng-container *ngIf=\"cartItem && product; else skeleton\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton size=\"m\" icon=\"scIconVerticalThreeDots\" appearance=\"float\" tuiMode=\"onLight\" class=\"!absolute right-0 top-0\"></button>\n -->\n <button\n tuiIconButton\n size=\"m\"\n icon=\"tuiIconTrash2Large\"\n appearance=\"secondary\"\n tuiMode=\"onLight\"\n (click)=\"clickDeleteEvent.emit()\"\n class=\"shadow-sc-2 !absolute -left-2 -top-2\"\n ></button>\n <div class=\"flex gap-2\">\n <div class=\"flex shrink-0 h-20 w-20 justify-center items-center overflow-hidden\">\n <img (click)=\"clickCardEvent.emit()\" [src]=\"getCardImage()\" [alt]=\"product.name\" [class.p-5]=\"!product.images?.length\" class=\"cursor-pointer\" />\n </div>\n\n <div class=\"flex flex-wrap self-center gap-x-8 gap-y-0.5\">\n <div class=\"w-[13rem]\">\n <a tuiLink (click)=\"clickCardEvent.emit()\">\n <span class=\"font-bold\">{{ product.name }}</span>\n </a>\n <div class=\"text-tui-text-02 text-xs\">\n <p>\u0410\u0440\u0442\u0438\u043A\u0443\u043B: {{ product.code }}</p>\n <p *ngIf=\"product.pack\">\u041D\u043E\u0440\u043C\u0430 \u0443\u043F\u0430\u043A\u043E\u0432\u043A\u0438: {{ product.pack }}</p>\n <a tuiLink *ngIf=\"cartItem.specificationImgUrl\" (click)=\"showSpecification()\">\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F</a>\n <ng-template #specificationPreview let-preview>\n <tui-preview [rotatable]=\"false\" [zoomable]=\"false\">\n <img *polymorpheusOutlet=\"cartItem.specificationImgUrl as src\" alt=\"preview\" [src]=\"cartItem.specificationImgUrl\" />\n <button icon=\"tuiIconClose\" title=\"Close\" tuiIconButton tuiPreviewAction type=\"button\" (click)=\"preview.complete()\"></button>\n </tui-preview>\n </ng-template>\n </div>\n </div>\n <div class=\"flex flex-col self-center w-[10rem] gap-x-8 gap-y-0.5\">\n <span *ngIf=\"product.discount\" class=\"flex items-center text-xs text-tui-text-02\">\n <span class=\"line-through\">{{ product.discountCostString }}</span> \n <span class=\"text-tui-success-fill font-bold\"> -{{ product.discount.percent }}% </span>\n <tui-svg src=\"tuiIconInfoLarge\" [tuiHint]=\"discountHint\" [tuiHintShowDelay]=\"100\" tuiHintDirection=\"top\" class=\"text-tui-text-01 !text-xs !h-4\"></tui-svg>\n <ng-template #discountHint>\n <div class=\"font-bold\">{{ product.discount.name }}</div>\n <div *ngIf=\"product.discount.expiredAt as expiredAt\">\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F: {{ expiredAt }}</div>\n </ng-template>\n </span>\n <p class=\"flex flex-col items-baseline gap-x-2 font-bold\">\n <span>{{ product.costRubString }}</span>\n <span *ngIf=\"!product.priceInRub\" class=\"text-xs text-tui-text-02\">{{ product.costString }}</span>\n </p>\n <sc-price-warehouse-stock [product]=\"product\"></sc-price-warehouse-stock>\n </div>\n </div>\n </div>\n\n <div class=\"flex gap-2 items-center w-44 text-xs text-tui-text-02\">\n <!--\n TODO: \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u0430.\n <button tuiIconButton (click)=\"clickSettingsEvent.emit()\" size=\"m\" icon=\"scIconSettings\" appearance=\"secondary\" tuiMode=\"onLight\"></button>\n -->\n <div>\n <ng-container *ngIf=\"unitsHelper.productIsMeasurable(product); else notMeasurable\">\n <p>\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} {{ product.unit }}</p>\n </ng-container>\n <ng-template #notMeasurable>\n <p *ngIf=\"cartItem.length && !unitsHelper.productIsMeasurable(product)\">\u0414\u043B\u0438\u043D\u0430: {{ cartItem.length }} \u043C.</p>\n <p *ngIf=\"cartItem.width\">\u0428\u0438\u0440\u0438\u043D\u0430: {{ cartItem.width }} \u043C.</p>\n <p *ngIf=\"cartItem.height\">\u0412\u044B\u0441\u043E\u0442\u0430: {{ cartItem.height }} \u043C.</p>\n </ng-template>\n <p class=\"font-bold text-tui-text-01\">\u0418\u0442\u043E\u0433\u043E: {{ cartItem.costRub | tuiFormatNumber }} {{ 'RUB' | tuiCurrency }}</p>\n </div>\n </div>\n <div class=\"flex items-center grow justify-end\">\n <sc-input-quantity\n class=\"w-28\"\n *ngIf=\"quantityControl\"\n [formControl]=\"quantityControl\"\n [quantityUnit]=\"unitsHelper.productIsMeasurable(product) ? '\u0448\u0442' : product.quantityUnit\"\n [showCross]=\"false\"\n size=\"s\"\n [step]=\"unitsHelper.productMultiplicity(product)\"\n ></sc-input-quantity>\n </div>\n </ng-container>\n\n <ng-template #skeleton>\n <div class=\"flex gap-2 w-full\">\n <div class=\"h-20 w-20 bg-tui-base-02 rounded-xl \"></div>\n <div class=\"flex flex-col grow gap-2.5 bg-white\">\n <div class=\"w-full h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-3/5 h-4 rounded-xl bg-tui-base-02\"></div>\n <div class=\"w-4/5 h-4 rounded-xl bg-tui-base-02\"></div>\n </div>\n </div>\n </ng-template>\n</div>\n" }]
|
619
625
|
}], ctorParameters: function () {
|
620
626
|
return [{ type: UnitsHelper }, { type: i7$1.TuiPreviewDialogService, decorators: [{
|
621
627
|
type: Inject,
|
@@ -1316,6 +1322,8 @@ ScCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1316
1322
|
TuiLinkModule,
|
1317
1323
|
ScCatalogModule,
|
1318
1324
|
TuiButtonModule,
|
1325
|
+
TuiCurrencyPipeModule,
|
1326
|
+
TuiFormatNumberPipeModule,
|
1319
1327
|
TuiModeModule,
|
1320
1328
|
TuiSvgModule,
|
1321
1329
|
TuiHintModule,
|
@@ -1327,6 +1335,8 @@ ScCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1327
1335
|
TuiLinkModule,
|
1328
1336
|
ScCatalogModule,
|
1329
1337
|
TuiButtonModule,
|
1338
|
+
TuiCurrencyPipeModule,
|
1339
|
+
TuiFormatNumberPipeModule,
|
1330
1340
|
TuiModeModule,
|
1331
1341
|
TuiSvgModule,
|
1332
1342
|
TuiHintModule,
|
@@ -1344,6 +1354,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1344
1354
|
TuiLinkModule,
|
1345
1355
|
ScCatalogModule,
|
1346
1356
|
TuiButtonModule,
|
1357
|
+
TuiCurrencyPipeModule,
|
1358
|
+
TuiFormatNumberPipeModule,
|
1347
1359
|
TuiModeModule,
|
1348
1360
|
TuiSvgModule,
|
1349
1361
|
TuiHintModule,
|
@@ -1368,7 +1380,7 @@ class TreeIconService {
|
|
1368
1380
|
getIconName(info) {
|
1369
1381
|
switch (info.getIcon()) {
|
1370
1382
|
case ScIconTypesEnum.iconImage:
|
1371
|
-
return '
|
1383
|
+
return 'tuiIconImageLarge';
|
1372
1384
|
case ScIconTypesEnum.iconPdfFile:
|
1373
1385
|
return 'scIconPdfFile';
|
1374
1386
|
case ScIconTypesEnum.iconWordFile:
|
@@ -1639,109 +1651,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
1639
1651
|
|
1640
1652
|
/**
|
1641
1653
|
* Список иконок.
|
1642
|
-
* TODO: TASK[#7779] Добавить иконки отдельных значков для соц. сетей после добавления их в кит дизайна.
|
1643
1654
|
*/
|
1644
1655
|
const scClientUiIconsName = [
|
1645
|
-
'scIconCalendar',
|
1646
1656
|
'scIconWordFile',
|
1657
|
+
'scIconWindowsill',
|
1647
1658
|
'scIconWarning',
|
1648
1659
|
'scIconWallet',
|
1649
1660
|
'scIconViewTree',
|
1650
|
-
'scIconMinus',
|
1651
1661
|
'scIconViewInline',
|
1652
|
-
'scIconViewGrid',
|
1653
|
-
'scIconVerticalThreeDots',
|
1654
1662
|
'scIconTop',
|
1655
|
-
'
|
1663
|
+
'scIconTemplates',
|
1656
1664
|
'scIconTasks',
|
1657
1665
|
'scIconSuitcase',
|
1658
1666
|
'scIconStar',
|
1667
|
+
'scIconSocialWhatsapp',
|
1668
|
+
'scIconSocialVk',
|
1669
|
+
'scIconSocialViber',
|
1670
|
+
'scIconSocialTelegram',
|
1671
|
+
'scIconSocialQR',
|
1672
|
+
'scIconSocialInstagram',
|
1673
|
+
'scIconSocialFacebook',
|
1674
|
+
'scIconSocialEmail',
|
1675
|
+
'scIconSocialCopy',
|
1676
|
+
'scIconSmile',
|
1677
|
+
'scIconSiding',
|
1659
1678
|
'scIconShare',
|
1660
|
-
'scIconSettings',
|
1661
1679
|
'scIconSend',
|
1662
1680
|
'scIconSearch',
|
1663
1681
|
'scIconSave',
|
1682
|
+
'scIconSandwich',
|
1664
1683
|
'scIconRocket',
|
1665
1684
|
'scIconRequisites',
|
1666
1685
|
'scIconRepeat',
|
1667
|
-
'scIconRefresh',
|
1668
1686
|
'scIconReclamation',
|
1669
|
-
'scIconQuestion',
|
1670
1687
|
'scIconQRCodeScan',
|
1688
|
+
'scIconPromoMaterials',
|
1671
1689
|
'scIconProfile',
|
1672
1690
|
'scIconPrice',
|
1673
|
-
'
|
1674
|
-
'scIconPhone',
|
1691
|
+
'scIconPlasticProfile',
|
1675
1692
|
'scIconPercentage',
|
1676
1693
|
'scIconPdfFile',
|
1677
1694
|
'scIconPalette',
|
1678
1695
|
'scIconOffer',
|
1679
1696
|
'scIconNews',
|
1680
|
-
'
|
1697
|
+
'scIconMosquitoNet',
|
1681
1698
|
'scIconMoney',
|
1682
1699
|
'scIconMail',
|
1683
|
-
'scIconLogOut2',
|
1684
|
-
'scIconLogOut',
|
1685
1700
|
'scIconLogIn',
|
1686
1701
|
'scIconLockOpen',
|
1687
1702
|
'scIconLock',
|
1688
|
-
'scIconLocation',
|
1689
1703
|
'scIconList',
|
1690
|
-
'scIconLike',
|
1691
|
-
'scIconImage',
|
1692
1704
|
'scIconHome',
|
1693
1705
|
'scIconHistory',
|
1694
1706
|
'scIconHeartFill',
|
1695
1707
|
'scIconHeart',
|
1696
|
-
'scIconHamburger',
|
1697
1708
|
'scIconGraph',
|
1698
|
-
'scIconFolderPlus',
|
1699
1709
|
'scIconFolderOpen',
|
1700
1710
|
'scIconFolder',
|
1711
|
+
'scIconFoam',
|
1712
|
+
'scIconFoamBalloon',
|
1701
1713
|
'scIconFilter',
|
1702
1714
|
'scIconFile',
|
1703
1715
|
'scIconFavoriteFill',
|
1704
1716
|
'scIconFavorite',
|
1705
|
-
'
|
1717
|
+
'scIconFastener',
|
1706
1718
|
'scIconExcelFile',
|
1707
1719
|
'scIconError',
|
1708
1720
|
'scIconEdit',
|
1709
|
-
'scIconDownloading',
|
1710
|
-
'scIconDone',
|
1711
1721
|
'scIconDeleteProfile',
|
1712
|
-
'scIconCross',
|
1713
1722
|
'scIconContacts',
|
1714
1723
|
'scIconConfigurator',
|
1715
1724
|
'scIconClock',
|
1716
|
-
'scIconClip',
|
1717
1725
|
'scIconClients',
|
1718
|
-
'
|
1726
|
+
'scIconCatalogBack',
|
1719
1727
|
'scIconCart',
|
1720
|
-
'
|
1721
|
-
'
|
1728
|
+
'scIconCanopy',
|
1729
|
+
'scIconCalendar',
|
1722
1730
|
'scIconBook',
|
1723
1731
|
'scIconBell',
|
1724
|
-
'scIconBasket',
|
1725
1732
|
'scIconBag',
|
1726
1733
|
'scIconAttention',
|
1727
|
-
'scIconArrowUp',
|
1728
|
-
'scIconArrowRight',
|
1729
1734
|
'scIconArrowReturn',
|
1730
|
-
'
|
1731
|
-
'
|
1732
|
-
'
|
1733
|
-
'scIconArrowDown',
|
1735
|
+
'scIconArrowLargeStart',
|
1736
|
+
'scIconArrowLargeEnd',
|
1737
|
+
'scIconArrowForward',
|
1734
1738
|
'scIconApplication',
|
1735
1739
|
'scIconAddProfile',
|
1736
|
-
'scIconSocialCopy',
|
1737
|
-
'scIconSocialEmail',
|
1738
|
-
'scIconSocialFacebook',
|
1739
|
-
'scIconSocialInstagram',
|
1740
|
-
'scIconSocialQR',
|
1741
|
-
'scIconSocialTelegram',
|
1742
|
-
'scIconSocialViber',
|
1743
|
-
'scIconSocialVk',
|
1744
|
-
'scIconSocialWhatsapp',
|
1745
1740
|
];
|
1746
1741
|
|
1747
1742
|
/**
|