@splunk/visualizations 25.1.0 → 25.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Background_Color_Red.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_Basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Actions_for_Numeric_Field_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_FieldSummaryTooltip_Light.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Background_color_cyan.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValueIcon_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Background_Color_white_Under_Label_and_Unit_specified.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Major_Value_is_null.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_after_default.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureSingleValue_Unit_specified_Unit_Position_before.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Events_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields_with_Highlight.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Show_Placeholder.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Value_Highlighting.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Events_Events_With_Options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_LinkGraph_LinkGraph_ES.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Background_Color_af575a.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Basic_Markdown.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Begin_with_Text_Instead_of_Header.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Color_purple.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Font_Size_extraLarge.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Markdown_with_number_as_DSL.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_after.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Set_Unit_value_before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Set_The_Unit_Before.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_After.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_Unit_Value_Before.png +0 -0
- package/Area.config.js +72 -22
- package/Area.config.js.map +1 -1
- package/Area.js +246 -185
- package/Area.js.map +1 -1
- package/Bar.config.js +17 -17
- package/Bar.config.js.map +1 -1
- package/Bar.js +191 -180
- package/Bar.js.map +1 -1
- package/Bubble.config.js +21 -14
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +193 -175
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +6 -6
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +180 -170
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +17 -17
- package/Column.config.js.map +1 -1
- package/Column.js +190 -180
- package/Column.js.map +1 -1
- package/Ellipse.config.js +3 -3
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +144 -134
- package/Ellipse.js.map +1 -1
- package/Events.config.js +664 -0
- package/Events.config.js.map +1 -0
- package/Events.js +3114 -0
- package/Events.js.map +1 -0
- package/FillerGauge.config.js +20 -19
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +183 -166
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +5 -5
- package/Image.config.js.map +1 -1
- package/Image.js +128 -128
- package/Image.js.map +1 -1
- package/Line.config.js +73 -22
- package/Line.config.js.map +1 -1
- package/Line.js +253 -186
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +15 -8
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +25270 -434
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +30 -29
- package/Map.config.js.map +1 -1
- package/Map.js +3064 -3125
- package/Map.js.map +1 -1
- package/Markdown.config.js +32 -10
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +576 -529
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +16 -16
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1287 -1287
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +14 -14
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +532 -639
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +16 -16
- package/Pie.config.js.map +1 -1
- package/Pie.js +1205 -1205
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +14 -14
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +2584 -2700
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +7 -7
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +726 -726
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +18 -18
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +3132 -3253
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +24 -16
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +1402 -1395
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +11 -10
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +2208 -2208
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +32 -32
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +11 -10
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +825 -966
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +11 -10
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1897 -1897
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +7 -7
- package/Table.config.js.map +1 -1
- package/Table.js +2158 -2155
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +15 -8
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeValueMarker.js +2 -2
- package/common/OptionsDoc.js +8 -8
- package/common/OptionsDoc.js.map +1 -1
- package/common/ThemesDoc.js +2 -2
- package/common/utils/configUtils.js +3 -3
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +136 -0
- package/common/utils/dataUtils.js.map +1 -0
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/mapUtils.js +11 -10
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +3 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +8 -8
- package/common/utils/testHelper.js.map +1 -1
- package/common/withDashboardViz.js +2 -2
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +15 -13
package/Rectangle.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 434);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -95,25 +95,25 @@ module.exports =
|
|
|
95
95
|
/***/ 0:
|
|
96
96
|
/***/ (function(module, exports) {
|
|
97
97
|
|
|
98
|
-
module.exports = require("
|
|
98
|
+
module.exports = require("react");
|
|
99
99
|
|
|
100
100
|
/***/ }),
|
|
101
101
|
|
|
102
102
|
/***/ 1:
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
|
-
module.exports = require("
|
|
105
|
+
module.exports = require("prop-types");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
108
|
|
|
109
109
|
/***/ 10:
|
|
110
110
|
/***/ (function(module, exports) {
|
|
111
111
|
|
|
112
|
-
module.exports = require("@
|
|
112
|
+
module.exports = require("@splunk/visualizations-shared/Message");
|
|
113
113
|
|
|
114
114
|
/***/ }),
|
|
115
115
|
|
|
116
|
-
/***/
|
|
116
|
+
/***/ 102:
|
|
117
117
|
/***/ (function(module, exports, __webpack_require__) {
|
|
118
118
|
|
|
119
119
|
"use strict";
|
|
@@ -122,10 +122,149 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
122
122
|
Object.defineProperty(exports, "__esModule", {
|
|
123
123
|
value: true
|
|
124
124
|
});
|
|
125
|
+
exports.getDynamicFillColorEditor = void 0;
|
|
125
126
|
|
|
126
127
|
var i18n_1 = __webpack_require__(2);
|
|
127
128
|
|
|
128
|
-
var configUtils_1 = __webpack_require__(
|
|
129
|
+
var configUtils_1 = __webpack_require__(18);
|
|
130
|
+
|
|
131
|
+
var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
|
|
132
|
+
var defaultContext = _ref.defaultContext,
|
|
133
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
134
|
+
return {
|
|
135
|
+
label: i18n_1._('Dynamic Fill'),
|
|
136
|
+
option: 'fillColor',
|
|
137
|
+
context: 'fillColorEditorConfig',
|
|
138
|
+
editor: 'editor.dynamicColor',
|
|
139
|
+
showEditor: function showEditor(_ref2) {
|
|
140
|
+
var options = _ref2.options;
|
|
141
|
+
return configUtils_1.isDynamicOption(options.fillColor);
|
|
142
|
+
},
|
|
143
|
+
editorProps: {
|
|
144
|
+
labelPosition: 'left',
|
|
145
|
+
flyoutTitle: i18n_1._('Dynamic Coloring: Fill Color'),
|
|
146
|
+
formatters: [{
|
|
147
|
+
label: i18n_1._('Ranges'),
|
|
148
|
+
value: 'rangeValue',
|
|
149
|
+
defaults: {
|
|
150
|
+
fillDataValue: defaultContext.fillColorConfig
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
label: i18n_1._('Matches'),
|
|
154
|
+
value: 'matchValue',
|
|
155
|
+
defaults: {
|
|
156
|
+
fillDataValue: defaultContext.fillColorMatchConfig
|
|
157
|
+
}
|
|
158
|
+
}],
|
|
159
|
+
dataSelectors: [{
|
|
160
|
+
label: i18n_1._('Fill Color'),
|
|
161
|
+
value: 'fillDataValue'
|
|
162
|
+
}],
|
|
163
|
+
defaultPalettesConfig: defaultPalettesConfig
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
|
|
169
|
+
|
|
170
|
+
/***/ }),
|
|
171
|
+
|
|
172
|
+
/***/ 103:
|
|
173
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
174
|
+
|
|
175
|
+
"use strict";
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
Object.defineProperty(exports, "__esModule", {
|
|
179
|
+
value: true
|
|
180
|
+
});
|
|
181
|
+
exports.getDynamicStrokeColorEditor = void 0;
|
|
182
|
+
|
|
183
|
+
var i18n_1 = __webpack_require__(2);
|
|
184
|
+
|
|
185
|
+
var configUtils_1 = __webpack_require__(18);
|
|
186
|
+
|
|
187
|
+
var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
|
|
188
|
+
var defaultContext = _ref.defaultContext,
|
|
189
|
+
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
190
|
+
return {
|
|
191
|
+
label: i18n_1._('Dynamic Stroke'),
|
|
192
|
+
option: 'strokeColor',
|
|
193
|
+
context: 'strokeColorEditorConfig',
|
|
194
|
+
editor: 'editor.dynamicColor',
|
|
195
|
+
showEditor: function showEditor(_ref2) {
|
|
196
|
+
var options = _ref2.options;
|
|
197
|
+
return configUtils_1.isDynamicOption(options.strokeColor);
|
|
198
|
+
},
|
|
199
|
+
editorProps: {
|
|
200
|
+
labelPosition: 'left',
|
|
201
|
+
flyoutTitle: i18n_1._('Dynamic Coloring: Stroke Color'),
|
|
202
|
+
formatters: [{
|
|
203
|
+
label: i18n_1._('Ranges'),
|
|
204
|
+
value: 'rangeValue',
|
|
205
|
+
defaults: {
|
|
206
|
+
strokeDataValue: defaultContext.strokeColorConfig
|
|
207
|
+
}
|
|
208
|
+
}, {
|
|
209
|
+
label: i18n_1._('Matches'),
|
|
210
|
+
value: 'matchValue',
|
|
211
|
+
defaults: {
|
|
212
|
+
strokeDataValue: defaultContext.strokeColorMatchConfig
|
|
213
|
+
}
|
|
214
|
+
}],
|
|
215
|
+
dataSelectors: [{
|
|
216
|
+
label: i18n_1._('Stroke Color'),
|
|
217
|
+
value: 'strokeDataValue'
|
|
218
|
+
}],
|
|
219
|
+
defaultPalettesConfig: defaultPalettesConfig
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
225
|
+
|
|
226
|
+
/***/ }),
|
|
227
|
+
|
|
228
|
+
/***/ 104:
|
|
229
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
230
|
+
|
|
231
|
+
"use strict";
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
Object.defineProperty(exports, "__esModule", {
|
|
235
|
+
value: true
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
var i18n_1 = __webpack_require__(2);
|
|
239
|
+
|
|
240
|
+
var configUtils_1 = __webpack_require__(18);
|
|
241
|
+
|
|
242
|
+
var StaticFillColorEditor = {
|
|
243
|
+
label: i18n_1._('Static Fill'),
|
|
244
|
+
option: 'fillColor',
|
|
245
|
+
editor: 'editor.color',
|
|
246
|
+
showEditor: function showEditor(_ref) {
|
|
247
|
+
var options = _ref.options;
|
|
248
|
+
return !configUtils_1.isDynamicOption(options.fillColor);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
exports.default = StaticFillColorEditor;
|
|
252
|
+
|
|
253
|
+
/***/ }),
|
|
254
|
+
|
|
255
|
+
/***/ 105:
|
|
256
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
257
|
+
|
|
258
|
+
"use strict";
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
Object.defineProperty(exports, "__esModule", {
|
|
262
|
+
value: true
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
var i18n_1 = __webpack_require__(2);
|
|
266
|
+
|
|
267
|
+
var configUtils_1 = __webpack_require__(18);
|
|
129
268
|
|
|
130
269
|
var StaticStrokeColorEditor = {
|
|
131
270
|
label: i18n_1._('Static Stroke'),
|
|
@@ -140,7 +279,7 @@ exports.default = StaticStrokeColorEditor;
|
|
|
140
279
|
|
|
141
280
|
/***/ }),
|
|
142
281
|
|
|
143
|
-
/***/
|
|
282
|
+
/***/ 106:
|
|
144
283
|
/***/ (function(module, exports, __webpack_require__) {
|
|
145
284
|
|
|
146
285
|
"use strict";
|
|
@@ -157,9 +296,9 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
157
296
|
|
|
158
297
|
var pick_1 = __webpack_require__(21);
|
|
159
298
|
|
|
160
|
-
var variables_1 = __webpack_require__(
|
|
299
|
+
var variables_1 = __webpack_require__(9);
|
|
161
300
|
|
|
162
|
-
var propUtils_1 = __webpack_require__(
|
|
301
|
+
var propUtils_1 = __webpack_require__(24); // map for new options names to old option names
|
|
163
302
|
|
|
164
303
|
|
|
165
304
|
var shapeOptionsMapping = {
|
|
@@ -220,11 +359,18 @@ exports.getStyledShape = getStyledShape;
|
|
|
220
359
|
/***/ 11:
|
|
221
360
|
/***/ (function(module, exports) {
|
|
222
361
|
|
|
223
|
-
module.exports = require("@
|
|
362
|
+
module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
224
363
|
|
|
225
364
|
/***/ }),
|
|
226
365
|
|
|
227
366
|
/***/ 12:
|
|
367
|
+
/***/ (function(module, exports) {
|
|
368
|
+
|
|
369
|
+
module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
370
|
+
|
|
371
|
+
/***/ }),
|
|
372
|
+
|
|
373
|
+
/***/ 13:
|
|
228
374
|
/***/ (function(module, exports, __webpack_require__) {
|
|
229
375
|
|
|
230
376
|
"use strict";
|
|
@@ -234,15 +380,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
234
380
|
value: true
|
|
235
381
|
});
|
|
236
382
|
|
|
237
|
-
var React = __webpack_require__(
|
|
383
|
+
var React = __webpack_require__(0);
|
|
238
384
|
|
|
239
385
|
var styled_components_1 = __webpack_require__(4);
|
|
240
386
|
|
|
241
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
387
|
+
var SizeAwareWrapper_1 = __webpack_require__(20);
|
|
242
388
|
|
|
243
|
-
var style_1 = __webpack_require__(
|
|
389
|
+
var style_1 = __webpack_require__(15);
|
|
244
390
|
|
|
245
|
-
var colorUtils_1 = __webpack_require__(
|
|
391
|
+
var colorUtils_1 = __webpack_require__(12);
|
|
246
392
|
|
|
247
393
|
var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
248
394
|
var width = _ref.width;
|
|
@@ -299,7 +445,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
299
445
|
|
|
300
446
|
return React.createElement(FixSizeItem, {
|
|
301
447
|
"data-test": "fix-size-item",
|
|
302
|
-
"data-splunk-visualization-version": "25.
|
|
448
|
+
"data-splunk-visualization-version": "25.3.0 - dae70ec02",
|
|
303
449
|
width: width,
|
|
304
450
|
height: height,
|
|
305
451
|
backgroundColor: backgroundColor
|
|
@@ -321,7 +467,7 @@ exports.default = withFixedSizeContainer;
|
|
|
321
467
|
|
|
322
468
|
/***/ }),
|
|
323
469
|
|
|
324
|
-
/***/
|
|
470
|
+
/***/ 14:
|
|
325
471
|
/***/ (function(module, exports, __webpack_require__) {
|
|
326
472
|
|
|
327
473
|
"use strict";
|
|
@@ -354,7 +500,7 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
354
500
|
|
|
355
501
|
/***/ }),
|
|
356
502
|
|
|
357
|
-
/***/
|
|
503
|
+
/***/ 147:
|
|
358
504
|
/***/ (function(module, exports, __webpack_require__) {
|
|
359
505
|
|
|
360
506
|
"use strict";
|
|
@@ -378,21 +524,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
378
524
|
});
|
|
379
525
|
exports.config = exports.computeVizProps = void 0;
|
|
380
526
|
|
|
381
|
-
var React = __webpack_require__(
|
|
527
|
+
var React = __webpack_require__(0);
|
|
382
528
|
|
|
383
529
|
var styled_components_1 = __webpack_require__(4);
|
|
384
530
|
|
|
385
531
|
var lodash_1 = __webpack_require__(3);
|
|
386
532
|
|
|
387
|
-
var T = __webpack_require__(
|
|
533
|
+
var T = __webpack_require__(1);
|
|
388
534
|
|
|
389
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
535
|
+
var withDashboardViz_1 = __webpack_require__(32);
|
|
390
536
|
|
|
391
|
-
var config_1 = __webpack_require__(
|
|
537
|
+
var config_1 = __webpack_require__(435);
|
|
392
538
|
|
|
393
539
|
exports.config = config_1.default;
|
|
394
540
|
|
|
395
|
-
var shapeUtils_1 = __webpack_require__(
|
|
541
|
+
var shapeUtils_1 = __webpack_require__(106);
|
|
396
542
|
|
|
397
543
|
var SVGContainer = styled_components_1.default.svg.withConfig({
|
|
398
544
|
displayName: "Rectangle__SVGContainer",
|
|
@@ -466,29 +612,29 @@ exports.default = Rectangle;
|
|
|
466
612
|
|
|
467
613
|
/***/ }),
|
|
468
614
|
|
|
469
|
-
/***/
|
|
615
|
+
/***/ 15:
|
|
470
616
|
/***/ (function(module, exports) {
|
|
471
617
|
|
|
472
618
|
module.exports = require("@splunk/visualizations-shared/style");
|
|
473
619
|
|
|
474
620
|
/***/ }),
|
|
475
621
|
|
|
476
|
-
/***/
|
|
622
|
+
/***/ 16:
|
|
477
623
|
/***/ (function(module, exports) {
|
|
478
624
|
|
|
479
625
|
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
480
626
|
|
|
481
627
|
/***/ }),
|
|
482
628
|
|
|
483
|
-
/***/
|
|
629
|
+
/***/ 17:
|
|
484
630
|
/***/ (function(module, exports, __webpack_require__) {
|
|
485
631
|
|
|
486
632
|
"use strict";
|
|
487
633
|
|
|
488
634
|
|
|
489
|
-
var _toConsumableArray = __webpack_require__(
|
|
635
|
+
var _toConsumableArray = __webpack_require__(8);
|
|
490
636
|
|
|
491
|
-
var _defineProperty = __webpack_require__(
|
|
637
|
+
var _defineProperty = __webpack_require__(7);
|
|
492
638
|
|
|
493
639
|
var __rest = this && this.__rest || function (s, e) {
|
|
494
640
|
var t = {};
|
|
@@ -510,9 +656,9 @@ exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig
|
|
|
510
656
|
|
|
511
657
|
var lodash_1 = __webpack_require__(3);
|
|
512
658
|
|
|
513
|
-
var schemaUtils_1 = __webpack_require__(
|
|
659
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
514
660
|
|
|
515
|
-
var VizBehavior_1 = __webpack_require__(
|
|
661
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
516
662
|
|
|
517
663
|
var dynamicOptionsDSLType = {
|
|
518
664
|
type: 'string',
|
|
@@ -588,7 +734,7 @@ exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamic
|
|
|
588
734
|
*/
|
|
589
735
|
|
|
590
736
|
function enhanceConfig(vizConfig) {
|
|
591
|
-
var enhancedConfig = vizConfig;
|
|
737
|
+
var enhancedConfig = Object.assign({}, vizConfig);
|
|
592
738
|
|
|
593
739
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS) !== -1) {
|
|
594
740
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
@@ -596,7 +742,7 @@ function enhanceConfig(vizConfig) {
|
|
|
596
742
|
|
|
597
743
|
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
598
744
|
return Object.assign(Object.assign({}, config), {
|
|
599
|
-
open: false
|
|
745
|
+
open: config.open || false
|
|
600
746
|
});
|
|
601
747
|
});
|
|
602
748
|
return enhancedConfig;
|
|
@@ -611,7 +757,7 @@ exports.enhanceConfig = enhanceConfig;
|
|
|
611
757
|
*/
|
|
612
758
|
|
|
613
759
|
function uncollapseEditorConfig(vizConfig) {
|
|
614
|
-
var editorPanelUncollapsedConfig = vizConfig;
|
|
760
|
+
var editorPanelUncollapsedConfig = Object.assign({}, vizConfig);
|
|
615
761
|
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
616
762
|
return Object.assign(Object.assign({}, config), {
|
|
617
763
|
open: true
|
|
@@ -717,31 +863,31 @@ exports.insertLayout = insertLayout;
|
|
|
717
863
|
|
|
718
864
|
/***/ }),
|
|
719
865
|
|
|
720
|
-
/***/
|
|
866
|
+
/***/ 18:
|
|
721
867
|
/***/ (function(module, exports) {
|
|
722
868
|
|
|
723
869
|
module.exports = require("@splunk/visualizations-shared/configUtils");
|
|
724
870
|
|
|
725
871
|
/***/ }),
|
|
726
872
|
|
|
727
|
-
/***/
|
|
873
|
+
/***/ 19:
|
|
728
874
|
/***/ (function(module, exports) {
|
|
729
875
|
|
|
730
876
|
module.exports = require("@babel/runtime/helpers/createClass");
|
|
731
877
|
|
|
732
878
|
/***/ }),
|
|
733
879
|
|
|
734
|
-
/***/
|
|
880
|
+
/***/ 2:
|
|
735
881
|
/***/ (function(module, exports) {
|
|
736
882
|
|
|
737
|
-
module.exports = require("@splunk/
|
|
883
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
738
884
|
|
|
739
885
|
/***/ }),
|
|
740
886
|
|
|
741
|
-
/***/
|
|
887
|
+
/***/ 20:
|
|
742
888
|
/***/ (function(module, exports) {
|
|
743
889
|
|
|
744
|
-
module.exports = require("@splunk/
|
|
890
|
+
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
745
891
|
|
|
746
892
|
/***/ }),
|
|
747
893
|
|
|
@@ -752,71 +898,35 @@ module.exports = require("@splunk/themes/pick");
|
|
|
752
898
|
|
|
753
899
|
/***/ }),
|
|
754
900
|
|
|
755
|
-
/***/
|
|
901
|
+
/***/ 23:
|
|
756
902
|
/***/ (function(module, exports) {
|
|
757
903
|
|
|
758
904
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
759
905
|
|
|
760
906
|
/***/ }),
|
|
761
907
|
|
|
762
|
-
/***/
|
|
908
|
+
/***/ 24:
|
|
763
909
|
/***/ (function(module, exports) {
|
|
764
910
|
|
|
765
911
|
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
766
912
|
|
|
767
913
|
/***/ }),
|
|
768
914
|
|
|
769
|
-
/***/
|
|
915
|
+
/***/ 25:
|
|
770
916
|
/***/ (function(module, exports) {
|
|
771
917
|
|
|
772
918
|
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
773
919
|
|
|
774
920
|
/***/ }),
|
|
775
921
|
|
|
776
|
-
/***/
|
|
777
|
-
/***/ (function(module, exports
|
|
778
|
-
|
|
779
|
-
"use strict";
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
783
|
-
if (k2 === undefined) k2 = k;
|
|
784
|
-
Object.defineProperty(o, k2, {
|
|
785
|
-
enumerable: true,
|
|
786
|
-
get: function get() {
|
|
787
|
-
return m[k];
|
|
788
|
-
}
|
|
789
|
-
});
|
|
790
|
-
} : function (o, m, k, k2) {
|
|
791
|
-
if (k2 === undefined) k2 = k;
|
|
792
|
-
o[k2] = m[k];
|
|
793
|
-
});
|
|
794
|
-
|
|
795
|
-
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
796
|
-
for (var p in m) {
|
|
797
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
|
-
|
|
801
|
-
Object.defineProperty(exports, "__esModule", {
|
|
802
|
-
value: true
|
|
803
|
-
});
|
|
804
|
-
exports.default = void 0;
|
|
805
|
-
|
|
806
|
-
__exportStar(__webpack_require__(137), exports);
|
|
807
|
-
|
|
808
|
-
var Rectangle_1 = __webpack_require__(137);
|
|
922
|
+
/***/ 26:
|
|
923
|
+
/***/ (function(module, exports) {
|
|
809
924
|
|
|
810
|
-
|
|
811
|
-
enumerable: true,
|
|
812
|
-
get: function get() {
|
|
813
|
-
return Rectangle_1.default;
|
|
814
|
-
}
|
|
815
|
-
});
|
|
925
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
816
926
|
|
|
817
927
|
/***/ }),
|
|
818
928
|
|
|
819
|
-
/***/
|
|
929
|
+
/***/ 27:
|
|
820
930
|
/***/ (function(module, exports, __webpack_require__) {
|
|
821
931
|
|
|
822
932
|
"use strict";
|
|
@@ -825,412 +935,56 @@ Object.defineProperty(exports, "default", {
|
|
|
825
935
|
Object.defineProperty(exports, "__esModule", {
|
|
826
936
|
value: true
|
|
827
937
|
});
|
|
828
|
-
exports.
|
|
829
|
-
|
|
830
|
-
var visualization_icons_1 = __webpack_require__(46);
|
|
831
|
-
|
|
832
|
-
var schemaUtils_1 = __webpack_require__(15);
|
|
938
|
+
exports.shouldShowIconPlaceholder = void 0;
|
|
833
939
|
|
|
834
|
-
var
|
|
940
|
+
var React = __webpack_require__(0);
|
|
835
941
|
|
|
836
|
-
var
|
|
942
|
+
var T = __webpack_require__(1);
|
|
837
943
|
|
|
838
|
-
var
|
|
944
|
+
var lodash_1 = __webpack_require__(3);
|
|
839
945
|
|
|
840
|
-
var
|
|
946
|
+
var i18n_1 = __webpack_require__(2);
|
|
841
947
|
|
|
842
|
-
var
|
|
948
|
+
var Message_1 = __webpack_require__(10);
|
|
843
949
|
|
|
844
|
-
var
|
|
950
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
951
|
+
/**
|
|
952
|
+
* @method shouldShowIconPlaceholder
|
|
953
|
+
* @param {object} dataSources
|
|
954
|
+
* @param {boolean} loading
|
|
955
|
+
* @returns {boolean}
|
|
956
|
+
*/
|
|
845
957
|
|
|
846
|
-
var DynamicFillColorEditor_1 = __webpack_require__(97);
|
|
847
958
|
|
|
848
|
-
var
|
|
959
|
+
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
960
|
+
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
961
|
+
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
962
|
+
var noData = data === undefined;
|
|
963
|
+
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
964
|
+
var noFields = fields === undefined;
|
|
965
|
+
return loading || noData || noFields;
|
|
966
|
+
};
|
|
849
967
|
|
|
850
|
-
|
|
968
|
+
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
969
|
+
var propTypes = {
|
|
970
|
+
icon: T.func,
|
|
971
|
+
width: T.oneOfType([T.string, T.number]),
|
|
972
|
+
height: T.oneOfType([T.string, T.number]),
|
|
973
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
974
|
+
backgroundColor: T.string,
|
|
975
|
+
iconColor: T.string
|
|
976
|
+
};
|
|
977
|
+
/**
|
|
978
|
+
* @method IconPlaceholder
|
|
979
|
+
* @param {IconPlaceholderProps} props
|
|
980
|
+
* @returns {React.ReactElement}
|
|
981
|
+
*/
|
|
851
982
|
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
name: 'primary',
|
|
858
|
-
description: 'DataSource that powers the visualization'
|
|
859
|
-
}],
|
|
860
|
-
initialRequestParams: {
|
|
861
|
-
primary: {
|
|
862
|
-
offset: 0,
|
|
863
|
-
count: 10000
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
};
|
|
867
|
-
var size = {
|
|
868
|
-
initialWidth: 300,
|
|
869
|
-
initialHeight: 300
|
|
870
|
-
};
|
|
871
|
-
var defaultContext = {
|
|
872
|
-
fillColorConfig: [{
|
|
873
|
-
from: 100,
|
|
874
|
-
value: '#088F44'
|
|
875
|
-
}, {
|
|
876
|
-
from: 80,
|
|
877
|
-
to: 100,
|
|
878
|
-
value: '#2EB82E'
|
|
879
|
-
}, {
|
|
880
|
-
from: 60,
|
|
881
|
-
to: 80,
|
|
882
|
-
value: '#C3CC33'
|
|
883
|
-
}, {
|
|
884
|
-
from: 40,
|
|
885
|
-
to: 60,
|
|
886
|
-
value: '#FFD442'
|
|
887
|
-
}, {
|
|
888
|
-
from: 20,
|
|
889
|
-
to: 40,
|
|
890
|
-
value: '#FFA857'
|
|
891
|
-
}, {
|
|
892
|
-
from: 0,
|
|
893
|
-
to: 20,
|
|
894
|
-
value: '#FF7149'
|
|
895
|
-
}, {
|
|
896
|
-
to: 0,
|
|
897
|
-
value: '#FE3A3A'
|
|
898
|
-
}],
|
|
899
|
-
strokeColorConfig: [{
|
|
900
|
-
from: 100,
|
|
901
|
-
value: '#088F44'
|
|
902
|
-
}, {
|
|
903
|
-
from: 80,
|
|
904
|
-
to: 100,
|
|
905
|
-
value: '#2EB82E'
|
|
906
|
-
}, {
|
|
907
|
-
from: 60,
|
|
908
|
-
to: 80,
|
|
909
|
-
value: '#C3CC33'
|
|
910
|
-
}, {
|
|
911
|
-
from: 40,
|
|
912
|
-
to: 60,
|
|
913
|
-
value: '#FFD442'
|
|
914
|
-
}, {
|
|
915
|
-
from: 20,
|
|
916
|
-
to: 40,
|
|
917
|
-
value: '#FFA857'
|
|
918
|
-
}, {
|
|
919
|
-
from: 0,
|
|
920
|
-
to: 20,
|
|
921
|
-
value: '#FF7149'
|
|
922
|
-
}, {
|
|
923
|
-
to: 0,
|
|
924
|
-
value: '#FE3A3A'
|
|
925
|
-
}],
|
|
926
|
-
fillColorMatchConfig: [{
|
|
927
|
-
match: '',
|
|
928
|
-
value: '#5C33FF'
|
|
929
|
-
}],
|
|
930
|
-
strokeColorMatchConfig: [{
|
|
931
|
-
match: '',
|
|
932
|
-
value: '#5C33FF'
|
|
933
|
-
}]
|
|
934
|
-
};
|
|
935
|
-
exports.optionsSchema = {
|
|
936
|
-
fillColor: {
|
|
937
|
-
default: '> themes.defaultFillColor',
|
|
938
|
-
description: 'Specify the fill color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#C3CBD4". The default for enterprise dark mode is "#31373E". The default for prisma dark mode is "#0B0C0E".',
|
|
939
|
-
type: 'string'
|
|
940
|
-
},
|
|
941
|
-
fillOpacity: {
|
|
942
|
-
description: 'Specify the opacity of the fill. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
|
|
943
|
-
type: 'number',
|
|
944
|
-
default: 1
|
|
945
|
-
},
|
|
946
|
-
rx: {
|
|
947
|
-
description: 'Specify the curvature of the horizontal corner (or border) radius with an integer or a percent greater than or equal to zero.',
|
|
948
|
-
type: 'number',
|
|
949
|
-
default: 0
|
|
950
|
-
},
|
|
951
|
-
ry: {
|
|
952
|
-
description: 'Specify the curvature of the vertical corner (or border) radius with an integer or a percent greater than or equal to zero.',
|
|
953
|
-
type: 'number',
|
|
954
|
-
default: '> rx'
|
|
955
|
-
},
|
|
956
|
-
strokeColor: {
|
|
957
|
-
default: '> themes.defaultStrokeColor',
|
|
958
|
-
description: 'Specify the stroke color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#3C444D". The default for enterprise dark mode is "#C3CBD4". The default for prisma dark mode is "#ACACAD".',
|
|
959
|
-
type: 'string'
|
|
960
|
-
},
|
|
961
|
-
strokeDashStyle: {
|
|
962
|
-
description: 'Specify the size, in pixels, of dashes and spaces used to create a custom stitched outline. The value you specify applies to both the dashes and the spaces between them.',
|
|
963
|
-
type: 'number',
|
|
964
|
-
default: 0
|
|
965
|
-
},
|
|
966
|
-
strokeJoinStyle: {
|
|
967
|
-
description: 'Specifies the shape to be used at the corners of paths when they are joined.',
|
|
968
|
-
type: 'string',
|
|
969
|
-
default: 'miter',
|
|
970
|
-
pattern: schemaUtils_1.getPattern(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
|
|
971
|
-
},
|
|
972
|
-
strokeOpacity: {
|
|
973
|
-
description: 'Specify the opacity of the stroke. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
|
|
974
|
-
type: 'number',
|
|
975
|
-
default: 1
|
|
976
|
-
},
|
|
977
|
-
strokeWidth: {
|
|
978
|
-
description: 'Specify the width of the stroke, in pixels, in the range of 1 - 25 (inclusive).',
|
|
979
|
-
type: 'number',
|
|
980
|
-
default: 1
|
|
981
|
-
}
|
|
982
|
-
};
|
|
983
|
-
var themes = {
|
|
984
|
-
defaultFillColor: function defaultFillColor(props) {
|
|
985
|
-
return themes_1.pick({
|
|
986
|
-
enterprise: {
|
|
987
|
-
dark: themes_1.variables.gray25(props),
|
|
988
|
-
light: themes_1.variables.gray80(props)
|
|
989
|
-
},
|
|
990
|
-
prisma: themes_1.variables.backgroundColorSidebar(props)
|
|
991
|
-
})(props);
|
|
992
|
-
},
|
|
993
|
-
defaultStrokeColor: function defaultStrokeColor(props) {
|
|
994
|
-
return themes_1.pick({
|
|
995
|
-
enterprise: {
|
|
996
|
-
dark: themes_1.variables.gray80(props),
|
|
997
|
-
light: themes_1.variables.gray30(props)
|
|
998
|
-
},
|
|
999
|
-
prisma: themes_1.variables.neutral500(props)
|
|
1000
|
-
})(props);
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
var basePresetContext = {
|
|
1004
|
-
fillColorEditorConfig: undefined,
|
|
1005
|
-
strokeColorEditorConfig: undefined
|
|
1006
|
-
};
|
|
1007
|
-
var basePresetOptions = {
|
|
1008
|
-
fillColor: undefined,
|
|
1009
|
-
strokeColor: undefined
|
|
1010
|
-
};
|
|
1011
|
-
var presets = [{
|
|
1012
|
-
// dummy context variables to allow for resetting of unused context states
|
|
1013
|
-
label: i18n_1._('None'),
|
|
1014
|
-
name: 'rectangle.none',
|
|
1015
|
-
value: {
|
|
1016
|
-
context: Object.assign({}, basePresetContext),
|
|
1017
|
-
options: Object.assign({}, basePresetOptions)
|
|
1018
|
-
}
|
|
1019
|
-
}, {
|
|
1020
|
-
label: i18n_1._('Fill'),
|
|
1021
|
-
name: 'rectangle.fill',
|
|
1022
|
-
value: {
|
|
1023
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
1024
|
-
fillDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
1025
|
-
fillColorEditorConfig: defaultContext.fillColorConfig
|
|
1026
|
-
}),
|
|
1027
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
1028
|
-
fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)'
|
|
1029
|
-
})
|
|
1030
|
-
}
|
|
1031
|
-
}, {
|
|
1032
|
-
label: i18n_1._('Stroke'),
|
|
1033
|
-
name: 'rectangle.stroke',
|
|
1034
|
-
value: {
|
|
1035
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
1036
|
-
strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
1037
|
-
strokeColorEditorConfig: defaultContext.strokeColorConfig
|
|
1038
|
-
}),
|
|
1039
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
1040
|
-
strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
|
|
1041
|
-
})
|
|
1042
|
-
}
|
|
1043
|
-
}, {
|
|
1044
|
-
label: i18n_1._('Fill & Stroke'),
|
|
1045
|
-
name: 'rectangle.fillAndStroke',
|
|
1046
|
-
value: {
|
|
1047
|
-
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
1048
|
-
fillDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
1049
|
-
strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
1050
|
-
fillColorEditorConfig: defaultContext.fillColorConfig,
|
|
1051
|
-
strokeColorEditorConfig: defaultContext.strokeColorConfig
|
|
1052
|
-
}),
|
|
1053
|
-
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
1054
|
-
fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)',
|
|
1055
|
-
strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
|
|
1056
|
-
})
|
|
1057
|
-
}
|
|
1058
|
-
}];
|
|
1059
|
-
var editorConfig = [{
|
|
1060
|
-
label: i18n_1._('General'),
|
|
1061
|
-
layout: [[{
|
|
1062
|
-
label: i18n_1._('Fill Opacity (%)'),
|
|
1063
|
-
option: 'fillOpacity',
|
|
1064
|
-
editor: 'editor.percent',
|
|
1065
|
-
editorProps: {
|
|
1066
|
-
min: 0
|
|
1067
|
-
}
|
|
1068
|
-
}, {
|
|
1069
|
-
label: i18n_1._('Stroke Opacity (%)'),
|
|
1070
|
-
option: 'strokeOpacity',
|
|
1071
|
-
editor: 'editor.percent',
|
|
1072
|
-
editorProps: {
|
|
1073
|
-
min: 0
|
|
1074
|
-
}
|
|
1075
|
-
}], [{
|
|
1076
|
-
label: i18n_1._('Stroke Width'),
|
|
1077
|
-
option: 'strokeWidth',
|
|
1078
|
-
editor: 'editor.number',
|
|
1079
|
-
editorProps: {
|
|
1080
|
-
min: 0
|
|
1081
|
-
}
|
|
1082
|
-
}, {
|
|
1083
|
-
label: i18n_1._('Stroke Dash Style'),
|
|
1084
|
-
option: 'strokeDashStyle',
|
|
1085
|
-
editor: 'editor.number',
|
|
1086
|
-
editorProps: {
|
|
1087
|
-
min: 0
|
|
1088
|
-
}
|
|
1089
|
-
}], [{
|
|
1090
|
-
label: i18n_1._('Radius (px)'),
|
|
1091
|
-
option: 'rx',
|
|
1092
|
-
editor: 'editor.number',
|
|
1093
|
-
editorProps: {
|
|
1094
|
-
min: 0
|
|
1095
|
-
}
|
|
1096
|
-
}, {}]]
|
|
1097
|
-
}, {
|
|
1098
|
-
label: i18n_1._('Coloring'),
|
|
1099
|
-
layout: [[{
|
|
1100
|
-
label: 'Dynamic Elements',
|
|
1101
|
-
key: 'presetSelector',
|
|
1102
|
-
editor: 'editor.presetSelector',
|
|
1103
|
-
editorProps: {
|
|
1104
|
-
presets: presets,
|
|
1105
|
-
value: function value(_ref) {
|
|
1106
|
-
var context = _ref.context,
|
|
1107
|
-
options = _ref.options;
|
|
1108
|
-
var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
|
|
1109
|
-
return initialPreset && initialPreset.label || null;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
}], [Object.assign(Object.assign({}, StaticFillColorEditor_1.default), {
|
|
1113
|
-
editorProps: {
|
|
1114
|
-
labelPosition: 'left',
|
|
1115
|
-
themes: themes
|
|
1116
|
-
}
|
|
1117
|
-
})], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
|
|
1118
|
-
defaultContext: defaultContext,
|
|
1119
|
-
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
1120
|
-
})], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
|
|
1121
|
-
editorProps: {
|
|
1122
|
-
labelPosition: 'left',
|
|
1123
|
-
themes: themes
|
|
1124
|
-
}
|
|
1125
|
-
})], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
|
|
1126
|
-
defaultContext: defaultContext,
|
|
1127
|
-
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
1128
|
-
})]]
|
|
1129
|
-
}];
|
|
1130
|
-
/**
|
|
1131
|
-
* visualization configuration
|
|
1132
|
-
*/
|
|
1133
|
-
|
|
1134
|
-
var config = {
|
|
1135
|
-
/**
|
|
1136
|
-
* unique viz key
|
|
1137
|
-
*/
|
|
1138
|
-
key: 'splunk.rectangle',
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* viz name
|
|
1142
|
-
*/
|
|
1143
|
-
name: 'Rectangle',
|
|
1144
|
-
category: VizCategory_1.VizCategory.SHAPES,
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* viz icon
|
|
1148
|
-
*/
|
|
1149
|
-
icon: visualization_icons_1.Rectangle,
|
|
1150
|
-
dataContract: dataContract,
|
|
1151
|
-
size: size,
|
|
1152
|
-
defaultContext: defaultContext,
|
|
1153
|
-
optionsSchema: exports.optionsSchema,
|
|
1154
|
-
editorConfig: editorConfig,
|
|
1155
|
-
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
|
|
1156
|
-
themes: themes,
|
|
1157
|
-
events: {
|
|
1158
|
-
'rectangle.click': {
|
|
1159
|
-
description: 'trigger when user clicks rectangle',
|
|
1160
|
-
payloadKeys: ['strokeColor', 'fillColor']
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
};
|
|
1164
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
1165
|
-
|
|
1166
|
-
/***/ }),
|
|
1167
|
-
|
|
1168
|
-
/***/ 25:
|
|
1169
|
-
/***/ (function(module, exports) {
|
|
1170
|
-
|
|
1171
|
-
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
1172
|
-
|
|
1173
|
-
/***/ }),
|
|
1174
|
-
|
|
1175
|
-
/***/ 27:
|
|
1176
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1177
|
-
|
|
1178
|
-
"use strict";
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1182
|
-
value: true
|
|
1183
|
-
});
|
|
1184
|
-
exports.shouldShowIconPlaceholder = void 0;
|
|
1185
|
-
|
|
1186
|
-
var React = __webpack_require__(1);
|
|
1187
|
-
|
|
1188
|
-
var T = __webpack_require__(0);
|
|
1189
|
-
|
|
1190
|
-
var lodash_1 = __webpack_require__(3);
|
|
1191
|
-
|
|
1192
|
-
var i18n_1 = __webpack_require__(2);
|
|
1193
|
-
|
|
1194
|
-
var Message_1 = __webpack_require__(9);
|
|
1195
|
-
|
|
1196
|
-
var FixedSizeContainer_1 = __webpack_require__(12);
|
|
1197
|
-
/**
|
|
1198
|
-
* @method shouldShowIconPlaceholder
|
|
1199
|
-
* @param {object} dataSources
|
|
1200
|
-
* @param {boolean} loading
|
|
1201
|
-
* @returns {boolean}
|
|
1202
|
-
*/
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
1206
|
-
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1207
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
1208
|
-
var noData = data === undefined;
|
|
1209
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
1210
|
-
var noFields = fields === undefined;
|
|
1211
|
-
return loading || noData || noFields;
|
|
1212
|
-
};
|
|
1213
|
-
|
|
1214
|
-
exports.shouldShowIconPlaceholder = shouldShowIconPlaceholder;
|
|
1215
|
-
var propTypes = {
|
|
1216
|
-
icon: T.func,
|
|
1217
|
-
width: T.oneOfType([T.string, T.number]),
|
|
1218
|
-
height: T.oneOfType([T.string, T.number]),
|
|
1219
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
1220
|
-
backgroundColor: T.string,
|
|
1221
|
-
iconColor: T.string
|
|
1222
|
-
};
|
|
1223
|
-
/**
|
|
1224
|
-
* @method IconPlaceholder
|
|
1225
|
-
* @param {IconPlaceholderProps} props
|
|
1226
|
-
* @returns {React.ReactElement}
|
|
1227
|
-
*/
|
|
1228
|
-
|
|
1229
|
-
var IconPlaceholder = function IconPlaceholder(props) {
|
|
1230
|
-
var width = props.width,
|
|
1231
|
-
height = props.height,
|
|
1232
|
-
icon = props.icon,
|
|
1233
|
-
iconColor = props.iconColor;
|
|
983
|
+
var IconPlaceholder = function IconPlaceholder(props) {
|
|
984
|
+
var width = props.width,
|
|
985
|
+
height = props.height,
|
|
986
|
+
icon = props.icon,
|
|
987
|
+
iconColor = props.iconColor;
|
|
1234
988
|
|
|
1235
989
|
if (icon) {
|
|
1236
990
|
return React.createElement(icon, {
|
|
@@ -1270,18 +1024,18 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
|
1270
1024
|
"use strict";
|
|
1271
1025
|
|
|
1272
1026
|
|
|
1273
|
-
var _defineProperty = __webpack_require__(
|
|
1027
|
+
var _defineProperty = __webpack_require__(7);
|
|
1274
1028
|
|
|
1275
1029
|
Object.defineProperty(exports, "__esModule", {
|
|
1276
1030
|
value: true
|
|
1277
1031
|
});
|
|
1278
1032
|
exports.getSortingParams = exports.SortParamsPropTypes = void 0;
|
|
1279
1033
|
|
|
1280
|
-
var T = __webpack_require__(
|
|
1034
|
+
var T = __webpack_require__(1);
|
|
1281
1035
|
|
|
1282
1036
|
var lodash_1 = __webpack_require__(3);
|
|
1283
1037
|
|
|
1284
|
-
var DataSource_1 = __webpack_require__(
|
|
1038
|
+
var DataSource_1 = __webpack_require__(39);
|
|
1285
1039
|
|
|
1286
1040
|
exports.SortParamsPropTypes = T.shape({
|
|
1287
1041
|
currentSortKey: T.string,
|
|
@@ -1346,7 +1100,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1346
1100
|
});
|
|
1347
1101
|
exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
|
|
1348
1102
|
|
|
1349
|
-
var T = __webpack_require__(
|
|
1103
|
+
var T = __webpack_require__(1);
|
|
1350
1104
|
|
|
1351
1105
|
var lodash_1 = __webpack_require__(3);
|
|
1352
1106
|
|
|
@@ -1407,7 +1161,7 @@ module.exports = require("lodash");
|
|
|
1407
1161
|
|
|
1408
1162
|
/***/ }),
|
|
1409
1163
|
|
|
1410
|
-
/***/
|
|
1164
|
+
/***/ 31:
|
|
1411
1165
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1412
1166
|
|
|
1413
1167
|
"use strict";
|
|
@@ -1436,7 +1190,7 @@ var VizCategory;
|
|
|
1436
1190
|
|
|
1437
1191
|
/***/ }),
|
|
1438
1192
|
|
|
1439
|
-
/***/
|
|
1193
|
+
/***/ 32:
|
|
1440
1194
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1441
1195
|
|
|
1442
1196
|
"use strict";
|
|
@@ -1446,41 +1200,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1446
1200
|
value: true
|
|
1447
1201
|
});
|
|
1448
1202
|
|
|
1449
|
-
var React = __webpack_require__(
|
|
1203
|
+
var React = __webpack_require__(0);
|
|
1450
1204
|
|
|
1451
1205
|
var lodash_1 = __webpack_require__(3);
|
|
1452
1206
|
|
|
1453
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
1207
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(33);
|
|
1454
1208
|
|
|
1455
|
-
var Options_1 = __webpack_require__(
|
|
1209
|
+
var Options_1 = __webpack_require__(34);
|
|
1456
1210
|
|
|
1457
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
1211
|
+
var SanitizeProps_1 = __webpack_require__(35);
|
|
1458
1212
|
|
|
1459
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
1213
|
+
var TimezoneContext_1 = __webpack_require__(23);
|
|
1460
1214
|
|
|
1461
|
-
var moment_1 = __webpack_require__(
|
|
1215
|
+
var moment_1 = __webpack_require__(36);
|
|
1462
1216
|
|
|
1463
1217
|
var styled_components_1 = __webpack_require__(4);
|
|
1464
1218
|
|
|
1465
|
-
var hocUtils_1 = __webpack_require__(
|
|
1219
|
+
var hocUtils_1 = __webpack_require__(25);
|
|
1466
1220
|
|
|
1467
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
1221
|
+
var JSONSchemaUtils_1 = __webpack_require__(26);
|
|
1468
1222
|
|
|
1469
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
1223
|
+
var SplunkVisualization_1 = __webpack_require__(37);
|
|
1470
1224
|
|
|
1471
|
-
var VizBehavior_1 = __webpack_require__(
|
|
1225
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
1472
1226
|
|
|
1473
1227
|
var getSorting_1 = __webpack_require__(28);
|
|
1474
1228
|
|
|
1475
1229
|
var getPagination_1 = __webpack_require__(29);
|
|
1476
1230
|
|
|
1477
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
1231
|
+
var useDeepMemo_1 = __webpack_require__(40);
|
|
1478
1232
|
|
|
1479
|
-
var MissingPropsMessage_1 = __webpack_require__(
|
|
1233
|
+
var MissingPropsMessage_1 = __webpack_require__(41);
|
|
1480
1234
|
|
|
1481
|
-
var withEditModeCover_1 = __webpack_require__(
|
|
1235
|
+
var withEditModeCover_1 = __webpack_require__(42);
|
|
1482
1236
|
|
|
1483
|
-
var withPlaceholder_1 = __webpack_require__(
|
|
1237
|
+
var withPlaceholder_1 = __webpack_require__(43);
|
|
1484
1238
|
/**
|
|
1485
1239
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1486
1240
|
* @param {DashboardVizOpts} opts
|
|
@@ -1682,41 +1436,41 @@ exports.default = withDashboardViz;
|
|
|
1682
1436
|
|
|
1683
1437
|
/***/ }),
|
|
1684
1438
|
|
|
1685
|
-
/***/
|
|
1439
|
+
/***/ 33:
|
|
1686
1440
|
/***/ (function(module, exports) {
|
|
1687
1441
|
|
|
1688
1442
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1689
1443
|
|
|
1690
1444
|
/***/ }),
|
|
1691
1445
|
|
|
1692
|
-
/***/
|
|
1446
|
+
/***/ 34:
|
|
1693
1447
|
/***/ (function(module, exports) {
|
|
1694
1448
|
|
|
1695
1449
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1696
1450
|
|
|
1697
1451
|
/***/ }),
|
|
1698
1452
|
|
|
1699
|
-
/***/
|
|
1453
|
+
/***/ 35:
|
|
1700
1454
|
/***/ (function(module, exports) {
|
|
1701
1455
|
|
|
1702
1456
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1703
1457
|
|
|
1704
1458
|
/***/ }),
|
|
1705
1459
|
|
|
1706
|
-
/***/
|
|
1460
|
+
/***/ 36:
|
|
1707
1461
|
/***/ (function(module, exports) {
|
|
1708
1462
|
|
|
1709
1463
|
module.exports = require("@splunk/moment");
|
|
1710
1464
|
|
|
1711
1465
|
/***/ }),
|
|
1712
1466
|
|
|
1713
|
-
/***/
|
|
1467
|
+
/***/ 37:
|
|
1714
1468
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1715
1469
|
|
|
1716
1470
|
"use strict";
|
|
1717
1471
|
|
|
1718
1472
|
|
|
1719
|
-
var _classCallCheck = __webpack_require__(
|
|
1473
|
+
var _classCallCheck = __webpack_require__(11);
|
|
1720
1474
|
|
|
1721
1475
|
Object.defineProperty(exports, "__esModule", {
|
|
1722
1476
|
value: true
|
|
@@ -1724,11 +1478,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1724
1478
|
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1725
1479
|
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1726
1480
|
|
|
1727
|
-
var T = __webpack_require__(
|
|
1481
|
+
var T = __webpack_require__(1);
|
|
1728
1482
|
|
|
1729
1483
|
var lodash_1 = __webpack_require__(3);
|
|
1730
1484
|
|
|
1731
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1485
|
+
var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1732
1486
|
|
|
1733
1487
|
|
|
1734
1488
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1862,15 +1616,15 @@ exports.default = SplunkVisualization;
|
|
|
1862
1616
|
|
|
1863
1617
|
/***/ }),
|
|
1864
1618
|
|
|
1865
|
-
/***/
|
|
1619
|
+
/***/ 38:
|
|
1866
1620
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1867
1621
|
|
|
1868
1622
|
"use strict";
|
|
1869
1623
|
|
|
1870
1624
|
|
|
1871
|
-
var _classCallCheck = __webpack_require__(
|
|
1625
|
+
var _classCallCheck = __webpack_require__(11);
|
|
1872
1626
|
|
|
1873
|
-
var _createClass = __webpack_require__(
|
|
1627
|
+
var _createClass = __webpack_require__(19);
|
|
1874
1628
|
|
|
1875
1629
|
Object.defineProperty(exports, "__esModule", {
|
|
1876
1630
|
value: true
|
|
@@ -1900,7 +1654,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
|
1900
1654
|
|
|
1901
1655
|
/***/ }),
|
|
1902
1656
|
|
|
1903
|
-
/***/
|
|
1657
|
+
/***/ 39:
|
|
1904
1658
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1905
1659
|
|
|
1906
1660
|
"use strict";
|
|
@@ -1914,7 +1668,14 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
|
1914
1668
|
|
|
1915
1669
|
/***/ }),
|
|
1916
1670
|
|
|
1917
|
-
/***/
|
|
1671
|
+
/***/ 4:
|
|
1672
|
+
/***/ (function(module, exports) {
|
|
1673
|
+
|
|
1674
|
+
module.exports = require("styled-components");
|
|
1675
|
+
|
|
1676
|
+
/***/ }),
|
|
1677
|
+
|
|
1678
|
+
/***/ 40:
|
|
1918
1679
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1919
1680
|
|
|
1920
1681
|
"use strict";
|
|
@@ -1925,7 +1686,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1925
1686
|
});
|
|
1926
1687
|
exports.useDeepMemo = void 0;
|
|
1927
1688
|
|
|
1928
|
-
var react_1 = __webpack_require__(
|
|
1689
|
+
var react_1 = __webpack_require__(0);
|
|
1929
1690
|
|
|
1930
1691
|
var lodash_1 = __webpack_require__(3);
|
|
1931
1692
|
/**
|
|
@@ -1960,14 +1721,7 @@ exports.useDeepMemo = useDeepMemo;
|
|
|
1960
1721
|
|
|
1961
1722
|
/***/ }),
|
|
1962
1723
|
|
|
1963
|
-
/***/
|
|
1964
|
-
/***/ (function(module, exports) {
|
|
1965
|
-
|
|
1966
|
-
module.exports = require("styled-components");
|
|
1967
|
-
|
|
1968
|
-
/***/ }),
|
|
1969
|
-
|
|
1970
|
-
/***/ 40:
|
|
1724
|
+
/***/ 41:
|
|
1971
1725
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1972
1726
|
|
|
1973
1727
|
"use strict";
|
|
@@ -1978,15 +1732,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1978
1732
|
});
|
|
1979
1733
|
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1980
1734
|
|
|
1981
|
-
var React = __webpack_require__(
|
|
1735
|
+
var React = __webpack_require__(0);
|
|
1982
1736
|
|
|
1983
|
-
var T = __webpack_require__(
|
|
1737
|
+
var T = __webpack_require__(1);
|
|
1984
1738
|
|
|
1985
1739
|
var i18n_1 = __webpack_require__(2);
|
|
1986
1740
|
|
|
1987
|
-
var Message_1 = __webpack_require__(
|
|
1741
|
+
var Message_1 = __webpack_require__(10);
|
|
1988
1742
|
|
|
1989
|
-
var FixedSizeContainer_1 = __webpack_require__(
|
|
1743
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1990
1744
|
/**
|
|
1991
1745
|
* @method isMissing
|
|
1992
1746
|
* @param {any} v
|
|
@@ -2048,7 +1802,7 @@ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
|
2048
1802
|
|
|
2049
1803
|
/***/ }),
|
|
2050
1804
|
|
|
2051
|
-
/***/
|
|
1805
|
+
/***/ 42:
|
|
2052
1806
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2053
1807
|
|
|
2054
1808
|
"use strict";
|
|
@@ -2058,18 +1812,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2058
1812
|
value: true
|
|
2059
1813
|
});
|
|
2060
1814
|
|
|
2061
|
-
var React = __webpack_require__(
|
|
1815
|
+
var React = __webpack_require__(0);
|
|
2062
1816
|
|
|
2063
1817
|
var styled_components_1 = __webpack_require__(4);
|
|
2064
1818
|
|
|
2065
|
-
var hocUtils_1 = __webpack_require__(
|
|
1819
|
+
var hocUtils_1 = __webpack_require__(14);
|
|
2066
1820
|
|
|
2067
1821
|
var Cover = styled_components_1.default.div.withConfig({
|
|
2068
1822
|
displayName: "withEditModeCover__Cover",
|
|
2069
1823
|
componentId: "sc-1gsbnxb-0"
|
|
2070
1824
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
2071
1825
|
var Blocker = styled_components_1.default.div.attrs({
|
|
2072
|
-
'data-splunk-visualization-version': "25.
|
|
1826
|
+
'data-splunk-visualization-version': "25.3.0 - dae70ec02"
|
|
2073
1827
|
}).withConfig({
|
|
2074
1828
|
displayName: "withEditModeCover__Blocker",
|
|
2075
1829
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -2101,7 +1855,115 @@ exports.default = withEditModeCover;
|
|
|
2101
1855
|
|
|
2102
1856
|
/***/ }),
|
|
2103
1857
|
|
|
2104
|
-
/***/
|
|
1858
|
+
/***/ 43:
|
|
1859
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1860
|
+
|
|
1861
|
+
"use strict";
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1865
|
+
value: true
|
|
1866
|
+
});
|
|
1867
|
+
|
|
1868
|
+
var React = __webpack_require__(0);
|
|
1869
|
+
|
|
1870
|
+
var colorUtils_1 = __webpack_require__(12);
|
|
1871
|
+
|
|
1872
|
+
var variables_1 = __webpack_require__(9);
|
|
1873
|
+
|
|
1874
|
+
var IconPlaceholder_1 = __webpack_require__(27);
|
|
1875
|
+
|
|
1876
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
1877
|
+
|
|
1878
|
+
var hocUtils_1 = __webpack_require__(14);
|
|
1879
|
+
|
|
1880
|
+
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
1881
|
+
var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
|
|
1882
|
+
var config = Visualization.config;
|
|
1883
|
+
var themes = config.themes;
|
|
1884
|
+
|
|
1885
|
+
var Wrapper = function Wrapper(props) {
|
|
1886
|
+
var _a, _b;
|
|
1887
|
+
|
|
1888
|
+
var dataSources = props.dataSources,
|
|
1889
|
+
loading = props.loading,
|
|
1890
|
+
options = props.options,
|
|
1891
|
+
height = props.height,
|
|
1892
|
+
width = props.width;
|
|
1893
|
+
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1894
|
+
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
1895
|
+
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1896
|
+
var iconColor = variables_1.default.contentColorActive(props);
|
|
1897
|
+
|
|
1898
|
+
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
1899
|
+
return React.createElement(IconPlaceholder_1.default, {
|
|
1900
|
+
"data-test": "icon-placeholder",
|
|
1901
|
+
icon: icon,
|
|
1902
|
+
width: width,
|
|
1903
|
+
height: height,
|
|
1904
|
+
backgroundColor: bgColorFromTheme,
|
|
1905
|
+
iconColor: iconColor
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
return React.createElement(Visualization, Object.assign({}, props));
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1912
|
+
hocUtils_1.extendStaticWrapperProps({
|
|
1913
|
+
Wrapper: Wrapper,
|
|
1914
|
+
Visualization: Visualization
|
|
1915
|
+
});
|
|
1916
|
+
return Wrapper;
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
exports.default = withPlaceholder;
|
|
1920
|
+
|
|
1921
|
+
/***/ }),
|
|
1922
|
+
|
|
1923
|
+
/***/ 434:
|
|
1924
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1925
|
+
|
|
1926
|
+
"use strict";
|
|
1927
|
+
|
|
1928
|
+
|
|
1929
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
1930
|
+
if (k2 === undefined) k2 = k;
|
|
1931
|
+
Object.defineProperty(o, k2, {
|
|
1932
|
+
enumerable: true,
|
|
1933
|
+
get: function get() {
|
|
1934
|
+
return m[k];
|
|
1935
|
+
}
|
|
1936
|
+
});
|
|
1937
|
+
} : function (o, m, k, k2) {
|
|
1938
|
+
if (k2 === undefined) k2 = k;
|
|
1939
|
+
o[k2] = m[k];
|
|
1940
|
+
});
|
|
1941
|
+
|
|
1942
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
1943
|
+
for (var p in m) {
|
|
1944
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1945
|
+
}
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1949
|
+
value: true
|
|
1950
|
+
});
|
|
1951
|
+
exports.default = void 0;
|
|
1952
|
+
|
|
1953
|
+
__exportStar(__webpack_require__(147), exports);
|
|
1954
|
+
|
|
1955
|
+
var Rectangle_1 = __webpack_require__(147);
|
|
1956
|
+
|
|
1957
|
+
Object.defineProperty(exports, "default", {
|
|
1958
|
+
enumerable: true,
|
|
1959
|
+
get: function get() {
|
|
1960
|
+
return Rectangle_1.default;
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
|
|
1964
|
+
/***/ }),
|
|
1965
|
+
|
|
1966
|
+
/***/ 435:
|
|
2105
1967
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2106
1968
|
|
|
2107
1969
|
"use strict";
|
|
@@ -2110,70 +1972,361 @@ exports.default = withEditModeCover;
|
|
|
2110
1972
|
Object.defineProperty(exports, "__esModule", {
|
|
2111
1973
|
value: true
|
|
2112
1974
|
});
|
|
1975
|
+
exports.optionsSchema = void 0;
|
|
2113
1976
|
|
|
2114
|
-
var
|
|
1977
|
+
var visualization_icons_1 = __webpack_require__(47);
|
|
2115
1978
|
|
|
2116
|
-
var
|
|
1979
|
+
var schemaUtils_1 = __webpack_require__(16);
|
|
2117
1980
|
|
|
2118
|
-
var
|
|
1981
|
+
var i18n_1 = __webpack_require__(2);
|
|
2119
1982
|
|
|
2120
|
-
var
|
|
1983
|
+
var PresetPalettes_1 = __webpack_require__(54);
|
|
2121
1984
|
|
|
2122
|
-
var
|
|
1985
|
+
var themes_1 = __webpack_require__(69);
|
|
2123
1986
|
|
|
2124
|
-
var
|
|
1987
|
+
var VizBehavior_1 = __webpack_require__(6);
|
|
2125
1988
|
|
|
2126
|
-
var
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
1989
|
+
var VizCategory_1 = __webpack_require__(31);
|
|
1990
|
+
|
|
1991
|
+
var configUtils_1 = __webpack_require__(17);
|
|
1992
|
+
|
|
1993
|
+
var DynamicFillColorEditor_1 = __webpack_require__(102);
|
|
1994
|
+
|
|
1995
|
+
var DynamicStrokeColorEditor_1 = __webpack_require__(103);
|
|
1996
|
+
|
|
1997
|
+
var StaticFillColorEditor_1 = __webpack_require__(104);
|
|
1998
|
+
|
|
1999
|
+
var StaticStrokeColorEditor_1 = __webpack_require__(105);
|
|
2000
|
+
|
|
2001
|
+
var dataContract = {
|
|
2002
|
+
requiredDataSources: [],
|
|
2003
|
+
optionalDataSources: [{
|
|
2004
|
+
name: 'primary',
|
|
2005
|
+
description: 'DataSource that powers the visualization'
|
|
2006
|
+
}],
|
|
2007
|
+
initialRequestParams: {
|
|
2008
|
+
primary: {
|
|
2009
|
+
offset: 0,
|
|
2010
|
+
count: 10000
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
};
|
|
2014
|
+
var size = {
|
|
2015
|
+
initialWidth: 300,
|
|
2016
|
+
initialHeight: 300
|
|
2017
|
+
};
|
|
2018
|
+
var defaultContext = {
|
|
2019
|
+
fillColorConfig: [{
|
|
2020
|
+
from: 100,
|
|
2021
|
+
value: '#088F44'
|
|
2022
|
+
}, {
|
|
2023
|
+
from: 80,
|
|
2024
|
+
to: 100,
|
|
2025
|
+
value: '#2EB82E'
|
|
2026
|
+
}, {
|
|
2027
|
+
from: 60,
|
|
2028
|
+
to: 80,
|
|
2029
|
+
value: '#C3CC33'
|
|
2030
|
+
}, {
|
|
2031
|
+
from: 40,
|
|
2032
|
+
to: 60,
|
|
2033
|
+
value: '#FFD442'
|
|
2034
|
+
}, {
|
|
2035
|
+
from: 20,
|
|
2036
|
+
to: 40,
|
|
2037
|
+
value: '#FFA857'
|
|
2038
|
+
}, {
|
|
2039
|
+
from: 0,
|
|
2040
|
+
to: 20,
|
|
2041
|
+
value: '#FF7149'
|
|
2042
|
+
}, {
|
|
2043
|
+
to: 0,
|
|
2044
|
+
value: '#FE3A3A'
|
|
2045
|
+
}],
|
|
2046
|
+
strokeColorConfig: [{
|
|
2047
|
+
from: 100,
|
|
2048
|
+
value: '#088F44'
|
|
2049
|
+
}, {
|
|
2050
|
+
from: 80,
|
|
2051
|
+
to: 100,
|
|
2052
|
+
value: '#2EB82E'
|
|
2053
|
+
}, {
|
|
2054
|
+
from: 60,
|
|
2055
|
+
to: 80,
|
|
2056
|
+
value: '#C3CC33'
|
|
2057
|
+
}, {
|
|
2058
|
+
from: 40,
|
|
2059
|
+
to: 60,
|
|
2060
|
+
value: '#FFD442'
|
|
2061
|
+
}, {
|
|
2062
|
+
from: 20,
|
|
2063
|
+
to: 40,
|
|
2064
|
+
value: '#FFA857'
|
|
2065
|
+
}, {
|
|
2066
|
+
from: 0,
|
|
2067
|
+
to: 20,
|
|
2068
|
+
value: '#FF7149'
|
|
2069
|
+
}, {
|
|
2070
|
+
to: 0,
|
|
2071
|
+
value: '#FE3A3A'
|
|
2072
|
+
}],
|
|
2073
|
+
fillColorMatchConfig: [{
|
|
2074
|
+
match: '',
|
|
2075
|
+
value: '#5C33FF'
|
|
2076
|
+
}],
|
|
2077
|
+
strokeColorMatchConfig: [{
|
|
2078
|
+
match: '',
|
|
2079
|
+
value: '#5C33FF'
|
|
2080
|
+
}]
|
|
2081
|
+
};
|
|
2082
|
+
exports.optionsSchema = {
|
|
2083
|
+
fillColor: {
|
|
2084
|
+
default: '> themes.defaultFillColor',
|
|
2085
|
+
description: 'Specify the fill color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#C3CBD4". The default for enterprise dark mode is "#31373E". The default for prisma dark mode is "#0B0C0E".',
|
|
2086
|
+
type: 'string'
|
|
2087
|
+
},
|
|
2088
|
+
fillOpacity: {
|
|
2089
|
+
description: 'Specify the opacity of the fill. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
|
|
2090
|
+
type: 'number',
|
|
2091
|
+
default: 1
|
|
2092
|
+
},
|
|
2093
|
+
rx: {
|
|
2094
|
+
description: 'Specify the curvature of the horizontal corner (or border) radius with an integer or a percent greater than or equal to zero.',
|
|
2095
|
+
type: 'number',
|
|
2096
|
+
default: 0
|
|
2097
|
+
},
|
|
2098
|
+
ry: {
|
|
2099
|
+
description: 'Specify the curvature of the vertical corner (or border) radius with an integer or a percent greater than or equal to zero.',
|
|
2100
|
+
type: 'number',
|
|
2101
|
+
default: '> rx'
|
|
2102
|
+
},
|
|
2103
|
+
strokeColor: {
|
|
2104
|
+
default: '> themes.defaultStrokeColor',
|
|
2105
|
+
description: 'Specify the stroke color. You may use a dataSource to apply the color. The hex value format should be "#FFFFFF". The default for enterprise light mode is "#3C444D". The default for enterprise dark mode is "#C3CBD4". The default for prisma dark mode is "#ACACAD".',
|
|
2106
|
+
type: 'string'
|
|
2107
|
+
},
|
|
2108
|
+
strokeDashStyle: {
|
|
2109
|
+
description: 'Specify the size, in pixels, of dashes and spaces used to create a custom stitched outline. The value you specify applies to both the dashes and the spaces between them.',
|
|
2110
|
+
type: 'number',
|
|
2111
|
+
default: 0
|
|
2112
|
+
},
|
|
2113
|
+
strokeJoinStyle: {
|
|
2114
|
+
description: 'Specifies the shape to be used at the corners of paths when they are joined.',
|
|
2115
|
+
type: 'string',
|
|
2116
|
+
default: 'miter',
|
|
2117
|
+
pattern: schemaUtils_1.getPattern(['arcs', 'bevel', 'miter', 'miter-clip', 'round'])
|
|
2118
|
+
},
|
|
2119
|
+
strokeOpacity: {
|
|
2120
|
+
description: 'Specify the opacity of the stroke. Choose a number in the range of 0 - 1 (inclusive). You can also express the value as a percentage. For example, "0.80" in source or "80%" in UI.',
|
|
2121
|
+
type: 'number',
|
|
2122
|
+
default: 1
|
|
2123
|
+
},
|
|
2124
|
+
strokeWidth: {
|
|
2125
|
+
description: 'Specify the width of the stroke, in pixels, in the range of 1 - 25 (inclusive).',
|
|
2126
|
+
type: 'number',
|
|
2127
|
+
default: 1
|
|
2128
|
+
}
|
|
2129
|
+
};
|
|
2130
|
+
var themes = {
|
|
2131
|
+
defaultFillColor: function defaultFillColor(props) {
|
|
2132
|
+
return themes_1.pick({
|
|
2133
|
+
enterprise: {
|
|
2134
|
+
dark: themes_1.variables.gray25(props),
|
|
2135
|
+
light: themes_1.variables.gray80(props)
|
|
2136
|
+
},
|
|
2137
|
+
prisma: themes_1.variables.backgroundColorSidebar(props)
|
|
2138
|
+
})(props);
|
|
2139
|
+
},
|
|
2140
|
+
defaultStrokeColor: function defaultStrokeColor(props) {
|
|
2141
|
+
return themes_1.pick({
|
|
2142
|
+
enterprise: {
|
|
2143
|
+
dark: themes_1.variables.gray80(props),
|
|
2144
|
+
light: themes_1.variables.gray30(props)
|
|
2145
|
+
},
|
|
2146
|
+
prisma: themes_1.variables.neutral500(props)
|
|
2147
|
+
})(props);
|
|
2148
|
+
}
|
|
2149
|
+
};
|
|
2150
|
+
var basePresetContext = {
|
|
2151
|
+
fillColorEditorConfig: undefined,
|
|
2152
|
+
strokeColorEditorConfig: undefined
|
|
2153
|
+
};
|
|
2154
|
+
var basePresetOptions = {
|
|
2155
|
+
fillColor: undefined,
|
|
2156
|
+
strokeColor: undefined
|
|
2157
|
+
};
|
|
2158
|
+
var presets = [{
|
|
2159
|
+
// dummy context variables to allow for resetting of unused context states
|
|
2160
|
+
label: i18n_1._('None'),
|
|
2161
|
+
name: 'rectangle.none',
|
|
2162
|
+
value: {
|
|
2163
|
+
context: Object.assign({}, basePresetContext),
|
|
2164
|
+
options: Object.assign({}, basePresetOptions)
|
|
2165
|
+
}
|
|
2166
|
+
}, {
|
|
2167
|
+
label: i18n_1._('Fill'),
|
|
2168
|
+
name: 'rectangle.fill',
|
|
2169
|
+
value: {
|
|
2170
|
+
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
2171
|
+
fillDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
2172
|
+
fillColorEditorConfig: defaultContext.fillColorConfig
|
|
2173
|
+
}),
|
|
2174
|
+
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
2175
|
+
fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)'
|
|
2176
|
+
})
|
|
2177
|
+
}
|
|
2178
|
+
}, {
|
|
2179
|
+
label: i18n_1._('Stroke'),
|
|
2180
|
+
name: 'rectangle.stroke',
|
|
2181
|
+
value: {
|
|
2182
|
+
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
2183
|
+
strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
2184
|
+
strokeColorEditorConfig: defaultContext.strokeColorConfig
|
|
2185
|
+
}),
|
|
2186
|
+
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
2187
|
+
strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
|
|
2188
|
+
})
|
|
2189
|
+
}
|
|
2190
|
+
}, {
|
|
2191
|
+
label: i18n_1._('Fill & Stroke'),
|
|
2192
|
+
name: 'rectangle.fillAndStroke',
|
|
2193
|
+
value: {
|
|
2194
|
+
context: Object.assign(Object.assign({}, basePresetContext), {
|
|
2195
|
+
fillDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
2196
|
+
strokeDataValue: '> primary | seriesByType("number") | lastPoint()',
|
|
2197
|
+
fillColorEditorConfig: defaultContext.fillColorConfig,
|
|
2198
|
+
strokeColorEditorConfig: defaultContext.strokeColorConfig
|
|
2199
|
+
}),
|
|
2200
|
+
options: Object.assign(Object.assign({}, basePresetOptions), {
|
|
2201
|
+
fillColor: '> fillDataValue | rangeValue(fillColorEditorConfig)',
|
|
2202
|
+
strokeColor: '> strokeDataValue | rangeValue(strokeColorEditorConfig)'
|
|
2203
|
+
})
|
|
2204
|
+
}
|
|
2205
|
+
}];
|
|
2206
|
+
var editorConfig = [{
|
|
2207
|
+
label: i18n_1._('General'),
|
|
2208
|
+
layout: [[{
|
|
2209
|
+
label: i18n_1._('Fill Opacity (%)'),
|
|
2210
|
+
option: 'fillOpacity',
|
|
2211
|
+
editor: 'editor.percent',
|
|
2212
|
+
editorProps: {
|
|
2213
|
+
min: 0
|
|
2214
|
+
}
|
|
2215
|
+
}, {
|
|
2216
|
+
label: i18n_1._('Stroke Opacity (%)'),
|
|
2217
|
+
option: 'strokeOpacity',
|
|
2218
|
+
editor: 'editor.percent',
|
|
2219
|
+
editorProps: {
|
|
2220
|
+
min: 0
|
|
2221
|
+
}
|
|
2222
|
+
}], [{
|
|
2223
|
+
label: i18n_1._('Stroke Width'),
|
|
2224
|
+
option: 'strokeWidth',
|
|
2225
|
+
editor: 'editor.number',
|
|
2226
|
+
editorProps: {
|
|
2227
|
+
min: 0
|
|
2228
|
+
}
|
|
2229
|
+
}, {
|
|
2230
|
+
label: i18n_1._('Stroke Dash Style'),
|
|
2231
|
+
option: 'strokeDashStyle',
|
|
2232
|
+
editor: 'editor.number',
|
|
2233
|
+
editorProps: {
|
|
2234
|
+
min: 0
|
|
2235
|
+
}
|
|
2236
|
+
}], [{
|
|
2237
|
+
label: i18n_1._('Radius (px)'),
|
|
2238
|
+
option: 'rx',
|
|
2239
|
+
editor: 'editor.number',
|
|
2240
|
+
editorProps: {
|
|
2241
|
+
min: 0
|
|
2242
|
+
}
|
|
2243
|
+
}, {}]]
|
|
2244
|
+
}, {
|
|
2245
|
+
label: i18n_1._('Coloring'),
|
|
2246
|
+
layout: [[{
|
|
2247
|
+
label: 'Dynamic Elements',
|
|
2248
|
+
key: 'presetSelector',
|
|
2249
|
+
editor: 'editor.presetSelector',
|
|
2250
|
+
editorProps: {
|
|
2251
|
+
presets: presets,
|
|
2252
|
+
value: function value(_ref) {
|
|
2253
|
+
var context = _ref.context,
|
|
2254
|
+
options = _ref.options;
|
|
2255
|
+
var initialPreset = configUtils_1.getInitialPreset(context, options, presets);
|
|
2256
|
+
return initialPreset && initialPreset.label || null;
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
}], [Object.assign(Object.assign({}, StaticFillColorEditor_1.default), {
|
|
2260
|
+
editorProps: {
|
|
2261
|
+
labelPosition: 'left',
|
|
2262
|
+
themes: themes
|
|
2263
|
+
}
|
|
2264
|
+
})], [DynamicFillColorEditor_1.getDynamicFillColorEditor({
|
|
2265
|
+
defaultContext: defaultContext,
|
|
2266
|
+
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
2267
|
+
})], [Object.assign(Object.assign({}, StaticStrokeColorEditor_1.default), {
|
|
2268
|
+
editorProps: {
|
|
2269
|
+
labelPosition: 'left',
|
|
2270
|
+
themes: themes
|
|
2271
|
+
}
|
|
2272
|
+
})], [DynamicStrokeColorEditor_1.getDynamicStrokeColorEditor({
|
|
2273
|
+
defaultContext: defaultContext,
|
|
2274
|
+
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
2275
|
+
})]]
|
|
2276
|
+
}];
|
|
2277
|
+
/**
|
|
2278
|
+
* visualization configuration
|
|
2279
|
+
*/
|
|
2130
2280
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2281
|
+
var config = {
|
|
2282
|
+
/**
|
|
2283
|
+
* unique viz key
|
|
2284
|
+
*/
|
|
2285
|
+
key: 'splunk.rectangle',
|
|
2133
2286
|
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
2140
|
-
var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
|
|
2141
|
-
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
2142
|
-
var iconColor = variables_1.default.contentColorActive(props);
|
|
2287
|
+
/**
|
|
2288
|
+
* viz name
|
|
2289
|
+
*/
|
|
2290
|
+
name: 'Rectangle',
|
|
2291
|
+
category: VizCategory_1.VizCategory.SHAPES,
|
|
2143
2292
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2293
|
+
/**
|
|
2294
|
+
* viz icon
|
|
2295
|
+
*/
|
|
2296
|
+
icon: visualization_icons_1.Rectangle,
|
|
2297
|
+
dataContract: dataContract,
|
|
2298
|
+
size: size,
|
|
2299
|
+
defaultContext: defaultContext,
|
|
2300
|
+
optionsSchema: exports.optionsSchema,
|
|
2301
|
+
editorConfig: editorConfig,
|
|
2302
|
+
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS],
|
|
2303
|
+
themes: themes,
|
|
2304
|
+
events: {
|
|
2305
|
+
'rectangle.click': {
|
|
2306
|
+
description: 'trigger when user clicks rectangle',
|
|
2307
|
+
payloadKeys: ['strokeColor', 'fillColor']
|
|
2153
2308
|
}
|
|
2309
|
+
}
|
|
2310
|
+
};
|
|
2311
|
+
exports.default = configUtils_1.enhanceConfig(config);
|
|
2154
2312
|
|
|
2155
|
-
|
|
2156
|
-
};
|
|
2313
|
+
/***/ }),
|
|
2157
2314
|
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
Visualization: Visualization
|
|
2161
|
-
});
|
|
2162
|
-
return Wrapper;
|
|
2163
|
-
};
|
|
2315
|
+
/***/ 47:
|
|
2316
|
+
/***/ (function(module, exports) {
|
|
2164
2317
|
|
|
2165
|
-
exports
|
|
2318
|
+
module.exports = require("@splunk/visualization-icons");
|
|
2166
2319
|
|
|
2167
2320
|
/***/ }),
|
|
2168
2321
|
|
|
2169
|
-
/***/
|
|
2322
|
+
/***/ 54:
|
|
2170
2323
|
/***/ (function(module, exports) {
|
|
2171
2324
|
|
|
2172
|
-
module.exports = require("@splunk/visualization-
|
|
2325
|
+
module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
|
|
2173
2326
|
|
|
2174
2327
|
/***/ }),
|
|
2175
2328
|
|
|
2176
|
-
/***/
|
|
2329
|
+
/***/ 6:
|
|
2177
2330
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2178
2331
|
|
|
2179
2332
|
"use strict";
|
|
@@ -2211,20 +2364,6 @@ var VizBehavior;
|
|
|
2211
2364
|
|
|
2212
2365
|
/***/ }),
|
|
2213
2366
|
|
|
2214
|
-
/***/ 53:
|
|
2215
|
-
/***/ (function(module, exports) {
|
|
2216
|
-
|
|
2217
|
-
module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
|
|
2218
|
-
|
|
2219
|
-
/***/ }),
|
|
2220
|
-
|
|
2221
|
-
/***/ 6:
|
|
2222
|
-
/***/ (function(module, exports) {
|
|
2223
|
-
|
|
2224
|
-
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
2225
|
-
|
|
2226
|
-
/***/ }),
|
|
2227
|
-
|
|
2228
2367
|
/***/ 69:
|
|
2229
2368
|
/***/ (function(module, exports) {
|
|
2230
2369
|
|
|
@@ -2235,160 +2374,21 @@ module.exports = require("@splunk/themes");
|
|
|
2235
2374
|
/***/ 7:
|
|
2236
2375
|
/***/ (function(module, exports) {
|
|
2237
2376
|
|
|
2238
|
-
module.exports = require("@babel/runtime/helpers/
|
|
2377
|
+
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
2239
2378
|
|
|
2240
2379
|
/***/ }),
|
|
2241
2380
|
|
|
2242
2381
|
/***/ 8:
|
|
2243
2382
|
/***/ (function(module, exports) {
|
|
2244
2383
|
|
|
2245
|
-
module.exports = require("@
|
|
2384
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
2246
2385
|
|
|
2247
2386
|
/***/ }),
|
|
2248
2387
|
|
|
2249
2388
|
/***/ 9:
|
|
2250
2389
|
/***/ (function(module, exports) {
|
|
2251
2390
|
|
|
2252
|
-
module.exports = require("@splunk/
|
|
2253
|
-
|
|
2254
|
-
/***/ }),
|
|
2255
|
-
|
|
2256
|
-
/***/ 97:
|
|
2257
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2258
|
-
|
|
2259
|
-
"use strict";
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2263
|
-
value: true
|
|
2264
|
-
});
|
|
2265
|
-
exports.getDynamicFillColorEditor = void 0;
|
|
2266
|
-
|
|
2267
|
-
var i18n_1 = __webpack_require__(2);
|
|
2268
|
-
|
|
2269
|
-
var configUtils_1 = __webpack_require__(17);
|
|
2270
|
-
|
|
2271
|
-
var getDynamicFillColorEditor = function getDynamicFillColorEditor(_ref) {
|
|
2272
|
-
var defaultContext = _ref.defaultContext,
|
|
2273
|
-
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
2274
|
-
return {
|
|
2275
|
-
label: i18n_1._('Dynamic Fill'),
|
|
2276
|
-
option: 'fillColor',
|
|
2277
|
-
context: 'fillColorEditorConfig',
|
|
2278
|
-
editor: 'editor.dynamicColor',
|
|
2279
|
-
showEditor: function showEditor(_ref2) {
|
|
2280
|
-
var options = _ref2.options;
|
|
2281
|
-
return configUtils_1.isDynamicOption(options.fillColor);
|
|
2282
|
-
},
|
|
2283
|
-
editorProps: {
|
|
2284
|
-
labelPosition: 'left',
|
|
2285
|
-
flyoutTitle: i18n_1._('Dynamic Coloring: Fill Color'),
|
|
2286
|
-
formatters: [{
|
|
2287
|
-
label: i18n_1._('Ranges'),
|
|
2288
|
-
value: 'rangeValue',
|
|
2289
|
-
defaults: {
|
|
2290
|
-
fillDataValue: defaultContext.fillColorConfig
|
|
2291
|
-
}
|
|
2292
|
-
}, {
|
|
2293
|
-
label: i18n_1._('Matches'),
|
|
2294
|
-
value: 'matchValue',
|
|
2295
|
-
defaults: {
|
|
2296
|
-
fillDataValue: defaultContext.fillColorMatchConfig
|
|
2297
|
-
}
|
|
2298
|
-
}],
|
|
2299
|
-
dataSelectors: [{
|
|
2300
|
-
label: i18n_1._('Fill Color'),
|
|
2301
|
-
value: 'fillDataValue'
|
|
2302
|
-
}],
|
|
2303
|
-
defaultPalettesConfig: defaultPalettesConfig
|
|
2304
|
-
}
|
|
2305
|
-
};
|
|
2306
|
-
};
|
|
2307
|
-
|
|
2308
|
-
exports.getDynamicFillColorEditor = getDynamicFillColorEditor;
|
|
2309
|
-
|
|
2310
|
-
/***/ }),
|
|
2311
|
-
|
|
2312
|
-
/***/ 98:
|
|
2313
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2314
|
-
|
|
2315
|
-
"use strict";
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2319
|
-
value: true
|
|
2320
|
-
});
|
|
2321
|
-
exports.getDynamicStrokeColorEditor = void 0;
|
|
2322
|
-
|
|
2323
|
-
var i18n_1 = __webpack_require__(2);
|
|
2324
|
-
|
|
2325
|
-
var configUtils_1 = __webpack_require__(17);
|
|
2326
|
-
|
|
2327
|
-
var getDynamicStrokeColorEditor = function getDynamicStrokeColorEditor(_ref) {
|
|
2328
|
-
var defaultContext = _ref.defaultContext,
|
|
2329
|
-
defaultPalettesConfig = _ref.defaultPalettesConfig;
|
|
2330
|
-
return {
|
|
2331
|
-
label: i18n_1._('Dynamic Stroke'),
|
|
2332
|
-
option: 'strokeColor',
|
|
2333
|
-
context: 'strokeColorEditorConfig',
|
|
2334
|
-
editor: 'editor.dynamicColor',
|
|
2335
|
-
showEditor: function showEditor(_ref2) {
|
|
2336
|
-
var options = _ref2.options;
|
|
2337
|
-
return configUtils_1.isDynamicOption(options.strokeColor);
|
|
2338
|
-
},
|
|
2339
|
-
editorProps: {
|
|
2340
|
-
labelPosition: 'left',
|
|
2341
|
-
flyoutTitle: i18n_1._('Dynamic Coloring: Stroke Color'),
|
|
2342
|
-
formatters: [{
|
|
2343
|
-
label: i18n_1._('Ranges'),
|
|
2344
|
-
value: 'rangeValue',
|
|
2345
|
-
defaults: {
|
|
2346
|
-
strokeDataValue: defaultContext.strokeColorConfig
|
|
2347
|
-
}
|
|
2348
|
-
}, {
|
|
2349
|
-
label: i18n_1._('Matches'),
|
|
2350
|
-
value: 'matchValue',
|
|
2351
|
-
defaults: {
|
|
2352
|
-
strokeDataValue: defaultContext.strokeColorMatchConfig
|
|
2353
|
-
}
|
|
2354
|
-
}],
|
|
2355
|
-
dataSelectors: [{
|
|
2356
|
-
label: i18n_1._('Stroke Color'),
|
|
2357
|
-
value: 'strokeDataValue'
|
|
2358
|
-
}],
|
|
2359
|
-
defaultPalettesConfig: defaultPalettesConfig
|
|
2360
|
-
}
|
|
2361
|
-
};
|
|
2362
|
-
};
|
|
2363
|
-
|
|
2364
|
-
exports.getDynamicStrokeColorEditor = getDynamicStrokeColorEditor;
|
|
2365
|
-
|
|
2366
|
-
/***/ }),
|
|
2367
|
-
|
|
2368
|
-
/***/ 99:
|
|
2369
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2370
|
-
|
|
2371
|
-
"use strict";
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2375
|
-
value: true
|
|
2376
|
-
});
|
|
2377
|
-
|
|
2378
|
-
var i18n_1 = __webpack_require__(2);
|
|
2379
|
-
|
|
2380
|
-
var configUtils_1 = __webpack_require__(17);
|
|
2381
|
-
|
|
2382
|
-
var StaticFillColorEditor = {
|
|
2383
|
-
label: i18n_1._('Static Fill'),
|
|
2384
|
-
option: 'fillColor',
|
|
2385
|
-
editor: 'editor.color',
|
|
2386
|
-
showEditor: function showEditor(_ref) {
|
|
2387
|
-
var options = _ref.options;
|
|
2388
|
-
return !configUtils_1.isDynamicOption(options.fillColor);
|
|
2389
|
-
}
|
|
2390
|
-
};
|
|
2391
|
-
exports.default = StaticFillColorEditor;
|
|
2391
|
+
module.exports = require("@splunk/themes/variables");
|
|
2392
2392
|
|
|
2393
2393
|
/***/ })
|
|
2394
2394
|
|