intelicoreact 0.2.28 → 0.2.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +2 -2
- package/dist/Atomic/FormElements/Input/Input.js +2 -2
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +19 -13
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +3 -3
- package/dist/Atomic/FormElements/InputMask/InputMask.js +3 -2
- package/dist/Atomic/FormElements/InputMask/functions.js +1 -1
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +2 -2
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +2 -2
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +2 -2
- package/dist/Atomic/FormElements/RangeList/RangeList.js +2 -2
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +141 -0
- package/dist/Atomic/UI/AccordionTable/AccordionTable.scss +151 -0
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +2 -2
- package/dist/Atomic/UI/Status/Status.scss +5 -0
- package/dist/Atomic/UI/Table/Partials/TdCell.js +2 -2
- package/dist/Atomic/UI/Table/Partials/TdRow.js +2 -2
- package/dist/Atomic/UI/TagList/TagList.js +2 -2
- package/dist/Constants/index.constants.js +1 -1
- package/dist/Functions/fieldValueFormatters.js +1 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +2 -2
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +2 -2
- package/dist/Functions/useFormTools/functions/General.js +2 -2
- package/dist/Functions/useFormTools/functions/RenderFields.js +2 -2
- package/dist/Functions/useFormTools/index.js +2 -2
- package/dist/Functions/useLocationParams.js +2 -2
- package/dist/Functions/usePasswordChecker.js +2 -2
- package/dist/Functions/utils.js +1 -15
- package/dist/scss/_fonts.scss +108 -108
- package/package.json +1 -3
- package/dist/Atomic/UI/Chart/Chart.js +0 -145
- package/dist/Atomic/UI/Chart/Chart.scss +0 -57
- package/dist/Atomic/UI/Chart/partial/AnyOuterClass.scss +0 -38
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +0 -30
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +0 -95
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.scss +0 -18
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +0 -286
- package/dist/Atomic/UI/Chart/partial/utils.js +0 -147
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +0 -235
- package/dist/Atomic/UI/ExampleChartIntegration/partial/AnyOuterClass.scss +0 -61
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +0 -131
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.any-outer-class__chart:not(.chart_icon-mode) {
|
|
2
|
-
max-width: 806px;
|
|
3
|
-
|
|
4
|
-
background: #FFFFFF;
|
|
5
|
-
box-shadow: 0px 16px 24px rgba(0, 0, 0, 0.05);
|
|
6
|
-
border-radius: 16px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.any-outer-class__chart {
|
|
11
|
-
.chart__description-title {
|
|
12
|
-
font-style: normal;
|
|
13
|
-
font-weight: 600;
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
line-height: 24px;
|
|
16
|
-
letter-spacing: 0.1px;
|
|
17
|
-
color: #3B414B;
|
|
18
|
-
}
|
|
19
|
-
.chart__description-value {
|
|
20
|
-
span {
|
|
21
|
-
font-style: normal;
|
|
22
|
-
font-weight: 600;
|
|
23
|
-
font-size: 20px;
|
|
24
|
-
line-height: 30px;
|
|
25
|
-
letter-spacing: 0.359794px;
|
|
26
|
-
color: #3B414B;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
&:last-child {
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
line-height: 20px;
|
|
33
|
-
letter-spacing: 0.2px;
|
|
34
|
-
color: #757F8C;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.GRADIENT_OBJECTS = exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = exports.DEFAULT_CHART_MODEL = exports.CHART_TYPES = void 0;
|
|
7
|
-
var CHART_TYPES = ['Bar', 'Line'];
|
|
8
|
-
exports.CHART_TYPES = CHART_TYPES;
|
|
9
|
-
var DEFAULT_CHART_MODEL = 'barLayout';
|
|
10
|
-
exports.DEFAULT_CHART_MODEL = DEFAULT_CHART_MODEL;
|
|
11
|
-
var FINTURF_ADD_GRADIENT_COLORS_POSITIVE = ['#53D1AD', '#389AA3'];
|
|
12
|
-
exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = FINTURF_ADD_GRADIENT_COLORS_POSITIVE;
|
|
13
|
-
var FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = ['#FDB4DB', '#FA2E69'];
|
|
14
|
-
exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = FINTURF_ADD_GRADIENT_COLORS_NEGATIVE;
|
|
15
|
-
var GRADIENT_OBJECTS = {
|
|
16
|
-
finturf: {
|
|
17
|
-
bar: {
|
|
18
|
-
gradientTargetPropertyName: 'backgroundColor',
|
|
19
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_POSITIVE,
|
|
20
|
-
direction: 'toBottom',
|
|
21
|
-
typeDistributionOfGradientPoints: 'personalBase'
|
|
22
|
-
},
|
|
23
|
-
line: {
|
|
24
|
-
gradientTargetPropertyName: 'borderColor',
|
|
25
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_POSITIVE,
|
|
26
|
-
direction: 'toRight'
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.GRADIENT_OBJECTS = GRADIENT_OBJECTS;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _utils = require("../utils");
|
|
17
|
-
|
|
18
|
-
require("./ChartTypeSwitcherIcon.scss");
|
|
19
|
-
|
|
20
|
-
var RC = 'chart__type-switcher-icon';
|
|
21
|
-
|
|
22
|
-
var getIcon = function getIcon(type) {
|
|
23
|
-
switch (type) {
|
|
24
|
-
case 'Bar':
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
26
|
-
width: "24",
|
|
27
|
-
height: "24",
|
|
28
|
-
viewBox: "0 0 24 25",
|
|
29
|
-
fill: "none",
|
|
30
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement("rect", {
|
|
32
|
-
y: "0.5",
|
|
33
|
-
width: "24",
|
|
34
|
-
height: "24",
|
|
35
|
-
rx: "4",
|
|
36
|
-
fill: "#EAF2FF"
|
|
37
|
-
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
38
|
-
d: "M18 18V11",
|
|
39
|
-
stroke: "#1F7499",
|
|
40
|
-
"stroke-width": "2",
|
|
41
|
-
"stroke-linecap": "round",
|
|
42
|
-
"stroke-linejoin": "round"
|
|
43
|
-
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
44
|
-
d: "M12 18V6",
|
|
45
|
-
stroke: "#1F7499",
|
|
46
|
-
"stroke-width": "2",
|
|
47
|
-
"stroke-linecap": "round",
|
|
48
|
-
"stroke-linejoin": "round"
|
|
49
|
-
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
50
|
-
d: "M6 18V13",
|
|
51
|
-
stroke: "#1F7499",
|
|
52
|
-
"stroke-width": "2",
|
|
53
|
-
"stroke-linecap": "round",
|
|
54
|
-
"stroke-linejoin": "round"
|
|
55
|
-
}));
|
|
56
|
-
|
|
57
|
-
case 'Line':
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
59
|
-
width: "24",
|
|
60
|
-
height: "24",
|
|
61
|
-
viewBox: "0 0 24 25",
|
|
62
|
-
fill: "none",
|
|
63
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement("rect", {
|
|
65
|
-
y: "0.5",
|
|
66
|
-
width: "24",
|
|
67
|
-
height: "24",
|
|
68
|
-
rx: "4",
|
|
69
|
-
fill: "#EAF2FF"
|
|
70
|
-
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
71
|
-
d: "M21 8L15.2544 13.2668C14.1075 14.3181 12.3288 14.3014 11.1818 13.25V13.25C10.0349 12.1986 8.25615 12.1819 7.10919 13.2332L3 17",
|
|
72
|
-
stroke: "#1F7499",
|
|
73
|
-
"stroke-width": "2",
|
|
74
|
-
"stroke-linecap": "round",
|
|
75
|
-
"stroke-linejoin": "round"
|
|
76
|
-
}));
|
|
77
|
-
|
|
78
|
-
default:
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var ChartTypeSwitcherIcon = function ChartTypeSwitcherIcon(_ref) {
|
|
84
|
-
var iconType = _ref.iconType,
|
|
85
|
-
isActive = _ref.isActive,
|
|
86
|
-
className = _ref.className,
|
|
87
|
-
onClick = _ref.onClick;
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
-
className: (0, _classnames.default)(RC, (0, _defineProperty2.default)({}, "".concat(RC, "_active"), isActive), className),
|
|
90
|
-
onClick: onClick
|
|
91
|
-
}, getIcon(iconType));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
var _default = ChartTypeSwitcherIcon;
|
|
95
|
-
exports.default = _default;
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.componentOptions = exports.iconModels = exports.chartTypeKeysFormatter = exports.default = exports.reactChartJsOptionsLayouts = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _Chart = require("./Chart.constants");
|
|
13
|
-
|
|
14
|
-
var _reactChartJsOptionsL, _reactChartJsOptionsL2, _reactChartJsOptionsL3, _reactChartJsOptionsL4, _reactChartJsOptionsL5, _reactChartJsOptionsL6, _reactChartJsOptionsL7, _reactChartJsOptionsL8, _reactChartJsOptionsL9, _reactChartJsOptionsL10, _reactChartJsOptionsL11, _reactChartJsOptionsL12, _reactChartJsOptionsL13, _reactChartJsOptionsL14, _reactChartJsOptionsL15, _reactChartJsOptionsL16, _reactChartJsOptionsL17, _reactChartJsOptionsL18, _reactChartJsOptionsL19, _reactChartJsOptionsL20, _reactChartJsOptionsL21, _reactChartJsOptionsL22, _reactChartJsOptionsL23, _reactChartJsOptionsL24, _reactChartJsOptionsL25, _finturfChartLine$opt, _finturfChartLine$opt2, _finturfChartLine$opt3, _reactChartJsOptions;
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
// options constructors for ChartJS
|
|
21
|
-
var reactChartJsOptionsLayouts = {
|
|
22
|
-
lineIconLayout: {
|
|
23
|
-
options: {
|
|
24
|
-
responsive: true,
|
|
25
|
-
maintainAspectRatio: false,
|
|
26
|
-
scales: {
|
|
27
|
-
x: {
|
|
28
|
-
display: false
|
|
29
|
-
},
|
|
30
|
-
y: {
|
|
31
|
-
display: false
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
elements: {
|
|
35
|
-
point: {
|
|
36
|
-
radius: 0
|
|
37
|
-
},
|
|
38
|
-
line: {
|
|
39
|
-
tension: 0.45,
|
|
40
|
-
borderJoinStyle: 'round',
|
|
41
|
-
borderWidth: 1,
|
|
42
|
-
capBezierPoints: true
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
plugins: {},
|
|
47
|
-
redraw: true,
|
|
48
|
-
notLibraryOptions: {
|
|
49
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
50
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
51
|
-
// => Файл Chart.js => определение ChartComponent
|
|
52
|
-
chartTypeKey: 'Line',
|
|
53
|
-
changeData: {},
|
|
54
|
-
setCanvasDimensions: {
|
|
55
|
-
width: '75px',
|
|
56
|
-
height: '35px'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
lineLayout: {
|
|
61
|
-
options: {
|
|
62
|
-
responsive: true,
|
|
63
|
-
scales: {
|
|
64
|
-
x: {
|
|
65
|
-
grid: {
|
|
66
|
-
display: false,
|
|
67
|
-
offset: true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
y: {
|
|
71
|
-
min: 0,
|
|
72
|
-
bounds: 'data',
|
|
73
|
-
title: {// color: '#A0A4B0',
|
|
74
|
-
// color: '#32A784',
|
|
75
|
-
// font: '',
|
|
76
|
-
// padding: {
|
|
77
|
-
// right: 25,
|
|
78
|
-
// bottom: 10,
|
|
79
|
-
// },
|
|
80
|
-
},
|
|
81
|
-
grid: {
|
|
82
|
-
borderColor: '#E1E8F1',
|
|
83
|
-
color: '#E1E8F1',
|
|
84
|
-
borderDash: [5],
|
|
85
|
-
// borderDashOffset: 12,
|
|
86
|
-
drawTicks: false,
|
|
87
|
-
z: -1
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
elements: {
|
|
92
|
-
point: {
|
|
93
|
-
radius: 4,
|
|
94
|
-
pointStyle: 'circle',
|
|
95
|
-
backgroundColor: '#FFFFFF',
|
|
96
|
-
color: '#FFFFFF'
|
|
97
|
-
},
|
|
98
|
-
line: {
|
|
99
|
-
tension: 0.45,
|
|
100
|
-
borderWidth: 2,
|
|
101
|
-
borderJoinStyle: 'round',
|
|
102
|
-
capBezierPoints: true
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
plugins: {},
|
|
107
|
-
redraw: true,
|
|
108
|
-
notLibraryOptions: {
|
|
109
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
110
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
111
|
-
// => Файл Chart.js => определение ChartComponent
|
|
112
|
-
chartTypeKey: 'Line'
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
barLayout: {
|
|
116
|
-
options: {
|
|
117
|
-
responsive: true,
|
|
118
|
-
scales: {
|
|
119
|
-
x: {
|
|
120
|
-
grid: {
|
|
121
|
-
display: false,
|
|
122
|
-
offset: true
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
y: {
|
|
126
|
-
min: 0,
|
|
127
|
-
bounds: 'data',
|
|
128
|
-
title: {// color: '#A0A4B0',
|
|
129
|
-
// color: '#32A784',
|
|
130
|
-
// font: '',
|
|
131
|
-
// padding: {
|
|
132
|
-
// right: 25,
|
|
133
|
-
// bottom: 10,
|
|
134
|
-
// },
|
|
135
|
-
},
|
|
136
|
-
grid: {
|
|
137
|
-
borderColor: '#E1E8F1',
|
|
138
|
-
color: '#E1E8F1',
|
|
139
|
-
borderDash: [5],
|
|
140
|
-
drawTicks: false,
|
|
141
|
-
z: -1
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
elements: {
|
|
146
|
-
bar: {
|
|
147
|
-
borderRadius: 5
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
plugins: {},
|
|
152
|
-
redraw: true,
|
|
153
|
-
notLibraryOptions: {
|
|
154
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
155
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
156
|
-
// => Файл Chart.js => определение ChartComponent
|
|
157
|
-
chartTypeKey: 'Bar'
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
exports.reactChartJsOptionsLayouts = reactChartJsOptionsLayouts;
|
|
162
|
-
|
|
163
|
-
var addGradient = function addGradient(currentOptions, gradientObj) {
|
|
164
|
-
var _currentOptions$notLi;
|
|
165
|
-
|
|
166
|
-
return _objectSpread(_objectSpread({}, currentOptions), {}, {
|
|
167
|
-
notLibraryOptions: _objectSpread(_objectSpread({}, currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.notLibraryOptions), {}, {
|
|
168
|
-
changeData: _objectSpread(_objectSpread({}, currentOptions === null || currentOptions === void 0 ? void 0 : (_currentOptions$notLi = currentOptions.notLibraryOptions) === null || _currentOptions$notLi === void 0 ? void 0 : _currentOptions$notLi.changeData), {}, {
|
|
169
|
-
addGradient: gradientObj
|
|
170
|
-
})
|
|
171
|
-
})
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
var getLineIconLayoutOptionsAlongWithGradient = function getLineIconLayoutOptionsAlongWithGradient(gradientObj) {
|
|
176
|
-
return _objectSpread({}, addGradient(reactChartJsOptionsLayouts.lineIconLayout, gradientObj));
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
var finturfChartBar = _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts.barLayout), {}, {
|
|
180
|
-
options: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL = reactChartJsOptionsLayouts.barLayout) === null || _reactChartJsOptionsL === void 0 ? void 0 : _reactChartJsOptionsL.options), {}, {
|
|
181
|
-
maintainAspectRatio: false,
|
|
182
|
-
elements: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL2 = reactChartJsOptionsLayouts.barLayout) === null || _reactChartJsOptionsL2 === void 0 ? void 0 : (_reactChartJsOptionsL3 = _reactChartJsOptionsL2.options) === null || _reactChartJsOptionsL3 === void 0 ? void 0 : _reactChartJsOptionsL3.elements), {}, {
|
|
183
|
-
bar: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL4 = reactChartJsOptionsLayouts.barLayout) === null || _reactChartJsOptionsL4 === void 0 ? void 0 : (_reactChartJsOptionsL5 = _reactChartJsOptionsL4.options) === null || _reactChartJsOptionsL5 === void 0 ? void 0 : (_reactChartJsOptionsL6 = _reactChartJsOptionsL5.elements) === null || _reactChartJsOptionsL6 === void 0 ? void 0 : _reactChartJsOptionsL6.bar), {}, {
|
|
184
|
-
borderRadius: 10
|
|
185
|
-
})
|
|
186
|
-
})
|
|
187
|
-
}),
|
|
188
|
-
notLibraryOptions: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL7 = reactChartJsOptionsLayouts.barLayout) === null || _reactChartJsOptionsL7 === void 0 ? void 0 : _reactChartJsOptionsL7.notLibraryOptions), {}, {
|
|
189
|
-
changeData: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL8 = reactChartJsOptionsLayouts.barLayout) === null || _reactChartJsOptionsL8 === void 0 ? void 0 : (_reactChartJsOptionsL9 = _reactChartJsOptionsL8.notLibraryOptions) === null || _reactChartJsOptionsL9 === void 0 ? void 0 : _reactChartJsOptionsL9.changeData), {}, {
|
|
190
|
-
setMaxBarThickness: 20
|
|
191
|
-
}),
|
|
192
|
-
setCanvasDimensions: {
|
|
193
|
-
height: '194px'
|
|
194
|
-
}
|
|
195
|
-
})
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
var finturfChartLine = _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts.lineLayout), {}, {
|
|
199
|
-
options: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL10 = reactChartJsOptionsLayouts.lineLayout) === null || _reactChartJsOptionsL10 === void 0 ? void 0 : _reactChartJsOptionsL10.options), {}, {
|
|
200
|
-
maintainAspectRatio: false,
|
|
201
|
-
scales: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL11 = reactChartJsOptionsLayouts.lineLayout) === null || _reactChartJsOptionsL11 === void 0 ? void 0 : (_reactChartJsOptionsL12 = _reactChartJsOptionsL11.options) === null || _reactChartJsOptionsL12 === void 0 ? void 0 : _reactChartJsOptionsL12.scales), {}, {
|
|
202
|
-
y: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL13 = reactChartJsOptionsLayouts.lineLayout) === null || _reactChartJsOptionsL13 === void 0 ? void 0 : (_reactChartJsOptionsL14 = _reactChartJsOptionsL13.options) === null || _reactChartJsOptionsL14 === void 0 ? void 0 : _reactChartJsOptionsL14.scales.y), {}, {
|
|
203
|
-
title: _objectSpread({}, (_reactChartJsOptionsL15 = reactChartJsOptionsLayouts.lineLayout) === null || _reactChartJsOptionsL15 === void 0 ? void 0 : (_reactChartJsOptionsL16 = _reactChartJsOptionsL15.options) === null || _reactChartJsOptionsL16 === void 0 ? void 0 : (_reactChartJsOptionsL17 = _reactChartJsOptionsL16.scales) === null || _reactChartJsOptionsL17 === void 0 ? void 0 : (_reactChartJsOptionsL18 = _reactChartJsOptionsL17.y) === null || _reactChartJsOptionsL18 === void 0 ? void 0 : _reactChartJsOptionsL18.title),
|
|
204
|
-
grid: _objectSpread({}, (_reactChartJsOptionsL19 = reactChartJsOptionsLayouts.lineLayout) === null || _reactChartJsOptionsL19 === void 0 ? void 0 : (_reactChartJsOptionsL20 = _reactChartJsOptionsL19.options) === null || _reactChartJsOptionsL20 === void 0 ? void 0 : (_reactChartJsOptionsL21 = _reactChartJsOptionsL20.scales) === null || _reactChartJsOptionsL21 === void 0 ? void 0 : (_reactChartJsOptionsL22 = _reactChartJsOptionsL21.y) === null || _reactChartJsOptionsL22 === void 0 ? void 0 : _reactChartJsOptionsL22.grid)
|
|
205
|
-
})
|
|
206
|
-
}),
|
|
207
|
-
elements: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL23 = reactChartJsOptionsLayouts.lineLayout.options) === null || _reactChartJsOptionsL23 === void 0 ? void 0 : _reactChartJsOptionsL23.elements), {}, {
|
|
208
|
-
point: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL24 = reactChartJsOptionsLayouts.lineLayout.options) === null || _reactChartJsOptionsL24 === void 0 ? void 0 : (_reactChartJsOptionsL25 = _reactChartJsOptionsL24.elements) === null || _reactChartJsOptionsL25 === void 0 ? void 0 : _reactChartJsOptionsL25.point), {}, {
|
|
209
|
-
borderColor: '#32A784'
|
|
210
|
-
})
|
|
211
|
-
})
|
|
212
|
-
}),
|
|
213
|
-
notLibraryOptions: _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts.lineLayout.notLibraryOptions), {}, {
|
|
214
|
-
setCanvasDimensions: {
|
|
215
|
-
height: '194px'
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
var finturfLoadingModeBar = _objectSpread(_objectSpread({}, finturfChartBar), {}, {
|
|
221
|
-
options: _objectSpread(_objectSpread({}, finturfChartBar.options), {}, {
|
|
222
|
-
animation: false
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
var finturfLoadingModeLine = _objectSpread(_objectSpread({}, finturfChartLine), {}, {
|
|
227
|
-
options: _objectSpread(_objectSpread({}, finturfChartLine.options), {}, {
|
|
228
|
-
elements: _objectSpread(_objectSpread({}, (_finturfChartLine$opt = finturfChartLine.options) === null || _finturfChartLine$opt === void 0 ? void 0 : _finturfChartLine$opt.elements), {}, {
|
|
229
|
-
point: _objectSpread(_objectSpread({}, (_finturfChartLine$opt2 = finturfChartLine.options) === null || _finturfChartLine$opt2 === void 0 ? void 0 : (_finturfChartLine$opt3 = _finturfChartLine$opt2.elements) === null || _finturfChartLine$opt3 === void 0 ? void 0 : _finturfChartLine$opt3.point), {}, {
|
|
230
|
-
borderColor: '#E1E8F1'
|
|
231
|
-
})
|
|
232
|
-
}),
|
|
233
|
-
animations: {
|
|
234
|
-
y: false
|
|
235
|
-
} // transitions: {
|
|
236
|
-
// show: {
|
|
237
|
-
// animations: {
|
|
238
|
-
// x: false,
|
|
239
|
-
// y: false,
|
|
240
|
-
// }
|
|
241
|
-
// },
|
|
242
|
-
// hide: {
|
|
243
|
-
// animations: {
|
|
244
|
-
// x: false,
|
|
245
|
-
// y: false,
|
|
246
|
-
// }
|
|
247
|
-
// },
|
|
248
|
-
// },
|
|
249
|
-
|
|
250
|
-
})
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
var reactChartJsOptions = (_reactChartJsOptions = {
|
|
254
|
-
finturfChartBar: _objectSpread({}, addGradient(finturfChartBar, _Chart.GRADIENT_OBJECTS.finturf.bar)),
|
|
255
|
-
finturfChartBarLoadingMode: _objectSpread({}, finturfChartBar),
|
|
256
|
-
finturfChartLine: _objectSpread({}, addGradient(finturfChartLine, _Chart.GRADIENT_OBJECTS.finturf.line)),
|
|
257
|
-
finturfChartLineLoadingMode: _objectSpread({}, finturfChartLine),
|
|
258
|
-
finturfPositiveLineIcon: _objectSpread({}, addGradient(reactChartJsOptionsLayouts.lineIconLayout, _Chart.GRADIENT_OBJECTS.finturf.line))
|
|
259
|
-
}, (0, _defineProperty2.default)(_reactChartJsOptions, "finturfPositiveLineIcon", _objectSpread({}, addGradient(reactChartJsOptionsLayouts.lineIconLayout, _objectSpread(_objectSpread({}, _Chart.GRADIENT_OBJECTS.finturf.line), {}, {
|
|
260
|
-
colors: _Chart.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE
|
|
261
|
-
})))), (0, _defineProperty2.default)(_reactChartJsOptions, "finturfPositiveLineIcon", getLineIconLayoutOptionsAlongWithGradient({
|
|
262
|
-
gradientTargetPropertyName: 'borderColor',
|
|
263
|
-
colors: ['#53D1AD', '#389AA3'],
|
|
264
|
-
direction: 'toRight'
|
|
265
|
-
})), (0, _defineProperty2.default)(_reactChartJsOptions, "finturfNegativeLineIcon", getLineIconLayoutOptionsAlongWithGradient({
|
|
266
|
-
gradientTargetPropertyName: 'borderColor',
|
|
267
|
-
colors: ['#FDB4DB', '#FA2E69'],
|
|
268
|
-
direction: 'toRight'
|
|
269
|
-
})), (0, _defineProperty2.default)(_reactChartJsOptions, "finturfLoadingModeBar", finturfLoadingModeBar), (0, _defineProperty2.default)(_reactChartJsOptions, "finturfLoadingModeLine", finturfLoadingModeLine), _reactChartJsOptions);
|
|
270
|
-
var _default = reactChartJsOptions; // Chart component constructors
|
|
271
|
-
|
|
272
|
-
exports.default = _default;
|
|
273
|
-
var chartTypeKeysFormatter = {
|
|
274
|
-
finturfChartBar: 'Bar',
|
|
275
|
-
finturfChartLine: 'Line',
|
|
276
|
-
finturfPositiveLineIcon: 'Line',
|
|
277
|
-
finturfNegativeLineIcon: 'Line'
|
|
278
|
-
};
|
|
279
|
-
exports.chartTypeKeysFormatter = chartTypeKeysFormatter;
|
|
280
|
-
var iconModels = ['lineIconLayout', 'finturfPositiveLineIcon', 'finturfNegativeLineIcon'];
|
|
281
|
-
exports.iconModels = iconModels;
|
|
282
|
-
var componentOptions = {
|
|
283
|
-
disableDescriptionsFor: [].concat(iconModels),
|
|
284
|
-
disableChartTypeSwitcherFor: [].concat(iconModels)
|
|
285
|
-
};
|
|
286
|
-
exports.componentOptions = componentOptions;
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.prepareData = exports.createGradient = exports.getChartTypeKey = exports.getOptions = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _optionsConstructor = _interopRequireDefault(require("./optionsConstructor"));
|
|
15
|
-
|
|
16
|
-
var _Chart = require("./Chart.constants");
|
|
17
|
-
|
|
18
|
-
var _utils = require("../../../../../../JS/Functions/utils");
|
|
19
|
-
|
|
20
|
-
var _excluded = ["notLibraryOptions"];
|
|
21
|
-
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
|
-
|
|
26
|
-
var getOptions = function getOptions(model) {
|
|
27
|
-
return _optionsConstructor.default[model] || {};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.getOptions = getOptions;
|
|
31
|
-
|
|
32
|
-
var getChartTypeKey = function getChartTypeKey(model) {
|
|
33
|
-
var _optionsConstructor$m, _optionsConstructor$m2, _optionsConstructor$D, _optionsConstructor$D2;
|
|
34
|
-
|
|
35
|
-
return ((_optionsConstructor$m = _optionsConstructor.default[model]) === null || _optionsConstructor$m === void 0 ? void 0 : (_optionsConstructor$m2 = _optionsConstructor$m.notLibraryOptions) === null || _optionsConstructor$m2 === void 0 ? void 0 : _optionsConstructor$m2.chartTypeKey) || ((_optionsConstructor$D = _optionsConstructor.default[_Chart.DEFAULT_CHART_MODEL]) === null || _optionsConstructor$D === void 0 ? void 0 : (_optionsConstructor$D2 = _optionsConstructor$D.notLibraryOptions) === null || _optionsConstructor$D2 === void 0 ? void 0 : _optionsConstructor$D2.chartTypeKey);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.getChartTypeKey = getChartTypeKey;
|
|
39
|
-
|
|
40
|
-
var createGradient = function createGradient(_ref) {
|
|
41
|
-
var ctx = _ref.ctx,
|
|
42
|
-
area = _ref.area,
|
|
43
|
-
colors = _ref.colors,
|
|
44
|
-
direction = _ref.direction,
|
|
45
|
-
correctionFactors = _ref.correctionFactors;
|
|
46
|
-
|
|
47
|
-
var getStartGradient = function getStartGradient() {
|
|
48
|
-
switch (direction) {
|
|
49
|
-
case 'toTop-toRight':
|
|
50
|
-
return ctx.createLinearGradient(area.left, area.bottom, area.right, area.top);
|
|
51
|
-
|
|
52
|
-
case 'toTop-toLeft':
|
|
53
|
-
return ctx.createLinearGradient(area.right, area.bottom, area.left, area.top);
|
|
54
|
-
|
|
55
|
-
case 'toBottom-toRight':
|
|
56
|
-
return ctx.createLinearGradient(area.left, area.top, area.right, area.bottom);
|
|
57
|
-
|
|
58
|
-
case 'toBottom-toLeft':
|
|
59
|
-
return ctx.createLinearGradient(area.right, area.top, area.left, area.bottom);
|
|
60
|
-
|
|
61
|
-
case 'toBottom':
|
|
62
|
-
return ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
63
|
-
|
|
64
|
-
case 'toTop':
|
|
65
|
-
return ctx.createLinearGradient(0, area.bottom, 0, area.top);
|
|
66
|
-
|
|
67
|
-
case 'toLeft':
|
|
68
|
-
return ctx.createLinearGradient(area.right, 0, area.left, 0);
|
|
69
|
-
|
|
70
|
-
case 'toRight':
|
|
71
|
-
default:
|
|
72
|
-
return ctx.createLinearGradient(area.left, 0, area.right, 0);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
var getGradientWithPoints = function getGradientWithPoints(corection) {
|
|
77
|
-
var newGradient = getStartGradient();
|
|
78
|
-
var INACCURACY = 0.01;
|
|
79
|
-
var staptPoint = corection && corection + INACCURACY < 1 ? 1 - corection - INACCURACY : 0;
|
|
80
|
-
if (corection) newGradient.addColorStop(0, colors[0]);
|
|
81
|
-
colors.forEach(function (color, idx) {
|
|
82
|
-
var point = function () {
|
|
83
|
-
if (!idx) return staptPoint;
|
|
84
|
-
if (idx === colors.length - 1) return 1;
|
|
85
|
-
return (corection || 1) / (colors.length - 1) * idx + staptPoint;
|
|
86
|
-
}();
|
|
87
|
-
|
|
88
|
-
newGradient.addColorStop(point.toFixed(2), color);
|
|
89
|
-
});
|
|
90
|
-
return newGradient;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
return correctionFactors ? correctionFactors.map(function (fraction) {
|
|
94
|
-
return getGradientWithPoints(fraction);
|
|
95
|
-
}) : getGradientWithPoints();
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
exports.createGradient = createGradient;
|
|
99
|
-
|
|
100
|
-
var prepareData = function prepareData(model, data, chart) {
|
|
101
|
-
if (!chart) return data;
|
|
102
|
-
|
|
103
|
-
var _getOptions = getOptions(model),
|
|
104
|
-
notLibraryOptions = _getOptions.notLibraryOptions,
|
|
105
|
-
libraryOptions = (0, _objectWithoutProperties2.default)(_getOptions, _excluded);
|
|
106
|
-
|
|
107
|
-
var dataPreparationIterationsKeys = notLibraryOptions !== null && notLibraryOptions !== void 0 && notLibraryOptions.changeData ? Object.keys(notLibraryOptions.changeData) : [];
|
|
108
|
-
|
|
109
|
-
var changeData = function changeData(currentData, iterationKey) {
|
|
110
|
-
switch (iterationKey) {
|
|
111
|
-
case 'addGradient':
|
|
112
|
-
var addGradient = notLibraryOptions.changeData.addGradient;
|
|
113
|
-
return _objectSpread(_objectSpread({}, currentData), {}, {
|
|
114
|
-
datasets: currentData.datasets.map(function (dataset) {
|
|
115
|
-
return _objectSpread(_objectSpread({}, dataset), {}, (0, _defineProperty2.default)({}, addGradient.gradientTargetPropertyName, createGradient({
|
|
116
|
-
ctx: chart.ctx,
|
|
117
|
-
area: chart.chartArea,
|
|
118
|
-
colors: addGradient.colors,
|
|
119
|
-
direction: addGradient.direction,
|
|
120
|
-
correctionFactors: addGradient.typeDistributionOfGradientPoints === 'personalBase' ? dataset.data.map(function (value) {
|
|
121
|
-
return value / Math.max.apply(null, dataset.data);
|
|
122
|
-
}) : null
|
|
123
|
-
})));
|
|
124
|
-
})
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
case 'setMaxBarThickness':
|
|
128
|
-
var setMaxBarThickness = notLibraryOptions.changeData.setMaxBarThickness;
|
|
129
|
-
return _objectSpread(_objectSpread({}, currentData), {}, {
|
|
130
|
-
datasets: currentData.datasets.map(function (dataset) {
|
|
131
|
-
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
132
|
-
maxBarThickness: setMaxBarThickness
|
|
133
|
-
});
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
return currentData;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
return dataPreparationIterationsKeys.reduce(function (acc, iterationKey) {
|
|
143
|
-
return changeData(acc, iterationKey);
|
|
144
|
-
}, (0, _utils.clone)(data));
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
exports.prepareData = prepareData;
|