@splunk/visualizations 25.5.0 → 25.6.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_TimeControlsPopover_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_DarkPrisma.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Light.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_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/Area.js +226 -143
- package/Area.js.map +1 -1
- package/Bar.js +226 -143
- package/Bar.js.map +1 -1
- package/Bubble.js +218 -135
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.js +217 -139
- package/ChoroplethSvg.js.map +1 -1
- package/Column.js +226 -143
- package/Column.js.map +1 -1
- package/Ellipse.js +188 -105
- package/Ellipse.js.map +1 -1
- package/Events.config.js +3 -0
- package/Events.config.js.map +1 -1
- package/Events.js +967 -267
- package/Events.js.map +1 -1
- package/FillerGauge.js +214 -126
- package/FillerGauge.js.map +1 -1
- package/Image.js +210 -125
- package/Image.js.map +1 -1
- package/Line.js +231 -143
- package/Line.js.map +1 -1
- package/LinkGraph.js +601 -524
- package/LinkGraph.js.map +1 -1
- package/Map.js +484 -406
- package/Map.js.map +1 -1
- package/Markdown.js +295 -210
- package/Markdown.js.map +1 -1
- package/MarkerGauge.js +388 -310
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.js +469 -391
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.js +428 -343
- package/Pie.js.map +1 -1
- package/Punchcard.js +480 -402
- package/Punchcard.js.map +1 -1
- package/Rectangle.js +437 -352
- package/Rectangle.js.map +1 -1
- package/Sankey.js +497 -419
- package/Sankey.js.map +1 -1
- package/Scatter.js +361 -276
- package/Scatter.js.map +1 -1
- package/SingleValue.js +386 -301
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +23 -23
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.js +385 -300
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +319 -234
- package/SingleValueRadial.js.map +1 -1
- package/Table.js +309 -231
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +3 -3
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeValueMarker.js +2 -2
- package/common/OptionsDoc.js +14 -14
- package/common/OptionsDoc.js.map +1 -1
- package/common/ThemesDoc.js +10 -10
- package/common/ThemesDoc.js.map +1 -1
- package/common/withDashboardViz.js +122 -42
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +13 -11
package/Pie.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 = 429);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -141,7 +141,7 @@ var React = __webpack_require__(1);
|
|
|
141
141
|
|
|
142
142
|
var styled_components_1 = __webpack_require__(4);
|
|
143
143
|
|
|
144
|
-
var SizeAwareWrapper_1 = __webpack_require__(
|
|
144
|
+
var SizeAwareWrapper_1 = __webpack_require__(21);
|
|
145
145
|
|
|
146
146
|
var style_1 = __webpack_require__(15);
|
|
147
147
|
|
|
@@ -202,7 +202,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
202
202
|
|
|
203
203
|
return React.createElement(FixSizeItem, {
|
|
204
204
|
"data-test": "fix-size-item",
|
|
205
|
-
"data-splunk-visualization-version": "25.
|
|
205
|
+
"data-splunk-visualization-version": "25.6.0 - f5eb3abf9",
|
|
206
206
|
width: width,
|
|
207
207
|
height: height,
|
|
208
208
|
backgroundColor: backgroundColor
|
|
@@ -257,7 +257,14 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
257
257
|
|
|
258
258
|
/***/ }),
|
|
259
259
|
|
|
260
|
-
/***/
|
|
260
|
+
/***/ 15:
|
|
261
|
+
/***/ (function(module, exports) {
|
|
262
|
+
|
|
263
|
+
module.exports = require("@splunk/visualizations-shared/style");
|
|
264
|
+
|
|
265
|
+
/***/ }),
|
|
266
|
+
|
|
267
|
+
/***/ 153:
|
|
261
268
|
/***/ (function(module, exports, __webpack_require__) {
|
|
262
269
|
|
|
263
270
|
"use strict";
|
|
@@ -285,23 +292,23 @@ var lodash_1 = __webpack_require__(3); // Charting imports i18n which needs to b
|
|
|
285
292
|
// eslint-disable-next-line import/order
|
|
286
293
|
|
|
287
294
|
|
|
288
|
-
var Charting_1 = __webpack_require__(
|
|
295
|
+
var Charting_1 = __webpack_require__(59);
|
|
289
296
|
|
|
290
|
-
var charting_bundle_1 = __webpack_require__(
|
|
297
|
+
var charting_bundle_1 = __webpack_require__(56);
|
|
291
298
|
|
|
292
|
-
var simpleXMLOptions_1 = __webpack_require__(
|
|
299
|
+
var simpleXMLOptions_1 = __webpack_require__(65);
|
|
293
300
|
|
|
294
|
-
var config_1 = __webpack_require__(
|
|
301
|
+
var config_1 = __webpack_require__(430);
|
|
295
302
|
|
|
296
303
|
exports.config = config_1.default;
|
|
297
304
|
|
|
298
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
305
|
+
var withDashboardViz_1 = __webpack_require__(35);
|
|
299
306
|
|
|
300
|
-
var pieUtils_1 = __webpack_require__(
|
|
307
|
+
var pieUtils_1 = __webpack_require__(432);
|
|
301
308
|
|
|
302
|
-
var chartingUtils_1 = __webpack_require__(
|
|
309
|
+
var chartingUtils_1 = __webpack_require__(55);
|
|
303
310
|
|
|
304
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
311
|
+
var IconPlaceholder_1 = __webpack_require__(30);
|
|
305
312
|
|
|
306
313
|
var validOptions = Object.keys(config_1.default.optionsSchema);
|
|
307
314
|
exports.PieInnerSize = 0.7;
|
|
@@ -387,21 +394,21 @@ exports.default = Pie;
|
|
|
387
394
|
|
|
388
395
|
/***/ }),
|
|
389
396
|
|
|
390
|
-
/***/
|
|
397
|
+
/***/ 16:
|
|
391
398
|
/***/ (function(module, exports) {
|
|
392
399
|
|
|
393
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
400
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
394
401
|
|
|
395
402
|
/***/ }),
|
|
396
403
|
|
|
397
|
-
/***/
|
|
404
|
+
/***/ 17:
|
|
398
405
|
/***/ (function(module, exports) {
|
|
399
406
|
|
|
400
|
-
module.exports = require("@
|
|
407
|
+
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
401
408
|
|
|
402
409
|
/***/ }),
|
|
403
410
|
|
|
404
|
-
/***/
|
|
411
|
+
/***/ 18:
|
|
405
412
|
/***/ (function(module, exports, __webpack_require__) {
|
|
406
413
|
|
|
407
414
|
"use strict";
|
|
@@ -638,63 +645,77 @@ exports.insertLayout = insertLayout;
|
|
|
638
645
|
|
|
639
646
|
/***/ }),
|
|
640
647
|
|
|
641
|
-
/***/
|
|
648
|
+
/***/ 2:
|
|
642
649
|
/***/ (function(module, exports) {
|
|
643
650
|
|
|
644
|
-
module.exports = require("@
|
|
651
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
645
652
|
|
|
646
653
|
/***/ }),
|
|
647
654
|
|
|
648
|
-
/***/
|
|
655
|
+
/***/ 20:
|
|
649
656
|
/***/ (function(module, exports) {
|
|
650
657
|
|
|
651
|
-
module.exports = require("@
|
|
658
|
+
module.exports = require("@babel/runtime/helpers/createClass");
|
|
652
659
|
|
|
653
660
|
/***/ }),
|
|
654
661
|
|
|
655
|
-
/***/
|
|
662
|
+
/***/ 21:
|
|
656
663
|
/***/ (function(module, exports) {
|
|
657
664
|
|
|
658
665
|
module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
|
|
659
666
|
|
|
660
667
|
/***/ }),
|
|
661
668
|
|
|
662
|
-
/***/
|
|
669
|
+
/***/ 22:
|
|
663
670
|
/***/ (function(module, exports) {
|
|
664
671
|
|
|
665
672
|
module.exports = require("@splunk/themes/pick");
|
|
666
673
|
|
|
667
674
|
/***/ }),
|
|
668
675
|
|
|
669
|
-
/***/
|
|
676
|
+
/***/ 24:
|
|
670
677
|
/***/ (function(module, exports) {
|
|
671
678
|
|
|
672
679
|
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
673
680
|
|
|
674
681
|
/***/ }),
|
|
675
682
|
|
|
676
|
-
/***/
|
|
683
|
+
/***/ 25:
|
|
677
684
|
/***/ (function(module, exports) {
|
|
678
685
|
|
|
679
686
|
module.exports = require("@splunk/visualizations-shared/propUtils");
|
|
680
687
|
|
|
681
688
|
/***/ }),
|
|
682
689
|
|
|
683
|
-
/***/
|
|
690
|
+
/***/ 26:
|
|
691
|
+
/***/ (function(module, exports) {
|
|
692
|
+
|
|
693
|
+
module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
694
|
+
|
|
695
|
+
/***/ }),
|
|
696
|
+
|
|
697
|
+
/***/ 27:
|
|
684
698
|
/***/ (function(module, exports) {
|
|
685
699
|
|
|
686
700
|
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
687
701
|
|
|
688
702
|
/***/ }),
|
|
689
703
|
|
|
690
|
-
/***/
|
|
704
|
+
/***/ 28:
|
|
691
705
|
/***/ (function(module, exports) {
|
|
692
706
|
|
|
693
707
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
694
708
|
|
|
695
709
|
/***/ }),
|
|
696
710
|
|
|
697
|
-
/***/
|
|
711
|
+
/***/ 3:
|
|
712
|
+
/***/ (function(module, exports) {
|
|
713
|
+
|
|
714
|
+
module.exports = require("lodash");
|
|
715
|
+
|
|
716
|
+
/***/ }),
|
|
717
|
+
|
|
718
|
+
/***/ 30:
|
|
698
719
|
/***/ (function(module, exports, __webpack_require__) {
|
|
699
720
|
|
|
700
721
|
"use strict";
|
|
@@ -786,7 +807,14 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
|
786
807
|
|
|
787
808
|
/***/ }),
|
|
788
809
|
|
|
789
|
-
/***/
|
|
810
|
+
/***/ 31:
|
|
811
|
+
/***/ (function(module, exports) {
|
|
812
|
+
|
|
813
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
814
|
+
|
|
815
|
+
/***/ }),
|
|
816
|
+
|
|
817
|
+
/***/ 32:
|
|
790
818
|
/***/ (function(module, exports, __webpack_require__) {
|
|
791
819
|
|
|
792
820
|
"use strict";
|
|
@@ -803,7 +831,7 @@ var T = __webpack_require__(0);
|
|
|
803
831
|
|
|
804
832
|
var lodash_1 = __webpack_require__(3);
|
|
805
833
|
|
|
806
|
-
var DataSource_1 = __webpack_require__(
|
|
834
|
+
var DataSource_1 = __webpack_require__(43);
|
|
807
835
|
|
|
808
836
|
exports.SortParamsPropTypes = T.shape({
|
|
809
837
|
currentSortKey: T.string,
|
|
@@ -857,7 +885,7 @@ exports.getSortingParams = getSortingParams;
|
|
|
857
885
|
|
|
858
886
|
/***/ }),
|
|
859
887
|
|
|
860
|
-
/***/
|
|
888
|
+
/***/ 33:
|
|
861
889
|
/***/ (function(module, exports, __webpack_require__) {
|
|
862
890
|
|
|
863
891
|
"use strict";
|
|
@@ -922,14 +950,7 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
922
950
|
|
|
923
951
|
/***/ }),
|
|
924
952
|
|
|
925
|
-
/***/
|
|
926
|
-
/***/ (function(module, exports) {
|
|
927
|
-
|
|
928
|
-
module.exports = require("lodash");
|
|
929
|
-
|
|
930
|
-
/***/ }),
|
|
931
|
-
|
|
932
|
-
/***/ 31:
|
|
953
|
+
/***/ 34:
|
|
933
954
|
/***/ (function(module, exports, __webpack_require__) {
|
|
934
955
|
|
|
935
956
|
"use strict";
|
|
@@ -958,12 +979,14 @@ var VizCategory;
|
|
|
958
979
|
|
|
959
980
|
/***/ }),
|
|
960
981
|
|
|
961
|
-
/***/
|
|
982
|
+
/***/ 35:
|
|
962
983
|
/***/ (function(module, exports, __webpack_require__) {
|
|
963
984
|
|
|
964
985
|
"use strict";
|
|
965
986
|
|
|
966
987
|
|
|
988
|
+
var _slicedToArray = __webpack_require__(17);
|
|
989
|
+
|
|
967
990
|
Object.defineProperty(exports, "__esModule", {
|
|
968
991
|
value: true
|
|
969
992
|
});
|
|
@@ -972,44 +995,51 @@ var React = __webpack_require__(1);
|
|
|
972
995
|
|
|
973
996
|
var lodash_1 = __webpack_require__(3);
|
|
974
997
|
|
|
975
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
998
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(36);
|
|
976
999
|
|
|
977
|
-
var Options_1 = __webpack_require__(
|
|
1000
|
+
var Options_1 = __webpack_require__(37);
|
|
978
1001
|
|
|
979
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
1002
|
+
var SanitizeProps_1 = __webpack_require__(38);
|
|
980
1003
|
|
|
981
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
1004
|
+
var TimezoneContext_1 = __webpack_require__(24);
|
|
982
1005
|
|
|
983
|
-
var moment_1 = __webpack_require__(
|
|
1006
|
+
var moment_1 = __webpack_require__(39);
|
|
1007
|
+
|
|
1008
|
+
var FeatureFlagContext_1 = __webpack_require__(26);
|
|
984
1009
|
|
|
985
1010
|
var styled_components_1 = __webpack_require__(4);
|
|
986
1011
|
|
|
987
|
-
var hocUtils_1 = __webpack_require__(
|
|
1012
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
1013
|
+
|
|
1014
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
988
1015
|
|
|
989
|
-
var
|
|
1016
|
+
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
990
1017
|
|
|
991
|
-
var
|
|
1018
|
+
var id_1 = __webpack_require__(31);
|
|
1019
|
+
|
|
1020
|
+
var SplunkVisualization_1 = __webpack_require__(41);
|
|
992
1021
|
|
|
993
1022
|
var VizBehavior_1 = __webpack_require__(6);
|
|
994
1023
|
|
|
995
|
-
var getSorting_1 = __webpack_require__(
|
|
1024
|
+
var getSorting_1 = __webpack_require__(32);
|
|
1025
|
+
|
|
1026
|
+
var getPagination_1 = __webpack_require__(33);
|
|
996
1027
|
|
|
997
|
-
var
|
|
1028
|
+
var useDeepMemo_1 = __webpack_require__(44);
|
|
998
1029
|
|
|
999
|
-
var
|
|
1030
|
+
var MissingPropsMessage_1 = __webpack_require__(45);
|
|
1000
1031
|
|
|
1001
|
-
var
|
|
1032
|
+
var withEditModeCover_1 = __webpack_require__(46);
|
|
1002
1033
|
|
|
1003
|
-
var
|
|
1034
|
+
var withPlaceholder_1 = __webpack_require__(47);
|
|
1004
1035
|
|
|
1005
|
-
var
|
|
1036
|
+
var UUID = id_1.createGUID();
|
|
1006
1037
|
/**
|
|
1007
1038
|
* hoc that wraps a pure react visualization in a Dashboard visualization
|
|
1008
1039
|
* @param {DashboardVizOpts} opts
|
|
1009
1040
|
* @returns {HOC}
|
|
1010
1041
|
*/
|
|
1011
1042
|
|
|
1012
|
-
|
|
1013
1043
|
var withDashboardViz = function withDashboardViz(opts) {
|
|
1014
1044
|
var ReactViz = opts.ReactViz,
|
|
1015
1045
|
vizConfig = opts.vizConfig,
|
|
@@ -1069,28 +1099,76 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1069
1099
|
|
|
1070
1100
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
1071
1101
|
|
|
1102
|
+
var _React$useState = React.useState({}),
|
|
1103
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1104
|
+
evaluatedOptionsAsync = _React$useState2[0],
|
|
1105
|
+
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
1109
|
+
|
|
1110
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(UUID)),
|
|
1111
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1112
|
+
visualizationID = _React$useState4[0];
|
|
1113
|
+
|
|
1114
|
+
var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext['visualizations.useWebWorkersForDSL'] && typeof Worker !== 'undefined')),
|
|
1115
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1116
|
+
useAsyncEvaluatedOptions = _React$useState6[0],
|
|
1117
|
+
setUseAsyncEvaluatedOptions = _React$useState6[1];
|
|
1118
|
+
|
|
1072
1119
|
evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
|
|
1073
1120
|
try {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1121
|
+
if (useAsyncEvaluatedOptions) {
|
|
1122
|
+
var optionsToEvaluate = {
|
|
1123
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1124
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1125
|
+
};
|
|
1126
|
+
var asyncDynamicOptionsEvaluatorParams = {
|
|
1127
|
+
visualizationID: visualizationID,
|
|
1128
|
+
props: props,
|
|
1129
|
+
options: optionsToEvaluate,
|
|
1130
|
+
dataSources: dataSources,
|
|
1131
|
+
theme: vizConfig.themes
|
|
1132
|
+
};
|
|
1133
|
+
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
1134
|
+
setEvaluatedOptionsAsync(results.results);
|
|
1135
|
+
}).catch(function (e) {
|
|
1136
|
+
// eslint-disable-next-line no-console
|
|
1137
|
+
console.error("unexpected error evaluating options - async: ".concat(e.message));
|
|
1138
|
+
setUseAsyncEvaluatedOptions(false);
|
|
1139
|
+
});
|
|
1140
|
+
} else {
|
|
1141
|
+
return Options_1.Options.evaluate({
|
|
1142
|
+
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1143
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1144
|
+
}, dataSources, themeFunc);
|
|
1145
|
+
}
|
|
1078
1146
|
} catch (e) {
|
|
1079
1147
|
// eslint-disable-next-line no-console
|
|
1080
|
-
console.error("unexpected error evaluating options:
|
|
1148
|
+
console.error("unexpected error evaluating options: ".concat(e.message));
|
|
1081
1149
|
return {};
|
|
1082
1150
|
}
|
|
1083
|
-
|
|
1151
|
+
|
|
1152
|
+
return {};
|
|
1153
|
+
}, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
|
|
1154
|
+
var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // useEffect hook needs to be initialized before any early returns
|
|
1084
1155
|
// this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
|
|
1085
1156
|
|
|
1086
1157
|
React.useEffect(function () {
|
|
1087
|
-
onComputedProps(
|
|
1088
|
-
});
|
|
1158
|
+
onComputedProps(evaluatedOptionsToUse);
|
|
1159
|
+
});
|
|
1160
|
+
React.useEffect(function () {
|
|
1161
|
+
return function () {
|
|
1162
|
+
if (useAsyncEvaluatedOptions) {
|
|
1163
|
+
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
1164
|
+
}
|
|
1165
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1166
|
+
}, []); // present warning message if any required props are missing
|
|
1089
1167
|
|
|
1090
1168
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
1091
1169
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1092
1170
|
supports = vizConfig.supports;
|
|
1093
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps,
|
|
1171
|
+
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
1094
1172
|
|
|
1095
1173
|
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER)) {
|
|
1096
1174
|
return React.createElement(MissingPropsMessage_1.default, {
|
|
@@ -1117,7 +1195,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1117
1195
|
|
|
1118
1196
|
if (Array.isArray(payloadKeys) && payloadKeys.length) {
|
|
1119
1197
|
payloadKeys.forEach(function (p) {
|
|
1120
|
-
payload[p] =
|
|
1198
|
+
payload[p] = evaluatedOptionsToUse[p];
|
|
1121
1199
|
});
|
|
1122
1200
|
}
|
|
1123
1201
|
|
|
@@ -1136,7 +1214,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1136
1214
|
} // compute pure viz props which are not from options
|
|
1137
1215
|
|
|
1138
1216
|
|
|
1139
|
-
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props),
|
|
1217
|
+
var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
|
|
1140
1218
|
themeFunc: themeFunc
|
|
1141
1219
|
}));
|
|
1142
1220
|
/**
|
|
@@ -1156,7 +1234,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1156
1234
|
|
|
1157
1235
|
var dataSourceMetadata = {};
|
|
1158
1236
|
var OptionKey = 'paginateDataSourceKey';
|
|
1159
|
-
var paginateDataSourceKey = lodash_1.has(
|
|
1237
|
+
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1160
1238
|
|
|
1161
1239
|
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1162
1240
|
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
@@ -1186,7 +1264,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1186
1264
|
mode: mode,
|
|
1187
1265
|
width: width,
|
|
1188
1266
|
height: height
|
|
1189
|
-
},
|
|
1267
|
+
}, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
|
|
1190
1268
|
};
|
|
1191
1269
|
|
|
1192
1270
|
DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
|
|
@@ -1204,35 +1282,49 @@ exports.default = withDashboardViz;
|
|
|
1204
1282
|
|
|
1205
1283
|
/***/ }),
|
|
1206
1284
|
|
|
1207
|
-
/***/
|
|
1285
|
+
/***/ 36:
|
|
1208
1286
|
/***/ (function(module, exports) {
|
|
1209
1287
|
|
|
1210
1288
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1211
1289
|
|
|
1212
1290
|
/***/ }),
|
|
1213
1291
|
|
|
1214
|
-
/***/
|
|
1292
|
+
/***/ 37:
|
|
1215
1293
|
/***/ (function(module, exports) {
|
|
1216
1294
|
|
|
1217
1295
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1218
1296
|
|
|
1219
1297
|
/***/ }),
|
|
1220
1298
|
|
|
1221
|
-
/***/
|
|
1299
|
+
/***/ 38:
|
|
1222
1300
|
/***/ (function(module, exports) {
|
|
1223
1301
|
|
|
1224
1302
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1225
1303
|
|
|
1226
1304
|
/***/ }),
|
|
1227
1305
|
|
|
1228
|
-
/***/
|
|
1306
|
+
/***/ 39:
|
|
1229
1307
|
/***/ (function(module, exports) {
|
|
1230
1308
|
|
|
1231
1309
|
module.exports = require("@splunk/moment");
|
|
1232
1310
|
|
|
1233
1311
|
/***/ }),
|
|
1234
1312
|
|
|
1235
|
-
/***/
|
|
1313
|
+
/***/ 4:
|
|
1314
|
+
/***/ (function(module, exports) {
|
|
1315
|
+
|
|
1316
|
+
module.exports = require("styled-components");
|
|
1317
|
+
|
|
1318
|
+
/***/ }),
|
|
1319
|
+
|
|
1320
|
+
/***/ 40:
|
|
1321
|
+
/***/ (function(module, exports) {
|
|
1322
|
+
|
|
1323
|
+
module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
1324
|
+
|
|
1325
|
+
/***/ }),
|
|
1326
|
+
|
|
1327
|
+
/***/ 41:
|
|
1236
1328
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1237
1329
|
|
|
1238
1330
|
"use strict";
|
|
@@ -1250,7 +1342,7 @@ var T = __webpack_require__(0);
|
|
|
1250
1342
|
|
|
1251
1343
|
var lodash_1 = __webpack_require__(3);
|
|
1252
1344
|
|
|
1253
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1345
|
+
var VizActionHandler_1 = __webpack_require__(42); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1254
1346
|
|
|
1255
1347
|
|
|
1256
1348
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1384,7 +1476,7 @@ exports.default = SplunkVisualization;
|
|
|
1384
1476
|
|
|
1385
1477
|
/***/ }),
|
|
1386
1478
|
|
|
1387
|
-
/***/
|
|
1479
|
+
/***/ 42:
|
|
1388
1480
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1389
1481
|
|
|
1390
1482
|
"use strict";
|
|
@@ -1392,7 +1484,7 @@ exports.default = SplunkVisualization;
|
|
|
1392
1484
|
|
|
1393
1485
|
var _classCallCheck = __webpack_require__(11);
|
|
1394
1486
|
|
|
1395
|
-
var _createClass = __webpack_require__(
|
|
1487
|
+
var _createClass = __webpack_require__(20);
|
|
1396
1488
|
|
|
1397
1489
|
Object.defineProperty(exports, "__esModule", {
|
|
1398
1490
|
value: true
|
|
@@ -1409,221 +1501,20 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
1409
1501
|
value: function focus() {// noop
|
|
1410
1502
|
}
|
|
1411
1503
|
}, {
|
|
1412
|
-
key: "snapshot",
|
|
1413
|
-
value: function snapshot() {
|
|
1414
|
-
return null; // noop
|
|
1415
|
-
}
|
|
1416
|
-
}]);
|
|
1417
|
-
|
|
1418
|
-
return DefaultVizActionHandler;
|
|
1419
|
-
}();
|
|
1420
|
-
|
|
1421
|
-
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1422
|
-
|
|
1423
|
-
/***/ }),
|
|
1424
|
-
|
|
1425
|
-
/***/ 39:
|
|
1426
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1427
|
-
|
|
1428
|
-
"use strict";
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1432
|
-
value: true
|
|
1433
|
-
});
|
|
1434
|
-
exports.validSortDirs = void 0;
|
|
1435
|
-
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1436
|
-
|
|
1437
|
-
/***/ }),
|
|
1438
|
-
|
|
1439
|
-
/***/ 4:
|
|
1440
|
-
/***/ (function(module, exports) {
|
|
1441
|
-
|
|
1442
|
-
module.exports = require("styled-components");
|
|
1443
|
-
|
|
1444
|
-
/***/ }),
|
|
1445
|
-
|
|
1446
|
-
/***/ 40:
|
|
1447
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1448
|
-
|
|
1449
|
-
"use strict";
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1453
|
-
value: true
|
|
1454
|
-
});
|
|
1455
|
-
exports.useDeepMemo = void 0;
|
|
1456
|
-
|
|
1457
|
-
var react_1 = __webpack_require__(1);
|
|
1458
|
-
|
|
1459
|
-
var lodash_1 = __webpack_require__(3);
|
|
1460
|
-
/**
|
|
1461
|
-
* This hook evaluates and stores the result of a passed function and only
|
|
1462
|
-
* re-evaluates the function when passed dependencies change.
|
|
1463
|
-
*
|
|
1464
|
-
* It is different from the internal React useMemo in the following aspects:
|
|
1465
|
-
* - it only stores the last evaluated result
|
|
1466
|
-
* - it uses a deep equality check to determine if dependencies have changed
|
|
1467
|
-
*
|
|
1468
|
-
* Inspired by apollo-client's useDeepMemo
|
|
1469
|
-
*
|
|
1470
|
-
* @param fn the function to be executed and
|
|
1471
|
-
* @param dependencies an array of dependencies
|
|
1472
|
-
*/
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1476
|
-
var ref = react_1.useRef();
|
|
1477
|
-
|
|
1478
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1479
|
-
ref.current = {
|
|
1480
|
-
dependencies: dependencies,
|
|
1481
|
-
value: fn()
|
|
1482
|
-
};
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
return ref.current.value;
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
exports.useDeepMemo = useDeepMemo;
|
|
1489
|
-
|
|
1490
|
-
/***/ }),
|
|
1491
|
-
|
|
1492
|
-
/***/ 41:
|
|
1493
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1494
|
-
|
|
1495
|
-
"use strict";
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1499
|
-
value: true
|
|
1500
|
-
});
|
|
1501
|
-
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
1502
|
-
|
|
1503
|
-
var React = __webpack_require__(1);
|
|
1504
|
-
|
|
1505
|
-
var T = __webpack_require__(0);
|
|
1506
|
-
|
|
1507
|
-
var i18n_1 = __webpack_require__(2);
|
|
1508
|
-
|
|
1509
|
-
var Message_1 = __webpack_require__(10);
|
|
1510
|
-
|
|
1511
|
-
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
1512
|
-
/**
|
|
1513
|
-
* @method isMissing
|
|
1514
|
-
* @param {any} v
|
|
1515
|
-
* @returns {boolean} true if the input value === null or undefined
|
|
1516
|
-
*/
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
var isMissing = function isMissing(v) {
|
|
1520
|
-
return v === null || v === undefined;
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
exports.isMissing = isMissing;
|
|
1524
|
-
/**
|
|
1525
|
-
* @method misskingKeys
|
|
1526
|
-
* @param {string[]} keys
|
|
1527
|
-
* @param {object} target
|
|
1528
|
-
* @returns {string[]} the keys of missing required props
|
|
1529
|
-
*/
|
|
1530
|
-
|
|
1531
|
-
var missingKeys = function missingKeys(keys, target) {
|
|
1532
|
-
return keys.filter(function (k) {
|
|
1533
|
-
return exports.isMissing(target[k]);
|
|
1534
|
-
});
|
|
1535
|
-
};
|
|
1536
|
-
|
|
1537
|
-
exports.missingKeys = missingKeys;
|
|
1538
|
-
var propTypes = {
|
|
1539
|
-
width: T.oneOfType([T.string, T.number]),
|
|
1540
|
-
height: T.oneOfType([T.string, T.number]),
|
|
1541
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
1542
|
-
backgroundColor: T.string,
|
|
1543
|
-
missingProps: T.arrayOf(T.string)
|
|
1544
|
-
};
|
|
1545
|
-
/**
|
|
1546
|
-
* @method MissingPropsMessage
|
|
1547
|
-
* @param {MissingPropsProps} props
|
|
1548
|
-
* @returns {React.ReactElement}
|
|
1549
|
-
*/
|
|
1550
|
-
|
|
1551
|
-
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
1552
|
-
var width = props.width,
|
|
1553
|
-
height = props.height,
|
|
1554
|
-
missingProps = props.missingProps;
|
|
1555
|
-
return React.createElement(Message_1.default, {
|
|
1556
|
-
"data-test": "message",
|
|
1557
|
-
width: width,
|
|
1558
|
-
height: height,
|
|
1559
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1560
|
-
});
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
exports.MissingPropsMessage = MissingPropsMessage;
|
|
1564
|
-
exports.MissingPropsMessage.propTypes = propTypes;
|
|
1565
|
-
exports.MissingPropsMessage.defaultProps = {
|
|
1566
|
-
width: '100%',
|
|
1567
|
-
height: 250
|
|
1568
|
-
};
|
|
1569
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1570
|
-
|
|
1571
|
-
/***/ }),
|
|
1572
|
-
|
|
1573
|
-
/***/ 42:
|
|
1574
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1575
|
-
|
|
1576
|
-
"use strict";
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1580
|
-
value: true
|
|
1581
|
-
});
|
|
1582
|
-
|
|
1583
|
-
var React = __webpack_require__(1);
|
|
1584
|
-
|
|
1585
|
-
var styled_components_1 = __webpack_require__(4);
|
|
1586
|
-
|
|
1587
|
-
var hocUtils_1 = __webpack_require__(14);
|
|
1588
|
-
|
|
1589
|
-
var Cover = styled_components_1.default.div.withConfig({
|
|
1590
|
-
displayName: "withEditModeCover__Cover",
|
|
1591
|
-
componentId: "sc-1gsbnxb-0"
|
|
1592
|
-
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1593
|
-
var Blocker = styled_components_1.default.div.attrs({
|
|
1594
|
-
'data-splunk-visualization-version': "25.5.0 - 12c0447a7"
|
|
1595
|
-
}).withConfig({
|
|
1596
|
-
displayName: "withEditModeCover__Blocker",
|
|
1597
|
-
componentId: "sc-1gsbnxb-1"
|
|
1598
|
-
})(["position:relative;width:100%;height:100%;"]);
|
|
1599
|
-
/**
|
|
1600
|
-
* HOC that renders a cover layer in edit mode
|
|
1601
|
-
* @method withEditModeCover
|
|
1602
|
-
* @param {ExtendedDashViz} Visualization
|
|
1603
|
-
* @returns {ExtendedDashViz} Wrapper
|
|
1604
|
-
*/
|
|
1605
|
-
|
|
1606
|
-
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
1607
|
-
var Wrapper = function Wrapper(props) {
|
|
1608
|
-
var mode = props.mode;
|
|
1609
|
-
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
1610
|
-
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
1611
|
-
"data-test": "edit-mode-cover"
|
|
1612
|
-
}));
|
|
1613
|
-
};
|
|
1504
|
+
key: "snapshot",
|
|
1505
|
+
value: function snapshot() {
|
|
1506
|
+
return null; // noop
|
|
1507
|
+
}
|
|
1508
|
+
}]);
|
|
1614
1509
|
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
Visualization: Visualization
|
|
1618
|
-
});
|
|
1619
|
-
return Wrapper;
|
|
1620
|
-
};
|
|
1510
|
+
return DefaultVizActionHandler;
|
|
1511
|
+
}();
|
|
1621
1512
|
|
|
1622
|
-
exports.
|
|
1513
|
+
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1623
1514
|
|
|
1624
1515
|
/***/ }),
|
|
1625
1516
|
|
|
1626
|
-
/***/
|
|
1517
|
+
/***/ 429:
|
|
1627
1518
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1628
1519
|
|
|
1629
1520
|
"use strict";
|
|
@@ -1653,9 +1544,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1653
1544
|
});
|
|
1654
1545
|
exports.default = void 0;
|
|
1655
1546
|
|
|
1656
|
-
__exportStar(__webpack_require__(
|
|
1547
|
+
__exportStar(__webpack_require__(153), exports);
|
|
1657
1548
|
|
|
1658
|
-
var Pie_1 = __webpack_require__(
|
|
1549
|
+
var Pie_1 = __webpack_require__(153);
|
|
1659
1550
|
|
|
1660
1551
|
Object.defineProperty(exports, "default", {
|
|
1661
1552
|
enumerable: true,
|
|
@@ -1666,7 +1557,21 @@ Object.defineProperty(exports, "default", {
|
|
|
1666
1557
|
|
|
1667
1558
|
/***/ }),
|
|
1668
1559
|
|
|
1669
|
-
/***/
|
|
1560
|
+
/***/ 43:
|
|
1561
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1562
|
+
|
|
1563
|
+
"use strict";
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1567
|
+
value: true
|
|
1568
|
+
});
|
|
1569
|
+
exports.validSortDirs = void 0;
|
|
1570
|
+
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1571
|
+
|
|
1572
|
+
/***/ }),
|
|
1573
|
+
|
|
1574
|
+
/***/ 430:
|
|
1670
1575
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1671
1576
|
|
|
1672
1577
|
"use strict";
|
|
@@ -1676,27 +1581,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1676
1581
|
value: true
|
|
1677
1582
|
});
|
|
1678
1583
|
|
|
1679
|
-
var ChartPie_1 = __webpack_require__(
|
|
1584
|
+
var ChartPie_1 = __webpack_require__(431);
|
|
1680
1585
|
|
|
1681
|
-
var placeholders_1 = __webpack_require__(
|
|
1586
|
+
var placeholders_1 = __webpack_require__(48);
|
|
1682
1587
|
|
|
1683
1588
|
var i18n_1 = __webpack_require__(2);
|
|
1684
1589
|
|
|
1685
1590
|
var schemaUtils_1 = __webpack_require__(16);
|
|
1686
1591
|
|
|
1687
|
-
var visualization_color_palettes_1 = __webpack_require__(
|
|
1592
|
+
var visualization_color_palettes_1 = __webpack_require__(50);
|
|
1688
1593
|
|
|
1689
|
-
var pick_1 = __webpack_require__(
|
|
1594
|
+
var pick_1 = __webpack_require__(22);
|
|
1690
1595
|
|
|
1691
1596
|
var variables_1 = __webpack_require__(9);
|
|
1692
1597
|
|
|
1693
1598
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1694
1599
|
|
|
1695
|
-
var VizCategory_1 = __webpack_require__(
|
|
1600
|
+
var VizCategory_1 = __webpack_require__(34);
|
|
1696
1601
|
|
|
1697
|
-
var configUtils_1 = __webpack_require__(
|
|
1602
|
+
var configUtils_1 = __webpack_require__(18);
|
|
1698
1603
|
|
|
1699
|
-
var BackgroundColor_1 = __webpack_require__(
|
|
1604
|
+
var BackgroundColor_1 = __webpack_require__(53);
|
|
1700
1605
|
|
|
1701
1606
|
var dataContract = {
|
|
1702
1607
|
requiredDataSources: [{
|
|
@@ -1893,14 +1798,14 @@ exports.default = configUtils_1.enhanceConfig(config);
|
|
|
1893
1798
|
|
|
1894
1799
|
/***/ }),
|
|
1895
1800
|
|
|
1896
|
-
/***/
|
|
1801
|
+
/***/ 431:
|
|
1897
1802
|
/***/ (function(module, exports) {
|
|
1898
1803
|
|
|
1899
1804
|
module.exports = require("@splunk/react-icons/ChartPie");
|
|
1900
1805
|
|
|
1901
1806
|
/***/ }),
|
|
1902
1807
|
|
|
1903
|
-
/***/
|
|
1808
|
+
/***/ 432:
|
|
1904
1809
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1905
1810
|
|
|
1906
1811
|
"use strict";
|
|
@@ -1926,13 +1831,13 @@ exports.allInvalidDataValues = exports.invalidOptionField = exports.getPieOption
|
|
|
1926
1831
|
|
|
1927
1832
|
var lodash_1 = __webpack_require__(3);
|
|
1928
1833
|
|
|
1929
|
-
var propUtils_1 = __webpack_require__(
|
|
1834
|
+
var propUtils_1 = __webpack_require__(25);
|
|
1930
1835
|
|
|
1931
|
-
var dsl_1 = __webpack_require__(
|
|
1836
|
+
var dsl_1 = __webpack_require__(98);
|
|
1932
1837
|
|
|
1933
|
-
var hocUtils_1 = __webpack_require__(
|
|
1838
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
1934
1839
|
|
|
1935
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
1840
|
+
var JSONSchemaUtils_1 = __webpack_require__(28); // CONVERT THIS TO PIE THEN ADD TO Pie.TSX
|
|
1936
1841
|
// map for key names which are either new or not present in SimpleXML options mapping
|
|
1937
1842
|
|
|
1938
1843
|
|
|
@@ -2092,7 +1997,187 @@ exports.allInvalidDataValues = allInvalidDataValues;
|
|
|
2092
1997
|
|
|
2093
1998
|
/***/ }),
|
|
2094
1999
|
|
|
2095
|
-
/***/
|
|
2000
|
+
/***/ 44:
|
|
2001
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2002
|
+
|
|
2003
|
+
"use strict";
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2007
|
+
value: true
|
|
2008
|
+
});
|
|
2009
|
+
exports.useDeepMemo = void 0;
|
|
2010
|
+
|
|
2011
|
+
var react_1 = __webpack_require__(1);
|
|
2012
|
+
|
|
2013
|
+
var lodash_1 = __webpack_require__(3);
|
|
2014
|
+
/**
|
|
2015
|
+
* This hook evaluates and stores the result of a passed function and only
|
|
2016
|
+
* re-evaluates the function when passed dependencies change.
|
|
2017
|
+
*
|
|
2018
|
+
* It is different from the internal React useMemo in the following aspects:
|
|
2019
|
+
* - it only stores the last evaluated result
|
|
2020
|
+
* - it uses a deep equality check to determine if dependencies have changed
|
|
2021
|
+
*
|
|
2022
|
+
* Inspired by apollo-client's useDeepMemo
|
|
2023
|
+
*
|
|
2024
|
+
* @param fn the function to be executed and
|
|
2025
|
+
* @param dependencies an array of dependencies
|
|
2026
|
+
*/
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
2030
|
+
var ref = react_1.useRef();
|
|
2031
|
+
|
|
2032
|
+
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
2033
|
+
ref.current = {
|
|
2034
|
+
dependencies: dependencies,
|
|
2035
|
+
value: fn()
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
return ref.current.value;
|
|
2040
|
+
};
|
|
2041
|
+
|
|
2042
|
+
exports.useDeepMemo = useDeepMemo;
|
|
2043
|
+
|
|
2044
|
+
/***/ }),
|
|
2045
|
+
|
|
2046
|
+
/***/ 45:
|
|
2047
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2048
|
+
|
|
2049
|
+
"use strict";
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2053
|
+
value: true
|
|
2054
|
+
});
|
|
2055
|
+
exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
|
|
2056
|
+
|
|
2057
|
+
var React = __webpack_require__(1);
|
|
2058
|
+
|
|
2059
|
+
var T = __webpack_require__(0);
|
|
2060
|
+
|
|
2061
|
+
var i18n_1 = __webpack_require__(2);
|
|
2062
|
+
|
|
2063
|
+
var Message_1 = __webpack_require__(10);
|
|
2064
|
+
|
|
2065
|
+
var FixedSizeContainer_1 = __webpack_require__(13);
|
|
2066
|
+
/**
|
|
2067
|
+
* @method isMissing
|
|
2068
|
+
* @param {any} v
|
|
2069
|
+
* @returns {boolean} true if the input value === null or undefined
|
|
2070
|
+
*/
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
var isMissing = function isMissing(v) {
|
|
2074
|
+
return v === null || v === undefined;
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
exports.isMissing = isMissing;
|
|
2078
|
+
/**
|
|
2079
|
+
* @method misskingKeys
|
|
2080
|
+
* @param {string[]} keys
|
|
2081
|
+
* @param {object} target
|
|
2082
|
+
* @returns {string[]} the keys of missing required props
|
|
2083
|
+
*/
|
|
2084
|
+
|
|
2085
|
+
var missingKeys = function missingKeys(keys, target) {
|
|
2086
|
+
return keys.filter(function (k) {
|
|
2087
|
+
return exports.isMissing(target[k]);
|
|
2088
|
+
});
|
|
2089
|
+
};
|
|
2090
|
+
|
|
2091
|
+
exports.missingKeys = missingKeys;
|
|
2092
|
+
var propTypes = {
|
|
2093
|
+
width: T.oneOfType([T.string, T.number]),
|
|
2094
|
+
height: T.oneOfType([T.string, T.number]),
|
|
2095
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
2096
|
+
backgroundColor: T.string,
|
|
2097
|
+
missingProps: T.arrayOf(T.string)
|
|
2098
|
+
};
|
|
2099
|
+
/**
|
|
2100
|
+
* @method MissingPropsMessage
|
|
2101
|
+
* @param {MissingPropsProps} props
|
|
2102
|
+
* @returns {React.ReactElement}
|
|
2103
|
+
*/
|
|
2104
|
+
|
|
2105
|
+
var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
2106
|
+
var width = props.width,
|
|
2107
|
+
height = props.height,
|
|
2108
|
+
missingProps = props.missingProps;
|
|
2109
|
+
return React.createElement(Message_1.default, {
|
|
2110
|
+
"data-test": "message",
|
|
2111
|
+
width: width,
|
|
2112
|
+
height: height,
|
|
2113
|
+
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
2114
|
+
});
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
exports.MissingPropsMessage = MissingPropsMessage;
|
|
2118
|
+
exports.MissingPropsMessage.propTypes = propTypes;
|
|
2119
|
+
exports.MissingPropsMessage.defaultProps = {
|
|
2120
|
+
width: '100%',
|
|
2121
|
+
height: 250
|
|
2122
|
+
};
|
|
2123
|
+
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
2124
|
+
|
|
2125
|
+
/***/ }),
|
|
2126
|
+
|
|
2127
|
+
/***/ 46:
|
|
2128
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2129
|
+
|
|
2130
|
+
"use strict";
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2134
|
+
value: true
|
|
2135
|
+
});
|
|
2136
|
+
|
|
2137
|
+
var React = __webpack_require__(1);
|
|
2138
|
+
|
|
2139
|
+
var styled_components_1 = __webpack_require__(4);
|
|
2140
|
+
|
|
2141
|
+
var hocUtils_1 = __webpack_require__(14);
|
|
2142
|
+
|
|
2143
|
+
var Cover = styled_components_1.default.div.withConfig({
|
|
2144
|
+
displayName: "withEditModeCover__Cover",
|
|
2145
|
+
componentId: "sc-1gsbnxb-0"
|
|
2146
|
+
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
2147
|
+
var Blocker = styled_components_1.default.div.attrs({
|
|
2148
|
+
'data-splunk-visualization-version': "25.6.0 - f5eb3abf9"
|
|
2149
|
+
}).withConfig({
|
|
2150
|
+
displayName: "withEditModeCover__Blocker",
|
|
2151
|
+
componentId: "sc-1gsbnxb-1"
|
|
2152
|
+
})(["position:relative;width:100%;height:100%;"]);
|
|
2153
|
+
/**
|
|
2154
|
+
* HOC that renders a cover layer in edit mode
|
|
2155
|
+
* @method withEditModeCover
|
|
2156
|
+
* @param {ExtendedDashViz} Visualization
|
|
2157
|
+
* @returns {ExtendedDashViz} Wrapper
|
|
2158
|
+
*/
|
|
2159
|
+
|
|
2160
|
+
var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
|
|
2161
|
+
var Wrapper = function Wrapper(props) {
|
|
2162
|
+
var mode = props.mode;
|
|
2163
|
+
var showEditCover = mode === 'edit' && !disableEditModeCover;
|
|
2164
|
+
return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
|
|
2165
|
+
"data-test": "edit-mode-cover"
|
|
2166
|
+
}));
|
|
2167
|
+
};
|
|
2168
|
+
|
|
2169
|
+
hocUtils_1.extendStaticWrapperProps({
|
|
2170
|
+
Wrapper: Wrapper,
|
|
2171
|
+
Visualization: Visualization
|
|
2172
|
+
});
|
|
2173
|
+
return Wrapper;
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
exports.default = withEditModeCover;
|
|
2177
|
+
|
|
2178
|
+
/***/ }),
|
|
2179
|
+
|
|
2180
|
+
/***/ 47:
|
|
2096
2181
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2097
2182
|
|
|
2098
2183
|
"use strict";
|
|
@@ -2108,7 +2193,7 @@ var colorUtils_1 = __webpack_require__(12);
|
|
|
2108
2193
|
|
|
2109
2194
|
var variables_1 = __webpack_require__(9);
|
|
2110
2195
|
|
|
2111
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
2196
|
+
var IconPlaceholder_1 = __webpack_require__(30);
|
|
2112
2197
|
|
|
2113
2198
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2114
2199
|
|
|
@@ -2157,21 +2242,21 @@ exports.default = withPlaceholder;
|
|
|
2157
2242
|
|
|
2158
2243
|
/***/ }),
|
|
2159
2244
|
|
|
2160
|
-
/***/
|
|
2245
|
+
/***/ 48:
|
|
2161
2246
|
/***/ (function(module, exports) {
|
|
2162
2247
|
|
|
2163
2248
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
2164
2249
|
|
|
2165
2250
|
/***/ }),
|
|
2166
2251
|
|
|
2167
|
-
/***/
|
|
2252
|
+
/***/ 50:
|
|
2168
2253
|
/***/ (function(module, exports) {
|
|
2169
2254
|
|
|
2170
2255
|
module.exports = require("@splunk/visualization-color-palettes");
|
|
2171
2256
|
|
|
2172
2257
|
/***/ }),
|
|
2173
2258
|
|
|
2174
|
-
/***/
|
|
2259
|
+
/***/ 53:
|
|
2175
2260
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2176
2261
|
|
|
2177
2262
|
"use strict";
|
|
@@ -2202,7 +2287,7 @@ exports.default = background;
|
|
|
2202
2287
|
|
|
2203
2288
|
/***/ }),
|
|
2204
2289
|
|
|
2205
|
-
/***/
|
|
2290
|
+
/***/ 55:
|
|
2206
2291
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2207
2292
|
|
|
2208
2293
|
"use strict";
|
|
@@ -2424,14 +2509,14 @@ exports.constructFieldsAndColumns = constructFieldsAndColumns;
|
|
|
2424
2509
|
|
|
2425
2510
|
/***/ }),
|
|
2426
2511
|
|
|
2427
|
-
/***/
|
|
2512
|
+
/***/ 56:
|
|
2428
2513
|
/***/ (function(module, exports) {
|
|
2429
2514
|
|
|
2430
2515
|
module.exports = require("@splunk/charting-bundle");
|
|
2431
2516
|
|
|
2432
2517
|
/***/ }),
|
|
2433
2518
|
|
|
2434
|
-
/***/
|
|
2519
|
+
/***/ 59:
|
|
2435
2520
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2436
2521
|
|
|
2437
2522
|
"use strict";
|
|
@@ -2447,7 +2532,7 @@ var lodash_1 = __webpack_require__(3);
|
|
|
2447
2532
|
|
|
2448
2533
|
var i18n_1 = __webpack_require__(2);
|
|
2449
2534
|
|
|
2450
|
-
var visualization_color_palettes_1 = __webpack_require__(
|
|
2535
|
+
var visualization_color_palettes_1 = __webpack_require__(50);
|
|
2451
2536
|
|
|
2452
2537
|
var react_1 = __webpack_require__(1);
|
|
2453
2538
|
|
|
@@ -2455,14 +2540,14 @@ var React = __webpack_require__(1);
|
|
|
2455
2540
|
|
|
2456
2541
|
var T = __webpack_require__(0);
|
|
2457
2542
|
|
|
2458
|
-
var react_event_listener_1 = __webpack_require__(
|
|
2543
|
+
var react_event_listener_1 = __webpack_require__(60);
|
|
2459
2544
|
|
|
2460
|
-
__webpack_require__(
|
|
2545
|
+
__webpack_require__(61); // fixme, @splunk/charting should be refactor to use locale & timezone instead of i18n functions
|
|
2461
2546
|
|
|
2462
2547
|
|
|
2463
|
-
var charting_bundle_1 = __webpack_require__(
|
|
2548
|
+
var charting_bundle_1 = __webpack_require__(56);
|
|
2464
2549
|
|
|
2465
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
2550
|
+
var TimezoneContext_1 = __webpack_require__(24);
|
|
2466
2551
|
|
|
2467
2552
|
var style_1 = __webpack_require__(15);
|
|
2468
2553
|
|
|
@@ -2470,11 +2555,11 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
2470
2555
|
|
|
2471
2556
|
var Message_1 = __webpack_require__(10);
|
|
2472
2557
|
|
|
2473
|
-
var useSplunkTheme_1 = __webpack_require__(
|
|
2558
|
+
var useSplunkTheme_1 = __webpack_require__(62);
|
|
2474
2559
|
|
|
2475
|
-
var themeUtils_1 = __webpack_require__(
|
|
2560
|
+
var themeUtils_1 = __webpack_require__(63);
|
|
2476
2561
|
|
|
2477
|
-
var ChartingApi_1 = __webpack_require__(
|
|
2562
|
+
var ChartingApi_1 = __webpack_require__(64);
|
|
2478
2563
|
|
|
2479
2564
|
exports.NO_INPLACE_PROPS = ['chart', 'chart.orientation', 'layout.splitSeries', 'chart.style', 'legend.placement'];
|
|
2480
2565
|
|
|
@@ -2854,27 +2939,6 @@ exports.default = withEmptyChartMessage(Charting);
|
|
|
2854
2939
|
|
|
2855
2940
|
/***/ }),
|
|
2856
2941
|
|
|
2857
|
-
/***/ 57:
|
|
2858
|
-
/***/ (function(module, exports) {
|
|
2859
|
-
|
|
2860
|
-
module.exports = require("react-event-listener");
|
|
2861
|
-
|
|
2862
|
-
/***/ }),
|
|
2863
|
-
|
|
2864
|
-
/***/ 58:
|
|
2865
|
-
/***/ (function(module, exports) {
|
|
2866
|
-
|
|
2867
|
-
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2868
|
-
|
|
2869
|
-
/***/ }),
|
|
2870
|
-
|
|
2871
|
-
/***/ 59:
|
|
2872
|
-
/***/ (function(module, exports) {
|
|
2873
|
-
|
|
2874
|
-
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
2875
|
-
|
|
2876
|
-
/***/ }),
|
|
2877
|
-
|
|
2878
2942
|
/***/ 6:
|
|
2879
2943
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2880
2944
|
|
|
@@ -2916,11 +2980,32 @@ var VizBehavior;
|
|
|
2916
2980
|
/***/ 60:
|
|
2917
2981
|
/***/ (function(module, exports) {
|
|
2918
2982
|
|
|
2919
|
-
module.exports = require("
|
|
2983
|
+
module.exports = require("react-event-listener");
|
|
2920
2984
|
|
|
2921
2985
|
/***/ }),
|
|
2922
2986
|
|
|
2923
2987
|
/***/ 61:
|
|
2988
|
+
/***/ (function(module, exports) {
|
|
2989
|
+
|
|
2990
|
+
module.exports = require("@splunk/visualizations-shared/i18n");
|
|
2991
|
+
|
|
2992
|
+
/***/ }),
|
|
2993
|
+
|
|
2994
|
+
/***/ 62:
|
|
2995
|
+
/***/ (function(module, exports) {
|
|
2996
|
+
|
|
2997
|
+
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
2998
|
+
|
|
2999
|
+
/***/ }),
|
|
3000
|
+
|
|
3001
|
+
/***/ 63:
|
|
3002
|
+
/***/ (function(module, exports) {
|
|
3003
|
+
|
|
3004
|
+
module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
3005
|
+
|
|
3006
|
+
/***/ }),
|
|
3007
|
+
|
|
3008
|
+
/***/ 64:
|
|
2924
3009
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2925
3010
|
|
|
2926
3011
|
"use strict";
|
|
@@ -2928,7 +3013,7 @@ module.exports = require("@splunk/visualizations-shared/themeUtils");
|
|
|
2928
3013
|
|
|
2929
3014
|
var _classCallCheck = __webpack_require__(11);
|
|
2930
3015
|
|
|
2931
|
-
var _createClass = __webpack_require__(
|
|
3016
|
+
var _createClass = __webpack_require__(20);
|
|
2932
3017
|
|
|
2933
3018
|
Object.defineProperty(exports, "__esModule", {
|
|
2934
3019
|
value: true
|
|
@@ -2989,7 +3074,7 @@ exports.ChartingApiFunctional = ChartingApiFunctional;
|
|
|
2989
3074
|
|
|
2990
3075
|
/***/ }),
|
|
2991
3076
|
|
|
2992
|
-
/***/
|
|
3077
|
+
/***/ 65:
|
|
2993
3078
|
/***/ (function(module, exports) {
|
|
2994
3079
|
|
|
2995
3080
|
module.exports = require("@splunk/visualizations-shared/simpleXMLOptions");
|
|
@@ -3017,7 +3102,7 @@ module.exports = require("@splunk/themes/variables");
|
|
|
3017
3102
|
|
|
3018
3103
|
/***/ }),
|
|
3019
3104
|
|
|
3020
|
-
/***/
|
|
3105
|
+
/***/ 98:
|
|
3021
3106
|
/***/ (function(module, exports) {
|
|
3022
3107
|
|
|
3023
3108
|
module.exports = require("@splunk/visualization-encoding/utils/dsl");
|