@splunk/visualizations 25.13.1 → 26.0.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.config.js +216 -216
- package/Area.config.js.map +1 -1
- package/Area.js +529 -561
- package/Area.js.map +1 -1
- package/Bar.config.js +213 -213
- package/Bar.config.js.map +1 -1
- package/Bar.js +394 -386
- package/Bar.js.map +1 -1
- package/Bubble.config.js +140 -140
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +313 -305
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +15 -15
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +149 -144
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +205 -205
- package/Column.config.js.map +1 -1
- package/Column.js +387 -379
- package/Column.js.map +1 -1
- package/Ellipse.config.js +45 -45
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +157 -144
- package/Ellipse.js.map +1 -1
- package/Events.config.js +11 -11
- package/Events.config.js.map +1 -1
- package/Events.js +273 -261
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +46 -46
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +267 -262
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +8 -8
- package/Image.config.js.map +1 -1
- package/Image.js +110 -104
- package/Image.js.map +1 -1
- package/Line.config.js +220 -220
- package/Line.config.js.map +1 -1
- package/Line.js +404 -396
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +27 -27
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +557 -548
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +71 -71
- package/Map.config.js.map +1 -1
- package/Map.js +471 -465
- package/Map.js.map +1 -1
- package/Markdown.config.js +23 -23
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +151 -145
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +84 -84
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +295 -289
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +23 -23
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +164 -162
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +24 -24
- package/Pie.config.js.map +1 -1
- package/Pie.js +233 -228
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +33 -33
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +278 -279
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +46 -46
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +154 -142
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +19 -19
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +281 -275
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +135 -135
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +304 -299
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +119 -119
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +359 -341
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +14 -14
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +117 -117
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +373 -371
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +157 -115
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1114 -540
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +50 -20
- package/SparkLine.js.map +1 -1
- package/Table.config.js +54 -54
- package/Table.config.js.map +1 -1
- package/Table.js +302 -286
- package/Table.js.map +1 -1
- package/common/Charting.js +41 -41
- package/common/Charting.js.map +1 -1
- package/common/EventsDoc.js +15 -14
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +2 -2
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +22 -22
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +32 -27
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +14 -14
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +12 -12
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +112 -112
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +21 -15
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +10 -9
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +2 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +2 -2
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +84 -80
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +2 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +27 -9
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +26 -26
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +2 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +107 -104
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +19 -19
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 = 479);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -120,7 +120,7 @@ module.exports = require("@splunk/themes/variables");
|
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
|
-
/***/
|
|
123
|
+
/***/ 112:
|
|
124
124
|
/***/ (function(module, exports) {
|
|
125
125
|
|
|
126
126
|
module.exports = require("@splunk/react-ui/Table");
|
|
@@ -134,7 +134,7 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
|
134
134
|
|
|
135
135
|
/***/ }),
|
|
136
136
|
|
|
137
|
-
/***/
|
|
137
|
+
/***/ 124:
|
|
138
138
|
/***/ (function(module, exports) {
|
|
139
139
|
|
|
140
140
|
module.exports = require("@splunk/react-ui/Message");
|
|
@@ -159,14 +159,14 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
|
159
159
|
var width = _ref.width;
|
|
160
160
|
return {
|
|
161
161
|
style: {
|
|
162
|
-
width: style_1.toPx(width)
|
|
162
|
+
width: (0, style_1.toPx)(width)
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
165
|
}).withConfig({
|
|
166
166
|
displayName: "FixedSizeContainer__Item",
|
|
167
167
|
componentId: "sc-1yhgpod-0"
|
|
168
168
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
169
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
169
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
170
170
|
});
|
|
171
171
|
// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
172
172
|
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
@@ -174,16 +174,16 @@ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
|
174
174
|
height = _ref2.height;
|
|
175
175
|
return {
|
|
176
176
|
style: Object.assign(Object.assign({}, width && {
|
|
177
|
-
width: style_1.toPx(width)
|
|
177
|
+
width: (0, style_1.toPx)(width)
|
|
178
178
|
}), height && {
|
|
179
|
-
height: style_1.toPx(height)
|
|
179
|
+
height: (0, style_1.toPx)(height)
|
|
180
180
|
})
|
|
181
181
|
};
|
|
182
182
|
}).withConfig({
|
|
183
183
|
displayName: "FixedSizeContainer__FixSizeItem",
|
|
184
184
|
componentId: "sc-1yhgpod-1"
|
|
185
185
|
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
186
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
186
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
187
187
|
});
|
|
188
188
|
var ItemContent = styled_components_1.default.div.withConfig({
|
|
189
189
|
displayName: "FixedSizeContainer__ItemContent",
|
|
@@ -207,7 +207,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
207
207
|
}
|
|
208
208
|
return React.createElement(FixSizeItem, {
|
|
209
209
|
"data-test": "fix-size-item",
|
|
210
|
-
"data-splunk-visualization-version": "
|
|
210
|
+
"data-splunk-visualization-version": "26.0.0 - 2f7458907",
|
|
211
211
|
width: width,
|
|
212
212
|
height: height,
|
|
213
213
|
backgroundColor: backgroundColor
|
|
@@ -227,7 +227,7 @@ exports.default = withFixedSizeContainer;
|
|
|
227
227
|
|
|
228
228
|
/***/ }),
|
|
229
229
|
|
|
230
|
-
/***/
|
|
230
|
+
/***/ 137:
|
|
231
231
|
/***/ (function(module, exports, __webpack_require__) {
|
|
232
232
|
|
|
233
233
|
"use strict";
|
|
@@ -291,7 +291,7 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
|
291
291
|
|
|
292
292
|
/***/ }),
|
|
293
293
|
|
|
294
|
-
/***/
|
|
294
|
+
/***/ 168:
|
|
295
295
|
/***/ (function(module, exports, __webpack_require__) {
|
|
296
296
|
|
|
297
297
|
"use strict";
|
|
@@ -314,10 +314,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
314
314
|
exports.config = exports.PureTable = exports.themes = exports.computeVizProps = void 0;
|
|
315
315
|
var lodash_1 = __webpack_require__(3);
|
|
316
316
|
var colorUtils_1 = __webpack_require__(12);
|
|
317
|
-
var config_1 = __webpack_require__(
|
|
317
|
+
var config_1 = __webpack_require__(480);
|
|
318
318
|
exports.config = config_1.default;
|
|
319
319
|
var withDashboardViz_1 = __webpack_require__(36);
|
|
320
|
-
var PureTable_1 = __webpack_require__(
|
|
320
|
+
var PureTable_1 = __webpack_require__(481);
|
|
321
321
|
exports.PureTable = PureTable_1.default;
|
|
322
322
|
var computeVizProps = function computeVizProps(_a) {
|
|
323
323
|
var props = __rest(_a, []);
|
|
@@ -337,7 +337,7 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
337
337
|
// If columns have `rowBackgroundColors` or `rowColors` arrays defined, sanitize them. If there are undefined values after sanitization, these
|
|
338
338
|
// elements are populated with the default values provided by the theme.
|
|
339
339
|
if (columnProperties.rowBackgroundColors) {
|
|
340
|
-
rowBackgroundColors = colorUtils_1.sanitizeArrayOfColors(columnProperties.rowBackgroundColors).map(function (color, i) {
|
|
340
|
+
rowBackgroundColors = (0, colorUtils_1.sanitizeArrayOfColors)(columnProperties.rowBackgroundColors).map(function (color, i) {
|
|
341
341
|
return (
|
|
342
342
|
// using (i + 1) % 2 because 'odd' refers to row number, so index 0 -> row 1 -> odd colored
|
|
343
343
|
color || ((i + 1) % 2 === 0 ? themeRowBackgroundColorEven : themeRowBackgroundColorOdd)
|
|
@@ -345,7 +345,7 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
if (columnProperties.rowColors) {
|
|
348
|
-
rowColors = colorUtils_1.sanitizeArrayOfColors(columnProperties.rowColors).map(function (color) {
|
|
348
|
+
rowColors = (0, colorUtils_1.sanitizeArrayOfColors)(columnProperties.rowColors).map(function (color) {
|
|
349
349
|
return color || themeTextColor;
|
|
350
350
|
});
|
|
351
351
|
}
|
|
@@ -366,7 +366,7 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
366
366
|
if (!cloneOfExistingColumnFormat[key]) {
|
|
367
367
|
cloneOfExistingColumnFormat[key] = {};
|
|
368
368
|
}
|
|
369
|
-
var newWidth = lodash_1.get(values[index], 'width');
|
|
369
|
+
var newWidth = (0, lodash_1.get)(values[index], 'width');
|
|
370
370
|
cloneOfExistingColumnFormat[key] = Object.assign(Object.assign({}, cloneOfExistingColumnFormat[key]), {
|
|
371
371
|
width: newWidth
|
|
372
372
|
});
|
|
@@ -380,7 +380,7 @@ var computeVizProps = function computeVizProps(_a) {
|
|
|
380
380
|
return vizProps;
|
|
381
381
|
};
|
|
382
382
|
exports.computeVizProps = computeVizProps;
|
|
383
|
-
var Table = withDashboardViz_1.default({
|
|
383
|
+
var Table = (0, withDashboardViz_1.default)({
|
|
384
384
|
ReactViz: PureTable_1.default,
|
|
385
385
|
vizConfig: config_1.default,
|
|
386
386
|
disableEditModeCover: true,
|
|
@@ -580,8 +580,8 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
580
580
|
*/
|
|
581
581
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
582
582
|
return presets.find(function (preset) {
|
|
583
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
584
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
583
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
584
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
585
585
|
var presetContextKeys = Object.keys(presetContext);
|
|
586
586
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
587
587
|
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
@@ -598,7 +598,7 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
598
598
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
599
599
|
*/
|
|
600
600
|
function generatePrecisionValues(numPrecisionValues) {
|
|
601
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
601
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
602
602
|
return {
|
|
603
603
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
604
604
|
value: i
|
|
@@ -641,28 +641,28 @@ module.exports = require("@splunk/themes/pick");
|
|
|
641
641
|
/***/ 25:
|
|
642
642
|
/***/ (function(module, exports) {
|
|
643
643
|
|
|
644
|
-
module.exports = require("@splunk/
|
|
644
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
645
645
|
|
|
646
646
|
/***/ }),
|
|
647
647
|
|
|
648
648
|
/***/ 26:
|
|
649
649
|
/***/ (function(module, exports) {
|
|
650
650
|
|
|
651
|
-
module.exports = require("@splunk/
|
|
651
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
652
652
|
|
|
653
653
|
/***/ }),
|
|
654
654
|
|
|
655
655
|
/***/ 27:
|
|
656
656
|
/***/ (function(module, exports) {
|
|
657
657
|
|
|
658
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
658
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
659
659
|
|
|
660
660
|
/***/ }),
|
|
661
661
|
|
|
662
|
-
/***/
|
|
662
|
+
/***/ 28:
|
|
663
663
|
/***/ (function(module, exports) {
|
|
664
664
|
|
|
665
|
-
module.exports = require("@splunk/
|
|
665
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
666
666
|
|
|
667
667
|
/***/ }),
|
|
668
668
|
|
|
@@ -673,7 +673,14 @@ module.exports = require("lodash");
|
|
|
673
673
|
|
|
674
674
|
/***/ }),
|
|
675
675
|
|
|
676
|
-
/***/
|
|
676
|
+
/***/ 30:
|
|
677
|
+
/***/ (function(module, exports) {
|
|
678
|
+
|
|
679
|
+
module.exports = require("@splunk/visualization-encoding/Options");
|
|
680
|
+
|
|
681
|
+
/***/ }),
|
|
682
|
+
|
|
683
|
+
/***/ 32:
|
|
677
684
|
/***/ (function(module, exports, __webpack_require__) {
|
|
678
685
|
|
|
679
686
|
"use strict";
|
|
@@ -697,9 +704,9 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
697
704
|
*/
|
|
698
705
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
699
706
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
700
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
707
|
+
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
701
708
|
var noData = data === undefined;
|
|
702
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
709
|
+
var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
|
|
703
710
|
var noFields = fields === undefined;
|
|
704
711
|
return loading || noData || noFields;
|
|
705
712
|
};
|
|
@@ -740,7 +747,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
740
747
|
width: width,
|
|
741
748
|
height: height,
|
|
742
749
|
level: "warning",
|
|
743
|
-
message: i18n_1._('No DataSource Connected')
|
|
750
|
+
message: (0, i18n_1._)('No DataSource Connected')
|
|
744
751
|
});
|
|
745
752
|
};
|
|
746
753
|
IconPlaceholder.propTypes = propTypes;
|
|
@@ -748,14 +755,7 @@ IconPlaceholder.defaultProps = {
|
|
|
748
755
|
width: '100%',
|
|
749
756
|
height: 250
|
|
750
757
|
};
|
|
751
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
752
|
-
|
|
753
|
-
/***/ }),
|
|
754
|
-
|
|
755
|
-
/***/ 32:
|
|
756
|
-
/***/ (function(module, exports) {
|
|
757
|
-
|
|
758
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
758
|
+
exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
759
759
|
|
|
760
760
|
/***/ }),
|
|
761
761
|
|
|
@@ -790,7 +790,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
790
790
|
};
|
|
791
791
|
var onSort;
|
|
792
792
|
if (typeof onRequestParamsChange === 'function') {
|
|
793
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
793
|
+
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
794
794
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
795
795
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
796
796
|
}
|
|
@@ -799,7 +799,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
799
799
|
var sortKey = _ref2.sortKey,
|
|
800
800
|
sortDir = _ref2.sortDir;
|
|
801
801
|
if (typeof sortKey === 'string') {
|
|
802
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
802
|
+
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
803
803
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
804
804
|
offset: 0,
|
|
805
805
|
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
@@ -850,7 +850,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
850
850
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
851
851
|
var page = _ref2.page,
|
|
852
852
|
countArg = _ref2.count;
|
|
853
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
853
|
+
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
854
854
|
if (typeof countArg === 'number') {
|
|
855
855
|
newParams.count = countArg;
|
|
856
856
|
newParams.offset = 0;
|
|
@@ -914,16 +914,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
914
914
|
var React = __webpack_require__(1);
|
|
915
915
|
var lodash_1 = __webpack_require__(3);
|
|
916
916
|
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
917
|
-
var Options_1 = __webpack_require__(
|
|
917
|
+
var Options_1 = __webpack_require__(30);
|
|
918
918
|
var SanitizeProps_1 = __webpack_require__(38);
|
|
919
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
919
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
920
920
|
var moment_1 = __webpack_require__(39);
|
|
921
921
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
922
922
|
var styled_components_1 = __webpack_require__(4);
|
|
923
|
-
var hocUtils_1 = __webpack_require__(
|
|
924
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
923
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
924
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
925
925
|
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
926
|
-
var id_1 = __webpack_require__(
|
|
926
|
+
var id_1 = __webpack_require__(25);
|
|
927
927
|
var SplunkVisualization_1 = __webpack_require__(41);
|
|
928
928
|
var VizBehavior_1 = __webpack_require__(6);
|
|
929
929
|
var getSorting_1 = __webpack_require__(33);
|
|
@@ -944,8 +944,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
944
944
|
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
945
945
|
disableEditModeCover = opts.disableEditModeCover,
|
|
946
946
|
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
947
|
-
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
948
|
-
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
947
|
+
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
948
|
+
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
949
949
|
var DashboardViz = function DashboardViz(props) {
|
|
950
950
|
var _a;
|
|
951
951
|
var mode = props.mode,
|
|
@@ -980,19 +980,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
980
980
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
981
981
|
};
|
|
982
982
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
983
|
-
var
|
|
983
|
+
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
984
984
|
theme: theme
|
|
985
985
|
}),
|
|
986
|
-
currentThemeFamily =
|
|
987
|
-
currentThemeColorScheme =
|
|
988
|
-
currentThemeDensity =
|
|
986
|
+
currentThemeFamily = _ref.family,
|
|
987
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
988
|
+
currentThemeDensity = _ref.density;
|
|
989
989
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
990
990
|
var _React$useState = React.useState({}),
|
|
991
991
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
992
992
|
evaluatedOptionsAsync = _React$useState2[0],
|
|
993
993
|
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
994
994
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
995
|
-
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
|
|
995
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
996
996
|
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
997
997
|
visualizationID = _React$useState4[0];
|
|
998
998
|
var _React$useState5 = React.useState({}),
|
|
@@ -1003,16 +1003,17 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1003
1003
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1004
1004
|
dataFramesInState = _React$useState8[0],
|
|
1005
1005
|
setDataFramesInState = _React$useState8[1];
|
|
1006
|
-
var _React$useState9 = React.useState(Boolean(featureFlagContext
|
|
1006
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
1007
1007
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
1008
1008
|
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
1009
1009
|
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
1010
|
-
|
|
1010
|
+
var isMounted = React.useRef(true);
|
|
1011
|
+
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
1011
1012
|
try {
|
|
1012
1013
|
if (useAsyncEvaluatedOptions) {
|
|
1013
1014
|
var optionsToEvaluate = {
|
|
1014
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1015
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1015
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1016
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
1016
1017
|
};
|
|
1017
1018
|
var asyncDynamicOptionsEvaluatorParams = {
|
|
1018
1019
|
visualizationID: visualizationID,
|
|
@@ -1023,10 +1024,10 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1023
1024
|
};
|
|
1024
1025
|
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
1025
1026
|
setEvaluatedOptionsAsync(results.results);
|
|
1026
|
-
}).catch(function (
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1027
|
+
}).catch(function () {
|
|
1028
|
+
if (isMounted.current) {
|
|
1029
|
+
setUseAsyncEvaluatedOptions(false);
|
|
1030
|
+
}
|
|
1030
1031
|
});
|
|
1031
1032
|
} else {
|
|
1032
1033
|
var dataFrames = dataFramesInState;
|
|
@@ -1036,8 +1037,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1036
1037
|
setDataFramesInState(dataFrames);
|
|
1037
1038
|
}
|
|
1038
1039
|
return Options_1.Options.evaluate({
|
|
1039
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1040
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1040
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1041
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
1041
1042
|
}, dataSources, themeFunc, dataFrames);
|
|
1042
1043
|
}
|
|
1043
1044
|
} catch (e) {
|
|
@@ -1066,6 +1067,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1066
1067
|
React.useEffect(function () {
|
|
1067
1068
|
return function () {
|
|
1068
1069
|
if (useAsyncEvaluatedOptions) {
|
|
1070
|
+
isMounted.current = false;
|
|
1069
1071
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
1070
1072
|
}
|
|
1071
1073
|
};
|
|
@@ -1075,7 +1077,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1075
1077
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
1076
1078
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1077
1079
|
supports = vizConfig.supports;
|
|
1078
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
1080
|
+
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
1079
1081
|
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
|
|
1080
1082
|
) {
|
|
1081
1083
|
return React.createElement(MissingPropsMessage_1.default, {
|
|
@@ -1091,7 +1093,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1091
1093
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1092
1094
|
var supportedEvents = vizConfig.events;
|
|
1093
1095
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1094
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1096
|
+
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1095
1097
|
eventCallbackProps[eventCallbackPropName] = null;
|
|
1096
1098
|
// todo: refactor single value and single value icon to send payload from viz
|
|
1097
1099
|
// then remove these lines
|
|
@@ -1134,19 +1136,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1134
1136
|
*/
|
|
1135
1137
|
var dataSourceMetadata = {};
|
|
1136
1138
|
var OptionKey = 'paginateDataSourceKey';
|
|
1137
|
-
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1138
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1139
|
-
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1140
|
-
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1139
|
+
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1140
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1141
|
+
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1142
|
+
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1141
1143
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1142
1144
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1143
1145
|
};
|
|
1144
|
-
var sortParams = getSorting_1.getSortingParams({
|
|
1146
|
+
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1145
1147
|
requestParams: requestParams,
|
|
1146
1148
|
meta: meta,
|
|
1147
1149
|
onRequestParamsChange: handleRequestParamsChange
|
|
1148
1150
|
});
|
|
1149
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1151
|
+
var paginatorParams = (0, getPagination_1.getPaginationParams)({
|
|
1150
1152
|
requestParams: requestParams,
|
|
1151
1153
|
meta: meta,
|
|
1152
1154
|
onRequestParamsChange: handleRequestParamsChange
|
|
@@ -1174,7 +1176,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1174
1176
|
// attach viz config
|
|
1175
1177
|
DashboardViz.config = vizConfig;
|
|
1176
1178
|
// @ts-ignore: TODO fix sc upgrade TS issues
|
|
1177
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1179
|
+
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1178
1180
|
};
|
|
1179
1181
|
exports.default = withDashboardViz;
|
|
1180
1182
|
|
|
@@ -1418,8 +1420,8 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1418
1420
|
* @param dependencies an array of dependencies
|
|
1419
1421
|
*/
|
|
1420
1422
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1421
|
-
var ref = react_1.useRef();
|
|
1422
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1423
|
+
var ref = (0, react_1.useRef)();
|
|
1424
|
+
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
1423
1425
|
ref.current = {
|
|
1424
1426
|
dependencies: dependencies,
|
|
1425
1427
|
value: fn()
|
|
@@ -1463,7 +1465,7 @@ exports.isMissing = isMissing;
|
|
|
1463
1465
|
*/
|
|
1464
1466
|
var missingKeys = function missingKeys(keys, target) {
|
|
1465
1467
|
return keys.filter(function (k) {
|
|
1466
|
-
return exports.isMissing(target[k]);
|
|
1468
|
+
return (0, exports.isMissing)(target[k]);
|
|
1467
1469
|
});
|
|
1468
1470
|
};
|
|
1469
1471
|
exports.missingKeys = missingKeys;
|
|
@@ -1487,7 +1489,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
|
1487
1489
|
"data-test": "message",
|
|
1488
1490
|
width: width,
|
|
1489
1491
|
height: height,
|
|
1490
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1492
|
+
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
1491
1493
|
});
|
|
1492
1494
|
};
|
|
1493
1495
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
@@ -1496,7 +1498,7 @@ exports.MissingPropsMessage.defaultProps = {
|
|
|
1496
1498
|
width: '100%',
|
|
1497
1499
|
height: 250
|
|
1498
1500
|
};
|
|
1499
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1501
|
+
exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
|
|
1500
1502
|
|
|
1501
1503
|
/***/ }),
|
|
1502
1504
|
|
|
@@ -1517,7 +1519,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1517
1519
|
componentId: "sc-1gsbnxb-0"
|
|
1518
1520
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1519
1521
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1520
|
-
'data-splunk-visualization-version': "
|
|
1522
|
+
'data-splunk-visualization-version': "26.0.0 - 2f7458907"
|
|
1521
1523
|
}).withConfig({
|
|
1522
1524
|
displayName: "withEditModeCover__Blocker",
|
|
1523
1525
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1536,7 +1538,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1536
1538
|
"data-test": "edit-mode-cover"
|
|
1537
1539
|
}));
|
|
1538
1540
|
};
|
|
1539
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1541
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1540
1542
|
Wrapper: Wrapper,
|
|
1541
1543
|
Visualization: Visualization
|
|
1542
1544
|
});
|
|
@@ -1558,7 +1560,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1558
1560
|
var React = __webpack_require__(1);
|
|
1559
1561
|
var colorUtils_1 = __webpack_require__(12);
|
|
1560
1562
|
var variables_1 = __webpack_require__(11);
|
|
1561
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1563
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1562
1564
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1563
1565
|
var hocUtils_1 = __webpack_require__(15);
|
|
1564
1566
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
@@ -1573,7 +1575,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1573
1575
|
height = props.height,
|
|
1574
1576
|
width = props.width;
|
|
1575
1577
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1576
|
-
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1578
|
+
var bgColorFromTheme = (0, colorUtils_1.isColor)(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1577
1579
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1578
1580
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
1579
1581
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
@@ -1588,7 +1590,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1588
1590
|
}
|
|
1589
1591
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
1590
1592
|
};
|
|
1591
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1593
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1592
1594
|
Wrapper: Wrapper,
|
|
1593
1595
|
Visualization: Visualization
|
|
1594
1596
|
});
|
|
@@ -1598,7 +1600,7 @@ exports.default = withPlaceholder;
|
|
|
1598
1600
|
|
|
1599
1601
|
/***/ }),
|
|
1600
1602
|
|
|
1601
|
-
/***/
|
|
1603
|
+
/***/ 479:
|
|
1602
1604
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1603
1605
|
|
|
1604
1606
|
"use strict";
|
|
@@ -1606,12 +1608,16 @@ exports.default = withPlaceholder;
|
|
|
1606
1608
|
|
|
1607
1609
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1608
1610
|
if (k2 === undefined) k2 = k;
|
|
1609
|
-
Object.
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1611
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1612
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1613
|
+
desc = {
|
|
1614
|
+
enumerable: true,
|
|
1615
|
+
get: function get() {
|
|
1616
|
+
return m[k];
|
|
1617
|
+
}
|
|
1618
|
+
};
|
|
1619
|
+
}
|
|
1620
|
+
Object.defineProperty(o, k2, desc);
|
|
1615
1621
|
} : function (o, m, k, k2) {
|
|
1616
1622
|
if (k2 === undefined) k2 = k;
|
|
1617
1623
|
o[k2] = m[k];
|
|
@@ -1628,8 +1634,8 @@ exports.default = void 0;
|
|
|
1628
1634
|
// NOTE: wildcard syntax only works for named exports
|
|
1629
1635
|
// for some reason, omitting the default export worked before TS v4
|
|
1630
1636
|
// see: https://stackoverflow.com/a/34445175
|
|
1631
|
-
__exportStar(__webpack_require__(
|
|
1632
|
-
var Table_1 = __webpack_require__(
|
|
1637
|
+
__exportStar(__webpack_require__(168), exports);
|
|
1638
|
+
var Table_1 = __webpack_require__(168);
|
|
1633
1639
|
Object.defineProperty(exports, "default", {
|
|
1634
1640
|
enumerable: true,
|
|
1635
1641
|
get: function get() {
|
|
@@ -1639,7 +1645,14 @@ Object.defineProperty(exports, "default", {
|
|
|
1639
1645
|
|
|
1640
1646
|
/***/ }),
|
|
1641
1647
|
|
|
1642
|
-
/***/
|
|
1648
|
+
/***/ 48:
|
|
1649
|
+
/***/ (function(module, exports) {
|
|
1650
|
+
|
|
1651
|
+
module.exports = require("@babel/runtime/helpers/extends");
|
|
1652
|
+
|
|
1653
|
+
/***/ }),
|
|
1654
|
+
|
|
1655
|
+
/***/ 480:
|
|
1643
1656
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1644
1657
|
|
|
1645
1658
|
"use strict";
|
|
@@ -1652,14 +1665,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1652
1665
|
var i18n_1 = __webpack_require__(2);
|
|
1653
1666
|
var lodash_1 = __webpack_require__(3);
|
|
1654
1667
|
var schemaUtils_1 = __webpack_require__(16);
|
|
1655
|
-
var colorConstants_1 = __webpack_require__(
|
|
1668
|
+
var colorConstants_1 = __webpack_require__(49);
|
|
1656
1669
|
var visualization_icons_1 = __webpack_require__(52);
|
|
1657
|
-
var placeholders_1 = __webpack_require__(
|
|
1670
|
+
var placeholders_1 = __webpack_require__(50);
|
|
1658
1671
|
var variables_1 = __webpack_require__(11);
|
|
1659
1672
|
var pick_1 = __webpack_require__(23);
|
|
1660
1673
|
var configUtils_1 = __webpack_require__(20);
|
|
1661
1674
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1662
|
-
var consts_1 = __webpack_require__(
|
|
1675
|
+
var consts_1 = __webpack_require__(137);
|
|
1663
1676
|
var VizCategory_1 = __webpack_require__(35);
|
|
1664
1677
|
var dataContract = {
|
|
1665
1678
|
requiredDataSources: [{
|
|
@@ -1754,30 +1767,30 @@ var defaultContext = {
|
|
|
1754
1767
|
tableAltRowBackgroundColorsByBackgroundColor: ['> backgroundColor', '> backgroundColor | setColorChannel(tableRowBackgroundColorEvenConfig)']
|
|
1755
1768
|
};
|
|
1756
1769
|
var unitPositionConfig = {
|
|
1757
|
-
label: i18n_1._('Units position'),
|
|
1770
|
+
label: (0, i18n_1._)('Units position'),
|
|
1758
1771
|
editor: 'editor.select',
|
|
1759
1772
|
option: 'unitPosition',
|
|
1760
1773
|
editorProps: {
|
|
1761
1774
|
values: [{
|
|
1762
|
-
label: i18n_1._('Before'),
|
|
1775
|
+
label: (0, i18n_1._)('Before'),
|
|
1763
1776
|
value: 'before'
|
|
1764
1777
|
}, {
|
|
1765
|
-
label: i18n_1._('After'),
|
|
1778
|
+
label: (0, i18n_1._)('After'),
|
|
1766
1779
|
value: 'after'
|
|
1767
1780
|
}]
|
|
1768
1781
|
}
|
|
1769
1782
|
};
|
|
1770
1783
|
var unitLabelConfig = {
|
|
1771
|
-
label: i18n_1._('Unit label'),
|
|
1784
|
+
label: (0, i18n_1._)('Unit label'),
|
|
1772
1785
|
option: 'unit',
|
|
1773
1786
|
editor: 'editor.text'
|
|
1774
1787
|
};
|
|
1775
1788
|
var timeFormattingConfig = {
|
|
1776
|
-
label: i18n_1._('Date & Time formatting'),
|
|
1789
|
+
label: (0, i18n_1._)('Date & Time formatting'),
|
|
1777
1790
|
option: 'format',
|
|
1778
1791
|
editor: 'editor.text',
|
|
1779
1792
|
editorProps: {
|
|
1780
|
-
tooltip: i18n_1._('For example: DD-MM-YYYY')
|
|
1793
|
+
tooltip: (0, i18n_1._)('For example: DD-MM-YYYY')
|
|
1781
1794
|
}
|
|
1782
1795
|
};
|
|
1783
1796
|
var sequentialColorConfig = [{
|
|
@@ -1893,7 +1906,7 @@ var optionsSchema = {
|
|
|
1893
1906
|
textOverflow: {
|
|
1894
1907
|
description: 'Controls how the text should be truncated within a particular column. Valid types include "anywhere", "break-word", "ellipsis". Columns are "break-word" styled by default when "textOverflow" is not configured.',
|
|
1895
1908
|
type: 'string',
|
|
1896
|
-
pattern: schemaUtils_1.getPattern(consts_1.validTextOverflows),
|
|
1909
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validTextOverflows),
|
|
1897
1910
|
enum: consts_1.validTextOverflows.concat()
|
|
1898
1911
|
},
|
|
1899
1912
|
width: {
|
|
@@ -1914,13 +1927,13 @@ var optionsSchema = {
|
|
|
1914
1927
|
default: 'proportional',
|
|
1915
1928
|
description: 'Specify the font style to use for table content.',
|
|
1916
1929
|
type: 'string',
|
|
1917
|
-
pattern: schemaUtils_1.getPattern(['proportional', 'monospace'])
|
|
1930
|
+
pattern: (0, schemaUtils_1.getPattern)(['proportional', 'monospace'])
|
|
1918
1931
|
},
|
|
1919
1932
|
fontSize: {
|
|
1920
1933
|
default: 'default',
|
|
1921
1934
|
description: 'Specify the font size to use for table content. Font sizes range from extra small (10px) to large (16px) with the default being 14px.',
|
|
1922
1935
|
type: 'string',
|
|
1923
|
-
pattern: schemaUtils_1.getPattern(consts_1.validFontSizes)
|
|
1936
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validFontSizes)
|
|
1924
1937
|
},
|
|
1925
1938
|
headers: {
|
|
1926
1939
|
default: '> table | getField()',
|
|
@@ -1933,7 +1946,7 @@ var optionsSchema = {
|
|
|
1933
1946
|
headerVisibility: {
|
|
1934
1947
|
default: 'inline',
|
|
1935
1948
|
description: 'Specify how to display the table header row.',
|
|
1936
|
-
pattern: schemaUtils_1.getPattern(consts_1.validHeaderVisibilities),
|
|
1949
|
+
pattern: (0, schemaUtils_1.getPattern)(consts_1.validHeaderVisibilities),
|
|
1937
1950
|
enum: consts_1.validHeaderVisibilities.concat(),
|
|
1938
1951
|
type: 'string'
|
|
1939
1952
|
},
|
|
@@ -2091,7 +2104,7 @@ var optionsSchema = {
|
|
|
2091
2104
|
};
|
|
2092
2105
|
var themes = {
|
|
2093
2106
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
2094
|
-
return pick_1.default({
|
|
2107
|
+
return (0, pick_1.default)({
|
|
2095
2108
|
enterprise: {
|
|
2096
2109
|
dark: variables_1.default.black(props),
|
|
2097
2110
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -2100,7 +2113,7 @@ var themes = {
|
|
|
2100
2113
|
})(props);
|
|
2101
2114
|
},
|
|
2102
2115
|
defaultHeaderBackgroundColor: function defaultHeaderBackgroundColor(props) {
|
|
2103
|
-
return pick_1.default({
|
|
2116
|
+
return (0, pick_1.default)({
|
|
2104
2117
|
enterprise: {
|
|
2105
2118
|
dark: variables_1.default.gray20(props),
|
|
2106
2119
|
light: variables_1.default.gray92(props)
|
|
@@ -2109,7 +2122,7 @@ var themes = {
|
|
|
2109
2122
|
})(props);
|
|
2110
2123
|
},
|
|
2111
2124
|
rowBackgroundColorEven: function rowBackgroundColorEven(props) {
|
|
2112
|
-
return pick_1.default({
|
|
2125
|
+
return (0, pick_1.default)({
|
|
2113
2126
|
enterprise: {
|
|
2114
2127
|
dark: variables_1.default.black(props),
|
|
2115
2128
|
light: variables_1.default.gray96(props)
|
|
@@ -2118,7 +2131,7 @@ var themes = {
|
|
|
2118
2131
|
})(props);
|
|
2119
2132
|
},
|
|
2120
2133
|
rowBackgroundColorOdd: function rowBackgroundColorOdd(props) {
|
|
2121
|
-
return pick_1.default({
|
|
2134
|
+
return (0, pick_1.default)({
|
|
2122
2135
|
enterprise: {
|
|
2123
2136
|
dark: '#0D1012',
|
|
2124
2137
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -2127,13 +2140,13 @@ var themes = {
|
|
|
2127
2140
|
})(props);
|
|
2128
2141
|
},
|
|
2129
2142
|
textColor: function textColor(props) {
|
|
2130
|
-
return pick_1.default({
|
|
2143
|
+
return (0, pick_1.default)({
|
|
2131
2144
|
enterprise: variables_1.default.textColor(props),
|
|
2132
2145
|
prisma: variables_1.default.contentColorDefault(props)
|
|
2133
2146
|
})(props);
|
|
2134
2147
|
},
|
|
2135
2148
|
inverseTextColor: function inverseTextColor(props) {
|
|
2136
|
-
return pick_1.default({
|
|
2149
|
+
return (0, pick_1.default)({
|
|
2137
2150
|
enterprise: {
|
|
2138
2151
|
dark: variables_1.default.contentColorInverted(props),
|
|
2139
2152
|
light: variables_1.default.white(props) // equal to textColor in enterpriseDark
|
|
@@ -2143,14 +2156,14 @@ var themes = {
|
|
|
2143
2156
|
})(props);
|
|
2144
2157
|
}
|
|
2145
2158
|
};
|
|
2146
|
-
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray(lodash_1.map(themes, function (t) {
|
|
2147
|
-
return lodash_1.get(t, 'defaultBackgroundColor');
|
|
2159
|
+
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray((0, lodash_1.map)(themes, function (t) {
|
|
2160
|
+
return (0, lodash_1.get)(t, 'defaultBackgroundColor');
|
|
2148
2161
|
}))));
|
|
2149
2162
|
var EDITOR_LABEL_WIDTH = 100;
|
|
2150
2163
|
var editorConfig = [{
|
|
2151
|
-
label: i18n_1._('Data display'),
|
|
2164
|
+
label: (0, i18n_1._)('Data display'),
|
|
2152
2165
|
layout: [[{
|
|
2153
|
-
label: i18n_1._('Rows displayed'),
|
|
2166
|
+
label: (0, i18n_1._)('Rows displayed'),
|
|
2154
2167
|
option: 'count',
|
|
2155
2168
|
editor: 'editor.number',
|
|
2156
2169
|
editorProps: {
|
|
@@ -2158,39 +2171,39 @@ var editorConfig = [{
|
|
|
2158
2171
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
2159
2172
|
}
|
|
2160
2173
|
}], [{
|
|
2161
|
-
label: i18n_1._('Row numbers'),
|
|
2174
|
+
label: (0, i18n_1._)('Row numbers'),
|
|
2162
2175
|
option: 'showRowNumbers',
|
|
2163
2176
|
editor: 'editor.checkbox',
|
|
2164
2177
|
editorProps: {
|
|
2165
2178
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
2166
2179
|
}
|
|
2167
2180
|
}], [{
|
|
2168
|
-
label: i18n_1._('Internal fields'),
|
|
2181
|
+
label: (0, i18n_1._)('Internal fields'),
|
|
2169
2182
|
option: 'showInternalFields',
|
|
2170
2183
|
editor: 'editor.checkbox',
|
|
2171
2184
|
editorProps: {
|
|
2172
2185
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
2173
2186
|
}
|
|
2174
2187
|
}], [{
|
|
2175
|
-
label: i18n_1._('Header row'),
|
|
2188
|
+
label: (0, i18n_1._)('Header row'),
|
|
2176
2189
|
option: 'headerVisibility',
|
|
2177
2190
|
editor: 'editor.select',
|
|
2178
2191
|
editorProps: {
|
|
2179
2192
|
values: [{
|
|
2180
|
-
label: i18n_1._('Inline'),
|
|
2193
|
+
label: (0, i18n_1._)('Inline'),
|
|
2181
2194
|
value: 'inline'
|
|
2182
2195
|
}, {
|
|
2183
|
-
label: i18n_1._('Fixed'),
|
|
2196
|
+
label: (0, i18n_1._)('Fixed'),
|
|
2184
2197
|
value: 'fixed'
|
|
2185
2198
|
}, {
|
|
2186
|
-
label: i18n_1._('Hidden'),
|
|
2199
|
+
label: (0, i18n_1._)('Hidden'),
|
|
2187
2200
|
value: 'none'
|
|
2188
2201
|
}],
|
|
2189
2202
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
2190
2203
|
}
|
|
2191
2204
|
}]]
|
|
2192
2205
|
}, {
|
|
2193
|
-
label: i18n_1._('Color and style'),
|
|
2206
|
+
label: (0, i18n_1._)('Color and style'),
|
|
2194
2207
|
layout: [[{
|
|
2195
2208
|
key: 'backgroundColor',
|
|
2196
2209
|
editor: 'editor.tableBackgroundColor',
|
|
@@ -2202,14 +2215,14 @@ var editorConfig = [{
|
|
|
2202
2215
|
}
|
|
2203
2216
|
}], [{
|
|
2204
2217
|
option: 'font',
|
|
2205
|
-
label: i18n_1._('Font'),
|
|
2218
|
+
label: (0, i18n_1._)('Font'),
|
|
2206
2219
|
editor: 'editor.select',
|
|
2207
2220
|
editorProps: {
|
|
2208
2221
|
values: [{
|
|
2209
|
-
label: i18n_1._('Proportional (Default)'),
|
|
2222
|
+
label: (0, i18n_1._)('Proportional (Default)'),
|
|
2210
2223
|
value: 'proportional'
|
|
2211
2224
|
}, {
|
|
2212
|
-
label: i18n_1._('Monospace'),
|
|
2225
|
+
label: (0, i18n_1._)('Monospace'),
|
|
2213
2226
|
value: 'monospace'
|
|
2214
2227
|
}],
|
|
2215
2228
|
labelPosition: 'top',
|
|
@@ -2217,48 +2230,48 @@ var editorConfig = [{
|
|
|
2217
2230
|
}
|
|
2218
2231
|
}], [{
|
|
2219
2232
|
option: 'fontSize',
|
|
2220
|
-
label: i18n_1._('Font size'),
|
|
2233
|
+
label: (0, i18n_1._)('Font size'),
|
|
2221
2234
|
editor: 'editor.select',
|
|
2222
2235
|
editorProps: {
|
|
2223
2236
|
values: [{
|
|
2224
|
-
label: i18n_1._('Extra Small (font 10px, row 24px)'),
|
|
2237
|
+
label: (0, i18n_1._)('Extra Small (font 10px, row 24px)'),
|
|
2225
2238
|
value: 'extraSmall'
|
|
2226
2239
|
}, {
|
|
2227
|
-
label: i18n_1._('Small (font 12px, row 24px)'),
|
|
2240
|
+
label: (0, i18n_1._)('Small (font 12px, row 24px)'),
|
|
2228
2241
|
value: 'small'
|
|
2229
2242
|
}, {
|
|
2230
|
-
label: i18n_1._('Default (font 14px, row 32px)'),
|
|
2243
|
+
label: (0, i18n_1._)('Default (font 14px, row 32px)'),
|
|
2231
2244
|
value: 'default'
|
|
2232
2245
|
}, {
|
|
2233
|
-
label: i18n_1._('Large (font 16px, row 36px)'),
|
|
2246
|
+
label: (0, i18n_1._)('Large (font 16px, row 36px)'),
|
|
2234
2247
|
value: 'large'
|
|
2235
2248
|
}],
|
|
2236
2249
|
labelPosition: 'top',
|
|
2237
2250
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
2238
2251
|
}
|
|
2239
2252
|
}], [{
|
|
2240
|
-
label: i18n_1._('Column-specific formatting'),
|
|
2253
|
+
label: (0, i18n_1._)('Column-specific formatting'),
|
|
2241
2254
|
editor: 'editor.tableColumnFormatter',
|
|
2242
2255
|
editorProps: {
|
|
2243
2256
|
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
2244
2257
|
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
2245
2258
|
columnColoringConfig: {
|
|
2246
2259
|
coloringTypes: [{
|
|
2247
|
-
label: i18n_1._('Text'),
|
|
2260
|
+
label: (0, i18n_1._)('Text'),
|
|
2248
2261
|
value: 'rowColors'
|
|
2249
2262
|
}, {
|
|
2250
|
-
label: i18n_1._('Background'),
|
|
2263
|
+
label: (0, i18n_1._)('Background'),
|
|
2251
2264
|
value: 'rowBackgroundColors'
|
|
2252
2265
|
}],
|
|
2253
2266
|
formatters: [{
|
|
2254
|
-
label: i18n_1._('Ranges'),
|
|
2267
|
+
label: (0, i18n_1._)('Ranges'),
|
|
2255
2268
|
value: 'rangeValue',
|
|
2256
2269
|
defaults: {
|
|
2257
2270
|
rowBackgroundColors: sequentialColorConfig,
|
|
2258
2271
|
rowColors: sequentialColorConfig
|
|
2259
2272
|
}
|
|
2260
2273
|
}, {
|
|
2261
|
-
label: i18n_1._('Matches'),
|
|
2274
|
+
label: (0, i18n_1._)('Matches'),
|
|
2262
2275
|
value: 'matchValue',
|
|
2263
2276
|
defaults: {
|
|
2264
2277
|
rowBackgroundColors: matchColorConfig,
|
|
@@ -2278,22 +2291,22 @@ var editorConfig = [{
|
|
|
2278
2291
|
},
|
|
2279
2292
|
flyoutConfig: {
|
|
2280
2293
|
number: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)], [{
|
|
2281
|
-
label: i18n_1._('Precision'),
|
|
2294
|
+
label: (0, i18n_1._)('Precision'),
|
|
2282
2295
|
option: 'precision',
|
|
2283
2296
|
editor: 'editor.select',
|
|
2284
2297
|
editorProps: {
|
|
2285
|
-
values: configUtils_1.generatePrecisionValues(20)
|
|
2298
|
+
values: (0, configUtils_1.generatePrecisionValues)(20)
|
|
2286
2299
|
}
|
|
2287
2300
|
}, {
|
|
2288
|
-
label: i18n_1._('Thousand separators'),
|
|
2301
|
+
label: (0, i18n_1._)('Thousand separators'),
|
|
2289
2302
|
option: 'thousandSeparated',
|
|
2290
2303
|
editor: 'editor.radioBar',
|
|
2291
2304
|
editorProps: {
|
|
2292
2305
|
values: [{
|
|
2293
|
-
label: i18n_1._('Off'),
|
|
2306
|
+
label: (0, i18n_1._)('Off'),
|
|
2294
2307
|
value: false
|
|
2295
2308
|
}, {
|
|
2296
|
-
label: i18n_1._('On'),
|
|
2309
|
+
label: (0, i18n_1._)('On'),
|
|
2297
2310
|
value: true
|
|
2298
2311
|
}]
|
|
2299
2312
|
}
|
|
@@ -2327,7 +2340,7 @@ var config = {
|
|
|
2327
2340
|
/**
|
|
2328
2341
|
* viz name
|
|
2329
2342
|
*/
|
|
2330
|
-
name: i18n_1._('Table'),
|
|
2343
|
+
name: (0, i18n_1._)('Table'),
|
|
2331
2344
|
category: VizCategory_1.VizCategory.TABLE,
|
|
2332
2345
|
/**
|
|
2333
2346
|
* viz icon
|
|
@@ -2347,19 +2360,19 @@ var config = {
|
|
|
2347
2360
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PAGE_AND_SORT, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
2348
2361
|
themes: themes
|
|
2349
2362
|
};
|
|
2350
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
2363
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
2351
2364
|
|
|
2352
2365
|
/***/ }),
|
|
2353
2366
|
|
|
2354
|
-
/***/
|
|
2367
|
+
/***/ 481:
|
|
2355
2368
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2356
2369
|
|
|
2357
2370
|
"use strict";
|
|
2358
2371
|
|
|
2359
2372
|
|
|
2360
2373
|
var _slicedToArray = __webpack_require__(17);
|
|
2361
|
-
var _taggedTemplateLiteral = __webpack_require__(
|
|
2362
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
2374
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
2375
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2363
2376
|
var __rest = this && this.__rest || function (s, e) {
|
|
2364
2377
|
var t = {};
|
|
2365
2378
|
for (var p in s) {
|
|
@@ -2379,47 +2392,38 @@ var T = __webpack_require__(0);
|
|
|
2379
2392
|
var lodash_1 = __webpack_require__(3);
|
|
2380
2393
|
var styled_components_1 = __webpack_require__(4);
|
|
2381
2394
|
var i18n_1 = __webpack_require__(2);
|
|
2382
|
-
var Table_1 = __webpack_require__(
|
|
2383
|
-
var Paginator_1 = __webpack_require__(
|
|
2384
|
-
var Message_1 = __webpack_require__(
|
|
2395
|
+
var Table_1 = __webpack_require__(112);
|
|
2396
|
+
var Paginator_1 = __webpack_require__(93);
|
|
2397
|
+
var Message_1 = __webpack_require__(124);
|
|
2385
2398
|
var colorUtils_1 = __webpack_require__(12);
|
|
2386
2399
|
var style_1 = __webpack_require__(14);
|
|
2387
2400
|
var pick_1 = __webpack_require__(23);
|
|
2388
2401
|
var variables_1 = __webpack_require__(11);
|
|
2389
|
-
var hooks_1 = __webpack_require__(
|
|
2390
|
-
var consts_1 = __webpack_require__(
|
|
2391
|
-
var cells_1 = __webpack_require__(
|
|
2402
|
+
var hooks_1 = __webpack_require__(482);
|
|
2403
|
+
var consts_1 = __webpack_require__(137);
|
|
2404
|
+
var cells_1 = __webpack_require__(483);
|
|
2392
2405
|
var getPagination_1 = __webpack_require__(34);
|
|
2393
2406
|
var getSorting_1 = __webpack_require__(33);
|
|
2394
2407
|
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2395
2408
|
// debounce was imported this way due to typing
|
|
2396
2409
|
// eslint-disable-next-line import/order
|
|
2397
|
-
var debounce = __webpack_require__(
|
|
2410
|
+
var debounce = __webpack_require__(488);
|
|
2398
2411
|
exports.MINIMUM_COLUMN_SIZE = 30;
|
|
2399
2412
|
exports.INITIAL_UNSET_COLUMN_WIDTH = 90;
|
|
2400
|
-
var NonVisibleTableHead = styled_components_1.default(Table_1.default.Head)
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
})(["display:none;"]);
|
|
2404
|
-
var FixedTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
2405
|
-
displayName: "PureTable__FixedTableHead",
|
|
2406
|
-
componentId: "tovzjg-1"
|
|
2407
|
-
})(["position:sticky;top:0;"]);
|
|
2408
|
-
var TableHeadCell = styled_components_1.default(Table_1.default.HeadCell).withConfig({
|
|
2409
|
-
displayName: "PureTable__TableHeadCell",
|
|
2410
|
-
componentId: "tovzjg-2"
|
|
2411
|
-
})(["div > span{word-break:inherit;word-wrap:inherit;white-space:", ";display:inline;}"], function (_ref) {
|
|
2413
|
+
var NonVisibleTableHead = (0, styled_components_1.default)(Table_1.default.Head)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n & [data-test='head-cell'] > div {\n height: 0;\n padding: 0;\n margin: 0;\n }\n"])));
|
|
2414
|
+
var FixedTableHead = (0, styled_components_1.default)(Table_1.default.Head)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n"])));
|
|
2415
|
+
var TableHeadCell = (0, styled_components_1.default)(Table_1.default.HeadCell)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n div > span {\n word-break: inherit;\n word-wrap: inherit;\n white-space: ", ";\n display: inline;\n }\n"])), function (_ref) {
|
|
2412
2416
|
var textOverflowType = _ref.textOverflowType;
|
|
2413
2417
|
return textOverflowType === 'ellipsis' ? 'nowrap' : 'inherit';
|
|
2414
2418
|
});
|
|
2415
2419
|
var VizTableContainer = styled_components_1.default.div.withConfig({
|
|
2416
2420
|
displayName: "PureTable__VizTableContainer",
|
|
2417
|
-
componentId: "tovzjg-
|
|
2418
|
-
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;td,* > td:hover{color:", ";}"], pick_1.default({
|
|
2421
|
+
componentId: "tovzjg-0"
|
|
2422
|
+
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;td,* > td:hover{color:", ";}"], (0, pick_1.default)({
|
|
2419
2423
|
enterprise: variables_1.default.spacingHalf,
|
|
2420
2424
|
prisma: variables_1.default.spacingSmall
|
|
2421
2425
|
}), function (props) {
|
|
2422
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
2426
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
2423
2427
|
}, function (_ref2) {
|
|
2424
2428
|
var isCellClickable = _ref2.isCellClickable;
|
|
2425
2429
|
return isCellClickable ? variables_1.default.linkColor : variables_1.default.textColor;
|
|
@@ -2429,8 +2433,8 @@ var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
|
2429
2433
|
var PAGINATOR_SPACING = 5;
|
|
2430
2434
|
var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
2431
2435
|
displayName: "PureTable__SUITableContainer",
|
|
2432
|
-
componentId: "tovzjg-
|
|
2433
|
-
})(["& *{font-family:", ";font-size:", ";line-height:", ";}box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", " [data-test=\"main-table\"]{", " td{white-space:pre-
|
|
2436
|
+
componentId: "tovzjg-1"
|
|
2437
|
+
})(["& *{font-family:", ";font-size:", ";line-height:", ";}box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", " [data-test=\"main-table\"]{", " td{white-space:pre-wrap;}}"], function (props) {
|
|
2434
2438
|
return props.font;
|
|
2435
2439
|
}, function (props) {
|
|
2436
2440
|
return props.fontSize;
|
|
@@ -2441,7 +2445,7 @@ var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
|
2441
2445
|
height = _ref3.height,
|
|
2442
2446
|
isPaging = _ref3.isPaging,
|
|
2443
2447
|
theme = _ref3.theme;
|
|
2444
|
-
var padding = pick_1.default({
|
|
2448
|
+
var padding = (0, pick_1.default)({
|
|
2445
2449
|
enterprise: variables_1.default.spacingHalf({
|
|
2446
2450
|
theme: theme
|
|
2447
2451
|
}),
|
|
@@ -2452,7 +2456,7 @@ var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
|
2452
2456
|
theme: theme
|
|
2453
2457
|
});
|
|
2454
2458
|
var paddingOffset = parseInt(padding, 10) * 2;
|
|
2455
|
-
return style_1.toDimension({
|
|
2459
|
+
return (0, style_1.toDimension)({
|
|
2456
2460
|
width: width - paddingOffset,
|
|
2457
2461
|
height: isPaging ? height - PAGINATOR_CONTAINER_HEIGHT - PAGINATOR_SPACING - paddingOffset : height - paddingOffset
|
|
2458
2462
|
});
|
|
@@ -2461,18 +2465,18 @@ var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
|
2461
2465
|
return isPaging && "\n margin-bottom: ".concat(PAGINATOR_SPACING, "px;\n ");
|
|
2462
2466
|
}, function (_ref5) {
|
|
2463
2467
|
var headerStyle = _ref5.headerStyle;
|
|
2464
|
-
return headerStyle && headerStyle.backgroundColor && styled_components_1.css(
|
|
2468
|
+
return headerStyle && headerStyle.backgroundColor && (0, styled_components_1.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n & [data-test='head-cell'] {\n background-color: ", ";\n }\n "])), headerStyle.backgroundColor);
|
|
2465
2469
|
}, function (_ref6) {
|
|
2466
2470
|
var headerStyle = _ref6.headerStyle;
|
|
2467
|
-
return headerStyle && headerStyle.color && styled_components_1.css(
|
|
2471
|
+
return headerStyle && headerStyle.color && (0, styled_components_1.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & [data-test='head-cell'] > div > span {\n color: ", ";\n }\n "])), headerStyle.color);
|
|
2468
2472
|
}, function (_ref7) {
|
|
2469
2473
|
var isFullyFixed = _ref7.isFullyFixed;
|
|
2470
|
-
return isFullyFixed && styled_components_1.css(
|
|
2474
|
+
return isFullyFixed && (0, styled_components_1.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: fit-content;\n min-width: unset;\n "])));
|
|
2471
2475
|
});
|
|
2472
2476
|
SUITableContainer.displayName = 'SUITableContainer';
|
|
2473
2477
|
var PaginatorContainer = styled_components_1.default.div.withConfig({
|
|
2474
2478
|
displayName: "PureTable__PaginatorContainer",
|
|
2475
|
-
componentId: "tovzjg-
|
|
2479
|
+
componentId: "tovzjg-2"
|
|
2476
2480
|
})(["position:relative;text-align:right;height:", "px;"], PAGINATOR_CONTAINER_HEIGHT);
|
|
2477
2481
|
PaginatorContainer.displayName = 'PaginatorContainer';
|
|
2478
2482
|
// allow for early return in case of empty tableBody while still following hook rules
|
|
@@ -2488,29 +2492,29 @@ var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
|
|
|
2488
2492
|
columnFormat = props.columnFormat,
|
|
2489
2493
|
paginatorParams = props.paginatorParams,
|
|
2490
2494
|
count = props.count;
|
|
2491
|
-
var
|
|
2495
|
+
var _ref8 = (0, hooks_1.useTable)({
|
|
2492
2496
|
headers: headers,
|
|
2493
2497
|
table: table,
|
|
2494
2498
|
headerVisibility: headerVisibility,
|
|
2495
2499
|
showRowNumbers: showRowNumbers,
|
|
2496
2500
|
showInternalFields: showInternalFields,
|
|
2497
2501
|
tableFormat: Object.assign(Object.assign(Object.assign(Object.assign({}, tableFormat), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.align) && {
|
|
2498
|
-
align: lodash_1.cloneDeep(tableFormat.align)
|
|
2502
|
+
align: (0, lodash_1.cloneDeep)(tableFormat.align)
|
|
2499
2503
|
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.cellTypes) && {
|
|
2500
|
-
cellTypes: lodash_1.cloneDeep(tableFormat.cellTypes)
|
|
2504
|
+
cellTypes: (0, lodash_1.cloneDeep)(tableFormat.cellTypes)
|
|
2501
2505
|
}), (tableFormat === null || tableFormat === void 0 ? void 0 : tableFormat.data) && {
|
|
2502
|
-
data: lodash_1.cloneDeep(tableFormat.data)
|
|
2506
|
+
data: (0, lodash_1.cloneDeep)(tableFormat.data)
|
|
2503
2507
|
}),
|
|
2504
2508
|
columnFormat: columnFormat,
|
|
2505
2509
|
paginationOffset: paginatorParams === null || paginatorParams === void 0 ? void 0 : paginatorParams.current,
|
|
2506
2510
|
count: count
|
|
2507
2511
|
}),
|
|
2508
|
-
tableHeader =
|
|
2509
|
-
tableBody =
|
|
2512
|
+
tableHeader = _ref8.tableHeader,
|
|
2513
|
+
tableBody = _ref8.tableBody;
|
|
2510
2514
|
if (tableBody.rows.length === 0) {
|
|
2511
2515
|
return React.createElement(Message_1.default, {
|
|
2512
2516
|
type: "warning"
|
|
2513
|
-
}, i18n_1._('No data!'));
|
|
2517
|
+
}, (0, i18n_1._)('No data!'));
|
|
2514
2518
|
}
|
|
2515
2519
|
return React.createElement(Viz, Object.assign({}, props, {
|
|
2516
2520
|
tableHeader: tableHeader,
|
|
@@ -2701,17 +2705,16 @@ var PureTable = function PureTable(props) {
|
|
|
2701
2705
|
cursor: onCellClick ? 'pointer' : 'unset'
|
|
2702
2706
|
};
|
|
2703
2707
|
}, [onCellClick]);
|
|
2704
|
-
var
|
|
2705
|
-
return c.showCell;
|
|
2706
|
-
}).length;
|
|
2707
|
-
var numberOfFixedHeaders = tableHeader.cells.filter(function (c) {
|
|
2708
|
+
var visibleHeaderCells = tableHeader.cells.filter(function (c) {
|
|
2708
2709
|
return c.showCell;
|
|
2709
|
-
})
|
|
2710
|
-
|
|
2710
|
+
});
|
|
2711
|
+
var numberOfFixedHeaders = visibleHeaderCells.filter(function (_ref9) {
|
|
2712
|
+
var value = _ref9.value;
|
|
2711
2713
|
var _a, _b;
|
|
2712
2714
|
return ((_a = columns[value]) === null || _a === void 0 ? void 0 : _a.width) && ((_b = columns[value]) === null || _b === void 0 ? void 0 : _b.width) !== 'auto';
|
|
2713
2715
|
}).length;
|
|
2714
|
-
var isFullyFixed =
|
|
2716
|
+
var isFullyFixed = visibleHeaderCells.length === numberOfFixedHeaders;
|
|
2717
|
+
var isHeaderHidden = headerVisibility === 'none';
|
|
2715
2718
|
return React.createElement(VizTableContainer, {
|
|
2716
2719
|
isCellClickable: Boolean(onCellClick),
|
|
2717
2720
|
backgroundColor: backgroundColor,
|
|
@@ -2728,15 +2731,13 @@ var PureTable = function PureTable(props) {
|
|
|
2728
2731
|
isFullyFixed: isFullyFixed
|
|
2729
2732
|
}, React.createElement(Table_1.default, {
|
|
2730
2733
|
resizableFillLayout: true,
|
|
2731
|
-
headType:
|
|
2734
|
+
headType: isHeaderHidden ? undefined : 'inline',
|
|
2732
2735
|
innerStyle: tableInnerStyle,
|
|
2733
2736
|
outerStyle: tableOuterStyle,
|
|
2734
2737
|
onClick: tableCellClickHandler,
|
|
2735
2738
|
onKeyDown: onCellClick ? handleKeyDown : lodash_1.noop,
|
|
2736
2739
|
onRequestResizeColumn: handleResizeColumn
|
|
2737
|
-
}, React.createElement(TableHead, null,
|
|
2738
|
-
return c.showCell;
|
|
2739
|
-
}).map(function (_a) {
|
|
2740
|
+
}, React.createElement(TableHead, null, visibleHeaderCells.map(function (_a) {
|
|
2740
2741
|
var _b, _c;
|
|
2741
2742
|
var key = _a.key,
|
|
2742
2743
|
value = _a.value,
|
|
@@ -2750,7 +2751,8 @@ var PureTable = function PureTable(props) {
|
|
|
2750
2751
|
width: (_c = (_b = columns[value]) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : exports.INITIAL_UNSET_COLUMN_WIDTH,
|
|
2751
2752
|
onMouseDown: handleEventClick,
|
|
2752
2753
|
value: value,
|
|
2753
|
-
onSort: isResizing || showRowNumbers && value === '#' ? null : onSort,
|
|
2754
|
+
onSort: isResizing || showRowNumbers && value === '#' || isHeaderHidden ? null : onSort,
|
|
2755
|
+
resizable: !isHeaderHidden,
|
|
2754
2756
|
style: showRowNumbers && value === '#' ? Object.assign(Object.assign({}, style), {
|
|
2755
2757
|
cursor: 'auto'
|
|
2756
2758
|
}) : style,
|
|
@@ -2849,25 +2851,25 @@ PureTable.defaultProps = {
|
|
|
2849
2851
|
fontSize: fontSizeMap.default
|
|
2850
2852
|
};
|
|
2851
2853
|
PureTable.displayName = 'VizTable';
|
|
2852
|
-
exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable));
|
|
2854
|
+
exports.default = withEmptyTableMessage((0, FixedSizeContainer_1.default)(PureTable));
|
|
2853
2855
|
|
|
2854
2856
|
/***/ }),
|
|
2855
2857
|
|
|
2856
|
-
/***/
|
|
2858
|
+
/***/ 482:
|
|
2857
2859
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2858
2860
|
|
|
2859
2861
|
"use strict";
|
|
2860
2862
|
|
|
2861
2863
|
|
|
2862
2864
|
var _toConsumableArray = __webpack_require__(8);
|
|
2863
|
-
var _typeof = __webpack_require__(
|
|
2865
|
+
var _typeof = __webpack_require__(82);
|
|
2864
2866
|
Object.defineProperty(exports, "__esModule", {
|
|
2865
2867
|
value: true
|
|
2866
2868
|
});
|
|
2867
2869
|
exports.useTable = exports.getTextOverflowType = exports.getOverflowStyles = void 0;
|
|
2868
2870
|
var lodash_1 = __webpack_require__(3);
|
|
2869
2871
|
var colorUtils_1 = __webpack_require__(12);
|
|
2870
|
-
var consts_1 = __webpack_require__(
|
|
2872
|
+
var consts_1 = __webpack_require__(137);
|
|
2871
2873
|
var isArray = function isArray(v) {
|
|
2872
2874
|
return Array.isArray(v);
|
|
2873
2875
|
};
|
|
@@ -2898,7 +2900,7 @@ var generateKey = function generateKey() {
|
|
|
2898
2900
|
return "".concat(i, "-").concat(value);
|
|
2899
2901
|
};
|
|
2900
2902
|
var getTextOverflowType = function getTextOverflowType(columnFormat, currentColumn) {
|
|
2901
|
-
return lodash_1.get(columnFormat, ["".concat(currentColumn), 'textOverflow']);
|
|
2903
|
+
return (0, lodash_1.get)(columnFormat, ["".concat(currentColumn), 'textOverflow']);
|
|
2902
2904
|
};
|
|
2903
2905
|
exports.getTextOverflowType = getTextOverflowType;
|
|
2904
2906
|
var generateHeader = function generateHeader(value, i, columnFormat, showInternalFields) {
|
|
@@ -2911,8 +2913,8 @@ var generateHeader = function generateHeader(value, i, columnFormat, showInterna
|
|
|
2911
2913
|
if (!showInternalFields && value.charAt(0) === '_' && value !== '_time') {
|
|
2912
2914
|
ret.showCell = false;
|
|
2913
2915
|
}
|
|
2914
|
-
var textOverflowType = exports.getTextOverflowType(columnFormat, value);
|
|
2915
|
-
var textOverflowStyle = exports.getOverflowStyles({
|
|
2916
|
+
var textOverflowType = (0, exports.getTextOverflowType)(columnFormat, value);
|
|
2917
|
+
var textOverflowStyle = (0, exports.getOverflowStyles)({
|
|
2916
2918
|
textOverflow: textOverflowType
|
|
2917
2919
|
});
|
|
2918
2920
|
ret.truncate = true;
|
|
@@ -2921,9 +2923,9 @@ var generateHeader = function generateHeader(value, i, columnFormat, showInterna
|
|
|
2921
2923
|
return ret;
|
|
2922
2924
|
};
|
|
2923
2925
|
var getColumnFormatAlign = function getColumnFormatAlign(columnFormat, currentColumn, currentRow) {
|
|
2924
|
-
var alignOption = lodash_1.get(columnFormat, [currentColumn.value, 'align']);
|
|
2926
|
+
var alignOption = (0, lodash_1.get)(columnFormat, [currentColumn.value, 'align']);
|
|
2925
2927
|
var align;
|
|
2926
|
-
if (isArray(alignOption) && lodash_1.includes(consts_1.validAlignments, alignOption[currentRow])) {
|
|
2928
|
+
if (isArray(alignOption) && (0, lodash_1.includes)(consts_1.validAlignments, alignOption[currentRow])) {
|
|
2927
2929
|
align = alignOption[currentRow];
|
|
2928
2930
|
} else if (typeof alignOption !== 'undefined') {
|
|
2929
2931
|
console.warn("columnFormat.".concat(currentColumn.value, ".align should be an array containing (").concat(consts_1.validAlignments.join(' | '), "). ").concat(JSON.stringify(alignOption), " provided"));
|
|
@@ -2931,9 +2933,9 @@ var getColumnFormatAlign = function getColumnFormatAlign(columnFormat, currentCo
|
|
|
2931
2933
|
return align;
|
|
2932
2934
|
};
|
|
2933
2935
|
var getColumnFormatCellType = function getColumnFormatCellType(columnFormat, currentColumn, currentRow) {
|
|
2934
|
-
var cellTypes = lodash_1.get(columnFormat, [currentColumn.value, 'cellTypes']);
|
|
2936
|
+
var cellTypes = (0, lodash_1.get)(columnFormat, [currentColumn.value, 'cellTypes']);
|
|
2935
2937
|
var cellType;
|
|
2936
|
-
if (isArray(cellTypes) && lodash_1.includes(consts_1.validCellRenderers, cellTypes[currentRow])) {
|
|
2938
|
+
if (isArray(cellTypes) && (0, lodash_1.includes)(consts_1.validCellRenderers, cellTypes[currentRow])) {
|
|
2937
2939
|
cellType = cellTypes[currentRow];
|
|
2938
2940
|
} else if (typeof cellTypes !== 'undefined') {
|
|
2939
2941
|
console.warn("columnFormat.".concat(currentColumn.value, ".cellType should be an array containing (").concat(consts_1.validCellRenderers.join(' | '), "). ").concat(JSON.stringify(cellTypes), " provided"));
|
|
@@ -2941,9 +2943,9 @@ var getColumnFormatCellType = function getColumnFormatCellType(columnFormat, cur
|
|
|
2941
2943
|
return cellType;
|
|
2942
2944
|
};
|
|
2943
2945
|
var getColumnFormatSparklineType = function getColumnFormatSparklineType(columnFormat, currentColumn, currentRow) {
|
|
2944
|
-
var types = lodash_1.get(columnFormat, [currentColumn.value, 'sparklineTypes']);
|
|
2946
|
+
var types = (0, lodash_1.get)(columnFormat, [currentColumn.value, 'sparklineTypes']);
|
|
2945
2947
|
var sparklineType;
|
|
2946
|
-
if (isArray(types) && lodash_1.includes(consts_1.validSparklineTypes, types[currentRow])) {
|
|
2948
|
+
if (isArray(types) && (0, lodash_1.includes)(consts_1.validSparklineTypes, types[currentRow])) {
|
|
2947
2949
|
sparklineType = types[currentRow];
|
|
2948
2950
|
} else if (typeof types !== 'undefined') {
|
|
2949
2951
|
console.warn("columnFormat.".concat(currentColumn.value, ".sparklineTypes should be one of (").concat(consts_1.validSparklineTypes.join(' | '), "). ").concat(JSON.stringify(types), " provided"));
|
|
@@ -2951,7 +2953,7 @@ var getColumnFormatSparklineType = function getColumnFormatSparklineType(columnF
|
|
|
2951
2953
|
return sparklineType;
|
|
2952
2954
|
};
|
|
2953
2955
|
var getColumnFormatData = function getColumnFormatData(columnFormat, currentColumn, currentRow) {
|
|
2954
|
-
var data = lodash_1.get(columnFormat, [currentColumn.value, 'data']);
|
|
2956
|
+
var data = (0, lodash_1.get)(columnFormat, [currentColumn.value, 'data']);
|
|
2955
2957
|
var datum;
|
|
2956
2958
|
if (isArray(data)) {
|
|
2957
2959
|
datum = data[currentRow];
|
|
@@ -2961,9 +2963,9 @@ var getColumnFormatData = function getColumnFormatData(columnFormat, currentColu
|
|
|
2961
2963
|
return datum;
|
|
2962
2964
|
};
|
|
2963
2965
|
var getColumnFormatColor = function getColumnFormatColor(columnFormat, currentColumn, currentRow, field) {
|
|
2964
|
-
var colors = lodash_1.get(columnFormat, [currentColumn.value, field]);
|
|
2966
|
+
var colors = (0, lodash_1.get)(columnFormat, [currentColumn.value, field]);
|
|
2965
2967
|
var color;
|
|
2966
|
-
if (isArray(colors) && colorUtils_1.isColor(colors[currentRow])) {
|
|
2968
|
+
if (isArray(colors) && (0, colorUtils_1.isColor)(colors[currentRow])) {
|
|
2967
2969
|
color = colors[currentRow];
|
|
2968
2970
|
} else if (typeof colors !== 'undefined') {
|
|
2969
2971
|
console.warn("columnFormat.".concat(currentColumn.value, ".").concat(field, " should be an array containing valid colors. ").concat(JSON.stringify(colors), " provided"));
|
|
@@ -2983,9 +2985,9 @@ var getColumnFormatSparklineAreaColor = function getColumnFormatSparklineAreaCol
|
|
|
2983
2985
|
return getColumnFormatColor(columnFormat, currentColumn, currentRow, 'sparklineAreaColors');
|
|
2984
2986
|
};
|
|
2985
2987
|
var getTableFormatAlign = function getTableFormatAlign(tableFormat, currentColumn, currentRow) {
|
|
2986
|
-
var alignOption = lodash_1.get(tableFormat, 'align');
|
|
2988
|
+
var alignOption = (0, lodash_1.get)(tableFormat, 'align');
|
|
2987
2989
|
var align;
|
|
2988
|
-
if (isArray(alignOption) && isArray(alignOption[currentColumn]) && lodash_1.includes(consts_1.validAlignments, alignOption[currentColumn][currentRow])) {
|
|
2990
|
+
if (isArray(alignOption) && isArray(alignOption[currentColumn]) && (0, lodash_1.includes)(consts_1.validAlignments, alignOption[currentColumn][currentRow])) {
|
|
2989
2991
|
align = alignOption[currentColumn][currentRow];
|
|
2990
2992
|
} else if (typeof alignOption !== 'undefined') {
|
|
2991
2993
|
console.warn("tableFormat.align should be a 2 dimensional array containing (".concat(consts_1.validAlignments.join(' | '), "). ").concat(JSON.stringify(alignOption), " provided"));
|
|
@@ -2993,9 +2995,9 @@ var getTableFormatAlign = function getTableFormatAlign(tableFormat, currentColum
|
|
|
2993
2995
|
return align;
|
|
2994
2996
|
};
|
|
2995
2997
|
var getTableFormatCellType = function getTableFormatCellType(tableFormat, currentColumn, currentRow) {
|
|
2996
|
-
var cellTypes = lodash_1.get(tableFormat, 'cellTypes');
|
|
2998
|
+
var cellTypes = (0, lodash_1.get)(tableFormat, 'cellTypes');
|
|
2997
2999
|
var cellType;
|
|
2998
|
-
if (isArray(cellTypes) && isArray(cellTypes[currentColumn]) && lodash_1.includes(consts_1.validCellRenderers, cellTypes[currentColumn][currentRow])) {
|
|
3000
|
+
if (isArray(cellTypes) && isArray(cellTypes[currentColumn]) && (0, lodash_1.includes)(consts_1.validCellRenderers, cellTypes[currentColumn][currentRow])) {
|
|
2999
3001
|
cellType = cellTypes[currentColumn][currentRow];
|
|
3000
3002
|
} else if (typeof cellTypes !== 'undefined') {
|
|
3001
3003
|
console.warn("tableFormat.cellType should be a 2 dimensional array containing (".concat(consts_1.validCellRenderers.join(' | '), "). ").concat(JSON.stringify(cellTypes), " provided"));
|
|
@@ -3003,9 +3005,9 @@ var getTableFormatCellType = function getTableFormatCellType(tableFormat, curren
|
|
|
3003
3005
|
return cellType;
|
|
3004
3006
|
};
|
|
3005
3007
|
var getTableFormatSparklineType = function getTableFormatSparklineType(tableFormat, currentColumn, currentRow) {
|
|
3006
|
-
var types = lodash_1.get(tableFormat, 'sparklineTypes');
|
|
3008
|
+
var types = (0, lodash_1.get)(tableFormat, 'sparklineTypes');
|
|
3007
3009
|
var sparklineType;
|
|
3008
|
-
if (isArray(types) && isArray(types[currentColumn]) && lodash_1.includes(consts_1.validSparklineTypes, types[currentColumn][currentRow])) {
|
|
3010
|
+
if (isArray(types) && isArray(types[currentColumn]) && (0, lodash_1.includes)(consts_1.validSparklineTypes, types[currentColumn][currentRow])) {
|
|
3009
3011
|
sparklineType = types[currentColumn][currentRow];
|
|
3010
3012
|
} else if (typeof types !== 'undefined') {
|
|
3011
3013
|
console.warn("tableFormat.sparklineTypes should be a 2 dimensional array containing one of (".concat(consts_1.validSparklineTypes.join(' | '), "). ").concat(JSON.stringify(types), " provided"));
|
|
@@ -3013,11 +3015,11 @@ var getTableFormatSparklineType = function getTableFormatSparklineType(tableForm
|
|
|
3013
3015
|
return sparklineType;
|
|
3014
3016
|
};
|
|
3015
3017
|
var getTableFormatColor = function getTableFormatColor(tableFormat, currentColumn, currentRow, field) {
|
|
3016
|
-
var colors = lodash_1.get(tableFormat, field);
|
|
3018
|
+
var colors = (0, lodash_1.get)(tableFormat, field);
|
|
3017
3019
|
var color;
|
|
3018
|
-
if (isArray(colors) && isArray(colors[currentColumn]) && colorUtils_1.isColor(colors[currentColumn][currentRow])) {
|
|
3020
|
+
if (isArray(colors) && isArray(colors[currentColumn]) && (0, colorUtils_1.isColor)(colors[currentColumn][currentRow])) {
|
|
3019
3021
|
color = colors[currentColumn][currentRow];
|
|
3020
|
-
} else if (isArray(colors) && colorUtils_1.isColor(colors[currentRow])) {
|
|
3022
|
+
} else if (isArray(colors) && (0, colorUtils_1.isColor)(colors[currentRow])) {
|
|
3021
3023
|
color = colors[currentRow];
|
|
3022
3024
|
} else if (typeof colors !== 'undefined' && isArray(colors) && isArray(colors[currentColumn]) && colors[currentColumn][currentRow] !== undefined) {
|
|
3023
3025
|
console.warn("tableFormat.".concat(field, " needs to be an array of colors, provided ").concat(JSON.stringify(colors), ". Current value at [").concat(currentColumn, "][").concat(currentRow, "] is ").concat(JSON.stringify(colors[currentRow])));
|
|
@@ -3037,7 +3039,7 @@ var getTableFormatSparklineAreaColor = function getTableFormatSparklineAreaColor
|
|
|
3037
3039
|
return getTableFormatColor(tableFormat, currentCol, currentRow, 'sparklineAreaColors');
|
|
3038
3040
|
};
|
|
3039
3041
|
var getTableFormatData = function getTableFormatData(tableFormat, currentCol, currentRow) {
|
|
3040
|
-
var data = lodash_1.get(tableFormat, 'data');
|
|
3042
|
+
var data = (0, lodash_1.get)(tableFormat, 'data');
|
|
3041
3043
|
var datum;
|
|
3042
3044
|
if (isArray(data) && isArray(data[currentCol])) {
|
|
3043
3045
|
datum = data[currentCol][currentRow];
|
|
@@ -3132,8 +3134,8 @@ var useTable = function useTable() {
|
|
|
3132
3134
|
return generateHeader('', i, columnFormat, showInternalFields);
|
|
3133
3135
|
}),
|
|
3134
3136
|
style: {
|
|
3135
|
-
backgroundColor: lodash_1.has(tableFormat, 'headerBackgroundColor') && colorUtils_1.isColor(tableFormat.headerBackgroundColor) && tableFormat.headerBackgroundColor || undefined,
|
|
3136
|
-
color: lodash_1.has(tableFormat, 'headerColor') && colorUtils_1.isColor(tableFormat.headerColor) && tableFormat.headerColor || undefined
|
|
3137
|
+
backgroundColor: (0, lodash_1.has)(tableFormat, 'headerBackgroundColor') && (0, colorUtils_1.isColor)(tableFormat.headerBackgroundColor) && tableFormat.headerBackgroundColor || undefined,
|
|
3138
|
+
color: (0, lodash_1.has)(tableFormat, 'headerColor') && (0, colorUtils_1.isColor)(tableFormat.headerColor) && tableFormat.headerColor || undefined
|
|
3137
3139
|
}
|
|
3138
3140
|
};
|
|
3139
3141
|
var tableBody = {
|
|
@@ -3158,8 +3160,8 @@ var useTable = function useTable() {
|
|
|
3158
3160
|
var sparklineType = getColumnFormatSparklineType(columnFormat, currentHeader, currentRow) || getTableFormatSparklineType(tableFormat, i, currentRow) || 'area';
|
|
3159
3161
|
var key = generateKey(value, "".concat(currentRow, "-").concat(i));
|
|
3160
3162
|
var additionalStyles = {};
|
|
3161
|
-
var textOverflowType = exports.getTextOverflowType(columnFormat, currentHeader.value);
|
|
3162
|
-
var textOverflowStyle = exports.getOverflowStyles({
|
|
3163
|
+
var textOverflowType = (0, exports.getTextOverflowType)(columnFormat, currentHeader.value);
|
|
3164
|
+
var textOverflowStyle = (0, exports.getOverflowStyles)({
|
|
3163
3165
|
textOverflow: textOverflowType
|
|
3164
3166
|
});
|
|
3165
3167
|
additionalStyles = Object.assign(Object.assign({}, additionalStyles), textOverflowStyle);
|
|
@@ -3200,7 +3202,7 @@ exports.useTable = useTable;
|
|
|
3200
3202
|
|
|
3201
3203
|
/***/ }),
|
|
3202
3204
|
|
|
3203
|
-
/***/
|
|
3205
|
+
/***/ 483:
|
|
3204
3206
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3205
3207
|
|
|
3206
3208
|
"use strict";
|
|
@@ -3208,12 +3210,16 @@ exports.useTable = useTable;
|
|
|
3208
3210
|
|
|
3209
3211
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
3210
3212
|
if (k2 === undefined) k2 = k;
|
|
3211
|
-
Object.
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3213
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3214
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3215
|
+
desc = {
|
|
3216
|
+
enumerable: true,
|
|
3217
|
+
get: function get() {
|
|
3218
|
+
return m[k];
|
|
3219
|
+
}
|
|
3220
|
+
};
|
|
3221
|
+
}
|
|
3222
|
+
Object.defineProperty(o, k2, desc);
|
|
3217
3223
|
} : function (o, m, k, k2) {
|
|
3218
3224
|
if (k2 === undefined) k2 = k;
|
|
3219
3225
|
o[k2] = m[k];
|
|
@@ -3226,21 +3232,14 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
|
3226
3232
|
Object.defineProperty(exports, "__esModule", {
|
|
3227
3233
|
value: true
|
|
3228
3234
|
});
|
|
3229
|
-
__exportStar(__webpack_require__(
|
|
3230
|
-
__exportStar(__webpack_require__(
|
|
3231
|
-
__exportStar(__webpack_require__(
|
|
3232
|
-
__exportStar(__webpack_require__(
|
|
3235
|
+
__exportStar(__webpack_require__(484), exports);
|
|
3236
|
+
__exportStar(__webpack_require__(485), exports);
|
|
3237
|
+
__exportStar(__webpack_require__(486), exports);
|
|
3238
|
+
__exportStar(__webpack_require__(487), exports);
|
|
3233
3239
|
|
|
3234
3240
|
/***/ }),
|
|
3235
3241
|
|
|
3236
|
-
/***/
|
|
3237
|
-
/***/ (function(module, exports) {
|
|
3238
|
-
|
|
3239
|
-
module.exports = require("@babel/runtime/helpers/extends");
|
|
3240
|
-
|
|
3241
|
-
/***/ }),
|
|
3242
|
-
|
|
3243
|
-
/***/ 480:
|
|
3242
|
+
/***/ 484:
|
|
3244
3243
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3245
3244
|
|
|
3246
3245
|
"use strict";
|
|
@@ -3261,7 +3260,7 @@ exports.SwitchTableCell = SwitchTableCell;
|
|
|
3261
3260
|
|
|
3262
3261
|
/***/ }),
|
|
3263
3262
|
|
|
3264
|
-
/***/
|
|
3263
|
+
/***/ 485:
|
|
3265
3264
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3266
3265
|
|
|
3267
3266
|
"use strict";
|
|
@@ -3272,7 +3271,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3272
3271
|
});
|
|
3273
3272
|
exports.TextCell = void 0;
|
|
3274
3273
|
var React = __webpack_require__(1);
|
|
3275
|
-
var Table_1 = __webpack_require__(
|
|
3274
|
+
var Table_1 = __webpack_require__(112);
|
|
3276
3275
|
var noop = function noop() {
|
|
3277
3276
|
return undefined;
|
|
3278
3277
|
};
|
|
@@ -3296,7 +3295,7 @@ exports.TextCell.displayName = 'TextCell';
|
|
|
3296
3295
|
|
|
3297
3296
|
/***/ }),
|
|
3298
3297
|
|
|
3299
|
-
/***/
|
|
3298
|
+
/***/ 486:
|
|
3300
3299
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3301
3300
|
|
|
3302
3301
|
"use strict";
|
|
@@ -3307,7 +3306,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3307
3306
|
});
|
|
3308
3307
|
exports.ArrayCell = void 0;
|
|
3309
3308
|
var React = __webpack_require__(1);
|
|
3310
|
-
var Table_1 = __webpack_require__(
|
|
3309
|
+
var Table_1 = __webpack_require__(112);
|
|
3311
3310
|
var noop = function noop() {
|
|
3312
3311
|
return undefined;
|
|
3313
3312
|
};
|
|
@@ -3339,7 +3338,7 @@ exports.ArrayCell.displayName = 'ArrayCell';
|
|
|
3339
3338
|
|
|
3340
3339
|
/***/ }),
|
|
3341
3340
|
|
|
3342
|
-
/***/
|
|
3341
|
+
/***/ 487:
|
|
3343
3342
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3344
3343
|
|
|
3345
3344
|
"use strict";
|
|
@@ -3351,8 +3350,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3351
3350
|
});
|
|
3352
3351
|
exports.SparklineCell = exports.validSparklineTypes = void 0;
|
|
3353
3352
|
var React = __webpack_require__(1);
|
|
3354
|
-
var
|
|
3355
|
-
var Table_1 = __webpack_require__(111);
|
|
3353
|
+
var Table_1 = __webpack_require__(112);
|
|
3356
3354
|
var SparkLine_1 = __webpack_require__(95);
|
|
3357
3355
|
var paddingLeftRight = 5;
|
|
3358
3356
|
var paddingTopBottom = 3;
|
|
@@ -3388,6 +3386,9 @@ var SparklineCell = function SparklineCell(_ref) {
|
|
|
3388
3386
|
var data = React.useMemo(function () {
|
|
3389
3387
|
return parseSparklineData(cell.value);
|
|
3390
3388
|
}, [cell.value]);
|
|
3389
|
+
if (cell.value[0] === '##__SPARKLINE__##') {
|
|
3390
|
+
data = data.slice(1);
|
|
3391
|
+
}
|
|
3391
3392
|
React.useLayoutEffect(function () {
|
|
3392
3393
|
setHeight(cellEl === null || cellEl === void 0 ? void 0 : cellEl.offsetHeight);
|
|
3393
3394
|
}, [cellEl]);
|
|
@@ -3412,7 +3413,6 @@ var SparklineCell = function SparklineCell(_ref) {
|
|
|
3412
3413
|
align: cell.align,
|
|
3413
3414
|
elementRef: setEl,
|
|
3414
3415
|
"data-test-cell-type": "SparklineCell",
|
|
3415
|
-
"aria-label": i18n_1._('Source count over time sparkline trend'),
|
|
3416
3416
|
"data-row-index": cell.rowIndex,
|
|
3417
3417
|
"data-col-index": cell.columnIndex,
|
|
3418
3418
|
onClick: useMouseOverEffect ? noop : undefined
|
|
@@ -3432,7 +3432,7 @@ exports.SparklineCell.displayName = 'SparklineCell';
|
|
|
3432
3432
|
|
|
3433
3433
|
/***/ }),
|
|
3434
3434
|
|
|
3435
|
-
/***/
|
|
3435
|
+
/***/ 488:
|
|
3436
3436
|
/***/ (function(module, exports) {
|
|
3437
3437
|
|
|
3438
3438
|
module.exports = require("lodash/debounce");
|
|
@@ -3442,14 +3442,14 @@ module.exports = require("lodash/debounce");
|
|
|
3442
3442
|
/***/ 49:
|
|
3443
3443
|
/***/ (function(module, exports) {
|
|
3444
3444
|
|
|
3445
|
-
module.exports = require("@splunk/
|
|
3445
|
+
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
3446
3446
|
|
|
3447
3447
|
/***/ }),
|
|
3448
3448
|
|
|
3449
3449
|
/***/ 50:
|
|
3450
3450
|
/***/ (function(module, exports) {
|
|
3451
3451
|
|
|
3452
|
-
module.exports = require("@splunk/
|
|
3452
|
+
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
3453
3453
|
|
|
3454
3454
|
/***/ }),
|
|
3455
3455
|
|
|
@@ -3460,6 +3460,13 @@ module.exports = require("@splunk/visualization-icons");
|
|
|
3460
3460
|
|
|
3461
3461
|
/***/ }),
|
|
3462
3462
|
|
|
3463
|
+
/***/ 59:
|
|
3464
|
+
/***/ (function(module, exports) {
|
|
3465
|
+
|
|
3466
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
3467
|
+
|
|
3468
|
+
/***/ }),
|
|
3469
|
+
|
|
3463
3470
|
/***/ 6:
|
|
3464
3471
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3465
3472
|
|
|
@@ -3497,14 +3504,14 @@ var VizBehavior;
|
|
|
3497
3504
|
|
|
3498
3505
|
/***/ }),
|
|
3499
3506
|
|
|
3500
|
-
/***/
|
|
3507
|
+
/***/ 62:
|
|
3501
3508
|
/***/ (function(module, exports) {
|
|
3502
3509
|
|
|
3503
3510
|
module.exports = require("@splunk/react-ui/Popover");
|
|
3504
3511
|
|
|
3505
3512
|
/***/ }),
|
|
3506
3513
|
|
|
3507
|
-
/***/
|
|
3514
|
+
/***/ 63:
|
|
3508
3515
|
/***/ (function(module, exports) {
|
|
3509
3516
|
|
|
3510
3517
|
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
@@ -3518,14 +3525,14 @@ module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
|
3518
3525
|
|
|
3519
3526
|
/***/ }),
|
|
3520
3527
|
|
|
3521
|
-
/***/
|
|
3528
|
+
/***/ 71:
|
|
3522
3529
|
/***/ (function(module, exports) {
|
|
3523
3530
|
|
|
3524
3531
|
module.exports = require("@babel/runtime/helpers/inherits");
|
|
3525
3532
|
|
|
3526
3533
|
/***/ }),
|
|
3527
3534
|
|
|
3528
|
-
/***/
|
|
3535
|
+
/***/ 72:
|
|
3529
3536
|
/***/ (function(module, exports) {
|
|
3530
3537
|
|
|
3531
3538
|
module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
@@ -3539,31 +3546,31 @@ module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
|
3539
3546
|
|
|
3540
3547
|
/***/ }),
|
|
3541
3548
|
|
|
3542
|
-
/***/
|
|
3549
|
+
/***/ 82:
|
|
3543
3550
|
/***/ (function(module, exports) {
|
|
3544
3551
|
|
|
3545
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3552
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
3546
3553
|
|
|
3547
3554
|
/***/ }),
|
|
3548
3555
|
|
|
3549
|
-
/***/
|
|
3556
|
+
/***/ 87:
|
|
3550
3557
|
/***/ (function(module, exports) {
|
|
3551
3558
|
|
|
3552
|
-
module.exports = require("@babel/runtime/helpers/
|
|
3559
|
+
module.exports = require("@babel/runtime/helpers/assertThisInitialized");
|
|
3553
3560
|
|
|
3554
3561
|
/***/ }),
|
|
3555
3562
|
|
|
3556
|
-
/***/
|
|
3563
|
+
/***/ 9:
|
|
3557
3564
|
/***/ (function(module, exports) {
|
|
3558
3565
|
|
|
3559
|
-
module.exports = require("@
|
|
3566
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
3560
3567
|
|
|
3561
3568
|
/***/ }),
|
|
3562
3569
|
|
|
3563
3570
|
/***/ 93:
|
|
3564
3571
|
/***/ (function(module, exports) {
|
|
3565
3572
|
|
|
3566
|
-
module.exports = require("@
|
|
3573
|
+
module.exports = require("@splunk/react-ui/Paginator");
|
|
3567
3574
|
|
|
3568
3575
|
/***/ }),
|
|
3569
3576
|
|
|
@@ -3578,13 +3585,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3578
3585
|
/* 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
3586
|
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
3580
3587
|
/* 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__(
|
|
3588
|
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87);
|
|
3582
3589
|
/* 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__(
|
|
3590
|
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71);
|
|
3584
3591
|
/* 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__(
|
|
3592
|
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72);
|
|
3586
3593
|
/* 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__(
|
|
3594
|
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63);
|
|
3588
3595
|
/* 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
3596
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
3590
3597
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
|
|
@@ -3594,10 +3601,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3594
3601
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
3595
3602
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3);
|
|
3596
3603
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);
|
|
3597
|
-
/* harmony import */ var
|
|
3598
|
-
/* harmony import */ var
|
|
3599
|
-
/* harmony import */ var
|
|
3600
|
-
/* harmony import */ var
|
|
3604
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4);
|
|
3605
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_11__);
|
|
3606
|
+
/* harmony import */ var _splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62);
|
|
3607
|
+
/* harmony import */ var _splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_12__);
|
|
3608
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2);
|
|
3609
|
+
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_13__);
|
|
3610
|
+
/* harmony import */ var _splunk_ui_utils_id__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(25);
|
|
3611
|
+
/* harmony import */ var _splunk_ui_utils_id__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_id__WEBPACK_IMPORTED_MODULE_14__);
|
|
3601
3612
|
|
|
3602
3613
|
|
|
3603
3614
|
|
|
@@ -3636,11 +3647,13 @@ function _isNativeReflectConstruct() {
|
|
|
3636
3647
|
|
|
3637
3648
|
|
|
3638
3649
|
|
|
3639
|
-
|
|
3650
|
+
|
|
3651
|
+
|
|
3652
|
+
var StyledSvg = styled_components__WEBPACK_IMPORTED_MODULE_11___default.a.svg.withConfig({
|
|
3640
3653
|
displayName: "SparkLine__StyledSvg",
|
|
3641
3654
|
componentId: "sc-5oplra-0"
|
|
3642
3655
|
})(["overflow:hidden;"]);
|
|
3643
|
-
var StyledTooltip =
|
|
3656
|
+
var StyledTooltip = styled_components__WEBPACK_IMPORTED_MODULE_11___default.a.div.withConfig({
|
|
3644
3657
|
displayName: "SparkLine__StyledTooltip",
|
|
3645
3658
|
componentId: "sc-5oplra-1"
|
|
3646
3659
|
})(["padding:3px 8px;font-size:12px;"]);
|
|
@@ -3666,6 +3679,7 @@ var SparkLine = /*#__PURE__*/function (_Component) {
|
|
|
3666
3679
|
rectArea: null,
|
|
3667
3680
|
tooltip: null
|
|
3668
3681
|
};
|
|
3682
|
+
_this.titleId = Object(_splunk_ui_utils_id__WEBPACK_IMPORTED_MODULE_14__["createDOMID"])();
|
|
3669
3683
|
return _this;
|
|
3670
3684
|
}
|
|
3671
3685
|
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(SparkLine, [{
|
|
@@ -3913,7 +3927,7 @@ var SparkLine = /*#__PURE__*/function (_Component) {
|
|
|
3913
3927
|
}, {
|
|
3914
3928
|
key: "renderTooltip",
|
|
3915
3929
|
value: function renderTooltip() {
|
|
3916
|
-
return this.state.anchor !== null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(
|
|
3930
|
+
return this.state.anchor !== null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_splunk_react_ui_Popover__WEBPACK_IMPORTED_MODULE_12___default.a, {
|
|
3917
3931
|
"data-test": "tooltip",
|
|
3918
3932
|
open: this.state.open,
|
|
3919
3933
|
anchor: this.state.anchor,
|
|
@@ -4005,7 +4019,8 @@ var SparkLine = /*#__PURE__*/function (_Component) {
|
|
|
4005
4019
|
height = _this$props9.height,
|
|
4006
4020
|
isArea = _this$props9.isArea,
|
|
4007
4021
|
lineStrokeWidth = _this$props9.lineStrokeWidth,
|
|
4008
|
-
width = _this$props9.width
|
|
4022
|
+
width = _this$props9.width,
|
|
4023
|
+
title = _this$props9.title;
|
|
4009
4024
|
if (data.length === 0) {
|
|
4010
4025
|
return null;
|
|
4011
4026
|
}
|
|
@@ -4030,8 +4045,14 @@ var SparkLine = /*#__PURE__*/function (_Component) {
|
|
|
4030
4045
|
ref: elementRef
|
|
4031
4046
|
}, 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
4047
|
height: height,
|
|
4033
|
-
width: width
|
|
4034
|
-
|
|
4048
|
+
width: width,
|
|
4049
|
+
role: "img",
|
|
4050
|
+
"aria-labelledby": this.titleId,
|
|
4051
|
+
"data-test": "sparkline-svg"
|
|
4052
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("title", {
|
|
4053
|
+
id: this.titleId,
|
|
4054
|
+
"data-test": "sparkline-title"
|
|
4055
|
+
}, title || Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_13__["_"])('Source count over time sparkline trend')), /*#__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
4056
|
}
|
|
4036
4057
|
}]);
|
|
4037
4058
|
return SparkLine;
|
|
@@ -4108,7 +4129,9 @@ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(Spa
|
|
|
4108
4129
|
/**
|
|
4109
4130
|
* The width of the container.
|
|
4110
4131
|
*/
|
|
4111
|
-
width: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number.isRequired
|
|
4132
|
+
width: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.number.isRequired,
|
|
4133
|
+
/** Sets the a11y title text on sparkline. */
|
|
4134
|
+
title: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string
|
|
4112
4135
|
});
|
|
4113
4136
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(SparkLine, "defaultProps", {
|
|
4114
4137
|
acceptNull: false,
|
|
@@ -4132,13 +4155,6 @@ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(Spa
|
|
|
4132
4155
|
});
|
|
4133
4156
|
/* harmony default export */ __webpack_exports__["default"] = (SparkLine);
|
|
4134
4157
|
|
|
4135
|
-
/***/ }),
|
|
4136
|
-
|
|
4137
|
-
/***/ 98:
|
|
4138
|
-
/***/ (function(module, exports) {
|
|
4139
|
-
|
|
4140
|
-
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
4141
|
-
|
|
4142
4158
|
/***/ })
|
|
4143
4159
|
|
|
4144
4160
|
/******/ });
|