@splunk/visualizations 25.0.0 → 25.1.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_PureMap_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_custom_base_layer_tile_server.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_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_datasource_does_not_have_any_data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_viz_does_not_connect_to_datasource.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_Internal_Fields.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_Restricted_Zoom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
- package/Area.config.js +166 -152
- package/Area.config.js.map +1 -1
- package/Area.js +362 -433
- package/Area.js.map +1 -1
- package/Bar.config.js +168 -148
- package/Bar.config.js.map +1 -1
- package/Bar.js +364 -429
- package/Bar.js.map +1 -1
- package/Bubble.config.js +155 -117
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +353 -400
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +112 -82
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +336 -391
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +164 -146
- package/Column.config.js.map +1 -1
- package/Column.js +360 -427
- package/Column.js.map +1 -1
- package/Ellipse.config.js +111 -80
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +317 -371
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +117 -86
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +324 -378
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +100 -76
- package/Image.config.js.map +1 -1
- package/Image.js +725 -789
- package/Image.js.map +1 -1
- package/Line.config.js +164 -137
- package/Line.config.js.map +1 -1
- package/Line.js +360 -418
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +137 -112
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +351 -410
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +140 -97
- package/Map.config.js.map +1 -1
- package/Map.js +517 -523
- package/Map.js.map +1 -1
- package/Markdown.config.js +138 -115
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +502 -553
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +218 -195
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +2926 -3098
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +158 -133
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +319 -377
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +160 -136
- package/Pie.config.js.map +1 -1
- package/Pie.js +1316 -1492
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +164 -141
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +344 -404
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +280 -248
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +1247 -1303
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +175 -143
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +377 -426
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +156 -117
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +550 -601
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +147 -115
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +542 -598
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +19 -19
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +154 -120
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +373 -424
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +143 -111
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +612 -668
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +176 -152
- package/Table.config.js.map +1 -1
- package/Table.js +740 -797
- package/Table.js.map +1 -1
- package/common/Charting.js +11 -11
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +12 -12
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +8 -8
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +8 -8
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +51 -327
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +22 -22
- 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 +19 -19
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +4 -4
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +13 -13
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +8 -8
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +42 -18
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/hocUtils.js +6 -86
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/{JSONSchemaUtils.js → mapUtils.js} +89 -29
- package/common/utils/mapUtils.js.map +1 -0
- package/common/utils/singleValueUtils.js +14 -12
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +120 -207
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +12 -12
- package/.loki/reference/chrome_docker_PureVisualizations_SvgChoroplethDynamic_SVG_Of_Size_Greater_Than_2_MB_Render.png +0 -0
- package/common/utils/JSONSchemaUtils.js.map +0 -1
package/Markdown.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 = 210);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -109,11 +109,11 @@ module.exports = require("react");
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@
|
|
112
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
116
|
+
/***/ 106:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
119
|
module.exports = require("@splunk/react-ui/Paragraph");
|
|
@@ -123,25 +123,141 @@ module.exports = require("@splunk/react-ui/Paragraph");
|
|
|
123
123
|
/***/ 11:
|
|
124
124
|
/***/ (function(module, exports) {
|
|
125
125
|
|
|
126
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
126
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
127
127
|
|
|
128
128
|
/***/ }),
|
|
129
129
|
|
|
130
130
|
/***/ 12:
|
|
131
|
-
/***/ (function(module, exports) {
|
|
131
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
"use strict";
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
Object.defineProperty(exports, "__esModule", {
|
|
137
|
+
value: true
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
var React = __webpack_require__(1);
|
|
141
|
+
|
|
142
|
+
var styled_components_1 = __webpack_require__(4);
|
|
143
|
+
|
|
144
|
+
var SizeAwareWrapper_1 = __webpack_require__(19);
|
|
145
|
+
|
|
146
|
+
var style_1 = __webpack_require__(14);
|
|
147
|
+
|
|
148
|
+
var colorUtils_1 = __webpack_require__(11);
|
|
149
|
+
|
|
150
|
+
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
151
|
+
var width = _ref.width;
|
|
152
|
+
return {
|
|
153
|
+
style: {
|
|
154
|
+
width: style_1.toPx(width)
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}).withConfig({
|
|
158
|
+
displayName: "FixedSizeContainer__Item",
|
|
159
|
+
componentId: "sc-1yhgpod-0"
|
|
160
|
+
})(["position:relative;background-color:", "};"], function (props) {
|
|
161
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
162
|
+
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
163
|
+
|
|
164
|
+
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
165
|
+
var width = _ref2.width,
|
|
166
|
+
height = _ref2.height;
|
|
167
|
+
return {
|
|
168
|
+
style: Object.assign(Object.assign({}, width && {
|
|
169
|
+
width: style_1.toPx(width)
|
|
170
|
+
}), height && {
|
|
171
|
+
height: style_1.toPx(height)
|
|
172
|
+
})
|
|
173
|
+
};
|
|
174
|
+
}).withConfig({
|
|
175
|
+
displayName: "FixedSizeContainer__FixSizeItem",
|
|
176
|
+
componentId: "sc-1yhgpod-1"
|
|
177
|
+
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
178
|
+
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
179
|
+
});
|
|
180
|
+
var ItemContent = styled_components_1.default.div.withConfig({
|
|
181
|
+
displayName: "FixedSizeContainer__ItemContent",
|
|
182
|
+
componentId: "sc-1yhgpod-2"
|
|
183
|
+
})(["position:relative;min-height:100px;width:100%;"]);
|
|
184
|
+
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
185
|
+
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
186
|
+
componentId: "sc-1yhgpod-3"
|
|
187
|
+
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
188
|
+
|
|
189
|
+
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
190
|
+
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
191
|
+
var width = props.width,
|
|
192
|
+
height = props.height,
|
|
193
|
+
backgroundColor = props.backgroundColor;
|
|
194
|
+
|
|
195
|
+
if (!height) {
|
|
196
|
+
return React.createElement(Item, {
|
|
197
|
+
"data-test": "item",
|
|
198
|
+
width: width,
|
|
199
|
+
backgroundColor: backgroundColor
|
|
200
|
+
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return React.createElement(FixSizeItem, {
|
|
204
|
+
"data-test": "fix-size-item",
|
|
205
|
+
"data-splunk-visualization-version": "25.1.0 - 812a9a4d8",
|
|
206
|
+
width: width,
|
|
207
|
+
height: height,
|
|
208
|
+
backgroundColor: backgroundColor
|
|
209
|
+
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
210
|
+
var newWidth = _ref3.width,
|
|
211
|
+
newHeight = _ref3.height;
|
|
212
|
+
return React.createElement(Viz, Object.assign({}, props, {
|
|
213
|
+
width: newWidth,
|
|
214
|
+
height: newHeight
|
|
215
|
+
}));
|
|
216
|
+
})));
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
220
|
+
return FixedSizeContainer;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
exports.default = withFixedSizeContainer;
|
|
134
224
|
|
|
135
225
|
/***/ }),
|
|
136
226
|
|
|
137
227
|
/***/ 13:
|
|
138
|
-
/***/ (function(module, exports) {
|
|
228
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
139
229
|
|
|
140
|
-
|
|
230
|
+
"use strict";
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
Object.defineProperty(exports, "__esModule", {
|
|
234
|
+
value: true
|
|
235
|
+
});
|
|
236
|
+
exports.extendStaticWrapperProps = void 0;
|
|
237
|
+
/**
|
|
238
|
+
* @method extendStaticWrapperProps
|
|
239
|
+
* @param {Object} props
|
|
240
|
+
* @param {DashboardVizType} props.Wrapper
|
|
241
|
+
* @param {DashboardVizType} props.Visualization
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
245
|
+
var Wrapper = _ref.Wrapper,
|
|
246
|
+
Visualization = _ref.Visualization;
|
|
247
|
+
var extendProperties = ['propTypes', 'defaultProps', 'config'];
|
|
248
|
+
extendProperties.forEach(function (prop) {
|
|
249
|
+
if (Visualization[prop]) {
|
|
250
|
+
// eslint-disable-next-line no-param-reassign
|
|
251
|
+
Wrapper[prop] = Visualization[prop];
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
141
257
|
|
|
142
258
|
/***/ }),
|
|
143
259
|
|
|
144
|
-
/***/
|
|
260
|
+
/***/ 133:
|
|
145
261
|
/***/ (function(module, exports, __webpack_require__) {
|
|
146
262
|
|
|
147
263
|
"use strict";
|
|
@@ -154,15 +270,15 @@ var _templateObject;
|
|
|
154
270
|
Object.defineProperty(exports, "__esModule", {
|
|
155
271
|
value: true
|
|
156
272
|
});
|
|
157
|
-
exports.getFontMap = exports.config = exports.themes = void 0;
|
|
273
|
+
exports.getFontMap = exports.config = exports.themes = exports.computeVizProps = void 0;
|
|
158
274
|
|
|
159
|
-
var lodash_1 = __webpack_require__(
|
|
275
|
+
var lodash_1 = __webpack_require__(3);
|
|
160
276
|
|
|
161
277
|
var React = __webpack_require__(1);
|
|
162
278
|
|
|
163
|
-
var style_1 = __webpack_require__(
|
|
279
|
+
var style_1 = __webpack_require__(14);
|
|
164
280
|
|
|
165
|
-
var Markdown_1 = __webpack_require__(
|
|
281
|
+
var Markdown_1 = __webpack_require__(211);
|
|
166
282
|
|
|
167
283
|
var styled_components_1 = __webpack_require__(4);
|
|
168
284
|
|
|
@@ -170,17 +286,17 @@ var T = __webpack_require__(0);
|
|
|
170
286
|
|
|
171
287
|
var themes_1 = __webpack_require__(69);
|
|
172
288
|
|
|
173
|
-
var Heading_1 = __webpack_require__(
|
|
289
|
+
var Heading_1 = __webpack_require__(212);
|
|
174
290
|
|
|
175
|
-
var Paragraph_1 = __webpack_require__(
|
|
291
|
+
var Paragraph_1 = __webpack_require__(106);
|
|
176
292
|
|
|
177
|
-
var List_1 = __webpack_require__(
|
|
293
|
+
var List_1 = __webpack_require__(213);
|
|
178
294
|
|
|
179
|
-
var Code_1 = __webpack_require__(
|
|
295
|
+
var Code_1 = __webpack_require__(214);
|
|
180
296
|
|
|
181
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
297
|
+
var withDashboardViz_1 = __webpack_require__(31);
|
|
182
298
|
|
|
183
|
-
var config_1 = __webpack_require__(
|
|
299
|
+
var config_1 = __webpack_require__(215);
|
|
184
300
|
|
|
185
301
|
exports.config = config_1.default; // map of valid font sizes with elements' respective pixel sizes
|
|
186
302
|
|
|
@@ -359,6 +475,7 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
|
|
|
359
475
|
backgroundColor = _ref8.backgroundColor,
|
|
360
476
|
fontColor = _ref8.fontColor,
|
|
361
477
|
fontSize = _ref8.fontSize,
|
|
478
|
+
hasEventHandlers = _ref8.hasEventHandlers,
|
|
362
479
|
onMarkdownClick = _ref8.onMarkdownClick;
|
|
363
480
|
|
|
364
481
|
var _a; // because DSL evaluation is not guaranteed to return string data if `markdown` is powered by DSL, we do a typecast here
|
|
@@ -377,6 +494,10 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
|
|
|
377
494
|
}, React.createElement(Markdown_1.default, Object.assign({
|
|
378
495
|
text: stringifiedMarkdown
|
|
379
496
|
}, renderersForFontSize, {
|
|
497
|
+
style: {
|
|
498
|
+
height: '100%',
|
|
499
|
+
cursor: hasEventHandlers ? 'pointer' : 'inherit'
|
|
500
|
+
},
|
|
380
501
|
onClick: onMarkdownClick
|
|
381
502
|
})));
|
|
382
503
|
};
|
|
@@ -388,6 +509,7 @@ var propTypes = {
|
|
|
388
509
|
backgroundColor: T.string,
|
|
389
510
|
fontColor: T.string,
|
|
390
511
|
fontSize: T.string,
|
|
512
|
+
hasEventHandlers: T.bool,
|
|
391
513
|
onMarkdownClick: T.func
|
|
392
514
|
};
|
|
393
515
|
var defaultProps = {
|
|
@@ -397,13 +519,21 @@ var defaultProps = {
|
|
|
397
519
|
backgroundColor: 'transparent',
|
|
398
520
|
fontColor: 'rgba(255, 255, 255, 0.7)',
|
|
399
521
|
fontSize: 'default',
|
|
522
|
+
hasEventHandlers: false,
|
|
400
523
|
onMarkdownClick: function onMarkdownClick() {}
|
|
401
524
|
};
|
|
402
525
|
MarkdownVisualization.propTypes = propTypes;
|
|
403
526
|
MarkdownVisualization.defaultProps = defaultProps;
|
|
527
|
+
|
|
528
|
+
var computeVizProps = function computeVizProps(props) {
|
|
529
|
+
return props;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
exports.computeVizProps = computeVizProps;
|
|
404
533
|
var Markdown = withDashboardViz_1.default({
|
|
405
534
|
ReactViz: MarkdownVisualization,
|
|
406
|
-
vizConfig: config_1.default
|
|
535
|
+
vizConfig: config_1.default,
|
|
536
|
+
computeVizProps: exports.computeVizProps
|
|
407
537
|
});
|
|
408
538
|
var themes = config_1.default.themes;
|
|
409
539
|
exports.themes = themes;
|
|
@@ -412,144 +542,284 @@ exports.default = Markdown;
|
|
|
412
542
|
/***/ }),
|
|
413
543
|
|
|
414
544
|
/***/ 14:
|
|
415
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
416
|
-
|
|
417
|
-
"use strict";
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
Object.defineProperty(exports, "__esModule", {
|
|
421
|
-
value: true
|
|
422
|
-
});
|
|
423
|
-
|
|
424
|
-
var React = __webpack_require__(1);
|
|
425
|
-
|
|
426
|
-
var styled_components_1 = __webpack_require__(4);
|
|
427
|
-
|
|
428
|
-
var SizeAwareWrapper_1 = __webpack_require__(18);
|
|
429
|
-
|
|
430
|
-
var style_1 = __webpack_require__(15);
|
|
431
|
-
|
|
432
|
-
var colorUtils_1 = __webpack_require__(13);
|
|
433
|
-
|
|
434
|
-
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
435
|
-
var width = _ref.width;
|
|
436
|
-
return {
|
|
437
|
-
style: {
|
|
438
|
-
width: style_1.toPx(width)
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
}).withConfig({
|
|
442
|
-
displayName: "FixedSizeContainer__Item",
|
|
443
|
-
componentId: "sc-1yhgpod-0"
|
|
444
|
-
})(["position:relative;background-color:", "};"], function (props) {
|
|
445
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
446
|
-
}); // Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
447
|
-
|
|
448
|
-
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
449
|
-
var width = _ref2.width,
|
|
450
|
-
height = _ref2.height;
|
|
451
|
-
return {
|
|
452
|
-
style: Object.assign(Object.assign({}, width && {
|
|
453
|
-
width: style_1.toPx(width)
|
|
454
|
-
}), height && {
|
|
455
|
-
height: style_1.toPx(height)
|
|
456
|
-
})
|
|
457
|
-
};
|
|
458
|
-
}).withConfig({
|
|
459
|
-
displayName: "FixedSizeContainer__FixSizeItem",
|
|
460
|
-
componentId: "sc-1yhgpod-1"
|
|
461
|
-
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
462
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
463
|
-
});
|
|
464
|
-
var ItemContent = styled_components_1.default.div.withConfig({
|
|
465
|
-
displayName: "FixedSizeContainer__ItemContent",
|
|
466
|
-
componentId: "sc-1yhgpod-2"
|
|
467
|
-
})(["position:relative;min-height:100px;width:100%;"]);
|
|
468
|
-
var FixSizeItemContent = styled_components_1.default.div.withConfig({
|
|
469
|
-
displayName: "FixedSizeContainer__FixSizeItemContent",
|
|
470
|
-
componentId: "sc-1yhgpod-3"
|
|
471
|
-
})(["min-height:0px;flex:1;position:relative;box-sizing:border-box;"]);
|
|
472
|
-
|
|
473
|
-
var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
474
|
-
var FixedSizeContainer = function FixedSizeContainer(props) {
|
|
475
|
-
var width = props.width,
|
|
476
|
-
height = props.height,
|
|
477
|
-
backgroundColor = props.backgroundColor;
|
|
478
|
-
|
|
479
|
-
if (!height) {
|
|
480
|
-
return React.createElement(Item, {
|
|
481
|
-
"data-test": "item",
|
|
482
|
-
width: width,
|
|
483
|
-
backgroundColor: backgroundColor
|
|
484
|
-
}, React.createElement(ItemContent, null, React.createElement(Viz, Object.assign({}, props))));
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
return React.createElement(FixSizeItem, {
|
|
488
|
-
"data-test": "fix-size-item",
|
|
489
|
-
"data-splunk-visualization-version": "25.0.0 - 5e0f30e5a",
|
|
490
|
-
width: width,
|
|
491
|
-
height: height,
|
|
492
|
-
backgroundColor: backgroundColor
|
|
493
|
-
}, React.createElement(FixSizeItemContent, null, React.createElement(SizeAwareWrapper_1.default, null, function (_ref3) {
|
|
494
|
-
var newWidth = _ref3.width,
|
|
495
|
-
newHeight = _ref3.height;
|
|
496
|
-
return React.createElement(Viz, Object.assign({}, props, {
|
|
497
|
-
width: newWidth,
|
|
498
|
-
height: newHeight
|
|
499
|
-
}));
|
|
500
|
-
})));
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
FixedSizeContainer.displayName = 'withFixedSizeContainer';
|
|
504
|
-
return FixedSizeContainer;
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
exports.default = withFixedSizeContainer;
|
|
508
|
-
|
|
509
|
-
/***/ }),
|
|
510
|
-
|
|
511
|
-
/***/ 15:
|
|
512
545
|
/***/ (function(module, exports) {
|
|
513
546
|
|
|
514
547
|
module.exports = require("@splunk/visualizations-shared/style");
|
|
515
548
|
|
|
516
549
|
/***/ }),
|
|
517
550
|
|
|
518
|
-
/***/
|
|
551
|
+
/***/ 15:
|
|
519
552
|
/***/ (function(module, exports) {
|
|
520
553
|
|
|
521
554
|
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
522
555
|
|
|
523
556
|
/***/ }),
|
|
524
557
|
|
|
525
|
-
/***/
|
|
526
|
-
/***/ (function(module, exports) {
|
|
558
|
+
/***/ 16:
|
|
559
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
527
560
|
|
|
528
|
-
|
|
561
|
+
"use strict";
|
|
529
562
|
|
|
530
|
-
/***/ }),
|
|
531
563
|
|
|
532
|
-
|
|
533
|
-
/***/ (function(module, exports) {
|
|
564
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
534
565
|
|
|
535
|
-
|
|
566
|
+
var _defineProperty = __webpack_require__(6);
|
|
536
567
|
|
|
537
|
-
|
|
568
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
569
|
+
var t = {};
|
|
538
570
|
|
|
539
|
-
|
|
540
|
-
|
|
571
|
+
for (var p in s) {
|
|
572
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
573
|
+
}
|
|
541
574
|
|
|
542
|
-
|
|
575
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
576
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
577
|
+
}
|
|
578
|
+
return t;
|
|
579
|
+
};
|
|
543
580
|
|
|
544
|
-
|
|
581
|
+
Object.defineProperty(exports, "__esModule", {
|
|
582
|
+
value: true
|
|
583
|
+
});
|
|
584
|
+
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
545
585
|
|
|
546
|
-
|
|
547
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
586
|
+
var lodash_1 = __webpack_require__(3);
|
|
548
587
|
|
|
549
|
-
|
|
588
|
+
var schemaUtils_1 = __webpack_require__(15);
|
|
550
589
|
|
|
590
|
+
var VizBehavior_1 = __webpack_require__(5);
|
|
551
591
|
|
|
552
|
-
var
|
|
592
|
+
var dynamicOptionsDSLType = {
|
|
593
|
+
type: 'string',
|
|
594
|
+
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
595
|
+
};
|
|
596
|
+
/**
|
|
597
|
+
* Helper function to extend an options schema with dynamic options DSL
|
|
598
|
+
* @param optionsSchema a visualization's options schema
|
|
599
|
+
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
600
|
+
*/
|
|
601
|
+
|
|
602
|
+
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
603
|
+
var enhancedOptionsSchema = {};
|
|
604
|
+
Object.keys(optionsSchema).forEach(function (key) {
|
|
605
|
+
var _a = optionsSchema[key],
|
|
606
|
+
title = _a.title,
|
|
607
|
+
description = _a.description,
|
|
608
|
+
readOnly = _a.readOnly,
|
|
609
|
+
writeOnly = _a.writeOnly,
|
|
610
|
+
examples = _a.examples,
|
|
611
|
+
defaultValue = _a.default,
|
|
612
|
+
type = _a.type,
|
|
613
|
+
properties = _a.properties,
|
|
614
|
+
patternProperties = _a.patternProperties,
|
|
615
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
616
|
+
|
|
617
|
+
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
618
|
+
title: title
|
|
619
|
+
}), description !== undefined && {
|
|
620
|
+
description: description
|
|
621
|
+
}), readOnly !== undefined && {
|
|
622
|
+
readOnly: readOnly
|
|
623
|
+
}), writeOnly !== undefined && {
|
|
624
|
+
writeOnly: writeOnly
|
|
625
|
+
}), examples !== undefined && {
|
|
626
|
+
examples: examples
|
|
627
|
+
}), defaultValue !== undefined && {
|
|
628
|
+
default: defaultValue
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
if (type === 'object') {
|
|
632
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
633
|
+
type: type
|
|
634
|
+
}), properties && {
|
|
635
|
+
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
if (patternProperties) {
|
|
639
|
+
var enhancedPatternProperties = {};
|
|
640
|
+
Object.keys(patternProperties).forEach(function (opt) {
|
|
641
|
+
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
642
|
+
});
|
|
643
|
+
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
644
|
+
}
|
|
645
|
+
} else {
|
|
646
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
647
|
+
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
648
|
+
type: type
|
|
649
|
+
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
return enhancedOptionsSchema;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
657
|
+
/**
|
|
658
|
+
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
659
|
+
* this function also collapse all editor panels
|
|
660
|
+
* @param vizConfig a Visualization Config
|
|
661
|
+
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
662
|
+
* and containing `open: false` for all editor panels in editorConfig
|
|
663
|
+
*/
|
|
664
|
+
|
|
665
|
+
function enhanceConfig(vizConfig) {
|
|
666
|
+
var enhancedConfig = vizConfig;
|
|
667
|
+
|
|
668
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
669
|
+
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
673
|
+
return Object.assign(Object.assign({}, config), {
|
|
674
|
+
open: false
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
return enhancedConfig;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
exports.enhanceConfig = enhanceConfig;
|
|
681
|
+
/**
|
|
682
|
+
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
683
|
+
* Created for editor unit tests
|
|
684
|
+
* @param vizConfig a Visualization Config
|
|
685
|
+
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
686
|
+
*/
|
|
687
|
+
|
|
688
|
+
function uncollapseEditorConfig(vizConfig) {
|
|
689
|
+
var editorPanelUncollapsedConfig = vizConfig;
|
|
690
|
+
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
691
|
+
return Object.assign(Object.assign({}, config), {
|
|
692
|
+
open: true
|
|
693
|
+
});
|
|
694
|
+
});
|
|
695
|
+
return editorPanelUncollapsedConfig;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
699
|
+
|
|
700
|
+
function isDynamicOption(option) {
|
|
701
|
+
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
705
|
+
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
709
|
+
* if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset
|
|
710
|
+
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
711
|
+
* the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up
|
|
712
|
+
*
|
|
713
|
+
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
714
|
+
*/
|
|
715
|
+
|
|
716
|
+
function hasCompatibleContexts(vizContext, presetContext) {
|
|
717
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
718
|
+
return presetContextKeys.every(function (contextKey) {
|
|
719
|
+
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
724
|
+
*/
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
728
|
+
var presetOptionKeys = Object.keys(presetOptions);
|
|
729
|
+
return presetOptionKeys.every(function (optionKey) {
|
|
730
|
+
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
735
|
+
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
736
|
+
*
|
|
737
|
+
* @param {Object} vizContext - the current vizContext definition
|
|
738
|
+
* @param {Object} vizOptions - the current vizOptions definition
|
|
739
|
+
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
744
|
+
return presets.find(function (preset) {
|
|
745
|
+
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
746
|
+
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
747
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
748
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
749
|
+
// if not, then the preset is invalid in config.ts
|
|
750
|
+
|
|
751
|
+
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
752
|
+
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
exports.getInitialPreset = getInitialPreset;
|
|
757
|
+
/**
|
|
758
|
+
* generates number precision values for a Select editor
|
|
759
|
+
*
|
|
760
|
+
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
761
|
+
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
function generatePrecisionValues(numPrecisionValues) {
|
|
765
|
+
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
766
|
+
return {
|
|
767
|
+
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
768
|
+
value: i
|
|
769
|
+
};
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
exports.generatePrecisionValues = generatePrecisionValues;
|
|
774
|
+
/**
|
|
775
|
+
* insert layout in layout array, return a new layout array instead of updating the original
|
|
776
|
+
*
|
|
777
|
+
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
778
|
+
* @param {Number} index - the index to insert layout item(s)
|
|
779
|
+
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
780
|
+
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
781
|
+
*/
|
|
782
|
+
|
|
783
|
+
var insertLayout = function insertLayout(layout, index) {
|
|
784
|
+
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
785
|
+
layoutItems[_key - 2] = arguments[_key];
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
exports.insertLayout = insertLayout;
|
|
792
|
+
|
|
793
|
+
/***/ }),
|
|
794
|
+
|
|
795
|
+
/***/ 18:
|
|
796
|
+
/***/ (function(module, exports) {
|
|
797
|
+
|
|
798
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
799
|
+
|
|
800
|
+
/***/ }),
|
|
801
|
+
|
|
802
|
+
/***/ 19:
|
|
803
|
+
/***/ (function(module, exports) {
|
|
804
|
+
|
|
805
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
806
|
+
|
|
807
|
+
/***/ }),
|
|
808
|
+
|
|
809
|
+
/***/ 2:
|
|
810
|
+
/***/ (function(module, exports) {
|
|
811
|
+
|
|
812
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
813
|
+
|
|
814
|
+
/***/ }),
|
|
815
|
+
|
|
816
|
+
/***/ 210:
|
|
817
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
818
|
+
|
|
819
|
+
"use strict";
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
553
823
|
if (k2 === undefined) k2 = k;
|
|
554
824
|
Object.defineProperty(o, k2, {
|
|
555
825
|
enumerable: true,
|
|
@@ -573,9 +843,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
573
843
|
});
|
|
574
844
|
exports.default = void 0;
|
|
575
845
|
|
|
576
|
-
__exportStar(__webpack_require__(
|
|
846
|
+
__exportStar(__webpack_require__(133), exports);
|
|
577
847
|
|
|
578
|
-
var Markdown_1 = __webpack_require__(
|
|
848
|
+
var Markdown_1 = __webpack_require__(133);
|
|
579
849
|
|
|
580
850
|
Object.defineProperty(exports, "default", {
|
|
581
851
|
enumerable: true,
|
|
@@ -586,48 +856,41 @@ Object.defineProperty(exports, "default", {
|
|
|
586
856
|
|
|
587
857
|
/***/ }),
|
|
588
858
|
|
|
589
|
-
/***/
|
|
859
|
+
/***/ 211:
|
|
590
860
|
/***/ (function(module, exports) {
|
|
591
861
|
|
|
592
862
|
module.exports = require("@splunk/react-ui/Markdown");
|
|
593
863
|
|
|
594
864
|
/***/ }),
|
|
595
865
|
|
|
596
|
-
/***/
|
|
866
|
+
/***/ 212:
|
|
597
867
|
/***/ (function(module, exports) {
|
|
598
868
|
|
|
599
869
|
module.exports = require("@splunk/react-ui/Heading");
|
|
600
870
|
|
|
601
871
|
/***/ }),
|
|
602
872
|
|
|
603
|
-
/***/
|
|
604
|
-
/***/ (function(module, exports) {
|
|
605
|
-
|
|
606
|
-
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
607
|
-
|
|
608
|
-
/***/ }),
|
|
609
|
-
|
|
610
|
-
/***/ 210:
|
|
873
|
+
/***/ 213:
|
|
611
874
|
/***/ (function(module, exports) {
|
|
612
875
|
|
|
613
876
|
module.exports = require("@splunk/react-ui/List");
|
|
614
877
|
|
|
615
878
|
/***/ }),
|
|
616
879
|
|
|
617
|
-
/***/
|
|
880
|
+
/***/ 214:
|
|
618
881
|
/***/ (function(module, exports) {
|
|
619
882
|
|
|
620
883
|
module.exports = require("@splunk/react-ui/Code");
|
|
621
884
|
|
|
622
885
|
/***/ }),
|
|
623
886
|
|
|
624
|
-
/***/
|
|
887
|
+
/***/ 215:
|
|
625
888
|
/***/ (function(module, exports, __webpack_require__) {
|
|
626
889
|
|
|
627
890
|
"use strict";
|
|
628
891
|
|
|
629
892
|
|
|
630
|
-
var _toConsumableArray = __webpack_require__(
|
|
893
|
+
var _toConsumableArray = __webpack_require__(7);
|
|
631
894
|
|
|
632
895
|
Object.defineProperty(exports, "__esModule", {
|
|
633
896
|
value: true
|
|
@@ -635,15 +898,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
635
898
|
|
|
636
899
|
var themes_1 = __webpack_require__(69);
|
|
637
900
|
|
|
638
|
-
var i18n_1 = __webpack_require__(
|
|
901
|
+
var i18n_1 = __webpack_require__(2);
|
|
639
902
|
|
|
640
|
-
var schemaUtils_1 = __webpack_require__(
|
|
903
|
+
var schemaUtils_1 = __webpack_require__(15);
|
|
641
904
|
|
|
642
905
|
var VizBehavior_1 = __webpack_require__(5);
|
|
643
906
|
|
|
644
|
-
var VizCategory_1 = __webpack_require__(
|
|
907
|
+
var VizCategory_1 = __webpack_require__(30);
|
|
645
908
|
|
|
646
|
-
var configUtils_1 = __webpack_require__(
|
|
909
|
+
var configUtils_1 = __webpack_require__(16);
|
|
647
910
|
|
|
648
911
|
var BackgroundColor_1 = __webpack_require__(49);
|
|
649
912
|
|
|
@@ -704,7 +967,6 @@ var themes = {
|
|
|
704
967
|
};
|
|
705
968
|
var editorConfig = [{
|
|
706
969
|
label: i18n_1._('Markdown Settings'),
|
|
707
|
-
open: true,
|
|
708
970
|
layout: [[{
|
|
709
971
|
label: '',
|
|
710
972
|
option: 'markdown',
|
|
@@ -712,7 +974,6 @@ var editorConfig = [{
|
|
|
712
974
|
}]]
|
|
713
975
|
}, {
|
|
714
976
|
label: i18n_1._('General'),
|
|
715
|
-
open: true,
|
|
716
977
|
layout: [[{
|
|
717
978
|
label: i18n_1._('Font Color'),
|
|
718
979
|
option: 'fontColor',
|
|
@@ -785,48 +1046,28 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
785
1046
|
|
|
786
1047
|
/***/ }),
|
|
787
1048
|
|
|
788
|
-
/***/
|
|
1049
|
+
/***/ 22:
|
|
789
1050
|
/***/ (function(module, exports) {
|
|
790
1051
|
|
|
791
|
-
module.exports = require("@
|
|
1052
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
792
1053
|
|
|
793
1054
|
/***/ }),
|
|
794
1055
|
|
|
795
|
-
/***/
|
|
796
|
-
/***/ (function(module, exports
|
|
797
|
-
|
|
798
|
-
"use strict";
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
Object.defineProperty(exports, "__esModule", {
|
|
802
|
-
value: true
|
|
803
|
-
});
|
|
804
|
-
exports.pickFieldFromJSONSchema = void 0;
|
|
805
|
-
|
|
806
|
-
var lodash_1 = __webpack_require__(2);
|
|
1056
|
+
/***/ 24:
|
|
1057
|
+
/***/ (function(module, exports) {
|
|
807
1058
|
|
|
808
|
-
|
|
809
|
-
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
810
|
-
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
811
|
-
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
812
|
-
accum[k] = optionsSchema[k][fieldName];
|
|
813
|
-
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
814
|
-
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
1059
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
815
1060
|
|
|
816
|
-
|
|
817
|
-
accum[k] = nestedSchema;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
1061
|
+
/***/ }),
|
|
820
1062
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
};
|
|
1063
|
+
/***/ 25:
|
|
1064
|
+
/***/ (function(module, exports) {
|
|
824
1065
|
|
|
825
|
-
exports
|
|
1066
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
826
1067
|
|
|
827
1068
|
/***/ }),
|
|
828
1069
|
|
|
829
|
-
/***/
|
|
1070
|
+
/***/ 27:
|
|
830
1071
|
/***/ (function(module, exports, __webpack_require__) {
|
|
831
1072
|
|
|
832
1073
|
"use strict";
|
|
@@ -841,13 +1082,13 @@ var React = __webpack_require__(1);
|
|
|
841
1082
|
|
|
842
1083
|
var T = __webpack_require__(0);
|
|
843
1084
|
|
|
844
|
-
var lodash_1 = __webpack_require__(
|
|
1085
|
+
var lodash_1 = __webpack_require__(3);
|
|
845
1086
|
|
|
846
|
-
var i18n_1 = __webpack_require__(
|
|
1087
|
+
var i18n_1 = __webpack_require__(2);
|
|
847
1088
|
|
|
848
|
-
var Message_1 = __webpack_require__(
|
|
1089
|
+
var Message_1 = __webpack_require__(9);
|
|
849
1090
|
|
|
850
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
1091
|
+
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
851
1092
|
/**
|
|
852
1093
|
* @method shouldShowIconPlaceholder
|
|
853
1094
|
* @param {object} dataSources
|
|
@@ -918,13 +1159,13 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
|
918
1159
|
|
|
919
1160
|
/***/ }),
|
|
920
1161
|
|
|
921
|
-
/***/
|
|
1162
|
+
/***/ 28:
|
|
922
1163
|
/***/ (function(module, exports, __webpack_require__) {
|
|
923
1164
|
|
|
924
1165
|
"use strict";
|
|
925
1166
|
|
|
926
1167
|
|
|
927
|
-
var _defineProperty = __webpack_require__(
|
|
1168
|
+
var _defineProperty = __webpack_require__(6);
|
|
928
1169
|
|
|
929
1170
|
Object.defineProperty(exports, "__esModule", {
|
|
930
1171
|
value: true
|
|
@@ -933,9 +1174,9 @@ exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
|
933
1174
|
|
|
934
1175
|
var T = __webpack_require__(0);
|
|
935
1176
|
|
|
936
|
-
var lodash_1 = __webpack_require__(
|
|
1177
|
+
var lodash_1 = __webpack_require__(3);
|
|
937
1178
|
|
|
938
|
-
var DataSource_1 = __webpack_require__(
|
|
1179
|
+
var DataSource_1 = __webpack_require__(38);
|
|
939
1180
|
|
|
940
1181
|
exports.SortParamsPropTypes = T.shape({
|
|
941
1182
|
currentSortKey: T.string,
|
|
@@ -989,7 +1230,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
989
1230
|
|
|
990
1231
|
/***/ }),
|
|
991
1232
|
|
|
992
|
-
/***/
|
|
1233
|
+
/***/ 29:
|
|
993
1234
|
/***/ (function(module, exports, __webpack_require__) {
|
|
994
1235
|
|
|
995
1236
|
"use strict";
|
|
@@ -1002,7 +1243,7 @@ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
|
1002
1243
|
|
|
1003
1244
|
var T = __webpack_require__(0);
|
|
1004
1245
|
|
|
1005
|
-
var lodash_1 = __webpack_require__(
|
|
1246
|
+
var lodash_1 = __webpack_require__(3);
|
|
1006
1247
|
|
|
1007
1248
|
exports.PaginatorParamsPropTypes = T.shape({
|
|
1008
1249
|
isPaging: T.bool,
|
|
@@ -1054,10 +1295,17 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
1054
1295
|
|
|
1055
1296
|
/***/ }),
|
|
1056
1297
|
|
|
1057
|
-
/***/
|
|
1058
|
-
/***/ (function(module, exports
|
|
1298
|
+
/***/ 3:
|
|
1299
|
+
/***/ (function(module, exports) {
|
|
1059
1300
|
|
|
1060
|
-
|
|
1301
|
+
module.exports = require("lodash");
|
|
1302
|
+
|
|
1303
|
+
/***/ }),
|
|
1304
|
+
|
|
1305
|
+
/***/ 30:
|
|
1306
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1307
|
+
|
|
1308
|
+
"use strict";
|
|
1061
1309
|
|
|
1062
1310
|
|
|
1063
1311
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1083,14 +1331,7 @@ var VizCategory;
|
|
|
1083
1331
|
|
|
1084
1332
|
/***/ }),
|
|
1085
1333
|
|
|
1086
|
-
/***/
|
|
1087
|
-
/***/ (function(module, exports) {
|
|
1088
|
-
|
|
1089
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
1090
|
-
|
|
1091
|
-
/***/ }),
|
|
1092
|
-
|
|
1093
|
-
/***/ 30:
|
|
1334
|
+
/***/ 31:
|
|
1094
1335
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1095
1336
|
|
|
1096
1337
|
"use strict";
|
|
@@ -1102,39 +1343,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1102
1343
|
|
|
1103
1344
|
var React = __webpack_require__(1);
|
|
1104
1345
|
|
|
1105
|
-
var lodash_1 = __webpack_require__(
|
|
1346
|
+
var lodash_1 = __webpack_require__(3);
|
|
1106
1347
|
|
|
1107
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
1348
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(32);
|
|
1108
1349
|
|
|
1109
|
-
var Options_1 = __webpack_require__(
|
|
1350
|
+
var Options_1 = __webpack_require__(33);
|
|
1110
1351
|
|
|
1111
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
1352
|
+
var SanitizeProps_1 = __webpack_require__(34);
|
|
1112
1353
|
|
|
1113
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
1354
|
+
var TimezoneContext_1 = __webpack_require__(22);
|
|
1114
1355
|
|
|
1115
|
-
var moment_1 = __webpack_require__(
|
|
1356
|
+
var moment_1 = __webpack_require__(35);
|
|
1116
1357
|
|
|
1117
1358
|
var styled_components_1 = __webpack_require__(4);
|
|
1118
1359
|
|
|
1119
|
-
var
|
|
1360
|
+
var hocUtils_1 = __webpack_require__(24);
|
|
1120
1361
|
|
|
1121
|
-
var
|
|
1362
|
+
var JSONSchemaUtils_1 = __webpack_require__(25);
|
|
1122
1363
|
|
|
1123
|
-
var
|
|
1364
|
+
var SplunkVisualization_1 = __webpack_require__(36);
|
|
1124
1365
|
|
|
1125
|
-
var
|
|
1366
|
+
var VizBehavior_1 = __webpack_require__(5);
|
|
1126
1367
|
|
|
1127
|
-
var
|
|
1368
|
+
var getSorting_1 = __webpack_require__(28);
|
|
1128
1369
|
|
|
1129
|
-
var
|
|
1370
|
+
var getPagination_1 = __webpack_require__(29);
|
|
1130
1371
|
|
|
1131
|
-
var
|
|
1372
|
+
var useDeepMemo_1 = __webpack_require__(39);
|
|
1132
1373
|
|
|
1133
|
-
var
|
|
1374
|
+
var MissingPropsMessage_1 = __webpack_require__(40);
|
|
1134
1375
|
|
|
1135
|
-
var
|
|
1376
|
+
var withEditModeCover_1 = __webpack_require__(41);
|
|
1136
1377
|
|
|
1137
|
-
var
|
|
1378
|
+
var withPlaceholder_1 = __webpack_require__(42);
|
|
1138
1379
|
/**
|
|
1139
1380
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1140
1381
|
* @param {DashboardVizOpts} opts
|
|
@@ -1336,41 +1577,41 @@ exports.default = withDashboardViz;
|
|
|
1336
1577
|
|
|
1337
1578
|
/***/ }),
|
|
1338
1579
|
|
|
1339
|
-
/***/
|
|
1580
|
+
/***/ 32:
|
|
1340
1581
|
/***/ (function(module, exports) {
|
|
1341
1582
|
|
|
1342
1583
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1343
1584
|
|
|
1344
1585
|
/***/ }),
|
|
1345
1586
|
|
|
1346
|
-
/***/
|
|
1587
|
+
/***/ 33:
|
|
1347
1588
|
/***/ (function(module, exports) {
|
|
1348
1589
|
|
|
1349
1590
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1350
1591
|
|
|
1351
1592
|
/***/ }),
|
|
1352
1593
|
|
|
1353
|
-
/***/
|
|
1594
|
+
/***/ 34:
|
|
1354
1595
|
/***/ (function(module, exports) {
|
|
1355
1596
|
|
|
1356
1597
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1357
1598
|
|
|
1358
1599
|
/***/ }),
|
|
1359
1600
|
|
|
1360
|
-
/***/
|
|
1601
|
+
/***/ 35:
|
|
1361
1602
|
/***/ (function(module, exports) {
|
|
1362
1603
|
|
|
1363
1604
|
module.exports = require("@splunk/moment");
|
|
1364
1605
|
|
|
1365
1606
|
/***/ }),
|
|
1366
1607
|
|
|
1367
|
-
/***/
|
|
1608
|
+
/***/ 36:
|
|
1368
1609
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1369
1610
|
|
|
1370
1611
|
"use strict";
|
|
1371
1612
|
|
|
1372
1613
|
|
|
1373
|
-
var _classCallCheck = __webpack_require__(
|
|
1614
|
+
var _classCallCheck = __webpack_require__(10);
|
|
1374
1615
|
|
|
1375
1616
|
Object.defineProperty(exports, "__esModule", {
|
|
1376
1617
|
value: true
|
|
@@ -1380,9 +1621,9 @@ exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
|
1380
1621
|
|
|
1381
1622
|
var T = __webpack_require__(0);
|
|
1382
1623
|
|
|
1383
|
-
var lodash_1 = __webpack_require__(
|
|
1624
|
+
var lodash_1 = __webpack_require__(3);
|
|
1384
1625
|
|
|
1385
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1626
|
+
var VizActionHandler_1 = __webpack_require__(37); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1386
1627
|
|
|
1387
1628
|
|
|
1388
1629
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1516,15 +1757,15 @@ exports.default = SplunkVisualization;
|
|
|
1516
1757
|
|
|
1517
1758
|
/***/ }),
|
|
1518
1759
|
|
|
1519
|
-
/***/
|
|
1760
|
+
/***/ 37:
|
|
1520
1761
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1521
1762
|
|
|
1522
1763
|
"use strict";
|
|
1523
1764
|
|
|
1524
1765
|
|
|
1525
|
-
var _classCallCheck = __webpack_require__(
|
|
1766
|
+
var _classCallCheck = __webpack_require__(10);
|
|
1526
1767
|
|
|
1527
|
-
var _createClass = __webpack_require__(
|
|
1768
|
+
var _createClass = __webpack_require__(18);
|
|
1528
1769
|
|
|
1529
1770
|
Object.defineProperty(exports, "__esModule", {
|
|
1530
1771
|
value: true
|
|
@@ -1554,7 +1795,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
1554
1795
|
|
|
1555
1796
|
/***/ }),
|
|
1556
1797
|
|
|
1557
|
-
/***/
|
|
1798
|
+
/***/ 38:
|
|
1558
1799
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1559
1800
|
|
|
1560
1801
|
"use strict";
|
|
@@ -1568,7 +1809,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
1568
1809
|
|
|
1569
1810
|
/***/ }),
|
|
1570
1811
|
|
|
1571
|
-
/***/
|
|
1812
|
+
/***/ 39:
|
|
1572
1813
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1573
1814
|
|
|
1574
1815
|
"use strict";
|
|
@@ -1581,7 +1822,7 @@ exports.useDeepMemo = void 0;
|
|
|
1581
1822
|
|
|
1582
1823
|
var react_1 = __webpack_require__(1);
|
|
1583
1824
|
|
|
1584
|
-
var lodash_1 = __webpack_require__(
|
|
1825
|
+
var lodash_1 = __webpack_require__(3);
|
|
1585
1826
|
/**
|
|
1586
1827
|
* This hook evaluates and stores the result of a passed function and only
|
|
1587
1828
|
* re-evaluates the function when passed dependencies change.
|
|
@@ -1614,7 +1855,14 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
1614
1855
|
|
|
1615
1856
|
/***/ }),
|
|
1616
1857
|
|
|
1617
|
-
/***/
|
|
1858
|
+
/***/ 4:
|
|
1859
|
+
/***/ (function(module, exports) {
|
|
1860
|
+
|
|
1861
|
+
module.exports = require("styled-components");
|
|
1862
|
+
|
|
1863
|
+
/***/ }),
|
|
1864
|
+
|
|
1865
|
+
/***/ 40:
|
|
1618
1866
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1619
1867
|
|
|
1620
1868
|
"use strict";
|
|
@@ -1629,11 +1877,11 @@ var React = __webpack_require__(1);
|
|
|
1629
1877
|
|
|
1630
1878
|
var T = __webpack_require__(0);
|
|
1631
1879
|
|
|
1632
|
-
var i18n_1 = __webpack_require__(
|
|
1880
|
+
var i18n_1 = __webpack_require__(2);
|
|
1633
1881
|
|
|
1634
|
-
var Message_1 = __webpack_require__(
|
|
1882
|
+
var Message_1 = __webpack_require__(9);
|
|
1635
1883
|
|
|
1636
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
1884
|
+
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
1637
1885
|
/**
|
|
1638
1886
|
* @method isMissing
|
|
1639
1887
|
* @param {any} v
|
|
@@ -1695,14 +1943,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
1695
1943
|
|
|
1696
1944
|
/***/ }),
|
|
1697
1945
|
|
|
1698
|
-
/***/
|
|
1699
|
-
/***/ (function(module, exports) {
|
|
1700
|
-
|
|
1701
|
-
module.exports = require("styled-components");
|
|
1702
|
-
|
|
1703
|
-
/***/ }),
|
|
1704
|
-
|
|
1705
|
-
/***/ 40:
|
|
1946
|
+
/***/ 41:
|
|
1706
1947
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1707
1948
|
|
|
1708
1949
|
"use strict";
|
|
@@ -1716,14 +1957,14 @@ var React = __webpack_require__(1);
|
|
|
1716
1957
|
|
|
1717
1958
|
var styled_components_1 = __webpack_require__(4);
|
|
1718
1959
|
|
|
1719
|
-
var hocUtils_1 = __webpack_require__(
|
|
1960
|
+
var hocUtils_1 = __webpack_require__(13);
|
|
1720
1961
|
|
|
1721
1962
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1722
1963
|
displayName: "withEditModeCover__Cover",
|
|
1723
1964
|
componentId: "sc-1gsbnxb-0"
|
|
1724
1965
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1725
1966
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1726
|
-
'data-splunk-visualization-version': "25.
|
|
1967
|
+
'data-splunk-visualization-version': "25.1.0 - 812a9a4d8"
|
|
1727
1968
|
}).withConfig({
|
|
1728
1969
|
displayName: "withEditModeCover__Blocker",
|
|
1729
1970
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1755,13 +1996,6 @@ exports.default = withEditModeCover;
|
|
|
1755
1996
|
|
|
1756
1997
|
/***/ }),
|
|
1757
1998
|
|
|
1758
|
-
/***/ 41:
|
|
1759
|
-
/***/ (function(module, exports) {
|
|
1760
|
-
|
|
1761
|
-
module.exports = require("@splunk/visualizations-shared/mapUtils");
|
|
1762
|
-
|
|
1763
|
-
/***/ }),
|
|
1764
|
-
|
|
1765
1999
|
/***/ 42:
|
|
1766
2000
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1767
2001
|
|
|
@@ -1774,15 +2008,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1774
2008
|
|
|
1775
2009
|
var React = __webpack_require__(1);
|
|
1776
2010
|
|
|
1777
|
-
var colorUtils_1 = __webpack_require__(
|
|
2011
|
+
var colorUtils_1 = __webpack_require__(11);
|
|
1778
2012
|
|
|
1779
|
-
var variables_1 = __webpack_require__(
|
|
2013
|
+
var variables_1 = __webpack_require__(8);
|
|
1780
2014
|
|
|
1781
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
2015
|
+
var IconPlaceholder_1 = __webpack_require__(27);
|
|
1782
2016
|
|
|
1783
2017
|
var VizBehavior_1 = __webpack_require__(5);
|
|
1784
2018
|
|
|
1785
|
-
var hocUtils_1 = __webpack_require__(
|
|
2019
|
+
var hocUtils_1 = __webpack_require__(13);
|
|
1786
2020
|
|
|
1787
2021
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1788
2022
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -1837,7 +2071,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1837
2071
|
value: true
|
|
1838
2072
|
});
|
|
1839
2073
|
|
|
1840
|
-
var i18n_1 = __webpack_require__(
|
|
2074
|
+
var i18n_1 = __webpack_require__(2);
|
|
1841
2075
|
|
|
1842
2076
|
var background = function background(_ref) {
|
|
1843
2077
|
var label = _ref.label,
|
|
@@ -1897,214 +2131,9 @@ var VizBehavior;
|
|
|
1897
2131
|
/***/ }),
|
|
1898
2132
|
|
|
1899
2133
|
/***/ 6:
|
|
1900
|
-
/***/ (function(module, exports
|
|
1901
|
-
|
|
1902
|
-
"use strict";
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
var _toConsumableArray = __webpack_require__(9);
|
|
1906
|
-
|
|
1907
|
-
var _defineProperty = __webpack_require__(7);
|
|
1908
|
-
|
|
1909
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
1910
|
-
var t = {};
|
|
1911
|
-
|
|
1912
|
-
for (var p in s) {
|
|
1913
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1917
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
1918
|
-
}
|
|
1919
|
-
return t;
|
|
1920
|
-
};
|
|
1921
|
-
|
|
1922
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1923
|
-
value: true
|
|
1924
|
-
});
|
|
1925
|
-
exports.insertLayout = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
1926
|
-
|
|
1927
|
-
var lodash_1 = __webpack_require__(2);
|
|
1928
|
-
|
|
1929
|
-
var schemaUtils_1 = __webpack_require__(16);
|
|
1930
|
-
|
|
1931
|
-
var VizBehavior_1 = __webpack_require__(5);
|
|
1932
|
-
|
|
1933
|
-
var dynamicOptionsDSLType = {
|
|
1934
|
-
type: 'string',
|
|
1935
|
-
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
1936
|
-
};
|
|
1937
|
-
/**
|
|
1938
|
-
* Helper function to extend an options schema with dynamic options DSL
|
|
1939
|
-
* @param optionsSchema a visualization's options schema
|
|
1940
|
-
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
1941
|
-
*/
|
|
1942
|
-
|
|
1943
|
-
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
1944
|
-
var enhancedOptionsSchema = {};
|
|
1945
|
-
Object.keys(optionsSchema).forEach(function (key) {
|
|
1946
|
-
var _a = optionsSchema[key],
|
|
1947
|
-
title = _a.title,
|
|
1948
|
-
description = _a.description,
|
|
1949
|
-
readOnly = _a.readOnly,
|
|
1950
|
-
writeOnly = _a.writeOnly,
|
|
1951
|
-
examples = _a.examples,
|
|
1952
|
-
defaultValue = _a.default,
|
|
1953
|
-
type = _a.type,
|
|
1954
|
-
properties = _a.properties,
|
|
1955
|
-
patternProperties = _a.patternProperties,
|
|
1956
|
-
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
1957
|
-
|
|
1958
|
-
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
1959
|
-
title: title
|
|
1960
|
-
}), description !== undefined && {
|
|
1961
|
-
description: description
|
|
1962
|
-
}), readOnly !== undefined && {
|
|
1963
|
-
readOnly: readOnly
|
|
1964
|
-
}), writeOnly !== undefined && {
|
|
1965
|
-
writeOnly: writeOnly
|
|
1966
|
-
}), examples !== undefined && {
|
|
1967
|
-
examples: examples
|
|
1968
|
-
}), defaultValue !== undefined && {
|
|
1969
|
-
default: defaultValue
|
|
1970
|
-
});
|
|
1971
|
-
|
|
1972
|
-
if (type === 'object') {
|
|
1973
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
1974
|
-
type: type
|
|
1975
|
-
}), properties && {
|
|
1976
|
-
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
1977
|
-
});
|
|
1978
|
-
|
|
1979
|
-
if (patternProperties) {
|
|
1980
|
-
var enhancedPatternProperties = {};
|
|
1981
|
-
Object.keys(patternProperties).forEach(function (opt) {
|
|
1982
|
-
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
1983
|
-
});
|
|
1984
|
-
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
1985
|
-
}
|
|
1986
|
-
} else {
|
|
1987
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
1988
|
-
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
1989
|
-
type: type
|
|
1990
|
-
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
1991
|
-
});
|
|
1992
|
-
}
|
|
1993
|
-
});
|
|
1994
|
-
return enhancedOptionsSchema;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
1998
|
-
/**
|
|
1999
|
-
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
2000
|
-
* @param vizConfig a Visualization Config
|
|
2001
|
-
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
2002
|
-
*/
|
|
2003
|
-
|
|
2004
|
-
function enhanceConfig(vizConfig) {
|
|
2005
|
-
var enhancedConfig = vizConfig;
|
|
2006
|
-
|
|
2007
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
2008
|
-
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
return enhancedConfig;
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
exports.enhanceConfig = enhanceConfig;
|
|
2015
|
-
|
|
2016
|
-
function isDynamicOption(option) {
|
|
2017
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
2021
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
2025
|
-
* if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset
|
|
2026
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
2027
|
-
* the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up
|
|
2028
|
-
*
|
|
2029
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
2030
|
-
*/
|
|
2031
|
-
|
|
2032
|
-
function hasCompatibleContexts(vizContext, presetContext) {
|
|
2033
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
2034
|
-
return presetContextKeys.every(function (contextKey) {
|
|
2035
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
2036
|
-
});
|
|
2037
|
-
}
|
|
2038
|
-
/**
|
|
2039
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
2040
|
-
*/
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
2044
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
2045
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
2046
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
/**
|
|
2050
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
2051
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
2052
|
-
*
|
|
2053
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
2054
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
2055
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
2056
|
-
*/
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
2060
|
-
return presets.find(function (preset) {
|
|
2061
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
2062
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
2063
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
2064
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
2065
|
-
// if not, then the preset is invalid in config.ts
|
|
2066
|
-
|
|
2067
|
-
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
2068
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
2069
|
-
});
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
exports.getInitialPreset = getInitialPreset;
|
|
2073
|
-
/**
|
|
2074
|
-
* generates number precision values for a Select editor
|
|
2075
|
-
*
|
|
2076
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
2077
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
2078
|
-
*/
|
|
2079
|
-
|
|
2080
|
-
function generatePrecisionValues(numPrecisionValues) {
|
|
2081
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
2082
|
-
return {
|
|
2083
|
-
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
2084
|
-
value: i
|
|
2085
|
-
};
|
|
2086
|
-
});
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
exports.generatePrecisionValues = generatePrecisionValues;
|
|
2090
|
-
/**
|
|
2091
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
2092
|
-
*
|
|
2093
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
2094
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
2095
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
2096
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
2097
|
-
*/
|
|
2098
|
-
|
|
2099
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
2100
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
2101
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
2105
|
-
};
|
|
2134
|
+
/***/ (function(module, exports) {
|
|
2106
2135
|
|
|
2107
|
-
exports
|
|
2136
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
2108
2137
|
|
|
2109
2138
|
/***/ }),
|
|
2110
2139
|
|
|
@@ -2118,94 +2147,14 @@ module.exports = require("@splunk/themes");
|
|
|
2118
2147
|
/***/ 7:
|
|
2119
2148
|
/***/ (function(module, exports) {
|
|
2120
2149
|
|
|
2121
|
-
module.exports = require("@babel/runtime/helpers/
|
|
2150
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
2122
2151
|
|
|
2123
2152
|
/***/ }),
|
|
2124
2153
|
|
|
2125
2154
|
/***/ 8:
|
|
2126
|
-
/***/ (function(module, exports
|
|
2127
|
-
|
|
2128
|
-
"use strict";
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
var _typeof = __webpack_require__(23);
|
|
2132
|
-
|
|
2133
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2134
|
-
value: true
|
|
2135
|
-
});
|
|
2136
|
-
exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
|
|
2137
|
-
|
|
2138
|
-
var lodash_1 = __webpack_require__(2);
|
|
2139
|
-
|
|
2140
|
-
var mapUtils_1 = __webpack_require__(41);
|
|
2141
|
-
/**
|
|
2142
|
-
* @method extendStaticWrapperProps
|
|
2143
|
-
* @param {Object} props
|
|
2144
|
-
* @param {DashboardVizType} props.Wrapper
|
|
2145
|
-
* @param {DashboardVizType} props.Visualization
|
|
2146
|
-
*/
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
2150
|
-
var Wrapper = _ref.Wrapper,
|
|
2151
|
-
Visualization = _ref.Visualization;
|
|
2152
|
-
var extendProperties = ['propTypes', 'defaultProps', 'config'];
|
|
2153
|
-
extendProperties.forEach(function (prop) {
|
|
2154
|
-
if (Visualization[prop]) {
|
|
2155
|
-
// eslint-disable-next-line no-param-reassign
|
|
2156
|
-
Wrapper[prop] = Visualization[prop];
|
|
2157
|
-
}
|
|
2158
|
-
});
|
|
2159
|
-
};
|
|
2160
|
-
|
|
2161
|
-
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
2162
|
-
/**
|
|
2163
|
-
* helper to deeply merge objects while preserving arrays in earlier source objects
|
|
2164
|
-
* deeply nested primitive keys are merged similarly to lodash's defaultsDeep, while keys with arrays of primitives will be preserved if already present in the resultant merged object
|
|
2165
|
-
* this prevents default arrays of primitives from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one).
|
|
2166
|
-
* Array of objects gets merged with the defaults, where the defaults can be an array of objects. Closest matching default object from the defaults list based on key - value pair
|
|
2167
|
-
* will be used for merging defaults for each object in the array. If no closest match found, first object in default array list used for merging.
|
|
2168
|
-
*
|
|
2169
|
-
* @method deepMergeWithArrayPrimitiveOverrides
|
|
2170
|
-
* @param {Object} initial - target object to merge values into
|
|
2171
|
-
* @param {Object[]} sources - other default options to be merged into the resultant object if no explicit value is provided, with earlier args taking precedence over later ones
|
|
2172
|
-
*
|
|
2173
|
-
* @returns {Object}
|
|
2174
|
-
*/
|
|
2175
|
-
|
|
2176
|
-
var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
|
|
2177
|
-
var clone = lodash_1.cloneDeep(initial);
|
|
2178
|
-
|
|
2179
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2180
|
-
sources[_key - 1] = arguments[_key];
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
sources.forEach(function (sourceToApply) {
|
|
2184
|
-
Object.keys(sourceToApply).forEach(function (sourceKey) {
|
|
2185
|
-
if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
|
|
2186
|
-
clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
|
|
2190
|
-
clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
|
|
2191
|
-
} else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
|
|
2192
|
-
// If option is an array of objects
|
|
2193
|
-
for (var i = 0; i < clone[sourceKey].length; i += 1) {
|
|
2194
|
-
if (_typeof(clone[sourceKey][i]) === 'object') {
|
|
2195
|
-
var closestMatchIdx = mapUtils_1.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
|
|
2196
|
-
|
|
2197
|
-
if (closestMatchIdx > -1) {
|
|
2198
|
-
clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
});
|
|
2204
|
-
});
|
|
2205
|
-
return clone;
|
|
2206
|
-
};
|
|
2155
|
+
/***/ (function(module, exports) {
|
|
2207
2156
|
|
|
2208
|
-
exports
|
|
2157
|
+
module.exports = require("@splunk/themes/variables");
|
|
2209
2158
|
|
|
2210
2159
|
/***/ }),
|
|
2211
2160
|
|
|
@@ -2219,7 +2168,7 @@ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
|
2219
2168
|
/***/ 9:
|
|
2220
2169
|
/***/ (function(module, exports) {
|
|
2221
2170
|
|
|
2222
|
-
module.exports = require("@
|
|
2171
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
2223
2172
|
|
|
2224
2173
|
/***/ })
|
|
2225
2174
|
|