@splunk/visualizations 26.4.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +1262 -1600
- package/Area.config.js.map +7 -1
- package/Area.js +3002 -4920
- package/Area.js.map +7 -1
- package/Bar.config.js +1247 -1574
- package/Bar.config.js.map +7 -1
- package/Bar.js +2924 -4836
- package/Bar.js.map +7 -1
- package/Bubble.config.js +896 -1213
- package/Bubble.config.js.map +7 -1
- package/Bubble.js +2520 -4476
- package/Bubble.js.map +7 -1
- package/ChoroplethSvg.config.js +282 -582
- package/ChoroplethSvg.config.js.map +7 -1
- package/ChoroplethSvg.js +2004 -3810
- package/ChoroplethSvg.js.map +7 -1
- package/Column.config.js +1208 -1541
- package/Column.config.js.map +7 -1
- package/Column.js +2933 -4879
- package/Column.js.map +7 -1
- package/Ellipse.config.js +443 -774
- package/Ellipse.config.js.map +7 -1
- package/Ellipse.js +1651 -3341
- package/Ellipse.js.map +7 -1
- package/Events.config.js +207 -492
- package/Events.config.js.map +7 -1
- package/Events.js +2615 -4649
- package/Events.js.map +7 -1
- package/FillerGauge.config.js +420 -775
- package/FillerGauge.config.js.map +7 -1
- package/FillerGauge.js +2137 -4578
- package/FillerGauge.js.map +7 -1
- package/Image.config.js +144 -411
- package/Image.config.js.map +7 -1
- package/Image.js +1395 -3048
- package/Image.js.map +7 -1
- package/Line.config.js +1278 -1625
- package/Line.config.js.map +7 -1
- package/Line.js +2957 -4919
- package/Line.js.map +7 -1
- package/LinkGraph.config.js +390 -632
- package/LinkGraph.config.js.map +7 -1
- package/LinkGraph.js +5243 -6190
- package/LinkGraph.js.map +7 -1
- package/MIGRATION.md +12 -0
- package/Map.config.js +501 -801
- package/Map.config.js.map +7 -1
- package/Map.js +3369 -5676
- package/Map.js.map +7 -1
- package/Markdown.config.js +232 -528
- package/Markdown.config.js.map +7 -1
- package/Markdown.js +1645 -3216
- package/Markdown.js.map +7 -1
- package/MarkerGauge.config.js +308 -613
- package/MarkerGauge.config.js.map +7 -1
- package/MarkerGauge.js +2189 -4535
- package/MarkerGauge.js.map +7 -1
- package/ParallelCoordinates.config.js +282 -581
- package/ParallelCoordinates.config.js.map +7 -1
- package/ParallelCoordinates.js +2023 -4720
- package/ParallelCoordinates.js.map +7 -1
- package/Pie.config.js +278 -547
- package/Pie.config.js.map +7 -1
- package/Pie.js +1998 -3982
- package/Pie.js.map +7 -1
- package/Punchcard.config.js +291 -578
- package/Punchcard.config.js.map +7 -1
- package/Punchcard.js +2709 -5042
- package/Punchcard.js.map +7 -1
- package/Rectangle.config.js +455 -770
- package/Rectangle.config.js.map +7 -1
- package/Rectangle.js +1638 -3262
- package/Rectangle.js.map +7 -1
- package/Sankey.config.js +291 -626
- package/Sankey.config.js.map +7 -1
- package/Sankey.js +2737 -4909
- package/Sankey.js.map +7 -1
- package/Scatter.config.js +876 -1194
- package/Scatter.config.js.map +7 -1
- package/Scatter.js +2532 -4470
- package/Scatter.js.map +7 -1
- package/SingleValue.config.js +819 -1251
- package/SingleValue.config.js.map +7 -1
- package/SingleValue.js +4203 -7413
- package/SingleValue.js.map +7 -1
- package/SingleValueBasic.js +382 -1527
- package/SingleValueBasic.js.map +7 -1
- package/SingleValueIcon.config.js +781 -1207
- package/SingleValueIcon.config.js.map +7 -1
- package/SingleValueIcon.js +3350 -6285
- package/SingleValueIcon.js.map +7 -1
- package/SingleValueRadial.config.js +708 -1119
- package/SingleValueRadial.config.js.map +7 -1
- package/SingleValueRadial.js +3808 -6965
- package/SingleValueRadial.js.map +7 -1
- package/SparkLine.js +439 -746
- package/SparkLine.js.map +7 -1
- package/Table.config.js +565 -887
- package/Table.config.js.map +7 -1
- package/Table.js +3277 -5386
- package/Table.js.map +7 -1
- package/common/Charting.js +484 -1462
- package/common/Charting.js.map +7 -1
- package/common/ChartingApi.js +46 -170
- package/common/ChartingApi.js.map +7 -1
- package/common/DocExampleWithVizSandbox.js +270 -473
- package/common/DocExampleWithVizSandbox.js.map +7 -1
- package/common/EventsDoc.js +172 -464
- package/common/EventsDoc.js.map +7 -1
- package/common/GaugeMajorTicks.js +249 -347
- package/common/GaugeMajorTicks.js.map +7 -1
- package/common/GaugeValueMarker.js +201 -311
- package/common/GaugeValueMarker.js.map +7 -1
- package/common/OptionsDoc.js +347 -912
- package/common/OptionsDoc.js.map +7 -1
- package/common/OverviewDoc.js +435 -769
- package/common/OverviewDoc.js.map +7 -1
- package/common/SplunkVisualization.js +116 -259
- package/common/SplunkVisualization.js.map +7 -1
- package/common/SplunkVisualizationApi.js +40 -156
- package/common/SplunkVisualizationApi.js.map +7 -1
- package/common/ThemesDoc.js +271 -420
- package/common/ThemesDoc.js.map +7 -1
- package/common/chartingUtils.js +140 -312
- package/common/chartingUtils.js.map +7 -1
- package/common/docUtils.js +148 -266
- package/common/docUtils.js.map +7 -1
- package/common/gaugeUtils.js +280 -808
- package/common/gaugeUtils.js.map +7 -1
- package/common/shapeUtils.js +106 -211
- package/common/shapeUtils.js.map +7 -1
- package/common/utils/configUtils.js +126 -252
- package/common/utils/configUtils.js.map +7 -1
- package/common/utils/dataUtils.js +217 -812
- package/common/utils/dataUtils.js.map +7 -1
- package/common/utils/featureFlagUtils.js +53 -133
- package/common/utils/featureFlagUtils.js.map +7 -1
- package/common/utils/hocUtils.js +32 -122
- package/common/utils/hocUtils.js.map +7 -1
- package/common/utils/mapUtils.js +502 -1337
- package/common/utils/mapUtils.js.map +7 -1
- package/common/utils/singleValueUtils.js +462 -1010
- package/common/utils/singleValueUtils.js.map +7 -1
- package/common/utils/testHelper.js +92 -146
- package/common/utils/testHelper.js.map +7 -1
- package/common/utils/trellisUtils.js +237 -489
- package/common/utils/trellisUtils.js.map +7 -1
- package/common/utils/urlUtils.js +28 -112
- package/common/utils/urlUtils.js.map +7 -1
- package/common/withDashboardViz.js +1168 -2438
- package/common/withDashboardViz.js.map +7 -1
- package/package.json +52 -43
package/LinkGraph.config.js
CHANGED
|
@@ -1,352 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
55
|
-
/******/ };
|
|
56
|
-
/******/
|
|
57
|
-
/******/ // create a fake namespace object
|
|
58
|
-
/******/ // mode & 1: value is a module id, require it
|
|
59
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
60
|
-
/******/ // mode & 4: return value when already ns object
|
|
61
|
-
/******/ // mode & 8|1: behave like require
|
|
62
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
63
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
64
|
-
/******/ if(mode & 8) return value;
|
|
65
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
66
|
-
/******/ var ns = Object.create(null);
|
|
67
|
-
/******/ __webpack_require__.r(ns);
|
|
68
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
69
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
70
|
-
/******/ return ns;
|
|
71
|
-
/******/ };
|
|
72
|
-
/******/
|
|
73
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
74
|
-
/******/ __webpack_require__.n = function(module) {
|
|
75
|
-
/******/ var getter = module && module.__esModule ?
|
|
76
|
-
/******/ function getDefault() { return module['default']; } :
|
|
77
|
-
/******/ function getModuleExports() { return module; };
|
|
78
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
79
|
-
/******/ return getter;
|
|
80
|
-
/******/ };
|
|
81
|
-
/******/
|
|
82
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
83
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
84
|
-
/******/
|
|
85
|
-
/******/ // __webpack_public_path__
|
|
86
|
-
/******/ __webpack_require__.p = "";
|
|
87
|
-
/******/
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s = 53);
|
|
91
|
-
/******/ })
|
|
92
|
-
/************************************************************************/
|
|
93
|
-
/******/ ({
|
|
94
|
-
|
|
95
|
-
/***/ 0:
|
|
96
|
-
/***/ (function(module, exports) {
|
|
97
|
-
|
|
98
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
99
|
-
|
|
100
|
-
/***/ }),
|
|
101
|
-
|
|
102
|
-
/***/ 1:
|
|
103
|
-
/***/ (function(module, exports) {
|
|
104
|
-
|
|
105
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
106
|
-
|
|
107
|
-
/***/ }),
|
|
108
|
-
|
|
109
|
-
/***/ 10:
|
|
110
|
-
/***/ (function(module, exports) {
|
|
111
|
-
|
|
112
|
-
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
113
|
-
|
|
114
|
-
/***/ }),
|
|
115
|
-
|
|
116
|
-
/***/ 11:
|
|
117
|
-
/***/ (function(module, exports) {
|
|
118
|
-
|
|
119
|
-
module.exports = require("@splunk/visualization-icons");
|
|
120
|
-
|
|
121
|
-
/***/ }),
|
|
122
|
-
|
|
123
|
-
/***/ 2:
|
|
124
|
-
/***/ (function(module, exports) {
|
|
125
|
-
|
|
126
|
-
module.exports = require("@splunk/visualization-schemas");
|
|
127
|
-
|
|
128
|
-
/***/ }),
|
|
129
|
-
|
|
130
|
-
/***/ 23:
|
|
131
|
-
/***/ (function(module, exports) {
|
|
132
|
-
|
|
133
|
-
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
134
|
-
|
|
135
|
-
/***/ }),
|
|
136
|
-
|
|
137
|
-
/***/ 3:
|
|
138
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
139
|
-
|
|
140
|
-
"use strict";
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
144
|
-
|
|
145
|
-
Object.defineProperty(exports, "__esModule", {
|
|
146
|
-
value: true
|
|
1
|
+
/* Copyright © 2020 Splunk Inc.
|
|
2
|
+
SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
3
|
+
in part without a valid written license from Splunk Inc. is PROHIBITED. */
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __export = (target, all) => {
|
|
28
|
+
for (var name in all)
|
|
29
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
30
|
+
};
|
|
31
|
+
var __copyProps = (to, from, except, desc) => {
|
|
32
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
33
|
+
for (let key of __getOwnPropNames(from))
|
|
34
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
35
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
41
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
42
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
43
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
44
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
45
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
46
|
+
mod
|
|
47
|
+
));
|
|
48
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
49
|
+
|
|
50
|
+
// src/LinkGraph/config.ts
|
|
51
|
+
var config_exports = {};
|
|
52
|
+
__export(config_exports, {
|
|
53
|
+
default: () => config_default
|
|
147
54
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var lodash_1 = __webpack_require__(5); // included for backwards compatibility
|
|
151
|
-
|
|
55
|
+
module.exports = __toCommonJS(config_exports);
|
|
152
56
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
57
|
+
// esm-externals:lodash
|
|
58
|
+
var lodash_exports = {};
|
|
59
|
+
__export(lodash_exports, {
|
|
60
|
+
default: () => lodash_default
|
|
61
|
+
});
|
|
62
|
+
var defaultImport = __toESM(require("lodash"));
|
|
63
|
+
__reExport(lodash_exports, require("lodash"));
|
|
64
|
+
var lodash_default = "default" in defaultImport ? defaultImport.default : defaultImport;
|
|
65
|
+
|
|
66
|
+
// esm-externals:@splunk/visualization-icons
|
|
67
|
+
var visualization_icons_exports = {};
|
|
68
|
+
__export(visualization_icons_exports, {
|
|
69
|
+
default: () => visualization_icons_default
|
|
70
|
+
});
|
|
71
|
+
var defaultImport2 = __toESM(require("@splunk/visualization-icons"));
|
|
72
|
+
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
73
|
+
var visualization_icons_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
|
|
74
|
+
|
|
75
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
76
|
+
var placeholders_exports = {};
|
|
77
|
+
__export(placeholders_exports, {
|
|
78
|
+
default: () => placeholders_default
|
|
79
|
+
});
|
|
80
|
+
var defaultImport3 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
81
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
82
|
+
var placeholders_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
|
|
83
|
+
|
|
84
|
+
// esm-externals:@splunk/visualization-schemas
|
|
85
|
+
var visualization_schemas_exports = {};
|
|
86
|
+
__export(visualization_schemas_exports, {
|
|
87
|
+
default: () => visualization_schemas_default
|
|
88
|
+
});
|
|
89
|
+
var defaultImport4 = __toESM(require("@splunk/visualization-schemas"));
|
|
90
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
91
|
+
var visualization_schemas_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
|
|
92
|
+
|
|
93
|
+
// esm-externals:@splunk/ui-utils/i18n
|
|
94
|
+
var i18n_exports = {};
|
|
95
|
+
__export(i18n_exports, {
|
|
96
|
+
default: () => i18n_default
|
|
160
97
|
});
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
98
|
+
var defaultImport5 = __toESM(require("@splunk/ui-utils/i18n"));
|
|
99
|
+
__reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
|
|
100
|
+
var i18n_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
|
|
101
|
+
|
|
102
|
+
// esm-externals:@splunk/themes/pick
|
|
103
|
+
var pick_exports = {};
|
|
104
|
+
__export(pick_exports, {
|
|
105
|
+
default: () => pick_default
|
|
106
|
+
});
|
|
107
|
+
var defaultImport6 = __toESM(require("@splunk/themes/pick"));
|
|
108
|
+
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
109
|
+
var pick_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
110
|
+
|
|
111
|
+
// esm-externals:@splunk/themes/variables
|
|
112
|
+
var variables_exports = {};
|
|
113
|
+
__export(variables_exports, {
|
|
114
|
+
default: () => variables_default
|
|
115
|
+
});
|
|
116
|
+
var defaultImport7 = __toESM(require("@splunk/themes/variables"));
|
|
117
|
+
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
118
|
+
var variables_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
119
|
+
|
|
120
|
+
// esm-externals:@splunk/visualizations-shared/colorConstants
|
|
121
|
+
var colorConstants_exports = {};
|
|
122
|
+
__export(colorConstants_exports, {
|
|
123
|
+
default: () => colorConstants_default
|
|
124
|
+
});
|
|
125
|
+
var defaultImport8 = __toESM(require("@splunk/visualizations-shared/colorConstants"));
|
|
126
|
+
__reExport(colorConstants_exports, require("@splunk/visualizations-shared/colorConstants"));
|
|
127
|
+
var colorConstants_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
128
|
+
|
|
129
|
+
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
130
|
+
var configUtils_exports = {};
|
|
131
|
+
__export(configUtils_exports, {
|
|
132
|
+
default: () => configUtils_default
|
|
133
|
+
});
|
|
134
|
+
var defaultImport9 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
135
|
+
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
136
|
+
var configUtils_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
168
137
|
|
|
138
|
+
// src/common/utils/configUtils.ts
|
|
169
139
|
function enhanceConfig(vizConfig) {
|
|
170
|
-
|
|
171
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
172
|
-
|
|
173
|
-
open:
|
|
174
|
-
}
|
|
175
|
-
|
|
140
|
+
const enhancedConfig = __spreadValues({}, vizConfig);
|
|
141
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
142
|
+
(config2) => {
|
|
143
|
+
return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
|
|
144
|
+
}
|
|
145
|
+
);
|
|
176
146
|
return enhancedConfig;
|
|
177
147
|
}
|
|
178
148
|
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
182
|
-
* Created for editor unit tests
|
|
183
|
-
* @param vizConfig a Visualization Config
|
|
184
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
188
|
-
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
189
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
190
|
-
return Object.assign(Object.assign({}, config), {
|
|
191
|
-
open: true
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
return editorPanelUncollapsedConfig;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
198
|
-
|
|
199
|
-
function isDynamicOption(option) {
|
|
200
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
204
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
208
|
-
* 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
|
|
209
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
210
|
-
* 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
|
|
211
|
-
*
|
|
212
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
function hasCompatibleContexts(vizContext, presetContext) {
|
|
216
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
217
|
-
return presetContextKeys.every(function (contextKey) {
|
|
218
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
227
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
228
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
229
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
234
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
235
|
-
*
|
|
236
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
237
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
238
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
243
|
-
return presets.find(function (preset) {
|
|
244
|
-
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
245
|
-
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
246
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
247
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
248
|
-
// if not, then the preset is invalid in config.ts
|
|
249
|
-
|
|
250
|
-
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
251
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
exports.getInitialPreset = getInitialPreset;
|
|
256
|
-
/**
|
|
257
|
-
* generates number precision values for a Select editor
|
|
258
|
-
*
|
|
259
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
260
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
function generatePrecisionValues(numPrecisionValues) {
|
|
264
|
-
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
265
|
-
return {
|
|
266
|
-
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
267
|
-
value: i
|
|
268
|
-
};
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
exports.generatePrecisionValues = generatePrecisionValues;
|
|
273
|
-
/**
|
|
274
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
275
|
-
*
|
|
276
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
277
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
278
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
279
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
283
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
284
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
exports.insertLayout = insertLayout;
|
|
291
|
-
|
|
292
|
-
/***/ }),
|
|
293
|
-
|
|
294
|
-
/***/ 5:
|
|
295
|
-
/***/ (function(module, exports) {
|
|
296
|
-
|
|
297
|
-
module.exports = require("lodash");
|
|
298
|
-
|
|
299
|
-
/***/ }),
|
|
300
|
-
|
|
301
|
-
/***/ 53:
|
|
302
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
303
|
-
|
|
304
|
-
"use strict";
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
308
|
-
|
|
309
|
-
Object.defineProperty(exports, "__esModule", {
|
|
310
|
-
value: true
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
var lodash_1 = __webpack_require__(5);
|
|
314
|
-
|
|
315
|
-
var visualization_icons_1 = __webpack_require__(11);
|
|
316
|
-
|
|
317
|
-
var placeholders_1 = __webpack_require__(10);
|
|
318
|
-
|
|
319
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
320
|
-
|
|
321
|
-
var i18n_1 = __webpack_require__(0);
|
|
322
|
-
|
|
323
|
-
var pick_1 = __webpack_require__(8);
|
|
324
|
-
|
|
325
|
-
var variables_1 = __webpack_require__(9);
|
|
326
|
-
|
|
327
|
-
var colorConstants_1 = __webpack_require__(23);
|
|
328
|
-
|
|
329
|
-
var configUtils_1 = __webpack_require__(3);
|
|
330
|
-
|
|
331
|
-
var VizCategory_1 = __webpack_require__(7);
|
|
332
|
-
|
|
333
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
334
|
-
|
|
149
|
+
// src/LinkGraph/config.ts
|
|
335
150
|
var dataContract = {
|
|
336
|
-
requiredDataSources: [
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
151
|
+
requiredDataSources: [
|
|
152
|
+
{
|
|
153
|
+
name: "primary",
|
|
154
|
+
description: "DataSource that powers the visualization"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
optionalDataSources: [
|
|
158
|
+
// {
|
|
341
159
|
// name: 'metadata',
|
|
342
160
|
// description: 'Used buy the ES team along side the feature flag `LinkGraph.showNodeMetaData`',
|
|
343
161
|
// },
|
|
344
162
|
],
|
|
345
163
|
initialRequestParams: {
|
|
346
|
-
primary: {
|
|
347
|
-
offset: 0,
|
|
348
|
-
count: 10000
|
|
349
|
-
}
|
|
164
|
+
primary: { offset: 0, count: 1e4 }
|
|
350
165
|
}
|
|
351
166
|
};
|
|
352
167
|
var size = {
|
|
@@ -355,323 +170,266 @@ var size = {
|
|
|
355
170
|
};
|
|
356
171
|
var defaultContext = {
|
|
357
172
|
nodeTextColorMaxContrast: {
|
|
358
|
-
colors: [
|
|
359
|
-
default:
|
|
173
|
+
colors: ["> themes.textColor", "> themes.inverseTextColor"],
|
|
174
|
+
default: "> themes.textColor"
|
|
360
175
|
},
|
|
361
176
|
nodeHighlightTextColorMaxContrast: {
|
|
362
|
-
colors: [
|
|
363
|
-
default:
|
|
177
|
+
colors: ["> themes.defaultNodeColor", "> themes.inverseDefaultNodeColor"],
|
|
178
|
+
default: "> themes.textColor"
|
|
364
179
|
}
|
|
365
180
|
};
|
|
366
181
|
var themes = {
|
|
367
|
-
defaultBackgroundColor:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
182
|
+
defaultBackgroundColor: (props) => pick_default({
|
|
183
|
+
enterprise: {
|
|
184
|
+
dark: variables_default.black(props),
|
|
185
|
+
light: variables_default.backgroundColor(props)
|
|
186
|
+
},
|
|
187
|
+
prisma: variables_default.backgroundColorSidebar(props)
|
|
188
|
+
})(props),
|
|
189
|
+
defaultNodeColor: (props) => pick_default({
|
|
190
|
+
enterprise: {
|
|
191
|
+
dark: variables_default.backgroundColorDialog(props),
|
|
192
|
+
light: variables_default.gray96(props)
|
|
193
|
+
},
|
|
194
|
+
prisma: variables_default.backgroundColorDialog(props)
|
|
195
|
+
})(props),
|
|
196
|
+
inverseDefaultNodeColor: (props) => pick_default({
|
|
197
|
+
enterprise: {
|
|
198
|
+
dark: variables_default.contentColorInverted(props),
|
|
199
|
+
// equal to textColor in enterprise
|
|
200
|
+
light: variables_default.white(props)
|
|
201
|
+
// equal to textColor in enterpriseDark
|
|
202
|
+
},
|
|
203
|
+
prisma: variables_default.contentColorInverted(props)
|
|
204
|
+
})(props),
|
|
205
|
+
textColor: (props) => pick_default({
|
|
206
|
+
enterprise: variables_default.textColor(props),
|
|
207
|
+
prisma: variables_default.contentColorDefault(props)
|
|
208
|
+
})(props),
|
|
209
|
+
inverseTextColor: (props) => pick_default({
|
|
210
|
+
enterprise: {
|
|
211
|
+
dark: variables_default.contentColorInverted(props),
|
|
212
|
+
// equal to textColor in enterprise
|
|
213
|
+
light: variables_default.white(props)
|
|
214
|
+
// equal to textColor in enterpriseDark
|
|
215
|
+
},
|
|
216
|
+
prisma: variables_default.contentColorInverted(props)
|
|
217
|
+
})(props)
|
|
218
|
+
};
|
|
219
|
+
var EDITOR_LABEL_WIDTH = 140;
|
|
220
|
+
var backgroundColorPaletteSet = /* @__PURE__ */ new Set([
|
|
221
|
+
...colorConstants_exports.COLOR_EDITOR_PALETTE,
|
|
222
|
+
...(0, lodash_exports.map)(themes, (t) => (0, lodash_exports.get)(t, "defaultBackgroundColor"))
|
|
223
|
+
]);
|
|
224
|
+
var editorConfig = [
|
|
225
|
+
// {
|
|
226
|
+
// label: _('Data'),
|
|
227
|
+
// layout: [
|
|
228
|
+
// [
|
|
229
|
+
// {
|
|
230
|
+
// label: _('Field Ordering'),
|
|
231
|
+
// option: 'fieldOrder',
|
|
232
|
+
// editor: 'editor.arrayOfStrings',
|
|
233
|
+
// editorProps: {
|
|
234
|
+
// themes,
|
|
235
|
+
// labelPosition: 'top',
|
|
236
|
+
// },
|
|
237
|
+
// },
|
|
238
|
+
// ],
|
|
239
|
+
// ],
|
|
240
|
+
// },
|
|
241
|
+
{
|
|
242
|
+
label: (0, i18n_exports._)("Data configurations"),
|
|
243
|
+
layout: [
|
|
244
|
+
[
|
|
245
|
+
{
|
|
246
|
+
label: (0, i18n_exports._)("Result limit"),
|
|
247
|
+
option: "resultLimit",
|
|
248
|
+
editor: "editor.number",
|
|
249
|
+
editorProps: {
|
|
250
|
+
themes,
|
|
251
|
+
min: 0,
|
|
252
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
]
|
|
394
257
|
},
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
258
|
+
{
|
|
259
|
+
label: (0, i18n_exports._)("Data display"),
|
|
260
|
+
layout: [
|
|
261
|
+
[
|
|
262
|
+
{
|
|
263
|
+
label: (0, i18n_exports._)("Show node counts"),
|
|
264
|
+
option: "showNodeCounts",
|
|
265
|
+
editor: "editor.checkbox",
|
|
266
|
+
editorProps: {
|
|
267
|
+
themes,
|
|
268
|
+
labelWidth: 130,
|
|
269
|
+
palette: [...backgroundColorPaletteSet]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
{
|
|
275
|
+
label: (0, i18n_exports._)("Show value counts"),
|
|
276
|
+
option: "showValueCounts",
|
|
277
|
+
editor: "editor.checkbox",
|
|
278
|
+
editorProps: {
|
|
279
|
+
themes,
|
|
280
|
+
labelWidth: 130,
|
|
281
|
+
palette: [...backgroundColorPaletteSet]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
]
|
|
400
286
|
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
287
|
+
{
|
|
288
|
+
label: (0, i18n_exports._)("Color and style"),
|
|
289
|
+
layout: [
|
|
290
|
+
[
|
|
291
|
+
{
|
|
292
|
+
label: (0, i18n_exports._)("Nodes"),
|
|
293
|
+
option: "nodeColor",
|
|
294
|
+
editor: "editor.color",
|
|
295
|
+
editorProps: {
|
|
296
|
+
themes,
|
|
297
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
298
|
+
palette: [...backgroundColorPaletteSet]
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
[
|
|
303
|
+
{
|
|
304
|
+
label: (0, i18n_exports._)("Selected nodes"),
|
|
305
|
+
option: "nodeHighlightColor",
|
|
306
|
+
editor: "editor.color",
|
|
307
|
+
editorProps: {
|
|
308
|
+
themes,
|
|
309
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
310
|
+
palette: [...backgroundColorPaletteSet]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
[
|
|
315
|
+
{
|
|
316
|
+
label: (0, i18n_exports._)("Links"),
|
|
317
|
+
option: "linkColor",
|
|
318
|
+
editor: "editor.color",
|
|
319
|
+
editorProps: {
|
|
320
|
+
themes,
|
|
321
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
322
|
+
palette: [...backgroundColorPaletteSet]
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
[
|
|
327
|
+
{
|
|
328
|
+
label: (0, i18n_exports._)("Background color"),
|
|
329
|
+
option: "backgroundColor",
|
|
330
|
+
editor: "editor.color",
|
|
331
|
+
editorProps: {
|
|
332
|
+
themes,
|
|
333
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
334
|
+
palette: [...backgroundColorPaletteSet]
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
[
|
|
339
|
+
{
|
|
340
|
+
label: (0, i18n_exports._)("Node width"),
|
|
341
|
+
option: "nodeWidth",
|
|
342
|
+
editor: "editor.number",
|
|
343
|
+
editorProps: {
|
|
344
|
+
themes,
|
|
345
|
+
labelPosition: "top",
|
|
346
|
+
min: 0,
|
|
347
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
label: (0, i18n_exports._)("Node height"),
|
|
352
|
+
option: "nodeHeight",
|
|
353
|
+
editor: "editor.number",
|
|
354
|
+
editorProps: {
|
|
355
|
+
themes,
|
|
356
|
+
labelPosition: "top",
|
|
357
|
+
min: 0,
|
|
358
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
[
|
|
363
|
+
{
|
|
364
|
+
label: (0, i18n_exports._)("Vertical spacing"),
|
|
365
|
+
option: "nodeSpacingY",
|
|
366
|
+
editor: "editor.number",
|
|
367
|
+
editorProps: {
|
|
368
|
+
themes,
|
|
369
|
+
labelPosition: "top",
|
|
370
|
+
min: 0,
|
|
371
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
label: (0, i18n_exports._)("Horizontal spacing"),
|
|
376
|
+
option: "nodeSpacingX",
|
|
377
|
+
editor: "editor.number",
|
|
378
|
+
editorProps: {
|
|
379
|
+
themes,
|
|
380
|
+
labelPosition: "top",
|
|
381
|
+
min: 0,
|
|
382
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
[
|
|
387
|
+
{
|
|
388
|
+
label: (0, i18n_exports._)("Link width"),
|
|
389
|
+
option: "linkWidth",
|
|
390
|
+
editor: "editor.number",
|
|
391
|
+
editorProps: {
|
|
392
|
+
themes,
|
|
393
|
+
labelPosition: "top",
|
|
394
|
+
min: 0,
|
|
395
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
]
|
|
410
400
|
}
|
|
411
|
-
|
|
412
|
-
var EDITOR_LABEL_WIDTH = 140;
|
|
413
|
-
var backgroundColorPaletteSet = new Set([].concat(_toConsumableArray(colorConstants_1.COLOR_EDITOR_PALETTE), _toConsumableArray((0, lodash_1.map)(themes, function (t) {
|
|
414
|
-
return (0, lodash_1.get)(t, 'defaultBackgroundColor');
|
|
415
|
-
}))));
|
|
416
|
-
var editorConfig = [// {
|
|
417
|
-
// label: _('Data'),
|
|
418
|
-
// layout: [
|
|
419
|
-
// [
|
|
420
|
-
// {
|
|
421
|
-
// label: _('Field Ordering'),
|
|
422
|
-
// option: 'fieldOrder',
|
|
423
|
-
// editor: 'editor.arrayOfStrings',
|
|
424
|
-
// editorProps: {
|
|
425
|
-
// themes,
|
|
426
|
-
// labelPosition: 'top',
|
|
427
|
-
// },
|
|
428
|
-
// },
|
|
429
|
-
// ],
|
|
430
|
-
// ],
|
|
431
|
-
// },
|
|
432
|
-
{
|
|
433
|
-
label: (0, i18n_1._)('Data configurations'),
|
|
434
|
-
layout: [[{
|
|
435
|
-
label: (0, i18n_1._)('Result limit'),
|
|
436
|
-
option: 'resultLimit',
|
|
437
|
-
editor: 'editor.number',
|
|
438
|
-
editorProps: {
|
|
439
|
-
themes: themes,
|
|
440
|
-
min: 0,
|
|
441
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
442
|
-
}
|
|
443
|
-
}]]
|
|
444
|
-
}, {
|
|
445
|
-
label: (0, i18n_1._)('Data display'),
|
|
446
|
-
layout: [[{
|
|
447
|
-
label: (0, i18n_1._)('Show node counts'),
|
|
448
|
-
option: 'showNodeCounts',
|
|
449
|
-
editor: 'editor.checkbox',
|
|
450
|
-
editorProps: {
|
|
451
|
-
themes: themes,
|
|
452
|
-
labelWidth: 130,
|
|
453
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
454
|
-
}
|
|
455
|
-
}], [{
|
|
456
|
-
label: (0, i18n_1._)('Show value counts'),
|
|
457
|
-
option: 'showValueCounts',
|
|
458
|
-
editor: 'editor.checkbox',
|
|
459
|
-
editorProps: {
|
|
460
|
-
themes: themes,
|
|
461
|
-
labelWidth: 130,
|
|
462
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
463
|
-
}
|
|
464
|
-
}]]
|
|
465
|
-
}, {
|
|
466
|
-
label: (0, i18n_1._)('Color and style'),
|
|
467
|
-
layout: [[{
|
|
468
|
-
label: (0, i18n_1._)('Nodes'),
|
|
469
|
-
option: 'nodeColor',
|
|
470
|
-
editor: 'editor.color',
|
|
471
|
-
editorProps: {
|
|
472
|
-
themes: themes,
|
|
473
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
474
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
475
|
-
}
|
|
476
|
-
}], [{
|
|
477
|
-
label: (0, i18n_1._)('Selected nodes'),
|
|
478
|
-
option: 'nodeHighlightColor',
|
|
479
|
-
editor: 'editor.color',
|
|
480
|
-
editorProps: {
|
|
481
|
-
themes: themes,
|
|
482
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
483
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
484
|
-
}
|
|
485
|
-
}], [{
|
|
486
|
-
label: (0, i18n_1._)('Links'),
|
|
487
|
-
option: 'linkColor',
|
|
488
|
-
editor: 'editor.color',
|
|
489
|
-
editorProps: {
|
|
490
|
-
themes: themes,
|
|
491
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
492
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
493
|
-
}
|
|
494
|
-
}], [{
|
|
495
|
-
label: (0, i18n_1._)('Background color'),
|
|
496
|
-
option: 'backgroundColor',
|
|
497
|
-
editor: 'editor.color',
|
|
498
|
-
editorProps: {
|
|
499
|
-
themes: themes,
|
|
500
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
501
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
502
|
-
}
|
|
503
|
-
}], [{
|
|
504
|
-
label: (0, i18n_1._)('Node width'),
|
|
505
|
-
option: 'nodeWidth',
|
|
506
|
-
editor: 'editor.number',
|
|
507
|
-
editorProps: {
|
|
508
|
-
themes: themes,
|
|
509
|
-
labelPosition: 'top',
|
|
510
|
-
min: 0,
|
|
511
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
512
|
-
}
|
|
513
|
-
}, {
|
|
514
|
-
label: (0, i18n_1._)('Node height'),
|
|
515
|
-
option: 'nodeHeight',
|
|
516
|
-
editor: 'editor.number',
|
|
517
|
-
editorProps: {
|
|
518
|
-
themes: themes,
|
|
519
|
-
labelPosition: 'top',
|
|
520
|
-
min: 0,
|
|
521
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
522
|
-
}
|
|
523
|
-
}], [{
|
|
524
|
-
label: (0, i18n_1._)('Vertical spacing'),
|
|
525
|
-
option: 'nodeSpacingY',
|
|
526
|
-
editor: 'editor.number',
|
|
527
|
-
editorProps: {
|
|
528
|
-
themes: themes,
|
|
529
|
-
labelPosition: 'top',
|
|
530
|
-
min: 0,
|
|
531
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
532
|
-
}
|
|
533
|
-
}, {
|
|
534
|
-
label: (0, i18n_1._)('Horizontal spacing'),
|
|
535
|
-
option: 'nodeSpacingX',
|
|
536
|
-
editor: 'editor.number',
|
|
537
|
-
editorProps: {
|
|
538
|
-
themes: themes,
|
|
539
|
-
labelPosition: 'top',
|
|
540
|
-
min: 0,
|
|
541
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
542
|
-
}
|
|
543
|
-
}], [{
|
|
544
|
-
label: (0, i18n_1._)('Link width'),
|
|
545
|
-
option: 'linkWidth',
|
|
546
|
-
editor: 'editor.number',
|
|
547
|
-
editorProps: {
|
|
548
|
-
themes: themes,
|
|
549
|
-
labelPosition: 'top',
|
|
550
|
-
min: 0,
|
|
551
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
552
|
-
}
|
|
553
|
-
}]]
|
|
554
|
-
}];
|
|
401
|
+
];
|
|
555
402
|
var config = {
|
|
556
403
|
/**
|
|
557
404
|
* unique viz key
|
|
558
405
|
*/
|
|
559
|
-
key:
|
|
560
|
-
|
|
406
|
+
key: "splunk.linkgraph",
|
|
561
407
|
/**
|
|
562
408
|
* viz name
|
|
563
409
|
*/
|
|
564
|
-
name: (0,
|
|
565
|
-
category:
|
|
566
|
-
status:
|
|
567
|
-
|
|
410
|
+
name: (0, i18n_exports._)("Link graph"),
|
|
411
|
+
category: "Flow" /* FLOW */,
|
|
412
|
+
status: "preview",
|
|
568
413
|
/**
|
|
569
414
|
* viz icon
|
|
570
415
|
*/
|
|
571
|
-
icon:
|
|
572
|
-
placeholderIcon:
|
|
573
|
-
dataContract
|
|
574
|
-
size
|
|
575
|
-
defaultContext
|
|
576
|
-
optionsSchema:
|
|
577
|
-
editorConfig
|
|
416
|
+
icon: visualization_icons_exports.LinkGraph,
|
|
417
|
+
placeholderIcon: placeholders_exports.LinkGraph,
|
|
418
|
+
dataContract,
|
|
419
|
+
size,
|
|
420
|
+
defaultContext,
|
|
421
|
+
optionsSchema: visualization_schemas_exports.linkGraphOptionsSchema,
|
|
422
|
+
editorConfig,
|
|
578
423
|
events: {
|
|
579
|
-
|
|
580
|
-
description:
|
|
424
|
+
"node.click": {
|
|
425
|
+
description: "triggered when user clicks a node"
|
|
581
426
|
},
|
|
582
|
-
|
|
583
|
-
description:
|
|
427
|
+
"node.mouseover": {
|
|
428
|
+
description: "triggered when user hovers over a node"
|
|
584
429
|
}
|
|
585
430
|
},
|
|
586
|
-
supports: [
|
|
587
|
-
themes
|
|
431
|
+
supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "events" /* EVENTS */, "placeholder" /* PLACEHOLDER */],
|
|
432
|
+
themes
|
|
588
433
|
};
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
/***/ }),
|
|
592
|
-
|
|
593
|
-
/***/ 6:
|
|
594
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
595
|
-
|
|
596
|
-
"use strict";
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
Object.defineProperty(exports, "__esModule", {
|
|
600
|
-
value: true
|
|
601
|
-
});
|
|
602
|
-
exports.VizBehavior = void 0;
|
|
603
|
-
var VizBehavior;
|
|
604
|
-
|
|
605
|
-
(function (VizBehavior) {
|
|
606
|
-
/**
|
|
607
|
-
* Dynamic Options Behavior.
|
|
608
|
-
* This allows visualization options to be powered by data
|
|
609
|
-
*
|
|
610
|
-
* **Example**
|
|
611
|
-
*
|
|
612
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
613
|
-
* would configure sparklineValues with an array of data points
|
|
614
|
-
* coming from the first series in the primary datasource
|
|
615
|
-
*
|
|
616
|
-
*/
|
|
617
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
618
|
-
VizBehavior["EVENTS"] = "events";
|
|
619
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
620
|
-
/**
|
|
621
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
622
|
-
* missing.
|
|
623
|
-
* @type {string}
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
627
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
628
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
629
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
630
|
-
|
|
631
|
-
/***/ }),
|
|
632
|
-
|
|
633
|
-
/***/ 7:
|
|
634
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
635
|
-
|
|
636
|
-
"use strict";
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
Object.defineProperty(exports, "__esModule", {
|
|
640
|
-
value: true
|
|
641
|
-
});
|
|
642
|
-
exports.VizCategory = void 0;
|
|
643
|
-
var VizCategory;
|
|
644
|
-
|
|
645
|
-
(function (VizCategory) {
|
|
646
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
647
|
-
VizCategory["TRENDS"] = "Trends";
|
|
648
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
649
|
-
VizCategory["TABLE"] = "Table";
|
|
650
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
651
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
652
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
653
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
654
|
-
VizCategory["MISC"] = "misc";
|
|
655
|
-
VizCategory["FLOW"] = "Flow";
|
|
656
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
657
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
658
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
659
|
-
|
|
660
|
-
/***/ }),
|
|
661
|
-
|
|
662
|
-
/***/ 8:
|
|
663
|
-
/***/ (function(module, exports) {
|
|
664
|
-
|
|
665
|
-
module.exports = require("@splunk/themes/pick");
|
|
666
|
-
|
|
667
|
-
/***/ }),
|
|
668
|
-
|
|
669
|
-
/***/ 9:
|
|
670
|
-
/***/ (function(module, exports) {
|
|
671
|
-
|
|
672
|
-
module.exports = require("@splunk/themes/variables");
|
|
673
|
-
|
|
674
|
-
/***/ })
|
|
675
|
-
|
|
676
|
-
/******/ });
|
|
677
|
-
//# sourceMappingURL=LinkGraph.config.js.map
|
|
434
|
+
var config_default = enhanceConfig(config);
|
|
435
|
+
//# sourceMappingURL=LinkGraph.config.js.map
|