@splunk/visualizations 26.4.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +1262 -1600
- package/Area.config.js.map +7 -1
- package/Area.js +3002 -4920
- package/Area.js.map +7 -1
- package/Bar.config.js +1247 -1574
- package/Bar.config.js.map +7 -1
- package/Bar.js +2924 -4836
- package/Bar.js.map +7 -1
- package/Bubble.config.js +896 -1213
- package/Bubble.config.js.map +7 -1
- package/Bubble.js +2520 -4476
- package/Bubble.js.map +7 -1
- package/ChoroplethSvg.config.js +282 -582
- package/ChoroplethSvg.config.js.map +7 -1
- package/ChoroplethSvg.js +2004 -3810
- package/ChoroplethSvg.js.map +7 -1
- package/Column.config.js +1208 -1541
- package/Column.config.js.map +7 -1
- package/Column.js +2933 -4879
- package/Column.js.map +7 -1
- package/Ellipse.config.js +443 -774
- package/Ellipse.config.js.map +7 -1
- package/Ellipse.js +1651 -3341
- package/Ellipse.js.map +7 -1
- package/Events.config.js +207 -492
- package/Events.config.js.map +7 -1
- package/Events.js +2615 -4649
- package/Events.js.map +7 -1
- package/FillerGauge.config.js +420 -775
- package/FillerGauge.config.js.map +7 -1
- package/FillerGauge.js +2137 -4578
- package/FillerGauge.js.map +7 -1
- package/Image.config.js +144 -411
- package/Image.config.js.map +7 -1
- package/Image.js +1395 -3048
- package/Image.js.map +7 -1
- package/Line.config.js +1278 -1625
- package/Line.config.js.map +7 -1
- package/Line.js +2957 -4919
- package/Line.js.map +7 -1
- package/LinkGraph.config.js +390 -632
- package/LinkGraph.config.js.map +7 -1
- package/LinkGraph.js +5243 -6190
- package/LinkGraph.js.map +7 -1
- package/MIGRATION.md +12 -0
- package/Map.config.js +501 -801
- package/Map.config.js.map +7 -1
- package/Map.js +3369 -5676
- package/Map.js.map +7 -1
- package/Markdown.config.js +232 -528
- package/Markdown.config.js.map +7 -1
- package/Markdown.js +1645 -3216
- package/Markdown.js.map +7 -1
- package/MarkerGauge.config.js +308 -613
- package/MarkerGauge.config.js.map +7 -1
- package/MarkerGauge.js +2189 -4535
- package/MarkerGauge.js.map +7 -1
- package/ParallelCoordinates.config.js +282 -581
- package/ParallelCoordinates.config.js.map +7 -1
- package/ParallelCoordinates.js +2023 -4720
- package/ParallelCoordinates.js.map +7 -1
- package/Pie.config.js +278 -547
- package/Pie.config.js.map +7 -1
- package/Pie.js +1998 -3982
- package/Pie.js.map +7 -1
- package/Punchcard.config.js +291 -578
- package/Punchcard.config.js.map +7 -1
- package/Punchcard.js +2709 -5042
- package/Punchcard.js.map +7 -1
- package/Rectangle.config.js +455 -770
- package/Rectangle.config.js.map +7 -1
- package/Rectangle.js +1638 -3262
- package/Rectangle.js.map +7 -1
- package/Sankey.config.js +291 -626
- package/Sankey.config.js.map +7 -1
- package/Sankey.js +2737 -4909
- package/Sankey.js.map +7 -1
- package/Scatter.config.js +876 -1194
- package/Scatter.config.js.map +7 -1
- package/Scatter.js +2532 -4470
- package/Scatter.js.map +7 -1
- package/SingleValue.config.js +819 -1251
- package/SingleValue.config.js.map +7 -1
- package/SingleValue.js +4203 -7413
- package/SingleValue.js.map +7 -1
- package/SingleValueBasic.js +382 -1527
- package/SingleValueBasic.js.map +7 -1
- package/SingleValueIcon.config.js +781 -1207
- package/SingleValueIcon.config.js.map +7 -1
- package/SingleValueIcon.js +3350 -6285
- package/SingleValueIcon.js.map +7 -1
- package/SingleValueRadial.config.js +708 -1119
- package/SingleValueRadial.config.js.map +7 -1
- package/SingleValueRadial.js +3808 -6965
- package/SingleValueRadial.js.map +7 -1
- package/SparkLine.js +439 -746
- package/SparkLine.js.map +7 -1
- package/Table.config.js +565 -887
- package/Table.config.js.map +7 -1
- package/Table.js +3277 -5386
- package/Table.js.map +7 -1
- package/common/Charting.js +484 -1462
- package/common/Charting.js.map +7 -1
- package/common/ChartingApi.js +46 -170
- package/common/ChartingApi.js.map +7 -1
- package/common/DocExampleWithVizSandbox.js +270 -473
- package/common/DocExampleWithVizSandbox.js.map +7 -1
- package/common/EventsDoc.js +172 -464
- package/common/EventsDoc.js.map +7 -1
- package/common/GaugeMajorTicks.js +249 -347
- package/common/GaugeMajorTicks.js.map +7 -1
- package/common/GaugeValueMarker.js +201 -311
- package/common/GaugeValueMarker.js.map +7 -1
- package/common/OptionsDoc.js +347 -912
- package/common/OptionsDoc.js.map +7 -1
- package/common/OverviewDoc.js +435 -769
- package/common/OverviewDoc.js.map +7 -1
- package/common/SplunkVisualization.js +116 -259
- package/common/SplunkVisualization.js.map +7 -1
- package/common/SplunkVisualizationApi.js +40 -156
- package/common/SplunkVisualizationApi.js.map +7 -1
- package/common/ThemesDoc.js +271 -420
- package/common/ThemesDoc.js.map +7 -1
- package/common/chartingUtils.js +140 -312
- package/common/chartingUtils.js.map +7 -1
- package/common/docUtils.js +148 -266
- package/common/docUtils.js.map +7 -1
- package/common/gaugeUtils.js +280 -808
- package/common/gaugeUtils.js.map +7 -1
- package/common/shapeUtils.js +106 -211
- package/common/shapeUtils.js.map +7 -1
- package/common/utils/configUtils.js +126 -252
- package/common/utils/configUtils.js.map +7 -1
- package/common/utils/dataUtils.js +217 -812
- package/common/utils/dataUtils.js.map +7 -1
- package/common/utils/featureFlagUtils.js +53 -133
- package/common/utils/featureFlagUtils.js.map +7 -1
- package/common/utils/hocUtils.js +32 -122
- package/common/utils/hocUtils.js.map +7 -1
- package/common/utils/mapUtils.js +502 -1337
- package/common/utils/mapUtils.js.map +7 -1
- package/common/utils/singleValueUtils.js +462 -1010
- package/common/utils/singleValueUtils.js.map +7 -1
- package/common/utils/testHelper.js +92 -146
- package/common/utils/testHelper.js.map +7 -1
- package/common/utils/trellisUtils.js +237 -489
- package/common/utils/trellisUtils.js.map +7 -1
- package/common/utils/urlUtils.js +28 -112
- package/common/utils/urlUtils.js.map +7 -1
- package/common/withDashboardViz.js +1168 -2438
- package/common/withDashboardViz.js.map +7 -1
- package/package.json +52 -43
package/Table.config.js
CHANGED
|
@@ -1,427 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
55
|
-
/******/ };
|
|
56
|
-
/******/
|
|
57
|
-
/******/ // create a fake namespace object
|
|
58
|
-
/******/ // mode & 1: value is a module id, require it
|
|
59
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
60
|
-
/******/ // mode & 4: return value when already ns object
|
|
61
|
-
/******/ // mode & 8|1: behave like require
|
|
62
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
63
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
64
|
-
/******/ if(mode & 8) return value;
|
|
65
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
66
|
-
/******/ var ns = Object.create(null);
|
|
67
|
-
/******/ __webpack_require__.r(ns);
|
|
68
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
69
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
70
|
-
/******/ return ns;
|
|
71
|
-
/******/ };
|
|
72
|
-
/******/
|
|
73
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
74
|
-
/******/ __webpack_require__.n = function(module) {
|
|
75
|
-
/******/ var getter = module && module.__esModule ?
|
|
76
|
-
/******/ function getDefault() { return module['default']; } :
|
|
77
|
-
/******/ function getModuleExports() { return module; };
|
|
78
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
79
|
-
/******/ return getter;
|
|
80
|
-
/******/ };
|
|
81
|
-
/******/
|
|
82
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
83
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
84
|
-
/******/
|
|
85
|
-
/******/ // __webpack_public_path__
|
|
86
|
-
/******/ __webpack_require__.p = "";
|
|
87
|
-
/******/
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s = 73);
|
|
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
|
-
/***/ 2:
|
|
124
|
-
/***/ (function(module, exports) {
|
|
125
|
-
|
|
126
|
-
module.exports = require("@splunk/visualization-schemas");
|
|
127
|
-
|
|
128
|
-
/***/ }),
|
|
129
|
-
|
|
130
|
-
/***/ 23:
|
|
131
|
-
/***/ (function(module, exports) {
|
|
132
|
-
|
|
133
|
-
module.exports = require("@splunk/visualizations-shared/colorConstants");
|
|
134
|
-
|
|
135
|
-
/***/ }),
|
|
136
|
-
|
|
137
|
-
/***/ 3:
|
|
138
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
139
|
-
|
|
140
|
-
"use strict";
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
144
|
-
|
|
145
|
-
Object.defineProperty(exports, "__esModule", {
|
|
146
|
-
value: true
|
|
1
|
+
/* Copyright © 2020 Splunk Inc.
|
|
2
|
+
SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
3
|
+
in part without a valid written license from Splunk Inc. is PROHIBITED. */
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __export = (target, all) => {
|
|
28
|
+
for (var name in all)
|
|
29
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
30
|
+
};
|
|
31
|
+
var __copyProps = (to, from, except, desc) => {
|
|
32
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
33
|
+
for (let key of __getOwnPropNames(from))
|
|
34
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
35
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
41
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
42
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
43
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
44
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
45
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
46
|
+
mod
|
|
47
|
+
));
|
|
48
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
49
|
+
|
|
50
|
+
// src/Table/config.ts
|
|
51
|
+
var config_exports = {};
|
|
52
|
+
__export(config_exports, {
|
|
53
|
+
default: () => config_default
|
|
147
54
|
});
|
|
148
|
-
|
|
55
|
+
module.exports = __toCommonJS(config_exports);
|
|
149
56
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
57
|
+
// esm-externals:@splunk/ui-utils/i18n
|
|
58
|
+
var i18n_exports = {};
|
|
59
|
+
__export(i18n_exports, {
|
|
60
|
+
default: () => i18n_default
|
|
61
|
+
});
|
|
62
|
+
var defaultImport = __toESM(require("@splunk/ui-utils/i18n"));
|
|
63
|
+
__reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
|
|
64
|
+
var i18n_default = "default" in defaultImport ? defaultImport.default : defaultImport;
|
|
65
|
+
|
|
66
|
+
// esm-externals:lodash
|
|
67
|
+
var lodash_exports = {};
|
|
68
|
+
__export(lodash_exports, {
|
|
69
|
+
default: () => lodash_default
|
|
160
70
|
});
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
71
|
+
var defaultImport2 = __toESM(require("lodash"));
|
|
72
|
+
__reExport(lodash_exports, require("lodash"));
|
|
73
|
+
var lodash_default = "default" in defaultImport2 ? defaultImport2.default : defaultImport2;
|
|
74
|
+
|
|
75
|
+
// esm-externals:@splunk/visualization-schemas
|
|
76
|
+
var visualization_schemas_exports = {};
|
|
77
|
+
__export(visualization_schemas_exports, {
|
|
78
|
+
default: () => visualization_schemas_default
|
|
79
|
+
});
|
|
80
|
+
var defaultImport3 = __toESM(require("@splunk/visualization-schemas"));
|
|
81
|
+
__reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
|
|
82
|
+
var visualization_schemas_default = "default" in defaultImport3 ? defaultImport3.default : defaultImport3;
|
|
83
|
+
|
|
84
|
+
// esm-externals:@splunk/visualizations-shared/colorConstants
|
|
85
|
+
var colorConstants_exports = {};
|
|
86
|
+
__export(colorConstants_exports, {
|
|
87
|
+
default: () => colorConstants_default
|
|
88
|
+
});
|
|
89
|
+
var defaultImport4 = __toESM(require("@splunk/visualizations-shared/colorConstants"));
|
|
90
|
+
__reExport(colorConstants_exports, require("@splunk/visualizations-shared/colorConstants"));
|
|
91
|
+
var colorConstants_default = "default" in defaultImport4 ? defaultImport4.default : defaultImport4;
|
|
92
|
+
|
|
93
|
+
// esm-externals:@splunk/visualization-icons
|
|
94
|
+
var visualization_icons_exports = {};
|
|
95
|
+
__export(visualization_icons_exports, {
|
|
96
|
+
default: () => visualization_icons_default
|
|
97
|
+
});
|
|
98
|
+
var defaultImport5 = __toESM(require("@splunk/visualization-icons"));
|
|
99
|
+
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
100
|
+
var visualization_icons_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
|
|
101
|
+
|
|
102
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
103
|
+
var placeholders_exports = {};
|
|
104
|
+
__export(placeholders_exports, {
|
|
105
|
+
default: () => placeholders_default
|
|
106
|
+
});
|
|
107
|
+
var defaultImport6 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
108
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
109
|
+
var placeholders_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
110
|
+
|
|
111
|
+
// esm-externals:@splunk/themes/variables
|
|
112
|
+
var variables_exports = {};
|
|
113
|
+
__export(variables_exports, {
|
|
114
|
+
default: () => variables_default
|
|
115
|
+
});
|
|
116
|
+
var defaultImport7 = __toESM(require("@splunk/themes/variables"));
|
|
117
|
+
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
118
|
+
var variables_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
119
|
+
|
|
120
|
+
// esm-externals:@splunk/themes/pick
|
|
121
|
+
var pick_exports = {};
|
|
122
|
+
__export(pick_exports, {
|
|
123
|
+
default: () => pick_default
|
|
124
|
+
});
|
|
125
|
+
var defaultImport8 = __toESM(require("@splunk/themes/pick"));
|
|
126
|
+
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
127
|
+
var pick_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
128
|
+
|
|
129
|
+
// esm-externals:@splunk/react-icons/TextAlignCenter
|
|
130
|
+
var TextAlignCenter_exports = {};
|
|
131
|
+
__export(TextAlignCenter_exports, {
|
|
132
|
+
default: () => TextAlignCenter_default
|
|
133
|
+
});
|
|
134
|
+
var defaultImport9 = __toESM(require("@splunk/react-icons/TextAlignCenter"));
|
|
135
|
+
__reExport(TextAlignCenter_exports, require("@splunk/react-icons/TextAlignCenter"));
|
|
136
|
+
var TextAlignCenter_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
137
|
+
|
|
138
|
+
// esm-externals:@splunk/react-icons/TextAlignLeft
|
|
139
|
+
var TextAlignLeft_exports = {};
|
|
140
|
+
__export(TextAlignLeft_exports, {
|
|
141
|
+
default: () => TextAlignLeft_default
|
|
142
|
+
});
|
|
143
|
+
var defaultImport10 = __toESM(require("@splunk/react-icons/TextAlignLeft"));
|
|
144
|
+
__reExport(TextAlignLeft_exports, require("@splunk/react-icons/TextAlignLeft"));
|
|
145
|
+
var TextAlignLeft_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
|
|
146
|
+
|
|
147
|
+
// esm-externals:@splunk/react-icons/TextAlignRight
|
|
148
|
+
var TextAlignRight_exports = {};
|
|
149
|
+
__export(TextAlignRight_exports, {
|
|
150
|
+
default: () => TextAlignRight_default
|
|
151
|
+
});
|
|
152
|
+
var defaultImport11 = __toESM(require("@splunk/react-icons/TextAlignRight"));
|
|
153
|
+
__reExport(TextAlignRight_exports, require("@splunk/react-icons/TextAlignRight"));
|
|
154
|
+
var TextAlignRight_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
|
|
155
|
+
|
|
156
|
+
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
157
|
+
var configUtils_exports = {};
|
|
158
|
+
__export(configUtils_exports, {
|
|
159
|
+
default: () => configUtils_default
|
|
160
|
+
});
|
|
161
|
+
var defaultImport12 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
162
|
+
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
163
|
+
var configUtils_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
|
|
168
164
|
|
|
165
|
+
// src/common/utils/configUtils.ts
|
|
169
166
|
function enhanceConfig(vizConfig) {
|
|
170
|
-
|
|
171
|
-
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
172
|
-
|
|
173
|
-
open:
|
|
174
|
-
}
|
|
175
|
-
|
|
167
|
+
const enhancedConfig = __spreadValues({}, vizConfig);
|
|
168
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(
|
|
169
|
+
(config2) => {
|
|
170
|
+
return __spreadProps(__spreadValues({}, config2), { open: config2.open || false });
|
|
171
|
+
}
|
|
172
|
+
);
|
|
176
173
|
return enhancedConfig;
|
|
177
174
|
}
|
|
178
|
-
|
|
179
|
-
exports.enhanceConfig = enhanceConfig;
|
|
180
|
-
/**
|
|
181
|
-
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
182
|
-
* Created for editor unit tests
|
|
183
|
-
* @param vizConfig a Visualization Config
|
|
184
|
-
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
function uncollapseEditorConfig(vizConfig) {
|
|
188
|
-
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
189
|
-
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
190
|
-
return Object.assign(Object.assign({}, config), {
|
|
191
|
-
open: true
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
return editorPanelUncollapsedConfig;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
198
|
-
|
|
199
|
-
function isDynamicOption(option) {
|
|
200
|
-
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
exports.isDynamicOption = isDynamicOption; // private helpers to improve readability of getInitialPreset
|
|
204
|
-
// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset
|
|
208
|
-
* 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
|
|
209
|
-
* the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext
|
|
210
|
-
* 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
|
|
211
|
-
*
|
|
212
|
-
* Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
function hasCompatibleContexts(vizContext, presetContext) {
|
|
216
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
217
|
-
return presetContextKeys.every(function (contextKey) {
|
|
218
|
-
return presetContext[contextKey] === undefined && vizContext[contextKey] === undefined || presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined;
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
227
|
-
var presetOptionKeys = Object.keys(presetOptions);
|
|
228
|
-
return presetOptionKeys.every(function (optionKey) {
|
|
229
|
-
return isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey]);
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions
|
|
234
|
-
* This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure
|
|
235
|
-
*
|
|
236
|
-
* @param {Object} vizContext - the current vizContext definition
|
|
237
|
-
* @param {Object} vizOptions - the current vizOptions definition
|
|
238
|
-
* @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
243
|
-
return presets.find(function (preset) {
|
|
244
|
-
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
245
|
-
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
246
|
-
var presetContextKeys = Object.keys(presetContext);
|
|
247
|
-
var presetOptionKeys = Object.keys(presetOptions); // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
248
|
-
// if not, then the preset is invalid in config.ts
|
|
249
|
-
|
|
250
|
-
if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;
|
|
251
|
-
return hasCompatibleContexts(vizContext, presetContext) && hasCompatibleOptions(vizOptions, presetOptions);
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
exports.getInitialPreset = getInitialPreset;
|
|
256
|
-
/**
|
|
257
|
-
* generates number precision values for a Select editor
|
|
258
|
-
*
|
|
259
|
-
* @param {Number} numPrecisionValues - number of integer precision values to generate
|
|
260
|
-
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
175
|
function generatePrecisionValues(numPrecisionValues) {
|
|
264
|
-
return (0,
|
|
265
|
-
|
|
266
|
-
label:
|
|
176
|
+
return (0, lodash_exports.range)(0, numPrecisionValues + 1).map(
|
|
177
|
+
(i) => ({
|
|
178
|
+
label: `${i} (0${i > 0 ? "." : ""}${"0".repeat(i)})`,
|
|
179
|
+
// e.g. 0.000 for numPrecisionValues = 3
|
|
267
180
|
value: i
|
|
268
|
-
}
|
|
269
|
-
|
|
181
|
+
})
|
|
182
|
+
);
|
|
270
183
|
}
|
|
271
184
|
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* insert layout in layout array, return a new layout array instead of updating the original
|
|
275
|
-
*
|
|
276
|
-
* @param {EditorLayoutConfig[][]} layout - editor layout
|
|
277
|
-
* @param {Number} index - the index to insert layout item(s)
|
|
278
|
-
* @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert
|
|
279
|
-
* @returns {EditorLayoutConfig[][]} new editor layout with insertion
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
var insertLayout = function insertLayout(layout, index) {
|
|
283
|
-
for (var _len = arguments.length, layoutItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
284
|
-
layoutItems[_key - 2] = arguments[_key];
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return [].concat(_toConsumableArray(layout.slice(0, index)), layoutItems, _toConsumableArray(layout.slice(index)));
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
exports.insertLayout = insertLayout;
|
|
291
|
-
|
|
292
|
-
/***/ }),
|
|
293
|
-
|
|
294
|
-
/***/ 5:
|
|
295
|
-
/***/ (function(module, exports) {
|
|
296
|
-
|
|
297
|
-
module.exports = require("lodash");
|
|
298
|
-
|
|
299
|
-
/***/ }),
|
|
300
|
-
|
|
301
|
-
/***/ 6:
|
|
302
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
303
|
-
|
|
304
|
-
"use strict";
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
Object.defineProperty(exports, "__esModule", {
|
|
308
|
-
value: true
|
|
309
|
-
});
|
|
310
|
-
exports.VizBehavior = void 0;
|
|
311
|
-
var VizBehavior;
|
|
312
|
-
|
|
313
|
-
(function (VizBehavior) {
|
|
314
|
-
/**
|
|
315
|
-
* Dynamic Options Behavior.
|
|
316
|
-
* This allows visualization options to be powered by data
|
|
317
|
-
*
|
|
318
|
-
* **Example**
|
|
319
|
-
*
|
|
320
|
-
* sparklineValues: ">primary|seriesByIndex(0)"
|
|
321
|
-
* would configure sparklineValues with an array of data points
|
|
322
|
-
* coming from the first series in the primary datasource
|
|
323
|
-
*
|
|
324
|
-
*/
|
|
325
|
-
VizBehavior["DYNAMIC_OPTIONS"] = "dynamic-options";
|
|
326
|
-
VizBehavior["EVENTS"] = "events";
|
|
327
|
-
VizBehavior["DOWNSAMPLING"] = "downsampling";
|
|
328
|
-
/**
|
|
329
|
-
* Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is
|
|
330
|
-
* missing.
|
|
331
|
-
* @type {string}
|
|
332
|
-
*/
|
|
333
|
-
|
|
334
|
-
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
335
|
-
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
336
|
-
VizBehavior["TRELLIS"] = "trellis";
|
|
337
|
-
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
338
|
-
|
|
339
|
-
/***/ }),
|
|
340
|
-
|
|
341
|
-
/***/ 7:
|
|
342
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
343
|
-
|
|
344
|
-
"use strict";
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
Object.defineProperty(exports, "__esModule", {
|
|
348
|
-
value: true
|
|
349
|
-
});
|
|
350
|
-
exports.VizCategory = void 0;
|
|
351
|
-
var VizCategory;
|
|
352
|
-
|
|
353
|
-
(function (VizCategory) {
|
|
354
|
-
VizCategory["SINGLE_VALUE"] = "Single Value";
|
|
355
|
-
VizCategory["TRENDS"] = "Trends";
|
|
356
|
-
VizCategory["COMPARISONS"] = "Comparisons";
|
|
357
|
-
VizCategory["TABLE"] = "Table";
|
|
358
|
-
VizCategory["GAUGE"] = "Gauge";
|
|
359
|
-
VizCategory["DISTRIBUTIONS"] = "Distributions";
|
|
360
|
-
VizCategory["CHOROPLETH"] = "Choropleth Maps";
|
|
361
|
-
VizCategory["SHAPES"] = "Shapes";
|
|
362
|
-
VizCategory["MISC"] = "misc";
|
|
363
|
-
VizCategory["FLOW"] = "Flow";
|
|
364
|
-
VizCategory["CORRELATION"] = "Correlation";
|
|
365
|
-
VizCategory["SPATIAL"] = "Spatial";
|
|
366
|
-
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
367
|
-
|
|
368
|
-
/***/ }),
|
|
369
|
-
|
|
370
|
-
/***/ 73:
|
|
371
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
372
|
-
|
|
373
|
-
"use strict";
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
var _toConsumableArray = __webpack_require__(1);
|
|
377
|
-
|
|
378
|
-
Object.defineProperty(exports, "__esModule", {
|
|
379
|
-
value: true
|
|
380
|
-
});
|
|
381
|
-
|
|
382
|
-
var i18n_1 = __webpack_require__(0);
|
|
383
|
-
|
|
384
|
-
var lodash_1 = __webpack_require__(5);
|
|
385
|
-
|
|
386
|
-
var visualization_schemas_1 = __webpack_require__(2);
|
|
387
|
-
|
|
388
|
-
var colorConstants_1 = __webpack_require__(23);
|
|
389
|
-
|
|
390
|
-
var visualization_icons_1 = __webpack_require__(11);
|
|
391
|
-
|
|
392
|
-
var placeholders_1 = __webpack_require__(10);
|
|
393
|
-
|
|
394
|
-
var variables_1 = __webpack_require__(9);
|
|
395
|
-
|
|
396
|
-
var pick_1 = __webpack_require__(8);
|
|
397
|
-
|
|
398
|
-
var TextAlignCenter_1 = __webpack_require__(74);
|
|
399
|
-
|
|
400
|
-
var TextAlignLeft_1 = __webpack_require__(75);
|
|
401
|
-
|
|
402
|
-
var TextAlignRight_1 = __webpack_require__(76);
|
|
403
|
-
|
|
404
|
-
var configUtils_1 = __webpack_require__(3);
|
|
405
|
-
|
|
406
|
-
var VizBehavior_1 = __webpack_require__(6);
|
|
407
|
-
|
|
408
|
-
var VizCategory_1 = __webpack_require__(7);
|
|
409
|
-
|
|
185
|
+
// src/Table/config.ts
|
|
410
186
|
var dataContract = {
|
|
411
|
-
requiredDataSources: [
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
187
|
+
requiredDataSources: [
|
|
188
|
+
{
|
|
189
|
+
name: "primary",
|
|
190
|
+
description: "DataSource that powers the visualization"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
415
193
|
optionalDataSources: [],
|
|
416
194
|
initialRequestParams: {
|
|
417
|
-
primary:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
requestTotalCount: true
|
|
423
|
-
};
|
|
424
|
-
}
|
|
195
|
+
primary: (options = {}) => ({
|
|
196
|
+
offset: 0,
|
|
197
|
+
count: options.count ? options.count : 10,
|
|
198
|
+
requestTotalCount: true
|
|
199
|
+
})
|
|
425
200
|
}
|
|
426
201
|
};
|
|
427
202
|
var size = {
|
|
@@ -429,542 +204,445 @@ var size = {
|
|
|
429
204
|
initialHeight: 300
|
|
430
205
|
};
|
|
431
206
|
var defaultContext = {
|
|
432
|
-
tableAlignByType: [
|
|
433
|
-
match:
|
|
434
|
-
value:
|
|
435
|
-
|
|
436
|
-
match:
|
|
437
|
-
value:
|
|
438
|
-
|
|
439
|
-
match:
|
|
440
|
-
value:
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
value:
|
|
444
|
-
|
|
445
|
-
match:
|
|
446
|
-
value:
|
|
447
|
-
|
|
448
|
-
match:
|
|
449
|
-
value:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
value: 'left'
|
|
453
|
-
}, {
|
|
454
|
-
match: 'null',
|
|
455
|
-
value: 'left'
|
|
456
|
-
}],
|
|
457
|
-
tableCellTypeByType: [{
|
|
458
|
-
match: 'string',
|
|
459
|
-
value: 'TextCell'
|
|
460
|
-
}, {
|
|
461
|
-
match: 'number',
|
|
462
|
-
value: 'TextCell'
|
|
463
|
-
}, {
|
|
464
|
-
match: 'time',
|
|
465
|
-
value: 'TextCell'
|
|
466
|
-
}, {
|
|
467
|
-
match: 'color',
|
|
468
|
-
value: 'TextCell'
|
|
469
|
-
}, {
|
|
470
|
-
match: 'array',
|
|
471
|
-
value: 'ArrayCell'
|
|
472
|
-
}, {
|
|
473
|
-
match: 'sparkline',
|
|
474
|
-
value: 'SparklineCell'
|
|
475
|
-
}, {
|
|
476
|
-
match: 'unknown',
|
|
477
|
-
value: 'TextCell'
|
|
478
|
-
}, {
|
|
479
|
-
match: 'null',
|
|
480
|
-
value: 'TextCell'
|
|
481
|
-
}],
|
|
482
|
-
tableDataFormatByType: {
|
|
483
|
-
time: {
|
|
484
|
-
format: 'YYYY-MM-DD HH:mm:ss'
|
|
485
|
-
}
|
|
486
|
-
},
|
|
207
|
+
tableAlignByType: [
|
|
208
|
+
{ match: "string", value: "left" },
|
|
209
|
+
{ match: "number", value: "right" },
|
|
210
|
+
{ match: "time", value: "left" },
|
|
211
|
+
{ match: "color", value: "left" },
|
|
212
|
+
{ match: "array", value: "left" },
|
|
213
|
+
{ match: "sparkline", value: "center" },
|
|
214
|
+
{ match: "unknown", value: "left" },
|
|
215
|
+
{ match: "null", value: "left" }
|
|
216
|
+
],
|
|
217
|
+
tableCellTypeByType: [
|
|
218
|
+
{ match: "string", value: "TextCell" },
|
|
219
|
+
{ match: "number", value: "TextCell" },
|
|
220
|
+
{ match: "time", value: "TextCell" },
|
|
221
|
+
{ match: "color", value: "TextCell" },
|
|
222
|
+
{ match: "array", value: "ArrayCell" },
|
|
223
|
+
{ match: "sparkline", value: "SparklineCell" },
|
|
224
|
+
{ match: "unknown", value: "TextCell" },
|
|
225
|
+
{ match: "null", value: "TextCell" }
|
|
226
|
+
],
|
|
487
227
|
// NOTE: These contexts are used by the table background color editor.
|
|
488
228
|
// Please be careful removing/renaming/altering them.
|
|
489
229
|
// There are unit tests and visual test that will capture breakages.
|
|
490
230
|
tableRowColorMaxContrast: {
|
|
491
|
-
colors: [
|
|
492
|
-
default:
|
|
231
|
+
colors: ["> themes.textColor", "> themes.inverseTextColor"],
|
|
232
|
+
default: "> themes.textColor"
|
|
493
233
|
},
|
|
494
234
|
tableRowBackgroundColorEvenConfig: {
|
|
495
|
-
channel:
|
|
496
|
-
value:
|
|
235
|
+
channel: "hsv.v",
|
|
236
|
+
value: "*0.96"
|
|
497
237
|
},
|
|
498
238
|
tableHeaderBackgroundColorConfig: {
|
|
499
|
-
channel:
|
|
500
|
-
value:
|
|
239
|
+
channel: "hsv.v",
|
|
240
|
+
value: "*0.9"
|
|
501
241
|
},
|
|
502
|
-
tableRowBackgroundColorsByTheme: [
|
|
503
|
-
tableAltRowBackgroundColorsByTheme: [
|
|
504
|
-
tableRowBackgroundColorsByBackgroundColor: [
|
|
505
|
-
tableAltRowBackgroundColorsByBackgroundColor: [
|
|
242
|
+
tableRowBackgroundColorsByTheme: ["> themes.rowBackgroundColorOdd"],
|
|
243
|
+
tableAltRowBackgroundColorsByTheme: ["> themes.rowBackgroundColorOdd", "> themes.rowBackgroundColorEven"],
|
|
244
|
+
tableRowBackgroundColorsByBackgroundColor: ["> backgroundColor"],
|
|
245
|
+
tableAltRowBackgroundColorsByBackgroundColor: [
|
|
246
|
+
"> backgroundColor",
|
|
247
|
+
"> backgroundColor | setColorChannel(tableRowBackgroundColorEvenConfig)"
|
|
248
|
+
]
|
|
506
249
|
};
|
|
507
250
|
var headerAlignConfigTable = {
|
|
508
|
-
label: (0,
|
|
509
|
-
editor:
|
|
510
|
-
option:
|
|
251
|
+
label: (0, i18n_exports._)("Header alignment"),
|
|
252
|
+
editor: "editor.radioBar",
|
|
253
|
+
option: "tableFormat.headerAlign",
|
|
511
254
|
editorProps: {
|
|
512
|
-
values: [
|
|
513
|
-
label: (0,
|
|
514
|
-
value:
|
|
515
|
-
icon:
|
|
516
|
-
|
|
517
|
-
label: (0, i18n_1._)('Center'),
|
|
518
|
-
value: 'center',
|
|
519
|
-
icon: TextAlignCenter_1.default
|
|
520
|
-
}, {
|
|
521
|
-
label: (0, i18n_1._)('Right'),
|
|
522
|
-
value: 'right',
|
|
523
|
-
icon: TextAlignRight_1.default
|
|
524
|
-
}]
|
|
255
|
+
values: [
|
|
256
|
+
{ label: (0, i18n_exports._)("Left"), value: "left", icon: TextAlignLeft_default },
|
|
257
|
+
{ label: (0, i18n_exports._)("Center"), value: "center", icon: TextAlignCenter_default },
|
|
258
|
+
{ label: (0, i18n_exports._)("Right"), value: "right", icon: TextAlignRight_default }
|
|
259
|
+
]
|
|
525
260
|
}
|
|
526
261
|
};
|
|
527
|
-
var headerAlignConfigColumn =
|
|
528
|
-
option:
|
|
262
|
+
var headerAlignConfigColumn = __spreadProps(__spreadValues({}, headerAlignConfigTable), {
|
|
263
|
+
option: "headerAlign",
|
|
529
264
|
editorProps: {
|
|
530
|
-
values: [
|
|
531
|
-
label: (0,
|
|
532
|
-
value:
|
|
533
|
-
|
|
534
|
-
label: (0,
|
|
535
|
-
|
|
536
|
-
icon: TextAlignLeft_1.default
|
|
537
|
-
}, {
|
|
538
|
-
label: (0, i18n_1._)('Center'),
|
|
539
|
-
value: 'center',
|
|
540
|
-
icon: TextAlignCenter_1.default
|
|
541
|
-
}, {
|
|
542
|
-
label: (0, i18n_1._)('Right'),
|
|
543
|
-
value: 'right',
|
|
544
|
-
icon: TextAlignRight_1.default
|
|
545
|
-
}]
|
|
265
|
+
values: [
|
|
266
|
+
{ label: (0, i18n_exports._)("Auto"), value: "auto" },
|
|
267
|
+
{ label: (0, i18n_exports._)("Left"), value: "left", icon: TextAlignLeft_default },
|
|
268
|
+
{ label: (0, i18n_exports._)("Center"), value: "center", icon: TextAlignCenter_default },
|
|
269
|
+
{ label: (0, i18n_exports._)("Right"), value: "right", icon: TextAlignRight_default }
|
|
270
|
+
]
|
|
546
271
|
}
|
|
547
272
|
});
|
|
548
273
|
var textOverflowConfigColumn = {
|
|
549
|
-
label: (0,
|
|
550
|
-
editor:
|
|
551
|
-
option:
|
|
274
|
+
label: (0, i18n_exports._)("Text wrapping"),
|
|
275
|
+
editor: "editor.radioBar",
|
|
276
|
+
option: "textOverflow",
|
|
552
277
|
editorProps: {
|
|
553
|
-
values: [
|
|
554
|
-
label: (0,
|
|
555
|
-
value:
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
value: 'anywhere'
|
|
559
|
-
}, {
|
|
560
|
-
label: (0, i18n_1._)('Trim'),
|
|
561
|
-
value: 'ellipsis'
|
|
562
|
-
}]
|
|
278
|
+
values: [
|
|
279
|
+
{ label: (0, i18n_exports._)("Standard"), value: "break-word" },
|
|
280
|
+
{ label: (0, i18n_exports._)("Anywhere"), value: "anywhere" },
|
|
281
|
+
{ label: (0, i18n_exports._)("Trim"), value: "ellipsis" }
|
|
282
|
+
]
|
|
563
283
|
}
|
|
564
284
|
};
|
|
565
285
|
var textAlignConfigTable = {
|
|
566
|
-
label: (0,
|
|
567
|
-
editor:
|
|
568
|
-
option:
|
|
286
|
+
label: (0, i18n_exports._)("Cells alignment"),
|
|
287
|
+
editor: "editor.radioBar",
|
|
288
|
+
option: "tableFormat.align",
|
|
569
289
|
editorProps: {
|
|
570
|
-
values: [
|
|
571
|
-
label: (0,
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
label: (0,
|
|
575
|
-
|
|
576
|
-
icon: TextAlignLeft_1.default
|
|
577
|
-
}, {
|
|
578
|
-
label: (0, i18n_1._)('Center'),
|
|
579
|
-
value: 'center',
|
|
580
|
-
icon: TextAlignCenter_1.default
|
|
581
|
-
}, {
|
|
582
|
-
label: (0, i18n_1._)('Right'),
|
|
583
|
-
value: 'right',
|
|
584
|
-
icon: TextAlignRight_1.default
|
|
585
|
-
}]
|
|
290
|
+
values: [
|
|
291
|
+
{ label: (0, i18n_exports._)("Auto"), value: "> table | type() | matchValue(tableAlignByType)" },
|
|
292
|
+
{ label: (0, i18n_exports._)("Left"), value: "left", icon: TextAlignLeft_default },
|
|
293
|
+
{ label: (0, i18n_exports._)("Center"), value: "center", icon: TextAlignCenter_default },
|
|
294
|
+
{ label: (0, i18n_exports._)("Right"), value: "right", icon: TextAlignRight_default }
|
|
295
|
+
]
|
|
586
296
|
}
|
|
587
297
|
};
|
|
588
|
-
var textAlignConfigColumn =
|
|
589
|
-
option:
|
|
298
|
+
var textAlignConfigColumn = __spreadProps(__spreadValues({}, textAlignConfigTable), {
|
|
299
|
+
option: "align",
|
|
590
300
|
editorProps: {
|
|
591
|
-
values: [
|
|
592
|
-
label: (0,
|
|
593
|
-
value:
|
|
594
|
-
|
|
595
|
-
label: (0,
|
|
596
|
-
|
|
597
|
-
icon: TextAlignLeft_1.default
|
|
598
|
-
}, {
|
|
599
|
-
label: (0, i18n_1._)('Center'),
|
|
600
|
-
value: 'center',
|
|
601
|
-
icon: TextAlignCenter_1.default
|
|
602
|
-
}, {
|
|
603
|
-
label: (0, i18n_1._)('Right'),
|
|
604
|
-
value: 'right',
|
|
605
|
-
icon: TextAlignRight_1.default
|
|
606
|
-
}]
|
|
301
|
+
values: [
|
|
302
|
+
{ label: (0, i18n_exports._)("Auto"), value: "auto" },
|
|
303
|
+
{ label: (0, i18n_exports._)("Left"), value: "left", icon: TextAlignLeft_default },
|
|
304
|
+
{ label: (0, i18n_exports._)("Center"), value: "center", icon: TextAlignCenter_default },
|
|
305
|
+
{ label: (0, i18n_exports._)("Right"), value: "right", icon: TextAlignRight_default }
|
|
306
|
+
]
|
|
607
307
|
}
|
|
608
308
|
});
|
|
609
309
|
var unitPositionConfig = {
|
|
610
|
-
label: (0,
|
|
611
|
-
editor:
|
|
612
|
-
option:
|
|
310
|
+
label: (0, i18n_exports._)("Units position"),
|
|
311
|
+
editor: "editor.select",
|
|
312
|
+
option: "unitPosition",
|
|
613
313
|
editorProps: {
|
|
614
|
-
values: [
|
|
615
|
-
label: (0,
|
|
616
|
-
value:
|
|
617
|
-
|
|
618
|
-
label: (0, i18n_1._)('After'),
|
|
619
|
-
value: 'after'
|
|
620
|
-
}]
|
|
314
|
+
values: [
|
|
315
|
+
{ label: (0, i18n_exports._)("Before"), value: "before" },
|
|
316
|
+
{ label: (0, i18n_exports._)("After"), value: "after" }
|
|
317
|
+
]
|
|
621
318
|
}
|
|
622
319
|
};
|
|
623
320
|
var unitLabelConfig = {
|
|
624
|
-
label: (0,
|
|
625
|
-
option:
|
|
626
|
-
editor:
|
|
321
|
+
label: (0, i18n_exports._)("Unit label"),
|
|
322
|
+
option: "unit",
|
|
323
|
+
editor: "editor.text"
|
|
627
324
|
};
|
|
628
325
|
var timeFormattingConfig = {
|
|
629
|
-
label: (0,
|
|
630
|
-
option:
|
|
631
|
-
editor:
|
|
326
|
+
label: (0, i18n_exports._)("Date & Time formatting"),
|
|
327
|
+
option: "format",
|
|
328
|
+
editor: "editor.text",
|
|
632
329
|
editorProps: {
|
|
633
|
-
tooltip: (0,
|
|
330
|
+
tooltip: (0, i18n_exports._)("For example: DD-MM-YYYY")
|
|
634
331
|
}
|
|
635
332
|
};
|
|
636
|
-
var sequentialColorConfig = [
|
|
637
|
-
to: 20,
|
|
638
|
-
value:
|
|
639
|
-
},
|
|
640
|
-
from:
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
from: 40,
|
|
645
|
-
to: 60,
|
|
646
|
-
value: '#CBA700'
|
|
647
|
-
}, {
|
|
648
|
-
from: 60,
|
|
649
|
-
to: 80,
|
|
650
|
-
value: '#669922'
|
|
651
|
-
}, {
|
|
652
|
-
from: 80,
|
|
653
|
-
value: '#118832'
|
|
654
|
-
}];
|
|
655
|
-
var matchColorConfig = [{
|
|
656
|
-
match: '',
|
|
657
|
-
value: '#5C33FF'
|
|
658
|
-
}];
|
|
333
|
+
var sequentialColorConfig = [
|
|
334
|
+
{ to: 20, value: "#D41F1F" },
|
|
335
|
+
{ from: 20, to: 40, value: "#D94E17" },
|
|
336
|
+
{ from: 40, to: 60, value: "#CBA700" },
|
|
337
|
+
{ from: 60, to: 80, value: "#669922" },
|
|
338
|
+
{ from: 80, value: "#118832" }
|
|
339
|
+
];
|
|
340
|
+
var matchColorConfig = [{ match: "", value: "#5C33FF" }];
|
|
659
341
|
var themes = {
|
|
660
|
-
defaultBackgroundColor:
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
},
|
|
702
|
-
inverseTextColor: function inverseTextColor(props) {
|
|
703
|
-
return (0, pick_1.default)({
|
|
704
|
-
enterprise: {
|
|
705
|
-
dark: variables_1.default.contentColorInverted(props),
|
|
706
|
-
light: variables_1.default.white(props) // equal to textColor in enterpriseDark
|
|
707
|
-
|
|
708
|
-
},
|
|
709
|
-
prisma: variables_1.default.contentColorInverted(props)
|
|
710
|
-
})(props);
|
|
711
|
-
}
|
|
342
|
+
defaultBackgroundColor: (props) => pick_default({
|
|
343
|
+
enterprise: {
|
|
344
|
+
dark: variables_default.black(props),
|
|
345
|
+
light: variables_default.backgroundColor(props)
|
|
346
|
+
},
|
|
347
|
+
prisma: variables_default.backgroundColorSidebar(props)
|
|
348
|
+
})(props),
|
|
349
|
+
defaultHeaderBackgroundColor: (props) => pick_default({
|
|
350
|
+
enterprise: {
|
|
351
|
+
dark: variables_default.gray20(props),
|
|
352
|
+
light: variables_default.gray92(props)
|
|
353
|
+
},
|
|
354
|
+
prisma: variables_default.backgroundColor(props)
|
|
355
|
+
})(props),
|
|
356
|
+
rowBackgroundColorEven: (props) => pick_default({
|
|
357
|
+
enterprise: {
|
|
358
|
+
dark: variables_default.black(props),
|
|
359
|
+
light: variables_default.gray96(props)
|
|
360
|
+
},
|
|
361
|
+
prisma: variables_default.backgroundColorPage(props)
|
|
362
|
+
})(props),
|
|
363
|
+
rowBackgroundColorOdd: (props) => pick_default({
|
|
364
|
+
enterprise: {
|
|
365
|
+
dark: "#0D1012",
|
|
366
|
+
light: variables_default.backgroundColor(props)
|
|
367
|
+
},
|
|
368
|
+
prisma: variables_default.backgroundColorSidebar(props)
|
|
369
|
+
})(props),
|
|
370
|
+
textColor: (props) => pick_default({
|
|
371
|
+
enterprise: variables_default.textColor(props),
|
|
372
|
+
prisma: variables_default.contentColorDefault(props)
|
|
373
|
+
})(props),
|
|
374
|
+
inverseTextColor: (props) => pick_default({
|
|
375
|
+
enterprise: {
|
|
376
|
+
dark: variables_default.contentColorInverted(props),
|
|
377
|
+
// equal to textColor in enterprise
|
|
378
|
+
light: variables_default.white(props)
|
|
379
|
+
// equal to textColor in enterpriseDark
|
|
380
|
+
},
|
|
381
|
+
prisma: variables_default.contentColorInverted(props)
|
|
382
|
+
})(props)
|
|
712
383
|
};
|
|
713
|
-
var backgroundColorPaletteSet = new Set([
|
|
714
|
-
|
|
715
|
-
|
|
384
|
+
var backgroundColorPaletteSet = /* @__PURE__ */ new Set([
|
|
385
|
+
...colorConstants_exports.COLOR_EDITOR_PALETTE,
|
|
386
|
+
...(0, lodash_exports.map)(themes, (t) => (0, lodash_exports.get)(t, "defaultBackgroundColor"))
|
|
387
|
+
]);
|
|
716
388
|
var EDITOR_LABEL_WIDTH = 100;
|
|
717
|
-
var editorConfig = [
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
option: 'showRowNumbers',
|
|
730
|
-
editor: 'editor.checkbox',
|
|
731
|
-
editorProps: {
|
|
732
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
733
|
-
}
|
|
734
|
-
}], [{
|
|
735
|
-
label: (0, i18n_1._)('Internal fields'),
|
|
736
|
-
option: 'showInternalFields',
|
|
737
|
-
editor: 'editor.checkbox',
|
|
738
|
-
editorProps: {
|
|
739
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
740
|
-
}
|
|
741
|
-
}], [{
|
|
742
|
-
label: (0, i18n_1._)('Header row'),
|
|
743
|
-
option: 'headerVisibility',
|
|
744
|
-
editor: 'editor.select',
|
|
745
|
-
editorProps: {
|
|
746
|
-
values: [{
|
|
747
|
-
label: (0, i18n_1._)('Inline'),
|
|
748
|
-
value: 'inline'
|
|
749
|
-
}, {
|
|
750
|
-
label: (0, i18n_1._)('Fixed'),
|
|
751
|
-
value: 'fixed'
|
|
752
|
-
}, {
|
|
753
|
-
label: (0, i18n_1._)('Hidden'),
|
|
754
|
-
value: 'none'
|
|
755
|
-
}],
|
|
756
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
757
|
-
}
|
|
758
|
-
}]]
|
|
759
|
-
}, {
|
|
760
|
-
label: (0, i18n_1._)('Color and style'),
|
|
761
|
-
layout: [[{
|
|
762
|
-
key: 'backgroundColor',
|
|
763
|
-
editor: 'editor.tableBackgroundColor',
|
|
764
|
-
editorProps: {
|
|
765
|
-
themes: themes,
|
|
766
|
-
labelPosition: 'top',
|
|
767
|
-
labelWidth: EDITOR_LABEL_WIDTH,
|
|
768
|
-
palette: _toConsumableArray(backgroundColorPaletteSet)
|
|
769
|
-
}
|
|
770
|
-
}], [{
|
|
771
|
-
option: 'font',
|
|
772
|
-
label: (0, i18n_1._)('Font'),
|
|
773
|
-
editor: 'editor.select',
|
|
774
|
-
editorProps: {
|
|
775
|
-
values: [{
|
|
776
|
-
label: (0, i18n_1._)('Proportional (Default)'),
|
|
777
|
-
value: 'proportional'
|
|
778
|
-
}, {
|
|
779
|
-
label: (0, i18n_1._)('Monospace'),
|
|
780
|
-
value: 'monospace'
|
|
781
|
-
}],
|
|
782
|
-
labelPosition: 'top',
|
|
783
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
784
|
-
}
|
|
785
|
-
}], [{
|
|
786
|
-
option: 'fontSize',
|
|
787
|
-
label: (0, i18n_1._)('Font size'),
|
|
788
|
-
editor: 'editor.select',
|
|
789
|
-
editorProps: {
|
|
790
|
-
values: [{
|
|
791
|
-
label: (0, i18n_1._)('Extra Small (font 10px, row 24px)'),
|
|
792
|
-
value: 'extraSmall'
|
|
793
|
-
}, {
|
|
794
|
-
label: (0, i18n_1._)('Small (font 12px, row 24px)'),
|
|
795
|
-
value: 'small'
|
|
796
|
-
}, {
|
|
797
|
-
label: (0, i18n_1._)('Default (font 14px, row 32px)'),
|
|
798
|
-
value: 'default'
|
|
799
|
-
}, {
|
|
800
|
-
label: (0, i18n_1._)('Large (font 16px, row 36px)'),
|
|
801
|
-
value: 'large'
|
|
802
|
-
}],
|
|
803
|
-
labelPosition: 'top',
|
|
804
|
-
labelWidth: EDITOR_LABEL_WIDTH
|
|
805
|
-
}
|
|
806
|
-
}], [Object.assign({}, headerAlignConfigTable)], [Object.assign({}, textAlignConfigTable)], [{
|
|
807
|
-
label: (0, i18n_1._)('Column-specific formatting'),
|
|
808
|
-
editor: 'editor.tableColumnFormatter',
|
|
809
|
-
editorProps: {
|
|
810
|
-
// popover: {sections: [textFormatConfig, formatByTypeConfig, columnColoringConfig]}
|
|
811
|
-
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
812
|
-
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
813
|
-
columnColoringConfig: {
|
|
814
|
-
coloringTypes: [{
|
|
815
|
-
label: (0, i18n_1._)('Text'),
|
|
816
|
-
value: 'rowColors'
|
|
817
|
-
}, {
|
|
818
|
-
label: (0, i18n_1._)('Background'),
|
|
819
|
-
value: 'rowBackgroundColors'
|
|
820
|
-
}],
|
|
821
|
-
formatters: [{
|
|
822
|
-
label: (0, i18n_1._)('Ranges'),
|
|
823
|
-
value: 'rangeValue',
|
|
824
|
-
defaults: {
|
|
825
|
-
rowBackgroundColors: sequentialColorConfig,
|
|
826
|
-
rowColors: sequentialColorConfig
|
|
389
|
+
var editorConfig = [
|
|
390
|
+
{
|
|
391
|
+
label: (0, i18n_exports._)("Data display"),
|
|
392
|
+
layout: [
|
|
393
|
+
[
|
|
394
|
+
{
|
|
395
|
+
label: (0, i18n_exports._)("Rows displayed"),
|
|
396
|
+
option: "count",
|
|
397
|
+
editor: "editor.number",
|
|
398
|
+
editorProps: {
|
|
399
|
+
min: 0,
|
|
400
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
827
401
|
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
[
|
|
405
|
+
{
|
|
406
|
+
label: (0, i18n_exports._)("Row numbers"),
|
|
407
|
+
option: "showRowNumbers",
|
|
408
|
+
editor: "editor.checkbox",
|
|
409
|
+
editorProps: {
|
|
410
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
834
411
|
}
|
|
835
|
-
}],
|
|
836
|
-
themes: themes
|
|
837
|
-
},
|
|
838
|
-
defaultOptionsByType: {
|
|
839
|
-
number: {
|
|
840
|
-
thousandSeparated: false,
|
|
841
|
-
unitPosition: 'after'
|
|
842
|
-
},
|
|
843
|
-
string: {
|
|
844
|
-
unitPosition: 'after'
|
|
845
|
-
},
|
|
846
|
-
text: {
|
|
847
|
-
align: 'auto',
|
|
848
|
-
headerAlign: 'auto',
|
|
849
|
-
textOverflow: 'break-word'
|
|
850
|
-
},
|
|
851
|
-
time: {
|
|
852
|
-
format: 'YYYY-MM-DD HH:mm:ss'
|
|
853
412
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
editor: 'editor.select',
|
|
413
|
+
],
|
|
414
|
+
[
|
|
415
|
+
{
|
|
416
|
+
label: (0, i18n_exports._)("Internal fields"),
|
|
417
|
+
option: "showInternalFields",
|
|
418
|
+
editor: "editor.checkbox",
|
|
861
419
|
editorProps: {
|
|
862
|
-
|
|
420
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
863
421
|
}
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
[
|
|
425
|
+
{
|
|
426
|
+
label: (0, i18n_exports._)("Header row"),
|
|
427
|
+
option: "headerVisibility",
|
|
428
|
+
editor: "editor.select",
|
|
868
429
|
editorProps: {
|
|
869
|
-
values: [
|
|
870
|
-
label: (0,
|
|
871
|
-
value:
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}]
|
|
430
|
+
values: [
|
|
431
|
+
{ label: (0, i18n_exports._)("Inline"), value: "inline" },
|
|
432
|
+
{ label: (0, i18n_exports._)("Fixed"), value: "fixed" },
|
|
433
|
+
{ label: (0, i18n_exports._)("Hidden"), value: "none" }
|
|
434
|
+
],
|
|
435
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
876
436
|
}
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
label: (0, i18n_exports._)("Color and style"),
|
|
443
|
+
layout: [
|
|
444
|
+
[
|
|
445
|
+
{
|
|
446
|
+
key: "backgroundColor",
|
|
447
|
+
editor: "editor.tableBackgroundColor",
|
|
448
|
+
editorProps: {
|
|
449
|
+
themes,
|
|
450
|
+
labelPosition: "top",
|
|
451
|
+
labelWidth: EDITOR_LABEL_WIDTH,
|
|
452
|
+
palette: [...backgroundColorPaletteSet]
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
[
|
|
457
|
+
{
|
|
458
|
+
option: "font",
|
|
459
|
+
label: (0, i18n_exports._)("Font"),
|
|
460
|
+
editor: "editor.select",
|
|
461
|
+
editorProps: {
|
|
462
|
+
values: [
|
|
463
|
+
{ label: (0, i18n_exports._)("Proportional (Default)"), value: "proportional" },
|
|
464
|
+
{ label: (0, i18n_exports._)("Monospace"), value: "monospace" }
|
|
465
|
+
],
|
|
466
|
+
labelPosition: "top",
|
|
467
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
[
|
|
472
|
+
{
|
|
473
|
+
option: "fontSize",
|
|
474
|
+
label: (0, i18n_exports._)("Font size"),
|
|
475
|
+
editor: "editor.select",
|
|
476
|
+
editorProps: {
|
|
477
|
+
values: [
|
|
478
|
+
{ label: (0, i18n_exports._)("Extra Small (font 10px, row 24px)"), value: "extraSmall" },
|
|
479
|
+
{ label: (0, i18n_exports._)("Small (font 12px, row 24px)"), value: "small" },
|
|
480
|
+
{ label: (0, i18n_exports._)("Default (font 14px, row 32px)"), value: "default" },
|
|
481
|
+
{ label: (0, i18n_exports._)("Large (font 16px, row 36px)"), value: "large" }
|
|
482
|
+
],
|
|
483
|
+
labelPosition: "top",
|
|
484
|
+
labelWidth: EDITOR_LABEL_WIDTH
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
[
|
|
489
|
+
__spreadValues({}, headerAlignConfigTable)
|
|
490
|
+
],
|
|
491
|
+
[
|
|
492
|
+
__spreadValues({}, textAlignConfigTable)
|
|
493
|
+
],
|
|
494
|
+
[
|
|
495
|
+
{
|
|
496
|
+
label: (0, i18n_exports._)("Column-specific formatting"),
|
|
497
|
+
editor: "editor.tableColumnFormatter",
|
|
498
|
+
editorProps: {
|
|
499
|
+
// popover: {sections: [textFormatConfig, formatByTypeConfig, columnColoringConfig]}
|
|
500
|
+
// Table column coloring does not adhere to same DSL structure as other dynamically colored options
|
|
501
|
+
// we use the FormatterEditor directly and not the DynamicColorEditor's provided DSL builders
|
|
502
|
+
columnColoringConfig: {
|
|
503
|
+
coloringTypes: [
|
|
504
|
+
{
|
|
505
|
+
label: (0, i18n_exports._)("Text"),
|
|
506
|
+
value: "rowColors"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
label: (0, i18n_exports._)("Background"),
|
|
510
|
+
value: "rowBackgroundColors"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
formatters: [
|
|
514
|
+
{
|
|
515
|
+
label: (0, i18n_exports._)("Ranges"),
|
|
516
|
+
value: "rangeValue",
|
|
517
|
+
defaults: {
|
|
518
|
+
rowBackgroundColors: sequentialColorConfig,
|
|
519
|
+
rowColors: sequentialColorConfig
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
label: (0, i18n_exports._)("Matches"),
|
|
524
|
+
value: "matchValue",
|
|
525
|
+
defaults: {
|
|
526
|
+
rowBackgroundColors: matchColorConfig,
|
|
527
|
+
rowColors: matchColorConfig
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
themes
|
|
532
|
+
},
|
|
533
|
+
defaultOptionsByType: {
|
|
534
|
+
number: {
|
|
535
|
+
thousandSeparated: false,
|
|
536
|
+
unitPosition: "after"
|
|
537
|
+
},
|
|
538
|
+
string: {
|
|
539
|
+
unitPosition: "after"
|
|
540
|
+
},
|
|
541
|
+
text: {
|
|
542
|
+
align: "auto",
|
|
543
|
+
headerAlign: "auto",
|
|
544
|
+
textOverflow: "break-word"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
textFormatConfig: [
|
|
548
|
+
[
|
|
549
|
+
__spreadValues({}, headerAlignConfigColumn)
|
|
550
|
+
],
|
|
551
|
+
[
|
|
552
|
+
__spreadValues({}, textAlignConfigColumn)
|
|
553
|
+
],
|
|
554
|
+
[
|
|
555
|
+
__spreadValues({}, textOverflowConfigColumn)
|
|
556
|
+
]
|
|
557
|
+
],
|
|
558
|
+
flyoutConfig: {
|
|
559
|
+
number: [
|
|
560
|
+
[
|
|
561
|
+
__spreadValues({}, unitPositionConfig),
|
|
562
|
+
__spreadValues({}, unitLabelConfig)
|
|
563
|
+
],
|
|
564
|
+
[
|
|
565
|
+
{
|
|
566
|
+
label: (0, i18n_exports._)("Precision"),
|
|
567
|
+
option: "precision",
|
|
568
|
+
editor: "editor.select",
|
|
569
|
+
editorProps: {
|
|
570
|
+
values: generatePrecisionValues(20)
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
label: (0, i18n_exports._)("Thousand separators"),
|
|
575
|
+
option: "thousandSeparated",
|
|
576
|
+
editor: "editor.radioBar",
|
|
577
|
+
editorProps: {
|
|
578
|
+
values: [
|
|
579
|
+
{ label: (0, i18n_exports._)("Off"), value: false },
|
|
580
|
+
{ label: (0, i18n_exports._)("On"), value: true }
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
],
|
|
586
|
+
// TODO(fkurniawan): fill in with proper editor components
|
|
587
|
+
sparkline: [],
|
|
588
|
+
string: [
|
|
589
|
+
[
|
|
590
|
+
__spreadValues({}, unitPositionConfig),
|
|
591
|
+
__spreadValues({}, unitLabelConfig)
|
|
592
|
+
]
|
|
593
|
+
],
|
|
594
|
+
time: [
|
|
595
|
+
[
|
|
596
|
+
__spreadValues({}, timeFormattingConfig)
|
|
597
|
+
]
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
value: ({ context, options }) => {
|
|
601
|
+
return {
|
|
602
|
+
context,
|
|
603
|
+
columnFormat: options.columnFormat,
|
|
604
|
+
tableFormat: options.tableFormat
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
key: "TableColumnFormatterEditor"
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
];
|
|
900
614
|
var config = {
|
|
901
615
|
/**
|
|
902
616
|
* unique viz key
|
|
903
617
|
*/
|
|
904
|
-
key:
|
|
905
|
-
|
|
618
|
+
key: "splunk.table",
|
|
906
619
|
/**
|
|
907
620
|
* viz name
|
|
908
621
|
*/
|
|
909
|
-
name: (0,
|
|
910
|
-
category:
|
|
911
|
-
|
|
622
|
+
name: (0, i18n_exports._)("Table"),
|
|
623
|
+
category: "Table" /* TABLE */,
|
|
912
624
|
/**
|
|
913
625
|
* viz icon
|
|
914
626
|
*/
|
|
915
|
-
icon:
|
|
916
|
-
placeholderIcon:
|
|
917
|
-
dataContract
|
|
918
|
-
size
|
|
919
|
-
defaultContext
|
|
920
|
-
optionsSchema:
|
|
921
|
-
editorConfig
|
|
627
|
+
icon: visualization_icons_exports.Table,
|
|
628
|
+
placeholderIcon: placeholders_exports.Table,
|
|
629
|
+
dataContract,
|
|
630
|
+
size,
|
|
631
|
+
defaultContext,
|
|
632
|
+
optionsSchema: visualization_schemas_exports.tableOptionsSchema,
|
|
633
|
+
editorConfig,
|
|
922
634
|
events: {
|
|
923
|
-
|
|
924
|
-
description:
|
|
635
|
+
"cell.click": {
|
|
636
|
+
description: "triggered when user clicks a table cell"
|
|
925
637
|
}
|
|
926
638
|
},
|
|
927
|
-
supports: [
|
|
928
|
-
|
|
639
|
+
supports: [
|
|
640
|
+
"dynamic-options" /* DYNAMIC_OPTIONS */,
|
|
641
|
+
"events" /* EVENTS */,
|
|
642
|
+
"page-and-sort" /* PAGE_AND_SORT */,
|
|
643
|
+
"placeholder" /* PLACEHOLDER */
|
|
644
|
+
],
|
|
645
|
+
themes
|
|
929
646
|
};
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
/***/ }),
|
|
933
|
-
|
|
934
|
-
/***/ 74:
|
|
935
|
-
/***/ (function(module, exports) {
|
|
936
|
-
|
|
937
|
-
module.exports = require("@splunk/react-icons/TextAlignCenter");
|
|
938
|
-
|
|
939
|
-
/***/ }),
|
|
940
|
-
|
|
941
|
-
/***/ 75:
|
|
942
|
-
/***/ (function(module, exports) {
|
|
943
|
-
|
|
944
|
-
module.exports = require("@splunk/react-icons/TextAlignLeft");
|
|
945
|
-
|
|
946
|
-
/***/ }),
|
|
947
|
-
|
|
948
|
-
/***/ 76:
|
|
949
|
-
/***/ (function(module, exports) {
|
|
950
|
-
|
|
951
|
-
module.exports = require("@splunk/react-icons/TextAlignRight");
|
|
952
|
-
|
|
953
|
-
/***/ }),
|
|
954
|
-
|
|
955
|
-
/***/ 8:
|
|
956
|
-
/***/ (function(module, exports) {
|
|
957
|
-
|
|
958
|
-
module.exports = require("@splunk/themes/pick");
|
|
959
|
-
|
|
960
|
-
/***/ }),
|
|
961
|
-
|
|
962
|
-
/***/ 9:
|
|
963
|
-
/***/ (function(module, exports) {
|
|
964
|
-
|
|
965
|
-
module.exports = require("@splunk/themes/variables");
|
|
966
|
-
|
|
967
|
-
/***/ })
|
|
968
|
-
|
|
969
|
-
/******/ });
|
|
970
|
-
//# sourceMappingURL=Table.config.js.map
|
|
647
|
+
var config_default = enhanceConfig(config);
|
|
648
|
+
//# sourceMappingURL=Table.config.js.map
|