@splunk/visualizations 24.0.0 → 24.3.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/.loki/reference/chrome_docker_PureVisualizations_PureFillerGauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureFillerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Background_Color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Field_Order.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Field_Order_First_And_Last.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Field_Order_Some.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Fields_Columns.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Handles_Large_Data_Set.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Link_Color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Link_Width.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Height.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Highlight_Color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Spacing_X.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Spacing_Y.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Node_Width.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Result_Limit.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Show_Node_Counts_False.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Show_Value_Counts_False.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureLinkGraph_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Hover.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_base_map_light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_geostats_by.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_center_seattle.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_zoom_9.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_duplicate_entries_from.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_duplicate_entries_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_discontinuous_ranges.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_from_equals_to_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_from_is_larger_than_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_missing_entries.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Orientation_horizontal_width_150_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSankey_dimensions_less_than_minWidth_300_and_minHeight_200.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSankey_invalid_columns_data.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Choropleth_Svg_Choropleth_Svg_Missing_Props_Message_When_No_Svg.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Filler_Gauge_Filler_Gauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Basic_Line_with_offset_IANA_timezone.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Basic_Line_with_offset_serialized_timezone.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Basic_Line_with_offset_utc_timezone.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Basic_LinkGraph.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Field_Order_First_and_Last_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Field_Order_From_the_First_to_the_Last_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Field_Order_From_the_Last_to_the_First_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Node_Text_Color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Node_Text_Highlight_Color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_Result_Limit_3.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Basic_Map.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Static_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Dynamic_coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Result_Limit_Set_To_3.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_with_geostats_data_No_render.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Missing_Column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Sankey_Sankey_Dimension_Too_Small.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_By_Type_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Kitchen_Sink.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Right.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Single_Column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_Color_light_blue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_No_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Basic_Table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Basic_Table_With_No_Click.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Cell_Types.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Gradient.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Override.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Count_2.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Header_Colors.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Row_Colors.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Dark_Background_No_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Dark_Background_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Format_Number.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Format_Number_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Header_Visibility_fixed.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Header_Visibility_none.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_100_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Invalid_Background_Color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Multi_Value_Field.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_No_Stripes.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_No_Stripes_Row_Numbers.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Row_Numbers_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparklines_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Table_Formatting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Table_Gradient.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Time_Formatting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Px.png +0 -0
- package/Area.config.js +19 -15
- package/Area.config.js.map +1 -1
- package/Area.js +102 -82
- package/Area.js.map +1 -1
- package/Bar.config.js +15 -15
- package/Bar.config.js.map +1 -1
- package/Bar.js +91 -75
- package/Bar.js.map +1 -1
- package/Bubble.config.js +8 -8
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +82 -66
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +11 -9
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +92 -82
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +15 -15
- package/Column.config.js.map +1 -1
- package/Column.js +91 -75
- package/Column.js.map +1 -1
- package/Ellipse.config.js +22 -6
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +80 -56
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +8 -8
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +64 -56
- package/FillerGauge.js.map +1 -1
- package/Image.js +46 -41
- package/Image.js.map +1 -1
- package/Line.config.js +8 -8
- package/Line.config.js.map +1 -1
- package/Line.js +89 -73
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +52 -5
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +161 -90
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +740 -0
- package/Map.config.js.map +1 -0
- package/Map.js +3137 -0
- package/Map.js.map +1 -0
- package/Markdown.config.js +12 -16
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +57 -56
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +6 -6
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +2960 -3046
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +11 -11
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +97 -78
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +13 -17
- package/Pie.config.js.map +1 -1
- package/Pie.js +917 -999
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +11 -11
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +114 -95
- package/Punchcard.js.map +1 -1
- package/README.internal.md +36 -3
- package/README.md +7 -9
- package/Rectangle.config.js +32 -16
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +153 -132
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +35 -25
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +2951 -3045
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +11 -11
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +301 -286
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +23 -22
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +271 -266
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +14 -14
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +33 -34
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +156 -140
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +22 -22
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +301 -296
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +28 -8
- package/Table.config.js.map +1 -1
- package/Table.js +427 -259
- package/Table.js.map +1 -1
- package/common/Charting.js +19 -10
- package/common/Charting.js.map +1 -1
- package/common/EventsDoc.js +3 -2
- 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 +10 -9
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +22 -22
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +2 -2
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +2 -2
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +7 -7
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +8 -8
- package/common/shapeUtils.js.map +1 -1
- package/common/withDashboardViz.js +38 -32
- package/common/withDashboardViz.js.map +1 -1
- package/loki.config.js +2 -0
- package/package.json +20 -15
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueRadial_Trend_Indicator_Position_pushed_below_value_does_not_fit_inside_of_radial.png +0 -0
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 = 255);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -113,7 +113,14 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
116
|
+
/***/ 101:
|
|
117
|
+
/***/ (function(module, exports) {
|
|
118
|
+
|
|
119
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
120
|
+
|
|
121
|
+
/***/ }),
|
|
122
|
+
|
|
123
|
+
/***/ 105:
|
|
117
124
|
/***/ (function(module, exports, __webpack_require__) {
|
|
118
125
|
|
|
119
126
|
"use strict";
|
|
@@ -152,7 +159,7 @@ var React = __webpack_require__(1);
|
|
|
152
159
|
|
|
153
160
|
var styled_components_1 = __webpack_require__(4);
|
|
154
161
|
|
|
155
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
162
|
+
var SizeAwareWrapper_1 = __webpack_require__(16);
|
|
156
163
|
|
|
157
164
|
var style_1 = __webpack_require__(13);
|
|
158
165
|
|
|
@@ -213,6 +220,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
213
220
|
|
|
214
221
|
return React.createElement(FixSizeItem, {
|
|
215
222
|
"data-test": "fix-size-item",
|
|
223
|
+
"data-splunk-visualization-version": "24.3.0 - 1c1ae4b3c",
|
|
216
224
|
width: width,
|
|
217
225
|
height: height,
|
|
218
226
|
backgroundColor: backgroundColor
|
|
@@ -234,12 +242,21 @@ exports.default = withFixedSizeContainer;
|
|
|
234
242
|
|
|
235
243
|
/***/ }),
|
|
236
244
|
|
|
237
|
-
/***/
|
|
245
|
+
/***/ 13:
|
|
246
|
+
/***/ (function(module, exports) {
|
|
247
|
+
|
|
248
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
249
|
+
|
|
250
|
+
/***/ }),
|
|
251
|
+
|
|
252
|
+
/***/ 131:
|
|
238
253
|
/***/ (function(module, exports, __webpack_require__) {
|
|
239
254
|
|
|
240
255
|
"use strict";
|
|
241
256
|
|
|
242
257
|
|
|
258
|
+
var _slicedToArray = __webpack_require__(48);
|
|
259
|
+
|
|
243
260
|
var __rest = this && this.__rest || function (s, e) {
|
|
244
261
|
var t = {};
|
|
245
262
|
|
|
@@ -258,57 +275,108 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
258
275
|
});
|
|
259
276
|
exports.config = exports.PureTable = exports.themes = exports.computeVizProps = void 0;
|
|
260
277
|
|
|
261
|
-
var
|
|
278
|
+
var lodash_1 = __webpack_require__(2);
|
|
279
|
+
|
|
280
|
+
var colorUtils_1 = __webpack_require__(11);
|
|
281
|
+
|
|
282
|
+
var config_1 = __webpack_require__(256);
|
|
262
283
|
|
|
263
284
|
exports.config = config_1.default;
|
|
264
285
|
|
|
265
286
|
var withDashboardViz_1 = __webpack_require__(27);
|
|
266
287
|
|
|
267
|
-
var PureTable_1 = __webpack_require__(
|
|
288
|
+
var PureTable_1 = __webpack_require__(257);
|
|
268
289
|
|
|
269
290
|
exports.PureTable = PureTable_1.default;
|
|
270
291
|
|
|
271
292
|
var computeVizProps = function computeVizProps(_a) {
|
|
272
293
|
var props = __rest(_a, []);
|
|
273
294
|
|
|
274
|
-
|
|
295
|
+
var vizProps = lodash_1.cloneDeep(props);
|
|
296
|
+
|
|
297
|
+
if (vizProps.columnFormat) {
|
|
298
|
+
var columns = vizProps.columnFormat;
|
|
299
|
+
var themeRowBackgroundColorOdd = vizProps.themeFunc('rowBackgroundColorOdd');
|
|
300
|
+
var themeRowBackgroundColorEven = vizProps.themeFunc('rowBackgroundColorEven');
|
|
301
|
+
var themeTextColor = vizProps.themeFunc('textColor'); // `columns` looks like { `column title`: { rowBackgroundColors, rowColors... }}
|
|
302
|
+
|
|
303
|
+
Object.entries(columns).forEach(function (_ref) {
|
|
304
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
305
|
+
columnKey = _ref2[0],
|
|
306
|
+
columnProperties = _ref2[1];
|
|
307
|
+
|
|
308
|
+
var rowBackgroundColors;
|
|
309
|
+
var rowColors; // If columns have `rowBackgroundColors` or `rowColors` arrays defined, sanitize them. If there are undefined values after sanitization, these
|
|
310
|
+
// elements are populated with the default values provided by the theme.
|
|
311
|
+
|
|
312
|
+
if (columnProperties.rowBackgroundColors) {
|
|
313
|
+
rowBackgroundColors = colorUtils_1.sanitizeArrayOfColors(columnProperties.rowBackgroundColors).map(function (color, i) {
|
|
314
|
+
return (// using (i + 1) % 2 because 'odd' refers to row number, so index 0 -> row 1 -> odd colored
|
|
315
|
+
color || ((i + 1) % 2 === 0 ? themeRowBackgroundColorEven : themeRowBackgroundColorOdd)
|
|
316
|
+
);
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (columnProperties.rowColors) {
|
|
321
|
+
rowColors = colorUtils_1.sanitizeArrayOfColors(columnProperties.rowColors).map(function (color) {
|
|
322
|
+
return color || themeTextColor;
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
vizProps.columnFormat[columnKey] = Object.assign(Object.assign(Object.assign({}, vizProps.columnFormat[columnKey]), columnProperties.rowBackgroundColors && {
|
|
327
|
+
rowBackgroundColors: rowBackgroundColors
|
|
328
|
+
}), columnProperties.rowColors && {
|
|
329
|
+
rowColors: rowColors
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (vizProps.onOptionsChange) {
|
|
335
|
+
var handleColumnFormatChange = function handleColumnFormatChange(updatedColumnFormat) {
|
|
336
|
+
vizProps.onOptionsChange({
|
|
337
|
+
columnFormat: updatedColumnFormat
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
vizProps.onColumnFormatChange = handleColumnFormatChange;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (!vizProps.showInternalFields) {
|
|
275
345
|
var filteredFields = [];
|
|
276
346
|
var filteredTable = [];
|
|
277
347
|
var filteredIndexes = [];
|
|
278
|
-
|
|
348
|
+
vizProps.headers.forEach(function (fieldIn, index) {
|
|
279
349
|
var _a;
|
|
280
350
|
|
|
281
351
|
var field = (_a = fieldIn.name) !== null && _a !== void 0 ? _a : fieldIn;
|
|
282
352
|
|
|
283
353
|
if (field.charAt(0) !== '_' || field === '_time') {
|
|
284
354
|
filteredFields.push(field);
|
|
285
|
-
filteredTable.push(
|
|
355
|
+
filteredTable.push(vizProps.table[index]);
|
|
286
356
|
filteredIndexes.push(index);
|
|
287
357
|
}
|
|
288
358
|
});
|
|
289
359
|
var filteredTableFormat = null;
|
|
290
360
|
|
|
291
|
-
if (
|
|
361
|
+
if (vizProps.tableFormat) {
|
|
292
362
|
filteredTableFormat = {};
|
|
293
|
-
Object.keys(
|
|
294
|
-
if (Array.isArray(
|
|
295
|
-
filteredTableFormat[tableFormatKey] =
|
|
363
|
+
Object.keys(vizProps.tableFormat).forEach(function (tableFormatKey) {
|
|
364
|
+
if (Array.isArray(vizProps.tableFormat[tableFormatKey])) {
|
|
365
|
+
filteredTableFormat[tableFormatKey] = vizProps.tableFormat[tableFormatKey].filter(function (tableFormatItem, tableFormatItemIndex) {
|
|
296
366
|
return filteredIndexes.indexOf(tableFormatItemIndex) !== -1;
|
|
297
367
|
});
|
|
298
368
|
} else {
|
|
299
|
-
filteredTableFormat[tableFormatKey] =
|
|
369
|
+
filteredTableFormat[tableFormatKey] = vizProps.tableFormat[tableFormatKey];
|
|
300
370
|
}
|
|
301
371
|
});
|
|
302
372
|
}
|
|
303
373
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
tableFormat: filteredTableFormat
|
|
308
|
-
});
|
|
374
|
+
vizProps.headers = filteredFields;
|
|
375
|
+
vizProps.table = filteredTable;
|
|
376
|
+
vizProps.tableFormat = filteredTableFormat;
|
|
309
377
|
}
|
|
310
378
|
|
|
311
|
-
return
|
|
379
|
+
return vizProps;
|
|
312
380
|
};
|
|
313
381
|
|
|
314
382
|
exports.computeVizProps = computeVizProps;
|
|
@@ -323,13 +391,6 @@ exports.default = Table;
|
|
|
323
391
|
|
|
324
392
|
/***/ }),
|
|
325
393
|
|
|
326
|
-
/***/ 13:
|
|
327
|
-
/***/ (function(module, exports) {
|
|
328
|
-
|
|
329
|
-
module.exports = require("@splunk/visualizations-shared/style");
|
|
330
|
-
|
|
331
|
-
/***/ }),
|
|
332
|
-
|
|
333
394
|
/***/ 14:
|
|
334
395
|
/***/ (function(module, exports) {
|
|
335
396
|
|
|
@@ -337,14 +398,14 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
|
337
398
|
|
|
338
399
|
/***/ }),
|
|
339
400
|
|
|
340
|
-
/***/
|
|
401
|
+
/***/ 15:
|
|
341
402
|
/***/ (function(module, exports) {
|
|
342
403
|
|
|
343
404
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
344
405
|
|
|
345
406
|
/***/ }),
|
|
346
407
|
|
|
347
|
-
/***/
|
|
408
|
+
/***/ 16:
|
|
348
409
|
/***/ (function(module, exports) {
|
|
349
410
|
|
|
350
411
|
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
@@ -368,14 +429,14 @@ module.exports = require("lodash");
|
|
|
368
429
|
/***/ 20:
|
|
369
430
|
/***/ (function(module, exports) {
|
|
370
431
|
|
|
371
|
-
module.exports = require("@
|
|
432
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
372
433
|
|
|
373
434
|
/***/ }),
|
|
374
435
|
|
|
375
|
-
/***/
|
|
436
|
+
/***/ 21:
|
|
376
437
|
/***/ (function(module, exports) {
|
|
377
438
|
|
|
378
|
-
module.exports = require("@
|
|
439
|
+
module.exports = require("@splunk/themes/pick");
|
|
379
440
|
|
|
380
441
|
/***/ }),
|
|
381
442
|
|
|
@@ -385,7 +446,7 @@ module.exports = require("@babel/runtime/helpers/typeof");
|
|
|
385
446
|
"use strict";
|
|
386
447
|
|
|
387
448
|
|
|
388
|
-
var _defineProperty = __webpack_require__(
|
|
449
|
+
var _defineProperty = __webpack_require__(8);
|
|
389
450
|
|
|
390
451
|
Object.defineProperty(exports, "__esModule", {
|
|
391
452
|
value: true
|
|
@@ -515,7 +576,96 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
515
576
|
|
|
516
577
|
/***/ }),
|
|
517
578
|
|
|
518
|
-
/***/
|
|
579
|
+
/***/ 25:
|
|
580
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
581
|
+
|
|
582
|
+
"use strict";
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
Object.defineProperty(exports, "__esModule", {
|
|
586
|
+
value: true
|
|
587
|
+
});
|
|
588
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
589
|
+
|
|
590
|
+
var React = __webpack_require__(1);
|
|
591
|
+
|
|
592
|
+
var T = __webpack_require__(0);
|
|
593
|
+
|
|
594
|
+
var lodash_1 = __webpack_require__(2);
|
|
595
|
+
|
|
596
|
+
var i18n_1 = __webpack_require__(3);
|
|
597
|
+
|
|
598
|
+
var Message_1 = __webpack_require__(9);
|
|
599
|
+
|
|
600
|
+
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
601
|
+
/**
|
|
602
|
+
* @method shouldShowIconPlaceholder
|
|
603
|
+
* @param {object} dataSources
|
|
604
|
+
* @param {boolean} loading
|
|
605
|
+
* @returns {boolean}
|
|
606
|
+
*/
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
610
|
+
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
611
|
+
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
612
|
+
var noData = data === undefined;
|
|
613
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
614
|
+
var noFields = fields === undefined;
|
|
615
|
+
return loading || noData || noFields;
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
619
|
+
var propTypes = {
|
|
620
|
+
icon: T.func,
|
|
621
|
+
width: T.oneOfType([T.string, T.number]),
|
|
622
|
+
height: T.oneOfType([T.string, T.number]),
|
|
623
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
624
|
+
backgroundColor: T.string
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* @method IconPlaceholder
|
|
628
|
+
* @param {IconPlaceholderProps} props
|
|
629
|
+
* @returns {React.ReactElement}
|
|
630
|
+
*/
|
|
631
|
+
|
|
632
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
633
|
+
var width = props.width,
|
|
634
|
+
height = props.height,
|
|
635
|
+
icon = props.icon;
|
|
636
|
+
|
|
637
|
+
if (icon) {
|
|
638
|
+
return React.createElement(icon, {
|
|
639
|
+
style: {
|
|
640
|
+
left: '50%',
|
|
641
|
+
top: '50%',
|
|
642
|
+
color: 'grey',
|
|
643
|
+
position: 'absolute',
|
|
644
|
+
transform: 'translate(-50%, -50%)'
|
|
645
|
+
},
|
|
646
|
+
width: '50%',
|
|
647
|
+
height: '50%'
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
return React.createElement(Message_1.default, {
|
|
652
|
+
width: width,
|
|
653
|
+
height: height,
|
|
654
|
+
level: "warning",
|
|
655
|
+
message: i18n_1._('No DataSource Connected')
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
IconPlaceholder.propTypes = propTypes;
|
|
660
|
+
IconPlaceholder.defaultProps = {
|
|
661
|
+
width: '100%',
|
|
662
|
+
height: 250
|
|
663
|
+
};
|
|
664
|
+
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
665
|
+
|
|
666
|
+
/***/ }),
|
|
667
|
+
|
|
668
|
+
/***/ 255:
|
|
519
669
|
/***/ (function(module, exports, __webpack_require__) {
|
|
520
670
|
|
|
521
671
|
"use strict";
|
|
@@ -547,9 +697,9 @@ exports.default = void 0; // NOTE: wildcard syntax only works for named exports
|
|
|
547
697
|
// for some reason, omitting the default export worked before TS v4
|
|
548
698
|
// see: https://stackoverflow.com/a/34445175
|
|
549
699
|
|
|
550
|
-
__exportStar(__webpack_require__(
|
|
700
|
+
__exportStar(__webpack_require__(131), exports);
|
|
551
701
|
|
|
552
|
-
var Table_1 = __webpack_require__(
|
|
702
|
+
var Table_1 = __webpack_require__(131);
|
|
553
703
|
|
|
554
704
|
Object.defineProperty(exports, "default", {
|
|
555
705
|
enumerable: true,
|
|
@@ -560,7 +710,7 @@ Object.defineProperty(exports, "default", {
|
|
|
560
710
|
|
|
561
711
|
/***/ }),
|
|
562
712
|
|
|
563
|
-
/***/
|
|
713
|
+
/***/ 256:
|
|
564
714
|
/***/ (function(module, exports, __webpack_require__) {
|
|
565
715
|
|
|
566
716
|
"use strict";
|
|
@@ -584,13 +734,13 @@ var visualization_icons_1 = __webpack_require__(42);
|
|
|
584
734
|
|
|
585
735
|
var variables_1 = __webpack_require__(19);
|
|
586
736
|
|
|
587
|
-
var pick_1 = __webpack_require__(
|
|
737
|
+
var pick_1 = __webpack_require__(21);
|
|
588
738
|
|
|
589
739
|
var configUtils_1 = __webpack_require__(6);
|
|
590
740
|
|
|
591
741
|
var VizBehavior_1 = __webpack_require__(5);
|
|
592
742
|
|
|
593
|
-
var consts_1 = __webpack_require__(
|
|
743
|
+
var consts_1 = __webpack_require__(105);
|
|
594
744
|
|
|
595
745
|
var VizCategory_1 = __webpack_require__(26);
|
|
596
746
|
|
|
@@ -699,6 +849,14 @@ var unitLabelConfig = {
|
|
|
699
849
|
option: 'unit',
|
|
700
850
|
editor: 'editor.text'
|
|
701
851
|
};
|
|
852
|
+
var timeFormattingConfig = {
|
|
853
|
+
label: i18n_1._('Date & Time Formatting'),
|
|
854
|
+
option: 'format',
|
|
855
|
+
editor: 'editor.text',
|
|
856
|
+
editorProps: {
|
|
857
|
+
tooltip: i18n_1._('For example: DD-MM-YYYY')
|
|
858
|
+
}
|
|
859
|
+
};
|
|
702
860
|
var sequentialColorConfig = [{
|
|
703
861
|
to: 20,
|
|
704
862
|
value: '#D41F1F'
|
|
@@ -718,6 +876,10 @@ var sequentialColorConfig = [{
|
|
|
718
876
|
from: 80,
|
|
719
877
|
value: '#118832'
|
|
720
878
|
}];
|
|
879
|
+
var matchColorConfig = [{
|
|
880
|
+
match: '',
|
|
881
|
+
value: '#5C33FF'
|
|
882
|
+
}];
|
|
721
883
|
var optionsSchema = {
|
|
722
884
|
backgroundColor: {
|
|
723
885
|
default: '> themes.defaultBackgroundColor',
|
|
@@ -813,7 +975,8 @@ var optionsSchema = {
|
|
|
813
975
|
},
|
|
814
976
|
width: {
|
|
815
977
|
description: 'Controls how wide in pixels (where 1px = 1/96th of 1in) the column should be displayed.',
|
|
816
|
-
type: 'number'
|
|
978
|
+
type: 'number',
|
|
979
|
+
minimum: 30
|
|
817
980
|
}
|
|
818
981
|
}
|
|
819
982
|
}
|
|
@@ -1127,6 +1290,13 @@ var editorConfig = [{
|
|
|
1127
1290
|
rowBackgroundColors: sequentialColorConfig,
|
|
1128
1291
|
rowColors: sequentialColorConfig
|
|
1129
1292
|
}
|
|
1293
|
+
}, {
|
|
1294
|
+
label: i18n_1._('Matches'),
|
|
1295
|
+
value: 'matchValue',
|
|
1296
|
+
defaults: {
|
|
1297
|
+
rowBackgroundColors: matchColorConfig,
|
|
1298
|
+
rowColors: matchColorConfig
|
|
1299
|
+
}
|
|
1130
1300
|
}],
|
|
1131
1301
|
themes: themes
|
|
1132
1302
|
},
|
|
@@ -1164,7 +1334,7 @@ var editorConfig = [{
|
|
|
1164
1334
|
// TODO(fkurniawan): fill in with proper editor components
|
|
1165
1335
|
sparkline: [],
|
|
1166
1336
|
string: [[Object.assign({}, unitPositionConfig), Object.assign({}, unitLabelConfig)]],
|
|
1167
|
-
time: []
|
|
1337
|
+
time: [[Object.assign({}, timeFormattingConfig)]]
|
|
1168
1338
|
},
|
|
1169
1339
|
value: function value(_ref) {
|
|
1170
1340
|
var context = _ref.context,
|
|
@@ -1216,13 +1386,15 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
1216
1386
|
|
|
1217
1387
|
/***/ }),
|
|
1218
1388
|
|
|
1219
|
-
/***/
|
|
1389
|
+
/***/ 257:
|
|
1220
1390
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1221
1391
|
|
|
1222
1392
|
"use strict";
|
|
1223
1393
|
|
|
1224
1394
|
|
|
1225
|
-
var
|
|
1395
|
+
var _slicedToArray = __webpack_require__(48);
|
|
1396
|
+
|
|
1397
|
+
var _taggedTemplateLiteral = __webpack_require__(101);
|
|
1226
1398
|
|
|
1227
1399
|
var _templateObject, _templateObject2;
|
|
1228
1400
|
|
|
@@ -1253,25 +1425,25 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
1253
1425
|
|
|
1254
1426
|
var i18n_1 = __webpack_require__(3);
|
|
1255
1427
|
|
|
1256
|
-
var Table_1 = __webpack_require__(
|
|
1428
|
+
var Table_1 = __webpack_require__(82);
|
|
1257
1429
|
|
|
1258
|
-
var Paginator_1 = __webpack_require__(
|
|
1430
|
+
var Paginator_1 = __webpack_require__(258);
|
|
1259
1431
|
|
|
1260
|
-
var Message_1 = __webpack_require__(
|
|
1432
|
+
var Message_1 = __webpack_require__(259);
|
|
1261
1433
|
|
|
1262
1434
|
var colorUtils_1 = __webpack_require__(11);
|
|
1263
1435
|
|
|
1264
1436
|
var style_1 = __webpack_require__(13);
|
|
1265
1437
|
|
|
1266
|
-
var pick_1 = __webpack_require__(
|
|
1438
|
+
var pick_1 = __webpack_require__(21);
|
|
1267
1439
|
|
|
1268
1440
|
var variables_1 = __webpack_require__(19);
|
|
1269
1441
|
|
|
1270
|
-
var hooks_1 = __webpack_require__(
|
|
1442
|
+
var hooks_1 = __webpack_require__(260);
|
|
1271
1443
|
|
|
1272
|
-
var consts_1 = __webpack_require__(
|
|
1444
|
+
var consts_1 = __webpack_require__(105);
|
|
1273
1445
|
|
|
1274
|
-
var cells_1 = __webpack_require__(
|
|
1446
|
+
var cells_1 = __webpack_require__(261);
|
|
1275
1447
|
|
|
1276
1448
|
var getPagination_1 = __webpack_require__(24);
|
|
1277
1449
|
|
|
@@ -1281,15 +1453,24 @@ var FixedSizeContainer_1 = __webpack_require__(12); // debounce was imported thi
|
|
|
1281
1453
|
// eslint-disable-next-line import/order
|
|
1282
1454
|
|
|
1283
1455
|
|
|
1284
|
-
var debounce = __webpack_require__(
|
|
1456
|
+
var debounce = __webpack_require__(266);
|
|
1285
1457
|
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1458
|
+
var MINIMUM_COLUMN_SIZE = 30;
|
|
1459
|
+
var StyledTableHead = styled_components_1.default(Table_1.default.Head).withConfig({
|
|
1460
|
+
displayName: "PureTable__StyledTableHead",
|
|
1288
1461
|
componentId: "tovzjg-0"
|
|
1462
|
+
})(["& > tr > th:last-child > div > button{display:none;}"]);
|
|
1463
|
+
var NonVisibleTableHead = styled_components_1.default(StyledTableHead).withConfig({
|
|
1464
|
+
displayName: "PureTable__NonVisibleTableHead",
|
|
1465
|
+
componentId: "tovzjg-1"
|
|
1289
1466
|
})(["display:none;"]);
|
|
1467
|
+
var FixedTableHead = styled_components_1.default(StyledTableHead).withConfig({
|
|
1468
|
+
displayName: "PureTable__FixedTableHead",
|
|
1469
|
+
componentId: "tovzjg-2"
|
|
1470
|
+
})(["position:sticky;top:0;"]);
|
|
1290
1471
|
var VizTableContainer = styled_components_1.default.div.withConfig({
|
|
1291
1472
|
displayName: "PureTable__VizTableContainer",
|
|
1292
|
-
componentId: "tovzjg-
|
|
1473
|
+
componentId: "tovzjg-3"
|
|
1293
1474
|
})(["box-sizing:border-box;padding:", ";background-color:", ";display:flex;flex-flow:column nowrap;overflow:hidden;"], pick_1.default({
|
|
1294
1475
|
enterprise: variables_1.default.spacingHalf,
|
|
1295
1476
|
prisma: variables_1.default.spacingSmall
|
|
@@ -1301,7 +1482,7 @@ var PAGINATOR_CONTAINER_HEIGHT = 38;
|
|
|
1301
1482
|
var PAGINATOR_SPACING = 5;
|
|
1302
1483
|
var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
1303
1484
|
displayName: "PureTable__SUITableContainer",
|
|
1304
|
-
componentId: "tovzjg-
|
|
1485
|
+
componentId: "tovzjg-4"
|
|
1305
1486
|
})(["box-sizing:border-box;flex-grow:1;overflow:hidden;", ";", ";", " ", ""], function (_ref) {
|
|
1306
1487
|
var width = _ref.width,
|
|
1307
1488
|
height = _ref.height,
|
|
@@ -1335,7 +1516,7 @@ var SUITableContainer = styled_components_1.default.div.withConfig({
|
|
|
1335
1516
|
SUITableContainer.displayName = 'SUITableContainer';
|
|
1336
1517
|
var PaginatorContainer = styled_components_1.default.div.withConfig({
|
|
1337
1518
|
displayName: "PureTable__PaginatorContainer",
|
|
1338
|
-
componentId: "tovzjg-
|
|
1519
|
+
componentId: "tovzjg-5"
|
|
1339
1520
|
})(["position:relative;text-align:right;height:", "px;"], PAGINATOR_CONTAINER_HEIGHT);
|
|
1340
1521
|
PaginatorContainer.displayName = 'PaginatorContainer'; // allow for early return in case of empty tableBody while still following hook rules
|
|
1341
1522
|
|
|
@@ -1382,6 +1563,20 @@ var withEmptyTableMessage = function withEmptyTableMessage(Viz) {
|
|
|
1382
1563
|
return Wrapper;
|
|
1383
1564
|
};
|
|
1384
1565
|
|
|
1566
|
+
var useTableHead = function useTableHead(visibility, mode) {
|
|
1567
|
+
if (visibility === 'none') {
|
|
1568
|
+
return NonVisibleTableHead;
|
|
1569
|
+
} // @TODO
|
|
1570
|
+
// Stacking context conflicts with editModeCover; temporary fix
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
if (visibility === 'fixed' && mode === 'view') {
|
|
1574
|
+
return FixedTableHead;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
return StyledTableHead;
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1385
1580
|
var PureTable = function PureTable(props) {
|
|
1386
1581
|
var count = props.count,
|
|
1387
1582
|
width = props.width,
|
|
@@ -1397,7 +1592,16 @@ var PureTable = function PureTable(props) {
|
|
|
1397
1592
|
_a = props.paginatorParams,
|
|
1398
1593
|
isPaging = _a.isPaging,
|
|
1399
1594
|
paginatorProps = __rest(_a, ["isPaging"]),
|
|
1400
|
-
onCellClick = props.onCellClick
|
|
1595
|
+
onCellClick = props.onCellClick,
|
|
1596
|
+
onColumnFormatChange = props.onColumnFormatChange,
|
|
1597
|
+
columnFormat = props.columnFormat,
|
|
1598
|
+
mode = props.mode,
|
|
1599
|
+
headerVisibility = props.headerVisibility;
|
|
1600
|
+
|
|
1601
|
+
var _React$useState = React.useState(columnFormat),
|
|
1602
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1603
|
+
columns = _React$useState2[0],
|
|
1604
|
+
setColumns = _React$useState2[1];
|
|
1401
1605
|
|
|
1402
1606
|
var firstRenderCount = React.useRef(count);
|
|
1403
1607
|
React.useEffect(function () {
|
|
@@ -1408,7 +1612,11 @@ var PureTable = function PureTable(props) {
|
|
|
1408
1612
|
});
|
|
1409
1613
|
}
|
|
1410
1614
|
}, [count, paginatorProps]);
|
|
1411
|
-
var
|
|
1615
|
+
var stringifiedColumnFormat = JSON.stringify(columnFormat);
|
|
1616
|
+
React.useEffect(function () {
|
|
1617
|
+
setColumns(columnFormat);
|
|
1618
|
+
}, [mode, stringifiedColumnFormat]);
|
|
1619
|
+
var TableHead = useTableHead(headerVisibility, mode);
|
|
1412
1620
|
var debouncedDrilldown = debounce(function (e, payload) {
|
|
1413
1621
|
if (window.getSelection().toString() === '') {
|
|
1414
1622
|
if (lodash_1.isFunction(onCellClick)) {
|
|
@@ -1460,6 +1668,47 @@ var PureTable = function PureTable(props) {
|
|
|
1460
1668
|
debouncedDrilldown(e.nativeEvent, payload);
|
|
1461
1669
|
}
|
|
1462
1670
|
}, [onCellClick, showRowNumbers, tableHeader, tableBody]);
|
|
1671
|
+
var debouncedOnColumnFormatChange = React.useMemo(function () {
|
|
1672
|
+
return debounce(function (newFormat) {
|
|
1673
|
+
onColumnFormatChange(newFormat);
|
|
1674
|
+
}, 300);
|
|
1675
|
+
}, [onColumnFormatChange]);
|
|
1676
|
+
|
|
1677
|
+
var sumColumnWidths = function sumColumnWidths(allColumns) {
|
|
1678
|
+
return Object.keys(allColumns).reduce(function (prev, key) {
|
|
1679
|
+
var _a, _b, _c;
|
|
1680
|
+
|
|
1681
|
+
if (((_a = allColumns[key]) === null || _a === void 0 ? void 0 : _a.width) === 'auto' || ((_b = allColumns[key]) === null || _b === void 0 ? void 0 : _b.width) === undefined) {
|
|
1682
|
+
return prev + MINIMUM_COLUMN_SIZE; // Columns with no width defined are automatically size 30
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
return prev + ((_c = allColumns[key]) === null || _c === void 0 ? void 0 : _c.width);
|
|
1686
|
+
}, 0) + // Add all remaining columns that do not have a columnFormat
|
|
1687
|
+
(tableHeader.cells.length - Object.keys(allColumns).length) * MINIMUM_COLUMN_SIZE;
|
|
1688
|
+
};
|
|
1689
|
+
|
|
1690
|
+
var handleResizeColumn = React.useCallback(function (_event, payload) {
|
|
1691
|
+
var updatedCF = lodash_1.cloneDeep(columns);
|
|
1692
|
+
var field = payload.columnId.split('-')[1];
|
|
1693
|
+
updatedCF[field] = Object.assign(Object.assign({}, updatedCF[field]), {
|
|
1694
|
+
width: Math.max(payload.width, MINIMUM_COLUMN_SIZE)
|
|
1695
|
+
}); // Prevent the user from expanding the columns too far
|
|
1696
|
+
|
|
1697
|
+
if (sumColumnWidths(updatedCF) > width) {
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
setColumns(updatedCF); // Updates column json in edit mode
|
|
1702
|
+
|
|
1703
|
+
if (mode === 'edit') {
|
|
1704
|
+
debouncedOnColumnFormatChange(updatedCF);
|
|
1705
|
+
}
|
|
1706
|
+
}, [mode, columns, width, debouncedOnColumnFormatChange]);
|
|
1707
|
+
|
|
1708
|
+
var handleEventClick = function handleEventClick(e) {
|
|
1709
|
+
e.stopPropagation();
|
|
1710
|
+
};
|
|
1711
|
+
|
|
1463
1712
|
return React.createElement(VizTableContainer, {
|
|
1464
1713
|
backgroundColor: backgroundColor
|
|
1465
1714
|
}, React.createElement(SUITableContainer, {
|
|
@@ -1468,7 +1717,7 @@ var PureTable = function PureTable(props) {
|
|
|
1468
1717
|
isPaging: isPaging,
|
|
1469
1718
|
headerStyle: tableHeader.style
|
|
1470
1719
|
}, React.createElement(Table_1.default, {
|
|
1471
|
-
headType: tableHeader.visibility !== 'none' ?
|
|
1720
|
+
headType: tableHeader.visibility !== 'none' ? 'inline' : undefined,
|
|
1472
1721
|
innerStyle: {
|
|
1473
1722
|
height: '100%'
|
|
1474
1723
|
},
|
|
@@ -1476,8 +1725,12 @@ var PureTable = function PureTable(props) {
|
|
|
1476
1725
|
height: '100%',
|
|
1477
1726
|
cursor: onCellClick ? 'pointer' : 'unset'
|
|
1478
1727
|
},
|
|
1479
|
-
onClick: onCellClick ? drilldownHandler : lodash_1.noop
|
|
1728
|
+
onClick: onCellClick ? drilldownHandler : lodash_1.noop,
|
|
1729
|
+
onRequestResizeColumn: handleResizeColumn,
|
|
1730
|
+
resizableFillLayout: true
|
|
1480
1731
|
}, React.createElement(TableHead, null, tableHeader.cells.map(function (_a) {
|
|
1732
|
+
var _b;
|
|
1733
|
+
|
|
1481
1734
|
var key = _a.key,
|
|
1482
1735
|
value = _a.value,
|
|
1483
1736
|
sortKey = _a.sortKey,
|
|
@@ -1485,7 +1738,10 @@ var PureTable = function PureTable(props) {
|
|
|
1485
1738
|
|
|
1486
1739
|
return React.createElement(Table_1.default.HeadCell, Object.assign({
|
|
1487
1740
|
key: key,
|
|
1488
|
-
|
|
1741
|
+
columnId: key,
|
|
1742
|
+
sortDir: sortKey === currentSortKey ? currentSortDir : 'none',
|
|
1743
|
+
width: ((_b = columns[value]) === null || _b === void 0 ? void 0 : _b.width) || 'auto',
|
|
1744
|
+
onMouseDown: handleEventClick
|
|
1489
1745
|
}, Object.assign({
|
|
1490
1746
|
sortKey: sortKey,
|
|
1491
1747
|
onSort: onSort
|
|
@@ -1494,18 +1750,23 @@ var PureTable = function PureTable(props) {
|
|
|
1494
1750
|
return React.createElement(Table_1.default.Row, {
|
|
1495
1751
|
key: row.key
|
|
1496
1752
|
}, row.cells.map(function (cell) {
|
|
1753
|
+
var _a, _b, _c;
|
|
1754
|
+
|
|
1497
1755
|
return React.createElement(cells_1.SwitchTableCell, {
|
|
1498
1756
|
key: cell.key,
|
|
1499
1757
|
type: cell.cellType
|
|
1500
1758
|
}, React.createElement(cells_1.TextCell, {
|
|
1501
1759
|
cell: cell,
|
|
1502
|
-
useMouseOverEffect: !!onCellClick
|
|
1760
|
+
useMouseOverEffect: !!onCellClick,
|
|
1761
|
+
width: ((_a = columns[cell.header]) === null || _a === void 0 ? void 0 : _a.width) || 'auto'
|
|
1503
1762
|
}), React.createElement(cells_1.SparklineCell, {
|
|
1504
1763
|
cell: cell,
|
|
1505
|
-
useMouseOverEffect: !!onCellClick
|
|
1764
|
+
useMouseOverEffect: !!onCellClick,
|
|
1765
|
+
width: ((_b = columns[cell.header]) === null || _b === void 0 ? void 0 : _b.width) || 'auto'
|
|
1506
1766
|
}), React.createElement(cells_1.ArrayCell, {
|
|
1507
1767
|
cell: cell,
|
|
1508
|
-
useMouseOverEffect: !!onCellClick
|
|
1768
|
+
useMouseOverEffect: !!onCellClick,
|
|
1769
|
+
width: ((_c = columns[cell.header]) === null || _c === void 0 ? void 0 : _c.width) || 'auto'
|
|
1509
1770
|
}));
|
|
1510
1771
|
}));
|
|
1511
1772
|
})))), isPaging ? React.createElement(PaginatorContainer, null, React.createElement(Paginator_1.default, Object.assign({}, paginatorProps))) : null);
|
|
@@ -1547,7 +1808,8 @@ PureTable.propTypes = {
|
|
|
1547
1808
|
sparklineTypes: T.arrayOf(T.arrayOf(T.oneOf(consts_1.validSparklineTypes)))
|
|
1548
1809
|
}),
|
|
1549
1810
|
theme: T.any,
|
|
1550
|
-
width: T.oneOfType([T.number])
|
|
1811
|
+
width: T.oneOfType([T.number]),
|
|
1812
|
+
onColumnFormatChange: T.func
|
|
1551
1813
|
};
|
|
1552
1814
|
PureTable.defaultProps = {
|
|
1553
1815
|
columnFormat: {},
|
|
@@ -1567,28 +1829,58 @@ PureTable.defaultProps = {
|
|
|
1567
1829
|
table: [],
|
|
1568
1830
|
tableFormat: {},
|
|
1569
1831
|
theme: {},
|
|
1570
|
-
width: 300
|
|
1832
|
+
width: 300,
|
|
1833
|
+
onColumnFormatChange: lodash_1.noop
|
|
1571
1834
|
};
|
|
1572
1835
|
PureTable.displayName = 'VizTable';
|
|
1573
1836
|
exports.default = withEmptyTableMessage(FixedSizeContainer_1.default(PureTable));
|
|
1574
1837
|
|
|
1575
1838
|
/***/ }),
|
|
1576
1839
|
|
|
1577
|
-
/***/
|
|
1840
|
+
/***/ 258:
|
|
1578
1841
|
/***/ (function(module, exports) {
|
|
1579
1842
|
|
|
1580
1843
|
module.exports = require("@splunk/react-ui/Paginator");
|
|
1581
1844
|
|
|
1582
1845
|
/***/ }),
|
|
1583
1846
|
|
|
1584
|
-
/***/
|
|
1847
|
+
/***/ 259:
|
|
1585
1848
|
/***/ (function(module, exports) {
|
|
1586
1849
|
|
|
1587
1850
|
module.exports = require("@splunk/react-ui/Message");
|
|
1588
1851
|
|
|
1589
1852
|
/***/ }),
|
|
1590
1853
|
|
|
1591
|
-
/***/
|
|
1854
|
+
/***/ 26:
|
|
1855
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1856
|
+
|
|
1857
|
+
"use strict";
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1861
|
+
value: true
|
|
1862
|
+
});
|
|
1863
|
+
exports.VizCategory = void 0;
|
|
1864
|
+
var VizCategory;
|
|
1865
|
+
|
|
1866
|
+
(function (VizCategory) {
|
|
1867
|
+
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
1868
|
+
VizCategory["TRENDS"] = "Trends";
|
|
1869
|
+
VizCategory["COMPARISONS"] = "Comparisons";
|
|
1870
|
+
VizCategory["TABLE"] = "Table";
|
|
1871
|
+
VizCategory["GAUGE"] = "Gauge";
|
|
1872
|
+
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
1873
|
+
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
1874
|
+
VizCategory["SHAPES"] = "Shapes";
|
|
1875
|
+
VizCategory["MISC"] = "misc";
|
|
1876
|
+
VizCategory["FLOW"] = "Flow";
|
|
1877
|
+
VizCategory["CORRELATION"] = "Correlation";
|
|
1878
|
+
VizCategory["SPATIAL"] = "Spatial";
|
|
1879
|
+
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
1880
|
+
|
|
1881
|
+
/***/ }),
|
|
1882
|
+
|
|
1883
|
+
/***/ 260:
|
|
1592
1884
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1593
1885
|
|
|
1594
1886
|
"use strict";
|
|
@@ -1596,7 +1888,7 @@ module.exports = require("@splunk/react-ui/Message");
|
|
|
1596
1888
|
|
|
1597
1889
|
var _toConsumableArray = __webpack_require__(39);
|
|
1598
1890
|
|
|
1599
|
-
var _typeof = __webpack_require__(
|
|
1891
|
+
var _typeof = __webpack_require__(20);
|
|
1600
1892
|
|
|
1601
1893
|
Object.defineProperty(exports, "__esModule", {
|
|
1602
1894
|
value: true
|
|
@@ -1607,17 +1899,14 @@ var lodash_1 = __webpack_require__(2);
|
|
|
1607
1899
|
|
|
1608
1900
|
var colorUtils_1 = __webpack_require__(11);
|
|
1609
1901
|
|
|
1610
|
-
var
|
|
1611
|
-
|
|
1612
|
-
var consts_1 = __webpack_require__(103);
|
|
1902
|
+
var consts_1 = __webpack_require__(105);
|
|
1613
1903
|
|
|
1614
1904
|
var isArray = function isArray(v) {
|
|
1615
1905
|
return Array.isArray(v);
|
|
1616
1906
|
};
|
|
1617
1907
|
|
|
1618
1908
|
var getOverflowStyles = function getOverflowStyles(_ref) {
|
|
1619
|
-
var textOverflow = _ref.textOverflow
|
|
1620
|
-
variables = _ref.variables;
|
|
1909
|
+
var textOverflow = _ref.textOverflow;
|
|
1621
1910
|
var styles = {
|
|
1622
1911
|
anywhere: {
|
|
1623
1912
|
wordBreak: 'break-all'
|
|
@@ -1628,7 +1917,6 @@ var getOverflowStyles = function getOverflowStyles(_ref) {
|
|
|
1628
1917
|
overflowWrap: 'break-word'
|
|
1629
1918
|
},
|
|
1630
1919
|
ellipsis: {
|
|
1631
|
-
maxWidth: style_1.toPx(variables && variables.width || 100),
|
|
1632
1920
|
whiteSpace: 'nowrap',
|
|
1633
1921
|
overflow: 'hidden',
|
|
1634
1922
|
textOverflow: 'ellipsis'
|
|
@@ -1662,12 +1950,8 @@ var generateHeader = function generateHeader(value, i, columnFormat) {
|
|
|
1662
1950
|
if (lodash_1.isNumber(columnWidth)) {
|
|
1663
1951
|
var textOverflowType = exports.getTextOverflowType({}, value, 'ellipsis');
|
|
1664
1952
|
var textOverflowStyle = exports.getOverflowStyles({
|
|
1665
|
-
textOverflow: textOverflowType
|
|
1666
|
-
variables: {
|
|
1667
|
-
width: columnWidth
|
|
1668
|
-
}
|
|
1953
|
+
textOverflow: textOverflowType
|
|
1669
1954
|
});
|
|
1670
|
-
ret.width = columnWidth;
|
|
1671
1955
|
ret.truncate = true;
|
|
1672
1956
|
ret.style = textOverflowStyle;
|
|
1673
1957
|
}
|
|
@@ -1949,6 +2233,8 @@ var useTable = function useTable() {
|
|
|
1949
2233
|
cells: []
|
|
1950
2234
|
};
|
|
1951
2235
|
table.forEach(function (column, i) {
|
|
2236
|
+
var _a;
|
|
2237
|
+
|
|
1952
2238
|
var currentHeader = tableHeader.cells[i];
|
|
1953
2239
|
var value = validValueSelector(getColumnFormatData(columnFormat, currentHeader, currentRow), getTableFormatData(tableFormat, i, currentRow), column[currentRow], '');
|
|
1954
2240
|
var rawValue = column[currentRow];
|
|
@@ -1962,17 +2248,12 @@ var useTable = function useTable() {
|
|
|
1962
2248
|
var key = generateKey(value, "".concat(currentRow, "-").concat(i));
|
|
1963
2249
|
var additionalStyles = {};
|
|
1964
2250
|
|
|
1965
|
-
if (lodash_1.isNumber(currentHeader.width)) {
|
|
2251
|
+
if (lodash_1.isNumber((_a = columnFormat[currentHeader.value]) === null || _a === void 0 ? void 0 : _a.width)) {
|
|
1966
2252
|
var textOverflowType = exports.getTextOverflowType(columnFormat, currentHeader.value, 'ellipsis');
|
|
1967
2253
|
var textOverflowStyle = exports.getOverflowStyles({
|
|
1968
|
-
textOverflow: textOverflowType
|
|
1969
|
-
variables: {
|
|
1970
|
-
width: currentHeader.width
|
|
1971
|
-
}
|
|
1972
|
-
});
|
|
1973
|
-
additionalStyles = Object.assign(Object.assign(Object.assign({}, additionalStyles), textOverflowStyle), {
|
|
1974
|
-
width: style_1.toPx(currentHeader.width)
|
|
2254
|
+
textOverflow: textOverflowType
|
|
1975
2255
|
});
|
|
2256
|
+
additionalStyles = Object.assign(Object.assign({}, additionalStyles), textOverflowStyle);
|
|
1976
2257
|
}
|
|
1977
2258
|
|
|
1978
2259
|
row.cells.push({
|
|
@@ -1986,6 +2267,7 @@ var useTable = function useTable() {
|
|
|
1986
2267
|
sparklineColor: sparklineColor,
|
|
1987
2268
|
sparklineAreaColor: sparklineAreaColor,
|
|
1988
2269
|
sparklineType: sparklineType,
|
|
2270
|
+
header: currentHeader.value,
|
|
1989
2271
|
style: Object.assign({
|
|
1990
2272
|
backgroundColor: rowBackgroundColor,
|
|
1991
2273
|
color: rowColor
|
|
@@ -2009,7 +2291,7 @@ exports.useTable = useTable;
|
|
|
2009
2291
|
|
|
2010
2292
|
/***/ }),
|
|
2011
2293
|
|
|
2012
|
-
/***/
|
|
2294
|
+
/***/ 261:
|
|
2013
2295
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2014
2296
|
|
|
2015
2297
|
"use strict";
|
|
@@ -2038,17 +2320,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2038
2320
|
value: true
|
|
2039
2321
|
});
|
|
2040
2322
|
|
|
2041
|
-
__exportStar(__webpack_require__(
|
|
2323
|
+
__exportStar(__webpack_require__(262), exports);
|
|
2042
2324
|
|
|
2043
|
-
__exportStar(__webpack_require__(
|
|
2325
|
+
__exportStar(__webpack_require__(263), exports);
|
|
2044
2326
|
|
|
2045
|
-
__exportStar(__webpack_require__(
|
|
2327
|
+
__exportStar(__webpack_require__(264), exports);
|
|
2046
2328
|
|
|
2047
|
-
__exportStar(__webpack_require__(
|
|
2329
|
+
__exportStar(__webpack_require__(265), exports);
|
|
2048
2330
|
|
|
2049
2331
|
/***/ }),
|
|
2050
2332
|
|
|
2051
|
-
/***/
|
|
2333
|
+
/***/ 262:
|
|
2052
2334
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2053
2335
|
|
|
2054
2336
|
"use strict";
|
|
@@ -2071,96 +2353,7 @@ exports.SwitchTableCell = SwitchTableCell;
|
|
|
2071
2353
|
|
|
2072
2354
|
/***/ }),
|
|
2073
2355
|
|
|
2074
|
-
/***/
|
|
2075
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2076
|
-
|
|
2077
|
-
"use strict";
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2081
|
-
value: true
|
|
2082
|
-
});
|
|
2083
|
-
exports.shouldShowIconPlaceholder = void 0;
|
|
2084
|
-
|
|
2085
|
-
var React = __webpack_require__(1);
|
|
2086
|
-
|
|
2087
|
-
var T = __webpack_require__(0);
|
|
2088
|
-
|
|
2089
|
-
var lodash_1 = __webpack_require__(2);
|
|
2090
|
-
|
|
2091
|
-
var i18n_1 = __webpack_require__(3);
|
|
2092
|
-
|
|
2093
|
-
var Message_1 = __webpack_require__(9);
|
|
2094
|
-
|
|
2095
|
-
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
2096
|
-
/**
|
|
2097
|
-
* @method shouldShowIconPlaceholder
|
|
2098
|
-
* @param {object} dataSources
|
|
2099
|
-
* @param {boolean} loading
|
|
2100
|
-
* @returns {boolean}
|
|
2101
|
-
*/
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
2105
|
-
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2106
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
2107
|
-
var noData = data === undefined;
|
|
2108
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
2109
|
-
var noFields = fields === undefined;
|
|
2110
|
-
return loading || noData || noFields;
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
2114
|
-
var propTypes = {
|
|
2115
|
-
icon: T.func,
|
|
2116
|
-
width: T.oneOfType([T.string, T.number]),
|
|
2117
|
-
height: T.oneOfType([T.string, T.number]),
|
|
2118
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
2119
|
-
backgroundColor: T.string
|
|
2120
|
-
};
|
|
2121
|
-
/**
|
|
2122
|
-
* @method IconPlaceholder
|
|
2123
|
-
* @param {IconPlaceholderProps} props
|
|
2124
|
-
* @returns {React.ReactElement}
|
|
2125
|
-
*/
|
|
2126
|
-
|
|
2127
|
-
var IconPlaceholder = function IconPlaceholder(props) {
|
|
2128
|
-
var width = props.width,
|
|
2129
|
-
height = props.height,
|
|
2130
|
-
icon = props.icon;
|
|
2131
|
-
|
|
2132
|
-
if (icon) {
|
|
2133
|
-
return React.createElement(icon, {
|
|
2134
|
-
style: {
|
|
2135
|
-
left: '50%',
|
|
2136
|
-
top: '50%',
|
|
2137
|
-
color: 'grey',
|
|
2138
|
-
position: 'absolute',
|
|
2139
|
-
transform: 'translate(-50%, -50%)'
|
|
2140
|
-
},
|
|
2141
|
-
width: '50%',
|
|
2142
|
-
height: '50%'
|
|
2143
|
-
});
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
return React.createElement(Message_1.default, {
|
|
2147
|
-
width: width,
|
|
2148
|
-
height: height,
|
|
2149
|
-
level: "warning",
|
|
2150
|
-
message: i18n_1._('No DataSource Connected')
|
|
2151
|
-
});
|
|
2152
|
-
};
|
|
2153
|
-
|
|
2154
|
-
IconPlaceholder.propTypes = propTypes;
|
|
2155
|
-
IconPlaceholder.defaultProps = {
|
|
2156
|
-
width: '100%',
|
|
2157
|
-
height: 250
|
|
2158
|
-
};
|
|
2159
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
2160
|
-
|
|
2161
|
-
/***/ }),
|
|
2162
|
-
|
|
2163
|
-
/***/ 250:
|
|
2356
|
+
/***/ 263:
|
|
2164
2357
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2165
2358
|
|
|
2166
2359
|
"use strict";
|
|
@@ -2173,13 +2366,16 @@ exports.TextCell = void 0;
|
|
|
2173
2366
|
|
|
2174
2367
|
var React = __webpack_require__(1);
|
|
2175
2368
|
|
|
2176
|
-
var Table_1 = __webpack_require__(
|
|
2369
|
+
var Table_1 = __webpack_require__(82);
|
|
2177
2370
|
|
|
2178
2371
|
var TextCell = function TextCell(_ref) {
|
|
2179
2372
|
var cell = _ref.cell,
|
|
2180
|
-
useMouseOverEffect = _ref.useMouseOverEffect
|
|
2373
|
+
useMouseOverEffect = _ref.useMouseOverEffect,
|
|
2374
|
+
width = _ref.width;
|
|
2181
2375
|
return React.createElement(Table_1.default.Cell, {
|
|
2182
|
-
style: cell.style,
|
|
2376
|
+
style: Object.assign(Object.assign({}, cell.style), {
|
|
2377
|
+
width: width
|
|
2378
|
+
}),
|
|
2183
2379
|
align: cell.align,
|
|
2184
2380
|
"data-test-cell-type": "TextCell",
|
|
2185
2381
|
"data-row-index": cell.rowIndex,
|
|
@@ -2193,7 +2389,7 @@ exports.TextCell.displayName = 'TextCell';
|
|
|
2193
2389
|
|
|
2194
2390
|
/***/ }),
|
|
2195
2391
|
|
|
2196
|
-
/***/
|
|
2392
|
+
/***/ 264:
|
|
2197
2393
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2198
2394
|
|
|
2199
2395
|
"use strict";
|
|
@@ -2206,14 +2402,17 @@ exports.ArrayCell = void 0;
|
|
|
2206
2402
|
|
|
2207
2403
|
var React = __webpack_require__(1);
|
|
2208
2404
|
|
|
2209
|
-
var Table_1 = __webpack_require__(
|
|
2405
|
+
var Table_1 = __webpack_require__(82);
|
|
2210
2406
|
|
|
2211
2407
|
var ArrayCell = function ArrayCell(_ref) {
|
|
2212
2408
|
var cell = _ref.cell,
|
|
2213
|
-
useMouseOverEffect = _ref.useMouseOverEffect
|
|
2409
|
+
useMouseOverEffect = _ref.useMouseOverEffect,
|
|
2410
|
+
width = _ref.width;
|
|
2214
2411
|
var value = Array.isArray(cell.value) ? cell.value : [cell.value];
|
|
2215
2412
|
return React.createElement(Table_1.default.Cell, {
|
|
2216
|
-
style: cell.style,
|
|
2413
|
+
style: Object.assign(Object.assign({}, cell.style), {
|
|
2414
|
+
width: width
|
|
2415
|
+
}),
|
|
2217
2416
|
align: cell.align,
|
|
2218
2417
|
"data-test-cell-type": "ArrayCell",
|
|
2219
2418
|
onClick: useMouseOverEffect ? function () {} : undefined
|
|
@@ -2232,13 +2431,13 @@ exports.ArrayCell.displayName = 'ArrayCell';
|
|
|
2232
2431
|
|
|
2233
2432
|
/***/ }),
|
|
2234
2433
|
|
|
2235
|
-
/***/
|
|
2434
|
+
/***/ 265:
|
|
2236
2435
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2237
2436
|
|
|
2238
2437
|
"use strict";
|
|
2239
2438
|
|
|
2240
2439
|
|
|
2241
|
-
var _slicedToArray = __webpack_require__(
|
|
2440
|
+
var _slicedToArray = __webpack_require__(48);
|
|
2242
2441
|
|
|
2243
2442
|
Object.defineProperty(exports, "__esModule", {
|
|
2244
2443
|
value: true
|
|
@@ -2247,9 +2446,9 @@ exports.SparklineCell = exports.validSparklineTypes = void 0;
|
|
|
2247
2446
|
|
|
2248
2447
|
var React = __webpack_require__(1);
|
|
2249
2448
|
|
|
2250
|
-
var Table_1 = __webpack_require__(
|
|
2449
|
+
var Table_1 = __webpack_require__(82);
|
|
2251
2450
|
|
|
2252
|
-
var Line_1 = __webpack_require__(
|
|
2451
|
+
var Line_1 = __webpack_require__(83);
|
|
2253
2452
|
|
|
2254
2453
|
var paddingLeftRight = 5;
|
|
2255
2454
|
var paddingTopBottom = 3;
|
|
@@ -2267,7 +2466,8 @@ exports.validSparklineTypes = ['line', 'area'];
|
|
|
2267
2466
|
|
|
2268
2467
|
var SparklineCell = function SparklineCell(_ref) {
|
|
2269
2468
|
var cell = _ref.cell,
|
|
2270
|
-
useMouseOverEffect = _ref.useMouseOverEffect
|
|
2469
|
+
useMouseOverEffect = _ref.useMouseOverEffect,
|
|
2470
|
+
width = _ref.width;
|
|
2271
2471
|
|
|
2272
2472
|
var _React$useState = React.useState(React.createRef()),
|
|
2273
2473
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -2289,7 +2489,7 @@ var SparklineCell = function SparklineCell(_ref) {
|
|
|
2289
2489
|
style: Object.assign(Object.assign({}, cell.style), {
|
|
2290
2490
|
padding: 0,
|
|
2291
2491
|
margin: 0,
|
|
2292
|
-
width:
|
|
2492
|
+
width: width,
|
|
2293
2493
|
height: "".concat(height, "px")
|
|
2294
2494
|
}),
|
|
2295
2495
|
align: cell.align,
|
|
@@ -2324,42 +2524,13 @@ exports.SparklineCell.displayName = 'SparklineCell';
|
|
|
2324
2524
|
|
|
2325
2525
|
/***/ }),
|
|
2326
2526
|
|
|
2327
|
-
/***/
|
|
2527
|
+
/***/ 266:
|
|
2328
2528
|
/***/ (function(module, exports) {
|
|
2329
2529
|
|
|
2330
2530
|
module.exports = require("lodash/debounce");
|
|
2331
2531
|
|
|
2332
2532
|
/***/ }),
|
|
2333
2533
|
|
|
2334
|
-
/***/ 26:
|
|
2335
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2336
|
-
|
|
2337
|
-
"use strict";
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2341
|
-
value: true
|
|
2342
|
-
});
|
|
2343
|
-
exports.VizCategory = void 0;
|
|
2344
|
-
var VizCategory;
|
|
2345
|
-
|
|
2346
|
-
(function (VizCategory) {
|
|
2347
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
2348
|
-
VizCategory["TRENDS"] = "Trends";
|
|
2349
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
2350
|
-
VizCategory["TABLE"] = "Table";
|
|
2351
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
2352
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
2353
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
2354
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
2355
|
-
VizCategory["MISC"] = "misc";
|
|
2356
|
-
VizCategory["FLOW"] = "Flow";
|
|
2357
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
2358
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
2359
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
2360
|
-
|
|
2361
|
-
/***/ }),
|
|
2362
|
-
|
|
2363
2534
|
/***/ 27:
|
|
2364
2535
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2365
2536
|
|
|
@@ -2400,7 +2571,7 @@ var withEditModeCover_1 = __webpack_require__(37);
|
|
|
2400
2571
|
|
|
2401
2572
|
var withPlaceholder_1 = __webpack_require__(38);
|
|
2402
2573
|
|
|
2403
|
-
var hocUtils_1 = __webpack_require__(
|
|
2574
|
+
var hocUtils_1 = __webpack_require__(7);
|
|
2404
2575
|
/**
|
|
2405
2576
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
2406
2577
|
* @param {DashboardVizOpts} opts
|
|
@@ -2413,6 +2584,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2413
2584
|
vizConfig = opts.vizConfig,
|
|
2414
2585
|
_opts$computeVizProps = opts.computeVizProps,
|
|
2415
2586
|
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
2587
|
+
disableEditModeCover = opts.disableEditModeCover,
|
|
2416
2588
|
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
2417
2589
|
|
|
2418
2590
|
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
@@ -2577,7 +2749,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
2577
2749
|
|
|
2578
2750
|
DashboardViz.config = vizConfig; // @ts-ignore: TODO fix sc upgrade TS issues
|
|
2579
2751
|
|
|
2580
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz), useIconPlaceholder));
|
|
2752
|
+
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
2581
2753
|
};
|
|
2582
2754
|
|
|
2583
2755
|
exports.default = withDashboardViz;
|
|
@@ -2772,7 +2944,7 @@ exports.default = SplunkVisualization;
|
|
|
2772
2944
|
|
|
2773
2945
|
var _classCallCheck = __webpack_require__(10);
|
|
2774
2946
|
|
|
2775
|
-
var _createClass = __webpack_require__(
|
|
2947
|
+
var _createClass = __webpack_require__(15);
|
|
2776
2948
|
|
|
2777
2949
|
Object.defineProperty(exports, "__esModule", {
|
|
2778
2950
|
value: true
|
|
@@ -2991,13 +3163,15 @@ var React = __webpack_require__(1);
|
|
|
2991
3163
|
|
|
2992
3164
|
var styled_components_1 = __webpack_require__(4);
|
|
2993
3165
|
|
|
2994
|
-
var hocUtils_1 = __webpack_require__(
|
|
3166
|
+
var hocUtils_1 = __webpack_require__(7);
|
|
2995
3167
|
|
|
2996
3168
|
var Cover = styled_components_1.default.div.withConfig({
|
|
2997
3169
|
displayName: "withEditModeCover__Cover",
|
|
2998
3170
|
componentId: "sc-1gsbnxb-0"
|
|
2999
3171
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
3000
|
-
var Blocker = styled_components_1.default.div.
|
|
3172
|
+
var Blocker = styled_components_1.default.div.attrs({
|
|
3173
|
+
'data-splunk-visualization-version': "24.3.0 - 1c1ae4b3c"
|
|
3174
|
+
}).withConfig({
|
|
3001
3175
|
displayName: "withEditModeCover__Blocker",
|
|
3002
3176
|
componentId: "sc-1gsbnxb-1"
|
|
3003
3177
|
})(["position:relative;width:100%;height:100%;"]);
|
|
@@ -3008,10 +3182,11 @@ var Blocker = styled_components_1.default.div.withConfig({
|
|
|
3008
3182
|
* @returns {ExtendedDashViz} Wrapper
|
|
3009
3183
|
*/
|
|
3010
3184
|
|
|
3011
|
-
var withEditModeCover = function withEditModeCover(Visualization) {
|
|
3185
|
+
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
3012
3186
|
var Wrapper = function Wrapper(props) {
|
|
3013
3187
|
var mode = props.mode;
|
|
3014
|
-
|
|
3188
|
+
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
3189
|
+
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
3015
3190
|
"data-test": "edit-mode-cover"
|
|
3016
3191
|
}));
|
|
3017
3192
|
};
|
|
@@ -3045,7 +3220,7 @@ var IconPlaceholder_1 = __webpack_require__(25);
|
|
|
3045
3220
|
|
|
3046
3221
|
var VizBehavior_1 = __webpack_require__(5);
|
|
3047
3222
|
|
|
3048
|
-
var hocUtils_1 = __webpack_require__(
|
|
3223
|
+
var hocUtils_1 = __webpack_require__(7);
|
|
3049
3224
|
|
|
3050
3225
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
3051
3226
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -3115,6 +3290,13 @@ module.exports = require("@splunk/visualization-icons");
|
|
|
3115
3290
|
|
|
3116
3291
|
/***/ }),
|
|
3117
3292
|
|
|
3293
|
+
/***/ 48:
|
|
3294
|
+
/***/ (function(module, exports) {
|
|
3295
|
+
|
|
3296
|
+
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
3297
|
+
|
|
3298
|
+
/***/ }),
|
|
3299
|
+
|
|
3118
3300
|
/***/ 5:
|
|
3119
3301
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3120
3302
|
|
|
@@ -3159,7 +3341,7 @@ var VizBehavior;
|
|
|
3159
3341
|
"use strict";
|
|
3160
3342
|
|
|
3161
3343
|
|
|
3162
|
-
var _defineProperty = __webpack_require__(
|
|
3344
|
+
var _defineProperty = __webpack_require__(8);
|
|
3163
3345
|
|
|
3164
3346
|
var __rest = this && this.__rest || function (s, e) {
|
|
3165
3347
|
var t = {};
|
|
@@ -3345,27 +3527,13 @@ exports.generatePrecisionValues = generatePrecisionValues;
|
|
|
3345
3527
|
|
|
3346
3528
|
/***/ }),
|
|
3347
3529
|
|
|
3348
|
-
/***/ 60:
|
|
3349
|
-
/***/ (function(module, exports) {
|
|
3350
|
-
|
|
3351
|
-
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
3352
|
-
|
|
3353
|
-
/***/ }),
|
|
3354
|
-
|
|
3355
3530
|
/***/ 7:
|
|
3356
|
-
/***/ (function(module, exports) {
|
|
3357
|
-
|
|
3358
|
-
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3359
|
-
|
|
3360
|
-
/***/ }),
|
|
3361
|
-
|
|
3362
|
-
/***/ 8:
|
|
3363
3531
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3364
3532
|
|
|
3365
3533
|
"use strict";
|
|
3366
3534
|
|
|
3367
3535
|
|
|
3368
|
-
var _typeof = __webpack_require__(
|
|
3536
|
+
var _typeof = __webpack_require__(20);
|
|
3369
3537
|
|
|
3370
3538
|
Object.defineProperty(exports, "__esModule", {
|
|
3371
3539
|
value: true
|
|
@@ -3432,31 +3600,31 @@ exports.deepMergeWithArrayOverrides = deepMergeWithArrayOverrides;
|
|
|
3432
3600
|
|
|
3433
3601
|
/***/ }),
|
|
3434
3602
|
|
|
3435
|
-
/***/
|
|
3603
|
+
/***/ 8:
|
|
3436
3604
|
/***/ (function(module, exports) {
|
|
3437
3605
|
|
|
3438
|
-
module.exports = require("@
|
|
3606
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
3439
3607
|
|
|
3440
3608
|
/***/ }),
|
|
3441
3609
|
|
|
3442
3610
|
/***/ 82:
|
|
3443
3611
|
/***/ (function(module, exports) {
|
|
3444
3612
|
|
|
3445
|
-
module.exports = require("@splunk/react-
|
|
3613
|
+
module.exports = require("@splunk/react-ui/Table");
|
|
3446
3614
|
|
|
3447
3615
|
/***/ }),
|
|
3448
3616
|
|
|
3449
|
-
/***/
|
|
3617
|
+
/***/ 83:
|
|
3450
3618
|
/***/ (function(module, exports) {
|
|
3451
3619
|
|
|
3452
|
-
module.exports = require("@splunk/
|
|
3620
|
+
module.exports = require("@splunk/react-sparkline/Line");
|
|
3453
3621
|
|
|
3454
3622
|
/***/ }),
|
|
3455
3623
|
|
|
3456
|
-
/***/
|
|
3624
|
+
/***/ 9:
|
|
3457
3625
|
/***/ (function(module, exports) {
|
|
3458
3626
|
|
|
3459
|
-
module.exports = require("@
|
|
3627
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
3460
3628
|
|
|
3461
3629
|
/***/ })
|
|
3462
3630
|
|