@auth0/quantum-charts 1.3.16 → 1.3.18
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/bar-chart/index.js +18 -9
- package/chart-card/index.js +18 -9
- package/chart-summary/data-table-chart.js +18 -9
- package/chart-summary/index.js +19 -9
- package/common/chart.d.ts +0 -1
- package/common/custom-legend.js +17 -7
- package/common/custom-tooltip.js +17 -7
- package/compare-aggregate/compare-aggregate.js +18 -9
- package/delta/delta.js +17 -7
- package/donut-chart/center.js +25 -13
- package/donut-chart/decoupled-legend.js +17 -7
- package/donut-chart/index.js +18 -9
- package/esm/donut-chart/center.js +9 -7
- package/esm/line-chart/custom-active-dot.js +2 -2
- package/esm/line-chart/index.js +10 -9
- package/line-chart/custom-active-dot.d.ts +1 -1
- package/line-chart/custom-active-dot.js +19 -9
- package/line-chart/custom-threshold-legend.js +17 -7
- package/line-chart/index.js +28 -18
- package/package.json +3 -3
- package/scorecard/index.js +18 -9
package/bar-chart/index.js
CHANGED
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __read = (this && this.__read) || function (o, n) {
|
|
37
47
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
48
|
if (!m) return o;
|
|
@@ -53,7 +63,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
53
63
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
64
|
};
|
|
55
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.BarChart =
|
|
66
|
+
exports.BarChart = BarChart;
|
|
57
67
|
var lodash_1 = __importDefault(require("lodash"));
|
|
58
68
|
var React = __importStar(require("react"));
|
|
59
69
|
var recharts_1 = require("recharts");
|
|
@@ -138,4 +148,3 @@ function BarChart(props) {
|
|
|
138
148
|
} },
|
|
139
149
|
React.createElement(quantum_product_1.Text, { variant: "subtitle1" }, "No data"))))));
|
|
140
150
|
}
|
|
141
|
-
exports.BarChart = BarChart;
|
package/chart-card/index.js
CHANGED
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ChartCard =
|
|
36
|
+
exports.ChartCard = ChartCard;
|
|
27
37
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
28
38
|
var React = __importStar(require("react"));
|
|
29
39
|
var chart_summary_1 = require("../chart-summary");
|
|
@@ -33,4 +43,3 @@ function ChartCard(props) {
|
|
|
33
43
|
React.createElement(chart_summary_1.ChartSummary, { title: title, value: value, dataTable: dataTable, helperText: helperText, label: label, headerAction: headerAction, showChartTable: showChartTable, allowDownload: allowDownload, additionalMenuItems: additionalMenuItems, customViewChartTable: customViewChartTable, triggerButtonSize: triggerButtonSize, chartStatus: chartStatus, titleIcon: titleIcon, finalMenuItem: finalMenuItem, isVertical: isVertical }),
|
|
34
44
|
children));
|
|
35
45
|
}
|
|
36
|
-
exports.ChartCard = ChartCard;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __read = (this && this.__read) || function (o, n) {
|
|
26
36
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
37
|
if (!m) return o;
|
|
@@ -42,7 +52,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
42
52
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
53
|
};
|
|
44
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.DataTableChart =
|
|
55
|
+
exports.DataTableChart = DataTableChart;
|
|
46
56
|
var lodash_1 = __importDefault(require("lodash"));
|
|
47
57
|
var React = __importStar(require("react"));
|
|
48
58
|
var date_fns_1 = require("date-fns");
|
|
@@ -86,4 +96,3 @@ function DataTableChart(props) {
|
|
|
86
96
|
] })));
|
|
87
97
|
}))))))));
|
|
88
98
|
}
|
|
89
|
-
exports.DataTableChart = DataTableChart;
|
package/chart-summary/index.js
CHANGED
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __read = (this && this.__read) || function (o, n) {
|
|
41
51
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42
52
|
if (!m) return o;
|
|
@@ -63,7 +73,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
63
73
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
64
74
|
};
|
|
65
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
-
exports.
|
|
76
|
+
exports.titleToAnalyticName = void 0;
|
|
77
|
+
exports.ChartSummary = ChartSummary;
|
|
67
78
|
var React = __importStar(require("react"));
|
|
68
79
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
69
80
|
var downloadCsv_1 = require("../helpers/downloadCsv");
|
|
@@ -185,5 +196,4 @@ function ChartSummary(props) {
|
|
|
185
196
|
label) }),
|
|
186
197
|
showChartTable && (React.createElement(data_table_chart_1.DataTableChart, { title: title, isOpen: isOpen, toggleIsOpen: toggleIsOpen, data: dataTable, customViewChartTable: customViewChartTable, allowDownload: allowDownload }))));
|
|
187
198
|
}
|
|
188
|
-
exports.ChartSummary = ChartSummary;
|
|
189
199
|
var templateObject_1, templateObject_2, templateObject_3;
|
package/common/chart.d.ts
CHANGED
package/common/custom-legend.js
CHANGED
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
47
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
48
|
};
|
package/common/custom-tooltip.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CompareAggregate =
|
|
36
|
+
exports.CompareAggregate = CompareAggregate;
|
|
27
37
|
var React = __importStar(require("react"));
|
|
28
38
|
var styles_1 = require("../styles");
|
|
29
39
|
var delta_1 = require("../delta");
|
|
@@ -37,4 +47,3 @@ function CompareAggregate(props) {
|
|
|
37
47
|
React.createElement(styles_1.DefaultCursorBox, null,
|
|
38
48
|
React.createElement(delta_1.Delta, { value: value, comparedValue: comparedValue, displayType: displayType, direction: direction })))));
|
|
39
49
|
}
|
|
40
|
-
exports.CompareAggregate = CompareAggregate;
|
package/delta/delta.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Delta = exports.computeDelta = void 0;
|
|
27
37
|
var React = __importStar(require("react"));
|
package/donut-chart/center.js
CHANGED
|
@@ -19,13 +19,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
19
19
|
}) : function(o, v) {
|
|
20
20
|
o["default"] = v;
|
|
21
21
|
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
29
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
40
|
var React = __importStar(require("react"));
|
|
31
41
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
@@ -51,12 +61,14 @@ var Center = function (props) {
|
|
|
51
61
|
};
|
|
52
62
|
return (React.createElement(CenterPositioning, null,
|
|
53
63
|
React.createElement(quantum_product_1.Box, null,
|
|
54
|
-
React.createElement(Aggregate, null, hasNoData
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
:
|
|
59
|
-
|
|
64
|
+
React.createElement(Aggregate, null, hasNoData ? (React.createElement("div", { style: {
|
|
65
|
+
display: 'grid',
|
|
66
|
+
placeItems: 'center',
|
|
67
|
+
height: '100%',
|
|
68
|
+
textAlign: 'center',
|
|
69
|
+
} },
|
|
70
|
+
React.createElement(quantum_product_1.Text, { variant: "subtitle1" }, "No data"))) : displayType === 'absolute' ? ((0, format_number_1.toShortCompactNotation)(aggregate)) : ((0, format_number_1.toPercentageAdaptive)(percentage(aggregate, sumValues(data)) / 100))),
|
|
71
|
+
hasNoData ? null : centerLabel)));
|
|
60
72
|
};
|
|
61
73
|
exports.default = Center;
|
|
62
74
|
var templateObject_1, templateObject_2;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
var React = __importStar(require("react"));
|
|
27
37
|
var quantum_product_1 = require("@auth0/quantum-product");
|
package/donut-chart/index.js
CHANGED
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __read = (this && this.__read) || function (o, n) {
|
|
37
47
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
48
|
if (!m) return o;
|
|
@@ -53,7 +63,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
53
63
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
64
|
};
|
|
55
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.DonutChart =
|
|
66
|
+
exports.DonutChart = DonutChart;
|
|
57
67
|
var React = __importStar(require("react"));
|
|
58
68
|
var recharts_1 = require("recharts");
|
|
59
69
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
@@ -104,4 +114,3 @@ function DonutChart(props) {
|
|
|
104
114
|
React.createElement(quantum_product_1.StackLayoutItem, null,
|
|
105
115
|
React.createElement(decoupled_legend_1.default, { activeIndex: activeIndex, setActiveIndex: setActiveIndex, data: data, color: color, statusColorMapping: statusColorMapping, isStacked: isStacked })))));
|
|
106
116
|
}
|
|
107
|
-
exports.DonutChart = DonutChart;
|
|
@@ -3,7 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { Box, styled } from '@auth0/quantum-product';
|
|
6
|
+
import { Box, styled, Text } from '@auth0/quantum-product';
|
|
7
7
|
import { toPercentageAdaptive, toShortCompactNotation } from '../helpers/format-number';
|
|
8
8
|
var sumValues = function (data) {
|
|
9
9
|
return data.reduce(function (accum, item) { return accum + item.value; }, 0);
|
|
@@ -26,12 +26,14 @@ var Center = function (props) {
|
|
|
26
26
|
};
|
|
27
27
|
return (React.createElement(CenterPositioning, null,
|
|
28
28
|
React.createElement(Box, null,
|
|
29
|
-
React.createElement(Aggregate, null, hasNoData
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
29
|
+
React.createElement(Aggregate, null, hasNoData ? (React.createElement("div", { style: {
|
|
30
|
+
display: 'grid',
|
|
31
|
+
placeItems: 'center',
|
|
32
|
+
height: '100%',
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
} },
|
|
35
|
+
React.createElement(Text, { variant: "subtitle1" }, "No data"))) : displayType === 'absolute' ? (toShortCompactNotation(aggregate)) : (toPercentageAdaptive(percentage(aggregate, sumValues(data)) / 100))),
|
|
36
|
+
hasNoData ? null : centerLabel)));
|
|
35
37
|
};
|
|
36
38
|
export default Center;
|
|
37
39
|
var templateObject_1, templateObject_2;
|
|
@@ -13,7 +13,7 @@ import * as React from 'react';
|
|
|
13
13
|
import { Dot } from 'recharts';
|
|
14
14
|
var CustomActiveDot = function (onMouseOver) { return function (props) {
|
|
15
15
|
return (React.createElement(React.Fragment, null,
|
|
16
|
-
React.createElement(Dot, __assign({}, props, { key: "outerDot", r:
|
|
17
|
-
React.createElement(Dot, __assign({}, props, { key: "innerDot", r:
|
|
16
|
+
React.createElement(Dot, __assign({}, props, { key: "outerDot", r: 6, strokeWidth: 0 }, (onMouseOver ? { onMouseOver: onMouseOver } : {}))),
|
|
17
|
+
React.createElement(Dot, __assign({}, props, { key: "innerDot", r: 2, style: { fill: 'white' } }, (onMouseOver ? { onMouseOver: onMouseOver } : {})))));
|
|
18
18
|
}; };
|
|
19
19
|
export default CustomActiveDot;
|
package/esm/line-chart/index.js
CHANGED
|
@@ -25,8 +25,8 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
25
25
|
}
|
|
26
26
|
return ar;
|
|
27
27
|
};
|
|
28
|
-
import _ from 'lodash';
|
|
29
28
|
import * as React from 'react';
|
|
29
|
+
import _ from 'lodash';
|
|
30
30
|
import { Area, CartesianGrid, ComposedChart, Legend, Line, ReferenceArea, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts';
|
|
31
31
|
import { useTheme, Text, DropdownMenu, useDropdownMenuState, Button, StackLayout, Divider, ChevronDownIcon, AlertDiamondIcon, IconButton, TableIcon, alpha, } from '@auth0/quantum-product';
|
|
32
32
|
import { getColorScale, getStatusColorForGroup } from '../theme';
|
|
@@ -60,7 +60,7 @@ export function LineChart(props) {
|
|
|
60
60
|
React.useEffect(function () {
|
|
61
61
|
setThreshold(thresholds === null || thresholds === void 0 ? void 0 : thresholds[0]);
|
|
62
62
|
setLineVisibility(__assign(__assign({}, ((thresholds === null || thresholds === void 0 ? void 0 : thresholds[0]) && { thresholdControl: false })), lineVisibility));
|
|
63
|
-
}, [thresholds]);
|
|
63
|
+
}, [thresholds, lineVisibility]);
|
|
64
64
|
var handleLegendMouseEnter = function (e) {
|
|
65
65
|
if (!lineVisibility[e.dataKey]) {
|
|
66
66
|
setLineVisibility(__assign(__assign({}, lineVisibility), { hover: e.dataKey }));
|
|
@@ -146,7 +146,8 @@ export function LineChart(props) {
|
|
|
146
146
|
}, [thresholds, menuProps]);
|
|
147
147
|
var headerActionWithThresholdDropdown = (React.createElement(StackLayout, { gutter: 1 },
|
|
148
148
|
!disableThresholdMenu && (React.createElement(React.Fragment, null,
|
|
149
|
-
React.createElement(Button, __assign({}, triggerProps, { startIcon: React.createElement(AlertDiamondIcon, null), endIcon: React.createElement(ChevronDownIcon, null), disabled: !threshold, variant: 'outlined', size: headerButtonsSize, label: threshold ? threshold.threshold_label : 'No threshold'
|
|
149
|
+
React.createElement(Button, __assign({}, triggerProps, { startIcon: React.createElement(AlertDiamondIcon, null), endIcon: React.createElement(ChevronDownIcon, null), disabled: !threshold, variant: 'outlined', size: headerButtonsSize, label: threshold ? threshold.threshold_label : 'No threshold', analyticsId: threshold &&
|
|
150
|
+
"security-center-button-".concat(titleToAnalyticName(threshold.evaluated_metric).replace(/_/g, '-'), "-select-threshold") })),
|
|
150
151
|
React.createElement(DropdownMenu, __assign({}, menuProps, { items: menuItems })),
|
|
151
152
|
showDividerInHeader && React.createElement(Divider, { orientation: "vertical" }))),
|
|
152
153
|
headerAction,
|
|
@@ -173,23 +174,23 @@ export function LineChart(props) {
|
|
|
173
174
|
setResponsiveContainerHeight(getContainerHeight());
|
|
174
175
|
setTimeout(function () {
|
|
175
176
|
setResponsiveContainerWidth('100%');
|
|
176
|
-
setVisibility(!!legendContainerHeight);
|
|
177
|
+
setVisibility(!!legendContainerHeight || data.length === 0); //force visibility true if there is no data
|
|
177
178
|
}, 10);
|
|
178
179
|
}
|
|
179
|
-
}, [legendContainerHeight]);
|
|
180
|
+
}, [legendContainerHeight, data.length]);
|
|
180
181
|
return (React.createElement(React.Fragment, null,
|
|
181
182
|
React.createElement(ChartCard, { title: title, chartStatus: chartStatus, value: value, dataTable: data, label: label, helperText: helperText, headerAction: (groups === null || groups === void 0 ? void 0 : groups.length) > 1 ? headerActionWithThresholdDropdown : headerAction, finalMenuItem: finalMenuItem, additionalMenuItems: additionalMenuItems, allowDownload: allowDownload, showChartTable: showChartTable, triggerButtonSize: headerButtonsSize, titleIcon: titleIcon, isVertical: isVertical },
|
|
182
183
|
React.createElement(ResponsiveContainer, { width: responsiveContainerWidth, height: responsiveContainerHeight, style: {
|
|
183
184
|
opacity: visibility ? 1 : 0,
|
|
184
185
|
transition: 'opacity 0.3s ease-in-out',
|
|
185
186
|
} }, data.length ? (React.createElement(ComposedChart, { data: Object.values(entries), height: height, width: 500, syncId: syncId, margin: {
|
|
186
|
-
top:
|
|
187
|
-
right: 10,
|
|
187
|
+
top: 11, // custom active dot gets clipped on the edges otherwise
|
|
188
|
+
right: 10, // custom active dot gets clipped on the edges otherwise
|
|
188
189
|
left: -24,
|
|
189
|
-
bottom:
|
|
190
|
+
bottom: 5,
|
|
190
191
|
} },
|
|
191
192
|
React.createElement(CartesianGrid, { vertical: false, stroke: theme.tokens.color_border_default }),
|
|
192
|
-
React.createElement(XAxis, { tickFormatter: function (value) { return tickFormatter(value, bottomAxis.scaleType); }, dataKey: bottomAxisDataKey, height: 30, interval: "equidistantPreserveStart", minTickGap: theme.spacingPX(14), tickMargin: theme.spacingPX(
|
|
193
|
+
React.createElement(XAxis, { tickFormatter: function (value) { return tickFormatter(value, bottomAxis.scaleType); }, dataKey: bottomAxisDataKey, height: 30, interval: "equidistantPreserveStart", minTickGap: theme.spacingPX(14), tickMargin: theme.spacingPX(2), padding: isVertical ? { right: 40 } : undefined, axisLine: { stroke: theme.tokens.color_border_bold }, tickLine: { stroke: theme.tokens.color_border_bold }, allowDecimals: bottomAxis.allowDecimals }),
|
|
193
194
|
React.createElement(YAxis, { tickFormatter: function (value) { return tickFormatter(value, leftAxis.scaleType); }, domain: ['auto', 'auto'], width: 78, axisLine: { stroke: theme.tokens.color_border_bold }, tickLine: { stroke: theme.tokens.color_border_bold }, allowDecimals: leftAxis.allowDecimals }),
|
|
194
195
|
React.createElement(Tooltip, { wrapperStyle: { outline: 'none' }, content: React.createElement(CustomTooltip, { active: undefined, payload: undefined, scaleType: bottomAxis.scaleType }) }),
|
|
195
196
|
legend && isVertical ? (React.createElement(Legend, { align: "right", verticalAlign: "top", layout: "vertical", iconSize: 14, wrapperStyle: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DotProps } from 'recharts';
|
|
3
|
-
declare const CustomActiveDot: (onMouseOver?: DotProps[
|
|
3
|
+
declare const CustomActiveDot: (onMouseOver?: DotProps["onMouseOver"]) => (props: Omit<DotProps, "ref">) => React.JSX.Element;
|
|
4
4
|
export default CustomActiveDot;
|
|
@@ -26,19 +26,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
47
|
var React = __importStar(require("react"));
|
|
38
48
|
var recharts_1 = require("recharts");
|
|
39
49
|
var CustomActiveDot = function (onMouseOver) { return function (props) {
|
|
40
50
|
return (React.createElement(React.Fragment, null,
|
|
41
|
-
React.createElement(recharts_1.Dot, __assign({}, props, { key: "outerDot", r:
|
|
42
|
-
React.createElement(recharts_1.Dot, __assign({}, props, { key: "innerDot", r:
|
|
51
|
+
React.createElement(recharts_1.Dot, __assign({}, props, { key: "outerDot", r: 6, strokeWidth: 0 }, (onMouseOver ? { onMouseOver: onMouseOver } : {}))),
|
|
52
|
+
React.createElement(recharts_1.Dot, __assign({}, props, { key: "innerDot", r: 2, style: { fill: 'white' } }, (onMouseOver ? { onMouseOver: onMouseOver } : {})))));
|
|
43
53
|
}; };
|
|
44
54
|
exports.default = CustomActiveDot;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
27
37
|
var React = __importStar(require("react"));
|
package/line-chart/index.js
CHANGED
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __read = (this && this.__read) || function (o, n) {
|
|
37
47
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
48
|
if (!m) return o;
|
|
@@ -53,9 +63,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
53
63
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
64
|
};
|
|
55
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.LineChart =
|
|
57
|
-
var lodash_1 = __importDefault(require("lodash"));
|
|
66
|
+
exports.LineChart = LineChart;
|
|
58
67
|
var React = __importStar(require("react"));
|
|
68
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
59
69
|
var recharts_1 = require("recharts");
|
|
60
70
|
var quantum_product_1 = require("@auth0/quantum-product");
|
|
61
71
|
var theme_1 = require("../theme");
|
|
@@ -89,7 +99,7 @@ function LineChart(props) {
|
|
|
89
99
|
React.useEffect(function () {
|
|
90
100
|
setThreshold(thresholds === null || thresholds === void 0 ? void 0 : thresholds[0]);
|
|
91
101
|
setLineVisibility(__assign(__assign({}, ((thresholds === null || thresholds === void 0 ? void 0 : thresholds[0]) && { thresholdControl: false })), lineVisibility));
|
|
92
|
-
}, [thresholds]);
|
|
102
|
+
}, [thresholds, lineVisibility]);
|
|
93
103
|
var handleLegendMouseEnter = function (e) {
|
|
94
104
|
if (!lineVisibility[e.dataKey]) {
|
|
95
105
|
setLineVisibility(__assign(__assign({}, lineVisibility), { hover: e.dataKey }));
|
|
@@ -175,7 +185,8 @@ function LineChart(props) {
|
|
|
175
185
|
}, [thresholds, menuProps]);
|
|
176
186
|
var headerActionWithThresholdDropdown = (React.createElement(quantum_product_1.StackLayout, { gutter: 1 },
|
|
177
187
|
!disableThresholdMenu && (React.createElement(React.Fragment, null,
|
|
178
|
-
React.createElement(quantum_product_1.Button, __assign({}, triggerProps, { startIcon: React.createElement(quantum_product_1.AlertDiamondIcon, null), endIcon: React.createElement(quantum_product_1.ChevronDownIcon, null), disabled: !threshold, variant: 'outlined', size: headerButtonsSize, label: threshold ? threshold.threshold_label : 'No threshold'
|
|
188
|
+
React.createElement(quantum_product_1.Button, __assign({}, triggerProps, { startIcon: React.createElement(quantum_product_1.AlertDiamondIcon, null), endIcon: React.createElement(quantum_product_1.ChevronDownIcon, null), disabled: !threshold, variant: 'outlined', size: headerButtonsSize, label: threshold ? threshold.threshold_label : 'No threshold', analyticsId: threshold &&
|
|
189
|
+
"security-center-button-".concat(titleToAnalyticName(threshold.evaluated_metric).replace(/_/g, '-'), "-select-threshold") })),
|
|
179
190
|
React.createElement(quantum_product_1.DropdownMenu, __assign({}, menuProps, { items: menuItems })),
|
|
180
191
|
showDividerInHeader && React.createElement(quantum_product_1.Divider, { orientation: "vertical" }))),
|
|
181
192
|
headerAction,
|
|
@@ -202,23 +213,23 @@ function LineChart(props) {
|
|
|
202
213
|
setResponsiveContainerHeight(getContainerHeight());
|
|
203
214
|
setTimeout(function () {
|
|
204
215
|
setResponsiveContainerWidth('100%');
|
|
205
|
-
setVisibility(!!legendContainerHeight);
|
|
216
|
+
setVisibility(!!legendContainerHeight || data.length === 0); //force visibility true if there is no data
|
|
206
217
|
}, 10);
|
|
207
218
|
}
|
|
208
|
-
}, [legendContainerHeight]);
|
|
219
|
+
}, [legendContainerHeight, data.length]);
|
|
209
220
|
return (React.createElement(React.Fragment, null,
|
|
210
221
|
React.createElement(chart_card_1.ChartCard, { title: title, chartStatus: chartStatus, value: value, dataTable: data, label: label, helperText: helperText, headerAction: (groups === null || groups === void 0 ? void 0 : groups.length) > 1 ? headerActionWithThresholdDropdown : headerAction, finalMenuItem: finalMenuItem, additionalMenuItems: additionalMenuItems, allowDownload: allowDownload, showChartTable: showChartTable, triggerButtonSize: headerButtonsSize, titleIcon: titleIcon, isVertical: isVertical },
|
|
211
222
|
React.createElement(recharts_1.ResponsiveContainer, { width: responsiveContainerWidth, height: responsiveContainerHeight, style: {
|
|
212
223
|
opacity: visibility ? 1 : 0,
|
|
213
224
|
transition: 'opacity 0.3s ease-in-out',
|
|
214
225
|
} }, data.length ? (React.createElement(recharts_1.ComposedChart, { data: Object.values(entries), height: height, width: 500, syncId: syncId, margin: {
|
|
215
|
-
top:
|
|
216
|
-
right: 10,
|
|
226
|
+
top: 11, // custom active dot gets clipped on the edges otherwise
|
|
227
|
+
right: 10, // custom active dot gets clipped on the edges otherwise
|
|
217
228
|
left: -24,
|
|
218
|
-
bottom:
|
|
229
|
+
bottom: 5,
|
|
219
230
|
} },
|
|
220
231
|
React.createElement(recharts_1.CartesianGrid, { vertical: false, stroke: theme.tokens.color_border_default }),
|
|
221
|
-
React.createElement(recharts_1.XAxis, { tickFormatter: function (value) { return (0, chart_1.tickFormatter)(value, bottomAxis.scaleType); }, dataKey: bottomAxisDataKey, height: 30, interval: "equidistantPreserveStart", minTickGap: theme.spacingPX(14), tickMargin: theme.spacingPX(
|
|
232
|
+
React.createElement(recharts_1.XAxis, { tickFormatter: function (value) { return (0, chart_1.tickFormatter)(value, bottomAxis.scaleType); }, dataKey: bottomAxisDataKey, height: 30, interval: "equidistantPreserveStart", minTickGap: theme.spacingPX(14), tickMargin: theme.spacingPX(2), padding: isVertical ? { right: 40 } : undefined, axisLine: { stroke: theme.tokens.color_border_bold }, tickLine: { stroke: theme.tokens.color_border_bold }, allowDecimals: bottomAxis.allowDecimals }),
|
|
222
233
|
React.createElement(recharts_1.YAxis, { tickFormatter: function (value) { return (0, chart_1.tickFormatter)(value, leftAxis.scaleType); }, domain: ['auto', 'auto'], width: 78, axisLine: { stroke: theme.tokens.color_border_bold }, tickLine: { stroke: theme.tokens.color_border_bold }, allowDecimals: leftAxis.allowDecimals }),
|
|
223
234
|
React.createElement(recharts_1.Tooltip, { wrapperStyle: { outline: 'none' }, content: React.createElement(custom_tooltip_1.default, { active: undefined, payload: undefined, scaleType: bottomAxis.scaleType }) }),
|
|
224
235
|
legend && isVertical ? (React.createElement(recharts_1.Legend, { align: "right", verticalAlign: "top", layout: "vertical", iconSize: 14, wrapperStyle: {
|
|
@@ -265,4 +276,3 @@ function LineChart(props) {
|
|
|
265
276
|
React.createElement(quantum_product_1.Text, { variant: "subtitle1" }, "No data"))))),
|
|
266
277
|
data && data[0] && React.createElement(data_table_chart_1.DataTableChart, { title: title, isOpen: isOpen, toggleIsOpen: toggleIsOpen, data: data })));
|
|
267
278
|
}
|
|
268
|
-
exports.LineChart = LineChart;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auth0/quantum-charts",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.18",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn copy:files",
|
|
30
30
|
"clean": "rm -rf ./build",
|
|
31
31
|
"watch": "tsc --watch --project ./tsconfig.publish.esm.json & tsc --watch --project ./tsconfig.publish.json",
|
|
32
|
-
"build:cjs": "node --max-old-space-size=
|
|
33
|
-
"build:esm": "node --max-old-space-size=
|
|
32
|
+
"build:cjs": "node --max-old-space-size=8192 ../../node_modules/.bin/tsc --project ./tsconfig.publish.json",
|
|
33
|
+
"build:esm": "node --max-old-space-size=8192 ../../node_modules/.bin/tsc --project ./tsconfig.publish.esm.json",
|
|
34
34
|
"copy:files": "node scripts/copy-files.js",
|
|
35
35
|
"artifactory": "cd ./build && npm publish",
|
|
36
36
|
"storybook": "storybook dev -p 6006"
|
package/scorecard/index.js
CHANGED
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ScoreCard =
|
|
36
|
+
exports.ScoreCard = ScoreCard;
|
|
27
37
|
var React = __importStar(require("react"));
|
|
28
38
|
var chart_summary_1 = require("../chart-summary");
|
|
29
39
|
var chart_card_1 = require("../chart-card");
|
|
@@ -42,4 +52,3 @@ function ScoreCard(props) {
|
|
|
42
52
|
React.createElement(chart_summary_1.ChartSummary, { title: summary.title, value: summary.value, helperText: summary.helperText, label: summary.label })));
|
|
43
53
|
}))));
|
|
44
54
|
}
|
|
45
|
-
exports.ScoreCard = ScoreCard;
|