@splunk/visualizations 24.4.0 → 24.5.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_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_Choropleth_Svg_Choropleth_Svg_Placeholder_If_No_Svg_And_No_Data.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_Mostly_null.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_Markdown_Markdown_Background_Color_af575a.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Basic_Markdown.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Begin_with_Text_Instead_of_Header.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Color_purple.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_extraLarge.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Placeholder_if_empty_columns_and_fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Placeholder_if_invalid_label_data_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Placeholder_if_invalid_value_data_specified.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Placeholder_if_missing_column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Use_Time_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Use_Time_Type_Series_Data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Cell_Types.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_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_Sparklines_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Time_Zone_Time_Formatting.png +0 -0
- package/Area.js +246 -218
- package/Area.js.map +1 -1
- package/Bar.js +238 -210
- package/Bar.js.map +1 -1
- package/Bubble.js +231 -203
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.js +230 -197
- package/ChoroplethSvg.js.map +1 -1
- package/Column.js +238 -210
- package/Column.js.map +1 -1
- package/Ellipse.js +203 -170
- package/Ellipse.js.map +1 -1
- package/FillerGauge.js +222 -189
- package/FillerGauge.js.map +1 -1
- package/Image.js +199 -164
- package/Image.js.map +1 -1
- package/Line.js +239 -211
- package/Line.js.map +1 -1
- package/LinkGraph.js +264 -223
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +39 -25
- package/Map.config.js.map +1 -1
- package/Map.js +469 -327
- package/Map.js.map +1 -1
- package/Markdown.config.js +29 -1
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +513 -267
- package/Markdown.js.map +1 -1
- package/MarkerGauge.js +941 -906
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.js +230 -196
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.js +309 -249
- package/Pie.js.map +1 -1
- package/Punchcard.js +263 -229
- package/Punchcard.js.map +1 -1
- package/Rectangle.js +217 -182
- package/Rectangle.js.map +1 -1
- package/Sankey.js +269 -230
- package/Sankey.js.map +1 -1
- package/Scatter.js +314 -286
- package/Scatter.js.map +1 -1
- package/SingleValue.js +398 -363
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +25 -25
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.js +2821 -2653
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +359 -324
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +2 -1
- package/Table.config.js.map +1 -1
- package/Table.js +623 -347
- package/Table.js.map +1 -1
- package/common/Charting.js +21 -21
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +18 -18
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +10 -10
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +10 -10
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +217 -174
- package/common/OptionsDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/ThemesDoc.js +26 -26
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +3 -3
- package/common/chartingUtils.js.map +1 -1
- package/common/gaugeUtils.js +2 -2
- package/common/shapeUtils.js +2 -2
- package/common/withDashboardViz.js +80 -48
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +13 -11
package/Markdown.js
CHANGED
|
@@ -113,117 +113,24 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
116
|
+
/***/ 103:
|
|
117
117
|
/***/ (function(module, exports) {
|
|
118
118
|
|
|
119
|
-
module.exports = require("@splunk/
|
|
119
|
+
module.exports = require("@splunk/react-ui/Paragraph");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
123
|
-
/***/
|
|
123
|
+
/***/ 11:
|
|
124
124
|
/***/ (function(module, exports) {
|
|
125
125
|
|
|
126
|
-
module.exports = require("@splunk/
|
|
126
|
+
module.exports = require("@splunk/themes/variables");
|
|
127
127
|
|
|
128
128
|
/***/ }),
|
|
129
129
|
|
|
130
|
-
/***/
|
|
131
|
-
/***/ (function(module, exports
|
|
132
|
-
|
|
133
|
-
"use strict";
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
Object.defineProperty(exports, "__esModule", {
|
|
137
|
-
value: true
|
|
138
|
-
});
|
|
139
|
-
exports.config = exports.themes = void 0;
|
|
140
|
-
|
|
141
|
-
var lodash_1 = __webpack_require__(2);
|
|
142
|
-
|
|
143
|
-
var React = __webpack_require__(1);
|
|
144
|
-
|
|
145
|
-
var style_1 = __webpack_require__(14);
|
|
146
|
-
|
|
147
|
-
var Markdown_1 = __webpack_require__(206);
|
|
148
|
-
|
|
149
|
-
var styled_components_1 = __webpack_require__(4);
|
|
150
|
-
|
|
151
|
-
var T = __webpack_require__(0);
|
|
152
|
-
|
|
153
|
-
var config_1 = __webpack_require__(207);
|
|
154
|
-
|
|
155
|
-
exports.config = config_1.default;
|
|
156
|
-
|
|
157
|
-
var withDashboardViz_1 = __webpack_require__(28); // startsWithHeader is a prop that can be
|
|
158
|
-
// falsy if the markdown text begins with text
|
|
159
|
-
// or the number of heading level;
|
|
160
|
-
// casting heading level below 4 to 4
|
|
161
|
-
// because ReactMarkdown supports heading level 1-4
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var Container = styled_components_1.default.div.withConfig({
|
|
165
|
-
displayName: "Markdown__Container",
|
|
166
|
-
componentId: "zd3qkg-0"
|
|
167
|
-
})(["overflow:auto;position:relative;box-sizing:border-box;", ";", ";background-color:", ";& *:not(code):not(pre):not(code *):not(a){color:", ";}", ";"], function (props) {
|
|
168
|
-
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
169
|
-
}, function (props) {
|
|
170
|
-
return style_1.toPadding(props.padding);
|
|
171
|
-
}, function (props) {
|
|
172
|
-
return props.backgroundColor;
|
|
173
|
-
}, function (props) {
|
|
174
|
-
return props.fontColor;
|
|
175
|
-
}, function (_ref) {
|
|
176
|
-
var startsWithHeader = _ref.startsWithHeader;
|
|
177
|
-
return startsWithHeader && "\n h".concat(startsWithHeader >= 4 ? 4 : startsWithHeader, ":first-of-type { \n margin-top: 0px;\n }\n ");
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
var MarkdownVisualization = function MarkdownVisualization(_ref2) {
|
|
181
|
-
var height = _ref2.height,
|
|
182
|
-
width = _ref2.width,
|
|
183
|
-
markdown = _ref2.markdown,
|
|
184
|
-
backgroundColor = _ref2.backgroundColor,
|
|
185
|
-
fontColor = _ref2.fontColor;
|
|
186
|
-
|
|
187
|
-
var _a; // because DSL evaluation is not guaranteed to return string data if `markdown` is powered by DSL, we do a typecast here
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
var stringifiedMarkdown = "".concat(markdown);
|
|
191
|
-
return React.createElement(Container, {
|
|
192
|
-
"data-testid": "markdown-container",
|
|
193
|
-
padding: [5, 5, 5, 5],
|
|
194
|
-
width: width,
|
|
195
|
-
height: height,
|
|
196
|
-
backgroundColor: backgroundColor,
|
|
197
|
-
fontColor: fontColor,
|
|
198
|
-
startsWithHeader: (_a = stringifiedMarkdown.trim().match(/^#+/)) === null || _a === void 0 ? void 0 : _a[0].length
|
|
199
|
-
}, React.createElement(Markdown_1.default, {
|
|
200
|
-
text: stringifiedMarkdown
|
|
201
|
-
}));
|
|
202
|
-
};
|
|
130
|
+
/***/ 12:
|
|
131
|
+
/***/ (function(module, exports) {
|
|
203
132
|
|
|
204
|
-
|
|
205
|
-
width: T.oneOfType([T.string, T.number]),
|
|
206
|
-
height: T.oneOfType([T.string, T.number]),
|
|
207
|
-
markdown: T.string,
|
|
208
|
-
backgroundColor: T.string,
|
|
209
|
-
fontColor: T.string
|
|
210
|
-
};
|
|
211
|
-
var defaultProps = {
|
|
212
|
-
width: '100%',
|
|
213
|
-
height: undefined,
|
|
214
|
-
markdown: '',
|
|
215
|
-
backgroundColor: 'transparent',
|
|
216
|
-
fontColor: 'rgba(255, 255, 255, 0.7)'
|
|
217
|
-
};
|
|
218
|
-
MarkdownVisualization.propTypes = propTypes;
|
|
219
|
-
MarkdownVisualization.defaultProps = defaultProps;
|
|
220
|
-
var Markdown = withDashboardViz_1.default({
|
|
221
|
-
ReactViz: MarkdownVisualization,
|
|
222
|
-
vizConfig: config_1.default
|
|
223
|
-
});
|
|
224
|
-
var themes = config_1.default.themes;
|
|
225
|
-
exports.themes = themes;
|
|
226
|
-
exports.default = Markdown;
|
|
133
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
227
134
|
|
|
228
135
|
/***/ }),
|
|
229
136
|
|
|
@@ -302,7 +209,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
302
209
|
|
|
303
210
|
return React.createElement(FixSizeItem, {
|
|
304
211
|
"data-test": "fix-size-item",
|
|
305
|
-
"data-splunk-visualization-version": "24.
|
|
212
|
+
"data-splunk-visualization-version": "24.5.0 - b75bfbe79",
|
|
306
213
|
width: width,
|
|
307
214
|
height: height,
|
|
308
215
|
backgroundColor: backgroundColor
|
|
@@ -324,6 +231,254 @@ exports.default = withFixedSizeContainer;
|
|
|
324
231
|
|
|
325
232
|
/***/ }),
|
|
326
233
|
|
|
234
|
+
/***/ 130:
|
|
235
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
236
|
+
|
|
237
|
+
"use strict";
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
var _taggedTemplateLiteral = __webpack_require__(77);
|
|
241
|
+
|
|
242
|
+
var _templateObject;
|
|
243
|
+
|
|
244
|
+
Object.defineProperty(exports, "__esModule", {
|
|
245
|
+
value: true
|
|
246
|
+
});
|
|
247
|
+
exports.getFontMap = exports.config = exports.themes = void 0;
|
|
248
|
+
|
|
249
|
+
var lodash_1 = __webpack_require__(2);
|
|
250
|
+
|
|
251
|
+
var React = __webpack_require__(1);
|
|
252
|
+
|
|
253
|
+
var style_1 = __webpack_require__(14);
|
|
254
|
+
|
|
255
|
+
var Markdown_1 = __webpack_require__(206);
|
|
256
|
+
|
|
257
|
+
var styled_components_1 = __webpack_require__(4);
|
|
258
|
+
|
|
259
|
+
var T = __webpack_require__(0);
|
|
260
|
+
|
|
261
|
+
var themes_1 = __webpack_require__(65);
|
|
262
|
+
|
|
263
|
+
var Heading_1 = __webpack_require__(207);
|
|
264
|
+
|
|
265
|
+
var Paragraph_1 = __webpack_require__(103);
|
|
266
|
+
|
|
267
|
+
var List_1 = __webpack_require__(208);
|
|
268
|
+
|
|
269
|
+
var Code_1 = __webpack_require__(209);
|
|
270
|
+
|
|
271
|
+
var withDashboardViz_1 = __webpack_require__(29);
|
|
272
|
+
|
|
273
|
+
var config_1 = __webpack_require__(210);
|
|
274
|
+
|
|
275
|
+
exports.config = config_1.default; // map of valid font sizes with elements' respective pixel sizes
|
|
276
|
+
|
|
277
|
+
var FONT_SIZES = {
|
|
278
|
+
extraSmall: {
|
|
279
|
+
h1: 18,
|
|
280
|
+
h2: 14,
|
|
281
|
+
h3: 12,
|
|
282
|
+
p: 10
|
|
283
|
+
},
|
|
284
|
+
small: {
|
|
285
|
+
h1: 20,
|
|
286
|
+
h2: 16,
|
|
287
|
+
h3: 14,
|
|
288
|
+
p: 12
|
|
289
|
+
},
|
|
290
|
+
default: {
|
|
291
|
+
h1: 24,
|
|
292
|
+
h2: 18,
|
|
293
|
+
h3: 16,
|
|
294
|
+
p: 14
|
|
295
|
+
},
|
|
296
|
+
large: {
|
|
297
|
+
h1: 32,
|
|
298
|
+
h2: 24,
|
|
299
|
+
h3: 18,
|
|
300
|
+
p: 16
|
|
301
|
+
},
|
|
302
|
+
extraLarge: {
|
|
303
|
+
h1: 48,
|
|
304
|
+
h2: 32,
|
|
305
|
+
h3: 24,
|
|
306
|
+
p: 18
|
|
307
|
+
}
|
|
308
|
+
}; // startsWithHeader is a prop that can be
|
|
309
|
+
// falsy if the markdown text begins with text
|
|
310
|
+
// or the number of heading level;
|
|
311
|
+
// casting heading level below 4 to 4
|
|
312
|
+
// because ReactMarkdown supports heading level 1-4
|
|
313
|
+
|
|
314
|
+
var MarkdownContainer = styled_components_1.default.div.withConfig({
|
|
315
|
+
displayName: "Markdown__MarkdownContainer",
|
|
316
|
+
componentId: "zd3qkg-0"
|
|
317
|
+
})(["overflow:auto;position:relative;box-sizing:border-box;", ";", ";background-color:", ";& *:not(code):not(pre):not(code *):not(a){color:", ";}", ";"], function (props) {
|
|
318
|
+
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
319
|
+
}, function (props) {
|
|
320
|
+
return style_1.toPadding(props.padding);
|
|
321
|
+
}, function (props) {
|
|
322
|
+
return props.backgroundColor;
|
|
323
|
+
}, function (props) {
|
|
324
|
+
return props.fontColor;
|
|
325
|
+
}, function (_ref) {
|
|
326
|
+
var startsWithHeader = _ref.startsWithHeader;
|
|
327
|
+
return startsWithHeader && "\n h".concat(startsWithHeader >= 4 ? 4 : startsWithHeader, ":first-of-type { \n margin-top: 0px;\n }\n ");
|
|
328
|
+
});
|
|
329
|
+
var CodeBlockContainer = styled_components_1.default.div.withConfig({
|
|
330
|
+
displayName: "Markdown__CodeBlockContainer",
|
|
331
|
+
componentId: "zd3qkg-1"
|
|
332
|
+
})(["padding:", ";margin:", " 0;background-color:", ";pre[data-test='code']{margin-bottom:0px;}code{font-size:", "px !important;}"], themes_1.pick({
|
|
333
|
+
enterprise: themes_1.variables.spacingHalf,
|
|
334
|
+
prisma: styled_components_1.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["10px ", ""])), themes_1.variables.spacingLarge)
|
|
335
|
+
}), themes_1.pick({
|
|
336
|
+
enterprise: themes_1.variables.spacingHalf,
|
|
337
|
+
prisma: themes_1.variables.spacingLarge
|
|
338
|
+
}), themes_1.pick({
|
|
339
|
+
enterprise: {
|
|
340
|
+
light: themes_1.variables.gray96,
|
|
341
|
+
dark: themes_1.variables.gray22
|
|
342
|
+
},
|
|
343
|
+
prisma: themes_1.variables.backgroundColorSection
|
|
344
|
+
}), function (props) {
|
|
345
|
+
return props.fontSize;
|
|
346
|
+
});
|
|
347
|
+
var CodeInlineContainer = styled_components_1.default.code.withConfig({
|
|
348
|
+
displayName: "Markdown__CodeInlineContainer",
|
|
349
|
+
componentId: "zd3qkg-2"
|
|
350
|
+
})(["", ";font-family:", ";background-color:", ";"], themes_1.mixins.reset('inline'), themes_1.variables.monoFontFamily, themes_1.pick({
|
|
351
|
+
enterprise: {
|
|
352
|
+
light: themes_1.variables.gray92,
|
|
353
|
+
dark: themes_1.variables.gray22
|
|
354
|
+
},
|
|
355
|
+
prisma: themes_1.variables.neutral200
|
|
356
|
+
})); // retrieves the font map associated with a valid `fontSize` value. If the fontSize
|
|
357
|
+
// passed is invalid (does not exist in FONT_SIZES), the `default` value is used.
|
|
358
|
+
|
|
359
|
+
var getFontMap = function getFontMap(fontSize) {
|
|
360
|
+
var font = fontSize;
|
|
361
|
+
|
|
362
|
+
if (!FONT_SIZES[fontSize]) {
|
|
363
|
+
console.error("'".concat(fontSize, "' is not a valid value for Markdown's fontSize option. Using the 'default' font size."));
|
|
364
|
+
font = 'default';
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return FONT_SIZES[font];
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
exports.getFontMap = getFontMap; // returns renderers customized with the appropriate font sizes given the provided `fontSize` value.
|
|
371
|
+
|
|
372
|
+
var getMarkdownRenderer = function getMarkdownRenderer(fontSize) {
|
|
373
|
+
/* eslint-disable react/display-name, react/prop-types */
|
|
374
|
+
var fontMap = getFontMap(fontSize);
|
|
375
|
+
return {
|
|
376
|
+
paragraphRenderer: function paragraphRenderer(_ref2) {
|
|
377
|
+
var children = _ref2.children;
|
|
378
|
+
return React.createElement(Paragraph_1.default, {
|
|
379
|
+
style: {
|
|
380
|
+
fontSize: fontMap.p
|
|
381
|
+
}
|
|
382
|
+
}, children);
|
|
383
|
+
},
|
|
384
|
+
headingRenderer: function headingRenderer(_ref3) {
|
|
385
|
+
var children = _ref3.children,
|
|
386
|
+
level = _ref3.level;
|
|
387
|
+
return React.createElement(Heading_1.default, {
|
|
388
|
+
level: level,
|
|
389
|
+
style: {
|
|
390
|
+
fontSize: fontMap["h".concat(level)],
|
|
391
|
+
lineHeight: "".concat(fontMap["h".concat(level)], "px")
|
|
392
|
+
}
|
|
393
|
+
}, children);
|
|
394
|
+
},
|
|
395
|
+
itemRenderer: function itemRenderer(_ref4) {
|
|
396
|
+
var children = _ref4.children,
|
|
397
|
+
nodeKey = _ref4.nodeKey;
|
|
398
|
+
return React.createElement(List_1.default.Item, {
|
|
399
|
+
style: {
|
|
400
|
+
fontSize: fontMap.p
|
|
401
|
+
},
|
|
402
|
+
key: nodeKey
|
|
403
|
+
}, children);
|
|
404
|
+
},
|
|
405
|
+
codeBlockRenderer: function codeBlockRenderer(_ref5) {
|
|
406
|
+
var language = _ref5.language,
|
|
407
|
+
literal = _ref5.literal,
|
|
408
|
+
nodeKey = _ref5.nodeKey;
|
|
409
|
+
return React.createElement(CodeBlockContainer, {
|
|
410
|
+
fontSize: fontMap.p
|
|
411
|
+
}, React.createElement(Code_1.default, {
|
|
412
|
+
value: literal,
|
|
413
|
+
language: language,
|
|
414
|
+
key: nodeKey
|
|
415
|
+
}));
|
|
416
|
+
},
|
|
417
|
+
codeRenderer: function codeRenderer(_ref6) {
|
|
418
|
+
var literal = _ref6.literal;
|
|
419
|
+
return React.createElement(CodeInlineContainer, {
|
|
420
|
+
style: {
|
|
421
|
+
fontSize: fontMap.p
|
|
422
|
+
}
|
|
423
|
+
}, literal);
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
var MarkdownVisualization = function MarkdownVisualization(_ref7) {
|
|
429
|
+
var height = _ref7.height,
|
|
430
|
+
width = _ref7.width,
|
|
431
|
+
markdown = _ref7.markdown,
|
|
432
|
+
backgroundColor = _ref7.backgroundColor,
|
|
433
|
+
fontColor = _ref7.fontColor,
|
|
434
|
+
fontSize = _ref7.fontSize;
|
|
435
|
+
|
|
436
|
+
var _a; // because DSL evaluation is not guaranteed to return string data if `markdown` is powered by DSL, we do a typecast here
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
var stringifiedMarkdown = "".concat(markdown);
|
|
440
|
+
var renderersForFontSize = getMarkdownRenderer(fontSize);
|
|
441
|
+
return React.createElement(MarkdownContainer, {
|
|
442
|
+
"data-testid": "markdown-container",
|
|
443
|
+
padding: [5, 5, 5, 5],
|
|
444
|
+
width: width,
|
|
445
|
+
height: height,
|
|
446
|
+
backgroundColor: backgroundColor,
|
|
447
|
+
fontColor: fontColor,
|
|
448
|
+
startsWithHeader: (_a = stringifiedMarkdown.trim().match(/^#+/)) === null || _a === void 0 ? void 0 : _a[0].length
|
|
449
|
+
}, React.createElement(Markdown_1.default, Object.assign({
|
|
450
|
+
text: stringifiedMarkdown
|
|
451
|
+
}, renderersForFontSize)));
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
var propTypes = {
|
|
455
|
+
width: T.oneOfType([T.string, T.number]),
|
|
456
|
+
height: T.oneOfType([T.string, T.number]),
|
|
457
|
+
markdown: T.string,
|
|
458
|
+
backgroundColor: T.string,
|
|
459
|
+
fontColor: T.string,
|
|
460
|
+
fontSize: T.string
|
|
461
|
+
};
|
|
462
|
+
var defaultProps = {
|
|
463
|
+
width: '100%',
|
|
464
|
+
height: undefined,
|
|
465
|
+
markdown: '',
|
|
466
|
+
backgroundColor: 'transparent',
|
|
467
|
+
fontColor: 'rgba(255, 255, 255, 0.7)',
|
|
468
|
+
fontSize: 'default'
|
|
469
|
+
};
|
|
470
|
+
MarkdownVisualization.propTypes = propTypes;
|
|
471
|
+
MarkdownVisualization.defaultProps = defaultProps;
|
|
472
|
+
var Markdown = withDashboardViz_1.default({
|
|
473
|
+
ReactViz: MarkdownVisualization,
|
|
474
|
+
vizConfig: config_1.default
|
|
475
|
+
});
|
|
476
|
+
var themes = config_1.default.themes;
|
|
477
|
+
exports.themes = themes;
|
|
478
|
+
exports.default = Markdown;
|
|
479
|
+
|
|
480
|
+
/***/ }),
|
|
481
|
+
|
|
327
482
|
/***/ 14:
|
|
328
483
|
/***/ (function(module, exports) {
|
|
329
484
|
|
|
@@ -352,17 +507,17 @@ module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
|
352
507
|
|
|
353
508
|
/***/ }),
|
|
354
509
|
|
|
355
|
-
/***/
|
|
510
|
+
/***/ 19:
|
|
356
511
|
/***/ (function(module, exports) {
|
|
357
512
|
|
|
358
|
-
module.exports = require("
|
|
513
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
359
514
|
|
|
360
515
|
/***/ }),
|
|
361
516
|
|
|
362
|
-
/***/
|
|
517
|
+
/***/ 2:
|
|
363
518
|
/***/ (function(module, exports) {
|
|
364
519
|
|
|
365
|
-
module.exports = require("
|
|
520
|
+
module.exports = require("lodash");
|
|
366
521
|
|
|
367
522
|
/***/ }),
|
|
368
523
|
|
|
@@ -396,9 +551,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
396
551
|
});
|
|
397
552
|
exports.default = void 0;
|
|
398
553
|
|
|
399
|
-
__exportStar(__webpack_require__(
|
|
554
|
+
__exportStar(__webpack_require__(130), exports);
|
|
400
555
|
|
|
401
|
-
var Markdown_1 = __webpack_require__(
|
|
556
|
+
var Markdown_1 = __webpack_require__(130);
|
|
402
557
|
|
|
403
558
|
Object.defineProperty(exports, "default", {
|
|
404
559
|
enumerable: true,
|
|
@@ -417,18 +572,46 @@ module.exports = require("@splunk/react-ui/Markdown");
|
|
|
417
572
|
/***/ }),
|
|
418
573
|
|
|
419
574
|
/***/ 207:
|
|
575
|
+
/***/ (function(module, exports) {
|
|
576
|
+
|
|
577
|
+
module.exports = require("@splunk/react-ui/Heading");
|
|
578
|
+
|
|
579
|
+
/***/ }),
|
|
580
|
+
|
|
581
|
+
/***/ 208:
|
|
582
|
+
/***/ (function(module, exports) {
|
|
583
|
+
|
|
584
|
+
module.exports = require("@splunk/react-ui/List");
|
|
585
|
+
|
|
586
|
+
/***/ }),
|
|
587
|
+
|
|
588
|
+
/***/ 209:
|
|
589
|
+
/***/ (function(module, exports) {
|
|
590
|
+
|
|
591
|
+
module.exports = require("@splunk/react-ui/Code");
|
|
592
|
+
|
|
593
|
+
/***/ }),
|
|
594
|
+
|
|
595
|
+
/***/ 21:
|
|
596
|
+
/***/ (function(module, exports) {
|
|
597
|
+
|
|
598
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
599
|
+
|
|
600
|
+
/***/ }),
|
|
601
|
+
|
|
602
|
+
/***/ 210:
|
|
420
603
|
/***/ (function(module, exports, __webpack_require__) {
|
|
421
604
|
|
|
422
605
|
"use strict";
|
|
423
606
|
|
|
424
607
|
|
|
425
|
-
var _toConsumableArray = __webpack_require__(
|
|
608
|
+
var _toConsumableArray = __webpack_require__(41);
|
|
426
609
|
|
|
427
610
|
Object.defineProperty(exports, "__esModule", {
|
|
428
611
|
value: true
|
|
429
612
|
});
|
|
430
613
|
|
|
431
|
-
var themes_1 = __webpack_require__(
|
|
614
|
+
var themes_1 = __webpack_require__(65);
|
|
432
615
|
|
|
433
616
|
var i18n_1 = __webpack_require__(3);
|
|
434
617
|
|
|
@@ -436,11 +619,11 @@ var schemaUtils_1 = __webpack_require__(15);
|
|
|
436
619
|
|
|
437
620
|
var VizBehavior_1 = __webpack_require__(5);
|
|
438
621
|
|
|
439
|
-
var VizCategory_1 = __webpack_require__(
|
|
622
|
+
var VizCategory_1 = __webpack_require__(28);
|
|
440
623
|
|
|
441
624
|
var configUtils_1 = __webpack_require__(6);
|
|
442
625
|
|
|
443
|
-
var BackgroundColor_1 = __webpack_require__(
|
|
626
|
+
var BackgroundColor_1 = __webpack_require__(48);
|
|
444
627
|
|
|
445
628
|
var dataContract = {
|
|
446
629
|
requiredDataSources: [],
|
|
@@ -475,6 +658,12 @@ var optionsSchema = {
|
|
|
475
658
|
default: '> themes.defaultFontColor',
|
|
476
659
|
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
477
660
|
},
|
|
661
|
+
fontSize: {
|
|
662
|
+
description: 'Specify the font size you would like to use for markdown content. Font sizes range from extra small (10px for unformatted text) to extra large (18px for unformatted text) with the default being 14px for unformatted text.',
|
|
663
|
+
type: 'string',
|
|
664
|
+
default: 'default',
|
|
665
|
+
pattern: schemaUtils_1.getPattern(['extraSmall', 'small', 'default', 'large', 'extraLarge'])
|
|
666
|
+
},
|
|
478
667
|
markdown: {
|
|
479
668
|
description: 'Add text using basic markdown syntax.',
|
|
480
669
|
type: 'string'
|
|
@@ -513,7 +702,29 @@ var editorConfig = [{
|
|
|
513
702
|
}].concat(_toConsumableArray(BackgroundColor_1.default({
|
|
514
703
|
label: 'Background Color',
|
|
515
704
|
themes: themes
|
|
516
|
-
})))
|
|
705
|
+
}))), [{
|
|
706
|
+
label: i18n_1._('Font Size'),
|
|
707
|
+
option: 'fontSize',
|
|
708
|
+
editor: 'editor.select',
|
|
709
|
+
editorProps: {
|
|
710
|
+
values: [{
|
|
711
|
+
label: i18n_1._('Extra Small'),
|
|
712
|
+
value: 'extraSmall'
|
|
713
|
+
}, {
|
|
714
|
+
label: i18n_1._('Small'),
|
|
715
|
+
value: 'small'
|
|
716
|
+
}, {
|
|
717
|
+
label: i18n_1._('Default'),
|
|
718
|
+
value: 'default'
|
|
719
|
+
}, {
|
|
720
|
+
label: i18n_1._('Large'),
|
|
721
|
+
value: 'large'
|
|
722
|
+
}, {
|
|
723
|
+
label: i18n_1._('Extra Large'),
|
|
724
|
+
value: 'extraLarge'
|
|
725
|
+
}]
|
|
726
|
+
}
|
|
727
|
+
}]]
|
|
517
728
|
}];
|
|
518
729
|
/**
|
|
519
730
|
* visualization configuration
|
|
@@ -547,7 +758,7 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
547
758
|
|
|
548
759
|
/***/ }),
|
|
549
760
|
|
|
550
|
-
/***/
|
|
761
|
+
/***/ 24:
|
|
551
762
|
/***/ (function(module, exports, __webpack_require__) {
|
|
552
763
|
|
|
553
764
|
"use strict";
|
|
@@ -581,13 +792,105 @@ exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
|
581
792
|
|
|
582
793
|
/***/ }),
|
|
583
794
|
|
|
584
|
-
/***/
|
|
795
|
+
/***/ 25:
|
|
585
796
|
/***/ (function(module, exports, __webpack_require__) {
|
|
586
797
|
|
|
587
798
|
"use strict";
|
|
588
799
|
|
|
589
800
|
|
|
590
|
-
|
|
801
|
+
Object.defineProperty(exports, "__esModule", {
|
|
802
|
+
value: true
|
|
803
|
+
});
|
|
804
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
805
|
+
|
|
806
|
+
var React = __webpack_require__(1);
|
|
807
|
+
|
|
808
|
+
var T = __webpack_require__(0);
|
|
809
|
+
|
|
810
|
+
var lodash_1 = __webpack_require__(2);
|
|
811
|
+
|
|
812
|
+
var i18n_1 = __webpack_require__(3);
|
|
813
|
+
|
|
814
|
+
var Message_1 = __webpack_require__(9);
|
|
815
|
+
|
|
816
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
817
|
+
/**
|
|
818
|
+
* @method shouldShowIconPlaceholder
|
|
819
|
+
* @param {object} dataSources
|
|
820
|
+
* @param {boolean} loading
|
|
821
|
+
* @returns {boolean}
|
|
822
|
+
*/
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
826
|
+
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
827
|
+
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
828
|
+
var noData = data === undefined;
|
|
829
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
830
|
+
var noFields = fields === undefined;
|
|
831
|
+
return loading || noData || noFields;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
835
|
+
var propTypes = {
|
|
836
|
+
icon: T.func,
|
|
837
|
+
width: T.oneOfType([T.string, T.number]),
|
|
838
|
+
height: T.oneOfType([T.string, T.number]),
|
|
839
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
840
|
+
backgroundColor: T.string,
|
|
841
|
+
iconColor: T.string
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* @method IconPlaceholder
|
|
845
|
+
* @param {IconPlaceholderProps} props
|
|
846
|
+
* @returns {React.ReactElement}
|
|
847
|
+
*/
|
|
848
|
+
|
|
849
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
850
|
+
var width = props.width,
|
|
851
|
+
height = props.height,
|
|
852
|
+
icon = props.icon,
|
|
853
|
+
iconColor = props.iconColor;
|
|
854
|
+
|
|
855
|
+
if (icon) {
|
|
856
|
+
return React.createElement(icon, {
|
|
857
|
+
style: {
|
|
858
|
+
left: '50%',
|
|
859
|
+
top: '50%',
|
|
860
|
+
color: iconColor,
|
|
861
|
+
opacity: 0.15,
|
|
862
|
+
position: 'absolute',
|
|
863
|
+
transform: 'translate(-50%, -50%)'
|
|
864
|
+
},
|
|
865
|
+
width: '50%',
|
|
866
|
+
height: '50%'
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
return React.createElement(Message_1.default, {
|
|
871
|
+
width: width,
|
|
872
|
+
height: height,
|
|
873
|
+
level: "warning",
|
|
874
|
+
message: i18n_1._('No DataSource Connected')
|
|
875
|
+
});
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
IconPlaceholder.propTypes = propTypes;
|
|
879
|
+
IconPlaceholder.defaultProps = {
|
|
880
|
+
width: '100%',
|
|
881
|
+
height: 250
|
|
882
|
+
};
|
|
883
|
+
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
884
|
+
|
|
885
|
+
/***/ }),
|
|
886
|
+
|
|
887
|
+
/***/ 26:
|
|
888
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
889
|
+
|
|
890
|
+
"use strict";
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
var _defineProperty = __webpack_require__(7);
|
|
591
894
|
|
|
592
895
|
Object.defineProperty(exports, "__esModule", {
|
|
593
896
|
value: true
|
|
@@ -598,7 +901,7 @@ var T = __webpack_require__(0);
|
|
|
598
901
|
|
|
599
902
|
var lodash_1 = __webpack_require__(2);
|
|
600
903
|
|
|
601
|
-
var DataSource_1 = __webpack_require__(
|
|
904
|
+
var DataSource_1 = __webpack_require__(36);
|
|
602
905
|
|
|
603
906
|
exports.SortParamsPropTypes = T.shape({
|
|
604
907
|
currentSortKey: T.string,
|
|
@@ -652,7 +955,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
652
955
|
|
|
653
956
|
/***/ }),
|
|
654
957
|
|
|
655
|
-
/***/
|
|
958
|
+
/***/ 27:
|
|
656
959
|
/***/ (function(module, exports, __webpack_require__) {
|
|
657
960
|
|
|
658
961
|
"use strict";
|
|
@@ -717,99 +1020,7 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
717
1020
|
|
|
718
1021
|
/***/ }),
|
|
719
1022
|
|
|
720
|
-
/***/
|
|
721
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
722
|
-
|
|
723
|
-
"use strict";
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
Object.defineProperty(exports, "__esModule", {
|
|
727
|
-
value: true
|
|
728
|
-
});
|
|
729
|
-
exports.shouldShowIconPlaceholder = void 0;
|
|
730
|
-
|
|
731
|
-
var React = __webpack_require__(1);
|
|
732
|
-
|
|
733
|
-
var T = __webpack_require__(0);
|
|
734
|
-
|
|
735
|
-
var lodash_1 = __webpack_require__(2);
|
|
736
|
-
|
|
737
|
-
var i18n_1 = __webpack_require__(3);
|
|
738
|
-
|
|
739
|
-
var Message_1 = __webpack_require__(9);
|
|
740
|
-
|
|
741
|
-
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
742
|
-
/**
|
|
743
|
-
* @method shouldShowIconPlaceholder
|
|
744
|
-
* @param {object} dataSources
|
|
745
|
-
* @param {boolean} loading
|
|
746
|
-
* @returns {boolean}
|
|
747
|
-
*/
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
751
|
-
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
752
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
753
|
-
var noData = data === undefined;
|
|
754
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
755
|
-
var noFields = fields === undefined;
|
|
756
|
-
return loading || noData || noFields;
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
760
|
-
var propTypes = {
|
|
761
|
-
icon: T.func,
|
|
762
|
-
width: T.oneOfType([T.string, T.number]),
|
|
763
|
-
height: T.oneOfType([T.string, T.number]),
|
|
764
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
765
|
-
backgroundColor: T.string,
|
|
766
|
-
iconColor: T.string
|
|
767
|
-
};
|
|
768
|
-
/**
|
|
769
|
-
* @method IconPlaceholder
|
|
770
|
-
* @param {IconPlaceholderProps} props
|
|
771
|
-
* @returns {React.ReactElement}
|
|
772
|
-
*/
|
|
773
|
-
|
|
774
|
-
var IconPlaceholder = function IconPlaceholder(props) {
|
|
775
|
-
var width = props.width,
|
|
776
|
-
height = props.height,
|
|
777
|
-
icon = props.icon,
|
|
778
|
-
iconColor = props.iconColor;
|
|
779
|
-
|
|
780
|
-
if (icon) {
|
|
781
|
-
return React.createElement(icon, {
|
|
782
|
-
style: {
|
|
783
|
-
left: '50%',
|
|
784
|
-
top: '50%',
|
|
785
|
-
color: iconColor,
|
|
786
|
-
opacity: 0.15,
|
|
787
|
-
position: 'absolute',
|
|
788
|
-
transform: 'translate(-50%, -50%)'
|
|
789
|
-
},
|
|
790
|
-
width: '50%',
|
|
791
|
-
height: '50%'
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
return React.createElement(Message_1.default, {
|
|
796
|
-
width: width,
|
|
797
|
-
height: height,
|
|
798
|
-
level: "warning",
|
|
799
|
-
message: i18n_1._('No DataSource Connected')
|
|
800
|
-
});
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
IconPlaceholder.propTypes = propTypes;
|
|
804
|
-
IconPlaceholder.defaultProps = {
|
|
805
|
-
width: '100%',
|
|
806
|
-
height: 250
|
|
807
|
-
};
|
|
808
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
809
|
-
|
|
810
|
-
/***/ }),
|
|
811
|
-
|
|
812
|
-
/***/ 27:
|
|
1023
|
+
/***/ 28:
|
|
813
1024
|
/***/ (function(module, exports, __webpack_require__) {
|
|
814
1025
|
|
|
815
1026
|
"use strict";
|
|
@@ -838,7 +1049,7 @@ var VizCategory;
|
|
|
838
1049
|
|
|
839
1050
|
/***/ }),
|
|
840
1051
|
|
|
841
|
-
/***/
|
|
1052
|
+
/***/ 29:
|
|
842
1053
|
/***/ (function(module, exports, __webpack_require__) {
|
|
843
1054
|
|
|
844
1055
|
"use strict";
|
|
@@ -852,33 +1063,37 @@ var React = __webpack_require__(1);
|
|
|
852
1063
|
|
|
853
1064
|
var lodash_1 = __webpack_require__(2);
|
|
854
1065
|
|
|
855
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
1066
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(30);
|
|
856
1067
|
|
|
857
|
-
var Options_1 = __webpack_require__(
|
|
1068
|
+
var Options_1 = __webpack_require__(31);
|
|
858
1069
|
|
|
859
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
1070
|
+
var SanitizeProps_1 = __webpack_require__(32);
|
|
1071
|
+
|
|
1072
|
+
var TimezoneContext_1 = __webpack_require__(19);
|
|
1073
|
+
|
|
1074
|
+
var moment_1 = __webpack_require__(33);
|
|
860
1075
|
|
|
861
1076
|
var styled_components_1 = __webpack_require__(4);
|
|
862
1077
|
|
|
863
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
1078
|
+
var SplunkVisualization_1 = __webpack_require__(34);
|
|
864
1079
|
|
|
865
1080
|
var VizBehavior_1 = __webpack_require__(5);
|
|
866
1081
|
|
|
867
|
-
var getSorting_1 = __webpack_require__(
|
|
1082
|
+
var getSorting_1 = __webpack_require__(26);
|
|
868
1083
|
|
|
869
|
-
var getPagination_1 = __webpack_require__(
|
|
1084
|
+
var getPagination_1 = __webpack_require__(27);
|
|
870
1085
|
|
|
871
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
1086
|
+
var useDeepMemo_1 = __webpack_require__(37);
|
|
872
1087
|
|
|
873
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
1088
|
+
var JSONSchemaUtils_1 = __webpack_require__(24);
|
|
874
1089
|
|
|
875
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
1090
|
+
var MissingPropsMessage_1 = __webpack_require__(38);
|
|
876
1091
|
|
|
877
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
1092
|
+
var withEditModeCover_1 = __webpack_require__(39);
|
|
878
1093
|
|
|
879
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
1094
|
+
var withPlaceholder_1 = __webpack_require__(40);
|
|
880
1095
|
|
|
881
|
-
var hocUtils_1 = __webpack_require__(
|
|
1096
|
+
var hocUtils_1 = __webpack_require__(8);
|
|
882
1097
|
/**
|
|
883
1098
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
884
1099
|
* @param {DashboardVizOpts} opts
|
|
@@ -911,6 +1126,23 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
911
1126
|
theme = props.theme,
|
|
912
1127
|
onRequestParamsChange = props.onRequestParamsChange;
|
|
913
1128
|
|
|
1129
|
+
var _React$useContext = React.useContext(TimezoneContext_1.default),
|
|
1130
|
+
serializedTimezone = _React$useContext.serializedTimezone;
|
|
1131
|
+
|
|
1132
|
+
if (serializedTimezone) {
|
|
1133
|
+
/*
|
|
1134
|
+
@splunk/moment currently does not allow us to customize the timezone on a per visualization basis.
|
|
1135
|
+
This ensures that if a timezone was provided via TimezoneContext @splunk/moment time formatting
|
|
1136
|
+
will use it.
|
|
1137
|
+
@TODO(pwied):
|
|
1138
|
+
- remove when we moved away from @splunk/moment
|
|
1139
|
+
- provide timezone context to dynamic option evaluation phase
|
|
1140
|
+
*/
|
|
1141
|
+
if (!moment_1.default.getDefaultSplunkTimezone()) {
|
|
1142
|
+
moment_1.default.setDefaultSplunkTimezone(serializedTimezone);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
914
1146
|
var themeFunc = function themeFunc(themeVar) {
|
|
915
1147
|
var _a, _b;
|
|
916
1148
|
|
|
@@ -939,7 +1171,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
939
1171
|
console.error("unexpected error evaluating options: + ".concat(e.message));
|
|
940
1172
|
return {};
|
|
941
1173
|
}
|
|
942
|
-
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources]); // useEffect hook needs to be initialized before any early returns
|
|
1174
|
+
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone]); // useEffect hook needs to be initialized before any early returns
|
|
943
1175
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
944
1176
|
|
|
945
1177
|
React.useEffect(function () {
|
|
@@ -1063,35 +1295,42 @@ exports.default = withDashboardViz;
|
|
|
1063
1295
|
|
|
1064
1296
|
/***/ }),
|
|
1065
1297
|
|
|
1066
|
-
/***/
|
|
1298
|
+
/***/ 3:
|
|
1067
1299
|
/***/ (function(module, exports) {
|
|
1068
1300
|
|
|
1069
|
-
module.exports = require("@splunk/
|
|
1301
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
1070
1302
|
|
|
1071
1303
|
/***/ }),
|
|
1072
1304
|
|
|
1073
|
-
/***/
|
|
1305
|
+
/***/ 30:
|
|
1074
1306
|
/***/ (function(module, exports) {
|
|
1075
1307
|
|
|
1076
|
-
module.exports = require("@splunk/
|
|
1308
|
+
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1077
1309
|
|
|
1078
1310
|
/***/ }),
|
|
1079
1311
|
|
|
1080
|
-
/***/
|
|
1312
|
+
/***/ 31:
|
|
1081
1313
|
/***/ (function(module, exports) {
|
|
1082
1314
|
|
|
1083
1315
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1084
1316
|
|
|
1085
1317
|
/***/ }),
|
|
1086
1318
|
|
|
1087
|
-
/***/
|
|
1319
|
+
/***/ 32:
|
|
1088
1320
|
/***/ (function(module, exports) {
|
|
1089
1321
|
|
|
1090
1322
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1091
1323
|
|
|
1092
1324
|
/***/ }),
|
|
1093
1325
|
|
|
1094
|
-
/***/
|
|
1326
|
+
/***/ 33:
|
|
1327
|
+
/***/ (function(module, exports) {
|
|
1328
|
+
|
|
1329
|
+
module.exports = require("@splunk/moment");
|
|
1330
|
+
|
|
1331
|
+
/***/ }),
|
|
1332
|
+
|
|
1333
|
+
/***/ 34:
|
|
1095
1334
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1096
1335
|
|
|
1097
1336
|
"use strict";
|
|
@@ -1109,7 +1348,7 @@ var T = __webpack_require__(0);
|
|
|
1109
1348
|
|
|
1110
1349
|
var lodash_1 = __webpack_require__(2);
|
|
1111
1350
|
|
|
1112
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1351
|
+
var VizActionHandler_1 = __webpack_require__(35); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1113
1352
|
|
|
1114
1353
|
|
|
1115
1354
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1243,7 +1482,7 @@ exports.default = SplunkVisualization;
|
|
|
1243
1482
|
|
|
1244
1483
|
/***/ }),
|
|
1245
1484
|
|
|
1246
|
-
/***/
|
|
1485
|
+
/***/ 35:
|
|
1247
1486
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1248
1487
|
|
|
1249
1488
|
"use strict";
|
|
@@ -1281,7 +1520,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
1281
1520
|
|
|
1282
1521
|
/***/ }),
|
|
1283
1522
|
|
|
1284
|
-
/***/
|
|
1523
|
+
/***/ 36:
|
|
1285
1524
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1286
1525
|
|
|
1287
1526
|
"use strict";
|
|
@@ -1295,7 +1534,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
1295
1534
|
|
|
1296
1535
|
/***/ }),
|
|
1297
1536
|
|
|
1298
|
-
/***/
|
|
1537
|
+
/***/ 37:
|
|
1299
1538
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1300
1539
|
|
|
1301
1540
|
"use strict";
|
|
@@ -1341,7 +1580,7 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
1341
1580
|
|
|
1342
1581
|
/***/ }),
|
|
1343
1582
|
|
|
1344
|
-
/***/
|
|
1583
|
+
/***/ 38:
|
|
1345
1584
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1346
1585
|
|
|
1347
1586
|
"use strict";
|
|
@@ -1422,7 +1661,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
1422
1661
|
|
|
1423
1662
|
/***/ }),
|
|
1424
1663
|
|
|
1425
|
-
/***/
|
|
1664
|
+
/***/ 39:
|
|
1426
1665
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1427
1666
|
|
|
1428
1667
|
"use strict";
|
|
@@ -1436,14 +1675,14 @@ var React = __webpack_require__(1);
|
|
|
1436
1675
|
|
|
1437
1676
|
var styled_components_1 = __webpack_require__(4);
|
|
1438
1677
|
|
|
1439
|
-
var hocUtils_1 = __webpack_require__(
|
|
1678
|
+
var hocUtils_1 = __webpack_require__(8);
|
|
1440
1679
|
|
|
1441
1680
|
var Cover = styled_components_1.default.div.withConfig({
|
|
1442
1681
|
displayName: "withEditModeCover__Cover",
|
|
1443
1682
|
componentId: "sc-1gsbnxb-0"
|
|
1444
1683
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1445
1684
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1446
|
-
'data-splunk-visualization-version': "24.
|
|
1685
|
+
'data-splunk-visualization-version': "24.5.0 - b75bfbe79"
|
|
1447
1686
|
}).withConfig({
|
|
1448
1687
|
displayName: "withEditModeCover__Blocker",
|
|
1449
1688
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1475,7 +1714,14 @@ exports.default = withEditModeCover;
|
|
|
1475
1714
|
|
|
1476
1715
|
/***/ }),
|
|
1477
1716
|
|
|
1478
|
-
/***/
|
|
1717
|
+
/***/ 4:
|
|
1718
|
+
/***/ (function(module, exports) {
|
|
1719
|
+
|
|
1720
|
+
module.exports = require("styled-components");
|
|
1721
|
+
|
|
1722
|
+
/***/ }),
|
|
1723
|
+
|
|
1724
|
+
/***/ 40:
|
|
1479
1725
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1480
1726
|
|
|
1481
1727
|
"use strict";
|
|
@@ -1491,11 +1737,11 @@ var colorUtils_1 = __webpack_require__(12);
|
|
|
1491
1737
|
|
|
1492
1738
|
var variables_1 = __webpack_require__(11);
|
|
1493
1739
|
|
|
1494
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1740
|
+
var IconPlaceholder_1 = __webpack_require__(25);
|
|
1495
1741
|
|
|
1496
1742
|
var VizBehavior_1 = __webpack_require__(5);
|
|
1497
1743
|
|
|
1498
|
-
var hocUtils_1 = __webpack_require__(
|
|
1744
|
+
var hocUtils_1 = __webpack_require__(8);
|
|
1499
1745
|
|
|
1500
1746
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1501
1747
|
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
@@ -1540,21 +1786,14 @@ exports.default = withPlaceholder;
|
|
|
1540
1786
|
|
|
1541
1787
|
/***/ }),
|
|
1542
1788
|
|
|
1543
|
-
/***/
|
|
1789
|
+
/***/ 41:
|
|
1544
1790
|
/***/ (function(module, exports) {
|
|
1545
1791
|
|
|
1546
1792
|
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
1547
1793
|
|
|
1548
1794
|
/***/ }),
|
|
1549
1795
|
|
|
1550
|
-
/***/
|
|
1551
|
-
/***/ (function(module, exports) {
|
|
1552
|
-
|
|
1553
|
-
module.exports = require("styled-components");
|
|
1554
|
-
|
|
1555
|
-
/***/ }),
|
|
1556
|
-
|
|
1557
|
-
/***/ 46:
|
|
1796
|
+
/***/ 48:
|
|
1558
1797
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1559
1798
|
|
|
1560
1799
|
"use strict";
|
|
@@ -1629,7 +1868,7 @@ var VizBehavior;
|
|
|
1629
1868
|
"use strict";
|
|
1630
1869
|
|
|
1631
1870
|
|
|
1632
|
-
var _defineProperty = __webpack_require__(
|
|
1871
|
+
var _defineProperty = __webpack_require__(7);
|
|
1633
1872
|
|
|
1634
1873
|
var __rest = this && this.__rest || function (s, e) {
|
|
1635
1874
|
var t = {};
|
|
@@ -1815,13 +2054,34 @@ exports.generatePrecisionValues = generatePrecisionValues;
|
|
|
1815
2054
|
|
|
1816
2055
|
/***/ }),
|
|
1817
2056
|
|
|
2057
|
+
/***/ 65:
|
|
2058
|
+
/***/ (function(module, exports) {
|
|
2059
|
+
|
|
2060
|
+
module.exports = require("@splunk/themes");
|
|
2061
|
+
|
|
2062
|
+
/***/ }),
|
|
2063
|
+
|
|
1818
2064
|
/***/ 7:
|
|
2065
|
+
/***/ (function(module, exports) {
|
|
2066
|
+
|
|
2067
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
2068
|
+
|
|
2069
|
+
/***/ }),
|
|
2070
|
+
|
|
2071
|
+
/***/ 77:
|
|
2072
|
+
/***/ (function(module, exports) {
|
|
2073
|
+
|
|
2074
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
2075
|
+
|
|
2076
|
+
/***/ }),
|
|
2077
|
+
|
|
2078
|
+
/***/ 8:
|
|
1819
2079
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1820
2080
|
|
|
1821
2081
|
"use strict";
|
|
1822
2082
|
|
|
1823
2083
|
|
|
1824
|
-
var _typeof = __webpack_require__(
|
|
2084
|
+
var _typeof = __webpack_require__(21);
|
|
1825
2085
|
|
|
1826
2086
|
Object.defineProperty(exports, "__esModule", {
|
|
1827
2087
|
value: true
|
|
@@ -1944,20 +2204,6 @@ exports.findClosestMatchFromDefaultList = findClosestMatchFromDefaultList;
|
|
|
1944
2204
|
|
|
1945
2205
|
/***/ }),
|
|
1946
2206
|
|
|
1947
|
-
/***/ 71:
|
|
1948
|
-
/***/ (function(module, exports) {
|
|
1949
|
-
|
|
1950
|
-
module.exports = require("@splunk/themes");
|
|
1951
|
-
|
|
1952
|
-
/***/ }),
|
|
1953
|
-
|
|
1954
|
-
/***/ 8:
|
|
1955
|
-
/***/ (function(module, exports) {
|
|
1956
|
-
|
|
1957
|
-
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
1958
|
-
|
|
1959
|
-
/***/ }),
|
|
1960
|
-
|
|
1961
2207
|
/***/ 9:
|
|
1962
2208
|
/***/ (function(module, exports) {
|
|
1963
2209
|
|