@splunk/visualizations 24.2.0 → 24.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_PureVisualizations_PureFillerGauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureFillerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Hover.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_base_map_light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_geostats_by.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_center_seattle.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_zoom_9.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_duplicate_entries_from.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_duplicate_entries_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_discontinuous_ranges.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_from_equals_to_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_invalid_entries_from_is_larger_than_to.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Invalid_ranges_missing_entries.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Orientation_horizontal_width_150_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMarkerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSankey_dimensions_less_than_minWidth_300_and_minHeight_200.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSankey_invalid_columns_data.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Choropleth_Svg_Choropleth_Svg_Missing_Props_Message_When_No_Svg.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Filler_Gauge_Filler_Gauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Basic_Map.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Static_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Dynamic_coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Result_Limit_Set_To_3.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_with_geostats_data_No_render.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Pie_Pie_Missing_Column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Sankey_Sankey_Dimension_Too_Small.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_By_Type_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Kitchen_Sink.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Right.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Align_Single_Column.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_Color_light_blue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_No_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Background_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Basic_Table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Basic_Table_With_No_Click.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Cell_Types.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Gradient.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Override.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Column_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Count_2.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Header_Colors.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Row_Colors.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Custom_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Dark_Background_No_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Dark_Background_Stripe.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Format_Number.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Format_Number_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Header_Visibility_fixed.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Header_Visibility_none.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_100_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Invalid_Background_Color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Multi_Value_Field.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_No_Stripes.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_No_Stripes_Row_Numbers.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_false.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Internal_Fields_true_default.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Show_Row_Numbers_true.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparklines_Adv.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Table_Formatting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Table_Gradient.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Time_Formatting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Width_Px.png +0 -0
- package/Area.config.js +15 -15
- package/Area.config.js.map +1 -1
- package/Area.js +108 -121
- package/Area.js.map +1 -1
- package/Bar.config.js +15 -15
- package/Bar.config.js.map +1 -1
- package/Bar.js +101 -114
- package/Bar.js.map +1 -1
- package/Bubble.config.js +8 -8
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +94 -107
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +11 -9
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +120 -131
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +15 -15
- package/Column.config.js.map +1 -1
- package/Column.js +101 -114
- package/Column.js.map +1 -1
- package/Ellipse.config.js +22 -2
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +106 -99
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +8 -8
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +107 -120
- package/FillerGauge.js.map +1 -1
- package/Image.js +81 -97
- package/Image.js.map +1 -1
- package/Line.config.js +8 -8
- package/Line.config.js.map +1 -1
- package/Line.js +101 -114
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +4 -4
- package/LinkGraph.js +128 -141
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +740 -0
- package/Map.config.js.map +1 -0
- package/Map.js +3137 -0
- package/Map.js.map +1 -0
- package/Markdown.config.js +12 -12
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +99 -115
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +6 -6
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +2953 -3060
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +11 -11
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +137 -139
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +13 -13
- package/Pie.config.js.map +1 -1
- package/Pie.js +912 -1019
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +11 -11
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +153 -155
- package/Punchcard.js.map +1 -1
- package/README.internal.md +36 -3
- package/README.md +7 -9
- package/Rectangle.config.js +32 -12
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +187 -183
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +35 -25
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +2964 -3079
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +11 -11
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +231 -247
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +23 -22
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +423 -439
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +20 -20
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +33 -34
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +176 -181
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +22 -22
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +389 -405
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +19 -7
- package/Table.config.js.map +1 -1
- package/Table.js +522 -383
- package/Table.js.map +1 -1
- package/common/Charting.js +21 -22
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +2 -2
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +14 -15
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +2 -2
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +7 -8
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +22 -22
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +16 -16
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +4 -4
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +13 -13
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +8 -8
- package/common/shapeUtils.js.map +1 -1
- package/common/withDashboardViz.js +53 -68
- package/common/withDashboardViz.js.map +1 -1
- package/loki.config.js +2 -0
- package/package.json +19 -15
- package/common/version.js +0 -110
- package/common/version.js.map +0 -1
- package/scripts/generateVersion.js +0 -13
package/Map.config.js
ADDED
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright © 2018 Splunk Inc.
|
|
3
|
+
* SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
4
|
+
* in part without a valid written license from Splunk Inc. is PROHIBITED.
|
|
5
|
+
*/
|
|
6
|
+
module.exports =
|
|
7
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
8
|
+
/******/ // The module cache
|
|
9
|
+
/******/ var installedModules = {};
|
|
10
|
+
/******/
|
|
11
|
+
/******/ // The require function
|
|
12
|
+
/******/ function __webpack_require__(moduleId) {
|
|
13
|
+
/******/
|
|
14
|
+
/******/ // Check if module is in cache
|
|
15
|
+
/******/ if(installedModules[moduleId]) {
|
|
16
|
+
/******/ return installedModules[moduleId].exports;
|
|
17
|
+
/******/ }
|
|
18
|
+
/******/ // Create a new module (and put it into the cache)
|
|
19
|
+
/******/ var module = installedModules[moduleId] = {
|
|
20
|
+
/******/ i: moduleId,
|
|
21
|
+
/******/ l: false,
|
|
22
|
+
/******/ exports: {}
|
|
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 = 50);
|
|
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, __webpack_require__) {
|
|
104
|
+
|
|
105
|
+
"use strict";
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var _defineProperty = __webpack_require__(6);
|
|
109
|
+
|
|
110
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
111
|
+
var t = {};
|
|
112
|
+
|
|
113
|
+
for (var p in s) {
|
|
114
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
118
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
119
|
+
}
|
|
120
|
+
return t;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
Object.defineProperty(exports, "__esModule", {
|
|
124
|
+
value: true
|
|
125
|
+
});
|
|
126
|
+
exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
127
|
+
|
|
128
|
+
var lodash_1 = __webpack_require__(4);
|
|
129
|
+
|
|
130
|
+
var schemaUtils_1 = __webpack_require__(3);
|
|
131
|
+
|
|
132
|
+
var VizBehavior_1 = __webpack_require__(2);
|
|
133
|
+
|
|
134
|
+
var dynamicOptionsDSLType = {
|
|
135
|
+
type: 'string',
|
|
136
|
+
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Helper function to extend an options schema with dynamic options DSL
|
|
140
|
+
* @param optionsSchema a visualization's options schema
|
|
141
|
+
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
145
|
+
var enhancedOptionsSchema = {};
|
|
146
|
+
Object.keys(optionsSchema).forEach(function (key) {
|
|
147
|
+
var _a = optionsSchema[key],
|
|
148
|
+
title = _a.title,
|
|
149
|
+
description = _a.description,
|
|
150
|
+
readOnly = _a.readOnly,
|
|
151
|
+
writeOnly = _a.writeOnly,
|
|
152
|
+
examples = _a.examples,
|
|
153
|
+
defaultValue = _a.default,
|
|
154
|
+
type = _a.type,
|
|
155
|
+
properties = _a.properties,
|
|
156
|
+
patternProperties = _a.patternProperties,
|
|
157
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
158
|
+
|
|
159
|
+
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
160
|
+
title: title
|
|
161
|
+
}), description !== undefined && {
|
|
162
|
+
description: description
|
|
163
|
+
}), readOnly !== undefined && {
|
|
164
|
+
readOnly: readOnly
|
|
165
|
+
}), writeOnly !== undefined && {
|
|
166
|
+
writeOnly: writeOnly
|
|
167
|
+
}), examples !== undefined && {
|
|
168
|
+
examples: examples
|
|
169
|
+
}), defaultValue !== undefined && {
|
|
170
|
+
default: defaultValue
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
if (type === 'object') {
|
|
174
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
175
|
+
type: type
|
|
176
|
+
}), properties && {
|
|
177
|
+
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
if (patternProperties) {
|
|
181
|
+
var enhancedPatternProperties = {};
|
|
182
|
+
Object.keys(patternProperties).forEach(function (opt) {
|
|
183
|
+
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
184
|
+
});
|
|
185
|
+
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
189
|
+
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
190
|
+
type: type
|
|
191
|
+
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
return enhancedOptionsSchema;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
199
|
+
/**
|
|
200
|
+
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
201
|
+
* @param vizConfig a Visualization Config
|
|
202
|
+
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
function enhanceConfig(vizConfig) {
|
|
206
|
+
var enhancedConfig = vizConfig;
|
|
207
|
+
|
|
208
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
209
|
+
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return enhancedConfig;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
exports.enhanceConfig = enhanceConfig;
|
|
216
|
+
|
|
217
|
+
function isDynamicOption(option) {
|
|
218
|
+
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
222
|
+
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
226
|
+
* 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
|
|
227
|
+
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
228
|
+
* 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
|
|
229
|
+
*
|
|
230
|
+
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
function hasCompatibleContexts(vizContext, presetContext) {
|
|
234
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
235
|
+
return presetContextKeys.every(function (contextKey) {
|
|
236
|
+
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
245
|
+
var presetOptionKeys = Object.keys(presetOptions);
|
|
246
|
+
return presetOptionKeys.every(function (optionKey) {
|
|
247
|
+
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
252
|
+
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
253
|
+
*
|
|
254
|
+
* @param {Object} vizContext - the current vizContext definition
|
|
255
|
+
* @param {Object} vizOptions - the current vizOptions definition
|
|
256
|
+
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
261
|
+
return presets.find(function (preset) {
|
|
262
|
+
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
263
|
+
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
264
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
265
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
266
|
+
// if not, then the preset is invalid in config.ts
|
|
267
|
+
|
|
268
|
+
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
269
|
+
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
exports.getInitialPreset = getInitialPreset;
|
|
274
|
+
/**
|
|
275
|
+
* generates number precision values for a Select editor
|
|
276
|
+
*
|
|
277
|
+
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
278
|
+
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
function generatePrecisionValues(numPrecisionValues) {
|
|
282
|
+
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
283
|
+
return {
|
|
284
|
+
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
285
|
+
value: i
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
exports.generatePrecisionValues = generatePrecisionValues;
|
|
291
|
+
|
|
292
|
+
/***/ }),
|
|
293
|
+
|
|
294
|
+
/***/ 10:
|
|
295
|
+
/***/ (function(module, exports) {
|
|
296
|
+
|
|
297
|
+
module.exports = require("@splunk/visualization-color-palettes");
|
|
298
|
+
|
|
299
|
+
/***/ }),
|
|
300
|
+
|
|
301
|
+
/***/ 17:
|
|
302
|
+
/***/ (function(module, exports) {
|
|
303
|
+
|
|
304
|
+
module.exports = require("@splunk/themes");
|
|
305
|
+
|
|
306
|
+
/***/ }),
|
|
307
|
+
|
|
308
|
+
/***/ 2:
|
|
309
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
310
|
+
|
|
311
|
+
"use strict";
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
Object.defineProperty(exports, "__esModule", {
|
|
315
|
+
value: true
|
|
316
|
+
});
|
|
317
|
+
exports.VizBehavior = void 0;
|
|
318
|
+
var VizBehavior;
|
|
319
|
+
|
|
320
|
+
(function (VizBehavior) {
|
|
321
|
+
/**
|
|
322
|
+
* Dynamic Options Behavior.
|
|
323
|
+
* This allows visualization options to be powered by data
|
|
324
|
+
*
|
|
325
|
+
* **Example**
|
|
326
|
+
*
|
|
327
|
+
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
328
|
+
* would configure sparklineValues with an array of data points
|
|
329
|
+
* coming from the first series in the primary datasource
|
|
330
|
+
*
|
|
331
|
+
*/
|
|
332
|
+
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
333
|
+
VizBehavior["EVENTS"] = "events";
|
|
334
|
+
/**
|
|
335
|
+
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
336
|
+
* missing.
|
|
337
|
+
* @type {string}
|
|
338
|
+
*/
|
|
339
|
+
|
|
340
|
+
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
341
|
+
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
342
|
+
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
343
|
+
|
|
344
|
+
/***/ }),
|
|
345
|
+
|
|
346
|
+
/***/ 3:
|
|
347
|
+
/***/ (function(module, exports) {
|
|
348
|
+
|
|
349
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
350
|
+
|
|
351
|
+
/***/ }),
|
|
352
|
+
|
|
353
|
+
/***/ 4:
|
|
354
|
+
/***/ (function(module, exports) {
|
|
355
|
+
|
|
356
|
+
module.exports = require("lodash");
|
|
357
|
+
|
|
358
|
+
/***/ }),
|
|
359
|
+
|
|
360
|
+
/***/ 5:
|
|
361
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
362
|
+
|
|
363
|
+
"use strict";
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
Object.defineProperty(exports, "__esModule", {
|
|
367
|
+
value: true
|
|
368
|
+
});
|
|
369
|
+
exports.VizCategory = void 0;
|
|
370
|
+
var VizCategory;
|
|
371
|
+
|
|
372
|
+
(function (VizCategory) {
|
|
373
|
+
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
374
|
+
VizCategory["TRENDS"] = "Trends";
|
|
375
|
+
VizCategory["COMPARISONS"] = "Comparisons";
|
|
376
|
+
VizCategory["TABLE"] = "Table";
|
|
377
|
+
VizCategory["GAUGE"] = "Gauge";
|
|
378
|
+
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
379
|
+
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
380
|
+
VizCategory["SHAPES"] = "Shapes";
|
|
381
|
+
VizCategory["MISC"] = "misc";
|
|
382
|
+
VizCategory["FLOW"] = "Flow";
|
|
383
|
+
VizCategory["CORRELATION"] = "Correlation";
|
|
384
|
+
VizCategory["SPATIAL"] = "Spatial";
|
|
385
|
+
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
386
|
+
|
|
387
|
+
/***/ }),
|
|
388
|
+
|
|
389
|
+
/***/ 50:
|
|
390
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
391
|
+
|
|
392
|
+
"use strict";
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
Object.defineProperty(exports, "__esModule", {
|
|
396
|
+
value: true
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
var visualization_icons_1 = __webpack_require__(9);
|
|
400
|
+
|
|
401
|
+
var schemaUtils_1 = __webpack_require__(3);
|
|
402
|
+
|
|
403
|
+
var visualization_color_palettes_1 = __webpack_require__(10);
|
|
404
|
+
|
|
405
|
+
var themes_1 = __webpack_require__(17);
|
|
406
|
+
|
|
407
|
+
var i18n_1 = __webpack_require__(0);
|
|
408
|
+
|
|
409
|
+
var VizBehavior_1 = __webpack_require__(2);
|
|
410
|
+
|
|
411
|
+
var VizCategory_1 = __webpack_require__(5);
|
|
412
|
+
|
|
413
|
+
var configUtils_1 = __webpack_require__(1);
|
|
414
|
+
|
|
415
|
+
var defaultContext = {
|
|
416
|
+
colorRangeConfig: [{
|
|
417
|
+
to: 20,
|
|
418
|
+
value: '#D41F1F'
|
|
419
|
+
}, {
|
|
420
|
+
from: 20,
|
|
421
|
+
to: 40,
|
|
422
|
+
value: '#D94E17'
|
|
423
|
+
}, {
|
|
424
|
+
from: 40,
|
|
425
|
+
to: 60,
|
|
426
|
+
value: '#CBA700'
|
|
427
|
+
}, {
|
|
428
|
+
from: 60,
|
|
429
|
+
to: 80,
|
|
430
|
+
value: '#669922'
|
|
431
|
+
}, {
|
|
432
|
+
from: 80,
|
|
433
|
+
value: '#118832'
|
|
434
|
+
}]
|
|
435
|
+
};
|
|
436
|
+
var dataContract = {
|
|
437
|
+
requiredDataSources: [],
|
|
438
|
+
optionalDataSources: [{
|
|
439
|
+
name: 'primary',
|
|
440
|
+
description: 'DataSource that powers the visualization.'
|
|
441
|
+
}],
|
|
442
|
+
initialRequestParams: {
|
|
443
|
+
primary: {
|
|
444
|
+
offset: 0,
|
|
445
|
+
count: 10000
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
var size = {
|
|
450
|
+
initialWidth: 800,
|
|
451
|
+
initialHeight: 600
|
|
452
|
+
};
|
|
453
|
+
var optionsSchema = {
|
|
454
|
+
backgroundColor: {
|
|
455
|
+
default: '> themes.defaultBackgroundColor',
|
|
456
|
+
description: 'Specify the color for the background. You may use a dataSource to apply the color. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e".',
|
|
457
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA,
|
|
458
|
+
type: 'string'
|
|
459
|
+
},
|
|
460
|
+
center: {
|
|
461
|
+
default: [37.7749, -122.4194],
|
|
462
|
+
type: 'array',
|
|
463
|
+
description: 'Specify the center of the map in coordinates, in the form of [latitude, longitude]. When not provided, will automatically calculate map center based on available location data. When no location data available will fall back to [37.7749, -122.4194].',
|
|
464
|
+
items: {
|
|
465
|
+
type: 'number'
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
layers: {
|
|
469
|
+
default: [{
|
|
470
|
+
type: 'bubble',
|
|
471
|
+
latitude: '> primary | seriesByName("latitude")',
|
|
472
|
+
longitude: '> primary | seriesByName("longitude")',
|
|
473
|
+
seriesColors: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
474
|
+
bubbleSize: '> primary | frameWithoutSeriesNames("geobin", "latitude", "longitude") | frameBySeriesTypes("number")',
|
|
475
|
+
tooltipFields: []
|
|
476
|
+
}],
|
|
477
|
+
type: 'array',
|
|
478
|
+
description: 'Specify the data visualization layers on top of the base map. Can be empty to only show the base map.',
|
|
479
|
+
items: {
|
|
480
|
+
anyOf: [{
|
|
481
|
+
type: 'object',
|
|
482
|
+
properties: {
|
|
483
|
+
type: {
|
|
484
|
+
description: 'Specify the type of data layer method to display points on the map. For example, “bubble” or “marker”.',
|
|
485
|
+
type: 'string',
|
|
486
|
+
pattern: schemaUtils_1.getPattern(['marker']),
|
|
487
|
+
default: 'marker'
|
|
488
|
+
},
|
|
489
|
+
latitude: {
|
|
490
|
+
description: 'Specify a dataSource series to apply latitude coordinates for data points displayed on the map.',
|
|
491
|
+
type: ['string', 'array'],
|
|
492
|
+
default: '> primary | seriesByName("latitude")'
|
|
493
|
+
},
|
|
494
|
+
longitude: {
|
|
495
|
+
description: 'Specify a dataSource series to apply longitude coordinates for data points displayed on the map.',
|
|
496
|
+
type: ['string', 'array'],
|
|
497
|
+
default: '> primary | seriesByName("longitude")'
|
|
498
|
+
},
|
|
499
|
+
dataColors: {
|
|
500
|
+
description: 'Specify the colors used for data points. You may use an array of colors to be picked from, or you may use a dataSource to apply dynamic coloring. For example, “> primary | seriesByName("status") | matchValue(colorMatchConfig)”. ',
|
|
501
|
+
type: ['string', 'array']
|
|
502
|
+
},
|
|
503
|
+
seriesColors: {
|
|
504
|
+
default: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
505
|
+
description: 'Specify the colors used for data points.',
|
|
506
|
+
type: 'array',
|
|
507
|
+
items: {
|
|
508
|
+
type: 'string',
|
|
509
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
tooltipFields: {
|
|
513
|
+
description: 'Specify the fields to add to tooltips shown while hovering over data points. These fields and their corresponding values will be shown in addition to the ones displayed by default.',
|
|
514
|
+
type: 'array',
|
|
515
|
+
items: {
|
|
516
|
+
type: 'string'
|
|
517
|
+
},
|
|
518
|
+
default: []
|
|
519
|
+
},
|
|
520
|
+
resultLimit: {
|
|
521
|
+
description: 'Specify the maximum number of data points rendered on the map to improve performance.',
|
|
522
|
+
type: 'number',
|
|
523
|
+
default: 1000
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}, {
|
|
527
|
+
type: 'object',
|
|
528
|
+
properties: {
|
|
529
|
+
type: {
|
|
530
|
+
description: 'Specify the type of data layer method to display points on the map. For example, “bubble” or “marker”.',
|
|
531
|
+
type: 'string',
|
|
532
|
+
pattern: schemaUtils_1.getPattern(['bubble']),
|
|
533
|
+
default: 'bubble'
|
|
534
|
+
},
|
|
535
|
+
bubbleSize: {
|
|
536
|
+
description: 'Specify the data column to encode bubble size',
|
|
537
|
+
type: ['string', 'array'],
|
|
538
|
+
default: '> primary | frameWithoutSeriesNames("geobin", "latitude", "longitude") | frameBySeriesTypes("number")'
|
|
539
|
+
},
|
|
540
|
+
latitude: {
|
|
541
|
+
description: 'Specify a dataSource series to apply latitude coordinates for data points displayed on the map.',
|
|
542
|
+
type: ['string', 'array'],
|
|
543
|
+
items: {
|
|
544
|
+
type: 'number'
|
|
545
|
+
},
|
|
546
|
+
default: '> primary | seriesByName("latitude")'
|
|
547
|
+
},
|
|
548
|
+
longitude: {
|
|
549
|
+
description: 'Specify a dataSource series to apply longitude coordinates for data points displayed on the map.',
|
|
550
|
+
type: ['string', 'array'],
|
|
551
|
+
items: {
|
|
552
|
+
type: 'number'
|
|
553
|
+
},
|
|
554
|
+
default: '> primary | seriesByName("longitude")'
|
|
555
|
+
},
|
|
556
|
+
dataColors: {
|
|
557
|
+
description: 'Specify the colors used for data points. You may use an array of colors to be picked from, or you may use a dataSource to apply dynamic coloring. For example, “> primary | seriesByName("status") | matchValue(colorMatchConfig)”. ',
|
|
558
|
+
type: ['string', 'array']
|
|
559
|
+
},
|
|
560
|
+
seriesColors: {
|
|
561
|
+
default: visualization_color_palettes_1.VIZ_CATEGORICAL,
|
|
562
|
+
description: "Specify the colors used for data points. For example, [\"#FF0000\", \"#0000FF\", \"#008000\"].",
|
|
563
|
+
type: 'array',
|
|
564
|
+
items: {
|
|
565
|
+
type: 'string',
|
|
566
|
+
pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN_WITH_RGBA
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
tooltipFields: {
|
|
570
|
+
description: 'Specify the fields to add to tooltips shown while hovering over data points. These fields and their corresponding values will be shown in addition to the ones displayed by default.',
|
|
571
|
+
type: 'array',
|
|
572
|
+
items: {
|
|
573
|
+
type: 'string'
|
|
574
|
+
},
|
|
575
|
+
default: []
|
|
576
|
+
},
|
|
577
|
+
resultLimit: {
|
|
578
|
+
description: 'Specify the maximum number of data points rendered on the map to improve performance.',
|
|
579
|
+
type: 'number',
|
|
580
|
+
default: 1000
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}]
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
scaleUnit: {
|
|
587
|
+
default: 'metric',
|
|
588
|
+
type: 'string',
|
|
589
|
+
description: 'Specify which scale unit to use.',
|
|
590
|
+
pattern: schemaUtils_1.getPattern(['metric', 'imperial'])
|
|
591
|
+
},
|
|
592
|
+
// TODO: choropleth map retain old design
|
|
593
|
+
// showBaseLayer: {
|
|
594
|
+
// default: true,
|
|
595
|
+
// type: 'boolean',
|
|
596
|
+
// description: 'Specify if showing the base map.',
|
|
597
|
+
// },
|
|
598
|
+
showScale: {
|
|
599
|
+
default: true,
|
|
600
|
+
type: 'boolean',
|
|
601
|
+
description: 'Specify whether the scale on the bottom left is shown.'
|
|
602
|
+
},
|
|
603
|
+
baseLayerTileServer: {
|
|
604
|
+
type: 'string',
|
|
605
|
+
description: 'Specify the tile set URL for the base map.'
|
|
606
|
+
},
|
|
607
|
+
baseLayerTileServerType: {
|
|
608
|
+
type: 'string',
|
|
609
|
+
description: 'Specify the type of tile set for the base map.',
|
|
610
|
+
pattern: schemaUtils_1.getPattern(['vector', 'raster'])
|
|
611
|
+
},
|
|
612
|
+
zoom: {
|
|
613
|
+
default: 5,
|
|
614
|
+
description: 'Specify the zoom level of the map.',
|
|
615
|
+
type: 'number'
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
var themes = {
|
|
619
|
+
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
620
|
+
return themes_1.pick({
|
|
621
|
+
enterprise: {
|
|
622
|
+
dark: themes_1.variables.black(props),
|
|
623
|
+
light: themes_1.variables.backgroundColor(props)
|
|
624
|
+
},
|
|
625
|
+
prisma: themes_1.variables.backgroundColorSidebar(props)
|
|
626
|
+
})(props);
|
|
627
|
+
},
|
|
628
|
+
controlBackgroundColor: function controlBackgroundColor(props) {
|
|
629
|
+
return themes_1.pick({
|
|
630
|
+
enterprise: {
|
|
631
|
+
dark: themes_1.variables.gray22(props),
|
|
632
|
+
light: themes_1.variables.white(props)
|
|
633
|
+
},
|
|
634
|
+
prisma: themes_1.variables.backgroundColorPopup(props)
|
|
635
|
+
})(props);
|
|
636
|
+
},
|
|
637
|
+
controlForegroundColor: function controlForegroundColor(props) {
|
|
638
|
+
return themes_1.pick({
|
|
639
|
+
enterprise: themes_1.variables.textColor(props),
|
|
640
|
+
prisma: themes_1.variables.contentColorDefault(props)
|
|
641
|
+
})(props);
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
var editorConfig = [{
|
|
645
|
+
label: i18n_1._('Data Layer Formatting'),
|
|
646
|
+
layout: [[{
|
|
647
|
+
label: i18n_1._('Layer Type'),
|
|
648
|
+
option: 'layers[0].type',
|
|
649
|
+
editor: 'editor.select',
|
|
650
|
+
editorProps: {
|
|
651
|
+
values: [{
|
|
652
|
+
label: i18n_1._('Marker'),
|
|
653
|
+
value: 'marker'
|
|
654
|
+
}, {
|
|
655
|
+
label: i18n_1._('Bubble'),
|
|
656
|
+
value: 'bubble'
|
|
657
|
+
}]
|
|
658
|
+
}
|
|
659
|
+
}], [{
|
|
660
|
+
label: i18n_1._('Latitude'),
|
|
661
|
+
option: 'layers[0].latitude',
|
|
662
|
+
editor: 'editor.columnSelector',
|
|
663
|
+
editorProps: {
|
|
664
|
+
dataSourceKey: 'primary'
|
|
665
|
+
}
|
|
666
|
+
}], [{
|
|
667
|
+
label: i18n_1._('Longitude'),
|
|
668
|
+
option: 'layers[0].longitude',
|
|
669
|
+
editor: 'editor.columnSelector',
|
|
670
|
+
editorProps: {
|
|
671
|
+
dataSourceKey: 'primary'
|
|
672
|
+
}
|
|
673
|
+
}], [{
|
|
674
|
+
label: i18n_1._('Size'),
|
|
675
|
+
option: 'layers[0].bubbleSize',
|
|
676
|
+
editor: 'editor.columnSelector',
|
|
677
|
+
showEditor: function showEditor(_ref) {
|
|
678
|
+
var options = _ref.options;
|
|
679
|
+
return options.layers && options.layers.length && options.layers[0].type === 'bubble';
|
|
680
|
+
},
|
|
681
|
+
editorProps: {
|
|
682
|
+
dataSourceKey: 'primary'
|
|
683
|
+
}
|
|
684
|
+
}]]
|
|
685
|
+
}];
|
|
686
|
+
/**
|
|
687
|
+
* visualization configuration
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
var config = {
|
|
691
|
+
/**
|
|
692
|
+
* unique viz key
|
|
693
|
+
*/
|
|
694
|
+
key: 'splunk.map',
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* viz name
|
|
698
|
+
*/
|
|
699
|
+
name: 'Map',
|
|
700
|
+
category: VizCategory_1.VizCategory.CHOROPLETH,
|
|
701
|
+
status: 'preview',
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* viz icon
|
|
705
|
+
*/
|
|
706
|
+
icon: visualization_icons_1.Map,
|
|
707
|
+
dataContract: dataContract,
|
|
708
|
+
size: size,
|
|
709
|
+
defaultContext: defaultContext,
|
|
710
|
+
optionsSchema: optionsSchema,
|
|
711
|
+
editorConfig: editorConfig,
|
|
712
|
+
events: {
|
|
713
|
+
'map.load': {
|
|
714
|
+
description: 'triggered when map is fully loaded'
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
718
|
+
themes: themes,
|
|
719
|
+
requiredProps: []
|
|
720
|
+
};
|
|
721
|
+
exports.default = configUtils_1.enhanceConfig(config);
|
|
722
|
+
|
|
723
|
+
/***/ }),
|
|
724
|
+
|
|
725
|
+
/***/ 6:
|
|
726
|
+
/***/ (function(module, exports) {
|
|
727
|
+
|
|
728
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
729
|
+
|
|
730
|
+
/***/ }),
|
|
731
|
+
|
|
732
|
+
/***/ 9:
|
|
733
|
+
/***/ (function(module, exports) {
|
|
734
|
+
|
|
735
|
+
module.exports = require("@splunk/visualization-icons");
|
|
736
|
+
|
|
737
|
+
/***/ })
|
|
738
|
+
|
|
739
|
+
/******/ });
|
|
740
|
+
//# sourceMappingURL=Map.config.js.map
|