@splunk/visualizations 25.13.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +216 -216
- package/Area.config.js.map +1 -1
- package/Area.js +529 -561
- package/Area.js.map +1 -1
- package/Bar.config.js +213 -213
- package/Bar.config.js.map +1 -1
- package/Bar.js +394 -386
- package/Bar.js.map +1 -1
- package/Bubble.config.js +140 -140
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +313 -305
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +15 -15
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +149 -144
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +205 -205
- package/Column.config.js.map +1 -1
- package/Column.js +387 -379
- package/Column.js.map +1 -1
- package/Ellipse.config.js +45 -45
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +157 -144
- package/Ellipse.js.map +1 -1
- package/Events.config.js +11 -11
- package/Events.config.js.map +1 -1
- package/Events.js +274 -262
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +46 -46
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +267 -262
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +8 -8
- package/Image.config.js.map +1 -1
- package/Image.js +110 -104
- package/Image.js.map +1 -1
- package/Line.config.js +220 -220
- package/Line.config.js.map +1 -1
- package/Line.js +404 -396
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +27 -27
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +557 -548
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +71 -71
- package/Map.config.js.map +1 -1
- package/Map.js +472 -466
- package/Map.js.map +1 -1
- package/Markdown.config.js +23 -23
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +151 -145
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +84 -84
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +295 -289
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +23 -23
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +164 -162
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +24 -24
- package/Pie.config.js.map +1 -1
- package/Pie.js +233 -228
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +33 -33
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +278 -279
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +46 -46
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +154 -142
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +19 -19
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +281 -275
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +135 -135
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +304 -299
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +119 -119
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +359 -341
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +14 -14
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +117 -117
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +373 -371
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +157 -115
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1114 -540
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +50 -20
- package/SparkLine.js.map +1 -1
- package/Table.config.js +54 -54
- package/Table.config.js.map +1 -1
- package/Table.js +302 -286
- package/Table.js.map +1 -1
- package/common/Charting.js +41 -41
- package/common/Charting.js.map +1 -1
- package/common/EventsDoc.js +15 -14
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +2 -2
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +2 -2
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +22 -22
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +32 -27
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +4 -4
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +2 -2
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +14 -14
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +12 -12
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +4 -4
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +112 -112
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +21 -15
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +10 -9
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +3 -3
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +2 -2
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +84 -80
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +2 -2
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +27 -9
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +26 -26
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +2 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +107 -104
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +19 -19
package/ChoroplethSvg.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 = 185);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
@@ -212,14 +212,14 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
|
212
212
|
var width = _ref.width;
|
|
213
213
|
return {
|
|
214
214
|
style: {
|
|
215
|
-
width: style_1.toPx(width)
|
|
215
|
+
width: (0, style_1.toPx)(width)
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
}).withConfig({
|
|
219
219
|
displayName: "FixedSizeContainer__Item",
|
|
220
220
|
componentId: "sc-1yhgpod-0"
|
|
221
221
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
222
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
222
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
223
223
|
});
|
|
224
224
|
// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
225
225
|
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
@@ -227,16 +227,16 @@ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
|
227
227
|
height = _ref2.height;
|
|
228
228
|
return {
|
|
229
229
|
style: Object.assign(Object.assign({}, width && {
|
|
230
|
-
width: style_1.toPx(width)
|
|
230
|
+
width: (0, style_1.toPx)(width)
|
|
231
231
|
}), height && {
|
|
232
|
-
height: style_1.toPx(height)
|
|
232
|
+
height: (0, style_1.toPx)(height)
|
|
233
233
|
})
|
|
234
234
|
};
|
|
235
235
|
}).withConfig({
|
|
236
236
|
displayName: "FixedSizeContainer__FixSizeItem",
|
|
237
237
|
componentId: "sc-1yhgpod-1"
|
|
238
238
|
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
239
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
239
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
240
240
|
});
|
|
241
241
|
var ItemContent = styled_components_1.default.div.withConfig({
|
|
242
242
|
displayName: "FixedSizeContainer__ItemContent",
|
|
@@ -260,7 +260,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
260
260
|
}
|
|
261
261
|
return React.createElement(FixSizeItem, {
|
|
262
262
|
"data-test": "fix-size-item",
|
|
263
|
-
"data-splunk-visualization-version": "
|
|
263
|
+
"data-splunk-visualization-version": "26.0.0 - 2f7458907",
|
|
264
264
|
width: width,
|
|
265
265
|
height: height,
|
|
266
266
|
backgroundColor: backgroundColor
|
|
@@ -499,8 +499,8 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
499
499
|
*/
|
|
500
500
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
501
501
|
return presets.find(function (preset) {
|
|
502
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
503
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
502
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
503
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
504
504
|
var presetContextKeys = Object.keys(presetContext);
|
|
505
505
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
506
506
|
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
@@ -517,7 +517,7 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
517
517
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
518
518
|
*/
|
|
519
519
|
function generatePrecisionValues(numPrecisionValues) {
|
|
520
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
520
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
521
521
|
return {
|
|
522
522
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
523
523
|
value: i
|
|
@@ -564,30 +564,36 @@ module.exports = require("@splunk/themes/pick");
|
|
|
564
564
|
/* 25 */
|
|
565
565
|
/***/ (function(module, exports) {
|
|
566
566
|
|
|
567
|
-
module.exports = require("@splunk/
|
|
567
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
568
568
|
|
|
569
569
|
/***/ }),
|
|
570
570
|
/* 26 */
|
|
571
571
|
/***/ (function(module, exports) {
|
|
572
572
|
|
|
573
|
-
module.exports = require("@splunk/
|
|
573
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
574
574
|
|
|
575
575
|
/***/ }),
|
|
576
576
|
/* 27 */
|
|
577
577
|
/***/ (function(module, exports) {
|
|
578
578
|
|
|
579
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
580
|
+
|
|
581
|
+
/***/ }),
|
|
582
|
+
/* 28 */
|
|
583
|
+
/***/ (function(module, exports) {
|
|
584
|
+
|
|
579
585
|
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
580
586
|
|
|
581
587
|
/***/ }),
|
|
582
|
-
/*
|
|
583
|
-
/*
|
|
588
|
+
/* 29 */,
|
|
589
|
+
/* 30 */
|
|
584
590
|
/***/ (function(module, exports) {
|
|
585
591
|
|
|
586
592
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
587
593
|
|
|
588
594
|
/***/ }),
|
|
589
|
-
/*
|
|
590
|
-
/*
|
|
595
|
+
/* 31 */,
|
|
596
|
+
/* 32 */
|
|
591
597
|
/***/ (function(module, exports, __webpack_require__) {
|
|
592
598
|
|
|
593
599
|
"use strict";
|
|
@@ -611,9 +617,9 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
611
617
|
*/
|
|
612
618
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
613
619
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
614
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
620
|
+
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
615
621
|
var noData = data === undefined;
|
|
616
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
622
|
+
var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
|
|
617
623
|
var noFields = fields === undefined;
|
|
618
624
|
return loading || noData || noFields;
|
|
619
625
|
};
|
|
@@ -654,7 +660,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
654
660
|
width: width,
|
|
655
661
|
height: height,
|
|
656
662
|
level: "warning",
|
|
657
|
-
message: i18n_1._('No DataSource Connected')
|
|
663
|
+
message: (0, i18n_1._)('No DataSource Connected')
|
|
658
664
|
});
|
|
659
665
|
};
|
|
660
666
|
IconPlaceholder.propTypes = propTypes;
|
|
@@ -662,13 +668,7 @@ IconPlaceholder.defaultProps = {
|
|
|
662
668
|
width: '100%',
|
|
663
669
|
height: 250
|
|
664
670
|
};
|
|
665
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
666
|
-
|
|
667
|
-
/***/ }),
|
|
668
|
-
/* 32 */
|
|
669
|
-
/***/ (function(module, exports) {
|
|
670
|
-
|
|
671
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
671
|
+
exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
672
672
|
|
|
673
673
|
/***/ }),
|
|
674
674
|
/* 33 */
|
|
@@ -702,7 +702,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
702
702
|
};
|
|
703
703
|
var onSort;
|
|
704
704
|
if (typeof onRequestParamsChange === 'function') {
|
|
705
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
705
|
+
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
706
706
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
707
707
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
708
708
|
}
|
|
@@ -711,7 +711,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
711
711
|
var sortKey = _ref2.sortKey,
|
|
712
712
|
sortDir = _ref2.sortDir;
|
|
713
713
|
if (typeof sortKey === 'string') {
|
|
714
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
714
|
+
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
715
715
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
716
716
|
offset: 0,
|
|
717
717
|
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
@@ -761,7 +761,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
761
761
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
762
762
|
var page = _ref2.page,
|
|
763
763
|
countArg = _ref2.count;
|
|
764
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
764
|
+
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
765
765
|
if (typeof countArg === 'number') {
|
|
766
766
|
newParams.count = countArg;
|
|
767
767
|
newParams.offset = 0;
|
|
@@ -823,16 +823,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
823
823
|
var React = __webpack_require__(1);
|
|
824
824
|
var lodash_1 = __webpack_require__(3);
|
|
825
825
|
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
826
|
-
var Options_1 = __webpack_require__(
|
|
826
|
+
var Options_1 = __webpack_require__(30);
|
|
827
827
|
var SanitizeProps_1 = __webpack_require__(38);
|
|
828
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
828
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
829
829
|
var moment_1 = __webpack_require__(39);
|
|
830
830
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
831
831
|
var styled_components_1 = __webpack_require__(4);
|
|
832
|
-
var hocUtils_1 = __webpack_require__(
|
|
833
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
832
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
833
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
834
834
|
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
835
|
-
var id_1 = __webpack_require__(
|
|
835
|
+
var id_1 = __webpack_require__(25);
|
|
836
836
|
var SplunkVisualization_1 = __webpack_require__(41);
|
|
837
837
|
var VizBehavior_1 = __webpack_require__(6);
|
|
838
838
|
var getSorting_1 = __webpack_require__(33);
|
|
@@ -853,8 +853,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
853
853
|
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
854
854
|
disableEditModeCover = opts.disableEditModeCover,
|
|
855
855
|
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
856
|
-
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
857
|
-
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
856
|
+
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
857
|
+
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
858
858
|
var DashboardViz = function DashboardViz(props) {
|
|
859
859
|
var _a;
|
|
860
860
|
var mode = props.mode,
|
|
@@ -889,19 +889,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
889
889
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
890
890
|
};
|
|
891
891
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
892
|
-
var
|
|
892
|
+
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
893
893
|
theme: theme
|
|
894
894
|
}),
|
|
895
|
-
currentThemeFamily =
|
|
896
|
-
currentThemeColorScheme =
|
|
897
|
-
currentThemeDensity =
|
|
895
|
+
currentThemeFamily = _ref.family,
|
|
896
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
897
|
+
currentThemeDensity = _ref.density;
|
|
898
898
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
899
899
|
var _React$useState = React.useState({}),
|
|
900
900
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
901
901
|
evaluatedOptionsAsync = _React$useState2[0],
|
|
902
902
|
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
903
903
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
904
|
-
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
|
|
904
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
905
905
|
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
906
906
|
visualizationID = _React$useState4[0];
|
|
907
907
|
var _React$useState5 = React.useState({}),
|
|
@@ -912,16 +912,17 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
912
912
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
913
913
|
dataFramesInState = _React$useState8[0],
|
|
914
914
|
setDataFramesInState = _React$useState8[1];
|
|
915
|
-
var _React$useState9 = React.useState(Boolean(featureFlagContext
|
|
915
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
916
916
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
917
917
|
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
918
918
|
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
919
|
-
|
|
919
|
+
var isMounted = React.useRef(true);
|
|
920
|
+
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
920
921
|
try {
|
|
921
922
|
if (useAsyncEvaluatedOptions) {
|
|
922
923
|
var optionsToEvaluate = {
|
|
923
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
924
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
924
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
925
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
925
926
|
};
|
|
926
927
|
var asyncDynamicOptionsEvaluatorParams = {
|
|
927
928
|
visualizationID: visualizationID,
|
|
@@ -932,10 +933,10 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
932
933
|
};
|
|
933
934
|
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
934
935
|
setEvaluatedOptionsAsync(results.results);
|
|
935
|
-
}).catch(function (
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
936
|
+
}).catch(function () {
|
|
937
|
+
if (isMounted.current) {
|
|
938
|
+
setUseAsyncEvaluatedOptions(false);
|
|
939
|
+
}
|
|
939
940
|
});
|
|
940
941
|
} else {
|
|
941
942
|
var dataFrames = dataFramesInState;
|
|
@@ -945,8 +946,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
945
946
|
setDataFramesInState(dataFrames);
|
|
946
947
|
}
|
|
947
948
|
return Options_1.Options.evaluate({
|
|
948
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
949
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
949
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
950
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
950
951
|
}, dataSources, themeFunc, dataFrames);
|
|
951
952
|
}
|
|
952
953
|
} catch (e) {
|
|
@@ -975,6 +976,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
975
976
|
React.useEffect(function () {
|
|
976
977
|
return function () {
|
|
977
978
|
if (useAsyncEvaluatedOptions) {
|
|
979
|
+
isMounted.current = false;
|
|
978
980
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
979
981
|
}
|
|
980
982
|
};
|
|
@@ -984,7 +986,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
984
986
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
985
987
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
986
988
|
supports = vizConfig.supports;
|
|
987
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
989
|
+
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
988
990
|
if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && vizConfig.key !== 'splunk.singlevalue' // For SV missing props msg is not displayed if required props majorValue is missing, instead this will be handled from the component, instead handled within component
|
|
989
991
|
) {
|
|
990
992
|
return React.createElement(MissingPropsMessage_1.default, {
|
|
@@ -1000,7 +1002,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1000
1002
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1001
1003
|
var supportedEvents = vizConfig.events;
|
|
1002
1004
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1003
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1005
|
+
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1004
1006
|
eventCallbackProps[eventCallbackPropName] = null;
|
|
1005
1007
|
// todo: refactor single value and single value icon to send payload from viz
|
|
1006
1008
|
// then remove these lines
|
|
@@ -1043,19 +1045,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1043
1045
|
*/
|
|
1044
1046
|
var dataSourceMetadata = {};
|
|
1045
1047
|
var OptionKey = 'paginateDataSourceKey';
|
|
1046
|
-
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1047
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1048
|
-
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1049
|
-
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1048
|
+
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1049
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1050
|
+
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1051
|
+
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1050
1052
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1051
1053
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1052
1054
|
};
|
|
1053
|
-
var sortParams = getSorting_1.getSortingParams({
|
|
1055
|
+
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1054
1056
|
requestParams: requestParams,
|
|
1055
1057
|
meta: meta,
|
|
1056
1058
|
onRequestParamsChange: handleRequestParamsChange
|
|
1057
1059
|
});
|
|
1058
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1060
|
+
var paginatorParams = (0, getPagination_1.getPaginationParams)({
|
|
1059
1061
|
requestParams: requestParams,
|
|
1060
1062
|
meta: meta,
|
|
1061
1063
|
onRequestParamsChange: handleRequestParamsChange
|
|
@@ -1083,7 +1085,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1083
1085
|
// attach viz config
|
|
1084
1086
|
DashboardViz.config = vizConfig;
|
|
1085
1087
|
// @ts-ignore: TODO fix sc upgrade TS issues
|
|
1086
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1088
|
+
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1087
1089
|
};
|
|
1088
1090
|
exports.default = withDashboardViz;
|
|
1089
1091
|
|
|
@@ -1312,8 +1314,8 @@ var lodash_1 = __webpack_require__(3);
|
|
|
1312
1314
|
* @param dependencies an array of dependencies
|
|
1313
1315
|
*/
|
|
1314
1316
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
1315
|
-
var ref = react_1.useRef();
|
|
1316
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
1317
|
+
var ref = (0, react_1.useRef)();
|
|
1318
|
+
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
1317
1319
|
ref.current = {
|
|
1318
1320
|
dependencies: dependencies,
|
|
1319
1321
|
value: fn()
|
|
@@ -1356,7 +1358,7 @@ exports.isMissing = isMissing;
|
|
|
1356
1358
|
*/
|
|
1357
1359
|
var missingKeys = function missingKeys(keys, target) {
|
|
1358
1360
|
return keys.filter(function (k) {
|
|
1359
|
-
return exports.isMissing(target[k]);
|
|
1361
|
+
return (0, exports.isMissing)(target[k]);
|
|
1360
1362
|
});
|
|
1361
1363
|
};
|
|
1362
1364
|
exports.missingKeys = missingKeys;
|
|
@@ -1380,7 +1382,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
|
1380
1382
|
"data-test": "message",
|
|
1381
1383
|
width: width,
|
|
1382
1384
|
height: height,
|
|
1383
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
1385
|
+
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
1384
1386
|
});
|
|
1385
1387
|
};
|
|
1386
1388
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
@@ -1389,7 +1391,7 @@ exports.MissingPropsMessage.defaultProps = {
|
|
|
1389
1391
|
width: '100%',
|
|
1390
1392
|
height: 250
|
|
1391
1393
|
};
|
|
1392
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
1394
|
+
exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
|
|
1393
1395
|
|
|
1394
1396
|
/***/ }),
|
|
1395
1397
|
/* 46 */
|
|
@@ -1409,7 +1411,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1409
1411
|
componentId: "sc-1gsbnxb-0"
|
|
1410
1412
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1411
1413
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1412
|
-
'data-splunk-visualization-version': "
|
|
1414
|
+
'data-splunk-visualization-version': "26.0.0 - 2f7458907"
|
|
1413
1415
|
}).withConfig({
|
|
1414
1416
|
displayName: "withEditModeCover__Blocker",
|
|
1415
1417
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1428,7 +1430,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
1428
1430
|
"data-test": "edit-mode-cover"
|
|
1429
1431
|
}));
|
|
1430
1432
|
};
|
|
1431
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1433
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1432
1434
|
Wrapper: Wrapper,
|
|
1433
1435
|
Visualization: Visualization
|
|
1434
1436
|
});
|
|
@@ -1449,7 +1451,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1449
1451
|
var React = __webpack_require__(1);
|
|
1450
1452
|
var colorUtils_1 = __webpack_require__(12);
|
|
1451
1453
|
var variables_1 = __webpack_require__(11);
|
|
1452
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1454
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1453
1455
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1454
1456
|
var hocUtils_1 = __webpack_require__(15);
|
|
1455
1457
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
@@ -1464,7 +1466,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1464
1466
|
height = props.height,
|
|
1465
1467
|
width = props.width;
|
|
1466
1468
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
1467
|
-
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);
|
|
1469
|
+
var bgColorFromTheme = (0, 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);
|
|
1468
1470
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
1469
1471
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
1470
1472
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
@@ -1479,7 +1481,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
1479
1481
|
}
|
|
1480
1482
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
1481
1483
|
};
|
|
1482
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
1484
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
1483
1485
|
Wrapper: Wrapper,
|
|
1484
1486
|
Visualization: Visualization
|
|
1485
1487
|
});
|
|
@@ -1489,13 +1491,13 @@ exports.default = withPlaceholder;
|
|
|
1489
1491
|
|
|
1490
1492
|
/***/ }),
|
|
1491
1493
|
/* 48 */,
|
|
1492
|
-
/* 49
|
|
1494
|
+
/* 49 */,
|
|
1495
|
+
/* 50 */
|
|
1493
1496
|
/***/ (function(module, exports) {
|
|
1494
1497
|
|
|
1495
1498
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
1496
1499
|
|
|
1497
1500
|
/***/ }),
|
|
1498
|
-
/* 50 */,
|
|
1499
1501
|
/* 51 */,
|
|
1500
1502
|
/* 52 */
|
|
1501
1503
|
/***/ (function(module, exports) {
|
|
@@ -1510,39 +1512,40 @@ module.exports = require("@splunk/visualization-icons");
|
|
|
1510
1512
|
/* 57 */,
|
|
1511
1513
|
/* 58 */,
|
|
1512
1514
|
/* 59 */,
|
|
1513
|
-
/* 60
|
|
1515
|
+
/* 60 */,
|
|
1516
|
+
/* 61 */
|
|
1514
1517
|
/***/ (function(module, exports) {
|
|
1515
1518
|
|
|
1516
1519
|
module.exports = require("@splunk/visualization-color-palettes/editors/PresetPalettes");
|
|
1517
1520
|
|
|
1518
1521
|
/***/ }),
|
|
1519
|
-
/*
|
|
1520
|
-
/*
|
|
1522
|
+
/* 62 */,
|
|
1523
|
+
/* 63 */
|
|
1521
1524
|
/***/ (function(module, exports) {
|
|
1522
1525
|
|
|
1523
1526
|
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
1524
1527
|
|
|
1525
1528
|
/***/ }),
|
|
1526
|
-
/* 63 */,
|
|
1527
1529
|
/* 64 */,
|
|
1528
1530
|
/* 65 */,
|
|
1529
1531
|
/* 66 */,
|
|
1530
1532
|
/* 67 */,
|
|
1531
1533
|
/* 68 */,
|
|
1532
1534
|
/* 69 */,
|
|
1533
|
-
/* 70
|
|
1535
|
+
/* 70 */,
|
|
1536
|
+
/* 71 */
|
|
1534
1537
|
/***/ (function(module, exports) {
|
|
1535
1538
|
|
|
1536
1539
|
module.exports = require("@babel/runtime/helpers/inherits");
|
|
1537
1540
|
|
|
1538
1541
|
/***/ }),
|
|
1539
|
-
/*
|
|
1542
|
+
/* 72 */
|
|
1540
1543
|
/***/ (function(module, exports) {
|
|
1541
1544
|
|
|
1542
1545
|
module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
1543
1546
|
|
|
1544
1547
|
/***/ }),
|
|
1545
|
-
/*
|
|
1548
|
+
/* 73 */
|
|
1546
1549
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1547
1550
|
|
|
1548
1551
|
"use strict";
|
|
@@ -1566,7 +1569,6 @@ VizStyleWrapper.displayName = 'VizStyleWrapper';
|
|
|
1566
1569
|
/* harmony default export */ __webpack_exports__["default"] = (VizStyleWrapper);
|
|
1567
1570
|
|
|
1568
1571
|
/***/ }),
|
|
1569
|
-
/* 73 */,
|
|
1570
1572
|
/* 74 */,
|
|
1571
1573
|
/* 75 */,
|
|
1572
1574
|
/* 76 */,
|
|
@@ -1582,7 +1584,8 @@ VizStyleWrapper.displayName = 'VizStyleWrapper';
|
|
|
1582
1584
|
/* 86 */,
|
|
1583
1585
|
/* 87 */,
|
|
1584
1586
|
/* 88 */,
|
|
1585
|
-
/* 89
|
|
1587
|
+
/* 89 */,
|
|
1588
|
+
/* 90 */
|
|
1586
1589
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1587
1590
|
|
|
1588
1591
|
"use strict";
|
|
@@ -1605,7 +1608,6 @@ var StaticBackgroundColorEditor = {
|
|
|
1605
1608
|
/* harmony default export */ __webpack_exports__["default"] = (StaticBackgroundColorEditor);
|
|
1606
1609
|
|
|
1607
1610
|
/***/ }),
|
|
1608
|
-
/* 90 */,
|
|
1609
1611
|
/* 91 */,
|
|
1610
1612
|
/* 92 */,
|
|
1611
1613
|
/* 93 */,
|
|
@@ -1659,7 +1661,10 @@ var StaticBackgroundColorEditor = {
|
|
|
1659
1661
|
/* 141 */,
|
|
1660
1662
|
/* 142 */,
|
|
1661
1663
|
/* 143 */,
|
|
1662
|
-
/* 144
|
|
1664
|
+
/* 144 */,
|
|
1665
|
+
/* 145 */,
|
|
1666
|
+
/* 146 */,
|
|
1667
|
+
/* 147 */
|
|
1663
1668
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1664
1669
|
|
|
1665
1670
|
"use strict";
|
|
@@ -1667,9 +1672,9 @@ var StaticBackgroundColorEditor = {
|
|
|
1667
1672
|
|
|
1668
1673
|
var _classCallCheck = __webpack_require__(9);
|
|
1669
1674
|
var _createClass = __webpack_require__(18);
|
|
1670
|
-
var _inherits = __webpack_require__(
|
|
1671
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
1672
|
-
var _getPrototypeOf = __webpack_require__(
|
|
1675
|
+
var _inherits = __webpack_require__(71);
|
|
1676
|
+
var _possibleConstructorReturn = __webpack_require__(72);
|
|
1677
|
+
var _getPrototypeOf = __webpack_require__(63);
|
|
1673
1678
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1674
1679
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1675
1680
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1677,7 +1682,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1677
1682
|
});
|
|
1678
1683
|
var React = __webpack_require__(1);
|
|
1679
1684
|
var lodash_1 = __webpack_require__(3);
|
|
1680
|
-
var SvgMutator_1 = __webpack_require__(
|
|
1685
|
+
var SvgMutator_1 = __webpack_require__(190);
|
|
1681
1686
|
/**
|
|
1682
1687
|
* This react component simply take an SVG document, and mutates it by applying data to the document according to
|
|
1683
1688
|
* dataBindings. The data (data prop) is processed by performing the mutation once for each 'row' of the data even though the data is formatted as columns.
|
|
@@ -1723,14 +1728,14 @@ var SvgChoroplethDynamic = /*#__PURE__*/function (_React$Component) {
|
|
|
1723
1728
|
}, {
|
|
1724
1729
|
key: "shouldComponentUpdate",
|
|
1725
1730
|
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
1726
|
-
return nextProps.svg !== this.props.svg || !lodash_1.isEqual(nextProps.data, this.props.data) ||
|
|
1731
|
+
return nextProps.svg !== this.props.svg || !(0, lodash_1.isEqual)(nextProps.data, this.props.data) ||
|
|
1727
1732
|
// must do deep equal on data because when no data is passed we do 'let data = { featureIDs: [], values: [], fill: [] };' in ChoroplethSVG which looks to react like different data every time
|
|
1728
|
-
nextState.svgNode !== this.state.svgNode || !lodash_1.isEqual(nextProps.width, this.props.width) || !lodash_1.isEqual(nextProps.height, this.props.height);
|
|
1733
|
+
nextState.svgNode !== this.state.svgNode || !(0, lodash_1.isEqual)(nextProps.width, this.props.width) || !(0, lodash_1.isEqual)(nextProps.height, this.props.height);
|
|
1729
1734
|
}
|
|
1730
1735
|
}, {
|
|
1731
1736
|
key: "componentDidUpdate",
|
|
1732
1737
|
value: function componentDidUpdate(prevProps) {
|
|
1733
|
-
if (prevProps.svg !== this.props.svg || !lodash_1.isEqual(prevProps.data, this.props.data) || !lodash_1.isEqual(prevProps.width, this.props.width) || !lodash_1.isEqual(prevProps.height, this.props.height)) {
|
|
1738
|
+
if (prevProps.svg !== this.props.svg || !(0, lodash_1.isEqual)(prevProps.data, this.props.data) || !(0, lodash_1.isEqual)(prevProps.width, this.props.width) || !(0, lodash_1.isEqual)(prevProps.height, this.props.height)) {
|
|
1734
1739
|
this.mutate();
|
|
1735
1740
|
}
|
|
1736
1741
|
}
|
|
@@ -1786,9 +1791,6 @@ SvgChoroplethDynamic.defaultProps = {
|
|
|
1786
1791
|
};
|
|
1787
1792
|
|
|
1788
1793
|
/***/ }),
|
|
1789
|
-
/* 145 */,
|
|
1790
|
-
/* 146 */,
|
|
1791
|
-
/* 147 */,
|
|
1792
1794
|
/* 148 */,
|
|
1793
1795
|
/* 149 */,
|
|
1794
1796
|
/* 150 */,
|
|
@@ -1823,7 +1825,10 @@ SvgChoroplethDynamic.defaultProps = {
|
|
|
1823
1825
|
/* 179 */,
|
|
1824
1826
|
/* 180 */,
|
|
1825
1827
|
/* 181 */,
|
|
1826
|
-
/* 182
|
|
1828
|
+
/* 182 */,
|
|
1829
|
+
/* 183 */,
|
|
1830
|
+
/* 184 */,
|
|
1831
|
+
/* 185 */
|
|
1827
1832
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1828
1833
|
|
|
1829
1834
|
"use strict";
|
|
@@ -1847,16 +1852,16 @@ var React = __webpack_require__(1);
|
|
|
1847
1852
|
var T = __webpack_require__(0);
|
|
1848
1853
|
var lodash_1 = __webpack_require__(3);
|
|
1849
1854
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
1850
|
-
var ImageContext_1 = __webpack_require__(
|
|
1851
|
-
var FileDownloader_1 = __webpack_require__(
|
|
1852
|
-
var Downloader_1 = __webpack_require__(
|
|
1855
|
+
var ImageContext_1 = __webpack_require__(186);
|
|
1856
|
+
var FileDownloader_1 = __webpack_require__(187);
|
|
1857
|
+
var Downloader_1 = __webpack_require__(188);
|
|
1853
1858
|
var withDashboardViz_1 = __webpack_require__(36);
|
|
1854
|
-
var PureChoroplethSvg_1 = __webpack_require__(
|
|
1855
|
-
var SvgChoroplethDynamic_1 = __webpack_require__(
|
|
1856
|
-
var config_1 = __webpack_require__(
|
|
1857
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1858
|
-
var urlUtils_1 = __webpack_require__(
|
|
1859
|
-
var ErrorMessage_1 = __webpack_require__(
|
|
1859
|
+
var PureChoroplethSvg_1 = __webpack_require__(189);
|
|
1860
|
+
var SvgChoroplethDynamic_1 = __webpack_require__(147);
|
|
1861
|
+
var config_1 = __webpack_require__(194);
|
|
1862
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
1863
|
+
var urlUtils_1 = __webpack_require__(195);
|
|
1864
|
+
var ErrorMessage_1 = __webpack_require__(196);
|
|
1860
1865
|
exports.config = config_1.default;
|
|
1861
1866
|
exports.PureChoroplethSvg = PureChoroplethSvg_1.default;
|
|
1862
1867
|
// todo: need remove when deleting @splunk/react-visualizations package
|
|
@@ -1897,7 +1902,7 @@ var ChoroplethSvg = function ChoroplethSvg(_a) {
|
|
|
1897
1902
|
return svg;
|
|
1898
1903
|
}
|
|
1899
1904
|
var trimmed = svg.trim();
|
|
1900
|
-
if (urlUtils_1.isValidUrl(trimmed)) {
|
|
1905
|
+
if ((0, urlUtils_1.isValidUrl)(trimmed)) {
|
|
1901
1906
|
return trimmed;
|
|
1902
1907
|
}
|
|
1903
1908
|
if (/.*<svg.*/i.test(trimmed)) {
|
|
@@ -1911,7 +1916,7 @@ var ChoroplethSvg = function ChoroplethSvg(_a) {
|
|
|
1911
1916
|
return React.createElement(FeatureFlagContext_1.default.Consumer, null, function (featureFlagContext) {
|
|
1912
1917
|
return React.createElement(FileDownloader_1.FileDownloader, {
|
|
1913
1918
|
url: url,
|
|
1914
|
-
protocolHandlers: exports.createProtocolHandlers(featureFlagContext, imageContext),
|
|
1919
|
+
protocolHandlers: (0, exports.createProtocolHandlers)(featureFlagContext, imageContext),
|
|
1915
1920
|
renderContent: function renderContent(svgString) {
|
|
1916
1921
|
var pureVizProps = Object.assign(Object.assign({}, props), {
|
|
1917
1922
|
svg: svgString
|
|
@@ -1931,12 +1936,12 @@ ChoroplethSvg.propTypes = {
|
|
|
1931
1936
|
svg: T.string
|
|
1932
1937
|
};
|
|
1933
1938
|
function useIconPlaceholder(dataSources, loading, options) {
|
|
1934
|
-
var svg = lodash_1.get(options, 'svg');
|
|
1935
|
-
var missingData = IconPlaceholder_1.shouldShowIconPlaceholder(dataSources, loading);
|
|
1939
|
+
var svg = (0, lodash_1.get)(options, 'svg');
|
|
1940
|
+
var missingData = (0, IconPlaceholder_1.shouldShowIconPlaceholder)(dataSources, loading);
|
|
1936
1941
|
return missingData && !svg;
|
|
1937
1942
|
}
|
|
1938
1943
|
exports.useIconPlaceholder = useIconPlaceholder;
|
|
1939
|
-
var platformViz = withDashboardViz_1.default({
|
|
1944
|
+
var platformViz = (0, withDashboardViz_1.default)({
|
|
1940
1945
|
ReactViz: ChoroplethSvg,
|
|
1941
1946
|
vizConfig: config_1.default,
|
|
1942
1947
|
useIconPlaceholder: useIconPlaceholder
|
|
@@ -1946,25 +1951,25 @@ var platformViz = withDashboardViz_1.default({
|
|
|
1946
1951
|
exports.default = platformViz;
|
|
1947
1952
|
|
|
1948
1953
|
/***/ }),
|
|
1949
|
-
/*
|
|
1954
|
+
/* 186 */
|
|
1950
1955
|
/***/ (function(module, exports) {
|
|
1951
1956
|
|
|
1952
1957
|
module.exports = require("@splunk/visualization-context/ImageContext");
|
|
1953
1958
|
|
|
1954
1959
|
/***/ }),
|
|
1955
|
-
/*
|
|
1960
|
+
/* 187 */
|
|
1956
1961
|
/***/ (function(module, exports) {
|
|
1957
1962
|
|
|
1958
1963
|
module.exports = require("@splunk/visualizations-shared/FileDownloader");
|
|
1959
1964
|
|
|
1960
1965
|
/***/ }),
|
|
1961
|
-
/*
|
|
1966
|
+
/* 188 */
|
|
1962
1967
|
/***/ (function(module, exports) {
|
|
1963
1968
|
|
|
1964
1969
|
module.exports = require("@splunk/visualizations-shared/Downloader");
|
|
1965
1970
|
|
|
1966
1971
|
/***/ }),
|
|
1967
|
-
/*
|
|
1972
|
+
/* 189 */
|
|
1968
1973
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1969
1974
|
|
|
1970
1975
|
"use strict";
|
|
@@ -1989,13 +1994,13 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
1989
1994
|
var lodash_1 = __webpack_require__(3);
|
|
1990
1995
|
var style_1 = __webpack_require__(14);
|
|
1991
1996
|
var SizeAwareWrapper_1 = __webpack_require__(19);
|
|
1992
|
-
var SvgChoroplethDynamic_1 = __webpack_require__(
|
|
1993
|
-
var VizStyleWrapper_1 = __webpack_require__(
|
|
1997
|
+
var SvgChoroplethDynamic_1 = __webpack_require__(147);
|
|
1998
|
+
var VizStyleWrapper_1 = __webpack_require__(73);
|
|
1994
1999
|
var Container = styled_components_1.default.div.withConfig({
|
|
1995
2000
|
displayName: "PureChoroplethSvg__Container",
|
|
1996
2001
|
componentId: "m24jrf-0"
|
|
1997
2002
|
})(["position:relative;flex-direction:column;flex:1;display:flex;", ";"], function (props) {
|
|
1998
|
-
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
2003
|
+
return (0, style_1.toDimension)((0, lodash_1.pick)(props, ['width', 'height']));
|
|
1999
2004
|
});
|
|
2000
2005
|
var ChoroplethSvgWrapper = styled_components_1.default.div.withConfig({
|
|
2001
2006
|
displayName: "PureChoroplethSvg__ChoroplethSvgWrapper",
|
|
@@ -2013,7 +2018,7 @@ var computeSvgDynamicProps = function computeSvgDynamicProps(_a) {
|
|
|
2013
2018
|
xPath: "'//*[@id=\"'+featureIDs[$i]+'\"]/@fill'",
|
|
2014
2019
|
value: 'fill[$i]'
|
|
2015
2020
|
}];
|
|
2016
|
-
return Object.assign(Object.assign({}, lodash_1.omit(props, ['areaIds', 'areaValues', 'areaColors'])), {
|
|
2021
|
+
return Object.assign(Object.assign({}, (0, lodash_1.omit)(props, ['areaIds', 'areaValues', 'areaColors'])), {
|
|
2017
2022
|
data: data,
|
|
2018
2023
|
dataBinding: dataBinding
|
|
2019
2024
|
});
|
|
@@ -2027,7 +2032,7 @@ var PureChoroplethSvg = function PureChoroplethSvg(_a) {
|
|
|
2027
2032
|
var renderVisualization = function renderVisualization(_ref) {
|
|
2028
2033
|
var containerWidth = _ref.width,
|
|
2029
2034
|
containerHeight = _ref.height;
|
|
2030
|
-
var svgProps = exports.computeSvgDynamicProps(Object.assign(Object.assign({}, props), {
|
|
2035
|
+
var svgProps = (0, exports.computeSvgDynamicProps)(Object.assign(Object.assign({}, props), {
|
|
2031
2036
|
width: containerWidth,
|
|
2032
2037
|
height: containerHeight
|
|
2033
2038
|
}));
|
|
@@ -2048,10 +2053,10 @@ PureChoroplethSvg.defaultProps = {
|
|
|
2048
2053
|
height: 250,
|
|
2049
2054
|
onAreaClick: function onAreaClick() {}
|
|
2050
2055
|
};
|
|
2051
|
-
exports.default = styled_components_1.withTheme(PureChoroplethSvg);
|
|
2056
|
+
exports.default = (0, styled_components_1.withTheme)(PureChoroplethSvg);
|
|
2052
2057
|
|
|
2053
2058
|
/***/ }),
|
|
2054
|
-
/*
|
|
2059
|
+
/* 190 */
|
|
2055
2060
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2056
2061
|
|
|
2057
2062
|
"use strict";
|
|
@@ -2065,9 +2070,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2065
2070
|
exports.SvgMutator = exports.ERROR_NON_ATTRIBUTE_MUTATION = void 0;
|
|
2066
2071
|
/* eslint-disable no-param-reassign */
|
|
2067
2072
|
var React = __webpack_require__(1);
|
|
2068
|
-
var XPath = __webpack_require__(
|
|
2069
|
-
var xmldom_1 = __webpack_require__(
|
|
2070
|
-
var jexl = __webpack_require__(
|
|
2073
|
+
var XPath = __webpack_require__(191);
|
|
2074
|
+
var xmldom_1 = __webpack_require__(192);
|
|
2075
|
+
var jexl = __webpack_require__(193);
|
|
2071
2076
|
/**
|
|
2072
2077
|
* An error message indicating that a mutation has attempted to target anything other than SVG attribute(s)
|
|
2073
2078
|
* @type {string}
|
|
@@ -2429,25 +2434,25 @@ exports.SvgMutator = SvgMutator;
|
|
|
2429
2434
|
SvgMutator.serializer = new xmldom_1.XMLSerializer();
|
|
2430
2435
|
|
|
2431
2436
|
/***/ }),
|
|
2432
|
-
/*
|
|
2437
|
+
/* 191 */
|
|
2433
2438
|
/***/ (function(module, exports) {
|
|
2434
2439
|
|
|
2435
2440
|
module.exports = require("xpath");
|
|
2436
2441
|
|
|
2437
2442
|
/***/ }),
|
|
2438
|
-
/*
|
|
2443
|
+
/* 192 */
|
|
2439
2444
|
/***/ (function(module, exports) {
|
|
2440
2445
|
|
|
2441
2446
|
module.exports = require("@xmldom/xmldom");
|
|
2442
2447
|
|
|
2443
2448
|
/***/ }),
|
|
2444
|
-
/*
|
|
2449
|
+
/* 193 */
|
|
2445
2450
|
/***/ (function(module, exports) {
|
|
2446
2451
|
|
|
2447
2452
|
module.exports = require("jexl");
|
|
2448
2453
|
|
|
2449
2454
|
/***/ }),
|
|
2450
|
-
/*
|
|
2455
|
+
/* 194 */
|
|
2451
2456
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2452
2457
|
|
|
2453
2458
|
"use strict";
|
|
@@ -2460,13 +2465,13 @@ var i18n_1 = __webpack_require__(2);
|
|
|
2460
2465
|
var pick_1 = __webpack_require__(23);
|
|
2461
2466
|
var variables_1 = __webpack_require__(11);
|
|
2462
2467
|
var schemaUtils_1 = __webpack_require__(16);
|
|
2463
|
-
var PresetPalettes_1 = __webpack_require__(
|
|
2468
|
+
var PresetPalettes_1 = __webpack_require__(61);
|
|
2464
2469
|
var visualization_icons_1 = __webpack_require__(52);
|
|
2465
|
-
var placeholders_1 = __webpack_require__(
|
|
2470
|
+
var placeholders_1 = __webpack_require__(50);
|
|
2466
2471
|
var VizBehavior_1 = __webpack_require__(6);
|
|
2467
2472
|
var configUtils_1 = __webpack_require__(20);
|
|
2468
2473
|
var VizCategory_1 = __webpack_require__(35);
|
|
2469
|
-
var StaticBackgroundColorEditor_1 = __webpack_require__(
|
|
2474
|
+
var StaticBackgroundColorEditor_1 = __webpack_require__(90);
|
|
2470
2475
|
var dataContract = {
|
|
2471
2476
|
requiredDataSources: [],
|
|
2472
2477
|
optionalDataSources: [{
|
|
@@ -2551,7 +2556,7 @@ var optionsSchema = {
|
|
|
2551
2556
|
};
|
|
2552
2557
|
var themes = {
|
|
2553
2558
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
2554
|
-
return pick_1.default({
|
|
2559
|
+
return (0, pick_1.default)({
|
|
2555
2560
|
enterprise: {
|
|
2556
2561
|
dark: variables_1.default.black(props),
|
|
2557
2562
|
light: variables_1.default.backgroundColor(props)
|
|
@@ -2561,7 +2566,7 @@ var themes = {
|
|
|
2561
2566
|
}
|
|
2562
2567
|
};
|
|
2563
2568
|
var editorConfig = [{
|
|
2564
|
-
label: i18n_1._('Data configurations'),
|
|
2569
|
+
label: (0, i18n_1._)('Data configurations'),
|
|
2565
2570
|
layout: [[{
|
|
2566
2571
|
label: 'Area IDs',
|
|
2567
2572
|
editor: 'editor.columnSelector',
|
|
@@ -2580,31 +2585,31 @@ var editorConfig = [{
|
|
|
2580
2585
|
}
|
|
2581
2586
|
}]]
|
|
2582
2587
|
}, {
|
|
2583
|
-
label: i18n_1._('Color and style'),
|
|
2588
|
+
label: (0, i18n_1._)('Color and style'),
|
|
2584
2589
|
layout: [[{
|
|
2585
|
-
label: i18n_1._('Areas'),
|
|
2590
|
+
label: (0, i18n_1._)('Areas'),
|
|
2586
2591
|
option: 'areaColors',
|
|
2587
2592
|
context: 'defaultContext',
|
|
2588
2593
|
editor: 'editor.dynamicColor',
|
|
2589
2594
|
editorProps: {
|
|
2590
2595
|
labelPosition: 'top',
|
|
2591
|
-
flyoutTitle: i18n_1._('Dynamic coloring: value'),
|
|
2596
|
+
flyoutTitle: (0, i18n_1._)('Dynamic coloring: value'),
|
|
2592
2597
|
formatters: [{
|
|
2593
|
-
label: i18n_1._('Ranges'),
|
|
2598
|
+
label: (0, i18n_1._)('Ranges'),
|
|
2594
2599
|
value: 'rangeValue',
|
|
2595
2600
|
isDefault: true,
|
|
2596
2601
|
defaults: {
|
|
2597
2602
|
areaValues: defaultContext.areaColorsRangeConfig
|
|
2598
2603
|
}
|
|
2599
2604
|
}, {
|
|
2600
|
-
label: i18n_1._('Matches'),
|
|
2605
|
+
label: (0, i18n_1._)('Matches'),
|
|
2601
2606
|
value: 'matchValue',
|
|
2602
2607
|
defaults: {
|
|
2603
2608
|
areaValues: defaultContext.areaColorsMatchConfig
|
|
2604
2609
|
}
|
|
2605
2610
|
}],
|
|
2606
2611
|
dataSelectors: [{
|
|
2607
|
-
label: i18n_1._('Value'),
|
|
2612
|
+
label: (0, i18n_1._)('Value'),
|
|
2608
2613
|
value: 'areaValues'
|
|
2609
2614
|
}],
|
|
2610
2615
|
defaultPalettesConfig: PresetPalettes_1.defaultPalettesConfig
|
|
@@ -2615,9 +2620,9 @@ var editorConfig = [{
|
|
|
2615
2620
|
}
|
|
2616
2621
|
})]]
|
|
2617
2622
|
}, {
|
|
2618
|
-
label: i18n_1._('SVG content'),
|
|
2623
|
+
label: (0, i18n_1._)('SVG content'),
|
|
2619
2624
|
layout: [[{
|
|
2620
|
-
label: i18n_1._('SVG file'),
|
|
2625
|
+
label: (0, i18n_1._)('SVG file'),
|
|
2621
2626
|
option: 'svg',
|
|
2622
2627
|
editor: 'editor.image',
|
|
2623
2628
|
editorProps: {
|
|
@@ -2637,7 +2642,7 @@ var config = {
|
|
|
2637
2642
|
/**
|
|
2638
2643
|
* viz name
|
|
2639
2644
|
*/
|
|
2640
|
-
name: i18n_1._('Choropleth SVG'),
|
|
2645
|
+
name: (0, i18n_1._)('Choropleth SVG'),
|
|
2641
2646
|
category: VizCategory_1.VizCategory.SPATIAL,
|
|
2642
2647
|
/**
|
|
2643
2648
|
* viz icon
|
|
@@ -2659,10 +2664,10 @@ var config = {
|
|
|
2659
2664
|
supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.EVENTS, VizBehavior_1.VizBehavior.PLACEHOLDER],
|
|
2660
2665
|
themes: themes
|
|
2661
2666
|
};
|
|
2662
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
2667
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
2663
2668
|
|
|
2664
2669
|
/***/ }),
|
|
2665
|
-
/*
|
|
2670
|
+
/* 195 */
|
|
2666
2671
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2667
2672
|
|
|
2668
2673
|
"use strict";
|
|
@@ -2683,7 +2688,7 @@ var isValidUrl = function isValidUrl(value) {
|
|
|
2683
2688
|
exports.isValidUrl = isValidUrl;
|
|
2684
2689
|
|
|
2685
2690
|
/***/ }),
|
|
2686
|
-
/*
|
|
2691
|
+
/* 196 */
|
|
2687
2692
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2688
2693
|
|
|
2689
2694
|
"use strict";
|
|
@@ -2720,7 +2725,7 @@ var ErrorMessage = function ErrorMessage(_a) {
|
|
|
2720
2725
|
"data-testid": "image-icon"
|
|
2721
2726
|
}), React.createElement(Message, null, error));
|
|
2722
2727
|
};
|
|
2723
|
-
exports.default = styled_components_1.withTheme(ErrorMessage);
|
|
2728
|
+
exports.default = (0, styled_components_1.withTheme)(ErrorMessage);
|
|
2724
2729
|
|
|
2725
2730
|
/***/ })
|
|
2726
2731
|
/******/ ]);
|