amazing-react-charts 1.2.0 → 1.2.2
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.
|
@@ -65,9 +65,7 @@ var StackedBarChart = function StackedBarChart(props) {
|
|
|
65
65
|
aditionalData = _data.slice(5);
|
|
66
66
|
var yBottomData = bottomData.map(verifyStyleProps);
|
|
67
67
|
var yTopData = topData.map(verifyStyleProps);
|
|
68
|
-
var yExtraData = data.length >= 4 && extraData.map(
|
|
69
|
-
return item.result;
|
|
70
|
-
});
|
|
68
|
+
var yExtraData = data.length >= 4 && extraData.map(verifyStyleProps);
|
|
71
69
|
var yBottomValue = yBottomData.map(function (item) {
|
|
72
70
|
return (0, _typeof2["default"])(item) === 'object' ? item.value : item;
|
|
73
71
|
});
|
package/lib/auxiliarFunctions.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.truncateLabel = exports.toDate = exports.toArgDateFns = exports.timeConvert = exports.thousandSeparator = exports.takeLabelComplement = exports.takeDonutChartComplement = exports.mountMessage = exports.monuntTimeMessage = exports.getWidthOpts = exports.getSaveAsImageWithTitle = exports.getSaveAsImage = exports.getPercentage = exports.getInitialValues = exports.getDomain = exports.getDateFormatType = exports.getDataView = exports.generateAuxMessage = exports.formatTooltipWithHours = exports.formatTooltip = exports.formatTime = exports.formatLabelWithImage = exports.fixedTruncateLabel = exports.fixedDomain = exports.convertImageToBase64FromUrl = exports.changeSpaceForUnderline = exports.ICON_STYLE = exports.DOWNLOAD_ICON = exports.DATA_VIEW_ICON = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _dateFns = require("date-fns");
|
|
10
|
-
var
|
|
10
|
+
var _ptBR = require("date-fns/locale/pt-BR");
|
|
11
11
|
var _theme = require("flipper-ui/theme");
|
|
12
12
|
var _theme$colors = _theme.theme.colors,
|
|
13
13
|
neutral = _theme$colors.neutral,
|
|
@@ -38,7 +38,8 @@ var formatValueAxis = function formatValueAxis(value, complement, typeChart) {
|
|
|
38
38
|
return complement === '%' || complement === 'percent' ? formatValueIfComplementPercent : getTime;
|
|
39
39
|
};
|
|
40
40
|
var takeComplement = function takeComplement(data, complement) {
|
|
41
|
-
|
|
41
|
+
var value = (0, _typeof2["default"])(data) === 'object' ? data.value : data;
|
|
42
|
+
return typeof complement === 'function' ? ': ' + complement(value) + '<br>' : ': ' + value + complement + '<br>';
|
|
42
43
|
};
|
|
43
44
|
var moneyWithPercentage = function moneyWithPercentage(moneyValue, moneyValueTotal, complement, sumDataValues) {
|
|
44
45
|
var value = (0, _typeof2["default"])(moneyValue) === 'object' ? moneyValue.value : moneyValue;
|
|
@@ -86,7 +87,7 @@ var formatTime = exports.formatTime = function formatTime(text) {
|
|
|
86
87
|
var hasTime = text.includes(':');
|
|
87
88
|
var date = hasTime ? new Date(text) : new Date(text + 'T00:00:00');
|
|
88
89
|
return (0, _dateFns.format)(toArgDateFns(date), dateFormat, {
|
|
89
|
-
locale:
|
|
90
|
+
locale: _ptBR.ptBR
|
|
90
91
|
});
|
|
91
92
|
};
|
|
92
93
|
var toDate = exports.toDate = function toDate(text, format) {
|
|
@@ -97,12 +98,12 @@ var formatTooltip = exports.formatTooltip = function formatTooltip(text) {
|
|
|
97
98
|
var hasTime = text.includes(':');
|
|
98
99
|
var date = hasTime ? new Date(text) : new Date(text + 'T00:00:00');
|
|
99
100
|
return (0, _dateFns.format)(toArgDateFns(date), getDateFormatType(dateFormat), {
|
|
100
|
-
locale:
|
|
101
|
+
locale: _ptBR.ptBR
|
|
101
102
|
});
|
|
102
103
|
};
|
|
103
104
|
var formatTooltipWithHours = exports.formatTooltipWithHours = function formatTooltipWithHours(text) {
|
|
104
105
|
return (0, _dateFns.format)(toArgDateFns(new Date(text)), 'dd/MM/yyyy HH:mm', {
|
|
105
|
-
locale:
|
|
106
|
+
locale: _ptBR.ptBR
|
|
106
107
|
});
|
|
107
108
|
};
|
|
108
109
|
var truncateLabel = exports.truncateLabel = function truncateLabel(text, labelWordSize) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amazing-react-charts",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "An amazing react charts package based in echarts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,51 +34,51 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/cli": "7.26.4",
|
|
37
|
-
"@babel/core": "7.26.
|
|
37
|
+
"@babel/core": "7.26.9",
|
|
38
38
|
"@babel/plugin-transform-modules-commonjs": "7.26.3",
|
|
39
|
-
"@babel/plugin-transform-runtime": "7.
|
|
40
|
-
"@babel/preset-env": "7.26.
|
|
39
|
+
"@babel/plugin-transform-runtime": "7.26.9",
|
|
40
|
+
"@babel/preset-env": "7.26.9",
|
|
41
41
|
"@babel/preset-react": "7.26.3",
|
|
42
42
|
"@babel/preset-typescript": "7.26.0",
|
|
43
|
-
"@storybook/addon-essentials": "8.
|
|
44
|
-
"@storybook/addon-webpack5-compiler-babel": "3.0.
|
|
45
|
-
"@storybook/blocks": "8.
|
|
46
|
-
"@storybook/react": "8.
|
|
47
|
-
"@storybook/react-webpack5": "8.
|
|
48
|
-
"@stylistic/eslint-plugin": "
|
|
43
|
+
"@storybook/addon-essentials": "8.5.8",
|
|
44
|
+
"@storybook/addon-webpack5-compiler-babel": "3.0.5",
|
|
45
|
+
"@storybook/blocks": "8.5.8",
|
|
46
|
+
"@storybook/react": "8.5.8",
|
|
47
|
+
"@storybook/react-webpack5": "8.5.8",
|
|
48
|
+
"@stylistic/eslint-plugin": "4.0.1",
|
|
49
49
|
"@testing-library/dom": "10.4.0",
|
|
50
50
|
"@testing-library/jest-dom": "6.6.3",
|
|
51
|
-
"@testing-library/react": "16.
|
|
52
|
-
"@testing-library/user-event": "14.
|
|
51
|
+
"@testing-library/react": "16.2.0",
|
|
52
|
+
"@testing-library/user-event": "14.6.1",
|
|
53
53
|
"@types/jest": "29.5.14",
|
|
54
|
-
"@types/node": "22.
|
|
54
|
+
"@types/node": "22.13.4",
|
|
55
55
|
"@types/ramda": "0.30.2",
|
|
56
56
|
"@types/react": "18.3.12",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
58
|
-
"@typescript-eslint/parser": "8.
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "8.24.1",
|
|
58
|
+
"@typescript-eslint/parser": "8.24.1",
|
|
59
59
|
"canvas": "2.11.2",
|
|
60
60
|
"date-fns": "4.1.0",
|
|
61
|
-
"eslint": "9.
|
|
62
|
-
"eslint-config-prettier": "
|
|
63
|
-
"eslint-import-resolver-typescript": "3.
|
|
61
|
+
"eslint": "9.20.1",
|
|
62
|
+
"eslint-config-prettier": "10.0.1",
|
|
63
|
+
"eslint-import-resolver-typescript": "3.8.3",
|
|
64
64
|
"eslint-plugin-import": "2.31.0",
|
|
65
|
-
"eslint-plugin-prettier": "5.2.
|
|
66
|
-
"eslint-plugin-react": "7.37.
|
|
65
|
+
"eslint-plugin-prettier": "5.2.3",
|
|
66
|
+
"eslint-plugin-react": "7.37.4",
|
|
67
67
|
"eslint-plugin-react-hooks": "5.1.0",
|
|
68
|
-
"flipper-ui": "0.35.
|
|
68
|
+
"flipper-ui": "0.35.6",
|
|
69
69
|
"jest": "29.7.0",
|
|
70
70
|
"jest-environment-jsdom": "29.7.0",
|
|
71
|
-
"prettier": "3.
|
|
71
|
+
"prettier": "3.5.1",
|
|
72
72
|
"ramda": "0.30.1",
|
|
73
73
|
"react": "18.3.1",
|
|
74
74
|
"react-dom": "18.3.1",
|
|
75
|
-
"storybook": "8.
|
|
76
|
-
"styled-components": "6.1.
|
|
75
|
+
"storybook": "8.5.8",
|
|
76
|
+
"styled-components": "6.1.15",
|
|
77
77
|
"ts-jest": "29.2.5",
|
|
78
78
|
"ts-node": "10.9.2",
|
|
79
|
-
"typescript": "5.7.
|
|
80
|
-
"typescript-eslint": "8.
|
|
81
|
-
"webpack": "5.
|
|
79
|
+
"typescript": "5.7.3",
|
|
80
|
+
"typescript-eslint": "8.24.1",
|
|
81
|
+
"webpack": "5.98.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"date-fns": "^4.0.0",
|