@splunk/visualizations 25.2.0 → 25.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Value_Highlighting.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_custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_extraLarge.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Markdown_with_number_as_DSL.png +0 -0
- package/Area.config.js +58 -8
- package/Area.config.js.map +1 -1
- package/Area.js +77 -27
- package/Area.js.map +1 -1
- package/Bar.config.js +3 -3
- package/Bar.config.js.map +1 -1
- package/Bar.js +22 -22
- package/Bar.js.map +1 -1
- package/Bubble.config.js +3 -3
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +22 -22
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +3 -3
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +24 -24
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +3 -3
- package/Column.config.js.map +1 -1
- package/Column.js +22 -22
- package/Column.js.map +1 -1
- package/Ellipse.config.js +3 -3
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +21 -21
- package/Ellipse.js.map +1 -1
- package/Events.config.js +15 -19
- package/Events.config.js.map +1 -1
- package/Events.js +48 -50
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +3 -3
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +29 -29
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +3 -3
- package/Image.config.js.map +1 -1
- package/Image.js +21 -21
- package/Image.js.map +1 -1
- package/Line.config.js +56 -6
- package/Line.config.js.map +1 -1
- package/Line.js +75 -25
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +3 -3
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +2216 -1311
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +3 -3
- package/Map.config.js.map +1 -1
- package/Map.js +77 -77
- package/Map.js.map +1 -1
- package/Markdown.config.js +26 -4
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +143 -96
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +3 -3
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +81 -81
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +3 -3
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +120 -120
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +3 -3
- package/Pie.config.js.map +1 -1
- package/Pie.js +83 -83
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +3 -3
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +178 -178
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +3 -3
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +89 -89
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +3 -3
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +61 -61
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +3 -3
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +35 -35
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +3 -3
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +48 -48
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +4 -4
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +3 -3
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +58 -58
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +3 -3
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +62 -62
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +3 -3
- package/Table.config.js.map +1 -1
- package/Table.js +52 -52
- package/Table.js.map +1 -1
- package/common/OptionsDoc.js +3 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/utils/configUtils.js +3 -3
- package/common/utils/configUtils.js.map +1 -1
- package/common/withDashboardViz.js +2 -2
- package/package.json +11 -11
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 = 400);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,14 +95,14 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("react");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("prop-types");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
@@ -151,7 +151,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
151
151
|
value: true
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
var React = __webpack_require__(
|
|
154
|
+
var React = __webpack_require__(0);
|
|
155
155
|
|
|
156
156
|
var styled_components_1 = __webpack_require__(4);
|
|
157
157
|
|
|
@@ -216,7 +216,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
216
216
|
|
|
217
217
|
return React.createElement(FixSizeItem, {
|
|
218
218
|
"data-test": "fix-size-item",
|
|
219
|
-
"data-splunk-visualization-version": "25.
|
|
219
|
+
"data-splunk-visualization-version": "25.3.0 - dae70ec02",
|
|
220
220
|
width: width,
|
|
221
221
|
height: height,
|
|
222
222
|
backgroundColor: backgroundColor
|
|
@@ -277,18 +277,20 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
277
277
|
"use strict";
|
|
278
278
|
|
|
279
279
|
|
|
280
|
-
var _taggedTemplateLiteral = __webpack_require__(
|
|
280
|
+
var _taggedTemplateLiteral = __webpack_require__(86);
|
|
281
281
|
|
|
282
282
|
var _templateObject;
|
|
283
283
|
|
|
284
284
|
Object.defineProperty(exports, "__esModule", {
|
|
285
285
|
value: true
|
|
286
286
|
});
|
|
287
|
-
exports.getFontMap = exports.config = exports.themes = exports.computeVizProps = void 0;
|
|
287
|
+
exports.getFontMap = exports.config = exports.themes = exports.computeVizProps = exports.FONT_SIZES = void 0;
|
|
288
288
|
|
|
289
289
|
var lodash_1 = __webpack_require__(3);
|
|
290
290
|
|
|
291
|
-
var
|
|
291
|
+
var types_1 = __webpack_require__(81);
|
|
292
|
+
|
|
293
|
+
var React = __webpack_require__(0);
|
|
292
294
|
|
|
293
295
|
var style_1 = __webpack_require__(15);
|
|
294
296
|
|
|
@@ -296,25 +298,25 @@ var Markdown_1 = __webpack_require__(109);
|
|
|
296
298
|
|
|
297
299
|
var styled_components_1 = __webpack_require__(4);
|
|
298
300
|
|
|
299
|
-
var T = __webpack_require__(
|
|
301
|
+
var T = __webpack_require__(1);
|
|
300
302
|
|
|
301
303
|
var themes_1 = __webpack_require__(69);
|
|
302
304
|
|
|
303
|
-
var Heading_1 = __webpack_require__(
|
|
305
|
+
var Heading_1 = __webpack_require__(401);
|
|
304
306
|
|
|
305
307
|
var Paragraph_1 = __webpack_require__(114);
|
|
306
308
|
|
|
307
|
-
var List_1 = __webpack_require__(
|
|
309
|
+
var List_1 = __webpack_require__(402);
|
|
308
310
|
|
|
309
|
-
var Code_1 = __webpack_require__(
|
|
311
|
+
var Code_1 = __webpack_require__(403);
|
|
310
312
|
|
|
311
313
|
var withDashboardViz_1 = __webpack_require__(32);
|
|
312
314
|
|
|
313
|
-
var config_1 = __webpack_require__(
|
|
315
|
+
var config_1 = __webpack_require__(404);
|
|
314
316
|
|
|
315
317
|
exports.config = config_1.default; // map of valid font sizes with elements' respective pixel sizes
|
|
316
318
|
|
|
317
|
-
|
|
319
|
+
exports.FONT_SIZES = {
|
|
318
320
|
extraSmall: {
|
|
319
321
|
h1: 18,
|
|
320
322
|
h2: 14,
|
|
@@ -369,7 +371,7 @@ var MarkdownContainer = styled_components_1.default.div.withConfig({
|
|
|
369
371
|
var CodeBlockContainer = styled_components_1.default.div.withConfig({
|
|
370
372
|
displayName: "Markdown__CodeBlockContainer",
|
|
371
373
|
componentId: "zd3qkg-1"
|
|
372
|
-
})(["padding:", ";margin:", " 0;background-color:", ";pre[data-test='code']{margin-bottom:0px;}code{font-size:", "px !important;}"], themes_1.pick({
|
|
374
|
+
})(["padding:", ";margin:", " 0;background-color:", ";pre[data-test='code']{margin-bottom:0px;}code{font-size:", "px !important;line-height:", "px !important;}"], themes_1.pick({
|
|
373
375
|
enterprise: themes_1.variables.spacingHalf,
|
|
374
376
|
prisma: styled_components_1.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["10px ", ""])), themes_1.variables.spacingLarge)
|
|
375
377
|
}), themes_1.pick({
|
|
@@ -383,6 +385,8 @@ var CodeBlockContainer = styled_components_1.default.div.withConfig({
|
|
|
383
385
|
prisma: themes_1.variables.backgroundColorSection
|
|
384
386
|
}), function (props) {
|
|
385
387
|
return props.fontSize;
|
|
388
|
+
}, function (props) {
|
|
389
|
+
return props.fontSize;
|
|
386
390
|
});
|
|
387
391
|
var CodeInlineContainer = styled_components_1.default.code.withConfig({
|
|
388
392
|
displayName: "Markdown__CodeInlineContainer",
|
|
@@ -399,12 +403,12 @@ var CodeInlineContainer = styled_components_1.default.code.withConfig({
|
|
|
399
403
|
var getFontMap = function getFontMap(fontSize) {
|
|
400
404
|
var font = fontSize;
|
|
401
405
|
|
|
402
|
-
if (!FONT_SIZES[fontSize]) {
|
|
406
|
+
if (!exports.FONT_SIZES[fontSize] && fontSize !== 'custom') {
|
|
403
407
|
console.error("'".concat(fontSize, "' is not a valid value for Markdown's fontSize option. Using the 'default' font size."));
|
|
404
408
|
font = 'default';
|
|
405
409
|
}
|
|
406
410
|
|
|
407
|
-
return FONT_SIZES[font];
|
|
411
|
+
return exports.FONT_SIZES[font];
|
|
408
412
|
};
|
|
409
413
|
|
|
410
414
|
exports.getFontMap = getFontMap;
|
|
@@ -418,15 +422,25 @@ var StyledA = styled_components_1.default.a.withConfig({
|
|
|
418
422
|
componentId: "zd3qkg-3"
|
|
419
423
|
})(["text-decoration:underlined;"]); // returns renderers customized with the appropriate font sizes given the provided `fontSize` value.
|
|
420
424
|
|
|
421
|
-
var getMarkdownRenderer = function getMarkdownRenderer(fontSize) {
|
|
425
|
+
var getMarkdownRenderer = function getMarkdownRenderer(fontSize, customFontSize) {
|
|
426
|
+
// defaults to customFontSize of 14px if value is invalid
|
|
427
|
+
var cleanedCustomFontSize = types_1.isNumber(customFontSize) ? customFontSize : 14;
|
|
428
|
+
var isCustomFontSize = fontSize === 'custom';
|
|
422
429
|
/* eslint-disable react/display-name, react/prop-types */
|
|
423
|
-
|
|
430
|
+
|
|
431
|
+
var fontMap = isCustomFontSize ? {
|
|
432
|
+
h1: cleanedCustomFontSize * 2.0,
|
|
433
|
+
h2: cleanedCustomFontSize * 1.5,
|
|
434
|
+
h3: cleanedCustomFontSize * 1.25,
|
|
435
|
+
p: cleanedCustomFontSize
|
|
436
|
+
} : getFontMap(fontSize);
|
|
424
437
|
return {
|
|
425
438
|
paragraphRenderer: function paragraphRenderer(_ref2) {
|
|
426
439
|
var children = _ref2.children;
|
|
427
440
|
return React.createElement(Paragraph_1.default, {
|
|
428
441
|
style: {
|
|
429
|
-
fontSize: fontMap.p
|
|
442
|
+
fontSize: fontMap.p,
|
|
443
|
+
lineHeight: "".concat(fontMap.p, "px")
|
|
430
444
|
}
|
|
431
445
|
}, children);
|
|
432
446
|
},
|
|
@@ -446,7 +460,8 @@ var getMarkdownRenderer = function getMarkdownRenderer(fontSize) {
|
|
|
446
460
|
nodeKey = _ref4.nodeKey;
|
|
447
461
|
return React.createElement(List_1.default.Item, {
|
|
448
462
|
style: {
|
|
449
|
-
fontSize: fontMap.p
|
|
463
|
+
fontSize: fontMap.p,
|
|
464
|
+
lineHeight: "".concat(fontMap.p, "px")
|
|
450
465
|
},
|
|
451
466
|
key: nodeKey
|
|
452
467
|
}, children);
|
|
@@ -489,6 +504,7 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
|
|
|
489
504
|
backgroundColor = _ref8.backgroundColor,
|
|
490
505
|
fontColor = _ref8.fontColor,
|
|
491
506
|
fontSize = _ref8.fontSize,
|
|
507
|
+
customFontSize = _ref8.customFontSize,
|
|
492
508
|
hasEventHandlers = _ref8.hasEventHandlers,
|
|
493
509
|
onMarkdownClick = _ref8.onMarkdownClick;
|
|
494
510
|
|
|
@@ -496,7 +512,7 @@ var MarkdownVisualization = function MarkdownVisualization(_ref8) {
|
|
|
496
512
|
|
|
497
513
|
|
|
498
514
|
var stringifiedMarkdown = "".concat(markdown);
|
|
499
|
-
var renderersForFontSize = getMarkdownRenderer(fontSize);
|
|
515
|
+
var renderersForFontSize = getMarkdownRenderer(fontSize, customFontSize);
|
|
500
516
|
return React.createElement(MarkdownContainer, {
|
|
501
517
|
"data-testid": "markdown-container",
|
|
502
518
|
padding: [5, 5, 5, 5],
|
|
@@ -523,6 +539,7 @@ var propTypes = {
|
|
|
523
539
|
backgroundColor: T.string,
|
|
524
540
|
fontColor: T.string,
|
|
525
541
|
fontSize: T.string,
|
|
542
|
+
customFontSize: T.number,
|
|
526
543
|
hasEventHandlers: T.bool,
|
|
527
544
|
onMarkdownClick: T.func
|
|
528
545
|
};
|
|
@@ -533,6 +550,7 @@ var defaultProps = {
|
|
|
533
550
|
backgroundColor: 'transparent',
|
|
534
551
|
fontColor: 'rgba(255, 255, 255, 0.7)',
|
|
535
552
|
fontSize: 'default',
|
|
553
|
+
customFontSize: 14,
|
|
536
554
|
hasEventHandlers: false,
|
|
537
555
|
onMarkdownClick: function onMarkdownClick() {}
|
|
538
556
|
};
|
|
@@ -677,7 +695,7 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
677
695
|
*/
|
|
678
696
|
|
|
679
697
|
function enhanceConfig(vizConfig) {
|
|
680
|
-
var enhancedConfig = vizConfig;
|
|
698
|
+
var enhancedConfig = Object.assign({}, vizConfig);
|
|
681
699
|
|
|
682
700
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
683
701
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
@@ -685,7 +703,7 @@ function enhanceConfig(vizConfig) {
|
|
|
685
703
|
|
|
686
704
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
687
705
|
return Object.assign(Object.assign({}, config), {
|
|
688
|
-
open: false
|
|
706
|
+
open: config.open || false
|
|
689
707
|
});
|
|
690
708
|
});
|
|
691
709
|
return enhancedConfig;
|
|
@@ -700,7 +718,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
700
718
|
*/
|
|
701
719
|
|
|
702
720
|
function uncollapseEditorConfig(vizConfig) {
|
|
703
|
-
var editorPanelUncollapsedConfig = vizConfig;
|
|
721
|
+
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
704
722
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
705
723
|
return Object.assign(Object.assign({}, config), {
|
|
706
724
|
open: true
|
|
@@ -859,9 +877,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
859
877
|
});
|
|
860
878
|
exports.shouldShowIconPlaceholder = void 0;
|
|
861
879
|
|
|
862
|
-
var React = __webpack_require__(
|
|
880
|
+
var React = __webpack_require__(0);
|
|
863
881
|
|
|
864
|
-
var T = __webpack_require__(
|
|
882
|
+
var T = __webpack_require__(1);
|
|
865
883
|
|
|
866
884
|
var lodash_1 = __webpack_require__(3);
|
|
867
885
|
|
|
@@ -953,7 +971,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
953
971
|
});
|
|
954
972
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
955
973
|
|
|
956
|
-
var T = __webpack_require__(
|
|
974
|
+
var T = __webpack_require__(1);
|
|
957
975
|
|
|
958
976
|
var lodash_1 = __webpack_require__(3);
|
|
959
977
|
|
|
@@ -1022,7 +1040,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1022
1040
|
});
|
|
1023
1041
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
1024
1042
|
|
|
1025
|
-
var T = __webpack_require__(
|
|
1043
|
+
var T = __webpack_require__(1);
|
|
1026
1044
|
|
|
1027
1045
|
var lodash_1 = __webpack_require__(3);
|
|
1028
1046
|
|
|
@@ -1122,7 +1140,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1122
1140
|
value: true
|
|
1123
1141
|
});
|
|
1124
1142
|
|
|
1125
|
-
var React = __webpack_require__(
|
|
1143
|
+
var React = __webpack_require__(0);
|
|
1126
1144
|
|
|
1127
1145
|
var lodash_1 = __webpack_require__(3);
|
|
1128
1146
|
|
|
@@ -1400,7 +1418,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1400
1418
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1401
1419
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1402
1420
|
|
|
1403
|
-
var T = __webpack_require__(
|
|
1421
|
+
var T = __webpack_require__(1);
|
|
1404
1422
|
|
|
1405
1423
|
var lodash_1 = __webpack_require__(3);
|
|
1406
1424
|
|
|
@@ -1590,7 +1608,60 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
1590
1608
|
|
|
1591
1609
|
/***/ }),
|
|
1592
1610
|
|
|
1593
|
-
/***/
|
|
1611
|
+
/***/ 4:
|
|
1612
|
+
/***/ (function(module, exports) {
|
|
1613
|
+
|
|
1614
|
+
module.exports = require("styled-components");
|
|
1615
|
+
|
|
1616
|
+
/***/ }),
|
|
1617
|
+
|
|
1618
|
+
/***/ 40:
|
|
1619
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1620
|
+
|
|
1621
|
+
"use strict";
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1625
|
+
value: true
|
|
1626
|
+
});
|
|
1627
|
+
exports.useDeepMemo = void 0;
|
|
1628
|
+
|
|
1629
|
+
var react_1 = __webpack_require__(0);
|
|
1630
|
+
|
|
1631
|
+
var lodash_1 = __webpack_require__(3);
|
|
1632
|
+
/**
|
|
1633
|
+
* This hook evaluates and stores the result of a passed function and only
|
|
1634
|
+
* re-evaluates the function when passed dependencies change.
|
|
1635
|
+
*
|
|
1636
|
+
* It is different from the internal React useMemo in the following aspects:
|
|
1637
|
+
* - it only stores the last evaluated result
|
|
1638
|
+
* - it uses a deep equality check to determine if dependencies have changed
|
|
1639
|
+
*
|
|
1640
|
+
* Inspired by apollo-client's useDeepMemo
|
|
1641
|
+
*
|
|
1642
|
+
* @param fn the function to be executed and
|
|
1643
|
+
* @param dependencies an array of dependencies
|
|
1644
|
+
*/
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1648
|
+
var ref = react_1.useRef();
|
|
1649
|
+
|
|
1650
|
+
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1651
|
+
ref.current = {
|
|
1652
|
+
dependencies: dependencies,
|
|
1653
|
+
value: fn()
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
return ref.current.value;
|
|
1658
|
+
};
|
|
1659
|
+
|
|
1660
|
+
exports.useDeepMemo = useDeepMemo;
|
|
1661
|
+
|
|
1662
|
+
/***/ }),
|
|
1663
|
+
|
|
1664
|
+
/***/ 400:
|
|
1594
1665
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1595
1666
|
|
|
1596
1667
|
"use strict";
|
|
@@ -1633,28 +1704,28 @@ Object.defineProperty(exports, "default", {
|
|
|
1633
1704
|
|
|
1634
1705
|
/***/ }),
|
|
1635
1706
|
|
|
1636
|
-
/***/
|
|
1707
|
+
/***/ 401:
|
|
1637
1708
|
/***/ (function(module, exports) {
|
|
1638
1709
|
|
|
1639
1710
|
module.exports = require("@splunk/react-ui/Heading");
|
|
1640
1711
|
|
|
1641
1712
|
/***/ }),
|
|
1642
1713
|
|
|
1643
|
-
/***/
|
|
1714
|
+
/***/ 402:
|
|
1644
1715
|
/***/ (function(module, exports) {
|
|
1645
1716
|
|
|
1646
1717
|
module.exports = require("@splunk/react-ui/List");
|
|
1647
1718
|
|
|
1648
1719
|
/***/ }),
|
|
1649
1720
|
|
|
1650
|
-
/***/
|
|
1721
|
+
/***/ 403:
|
|
1651
1722
|
/***/ (function(module, exports) {
|
|
1652
1723
|
|
|
1653
1724
|
module.exports = require("@splunk/react-ui/Code");
|
|
1654
1725
|
|
|
1655
1726
|
/***/ }),
|
|
1656
1727
|
|
|
1657
|
-
/***/
|
|
1728
|
+
/***/ 404:
|
|
1658
1729
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1659
1730
|
|
|
1660
1731
|
"use strict";
|
|
@@ -1680,6 +1751,7 @@ var configUtils_1 = __webpack_require__(17);
|
|
|
1680
1751
|
|
|
1681
1752
|
var BackgroundColor_1 = __webpack_require__(50);
|
|
1682
1753
|
|
|
1754
|
+
var FONT_OPTIONS = new Set(['extraSmall', 'small', 'default', 'large', 'extraLarge']);
|
|
1683
1755
|
var dataContract = {
|
|
1684
1756
|
requiredDataSources: [],
|
|
1685
1757
|
optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
|
|
@@ -1707,6 +1779,11 @@ var optionsSchema = {
|
|
|
1707
1779
|
default: 'transparent',
|
|
1708
1780
|
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
1709
1781
|
},
|
|
1782
|
+
customFontSize: {
|
|
1783
|
+
description: 'Specify the font size (in pixels) you would like to use for unformatted text when `fontSize` is set to `custom`. Header elements are calculated with the following formula: h1 = 2 × `customFontSize`, h2 = 1.5 × `customFontSize`, h3 = 1.25 × `customFontSize`',
|
|
1784
|
+
default: 14,
|
|
1785
|
+
type: 'number'
|
|
1786
|
+
},
|
|
1710
1787
|
fontColor: {
|
|
1711
1788
|
description: 'Specify the text color using Hex codes or RGBA values, such as "#FF0000" or "rgba(25,12,13,0.1)". The default for enterprise light is "#3c444d". The default for enterprise dark is "#FFFFFF". The default for prisma dark is "rgba(255, 255, 255, 0.7)".',
|
|
1712
1789
|
type: 'string',
|
|
@@ -1717,7 +1794,7 @@ var optionsSchema = {
|
|
|
1717
1794
|
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.',
|
|
1718
1795
|
type: 'string',
|
|
1719
1796
|
default: 'default',
|
|
1720
|
-
pattern: schemaUtils_1.getPattern(['extraSmall', 'small', 'default', 'large', 'extraLarge'])
|
|
1797
|
+
pattern: schemaUtils_1.getPattern(['extraSmall', 'small', 'default', 'large', 'extraLarge', 'custom'])
|
|
1721
1798
|
},
|
|
1722
1799
|
markdown: {
|
|
1723
1800
|
description: 'Add text using basic markdown syntax.',
|
|
@@ -1737,6 +1814,7 @@ var themes = {
|
|
|
1737
1814
|
};
|
|
1738
1815
|
var editorConfig = [{
|
|
1739
1816
|
label: i18n_1._('Markdown Settings'),
|
|
1817
|
+
open: true,
|
|
1740
1818
|
layout: [[{
|
|
1741
1819
|
label: '',
|
|
1742
1820
|
option: 'markdown',
|
|
@@ -1775,8 +1853,23 @@ var editorConfig = [{
|
|
|
1775
1853
|
}, {
|
|
1776
1854
|
label: i18n_1._('Extra Large'),
|
|
1777
1855
|
value: 'extraLarge'
|
|
1856
|
+
}, {
|
|
1857
|
+
label: i18n_1._('Custom'),
|
|
1858
|
+
value: 'custom'
|
|
1778
1859
|
}]
|
|
1779
1860
|
}
|
|
1861
|
+
}, {
|
|
1862
|
+
label: i18n_1._('Custom Font Size (px)'),
|
|
1863
|
+
option: 'customFontSize',
|
|
1864
|
+
editor: 'editor.number',
|
|
1865
|
+
editorProps: {
|
|
1866
|
+
min: 0,
|
|
1867
|
+
labelPosition: 'top'
|
|
1868
|
+
},
|
|
1869
|
+
showEditor: function showEditor(_ref) {
|
|
1870
|
+
var options = _ref.options;
|
|
1871
|
+
return options.fontSize && !FONT_OPTIONS.has(options.fontSize);
|
|
1872
|
+
}
|
|
1780
1873
|
}]]
|
|
1781
1874
|
}];
|
|
1782
1875
|
/**
|
|
@@ -1816,59 +1909,6 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
1816
1909
|
|
|
1817
1910
|
/***/ }),
|
|
1818
1911
|
|
|
1819
|
-
/***/ 4:
|
|
1820
|
-
/***/ (function(module, exports) {
|
|
1821
|
-
|
|
1822
|
-
module.exports = require("styled-components");
|
|
1823
|
-
|
|
1824
|
-
/***/ }),
|
|
1825
|
-
|
|
1826
|
-
/***/ 40:
|
|
1827
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1828
|
-
|
|
1829
|
-
"use strict";
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1833
|
-
value: true
|
|
1834
|
-
});
|
|
1835
|
-
exports.useDeepMemo = void 0;
|
|
1836
|
-
|
|
1837
|
-
var react_1 = __webpack_require__(1);
|
|
1838
|
-
|
|
1839
|
-
var lodash_1 = __webpack_require__(3);
|
|
1840
|
-
/**
|
|
1841
|
-
* This hook evaluates and stores the result of a passed function and only
|
|
1842
|
-
* re-evaluates the function when passed dependencies change.
|
|
1843
|
-
*
|
|
1844
|
-
* It is different from the internal React useMemo in the following aspects:
|
|
1845
|
-
* - it only stores the last evaluated result
|
|
1846
|
-
* - it uses a deep equality check to determine if dependencies have changed
|
|
1847
|
-
*
|
|
1848
|
-
* Inspired by apollo-client's useDeepMemo
|
|
1849
|
-
*
|
|
1850
|
-
* @param fn the function to be executed and
|
|
1851
|
-
* @param dependencies an array of dependencies
|
|
1852
|
-
*/
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1856
|
-
var ref = react_1.useRef();
|
|
1857
|
-
|
|
1858
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1859
|
-
ref.current = {
|
|
1860
|
-
dependencies: dependencies,
|
|
1861
|
-
value: fn()
|
|
1862
|
-
};
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
return ref.current.value;
|
|
1866
|
-
};
|
|
1867
|
-
|
|
1868
|
-
exports.useDeepMemo = useDeepMemo;
|
|
1869
|
-
|
|
1870
|
-
/***/ }),
|
|
1871
|
-
|
|
1872
1912
|
/***/ 41:
|
|
1873
1913
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1874
1914
|
|
|
@@ -1880,9 +1920,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1880
1920
|
});
|
|
1881
1921
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1882
1922
|
|
|
1883
|
-
var React = __webpack_require__(
|
|
1923
|
+
var React = __webpack_require__(0);
|
|
1884
1924
|
|
|
1885
|
-
var T = __webpack_require__(
|
|
1925
|
+
var T = __webpack_require__(1);
|
|
1886
1926
|
|
|
1887
1927
|
var i18n_1 = __webpack_require__(2);
|
|
1888
1928
|
|
|
@@ -1960,7 +2000,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1960
2000
|
value: true
|
|
1961
2001
|
});
|
|
1962
2002
|
|
|
1963
|
-
var React = __webpack_require__(
|
|
2003
|
+
var React = __webpack_require__(0);
|
|
1964
2004
|
|
|
1965
2005
|
var styled_components_1 = __webpack_require__(4);
|
|
1966
2006
|
|
|
@@ -1971,7 +2011,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1971
2011
|
componentId: "sc-1gsbnxb-0"
|
|
1972
2012
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1973
2013
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1974
|
-
'data-splunk-visualization-version': "25.
|
|
2014
|
+
'data-splunk-visualization-version': "25.3.0 - dae70ec02"
|
|
1975
2015
|
}).withConfig({
|
|
1976
2016
|
displayName: "withEditModeCover__Blocker",
|
|
1977
2017
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -2013,7 +2053,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2013
2053
|
value: true
|
|
2014
2054
|
});
|
|
2015
2055
|
|
|
2016
|
-
var React = __webpack_require__(
|
|
2056
|
+
var React = __webpack_require__(0);
|
|
2017
2057
|
|
|
2018
2058
|
var colorUtils_1 = __webpack_require__(12);
|
|
2019
2059
|
|
|
@@ -2158,7 +2198,14 @@ module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
|
2158
2198
|
|
|
2159
2199
|
/***/ }),
|
|
2160
2200
|
|
|
2161
|
-
/***/
|
|
2201
|
+
/***/ 81:
|
|
2202
|
+
/***/ (function(module, exports) {
|
|
2203
|
+
|
|
2204
|
+
module.exports = require("@splunk/visualization-encoding/utils/types");
|
|
2205
|
+
|
|
2206
|
+
/***/ }),
|
|
2207
|
+
|
|
2208
|
+
/***/ 86:
|
|
2162
2209
|
/***/ (function(module, exports) {
|
|
2163
2210
|
|
|
2164
2211
|
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|