@splunk/visualizations 25.6.0 → 25.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Bar_Bar_Legend_Mode_Series_Compare.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Legend_Mode_Series_Compare.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart_Count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Timechart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_assign_default_trellisSplitBy_value_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Major_value_data_null_show_N_A.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Major_Value_Trellis.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_Height_Percentage_50_no_paginator.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/Area.config.js +12 -7
- package/Area.config.js.map +1 -1
- package/Area.js +192 -171
- package/Area.js.map +1 -1
- package/Bar.config.js +36 -8
- package/Bar.config.js.map +1 -1
- package/Bar.js +216 -172
- package/Bar.js.map +1 -1
- package/Bubble.config.js +7 -2
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +183 -162
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +12 -8
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +191 -174
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +36 -8
- package/Column.config.js.map +1 -1
- package/Column.js +216 -172
- package/Column.js.map +1 -1
- package/Ellipse.config.js +23 -20
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +168 -149
- package/Ellipse.js.map +1 -1
- package/Events.config.js +79 -19
- package/Events.config.js.map +1 -1
- package/Events.js +404 -244
- package/Events.js.map +1 -1
- package/FEATUREFLAGS.md +40 -0
- package/FillerGauge.config.js +22 -19
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +170 -151
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +3 -3
- package/Image.config.js.map +1 -1
- package/Image.js +143 -130
- package/Image.js.map +1 -1
- package/LICENSE.md +444 -8
- package/Line.config.js +12 -7
- package/Line.config.js.map +1 -1
- package/Line.js +192 -171
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +9 -15
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +743 -729
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +51 -48
- package/Map.config.js.map +1 -1
- package/Map.js +602 -587
- package/Map.js.map +1 -1
- package/Markdown.config.js +10 -9
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +185 -171
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +71 -70
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +193 -179
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +3 -3
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +179 -155
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +30 -6
- package/Pie.config.js.map +1 -1
- package/Pie.js +237 -200
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +3 -2
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +305 -291
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +22 -23
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +232 -220
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +14 -13
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +1311 -1297
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +552 -580
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +258 -244
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +242 -52
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1456 -350
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +40 -29
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +267 -58
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +1490 -363
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +249 -41
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1435 -286
- package/SingleValueRadial.js.map +1 -1
- package/TRELLIS.md +296 -0
- package/Table.config.js +39 -41
- package/Table.config.js.map +1 -1
- package/Table.js +352 -306
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +9 -3
- package/common/EventsDoc.js.map +1 -1
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +1 -1
- package/common/utils/configUtils.js +26 -20
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +2 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +115 -0
- package/common/utils/layoutUtils.js.map +1 -0
- package/common/utils/mapUtils.js +1166 -23
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +54 -46
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +14 -14
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +612 -0
- package/common/utils/trellisUtils.js.map +1 -0
- package/common/withDashboardViz.js +31 -17
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +12 -12
package/Scatter.config.js
CHANGED
|
@@ -87,367 +87,47 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 73);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
|
-
/******/ (
|
|
94
|
-
/* 0 */
|
|
95
|
-
/***/ (function(module, exports) {
|
|
96
|
-
|
|
97
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
98
|
-
|
|
99
|
-
/***/ }),
|
|
100
|
-
/* 1 */
|
|
101
|
-
/***/ (function(module, exports) {
|
|
102
|
-
|
|
103
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
104
|
-
|
|
105
|
-
/***/ }),
|
|
106
|
-
/* 2 */
|
|
107
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
108
|
-
|
|
109
|
-
"use strict";
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Object.defineProperty(exports, "__esModule", {
|
|
113
|
-
value: true
|
|
114
|
-
});
|
|
115
|
-
exports.VizBehavior = void 0;
|
|
116
|
-
var VizBehavior;
|
|
117
|
-
|
|
118
|
-
(function (VizBehavior) {
|
|
119
|
-
/**
|
|
120
|
-
* Dynamic Options Behavior.
|
|
121
|
-
* This allows visualization options to be powered by data
|
|
122
|
-
*
|
|
123
|
-
* **Example**
|
|
124
|
-
*
|
|
125
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
126
|
-
* would configure sparklineValues with an array of data points
|
|
127
|
-
* coming from the first series in the primary datasource
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
131
|
-
VizBehavior["EVENTS"] = "events";
|
|
132
|
-
/**
|
|
133
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
134
|
-
* missing.
|
|
135
|
-
* @type {string}
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
139
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
140
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
141
|
-
|
|
142
|
-
/***/ }),
|
|
143
|
-
/* 3 */
|
|
144
|
-
/***/ (function(module, exports) {
|
|
145
|
-
|
|
146
|
-
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
147
|
-
|
|
148
|
-
/***/ }),
|
|
149
|
-
/* 4 */
|
|
150
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
151
|
-
|
|
152
|
-
"use strict";
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
156
|
-
|
|
157
|
-
var _defineProperty = __webpack_require__(7);
|
|
158
|
-
|
|
159
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
160
|
-
var t = {};
|
|
161
|
-
|
|
162
|
-
for (var p in s) {
|
|
163
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
167
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
168
|
-
}
|
|
169
|
-
return t;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
Object.defineProperty(exports, "__esModule", {
|
|
173
|
-
value: true
|
|
174
|
-
});
|
|
175
|
-
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
176
|
-
|
|
177
|
-
var lodash_1 = __webpack_require__(6);
|
|
178
|
-
|
|
179
|
-
var schemaUtils_1 = __webpack_require__(3);
|
|
180
|
-
|
|
181
|
-
var VizBehavior_1 = __webpack_require__(2);
|
|
182
|
-
|
|
183
|
-
var dynamicOptionsDSLType = {
|
|
184
|
-
type: 'string',
|
|
185
|
-
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Helper function to extend an options schema with dynamic options DSL
|
|
189
|
-
* @param optionsSchema a visualization's options schema
|
|
190
|
-
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
194
|
-
var enhancedOptionsSchema = {};
|
|
195
|
-
Object.keys(optionsSchema).forEach(function (key) {
|
|
196
|
-
var _a = optionsSchema[key],
|
|
197
|
-
title = _a.title,
|
|
198
|
-
description = _a.description,
|
|
199
|
-
readOnly = _a.readOnly,
|
|
200
|
-
writeOnly = _a.writeOnly,
|
|
201
|
-
examples = _a.examples,
|
|
202
|
-
defaultValue = _a.default,
|
|
203
|
-
type = _a.type,
|
|
204
|
-
properties = _a.properties,
|
|
205
|
-
patternProperties = _a.patternProperties,
|
|
206
|
-
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
207
|
-
|
|
208
|
-
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
209
|
-
title: title
|
|
210
|
-
}), description !== undefined && {
|
|
211
|
-
description: description
|
|
212
|
-
}), readOnly !== undefined && {
|
|
213
|
-
readOnly: readOnly
|
|
214
|
-
}), writeOnly !== undefined && {
|
|
215
|
-
writeOnly: writeOnly
|
|
216
|
-
}), examples !== undefined && {
|
|
217
|
-
examples: examples
|
|
218
|
-
}), defaultValue !== undefined && {
|
|
219
|
-
default: defaultValue
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
if (type === 'object') {
|
|
223
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
224
|
-
type: type
|
|
225
|
-
}), properties && {
|
|
226
|
-
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
if (patternProperties) {
|
|
230
|
-
var enhancedPatternProperties = {};
|
|
231
|
-
Object.keys(patternProperties).forEach(function (opt) {
|
|
232
|
-
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
233
|
-
});
|
|
234
|
-
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
235
|
-
}
|
|
236
|
-
} else {
|
|
237
|
-
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
238
|
-
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
239
|
-
type: type
|
|
240
|
-
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
return enhancedOptionsSchema;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
248
|
-
/**
|
|
249
|
-
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
250
|
-
* this function also collapse all editor panels
|
|
251
|
-
* @param vizConfig a Visualization Config
|
|
252
|
-
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
253
|
-
* and containing `open: false` for all editor panels in editorConfig
|
|
254
|
-
*/
|
|
255
|
-
|
|
256
|
-
function enhanceConfig(vizConfig) {
|
|
257
|
-
var enhancedConfig = Object.assign({}, vizConfig);
|
|
258
|
-
|
|
259
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
260
|
-
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
264
|
-
return Object.assign(Object.assign({}, config), {
|
|
265
|
-
open: config.open || false
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
return enhancedConfig;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
exports.enhanceConfig = enhanceConfig;
|
|
272
|
-
/**
|
|
273
|
-
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
274
|
-
* Created for editor unit tests
|
|
275
|
-
* @param vizConfig a Visualization Config
|
|
276
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
277
|
-
*/
|
|
278
|
-
|
|
279
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
280
|
-
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
281
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
282
|
-
return Object.assign(Object.assign({}, config), {
|
|
283
|
-
open: true
|
|
284
|
-
});
|
|
285
|
-
});
|
|
286
|
-
return editorPanelUncollapsedConfig;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
290
|
-
|
|
291
|
-
function isDynamicOption(option) {
|
|
292
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
296
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
300
|
-
* 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
|
|
301
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
302
|
-
* 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
|
|
303
|
-
*
|
|
304
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
305
|
-
*/
|
|
306
|
-
|
|
307
|
-
function hasCompatibleContexts(vizContext, presetContext) {
|
|
308
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
309
|
-
return presetContextKeys.every(function (contextKey) {
|
|
310
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
315
|
-
*/
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
319
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
320
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
321
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
326
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
327
|
-
*
|
|
328
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
329
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
330
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
335
|
-
return presets.find(function (preset) {
|
|
336
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
337
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
338
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
339
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
340
|
-
// if not, then the preset is invalid in config.ts
|
|
341
|
-
|
|
342
|
-
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
343
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
exports.getInitialPreset = getInitialPreset;
|
|
348
|
-
/**
|
|
349
|
-
* generates number precision values for a Select editor
|
|
350
|
-
*
|
|
351
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
352
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
|
-
function generatePrecisionValues(numPrecisionValues) {
|
|
356
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
357
|
-
return {
|
|
358
|
-
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
359
|
-
value: i
|
|
360
|
-
};
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
exports.generatePrecisionValues = generatePrecisionValues;
|
|
365
|
-
/**
|
|
366
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
367
|
-
*
|
|
368
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
369
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
370
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
371
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
375
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
376
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
exports.insertLayout = insertLayout;
|
|
383
|
-
|
|
384
|
-
/***/ }),
|
|
385
|
-
/* 5 */,
|
|
386
|
-
/* 6 */
|
|
387
|
-
/***/ (function(module, exports) {
|
|
93
|
+
/******/ ({
|
|
388
94
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
/***/ }),
|
|
392
|
-
/* 7 */
|
|
95
|
+
/***/ 0:
|
|
393
96
|
/***/ (function(module, exports) {
|
|
394
97
|
|
|
395
|
-
module.exports = require("@
|
|
98
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
396
99
|
|
|
397
100
|
/***/ }),
|
|
398
|
-
/* 8 */
|
|
399
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
400
|
-
|
|
401
|
-
"use strict";
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
Object.defineProperty(exports, "__esModule", {
|
|
405
|
-
value: true
|
|
406
|
-
});
|
|
407
|
-
exports.VizCategory = void 0;
|
|
408
|
-
var VizCategory;
|
|
409
|
-
|
|
410
|
-
(function (VizCategory) {
|
|
411
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
412
|
-
VizCategory["TRENDS"] = "Trends";
|
|
413
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
414
|
-
VizCategory["TABLE"] = "Table";
|
|
415
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
416
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
417
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
418
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
419
|
-
VizCategory["MISC"] = "misc";
|
|
420
|
-
VizCategory["FLOW"] = "Flow";
|
|
421
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
422
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
423
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
424
101
|
|
|
425
|
-
/***/
|
|
426
|
-
/* 9 */
|
|
102
|
+
/***/ 1:
|
|
427
103
|
/***/ (function(module, exports) {
|
|
428
104
|
|
|
429
|
-
module.exports = require("@
|
|
105
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
430
106
|
|
|
431
107
|
/***/ }),
|
|
432
|
-
|
|
108
|
+
|
|
109
|
+
/***/ 10:
|
|
433
110
|
/***/ (function(module, exports) {
|
|
434
111
|
|
|
435
112
|
module.exports = require("@splunk/themes/variables");
|
|
436
113
|
|
|
437
114
|
/***/ }),
|
|
438
|
-
|
|
115
|
+
|
|
116
|
+
/***/ 11:
|
|
439
117
|
/***/ (function(module, exports) {
|
|
440
118
|
|
|
441
119
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
442
120
|
|
|
443
121
|
/***/ }),
|
|
444
|
-
|
|
122
|
+
|
|
123
|
+
/***/ 12:
|
|
445
124
|
/***/ (function(module, exports) {
|
|
446
125
|
|
|
447
126
|
module.exports = require("@splunk/visualization-icons");
|
|
448
127
|
|
|
449
128
|
/***/ }),
|
|
450
|
-
|
|
129
|
+
|
|
130
|
+
/***/ 13:
|
|
451
131
|
/***/ (function(module, exports, __webpack_require__) {
|
|
452
132
|
|
|
453
133
|
"use strict";
|
|
@@ -477,14 +157,15 @@ var background = function background(_ref) {
|
|
|
477
157
|
exports.default = background;
|
|
478
158
|
|
|
479
159
|
/***/ }),
|
|
480
|
-
|
|
160
|
+
|
|
161
|
+
/***/ 14:
|
|
481
162
|
/***/ (function(module, exports) {
|
|
482
163
|
|
|
483
164
|
module.exports = require("@splunk/visualization-color-palettes");
|
|
484
165
|
|
|
485
166
|
/***/ }),
|
|
486
|
-
|
|
487
|
-
|
|
167
|
+
|
|
168
|
+
/***/ 16:
|
|
488
169
|
/***/ (function(module, exports, __webpack_require__) {
|
|
489
170
|
|
|
490
171
|
"use strict";
|
|
@@ -624,7 +305,8 @@ exports.AxesChartDataConfigAreaColumnLine = {
|
|
|
624
305
|
exports.default = AxesChartDataConfig;
|
|
625
306
|
|
|
626
307
|
/***/ }),
|
|
627
|
-
|
|
308
|
+
|
|
309
|
+
/***/ 17:
|
|
628
310
|
/***/ (function(module, exports, __webpack_require__) {
|
|
629
311
|
|
|
630
312
|
"use strict";
|
|
@@ -670,7 +352,8 @@ var AxesChartColorAndStyle = {
|
|
|
670
352
|
exports.default = AxesChartColorAndStyle;
|
|
671
353
|
|
|
672
354
|
/***/ }),
|
|
673
|
-
|
|
355
|
+
|
|
356
|
+
/***/ 18:
|
|
674
357
|
/***/ (function(module, exports, __webpack_require__) {
|
|
675
358
|
|
|
676
359
|
"use strict";
|
|
@@ -734,7 +417,8 @@ var AxesChartLegend = {
|
|
|
734
417
|
exports.default = AxesChartLegend;
|
|
735
418
|
|
|
736
419
|
/***/ }),
|
|
737
|
-
|
|
420
|
+
|
|
421
|
+
/***/ 19:
|
|
738
422
|
/***/ (function(module, exports, __webpack_require__) {
|
|
739
423
|
|
|
740
424
|
"use strict";
|
|
@@ -913,43 +597,245 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
913
597
|
}
|
|
914
598
|
}], [{
|
|
915
599
|
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
916
|
-
option: 'xAxisAbbreviation',
|
|
600
|
+
option: 'xAxisAbbreviation',
|
|
601
|
+
editor: 'editor.checkbox',
|
|
602
|
+
showEditor: function showEditor(_ref7) {
|
|
603
|
+
var options = _ref7.options;
|
|
604
|
+
return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
|
|
605
|
+
}
|
|
606
|
+
}], [{
|
|
607
|
+
label: i18n_1._('Include zero'),
|
|
608
|
+
option: 'showXAxisWithZero',
|
|
609
|
+
editor: 'editor.checkbox'
|
|
610
|
+
}], [{
|
|
611
|
+
label: i18n_1._('Extend to whole grid'),
|
|
612
|
+
option: 'showXAxisExtendedRange',
|
|
613
|
+
editor: 'editor.checkbox'
|
|
614
|
+
}], [{
|
|
615
|
+
label: i18n_1._('Minimum axis value'),
|
|
616
|
+
option: 'xAxisMin',
|
|
617
|
+
editor: 'editor.number'
|
|
618
|
+
}, {
|
|
619
|
+
label: i18n_1._('Maximum axis value'),
|
|
620
|
+
option: 'xAxisMax',
|
|
621
|
+
editor: 'editor.number'
|
|
622
|
+
}], [{
|
|
623
|
+
label: i18n_1._('Axis line visibility'),
|
|
624
|
+
option: 'xAxisLineVisibility',
|
|
625
|
+
editor: 'editor.checkbox'
|
|
626
|
+
}], // this option is disabled for bubble and scatter
|
|
627
|
+
// [
|
|
628
|
+
// {
|
|
629
|
+
// label: _('Major gridlines'),
|
|
630
|
+
// option: 'showXMajorGridLines',
|
|
631
|
+
// editor: 'editor.checkbox',
|
|
632
|
+
// },
|
|
633
|
+
// ],
|
|
634
|
+
[{
|
|
635
|
+
label: i18n_1._('Major tick visibility'),
|
|
636
|
+
option: 'xAxisMajorTickVisibility',
|
|
637
|
+
editor: 'editor.radioBar',
|
|
638
|
+
editorProps: {
|
|
639
|
+
values: [{
|
|
640
|
+
label: i18n_1._('Auto'),
|
|
641
|
+
value: 'auto'
|
|
642
|
+
}, {
|
|
643
|
+
label: i18n_1._('Show'),
|
|
644
|
+
value: 'show'
|
|
645
|
+
}, {
|
|
646
|
+
label: i18n_1._('Hide'),
|
|
647
|
+
value: 'hide'
|
|
648
|
+
}]
|
|
649
|
+
}
|
|
650
|
+
}], [{
|
|
651
|
+
label: i18n_1._('Major tick size (px)'),
|
|
652
|
+
option: 'xAxisMajorTickSize',
|
|
653
|
+
editor: 'editor.slider',
|
|
654
|
+
editorProps: {
|
|
655
|
+
min: 0,
|
|
656
|
+
max: 10,
|
|
657
|
+
step: 1
|
|
658
|
+
},
|
|
659
|
+
showEditor: function showEditor(_ref8) {
|
|
660
|
+
var options = _ref8.options;
|
|
661
|
+
return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
|
|
662
|
+
}
|
|
663
|
+
}], [{
|
|
664
|
+
label: i18n_1._('Major tick interval spacing'),
|
|
665
|
+
option: 'xAxisMajorTickInterval',
|
|
666
|
+
editor: 'editor.number',
|
|
667
|
+
showEditor: function showEditor(_ref9) {
|
|
668
|
+
var options = _ref9.options;
|
|
669
|
+
return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
|
|
670
|
+
}
|
|
671
|
+
}], [{
|
|
672
|
+
label: i18n_1._('Minor gridlines'),
|
|
673
|
+
option: 'showXMinorGridLines',
|
|
674
|
+
editor: 'editor.checkbox'
|
|
675
|
+
}], [{
|
|
676
|
+
label: i18n_1._('Minor tick visibility'),
|
|
677
|
+
option: 'xAxisMinorTickVisibility',
|
|
678
|
+
editor: 'editor.radioBar',
|
|
679
|
+
editorProps: {
|
|
680
|
+
values: [{
|
|
681
|
+
label: i18n_1._('Auto'),
|
|
682
|
+
value: 'auto'
|
|
683
|
+
}, {
|
|
684
|
+
label: i18n_1._('Show'),
|
|
685
|
+
value: 'show'
|
|
686
|
+
}, {
|
|
687
|
+
label: i18n_1._('Hide'),
|
|
688
|
+
value: 'hide'
|
|
689
|
+
}]
|
|
690
|
+
}
|
|
691
|
+
}], [{
|
|
692
|
+
label: i18n_1._('Minor tick size (px)'),
|
|
693
|
+
option: 'xAxisMinorTickSize',
|
|
694
|
+
editor: 'editor.slider',
|
|
695
|
+
editorProps: {
|
|
696
|
+
min: 0,
|
|
697
|
+
max: 10,
|
|
698
|
+
step: 1
|
|
699
|
+
},
|
|
700
|
+
showEditor: function showEditor(_ref10) {
|
|
701
|
+
var options = _ref10.options;
|
|
702
|
+
return options.xAxisMinorTickVisibility === 'show' || options.xAxisMinorTickVisibility === 'auto' || options.xAxisMinorTickVisibility === undefined;
|
|
703
|
+
}
|
|
704
|
+
}]])
|
|
705
|
+
};
|
|
706
|
+
exports.default = AxesChartXGridAndLabels;
|
|
707
|
+
|
|
708
|
+
/***/ }),
|
|
709
|
+
|
|
710
|
+
/***/ 2:
|
|
711
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
712
|
+
|
|
713
|
+
"use strict";
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
Object.defineProperty(exports, "__esModule", {
|
|
717
|
+
value: true
|
|
718
|
+
});
|
|
719
|
+
exports.VizBehavior = void 0;
|
|
720
|
+
var VizBehavior;
|
|
721
|
+
|
|
722
|
+
(function (VizBehavior) {
|
|
723
|
+
/**
|
|
724
|
+
* Dynamic Options Behavior.
|
|
725
|
+
* This allows visualization options to be powered by data
|
|
726
|
+
*
|
|
727
|
+
* **Example**
|
|
728
|
+
*
|
|
729
|
+
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
730
|
+
* would configure sparklineValues with an array of data points
|
|
731
|
+
* coming from the first series in the primary datasource
|
|
732
|
+
*
|
|
733
|
+
*/
|
|
734
|
+
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
735
|
+
VizBehavior["EVENTS"] = "events";
|
|
736
|
+
/**
|
|
737
|
+
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
738
|
+
* missing.
|
|
739
|
+
* @type {string}
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
743
|
+
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
744
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
745
|
+
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
746
|
+
|
|
747
|
+
/***/ }),
|
|
748
|
+
|
|
749
|
+
/***/ 20:
|
|
750
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
751
|
+
|
|
752
|
+
"use strict";
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
Object.defineProperty(exports, "__esModule", {
|
|
756
|
+
value: true
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
var i18n_1 = __webpack_require__(0);
|
|
760
|
+
|
|
761
|
+
var AxesChartYGridAndLabels = {
|
|
762
|
+
label: i18n_1._('Y-axis grid and labels'),
|
|
763
|
+
layout: [[{
|
|
764
|
+
label: i18n_1._('Axis title'),
|
|
765
|
+
option: 'yAxisTitleVisibility',
|
|
766
|
+
editor: 'editor.toggle'
|
|
767
|
+
}], [{
|
|
768
|
+
label: i18n_1._('Axis title text'),
|
|
769
|
+
option: 'yAxisTitleText',
|
|
770
|
+
editor: 'editor.text',
|
|
771
|
+
showEditor: function showEditor(_ref) {
|
|
772
|
+
var options = _ref.options;
|
|
773
|
+
return options.yAxisTitleVisibility === 'show' || options.yAxisTitleVisibility === undefined;
|
|
774
|
+
}
|
|
775
|
+
}], [{
|
|
776
|
+
label: i18n_1._('Scale'),
|
|
777
|
+
option: 'yAxisScale',
|
|
778
|
+
editor: 'editor.radioBar',
|
|
779
|
+
editorProps: {
|
|
780
|
+
values: [{
|
|
781
|
+
label: i18n_1._('Linear'),
|
|
782
|
+
value: 'linear'
|
|
783
|
+
}, {
|
|
784
|
+
label: i18n_1._('Log'),
|
|
785
|
+
value: 'log'
|
|
786
|
+
}]
|
|
787
|
+
}
|
|
788
|
+
}], [{
|
|
789
|
+
label: i18n_1._('Label visibility'),
|
|
790
|
+
option: 'yAxisLabelVisibility',
|
|
791
|
+
editor: 'editor.radioBar',
|
|
792
|
+
editorProps: {
|
|
793
|
+
values: [{
|
|
794
|
+
label: i18n_1._('Auto'),
|
|
795
|
+
value: 'auto'
|
|
796
|
+
}, {
|
|
797
|
+
label: i18n_1._('Show'),
|
|
798
|
+
value: 'show'
|
|
799
|
+
}, {
|
|
800
|
+
label: i18n_1._('Hide'),
|
|
801
|
+
value: 'hide'
|
|
802
|
+
}]
|
|
803
|
+
}
|
|
804
|
+
}], [{
|
|
805
|
+
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
806
|
+
option: 'yAxisAbbreviation',
|
|
917
807
|
editor: 'editor.checkbox',
|
|
918
|
-
showEditor: function showEditor(
|
|
919
|
-
var options =
|
|
920
|
-
return options.
|
|
808
|
+
showEditor: function showEditor(_ref2) {
|
|
809
|
+
var options = _ref2.options;
|
|
810
|
+
return options.yAxisLabelVisibility === 'show' || options.yAxisLabelVisibility === 'auto' || options.yAxisLabelVisibility === undefined;
|
|
921
811
|
}
|
|
922
812
|
}], [{
|
|
923
813
|
label: i18n_1._('Include zero'),
|
|
924
|
-
option: '
|
|
814
|
+
option: 'showYAxisWithZero',
|
|
925
815
|
editor: 'editor.checkbox'
|
|
926
816
|
}], [{
|
|
927
817
|
label: i18n_1._('Extend to whole grid'),
|
|
928
|
-
option: '
|
|
818
|
+
option: 'showYAxisExtendedRange',
|
|
929
819
|
editor: 'editor.checkbox'
|
|
930
820
|
}], [{
|
|
931
821
|
label: i18n_1._('Minimum axis value'),
|
|
932
|
-
option: '
|
|
822
|
+
option: 'yAxisMin',
|
|
933
823
|
editor: 'editor.number'
|
|
934
824
|
}, {
|
|
935
825
|
label: i18n_1._('Maximum axis value'),
|
|
936
|
-
option: '
|
|
826
|
+
option: 'yAxisMax',
|
|
937
827
|
editor: 'editor.number'
|
|
938
828
|
}], [{
|
|
939
829
|
label: i18n_1._('Axis line visibility'),
|
|
940
|
-
option: '
|
|
830
|
+
option: 'yAxisLineVisibility',
|
|
941
831
|
editor: 'editor.checkbox'
|
|
942
|
-
}],
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
// editor: 'editor.checkbox',
|
|
948
|
-
// },
|
|
949
|
-
// ],
|
|
950
|
-
[{
|
|
832
|
+
}], [{
|
|
833
|
+
label: i18n_1._('Major gridlines'),
|
|
834
|
+
option: 'showYMajorGridLines',
|
|
835
|
+
editor: 'editor.checkbox'
|
|
836
|
+
}], [{
|
|
951
837
|
label: i18n_1._('Major tick visibility'),
|
|
952
|
-
option: '
|
|
838
|
+
option: 'yAxisMajorTickVisibility',
|
|
953
839
|
editor: 'editor.radioBar',
|
|
954
840
|
editorProps: {
|
|
955
841
|
values: [{
|
|
@@ -965,32 +851,32 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
965
851
|
}
|
|
966
852
|
}], [{
|
|
967
853
|
label: i18n_1._('Major tick size (px)'),
|
|
968
|
-
option: '
|
|
854
|
+
option: 'yAxisMajorTickSize',
|
|
969
855
|
editor: 'editor.slider',
|
|
970
856
|
editorProps: {
|
|
971
857
|
min: 0,
|
|
972
858
|
max: 10,
|
|
973
859
|
step: 1
|
|
974
860
|
},
|
|
975
|
-
showEditor: function showEditor(
|
|
976
|
-
var options =
|
|
977
|
-
return options.
|
|
861
|
+
showEditor: function showEditor(_ref3) {
|
|
862
|
+
var options = _ref3.options;
|
|
863
|
+
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
978
864
|
}
|
|
979
865
|
}], [{
|
|
980
866
|
label: i18n_1._('Major tick interval spacing'),
|
|
981
|
-
option: '
|
|
867
|
+
option: 'yAxisMajorTickInterval',
|
|
982
868
|
editor: 'editor.number',
|
|
983
|
-
showEditor: function showEditor(
|
|
984
|
-
var options =
|
|
985
|
-
return options.
|
|
869
|
+
showEditor: function showEditor(_ref4) {
|
|
870
|
+
var options = _ref4.options;
|
|
871
|
+
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
986
872
|
}
|
|
987
873
|
}], [{
|
|
988
874
|
label: i18n_1._('Minor gridlines'),
|
|
989
|
-
option: '
|
|
875
|
+
option: 'showYMinorGridLines',
|
|
990
876
|
editor: 'editor.checkbox'
|
|
991
877
|
}], [{
|
|
992
878
|
label: i18n_1._('Minor tick visibility'),
|
|
993
|
-
option: '
|
|
879
|
+
option: 'yAxisMinorTickVisibility',
|
|
994
880
|
editor: 'editor.radioBar',
|
|
995
881
|
editorProps: {
|
|
996
882
|
values: [{
|
|
@@ -1006,233 +892,282 @@ exports.AxesChartXGridAndLabelsBubbleScatter = {
|
|
|
1006
892
|
}
|
|
1007
893
|
}], [{
|
|
1008
894
|
label: i18n_1._('Minor tick size (px)'),
|
|
1009
|
-
option: '
|
|
895
|
+
option: 'yAxisMinorTickSize',
|
|
1010
896
|
editor: 'editor.slider',
|
|
1011
897
|
editorProps: {
|
|
1012
898
|
min: 0,
|
|
1013
899
|
max: 10,
|
|
1014
900
|
step: 1
|
|
1015
901
|
},
|
|
1016
|
-
showEditor: function showEditor(
|
|
1017
|
-
var options =
|
|
1018
|
-
return options.
|
|
902
|
+
showEditor: function showEditor(_ref5) {
|
|
903
|
+
var options = _ref5.options;
|
|
904
|
+
return options.yAxisMinorTickVisibility === 'show' || options.yAxisMinorTickVisibility === 'auto' || options.yAxisMinorTickVisibility === undefined;
|
|
1019
905
|
}
|
|
1020
|
-
}]]
|
|
906
|
+
}]]
|
|
907
|
+
};
|
|
908
|
+
exports.default = AxesChartYGridAndLabels;
|
|
909
|
+
|
|
910
|
+
/***/ }),
|
|
911
|
+
|
|
912
|
+
/***/ 3:
|
|
913
|
+
/***/ (function(module, exports) {
|
|
914
|
+
|
|
915
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
916
|
+
|
|
917
|
+
/***/ }),
|
|
918
|
+
|
|
919
|
+
/***/ 4:
|
|
920
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
921
|
+
|
|
922
|
+
"use strict";
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
var _toConsumableArray = __webpack_require__(1);
|
|
926
|
+
|
|
927
|
+
var _defineProperty = __webpack_require__(7);
|
|
928
|
+
|
|
929
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
930
|
+
var t = {};
|
|
931
|
+
|
|
932
|
+
for (var p in s) {
|
|
933
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
937
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
938
|
+
}
|
|
939
|
+
return t;
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
Object.defineProperty(exports, "__esModule", {
|
|
943
|
+
value: true
|
|
944
|
+
});
|
|
945
|
+
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
946
|
+
|
|
947
|
+
var lodash_1 = __webpack_require__(6);
|
|
948
|
+
|
|
949
|
+
var schemaUtils_1 = __webpack_require__(3);
|
|
950
|
+
|
|
951
|
+
var VizBehavior_1 = __webpack_require__(2);
|
|
952
|
+
|
|
953
|
+
var dynamicOptionsDSLType = {
|
|
954
|
+
type: 'string',
|
|
955
|
+
pattern: schemaUtils_1.DYNAMIC_OPTIONS_DSL_PATTERN
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* Helper function to extend an options schema with dynamic options DSL
|
|
959
|
+
* @param optionsSchema a visualization's options schema
|
|
960
|
+
* @returns an updated options schema that additionally allows strings starting with > for each option
|
|
961
|
+
*/
|
|
962
|
+
|
|
963
|
+
function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
964
|
+
var enhancedOptionsSchema = {};
|
|
965
|
+
Object.keys(optionsSchema).forEach(function (key) {
|
|
966
|
+
var _a = optionsSchema[key],
|
|
967
|
+
title = _a.title,
|
|
968
|
+
description = _a.description,
|
|
969
|
+
readOnly = _a.readOnly,
|
|
970
|
+
writeOnly = _a.writeOnly,
|
|
971
|
+
examples = _a.examples,
|
|
972
|
+
defaultValue = _a.default,
|
|
973
|
+
type = _a.type,
|
|
974
|
+
properties = _a.properties,
|
|
975
|
+
patternProperties = _a.patternProperties,
|
|
976
|
+
remainingSchemaEntry = __rest(_a, ["title", "description", "readOnly", "writeOnly", "examples", "default", "type", "properties", "patternProperties"]);
|
|
977
|
+
|
|
978
|
+
var annotations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, title !== undefined && {
|
|
979
|
+
title: title
|
|
980
|
+
}), description !== undefined && {
|
|
981
|
+
description: description
|
|
982
|
+
}), readOnly !== undefined && {
|
|
983
|
+
readOnly: readOnly
|
|
984
|
+
}), writeOnly !== undefined && {
|
|
985
|
+
writeOnly: writeOnly
|
|
986
|
+
}), examples !== undefined && {
|
|
987
|
+
examples: examples
|
|
988
|
+
}), defaultValue !== undefined && {
|
|
989
|
+
default: defaultValue
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
if (type === 'object') {
|
|
993
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign(Object.assign(Object.assign({}, remainingSchemaEntry), annotations), {
|
|
994
|
+
type: type
|
|
995
|
+
}), properties && {
|
|
996
|
+
properties: enhanceOptionsSchemaWithDynamicOptions(properties)
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
if (patternProperties) {
|
|
1000
|
+
var enhancedPatternProperties = {};
|
|
1001
|
+
Object.keys(patternProperties).forEach(function (opt) {
|
|
1002
|
+
enhancedPatternProperties = Object.assign(Object.assign({}, enhancedPatternProperties), enhanceOptionsSchemaWithDynamicOptions(_defineProperty({}, opt, patternProperties[opt])));
|
|
1003
|
+
});
|
|
1004
|
+
enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;
|
|
1005
|
+
}
|
|
1006
|
+
} else {
|
|
1007
|
+
enhancedOptionsSchema[key] = Object.assign(Object.assign({}, annotations), {
|
|
1008
|
+
anyOf: [Object.assign(Object.assign({}, type !== undefined && {
|
|
1009
|
+
type: type
|
|
1010
|
+
}), remainingSchemaEntry), dynamicOptionsDSLType]
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
return enhancedOptionsSchema;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
1018
|
+
/**
|
|
1019
|
+
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
1020
|
+
* this function also collapse all editor panels
|
|
1021
|
+
* @param vizConfig a Visualization Config
|
|
1022
|
+
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
1023
|
+
* and containing `open: false` for all editor panels in editorConfig
|
|
1024
|
+
*/
|
|
1025
|
+
|
|
1026
|
+
function enhanceConfig(vizConfig) {
|
|
1027
|
+
var enhancedConfig = Object.assign({}, vizConfig);
|
|
1028
|
+
|
|
1029
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
1030
|
+
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
1034
|
+
return Object.assign(Object.assign({}, config), {
|
|
1035
|
+
open: config.open || false
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
return enhancedConfig;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
exports.enhanceConfig = enhanceConfig;
|
|
1042
|
+
/**
|
|
1043
|
+
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
1044
|
+
* Created for editor unit tests
|
|
1045
|
+
* @param vizConfig a Visualization Config
|
|
1046
|
+
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
1047
|
+
*/
|
|
1048
|
+
|
|
1049
|
+
function uncollapseEditorConfig(vizConfig) {
|
|
1050
|
+
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
1051
|
+
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
1052
|
+
return Object.assign(Object.assign({}, config), {
|
|
1053
|
+
open: true
|
|
1054
|
+
});
|
|
1055
|
+
});
|
|
1056
|
+
return editorPanelUncollapsedConfig;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
1060
|
+
|
|
1061
|
+
function isDynamicOption(option) {
|
|
1062
|
+
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
1066
|
+
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
1070
|
+
* 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
|
|
1071
|
+
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
1072
|
+
* 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
|
|
1073
|
+
*
|
|
1074
|
+
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
1075
|
+
*/
|
|
1076
|
+
|
|
1077
|
+
function hasCompatibleContexts(vizContext, presetContext) {
|
|
1078
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
1079
|
+
return presetContextKeys.every(function (contextKey) {
|
|
1080
|
+
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
1085
|
+
*/
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
1089
|
+
var presetOptionKeys = Object.keys(presetOptions);
|
|
1090
|
+
return presetOptionKeys.every(function (optionKey) {
|
|
1091
|
+
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
1096
|
+
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
1097
|
+
*
|
|
1098
|
+
* @param {Object} vizContext - the current vizContext definition
|
|
1099
|
+
* @param {Object} vizOptions - the current vizOptions definition
|
|
1100
|
+
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
1101
|
+
*/
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
1105
|
+
return presets.find(function (preset) {
|
|
1106
|
+
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
1107
|
+
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
1108
|
+
var presetContextKeys = Object.keys(presetContext);
|
|
1109
|
+
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
1110
|
+
// if not, then the preset is invalid in config.ts
|
|
1111
|
+
|
|
1112
|
+
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
1113
|
+
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
exports.getInitialPreset = getInitialPreset;
|
|
1118
|
+
/**
|
|
1119
|
+
* generates number precision values for a Select editor
|
|
1120
|
+
*
|
|
1121
|
+
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
1122
|
+
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
1123
|
+
*/
|
|
1124
|
+
|
|
1125
|
+
function generatePrecisionValues(numPrecisionValues) {
|
|
1126
|
+
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
1127
|
+
return {
|
|
1128
|
+
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
1129
|
+
value: i
|
|
1130
|
+
};
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
exports.generatePrecisionValues = generatePrecisionValues;
|
|
1135
|
+
/**
|
|
1136
|
+
* insert layout in layout array, return a new layout array instead of updating the original
|
|
1137
|
+
*
|
|
1138
|
+
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
1139
|
+
* @param {Number} index - the index to insert layout item(s)
|
|
1140
|
+
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
1141
|
+
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
1142
|
+
*/
|
|
1143
|
+
|
|
1144
|
+
var insertLayout = function insertLayout(layout, index) {
|
|
1145
|
+
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1146
|
+
layoutItems[_key - 2] = arguments[_key];
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
1021
1150
|
};
|
|
1022
|
-
|
|
1151
|
+
|
|
1152
|
+
exports.insertLayout = insertLayout;
|
|
1023
1153
|
|
|
1024
1154
|
/***/ }),
|
|
1025
|
-
/* 20 */
|
|
1026
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1027
1155
|
|
|
1028
|
-
|
|
1156
|
+
/***/ 6:
|
|
1157
|
+
/***/ (function(module, exports) {
|
|
1029
1158
|
|
|
1159
|
+
module.exports = require("lodash");
|
|
1030
1160
|
|
|
1031
|
-
|
|
1032
|
-
value: true
|
|
1033
|
-
});
|
|
1161
|
+
/***/ }),
|
|
1034
1162
|
|
|
1035
|
-
|
|
1163
|
+
/***/ 7:
|
|
1164
|
+
/***/ (function(module, exports) {
|
|
1036
1165
|
|
|
1037
|
-
|
|
1038
|
-
label: i18n_1._('Y-axis grid and labels'),
|
|
1039
|
-
layout: [[{
|
|
1040
|
-
label: i18n_1._('Axis title'),
|
|
1041
|
-
option: 'yAxisTitleVisibility',
|
|
1042
|
-
editor: 'editor.toggle'
|
|
1043
|
-
}], [{
|
|
1044
|
-
label: i18n_1._('Axis title text'),
|
|
1045
|
-
option: 'yAxisTitleText',
|
|
1046
|
-
editor: 'editor.text',
|
|
1047
|
-
showEditor: function showEditor(_ref) {
|
|
1048
|
-
var options = _ref.options;
|
|
1049
|
-
return options.yAxisTitleVisibility === 'show' || options.yAxisTitleVisibility === undefined;
|
|
1050
|
-
}
|
|
1051
|
-
}], [{
|
|
1052
|
-
label: i18n_1._('Scale'),
|
|
1053
|
-
option: 'yAxisScale',
|
|
1054
|
-
editor: 'editor.radioBar',
|
|
1055
|
-
editorProps: {
|
|
1056
|
-
values: [{
|
|
1057
|
-
label: i18n_1._('Linear'),
|
|
1058
|
-
value: 'linear'
|
|
1059
|
-
}, {
|
|
1060
|
-
label: i18n_1._('Log'),
|
|
1061
|
-
value: 'log'
|
|
1062
|
-
}]
|
|
1063
|
-
}
|
|
1064
|
-
}], [{
|
|
1065
|
-
label: i18n_1._('Label visibility'),
|
|
1066
|
-
option: 'yAxisLabelVisibility',
|
|
1067
|
-
editor: 'editor.radioBar',
|
|
1068
|
-
editorProps: {
|
|
1069
|
-
values: [{
|
|
1070
|
-
label: i18n_1._('Auto'),
|
|
1071
|
-
value: 'auto'
|
|
1072
|
-
}, {
|
|
1073
|
-
label: i18n_1._('Show'),
|
|
1074
|
-
value: 'show'
|
|
1075
|
-
}, {
|
|
1076
|
-
label: i18n_1._('Hide'),
|
|
1077
|
-
value: 'hide'
|
|
1078
|
-
}]
|
|
1079
|
-
}
|
|
1080
|
-
}], [{
|
|
1081
|
-
label: i18n_1._('SI prefix abbreviation for labels'),
|
|
1082
|
-
option: 'yAxisAbbreviation',
|
|
1083
|
-
editor: 'editor.checkbox',
|
|
1084
|
-
showEditor: function showEditor(_ref2) {
|
|
1085
|
-
var options = _ref2.options;
|
|
1086
|
-
return options.yAxisLabelVisibility === 'show' || options.yAxisLabelVisibility === 'auto' || options.yAxisLabelVisibility === undefined;
|
|
1087
|
-
}
|
|
1088
|
-
}], [{
|
|
1089
|
-
label: i18n_1._('Include zero'),
|
|
1090
|
-
option: 'showYAxisWithZero',
|
|
1091
|
-
editor: 'editor.checkbox'
|
|
1092
|
-
}], [{
|
|
1093
|
-
label: i18n_1._('Extend to whole grid'),
|
|
1094
|
-
option: 'showYAxisExtendedRange',
|
|
1095
|
-
editor: 'editor.checkbox'
|
|
1096
|
-
}], [{
|
|
1097
|
-
label: i18n_1._('Minimum axis value'),
|
|
1098
|
-
option: 'yAxisMin',
|
|
1099
|
-
editor: 'editor.number'
|
|
1100
|
-
}, {
|
|
1101
|
-
label: i18n_1._('Maximum axis value'),
|
|
1102
|
-
option: 'yAxisMax',
|
|
1103
|
-
editor: 'editor.number'
|
|
1104
|
-
}], [{
|
|
1105
|
-
label: i18n_1._('Axis line visibility'),
|
|
1106
|
-
option: 'yAxisLineVisibility',
|
|
1107
|
-
editor: 'editor.checkbox'
|
|
1108
|
-
}], [{
|
|
1109
|
-
label: i18n_1._('Major gridlines'),
|
|
1110
|
-
option: 'showYMajorGridLines',
|
|
1111
|
-
editor: 'editor.checkbox'
|
|
1112
|
-
}], [{
|
|
1113
|
-
label: i18n_1._('Major tick visibility'),
|
|
1114
|
-
option: 'yAxisMajorTickVisibility',
|
|
1115
|
-
editor: 'editor.radioBar',
|
|
1116
|
-
editorProps: {
|
|
1117
|
-
values: [{
|
|
1118
|
-
label: i18n_1._('Auto'),
|
|
1119
|
-
value: 'auto'
|
|
1120
|
-
}, {
|
|
1121
|
-
label: i18n_1._('Show'),
|
|
1122
|
-
value: 'show'
|
|
1123
|
-
}, {
|
|
1124
|
-
label: i18n_1._('Hide'),
|
|
1125
|
-
value: 'hide'
|
|
1126
|
-
}]
|
|
1127
|
-
}
|
|
1128
|
-
}], [{
|
|
1129
|
-
label: i18n_1._('Major tick size (px)'),
|
|
1130
|
-
option: 'yAxisMajorTickSize',
|
|
1131
|
-
editor: 'editor.slider',
|
|
1132
|
-
editorProps: {
|
|
1133
|
-
min: 0,
|
|
1134
|
-
max: 10,
|
|
1135
|
-
step: 1
|
|
1136
|
-
},
|
|
1137
|
-
showEditor: function showEditor(_ref3) {
|
|
1138
|
-
var options = _ref3.options;
|
|
1139
|
-
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
1140
|
-
}
|
|
1141
|
-
}], [{
|
|
1142
|
-
label: i18n_1._('Major tick interval spacing'),
|
|
1143
|
-
option: 'yAxisMajorTickInterval',
|
|
1144
|
-
editor: 'editor.number',
|
|
1145
|
-
showEditor: function showEditor(_ref4) {
|
|
1146
|
-
var options = _ref4.options;
|
|
1147
|
-
return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
|
|
1148
|
-
}
|
|
1149
|
-
}], [{
|
|
1150
|
-
label: i18n_1._('Minor gridlines'),
|
|
1151
|
-
option: 'showYMinorGridLines',
|
|
1152
|
-
editor: 'editor.checkbox'
|
|
1153
|
-
}], [{
|
|
1154
|
-
label: i18n_1._('Minor tick visibility'),
|
|
1155
|
-
option: 'yAxisMinorTickVisibility',
|
|
1156
|
-
editor: 'editor.radioBar',
|
|
1157
|
-
editorProps: {
|
|
1158
|
-
values: [{
|
|
1159
|
-
label: i18n_1._('Auto'),
|
|
1160
|
-
value: 'auto'
|
|
1161
|
-
}, {
|
|
1162
|
-
label: i18n_1._('Show'),
|
|
1163
|
-
value: 'show'
|
|
1164
|
-
}, {
|
|
1165
|
-
label: i18n_1._('Hide'),
|
|
1166
|
-
value: 'hide'
|
|
1167
|
-
}]
|
|
1168
|
-
}
|
|
1169
|
-
}], [{
|
|
1170
|
-
label: i18n_1._('Minor tick size (px)'),
|
|
1171
|
-
option: 'yAxisMinorTickSize',
|
|
1172
|
-
editor: 'editor.slider',
|
|
1173
|
-
editorProps: {
|
|
1174
|
-
min: 0,
|
|
1175
|
-
max: 10,
|
|
1176
|
-
step: 1
|
|
1177
|
-
},
|
|
1178
|
-
showEditor: function showEditor(_ref5) {
|
|
1179
|
-
var options = _ref5.options;
|
|
1180
|
-
return options.yAxisMinorTickVisibility === 'show' || options.yAxisMinorTickVisibility === 'auto' || options.yAxisMinorTickVisibility === undefined;
|
|
1181
|
-
}
|
|
1182
|
-
}]]
|
|
1183
|
-
};
|
|
1184
|
-
exports.default = AxesChartYGridAndLabels;
|
|
1166
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
1185
1167
|
|
|
1186
1168
|
/***/ }),
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
/* 23 */,
|
|
1190
|
-
/* 24 */,
|
|
1191
|
-
/* 25 */,
|
|
1192
|
-
/* 26 */,
|
|
1193
|
-
/* 27 */,
|
|
1194
|
-
/* 28 */,
|
|
1195
|
-
/* 29 */,
|
|
1196
|
-
/* 30 */,
|
|
1197
|
-
/* 31 */,
|
|
1198
|
-
/* 32 */,
|
|
1199
|
-
/* 33 */,
|
|
1200
|
-
/* 34 */,
|
|
1201
|
-
/* 35 */,
|
|
1202
|
-
/* 36 */,
|
|
1203
|
-
/* 37 */,
|
|
1204
|
-
/* 38 */,
|
|
1205
|
-
/* 39 */,
|
|
1206
|
-
/* 40 */,
|
|
1207
|
-
/* 41 */,
|
|
1208
|
-
/* 42 */,
|
|
1209
|
-
/* 43 */,
|
|
1210
|
-
/* 44 */,
|
|
1211
|
-
/* 45 */,
|
|
1212
|
-
/* 46 */,
|
|
1213
|
-
/* 47 */,
|
|
1214
|
-
/* 48 */,
|
|
1215
|
-
/* 49 */,
|
|
1216
|
-
/* 50 */,
|
|
1217
|
-
/* 51 */,
|
|
1218
|
-
/* 52 */,
|
|
1219
|
-
/* 53 */,
|
|
1220
|
-
/* 54 */,
|
|
1221
|
-
/* 55 */,
|
|
1222
|
-
/* 56 */,
|
|
1223
|
-
/* 57 */,
|
|
1224
|
-
/* 58 */,
|
|
1225
|
-
/* 59 */,
|
|
1226
|
-
/* 60 */,
|
|
1227
|
-
/* 61 */,
|
|
1228
|
-
/* 62 */,
|
|
1229
|
-
/* 63 */,
|
|
1230
|
-
/* 64 */,
|
|
1231
|
-
/* 65 */,
|
|
1232
|
-
/* 66 */,
|
|
1233
|
-
/* 67 */,
|
|
1234
|
-
/* 68 */,
|
|
1235
|
-
/* 69 */
|
|
1169
|
+
|
|
1170
|
+
/***/ 73:
|
|
1236
1171
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1237
1172
|
|
|
1238
1173
|
"use strict";
|
|
@@ -1653,6 +1588,43 @@ var config = {
|
|
|
1653
1588
|
};
|
|
1654
1589
|
exports.default = configUtils_1.enhanceConfig(config);
|
|
1655
1590
|
|
|
1591
|
+
/***/ }),
|
|
1592
|
+
|
|
1593
|
+
/***/ 8:
|
|
1594
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1595
|
+
|
|
1596
|
+
"use strict";
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1600
|
+
value: true
|
|
1601
|
+
});
|
|
1602
|
+
exports.VizCategory = void 0;
|
|
1603
|
+
var VizCategory;
|
|
1604
|
+
|
|
1605
|
+
(function (VizCategory) {
|
|
1606
|
+
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
1607
|
+
VizCategory["TRENDS"] = "Trends";
|
|
1608
|
+
VizCategory["COMPARISONS"] = "Comparisons";
|
|
1609
|
+
VizCategory["TABLE"] = "Table";
|
|
1610
|
+
VizCategory["GAUGE"] = "Gauge";
|
|
1611
|
+
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
1612
|
+
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
1613
|
+
VizCategory["SHAPES"] = "Shapes";
|
|
1614
|
+
VizCategory["MISC"] = "misc";
|
|
1615
|
+
VizCategory["FLOW"] = "Flow";
|
|
1616
|
+
VizCategory["CORRELATION"] = "Correlation";
|
|
1617
|
+
VizCategory["SPATIAL"] = "Spatial";
|
|
1618
|
+
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
1619
|
+
|
|
1620
|
+
/***/ }),
|
|
1621
|
+
|
|
1622
|
+
/***/ 9:
|
|
1623
|
+
/***/ (function(module, exports) {
|
|
1624
|
+
|
|
1625
|
+
module.exports = require("@splunk/themes/pick");
|
|
1626
|
+
|
|
1656
1627
|
/***/ })
|
|
1657
|
-
|
|
1628
|
+
|
|
1629
|
+
/******/ });
|
|
1658
1630
|
//# sourceMappingURL=Scatter.config.js.map
|