@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/Map.config.js
CHANGED
|
@@ -1,394 +1,171 @@
|
|
|
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
|
-
/******/ // Execute the module function
|
|
26
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
27
|
-
/******/
|
|
28
|
-
/******/ // Flag the module as loaded
|
|
29
|
-
/******/ module.l = true;
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // Return the exports of the module
|
|
32
|
-
/******/ return module.exports;
|
|
33
|
-
/******/ }
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
37
|
-
/******/ __webpack_require__.m = modules;
|
|
38
|
-
/******/
|
|
39
|
-
/******/ // expose the module cache
|
|
40
|
-
/******/ __webpack_require__.c = installedModules;
|
|
41
|
-
/******/
|
|
42
|
-
/******/ // define getter function for harmony exports
|
|
43
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
44
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
45
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
46
|
-
/******/ }
|
|
47
|
-
/******/ };
|
|
48
|
-
/******/
|
|
49
|
-
/******/ // define __esModule on exports
|
|
50
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
51
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
52
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
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 = 54);
|
|
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
|
-
/***/ 12:
|
|
124
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
125
|
-
|
|
126
|
-
"use strict";
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Object.defineProperty(exports, "__esModule", {
|
|
130
|
-
value: true
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
var i18n_1 = __webpack_require__(0);
|
|
134
|
-
|
|
135
|
-
var background = function background(_ref) {
|
|
136
|
-
var label = _ref.label,
|
|
137
|
-
themes = _ref.themes,
|
|
138
|
-
labelPosition = _ref.labelPosition;
|
|
139
|
-
return [{
|
|
140
|
-
label: (0, i18n_1._)(label || 'Background color'),
|
|
141
|
-
option: 'backgroundColor',
|
|
142
|
-
editor: 'editor.color',
|
|
143
|
-
editorProps: {
|
|
144
|
-
labelPosition: labelPosition || 'top',
|
|
145
|
-
themes: themes
|
|
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]);
|
|
146
23
|
}
|
|
147
|
-
|
|
24
|
+
return a;
|
|
148
25
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
value: true
|
|
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/Map/config.ts
|
|
51
|
+
var config_exports = {};
|
|
52
|
+
__export(config_exports, {
|
|
53
|
+
default: () => config_default
|
|
178
54
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var lodash_1 = __webpack_require__(5); // included for backwards compatibility
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
55
|
+
module.exports = __toCommonJS(config_exports);
|
|
185
56
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
57
|
+
// esm-externals:@splunk/visualization-icons
|
|
58
|
+
var visualization_icons_exports = {};
|
|
59
|
+
__export(visualization_icons_exports, {
|
|
60
|
+
default: () => visualization_icons_default
|
|
61
|
+
});
|
|
62
|
+
var defaultImport = __toESM(require("@splunk/visualization-icons"));
|
|
63
|
+
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
64
|
+
var visualization_icons_default = "default" in defaultImport ? defaultImport.default : defaultImport;
|
|
65
|
+
|
|
66
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
67
|
+
var placeholders_exports = {};
|
|
68
|
+
__export(placeholders_exports, {
|
|
69
|
+
default: () => placeholders_default
|
|
70
|
+
});
|
|
71
|
+
var defaultImport2 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
72
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
73
|
+
var placeholders_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
|
|
74
|
+
|
|
75
|
+
// esm-externals:@splunk/visualization-schemas
|
|
76
|
+
var visualization_schemas_exports = {};
|
|
77
|
+
__export(visualization_schemas_exports, {
|
|
78
|
+
default: () => visualization_schemas_default
|
|
79
|
+
});
|
|
80
|
+
var defaultImport3 = __toESM(require("@splunk/visualization-schemas"));
|
|
81
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
82
|
+
var visualization_schemas_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
|
|
83
|
+
|
|
84
|
+
// esm-externals:@splunk/themes
|
|
85
|
+
var themes_exports = {};
|
|
86
|
+
__export(themes_exports, {
|
|
87
|
+
default: () => themes_default
|
|
88
|
+
});
|
|
89
|
+
var defaultImport4 = __toESM(require("@splunk/themes"));
|
|
90
|
+
__reExport(themes_exports, require("@splunk/themes"));
|
|
91
|
+
var themes_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
|
|
191
97
|
});
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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:lodash
|
|
103
|
+
var lodash_exports = {};
|
|
104
|
+
__export(lodash_exports, {
|
|
105
|
+
default: () => lodash_default
|
|
106
|
+
});
|
|
107
|
+
var defaultImport6 = __toESM(require("lodash"));
|
|
108
|
+
__reExport(lodash_exports, require("lodash"));
|
|
109
|
+
var lodash_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
110
|
+
|
|
111
|
+
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
112
|
+
var configUtils_exports = {};
|
|
113
|
+
__export(configUtils_exports, {
|
|
114
|
+
default: () => configUtils_default
|
|
115
|
+
});
|
|
116
|
+
var defaultImport7 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
117
|
+
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
118
|
+
var configUtils_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
199
119
|
|
|
120
|
+
// src/common/utils/configUtils.ts
|
|
200
121
|
function enhanceConfig(vizConfig) {
|
|
201
|
-
|
|
202
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
203
|
-
|
|
204
|
-
open:
|
|
205
|
-
}
|
|
206
|
-
|
|
122
|
+
const enhancedConfig = __spreadValues({}, vizConfig);
|
|
123
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
124
|
+
(config2) => {
|
|
125
|
+
return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
|
|
126
|
+
}
|
|
127
|
+
);
|
|
207
128
|
return enhancedConfig;
|
|
208
129
|
}
|
|
209
130
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
return editorPanelUncollapsedConfig;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
229
|
-
|
|
230
|
-
function isDynamicOption(option) {
|
|
231
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
235
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
239
|
-
* 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
|
|
240
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
241
|
-
* 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
|
|
242
|
-
*
|
|
243
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
function hasCompatibleContexts(vizContext, presetContext) {
|
|
247
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
248
|
-
return presetContextKeys.every(function (contextKey) {
|
|
249
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
254
|
-
*/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
258
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
259
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
260
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
265
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
266
|
-
*
|
|
267
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
268
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
269
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
274
|
-
return presets.find(function (preset) {
|
|
275
|
-
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
276
|
-
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
277
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
278
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
279
|
-
// if not, then the preset is invalid in config.ts
|
|
280
|
-
|
|
281
|
-
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
282
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
exports.getInitialPreset = getInitialPreset;
|
|
287
|
-
/**
|
|
288
|
-
* generates number precision values for a Select editor
|
|
289
|
-
*
|
|
290
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
291
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
292
|
-
*/
|
|
293
|
-
|
|
294
|
-
function generatePrecisionValues(numPrecisionValues) {
|
|
295
|
-
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
296
|
-
return {
|
|
297
|
-
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
298
|
-
value: i
|
|
299
|
-
};
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
exports.generatePrecisionValues = generatePrecisionValues;
|
|
304
|
-
/**
|
|
305
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
306
|
-
*
|
|
307
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
308
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
309
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
310
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
314
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
315
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
131
|
+
// src/common/editorConfig/BackgroundColor.ts
|
|
132
|
+
var background = ({
|
|
133
|
+
label,
|
|
134
|
+
themes: themes2,
|
|
135
|
+
labelPosition
|
|
136
|
+
}) => [
|
|
137
|
+
{
|
|
138
|
+
label: (0, i18n_exports._)(label || "Background color"),
|
|
139
|
+
option: "backgroundColor",
|
|
140
|
+
editor: "editor.color",
|
|
141
|
+
editorProps: {
|
|
142
|
+
labelPosition: labelPosition || "top",
|
|
143
|
+
themes: themes2
|
|
144
|
+
}
|
|
316
145
|
}
|
|
146
|
+
];
|
|
147
|
+
var BackgroundColor_default = background;
|
|
317
148
|
|
|
318
|
-
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
exports.insertLayout = insertLayout;
|
|
322
|
-
|
|
323
|
-
/***/ }),
|
|
324
|
-
|
|
325
|
-
/***/ 5:
|
|
326
|
-
/***/ (function(module, exports) {
|
|
327
|
-
|
|
328
|
-
module.exports = require("lodash");
|
|
329
|
-
|
|
330
|
-
/***/ }),
|
|
331
|
-
|
|
332
|
-
/***/ 54:
|
|
333
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
334
|
-
|
|
335
|
-
"use strict";
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
Object.defineProperty(exports, "__esModule", {
|
|
339
|
-
value: true
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
var visualization_icons_1 = __webpack_require__(11);
|
|
343
|
-
|
|
344
|
-
var placeholders_1 = __webpack_require__(10);
|
|
345
|
-
|
|
346
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
347
|
-
|
|
348
|
-
var themes_1 = __webpack_require__(19);
|
|
349
|
-
|
|
350
|
-
var i18n_1 = __webpack_require__(0);
|
|
351
|
-
|
|
352
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
353
|
-
|
|
354
|
-
var VizCategory_1 = __webpack_require__(7);
|
|
355
|
-
|
|
356
|
-
var configUtils_1 = __webpack_require__(3);
|
|
357
|
-
|
|
358
|
-
var BackgroundColor_1 = __webpack_require__(12);
|
|
359
|
-
|
|
149
|
+
// src/Map/config.ts
|
|
360
150
|
var defaultContext = {
|
|
361
|
-
colorRangeConfig: [
|
|
362
|
-
to: 20,
|
|
363
|
-
value:
|
|
364
|
-
|
|
365
|
-
from:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}, {
|
|
369
|
-
from: 40,
|
|
370
|
-
to: 60,
|
|
371
|
-
value: '#CBA700'
|
|
372
|
-
}, {
|
|
373
|
-
from: 60,
|
|
374
|
-
to: 80,
|
|
375
|
-
value: '#669922'
|
|
376
|
-
}, {
|
|
377
|
-
from: 80,
|
|
378
|
-
value: '#118832'
|
|
379
|
-
}]
|
|
151
|
+
colorRangeConfig: [
|
|
152
|
+
{ to: 20, value: "#D41F1F" },
|
|
153
|
+
{ from: 20, to: 40, value: "#D94E17" },
|
|
154
|
+
{ from: 40, to: 60, value: "#CBA700" },
|
|
155
|
+
{ from: 60, to: 80, value: "#669922" },
|
|
156
|
+
{ from: 80, value: "#118832" }
|
|
157
|
+
]
|
|
380
158
|
};
|
|
381
159
|
var dataContract = {
|
|
382
160
|
requiredDataSources: [],
|
|
383
|
-
optionalDataSources: [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
initialRequestParams: {
|
|
388
|
-
primary: {
|
|
389
|
-
offset: 0,
|
|
390
|
-
count: 10000
|
|
161
|
+
optionalDataSources: [
|
|
162
|
+
{
|
|
163
|
+
name: "primary",
|
|
164
|
+
description: "DataSource that powers the visualization."
|
|
391
165
|
}
|
|
166
|
+
],
|
|
167
|
+
initialRequestParams: {
|
|
168
|
+
primary: { offset: 0, count: 1e4 }
|
|
392
169
|
}
|
|
393
170
|
};
|
|
394
171
|
var size = {
|
|
@@ -396,452 +173,375 @@ var size = {
|
|
|
396
173
|
initialHeight: 600
|
|
397
174
|
};
|
|
398
175
|
var themes = {
|
|
399
|
-
defaultBackgroundColor:
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
light: themes_1.variables.backgroundColor(props)
|
|
404
|
-
},
|
|
405
|
-
prisma: themes_1.variables.backgroundColorSidebar(props)
|
|
406
|
-
})(props);
|
|
407
|
-
},
|
|
408
|
-
controlBackgroundColor: function controlBackgroundColor(props) {
|
|
409
|
-
return (0, themes_1.pick)({
|
|
410
|
-
enterprise: {
|
|
411
|
-
dark: themes_1.variables.gray22(props),
|
|
412
|
-
light: themes_1.variables.white(props)
|
|
413
|
-
},
|
|
414
|
-
prisma: themes_1.variables.backgroundColorPopup(props)
|
|
415
|
-
})(props);
|
|
416
|
-
},
|
|
417
|
-
controlForegroundColor: function controlForegroundColor(props) {
|
|
418
|
-
return (0, themes_1.pick)({
|
|
419
|
-
enterprise: themes_1.variables.textColor(props),
|
|
420
|
-
prisma: themes_1.variables.contentColorDefault(props)
|
|
421
|
-
})(props);
|
|
422
|
-
},
|
|
423
|
-
defaultChoroplethEmptyAreaColor: function defaultChoroplethEmptyAreaColor(props) {
|
|
424
|
-
return (0, themes_1.pick)({
|
|
425
|
-
enterprise: {
|
|
426
|
-
dark: themes_1.variables.gray22(props),
|
|
427
|
-
light: themes_1.variables.gray92(props)
|
|
428
|
-
},
|
|
429
|
-
prisma: {
|
|
430
|
-
dark: themes_1.variables.interactiveColorBackground(props),
|
|
431
|
-
light: themes_1.variables.neutral300(props)
|
|
432
|
-
}
|
|
433
|
-
})(props);
|
|
434
|
-
},
|
|
435
|
-
defaultGradientMigrationConfig: function defaultGradientMigrationConfig(props) {
|
|
436
|
-
return (0, themes_1.pick)({
|
|
437
|
-
enterprise: {
|
|
438
|
-
dark: ['#4D4A5D', themes_1.variables.syntaxPurple(props)],
|
|
439
|
-
light: ['#D2CFDC', themes_1.variables.syntaxPurple(props)]
|
|
440
|
-
},
|
|
441
|
-
prisma: {
|
|
442
|
-
dark: ['#484558', themes_1.variables.syntaxPurple(props)],
|
|
443
|
-
light: ['#D8D4E1', themes_1.variables.syntaxPurple(props)]
|
|
444
|
-
}
|
|
445
|
-
})(props);
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
var checkTypeIsChoropleth = function checkTypeIsChoropleth(options) {
|
|
450
|
-
return options.layers && options.layers.length && options.layers[0].type === visualization_schemas_1.LAYER_TYPE.Choropleth;
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
var checkTypeIsLocalChoropleth = function checkTypeIsLocalChoropleth(options) {
|
|
454
|
-
return options.layers && options.layers.length && options.layers[0].type === visualization_schemas_1.LAYER_TYPE.Choropleth && (options.layers[0].source === 'geo://default/us' || options.layers[0].source === 'geo://default/world');
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
var EDITOR_LABEL_WIDTH = 140;
|
|
458
|
-
var editorConfig = [{
|
|
459
|
-
label: (0, i18n_1._)('Data configurations'),
|
|
460
|
-
layout: [[{
|
|
461
|
-
label: (0, i18n_1._)('Layer type'),
|
|
462
|
-
option: 'layers[0].type',
|
|
463
|
-
editor: 'editor.select',
|
|
464
|
-
editorProps: {
|
|
465
|
-
values: [{
|
|
466
|
-
label: (0, i18n_1._)('Bubble'),
|
|
467
|
-
value: visualization_schemas_1.LAYER_TYPE.Bubble
|
|
468
|
-
}, {
|
|
469
|
-
label: (0, i18n_1._)('Marker'),
|
|
470
|
-
value: visualization_schemas_1.LAYER_TYPE.Marker
|
|
471
|
-
}, {
|
|
472
|
-
label: (0, i18n_1._)('Choropleth'),
|
|
473
|
-
value: visualization_schemas_1.LAYER_TYPE.Choropleth
|
|
474
|
-
}]
|
|
475
|
-
}
|
|
476
|
-
}], [{
|
|
477
|
-
label: (0, i18n_1._)('Area IDs'),
|
|
478
|
-
option: 'layers[0].areaIds',
|
|
479
|
-
editor: 'editor.columnSelector',
|
|
480
|
-
showEditor: function showEditor(_ref) {
|
|
481
|
-
var options = _ref.options;
|
|
482
|
-
return checkTypeIsChoropleth(options);
|
|
483
|
-
},
|
|
484
|
-
editorProps: {
|
|
485
|
-
dataSourceKey: 'primary',
|
|
486
|
-
shouldShowInternalFields: false,
|
|
487
|
-
filterByTypes: ['string']
|
|
488
|
-
}
|
|
489
|
-
}], [{
|
|
490
|
-
label: (0, i18n_1._)('Area values'),
|
|
491
|
-
option: 'layers[0].areaValues',
|
|
492
|
-
editor: 'editor.columnSelector',
|
|
493
|
-
showEditor: function showEditor(_ref2) {
|
|
494
|
-
var options = _ref2.options;
|
|
495
|
-
return checkTypeIsChoropleth(options);
|
|
176
|
+
defaultBackgroundColor: (props) => (0, themes_exports.pick)({
|
|
177
|
+
enterprise: {
|
|
178
|
+
dark: themes_exports.variables.black(props),
|
|
179
|
+
light: themes_exports.variables.backgroundColor(props)
|
|
496
180
|
},
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
label: (0, i18n_1._)('Latitude'),
|
|
504
|
-
option: 'layers[0].latitude',
|
|
505
|
-
editor: 'editor.columnSelector',
|
|
506
|
-
showEditor: function showEditor(_ref3) {
|
|
507
|
-
var options = _ref3.options;
|
|
508
|
-
return !(options.layers && options.layers.length && options.layers[0].type === 'choropleth');
|
|
181
|
+
prisma: themes_exports.variables.backgroundColorSidebar(props)
|
|
182
|
+
})(props),
|
|
183
|
+
controlBackgroundColor: (props) => (0, themes_exports.pick)({
|
|
184
|
+
enterprise: {
|
|
185
|
+
dark: themes_exports.variables.gray22(props),
|
|
186
|
+
light: themes_exports.variables.white(props)
|
|
509
187
|
},
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
return !(options.layers && options.layers.length && options.layers[0].type === 'choropleth');
|
|
188
|
+
prisma: themes_exports.variables.backgroundColorPopup(props)
|
|
189
|
+
})(props),
|
|
190
|
+
controlForegroundColor: (props) => (0, themes_exports.pick)({
|
|
191
|
+
enterprise: themes_exports.variables.textColor(props),
|
|
192
|
+
prisma: themes_exports.variables.contentColorDefault(props)
|
|
193
|
+
})(props),
|
|
194
|
+
defaultChoroplethEmptyAreaColor: (props) => (0, themes_exports.pick)({
|
|
195
|
+
enterprise: {
|
|
196
|
+
dark: themes_exports.variables.gray22(props),
|
|
197
|
+
light: themes_exports.variables.gray92(props)
|
|
521
198
|
},
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
526
|
-
}], [{
|
|
527
|
-
label: (0, i18n_1._)('Bubble size'),
|
|
528
|
-
option: 'layers[0].bubbleSize',
|
|
529
|
-
editor: 'editor.columnMultiSelector',
|
|
530
|
-
showEditor: function showEditor(_ref5) {
|
|
531
|
-
var options = _ref5.options;
|
|
532
|
-
return !(options.layers && options.layers.length && (options.layers[0].type === 'marker' || options.layers[0].type === 'choropleth'));
|
|
533
|
-
},
|
|
534
|
-
editorProps: {
|
|
535
|
-
dataSourceKey: 'primary',
|
|
536
|
-
shouldShowInternalFields: false,
|
|
537
|
-
excludeByNames: ['latitude', 'longitude', 'geobin']
|
|
538
|
-
}
|
|
539
|
-
}], [{
|
|
540
|
-
label: (0, i18n_1._)('Additional tooltip fields'),
|
|
541
|
-
option: 'layers[0].additionalTooltipFields',
|
|
542
|
-
editor: 'editor.columnMultiSelectionByFieldNameEditor'
|
|
543
|
-
}], [{
|
|
544
|
-
label: (0, i18n_1._)('Result limit'),
|
|
545
|
-
option: 'layers[0].resultLimit',
|
|
546
|
-
editor: 'editor.number',
|
|
547
|
-
showEditor: function showEditor(_ref6) {
|
|
548
|
-
var options = _ref6.options;
|
|
549
|
-
return !checkTypeIsLocalChoropleth(options);
|
|
550
|
-
},
|
|
551
|
-
editorProps: {
|
|
552
|
-
themes: themes,
|
|
553
|
-
labelPosition: 'top',
|
|
554
|
-
min: 0
|
|
199
|
+
prisma: {
|
|
200
|
+
dark: themes_exports.variables.interactiveColorBackground(props),
|
|
201
|
+
light: themes_exports.variables.neutral300(props)
|
|
555
202
|
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
option: 'center[0]',
|
|
562
|
-
editor: 'editor.number',
|
|
563
|
-
editorProps: {
|
|
564
|
-
themes: themes,
|
|
565
|
-
labelPosition: 'top',
|
|
566
|
-
min: -90,
|
|
567
|
-
max: 90
|
|
568
|
-
}
|
|
569
|
-
}], [{
|
|
570
|
-
label: (0, i18n_1._)('Longitude (initial map location)'),
|
|
571
|
-
option: 'center[1]',
|
|
572
|
-
editor: 'editor.number',
|
|
573
|
-
editorProps: {
|
|
574
|
-
themes: themes,
|
|
575
|
-
labelPosition: 'top',
|
|
576
|
-
min: -180,
|
|
577
|
-
max: 180
|
|
578
|
-
}
|
|
579
|
-
}], [{
|
|
580
|
-
label: (0, i18n_1._)('Zoom (initial map location)'),
|
|
581
|
-
option: 'zoom',
|
|
582
|
-
editor: 'editor.number',
|
|
583
|
-
editorProps: {
|
|
584
|
-
themes: themes,
|
|
585
|
-
labelPosition: 'top',
|
|
586
|
-
min: 0
|
|
587
|
-
}
|
|
588
|
-
}], [{
|
|
589
|
-
label: (0, i18n_1._)('Show zoom controls'),
|
|
590
|
-
option: 'showZoomControls',
|
|
591
|
-
editor: 'editor.checkbox',
|
|
592
|
-
editorProps: {
|
|
593
|
-
labelPosition: 'right',
|
|
594
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
595
|
-
}
|
|
596
|
-
}], [{
|
|
597
|
-
label: (0, i18n_1._)('Show scale'),
|
|
598
|
-
option: 'showScale',
|
|
599
|
-
editor: 'editor.toggle',
|
|
600
|
-
editorProps: {
|
|
601
|
-
labelPosition: 'right',
|
|
602
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
603
|
-
}
|
|
604
|
-
}], [{
|
|
605
|
-
label: (0, i18n_1._)('Scale unit'),
|
|
606
|
-
option: 'scaleUnit',
|
|
607
|
-
editor: 'editor.radioBar',
|
|
608
|
-
showEditor: function showEditor(_ref7) {
|
|
609
|
-
var options = _ref7.options;
|
|
610
|
-
return options.showScale !== false;
|
|
203
|
+
})(props),
|
|
204
|
+
defaultGradientMigrationConfig: (props) => (0, themes_exports.pick)({
|
|
205
|
+
enterprise: {
|
|
206
|
+
dark: ["#4D4A5D", themes_exports.variables.syntaxPurple(props)],
|
|
207
|
+
light: ["#D2CFDC", themes_exports.variables.syntaxPurple(props)]
|
|
611
208
|
},
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
value: 'metric'
|
|
616
|
-
}, {
|
|
617
|
-
label: (0, i18n_1._)('Imperial'),
|
|
618
|
-
value: 'imperial'
|
|
619
|
-
}]
|
|
209
|
+
prisma: {
|
|
210
|
+
dark: ["#484558", themes_exports.variables.syntaxPurple(props)],
|
|
211
|
+
light: ["#D8D4E1", themes_exports.variables.syntaxPurple(props)]
|
|
620
212
|
}
|
|
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
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
213
|
+
})(props)
|
|
214
|
+
};
|
|
215
|
+
var checkTypeIsChoropleth = (options) => options.layers && options.layers.length && options.layers[0].type === visualization_schemas_exports.LAYER_TYPE.Choropleth;
|
|
216
|
+
var checkTypeIsLocalChoropleth = (options) => options.layers && options.layers.length && options.layers[0].type === visualization_schemas_exports.LAYER_TYPE.Choropleth && (options.layers[0].source === "geo://default/us" || options.layers[0].source === "geo://default/world");
|
|
217
|
+
var EDITOR_LABEL_WIDTH = 140;
|
|
218
|
+
var editorConfig = [
|
|
219
|
+
{
|
|
220
|
+
label: (0, i18n_exports._)("Data configurations"),
|
|
221
|
+
layout: [
|
|
222
|
+
[
|
|
223
|
+
{
|
|
224
|
+
label: (0, i18n_exports._)("Layer type"),
|
|
225
|
+
option: "layers[0].type",
|
|
226
|
+
editor: "editor.select",
|
|
227
|
+
editorProps: {
|
|
228
|
+
values: [
|
|
229
|
+
{ label: (0, i18n_exports._)("Bubble"), value: visualization_schemas_exports.LAYER_TYPE.Bubble },
|
|
230
|
+
{ label: (0, i18n_exports._)("Marker"), value: visualization_schemas_exports.LAYER_TYPE.Marker },
|
|
231
|
+
{ label: (0, i18n_exports._)("Choropleth"), value: visualization_schemas_exports.LAYER_TYPE.Choropleth }
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
{
|
|
238
|
+
label: (0, i18n_exports._)("Area IDs"),
|
|
239
|
+
option: "layers[0].areaIds",
|
|
240
|
+
editor: "editor.columnSelector",
|
|
241
|
+
showEditor: ({ options }) => checkTypeIsChoropleth(options),
|
|
242
|
+
editorProps: {
|
|
243
|
+
dataSourceKey: "primary",
|
|
244
|
+
shouldShowInternalFields: false,
|
|
245
|
+
filterByTypes: ["string"]
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
[
|
|
250
|
+
{
|
|
251
|
+
label: (0, i18n_exports._)("Area values"),
|
|
252
|
+
option: "layers[0].areaValues",
|
|
253
|
+
editor: "editor.columnSelector",
|
|
254
|
+
showEditor: ({ options }) => checkTypeIsChoropleth(options),
|
|
255
|
+
editorProps: {
|
|
256
|
+
dataSourceKey: "primary",
|
|
257
|
+
shouldShowInternalFields: false,
|
|
258
|
+
filterByTypes: ["number"]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
[
|
|
263
|
+
{
|
|
264
|
+
label: (0, i18n_exports._)("Latitude"),
|
|
265
|
+
option: "layers[0].latitude",
|
|
266
|
+
editor: "editor.columnSelector",
|
|
267
|
+
showEditor: ({ options }) => !(options.layers && options.layers.length && options.layers[0].type === "choropleth"),
|
|
268
|
+
editorProps: {
|
|
269
|
+
dataSourceKey: "primary",
|
|
270
|
+
shouldShowInternalFields: false
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
[
|
|
275
|
+
{
|
|
276
|
+
label: (0, i18n_exports._)("Longitude"),
|
|
277
|
+
option: "layers[0].longitude",
|
|
278
|
+
editor: "editor.columnSelector",
|
|
279
|
+
showEditor: ({ options }) => !(options.layers && options.layers.length && options.layers[0].type === "choropleth"),
|
|
280
|
+
editorProps: {
|
|
281
|
+
dataSourceKey: "primary",
|
|
282
|
+
shouldShowInternalFields: false
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
[
|
|
287
|
+
{
|
|
288
|
+
label: (0, i18n_exports._)("Bubble size"),
|
|
289
|
+
option: "layers[0].bubbleSize",
|
|
290
|
+
editor: "editor.columnMultiSelector",
|
|
291
|
+
showEditor: ({ options }) => !(options.layers && options.layers.length && (options.layers[0].type === "marker" || options.layers[0].type === "choropleth")),
|
|
292
|
+
editorProps: {
|
|
293
|
+
dataSourceKey: "primary",
|
|
294
|
+
shouldShowInternalFields: false,
|
|
295
|
+
excludeByNames: ["latitude", "longitude", "geobin"]
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
[
|
|
300
|
+
{
|
|
301
|
+
label: (0, i18n_exports._)("Additional tooltip fields"),
|
|
302
|
+
option: "layers[0].additionalTooltipFields",
|
|
303
|
+
editor: "editor.columnMultiSelectionByFieldNameEditor"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
{
|
|
308
|
+
label: (0, i18n_exports._)("Result limit"),
|
|
309
|
+
option: "layers[0].resultLimit",
|
|
310
|
+
editor: "editor.number",
|
|
311
|
+
showEditor: ({ options }) => !checkTypeIsLocalChoropleth(options),
|
|
312
|
+
editorProps: {
|
|
313
|
+
themes,
|
|
314
|
+
labelPosition: "top",
|
|
315
|
+
min: 0
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
label: (0, i18n_exports._)("Data display"),
|
|
323
|
+
layout: [
|
|
324
|
+
[
|
|
325
|
+
{
|
|
326
|
+
label: (0, i18n_exports._)("Latitude (initial map location)"),
|
|
327
|
+
option: "center[0]",
|
|
328
|
+
editor: "editor.number",
|
|
329
|
+
editorProps: {
|
|
330
|
+
themes,
|
|
331
|
+
labelPosition: "top",
|
|
332
|
+
min: -90,
|
|
333
|
+
max: 90
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
[
|
|
338
|
+
{
|
|
339
|
+
label: (0, i18n_exports._)("Longitude (initial map location)"),
|
|
340
|
+
option: "center[1]",
|
|
341
|
+
editor: "editor.number",
|
|
342
|
+
editorProps: {
|
|
343
|
+
themes,
|
|
344
|
+
labelPosition: "top",
|
|
345
|
+
min: -180,
|
|
346
|
+
max: 180
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
[
|
|
351
|
+
{
|
|
352
|
+
label: (0, i18n_exports._)("Zoom (initial map location)"),
|
|
353
|
+
option: "zoom",
|
|
354
|
+
editor: "editor.number",
|
|
355
|
+
editorProps: {
|
|
356
|
+
themes,
|
|
357
|
+
labelPosition: "top",
|
|
358
|
+
min: 0
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
[
|
|
363
|
+
{
|
|
364
|
+
label: (0, i18n_exports._)("Show zoom controls"),
|
|
365
|
+
option: "showZoomControls",
|
|
366
|
+
editor: "editor.checkbox",
|
|
367
|
+
editorProps: {
|
|
368
|
+
labelPosition: "right",
|
|
369
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
[
|
|
374
|
+
{
|
|
375
|
+
label: (0, i18n_exports._)("Show scale"),
|
|
376
|
+
option: "showScale",
|
|
377
|
+
editor: "editor.toggle",
|
|
378
|
+
editorProps: {
|
|
379
|
+
labelPosition: "right",
|
|
380
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
[
|
|
385
|
+
{
|
|
386
|
+
label: (0, i18n_exports._)("Scale unit"),
|
|
387
|
+
option: "scaleUnit",
|
|
388
|
+
editor: "editor.radioBar",
|
|
389
|
+
showEditor: ({ options }) => options.showScale !== false,
|
|
390
|
+
editorProps: {
|
|
391
|
+
values: [
|
|
392
|
+
{ label: (0, i18n_exports._)("Metric"), value: "metric" },
|
|
393
|
+
{ label: (0, i18n_exports._)("Imperial"), value: "imperial" }
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
label: (0, i18n_exports._)("Color and style"),
|
|
402
|
+
layout: [
|
|
403
|
+
// TODO: add support for color mode option and its corresponding editor
|
|
404
|
+
// [
|
|
405
|
+
// {
|
|
406
|
+
// label: _('Color mode'),
|
|
407
|
+
// option: 'colorMode',
|
|
408
|
+
// editor: 'editor.radioBar',
|
|
409
|
+
// editorProps: {
|
|
410
|
+
// values: [
|
|
411
|
+
// { label: _('Static'), value: 'static' },
|
|
412
|
+
// { label: _('Dynamic'), value: 'dynamic' },
|
|
413
|
+
// ],
|
|
414
|
+
// },
|
|
415
|
+
// },
|
|
416
|
+
// ],
|
|
417
|
+
[
|
|
418
|
+
{
|
|
419
|
+
label: (0, i18n_exports._)("Series colors"),
|
|
420
|
+
option: "layers[0].seriesColors",
|
|
421
|
+
editor: "editor.seriesColors",
|
|
422
|
+
showEditor: ({ options }) => !(options.layers && options.layers.length && options.layers[0].type === "choropleth")
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
// TODO: add editor for data colors
|
|
426
|
+
// [
|
|
427
|
+
// {
|
|
428
|
+
// label: _('Data colors'),
|
|
429
|
+
// option: 'layers[0].dataColors',
|
|
430
|
+
// editor: 'editor.text',
|
|
431
|
+
// editorProps: {
|
|
432
|
+
// themes,
|
|
433
|
+
// labelPosition: 'top',
|
|
434
|
+
// },
|
|
435
|
+
// },
|
|
436
|
+
// ],
|
|
437
|
+
[
|
|
438
|
+
{
|
|
439
|
+
label: (0, i18n_exports._)("Choropleth empty area"),
|
|
440
|
+
option: "layers[0].choroplethEmptyAreaColor",
|
|
441
|
+
editor: "editor.color",
|
|
442
|
+
showEditor: ({ options }) => checkTypeIsLocalChoropleth(options),
|
|
443
|
+
editorProps: {
|
|
444
|
+
themes
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
[
|
|
449
|
+
{
|
|
450
|
+
label: (0, i18n_exports._)("Choropleth stroke"),
|
|
451
|
+
option: "layers[0].choroplethStrokeColor",
|
|
452
|
+
editor: "editor.color",
|
|
453
|
+
showEditor: ({ options }) => checkTypeIsChoropleth(options),
|
|
454
|
+
editorProps: {
|
|
455
|
+
themes
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
[
|
|
460
|
+
{
|
|
461
|
+
label: (0, i18n_exports._)("Choropleth opacity (%)"),
|
|
462
|
+
option: "layers[0].choroplethOpacity",
|
|
463
|
+
editor: "editor.percent",
|
|
464
|
+
showEditor: ({ options }) => checkTypeIsChoropleth(options),
|
|
465
|
+
editorProps: {
|
|
466
|
+
themes,
|
|
467
|
+
min: 0
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
// TODO: add support for seriesColorsByField option
|
|
472
|
+
// [
|
|
473
|
+
// {
|
|
474
|
+
// label: _('Series colors by field name'),
|
|
475
|
+
// option: 'seriesColorsByField',
|
|
476
|
+
// editor: 'editor.seriesColorsByField',
|
|
477
|
+
// },
|
|
478
|
+
// ],
|
|
479
|
+
BackgroundColor_default({ themes }),
|
|
480
|
+
[
|
|
481
|
+
{
|
|
482
|
+
label: (0, i18n_exports._)("Show base layer"),
|
|
483
|
+
option: "showBaseLayer",
|
|
484
|
+
editor: "editor.toggle"
|
|
485
|
+
}
|
|
486
|
+
],
|
|
487
|
+
[
|
|
488
|
+
{
|
|
489
|
+
label: (0, i18n_exports._)("Base layer tile server"),
|
|
490
|
+
option: "baseLayerTileServer",
|
|
491
|
+
editor: "editor.text",
|
|
492
|
+
showEditor: ({ options }) => options.showBaseLayer !== false
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
[
|
|
496
|
+
{
|
|
497
|
+
label: (0, i18n_exports._)("Base layer tile server type"),
|
|
498
|
+
option: "baseLayerTileServerType",
|
|
499
|
+
editor: "editor.radioBar",
|
|
500
|
+
showEditor: ({ options }) => options.showBaseLayer === false ? false : !(typeof options.baseLayerTileServer === "undefined" || options.baseLayerTileServer === ""),
|
|
501
|
+
editorProps: {
|
|
502
|
+
values: [
|
|
503
|
+
{ label: (0, i18n_exports._)("Vector"), value: "vector" },
|
|
504
|
+
{ label: (0, i18n_exports._)("Raster"), value: "raster" }
|
|
505
|
+
]
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
]
|
|
510
|
+
}
|
|
511
|
+
];
|
|
737
512
|
var config = {
|
|
738
513
|
/**
|
|
739
514
|
* unique viz key
|
|
740
515
|
*/
|
|
741
|
-
key:
|
|
742
|
-
|
|
516
|
+
key: "splunk.map",
|
|
743
517
|
/**
|
|
744
518
|
* viz name
|
|
745
519
|
*/
|
|
746
|
-
name: (0,
|
|
747
|
-
category:
|
|
748
|
-
status:
|
|
749
|
-
|
|
520
|
+
name: (0, i18n_exports._)("Map"),
|
|
521
|
+
category: "Spatial" /* SPATIAL */,
|
|
522
|
+
status: "preview",
|
|
750
523
|
/**
|
|
751
524
|
* viz icon
|
|
752
525
|
*/
|
|
753
|
-
icon:
|
|
754
|
-
placeholderIcon:
|
|
755
|
-
dataContract
|
|
756
|
-
size
|
|
757
|
-
defaultContext
|
|
758
|
-
optionsSchema:
|
|
759
|
-
editorConfig
|
|
526
|
+
icon: visualization_icons_exports.Map,
|
|
527
|
+
placeholderIcon: placeholders_exports.Map,
|
|
528
|
+
dataContract,
|
|
529
|
+
size,
|
|
530
|
+
defaultContext,
|
|
531
|
+
optionsSchema: visualization_schemas_exports.mapOptionsSchema,
|
|
532
|
+
editorConfig,
|
|
760
533
|
events: {
|
|
761
|
-
|
|
762
|
-
description:
|
|
763
|
-
parentKeys: [
|
|
534
|
+
"map.load": {
|
|
535
|
+
description: "triggered when map is fully loaded",
|
|
536
|
+
parentKeys: ["exec"]
|
|
764
537
|
},
|
|
765
|
-
|
|
766
|
-
description:
|
|
538
|
+
"map.click": {
|
|
539
|
+
description: "trigger when user clicks map layer"
|
|
767
540
|
}
|
|
768
541
|
},
|
|
769
|
-
supports: [
|
|
770
|
-
themes
|
|
542
|
+
supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "events" /* EVENTS */, "placeholder" /* PLACEHOLDER */],
|
|
543
|
+
themes,
|
|
771
544
|
requiredProps: []
|
|
772
545
|
};
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
/***/ }),
|
|
776
|
-
|
|
777
|
-
/***/ 6:
|
|
778
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
779
|
-
|
|
780
|
-
"use strict";
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
Object.defineProperty(exports, "__esModule", {
|
|
784
|
-
value: true
|
|
785
|
-
});
|
|
786
|
-
exports.VizBehavior = void 0;
|
|
787
|
-
var VizBehavior;
|
|
788
|
-
|
|
789
|
-
(function (VizBehavior) {
|
|
790
|
-
/**
|
|
791
|
-
* Dynamic Options Behavior.
|
|
792
|
-
* This allows visualization options to be powered by data
|
|
793
|
-
*
|
|
794
|
-
* **Example**
|
|
795
|
-
*
|
|
796
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
797
|
-
* would configure sparklineValues with an array of data points
|
|
798
|
-
* coming from the first series in the primary datasource
|
|
799
|
-
*
|
|
800
|
-
*/
|
|
801
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
802
|
-
VizBehavior["EVENTS"] = "events";
|
|
803
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
804
|
-
/**
|
|
805
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
806
|
-
* missing.
|
|
807
|
-
* @type {string}
|
|
808
|
-
*/
|
|
809
|
-
|
|
810
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
811
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
812
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
813
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
814
|
-
|
|
815
|
-
/***/ }),
|
|
816
|
-
|
|
817
|
-
/***/ 7:
|
|
818
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
819
|
-
|
|
820
|
-
"use strict";
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
Object.defineProperty(exports, "__esModule", {
|
|
824
|
-
value: true
|
|
825
|
-
});
|
|
826
|
-
exports.VizCategory = void 0;
|
|
827
|
-
var VizCategory;
|
|
828
|
-
|
|
829
|
-
(function (VizCategory) {
|
|
830
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
831
|
-
VizCategory["TRENDS"] = "Trends";
|
|
832
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
833
|
-
VizCategory["TABLE"] = "Table";
|
|
834
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
835
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
836
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
837
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
838
|
-
VizCategory["MISC"] = "misc";
|
|
839
|
-
VizCategory["FLOW"] = "Flow";
|
|
840
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
841
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
842
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
843
|
-
|
|
844
|
-
/***/ })
|
|
845
|
-
|
|
846
|
-
/******/ });
|
|
847
|
-
//# sourceMappingURL=Map.config.js.map
|
|
546
|
+
var config_default = enhanceConfig(config);
|
|
547
|
+
//# sourceMappingURL=Map.config.js.map
|