@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
|
@@ -1,833 +1,495 @@
|
|
|
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 = 70);
|
|
91
|
-
/******/ })
|
|
92
|
-
/************************************************************************/
|
|
93
|
-
/******/ ([
|
|
94
|
-
/* 0 */
|
|
95
|
-
/***/ (function(module, exports) {
|
|
96
|
-
|
|
97
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
98
|
-
|
|
99
|
-
/***/ }),
|
|
100
|
-
/* 1 */
|
|
101
|
-
/***/ (function(module, exports) {
|
|
102
|
-
|
|
103
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
104
|
-
|
|
105
|
-
/***/ }),
|
|
106
|
-
/* 2 */
|
|
107
|
-
/***/ (function(module, exports) {
|
|
108
|
-
|
|
109
|
-
module.exports = require("@splunk/visualization-schemas");
|
|
110
|
-
|
|
111
|
-
/***/ }),
|
|
112
|
-
/* 3 */
|
|
113
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
114
|
-
|
|
115
|
-
"use strict";
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
119
|
-
|
|
120
|
-
Object.defineProperty(exports, "__esModule", {
|
|
121
|
-
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/SingleValueRadial/config.ts
|
|
51
|
+
var config_exports = {};
|
|
52
|
+
__export(config_exports, {
|
|
53
|
+
default: () => config_default
|
|
122
54
|
});
|
|
123
|
-
|
|
55
|
+
module.exports = __toCommonJS(config_exports);
|
|
124
56
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
|
|
131
|
-
enumerable: true,
|
|
132
|
-
get: function get() {
|
|
133
|
-
return visualization_schemas_1.enhanceOptionsSchemaWithDynamicOptions;
|
|
134
|
-
}
|
|
57
|
+
// esm-externals:@splunk/ui-utils/i18n
|
|
58
|
+
var i18n_exports = {};
|
|
59
|
+
__export(i18n_exports, {
|
|
60
|
+
default: () => i18n_default
|
|
135
61
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
62
|
+
var defaultImport = __toESM(require("@splunk/ui-utils/i18n"));
|
|
63
|
+
__reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
|
|
64
|
+
var i18n_default = "default" in defaultImport ? defaultImport.default : defaultImport;
|
|
65
|
+
|
|
66
|
+
// esm-externals:@splunk/visualization-schemas
|
|
67
|
+
var visualization_schemas_exports = {};
|
|
68
|
+
__export(visualization_schemas_exports, {
|
|
69
|
+
default: () => visualization_schemas_default
|
|
70
|
+
});
|
|
71
|
+
var defaultImport2 = __toESM(require("@splunk/visualization-schemas"));
|
|
72
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
73
|
+
var visualization_schemas_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
|
|
74
|
+
|
|
75
|
+
// esm-externals:@splunk/themes/pick
|
|
76
|
+
var pick_exports = {};
|
|
77
|
+
__export(pick_exports, {
|
|
78
|
+
default: () => pick_default
|
|
79
|
+
});
|
|
80
|
+
var defaultImport3 = __toESM(require("@splunk/themes/pick"));
|
|
81
|
+
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
82
|
+
var pick_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
|
|
83
|
+
|
|
84
|
+
// esm-externals:@splunk/themes/variables
|
|
85
|
+
var variables_exports = {};
|
|
86
|
+
__export(variables_exports, {
|
|
87
|
+
default: () => variables_default
|
|
88
|
+
});
|
|
89
|
+
var defaultImport4 = __toESM(require("@splunk/themes/variables"));
|
|
90
|
+
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
91
|
+
var variables_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
|
|
92
|
+
|
|
93
|
+
// esm-externals:@splunk/visualization-color-palettes/editors/PresetPalettes
|
|
94
|
+
var PresetPalettes_exports = {};
|
|
95
|
+
__export(PresetPalettes_exports, {
|
|
96
|
+
default: () => PresetPalettes_default
|
|
97
|
+
});
|
|
98
|
+
var defaultImport5 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
99
|
+
__reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
100
|
+
var PresetPalettes_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
|
|
101
|
+
|
|
102
|
+
// esm-externals:@splunk/visualization-icons
|
|
103
|
+
var visualization_icons_exports = {};
|
|
104
|
+
__export(visualization_icons_exports, {
|
|
105
|
+
default: () => visualization_icons_default
|
|
106
|
+
});
|
|
107
|
+
var defaultImport6 = __toESM(require("@splunk/visualization-icons"));
|
|
108
|
+
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
109
|
+
var visualization_icons_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
110
|
+
|
|
111
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
112
|
+
var placeholders_exports = {};
|
|
113
|
+
__export(placeholders_exports, {
|
|
114
|
+
default: () => placeholders_default
|
|
115
|
+
});
|
|
116
|
+
var defaultImport7 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
117
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
118
|
+
var placeholders_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
119
|
+
|
|
120
|
+
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
121
|
+
var configUtils_exports = {};
|
|
122
|
+
__export(configUtils_exports, {
|
|
123
|
+
default: () => configUtils_default
|
|
124
|
+
});
|
|
125
|
+
var defaultImport8 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
126
|
+
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
127
|
+
var configUtils_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
128
|
+
|
|
129
|
+
// src/common/editorConfig/StaticMajorAndTrendLayout.js
|
|
130
|
+
var StaticMajorAndTrendLayout = [
|
|
131
|
+
[
|
|
132
|
+
{
|
|
133
|
+
label: (0, i18n_exports._)("Unit position"),
|
|
134
|
+
// todo: we need a new editor combining unit and position
|
|
135
|
+
option: "unitPosition",
|
|
136
|
+
editor: "editor.select",
|
|
137
|
+
editorProps: {
|
|
138
|
+
values: [
|
|
139
|
+
{ label: (0, i18n_exports._)("Before"), value: "before" },
|
|
140
|
+
{ label: (0, i18n_exports._)("After"), value: "after" }
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
showEditor: ({ options }) => options.showValue || options.showValue === void 0
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: (0, i18n_exports._)("Unit label"),
|
|
147
|
+
option: "unit",
|
|
148
|
+
editor: "editor.text",
|
|
149
|
+
showEditor: ({ options }) => options.showValue || options.showValue === void 0
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
{
|
|
154
|
+
label: (0, i18n_exports._)("Precision"),
|
|
155
|
+
option: "numberPrecision",
|
|
156
|
+
editor: "editor.number",
|
|
157
|
+
editorProps: {
|
|
158
|
+
min: 0,
|
|
159
|
+
max: 20
|
|
160
|
+
},
|
|
161
|
+
showEditor: ({ options }) => options.showValue || options.showValue === void 0
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
];
|
|
165
|
+
var StaticMajorAndTrendLayout_default = StaticMajorAndTrendLayout;
|
|
166
|
+
|
|
167
|
+
// esm-externals:lodash
|
|
168
|
+
var lodash_exports = {};
|
|
169
|
+
__export(lodash_exports, {
|
|
170
|
+
default: () => lodash_default
|
|
171
|
+
});
|
|
172
|
+
var defaultImport9 = __toESM(require("lodash"));
|
|
173
|
+
__reExport(lodash_exports, require("lodash"));
|
|
174
|
+
var lodash_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
143
175
|
|
|
176
|
+
// src/common/utils/configUtils.ts
|
|
144
177
|
function enhanceConfig(vizConfig) {
|
|
145
|
-
|
|
146
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
147
|
-
|
|
148
|
-
open:
|
|
149
|
-
}
|
|
150
|
-
|
|
178
|
+
const enhancedConfig = __spreadValues({}, vizConfig);
|
|
179
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
180
|
+
(config2) => {
|
|
181
|
+
return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
|
|
182
|
+
}
|
|
183
|
+
);
|
|
151
184
|
return enhancedConfig;
|
|
152
185
|
}
|
|
153
|
-
|
|
154
|
-
exports.enhanceConfig = enhanceConfig;
|
|
155
|
-
/**
|
|
156
|
-
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
157
|
-
* Created for editor unit tests
|
|
158
|
-
* @param vizConfig a Visualization Config
|
|
159
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
163
|
-
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
164
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
165
|
-
return Object.assign(Object.assign({}, config), {
|
|
166
|
-
open: true
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
return editorPanelUncollapsedConfig;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
173
|
-
|
|
174
|
-
function isDynamicOption(option) {
|
|
175
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
179
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
183
|
-
* 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
|
|
184
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
185
|
-
* 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
|
|
186
|
-
*
|
|
187
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
186
|
function hasCompatibleContexts(vizContext, presetContext) {
|
|
191
|
-
|
|
192
|
-
return presetContextKeys.every(
|
|
193
|
-
|
|
194
|
-
|
|
187
|
+
const presetContextKeys = Object.keys(presetContext);
|
|
188
|
+
return presetContextKeys.every(
|
|
189
|
+
(contextKey) => presetContext[contextKey] === void 0 && vizContext[contextKey] === void 0 || presetContext[contextKey] !== void 0 && vizContext[contextKey] !== void 0
|
|
190
|
+
);
|
|
195
191
|
}
|
|
196
|
-
/**
|
|
197
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
192
|
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
202
|
-
|
|
203
|
-
return presetOptionKeys.every(
|
|
204
|
-
|
|
205
|
-
|
|
193
|
+
const presetOptionKeys = Object.keys(presetOptions);
|
|
194
|
+
return presetOptionKeys.every(
|
|
195
|
+
(optionKey) => (0, configUtils_exports.isDynamicOption)(presetOptions[optionKey]) === (0, configUtils_exports.isDynamicOption)(vizOptions[optionKey])
|
|
196
|
+
);
|
|
206
197
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
218
|
-
return presets.find(function (preset) {
|
|
219
|
-
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
220
|
-
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
221
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
222
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
223
|
-
// if not, then the preset is invalid in config.ts
|
|
224
|
-
|
|
198
|
+
function getInitialPreset(vizContext, vizOptions, presets2) {
|
|
199
|
+
return presets2.find((preset) => {
|
|
200
|
+
const presetContext = (0, lodash_exports.get)(preset, ["value", "context"], {});
|
|
201
|
+
const presetOptions = (0, lodash_exports.get)(preset, ["value", "options"], {});
|
|
202
|
+
const presetContextKeys = Object.keys(presetContext);
|
|
203
|
+
const presetOptionKeys = Object.keys(presetOptions);
|
|
225
204
|
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
226
205
|
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
227
206
|
});
|
|
228
207
|
}
|
|
229
208
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
258
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
259
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
209
|
+
// src/common/editorConfig/DynamicMajorColorAndGaugeEditor.js
|
|
210
|
+
var getDynamicMajorColorAndGaugeEditor = ({ defaultContext: defaultContext2, defaultPalettesConfig: defaultPalettesConfig2 }) => ({
|
|
211
|
+
label: (0, i18n_exports._)("Major value and gauge"),
|
|
212
|
+
option: "majorColor",
|
|
213
|
+
context: "majorColorEditorConfig",
|
|
214
|
+
editor: "editor.dynamicColor",
|
|
215
|
+
showEditor: ({ options }) => (0, configUtils_exports.isDynamicOption)(options.majorColor),
|
|
216
|
+
editorProps: {
|
|
217
|
+
labelPosition: "top",
|
|
218
|
+
flyoutTitle: (0, i18n_exports._)("Dynamic coloring: major value"),
|
|
219
|
+
formatters: [
|
|
220
|
+
{
|
|
221
|
+
label: (0, i18n_exports._)("Ranges"),
|
|
222
|
+
value: "rangeValue",
|
|
223
|
+
defaults: {
|
|
224
|
+
majorValue: defaultContext2.majorColorConfig
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
dataSelectors: [
|
|
229
|
+
{
|
|
230
|
+
label: (0, i18n_exports._)("Major value"),
|
|
231
|
+
value: "majorValue"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
defaultPalettesConfig: defaultPalettesConfig2
|
|
260
235
|
}
|
|
261
|
-
|
|
262
|
-
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
exports.insertLayout = insertLayout;
|
|
266
|
-
|
|
267
|
-
/***/ }),
|
|
268
|
-
/* 4 */
|
|
269
|
-
/***/ (function(module, exports) {
|
|
270
|
-
|
|
271
|
-
module.exports = require("@splunk/visualizations-shared/configUtils");
|
|
272
|
-
|
|
273
|
-
/***/ }),
|
|
274
|
-
/* 5 */
|
|
275
|
-
/***/ (function(module, exports) {
|
|
276
|
-
|
|
277
|
-
module.exports = require("lodash");
|
|
278
|
-
|
|
279
|
-
/***/ }),
|
|
280
|
-
/* 6 */
|
|
281
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
282
|
-
|
|
283
|
-
"use strict";
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
Object.defineProperty(exports, "__esModule", {
|
|
287
|
-
value: true
|
|
288
|
-
});
|
|
289
|
-
exports.VizBehavior = void 0;
|
|
290
|
-
var VizBehavior;
|
|
291
|
-
|
|
292
|
-
(function (VizBehavior) {
|
|
293
|
-
/**
|
|
294
|
-
* Dynamic Options Behavior.
|
|
295
|
-
* This allows visualization options to be powered by data
|
|
296
|
-
*
|
|
297
|
-
* **Example**
|
|
298
|
-
*
|
|
299
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
300
|
-
* would configure sparklineValues with an array of data points
|
|
301
|
-
* coming from the first series in the primary datasource
|
|
302
|
-
*
|
|
303
|
-
*/
|
|
304
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
305
|
-
VizBehavior["EVENTS"] = "events";
|
|
306
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
307
|
-
/**
|
|
308
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
309
|
-
* missing.
|
|
310
|
-
* @type {string}
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
314
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
315
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
316
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
317
|
-
|
|
318
|
-
/***/ }),
|
|
319
|
-
/* 7 */
|
|
320
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
321
|
-
|
|
322
|
-
"use strict";
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
Object.defineProperty(exports, "__esModule", {
|
|
326
|
-
value: true
|
|
327
236
|
});
|
|
328
|
-
exports.VizCategory = void 0;
|
|
329
|
-
var VizCategory;
|
|
330
|
-
|
|
331
|
-
(function (VizCategory) {
|
|
332
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
333
|
-
VizCategory["TRENDS"] = "Trends";
|
|
334
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
335
|
-
VizCategory["TABLE"] = "Table";
|
|
336
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
337
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
338
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
339
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
340
|
-
VizCategory["MISC"] = "misc";
|
|
341
|
-
VizCategory["FLOW"] = "Flow";
|
|
342
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
343
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
344
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
345
|
-
|
|
346
|
-
/***/ }),
|
|
347
|
-
/* 8 */
|
|
348
|
-
/***/ (function(module, exports) {
|
|
349
|
-
|
|
350
|
-
module.exports = require("@splunk/themes/pick");
|
|
351
|
-
|
|
352
|
-
/***/ }),
|
|
353
|
-
/* 9 */
|
|
354
|
-
/***/ (function(module, exports) {
|
|
355
|
-
|
|
356
|
-
module.exports = require("@splunk/themes/variables");
|
|
357
|
-
|
|
358
|
-
/***/ }),
|
|
359
|
-
/* 10 */
|
|
360
|
-
/***/ (function(module, exports) {
|
|
361
|
-
|
|
362
|
-
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
363
|
-
|
|
364
|
-
/***/ }),
|
|
365
|
-
/* 11 */
|
|
366
|
-
/***/ (function(module, exports) {
|
|
367
|
-
|
|
368
|
-
module.exports = require("@splunk/visualization-icons");
|
|
369
|
-
|
|
370
|
-
/***/ }),
|
|
371
|
-
/* 12 */,
|
|
372
|
-
/* 13 */
|
|
373
|
-
/***/ (function(module, exports) {
|
|
374
|
-
|
|
375
|
-
module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
|
|
376
|
-
|
|
377
|
-
/***/ }),
|
|
378
|
-
/* 14 */,
|
|
379
|
-
/* 15 */,
|
|
380
|
-
/* 16 */,
|
|
381
|
-
/* 17 */,
|
|
382
|
-
/* 18 */,
|
|
383
|
-
/* 19 */,
|
|
384
|
-
/* 20 */,
|
|
385
|
-
/* 21 */,
|
|
386
|
-
/* 22 */
|
|
387
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
388
237
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.backgroundColor);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
/* harmony default export */ __webpack_exports__["default"] = (StaticBackgroundColorEditor);
|
|
407
|
-
|
|
408
|
-
/***/ }),
|
|
409
|
-
/* 23 */,
|
|
410
|
-
/* 24 */
|
|
411
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
412
|
-
|
|
413
|
-
"use strict";
|
|
414
|
-
__webpack_require__.r(__webpack_exports__);
|
|
415
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicTrendColorEditor", function() { return getDynamicTrendColorEditor; });
|
|
416
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
417
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
418
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
419
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
var getDynamicTrendColorEditor = function getDynamicTrendColorEditor(_ref) {
|
|
423
|
-
var defaultContext = _ref.defaultContext,
|
|
424
|
-
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
425
|
-
return {
|
|
426
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Trend value'),
|
|
427
|
-
option: 'trendColor',
|
|
428
|
-
context: 'trendColorEditorConfig',
|
|
429
|
-
editor: 'editor.dynamicColor',
|
|
430
|
-
showEditor: function showEditor(_ref2) {
|
|
431
|
-
var options = _ref2.options;
|
|
432
|
-
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
|
|
433
|
-
},
|
|
434
|
-
editorProps: {
|
|
435
|
-
labelPosition: 'top',
|
|
436
|
-
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: trend value'),
|
|
437
|
-
formatters: [{
|
|
438
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
439
|
-
value: 'rangeValue',
|
|
238
|
+
// src/common/editorConfig/DynamicTrendColorEditor.js
|
|
239
|
+
var getDynamicTrendColorEditor = ({ defaultContext: defaultContext2, defaultPalettesConfig: defaultPalettesConfig2 }) => ({
|
|
240
|
+
label: (0, i18n_exports._)("Trend value"),
|
|
241
|
+
option: "trendColor",
|
|
242
|
+
context: "trendColorEditorConfig",
|
|
243
|
+
editor: "editor.dynamicColor",
|
|
244
|
+
showEditor: ({ options }) => (0, configUtils_exports.isDynamicOption)(options.trendColor),
|
|
245
|
+
editorProps: {
|
|
246
|
+
labelPosition: "top",
|
|
247
|
+
flyoutTitle: (0, i18n_exports._)("Dynamic coloring: trend value"),
|
|
248
|
+
formatters: [
|
|
249
|
+
{
|
|
250
|
+
label: (0, i18n_exports._)("Ranges"),
|
|
251
|
+
value: "rangeValue",
|
|
440
252
|
defaults: {
|
|
441
|
-
trendValue:
|
|
253
|
+
trendValue: defaultContext2.trendColorConfig
|
|
442
254
|
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
/* 25 */
|
|
455
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
456
|
-
|
|
457
|
-
"use strict";
|
|
458
|
-
__webpack_require__.r(__webpack_exports__);
|
|
459
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicBackgroundColorEditor", function() { return getDynamicBackgroundColorEditor; });
|
|
460
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
461
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
462
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
463
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
464
|
-
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
dataSelectors: [
|
|
258
|
+
{
|
|
259
|
+
label: (0, i18n_exports._)("Trend value"),
|
|
260
|
+
value: "trendValue"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
defaultPalettesConfig: defaultPalettesConfig2
|
|
264
|
+
}
|
|
265
|
+
});
|
|
465
266
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: background'),
|
|
481
|
-
formatters: [{
|
|
482
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
483
|
-
value: 'rangeValue',
|
|
267
|
+
// src/common/editorConfig/DynamicBackgroundColorEditor.js
|
|
268
|
+
var getDynamicBackgroundColorEditor = ({ defaultContext: defaultContext2, defaultPalettesConfig: defaultPalettesConfig2 }) => ({
|
|
269
|
+
label: (0, i18n_exports._)("Background color"),
|
|
270
|
+
option: "backgroundColor",
|
|
271
|
+
context: "backgroundColorEditorConfig",
|
|
272
|
+
editor: "editor.dynamicColor",
|
|
273
|
+
showEditor: ({ options }) => (0, configUtils_exports.isDynamicOption)(options.backgroundColor),
|
|
274
|
+
editorProps: {
|
|
275
|
+
labelPosition: "top",
|
|
276
|
+
flyoutTitle: (0, i18n_exports._)("Dynamic coloring: background"),
|
|
277
|
+
formatters: [
|
|
278
|
+
{
|
|
279
|
+
label: (0, i18n_exports._)("Ranges"),
|
|
280
|
+
value: "rangeValue",
|
|
484
281
|
defaults: {
|
|
485
|
-
majorValue:
|
|
486
|
-
trendValue:
|
|
282
|
+
majorValue: defaultContext2.majorColorConfig,
|
|
283
|
+
trendValue: defaultContext2.trendColorConfig
|
|
487
284
|
}
|
|
488
|
-
},
|
|
489
|
-
|
|
490
|
-
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
label: (0, i18n_exports._)("Matches"),
|
|
288
|
+
value: "matchValue",
|
|
491
289
|
defaults: {
|
|
492
|
-
majorValue:
|
|
290
|
+
majorValue: defaultContext2.majorColorMatchConfig
|
|
493
291
|
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
/***/ }),
|
|
508
|
-
/* 26 */
|
|
509
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
510
|
-
|
|
511
|
-
"use strict";
|
|
512
|
-
__webpack_require__.r(__webpack_exports__);
|
|
513
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
514
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
515
|
-
|
|
516
|
-
var StaticMajorAndTrendLayout = [[{
|
|
517
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Unit position'),
|
|
518
|
-
// todo: we need a new editor combining unit and position
|
|
519
|
-
option: 'unitPosition',
|
|
520
|
-
editor: 'editor.select',
|
|
521
|
-
editorProps: {
|
|
522
|
-
values: [{
|
|
523
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Before'),
|
|
524
|
-
value: 'before'
|
|
525
|
-
}, {
|
|
526
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('After'),
|
|
527
|
-
value: 'after'
|
|
528
|
-
}]
|
|
529
|
-
},
|
|
530
|
-
showEditor: function showEditor(_ref) {
|
|
531
|
-
var options = _ref.options;
|
|
532
|
-
return options.showValue || options.showValue === undefined;
|
|
533
|
-
}
|
|
534
|
-
}, {
|
|
535
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Unit label'),
|
|
536
|
-
option: 'unit',
|
|
537
|
-
editor: 'editor.text',
|
|
538
|
-
showEditor: function showEditor(_ref2) {
|
|
539
|
-
var options = _ref2.options;
|
|
540
|
-
return options.showValue || options.showValue === undefined;
|
|
541
|
-
}
|
|
542
|
-
}], [{
|
|
543
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Precision'),
|
|
544
|
-
option: 'numberPrecision',
|
|
545
|
-
editor: 'editor.number',
|
|
546
|
-
editorProps: {
|
|
547
|
-
min: 0,
|
|
548
|
-
max: 20
|
|
549
|
-
},
|
|
550
|
-
showEditor: function showEditor(_ref3) {
|
|
551
|
-
var options = _ref3.options;
|
|
552
|
-
return options.showValue || options.showValue === undefined;
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
dataSelectors: [
|
|
295
|
+
{
|
|
296
|
+
label: (0, i18n_exports._)("Major Value"),
|
|
297
|
+
value: "majorValue"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
label: (0, i18n_exports._)("Trend"),
|
|
301
|
+
value: "trendValue"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
defaultPalettesConfig: defaultPalettesConfig2
|
|
553
305
|
}
|
|
554
|
-
}
|
|
555
|
-
/* harmony default export */ __webpack_exports__["default"] = (StaticMajorAndTrendLayout);
|
|
556
|
-
|
|
557
|
-
/***/ }),
|
|
558
|
-
/* 27 */
|
|
559
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
560
|
-
|
|
561
|
-
"use strict";
|
|
562
|
-
__webpack_require__.r(__webpack_exports__);
|
|
563
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
564
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
565
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
566
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
567
|
-
|
|
306
|
+
});
|
|
568
307
|
|
|
308
|
+
// src/common/editorConfig/StaticMajorColorEditor.js
|
|
569
309
|
var StaticMajorColorEditor = {
|
|
570
|
-
label:
|
|
571
|
-
option:
|
|
572
|
-
editor:
|
|
573
|
-
showEditor:
|
|
574
|
-
var options = _ref.options;
|
|
575
|
-
return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
|
|
576
|
-
}
|
|
310
|
+
label: (0, i18n_exports._)("Major value"),
|
|
311
|
+
option: "majorColor",
|
|
312
|
+
editor: "editor.color",
|
|
313
|
+
showEditor: ({ options }) => !(0, configUtils_exports.isDynamicOption)(options.majorColor)
|
|
577
314
|
};
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
/***/ }),
|
|
581
|
-
/* 28 */
|
|
582
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
583
|
-
|
|
584
|
-
"use strict";
|
|
585
|
-
__webpack_require__.r(__webpack_exports__);
|
|
586
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
587
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
588
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
589
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
590
|
-
|
|
315
|
+
var StaticMajorColorEditor_default = StaticMajorColorEditor;
|
|
591
316
|
|
|
317
|
+
// src/common/editorConfig/StaticTrendColorEditor.js
|
|
592
318
|
var StaticTrendColorEditor = {
|
|
593
|
-
label:
|
|
594
|
-
option:
|
|
595
|
-
editor:
|
|
596
|
-
showEditor:
|
|
597
|
-
|
|
598
|
-
return !Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.trendColor);
|
|
599
|
-
},
|
|
600
|
-
isDisabled: function isDisabled(_ref2) {
|
|
601
|
-
var options = _ref2.options;
|
|
602
|
-
return options.trendDisplay === 'off';
|
|
603
|
-
}
|
|
319
|
+
label: (0, i18n_exports._)("Trend value"),
|
|
320
|
+
option: "trendColor",
|
|
321
|
+
editor: "editor.color",
|
|
322
|
+
showEditor: ({ options }) => !(0, configUtils_exports.isDynamicOption)(options.trendColor),
|
|
323
|
+
isDisabled: ({ options }) => options.trendDisplay === "off"
|
|
604
324
|
};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
/***/ }),
|
|
608
|
-
/* 29 */
|
|
609
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
610
|
-
|
|
611
|
-
"use strict";
|
|
325
|
+
var StaticTrendColorEditor_default = StaticTrendColorEditor;
|
|
612
326
|
|
|
327
|
+
// src/common/editorConfig/StaticBackgroundColorEditor.js
|
|
328
|
+
var StaticBackgroundColorEditor = {
|
|
329
|
+
label: (0, i18n_exports._)("Background color"),
|
|
330
|
+
option: "backgroundColor",
|
|
331
|
+
editor: "editor.color",
|
|
332
|
+
showEditor: ({ options }) => !(0, configUtils_exports.isDynamicOption)(options.backgroundColor)
|
|
333
|
+
};
|
|
334
|
+
var StaticBackgroundColorEditor_default = StaticBackgroundColorEditor;
|
|
335
|
+
|
|
336
|
+
// src/common/editorConfig/RadialBackgroundColor.ts
|
|
337
|
+
var radialBackground = ({ label, themes: themes2, labelPosition }) => [
|
|
338
|
+
{
|
|
339
|
+
label: (0, i18n_exports._)(label || "Radial background"),
|
|
340
|
+
option: "radialBackgroundColor",
|
|
341
|
+
editor: "editor.color",
|
|
342
|
+
editorProps: {
|
|
343
|
+
labelPosition: labelPosition || "top",
|
|
344
|
+
themes: themes2
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
var RadialBackgroundColor_default = radialBackground;
|
|
613
349
|
|
|
614
|
-
|
|
615
|
-
|
|
350
|
+
// esm-externals:react
|
|
351
|
+
var react_exports = {};
|
|
352
|
+
__export(react_exports, {
|
|
353
|
+
default: () => react_default
|
|
616
354
|
});
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
355
|
+
var defaultImport10 = __toESM(require("react"));
|
|
356
|
+
__reExport(react_exports, require("react"));
|
|
357
|
+
var react_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
|
|
358
|
+
|
|
359
|
+
// esm-externals:@splunk/visualization-context/FeatureFlagContext
|
|
360
|
+
var FeatureFlagContext_exports = {};
|
|
361
|
+
__export(FeatureFlagContext_exports, {
|
|
362
|
+
default: () => FeatureFlagContext_default
|
|
363
|
+
});
|
|
364
|
+
var defaultImport11 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
|
|
365
|
+
__reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
|
|
366
|
+
var FeatureFlagContext_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
|
|
367
|
+
|
|
368
|
+
// src/common/editorConfig/TrellisEditors.ts
|
|
369
|
+
var TrellisEditorConfig = [
|
|
370
|
+
[
|
|
371
|
+
{
|
|
372
|
+
label: (0, i18n_exports._)("Trellis layout"),
|
|
373
|
+
option: "splitByLayout",
|
|
374
|
+
editor: "editor.toggle",
|
|
375
|
+
showEditor: () => {
|
|
376
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
377
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
378
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
379
|
+
);
|
|
380
|
+
return isTrellisFeatureFlagOn;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
[
|
|
385
|
+
{
|
|
386
|
+
label: (0, i18n_exports._)("Split by"),
|
|
387
|
+
option: "trellisSplitBy",
|
|
388
|
+
editor: "editor.trellisSplitBy",
|
|
389
|
+
editorProps: {
|
|
390
|
+
dataSourceKey: "primary"
|
|
391
|
+
},
|
|
392
|
+
showEditor: ({ options }) => {
|
|
393
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
394
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
395
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
396
|
+
);
|
|
397
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
[
|
|
402
|
+
{
|
|
403
|
+
label: (0, i18n_exports._)("Number of columns"),
|
|
404
|
+
option: "trellisColumns",
|
|
405
|
+
editor: "editor.number",
|
|
406
|
+
editorProps: {
|
|
407
|
+
min: 1
|
|
408
|
+
},
|
|
409
|
+
placeholder: (0, i18n_exports._)("Auto"),
|
|
410
|
+
showEditor: ({ options }) => {
|
|
411
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
412
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
413
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
414
|
+
);
|
|
415
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
[
|
|
420
|
+
{
|
|
421
|
+
label: (0, i18n_exports._)("Min column width"),
|
|
422
|
+
option: "trellisMinColumnWidth",
|
|
423
|
+
editor: "editor.number",
|
|
424
|
+
editorProps: {
|
|
425
|
+
min: 1
|
|
426
|
+
},
|
|
427
|
+
showEditor: ({ options }) => {
|
|
428
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
429
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
430
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
431
|
+
);
|
|
432
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
label: (0, i18n_exports._)("Row height"),
|
|
437
|
+
option: "trellisRowHeight",
|
|
438
|
+
editor: "editor.number",
|
|
439
|
+
editorProps: {
|
|
440
|
+
min: 1
|
|
441
|
+
},
|
|
442
|
+
showEditor: ({ options }) => {
|
|
443
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
444
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
445
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
446
|
+
);
|
|
447
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
[
|
|
452
|
+
{
|
|
453
|
+
label: (0, i18n_exports._)("Max number of components per page"),
|
|
454
|
+
option: "trellisPageCount",
|
|
455
|
+
editor: "editor.number",
|
|
456
|
+
editorProps: {
|
|
457
|
+
min: 1
|
|
458
|
+
},
|
|
459
|
+
showEditor: ({ options }) => {
|
|
460
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
461
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
462
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
463
|
+
);
|
|
464
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
];
|
|
469
|
+
var TrellisBackgroundColorEditor = {
|
|
470
|
+
label: (0, i18n_exports._)("Trellis background"),
|
|
471
|
+
option: "trellisBackgroundColor",
|
|
472
|
+
editor: "editor.color",
|
|
473
|
+
showEditor: ({ options }) => {
|
|
474
|
+
const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
|
|
475
|
+
const isTrellisFeatureFlagOn = Boolean(
|
|
476
|
+
featureFlagContext && featureFlagContext.visualizations_enableTrellis
|
|
477
|
+
);
|
|
478
|
+
return isTrellisFeatureFlagOn && options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
714
479
|
}
|
|
715
480
|
};
|
|
716
481
|
|
|
717
|
-
|
|
718
|
-
/* 30 */
|
|
719
|
-
/***/ (function(module, exports) {
|
|
720
|
-
|
|
721
|
-
module.exports = require("react");
|
|
722
|
-
|
|
723
|
-
/***/ }),
|
|
724
|
-
/* 31 */
|
|
725
|
-
/***/ (function(module, exports) {
|
|
726
|
-
|
|
727
|
-
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
728
|
-
|
|
729
|
-
/***/ }),
|
|
730
|
-
/* 32 */,
|
|
731
|
-
/* 33 */,
|
|
732
|
-
/* 34 */,
|
|
733
|
-
/* 35 */,
|
|
734
|
-
/* 36 */,
|
|
735
|
-
/* 37 */,
|
|
736
|
-
/* 38 */,
|
|
737
|
-
/* 39 */,
|
|
738
|
-
/* 40 */,
|
|
739
|
-
/* 41 */,
|
|
740
|
-
/* 42 */,
|
|
741
|
-
/* 43 */,
|
|
742
|
-
/* 44 */,
|
|
743
|
-
/* 45 */,
|
|
744
|
-
/* 46 */,
|
|
745
|
-
/* 47 */,
|
|
746
|
-
/* 48 */,
|
|
747
|
-
/* 49 */,
|
|
748
|
-
/* 50 */,
|
|
749
|
-
/* 51 */,
|
|
750
|
-
/* 52 */,
|
|
751
|
-
/* 53 */,
|
|
752
|
-
/* 54 */,
|
|
753
|
-
/* 55 */,
|
|
754
|
-
/* 56 */,
|
|
755
|
-
/* 57 */,
|
|
756
|
-
/* 58 */,
|
|
757
|
-
/* 59 */,
|
|
758
|
-
/* 60 */,
|
|
759
|
-
/* 61 */,
|
|
760
|
-
/* 62 */,
|
|
761
|
-
/* 63 */,
|
|
762
|
-
/* 64 */,
|
|
763
|
-
/* 65 */,
|
|
764
|
-
/* 66 */,
|
|
765
|
-
/* 67 */,
|
|
766
|
-
/* 68 */,
|
|
767
|
-
/* 69 */,
|
|
768
|
-
/* 70 */
|
|
769
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
770
|
-
|
|
771
|
-
"use strict";
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
775
|
-
|
|
776
|
-
Object.defineProperty(exports, "__esModule", {
|
|
777
|
-
value: true
|
|
778
|
-
});
|
|
779
|
-
|
|
780
|
-
var i18n_1 = __webpack_require__(0);
|
|
781
|
-
|
|
782
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
783
|
-
|
|
784
|
-
var pick_1 = __webpack_require__(8);
|
|
785
|
-
|
|
786
|
-
var variables_1 = __webpack_require__(9);
|
|
787
|
-
|
|
788
|
-
var PresetPalettes_1 = __webpack_require__(13);
|
|
789
|
-
|
|
790
|
-
var visualization_icons_1 = __webpack_require__(11);
|
|
791
|
-
|
|
792
|
-
var placeholders_1 = __webpack_require__(10);
|
|
793
|
-
|
|
794
|
-
var configUtils_1 = __webpack_require__(4);
|
|
795
|
-
|
|
796
|
-
var StaticMajorAndTrendLayout_1 = __webpack_require__(26);
|
|
797
|
-
|
|
798
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
799
|
-
|
|
800
|
-
var configUtils_2 = __webpack_require__(3);
|
|
801
|
-
|
|
802
|
-
var VizCategory_1 = __webpack_require__(7);
|
|
803
|
-
|
|
804
|
-
var DynamicMajorColorAndGaugeEditor_1 = __webpack_require__(71);
|
|
805
|
-
|
|
806
|
-
var DynamicTrendColorEditor_1 = __webpack_require__(24);
|
|
807
|
-
|
|
808
|
-
var DynamicBackgroundColorEditor_1 = __webpack_require__(25);
|
|
809
|
-
|
|
810
|
-
var StaticMajorColorEditor_1 = __webpack_require__(27);
|
|
811
|
-
|
|
812
|
-
var StaticTrendColorEditor_1 = __webpack_require__(28);
|
|
813
|
-
|
|
814
|
-
var StaticBackgroundColorEditor_1 = __webpack_require__(22);
|
|
815
|
-
|
|
816
|
-
var RadialBackgroundColor_1 = __webpack_require__(72);
|
|
817
|
-
|
|
818
|
-
var TrellisEditors_1 = __webpack_require__(29);
|
|
819
|
-
|
|
482
|
+
// src/SingleValueRadial/config.ts
|
|
820
483
|
var dataContract = {
|
|
821
|
-
requiredDataSources: [
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
484
|
+
requiredDataSources: [
|
|
485
|
+
{
|
|
486
|
+
name: "primary",
|
|
487
|
+
description: "DataSource that powers the visualization"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
825
490
|
optionalDataSources: [],
|
|
826
491
|
initialRequestParams: {
|
|
827
|
-
primary: {
|
|
828
|
-
offset: 0,
|
|
829
|
-
count: 10000
|
|
830
|
-
}
|
|
492
|
+
primary: { offset: 0, count: 1e4 }
|
|
831
493
|
}
|
|
832
494
|
};
|
|
833
495
|
var size = {
|
|
@@ -835,358 +497,285 @@ var size = {
|
|
|
835
497
|
initialHeight: 250
|
|
836
498
|
};
|
|
837
499
|
var defaultContext = {
|
|
838
|
-
majorColorConfig: [
|
|
839
|
-
to: 20,
|
|
840
|
-
value:
|
|
841
|
-
|
|
842
|
-
from:
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
},
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
}],
|
|
857
|
-
majorColorMatchConfig: [{
|
|
858
|
-
match: '',
|
|
859
|
-
value: '#5C33FF'
|
|
860
|
-
}],
|
|
861
|
-
trendColorConfig: [{
|
|
862
|
-
to: 0,
|
|
863
|
-
value: '#9E2520'
|
|
864
|
-
}, {
|
|
865
|
-
from: 0,
|
|
866
|
-
value: '#1C6B2D'
|
|
867
|
-
}]
|
|
500
|
+
majorColorConfig: [
|
|
501
|
+
{ to: 20, value: "#D41F1F" },
|
|
502
|
+
{ from: 20, to: 40, value: "#D94E17" },
|
|
503
|
+
{ from: 40, to: 60, value: "#CBA700" },
|
|
504
|
+
{ from: 60, to: 80, value: "#669922" },
|
|
505
|
+
{ from: 80, value: "#118832" }
|
|
506
|
+
],
|
|
507
|
+
majorColorMatchConfig: [{ match: "", value: "#5C33FF" }],
|
|
508
|
+
trendColorConfig: [
|
|
509
|
+
{
|
|
510
|
+
to: 0,
|
|
511
|
+
value: "#9E2520"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
from: 0,
|
|
515
|
+
value: "#1C6B2D"
|
|
516
|
+
}
|
|
517
|
+
]
|
|
868
518
|
};
|
|
869
519
|
var basePresetContext = {
|
|
870
|
-
majorColorEditorConfig:
|
|
871
|
-
trendColorEditorConfig:
|
|
872
|
-
backgroundColorEditorConfig:
|
|
520
|
+
majorColorEditorConfig: void 0,
|
|
521
|
+
trendColorEditorConfig: void 0,
|
|
522
|
+
backgroundColorEditorConfig: void 0
|
|
873
523
|
};
|
|
874
524
|
var basePresetOptions = {
|
|
875
|
-
majorColor:
|
|
876
|
-
trendColor:
|
|
877
|
-
backgroundColor:
|
|
525
|
+
majorColor: void 0,
|
|
526
|
+
trendColor: void 0,
|
|
527
|
+
backgroundColor: void 0
|
|
878
528
|
};
|
|
879
|
-
var presets = [
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}, {
|
|
888
|
-
label: (0, i18n_1._)('Major value and gauge'),
|
|
889
|
-
name: 'singleValueRadial.majorValue',
|
|
890
|
-
value: {
|
|
891
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
892
|
-
majorColorEditorConfig: defaultContext.majorColorConfig
|
|
893
|
-
}),
|
|
894
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
895
|
-
majorColor: '> majorValue | rangeValue(majorColorEditorConfig)'
|
|
896
|
-
})
|
|
897
|
-
}
|
|
898
|
-
}, {
|
|
899
|
-
label: (0, i18n_1._)('Major value, trend value, and gauge'),
|
|
900
|
-
name: 'singleValueRadial.majorValueAndTrend',
|
|
901
|
-
value: {
|
|
902
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
903
|
-
majorColorEditorConfig: defaultContext.majorColorConfig,
|
|
904
|
-
trendColorEditorConfig: defaultContext.trendColorConfig
|
|
905
|
-
}),
|
|
906
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
907
|
-
majorColor: '> majorValue | rangeValue(majorColorEditorConfig)',
|
|
908
|
-
trendColor: '> trendValue | rangeValue(trendColorEditorConfig)'
|
|
909
|
-
})
|
|
910
|
-
}
|
|
911
|
-
}, {
|
|
912
|
-
label: (0, i18n_1._)('Trend value'),
|
|
913
|
-
name: 'singleValueRadial.trend',
|
|
914
|
-
value: {
|
|
915
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
916
|
-
trendColorEditorConfig: defaultContext.trendColorConfig
|
|
917
|
-
}),
|
|
918
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
919
|
-
trendColor: '> trendValue | rangeValue(trendColorEditorConfig)'
|
|
920
|
-
})
|
|
921
|
-
}
|
|
922
|
-
}, {
|
|
923
|
-
label: (0, i18n_1._)('Background'),
|
|
924
|
-
name: 'singleValueRadial.background',
|
|
925
|
-
value: {
|
|
926
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
927
|
-
backgroundColorEditorConfig: defaultContext.majorColorConfig
|
|
928
|
-
}),
|
|
929
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
930
|
-
backgroundColor: '> majorValue | rangeValue(backgroundColorEditorConfig)'
|
|
931
|
-
})
|
|
932
|
-
}
|
|
933
|
-
}];
|
|
934
|
-
var themes = {
|
|
935
|
-
defaultFontColor: function defaultFontColor(props) {
|
|
936
|
-
return (0, pick_1.default)({
|
|
937
|
-
enterprise: {
|
|
938
|
-
dark: variables_1.default.white(props),
|
|
939
|
-
light: variables_1.default.black(props)
|
|
940
|
-
},
|
|
941
|
-
prisma: variables_1.default.contentColorActive(props)
|
|
942
|
-
})(props);
|
|
943
|
-
},
|
|
944
|
-
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
945
|
-
return (0, pick_1.default)({
|
|
946
|
-
enterprise: {
|
|
947
|
-
dark: variables_1.default.black(props),
|
|
948
|
-
light: variables_1.default.white(props)
|
|
949
|
-
},
|
|
950
|
-
prisma: variables_1.default.backgroundColorSidebar(props)
|
|
951
|
-
})(props);
|
|
952
|
-
},
|
|
953
|
-
defaultRadialBackgroundColor: function defaultRadialBackgroundColor(props) {
|
|
954
|
-
return (0, pick_1.default)({
|
|
955
|
-
enterprise: {
|
|
956
|
-
dark: 'rgba(255, 255, 255, 0.15)',
|
|
957
|
-
light: 'rgba(0, 0, 0, 0.1)'
|
|
958
|
-
},
|
|
959
|
-
prisma: variables_1.default.interactiveColorBackgroundDisabled(props)
|
|
960
|
-
})(props);
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
var editorConfig = [{
|
|
964
|
-
label: (0, i18n_1._)('Data configurations'),
|
|
965
|
-
layout: [[{
|
|
966
|
-
label: (0, i18n_1._)('Value'),
|
|
967
|
-
editor: 'editor.columnSelector',
|
|
968
|
-
option: 'majorValue',
|
|
969
|
-
context: 'valuesContext',
|
|
970
|
-
editorProps: {
|
|
971
|
-
dataSourceKey: 'primary',
|
|
972
|
-
prepareValue: function prepareValue(definition) {
|
|
973
|
-
var baseSPL = definition.options.majorValue;
|
|
974
|
-
return {
|
|
975
|
-
context: {},
|
|
976
|
-
options: {
|
|
977
|
-
majorValue: "".concat(baseSPL, " | lastPoint()"),
|
|
978
|
-
trendValue: "".concat(baseSPL, " | delta(-2)")
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
},
|
|
983
|
-
isDisabled: function isDisabled(_ref) {
|
|
984
|
-
var options = _ref.options;
|
|
985
|
-
return options.splitByLayout === visualization_schemas_1.LAYOUT_TYPE.Trellis;
|
|
986
|
-
}
|
|
987
|
-
}]]
|
|
988
|
-
}, {
|
|
989
|
-
label: (0, i18n_1._)('Data display'),
|
|
990
|
-
layout: [].concat(_toConsumableArray(StaticMajorAndTrendLayout_1.default), [[{
|
|
991
|
-
label: (0, i18n_1._)('Trend display'),
|
|
992
|
-
option: 'trendDisplay',
|
|
993
|
-
editor: 'editor.select',
|
|
994
|
-
editorProps: {
|
|
995
|
-
values: [{
|
|
996
|
-
label: (0, i18n_1._)('Percent'),
|
|
997
|
-
value: 'percent'
|
|
998
|
-
}, {
|
|
999
|
-
label: (0, i18n_1._)('Absolute'),
|
|
1000
|
-
value: 'absolute'
|
|
1001
|
-
}, {
|
|
1002
|
-
label: (0, i18n_1._)('Off'),
|
|
1003
|
-
value: 'off'
|
|
1004
|
-
}]
|
|
1005
|
-
},
|
|
1006
|
-
showEditor: function showEditor(_ref2) {
|
|
1007
|
-
var options = _ref2.options;
|
|
1008
|
-
return options.showValue || options.showValue === undefined;
|
|
1009
|
-
}
|
|
1010
|
-
}], [{
|
|
1011
|
-
label: (0, i18n_1._)('Min'),
|
|
1012
|
-
option: 'minValue',
|
|
1013
|
-
editor: 'editor.number'
|
|
1014
|
-
}, {
|
|
1015
|
-
label: (0, i18n_1._)('Max'),
|
|
1016
|
-
option: 'maxValue',
|
|
1017
|
-
editor: 'editor.number'
|
|
1018
|
-
}]], _toConsumableArray(TrellisEditors_1.TrellisEditorConfig))
|
|
1019
|
-
}, {
|
|
1020
|
-
label: (0, i18n_1._)('Color and style'),
|
|
1021
|
-
layout: [[{
|
|
1022
|
-
label: (0, i18n_1._)('Dynamic elements'),
|
|
1023
|
-
key: 'presetSelector',
|
|
1024
|
-
editor: 'editor.presetSelector',
|
|
1025
|
-
editorProps: {
|
|
1026
|
-
presets: presets,
|
|
1027
|
-
value: function value(_ref3) {
|
|
1028
|
-
var context = _ref3.context,
|
|
1029
|
-
options = _ref3.options;
|
|
1030
|
-
var initialPreset = (0, configUtils_2.getInitialPreset)(context, options, presets);
|
|
1031
|
-
return initialPreset && initialPreset.label || null;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
}], [Object.assign(Object.assign({}, StaticMajorColorEditor_1.default), {
|
|
1035
|
-
editorProps: {
|
|
1036
|
-
themes: themes
|
|
529
|
+
var presets = [
|
|
530
|
+
{
|
|
531
|
+
// dummy context variables to allow for resetting of unused context states
|
|
532
|
+
label: (0, i18n_exports._)("None"),
|
|
533
|
+
name: "singleValueRadial.none",
|
|
534
|
+
value: {
|
|
535
|
+
context: __spreadValues({}, basePresetContext),
|
|
536
|
+
options: __spreadValues({}, basePresetOptions)
|
|
1037
537
|
}
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
label: (0, i18n_exports._)("Major value and gauge"),
|
|
541
|
+
name: "singleValueRadial.majorValue",
|
|
542
|
+
value: {
|
|
543
|
+
context: __spreadProps(__spreadValues({}, basePresetContext), {
|
|
544
|
+
majorColorEditorConfig: defaultContext.majorColorConfig
|
|
545
|
+
}),
|
|
546
|
+
options: __spreadProps(__spreadValues({}, basePresetOptions), {
|
|
547
|
+
majorColor: "> majorValue | rangeValue(majorColorEditorConfig)"
|
|
548
|
+
})
|
|
1044
549
|
}
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
}), [Object.assign(Object.assign({}, StaticBackgroundColorEditor_1.default), {
|
|
1059
|
-
editorProps: {
|
|
1060
|
-
themes: themes
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
label: (0, i18n_exports._)("Major value, trend value, and gauge"),
|
|
553
|
+
name: "singleValueRadial.majorValueAndTrend",
|
|
554
|
+
value: {
|
|
555
|
+
context: __spreadProps(__spreadValues({}, basePresetContext), {
|
|
556
|
+
majorColorEditorConfig: defaultContext.majorColorConfig,
|
|
557
|
+
trendColorEditorConfig: defaultContext.trendColorConfig
|
|
558
|
+
}),
|
|
559
|
+
options: __spreadProps(__spreadValues({}, basePresetOptions), {
|
|
560
|
+
majorColor: "> majorValue | rangeValue(majorColorEditorConfig)",
|
|
561
|
+
trendColor: "> trendValue | rangeValue(trendColorEditorConfig)"
|
|
562
|
+
})
|
|
1061
563
|
}
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
label: (0, i18n_exports._)("Trend value"),
|
|
567
|
+
name: "singleValueRadial.trend",
|
|
568
|
+
value: {
|
|
569
|
+
context: __spreadProps(__spreadValues({}, basePresetContext), {
|
|
570
|
+
trendColorEditorConfig: defaultContext.trendColorConfig
|
|
571
|
+
}),
|
|
572
|
+
options: __spreadProps(__spreadValues({}, basePresetOptions), {
|
|
573
|
+
trendColor: "> trendValue | rangeValue(trendColorEditorConfig)"
|
|
574
|
+
})
|
|
1065
575
|
}
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
label: (0, i18n_exports._)("Background"),
|
|
579
|
+
name: "singleValueRadial.background",
|
|
580
|
+
value: {
|
|
581
|
+
context: __spreadProps(__spreadValues({}, basePresetContext), {
|
|
582
|
+
backgroundColorEditorConfig: defaultContext.majorColorConfig
|
|
583
|
+
}),
|
|
584
|
+
options: __spreadProps(__spreadValues({}, basePresetOptions), {
|
|
585
|
+
backgroundColor: "> majorValue | rangeValue(backgroundColorEditorConfig)"
|
|
586
|
+
})
|
|
1076
587
|
}
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
588
|
+
}
|
|
589
|
+
];
|
|
590
|
+
var themes = {
|
|
591
|
+
defaultFontColor: (props) => pick_default({
|
|
592
|
+
enterprise: {
|
|
593
|
+
dark: variables_default.white(props),
|
|
594
|
+
light: variables_default.black(props)
|
|
595
|
+
},
|
|
596
|
+
prisma: variables_default.contentColorActive(props)
|
|
597
|
+
})(props),
|
|
598
|
+
defaultBackgroundColor: (props) => pick_default({
|
|
599
|
+
enterprise: {
|
|
600
|
+
dark: variables_default.black(props),
|
|
601
|
+
light: variables_default.white(props)
|
|
602
|
+
},
|
|
603
|
+
prisma: variables_default.backgroundColorSidebar(props)
|
|
604
|
+
})(props),
|
|
605
|
+
defaultRadialBackgroundColor: (props) => pick_default({
|
|
606
|
+
enterprise: {
|
|
607
|
+
dark: "rgba(255, 255, 255, 0.15)",
|
|
608
|
+
light: "rgba(0, 0, 0, 0.1)"
|
|
609
|
+
},
|
|
610
|
+
prisma: variables_default.interactiveColorBackgroundDisabled(props)
|
|
611
|
+
})(props)
|
|
612
|
+
};
|
|
613
|
+
var editorConfig = [
|
|
614
|
+
{
|
|
615
|
+
label: (0, i18n_exports._)("Data configurations"),
|
|
616
|
+
layout: [
|
|
617
|
+
[
|
|
618
|
+
{
|
|
619
|
+
label: (0, i18n_exports._)("Value"),
|
|
620
|
+
editor: "editor.columnSelector",
|
|
621
|
+
option: "majorValue",
|
|
622
|
+
context: "valuesContext",
|
|
623
|
+
editorProps: {
|
|
624
|
+
dataSourceKey: "primary",
|
|
625
|
+
prepareValue: (definition) => {
|
|
626
|
+
const {
|
|
627
|
+
options: { majorValue: baseSPL }
|
|
628
|
+
} = definition;
|
|
629
|
+
return {
|
|
630
|
+
context: {},
|
|
631
|
+
options: {
|
|
632
|
+
majorValue: `${baseSPL} | lastPoint()`,
|
|
633
|
+
trendValue: `${baseSPL} | delta(-2)`
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
isDisabled: ({ options }) => options.splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis
|
|
639
|
+
}
|
|
640
|
+
]
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
label: (0, i18n_exports._)("Data display"),
|
|
645
|
+
layout: [
|
|
646
|
+
...StaticMajorAndTrendLayout_default,
|
|
647
|
+
[
|
|
648
|
+
{
|
|
649
|
+
label: (0, i18n_exports._)("Trend display"),
|
|
650
|
+
option: "trendDisplay",
|
|
651
|
+
editor: "editor.select",
|
|
652
|
+
editorProps: {
|
|
653
|
+
values: [
|
|
654
|
+
{ label: (0, i18n_exports._)("Percent"), value: "percent" },
|
|
655
|
+
{ label: (0, i18n_exports._)("Absolute"), value: "absolute" },
|
|
656
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
showEditor: ({ options }) => options.showValue || options.showValue === void 0
|
|
660
|
+
}
|
|
661
|
+
],
|
|
662
|
+
[
|
|
663
|
+
{
|
|
664
|
+
label: (0, i18n_exports._)("Min"),
|
|
665
|
+
option: "minValue",
|
|
666
|
+
editor: "editor.number"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
label: (0, i18n_exports._)("Max"),
|
|
670
|
+
option: "maxValue",
|
|
671
|
+
editor: "editor.number"
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
...TrellisEditorConfig
|
|
675
|
+
]
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
label: (0, i18n_exports._)("Color and style"),
|
|
679
|
+
layout: [
|
|
680
|
+
[
|
|
681
|
+
{
|
|
682
|
+
label: (0, i18n_exports._)("Dynamic elements"),
|
|
683
|
+
key: "presetSelector",
|
|
684
|
+
editor: "editor.presetSelector",
|
|
685
|
+
editorProps: {
|
|
686
|
+
presets,
|
|
687
|
+
value: ({ context, options }) => {
|
|
688
|
+
const initialPreset = getInitialPreset(context, options, presets);
|
|
689
|
+
return initialPreset && initialPreset.label || null;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
],
|
|
694
|
+
[
|
|
695
|
+
__spreadProps(__spreadValues({}, StaticMajorColorEditor_default), {
|
|
696
|
+
editorProps: {
|
|
697
|
+
themes
|
|
698
|
+
}
|
|
699
|
+
})
|
|
700
|
+
],
|
|
701
|
+
[getDynamicMajorColorAndGaugeEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
|
|
702
|
+
[
|
|
703
|
+
__spreadProps(__spreadValues({}, StaticTrendColorEditor_default), {
|
|
704
|
+
editorProps: {
|
|
705
|
+
themes
|
|
706
|
+
}
|
|
707
|
+
})
|
|
708
|
+
],
|
|
709
|
+
[getDynamicTrendColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
|
|
710
|
+
[
|
|
711
|
+
{
|
|
712
|
+
label: (0, i18n_exports._)("Major value abbreviation"),
|
|
713
|
+
option: "shouldAbbreviateMajorValue",
|
|
714
|
+
editor: "editor.checkbox"
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
[
|
|
718
|
+
{
|
|
719
|
+
label: (0, i18n_exports._)("Trend value abbreviation"),
|
|
720
|
+
option: "shouldAbbreviateTrendValue",
|
|
721
|
+
editor: "editor.checkbox"
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
RadialBackgroundColor_default({ themes }),
|
|
725
|
+
[
|
|
726
|
+
__spreadProps(__spreadValues({}, StaticBackgroundColorEditor_default), {
|
|
727
|
+
editorProps: {
|
|
728
|
+
themes
|
|
729
|
+
}
|
|
730
|
+
})
|
|
731
|
+
],
|
|
732
|
+
[
|
|
733
|
+
__spreadProps(__spreadValues({}, TrellisBackgroundColorEditor), {
|
|
734
|
+
editorProps: {
|
|
735
|
+
themes
|
|
736
|
+
}
|
|
737
|
+
})
|
|
738
|
+
],
|
|
739
|
+
[getDynamicBackgroundColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
|
|
740
|
+
[
|
|
741
|
+
{
|
|
742
|
+
label: (0, i18n_exports._)("Show gauge ranges"),
|
|
743
|
+
option: "isGaugeOn",
|
|
744
|
+
editor: "editor.toggle",
|
|
745
|
+
showEditor: ({ options }) => (0, configUtils_exports.isDynamicOption)(options.majorColor)
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
]
|
|
749
|
+
}
|
|
750
|
+
];
|
|
1083
751
|
var config = {
|
|
1084
752
|
/**
|
|
1085
753
|
* unique viz key
|
|
1086
754
|
*/
|
|
1087
|
-
key:
|
|
1088
|
-
|
|
755
|
+
key: "splunk.singlevalueradial",
|
|
1089
756
|
/**
|
|
1090
757
|
* viz name
|
|
1091
758
|
*/
|
|
1092
|
-
name: (0,
|
|
1093
|
-
category:
|
|
1094
|
-
|
|
759
|
+
name: (0, i18n_exports._)("Single value radial"),
|
|
760
|
+
category: "Single Value" /* SINGLE_VALUE */,
|
|
1095
761
|
/**
|
|
1096
762
|
* viz icon
|
|
1097
763
|
*/
|
|
1098
|
-
icon:
|
|
1099
|
-
placeholderIcon:
|
|
1100
|
-
dataContract
|
|
1101
|
-
size
|
|
1102
|
-
defaultContext
|
|
1103
|
-
optionsSchema:
|
|
1104
|
-
editorConfig
|
|
764
|
+
icon: visualization_icons_exports.SingleValueRadial,
|
|
765
|
+
placeholderIcon: placeholders_exports.SingleValueRadial,
|
|
766
|
+
dataContract,
|
|
767
|
+
size,
|
|
768
|
+
defaultContext,
|
|
769
|
+
optionsSchema: visualization_schemas_exports.singleValueRadialOptionsSchema,
|
|
770
|
+
editorConfig,
|
|
1105
771
|
events: {
|
|
1106
|
-
|
|
1107
|
-
description:
|
|
1108
|
-
payloadKeys: [
|
|
772
|
+
"value.click": {
|
|
773
|
+
description: "trigger when user clicks major value",
|
|
774
|
+
payloadKeys: ["majorValue", "trendValue"]
|
|
1109
775
|
}
|
|
1110
776
|
},
|
|
1111
|
-
supports: [
|
|
1112
|
-
themes
|
|
777
|
+
supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "events" /* EVENTS */, "placeholder" /* PLACEHOLDER */, "trellis" /* TRELLIS */],
|
|
778
|
+
themes
|
|
1113
779
|
};
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
/***/ }),
|
|
1117
|
-
/* 71 */
|
|
1118
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1119
|
-
|
|
1120
|
-
"use strict";
|
|
1121
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1122
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicMajorColorAndGaugeEditor", function() { return getDynamicMajorColorAndGaugeEditor; });
|
|
1123
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1124
|
-
/* harmony import */ var _splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
1125
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
1126
|
-
/* harmony import */ var _splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__);
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
var getDynamicMajorColorAndGaugeEditor = function getDynamicMajorColorAndGaugeEditor(_ref) {
|
|
1130
|
-
var defaultContext = _ref.defaultContext,
|
|
1131
|
-
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
1132
|
-
return {
|
|
1133
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value and gauge'),
|
|
1134
|
-
option: 'majorColor',
|
|
1135
|
-
context: 'majorColorEditorConfig',
|
|
1136
|
-
editor: 'editor.dynamicColor',
|
|
1137
|
-
showEditor: function showEditor(_ref2) {
|
|
1138
|
-
var options = _ref2.options;
|
|
1139
|
-
return Object(_splunk_visualizations_shared_configUtils__WEBPACK_IMPORTED_MODULE_1__["isDynamicOption"])(options.majorColor);
|
|
1140
|
-
},
|
|
1141
|
-
editorProps: {
|
|
1142
|
-
labelPosition: 'top',
|
|
1143
|
-
flyoutTitle: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Dynamic coloring: major value'),
|
|
1144
|
-
formatters: [{
|
|
1145
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Ranges'),
|
|
1146
|
-
value: 'rangeValue',
|
|
1147
|
-
defaults: {
|
|
1148
|
-
majorValue: defaultContext.majorColorConfig
|
|
1149
|
-
}
|
|
1150
|
-
}],
|
|
1151
|
-
dataSelectors: [{
|
|
1152
|
-
label: Object(_splunk_ui_utils_i18n__WEBPACK_IMPORTED_MODULE_0__["_"])('Major value'),
|
|
1153
|
-
value: 'majorValue'
|
|
1154
|
-
}],
|
|
1155
|
-
defaultPalettesConfig: defaultPalettesConfig
|
|
1156
|
-
}
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
|
|
1160
|
-
/***/ }),
|
|
1161
|
-
/* 72 */
|
|
1162
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1163
|
-
|
|
1164
|
-
"use strict";
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1168
|
-
value: true
|
|
1169
|
-
});
|
|
1170
|
-
|
|
1171
|
-
var i18n_1 = __webpack_require__(0);
|
|
1172
|
-
|
|
1173
|
-
var radialBackground = function radialBackground(_ref) {
|
|
1174
|
-
var label = _ref.label,
|
|
1175
|
-
themes = _ref.themes,
|
|
1176
|
-
labelPosition = _ref.labelPosition;
|
|
1177
|
-
return [{
|
|
1178
|
-
label: (0, i18n_1._)(label || 'Radial background'),
|
|
1179
|
-
option: 'radialBackgroundColor',
|
|
1180
|
-
editor: 'editor.color',
|
|
1181
|
-
editorProps: {
|
|
1182
|
-
labelPosition: labelPosition || 'top',
|
|
1183
|
-
themes: themes
|
|
1184
|
-
}
|
|
1185
|
-
}];
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
exports.default = radialBackground;
|
|
1189
|
-
|
|
1190
|
-
/***/ })
|
|
1191
|
-
/******/ ]);
|
|
1192
|
-
//# sourceMappingURL=SingleValueRadial.config.js.map
|
|
780
|
+
var config_default = enhanceConfig(config);
|
|
781
|
+
//# sourceMappingURL=SingleValueRadial.config.js.map
|