@splunk/visualizations 25.12.0 → 25.13.0
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/Area.js +114 -113
- package/Area.js.map +1 -1
- package/Bar.js +114 -113
- package/Bar.js.map +1 -1
- package/Bubble.js +103 -102
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.js +207 -123
- package/ChoroplethSvg.js.map +1 -1
- package/Column.js +116 -113
- package/Column.js.map +1 -1
- package/Ellipse.js +72 -69
- package/Ellipse.js.map +1 -1
- package/Events.config.js +1 -1
- package/Events.config.js.map +1 -1
- package/Events.js +167 -133
- package/Events.js.map +1 -1
- package/FillerGauge.js +95 -92
- package/FillerGauge.js.map +1 -1
- package/Image.js +98 -98
- package/Image.js.map +1 -1
- package/Line.js +116 -113
- package/Line.js.map +1 -1
- package/LinkGraph.js +659 -656
- package/LinkGraph.js.map +1 -1
- package/Map.js +341 -332
- package/Map.js.map +1 -1
- package/Markdown.js +104 -104
- package/Markdown.js.map +1 -1
- package/MarkerGauge.js +88 -88
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.js +110 -110
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.js +125 -125
- package/Pie.js.map +1 -1
- package/Punchcard.js +228 -228
- package/Punchcard.js.map +1 -1
- package/Rectangle.js +111 -111
- package/Rectangle.js.map +1 -1
- package/Sankey.js +178 -177
- package/Sankey.js.map +1 -1
- package/Scatter.js +151 -151
- package/Scatter.js.map +1 -1
- package/SingleValue.js +954 -350
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +43 -27
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.js +432 -431
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +421 -411
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +754 -0
- package/SparkLine.js.map +1 -0
- package/Table.js +726 -122
- package/Table.js.map +1 -1
- package/common/utils/mapUtils.js +7 -4
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/urlUtils.js +118 -0
- package/common/utils/urlUtils.js.map +1 -0
- package/common/withDashboardViz.js +2 -2
- package/package.json +11 -12
package/Table.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 475);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,42 +95,35 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("prop-types");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("react");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@splunk/
|
|
113
|
-
|
|
114
|
-
/***/ }),
|
|
115
|
-
|
|
116
|
-
/***/ 106:
|
|
117
|
-
/***/ (function(module, exports) {
|
|
118
|
-
|
|
119
|
-
module.exports = require("@splunk/react-ui/Table");
|
|
112
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
120
113
|
|
|
121
114
|
/***/ }),
|
|
122
115
|
|
|
123
|
-
/***/
|
|
116
|
+
/***/ 11:
|
|
124
117
|
/***/ (function(module, exports) {
|
|
125
118
|
|
|
126
|
-
module.exports = require("@splunk/
|
|
119
|
+
module.exports = require("@splunk/themes/variables");
|
|
127
120
|
|
|
128
121
|
/***/ }),
|
|
129
122
|
|
|
130
|
-
/***/
|
|
123
|
+
/***/ 111:
|
|
131
124
|
/***/ (function(module, exports) {
|
|
132
125
|
|
|
133
|
-
module.exports = require("@
|
|
126
|
+
module.exports = require("@splunk/react-ui/Table");
|
|
134
127
|
|
|
135
128
|
/***/ }),
|
|
136
129
|
|
|
@@ -141,7 +134,7 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
|
141
134
|
|
|
142
135
|
/***/ }),
|
|
143
136
|
|
|
144
|
-
/***/
|
|
137
|
+
/***/ 123:
|
|
145
138
|
/***/ (function(module, exports) {
|
|
146
139
|
|
|
147
140
|
module.exports = require("@splunk/react-ui/Message");
|
|
@@ -157,9 +150,9 @@ module.exports = require("@splunk/react-ui/Message");
|
|
|
157
150
|
Object.defineProperty(exports, "__esModule", {
|
|
158
151
|
value: true
|
|
159
152
|
});
|
|
160
|
-
var React = __webpack_require__(
|
|
153
|
+
var React = __webpack_require__(1);
|
|
161
154
|
var styled_components_1 = __webpack_require__(4);
|
|
162
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
155
|
+
var SizeAwareWrapper_1 = __webpack_require__(19);
|
|
163
156
|
var style_1 = __webpack_require__(14);
|
|
164
157
|
var colorUtils_1 = __webpack_require__(12);
|
|
165
158
|
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
@@ -214,7 +207,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
214
207
|
}
|
|
215
208
|
return React.createElement(FixSizeItem, {
|
|
216
209
|
"data-test": "fix-size-item",
|
|
217
|
-
"data-splunk-visualization-version": "25.
|
|
210
|
+
"data-splunk-visualization-version": "25.13.0 - 572f25c03",
|
|
218
211
|
width: width,
|
|
219
212
|
height: height,
|
|
220
213
|
backgroundColor: backgroundColor
|
|
@@ -234,7 +227,7 @@ exports.default = withFixedSizeContainer;
|
|
|
234
227
|
|
|
235
228
|
/***/ }),
|
|
236
229
|
|
|
237
|
-
/***/
|
|
230
|
+
/***/ 135:
|
|
238
231
|
/***/ (function(module, exports, __webpack_require__) {
|
|
239
232
|
|
|
240
233
|
"use strict";
|
|
@@ -298,7 +291,7 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
|
298
291
|
|
|
299
292
|
/***/ }),
|
|
300
293
|
|
|
301
|
-
/***/
|
|
294
|
+
/***/ 165:
|
|
302
295
|
/***/ (function(module, exports, __webpack_require__) {
|
|
303
296
|
|
|
304
297
|
"use strict";
|
|
@@ -321,10 +314,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
321
314
|
exports.config = exports.PureTable = exports.themes = exports.computeVizProps = void 0;
|
|
322
315
|
var lodash_1 = __webpack_require__(3);
|
|
323
316
|
var colorUtils_1 = __webpack_require__(12);
|
|
324
|
-
var config_1 = __webpack_require__(
|
|
317
|
+
var config_1 = __webpack_require__(476);
|
|
325
318
|
exports.config = config_1.default;
|
|
326
319
|
var withDashboardViz_1 = __webpack_require__(36);
|
|
327
|
-
var PureTable_1 = __webpack_require__(
|
|
320
|
+
var PureTable_1 = __webpack_require__(477);
|
|
328
321
|
exports.PureTable = PureTable_1.default;
|
|
329
322
|
var computeVizProps = function computeVizProps(_a) {
|
|
330
323
|
var props = __rest(_a, []);
|
|
@@ -409,18 +402,32 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
|
409
402
|
/***/ 18:
|
|
410
403
|
/***/ (function(module, exports) {
|
|
411
404
|
|
|
412
|
-
module.exports = require("@
|
|
405
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
413
406
|
|
|
414
407
|
/***/ }),
|
|
415
408
|
|
|
416
409
|
/***/ 19:
|
|
410
|
+
/***/ (function(module, exports) {
|
|
411
|
+
|
|
412
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
413
|
+
|
|
414
|
+
/***/ }),
|
|
415
|
+
|
|
416
|
+
/***/ 2:
|
|
417
|
+
/***/ (function(module, exports) {
|
|
418
|
+
|
|
419
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
420
|
+
|
|
421
|
+
/***/ }),
|
|
422
|
+
|
|
423
|
+
/***/ 20:
|
|
417
424
|
/***/ (function(module, exports, __webpack_require__) {
|
|
418
425
|
|
|
419
426
|
"use strict";
|
|
420
427
|
|
|
421
428
|
|
|
422
|
-
var _toConsumableArray = __webpack_require__(
|
|
423
|
-
var _defineProperty = __webpack_require__(
|
|
429
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
430
|
+
var _defineProperty = __webpack_require__(7);
|
|
424
431
|
var __rest = this && this.__rest || function (s, e) {
|
|
425
432
|
var t = {};
|
|
426
433
|
for (var p in s) {
|
|
@@ -617,27 +624,13 @@ exports.insertLayout = insertLayout;
|
|
|
617
624
|
|
|
618
625
|
/***/ }),
|
|
619
626
|
|
|
620
|
-
/***/
|
|
621
|
-
/***/ (function(module, exports) {
|
|
622
|
-
|
|
623
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
624
|
-
|
|
625
|
-
/***/ }),
|
|
626
|
-
|
|
627
|
-
/***/ 20:
|
|
627
|
+
/***/ 21:
|
|
628
628
|
/***/ (function(module, exports) {
|
|
629
629
|
|
|
630
630
|
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
631
631
|
|
|
632
632
|
/***/ }),
|
|
633
633
|
|
|
634
|
-
/***/ 22:
|
|
635
|
-
/***/ (function(module, exports) {
|
|
636
|
-
|
|
637
|
-
module.exports = require("@babel/runtime/helpers/createClass");
|
|
638
|
-
|
|
639
|
-
/***/ }),
|
|
640
|
-
|
|
641
634
|
/***/ 23:
|
|
642
635
|
/***/ (function(module, exports) {
|
|
643
636
|
|
|
@@ -690,11 +683,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
690
683
|
value: true
|
|
691
684
|
});
|
|
692
685
|
exports.shouldShowIconPlaceholder = void 0;
|
|
693
|
-
var React = __webpack_require__(
|
|
694
|
-
var T = __webpack_require__(
|
|
686
|
+
var React = __webpack_require__(1);
|
|
687
|
+
var T = __webpack_require__(0);
|
|
695
688
|
var lodash_1 = __webpack_require__(3);
|
|
696
689
|
var i18n_1 = __webpack_require__(2);
|
|
697
|
-
var Message_1 = __webpack_require__(
|
|
690
|
+
var Message_1 = __webpack_require__(10);
|
|
698
691
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
699
692
|
/**
|
|
700
693
|
* @method shouldShowIconPlaceholder
|
|
@@ -772,12 +765,12 @@ module.exports = require("@splunk/ui-utils/id");
|
|
|
772
765
|
"use strict";
|
|
773
766
|
|
|
774
767
|
|
|
775
|
-
var _defineProperty = __webpack_require__(
|
|
768
|
+
var _defineProperty = __webpack_require__(7);
|
|
776
769
|
Object.defineProperty(exports, "__esModule", {
|
|
777
770
|
value: true
|
|
778
771
|
});
|
|
779
772
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
780
|
-
var T = __webpack_require__(
|
|
773
|
+
var T = __webpack_require__(0);
|
|
781
774
|
var lodash_1 = __webpack_require__(3);
|
|
782
775
|
var DataSource_1 = __webpack_require__(43);
|
|
783
776
|
exports.SortParamsPropTypes = T.shape({
|
|
@@ -836,7 +829,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
836
829
|
value: true
|
|
837
830
|
});
|
|
838
831
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
839
|
-
var T = __webpack_require__(
|
|
832
|
+
var T = __webpack_require__(0);
|
|
840
833
|
var lodash_1 = __webpack_require__(3);
|
|
841
834
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
842
835
|
isPaging: T.bool,
|
|
@@ -918,14 +911,14 @@ var _slicedToArray = __webpack_require__(17);
|
|
|
918
911
|
Object.defineProperty(exports, "__esModule", {
|
|
919
912
|
value: true
|
|
920
913
|
});
|
|
921
|
-
var React = __webpack_require__(
|
|
914
|
+
var React = __webpack_require__(1);
|
|
922
915
|
var lodash_1 = __webpack_require__(3);
|
|
923
916
|
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
924
917
|
var Options_1 = __webpack_require__(29);
|
|
925
918
|
var SanitizeProps_1 = __webpack_require__(38);
|
|
926
919
|
var TimezoneContext_1 = __webpack_require__(25);
|
|
927
920
|
var moment_1 = __webpack_require__(39);
|
|
928
|
-
var FeatureFlagContext_1 = __webpack_require__(
|
|
921
|
+
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
929
922
|
var styled_components_1 = __webpack_require__(4);
|
|
930
923
|
var hocUtils_1 = __webpack_require__(26);
|
|
931
924
|
var JSONSchemaUtils_1 = __webpack_require__(27);
|
|
@@ -1228,13 +1221,13 @@ module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
|
1228
1221
|
"use strict";
|
|
1229
1222
|
|
|
1230
1223
|
|
|
1231
|
-
var _classCallCheck = __webpack_require__(
|
|
1224
|
+
var _classCallCheck = __webpack_require__(9);
|
|
1232
1225
|
Object.defineProperty(exports, "__esModule", {
|
|
1233
1226
|
value: true
|
|
1234
1227
|
});
|
|
1235
1228
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1236
1229
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1237
|
-
var T = __webpack_require__(
|
|
1230
|
+
var T = __webpack_require__(0);
|
|
1238
1231
|
var lodash_1 = __webpack_require__(3);
|
|
1239
1232
|
var VizActionHandler_1 = __webpack_require__(42);
|
|
1240
1233
|
// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
@@ -1358,8 +1351,8 @@ exports.default = SplunkVisualization;
|
|
|
1358
1351
|
"use strict";
|
|
1359
1352
|
|
|
1360
1353
|
|
|
1361
|
-
var _classCallCheck = __webpack_require__(
|
|
1362
|
-
var _createClass = __webpack_require__(
|
|
1354
|
+
var _classCallCheck = __webpack_require__(9);
|
|
1355
|
+
var _createClass = __webpack_require__(18);
|
|
1363
1356
|
Object.defineProperty(exports, "__esModule", {
|
|
1364
1357
|
value: true
|
|
1365
1358
|
});
|
|
@@ -1409,7 +1402,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1409
1402
|
value: true
|
|
1410
1403
|
});
|
|
1411
1404
|
exports.useDeepMemo = void 0;
|
|
1412
|
-
var react_1 = __webpack_require__(
|
|
1405
|
+
var react_1 = __webpack_require__(1);
|
|
1413
1406
|
var lodash_1 = __webpack_require__(3);
|
|
1414
1407
|
/**
|
|
1415
1408
|
* This hook evaluates and stores the result of a passed function and only
|
|
@@ -1448,10 +1441,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1448
1441
|
value: true
|
|
1449
1442
|
});
|
|
1450
1443
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1451
|
-
var React = __webpack_require__(
|
|
1452
|
-
var T = __webpack_require__(
|
|
1444
|
+
var React = __webpack_require__(1);
|
|
1445
|
+
var T = __webpack_require__(0);
|
|
1453
1446
|
var i18n_1 = __webpack_require__(2);
|
|
1454
|
-
var Message_1 = __webpack_require__(
|
|
1447
|
+
var Message_1 = __webpack_require__(10);
|
|
1455
1448
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1456
1449
|
/**
|
|
1457
1450
|
* @method isMissing
|
|
@@ -1516,7 +1509,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
1516
1509
|
Object.defineProperty(exports, "__esModule", {
|
|
1517
1510
|
value: true
|
|
1518
1511
|
});
|
|
1519
|
-
var React = __webpack_require__(
|
|
1512
|
+
var React = __webpack_require__(1);
|
|
1520
1513
|
var styled_components_1 = __webpack_require__(4);
|
|
1521
1514
|
var hocUtils_1 = __webpack_require__(15);
|
|
1522
1515
|
var Cover = styled_components_1.default.div.withConfig({
|
|
@@ -1524,7 +1517,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1524
1517
|
componentId: "sc-1gsbnxb-0"
|
|
1525
1518
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1526
1519
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1527
|
-
'data-splunk-visualization-version': "25.
|
|
1520
|
+
'data-splunk-visualization-version': "25.13.0 - 572f25c03"
|
|
1528
1521
|
}).withConfig({
|
|
1529
1522
|
displayName: "withEditModeCover__Blocker",
|
|
1530
1523
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1562,9 +1555,9 @@ exports.default = withEditModeCover;
|
|
|
1562
1555
|
Object.defineProperty(exports, "__esModule", {
|
|
1563
1556
|
value: true
|
|
1564
1557
|
});
|
|
1565
|
-
var React = __webpack_require__(
|
|
1558
|
+
var React = __webpack_require__(1);
|
|
1566
1559
|
var colorUtils_1 = __webpack_require__(12);
|
|
1567
|
-
var variables_1 = __webpack_require__(
|
|
1560
|
+
var variables_1 = __webpack_require__(11);
|
|
1568
1561
|
var IconPlaceholder_1 = __webpack_require__(31);
|
|
1569
1562
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1570
1563
|
var hocUtils_1 = __webpack_require__(15);
|
|
@@ -1605,7 +1598,7 @@ exports.default = withPlaceholder;
|
|
|
1605
1598
|
|
|
1606
1599
|
/***/ }),
|
|
1607
1600
|
|
|
1608
|
-
/***/
|
|
1601
|
+
/***/ 475:
|
|
1609
1602
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1610
1603
|
|
|
1611
1604
|
"use strict";
|
|
@@ -1635,8 +1628,8 @@ exports.default = void 0;
|
|
|
1635
1628
|
// NOTE: wildcard syntax only works for named exports
|
|
1636
1629
|
// for some reason, omitting the default export worked before TS v4
|
|
1637
1630
|
// see: https://stackoverflow.com/a/34445175
|
|
1638
|
-
__exportStar(__webpack_require__(
|
|
1639
|
-
var Table_1 = __webpack_require__(
|
|
1631
|
+
__exportStar(__webpack_require__(165), exports);
|
|
1632
|
+
var Table_1 = __webpack_require__(165);
|
|
1640
1633
|
Object.defineProperty(exports, "default", {
|
|
1641
1634
|
enumerable: true,
|
|
1642
1635
|
get: function get() {
|
|
@@ -1646,27 +1639,27 @@ Object.defineProperty(exports, "default", {
|
|
|
1646
1639
|
|
|
1647
1640
|
/***/ }),
|
|
1648
1641
|
|
|
1649
|
-
/***/
|
|
1642
|
+
/***/ 476:
|
|
1650
1643
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1651
1644
|
|
|
1652
1645
|
"use strict";
|
|
1653
1646
|
|
|
1654
1647
|
|
|
1655
|
-
var _toConsumableArray = __webpack_require__(
|
|
1648
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
1656
1649
|
Object.defineProperty(exports, "__esModule", {
|
|
1657
1650
|
value: true
|
|
1658
1651
|
});
|
|
1659
1652
|
var i18n_1 = __webpack_require__(2);
|
|
1660
1653
|
var lodash_1 = __webpack_require__(3);
|
|
1661
1654
|
var schemaUtils_1 = __webpack_require__(16);
|
|
1662
|
-
var colorConstants_1 = __webpack_require__(
|
|
1663
|
-
var visualization_icons_1 = __webpack_require__(
|
|
1664
|
-
var placeholders_1 = __webpack_require__(
|
|
1665
|
-
var variables_1 = __webpack_require__(
|
|
1655
|
+
var colorConstants_1 = __webpack_require__(50);
|
|
1656
|
+
var visualization_icons_1 = __webpack_require__(52);
|
|
1657
|
+
var placeholders_1 = __webpack_require__(49);
|
|
1658
|
+
var variables_1 = __webpack_require__(11);
|
|
1666
1659
|
var pick_1 = __webpack_require__(23);
|
|
1667
|
-
var configUtils_1 = __webpack_require__(
|
|
1660
|
+
var configUtils_1 = __webpack_require__(20);
|
|
1668
1661
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1669
|
-
var consts_1 = __webpack_require__(
|
|
1662
|
+
var consts_1 = __webpack_require__(135);
|
|
1670
1663
|
var VizCategory_1 = __webpack_require__(35);
|
|
1671
1664
|
var dataContract = {
|
|
1672
1665
|
requiredDataSources: [{
|
|
@@ -2358,14 +2351,14 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
2358
2351
|
|
|
2359
2352
|
/***/ }),
|
|
2360
2353
|
|
|
2361
|
-
/***/
|
|
2354
|
+
/***/ 477:
|
|
2362
2355
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2363
2356
|
|
|
2364
2357
|
"use strict";
|
|
2365
2358
|
|
|
2366
2359
|
|
|
2367
2360
|
var _slicedToArray = __webpack_require__(17);
|
|
2368
|
-
var _taggedTemplateLiteral = __webpack_require__(
|
|
2361
|
+
var _taggedTemplateLiteral = __webpack_require__(98);
|
|
2369
2362
|
var _templateObject, _templateObject2, _templateObject3;
|
|
2370
2363
|
var __rest = this && this.__rest || function (s, e) {
|
|
2371
2364
|
var t = {};
|
|
@@ -2381,27 +2374,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2381
2374
|
value: true
|
|
2382
2375
|
});
|
|
2383
2376
|
exports.INITIAL_UNSET_COLUMN_WIDTH = exports.MINIMUM_COLUMN_SIZE = void 0;
|
|
2384
|
-
var React = __webpack_require__(
|
|
2385
|
-
var T = __webpack_require__(
|
|
2377
|
+
var React = __webpack_require__(1);
|
|
2378
|
+
var T = __webpack_require__(0);
|
|
2386
2379
|
var lodash_1 = __webpack_require__(3);
|
|
2387
2380
|
var styled_components_1 = __webpack_require__(4);
|
|
2388
2381
|
var i18n_1 = __webpack_require__(2);
|
|
2389
|
-
var Table_1 = __webpack_require__(
|
|
2390
|
-
var Paginator_1 = __webpack_require__(
|
|
2391
|
-
var Message_1 = __webpack_require__(
|
|
2382
|
+
var Table_1 = __webpack_require__(111);
|
|
2383
|
+
var Paginator_1 = __webpack_require__(92);
|
|
2384
|
+
var Message_1 = __webpack_require__(123);
|
|
2392
2385
|
var colorUtils_1 = __webpack_require__(12);
|
|
2393
2386
|
var style_1 = __webpack_require__(14);
|
|
2394
2387
|
var pick_1 = __webpack_require__(23);
|
|
2395
|
-
var variables_1 = __webpack_require__(
|
|
2396
|
-
var hooks_1 = __webpack_require__(
|
|
2397
|
-
var consts_1 = __webpack_require__(
|
|
2398
|
-
var cells_1 = __webpack_require__(
|
|
2388
|
+
var variables_1 = __webpack_require__(11);
|
|
2389
|
+
var hooks_1 = __webpack_require__(478);
|
|
2390
|
+
var consts_1 = __webpack_require__(135);
|
|
2391
|
+
var cells_1 = __webpack_require__(479);
|
|
2399
2392
|
var getPagination_1 = __webpack_require__(34);
|
|
2400
2393
|
var getSorting_1 = __webpack_require__(33);
|
|
2401
2394
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2402
2395
|
// debounce was imported this way due to typing
|
|
2403
2396
|
// eslint-disable-next-line import/order
|
|
2404
|
-
var debounce = __webpack_require__(
|
|
2397
|
+
var debounce = __webpack_require__(484);
|
|
2405
2398
|
exports.MINIMUM_COLUMN_SIZE = 30;
|
|
2406
2399
|
exports.INITIAL_UNSET_COLUMN_WIDTH = 90;
|
|
2407
2400
|
var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
@@ -2622,7 +2615,7 @@ var PureTable = function PureTable(props) {
|
|
|
2622
2615
|
return onCellClick ? drilldownHandler(e) : lodash_1.noop;
|
|
2623
2616
|
}, [onCellClick, showRowNumbers, tableHeader, tableBody]);
|
|
2624
2617
|
var debouncedDrilldown = debounce(function (e, payload) {
|
|
2625
|
-
if (window.getSelection().toString() === '') {
|
|
2618
|
+
if (window.getSelection().toString() === '' || (e === null || e === void 0 ? void 0 : e.ctrlKey) || (e === null || e === void 0 ? void 0 : e.metaKey)) {
|
|
2626
2619
|
if (typeof onCellClick === 'function') {
|
|
2627
2620
|
onCellClick({
|
|
2628
2621
|
e: e,
|
|
@@ -2860,21 +2853,21 @@ exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable))
|
|
|
2860
2853
|
|
|
2861
2854
|
/***/ }),
|
|
2862
2855
|
|
|
2863
|
-
/***/
|
|
2856
|
+
/***/ 478:
|
|
2864
2857
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2865
2858
|
|
|
2866
2859
|
"use strict";
|
|
2867
2860
|
|
|
2868
2861
|
|
|
2869
|
-
var _toConsumableArray = __webpack_require__(
|
|
2870
|
-
var _typeof = __webpack_require__(
|
|
2862
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
2863
|
+
var _typeof = __webpack_require__(93);
|
|
2871
2864
|
Object.defineProperty(exports, "__esModule", {
|
|
2872
2865
|
value: true
|
|
2873
2866
|
});
|
|
2874
2867
|
exports.useTable = exports.getTextOverflowType = exports.getOverflowStyles = void 0;
|
|
2875
2868
|
var lodash_1 = __webpack_require__(3);
|
|
2876
2869
|
var colorUtils_1 = __webpack_require__(12);
|
|
2877
|
-
var consts_1 = __webpack_require__(
|
|
2870
|
+
var consts_1 = __webpack_require__(135);
|
|
2878
2871
|
var isArray = function isArray(v) {
|
|
2879
2872
|
return Array.isArray(v);
|
|
2880
2873
|
};
|
|
@@ -3207,7 +3200,7 @@ exports.useTable = useTable;
|
|
|
3207
3200
|
|
|
3208
3201
|
/***/ }),
|
|
3209
3202
|
|
|
3210
|
-
/***/
|
|
3203
|
+
/***/ 479:
|
|
3211
3204
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3212
3205
|
|
|
3213
3206
|
"use strict";
|
|
@@ -3233,14 +3226,21 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
|
3233
3226
|
Object.defineProperty(exports, "__esModule", {
|
|
3234
3227
|
value: true
|
|
3235
3228
|
});
|
|
3236
|
-
__exportStar(__webpack_require__(477), exports);
|
|
3237
|
-
__exportStar(__webpack_require__(478), exports);
|
|
3238
|
-
__exportStar(__webpack_require__(479), exports);
|
|
3239
3229
|
__exportStar(__webpack_require__(480), exports);
|
|
3230
|
+
__exportStar(__webpack_require__(481), exports);
|
|
3231
|
+
__exportStar(__webpack_require__(482), exports);
|
|
3232
|
+
__exportStar(__webpack_require__(483), exports);
|
|
3240
3233
|
|
|
3241
3234
|
/***/ }),
|
|
3242
3235
|
|
|
3243
|
-
/***/
|
|
3236
|
+
/***/ 48:
|
|
3237
|
+
/***/ (function(module, exports) {
|
|
3238
|
+
|
|
3239
|
+
module.exports = require("@babel/runtime/helpers/extends");
|
|
3240
|
+
|
|
3241
|
+
/***/ }),
|
|
3242
|
+
|
|
3243
|
+
/***/ 480:
|
|
3244
3244
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3245
3245
|
|
|
3246
3246
|
"use strict";
|
|
@@ -3261,7 +3261,7 @@ exports.SwitchTableCell = SwitchTableCell;
|
|
|
3261
3261
|
|
|
3262
3262
|
/***/ }),
|
|
3263
3263
|
|
|
3264
|
-
/***/
|
|
3264
|
+
/***/ 481:
|
|
3265
3265
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3266
3266
|
|
|
3267
3267
|
"use strict";
|
|
@@ -3271,8 +3271,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3271
3271
|
value: true
|
|
3272
3272
|
});
|
|
3273
3273
|
exports.TextCell = void 0;
|
|
3274
|
-
var React = __webpack_require__(
|
|
3275
|
-
var Table_1 = __webpack_require__(
|
|
3274
|
+
var React = __webpack_require__(1);
|
|
3275
|
+
var Table_1 = __webpack_require__(111);
|
|
3276
3276
|
var noop = function noop() {
|
|
3277
3277
|
return undefined;
|
|
3278
3278
|
};
|
|
@@ -3296,7 +3296,7 @@ exports.TextCell.displayName = 'TextCell';
|
|
|
3296
3296
|
|
|
3297
3297
|
/***/ }),
|
|
3298
3298
|
|
|
3299
|
-
/***/
|
|
3299
|
+
/***/ 482:
|
|
3300
3300
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3301
3301
|
|
|
3302
3302
|
"use strict";
|
|
@@ -3306,8 +3306,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3306
3306
|
value: true
|
|
3307
3307
|
});
|
|
3308
3308
|
exports.ArrayCell = void 0;
|
|
3309
|
-
var React = __webpack_require__(
|
|
3310
|
-
var Table_1 = __webpack_require__(
|
|
3309
|
+
var React = __webpack_require__(1);
|
|
3310
|
+
var Table_1 = __webpack_require__(111);
|
|
3311
3311
|
var noop = function noop() {
|
|
3312
3312
|
return undefined;
|
|
3313
3313
|
};
|
|
@@ -3339,14 +3339,7 @@ exports.ArrayCell.displayName = 'ArrayCell';
|
|
|
3339
3339
|
|
|
3340
3340
|
/***/ }),
|
|
3341
3341
|
|
|
3342
|
-
/***/
|
|
3343
|
-
/***/ (function(module, exports) {
|
|
3344
|
-
|
|
3345
|
-
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3346
|
-
|
|
3347
|
-
/***/ }),
|
|
3348
|
-
|
|
3349
|
-
/***/ 480:
|
|
3342
|
+
/***/ 483:
|
|
3350
3343
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3351
3344
|
|
|
3352
3345
|
"use strict";
|
|
@@ -3357,9 +3350,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3357
3350
|
value: true
|
|
3358
3351
|
});
|
|
3359
3352
|
exports.SparklineCell = exports.validSparklineTypes = void 0;
|
|
3360
|
-
var React = __webpack_require__(
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3353
|
+
var React = __webpack_require__(1);
|
|
3354
|
+
var i18n_1 = __webpack_require__(2);
|
|
3355
|
+
var Table_1 = __webpack_require__(111);
|
|
3356
|
+
var SparkLine_1 = __webpack_require__(95);
|
|
3363
3357
|
var paddingLeftRight = 5;
|
|
3364
3358
|
var paddingTopBottom = 3;
|
|
3365
3359
|
var parseSparklineData = function parseSparklineData(data) {
|
|
@@ -3418,10 +3412,11 @@ var SparklineCell = function SparklineCell(_ref) {
|
|
|
3418
3412
|
align: cell.align,
|
|
3419
3413
|
elementRef: setEl,
|
|
3420
3414
|
"data-test-cell-type": "SparklineCell",
|
|
3415
|
+
"aria-label": i18n_1._('Source count over time sparkline trend'),
|
|
3421
3416
|
"data-row-index": cell.rowIndex,
|
|
3422
3417
|
"data-col-index": cell.columnIndex,
|
|
3423
3418
|
onClick: useMouseOverEffect ? noop : undefined
|
|
3424
|
-
}, height ? React.createElement(
|
|
3419
|
+
}, height ? React.createElement(SparkLine_1.default, {
|
|
3425
3420
|
style: lineStyle,
|
|
3426
3421
|
data: data,
|
|
3427
3422
|
width: (cellEl === null || cellEl === void 0 ? void 0 : cellEl.offsetWidth) - paddingLeftRight * 2,
|
|
@@ -3437,7 +3432,7 @@ exports.SparklineCell.displayName = 'SparklineCell';
|
|
|
3437
3432
|
|
|
3438
3433
|
/***/ }),
|
|
3439
3434
|
|
|
3440
|
-
/***/
|
|
3435
|
+
/***/ 484:
|
|
3441
3436
|
/***/ (function(module, exports) {
|
|
3442
3437
|
|
|
3443
3438
|
module.exports = require("lodash/debounce");
|
|
@@ -3447,11 +3442,18 @@ module.exports = require("lodash/debounce");
|
|
|
3447
3442
|
/***/ 49:
|
|
3448
3443
|
/***/ (function(module, exports) {
|
|
3449
3444
|
|
|
3445
|
+
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3446
|
+
|
|
3447
|
+
/***/ }),
|
|
3448
|
+
|
|
3449
|
+
/***/ 50:
|
|
3450
|
+
/***/ (function(module, exports) {
|
|
3451
|
+
|
|
3450
3452
|
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
3451
3453
|
|
|
3452
3454
|
/***/ }),
|
|
3453
3455
|
|
|
3454
|
-
/***/
|
|
3456
|
+
/***/ 52:
|
|
3455
3457
|
/***/ (function(module, exports) {
|
|
3456
3458
|
|
|
3457
3459
|
module.exports = require("@splunk/visualization-icons");
|
|
@@ -3495,44 +3497,646 @@ var VizBehavior;
|
|
|
3495
3497
|
|
|
3496
3498
|
/***/ }),
|
|
3497
3499
|
|
|
3498
|
-
/***/
|
|
3500
|
+
/***/ 61:
|
|
3499
3501
|
/***/ (function(module, exports) {
|
|
3500
3502
|
|
|
3501
|
-
module.exports = require("@
|
|
3503
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
3502
3504
|
|
|
3503
3505
|
/***/ }),
|
|
3504
3506
|
|
|
3505
|
-
/***/
|
|
3507
|
+
/***/ 62:
|
|
3508
|
+
/***/ (function(module, exports) {
|
|
3509
|
+
|
|
3510
|
+
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
3511
|
+
|
|
3512
|
+
/***/ }),
|
|
3513
|
+
|
|
3514
|
+
/***/ 7:
|
|
3506
3515
|
/***/ (function(module, exports) {
|
|
3507
3516
|
|
|
3508
3517
|
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3509
3518
|
|
|
3510
3519
|
/***/ }),
|
|
3511
3520
|
|
|
3512
|
-
/***/
|
|
3521
|
+
/***/ 70:
|
|
3513
3522
|
/***/ (function(module, exports) {
|
|
3514
3523
|
|
|
3515
|
-
module.exports = require("@
|
|
3524
|
+
module.exports = require("@babel/runtime/helpers/inherits");
|
|
3516
3525
|
|
|
3517
3526
|
/***/ }),
|
|
3518
3527
|
|
|
3519
|
-
/***/
|
|
3528
|
+
/***/ 71:
|
|
3520
3529
|
/***/ (function(module, exports) {
|
|
3521
3530
|
|
|
3522
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3531
|
+
module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
3532
|
+
|
|
3533
|
+
/***/ }),
|
|
3534
|
+
|
|
3535
|
+
/***/ 8:
|
|
3536
|
+
/***/ (function(module, exports) {
|
|
3537
|
+
|
|
3538
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
3539
|
+
|
|
3540
|
+
/***/ }),
|
|
3541
|
+
|
|
3542
|
+
/***/ 86:
|
|
3543
|
+
/***/ (function(module, exports) {
|
|
3544
|
+
|
|
3545
|
+
module.exports = require("@babel/runtime/helpers/assertThisInitialized");
|
|
3523
3546
|
|
|
3524
3547
|
/***/ }),
|
|
3525
3548
|
|
|
3526
3549
|
/***/ 9:
|
|
3527
3550
|
/***/ (function(module, exports) {
|
|
3528
3551
|
|
|
3529
|
-
module.exports = require("@
|
|
3552
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
3553
|
+
|
|
3554
|
+
/***/ }),
|
|
3555
|
+
|
|
3556
|
+
/***/ 92:
|
|
3557
|
+
/***/ (function(module, exports) {
|
|
3558
|
+
|
|
3559
|
+
module.exports = require("@splunk/react-ui/Paginator");
|
|
3530
3560
|
|
|
3531
3561
|
/***/ }),
|
|
3532
3562
|
|
|
3533
3563
|
/***/ 93:
|
|
3534
3564
|
/***/ (function(module, exports) {
|
|
3535
3565
|
|
|
3566
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
3567
|
+
|
|
3568
|
+
/***/ }),
|
|
3569
|
+
|
|
3570
|
+
/***/ 95:
|
|
3571
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3572
|
+
|
|
3573
|
+
"use strict";
|
|
3574
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3575
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
|
|
3576
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
3577
|
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
3578
|
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
|
|
3579
|
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
3580
|
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
|
|
3581
|
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86);
|
|
3582
|
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);
|
|
3583
|
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
|
|
3584
|
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
|
3585
|
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71);
|
|
3586
|
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
|
|
3587
|
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62);
|
|
3588
|
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
|
|
3589
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
3590
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
|
|
3591
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
|
|
3592
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
|
|
3593
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
|
|
3594
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
3595
|
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3);
|
|
3596
|
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);
|
|
3597
|
+
/* harmony import */ var _splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61);
|
|
3598
|
+
/* harmony import */ var _splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_11__);
|
|
3599
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4);
|
|
3600
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_12__);
|
|
3601
|
+
|
|
3602
|
+
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
|
|
3606
|
+
|
|
3607
|
+
|
|
3608
|
+
|
|
3609
|
+
function _createSuper(Derived) {
|
|
3610
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
3611
|
+
return function _createSuperInternal() {
|
|
3612
|
+
var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived),
|
|
3613
|
+
result;
|
|
3614
|
+
if (hasNativeReflectConstruct) {
|
|
3615
|
+
var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor;
|
|
3616
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
3617
|
+
} else {
|
|
3618
|
+
result = Super.apply(this, arguments);
|
|
3619
|
+
}
|
|
3620
|
+
return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result);
|
|
3621
|
+
};
|
|
3622
|
+
}
|
|
3623
|
+
function _isNativeReflectConstruct() {
|
|
3624
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
3625
|
+
if (Reflect.construct.sham) return false;
|
|
3626
|
+
if (typeof Proxy === "function") return true;
|
|
3627
|
+
try {
|
|
3628
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
3629
|
+
return true;
|
|
3630
|
+
} catch (e) {
|
|
3631
|
+
return false;
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
|
|
3636
|
+
|
|
3637
|
+
|
|
3638
|
+
|
|
3639
|
+
var StyledSvg = styled_components__WEBPACK_IMPORTED_MODULE_12___default.a.svg.withConfig({
|
|
3640
|
+
displayName: "SparkLine__StyledSvg",
|
|
3641
|
+
componentId: "sc-5oplra-0"
|
|
3642
|
+
})(["overflow:hidden;"]);
|
|
3643
|
+
var StyledTooltip = styled_components__WEBPACK_IMPORTED_MODULE_12___default.a.div.withConfig({
|
|
3644
|
+
displayName: "SparkLine__StyledTooltip",
|
|
3645
|
+
componentId: "sc-5oplra-1"
|
|
3646
|
+
})(["padding:3px 8px;font-size:12px;"]);
|
|
3647
|
+
var SparkLine = /*#__PURE__*/function (_Component) {
|
|
3648
|
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(SparkLine, _Component);
|
|
3649
|
+
var _super = _createSuper(SparkLine);
|
|
3650
|
+
function SparkLine(props) {
|
|
3651
|
+
var _this;
|
|
3652
|
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, SparkLine);
|
|
3653
|
+
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3654
|
+
rest[_key - 1] = arguments[_key];
|
|
3655
|
+
}
|
|
3656
|
+
_this = _super.call.apply(_super, [this, props].concat(rest));
|
|
3657
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "handleCursorMount", function (el) {
|
|
3658
|
+
_this.setState({
|
|
3659
|
+
anchor: el
|
|
3660
|
+
});
|
|
3661
|
+
});
|
|
3662
|
+
_this.state = {
|
|
3663
|
+
anchor: null,
|
|
3664
|
+
currentPointX: null,
|
|
3665
|
+
open: false,
|
|
3666
|
+
rectArea: null,
|
|
3667
|
+
tooltip: null
|
|
3668
|
+
};
|
|
3669
|
+
return _this;
|
|
3670
|
+
}
|
|
3671
|
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SparkLine, [{
|
|
3672
|
+
key: "getMax",
|
|
3673
|
+
value: function getMax() {
|
|
3674
|
+
var _this2 = this;
|
|
3675
|
+
var _this$props = this.props,
|
|
3676
|
+
data = _this$props.data,
|
|
3677
|
+
acceptNull = _this$props.acceptNull,
|
|
3678
|
+
yMax = _this$props.yMax;
|
|
3679
|
+
var dataMax = function dataMax() {
|
|
3680
|
+
return acceptNull ? Object(lodash__WEBPACK_IMPORTED_MODULE_10__["max"])(_this2.fillNull(data)) : Object(lodash__WEBPACK_IMPORTED_MODULE_10__["max"])(data);
|
|
3681
|
+
};
|
|
3682
|
+
return yMax !== undefined ? yMax : dataMax();
|
|
3683
|
+
}
|
|
3684
|
+
}, {
|
|
3685
|
+
key: "getMin",
|
|
3686
|
+
value: function getMin() {
|
|
3687
|
+
var _this3 = this;
|
|
3688
|
+
var _this$props2 = this.props,
|
|
3689
|
+
data = _this$props2.data,
|
|
3690
|
+
acceptNull = _this$props2.acceptNull,
|
|
3691
|
+
yMin = _this$props2.yMin;
|
|
3692
|
+
var dataMin = function dataMin() {
|
|
3693
|
+
return acceptNull ? Object(lodash__WEBPACK_IMPORTED_MODULE_10__["min"])(_this3.fillNull(data)) : Object(lodash__WEBPACK_IMPORTED_MODULE_10__["min"])(data);
|
|
3694
|
+
};
|
|
3695
|
+
return yMin !== undefined ? yMin : dataMin();
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
/**
|
|
3699
|
+
* Gets unit value of x axis.
|
|
3700
|
+
* @param {Number} xMargin - margin of x axis.
|
|
3701
|
+
* @return {Number} unit value of x axis.
|
|
3702
|
+
* @private
|
|
3703
|
+
*/
|
|
3704
|
+
}, {
|
|
3705
|
+
key: "getXUnit",
|
|
3706
|
+
value: function getXUnit(xMargin) {
|
|
3707
|
+
var _this$props3 = this.props,
|
|
3708
|
+
data = _this$props3.data,
|
|
3709
|
+
width = _this$props3.width; // Calculate xUnit. Width substract the left margin and right margin, then divide by data length.
|
|
3710
|
+
var xUnit = (width - xMargin * 2) / (data.length > 1 ? data.length - 1 : 1);
|
|
3711
|
+
return Math.max(0, xUnit);
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
/**
|
|
3715
|
+
* Gets unit value of y axis.
|
|
3716
|
+
* @param {String} yMargin - margin of y axis.
|
|
3717
|
+
* @return {Number} unit value of y axis.
|
|
3718
|
+
* @private
|
|
3719
|
+
*/
|
|
3720
|
+
}, {
|
|
3721
|
+
key: "getYUnit",
|
|
3722
|
+
value: function getYUnit(yMargin) {
|
|
3723
|
+
var height = this.props.height;
|
|
3724
|
+
var maxValue = this.getMax();
|
|
3725
|
+
var minValue = this.getMin();
|
|
3726
|
+
|
|
3727
|
+
// Calculate yUnit. Height substract the upper margin and bottom margin, then divide by value range of values in data.
|
|
3728
|
+
// if the maxValue equals minValue, means all values in data are the same, then, we need to set the YUnit at the mid value of Height.
|
|
3729
|
+
// So, draws sparkline right in the mid of the container.
|
|
3730
|
+
var yUnit = (height - yMargin * 2) / (maxValue - minValue || 2);
|
|
3731
|
+
return Math.max(0, yUnit);
|
|
3732
|
+
}
|
|
3733
|
+
|
|
3734
|
+
/**
|
|
3735
|
+
* Get a list of arrays of points for drawing lines, based on acceptNull property
|
|
3736
|
+
* @method getSegmentSets
|
|
3737
|
+
* @param {Array} data
|
|
3738
|
+
* @param {Array} points
|
|
3739
|
+
* @returns {Array} List of datapoint sets used for drawing lines
|
|
3740
|
+
*/
|
|
3741
|
+
}, {
|
|
3742
|
+
key: "getSegmentSets",
|
|
3743
|
+
value: function getSegmentSets(data, points) {
|
|
3744
|
+
var acceptNull = this.props.acceptNull;
|
|
3745
|
+
var lines = [];
|
|
3746
|
+
var currentLine = [];
|
|
3747
|
+
data.forEach(function (p, idx) {
|
|
3748
|
+
// Found null data
|
|
3749
|
+
if (!acceptNull && Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isNull"])(p)) {
|
|
3750
|
+
// need at least 2 points to draw a segment
|
|
3751
|
+
if (currentLine.length > 1) {
|
|
3752
|
+
lines.push(currentLine);
|
|
3753
|
+
}
|
|
3754
|
+
// reset for the next segment
|
|
3755
|
+
currentLine = [];
|
|
3756
|
+
} else {
|
|
3757
|
+
// data is good, add point data
|
|
3758
|
+
currentLine.push(points[idx]);
|
|
3759
|
+
}
|
|
3760
|
+
});
|
|
3761
|
+
|
|
3762
|
+
// Add the last line
|
|
3763
|
+
if (currentLine.length > 1) {
|
|
3764
|
+
lines.push(currentLine);
|
|
3765
|
+
}
|
|
3766
|
+
return lines;
|
|
3767
|
+
}
|
|
3768
|
+
}, {
|
|
3769
|
+
key: "fillNull",
|
|
3770
|
+
value:
|
|
3771
|
+
/**
|
|
3772
|
+
* Utility for fill null value with number 0.
|
|
3773
|
+
* @private
|
|
3774
|
+
*/
|
|
3775
|
+
function fillNull() {
|
|
3776
|
+
var data = this.props.data;
|
|
3777
|
+
return data.map(function (value) {
|
|
3778
|
+
return value === null ? 0 : value;
|
|
3779
|
+
});
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
/**
|
|
3783
|
+
* Converts data to points in svg
|
|
3784
|
+
* @param {Number} xMargin - margin of x axis.
|
|
3785
|
+
* @param {Number} yMargin - margin of x axis.
|
|
3786
|
+
* @return {Array} points coordination.
|
|
3787
|
+
* @private
|
|
3788
|
+
*/
|
|
3789
|
+
}, {
|
|
3790
|
+
key: "dataToPoints",
|
|
3791
|
+
value: function dataToPoints(xMargin, yMargin) {
|
|
3792
|
+
var data = this.props.data;
|
|
3793
|
+
var xUnit = this.getXUnit(xMargin);
|
|
3794
|
+
var yUnit = this.getYUnit(yMargin);
|
|
3795
|
+
var maxValue = this.getMax();
|
|
3796
|
+
var minValue = this.getMin();
|
|
3797
|
+
return data.map(function (val, idx) {
|
|
3798
|
+
return {
|
|
3799
|
+
x: idx * xUnit + xMargin,
|
|
3800
|
+
y: maxValue === minValue ? yUnit + yMargin : (maxValue - val) * yUnit + yMargin
|
|
3801
|
+
};
|
|
3802
|
+
}).map(function (p) {
|
|
3803
|
+
return [p.x, p.y];
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
/**
|
|
3808
|
+
* Renders rect area for helping figure out which is the nearest point so that
|
|
3809
|
+
* render related cursor and tooltip.
|
|
3810
|
+
* @param {Array} points - array of points coordination.
|
|
3811
|
+
* @param {Number} xMargin - margin of x axis.
|
|
3812
|
+
* @return {Array} array of svg rect objects
|
|
3813
|
+
* @private
|
|
3814
|
+
*/
|
|
3815
|
+
}, {
|
|
3816
|
+
key: "renderRect",
|
|
3817
|
+
value: function renderRect(points, xMargin) {
|
|
3818
|
+
var _this4 = this;
|
|
3819
|
+
var _this$props4 = this.props,
|
|
3820
|
+
data = _this$props4.data,
|
|
3821
|
+
height = _this$props4.height;
|
|
3822
|
+
var xUnit = this.getXUnit(xMargin);
|
|
3823
|
+
return points.map(function (p, i) {
|
|
3824
|
+
return /*#__PURE__*/(
|
|
3825
|
+
/* eslint-disable react/no-array-index-key */
|
|
3826
|
+
react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("rect", {
|
|
3827
|
+
// eslint-disable-line jsx-a11y/mouse-events-have-key-events
|
|
3828
|
+
key: "".concat(i, "_").concat(p[0]),
|
|
3829
|
+
"data-test": "rect-".concat(i),
|
|
3830
|
+
x: p[0] - xUnit / 2 <= 0 ? 0 : p[0] - xUnit / 2,
|
|
3831
|
+
y: 0,
|
|
3832
|
+
width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
|
|
3833
|
+
height: height,
|
|
3834
|
+
style: {
|
|
3835
|
+
fillOpacity: 0
|
|
3836
|
+
},
|
|
3837
|
+
onMouseOver: function onMouseOver(e) {
|
|
3838
|
+
_this4.setState({
|
|
3839
|
+
open: data[i] !== null,
|
|
3840
|
+
rectArea: data[i] === null ? null : e.target,
|
|
3841
|
+
tooltip: data[i],
|
|
3842
|
+
currentPointX: p[0]
|
|
3843
|
+
});
|
|
3844
|
+
}
|
|
3845
|
+
})
|
|
3846
|
+
/* eslint-enable react/no-array-index-key */
|
|
3847
|
+
);
|
|
3848
|
+
});
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
// Renders area chart
|
|
3852
|
+
}, {
|
|
3853
|
+
key: "renderArea",
|
|
3854
|
+
value: function renderArea(points) {
|
|
3855
|
+
var _this$props5 = this.props,
|
|
3856
|
+
data = _this$props5.data,
|
|
3857
|
+
fillColor = _this$props5.fillColor,
|
|
3858
|
+
fillOpacity = _this$props5.fillOpacity,
|
|
3859
|
+
height = _this$props5.height,
|
|
3860
|
+
isArea = _this$props5.isArea;
|
|
3861
|
+
if (!isArea || points.length === 0) {
|
|
3862
|
+
return null;
|
|
3863
|
+
}
|
|
3864
|
+
var segments = this.getSegmentSets(data, points);
|
|
3865
|
+
segments = segments.map(function (s) {
|
|
3866
|
+
return s.concat([[s[s.length - 1][0], height],
|
|
3867
|
+
// down to bottom of graph
|
|
3868
|
+
[s[0][0], height],
|
|
3869
|
+
// over to below first data point
|
|
3870
|
+
s[0] // up to first data point to close the box
|
|
3871
|
+
]);
|
|
3872
|
+
});
|
|
3873
|
+
|
|
3874
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("g", {
|
|
3875
|
+
"data-test": "area"
|
|
3876
|
+
}, segments.map(function (s) {
|
|
3877
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("polyline", {
|
|
3878
|
+
key: "area".concat(s.join('')),
|
|
3879
|
+
points: s.join(' '),
|
|
3880
|
+
"data-test": "area-line",
|
|
3881
|
+
style: {
|
|
3882
|
+
fill: fillColor,
|
|
3883
|
+
fillOpacity: fillOpacity,
|
|
3884
|
+
strokeWidth: '0'
|
|
3885
|
+
}
|
|
3886
|
+
});
|
|
3887
|
+
}));
|
|
3888
|
+
}
|
|
3889
|
+
}, {
|
|
3890
|
+
key: "renderCursor",
|
|
3891
|
+
value: function renderCursor() {
|
|
3892
|
+
var _this$props6 = this.props,
|
|
3893
|
+
cursorStroke = _this$props6.cursorStroke,
|
|
3894
|
+
cursorStrokeWidth = _this$props6.cursorStrokeWidth,
|
|
3895
|
+
cursorStrokeLinecap = _this$props6.cursorStrokeLinecap,
|
|
3896
|
+
cursorStrokeDasharray = _this$props6.cursorStrokeDasharray,
|
|
3897
|
+
height = _this$props6.height;
|
|
3898
|
+
return this.state.rectArea !== null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("line", {
|
|
3899
|
+
"data-test": "cursor",
|
|
3900
|
+
ref: this.handleCursorMount,
|
|
3901
|
+
x1: this.state.currentPointX,
|
|
3902
|
+
y1: 0,
|
|
3903
|
+
x2: this.state.currentPointX,
|
|
3904
|
+
y2: height,
|
|
3905
|
+
style: {
|
|
3906
|
+
stroke: cursorStroke,
|
|
3907
|
+
strokeWidth: cursorStrokeWidth,
|
|
3908
|
+
strokeLinecap: cursorStrokeLinecap,
|
|
3909
|
+
strokeDasharray: cursorStrokeDasharray
|
|
3910
|
+
}
|
|
3911
|
+
});
|
|
3912
|
+
}
|
|
3913
|
+
}, {
|
|
3914
|
+
key: "renderTooltip",
|
|
3915
|
+
value: function renderTooltip() {
|
|
3916
|
+
return this.state.anchor !== null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_11___default.a, {
|
|
3917
|
+
"data-test": "tooltip",
|
|
3918
|
+
open: this.state.open,
|
|
3919
|
+
anchor: this.state.anchor,
|
|
3920
|
+
"data-test-value": this.state.tooltip,
|
|
3921
|
+
appearance: "inverted",
|
|
3922
|
+
defaultPlacement: "above",
|
|
3923
|
+
animation: false
|
|
3924
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(StyledTooltip, null, this.state.anchor !== null ? this.state.tooltip : undefined));
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
/**
|
|
3928
|
+
* Renders one or more svg circles to highlight values on the sparkline
|
|
3929
|
+
* @method renderEndDots
|
|
3930
|
+
* @param {Array[Array[Number]]} points // x,y coordinates of values
|
|
3931
|
+
* @param {Number} dotsToShow // number of end dots to display
|
|
3932
|
+
* @param {Number} xMargin // used when calculating the dot radius
|
|
3933
|
+
* @returns {Object} React representation of SVG group
|
|
3934
|
+
* @private
|
|
3935
|
+
*/
|
|
3936
|
+
}, {
|
|
3937
|
+
key: "renderEndDots",
|
|
3938
|
+
value: function renderEndDots(points, dotsToShow, xMargin) {
|
|
3939
|
+
var _this$props7 = this.props,
|
|
3940
|
+
endDotFillColor = _this$props7.endDotFillColor,
|
|
3941
|
+
endDotRadius = _this$props7.endDotRadius,
|
|
3942
|
+
endDotStroke = _this$props7.endDotStroke,
|
|
3943
|
+
endDotStrokeWidth = _this$props7.endDotStrokeWidth;
|
|
3944
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("g", null, points.slice(-dotsToShow).map(function (point) {
|
|
3945
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("circle", {
|
|
3946
|
+
key: "end-dot".concat(point[0]).concat(point[1]),
|
|
3947
|
+
"data-test": "end-dot",
|
|
3948
|
+
cx: point[0],
|
|
3949
|
+
cy: point[1],
|
|
3950
|
+
r: endDotRadius === 0 ? xMargin : endDotRadius,
|
|
3951
|
+
style: {
|
|
3952
|
+
fill: endDotFillColor,
|
|
3953
|
+
stroke: endDotStroke,
|
|
3954
|
+
strokeWidth: endDotStrokeWidth
|
|
3955
|
+
}
|
|
3956
|
+
});
|
|
3957
|
+
}));
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
/**
|
|
3961
|
+
* Renders the line(s) above the area graph
|
|
3962
|
+
* @method renderPolyline
|
|
3963
|
+
* @param {Array} points
|
|
3964
|
+
* @returns {Object} SVG Group of polylines
|
|
3965
|
+
*/
|
|
3966
|
+
}, {
|
|
3967
|
+
key: "renderPolyline",
|
|
3968
|
+
value: function renderPolyline(points) {
|
|
3969
|
+
var _this$props8 = this.props,
|
|
3970
|
+
data = _this$props8.data,
|
|
3971
|
+
lineColor = _this$props8.lineColor,
|
|
3972
|
+
lineLength = _this$props8.lineLength,
|
|
3973
|
+
lineStrokeWidth = _this$props8.lineStrokeWidth;
|
|
3974
|
+
var linePoints = Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isFinite"])(lineLength) && lineLength > 0 ? lineLength : points.length;
|
|
3975
|
+
var lines = this.getSegmentSets(data.slice(-linePoints), points.slice(-linePoints));
|
|
3976
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("g", {
|
|
3977
|
+
"data-test": "sparkline"
|
|
3978
|
+
}, lines.map(function (lineData) {
|
|
3979
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("polyline", {
|
|
3980
|
+
key: "line".concat(lineData.join('')),
|
|
3981
|
+
"data-test": "polyline",
|
|
3982
|
+
style: {
|
|
3983
|
+
fill: 'none',
|
|
3984
|
+
stroke: lineColor,
|
|
3985
|
+
strokeWidth: lineStrokeWidth,
|
|
3986
|
+
strokeLinejoin: 'round',
|
|
3987
|
+
strokeLinecap: 'round'
|
|
3988
|
+
},
|
|
3989
|
+
points: lineData.join(' ')
|
|
3990
|
+
});
|
|
3991
|
+
}));
|
|
3992
|
+
}
|
|
3993
|
+
}, {
|
|
3994
|
+
key: "render",
|
|
3995
|
+
value: function render() {
|
|
3996
|
+
var _this5 = this;
|
|
3997
|
+
var _this$props9 = this.props,
|
|
3998
|
+
data = _this$props9.data,
|
|
3999
|
+
elementRef = _this$props9.elementRef,
|
|
4000
|
+
showTooltip = _this$props9.showTooltip,
|
|
4001
|
+
showEndDot = _this$props9.showEndDot,
|
|
4002
|
+
endDotRadius = _this$props9.endDotRadius,
|
|
4003
|
+
endDotStrokeWidth = _this$props9.endDotStrokeWidth,
|
|
4004
|
+
endDotCount = _this$props9.endDotCount,
|
|
4005
|
+
height = _this$props9.height,
|
|
4006
|
+
isArea = _this$props9.isArea,
|
|
4007
|
+
lineStrokeWidth = _this$props9.lineStrokeWidth,
|
|
4008
|
+
width = _this$props9.width;
|
|
4009
|
+
if (data.length === 0) {
|
|
4010
|
+
return null;
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
// Calculate horizontal and vertical margin so that fit line or end dot.
|
|
4014
|
+
var xMargin = endDotRadius + endDotStrokeWidth / 2;
|
|
4015
|
+
var yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
|
|
4016
|
+
var points = this.dataToPoints(xMargin, yMargin);
|
|
4017
|
+
var dotsToShow = Math.max(showEndDot && 1, Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isFinite"])(endDotCount) && endDotCount > 0 && endDotCount);
|
|
4018
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
4019
|
+
// eslint-disable-line jsx-a11y/mouse-events-have-key-events
|
|
4020
|
+
"data-test": "line",
|
|
4021
|
+
"data-test-type": isArea ? 'area' : 'line',
|
|
4022
|
+
onMouseOut: function onMouseOut() {
|
|
4023
|
+
_this5.setState({
|
|
4024
|
+
open: false,
|
|
4025
|
+
anchor: null,
|
|
4026
|
+
rectArea: null,
|
|
4027
|
+
currentPointX: null
|
|
4028
|
+
});
|
|
4029
|
+
},
|
|
4030
|
+
ref: elementRef
|
|
4031
|
+
}, Object(lodash__WEBPACK_IMPORTED_MODULE_10__["omit"])(this.props, Object(lodash__WEBPACK_IMPORTED_MODULE_10__["keys"])(SparkLine.propTypes))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(StyledSvg, {
|
|
4032
|
+
height: height,
|
|
4033
|
+
width: width
|
|
4034
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("g", null, this.renderCursor(), this.renderPolyline(points), this.renderArea(points), dotsToShow ? this.renderEndDots(points, dotsToShow, xMargin) : null, showTooltip ? this.renderRect(points, xMargin) : null, showTooltip ? this.renderTooltip() : null)));
|
|
4035
|
+
}
|
|
4036
|
+
}]);
|
|
4037
|
+
return SparkLine;
|
|
4038
|
+
}(react__WEBPACK_IMPORTED_MODULE_9__["Component"]);
|
|
4039
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(SparkLine, "propTypes", {
|
|
4040
|
+
/**
|
|
4041
|
+
* If true, data can contain `null` as a value and is treated as `0`. If false, this throws error when data contains `null`.
|
|
4042
|
+
*/
|
|
4043
|
+
acceptNull: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool,
|
|
4044
|
+
/** Array of numbers. These data numbers are converted to points and show on sparkline. */
|
|
4045
|
+
data: function data(props) {
|
|
4046
|
+
if (!Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isArray"])(props.data)) {
|
|
4047
|
+
return new Error('Data provided to Sparkline must be an array.');
|
|
4048
|
+
}
|
|
4049
|
+
if (props.acceptNull && !props.data.every(function (value) {
|
|
4050
|
+
return Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isNull"])(value) || Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isFinite"])(value);
|
|
4051
|
+
})) {
|
|
4052
|
+
return new Error('Data provided to Sparkline must be finite numbers or null.');
|
|
4053
|
+
}
|
|
4054
|
+
if (!props.acceptNull && !props.data.every(function (value) {
|
|
4055
|
+
return Object(lodash__WEBPACK_IMPORTED_MODULE_10__["isFinite"])(value);
|
|
4056
|
+
})) {
|
|
4057
|
+
return new Error('Data provided to Sparkline must be finite numbers.');
|
|
4058
|
+
}
|
|
4059
|
+
return null;
|
|
4060
|
+
},
|
|
4061
|
+
/** A React ref which is set to the DOM element when the component mounts and `null` when it unmounts. */
|
|
4062
|
+
elementRef: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object]),
|
|
4063
|
+
/** Sets the number of end dots to display. When showEndDot is set to `true`, endDotCount is at least 1. If set to a positive value, this overrides showEndDot. */
|
|
4064
|
+
endDotCount: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4065
|
+
/** Fills color to the end dot. */
|
|
4066
|
+
endDotFillColor: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4067
|
+
/**
|
|
4068
|
+
* Sets end dot radius. End dot radius must be less than or equal to the margin. By default, its value equals the margin.
|
|
4069
|
+
*/
|
|
4070
|
+
endDotRadius: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4071
|
+
/** Sets end dot circle stroke color. */
|
|
4072
|
+
endDotStroke: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4073
|
+
/** Sets end dot circle stroke width in pixels. */
|
|
4074
|
+
endDotStrokeWidth: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4075
|
+
/** Fills color to area. */
|
|
4076
|
+
fillColor: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4077
|
+
/** Fills opacity to area. Value must be in 0 ~ 1. */
|
|
4078
|
+
fillOpacity: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4079
|
+
/** Sets cursor stroke color. */
|
|
4080
|
+
cursorStroke: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4081
|
+
/** Sets cursor stroke width in pixels. */
|
|
4082
|
+
cursorStrokeWidth: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4083
|
+
/** Sets cursor line cap style. */
|
|
4084
|
+
cursorStrokeLinecap: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.oneOf(['butt', 'round', 'square']),
|
|
4085
|
+
/** Sets cursor dash array style. */
|
|
4086
|
+
cursorStrokeDasharray: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4087
|
+
/**
|
|
4088
|
+
* Container height. If this value is specified, sparkline calculates the size using this height. If height isn't specified,
|
|
4089
|
+
* sparkline figures out the container height by itself.
|
|
4090
|
+
*/
|
|
4091
|
+
height: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number.isRequired,
|
|
4092
|
+
/** When set to `true`, sparkline shows as area. */
|
|
4093
|
+
isArea: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool,
|
|
4094
|
+
/** The sparkline line color. */
|
|
4095
|
+
lineColor: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string,
|
|
4096
|
+
/** Allows user to draw only the last data points for the line. */
|
|
4097
|
+
lineLength: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4098
|
+
/** The sparkline line stroke width in pixels. */
|
|
4099
|
+
lineStrokeWidth: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4100
|
+
/** Enable to show end dot. */
|
|
4101
|
+
showEndDot: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool,
|
|
4102
|
+
/** Enable to show tooltip. */
|
|
4103
|
+
showTooltip: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool,
|
|
4104
|
+
/** Sets the data value range and maximum value shown on sparkline. */
|
|
4105
|
+
yMax: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4106
|
+
/** Sets the data value range and minimum value shown on sparkline. */
|
|
4107
|
+
yMin: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number,
|
|
4108
|
+
/**
|
|
4109
|
+
* The width of the container.
|
|
4110
|
+
*/
|
|
4111
|
+
width: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number.isRequired
|
|
4112
|
+
});
|
|
4113
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(SparkLine, "defaultProps", {
|
|
4114
|
+
acceptNull: false,
|
|
4115
|
+
data: [],
|
|
4116
|
+
showTooltip: true,
|
|
4117
|
+
endDotCount: 0,
|
|
4118
|
+
showEndDot: false,
|
|
4119
|
+
endDotRadius: 0,
|
|
4120
|
+
endDotFillColor: 'white',
|
|
4121
|
+
endDotStroke: 'black',
|
|
4122
|
+
endDotStrokeWidth: 0,
|
|
4123
|
+
fillColor: '#65a637',
|
|
4124
|
+
fillOpacity: '.1',
|
|
4125
|
+
cursorStroke: '#5184AF',
|
|
4126
|
+
cursorStrokeWidth: 3,
|
|
4127
|
+
cursorStrokeLinecap: 'square',
|
|
4128
|
+
cursorStrokeDasharray: '1, 5',
|
|
4129
|
+
isArea: false,
|
|
4130
|
+
lineColor: '#65a637',
|
|
4131
|
+
lineStrokeWidth: 1
|
|
4132
|
+
});
|
|
4133
|
+
/* harmony default export */ __webpack_exports__["default"] = (SparkLine);
|
|
4134
|
+
|
|
4135
|
+
/***/ }),
|
|
4136
|
+
|
|
4137
|
+
/***/ 98:
|
|
4138
|
+
/***/ (function(module, exports) {
|
|
4139
|
+
|
|
3536
4140
|
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
3537
4141
|
|
|
3538
4142
|
/***/ })
|