@splunk/visualizations 26.4.1 → 27.1.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.
Files changed (153) hide show
  1. package/Area.config.js +1399 -1590
  2. package/Area.config.js.map +7 -1
  3. package/Area.js +3750 -4822
  4. package/Area.js.map +7 -1
  5. package/Bar.config.js +1423 -1566
  6. package/Bar.config.js.map +7 -1
  7. package/Bar.js +3856 -4884
  8. package/Bar.js.map +7 -1
  9. package/Bubble.config.js +1009 -1200
  10. package/Bubble.config.js.map +7 -1
  11. package/Bubble.js +2768 -4491
  12. package/Bubble.js.map +7 -1
  13. package/ChoroplethSvg.config.js +282 -582
  14. package/ChoroplethSvg.config.js.map +7 -1
  15. package/ChoroplethSvg.js +2032 -3808
  16. package/ChoroplethSvg.js.map +7 -1
  17. package/Column.config.js +1390 -1534
  18. package/Column.config.js.map +7 -1
  19. package/Column.js +3849 -4906
  20. package/Column.js.map +7 -1
  21. package/Ellipse.config.js +443 -774
  22. package/Ellipse.config.js.map +7 -1
  23. package/Ellipse.js +1667 -3327
  24. package/Ellipse.js.map +7 -1
  25. package/Events.config.js +207 -492
  26. package/Events.config.js.map +7 -1
  27. package/Events.js +2643 -4647
  28. package/Events.js.map +7 -1
  29. package/FillerGauge.config.js +420 -775
  30. package/FillerGauge.config.js.map +7 -1
  31. package/FillerGauge.js +2164 -4575
  32. package/FillerGauge.js.map +7 -1
  33. package/Image.config.js +144 -411
  34. package/Image.config.js.map +7 -1
  35. package/Image.js +1423 -3046
  36. package/Image.js.map +7 -1
  37. package/Line.config.js +1421 -1616
  38. package/Line.config.js.map +7 -1
  39. package/Line.js +3790 -4901
  40. package/Line.js.map +7 -1
  41. package/LinkGraph.config.js +390 -632
  42. package/LinkGraph.config.js.map +7 -1
  43. package/LinkGraph.js +5272 -6185
  44. package/LinkGraph.js.map +7 -1
  45. package/MIGRATION.md +6 -0
  46. package/Map.config.js +501 -801
  47. package/Map.config.js.map +7 -1
  48. package/Map.js +3382 -5659
  49. package/Map.js.map +7 -1
  50. package/Markdown.config.js +232 -528
  51. package/Markdown.config.js.map +7 -1
  52. package/Markdown.js +1671 -3212
  53. package/Markdown.js.map +7 -1
  54. package/MarkerGauge.config.js +308 -613
  55. package/MarkerGauge.config.js.map +7 -1
  56. package/MarkerGauge.js +2215 -4531
  57. package/MarkerGauge.js.map +7 -1
  58. package/ParallelCoordinates.config.js +282 -581
  59. package/ParallelCoordinates.config.js.map +7 -1
  60. package/ParallelCoordinates.js +2057 -4718
  61. package/ParallelCoordinates.js.map +7 -1
  62. package/Pie.config.js +278 -547
  63. package/Pie.config.js.map +7 -1
  64. package/Pie.js +2107 -3984
  65. package/Pie.js.map +7 -1
  66. package/Punchcard.config.js +291 -578
  67. package/Punchcard.config.js.map +7 -1
  68. package/Punchcard.js +2734 -5037
  69. package/Punchcard.js.map +7 -1
  70. package/Rectangle.config.js +455 -770
  71. package/Rectangle.config.js.map +7 -1
  72. package/Rectangle.js +1664 -3258
  73. package/Rectangle.js.map +7 -1
  74. package/Sankey.config.js +291 -626
  75. package/Sankey.config.js.map +7 -1
  76. package/Sankey.js +2766 -4908
  77. package/Sankey.js.map +7 -1
  78. package/Scatter.config.js +988 -1180
  79. package/Scatter.config.js.map +7 -1
  80. package/Scatter.js +2801 -4506
  81. package/Scatter.js.map +7 -1
  82. package/SingleValue.config.js +794 -1250
  83. package/SingleValue.config.js.map +7 -1
  84. package/SingleValue.js +4185 -7327
  85. package/SingleValue.js.map +7 -1
  86. package/SingleValueBasic.js +382 -1527
  87. package/SingleValueBasic.js.map +7 -1
  88. package/SingleValueIcon.config.js +757 -1207
  89. package/SingleValueIcon.config.js.map +7 -1
  90. package/SingleValueIcon.js +3427 -6293
  91. package/SingleValueIcon.js.map +7 -1
  92. package/SingleValueRadial.config.js +686 -1121
  93. package/SingleValueRadial.config.js.map +7 -1
  94. package/SingleValueRadial.js +3923 -6994
  95. package/SingleValueRadial.js.map +7 -1
  96. package/SparkLine.js +439 -746
  97. package/SparkLine.js.map +7 -1
  98. package/TRELLIS.md +16 -15
  99. package/Table.config.js +565 -879
  100. package/Table.config.js.map +7 -1
  101. package/Table.js +3260 -5334
  102. package/Table.js.map +7 -1
  103. package/common/Charting.js +617 -1498
  104. package/common/Charting.js.map +7 -1
  105. package/common/ChartingApi.js +46 -170
  106. package/common/ChartingApi.js.map +7 -1
  107. package/common/DocExampleWithVizSandbox.js +270 -473
  108. package/common/DocExampleWithVizSandbox.js.map +7 -1
  109. package/common/EventsDoc.js +172 -464
  110. package/common/EventsDoc.js.map +7 -1
  111. package/common/GaugeMajorTicks.js +249 -347
  112. package/common/GaugeMajorTicks.js.map +7 -1
  113. package/common/GaugeValueMarker.js +201 -311
  114. package/common/GaugeValueMarker.js.map +7 -1
  115. package/common/OptionsDoc.js +351 -911
  116. package/common/OptionsDoc.js.map +7 -1
  117. package/common/OverviewDoc.js +435 -769
  118. package/common/OverviewDoc.js.map +7 -1
  119. package/common/SplunkVisualization.js +116 -259
  120. package/common/SplunkVisualization.js.map +7 -1
  121. package/common/SplunkVisualizationApi.js +40 -156
  122. package/common/SplunkVisualizationApi.js.map +7 -1
  123. package/common/ThemesDoc.js +271 -420
  124. package/common/ThemesDoc.js.map +7 -1
  125. package/common/chartingUtils.js +140 -312
  126. package/common/chartingUtils.js.map +7 -1
  127. package/common/docUtils.js +148 -266
  128. package/common/docUtils.js.map +7 -1
  129. package/common/gaugeUtils.js +280 -808
  130. package/common/gaugeUtils.js.map +7 -1
  131. package/common/shapeUtils.js +106 -211
  132. package/common/shapeUtils.js.map +7 -1
  133. package/common/utils/configUtils.js +126 -252
  134. package/common/utils/configUtils.js.map +7 -1
  135. package/common/utils/dataUtils.js +217 -812
  136. package/common/utils/dataUtils.js.map +7 -1
  137. package/common/utils/featureFlagUtils.js +53 -133
  138. package/common/utils/featureFlagUtils.js.map +7 -1
  139. package/common/utils/hocUtils.js +32 -122
  140. package/common/utils/hocUtils.js.map +7 -1
  141. package/common/utils/mapUtils.js +502 -1337
  142. package/common/utils/mapUtils.js.map +7 -1
  143. package/common/utils/singleValueUtils.js +466 -1013
  144. package/common/utils/singleValueUtils.js.map +7 -1
  145. package/common/utils/testHelper.js +92 -146
  146. package/common/utils/testHelper.js.map +7 -1
  147. package/common/utils/trellisUtils.js +277 -489
  148. package/common/utils/trellisUtils.js.map +7 -1
  149. package/common/utils/urlUtils.js +28 -112
  150. package/common/utils/urlUtils.js.map +7 -1
  151. package/common/withDashboardViz.js +1191 -2431
  152. package/common/withDashboardViz.js.map +7 -1
  153. package/package.json +53 -45
package/Scatter.config.js CHANGED
@@ -1,1132 +1,981 @@
1
- /*!
2
- * Copyright © 2024 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 = 65);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ({
94
-
95
- /***/ 0:
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("@splunk/ui-utils/i18n");
99
-
100
- /***/ }),
101
-
102
- /***/ 1:
103
- /***/ (function(module, exports) {
104
-
105
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
106
-
107
- /***/ }),
108
-
109
- /***/ 10:
110
- /***/ (function(module, exports) {
111
-
112
- module.exports = require("@splunk/visualization-icons/placeholders");
113
-
114
- /***/ }),
115
-
116
- /***/ 11:
117
- /***/ (function(module, exports) {
118
-
119
- module.exports = require("@splunk/visualization-icons");
120
-
121
- /***/ }),
122
-
123
- /***/ 12:
124
- /***/ (function(module, exports, __webpack_require__) {
125
-
126
- "use strict";
127
-
128
-
129
- Object.defineProperty(exports, "__esModule", {
130
- value: true
131
- });
132
-
133
- var i18n_1 = __webpack_require__(0);
134
-
135
- var background = function background(_ref) {
136
- var label = _ref.label,
137
- themes = _ref.themes,
138
- labelPosition = _ref.labelPosition;
139
- return [{
140
- label: (0, i18n_1._)(label || 'Background color'),
141
- option: 'backgroundColor',
142
- editor: 'editor.color',
143
- editorProps: {
144
- labelPosition: labelPosition || 'top',
145
- themes: themes
1
+ /* Copyright © 2020 Splunk Inc.
2
+ SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
3
+ in part without a valid written license from Splunk Inc. is PROHIBITED. */
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropNames = Object.getOwnPropertyNames;
10
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
+ var __getProtoOf = Object.getPrototypeOf;
12
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
14
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
+ var __spreadValues = (a, b) => {
16
+ for (var prop in b || (b = {}))
17
+ if (__hasOwnProp.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ if (__getOwnPropSymbols)
20
+ for (var prop of __getOwnPropSymbols(b)) {
21
+ if (__propIsEnum.call(b, prop))
22
+ __defNormalProp(a, prop, b[prop]);
146
23
  }
147
- }];
24
+ return a;
148
25
  };
149
-
150
- exports.default = background;
151
-
152
- /***/ }),
153
-
154
- /***/ 14:
155
- /***/ (function(module, exports, __webpack_require__) {
156
-
157
- "use strict";
158
-
159
-
160
- var _toConsumableArray = __webpack_require__(1);
161
-
162
- Object.defineProperty(exports, "__esModule", {
163
- value: true
26
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27
+ var __export = (target, all) => {
28
+ for (var name in all)
29
+ __defProp(target, name, { get: all[name], enumerable: true });
30
+ };
31
+ var __copyProps = (to, from, except, desc) => {
32
+ if (from && typeof from === "object" || typeof from === "function") {
33
+ for (let key of __getOwnPropNames(from))
34
+ if (!__hasOwnProp.call(to, key) && key !== except)
35
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
36
+ }
37
+ return to;
38
+ };
39
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
40
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
41
+ // If the importer is in node compatibility mode or this is not an ESM
42
+ // file that has been converted to a CommonJS file using a Babel-
43
+ // compatible transform (i.e. "__esModule" has not been set), then set
44
+ // "default" to the CommonJS "module.exports" for node compatibility.
45
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
46
+ mod
47
+ ));
48
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
+
50
+ // src/Scatter/config.ts
51
+ var config_exports = {};
52
+ __export(config_exports, {
53
+ default: () => config_default
164
54
  });
165
- exports.AxesChartDataConfigAreaColumnLine = exports.AxesChartDataConfigBubble = exports.AxesChartDataConfigScatter = exports.AxesChartDataConfigBar = void 0;
166
-
167
- var i18n_1 = __webpack_require__(0);
55
+ module.exports = __toCommonJS(config_exports);
168
56
 
169
- var configUtils_1 = __webpack_require__(3);
57
+ // esm-externals:@splunk/visualization-icons
58
+ var visualization_icons_exports = {};
59
+ __export(visualization_icons_exports, {
60
+ default: () => visualization_icons_default
61
+ });
62
+ var defaultImport = __toESM(require("@splunk/visualization-icons"));
63
+ __reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
64
+ var visualization_icons_default = "default" in defaultImport ? defaultImport.default : defaultImport;
65
+
66
+ // esm-externals:@splunk/visualization-icons/placeholders
67
+ var placeholders_exports = {};
68
+ __export(placeholders_exports, {
69
+ default: () => placeholders_default
70
+ });
71
+ var defaultImport2 = __toESM(require("@splunk/visualization-icons/placeholders"));
72
+ __reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
73
+ var placeholders_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
74
+
75
+ // esm-externals:@splunk/themes/pick
76
+ var pick_exports = {};
77
+ __export(pick_exports, {
78
+ default: () => pick_default
79
+ });
80
+ var defaultImport3 = __toESM(require("@splunk/themes/pick"));
81
+ __reExport(pick_exports, require("@splunk/themes/pick"));
82
+ var pick_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
83
+
84
+ // esm-externals:@splunk/themes/variables
85
+ var variables_exports = {};
86
+ __export(variables_exports, {
87
+ default: () => variables_default
88
+ });
89
+ var defaultImport4 = __toESM(require("@splunk/themes/variables"));
90
+ __reExport(variables_exports, require("@splunk/themes/variables"));
91
+ var variables_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
92
+
93
+ // esm-externals:@splunk/visualization-schemas
94
+ var visualization_schemas_exports = {};
95
+ __export(visualization_schemas_exports, {
96
+ default: () => visualization_schemas_default
97
+ });
98
+ var defaultImport5 = __toESM(require("@splunk/visualization-schemas"));
99
+ __reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
100
+ var visualization_schemas_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
101
+
102
+ // esm-externals:@splunk/ui-utils/i18n
103
+ var i18n_exports = {};
104
+ __export(i18n_exports, {
105
+ default: () => i18n_default
106
+ });
107
+ var defaultImport6 = __toESM(require("@splunk/ui-utils/i18n"));
108
+ __reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
109
+ var i18n_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
110
+
111
+ // esm-externals:lodash
112
+ var lodash_exports = {};
113
+ __export(lodash_exports, {
114
+ default: () => lodash_default
115
+ });
116
+ var defaultImport7 = __toESM(require("lodash"));
117
+ __reExport(lodash_exports, require("lodash"));
118
+ var lodash_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
119
+
120
+ // esm-externals:@splunk/visualizations-shared/configUtils
121
+ var configUtils_exports = {};
122
+ __export(configUtils_exports, {
123
+ default: () => configUtils_default
124
+ });
125
+ var defaultImport8 = __toESM(require("@splunk/visualizations-shared/configUtils"));
126
+ __reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
127
+ var configUtils_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
170
128
 
171
- var AxesChartDataConfig = {
172
- label: (0, i18n_1._)('Data configurations'),
173
- layout: [[{
174
- label: (0, i18n_1._)('X'),
175
- option: 'x',
176
- editor: 'editor.columnSelector',
177
- editorProps: {
178
- dataSourceKey: 'primary',
179
- supportsDSL: true,
180
- expectedDataPrimitive: ['series']
181
- }
182
- }], [{
183
- label: (0, i18n_1._)('Y'),
184
- option: 'y',
185
- editor: 'editor.columnMultiSelector',
186
- editorProps: {
187
- dataSourceKey: 'primary',
188
- filterByTypes: ['number'],
189
- supportsDSL: true,
190
- expectedDataPrimitive: ['series', 'frame']
191
- }
192
- }], [{
193
- label: (0, i18n_1._)('Result limit'),
194
- option: 'resultLimit',
195
- editor: 'editor.number',
196
- editorProps: {
197
- dataSourceKey: 'primary'
129
+ // src/common/utils/configUtils.ts
130
+ function enhanceConfig(vizConfig) {
131
+ const enhancedConfig = __spreadValues({}, vizConfig);
132
+ enhancedConfig.editorConfig = vizConfig.editorConfig.map(
133
+ (config2) => {
134
+ return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
198
135
  }
199
- }]]
136
+ );
137
+ return enhancedConfig;
138
+ }
139
+ var insertLayout = (layout, index, ...layoutItems) => [
140
+ // copy part of the array before the specified index
141
+ ...layout.slice(0, index),
142
+ // inserted layout item
143
+ ...layoutItems,
144
+ // copy part of the array after the specified index
145
+ ...layout.slice(index)
146
+ ];
147
+
148
+ // src/common/editorConfig/AxesChartDataConfig.ts
149
+ var isTrellisFeatureFlagOn = ({ featureFlags }) => {
150
+ return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableTrellis);
151
+ };
152
+ var isTrellisEnabled = ({ options, featureFlags }) => {
153
+ const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
154
+ return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
200
155
  };
201
- exports.AxesChartDataConfigBar = {
156
+ var AxesChartDataConfig = {
157
+ label: (0, i18n_exports._)("Data configurations"),
158
+ layout: [
159
+ [
160
+ {
161
+ label: (0, i18n_exports._)("X"),
162
+ option: "x",
163
+ editor: "editor.columnSelector",
164
+ editorProps: {
165
+ dataSourceKey: "primary",
166
+ supportsDSL: true,
167
+ expectedDataPrimitive: ["series"]
168
+ }
169
+ }
170
+ ],
171
+ [
172
+ {
173
+ label: (0, i18n_exports._)("Y"),
174
+ option: "y",
175
+ editor: "editor.columnMultiSelector",
176
+ editorProps: {
177
+ dataSourceKey: "primary",
178
+ filterByTypes: ["number"],
179
+ supportsDSL: true,
180
+ expectedDataPrimitive: ["series", "frame"]
181
+ }
182
+ }
183
+ ],
184
+ [
185
+ {
186
+ label: (0, i18n_exports._)("Result limit"),
187
+ option: "resultLimit",
188
+ editor: "editor.number",
189
+ editorProps: {
190
+ dataSourceKey: "primary"
191
+ }
192
+ }
193
+ ]
194
+ ]
195
+ };
196
+ var AxesChartDataConfigBar = {
202
197
  label: AxesChartDataConfig.label,
203
198
  // insert Y2 after Y
204
- layout: (0, configUtils_1.insertLayout)(AxesChartDataConfig.layout, 2, [{
205
- label: (0, i18n_1._)('Y2'),
206
- option: 'y2',
207
- editor: 'editor.columnMultiSelector',
208
- editorProps: {
209
- dataSourceKey: 'primary',
210
- filterByTypes: ['number'],
211
- supportsDSL: true,
212
- expectedDataPrimitive: ['series', 'frame']
199
+ layout: insertLayout(AxesChartDataConfig.layout, 2, [
200
+ {
201
+ label: (0, i18n_exports._)("Y2"),
202
+ option: "y2",
203
+ editor: "editor.columnMultiSelector",
204
+ editorProps: {
205
+ dataSourceKey: "primary",
206
+ filterByTypes: ["number"],
207
+ supportsDSL: true,
208
+ expectedDataPrimitive: ["series", "frame"]
209
+ },
210
+ isDisabled: isTrellisEnabled
213
211
  }
214
- }])
212
+ ])
215
213
  };
216
- exports.AxesChartDataConfigScatter = {
214
+ var AxesChartDataConfigScatter = {
217
215
  label: AxesChartDataConfig.label,
218
- layout: [[{
219
- label: (0, i18n_1._)('X'),
220
- option: 'x',
221
- editor: 'editor.columnSelector',
222
- editorProps: {
223
- dataSourceKey: 'primary',
224
- supportsDSL: true,
225
- expectedDataPrimitive: ['series']
226
- }
227
- }], [{
228
- label: (0, i18n_1._)('Y'),
229
- option: 'y',
230
- editor: 'editor.columnSelector',
231
- editorProps: {
232
- dataSourceKey: 'primary',
233
- filterByTypes: ['number'],
234
- supportsDSL: true,
235
- expectedDataPrimitive: ['series']
236
- }
237
- }], [{
238
- label: (0, i18n_1._)('Category'),
239
- option: 'category',
240
- editor: 'editor.columnSelector',
241
- editorProps: {
242
- dataSourceKey: 'primary',
243
- supportsDSL: true,
244
- expectedDataPrimitive: ['series']
245
- }
246
- }], [{
247
- label: (0, i18n_1._)('Result limit'),
248
- option: 'resultLimit',
249
- editor: 'editor.number',
250
- editorProps: {
251
- dataSourceKey: 'primary'
252
- }
253
- }]]
216
+ layout: [
217
+ [
218
+ {
219
+ label: (0, i18n_exports._)("X"),
220
+ option: "x",
221
+ editor: "editor.columnSelector",
222
+ editorProps: {
223
+ dataSourceKey: "primary",
224
+ supportsDSL: true,
225
+ expectedDataPrimitive: ["series"]
226
+ }
227
+ }
228
+ ],
229
+ [
230
+ {
231
+ label: (0, i18n_exports._)("Y"),
232
+ option: "y",
233
+ editor: "editor.columnSelector",
234
+ editorProps: {
235
+ dataSourceKey: "primary",
236
+ filterByTypes: ["number"],
237
+ supportsDSL: true,
238
+ expectedDataPrimitive: ["series"]
239
+ }
240
+ }
241
+ ],
242
+ [
243
+ {
244
+ label: (0, i18n_exports._)("Category"),
245
+ option: "category",
246
+ editor: "editor.columnSelector",
247
+ editorProps: {
248
+ dataSourceKey: "primary",
249
+ supportsDSL: true,
250
+ expectedDataPrimitive: ["series"]
251
+ }
252
+ }
253
+ ],
254
+ [
255
+ {
256
+ label: (0, i18n_exports._)("Result limit"),
257
+ option: "resultLimit",
258
+ editor: "editor.number",
259
+ editorProps: {
260
+ dataSourceKey: "primary"
261
+ }
262
+ }
263
+ ]
264
+ ]
254
265
  };
255
- exports.AxesChartDataConfigBubble = {
256
- label: exports.AxesChartDataConfigScatter.label,
266
+ var AxesChartDataConfigBubble = {
267
+ label: AxesChartDataConfigScatter.label,
257
268
  // layout: insert Size after Category
258
- layout: (0, configUtils_1.insertLayout)(exports.AxesChartDataConfigScatter.layout, 3, [{
259
- label: (0, i18n_1._)('Size'),
260
- option: 'size',
261
- editor: 'editor.columnSelector',
262
- editorProps: {
263
- dataSourceKey: 'primary',
264
- supportsDSL: true,
265
- expectedDataPrimitive: ['series']
269
+ layout: insertLayout(AxesChartDataConfigScatter.layout, 3, [
270
+ {
271
+ label: (0, i18n_exports._)("Size"),
272
+ option: "size",
273
+ editor: "editor.columnSelector",
274
+ editorProps: {
275
+ dataSourceKey: "primary",
276
+ supportsDSL: true,
277
+ expectedDataPrimitive: ["series"]
278
+ }
266
279
  }
267
- }])
280
+ ])
268
281
  };
269
- exports.AxesChartDataConfigAreaColumnLine = {
270
- label: exports.AxesChartDataConfigBar.label,
271
- layout: [].concat(_toConsumableArray(exports.AxesChartDataConfigBar.layout), [[{
272
- label: (0, i18n_1._)('Annotation x'),
273
- option: 'annotationX',
274
- editor: 'editor.columnSelector',
275
- editorProps: {
276
- dataSourceKey: 'annotation',
277
- supportsDSL: true,
278
- expectedDataPrimitive: ['series']
279
- }
280
- }], [{
281
- label: (0, i18n_1._)('Annotation labels'),
282
- option: 'annotationLabel',
283
- editor: 'editor.columnSelector',
284
- editorProps: {
285
- dataSourceKey: 'annotation',
286
- supportsDSL: true,
287
- expectedDataPrimitive: ['series']
288
- }
289
- }]])
282
+ var AxesChartDataConfigAreaColumnLine = {
283
+ label: AxesChartDataConfigBar.label,
284
+ layout: [
285
+ ...AxesChartDataConfigBar.layout,
286
+ [
287
+ {
288
+ label: (0, i18n_exports._)("Annotation x"),
289
+ option: "annotationX",
290
+ editor: "editor.columnSelector",
291
+ editorProps: {
292
+ dataSourceKey: "annotation",
293
+ supportsDSL: true,
294
+ expectedDataPrimitive: ["series"]
295
+ }
296
+ }
297
+ ],
298
+ [
299
+ {
300
+ label: (0, i18n_exports._)("Annotation labels"),
301
+ option: "annotationLabel",
302
+ editor: "editor.columnSelector",
303
+ editorProps: {
304
+ dataSourceKey: "annotation",
305
+ supportsDSL: true,
306
+ expectedDataPrimitive: ["series"]
307
+ }
308
+ }
309
+ ]
310
+ ]
290
311
  };
291
- exports.default = AxesChartDataConfig;
292
-
293
- /***/ }),
294
-
295
- /***/ 15:
296
- /***/ (function(module, exports, __webpack_require__) {
297
-
298
- "use strict";
299
-
300
312
 
301
- Object.defineProperty(exports, "__esModule", {
302
- value: true
303
- });
304
-
305
- var i18n_1 = __webpack_require__(0);
306
-
307
- var pick_1 = __webpack_require__(8);
308
-
309
- var variables_1 = __webpack_require__(9);
310
-
311
- var BackgroundColor_1 = __webpack_require__(12);
312
-
313
- var themes = {
314
- defaultBackgroundColor: function defaultBackgroundColor(props) {
315
- return (0, pick_1.default)({
316
- enterprise: {
317
- dark: variables_1.default.black(props),
318
- light: variables_1.default.backgroundColor(props)
319
- },
320
- prisma: variables_1.default.backgroundColorSidebar(props)
321
- })(props);
322
- }
313
+ // src/common/editorConfig/AxesChartXGridAndLabels.ts
314
+ var AxesChartXGridAndLabelsCommon = {
315
+ label: (0, i18n_exports._)("X-axis grid and labels"),
316
+ layout: [
317
+ [
318
+ {
319
+ label: (0, i18n_exports._)("Axis title"),
320
+ option: "xAxisTitleVisibility",
321
+ editor: "editor.toggle"
322
+ }
323
+ ],
324
+ [
325
+ {
326
+ label: (0, i18n_exports._)("Axis title text"),
327
+ option: "xAxisTitleText",
328
+ editor: "editor.text",
329
+ showEditor: ({ options }) => options.xAxisTitleVisibility === "show" || options.xAxisTitleVisibility === void 0
330
+ }
331
+ ],
332
+ [
333
+ {
334
+ label: (0, i18n_exports._)("Label visibility"),
335
+ option: "xAxisLabelVisibility",
336
+ editor: "editor.radioBar",
337
+ editorProps: {
338
+ values: [
339
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
340
+ { label: (0, i18n_exports._)("Show"), value: "show" },
341
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
342
+ ]
343
+ }
344
+ }
345
+ ]
346
+ ]
323
347
  };
324
- var AxesChartColorAndStyle = {
325
- label: (0, i18n_1._)('Color and style'),
326
- layout: [(0, BackgroundColor_1.default)({
327
- themes: themes
328
- }), [{
329
- label: (0, i18n_1._)('Series colors'),
330
- option: 'seriesColors',
331
- editor: 'editor.seriesColors'
332
- }], [{
333
- label: (0, i18n_1._)('Series colors by field name'),
334
- option: 'seriesColorsByField',
335
- editor: 'editor.seriesColorsByField'
336
- }]]
348
+ var AxesChartXGridAndLabels = {
349
+ label: AxesChartXGridAndLabelsCommon.label,
350
+ layout: [
351
+ ...AxesChartXGridAndLabelsCommon.layout,
352
+ [
353
+ {
354
+ label: (0, i18n_exports._)("Label rotation"),
355
+ option: "xAxisLabelRotation",
356
+ editor: "editor.select",
357
+ editorProps: {
358
+ values: [
359
+ { label: (0, i18n_exports._)("-90"), value: -90 },
360
+ { label: (0, i18n_exports._)("-45"), value: -45 },
361
+ { label: (0, i18n_exports._)("0"), value: 0 },
362
+ { label: (0, i18n_exports._)("45"), value: 45 },
363
+ { label: (0, i18n_exports._)("90"), value: 90 }
364
+ ]
365
+ },
366
+ showEditor: ({ options }) => options.xAxisLabelVisibility === "show" || options.xAxisLabelVisibility === "auto" || options.xAxisLabelVisibility === void 0
367
+ }
368
+ ],
369
+ [
370
+ {
371
+ label: (0, i18n_exports._)("Number of time label parts"),
372
+ option: "xAxisMaxLabelParts",
373
+ editor: "editor.number",
374
+ editorProps: {
375
+ min: 1,
376
+ max: 3
377
+ },
378
+ showEditor: ({ options }) => options.xAxisLabelVisibility === "show" || options.xAxisLabelVisibility === "auto" || options.xAxisLabelVisibility === void 0
379
+ }
380
+ ],
381
+ [
382
+ {
383
+ label: (0, i18n_exports._)("Axis line visibility"),
384
+ option: "xAxisLineVisibility",
385
+ editor: "editor.checkbox"
386
+ }
387
+ ],
388
+ [
389
+ {
390
+ label: (0, i18n_exports._)("Major gridlines"),
391
+ option: "showXMajorGridLines",
392
+ editor: "editor.checkbox"
393
+ }
394
+ ],
395
+ [
396
+ {
397
+ label: (0, i18n_exports._)("Major tick visibility"),
398
+ option: "xAxisMajorTickVisibility",
399
+ editor: "editor.radioBar",
400
+ editorProps: {
401
+ values: [
402
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
403
+ { label: (0, i18n_exports._)("Show"), value: "show" },
404
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
405
+ ]
406
+ }
407
+ }
408
+ ],
409
+ [
410
+ {
411
+ label: (0, i18n_exports._)("Major tick size (px)"),
412
+ option: "xAxisMajorTickSize",
413
+ editor: "editor.slider",
414
+ editorProps: {
415
+ min: 0,
416
+ max: 10,
417
+ step: 1
418
+ },
419
+ showEditor: ({ options }) => options.xAxisMajorTickVisibility === "show" || options.xAxisMajorTickVisibility === "auto" || options.xAxisMajorTickVisibility === void 0
420
+ }
421
+ ]
422
+ ]
337
423
  };
338
- exports.default = AxesChartColorAndStyle;
339
-
340
- /***/ }),
341
-
342
- /***/ 16:
343
- /***/ (function(module, exports, __webpack_require__) {
344
-
345
- "use strict";
346
-
347
-
348
- Object.defineProperty(exports, "__esModule", {
349
- value: true
350
- });
351
-
352
- var i18n_1 = __webpack_require__(0);
353
-
354
- var AxesChartLegend = {
355
- label: (0, i18n_1._)('Legend'),
356
- layout: [[{
357
- label: (0, i18n_1._)('Legend display'),
358
- option: 'legendDisplay',
359
- editor: 'editor.select',
360
- editorProps: {
361
- values: [{
362
- label: (0, i18n_1._)('Right'),
363
- value: 'right'
364
- }, {
365
- label: (0, i18n_1._)('Left'),
366
- value: 'left'
367
- }, {
368
- label: (0, i18n_1._)('Top'),
369
- value: 'top'
370
- }, {
371
- label: (0, i18n_1._)('Bottom'),
372
- value: 'bottom'
373
- }, {
374
- label: (0, i18n_1._)('Off'),
375
- value: 'off'
376
- }]
377
- }
378
- }], [{
379
- label: (0, i18n_1._)('Legend truncation'),
380
- option: 'legendTruncation',
381
- editor: 'editor.radioBar',
382
- editorProps: {
383
- values: [{
384
- label: (0, i18n_1._)('A...'),
385
- value: 'ellipsisEnd'
386
- }, {
387
- label: (0, i18n_1._)('A...Z'),
388
- value: 'ellipsisMiddle'
389
- }, {
390
- label: (0, i18n_1._)('...Z'),
391
- value: 'ellipsisStart'
392
- }, {
393
- label: (0, i18n_1._)('Off'),
394
- value: 'ellipsisOff'
395
- }]
396
- },
397
- showEditor: function showEditor(_ref) {
398
- var options = _ref.options;
399
- return options.legendDisplay === 'left' || options.legendDisplay === 'right' || options.legendDisplay === 'top' || options.legendDisplay === 'bottom' || options.legendDisplay === undefined;
400
- }
401
- }]]
424
+ var AxesChartXGridAndLabelsBubbleScatter = {
425
+ label: AxesChartXGridAndLabelsCommon.label,
426
+ layout: [
427
+ ...insertLayout(AxesChartXGridAndLabelsCommon.layout, 2, [
428
+ {
429
+ label: (0, i18n_exports._)("Axis scale"),
430
+ option: "xAxisScale",
431
+ editor: "editor.radioBar",
432
+ editorProps: {
433
+ values: [
434
+ { label: (0, i18n_exports._)("Linear"), value: "linear" },
435
+ { label: (0, i18n_exports._)("Log"), value: "log" }
436
+ ]
437
+ }
438
+ }
439
+ ]),
440
+ [
441
+ {
442
+ label: (0, i18n_exports._)("Label rotation"),
443
+ option: "xAxisLabelRotation",
444
+ editor: "editor.select",
445
+ editorProps: {
446
+ values: [
447
+ { label: (0, i18n_exports._)("-90"), value: -90 },
448
+ { label: (0, i18n_exports._)("-45"), value: -45 },
449
+ { label: (0, i18n_exports._)("0"), value: 0 },
450
+ { label: (0, i18n_exports._)("45"), value: 45 },
451
+ { label: (0, i18n_exports._)("90"), value: 90 }
452
+ ]
453
+ },
454
+ showEditor: ({ options }) => options.xAxisLabelVisibility === "show" || options.xAxisLabelVisibility === "auto" || options.xAxisLabelVisibility === void 0
455
+ }
456
+ ],
457
+ [
458
+ {
459
+ label: (0, i18n_exports._)("Round axis labels"),
460
+ option: "showRoundedXAxisLabels",
461
+ editor: "editor.checkbox",
462
+ showEditor: ({ options }) => options.xAxisLabelVisibility === "show" || options.xAxisLabelVisibility === "auto" || options.xAxisLabelVisibility === void 0
463
+ }
464
+ ],
465
+ [
466
+ {
467
+ label: (0, i18n_exports._)("SI prefix abbreviation for labels"),
468
+ option: "xAxisAbbreviation",
469
+ editor: "editor.checkbox",
470
+ showEditor: ({ options }) => options.xAxisLabelVisibility === "show" || options.xAxisLabelVisibility === "auto" || options.xAxisLabelVisibility === void 0
471
+ }
472
+ ],
473
+ [
474
+ {
475
+ label: (0, i18n_exports._)("Include zero"),
476
+ option: "showXAxisWithZero",
477
+ editor: "editor.checkbox"
478
+ }
479
+ ],
480
+ [
481
+ {
482
+ label: (0, i18n_exports._)("Extend to whole grid"),
483
+ option: "showXAxisExtendedRange",
484
+ editor: "editor.checkbox"
485
+ }
486
+ ],
487
+ [
488
+ {
489
+ label: (0, i18n_exports._)("Minimum axis value"),
490
+ option: "xAxisMin",
491
+ editor: "editor.number"
492
+ },
493
+ {
494
+ label: (0, i18n_exports._)("Maximum axis value"),
495
+ option: "xAxisMax",
496
+ editor: "editor.number"
497
+ }
498
+ ],
499
+ [
500
+ {
501
+ label: (0, i18n_exports._)("Axis line visibility"),
502
+ option: "xAxisLineVisibility",
503
+ editor: "editor.checkbox"
504
+ }
505
+ ],
506
+ // this option is disabled for bubble and scatter
507
+ // [
508
+ // {
509
+ // label: _('Major gridlines'),
510
+ // option: 'showXMajorGridLines',
511
+ // editor: 'editor.checkbox',
512
+ // },
513
+ // ],
514
+ [
515
+ {
516
+ label: (0, i18n_exports._)("Major tick visibility"),
517
+ option: "xAxisMajorTickVisibility",
518
+ editor: "editor.radioBar",
519
+ editorProps: {
520
+ values: [
521
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
522
+ { label: (0, i18n_exports._)("Show"), value: "show" },
523
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
524
+ ]
525
+ }
526
+ }
527
+ ],
528
+ [
529
+ {
530
+ label: (0, i18n_exports._)("Major tick size (px)"),
531
+ option: "xAxisMajorTickSize",
532
+ editor: "editor.slider",
533
+ editorProps: {
534
+ min: 0,
535
+ max: 10,
536
+ step: 1
537
+ },
538
+ showEditor: ({ options }) => options.xAxisMajorTickVisibility === "show" || options.xAxisMajorTickVisibility === "auto" || options.xAxisMajorTickVisibility === void 0
539
+ }
540
+ ],
541
+ [
542
+ {
543
+ label: (0, i18n_exports._)("Major tick interval spacing"),
544
+ option: "xAxisMajorTickInterval",
545
+ editor: "editor.number",
546
+ showEditor: ({ options }) => options.xAxisMajorTickVisibility === "show" || options.xAxisMajorTickVisibility === "auto" || options.xAxisMajorTickVisibility === void 0
547
+ }
548
+ ],
549
+ [
550
+ {
551
+ label: (0, i18n_exports._)("Minor gridlines"),
552
+ option: "showXMinorGridLines",
553
+ editor: "editor.checkbox"
554
+ }
555
+ ],
556
+ [
557
+ {
558
+ label: (0, i18n_exports._)("Minor tick visibility"),
559
+ option: "xAxisMinorTickVisibility",
560
+ editor: "editor.radioBar",
561
+ editorProps: {
562
+ values: [
563
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
564
+ { label: (0, i18n_exports._)("Show"), value: "show" },
565
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
566
+ ]
567
+ }
568
+ }
569
+ ],
570
+ [
571
+ {
572
+ label: (0, i18n_exports._)("Minor tick size (px)"),
573
+ option: "xAxisMinorTickSize",
574
+ editor: "editor.slider",
575
+ editorProps: {
576
+ min: 0,
577
+ max: 10,
578
+ step: 1
579
+ },
580
+ showEditor: ({ options }) => options.xAxisMinorTickVisibility === "show" || options.xAxisMinorTickVisibility === "auto" || options.xAxisMinorTickVisibility === void 0
581
+ }
582
+ ]
583
+ ]
402
584
  };
403
- exports.default = AxesChartLegend;
404
-
405
- /***/ }),
406
-
407
- /***/ 17:
408
- /***/ (function(module, exports, __webpack_require__) {
409
-
410
- "use strict";
411
-
412
-
413
- var _toConsumableArray = __webpack_require__(1);
414
-
415
- Object.defineProperty(exports, "__esModule", {
416
- value: true
417
- });
418
- exports.AxesChartXGridAndLabelsBubbleScatter = exports.AxesChartXGridAndLabelsCommon = void 0;
419
-
420
- var i18n_1 = __webpack_require__(0);
421
-
422
- var configUtils_1 = __webpack_require__(3);
423
585
 
424
- exports.AxesChartXGridAndLabelsCommon = {
425
- label: (0, i18n_1._)('X-axis grid and labels'),
426
- layout: [[{
427
- label: (0, i18n_1._)('Axis title'),
428
- option: 'xAxisTitleVisibility',
429
- editor: 'editor.toggle'
430
- }], [{
431
- label: (0, i18n_1._)('Axis title text'),
432
- option: 'xAxisTitleText',
433
- editor: 'editor.text',
434
- showEditor: function showEditor(_ref) {
435
- var options = _ref.options;
436
- return options.xAxisTitleVisibility === 'show' || options.xAxisTitleVisibility === undefined;
437
- }
438
- }], [{
439
- label: (0, i18n_1._)('Label visibility'),
440
- option: 'xAxisLabelVisibility',
441
- editor: 'editor.radioBar',
586
+ // src/common/editorConfig/BackgroundColor.ts
587
+ var background = ({
588
+ label,
589
+ themes: themes3,
590
+ labelPosition
591
+ }) => [
592
+ {
593
+ label: (0, i18n_exports._)(label || "Background color"),
594
+ option: "backgroundColor",
595
+ editor: "editor.color",
442
596
  editorProps: {
443
- values: [{
444
- label: (0, i18n_1._)('Auto'),
445
- value: 'auto'
446
- }, {
447
- label: (0, i18n_1._)('Show'),
448
- value: 'show'
449
- }, {
450
- label: (0, i18n_1._)('Hide'),
451
- value: 'hide'
452
- }]
597
+ labelPosition: labelPosition || "top",
598
+ themes: themes3
453
599
  }
454
- }]]
600
+ }
601
+ ];
602
+ var BackgroundColor_default = background;
603
+
604
+ // src/common/editorConfig/TrellisEditors.ts
605
+ var isTrellisFeatureFlagOn2 = ({ featureFlags }) => {
606
+ return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableTrellis);
455
607
  };
456
- var AxesChartXGridAndLabels = {
457
- label: exports.AxesChartXGridAndLabelsCommon.label,
458
- layout: [].concat(_toConsumableArray(exports.AxesChartXGridAndLabelsCommon.layout), [[{
459
- label: (0, i18n_1._)('Label rotation'),
460
- option: 'xAxisLabelRotation',
461
- editor: 'editor.select',
462
- editorProps: {
463
- values: [{
464
- label: (0, i18n_1._)('-90'),
465
- value: -90
466
- }, {
467
- label: (0, i18n_1._)('-45'),
468
- value: -45
469
- }, {
470
- label: (0, i18n_1._)('0'),
471
- value: 0
472
- }, {
473
- label: (0, i18n_1._)('45'),
474
- value: 45
475
- }, {
476
- label: (0, i18n_1._)('90'),
477
- value: 90
478
- }]
479
- },
480
- showEditor: function showEditor(_ref2) {
481
- var options = _ref2.options;
482
- return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
483
- }
484
- }], [{
485
- label: (0, i18n_1._)('Number of time label parts'),
486
- option: 'xAxisMaxLabelParts',
487
- editor: 'editor.number',
488
- editorProps: {
489
- min: 1,
490
- max: 3
491
- },
492
- showEditor: function showEditor(_ref3) {
493
- var options = _ref3.options;
494
- return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
495
- }
496
- }], [{
497
- label: (0, i18n_1._)('Axis line visibility'),
498
- option: 'xAxisLineVisibility',
499
- editor: 'editor.checkbox'
500
- }], [{
501
- label: (0, i18n_1._)('Major gridlines'),
502
- option: 'showXMajorGridLines',
503
- editor: 'editor.checkbox'
504
- }], [{
505
- label: (0, i18n_1._)('Major tick visibility'),
506
- option: 'xAxisMajorTickVisibility',
507
- editor: 'editor.radioBar',
508
- editorProps: {
509
- values: [{
510
- label: (0, i18n_1._)('Auto'),
511
- value: 'auto'
512
- }, {
513
- label: (0, i18n_1._)('Show'),
514
- value: 'show'
515
- }, {
516
- label: (0, i18n_1._)('Hide'),
517
- value: 'hide'
518
- }]
519
- }
520
- }], [{
521
- label: (0, i18n_1._)('Major tick size (px)'),
522
- option: 'xAxisMajorTickSize',
523
- editor: 'editor.slider',
524
- editorProps: {
525
- min: 0,
526
- max: 10,
527
- step: 1
528
- },
529
- showEditor: function showEditor(_ref4) {
530
- var options = _ref4.options;
531
- return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
532
- }
533
- }]])
608
+ var isTrellisEnabled2 = ({ options, featureFlags }) => {
609
+ const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
610
+ return isTrellisFeatureFlagOn2({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
534
611
  };
535
- exports.AxesChartXGridAndLabelsBubbleScatter = {
536
- label: exports.AxesChartXGridAndLabelsCommon.label,
537
- layout: [].concat(_toConsumableArray((0, configUtils_1.insertLayout)(exports.AxesChartXGridAndLabelsCommon.layout, 2, [{
538
- label: (0, i18n_1._)('Axis scale'),
539
- option: 'xAxisScale',
540
- editor: 'editor.radioBar',
541
- editorProps: {
542
- values: [{
543
- label: (0, i18n_1._)('Linear'),
544
- value: 'linear'
545
- }, {
546
- label: (0, i18n_1._)('Log'),
547
- value: 'log'
548
- }]
612
+ var TrellisEditorConfig = [
613
+ [
614
+ {
615
+ label: (0, i18n_exports._)("Trellis layout"),
616
+ option: "splitByLayout",
617
+ editor: "editor.toggle",
618
+ showEditor: isTrellisFeatureFlagOn2
549
619
  }
550
- }])), [[{
551
- label: (0, i18n_1._)('Label rotation'),
552
- option: 'xAxisLabelRotation',
553
- editor: 'editor.select',
554
- editorProps: {
555
- values: [{
556
- label: (0, i18n_1._)('-90'),
557
- value: -90
558
- }, {
559
- label: (0, i18n_1._)('-45'),
560
- value: -45
561
- }, {
562
- label: (0, i18n_1._)('0'),
563
- value: 0
564
- }, {
565
- label: (0, i18n_1._)('45'),
566
- value: 45
567
- }, {
568
- label: (0, i18n_1._)('90'),
569
- value: 90
570
- }]
571
- },
572
- showEditor: function showEditor(_ref5) {
573
- var options = _ref5.options;
574
- return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
575
- }
576
- }], [{
577
- label: (0, i18n_1._)('Round axis labels'),
578
- option: 'showRoundedXAxisLabels',
579
- editor: 'editor.checkbox',
580
- showEditor: function showEditor(_ref6) {
581
- var options = _ref6.options;
582
- return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
583
- }
584
- }], [{
585
- label: (0, i18n_1._)('SI prefix abbreviation for labels'),
586
- option: 'xAxisAbbreviation',
587
- editor: 'editor.checkbox',
588
- showEditor: function showEditor(_ref7) {
589
- var options = _ref7.options;
590
- return options.xAxisLabelVisibility === 'show' || options.xAxisLabelVisibility === 'auto' || options.xAxisLabelVisibility === undefined;
620
+ ],
621
+ [
622
+ {
623
+ label: (0, i18n_exports._)("Split by"),
624
+ option: "trellisSplitBy",
625
+ editor: "editor.trellisSplitBy",
626
+ editorProps: {
627
+ dataSourceKey: "primary"
628
+ },
629
+ showEditor: isTrellisEnabled2
591
630
  }
592
- }], [{
593
- label: (0, i18n_1._)('Include zero'),
594
- option: 'showXAxisWithZero',
595
- editor: 'editor.checkbox'
596
- }], [{
597
- label: (0, i18n_1._)('Extend to whole grid'),
598
- option: 'showXAxisExtendedRange',
599
- editor: 'editor.checkbox'
600
- }], [{
601
- label: (0, i18n_1._)('Minimum axis value'),
602
- option: 'xAxisMin',
603
- editor: 'editor.number'
604
- }, {
605
- label: (0, i18n_1._)('Maximum axis value'),
606
- option: 'xAxisMax',
607
- editor: 'editor.number'
608
- }], [{
609
- label: (0, i18n_1._)('Axis line visibility'),
610
- option: 'xAxisLineVisibility',
611
- editor: 'editor.checkbox'
612
- }], // this option is disabled for bubble and scatter
613
- // [
614
- // {
615
- // label: _('Major gridlines'),
616
- // option: 'showXMajorGridLines',
617
- // editor: 'editor.checkbox',
618
- // },
619
- // ],
620
- [{
621
- label: (0, i18n_1._)('Major tick visibility'),
622
- option: 'xAxisMajorTickVisibility',
623
- editor: 'editor.radioBar',
624
- editorProps: {
625
- values: [{
626
- label: (0, i18n_1._)('Auto'),
627
- value: 'auto'
628
- }, {
629
- label: (0, i18n_1._)('Show'),
630
- value: 'show'
631
- }, {
632
- label: (0, i18n_1._)('Hide'),
633
- value: 'hide'
634
- }]
631
+ ],
632
+ [
633
+ {
634
+ label: (0, i18n_exports._)("Number of columns"),
635
+ option: "trellisColumns",
636
+ editor: "editor.number",
637
+ editorProps: {
638
+ min: 1
639
+ },
640
+ placeholder: (0, i18n_exports._)("Auto"),
641
+ showEditor: isTrellisEnabled2
635
642
  }
636
- }], [{
637
- label: (0, i18n_1._)('Major tick size (px)'),
638
- option: 'xAxisMajorTickSize',
639
- editor: 'editor.slider',
640
- editorProps: {
641
- min: 0,
642
- max: 10,
643
- step: 1
643
+ ],
644
+ [
645
+ {
646
+ label: (0, i18n_exports._)("Min column width"),
647
+ option: "trellisMinColumnWidth",
648
+ editor: "editor.number",
649
+ editorProps: {
650
+ min: 1
651
+ },
652
+ showEditor: isTrellisEnabled2
644
653
  },
645
- showEditor: function showEditor(_ref8) {
646
- var options = _ref8.options;
647
- return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
654
+ {
655
+ label: (0, i18n_exports._)("Row height"),
656
+ option: "trellisRowHeight",
657
+ editor: "editor.number",
658
+ editorProps: {
659
+ min: 1
660
+ },
661
+ showEditor: isTrellisEnabled2
648
662
  }
649
- }], [{
650
- label: (0, i18n_1._)('Major tick interval spacing'),
651
- option: 'xAxisMajorTickInterval',
652
- editor: 'editor.number',
653
- showEditor: function showEditor(_ref9) {
654
- var options = _ref9.options;
655
- return options.xAxisMajorTickVisibility === 'show' || options.xAxisMajorTickVisibility === 'auto' || options.xAxisMajorTickVisibility === undefined;
663
+ ],
664
+ [
665
+ {
666
+ label: (0, i18n_exports._)("Max number of components per page"),
667
+ option: "trellisPageCount",
668
+ editor: "editor.number",
669
+ editorProps: {
670
+ min: 1
671
+ },
672
+ showEditor: isTrellisEnabled2
656
673
  }
657
- }], [{
658
- label: (0, i18n_1._)('Minor gridlines'),
659
- option: 'showXMinorGridLines',
660
- editor: 'editor.checkbox'
661
- }], [{
662
- label: (0, i18n_1._)('Minor tick visibility'),
663
- option: 'xAxisMinorTickVisibility',
664
- editor: 'editor.radioBar',
665
- editorProps: {
666
- values: [{
667
- label: (0, i18n_1._)('Auto'),
668
- value: 'auto'
669
- }, {
670
- label: (0, i18n_1._)('Show'),
671
- value: 'show'
672
- }, {
673
- label: (0, i18n_1._)('Hide'),
674
- value: 'hide'
675
- }]
674
+ ]
675
+ ];
676
+ var TimechartTrellisEditorConfig = [
677
+ [
678
+ {
679
+ label: (0, i18n_exports._)("Trellis layout"),
680
+ option: "splitByLayout",
681
+ editor: "editor.toggle",
682
+ showEditor: isTrellisFeatureFlagOn2,
683
+ // add help text for timecharts
684
+ editorProps: {
685
+ help: (0, i18n_exports._)(
686
+ "Y2-axis and overlay field configurations are not supported when trellis is enabled."
687
+ ),
688
+ helpFormat: "under"
689
+ }
676
690
  }
677
- }], [{
678
- label: (0, i18n_1._)('Minor tick size (px)'),
679
- option: 'xAxisMinorTickSize',
680
- editor: 'editor.slider',
681
- editorProps: {
682
- min: 0,
683
- max: 10,
684
- step: 1
685
- },
686
- showEditor: function showEditor(_ref10) {
687
- var options = _ref10.options;
688
- return options.xAxisMinorTickVisibility === 'show' || options.xAxisMinorTickVisibility === 'auto' || options.xAxisMinorTickVisibility === undefined;
691
+ ],
692
+ ...TrellisEditorConfig.slice(1),
693
+ [
694
+ {
695
+ label: (0, i18n_exports._)("Shared y-axis scale"),
696
+ option: "trellisSharedScale",
697
+ editor: "editor.checkbox",
698
+ showEditor: isTrellisEnabled2
689
699
  }
690
- }]])
700
+ ]
701
+ ];
702
+ var TrellisBackgroundColorEditor = {
703
+ label: (0, i18n_exports._)("Trellis background"),
704
+ option: "trellisBackgroundColor",
705
+ editor: "editor.color",
706
+ showEditor: isTrellisEnabled2
691
707
  };
692
- exports.default = AxesChartXGridAndLabels;
693
708
 
694
- /***/ }),
695
-
696
- /***/ 18:
697
- /***/ (function(module, exports, __webpack_require__) {
698
-
699
- "use strict";
700
-
701
-
702
- Object.defineProperty(exports, "__esModule", {
703
- value: true
704
- });
705
-
706
- var i18n_1 = __webpack_require__(0);
707
-
708
- var AxesChartYGridAndLabels = {
709
- label: (0, i18n_1._)('Y-axis grid and labels'),
710
- layout: [[{
711
- label: (0, i18n_1._)('Axis title'),
712
- option: 'yAxisTitleVisibility',
713
- editor: 'editor.toggle'
714
- }], [{
715
- label: (0, i18n_1._)('Axis title text'),
716
- option: 'yAxisTitleText',
717
- editor: 'editor.text',
718
- showEditor: function showEditor(_ref) {
719
- var options = _ref.options;
720
- return options.yAxisTitleVisibility === 'show' || options.yAxisTitleVisibility === undefined;
721
- }
722
- }], [{
723
- label: (0, i18n_1._)('Scale'),
724
- option: 'yAxisScale',
725
- editor: 'editor.radioBar',
726
- editorProps: {
727
- values: [{
728
- label: (0, i18n_1._)('Linear'),
729
- value: 'linear'
730
- }, {
731
- label: (0, i18n_1._)('Log'),
732
- value: 'log'
733
- }]
734
- }
735
- }], [{
736
- label: (0, i18n_1._)('Label visibility'),
737
- option: 'yAxisLabelVisibility',
738
- editor: 'editor.radioBar',
739
- editorProps: {
740
- values: [{
741
- label: (0, i18n_1._)('Auto'),
742
- value: 'auto'
743
- }, {
744
- label: (0, i18n_1._)('Show'),
745
- value: 'show'
746
- }, {
747
- label: (0, i18n_1._)('Hide'),
748
- value: 'hide'
749
- }]
750
- }
751
- }], [{
752
- label: (0, i18n_1._)('SI prefix abbreviation for labels'),
753
- option: 'yAxisAbbreviation',
754
- editor: 'editor.checkbox',
755
- showEditor: function showEditor(_ref2) {
756
- var options = _ref2.options;
757
- return options.yAxisLabelVisibility === 'show' || options.yAxisLabelVisibility === 'auto' || options.yAxisLabelVisibility === undefined;
758
- }
759
- }], [{
760
- label: (0, i18n_1._)('Include zero'),
761
- option: 'showYAxisWithZero',
762
- editor: 'editor.checkbox'
763
- }], [{
764
- label: (0, i18n_1._)('Extend to whole grid'),
765
- option: 'showYAxisExtendedRange',
766
- editor: 'editor.checkbox'
767
- }], [{
768
- label: (0, i18n_1._)('Minimum axis value'),
769
- option: 'yAxisMin',
770
- editor: 'editor.number'
771
- }, {
772
- label: (0, i18n_1._)('Maximum axis value'),
773
- option: 'yAxisMax',
774
- editor: 'editor.number'
775
- }], [{
776
- label: (0, i18n_1._)('Axis line visibility'),
777
- option: 'yAxisLineVisibility',
778
- editor: 'editor.checkbox'
779
- }], [{
780
- label: (0, i18n_1._)('Major gridlines'),
781
- option: 'showYMajorGridLines',
782
- editor: 'editor.checkbox'
783
- }], [{
784
- label: (0, i18n_1._)('Major tick visibility'),
785
- option: 'yAxisMajorTickVisibility',
786
- editor: 'editor.radioBar',
787
- editorProps: {
788
- values: [{
789
- label: (0, i18n_1._)('Auto'),
790
- value: 'auto'
791
- }, {
792
- label: (0, i18n_1._)('Show'),
793
- value: 'show'
794
- }, {
795
- label: (0, i18n_1._)('Hide'),
796
- value: 'hide'
797
- }]
798
- }
799
- }], [{
800
- label: (0, i18n_1._)('Major tick size (px)'),
801
- option: 'yAxisMajorTickSize',
802
- editor: 'editor.slider',
803
- editorProps: {
804
- min: 0,
805
- max: 10,
806
- step: 1
807
- },
808
- showEditor: function showEditor(_ref3) {
809
- var options = _ref3.options;
810
- return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
811
- }
812
- }], [{
813
- label: (0, i18n_1._)('Major tick interval spacing'),
814
- option: 'yAxisMajorTickInterval',
815
- editor: 'editor.number',
816
- showEditor: function showEditor(_ref4) {
817
- var options = _ref4.options;
818
- return options.yAxisMajorTickVisibility === 'show' || options.yAxisMajorTickVisibility === 'auto' || options.yAxisMajorTickVisibility === undefined;
819
- }
820
- }], [{
821
- label: (0, i18n_1._)('Minor gridlines'),
822
- option: 'showYMinorGridLines',
823
- editor: 'editor.checkbox'
824
- }], [{
825
- label: (0, i18n_1._)('Minor tick visibility'),
826
- option: 'yAxisMinorTickVisibility',
827
- editor: 'editor.radioBar',
828
- editorProps: {
829
- values: [{
830
- label: (0, i18n_1._)('Auto'),
831
- value: 'auto'
832
- }, {
833
- label: (0, i18n_1._)('Show'),
834
- value: 'show'
835
- }, {
836
- label: (0, i18n_1._)('Hide'),
837
- value: 'hide'
838
- }]
839
- }
840
- }], [{
841
- label: (0, i18n_1._)('Minor tick size (px)'),
842
- option: 'yAxisMinorTickSize',
843
- editor: 'editor.slider',
844
- editorProps: {
845
- min: 0,
846
- max: 10,
847
- step: 1
709
+ // src/common/editorConfig/AxesChartColorAndStyle.ts
710
+ var themes = {
711
+ defaultBackgroundColor: (props) => pick_default({
712
+ enterprise: {
713
+ dark: variables_default.black(props),
714
+ light: variables_default.backgroundColor(props)
848
715
  },
849
- showEditor: function showEditor(_ref5) {
850
- var options = _ref5.options;
851
- return options.yAxisMinorTickVisibility === 'show' || options.yAxisMinorTickVisibility === 'auto' || options.yAxisMinorTickVisibility === undefined;
852
- }
853
- }]]
716
+ prisma: variables_default.backgroundColorSidebar(props)
717
+ })(props)
854
718
  };
855
- exports.default = AxesChartYGridAndLabels;
856
-
857
- /***/ }),
858
-
859
- /***/ 2:
860
- /***/ (function(module, exports) {
861
-
862
- module.exports = require("@splunk/visualization-schemas");
863
-
864
- /***/ }),
865
-
866
- /***/ 3:
867
- /***/ (function(module, exports, __webpack_require__) {
868
-
869
- "use strict";
870
-
871
-
872
- var _toConsumableArray = __webpack_require__(1);
873
-
874
- Object.defineProperty(exports, "__esModule", {
875
- value: true
876
- });
877
- exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceConfig = exports.enhanceOptionsSchemaWithDynamicOptions = void 0;
878
-
879
- var lodash_1 = __webpack_require__(5); // included for backwards compatibility
880
-
881
-
882
- var visualization_schemas_1 = __webpack_require__(2);
883
-
884
- Object.defineProperty(exports, "enhanceOptionsSchemaWithDynamicOptions", {
885
- enumerable: true,
886
- get: function get() {
887
- return visualization_schemas_1.enhanceOptionsSchemaWithDynamicOptions;
888
- }
889
- });
890
- /**
891
- * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
892
- * this function also collapse all editor panels
893
- * @param vizConfig a Visualization Config
894
- * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
895
- * and containing `open: false` for all editor panels in editorConfig
896
- */
897
-
898
- function enhanceConfig(vizConfig) {
899
- var enhancedConfig = Object.assign({}, vizConfig);
900
- enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
901
- return Object.assign(Object.assign({}, config), {
902
- open: config.open || false
903
- });
904
- });
905
- return enhancedConfig;
906
- }
907
-
908
- exports.enhanceConfig = enhanceConfig;
909
- /**
910
- * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
911
- * Created for editor unit tests
912
- * @param vizConfig a Visualization Config
913
- * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
914
- */
915
-
916
- function uncollapseEditorConfig(vizConfig) {
917
- var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
918
- editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
919
- return Object.assign(Object.assign({}, config), {
920
- open: true
921
- });
922
- });
923
- return editorPanelUncollapsedConfig;
924
- }
925
-
926
- exports.uncollapseEditorConfig = uncollapseEditorConfig;
927
-
928
- function isDynamicOption(option) {
929
- return option && typeof option === 'string' && option.trim().startsWith('>') || false;
930
- }
931
-
932
- exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
933
- // this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
934
-
935
- /**
936
- * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
937
- * 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
938
- * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
939
- * 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
940
- *
941
- * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
942
- */
943
-
944
- function hasCompatibleContexts(vizContext, presetContext) {
945
- var presetContextKeys = Object.keys(presetContext);
946
- return presetContextKeys.every(function (contextKey) {
947
- return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
948
- });
949
- }
950
- /**
951
- * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
952
- */
953
-
954
-
955
- function hasCompatibleOptions(vizOptions, presetOptions) {
956
- var presetOptionKeys = Object.keys(presetOptions);
957
- return presetOptionKeys.every(function (optionKey) {
958
- return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
959
- });
960
- }
961
- /**
962
- * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
963
- * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
964
- *
965
- * @param {Object} vizContext - the current vizContext definition
966
- * @param {Object} vizOptions - the current vizOptions definition
967
- * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
968
- */
969
-
970
-
971
- function getInitialPreset(vizContext, vizOptions, presets) {
972
- return presets.find(function (preset) {
973
- var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
974
- var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
975
- var presetContextKeys = Object.keys(presetContext);
976
- var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
977
- // if not, then the preset is invalid in config.ts
978
-
979
- if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
980
- return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
981
- });
982
- }
983
-
984
- exports.getInitialPreset = getInitialPreset;
985
- /**
986
- * generates number precision values for a Select editor
987
- *
988
- * @param {Number} numPrecisionValues - number of integer precision values to generate
989
- * @returns {{ label: string; value; string }[]} array of { label, value } tuples
990
- */
991
-
992
- function generatePrecisionValues(numPrecisionValues) {
993
- return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
994
- return {
995
- label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
996
- value: i
997
- };
998
- });
999
- }
1000
-
1001
- exports.generatePrecisionValues = generatePrecisionValues;
1002
- /**
1003
- * insert layout in layout array, return a new layout array instead of updating the original
1004
- *
1005
- * @param {EditorLayoutConfig[][]} layout - editor layout
1006
- * @param {Number} index - the index to insert layout item(s)
1007
- * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
1008
- * @returns {EditorLayoutConfig[][]} new editor layout with insertion
1009
- */
1010
-
1011
- var insertLayout = function insertLayout(layout, index) {
1012
- for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1013
- layoutItems[_key - 2] = arguments[_key];
1014
- }
1015
-
1016
- return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
719
+ var AxesChartColorAndStyle = {
720
+ label: (0, i18n_exports._)("Color and style"),
721
+ layout: [
722
+ BackgroundColor_default({ themes }),
723
+ [
724
+ {
725
+ label: (0, i18n_exports._)("Series colors"),
726
+ option: "seriesColors",
727
+ editor: "editor.seriesColors"
728
+ }
729
+ ],
730
+ [
731
+ {
732
+ label: (0, i18n_exports._)("Series colors by field name"),
733
+ option: "seriesColorsByField",
734
+ editor: "editor.seriesColorsByField"
735
+ }
736
+ ]
737
+ ]
1017
738
  };
1018
-
1019
- exports.insertLayout = insertLayout;
1020
-
1021
- /***/ }),
1022
-
1023
- /***/ 5:
1024
- /***/ (function(module, exports) {
1025
-
1026
- module.exports = require("lodash");
1027
-
1028
- /***/ }),
1029
-
1030
- /***/ 6:
1031
- /***/ (function(module, exports, __webpack_require__) {
1032
-
1033
- "use strict";
1034
-
1035
-
1036
- Object.defineProperty(exports, "__esModule", {
1037
- value: true
739
+ var AreaAxesChartColorAndStyleWithTrellis = __spreadProps(__spreadValues({}, AxesChartColorAndStyle), {
740
+ layout: [
741
+ AxesChartColorAndStyle.layout[0],
742
+ [
743
+ __spreadProps(__spreadValues({}, TrellisBackgroundColorEditor), {
744
+ editorProps: {
745
+ themes
746
+ }
747
+ })
748
+ ],
749
+ ...AxesChartColorAndStyle.layout.slice(1)
750
+ ]
1038
751
  });
1039
- exports.VizBehavior = void 0;
1040
- var VizBehavior;
1041
-
1042
- (function (VizBehavior) {
1043
- /**
1044
- * Dynamic Options Behavior.
1045
- * This allows visualization options to be powered by data
1046
- *
1047
- * **Example**
1048
- *
1049
- * sparklineValues: ">primary|seriesByIndex(0)"
1050
- * would configure sparklineValues with an array of data points
1051
- * coming from the first series in the primary datasource
1052
- *
1053
- */
1054
- VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
1055
- VizBehavior["EVENTS"] = "events";
1056
- VizBehavior["DOWNSAMPLING"] = "downsampling";
1057
- /**
1058
- * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
1059
- * missing.
1060
- * @type {string}
1061
- */
1062
-
1063
- VizBehavior["PLACEHOLDER"] = "placeholder";
1064
- VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
1065
- VizBehavior["TRELLIS"] = "trellis";
1066
- })(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
1067
-
1068
- /***/ }),
1069
-
1070
- /***/ 65:
1071
- /***/ (function(module, exports, __webpack_require__) {
1072
-
1073
- "use strict";
752
+ var AxesChartColorAndStyle_default = AxesChartColorAndStyle;
1074
753
 
754
+ // src/common/editorConfig/AxesChartLegend.ts
755
+ var AxesChartLegend = {
756
+ label: (0, i18n_exports._)("Legend"),
757
+ layout: [
758
+ [
759
+ {
760
+ label: (0, i18n_exports._)("Legend display"),
761
+ option: "legendDisplay",
762
+ editor: "editor.select",
763
+ editorProps: {
764
+ values: [
765
+ { label: (0, i18n_exports._)("Right"), value: "right" },
766
+ { label: (0, i18n_exports._)("Left"), value: "left" },
767
+ { label: (0, i18n_exports._)("Top"), value: "top" },
768
+ { label: (0, i18n_exports._)("Bottom"), value: "bottom" },
769
+ { label: (0, i18n_exports._)("Off"), value: "off" }
770
+ ]
771
+ }
772
+ }
773
+ ],
774
+ [
775
+ {
776
+ label: (0, i18n_exports._)("Legend truncation"),
777
+ option: "legendTruncation",
778
+ editor: "editor.radioBar",
779
+ editorProps: {
780
+ values: [
781
+ { label: (0, i18n_exports._)("A..."), value: "ellipsisEnd" },
782
+ { label: (0, i18n_exports._)("A...Z"), value: "ellipsisMiddle" },
783
+ { label: (0, i18n_exports._)("...Z"), value: "ellipsisStart" },
784
+ { label: (0, i18n_exports._)("Off"), value: "ellipsisOff" }
785
+ ]
786
+ },
787
+ showEditor: ({ options }) => options.legendDisplay === "left" || options.legendDisplay === "right" || options.legendDisplay === "top" || options.legendDisplay === "bottom" || options.legendDisplay === void 0
788
+ }
789
+ ]
790
+ ]
791
+ };
792
+ var AxesChartLegend_default = AxesChartLegend;
1075
793
 
1076
- var _toConsumableArray = __webpack_require__(1);
1077
-
1078
- Object.defineProperty(exports, "__esModule", {
1079
- value: true
1080
- });
1081
-
1082
- var visualization_icons_1 = __webpack_require__(11);
1083
-
1084
- var placeholders_1 = __webpack_require__(10);
1085
-
1086
- var pick_1 = __webpack_require__(8);
1087
-
1088
- var variables_1 = __webpack_require__(9);
1089
-
1090
- var visualization_schemas_1 = __webpack_require__(2);
1091
-
1092
- var i18n_1 = __webpack_require__(0);
1093
-
1094
- var VizBehavior_1 = __webpack_require__(6);
1095
-
1096
- var VizCategory_1 = __webpack_require__(7);
1097
-
1098
- var configUtils_1 = __webpack_require__(3);
1099
-
1100
- var AxesChartDataConfig_1 = __webpack_require__(14);
1101
-
1102
- var AxesChartXGridAndLabels_1 = __webpack_require__(17);
1103
-
1104
- var AxesChartColorAndStyle_1 = __webpack_require__(15);
1105
-
1106
- var AxesChartLegend_1 = __webpack_require__(16);
1107
-
1108
- var AxesChartYGridAndLabels_1 = __webpack_require__(18);
794
+ // src/common/editorConfig/AxesChartYGridAndLabels.ts
795
+ var AxesChartYGridAndLabels = {
796
+ label: (0, i18n_exports._)("Y-axis grid and labels"),
797
+ layout: [
798
+ [
799
+ {
800
+ label: (0, i18n_exports._)("Axis title"),
801
+ option: "yAxisTitleVisibility",
802
+ editor: "editor.toggle"
803
+ }
804
+ ],
805
+ [
806
+ {
807
+ label: (0, i18n_exports._)("Axis title text"),
808
+ option: "yAxisTitleText",
809
+ editor: "editor.text",
810
+ showEditor: ({ options }) => options.yAxisTitleVisibility === "show" || options.yAxisTitleVisibility === void 0
811
+ }
812
+ ],
813
+ [
814
+ {
815
+ label: (0, i18n_exports._)("Scale"),
816
+ option: "yAxisScale",
817
+ editor: "editor.radioBar",
818
+ editorProps: {
819
+ values: [
820
+ { label: (0, i18n_exports._)("Linear"), value: "linear" },
821
+ { label: (0, i18n_exports._)("Log"), value: "log" }
822
+ ]
823
+ }
824
+ }
825
+ ],
826
+ [
827
+ {
828
+ label: (0, i18n_exports._)("Label visibility"),
829
+ option: "yAxisLabelVisibility",
830
+ editor: "editor.radioBar",
831
+ editorProps: {
832
+ values: [
833
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
834
+ { label: (0, i18n_exports._)("Show"), value: "show" },
835
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
836
+ ]
837
+ }
838
+ }
839
+ ],
840
+ [
841
+ {
842
+ label: (0, i18n_exports._)("SI prefix abbreviation for labels"),
843
+ option: "yAxisAbbreviation",
844
+ editor: "editor.checkbox",
845
+ showEditor: ({ options }) => options.yAxisLabelVisibility === "show" || options.yAxisLabelVisibility === "auto" || options.yAxisLabelVisibility === void 0
846
+ }
847
+ ],
848
+ [
849
+ {
850
+ label: (0, i18n_exports._)("Include zero"),
851
+ option: "showYAxisWithZero",
852
+ editor: "editor.checkbox"
853
+ }
854
+ ],
855
+ [
856
+ {
857
+ label: (0, i18n_exports._)("Extend to whole grid"),
858
+ option: "showYAxisExtendedRange",
859
+ editor: "editor.checkbox"
860
+ }
861
+ ],
862
+ [
863
+ {
864
+ label: (0, i18n_exports._)("Minimum axis value"),
865
+ option: "yAxisMin",
866
+ editor: "editor.number"
867
+ },
868
+ {
869
+ label: (0, i18n_exports._)("Maximum axis value"),
870
+ option: "yAxisMax",
871
+ editor: "editor.number"
872
+ }
873
+ ],
874
+ [
875
+ {
876
+ label: (0, i18n_exports._)("Axis line visibility"),
877
+ option: "yAxisLineVisibility",
878
+ editor: "editor.checkbox"
879
+ }
880
+ ],
881
+ [
882
+ {
883
+ label: (0, i18n_exports._)("Major gridlines"),
884
+ option: "showYMajorGridLines",
885
+ editor: "editor.checkbox"
886
+ }
887
+ ],
888
+ [
889
+ {
890
+ label: (0, i18n_exports._)("Major tick visibility"),
891
+ option: "yAxisMajorTickVisibility",
892
+ editor: "editor.radioBar",
893
+ editorProps: {
894
+ values: [
895
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
896
+ { label: (0, i18n_exports._)("Show"), value: "show" },
897
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
898
+ ]
899
+ }
900
+ }
901
+ ],
902
+ [
903
+ {
904
+ label: (0, i18n_exports._)("Major tick size (px)"),
905
+ option: "yAxisMajorTickSize",
906
+ editor: "editor.slider",
907
+ editorProps: {
908
+ min: 0,
909
+ max: 10,
910
+ step: 1
911
+ },
912
+ showEditor: ({ options }) => options.yAxisMajorTickVisibility === "show" || options.yAxisMajorTickVisibility === "auto" || options.yAxisMajorTickVisibility === void 0
913
+ }
914
+ ],
915
+ [
916
+ {
917
+ label: (0, i18n_exports._)("Major tick interval spacing"),
918
+ option: "yAxisMajorTickInterval",
919
+ editor: "editor.number",
920
+ showEditor: ({ options }) => options.yAxisMajorTickVisibility === "show" || options.yAxisMajorTickVisibility === "auto" || options.yAxisMajorTickVisibility === void 0
921
+ }
922
+ ],
923
+ [
924
+ {
925
+ label: (0, i18n_exports._)("Minor gridlines"),
926
+ option: "showYMinorGridLines",
927
+ editor: "editor.checkbox"
928
+ }
929
+ ],
930
+ [
931
+ {
932
+ label: (0, i18n_exports._)("Minor tick visibility"),
933
+ option: "yAxisMinorTickVisibility",
934
+ editor: "editor.radioBar",
935
+ editorProps: {
936
+ values: [
937
+ { label: (0, i18n_exports._)("Auto"), value: "auto" },
938
+ { label: (0, i18n_exports._)("Show"), value: "show" },
939
+ { label: (0, i18n_exports._)("Hide"), value: "hide" }
940
+ ]
941
+ }
942
+ }
943
+ ],
944
+ [
945
+ {
946
+ label: (0, i18n_exports._)("Minor tick size (px)"),
947
+ option: "yAxisMinorTickSize",
948
+ editor: "editor.slider",
949
+ editorProps: {
950
+ min: 0,
951
+ max: 10,
952
+ step: 1
953
+ },
954
+ showEditor: ({ options }) => options.yAxisMinorTickVisibility === "show" || options.yAxisMinorTickVisibility === "auto" || options.yAxisMinorTickVisibility === void 0
955
+ }
956
+ ]
957
+ ]
958
+ };
959
+ var AxesChartYGridAndLabels_default = AxesChartYGridAndLabels;
1109
960
 
961
+ // src/Scatter/config.ts
1110
962
  var dataContract = {
1111
- requiredDataSources: [{
1112
- name: 'primary',
1113
- description: 'DataSource that powers the visualization'
1114
- }],
1115
- optionalDataSources: [// Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
963
+ requiredDataSources: [
964
+ {
965
+ name: "primary",
966
+ description: "DataSource that powers the visualization"
967
+ }
968
+ ],
969
+ optionalDataSources: [
970
+ // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later
1116
971
  // {
1117
972
  // name: 'annotation',
1118
973
  // description: 'DataSource that populates event annotations',
1119
974
  // },
1120
975
  ],
1121
976
  initialRequestParams: {
1122
- primary: {
1123
- offset: 0,
1124
- count: 10000
1125
- },
1126
- annotation: {
1127
- offset: 0,
1128
- count: 10000
1129
- }
977
+ primary: { offset: 0, count: 1e4 },
978
+ annotation: { offset: 0, count: 1e4 }
1130
979
  }
1131
980
  };
1132
981
  var size = {
@@ -1134,120 +983,79 @@ var size = {
1134
983
  initialHeight: 300
1135
984
  };
1136
985
  var defaultContext = {};
1137
- var themes = {
1138
- defaultBackgroundColor: function defaultBackgroundColor(props) {
1139
- return (0, pick_1.default)({
1140
- enterprise: {
1141
- dark: variables_1.default.black(props),
1142
- light: variables_1.default.backgroundColor(props)
1143
- },
1144
- prisma: variables_1.default.backgroundColorSidebar(props)
1145
- })(props);
1146
- }
986
+ var themes2 = {
987
+ defaultBackgroundColor: (props) => pick_default({
988
+ enterprise: {
989
+ dark: variables_default.black(props),
990
+ light: variables_default.backgroundColor(props)
991
+ },
992
+ prisma: variables_default.backgroundColorSidebar(props)
993
+ })(props)
1147
994
  };
1148
- var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigScatter, {
1149
- label: AxesChartColorAndStyle_1.default.label,
1150
- layout: [].concat(_toConsumableArray(AxesChartColorAndStyle_1.default.layout.slice(0, 2)), [[{
1151
- label: (0, i18n_1._)('Series colors by category name'),
1152
- option: 'seriesColorsByField',
1153
- editor: 'editor.seriesColorsByField',
1154
- editorProps: {
1155
- isCategorical: true
1156
- }
1157
- }], [{
1158
- label: (0, i18n_1._)('Marker size'),
1159
- option: 'markerSize',
1160
- editor: 'editor.slider',
1161
- editorProps: {
1162
- min: 0,
1163
- max: 20,
1164
- step: 1
1165
- }
1166
- }]])
1167
- }, AxesChartLegend_1.default, AxesChartXGridAndLabels_1.AxesChartXGridAndLabelsBubbleScatter, AxesChartYGridAndLabels_1.default];
1168
- /**
1169
- * visualization configuration
1170
- */
1171
-
995
+ var editorConfig = [
996
+ AxesChartDataConfigScatter,
997
+ {
998
+ label: AxesChartColorAndStyle_default.label,
999
+ layout: [
1000
+ ...AxesChartColorAndStyle_default.layout.slice(0, 2),
1001
+ [
1002
+ {
1003
+ label: (0, i18n_exports._)("Series colors by category name"),
1004
+ option: "seriesColorsByField",
1005
+ editor: "editor.seriesColorsByField",
1006
+ editorProps: {
1007
+ isCategorical: true
1008
+ }
1009
+ }
1010
+ ],
1011
+ [
1012
+ {
1013
+ label: (0, i18n_exports._)("Marker size"),
1014
+ option: "markerSize",
1015
+ editor: "editor.slider",
1016
+ editorProps: {
1017
+ min: 0,
1018
+ max: 20,
1019
+ step: 1
1020
+ }
1021
+ }
1022
+ ]
1023
+ ]
1024
+ },
1025
+ AxesChartLegend_default,
1026
+ AxesChartXGridAndLabelsBubbleScatter,
1027
+ AxesChartYGridAndLabels_default
1028
+ ];
1172
1029
  var config = {
1173
1030
  /**
1174
1031
  * unique viz key
1175
1032
  */
1176
- key: 'splunk.scatter',
1177
-
1033
+ key: "splunk.scatter",
1178
1034
  /**
1179
1035
  * viz name
1180
1036
  */
1181
- name: (0, i18n_1._)('Scatter'),
1182
- category: VizCategory_1.VizCategory.CORRELATION,
1183
-
1037
+ name: (0, i18n_exports._)("Scatter"),
1038
+ category: "Correlation" /* CORRELATION */,
1184
1039
  /**
1185
1040
  * viz icon
1186
1041
  */
1187
- icon: visualization_icons_1.Scatter,
1188
- placeholderIcon: placeholders_1.Scatter,
1189
- dataContract: dataContract,
1190
- size: size,
1191
- defaultContext: defaultContext,
1192
- optionsSchema: visualization_schemas_1.scatterOptionsSchema,
1193
- editorConfig: editorConfig,
1042
+ icon: visualization_icons_exports.Scatter,
1043
+ placeholderIcon: placeholders_exports.Scatter,
1044
+ dataContract,
1045
+ size,
1046
+ defaultContext,
1047
+ optionsSchema: visualization_schemas_exports.scatterOptionsSchema,
1048
+ editorConfig,
1194
1049
  events: {
1195
- 'legend.click': {
1196
- description: 'triggered when user clicks on chart legend'
1050
+ "legend.click": {
1051
+ description: "triggered when user clicks on chart legend"
1197
1052
  },
1198
- 'point.click': {
1199
- description: 'triggered when user clicks on a point in the scatter chart'
1053
+ "point.click": {
1054
+ description: "triggered when user clicks on a point in the scatter chart"
1200
1055
  }
1201
1056
  },
1202
- supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER],
1203
- themes: themes
1057
+ supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "placeholder" /* PLACEHOLDER */],
1058
+ themes: themes2
1204
1059
  };
1205
- exports.default = (0, configUtils_1.enhanceConfig)(config);
1206
-
1207
- /***/ }),
1208
-
1209
- /***/ 7:
1210
- /***/ (function(module, exports, __webpack_require__) {
1211
-
1212
- "use strict";
1213
-
1214
-
1215
- Object.defineProperty(exports, "__esModule", {
1216
- value: true
1217
- });
1218
- exports.VizCategory = void 0;
1219
- var VizCategory;
1220
-
1221
- (function (VizCategory) {
1222
- VizCategory["SINGLE_VALUE"] = "Single Value";
1223
- VizCategory["TRENDS"] = "Trends";
1224
- VizCategory["COMPARISONS"] = "Comparisons";
1225
- VizCategory["TABLE"] = "Table";
1226
- VizCategory["GAUGE"] = "Gauge";
1227
- VizCategory["DISTRIBUTIONS"] = "Distributions";
1228
- VizCategory["CHOROPLETH"] = "Choropleth Maps";
1229
- VizCategory["SHAPES"] = "Shapes";
1230
- VizCategory["MISC"] = "misc";
1231
- VizCategory["FLOW"] = "Flow";
1232
- VizCategory["CORRELATION"] = "Correlation";
1233
- VizCategory["SPATIAL"] = "Spatial";
1234
- })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
1235
-
1236
- /***/ }),
1237
-
1238
- /***/ 8:
1239
- /***/ (function(module, exports) {
1240
-
1241
- module.exports = require("@splunk/themes/pick");
1242
-
1243
- /***/ }),
1244
-
1245
- /***/ 9:
1246
- /***/ (function(module, exports) {
1247
-
1248
- module.exports = require("@splunk/themes/variables");
1249
-
1250
- /***/ })
1251
-
1252
- /******/ });
1253
- //# sourceMappingURL=Scatter.config.js.map
1060
+ var config_default = enhanceConfig(config);
1061
+ //# sourceMappingURL=Scatter.config.js.map