@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/Map.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 = 410);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
@@ -127,7 +127,7 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
|
|
|
127
127
|
|
|
128
128
|
/***/ }),
|
|
129
129
|
|
|
130
|
-
/***/
|
|
130
|
+
/***/ 121:
|
|
131
131
|
/***/ (function(module, exports, __webpack_require__) {
|
|
132
132
|
|
|
133
133
|
"use strict";
|
|
@@ -139,7 +139,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
139
139
|
exports.convertToArrOfObjects = void 0;
|
|
140
140
|
// TODO: utilize this fn in ParallelCoordinates
|
|
141
141
|
var convertToArrOfObjects = function convertToArrOfObjects(columns, fields) {
|
|
142
|
-
if (!columns || !columns[0].length) return [];
|
|
142
|
+
if (!columns || !columns[0] || !columns[0].length) return [];
|
|
143
143
|
var data = [];
|
|
144
144
|
var _loop = function _loop(i) {
|
|
145
145
|
var newObj = {};
|
|
@@ -180,14 +180,14 @@ var Item = styled_components_1.default.div.attrs(function (_ref) {
|
|
|
180
180
|
var width = _ref.width;
|
|
181
181
|
return {
|
|
182
182
|
style: {
|
|
183
|
-
width: style_1.toPx(width)
|
|
183
|
+
width: (0, style_1.toPx)(width)
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
}).withConfig({
|
|
187
187
|
displayName: "FixedSizeContainer__Item",
|
|
188
188
|
componentId: "sc-1yhgpod-0"
|
|
189
189
|
})(["position:relative;background-color:", "};"], function (props) {
|
|
190
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
190
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
191
191
|
});
|
|
192
192
|
// Use `.attrs()` for highly dynamic styles. Ref: https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291
|
|
193
193
|
var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
@@ -195,16 +195,16 @@ var FixSizeItem = styled_components_1.default.div.attrs(function (_ref2) {
|
|
|
195
195
|
height = _ref2.height;
|
|
196
196
|
return {
|
|
197
197
|
style: Object.assign(Object.assign({}, width && {
|
|
198
|
-
width: style_1.toPx(width)
|
|
198
|
+
width: (0, style_1.toPx)(width)
|
|
199
199
|
}), height && {
|
|
200
|
-
height: style_1.toPx(height)
|
|
200
|
+
height: (0, style_1.toPx)(height)
|
|
201
201
|
})
|
|
202
202
|
};
|
|
203
203
|
}).withConfig({
|
|
204
204
|
displayName: "FixedSizeContainer__FixSizeItem",
|
|
205
205
|
componentId: "sc-1yhgpod-1"
|
|
206
206
|
})(["position:relative;flex-direction:column;flex:1;display:flex;background-color:", "};"], function (props) {
|
|
207
|
-
return colorUtils_1.isColor(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
207
|
+
return (0, colorUtils_1.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor;
|
|
208
208
|
});
|
|
209
209
|
var ItemContent = styled_components_1.default.div.withConfig({
|
|
210
210
|
displayName: "FixedSizeContainer__ItemContent",
|
|
@@ -228,7 +228,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
228
228
|
}
|
|
229
229
|
return React.createElement(FixSizeItem, {
|
|
230
230
|
"data-test": "fix-size-item",
|
|
231
|
-
"data-splunk-visualization-version": "
|
|
231
|
+
"data-splunk-visualization-version": "26.0.0 - 2f7458907",
|
|
232
232
|
width: width,
|
|
233
233
|
height: height,
|
|
234
234
|
backgroundColor: backgroundColor
|
|
@@ -248,7 +248,7 @@ exports.default = withFixedSizeContainer;
|
|
|
248
248
|
|
|
249
249
|
/***/ }),
|
|
250
250
|
|
|
251
|
-
/***/
|
|
251
|
+
/***/ 131:
|
|
252
252
|
/***/ (function(module, exports, __webpack_require__) {
|
|
253
253
|
|
|
254
254
|
"use strict";
|
|
@@ -257,6 +257,8 @@ exports.default = withFixedSizeContainer;
|
|
|
257
257
|
var _slicedToArray = __webpack_require__(17);
|
|
258
258
|
var _defineProperty = __webpack_require__(7);
|
|
259
259
|
var _toConsumableArray = __webpack_require__(8);
|
|
260
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
261
|
+
var _templateObject;
|
|
260
262
|
Object.defineProperty(exports, "__esModule", {
|
|
261
263
|
value: true
|
|
262
264
|
});
|
|
@@ -265,8 +267,8 @@ var React = __webpack_require__(1);
|
|
|
265
267
|
var styled_components_1 = __webpack_require__(4);
|
|
266
268
|
var lodash_1 = __webpack_require__(3);
|
|
267
269
|
var colorUtils_1 = __webpack_require__(12);
|
|
268
|
-
var MapUtils_1 = __webpack_require__(
|
|
269
|
-
var MarkerWrapper_1 = __webpack_require__(
|
|
270
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
271
|
+
var MarkerWrapper_1 = __webpack_require__(132);
|
|
270
272
|
exports.GEO_BOUND_PREFIX = '_geo_bounds_';
|
|
271
273
|
exports.GEO_LAT_AND_LONG_FIELD = ['_geo_long_field', '_geo_lat_field'];
|
|
272
274
|
exports.PieSegment = React.memo(function (_ref) {
|
|
@@ -313,10 +315,7 @@ exports.PieSegment = React.memo(function (_ref) {
|
|
|
313
315
|
});
|
|
314
316
|
});
|
|
315
317
|
exports.PieSegment.displayName = 'MapBubblePieSegment';
|
|
316
|
-
var StyledMarkerWrapper = styled_components_1.default(MarkerWrapper_1.default)
|
|
317
|
-
displayName: "BubbleLayer__StyledMarkerWrapper",
|
|
318
|
-
componentId: "sc-8aqbb-0"
|
|
319
|
-
})(["cursor:pointer;"]);
|
|
318
|
+
var StyledMarkerWrapper = (0, styled_components_1.default)(MarkerWrapper_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n"])));
|
|
320
319
|
exports.Bubble = React.memo(function (_ref3) {
|
|
321
320
|
var originalValues = _ref3.originalValues,
|
|
322
321
|
valueRange = _ref3.valueRange,
|
|
@@ -352,7 +351,7 @@ exports.Bubble = React.memo(function (_ref3) {
|
|
|
352
351
|
offsets.push(total);
|
|
353
352
|
total += count;
|
|
354
353
|
});
|
|
355
|
-
var radius = MapUtils_1.matchBubbleSize(valueRange, total);
|
|
354
|
+
var radius = (0, MapUtils_1.matchBubbleSize)(valueRange, total);
|
|
356
355
|
var width = radius * 2;
|
|
357
356
|
return React.createElement("svg", {
|
|
358
357
|
width: width,
|
|
@@ -400,10 +399,10 @@ var BubbleLayer = function BubbleLayer(props) {
|
|
|
400
399
|
bubbleLayer.seriesColors = bubbleLayer.seriesColors || MapUtils_1.DEFAULT_SERIES_COLORS;
|
|
401
400
|
bubbleLayer.bubbleSize = bubbleLayer.bubbleSize || [];
|
|
402
401
|
var bakedData = React.useMemo(function () {
|
|
403
|
-
return MapUtils_1.bakeBubbleData(bubbleLayer);
|
|
402
|
+
return (0, MapUtils_1.bakeBubbleData)(bubbleLayer);
|
|
404
403
|
}, [bubbleLayer]);
|
|
405
404
|
var staticColors = React.useMemo(function () {
|
|
406
|
-
return MapUtils_1.getStaticColors(bubbleLayer.bubbleSize.length, bubbleLayer.seriesColors);
|
|
405
|
+
return (0, MapUtils_1.getStaticColors)(bubbleLayer.bubbleSize.length, bubbleLayer.seriesColors);
|
|
407
406
|
}, [bubbleLayer.bubbleSize.length, bubbleLayer.seriesColors]);
|
|
408
407
|
var _ref4 = bakedData !== null && bakedData !== void 0 ? bakedData : {},
|
|
409
408
|
_ref4$data = _ref4.data,
|
|
@@ -429,7 +428,7 @@ var BubbleLayer = function BubbleLayer(props) {
|
|
|
429
428
|
}
|
|
430
429
|
return acc;
|
|
431
430
|
}, []).slice(0, resultLimit || MapUtils_1.DEFAULT_RESULT_LIMIT).sort(function (a, b) {
|
|
432
|
-
return lodash_1.sum(b.data.values) - lodash_1.sum(a.data.values);
|
|
431
|
+
return (0, lodash_1.sum)(b.data.values) - (0, lodash_1.sum)(a.data.values);
|
|
433
432
|
});
|
|
434
433
|
}, [data, resultLimit, roundedZoom]);
|
|
435
434
|
var _handleMapClick = React.useCallback(function (e, name, value, i) {
|
|
@@ -451,7 +450,7 @@ var BubbleLayer = function BubbleLayer(props) {
|
|
|
451
450
|
}, [dataToRender, onMapClick]);
|
|
452
451
|
return React.createElement(React.Fragment, null, dataToRender.map(function (datum, i) {
|
|
453
452
|
var colors = dynamicColors ? [dataToRender.map(function (obj) {
|
|
454
|
-
return colorUtils_1.isColor(dynamicColors[obj.idx]) ? dynamicColors[obj.idx] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
453
|
+
return (0, colorUtils_1.isColor)(dynamicColors[obj.idx]) ? dynamicColors[obj.idx] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
455
454
|
})[i]] : staticColors;
|
|
456
455
|
var _datum$data$coordinat = _slicedToArray(datum.data.coordinates, 2),
|
|
457
456
|
longitude = _datum$data$coordinat[0],
|
|
@@ -491,7 +490,7 @@ exports.default = BubbleLayer;
|
|
|
491
490
|
|
|
492
491
|
/***/ }),
|
|
493
492
|
|
|
494
|
-
/***/
|
|
493
|
+
/***/ 132:
|
|
495
494
|
/***/ (function(module, exports, __webpack_require__) {
|
|
496
495
|
|
|
497
496
|
"use strict";
|
|
@@ -511,9 +510,9 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
511
510
|
Object.defineProperty(exports, "__esModule", {
|
|
512
511
|
value: true
|
|
513
512
|
});
|
|
514
|
-
var maplibre_gl_1 = __webpack_require__(
|
|
513
|
+
var maplibre_gl_1 = __webpack_require__(159);
|
|
515
514
|
var React = __webpack_require__(1);
|
|
516
|
-
var Tooltip_1 = __webpack_require__(
|
|
515
|
+
var Tooltip_1 = __webpack_require__(416);
|
|
517
516
|
var MarkerWrapper = function MarkerWrapper(_a) {
|
|
518
517
|
var longitude = _a.longitude,
|
|
519
518
|
latitude = _a.latitude,
|
|
@@ -593,7 +592,7 @@ exports.default = MarkerWrapper;
|
|
|
593
592
|
|
|
594
593
|
/***/ }),
|
|
595
594
|
|
|
596
|
-
/***/
|
|
595
|
+
/***/ 133:
|
|
597
596
|
/***/ (function(module, exports) {
|
|
598
597
|
|
|
599
598
|
module.exports = require("@splunk/visualization-encoding/utils/dsl");
|
|
@@ -638,21 +637,28 @@ exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
|
638
637
|
|
|
639
638
|
/***/ }),
|
|
640
639
|
|
|
641
|
-
/***/
|
|
640
|
+
/***/ 158:
|
|
642
641
|
/***/ (function(module, exports) {
|
|
643
642
|
|
|
644
643
|
module.exports = require("chroma-js");
|
|
645
644
|
|
|
646
645
|
/***/ }),
|
|
647
646
|
|
|
648
|
-
/***/
|
|
647
|
+
/***/ 159:
|
|
649
648
|
/***/ (function(module, exports) {
|
|
650
649
|
|
|
651
650
|
module.exports = require("maplibre-gl");
|
|
652
651
|
|
|
653
652
|
/***/ }),
|
|
654
653
|
|
|
655
|
-
/***/
|
|
654
|
+
/***/ 16:
|
|
655
|
+
/***/ (function(module, exports) {
|
|
656
|
+
|
|
657
|
+
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
658
|
+
|
|
659
|
+
/***/ }),
|
|
660
|
+
|
|
661
|
+
/***/ 160:
|
|
656
662
|
/***/ (function(module, exports, __webpack_require__) {
|
|
657
663
|
|
|
658
664
|
"use strict";
|
|
@@ -665,8 +671,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
665
671
|
exports.Choropleth = exports.cleanupChoropleth = exports.compareChoropleth = exports.compareGeom = void 0;
|
|
666
672
|
var React = __webpack_require__(1);
|
|
667
673
|
var lodash_1 = __webpack_require__(3);
|
|
668
|
-
var MapUtils_1 = __webpack_require__(
|
|
669
|
-
var MarkerWrapper_1 = __webpack_require__(
|
|
674
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
675
|
+
var MarkerWrapper_1 = __webpack_require__(132);
|
|
670
676
|
var getShapeId = function getShapeId(id) {
|
|
671
677
|
return "shape-".concat(id);
|
|
672
678
|
};
|
|
@@ -678,13 +684,13 @@ var getStrokeId = function getStrokeId(id) {
|
|
|
678
684
|
};
|
|
679
685
|
var compareGeom = function compareGeom(prev, next) {
|
|
680
686
|
if (prev !== null && next !== null) {
|
|
681
|
-
return prev.type === next.type && lodash_1.isEqual(prev.coordinates, next.coordinates);
|
|
687
|
+
return prev.type === next.type && (0, lodash_1.isEqual)(prev.coordinates, next.coordinates);
|
|
682
688
|
}
|
|
683
689
|
return prev === null && next === null;
|
|
684
690
|
};
|
|
685
691
|
exports.compareGeom = compareGeom;
|
|
686
692
|
var compareChoropleth = function compareChoropleth(prevProps, nextProps) {
|
|
687
|
-
return exports.compareGeom(prevProps.geomData, nextProps.geomData) && prevProps.id === nextProps.id && prevProps.map === nextProps.map && prevProps.areaId === nextProps.areaId && prevProps.areaValue === nextProps.areaValue && prevProps.color === nextProps.color && prevProps.opacity === nextProps.opacity && prevProps.strokeColor === nextProps.strokeColor && prevProps.isThemeChanged === nextProps.isThemeChanged && lodash_1.isEqual(prevProps.additionalFields, nextProps.additionalFields) && prevProps.handleMapClick.toString() === nextProps.handleMapClick.toString();
|
|
693
|
+
return (0, exports.compareGeom)(prevProps.geomData, nextProps.geomData) && prevProps.id === nextProps.id && prevProps.map === nextProps.map && prevProps.areaId === nextProps.areaId && prevProps.areaValue === nextProps.areaValue && prevProps.color === nextProps.color && prevProps.opacity === nextProps.opacity && prevProps.strokeColor === nextProps.strokeColor && prevProps.isThemeChanged === nextProps.isThemeChanged && (0, lodash_1.isEqual)(prevProps.additionalFields, nextProps.additionalFields) && prevProps.handleMapClick.toString() === nextProps.handleMapClick.toString();
|
|
688
694
|
};
|
|
689
695
|
exports.compareChoropleth = compareChoropleth;
|
|
690
696
|
var cleanupChoropleth = function cleanupChoropleth(shapeId, sourceId, strokeId, map) {
|
|
@@ -751,7 +757,7 @@ exports.Choropleth = React.memo(function (_ref) {
|
|
|
751
757
|
var updateChoropleth = React.useCallback(function () {
|
|
752
758
|
// Apply changes by removing the existing choropleth and creating a new one
|
|
753
759
|
// instead of mutating the current
|
|
754
|
-
exports.cleanupChoropleth(shapeId, sourceId, strokeId, map);
|
|
760
|
+
(0, exports.cleanupChoropleth)(shapeId, sourceId, strokeId, map);
|
|
755
761
|
// In order to set a different color and opacity to each choropleth region
|
|
756
762
|
// we are creating a different layer for each region, and each layer requires a source
|
|
757
763
|
map.current.addSource(sourceId, {
|
|
@@ -803,7 +809,7 @@ exports.Choropleth = React.memo(function (_ref) {
|
|
|
803
809
|
// Clean up on unmount
|
|
804
810
|
React.useEffect(function () {
|
|
805
811
|
return function () {
|
|
806
|
-
return exports.cleanupChoropleth(shapeId, sourceId, strokeId, map);
|
|
812
|
+
return (0, exports.cleanupChoropleth)(shapeId, sourceId, strokeId, map);
|
|
807
813
|
};
|
|
808
814
|
}, []);
|
|
809
815
|
if (isThemeChanged) {
|
|
@@ -836,14 +842,14 @@ var ChoroplethLayer = function ChoroplethLayer(props) {
|
|
|
836
842
|
setIsThemeChanged = props.setIsThemeChanged,
|
|
837
843
|
onMapClick = props.onMapClick;
|
|
838
844
|
var cfgOpacity = Math.min(Math.max(choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.choroplethOpacity, 0), 1);
|
|
839
|
-
var scaledOpacities = (_a = MapUtils_1.getScaledOpacities(choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors, cfgOpacity)) !== null && _a !== void 0 ? _a : [];
|
|
845
|
+
var scaledOpacities = (_a = (0, MapUtils_1.getScaledOpacities)(choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors, cfgOpacity)) !== null && _a !== void 0 ? _a : [];
|
|
840
846
|
var colors = (_b = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors) === null || _b === void 0 ? void 0 : _b.map(function (color) {
|
|
841
847
|
return (color === null || color === void 0 ? void 0 : color.length) > 7 ? color.slice(0, 7) : color;
|
|
842
848
|
});
|
|
843
849
|
var limit = Math.min((_c = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.areaIds) === null || _c === void 0 ? void 0 : _c.length, (_d = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.areaValues) === null || _d === void 0 ? void 0 : _d.length, (_f = (_e = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.geom) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0, (choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.resultLimit) ? choroplethLayer.resultLimit : MapUtils_1.DEFAULT_RESULT_LIMIT);
|
|
844
850
|
var areaIdSliced = (_h = (_g = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.areaIds) === null || _g === void 0 ? void 0 : _g.slice(0, limit)) !== null && _h !== void 0 ? _h : [];
|
|
845
851
|
// generate a unique id if areaIds are not unique
|
|
846
|
-
var uniqueAreaIdSliced = lodash_1.uniq(areaIdSliced).length !== areaIdSliced.length ? areaIdSliced.map(function (id, i) {
|
|
852
|
+
var uniqueAreaIdSliced = (0, lodash_1.uniq)(areaIdSliced).length !== areaIdSliced.length ? areaIdSliced.map(function (id, i) {
|
|
847
853
|
return "".concat(id).concat(i);
|
|
848
854
|
}) : areaIdSliced;
|
|
849
855
|
var additionalFields = (choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.metadata) ? choroplethLayer.metadata.map(function (choroplethMetadata) {
|
|
@@ -855,7 +861,7 @@ var ChoroplethLayer = function ChoroplethLayer(props) {
|
|
|
855
861
|
});
|
|
856
862
|
}) : [];
|
|
857
863
|
var _handleMapClick = function handleMapClick(e, i) {
|
|
858
|
-
var payload = MapUtils_1.formatMetadata(choroplethLayer, i);
|
|
864
|
+
var payload = (0, MapUtils_1.formatMetadata)(choroplethLayer, i);
|
|
859
865
|
onMapClick({
|
|
860
866
|
e: e,
|
|
861
867
|
payload: payload
|
|
@@ -892,13 +898,6 @@ exports.default = ChoroplethLayer;
|
|
|
892
898
|
|
|
893
899
|
/***/ }),
|
|
894
900
|
|
|
895
|
-
/***/ 16:
|
|
896
|
-
/***/ (function(module, exports) {
|
|
897
|
-
|
|
898
|
-
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
899
|
-
|
|
900
|
-
/***/ }),
|
|
901
|
-
|
|
902
901
|
/***/ 17:
|
|
903
902
|
/***/ (function(module, exports) {
|
|
904
903
|
|
|
@@ -1087,8 +1086,8 @@ function hasCompatibleOptions(vizOptions, presetOptions) {
|
|
|
1087
1086
|
*/
|
|
1088
1087
|
function getInitialPreset(vizContext, vizOptions, presets) {
|
|
1089
1088
|
return presets.find(function (preset) {
|
|
1090
|
-
var presetContext = lodash_1.get(preset, ['value', 'context'], {});
|
|
1091
|
-
var presetOptions = lodash_1.get(preset, ['value', 'options'], {});
|
|
1089
|
+
var presetContext = (0, lodash_1.get)(preset, ['value', 'context'], {});
|
|
1090
|
+
var presetOptions = (0, lodash_1.get)(preset, ['value', 'options'], {});
|
|
1092
1091
|
var presetContextKeys = Object.keys(presetContext);
|
|
1093
1092
|
var presetOptionKeys = Object.keys(presetOptions);
|
|
1094
1093
|
// all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)
|
|
@@ -1105,7 +1104,7 @@ exports.getInitialPreset = getInitialPreset;
|
|
|
1105
1104
|
* @returns {{ label: string; value; string }[]} array of { label, value } tuples
|
|
1106
1105
|
*/
|
|
1107
1106
|
function generatePrecisionValues(numPrecisionValues) {
|
|
1108
|
-
return lodash_1.range(0, numPrecisionValues + 1).map(function (i) {
|
|
1107
|
+
return (0, lodash_1.range)(0, numPrecisionValues + 1).map(function (i) {
|
|
1109
1108
|
return {
|
|
1110
1109
|
label: "".concat(i, " (0").concat(i > 0 ? '.' : '').concat('0'.repeat(i), ")"),
|
|
1111
1110
|
value: i
|
|
@@ -1141,28 +1140,28 @@ module.exports = require("@splunk/visualization-context/FeatureFlagContext");
|
|
|
1141
1140
|
/***/ 25:
|
|
1142
1141
|
/***/ (function(module, exports) {
|
|
1143
1142
|
|
|
1144
|
-
module.exports = require("@splunk/
|
|
1143
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
1145
1144
|
|
|
1146
1145
|
/***/ }),
|
|
1147
1146
|
|
|
1148
1147
|
/***/ 26:
|
|
1149
1148
|
/***/ (function(module, exports) {
|
|
1150
1149
|
|
|
1151
|
-
module.exports = require("@splunk/
|
|
1150
|
+
module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
1152
1151
|
|
|
1153
1152
|
/***/ }),
|
|
1154
1153
|
|
|
1155
1154
|
/***/ 27:
|
|
1156
1155
|
/***/ (function(module, exports) {
|
|
1157
1156
|
|
|
1158
|
-
module.exports = require("@splunk/visualizations-shared/
|
|
1157
|
+
module.exports = require("@splunk/visualizations-shared/hocUtils");
|
|
1159
1158
|
|
|
1160
1159
|
/***/ }),
|
|
1161
1160
|
|
|
1162
|
-
/***/
|
|
1161
|
+
/***/ 28:
|
|
1163
1162
|
/***/ (function(module, exports) {
|
|
1164
1163
|
|
|
1165
|
-
module.exports = require("@splunk/
|
|
1164
|
+
module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
|
|
1166
1165
|
|
|
1167
1166
|
/***/ }),
|
|
1168
1167
|
|
|
@@ -1173,7 +1172,14 @@ module.exports = require("lodash");
|
|
|
1173
1172
|
|
|
1174
1173
|
/***/ }),
|
|
1175
1174
|
|
|
1176
|
-
/***/
|
|
1175
|
+
/***/ 30:
|
|
1176
|
+
/***/ (function(module, exports) {
|
|
1177
|
+
|
|
1178
|
+
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1179
|
+
|
|
1180
|
+
/***/ }),
|
|
1181
|
+
|
|
1182
|
+
/***/ 32:
|
|
1177
1183
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1178
1184
|
|
|
1179
1185
|
"use strict";
|
|
@@ -1197,9 +1203,9 @@ var FixedSizeContainer_1 = __webpack_require__(13);
|
|
|
1197
1203
|
*/
|
|
1198
1204
|
var shouldShowIconPlaceholder = function shouldShowIconPlaceholder(dataSources) {
|
|
1199
1205
|
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1200
|
-
var data = lodash_1.get(dataSources, 'primary.data.columns[0]', undefined);
|
|
1206
|
+
var data = (0, lodash_1.get)(dataSources, 'primary.data.columns[0]', undefined);
|
|
1201
1207
|
var noData = data === undefined;
|
|
1202
|
-
var fields = lodash_1.get(dataSources, 'primary.data.fields[0]', undefined);
|
|
1208
|
+
var fields = (0, lodash_1.get)(dataSources, 'primary.data.fields[0]', undefined);
|
|
1203
1209
|
var noFields = fields === undefined;
|
|
1204
1210
|
return loading || noData || noFields;
|
|
1205
1211
|
};
|
|
@@ -1240,7 +1246,7 @@ var IconPlaceholder = function IconPlaceholder(props) {
|
|
|
1240
1246
|
width: width,
|
|
1241
1247
|
height: height,
|
|
1242
1248
|
level: "warning",
|
|
1243
|
-
message: i18n_1._('No DataSource Connected')
|
|
1249
|
+
message: (0, i18n_1._)('No DataSource Connected')
|
|
1244
1250
|
});
|
|
1245
1251
|
};
|
|
1246
1252
|
IconPlaceholder.propTypes = propTypes;
|
|
@@ -1248,14 +1254,7 @@ IconPlaceholder.defaultProps = {
|
|
|
1248
1254
|
width: '100%',
|
|
1249
1255
|
height: 250
|
|
1250
1256
|
};
|
|
1251
|
-
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
1252
|
-
|
|
1253
|
-
/***/ }),
|
|
1254
|
-
|
|
1255
|
-
/***/ 32:
|
|
1256
|
-
/***/ (function(module, exports) {
|
|
1257
|
-
|
|
1258
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
1257
|
+
exports.default = (0, FixedSizeContainer_1.default)(IconPlaceholder);
|
|
1259
1258
|
|
|
1260
1259
|
/***/ }),
|
|
1261
1260
|
|
|
@@ -1290,7 +1289,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
1290
1289
|
};
|
|
1291
1290
|
var onSort;
|
|
1292
1291
|
if (typeof onRequestParamsChange === 'function') {
|
|
1293
|
-
if (requestParams && lodash_1.has(requestParams, 'sort')) {
|
|
1292
|
+
if (requestParams && (0, lodash_1.has)(requestParams, 'sort')) {
|
|
1294
1293
|
currentSortKey = Object.keys(requestParams.sort).shift();
|
|
1295
1294
|
currentSortDir = requestParams.sort[currentSortKey];
|
|
1296
1295
|
}
|
|
@@ -1299,7 +1298,7 @@ var getSortingParams = function getSortingParams(_ref) {
|
|
|
1299
1298
|
var sortKey = _ref2.sortKey,
|
|
1300
1299
|
sortDir = _ref2.sortDir;
|
|
1301
1300
|
if (typeof sortKey === 'string') {
|
|
1302
|
-
var nextSortDir = lodash_1.has(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
1301
|
+
var nextSortDir = (0, lodash_1.has)(nextSortDirMap, sortDir) ? nextSortDirMap[sortDir] : 'none';
|
|
1303
1302
|
onRequestParamsChange(Object.assign(Object.assign({}, requestParams), {
|
|
1304
1303
|
offset: 0,
|
|
1305
1304
|
sort: _defineProperty({}, sortKey, nextSortDir)
|
|
@@ -1350,7 +1349,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
|
|
|
1350
1349
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
|
1351
1350
|
var page = _ref2.page,
|
|
1352
1351
|
countArg = _ref2.count;
|
|
1353
|
-
var newParams = lodash_1.cloneDeep(requestParams);
|
|
1352
|
+
var newParams = (0, lodash_1.cloneDeep)(requestParams);
|
|
1354
1353
|
if (typeof countArg === 'number') {
|
|
1355
1354
|
newParams.count = countArg;
|
|
1356
1355
|
newParams.offset = 0;
|
|
@@ -1414,16 +1413,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1414
1413
|
var React = __webpack_require__(1);
|
|
1415
1414
|
var lodash_1 = __webpack_require__(3);
|
|
1416
1415
|
var getSettingsFromThemedProps_1 = __webpack_require__(37);
|
|
1417
|
-
var Options_1 = __webpack_require__(
|
|
1416
|
+
var Options_1 = __webpack_require__(30);
|
|
1418
1417
|
var SanitizeProps_1 = __webpack_require__(38);
|
|
1419
|
-
var TimezoneContext_1 = __webpack_require__(
|
|
1418
|
+
var TimezoneContext_1 = __webpack_require__(26);
|
|
1420
1419
|
var moment_1 = __webpack_require__(39);
|
|
1421
1420
|
var FeatureFlagContext_1 = __webpack_require__(21);
|
|
1422
1421
|
var styled_components_1 = __webpack_require__(4);
|
|
1423
|
-
var hocUtils_1 = __webpack_require__(
|
|
1424
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
1422
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
1423
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
1425
1424
|
var async_dynamic_options_evaluator_1 = __webpack_require__(40);
|
|
1426
|
-
var id_1 = __webpack_require__(
|
|
1425
|
+
var id_1 = __webpack_require__(25);
|
|
1427
1426
|
var SplunkVisualization_1 = __webpack_require__(41);
|
|
1428
1427
|
var VizBehavior_1 = __webpack_require__(6);
|
|
1429
1428
|
var getSorting_1 = __webpack_require__(33);
|
|
@@ -1444,8 +1443,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1444
1443
|
computeVizProps = _opts$computeVizProps === void 0 ? function () {} : _opts$computeVizProps,
|
|
1445
1444
|
disableEditModeCover = opts.disableEditModeCover,
|
|
1446
1445
|
useIconPlaceholder = opts.useIconPlaceholder; // sanitizing props before sending them to reactviz.
|
|
1447
|
-
var SanitizedReactViz = SanitizeProps_1.withSanitizedProps(ReactViz);
|
|
1448
|
-
var defaultOptions = JSONSchemaUtils_1.pickFieldFromJSONSchema(vizConfig.optionsSchema, 'default');
|
|
1446
|
+
var SanitizedReactViz = (0, SanitizeProps_1.withSanitizedProps)(ReactViz);
|
|
1447
|
+
var defaultOptions = (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(vizConfig.optionsSchema, 'default');
|
|
1449
1448
|
var DashboardViz = function DashboardViz(props) {
|
|
1450
1449
|
var _a;
|
|
1451
1450
|
var mode = props.mode,
|
|
@@ -1480,19 +1479,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1480
1479
|
return (_b = (_a = vizConfig.themes)[themeVar]) === null || _b === void 0 ? void 0 : _b.call(_a, props);
|
|
1481
1480
|
};
|
|
1482
1481
|
var bgColorFromTheme = themeFunc('defaultBackgroundColor');
|
|
1483
|
-
var
|
|
1482
|
+
var _ref = (0, getSettingsFromThemedProps_1.default)({
|
|
1484
1483
|
theme: theme
|
|
1485
1484
|
}),
|
|
1486
|
-
currentThemeFamily =
|
|
1487
|
-
currentThemeColorScheme =
|
|
1488
|
-
currentThemeDensity =
|
|
1485
|
+
currentThemeFamily = _ref.family,
|
|
1486
|
+
currentThemeColorScheme = _ref.colorScheme,
|
|
1487
|
+
currentThemeDensity = _ref.density;
|
|
1489
1488
|
var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
|
|
1490
1489
|
var _React$useState = React.useState({}),
|
|
1491
1490
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1492
1491
|
evaluatedOptionsAsync = _React$useState2[0],
|
|
1493
1492
|
setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
|
|
1494
1493
|
var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
|
|
1495
|
-
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
|
|
1494
|
+
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat((0, id_1.createGUID)())),
|
|
1496
1495
|
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1497
1496
|
visualizationID = _React$useState4[0];
|
|
1498
1497
|
var _React$useState5 = React.useState({}),
|
|
@@ -1503,16 +1502,17 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1503
1502
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1504
1503
|
dataFramesInState = _React$useState8[0],
|
|
1505
1504
|
setDataFramesInState = _React$useState8[1];
|
|
1506
|
-
var _React$useState9 = React.useState(Boolean(featureFlagContext
|
|
1505
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext === null || featureFlagContext === void 0 ? void 0 : featureFlagContext.visualizations_useWebWorkersForDSL)),
|
|
1507
1506
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
1508
1507
|
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
1509
1508
|
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
1510
|
-
|
|
1509
|
+
var isMounted = React.useRef(true);
|
|
1510
|
+
evaluatedOptions = (0, useDeepMemo_1.useDeepMemo)(function () {
|
|
1511
1511
|
try {
|
|
1512
1512
|
if (useAsyncEvaluatedOptions) {
|
|
1513
1513
|
var optionsToEvaluate = {
|
|
1514
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1515
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1514
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1515
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
1516
1516
|
};
|
|
1517
1517
|
var asyncDynamicOptionsEvaluatorParams = {
|
|
1518
1518
|
visualizationID: visualizationID,
|
|
@@ -1523,10 +1523,10 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1523
1523
|
};
|
|
1524
1524
|
async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
|
|
1525
1525
|
setEvaluatedOptionsAsync(results.results);
|
|
1526
|
-
}).catch(function (
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1526
|
+
}).catch(function () {
|
|
1527
|
+
if (isMounted.current) {
|
|
1528
|
+
setUseAsyncEvaluatedOptions(false);
|
|
1529
|
+
}
|
|
1530
1530
|
});
|
|
1531
1531
|
} else {
|
|
1532
1532
|
var dataFrames = dataFramesInState;
|
|
@@ -1536,8 +1536,8 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1536
1536
|
setDataFramesInState(dataFrames);
|
|
1537
1537
|
}
|
|
1538
1538
|
return Options_1.Options.evaluate({
|
|
1539
|
-
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1540
|
-
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1539
|
+
context: (0, lodash_1.defaultsDeep)({}, context, vizConfig.defaultContext),
|
|
1540
|
+
options: (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, defaultOptions)
|
|
1541
1541
|
}, dataSources, themeFunc, dataFrames);
|
|
1542
1542
|
}
|
|
1543
1543
|
} catch (e) {
|
|
@@ -1566,6 +1566,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1566
1566
|
React.useEffect(function () {
|
|
1567
1567
|
return function () {
|
|
1568
1568
|
if (useAsyncEvaluatedOptions) {
|
|
1569
|
+
isMounted.current = false;
|
|
1569
1570
|
async_dynamic_options_evaluator_1.default.reset(visualizationID);
|
|
1570
1571
|
}
|
|
1571
1572
|
};
|
|
@@ -1575,7 +1576,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1575
1576
|
var _vizConfig$requiredPr = vizConfig.requiredProps,
|
|
1576
1577
|
requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
|
|
1577
1578
|
supports = vizConfig.supports;
|
|
1578
|
-
var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
|
|
1579
|
+
var missing = (0, MissingPropsMessage_1.missingKeys)(requiredProps, evaluatedOptionsToUse);
|
|
1579
1580
|
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
|
|
1580
1581
|
) {
|
|
1581
1582
|
return React.createElement(MissingPropsMessage_1.default, {
|
|
@@ -1591,7 +1592,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1591
1592
|
if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
|
|
1592
1593
|
var supportedEvents = vizConfig.events;
|
|
1593
1594
|
Object.keys(supportedEvents).forEach(function (eventName) {
|
|
1594
|
-
var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
|
|
1595
|
+
var eventCallbackPropName = (0, lodash_1.camelCase)("on.".concat(eventName));
|
|
1595
1596
|
eventCallbackProps[eventCallbackPropName] = null;
|
|
1596
1597
|
// todo: refactor single value and single value icon to send payload from viz
|
|
1597
1598
|
// then remove these lines
|
|
@@ -1634,19 +1635,19 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1634
1635
|
*/
|
|
1635
1636
|
var dataSourceMetadata = {};
|
|
1636
1637
|
var OptionKey = 'paginateDataSourceKey';
|
|
1637
|
-
var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1638
|
-
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
|
|
1639
|
-
var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1640
|
-
var meta = lodash_1.get(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1638
|
+
var paginateDataSourceKey = (0, lodash_1.has)(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
|
|
1639
|
+
if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && (0, lodash_1.has)(dataSources, paginateDataSourceKey)) {
|
|
1640
|
+
var requestParams = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'requestParams'], {});
|
|
1641
|
+
var meta = (0, lodash_1.get)(dataSources, [paginateDataSourceKey, 'meta'], {});
|
|
1641
1642
|
var handleRequestParamsChange = function handleRequestParamsChange(payload) {
|
|
1642
1643
|
return onRequestParamsChange(paginateDataSourceKey, payload);
|
|
1643
1644
|
};
|
|
1644
|
-
var sortParams = getSorting_1.getSortingParams({
|
|
1645
|
+
var sortParams = (0, getSorting_1.getSortingParams)({
|
|
1645
1646
|
requestParams: requestParams,
|
|
1646
1647
|
meta: meta,
|
|
1647
1648
|
onRequestParamsChange: handleRequestParamsChange
|
|
1648
1649
|
});
|
|
1649
|
-
var paginatorParams = getPagination_1.getPaginationParams({
|
|
1650
|
+
var paginatorParams = (0, getPagination_1.getPaginationParams)({
|
|
1650
1651
|
requestParams: requestParams,
|
|
1651
1652
|
meta: meta,
|
|
1652
1653
|
onRequestParamsChange: handleRequestParamsChange
|
|
@@ -1674,7 +1675,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1674
1675
|
// attach viz config
|
|
1675
1676
|
DashboardViz.config = vizConfig;
|
|
1676
1677
|
// @ts-ignore: TODO fix sc upgrade TS issues
|
|
1677
|
-
return styled_components_1.withTheme(withPlaceholder_1.default(withEditModeCover_1.default(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1678
|
+
return (0, styled_components_1.withTheme)((0, withPlaceholder_1.default)((0, withEditModeCover_1.default)(DashboardViz, disableEditModeCover), useIconPlaceholder));
|
|
1678
1679
|
};
|
|
1679
1680
|
exports.default = withDashboardViz;
|
|
1680
1681
|
|
|
@@ -1715,7 +1716,137 @@ module.exports = require("@splunk/async-dynamic-options-evaluator");
|
|
|
1715
1716
|
|
|
1716
1717
|
/***/ }),
|
|
1717
1718
|
|
|
1718
|
-
/***/
|
|
1719
|
+
/***/ 41:
|
|
1720
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1721
|
+
|
|
1722
|
+
"use strict";
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
var _classCallCheck = __webpack_require__(9);
|
|
1726
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1727
|
+
value: true
|
|
1728
|
+
});
|
|
1729
|
+
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
1730
|
+
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
1731
|
+
var T = __webpack_require__(0);
|
|
1732
|
+
var lodash_1 = __webpack_require__(3);
|
|
1733
|
+
var VizActionHandler_1 = __webpack_require__(42);
|
|
1734
|
+
// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1735
|
+
exports.INITIAL_WIDTH = 250;
|
|
1736
|
+
exports.INITIAL_HEIGHT = 250;
|
|
1737
|
+
/**
|
|
1738
|
+
* A Splunk visualization
|
|
1739
|
+
*/
|
|
1740
|
+
var SplunkVisualization = function SplunkVisualization() {
|
|
1741
|
+
_classCallCheck(this, SplunkVisualization);
|
|
1742
|
+
};
|
|
1743
|
+
SplunkVisualization.propTypes = {
|
|
1744
|
+
/**
|
|
1745
|
+
* display mode
|
|
1746
|
+
*/
|
|
1747
|
+
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
1748
|
+
/**
|
|
1749
|
+
* width in pixel or string, defaults to 100%
|
|
1750
|
+
*/
|
|
1751
|
+
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
1752
|
+
/**
|
|
1753
|
+
* height in pixel or string
|
|
1754
|
+
*/
|
|
1755
|
+
height: T.oneOfType([T.string, T.number]).isRequired,
|
|
1756
|
+
/**
|
|
1757
|
+
* visualization context used for dynamic option evaluation
|
|
1758
|
+
*/
|
|
1759
|
+
context: T.object,
|
|
1760
|
+
/**
|
|
1761
|
+
* visualization formatting options
|
|
1762
|
+
*/
|
|
1763
|
+
options: T.object,
|
|
1764
|
+
/**
|
|
1765
|
+
* A callback to update formatting options
|
|
1766
|
+
*/
|
|
1767
|
+
onOptionsChange: T.func,
|
|
1768
|
+
/**
|
|
1769
|
+
* datasource state which include data and request params, object key indicate the datasource type.
|
|
1770
|
+
*/
|
|
1771
|
+
dataSources: T.objectOf(T.shape({
|
|
1772
|
+
/**
|
|
1773
|
+
* current request params
|
|
1774
|
+
*/
|
|
1775
|
+
requestParams: T.object,
|
|
1776
|
+
/**
|
|
1777
|
+
* current dataset
|
|
1778
|
+
*/
|
|
1779
|
+
data: T.shape({
|
|
1780
|
+
fields: T.array,
|
|
1781
|
+
columns: T.array
|
|
1782
|
+
}),
|
|
1783
|
+
/**
|
|
1784
|
+
* error
|
|
1785
|
+
*/
|
|
1786
|
+
error: T.shape({
|
|
1787
|
+
level: T.string,
|
|
1788
|
+
message: T.string
|
|
1789
|
+
}),
|
|
1790
|
+
/**
|
|
1791
|
+
* meta data that came with the dataset
|
|
1792
|
+
*/
|
|
1793
|
+
meta: T.object
|
|
1794
|
+
})),
|
|
1795
|
+
/**
|
|
1796
|
+
* A callback to trigger event
|
|
1797
|
+
*/
|
|
1798
|
+
onEventTrigger: T.func,
|
|
1799
|
+
/**
|
|
1800
|
+
* Inform viz if there are handlers listening to events
|
|
1801
|
+
*/
|
|
1802
|
+
hasEventHandlers: T.bool,
|
|
1803
|
+
/**
|
|
1804
|
+
* A callback to communicate computed props to a consumer
|
|
1805
|
+
*/
|
|
1806
|
+
onComputedProps: T.func,
|
|
1807
|
+
/**
|
|
1808
|
+
* A callback to obtain visualization api
|
|
1809
|
+
*/
|
|
1810
|
+
vizActionHandlerRef: T.func,
|
|
1811
|
+
loading: T.bool,
|
|
1812
|
+
theme: T.object,
|
|
1813
|
+
/**
|
|
1814
|
+
* A callback to request new data with updated request params
|
|
1815
|
+
*/
|
|
1816
|
+
onRequestParamsChange: T.func
|
|
1817
|
+
};
|
|
1818
|
+
/**
|
|
1819
|
+
*
|
|
1820
|
+
*/
|
|
1821
|
+
SplunkVisualization.defaultProps = {
|
|
1822
|
+
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
1823
|
+
width: '100%',
|
|
1824
|
+
height: exports.INITIAL_HEIGHT,
|
|
1825
|
+
dataSources: {},
|
|
1826
|
+
onEventTrigger: function onEventTrigger() {
|
|
1827
|
+
return {};
|
|
1828
|
+
},
|
|
1829
|
+
mode: 'view',
|
|
1830
|
+
hasEventHandlers: false,
|
|
1831
|
+
options: {},
|
|
1832
|
+
context: {},
|
|
1833
|
+
onOptionsChange: function onOptionsChange() {
|
|
1834
|
+
return {};
|
|
1835
|
+
},
|
|
1836
|
+
vizActionHandlerRef: function vizActionHandlerRef() {
|
|
1837
|
+
return new VizActionHandler_1.DefaultVizActionHandler();
|
|
1838
|
+
},
|
|
1839
|
+
onComputedProps: function onComputedProps() {
|
|
1840
|
+
return {};
|
|
1841
|
+
},
|
|
1842
|
+
loading: false,
|
|
1843
|
+
onRequestParamsChange: lodash_1.noop
|
|
1844
|
+
};
|
|
1845
|
+
exports.default = SplunkVisualization;
|
|
1846
|
+
|
|
1847
|
+
/***/ }),
|
|
1848
|
+
|
|
1849
|
+
/***/ 410:
|
|
1719
1850
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1720
1851
|
|
|
1721
1852
|
"use strict";
|
|
@@ -1738,16 +1869,16 @@ exports.PureMap = exports.config = exports.themes = exports.useIconPlaceholder =
|
|
|
1738
1869
|
/* eslint-disable no-sequences */
|
|
1739
1870
|
var React = __webpack_require__(1);
|
|
1740
1871
|
var colorUtils_1 = __webpack_require__(12);
|
|
1741
|
-
var hocUtils_1 = __webpack_require__(
|
|
1742
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
1743
|
-
var PureMap_1 = __webpack_require__(
|
|
1872
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
1873
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
1874
|
+
var PureMap_1 = __webpack_require__(411);
|
|
1744
1875
|
exports.PureMap = PureMap_1.default;
|
|
1745
|
-
var config_1 = __webpack_require__(
|
|
1876
|
+
var config_1 = __webpack_require__(421);
|
|
1746
1877
|
exports.config = config_1.default;
|
|
1747
1878
|
var withDashboardViz_1 = __webpack_require__(36);
|
|
1748
|
-
var mapUtils_1 = __webpack_require__(
|
|
1749
|
-
var BubbleLayer_1 = __webpack_require__(
|
|
1750
|
-
var dataUtils_1 = __webpack_require__(
|
|
1879
|
+
var mapUtils_1 = __webpack_require__(422);
|
|
1880
|
+
var BubbleLayer_1 = __webpack_require__(131);
|
|
1881
|
+
var dataUtils_1 = __webpack_require__(121);
|
|
1751
1882
|
var formatLayer = function formatLayer(l, dataFields, dataSourceData, transformedData) {
|
|
1752
1883
|
// add key `geobin` to the layer object if the data is returned from geostats commands
|
|
1753
1884
|
// to distinguish geostats commands from table commands
|
|
@@ -1765,10 +1896,10 @@ var formatLayer = function formatLayer(l, dataFields, dataSourceData, transforme
|
|
|
1765
1896
|
}
|
|
1766
1897
|
// Sanitize colors within layers
|
|
1767
1898
|
if (Object.prototype.hasOwnProperty.call(layer, 'seriesColors')) {
|
|
1768
|
-
layer.seriesColors = Array.isArray(layer.seriesColors) ? colorUtils_1.sanitizeArrayOfColors(layer.seriesColors) : undefined;
|
|
1899
|
+
layer.seriesColors = Array.isArray(layer.seriesColors) ? (0, colorUtils_1.sanitizeArrayOfColors)(layer.seriesColors) : undefined;
|
|
1769
1900
|
}
|
|
1770
1901
|
if (Object.prototype.hasOwnProperty.call(layer, 'dataColors')) {
|
|
1771
|
-
layer.dataColors = Array.isArray(layer.dataColors) ? colorUtils_1.sanitizeArrayOfColors(layer.dataColors) : undefined;
|
|
1902
|
+
layer.dataColors = Array.isArray(layer.dataColors) ? (0, colorUtils_1.sanitizeArrayOfColors)(layer.dataColors) : undefined;
|
|
1772
1903
|
}
|
|
1773
1904
|
layer.metadata = transformedData;
|
|
1774
1905
|
};
|
|
@@ -1791,7 +1922,7 @@ var computeVizProps = function computeVizProps(props) {
|
|
|
1791
1922
|
var dataSourceData = (_b = (_a = dataSources === null || dataSources === void 0 ? void 0 : dataSources.primary) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {};
|
|
1792
1923
|
// transforms data structure into array of objects to allow for indexing metadata at layer level
|
|
1793
1924
|
// TODO: explore any potential changes when multiple layers are supported
|
|
1794
|
-
var transformedData = dataUtils_1.convertToArrOfObjects(dataSourceData.columns, dataSourceData.fields);
|
|
1925
|
+
var transformedData = (0, dataUtils_1.convertToArrOfObjects)(dataSourceData.columns, dataSourceData.fields);
|
|
1795
1926
|
var dataFields = ((_c = dataSourceData.fields) !== null && _c !== void 0 ? _c : []).map(function (field) {
|
|
1796
1927
|
return typeof field === 'string' ? field : field.name;
|
|
1797
1928
|
});
|
|
@@ -1817,7 +1948,7 @@ var withTooltipFields = function withTooltipFields(Viz) {
|
|
|
1817
1948
|
options: options
|
|
1818
1949
|
}));
|
|
1819
1950
|
}
|
|
1820
|
-
var mergedOptions = hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, JSONSchemaUtils_1.pickFieldFromJSONSchema(config_1.default.optionsSchema, 'default'));
|
|
1951
|
+
var mergedOptions = (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(config_1.default.optionsSchema, 'default'));
|
|
1821
1952
|
if ((_b = mergedOptions.layers) === null || _b === void 0 ? void 0 : _b[0]) {
|
|
1822
1953
|
if (((_d = (_c = mergedOptions.layers) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.type) === 'bubble') {
|
|
1823
1954
|
// make sure bubbleSize and bubbleSizeFields dsl evaluation happen at the last HOC "withDashboardViz".
|
|
@@ -1906,7 +2037,7 @@ var withNullToZeros = function withNullToZeros(Viz) {
|
|
|
1906
2037
|
options: options
|
|
1907
2038
|
}, otherProps));
|
|
1908
2039
|
}
|
|
1909
|
-
var modifiedDatasources = mapUtils_1.columnsNullToZeros(config_1.default, dataSources, options);
|
|
2040
|
+
var modifiedDatasources = (0, mapUtils_1.columnsNullToZeros)(config_1.default, dataSources, options);
|
|
1910
2041
|
return React.createElement(Viz, Object.assign({
|
|
1911
2042
|
dataSources: modifiedDatasources,
|
|
1912
2043
|
options: options
|
|
@@ -1921,7 +2052,7 @@ function useIconPlaceholder(dataSources, loading) {
|
|
|
1921
2052
|
return loading;
|
|
1922
2053
|
}
|
|
1923
2054
|
exports.useIconPlaceholder = useIconPlaceholder;
|
|
1924
|
-
var Map = withoutInternalFields(withTooltipFields(withNullToZeros(withDashboardViz_1.default({
|
|
2055
|
+
var Map = withoutInternalFields(withTooltipFields(withNullToZeros((0, withDashboardViz_1.default)({
|
|
1925
2056
|
ReactViz: PureMap_1.default,
|
|
1926
2057
|
vizConfig: config_1.default,
|
|
1927
2058
|
computeVizProps: exports.computeVizProps,
|
|
@@ -1934,7 +2065,7 @@ exports.default = Map;
|
|
|
1934
2065
|
|
|
1935
2066
|
/***/ }),
|
|
1936
2067
|
|
|
1937
|
-
/***/
|
|
2068
|
+
/***/ 411:
|
|
1938
2069
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1939
2070
|
|
|
1940
2071
|
"use strict";
|
|
@@ -1949,15 +2080,15 @@ var React = __webpack_require__(1);
|
|
|
1949
2080
|
var lodash_1 = __webpack_require__(3);
|
|
1950
2081
|
var react_1 = __webpack_require__(1);
|
|
1951
2082
|
var T = __webpack_require__(0);
|
|
1952
|
-
var chroma = __webpack_require__(
|
|
1953
|
-
var maplibre_gl_1 = __webpack_require__(
|
|
2083
|
+
var chroma = __webpack_require__(158);
|
|
2084
|
+
var maplibre_gl_1 = __webpack_require__(159);
|
|
1954
2085
|
var i18n_1 = __webpack_require__(2);
|
|
1955
|
-
var MapContext_1 = __webpack_require__(
|
|
1956
|
-
var PureMapContainer_1 = __webpack_require__(
|
|
1957
|
-
var MapUtils_1 = __webpack_require__(
|
|
1958
|
-
var ClusterLayer_1 = __webpack_require__(
|
|
1959
|
-
var ChoroplethLayer_1 = __webpack_require__(
|
|
1960
|
-
var LocalChoroplethLayer_1 = __webpack_require__(
|
|
2086
|
+
var MapContext_1 = __webpack_require__(412);
|
|
2087
|
+
var PureMapContainer_1 = __webpack_require__(413);
|
|
2088
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
2089
|
+
var ClusterLayer_1 = __webpack_require__(415);
|
|
2090
|
+
var ChoroplethLayer_1 = __webpack_require__(160);
|
|
2091
|
+
var LocalChoroplethLayer_1 = __webpack_require__(418);
|
|
1961
2092
|
exports.DEFAULT_CENTER = [0, 0];
|
|
1962
2093
|
exports.DEFAULT_CONTROL_BACKGROUND_COLOR = '#2b3033';
|
|
1963
2094
|
exports.DEFAULT_CONTROL_FOREGROUND_COLOR = '#B5B5B5';
|
|
@@ -1998,27 +2129,27 @@ var PureMap = function PureMap(props) {
|
|
|
1998
2129
|
onOptionsChange = props.onOptionsChange,
|
|
1999
2130
|
mode = props.mode,
|
|
2000
2131
|
title = props.title;
|
|
2001
|
-
var
|
|
2002
|
-
defaultTileConfig =
|
|
2003
|
-
customTileConfig =
|
|
2004
|
-
var basemapContainer = react_1.useRef(null);
|
|
2005
|
-
var map = react_1.useRef(null);
|
|
2006
|
-
var scaleControl = react_1.useRef(null);
|
|
2007
|
-
var zoomControl = react_1.useRef(null);
|
|
2008
|
-
var
|
|
2009
|
-
return MapUtils_1.getTilePreset({
|
|
2132
|
+
var _ref = (0, react_1.useContext)(MapContext_1.default),
|
|
2133
|
+
defaultTileConfig = _ref.defaultTileConfig,
|
|
2134
|
+
customTileConfig = _ref.customTileConfig;
|
|
2135
|
+
var basemapContainer = (0, react_1.useRef)(null);
|
|
2136
|
+
var map = (0, react_1.useRef)(null);
|
|
2137
|
+
var scaleControl = (0, react_1.useRef)(null);
|
|
2138
|
+
var zoomControl = (0, react_1.useRef)(null);
|
|
2139
|
+
var _ref2 = (0, react_1.useMemo)(function () {
|
|
2140
|
+
return (0, MapUtils_1.getTilePreset)({
|
|
2010
2141
|
defaultTileConfig: defaultTileConfig,
|
|
2011
2142
|
customTileConfig: customTileConfig
|
|
2012
2143
|
});
|
|
2013
2144
|
}, [defaultTileConfig, customTileConfig]),
|
|
2014
|
-
tilePreset =
|
|
2015
|
-
defaultTileLight =
|
|
2016
|
-
defaultTileDark =
|
|
2145
|
+
tilePreset = _ref2.tilePreset,
|
|
2146
|
+
defaultTileLight = _ref2.defaultTileLight,
|
|
2147
|
+
defaultTileDark = _ref2.defaultTileDark;
|
|
2017
2148
|
var _React$useState = React.useState(zoom !== null && zoom !== void 0 ? zoom : exports.DEFAULT_ZOOM),
|
|
2018
2149
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2019
2150
|
currentZoomLevel = _React$useState2[0],
|
|
2020
2151
|
_setCurrentZoomLevel = _React$useState2[1];
|
|
2021
|
-
var currentZoomLevelRef = react_1.useRef(currentZoomLevel);
|
|
2152
|
+
var currentZoomLevelRef = (0, react_1.useRef)(currentZoomLevel);
|
|
2022
2153
|
var setCurrentZoomLevel = function setCurrentZoomLevel(newZoom) {
|
|
2023
2154
|
currentZoomLevelRef.current = newZoom;
|
|
2024
2155
|
_setCurrentZoomLevel(newZoom);
|
|
@@ -2039,21 +2170,21 @@ var PureMap = function PureMap(props) {
|
|
|
2039
2170
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
2040
2171
|
mapMinZoom = _React$useState8[0],
|
|
2041
2172
|
_setMapMinZoom = _React$useState8[1];
|
|
2042
|
-
var mapMinZoomRef = react_1.useRef(mapMinZoom);
|
|
2173
|
+
var mapMinZoomRef = (0, react_1.useRef)(mapMinZoom);
|
|
2043
2174
|
var setMapMinZoom = function setMapMinZoom(newMinZoom) {
|
|
2044
2175
|
mapMinZoomRef.current = newMinZoom;
|
|
2045
2176
|
_setMapMinZoom(newMinZoom);
|
|
2046
2177
|
};
|
|
2047
2178
|
// Assign default center when no center is defined
|
|
2048
|
-
var lngLatCenter = react_1.useMemo(function () {
|
|
2049
|
-
if (!MapUtils_1.isValidLatLon(center)) {
|
|
2179
|
+
var lngLatCenter = (0, react_1.useMemo)(function () {
|
|
2180
|
+
if (!(0, MapUtils_1.isValidLatLon)(center)) {
|
|
2050
2181
|
return exports.DEFAULT_CENTER;
|
|
2051
2182
|
}
|
|
2052
2183
|
return [center[1], center[0]];
|
|
2053
2184
|
}, [center]);
|
|
2054
2185
|
// TODO: take out zoomLevel to use zoom instead (set prop zoom = DEFAULT_ZOOM)
|
|
2055
2186
|
// Assign default zoom when no zoom is defined
|
|
2056
|
-
var zoomLevel = react_1.useMemo(function () {
|
|
2187
|
+
var zoomLevel = (0, react_1.useMemo)(function () {
|
|
2057
2188
|
if (zoom === undefined) {
|
|
2058
2189
|
return exports.DEFAULT_ZOOM;
|
|
2059
2190
|
}
|
|
@@ -2062,19 +2193,19 @@ var PureMap = function PureMap(props) {
|
|
|
2062
2193
|
var setIsThemeChangedCallback = function setIsThemeChangedCallback(isMyThemeChanged) {
|
|
2063
2194
|
setIsThemeChanged(isMyThemeChanged);
|
|
2064
2195
|
};
|
|
2065
|
-
var onOptionsChangeProxy = react_1.useCallback(function (e) {
|
|
2196
|
+
var onOptionsChangeProxy = (0, react_1.useCallback)(function (e) {
|
|
2066
2197
|
if (mode === 'edit') {
|
|
2067
2198
|
onOptionsChange(e);
|
|
2068
2199
|
}
|
|
2069
2200
|
}, [onOptionsChange, mode]);
|
|
2070
|
-
var fitMapToContent = react_1.useCallback(function () {
|
|
2071
|
-
var lngLatBounds = MapUtils_1.getGlobalLayerBoundaries([layers[0]]);
|
|
2201
|
+
var fitMapToContent = (0, react_1.useCallback)(function () {
|
|
2202
|
+
var lngLatBounds = (0, MapUtils_1.getGlobalLayerBoundaries)([layers[0]]);
|
|
2072
2203
|
map.current.fitBounds(lngLatBounds, {
|
|
2073
2204
|
padding: MapUtils_1.MAX_BUBBLE_RADIUS + 5,
|
|
2074
2205
|
animate: false
|
|
2075
2206
|
});
|
|
2076
2207
|
}, [layers]);
|
|
2077
|
-
var initializeMap = react_1.useCallback(function (mapStyle) {
|
|
2208
|
+
var initializeMap = (0, react_1.useCallback)(function (mapStyle) {
|
|
2078
2209
|
var addZoomEndEventListener = function addZoomEndEventListener() {
|
|
2079
2210
|
// register event listener - zoom
|
|
2080
2211
|
map.current.on('zoomend', function () {
|
|
@@ -2092,11 +2223,11 @@ var PureMap = function PureMap(props) {
|
|
|
2092
2223
|
center: lngLatCenter,
|
|
2093
2224
|
zoom: zoomLevel,
|
|
2094
2225
|
cooperativeGestures: {
|
|
2095
|
-
windowsHelpText: i18n_1._('Use Ctrl + scroll to zoom map'),
|
|
2096
|
-
macHelpText: i18n_1._('Use ⌘ + scroll to zoom map'),
|
|
2097
|
-
mobileHelpText: i18n_1._('Use two fingers to move the map')
|
|
2226
|
+
windowsHelpText: (0, i18n_1._)('Use Ctrl + scroll to zoom map'),
|
|
2227
|
+
macHelpText: (0, i18n_1._)('Use ⌘ + scroll to zoom map'),
|
|
2228
|
+
mobileHelpText: (0, i18n_1._)('Use two fingers to move the map')
|
|
2098
2229
|
}
|
|
2099
|
-
}, MapUtils_1.getZoomConstraintsFromTileConfig(mapStyle, baseLayerTileServer)));
|
|
2230
|
+
}, (0, MapUtils_1.getZoomConstraintsFromTileConfig)(mapStyle, baseLayerTileServer)));
|
|
2100
2231
|
// Fired immediately after all necessary resources have been downloaded
|
|
2101
2232
|
// and the first visually complete rendering of the map has occurred.
|
|
2102
2233
|
map.current.on('load', function () {
|
|
@@ -2141,25 +2272,25 @@ var PureMap = function PureMap(props) {
|
|
|
2141
2272
|
});
|
|
2142
2273
|
map.current.addControl(zoomControl.current, 'top-left');
|
|
2143
2274
|
}, [lngLatCenter, zoomLevel, layers === null || layers === void 0 ? void 0 : layers.length]);
|
|
2144
|
-
var initializeScale = react_1.useCallback(function () {
|
|
2275
|
+
var initializeScale = (0, react_1.useCallback)(function () {
|
|
2145
2276
|
scaleControl.current = new maplibre_gl_1.ScaleControl({
|
|
2146
2277
|
maxWidth: 70,
|
|
2147
2278
|
unit: scaleUnit
|
|
2148
2279
|
});
|
|
2149
2280
|
map.current.addControl(scaleControl.current);
|
|
2150
2281
|
}, [scaleUnit]);
|
|
2151
|
-
var updateScale = react_1.useCallback(function () {
|
|
2282
|
+
var updateScale = (0, react_1.useCallback)(function () {
|
|
2152
2283
|
var _a;
|
|
2153
2284
|
if (showScale) {
|
|
2154
2285
|
(_a = scaleControl === null || scaleControl === void 0 ? void 0 : scaleControl.current) === null || _a === void 0 ? void 0 : _a.setUnit(scaleUnit);
|
|
2155
2286
|
}
|
|
2156
2287
|
}, [scaleUnit, showScale]);
|
|
2157
|
-
react_1.useEffect(function () {
|
|
2288
|
+
(0, react_1.useEffect)(function () {
|
|
2158
2289
|
if (map.current) {
|
|
2159
2290
|
map.current.resize();
|
|
2160
2291
|
}
|
|
2161
2292
|
}, [width, height]);
|
|
2162
|
-
react_1.useEffect(function () {
|
|
2293
|
+
(0, react_1.useEffect)(function () {
|
|
2163
2294
|
if (map.current) {
|
|
2164
2295
|
// We want to skip onOptionsChangeProxy if we have transitioned into the default map state, with undefined zoom and center.
|
|
2165
2296
|
// This is because the DEFAULT_ZOOM value, 0, is sometimes not possible for maps with height > 500.
|
|
@@ -2177,14 +2308,14 @@ var PureMap = function PureMap(props) {
|
|
|
2177
2308
|
});
|
|
2178
2309
|
}
|
|
2179
2310
|
}, [currentZoomLevel, onOptionsChangeProxy]);
|
|
2180
|
-
react_1.useEffect(function () {
|
|
2311
|
+
(0, react_1.useEffect)(function () {
|
|
2181
2312
|
// do not render when defaultTileConfig, customTileConfig and tileset are not configured
|
|
2182
2313
|
if (Object.keys(tilePreset).length === 0 && (!baseLayerTileServer || !baseLayerTileServerType)) {
|
|
2183
2314
|
// eslint-disable-next-line no-console
|
|
2184
2315
|
console.warn('Map Tile Server configuration is missing or invalid. Please provide a valid configuration');
|
|
2185
2316
|
return;
|
|
2186
2317
|
}
|
|
2187
|
-
var mapStyle = MapUtils_1.getMapStyle({
|
|
2318
|
+
var mapStyle = (0, MapUtils_1.getMapStyle)({
|
|
2188
2319
|
showBaseLayer: showBaseLayer,
|
|
2189
2320
|
baseLayerTileServer: baseLayerTileServer,
|
|
2190
2321
|
baseLayerTileServerType: baseLayerTileServerType,
|
|
@@ -2197,29 +2328,29 @@ var PureMap = function PureMap(props) {
|
|
|
2197
2328
|
// If the map has already been initialized, we update the styles
|
|
2198
2329
|
if (map.current) {
|
|
2199
2330
|
var curr = map.current.getStyle();
|
|
2200
|
-
var next = lodash_1.omit(mapStyle, ['theme', 'name', 'key']);
|
|
2331
|
+
var next = (0, lodash_1.omit)(mapStyle, ['theme', 'name', 'key']);
|
|
2201
2332
|
// In dashboard studio this setStyle function is triggered by zoom changes as well
|
|
2202
2333
|
// Since setStyle will reset all style layers on the map including choropleth,
|
|
2203
2334
|
// we ONLY want to this to be called when there are style changes
|
|
2204
|
-
if (!MapUtils_1.compareBaseStyles(curr, next)) {
|
|
2335
|
+
if (!(0, MapUtils_1.compareBaseStyles)(curr, next)) {
|
|
2205
2336
|
// Refer to https://maplibre.org/maplibre-gl-js-docs/api/map/#setstyle-example for options.diff (default is true)
|
|
2206
|
-
map.current.setStyle(lodash_1.omit(mapStyle, ['theme', 'name', 'key']));
|
|
2337
|
+
map.current.setStyle((0, lodash_1.omit)(mapStyle, ['theme', 'name', 'key']));
|
|
2207
2338
|
setIsThemeChanged(true);
|
|
2208
2339
|
}
|
|
2209
|
-
var
|
|
2210
|
-
minZoom =
|
|
2211
|
-
maxZoom =
|
|
2340
|
+
var _ref3 = (0, MapUtils_1.getZoomConstraintsFromTileConfig)(mapStyle, baseLayerTileServer),
|
|
2341
|
+
minZoom = _ref3.minZoom,
|
|
2342
|
+
maxZoom = _ref3.maxZoom;
|
|
2212
2343
|
map.current.setMinZoom(minZoom);
|
|
2213
2344
|
map.current.setMaxZoom(maxZoom);
|
|
2214
2345
|
updateScale();
|
|
2215
2346
|
} else {
|
|
2216
2347
|
// initialize the map only once with a constructed style from user configured options
|
|
2217
2348
|
// or default configs from the map context
|
|
2218
|
-
initializeMap(lodash_1.omit(mapStyle, ['theme', 'name', 'key']));
|
|
2349
|
+
initializeMap((0, lodash_1.omit)(mapStyle, ['theme', 'name', 'key']));
|
|
2219
2350
|
initializeScale();
|
|
2220
2351
|
}
|
|
2221
2352
|
}, [showBaseLayer, tilePreset, initializeMap, initializeScale, updateScale, defaultTileLight, defaultTileDark, baseLayerTileServer, baseLayerTileServerType, themeColorScheme]);
|
|
2222
|
-
react_1.useEffect(function () {
|
|
2353
|
+
(0, react_1.useEffect)(function () {
|
|
2223
2354
|
if (map.current) {
|
|
2224
2355
|
map.current.flyTo({
|
|
2225
2356
|
center: lngLatCenter,
|
|
@@ -2229,7 +2360,7 @@ var PureMap = function PureMap(props) {
|
|
|
2229
2360
|
});
|
|
2230
2361
|
}
|
|
2231
2362
|
}, [lngLatCenter, zoomLevel]);
|
|
2232
|
-
react_1.useEffect(function () {
|
|
2363
|
+
(0, react_1.useEffect)(function () {
|
|
2233
2364
|
return function () {
|
|
2234
2365
|
if (map.current) {
|
|
2235
2366
|
map.current.remove();
|
|
@@ -2239,14 +2370,14 @@ var PureMap = function PureMap(props) {
|
|
|
2239
2370
|
var _layers = _slicedToArray(layers, 1),
|
|
2240
2371
|
layer = _layers[0];
|
|
2241
2372
|
return React.createElement(React.Fragment, null, React.createElement(PureMapContainer_1.default, {
|
|
2242
|
-
"aria-label": title || i18n_1._('Map'),
|
|
2373
|
+
"aria-label": title || (0, i18n_1._)('Map'),
|
|
2243
2374
|
className: "puremap",
|
|
2244
2375
|
width: width,
|
|
2245
2376
|
height: height,
|
|
2246
2377
|
backgroundColor: backgroundColor,
|
|
2247
2378
|
controlBackgroundColor: controlBackgroundColor,
|
|
2248
2379
|
controlForegroundColor: controlForegroundColor,
|
|
2249
|
-
controlIconColorEncoded: exports.formatColor(controlForegroundColor),
|
|
2380
|
+
controlIconColorEncoded: (0, exports.formatColor)(controlForegroundColor),
|
|
2250
2381
|
ref: basemapContainer,
|
|
2251
2382
|
showScale: showScale,
|
|
2252
2383
|
showZoomControls: showZoomControls
|
|
@@ -2282,7 +2413,7 @@ var isLatLng = function isLatLng(props, propName, componentName) {
|
|
|
2282
2413
|
if (latAbs > MapUtils_1.MAX_LATITUDE && lonAbs <= MapUtils_1.MAX_LATITUDE) {
|
|
2283
2414
|
throw new Error("".concat(componentName, " ").concat(propName, " may have reversed [lat, lon] ranges."));
|
|
2284
2415
|
}
|
|
2285
|
-
if (!MapUtils_1.isValidLatLon(latlon)) {
|
|
2416
|
+
if (!(0, MapUtils_1.isValidLatLon)(latlon)) {
|
|
2286
2417
|
throw new Error("".concat(componentName, " ").concat(propName, " incorrect [lat, lon] ranges."));
|
|
2287
2418
|
}
|
|
2288
2419
|
return null;
|
|
@@ -2345,144 +2476,14 @@ exports.default = PureMap;
|
|
|
2345
2476
|
|
|
2346
2477
|
/***/ }),
|
|
2347
2478
|
|
|
2348
|
-
/***/
|
|
2479
|
+
/***/ 412:
|
|
2349
2480
|
/***/ (function(module, exports) {
|
|
2350
2481
|
|
|
2351
2482
|
module.exports = require("@splunk/visualization-context/MapContext");
|
|
2352
2483
|
|
|
2353
2484
|
/***/ }),
|
|
2354
2485
|
|
|
2355
|
-
/***/
|
|
2356
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2357
|
-
|
|
2358
|
-
"use strict";
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
var _classCallCheck = __webpack_require__(9);
|
|
2362
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2363
|
-
value: true
|
|
2364
|
-
});
|
|
2365
|
-
exports.INITIAL_HEIGHT = exports.INITIAL_WIDTH = void 0;
|
|
2366
|
-
/* eslint-disable react/no-unused-prop-types,react/prefer-stateless-function */
|
|
2367
|
-
var T = __webpack_require__(0);
|
|
2368
|
-
var lodash_1 = __webpack_require__(3);
|
|
2369
|
-
var VizActionHandler_1 = __webpack_require__(42);
|
|
2370
|
-
// this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
2371
|
-
exports.INITIAL_WIDTH = 250;
|
|
2372
|
-
exports.INITIAL_HEIGHT = 250;
|
|
2373
|
-
/**
|
|
2374
|
-
* A Splunk visualization
|
|
2375
|
-
*/
|
|
2376
|
-
var SplunkVisualization = function SplunkVisualization() {
|
|
2377
|
-
_classCallCheck(this, SplunkVisualization);
|
|
2378
|
-
};
|
|
2379
|
-
SplunkVisualization.propTypes = {
|
|
2380
|
-
/**
|
|
2381
|
-
* display mode
|
|
2382
|
-
*/
|
|
2383
|
-
mode: T.oneOf(['view', 'edit', 'export']).isRequired,
|
|
2384
|
-
/**
|
|
2385
|
-
* width in pixel or string, defaults to 100%
|
|
2386
|
-
*/
|
|
2387
|
-
width: T.oneOfType([T.string, T.number]).isRequired,
|
|
2388
|
-
/**
|
|
2389
|
-
* height in pixel or string
|
|
2390
|
-
*/
|
|
2391
|
-
height: T.oneOfType([T.string, T.number]).isRequired,
|
|
2392
|
-
/**
|
|
2393
|
-
* visualization context used for dynamic option evaluation
|
|
2394
|
-
*/
|
|
2395
|
-
context: T.object,
|
|
2396
|
-
/**
|
|
2397
|
-
* visualization formatting options
|
|
2398
|
-
*/
|
|
2399
|
-
options: T.object,
|
|
2400
|
-
/**
|
|
2401
|
-
* A callback to update formatting options
|
|
2402
|
-
*/
|
|
2403
|
-
onOptionsChange: T.func,
|
|
2404
|
-
/**
|
|
2405
|
-
* datasource state which include data and request params, object key indicate the datasource type.
|
|
2406
|
-
*/
|
|
2407
|
-
dataSources: T.objectOf(T.shape({
|
|
2408
|
-
/**
|
|
2409
|
-
* current request params
|
|
2410
|
-
*/
|
|
2411
|
-
requestParams: T.object,
|
|
2412
|
-
/**
|
|
2413
|
-
* current dataset
|
|
2414
|
-
*/
|
|
2415
|
-
data: T.shape({
|
|
2416
|
-
fields: T.array,
|
|
2417
|
-
columns: T.array
|
|
2418
|
-
}),
|
|
2419
|
-
/**
|
|
2420
|
-
* error
|
|
2421
|
-
*/
|
|
2422
|
-
error: T.shape({
|
|
2423
|
-
level: T.string,
|
|
2424
|
-
message: T.string
|
|
2425
|
-
}),
|
|
2426
|
-
/**
|
|
2427
|
-
* meta data that came with the dataset
|
|
2428
|
-
*/
|
|
2429
|
-
meta: T.object
|
|
2430
|
-
})),
|
|
2431
|
-
/**
|
|
2432
|
-
* A callback to trigger event
|
|
2433
|
-
*/
|
|
2434
|
-
onEventTrigger: T.func,
|
|
2435
|
-
/**
|
|
2436
|
-
* Inform viz if there are handlers listening to events
|
|
2437
|
-
*/
|
|
2438
|
-
hasEventHandlers: T.bool,
|
|
2439
|
-
/**
|
|
2440
|
-
* A callback to communicate computed props to a consumer
|
|
2441
|
-
*/
|
|
2442
|
-
onComputedProps: T.func,
|
|
2443
|
-
/**
|
|
2444
|
-
* A callback to obtain visualization api
|
|
2445
|
-
*/
|
|
2446
|
-
vizActionHandlerRef: T.func,
|
|
2447
|
-
loading: T.bool,
|
|
2448
|
-
theme: T.object,
|
|
2449
|
-
/**
|
|
2450
|
-
* A callback to request new data with updated request params
|
|
2451
|
-
*/
|
|
2452
|
-
onRequestParamsChange: T.func
|
|
2453
|
-
};
|
|
2454
|
-
/**
|
|
2455
|
-
*
|
|
2456
|
-
*/
|
|
2457
|
-
SplunkVisualization.defaultProps = {
|
|
2458
|
-
// BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
|
|
2459
|
-
width: '100%',
|
|
2460
|
-
height: exports.INITIAL_HEIGHT,
|
|
2461
|
-
dataSources: {},
|
|
2462
|
-
onEventTrigger: function onEventTrigger() {
|
|
2463
|
-
return {};
|
|
2464
|
-
},
|
|
2465
|
-
mode: 'view',
|
|
2466
|
-
hasEventHandlers: false,
|
|
2467
|
-
options: {},
|
|
2468
|
-
context: {},
|
|
2469
|
-
onOptionsChange: function onOptionsChange() {
|
|
2470
|
-
return {};
|
|
2471
|
-
},
|
|
2472
|
-
vizActionHandlerRef: function vizActionHandlerRef() {
|
|
2473
|
-
return new VizActionHandler_1.DefaultVizActionHandler();
|
|
2474
|
-
},
|
|
2475
|
-
onComputedProps: function onComputedProps() {
|
|
2476
|
-
return {};
|
|
2477
|
-
},
|
|
2478
|
-
loading: false,
|
|
2479
|
-
onRequestParamsChange: lodash_1.noop
|
|
2480
|
-
};
|
|
2481
|
-
exports.default = SplunkVisualization;
|
|
2482
|
-
|
|
2483
|
-
/***/ }),
|
|
2484
|
-
|
|
2485
|
-
/***/ 410:
|
|
2486
|
+
/***/ 413:
|
|
2486
2487
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2487
2488
|
|
|
2488
2489
|
"use strict";
|
|
@@ -2494,7 +2495,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2494
2495
|
var styled_components_1 = __webpack_require__(4);
|
|
2495
2496
|
var lodash_1 = __webpack_require__(3);
|
|
2496
2497
|
var style_1 = __webpack_require__(14);
|
|
2497
|
-
var maplibre_gl_css_1 = __webpack_require__(
|
|
2498
|
+
var maplibre_gl_css_1 = __webpack_require__(414);
|
|
2498
2499
|
var PureMapContainer = styled_components_1.default.div.attrs({
|
|
2499
2500
|
'data-testid': 'puremap-container'
|
|
2500
2501
|
}).withConfig({
|
|
@@ -2503,7 +2504,7 @@ var PureMapContainer = styled_components_1.default.div.attrs({
|
|
|
2503
2504
|
})(["", " overflow:hidden;position:relative;z-index:0;background-color:", ";", ";.maplibregl-cooperative-gesture-screen{z-index:0;}.maplibregl-ctrl-top-left{display:", ";position:absolute;top:12px;left:16px;.maplibregl-ctrl-group{width:40px !important;height:87px !important;border-radius:4px;margin:8px 0px;background-color:", ";box-shadow:0px 26px 103px rgba(0,0,0,0.64),0px 11px 18px rgba(0,0,0,0.32),0px 3px 6px rgba(0,0,0,0.3);& button{width:40px;height:43px;border-top:0;}.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url('data:image/svg+xml;charset=UTF-8,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9 1C9 0.447715 8.55229 0 8 0C7.44772 0 7 0.447715 7 1V7H1C0.447715 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55229 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55229 16 8C16 7.44772 15.5523 7 15 7H9V1Z\" fill=\"", "\" fill-opacity=\"", "\" /></svg>');}.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url('data:image/svg+xml;charset=UTF-8,<svg width=\"14\" height=\"3\" viewBox=\"0 0 14 3\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0 1.99707C0 1.44479 0.447715 0.99707 1 0.99707H13C13.5523 0.99707 14 1.44479 14 1.99707C14 2.54936 13.5523 2.99707 13 2.99707H1C0.447715 2.99707 0 2.54936 0 1.99707Z\" fill=\"", "\" fill-opacity=\"", "\" /></svg>');}}}.maplibregl-ctrl-bottom-left{display:", ";position:absolute;z-index:0;bottom:16px;left:12px;width:86px;height:29px;border-radius:4px;margin:0;background-color:", ";box-shadow:0px 26px 103px rgba(0,0,0,0.13),0px 11px 18px rgba(0,0,0,0.06),0px 3px 6px rgba(0,0,0,0.06);.maplibregl-ctrl-scale{background-color:", ";color:", ";border:2px solid ", ";border-top:0;border-left:0;border-right:0;padding:0;margin:6px 8px 8px 8px;line-height:13px;letter-spacing:0.02em;font-family:sans-serif;font-size:10px;}}"], maplibre_gl_css_1.default, function (props) {
|
|
2504
2505
|
return props.backgroundColor;
|
|
2505
2506
|
}, function (props) {
|
|
2506
|
-
return style_1.toDimension(lodash_1.pick(props, ['width', 'height']));
|
|
2507
|
+
return (0, style_1.toDimension)((0, lodash_1.pick)(props, ['width', 'height']));
|
|
2507
2508
|
}, function (props) {
|
|
2508
2509
|
return props.showZoomControls ? 'block' : 'none';
|
|
2509
2510
|
}, function (props) {
|
|
@@ -2531,7 +2532,7 @@ exports.default = PureMapContainer;
|
|
|
2531
2532
|
|
|
2532
2533
|
/***/ }),
|
|
2533
2534
|
|
|
2534
|
-
/***/
|
|
2535
|
+
/***/ 414:
|
|
2535
2536
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2536
2537
|
|
|
2537
2538
|
"use strict";
|
|
@@ -2540,7 +2541,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2540
2541
|
|
|
2541
2542
|
/***/ }),
|
|
2542
2543
|
|
|
2543
|
-
/***/
|
|
2544
|
+
/***/ 415:
|
|
2544
2545
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2545
2546
|
|
|
2546
2547
|
"use strict";
|
|
@@ -2550,9 +2551,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2550
2551
|
value: true
|
|
2551
2552
|
});
|
|
2552
2553
|
var React = __webpack_require__(1);
|
|
2553
|
-
var BubbleLayer_1 = __webpack_require__(
|
|
2554
|
-
var MarkerLayer_1 = __webpack_require__(
|
|
2555
|
-
var MapUtils_1 = __webpack_require__(
|
|
2554
|
+
var BubbleLayer_1 = __webpack_require__(131);
|
|
2555
|
+
var MarkerLayer_1 = __webpack_require__(417);
|
|
2556
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
2556
2557
|
var ClusterLayer = function ClusterLayer(_ref) {
|
|
2557
2558
|
var clusterLayer = _ref.clusterLayer,
|
|
2558
2559
|
themeColorScheme = _ref.themeColorScheme,
|
|
@@ -2585,39 +2586,38 @@ exports.default = ClusterLayer;
|
|
|
2585
2586
|
|
|
2586
2587
|
/***/ }),
|
|
2587
2588
|
|
|
2588
|
-
/***/
|
|
2589
|
+
/***/ 416:
|
|
2589
2590
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2590
2591
|
|
|
2591
2592
|
"use strict";
|
|
2592
2593
|
|
|
2593
2594
|
|
|
2595
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
2596
|
+
var _templateObject;
|
|
2594
2597
|
Object.defineProperty(exports, "__esModule", {
|
|
2595
2598
|
value: true
|
|
2596
2599
|
});
|
|
2597
2600
|
exports.convertDegToDMS = void 0;
|
|
2598
2601
|
var React = __webpack_require__(1);
|
|
2599
2602
|
var styled_components_1 = __webpack_require__(4);
|
|
2600
|
-
var Popover_1 = __webpack_require__(
|
|
2603
|
+
var Popover_1 = __webpack_require__(62);
|
|
2601
2604
|
var i18n_1 = __webpack_require__(2);
|
|
2602
|
-
var StyledPopover = styled_components_1.default(Popover_1.default)
|
|
2603
|
-
displayName: "Tooltip__StyledPopover",
|
|
2604
|
-
componentId: "xwewsa-0"
|
|
2605
|
-
})(["width:250px;font-size:12px;"]);
|
|
2605
|
+
var StyledPopover = (0, styled_components_1.default)(Popover_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 250px;\n font-size: 12px;\n"])));
|
|
2606
2606
|
var StyledTable = styled_components_1.default.table.withConfig({
|
|
2607
2607
|
displayName: "Tooltip__StyledTable",
|
|
2608
|
-
componentId: "xwewsa-
|
|
2608
|
+
componentId: "xwewsa-0"
|
|
2609
2609
|
})(["margin:2px 6px 2px 6px;width:calc(100% - 12px);"]);
|
|
2610
2610
|
var StyledTitleColumn = styled_components_1.default.td.withConfig({
|
|
2611
2611
|
displayName: "Tooltip__StyledTitleColumn",
|
|
2612
|
-
componentId: "xwewsa-
|
|
2612
|
+
componentId: "xwewsa-1"
|
|
2613
2613
|
})(["opacity:0.85;"]);
|
|
2614
2614
|
var StyledValueColumn = styled_components_1.default.td.withConfig({
|
|
2615
2615
|
displayName: "Tooltip__StyledValueColumn",
|
|
2616
|
-
componentId: "xwewsa-
|
|
2616
|
+
componentId: "xwewsa-2"
|
|
2617
2617
|
})(["text-align:right;"]);
|
|
2618
2618
|
var StyledColorBlock = styled_components_1.default.div.withConfig({
|
|
2619
2619
|
displayName: "Tooltip__StyledColorBlock",
|
|
2620
|
-
componentId: "xwewsa-
|
|
2620
|
+
componentId: "xwewsa-3"
|
|
2621
2621
|
})(["background-color:", ";display:inline-block;margin-right:4px;border-radius:2px;width:6px;height:11px;transform:translateY(1px);"], function (props) {
|
|
2622
2622
|
return props.color;
|
|
2623
2623
|
});
|
|
@@ -2667,11 +2667,11 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
2667
2667
|
"data-test": "area-id"
|
|
2668
2668
|
}, areaId), React.createElement(StyledValueColumn, {
|
|
2669
2669
|
"data-test": "area-value"
|
|
2670
|
-
}, areaValue)), latitude && React.createElement("tr", null, React.createElement(StyledTitleColumn, null, i18n_1._('Latitude')), React.createElement(StyledValueColumn, {
|
|
2670
|
+
}, areaValue)), latitude && React.createElement("tr", null, React.createElement(StyledTitleColumn, null, (0, i18n_1._)('Latitude')), React.createElement(StyledValueColumn, {
|
|
2671
2671
|
"data-test": "latitude"
|
|
2672
|
-
}, exports.convertDegToDMS(latitude, 'latitude'))), longitude && React.createElement("tr", null, React.createElement(StyledTitleColumn, null, i18n_1._('Longitude')), React.createElement(StyledValueColumn, {
|
|
2672
|
+
}, (0, exports.convertDegToDMS)(latitude, 'latitude'))), longitude && React.createElement("tr", null, React.createElement(StyledTitleColumn, null, (0, i18n_1._)('Longitude')), React.createElement(StyledValueColumn, {
|
|
2673
2673
|
"data-test": "longitude"
|
|
2674
|
-
}, exports.convertDegToDMS(longitude, 'longitude'))), additionalFields.filter(function (_ref2) {
|
|
2674
|
+
}, (0, exports.convertDegToDMS)(longitude, 'longitude'))), additionalFields.filter(function (_ref2) {
|
|
2675
2675
|
var value = _ref2.value;
|
|
2676
2676
|
return value && String(value) !== '0';
|
|
2677
2677
|
}).map(function (_ref3, index) {
|
|
@@ -2694,13 +2694,15 @@ exports.default = Tooltip;
|
|
|
2694
2694
|
|
|
2695
2695
|
/***/ }),
|
|
2696
2696
|
|
|
2697
|
-
/***/
|
|
2697
|
+
/***/ 417:
|
|
2698
2698
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2699
2699
|
|
|
2700
2700
|
"use strict";
|
|
2701
2701
|
|
|
2702
2702
|
|
|
2703
2703
|
var _defineProperty = __webpack_require__(7);
|
|
2704
|
+
var _taggedTemplateLiteral = __webpack_require__(59);
|
|
2705
|
+
var _templateObject;
|
|
2704
2706
|
var __rest = this && this.__rest || function (s, e) {
|
|
2705
2707
|
var t = {};
|
|
2706
2708
|
for (var p in s) {
|
|
@@ -2719,8 +2721,8 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
2719
2721
|
var React = __webpack_require__(1);
|
|
2720
2722
|
var colorUtils_1 = __webpack_require__(12);
|
|
2721
2723
|
var lodash_1 = __webpack_require__(3);
|
|
2722
|
-
var MapUtils_1 = __webpack_require__(
|
|
2723
|
-
var MarkerWrapper_1 = __webpack_require__(
|
|
2724
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
2725
|
+
var MarkerWrapper_1 = __webpack_require__(132);
|
|
2724
2726
|
var MarkerIcon = function MarkerIcon(_a) {
|
|
2725
2727
|
var theme = _a.theme,
|
|
2726
2728
|
color = _a.color,
|
|
@@ -2767,10 +2769,7 @@ var Marker = React.memo(function (_ref) {
|
|
|
2767
2769
|
}, icon);
|
|
2768
2770
|
});
|
|
2769
2771
|
Marker.displayName = 'MapMarker';
|
|
2770
|
-
var StyledMarkerWrapper = styled_components_1.default(MarkerWrapper_1.default)
|
|
2771
|
-
displayName: "MarkerLayer__StyledMarkerWrapper",
|
|
2772
|
-
componentId: "ej9u2l-0"
|
|
2773
|
-
})(["width:22px;height:28px;cursor:pointer;"]);
|
|
2772
|
+
var StyledMarkerWrapper = (0, styled_components_1.default)(MarkerWrapper_1.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 22px;\n height: 28px;\n cursor: pointer;\n"])));
|
|
2774
2773
|
var generateMarkerWrapperProps = function generateMarkerWrapperProps(markerLayer) {
|
|
2775
2774
|
var onMapClick = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lodash_1.noop;
|
|
2776
2775
|
var latArray = markerLayer.latitude;
|
|
@@ -2779,8 +2778,8 @@ var generateMarkerWrapperProps = function generateMarkerWrapperProps(markerLayer
|
|
|
2779
2778
|
var limit = Math.min(latArray.length, lonArray.length, markerLayer.resultLimit ? markerLayer.resultLimit : MapUtils_1.DEFAULT_RESULT_LIMIT);
|
|
2780
2779
|
var markerProps = [];
|
|
2781
2780
|
var _loop = function _loop(i) {
|
|
2782
|
-
var staticColor = markerLayer.seriesColors && colorUtils_1.isColor(markerLayer.seriesColors[0]) ? markerLayer.seriesColors[0] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
2783
|
-
var dynamicColor = markerLayer.dataColors && colorUtils_1.isColor(markerLayer.dataColors[i]) ? markerLayer.dataColors[i] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
2781
|
+
var staticColor = markerLayer.seriesColors && (0, colorUtils_1.isColor)(markerLayer.seriesColors[0]) ? markerLayer.seriesColors[0] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
2782
|
+
var dynamicColor = markerLayer.dataColors && (0, colorUtils_1.isColor)(markerLayer.dataColors[i]) ? markerLayer.dataColors[i] : MapUtils_1.DEFAULT_CLUSTER_COLOR;
|
|
2784
2783
|
var color = isStaticColor ? staticColor : dynamicColor;
|
|
2785
2784
|
var additionalFields = markerLayer.metadata ? markerLayer.additionalTooltipFields.map(function (field) {
|
|
2786
2785
|
return {
|
|
@@ -2822,7 +2821,7 @@ var MarkerLayer = function MarkerLayer(props) {
|
|
|
2822
2821
|
onMapClick = props.onMapClick;
|
|
2823
2822
|
markerLayer.seriesColors = markerLayer.seriesColors || MapUtils_1.DEFAULT_SERIES_COLORS;
|
|
2824
2823
|
var markerPropsList = React.useMemo(function () {
|
|
2825
|
-
return exports.generateMarkerWrapperProps(markerLayer, onMapClick);
|
|
2824
|
+
return (0, exports.generateMarkerWrapperProps)(markerLayer, onMapClick);
|
|
2826
2825
|
}, [markerLayer, onMapClick]);
|
|
2827
2826
|
return React.createElement(React.Fragment, null, markerPropsList.map(function (markerProps, i) {
|
|
2828
2827
|
return React.createElement(Marker, Object.assign({
|
|
@@ -2836,7 +2835,7 @@ exports.default = MarkerLayer;
|
|
|
2836
2835
|
|
|
2837
2836
|
/***/ }),
|
|
2838
2837
|
|
|
2839
|
-
/***/
|
|
2838
|
+
/***/ 418:
|
|
2840
2839
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2841
2840
|
|
|
2842
2841
|
"use strict";
|
|
@@ -2848,10 +2847,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2848
2847
|
});
|
|
2849
2848
|
var React = __webpack_require__(1);
|
|
2850
2849
|
var Message_1 = __webpack_require__(10);
|
|
2851
|
-
var GeoRegistry_1 = __webpack_require__(
|
|
2852
|
-
var GeoJsonProvider_1 = __webpack_require__(
|
|
2853
|
-
var MapUtils_1 = __webpack_require__(
|
|
2854
|
-
var ChoroplethLayer_1 = __webpack_require__(
|
|
2850
|
+
var GeoRegistry_1 = __webpack_require__(419);
|
|
2851
|
+
var GeoJsonProvider_1 = __webpack_require__(420);
|
|
2852
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
2853
|
+
var ChoroplethLayer_1 = __webpack_require__(160);
|
|
2855
2854
|
var LocalChoroplethLayer = function LocalChoroplethLayer(props) {
|
|
2856
2855
|
var _a, _b;
|
|
2857
2856
|
var width = props.width,
|
|
@@ -2938,7 +2937,7 @@ var LocalChoroplethLayer = function LocalChoroplethLayer(props) {
|
|
|
2938
2937
|
var colors = (_a = choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors) === null || _a === void 0 ? void 0 : _a.map(function (color) {
|
|
2939
2938
|
return (color === null || color === void 0 ? void 0 : color.length) > 7 ? color.slice(0, 7) : color;
|
|
2940
2939
|
});
|
|
2941
|
-
var scaledOpacities = (_b = MapUtils_1.getScaledOpacities(choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors, cfgOpacity)) !== null && _b !== void 0 ? _b : [];
|
|
2940
|
+
var scaledOpacities = (_b = (0, MapUtils_1.getScaledOpacities)(choroplethLayer === null || choroplethLayer === void 0 ? void 0 : choroplethLayer.dataColors, cfgOpacity)) !== null && _b !== void 0 ? _b : [];
|
|
2942
2941
|
var updatedAllChoroplethData = React.useMemo(function () {
|
|
2943
2942
|
var allChoroplethData = [];
|
|
2944
2943
|
if (validGeoJson) {
|
|
@@ -2971,7 +2970,7 @@ var LocalChoroplethLayer = function LocalChoroplethLayer(props) {
|
|
|
2971
2970
|
return allChoroplethData;
|
|
2972
2971
|
}, [choroplethLayer.areaIds, choroplethLayer.areaValues, colors, scaledOpacities]);
|
|
2973
2972
|
var _handleMapClick = function handleMapClick(e, i) {
|
|
2974
|
-
var payload = MapUtils_1.formatMetadata(choroplethLayer, i);
|
|
2973
|
+
var payload = (0, MapUtils_1.formatMetadata)(choroplethLayer, i);
|
|
2975
2974
|
onMapClick({
|
|
2976
2975
|
e: e,
|
|
2977
2976
|
payload: payload
|
|
@@ -3018,21 +3017,54 @@ exports.default = LocalChoroplethLayer;
|
|
|
3018
3017
|
|
|
3019
3018
|
/***/ }),
|
|
3020
3019
|
|
|
3021
|
-
/***/
|
|
3020
|
+
/***/ 419:
|
|
3022
3021
|
/***/ (function(module, exports) {
|
|
3023
3022
|
|
|
3024
3023
|
module.exports = require("@splunk/visualization-context/GeoRegistry");
|
|
3025
3024
|
|
|
3026
3025
|
/***/ }),
|
|
3027
3026
|
|
|
3028
|
-
/***/
|
|
3027
|
+
/***/ 42:
|
|
3028
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3029
|
+
|
|
3030
|
+
"use strict";
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
var _classCallCheck = __webpack_require__(9);
|
|
3034
|
+
var _createClass = __webpack_require__(18);
|
|
3035
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3036
|
+
value: true
|
|
3037
|
+
});
|
|
3038
|
+
exports.DefaultVizActionHandler = void 0;
|
|
3039
|
+
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
3040
|
+
function DefaultVizActionHandler() {
|
|
3041
|
+
_classCallCheck(this, DefaultVizActionHandler);
|
|
3042
|
+
}
|
|
3043
|
+
_createClass(DefaultVizActionHandler, [{
|
|
3044
|
+
key: "focus",
|
|
3045
|
+
value: function focus() {
|
|
3046
|
+
// noop
|
|
3047
|
+
}
|
|
3048
|
+
}, {
|
|
3049
|
+
key: "snapshot",
|
|
3050
|
+
value: function snapshot() {
|
|
3051
|
+
return null; // noop
|
|
3052
|
+
}
|
|
3053
|
+
}]);
|
|
3054
|
+
return DefaultVizActionHandler;
|
|
3055
|
+
}();
|
|
3056
|
+
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
3057
|
+
|
|
3058
|
+
/***/ }),
|
|
3059
|
+
|
|
3060
|
+
/***/ 420:
|
|
3029
3061
|
/***/ (function(module, exports) {
|
|
3030
3062
|
|
|
3031
3063
|
module.exports = require("@splunk/visualization-context/GeoJsonProvider");
|
|
3032
3064
|
|
|
3033
3065
|
/***/ }),
|
|
3034
3066
|
|
|
3035
|
-
/***/
|
|
3067
|
+
/***/ 421:
|
|
3036
3068
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3037
3069
|
|
|
3038
3070
|
"use strict";
|
|
@@ -3042,15 +3074,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3042
3074
|
value: true
|
|
3043
3075
|
});
|
|
3044
3076
|
var visualization_icons_1 = __webpack_require__(52);
|
|
3045
|
-
var placeholders_1 = __webpack_require__(
|
|
3077
|
+
var placeholders_1 = __webpack_require__(50);
|
|
3046
3078
|
var schemaUtils_1 = __webpack_require__(16);
|
|
3047
3079
|
var visualization_color_palettes_1 = __webpack_require__(51);
|
|
3048
|
-
var themes_1 = __webpack_require__(
|
|
3080
|
+
var themes_1 = __webpack_require__(60);
|
|
3049
3081
|
var i18n_1 = __webpack_require__(2);
|
|
3050
3082
|
var VizBehavior_1 = __webpack_require__(6);
|
|
3051
3083
|
var VizCategory_1 = __webpack_require__(35);
|
|
3052
3084
|
var configUtils_1 = __webpack_require__(20);
|
|
3053
|
-
var MapUtils_1 = __webpack_require__(
|
|
3085
|
+
var MapUtils_1 = __webpack_require__(91);
|
|
3054
3086
|
var BackgroundColor_1 = __webpack_require__(53);
|
|
3055
3087
|
var defaultContext = {
|
|
3056
3088
|
colorRangeConfig: [{
|
|
@@ -3104,7 +3136,7 @@ var optionsSchema = {
|
|
|
3104
3136
|
baseLayerTileServerType: {
|
|
3105
3137
|
type: 'string',
|
|
3106
3138
|
description: 'Specify the type of tile set for the base map.',
|
|
3107
|
-
pattern: schemaUtils_1.getPattern(['vector', 'raster'])
|
|
3139
|
+
pattern: (0, schemaUtils_1.getPattern)(['vector', 'raster'])
|
|
3108
3140
|
},
|
|
3109
3141
|
center: {
|
|
3110
3142
|
type: 'array',
|
|
@@ -3151,7 +3183,7 @@ var optionsSchema = {
|
|
|
3151
3183
|
type: {
|
|
3152
3184
|
description: 'Specify the type of data layer method to display points on the map. For example, “bubble”, “marker”, or "choropleth".',
|
|
3153
3185
|
type: 'string',
|
|
3154
|
-
pattern: schemaUtils_1.getPattern([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3186
|
+
pattern: (0, schemaUtils_1.getPattern)([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3155
3187
|
default: MapUtils_1.LAYER_TYPE.Marker
|
|
3156
3188
|
},
|
|
3157
3189
|
latitude: {
|
|
@@ -3206,7 +3238,7 @@ var optionsSchema = {
|
|
|
3206
3238
|
type: {
|
|
3207
3239
|
description: 'Specify the type of data layer method to display points on the map. For example, “bubble”, “marker”, or "choropleth".',
|
|
3208
3240
|
type: 'string',
|
|
3209
|
-
pattern: schemaUtils_1.getPattern([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3241
|
+
pattern: (0, schemaUtils_1.getPattern)([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3210
3242
|
default: MapUtils_1.LAYER_TYPE.Choropleth
|
|
3211
3243
|
},
|
|
3212
3244
|
areaIds: {
|
|
@@ -3248,7 +3280,7 @@ var optionsSchema = {
|
|
|
3248
3280
|
},
|
|
3249
3281
|
source: {
|
|
3250
3282
|
description: 'Source for the geodata for choropleth layer: "us" or "world", and will override data specified in the SPL geom command.',
|
|
3251
|
-
pattern: schemaUtils_1.getPattern(['geo://default/us', 'geo://default/world']),
|
|
3283
|
+
pattern: (0, schemaUtils_1.getPattern)(['geo://default/us', 'geo://default/world']),
|
|
3252
3284
|
type: 'string'
|
|
3253
3285
|
},
|
|
3254
3286
|
choroplethEmptyAreaColor: {
|
|
@@ -3275,7 +3307,7 @@ var optionsSchema = {
|
|
|
3275
3307
|
type: {
|
|
3276
3308
|
description: 'Specify the type of data layer method to display points on the map. For example, “bubble”, “marker”, or "choropleth".',
|
|
3277
3309
|
type: 'string',
|
|
3278
|
-
pattern: schemaUtils_1.getPattern([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3310
|
+
pattern: (0, schemaUtils_1.getPattern)([MapUtils_1.LAYER_TYPE.Marker, MapUtils_1.LAYER_TYPE.Bubble, MapUtils_1.LAYER_TYPE.Choropleth]),
|
|
3279
3311
|
default: MapUtils_1.LAYER_TYPE.Bubble
|
|
3280
3312
|
},
|
|
3281
3313
|
bubbleSize: {
|
|
@@ -3339,7 +3371,7 @@ var optionsSchema = {
|
|
|
3339
3371
|
default: 'metric',
|
|
3340
3372
|
type: 'string',
|
|
3341
3373
|
description: 'Specify the scale unit to use.',
|
|
3342
|
-
pattern: schemaUtils_1.getPattern(['metric', 'imperial'])
|
|
3374
|
+
pattern: (0, schemaUtils_1.getPattern)(['metric', 'imperial'])
|
|
3343
3375
|
},
|
|
3344
3376
|
showBaseLayer: {
|
|
3345
3377
|
default: true,
|
|
@@ -3363,7 +3395,7 @@ var optionsSchema = {
|
|
|
3363
3395
|
};
|
|
3364
3396
|
var themes = {
|
|
3365
3397
|
defaultBackgroundColor: function defaultBackgroundColor(props) {
|
|
3366
|
-
return themes_1.pick({
|
|
3398
|
+
return (0, themes_1.pick)({
|
|
3367
3399
|
enterprise: {
|
|
3368
3400
|
dark: themes_1.variables.black(props),
|
|
3369
3401
|
light: themes_1.variables.backgroundColor(props)
|
|
@@ -3372,7 +3404,7 @@ var themes = {
|
|
|
3372
3404
|
})(props);
|
|
3373
3405
|
},
|
|
3374
3406
|
controlBackgroundColor: function controlBackgroundColor(props) {
|
|
3375
|
-
return themes_1.pick({
|
|
3407
|
+
return (0, themes_1.pick)({
|
|
3376
3408
|
enterprise: {
|
|
3377
3409
|
dark: themes_1.variables.gray22(props),
|
|
3378
3410
|
light: themes_1.variables.white(props)
|
|
@@ -3381,13 +3413,13 @@ var themes = {
|
|
|
3381
3413
|
})(props);
|
|
3382
3414
|
},
|
|
3383
3415
|
controlForegroundColor: function controlForegroundColor(props) {
|
|
3384
|
-
return themes_1.pick({
|
|
3416
|
+
return (0, themes_1.pick)({
|
|
3385
3417
|
enterprise: themes_1.variables.textColor(props),
|
|
3386
3418
|
prisma: themes_1.variables.contentColorDefault(props)
|
|
3387
3419
|
})(props);
|
|
3388
3420
|
},
|
|
3389
3421
|
defaultChoroplethEmptyAreaColor: function defaultChoroplethEmptyAreaColor(props) {
|
|
3390
|
-
return themes_1.pick({
|
|
3422
|
+
return (0, themes_1.pick)({
|
|
3391
3423
|
enterprise: {
|
|
3392
3424
|
dark: themes_1.variables.gray22(props),
|
|
3393
3425
|
light: themes_1.variables.gray92(props)
|
|
@@ -3399,7 +3431,7 @@ var themes = {
|
|
|
3399
3431
|
})(props);
|
|
3400
3432
|
},
|
|
3401
3433
|
defaultGradientMigrationConfig: function defaultGradientMigrationConfig(props) {
|
|
3402
|
-
return themes_1.pick({
|
|
3434
|
+
return (0, themes_1.pick)({
|
|
3403
3435
|
enterprise: {
|
|
3404
3436
|
dark: ['#4D4A5D', themes_1.variables.syntaxPurple(props)],
|
|
3405
3437
|
light: ['#D2CFDC', themes_1.variables.syntaxPurple(props)]
|
|
@@ -3419,25 +3451,25 @@ var checkTypeIsLocalChoropleth = function checkTypeIsLocalChoropleth(options) {
|
|
|
3419
3451
|
};
|
|
3420
3452
|
var EDITOR_LABEL_WIDTH = 140;
|
|
3421
3453
|
var editorConfig = [{
|
|
3422
|
-
label: i18n_1._('Data configurations'),
|
|
3454
|
+
label: (0, i18n_1._)('Data configurations'),
|
|
3423
3455
|
layout: [[{
|
|
3424
|
-
label: i18n_1._('Layer type'),
|
|
3456
|
+
label: (0, i18n_1._)('Layer type'),
|
|
3425
3457
|
option: 'layers[0].type',
|
|
3426
3458
|
editor: 'editor.select',
|
|
3427
3459
|
editorProps: {
|
|
3428
3460
|
values: [{
|
|
3429
|
-
label: i18n_1._('Bubble'),
|
|
3461
|
+
label: (0, i18n_1._)('Bubble'),
|
|
3430
3462
|
value: MapUtils_1.LAYER_TYPE.Bubble
|
|
3431
3463
|
}, {
|
|
3432
|
-
label: i18n_1._('Marker'),
|
|
3464
|
+
label: (0, i18n_1._)('Marker'),
|
|
3433
3465
|
value: MapUtils_1.LAYER_TYPE.Marker
|
|
3434
3466
|
}, {
|
|
3435
|
-
label: i18n_1._('Choropleth'),
|
|
3467
|
+
label: (0, i18n_1._)('Choropleth'),
|
|
3436
3468
|
value: MapUtils_1.LAYER_TYPE.Choropleth
|
|
3437
3469
|
}]
|
|
3438
3470
|
}
|
|
3439
3471
|
}], [{
|
|
3440
|
-
label: i18n_1._('Area IDs'),
|
|
3472
|
+
label: (0, i18n_1._)('Area IDs'),
|
|
3441
3473
|
option: 'layers[0].areaIds',
|
|
3442
3474
|
editor: 'editor.columnSelector',
|
|
3443
3475
|
showEditor: function showEditor(_ref) {
|
|
@@ -3450,7 +3482,7 @@ var editorConfig = [{
|
|
|
3450
3482
|
filterByTypes: ['string']
|
|
3451
3483
|
}
|
|
3452
3484
|
}], [{
|
|
3453
|
-
label: i18n_1._('Area values'),
|
|
3485
|
+
label: (0, i18n_1._)('Area values'),
|
|
3454
3486
|
option: 'layers[0].areaValues',
|
|
3455
3487
|
editor: 'editor.columnSelector',
|
|
3456
3488
|
showEditor: function showEditor(_ref2) {
|
|
@@ -3463,7 +3495,7 @@ var editorConfig = [{
|
|
|
3463
3495
|
filterByTypes: ['number']
|
|
3464
3496
|
}
|
|
3465
3497
|
}], [{
|
|
3466
|
-
label: i18n_1._('Latitude'),
|
|
3498
|
+
label: (0, i18n_1._)('Latitude'),
|
|
3467
3499
|
option: 'layers[0].latitude',
|
|
3468
3500
|
editor: 'editor.columnSelector',
|
|
3469
3501
|
showEditor: function showEditor(_ref3) {
|
|
@@ -3475,7 +3507,7 @@ var editorConfig = [{
|
|
|
3475
3507
|
shouldShowInternalFields: false
|
|
3476
3508
|
}
|
|
3477
3509
|
}], [{
|
|
3478
|
-
label: i18n_1._('Longitude'),
|
|
3510
|
+
label: (0, i18n_1._)('Longitude'),
|
|
3479
3511
|
option: 'layers[0].longitude',
|
|
3480
3512
|
editor: 'editor.columnSelector',
|
|
3481
3513
|
showEditor: function showEditor(_ref4) {
|
|
@@ -3487,7 +3519,7 @@ var editorConfig = [{
|
|
|
3487
3519
|
shouldShowInternalFields: false
|
|
3488
3520
|
}
|
|
3489
3521
|
}], [{
|
|
3490
|
-
label: i18n_1._('Bubble size'),
|
|
3522
|
+
label: (0, i18n_1._)('Bubble size'),
|
|
3491
3523
|
option: 'layers[0].bubbleSize',
|
|
3492
3524
|
editor: 'editor.columnMultiSelector',
|
|
3493
3525
|
showEditor: function showEditor(_ref5) {
|
|
@@ -3500,11 +3532,11 @@ var editorConfig = [{
|
|
|
3500
3532
|
excludeByNames: ['latitude', 'longitude', 'geobin']
|
|
3501
3533
|
}
|
|
3502
3534
|
}], [{
|
|
3503
|
-
label: i18n_1._('Additional tooltip fields'),
|
|
3535
|
+
label: (0, i18n_1._)('Additional tooltip fields'),
|
|
3504
3536
|
option: 'layers[0].additionalTooltipFields',
|
|
3505
3537
|
editor: 'editor.columnMultiSelectionByFieldNameEditor'
|
|
3506
3538
|
}], [{
|
|
3507
|
-
label: i18n_1._('Result limit'),
|
|
3539
|
+
label: (0, i18n_1._)('Result limit'),
|
|
3508
3540
|
option: 'layers[0].resultLimit',
|
|
3509
3541
|
editor: 'editor.number',
|
|
3510
3542
|
showEditor: function showEditor(_ref6) {
|
|
@@ -3518,9 +3550,9 @@ var editorConfig = [{
|
|
|
3518
3550
|
}
|
|
3519
3551
|
}]]
|
|
3520
3552
|
}, {
|
|
3521
|
-
label: i18n_1._('Data display'),
|
|
3553
|
+
label: (0, i18n_1._)('Data display'),
|
|
3522
3554
|
layout: [[{
|
|
3523
|
-
label: i18n_1._('Latitude (initial map location)'),
|
|
3555
|
+
label: (0, i18n_1._)('Latitude (initial map location)'),
|
|
3524
3556
|
option: 'center[0]',
|
|
3525
3557
|
editor: 'editor.number',
|
|
3526
3558
|
editorProps: {
|
|
@@ -3530,7 +3562,7 @@ var editorConfig = [{
|
|
|
3530
3562
|
max: 90
|
|
3531
3563
|
}
|
|
3532
3564
|
}], [{
|
|
3533
|
-
label: i18n_1._('Longitude (initial map location)'),
|
|
3565
|
+
label: (0, i18n_1._)('Longitude (initial map location)'),
|
|
3534
3566
|
option: 'center[1]',
|
|
3535
3567
|
editor: 'editor.number',
|
|
3536
3568
|
editorProps: {
|
|
@@ -3540,7 +3572,7 @@ var editorConfig = [{
|
|
|
3540
3572
|
max: 180
|
|
3541
3573
|
}
|
|
3542
3574
|
}], [{
|
|
3543
|
-
label: i18n_1._('Zoom (initial map location)'),
|
|
3575
|
+
label: (0, i18n_1._)('Zoom (initial map location)'),
|
|
3544
3576
|
option: 'zoom',
|
|
3545
3577
|
editor: 'editor.number',
|
|
3546
3578
|
editorProps: {
|
|
@@ -3549,7 +3581,7 @@ var editorConfig = [{
|
|
|
3549
3581
|
min: 0
|
|
3550
3582
|
}
|
|
3551
3583
|
}], [{
|
|
3552
|
-
label: i18n_1._('Show zoom controls'),
|
|
3584
|
+
label: (0, i18n_1._)('Show zoom controls'),
|
|
3553
3585
|
option: 'showZoomControls',
|
|
3554
3586
|
editor: 'editor.checkbox',
|
|
3555
3587
|
editorProps: {
|
|
@@ -3557,7 +3589,7 @@ var editorConfig = [{
|
|
|
3557
3589
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
3558
3590
|
}
|
|
3559
3591
|
}], [{
|
|
3560
|
-
label: i18n_1._('Show scale'),
|
|
3592
|
+
label: (0, i18n_1._)('Show scale'),
|
|
3561
3593
|
option: 'showScale',
|
|
3562
3594
|
editor: 'editor.toggle',
|
|
3563
3595
|
editorProps: {
|
|
@@ -3565,7 +3597,7 @@ var editorConfig = [{
|
|
|
3565
3597
|
labelWidth: EDITOR_LABEL_WIDTH
|
|
3566
3598
|
}
|
|
3567
3599
|
}], [{
|
|
3568
|
-
label: i18n_1._('Scale unit'),
|
|
3600
|
+
label: (0, i18n_1._)('Scale unit'),
|
|
3569
3601
|
option: 'scaleUnit',
|
|
3570
3602
|
editor: 'editor.radioBar',
|
|
3571
3603
|
showEditor: function showEditor(_ref7) {
|
|
@@ -3574,16 +3606,16 @@ var editorConfig = [{
|
|
|
3574
3606
|
},
|
|
3575
3607
|
editorProps: {
|
|
3576
3608
|
values: [{
|
|
3577
|
-
label: i18n_1._('Metric'),
|
|
3609
|
+
label: (0, i18n_1._)('Metric'),
|
|
3578
3610
|
value: 'metric'
|
|
3579
3611
|
}, {
|
|
3580
|
-
label: i18n_1._('Imperial'),
|
|
3612
|
+
label: (0, i18n_1._)('Imperial'),
|
|
3581
3613
|
value: 'imperial'
|
|
3582
3614
|
}]
|
|
3583
3615
|
}
|
|
3584
3616
|
}]]
|
|
3585
3617
|
}, {
|
|
3586
|
-
label: i18n_1._('Color and style'),
|
|
3618
|
+
label: (0, i18n_1._)('Color and style'),
|
|
3587
3619
|
layout: [
|
|
3588
3620
|
// TODO: add support for color mode option and its corresponding editor
|
|
3589
3621
|
// [
|
|
@@ -3600,7 +3632,7 @@ var editorConfig = [{
|
|
|
3600
3632
|
// },
|
|
3601
3633
|
// ],
|
|
3602
3634
|
[{
|
|
3603
|
-
label: i18n_1._('Series colors'),
|
|
3635
|
+
label: (0, i18n_1._)('Series colors'),
|
|
3604
3636
|
option: 'layers[0].seriesColors',
|
|
3605
3637
|
editor: 'editor.seriesColors',
|
|
3606
3638
|
showEditor: function showEditor(_ref8) {
|
|
@@ -3621,7 +3653,7 @@ var editorConfig = [{
|
|
|
3621
3653
|
// },
|
|
3622
3654
|
// ],
|
|
3623
3655
|
[{
|
|
3624
|
-
label: i18n_1._('Choropleth empty area'),
|
|
3656
|
+
label: (0, i18n_1._)('Choropleth empty area'),
|
|
3625
3657
|
option: 'layers[0].choroplethEmptyAreaColor',
|
|
3626
3658
|
editor: 'editor.color',
|
|
3627
3659
|
showEditor: function showEditor(_ref9) {
|
|
@@ -3632,7 +3664,7 @@ var editorConfig = [{
|
|
|
3632
3664
|
themes: themes
|
|
3633
3665
|
}
|
|
3634
3666
|
}], [{
|
|
3635
|
-
label: i18n_1._('Choropleth stroke'),
|
|
3667
|
+
label: (0, i18n_1._)('Choropleth stroke'),
|
|
3636
3668
|
option: 'layers[0].choroplethStrokeColor',
|
|
3637
3669
|
editor: 'editor.color',
|
|
3638
3670
|
showEditor: function showEditor(_ref10) {
|
|
@@ -3643,7 +3675,7 @@ var editorConfig = [{
|
|
|
3643
3675
|
themes: themes
|
|
3644
3676
|
}
|
|
3645
3677
|
}], [{
|
|
3646
|
-
label: i18n_1._('Choropleth opacity (%)'),
|
|
3678
|
+
label: (0, i18n_1._)('Choropleth opacity (%)'),
|
|
3647
3679
|
option: 'layers[0].choroplethOpacity',
|
|
3648
3680
|
editor: 'editor.percent',
|
|
3649
3681
|
showEditor: function showEditor(_ref11) {
|
|
@@ -3663,14 +3695,14 @@ var editorConfig = [{
|
|
|
3663
3695
|
// editor: 'editor.seriesColorsByField',
|
|
3664
3696
|
// },
|
|
3665
3697
|
// ],
|
|
3666
|
-
BackgroundColor_1.default({
|
|
3698
|
+
(0, BackgroundColor_1.default)({
|
|
3667
3699
|
themes: themes
|
|
3668
3700
|
}), [{
|
|
3669
|
-
label: i18n_1._('Show base layer'),
|
|
3701
|
+
label: (0, i18n_1._)('Show base layer'),
|
|
3670
3702
|
option: 'showBaseLayer',
|
|
3671
3703
|
editor: 'editor.toggle'
|
|
3672
3704
|
}], [{
|
|
3673
|
-
label: i18n_1._('Base layer tile server'),
|
|
3705
|
+
label: (0, i18n_1._)('Base layer tile server'),
|
|
3674
3706
|
option: 'baseLayerTileServer',
|
|
3675
3707
|
editor: 'editor.text',
|
|
3676
3708
|
showEditor: function showEditor(_ref12) {
|
|
@@ -3678,7 +3710,7 @@ var editorConfig = [{
|
|
|
3678
3710
|
return options.showBaseLayer !== false;
|
|
3679
3711
|
}
|
|
3680
3712
|
}], [{
|
|
3681
|
-
label: i18n_1._('Base layer tile server type'),
|
|
3713
|
+
label: (0, i18n_1._)('Base layer tile server type'),
|
|
3682
3714
|
option: 'baseLayerTileServerType',
|
|
3683
3715
|
editor: 'editor.radioBar',
|
|
3684
3716
|
showEditor: function showEditor(_ref13) {
|
|
@@ -3687,10 +3719,10 @@ var editorConfig = [{
|
|
|
3687
3719
|
},
|
|
3688
3720
|
editorProps: {
|
|
3689
3721
|
values: [{
|
|
3690
|
-
label: i18n_1._('Vector'),
|
|
3722
|
+
label: (0, i18n_1._)('Vector'),
|
|
3691
3723
|
value: 'vector'
|
|
3692
3724
|
}, {
|
|
3693
|
-
label: i18n_1._('Raster'),
|
|
3725
|
+
label: (0, i18n_1._)('Raster'),
|
|
3694
3726
|
value: 'raster'
|
|
3695
3727
|
}]
|
|
3696
3728
|
}
|
|
@@ -3707,7 +3739,7 @@ var config = {
|
|
|
3707
3739
|
/**
|
|
3708
3740
|
* viz name
|
|
3709
3741
|
*/
|
|
3710
|
-
name: i18n_1._('Map'),
|
|
3742
|
+
name: (0, i18n_1._)('Map'),
|
|
3711
3743
|
category: VizCategory_1.VizCategory.SPATIAL,
|
|
3712
3744
|
status: 'preview',
|
|
3713
3745
|
/**
|
|
@@ -3732,11 +3764,11 @@ var config = {
|
|
|
3732
3764
|
themes: themes,
|
|
3733
3765
|
requiredProps: []
|
|
3734
3766
|
};
|
|
3735
|
-
exports.default = configUtils_1.enhanceConfig(config);
|
|
3767
|
+
exports.default = (0, configUtils_1.enhanceConfig)(config);
|
|
3736
3768
|
|
|
3737
3769
|
/***/ }),
|
|
3738
3770
|
|
|
3739
|
-
/***/
|
|
3771
|
+
/***/ 422:
|
|
3740
3772
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3741
3773
|
|
|
3742
3774
|
"use strict";
|
|
@@ -3747,10 +3779,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3747
3779
|
});
|
|
3748
3780
|
exports.columnsNullToZeros = void 0;
|
|
3749
3781
|
var types_1 = __webpack_require__(94);
|
|
3750
|
-
var dsl_1 = __webpack_require__(
|
|
3751
|
-
var hocUtils_1 = __webpack_require__(
|
|
3752
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
3753
|
-
var BubbleLayer_1 = __webpack_require__(
|
|
3782
|
+
var dsl_1 = __webpack_require__(133);
|
|
3783
|
+
var hocUtils_1 = __webpack_require__(27);
|
|
3784
|
+
var JSONSchemaUtils_1 = __webpack_require__(28);
|
|
3785
|
+
var BubbleLayer_1 = __webpack_require__(131);
|
|
3754
3786
|
var columnsNullToZeros = function columnsNullToZeros(config, dataSources, options) {
|
|
3755
3787
|
var _a, _b;
|
|
3756
3788
|
var primary = dataSources.primary;
|
|
@@ -3758,10 +3790,10 @@ var columnsNullToZeros = function columnsNullToZeros(config, dataSources, option
|
|
|
3758
3790
|
columns = _primary$data.columns,
|
|
3759
3791
|
fields = _primary$data.fields;
|
|
3760
3792
|
var newColumns = columns;
|
|
3761
|
-
var mergedOptions = hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, JSONSchemaUtils_1.pickFieldFromJSONSchema(config.optionsSchema, 'default'));
|
|
3793
|
+
var mergedOptions = (0, hocUtils_1.deepMergeWithArrayPrimitiveOverrides)({}, options, (0, JSONSchemaUtils_1.pickFieldFromJSONSchema)(config.optionsSchema, 'default'));
|
|
3762
3794
|
if (((_b = (_a = mergedOptions.layers) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.type) === 'bubble') {
|
|
3763
|
-
var latitudeField = dsl_1.getFieldsFromDSL(mergedOptions.layers[0].latitude, dataSources)[0] || '';
|
|
3764
|
-
var longitudeField = dsl_1.getFieldsFromDSL(mergedOptions.layers[0].longitude, dataSources)[0] || '';
|
|
3795
|
+
var latitudeField = (0, dsl_1.getFieldsFromDSL)(mergedOptions.layers[0].latitude, dataSources)[0] || '';
|
|
3796
|
+
var longitudeField = (0, dsl_1.getFieldsFromDSL)(mergedOptions.layers[0].longitude, dataSources)[0] || '';
|
|
3765
3797
|
var excludedFields = [latitudeField, longitudeField, 'geobin'].concat(BubbleLayer_1.GEO_LAT_AND_LONG_FIELD);
|
|
3766
3798
|
var indicesToEvaluate = new Set(fields.reduce(function (arr, e, i) {
|
|
3767
3799
|
var field = typeof e === 'string' ? e : e.name.toString();
|
|
@@ -3774,7 +3806,7 @@ var columnsNullToZeros = function columnsNullToZeros(config, dataSources, option
|
|
|
3774
3806
|
if (indicesToEvaluate.has(i)) {
|
|
3775
3807
|
// sanitize value and convert string to numeric numbers
|
|
3776
3808
|
return column.map(function (value) {
|
|
3777
|
-
return !value || !types_1.isNumber(value) ? 0 : +value;
|
|
3809
|
+
return !value || !(0, types_1.isNumber)(value) ? 0 : +value;
|
|
3778
3810
|
});
|
|
3779
3811
|
}
|
|
3780
3812
|
return column;
|
|
@@ -3793,39 +3825,6 @@ exports.columnsNullToZeros = columnsNullToZeros;
|
|
|
3793
3825
|
|
|
3794
3826
|
/***/ }),
|
|
3795
3827
|
|
|
3796
|
-
/***/ 42:
|
|
3797
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3798
|
-
|
|
3799
|
-
"use strict";
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
var _classCallCheck = __webpack_require__(9);
|
|
3803
|
-
var _createClass = __webpack_require__(18);
|
|
3804
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3805
|
-
value: true
|
|
3806
|
-
});
|
|
3807
|
-
exports.DefaultVizActionHandler = void 0;
|
|
3808
|
-
var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
3809
|
-
function DefaultVizActionHandler() {
|
|
3810
|
-
_classCallCheck(this, DefaultVizActionHandler);
|
|
3811
|
-
}
|
|
3812
|
-
_createClass(DefaultVizActionHandler, [{
|
|
3813
|
-
key: "focus",
|
|
3814
|
-
value: function focus() {
|
|
3815
|
-
// noop
|
|
3816
|
-
}
|
|
3817
|
-
}, {
|
|
3818
|
-
key: "snapshot",
|
|
3819
|
-
value: function snapshot() {
|
|
3820
|
-
return null; // noop
|
|
3821
|
-
}
|
|
3822
|
-
}]);
|
|
3823
|
-
return DefaultVizActionHandler;
|
|
3824
|
-
}();
|
|
3825
|
-
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
3826
|
-
|
|
3827
|
-
/***/ }),
|
|
3828
|
-
|
|
3829
3828
|
/***/ 43:
|
|
3830
3829
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3831
3830
|
|
|
@@ -3866,8 +3865,8 @@ var lodash_1 = __webpack_require__(3);
|
|
|
3866
3865
|
* @param dependencies an array of dependencies
|
|
3867
3866
|
*/
|
|
3868
3867
|
var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
3869
|
-
var ref = react_1.useRef();
|
|
3870
|
-
if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
|
|
3868
|
+
var ref = (0, react_1.useRef)();
|
|
3869
|
+
if (!ref.current || !(0, lodash_1.isEqual)(dependencies, ref.current.dependencies)) {
|
|
3871
3870
|
ref.current = {
|
|
3872
3871
|
dependencies: dependencies,
|
|
3873
3872
|
value: fn()
|
|
@@ -3911,7 +3910,7 @@ exports.isMissing = isMissing;
|
|
|
3911
3910
|
*/
|
|
3912
3911
|
var missingKeys = function missingKeys(keys, target) {
|
|
3913
3912
|
return keys.filter(function (k) {
|
|
3914
|
-
return exports.isMissing(target[k]);
|
|
3913
|
+
return (0, exports.isMissing)(target[k]);
|
|
3915
3914
|
});
|
|
3916
3915
|
};
|
|
3917
3916
|
exports.missingKeys = missingKeys;
|
|
@@ -3935,7 +3934,7 @@ var MissingPropsMessage = function MissingPropsMessage(props) {
|
|
|
3935
3934
|
"data-test": "message",
|
|
3936
3935
|
width: width,
|
|
3937
3936
|
height: height,
|
|
3938
|
-
message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
|
|
3937
|
+
message: (0, i18n_1._)("Missing property: ".concat(missingProps.join(', ')))
|
|
3939
3938
|
});
|
|
3940
3939
|
};
|
|
3941
3940
|
exports.MissingPropsMessage = MissingPropsMessage;
|
|
@@ -3944,7 +3943,7 @@ exports.MissingPropsMessage.defaultProps = {
|
|
|
3944
3943
|
width: '100%',
|
|
3945
3944
|
height: 250
|
|
3946
3945
|
};
|
|
3947
|
-
exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
|
|
3946
|
+
exports.default = (0, FixedSizeContainer_1.default)(exports.MissingPropsMessage);
|
|
3948
3947
|
|
|
3949
3948
|
/***/ }),
|
|
3950
3949
|
|
|
@@ -3965,7 +3964,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
3965
3964
|
componentId: "sc-1gsbnxb-0"
|
|
3966
3965
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
3967
3966
|
var Blocker = styled_components_1.default.div.attrs({
|
|
3968
|
-
'data-splunk-visualization-version': "
|
|
3967
|
+
'data-splunk-visualization-version': "26.0.0 - 2f7458907"
|
|
3969
3968
|
}).withConfig({
|
|
3970
3969
|
displayName: "withEditModeCover__Blocker",
|
|
3971
3970
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -3984,7 +3983,7 @@ var withEditModeCover = function withEditModeCover(Visualization, disableEditMod
|
|
|
3984
3983
|
"data-test": "edit-mode-cover"
|
|
3985
3984
|
}));
|
|
3986
3985
|
};
|
|
3987
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
3986
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
3988
3987
|
Wrapper: Wrapper,
|
|
3989
3988
|
Visualization: Visualization
|
|
3990
3989
|
});
|
|
@@ -4006,7 +4005,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4006
4005
|
var React = __webpack_require__(1);
|
|
4007
4006
|
var colorUtils_1 = __webpack_require__(12);
|
|
4008
4007
|
var variables_1 = __webpack_require__(11);
|
|
4009
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
4008
|
+
var IconPlaceholder_1 = __webpack_require__(32);
|
|
4010
4009
|
var VizBehavior_1 = __webpack_require__(6);
|
|
4011
4010
|
var hocUtils_1 = __webpack_require__(15);
|
|
4012
4011
|
var withPlaceholder = function withPlaceholder(Visualization) {
|
|
@@ -4021,7 +4020,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
4021
4020
|
height = props.height,
|
|
4022
4021
|
width = props.width;
|
|
4023
4022
|
var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
|
|
4024
|
-
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);
|
|
4023
|
+
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);
|
|
4025
4024
|
var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
|
|
4026
4025
|
var iconColor = variables_1.default.contentColorActive(props);
|
|
4027
4026
|
if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
|
|
@@ -4036,7 +4035,7 @@ var withPlaceholder = function withPlaceholder(Visualization) {
|
|
|
4036
4035
|
}
|
|
4037
4036
|
return React.createElement(Visualization, Object.assign({}, props));
|
|
4038
4037
|
};
|
|
4039
|
-
hocUtils_1.extendStaticWrapperProps({
|
|
4038
|
+
(0, hocUtils_1.extendStaticWrapperProps)({
|
|
4040
4039
|
Wrapper: Wrapper,
|
|
4041
4040
|
Visualization: Visualization
|
|
4042
4041
|
});
|
|
@@ -4046,7 +4045,7 @@ exports.default = withPlaceholder;
|
|
|
4046
4045
|
|
|
4047
4046
|
/***/ }),
|
|
4048
4047
|
|
|
4049
|
-
/***/
|
|
4048
|
+
/***/ 50:
|
|
4050
4049
|
/***/ (function(module, exports) {
|
|
4051
4050
|
|
|
4052
4051
|
module.exports = require("@splunk/visualization-icons/placeholders");
|
|
@@ -4082,7 +4081,7 @@ var background = function background(_ref) {
|
|
|
4082
4081
|
themes = _ref.themes,
|
|
4083
4082
|
labelPosition = _ref.labelPosition;
|
|
4084
4083
|
return [{
|
|
4085
|
-
label: i18n_1._(label || 'Background'),
|
|
4084
|
+
label: (0, i18n_1._)(label || 'Background'),
|
|
4086
4085
|
option: 'backgroundColor',
|
|
4087
4086
|
editor: 'editor.color',
|
|
4088
4087
|
editorProps: {
|
|
@@ -4098,7 +4097,7 @@ exports.default = background;
|
|
|
4098
4097
|
/***/ 59:
|
|
4099
4098
|
/***/ (function(module, exports) {
|
|
4100
4099
|
|
|
4101
|
-
module.exports = require("@
|
|
4100
|
+
module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
|
|
4102
4101
|
|
|
4103
4102
|
/***/ }),
|
|
4104
4103
|
|
|
@@ -4139,7 +4138,14 @@ var VizBehavior;
|
|
|
4139
4138
|
|
|
4140
4139
|
/***/ }),
|
|
4141
4140
|
|
|
4142
|
-
/***/
|
|
4141
|
+
/***/ 60:
|
|
4142
|
+
/***/ (function(module, exports) {
|
|
4143
|
+
|
|
4144
|
+
module.exports = require("@splunk/themes");
|
|
4145
|
+
|
|
4146
|
+
/***/ }),
|
|
4147
|
+
|
|
4148
|
+
/***/ 62:
|
|
4143
4149
|
/***/ (function(module, exports) {
|
|
4144
4150
|
|
|
4145
4151
|
module.exports = require("@splunk/react-ui/Popover");
|
|
@@ -4167,7 +4173,7 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
4167
4173
|
|
|
4168
4174
|
/***/ }),
|
|
4169
4175
|
|
|
4170
|
-
/***/
|
|
4176
|
+
/***/ 91:
|
|
4171
4177
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4172
4178
|
|
|
4173
4179
|
"use strict";
|
|
@@ -4181,8 +4187,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4181
4187
|
});
|
|
4182
4188
|
exports.formatMetadata = exports.compareBaseStyles = exports.getScaledOpacities = exports.getGlobalLayerBoundaries = exports.isValidLatLon = exports.bakeBubbleData = exports.sanitizeValues = exports.transposeArray = exports.matchBubbleSize = exports.getStaticColors = exports.getZoomLevelFromGeobin = exports.getZoomConstraintsFromTileConfig = exports.getMapStyle = exports.getTilePreset = exports.LAYER_TYPE = exports.DEFAULT_OPACITY = exports.MAX_BUBBLE_RADIUS = exports.MIN_BUBBLE_RADIUS = exports.MAP_STYLE_VERSION_NUMBER = exports.DEFAULT_SERIES_COLORS = exports.DEFAULT_CLUSTER_COLOR = exports.DEFAULT_RESULT_LIMIT = exports.MIN_LONGITUDE = exports.MAX_LONGITUDE = exports.MIN_LATITUDE = exports.MAX_LATITUDE = void 0;
|
|
4183
4189
|
var lodash_1 = __webpack_require__(3);
|
|
4184
|
-
var d3_scale_1 = __webpack_require__(
|
|
4185
|
-
var chroma = __webpack_require__(
|
|
4190
|
+
var d3_scale_1 = __webpack_require__(92);
|
|
4191
|
+
var chroma = __webpack_require__(158);
|
|
4186
4192
|
var colorUtils_1 = __webpack_require__(12);
|
|
4187
4193
|
var visualization_color_palettes_1 = __webpack_require__(51);
|
|
4188
4194
|
var types_1 = __webpack_require__(94);
|
|
@@ -4226,7 +4232,7 @@ var getTilePreset = function getTilePreset(_ref) {
|
|
|
4226
4232
|
var defaultTileLight = {};
|
|
4227
4233
|
var defaultTileDark = {};
|
|
4228
4234
|
var tileConfigs = [].concat(defaultTileConfig).concat(customTileConfig);
|
|
4229
|
-
lodash_1.forEach(tileConfigs, function (tileConfig) {
|
|
4235
|
+
(0, lodash_1.forEach)(tileConfigs, function (tileConfig) {
|
|
4230
4236
|
var key = tileConfig === null || tileConfig === void 0 ? void 0 : tileConfig.key;
|
|
4231
4237
|
var updatedConfig = Object.assign(Object.assign({
|
|
4232
4238
|
theme: 'all'
|
|
@@ -4359,7 +4365,7 @@ var getZoomConstraintsFromTileConfig = function getZoomConstraintsFromTileConfig
|
|
|
4359
4365
|
if (baseLayerTileServer && sources[sourceKeys[i]].tiles.indexOf(baseLayerTileServer) !== -1) {
|
|
4360
4366
|
matchedBaseLayerTileServer = true;
|
|
4361
4367
|
}
|
|
4362
|
-
if ((baseLayerTileServer && matchedBaseLayerTileServer || !baseLayerTileServer) && lodash_1.isNumber(minzoom) && lodash_1.isNumber(maxzoom)) {
|
|
4368
|
+
if ((baseLayerTileServer && matchedBaseLayerTileServer || !baseLayerTileServer) && (0, lodash_1.isNumber)(minzoom) && (0, lodash_1.isNumber)(maxzoom)) {
|
|
4363
4369
|
return {
|
|
4364
4370
|
minZoom: minzoom,
|
|
4365
4371
|
maxZoom: maxzoom
|
|
@@ -4371,7 +4377,7 @@ var getZoomConstraintsFromTileConfig = function getZoomConstraintsFromTileConfig
|
|
|
4371
4377
|
var _layers$_i = layers[_i],
|
|
4372
4378
|
_minzoom = _layers$_i.minzoom,
|
|
4373
4379
|
_maxzoom = _layers$_i.maxzoom;
|
|
4374
|
-
if ((baseLayerTileServer && matchedBaseLayerTileServer || !baseLayerTileServer) && lodash_1.isNumber(_minzoom) && lodash_1.isNumber(_maxzoom)) {
|
|
4380
|
+
if ((baseLayerTileServer && matchedBaseLayerTileServer || !baseLayerTileServer) && (0, lodash_1.isNumber)(_minzoom) && (0, lodash_1.isNumber)(_maxzoom)) {
|
|
4375
4381
|
return {
|
|
4376
4382
|
minZoom: _minzoom,
|
|
4377
4383
|
maxZoom: _maxzoom
|
|
@@ -4409,13 +4415,13 @@ var getStaticColors = function getStaticColors(colorCount, colorArray) {
|
|
|
4409
4415
|
// loop through colorArray to pick the first $colorCount colors
|
|
4410
4416
|
// start from begining again if colorCount > colorArray.length
|
|
4411
4417
|
return _toConsumableArray(Array(colorCount).keys()).map(function (i) {
|
|
4412
|
-
return colorUtils_1.isColor(colorArray[i % colorArray.length]) ? colorArray[i % colorArray.length] : exports.DEFAULT_CLUSTER_COLOR;
|
|
4418
|
+
return (0, colorUtils_1.isColor)(colorArray[i % colorArray.length]) ? colorArray[i % colorArray.length] : exports.DEFAULT_CLUSTER_COLOR;
|
|
4413
4419
|
});
|
|
4414
4420
|
};
|
|
4415
4421
|
exports.getStaticColors = getStaticColors;
|
|
4416
4422
|
// Bubble size
|
|
4417
4423
|
var matchBubbleSize = function matchBubbleSize(dataRange, data) {
|
|
4418
|
-
var size = d3_scale_1.scalePow().exponent(0.2).domain(dataRange).range([exports.MIN_BUBBLE_RADIUS, exports.MAX_BUBBLE_RADIUS])(data);
|
|
4424
|
+
var size = (0, d3_scale_1.scalePow)().exponent(0.2).domain(dataRange).range([exports.MIN_BUBBLE_RADIUS, exports.MAX_BUBBLE_RADIUS])(data);
|
|
4419
4425
|
if (size > exports.MAX_BUBBLE_RADIUS) {
|
|
4420
4426
|
return exports.MAX_BUBBLE_RADIUS;
|
|
4421
4427
|
}
|
|
@@ -4448,7 +4454,7 @@ var sanitizeValues = function sanitizeValues(values) {
|
|
|
4448
4454
|
}
|
|
4449
4455
|
// array
|
|
4450
4456
|
return values.map(function (arr) {
|
|
4451
|
-
return exports.sanitizeValues(arr);
|
|
4457
|
+
return (0, exports.sanitizeValues)(arr);
|
|
4452
4458
|
});
|
|
4453
4459
|
};
|
|
4454
4460
|
exports.sanitizeValues = sanitizeValues;
|
|
@@ -4460,7 +4466,7 @@ var bakeBubbleData = function bakeBubbleData(layer) {
|
|
|
4460
4466
|
// if bubbleSize is passed as an array of single number array (data series)
|
|
4461
4467
|
// e.g. [value0, value1, ...]
|
|
4462
4468
|
// format each value as an array to unify data operations for data series and frames
|
|
4463
|
-
var sanitizedBubbleSize = exports.sanitizeValues(layer.bubbleSize);
|
|
4469
|
+
var sanitizedBubbleSize = (0, exports.sanitizeValues)(layer.bubbleSize);
|
|
4464
4470
|
var transposedBubbleSize;
|
|
4465
4471
|
var transposedSanitizedBubbleSize;
|
|
4466
4472
|
var isPie = false;
|
|
@@ -4473,8 +4479,8 @@ var bakeBubbleData = function bakeBubbleData(layer) {
|
|
|
4473
4479
|
// to [[column0data]]
|
|
4474
4480
|
// for easy access of values at each geo location,
|
|
4475
4481
|
// and min max pie size computation
|
|
4476
|
-
transposedBubbleSize = exports.transposeArray(layer.bubbleSize);
|
|
4477
|
-
transposedSanitizedBubbleSize = exports.transposeArray(sanitizedBubbleSize);
|
|
4482
|
+
transposedBubbleSize = (0, exports.transposeArray)(layer.bubbleSize);
|
|
4483
|
+
transposedSanitizedBubbleSize = (0, exports.transposeArray)(sanitizedBubbleSize);
|
|
4478
4484
|
// if multiple series in the dataframe, set isPie to true
|
|
4479
4485
|
if (layer.bubbleSize.length > 1) {
|
|
4480
4486
|
isPie = true;
|
|
@@ -4492,7 +4498,7 @@ var bakeBubbleData = function bakeBubbleData(layer) {
|
|
|
4492
4498
|
}
|
|
4493
4499
|
var data = layer.latitude.map(function (lat, i) {
|
|
4494
4500
|
return {
|
|
4495
|
-
zoom: exports.getZoomLevelFromGeobin(layer.geobin[i]),
|
|
4501
|
+
zoom: (0, exports.getZoomLevelFromGeobin)(layer.geobin[i]),
|
|
4496
4502
|
values: transposedBubbleSize[i],
|
|
4497
4503
|
sanitizedValues: transposedSanitizedBubbleSize[i],
|
|
4498
4504
|
coordinates: [layer.longitude[i], lat],
|
|
@@ -4502,10 +4508,10 @@ var bakeBubbleData = function bakeBubbleData(layer) {
|
|
|
4502
4508
|
return Boolean(d.values);
|
|
4503
4509
|
});
|
|
4504
4510
|
// compute the min/max value to encode min/max pie or bubble size
|
|
4505
|
-
var min = lodash_1.sum(transposedSanitizedBubbleSize[0]);
|
|
4506
|
-
var max = lodash_1.sum(transposedSanitizedBubbleSize[1]);
|
|
4511
|
+
var min = (0, lodash_1.sum)(transposedSanitizedBubbleSize[0]);
|
|
4512
|
+
var max = (0, lodash_1.sum)(transposedSanitizedBubbleSize[1]);
|
|
4507
4513
|
transposedSanitizedBubbleSize.forEach(function (row) {
|
|
4508
|
-
var bubbleSize = lodash_1.sum(row);
|
|
4514
|
+
var bubbleSize = (0, lodash_1.sum)(row);
|
|
4509
4515
|
max = bubbleSize > max ? bubbleSize : max;
|
|
4510
4516
|
min = bubbleSize < min ? bubbleSize : min;
|
|
4511
4517
|
});
|
|
@@ -4525,10 +4531,10 @@ var isValidLatLon = function isValidLatLon(latlon) {
|
|
|
4525
4531
|
var _latlon = _slicedToArray(latlon, 2),
|
|
4526
4532
|
lat = _latlon[0],
|
|
4527
4533
|
lon = _latlon[1];
|
|
4528
|
-
if (!types_1.isNumber(lat) || !(lat >= exports.MIN_LATITUDE && lat <= exports.MAX_LATITUDE)) {
|
|
4534
|
+
if (!(0, types_1.isNumber)(lat) || !(lat >= exports.MIN_LATITUDE && lat <= exports.MAX_LATITUDE)) {
|
|
4529
4535
|
return false;
|
|
4530
4536
|
}
|
|
4531
|
-
if (!types_1.isNumber(lon) || !(lon >= exports.MIN_LONGITUDE && lon <= exports.MAX_LONGITUDE)) {
|
|
4537
|
+
if (!(0, types_1.isNumber)(lon) || !(lon >= exports.MIN_LONGITUDE && lon <= exports.MAX_LONGITUDE)) {
|
|
4532
4538
|
return false;
|
|
4533
4539
|
}
|
|
4534
4540
|
return true;
|
|
@@ -4542,7 +4548,7 @@ exports.isValidLatLon = isValidLatLon;
|
|
|
4542
4548
|
*/
|
|
4543
4549
|
var getLatOrLonCoordinates = function getLatOrLonCoordinates(layer, field) {
|
|
4544
4550
|
var getClusterValues = function getClusterValues(clusterLayer) {
|
|
4545
|
-
return lodash_1.get(clusterLayer, field, []).slice(0, clusterLayer.type === LAYER_TYPE.Marker && clusterLayer.resultLimit ? clusterLayer.resultLimit : exports.DEFAULT_RESULT_LIMIT);
|
|
4551
|
+
return (0, lodash_1.get)(clusterLayer, field, []).slice(0, clusterLayer.type === LAYER_TYPE.Marker && clusterLayer.resultLimit ? clusterLayer.resultLimit : exports.DEFAULT_RESULT_LIMIT);
|
|
4546
4552
|
};
|
|
4547
4553
|
var getChoroplethValues = function getChoroplethValues(choroplethLayer) {
|
|
4548
4554
|
var slicedGeomList = choroplethLayer.geom.slice(0, choroplethLayer.resultLimit);
|
|
@@ -4583,7 +4589,7 @@ var getGlobalLayerBoundaries = function getGlobalLayerBoundaries(layers) {
|
|
|
4583
4589
|
var coordinatesNumArr = getLatOrLonCoordinates(layer, field).map(function (x) {
|
|
4584
4590
|
return +x;
|
|
4585
4591
|
});
|
|
4586
|
-
return lodash_1.min([prevVal].concat(_toConsumableArray(coordinatesNumArr)));
|
|
4592
|
+
return (0, lodash_1.min)([prevVal].concat(_toConsumableArray(coordinatesNumArr)));
|
|
4587
4593
|
}, getDefaultMax(field));
|
|
4588
4594
|
};
|
|
4589
4595
|
var getMax = function getMax(field) {
|
|
@@ -4592,7 +4598,7 @@ var getGlobalLayerBoundaries = function getGlobalLayerBoundaries(layers) {
|
|
|
4592
4598
|
}
|
|
4593
4599
|
return layers.reduce(function (prevVal, layer) {
|
|
4594
4600
|
var coordinatesNumArr = getLatOrLonCoordinates(layer, field).map(Number);
|
|
4595
|
-
return lodash_1.max([prevVal].concat(_toConsumableArray(coordinatesNumArr)));
|
|
4601
|
+
return (0, lodash_1.max)([prevVal].concat(_toConsumableArray(coordinatesNumArr)));
|
|
4596
4602
|
}, getDefaultMin(field));
|
|
4597
4603
|
};
|
|
4598
4604
|
return [[getMin(LONGITUDE), getMin(LATITUDE)], [getMax(LONGITUDE), getMax(LATITUDE)]];
|
|
@@ -4618,12 +4624,12 @@ var compareBaseStyles = function compareBaseStyles(curr, next) {
|
|
|
4618
4624
|
var nextBaseLayer = (_b = next === null || next === void 0 ? void 0 : next.layers) === null || _b === void 0 ? void 0 : _b.find(function (layer) {
|
|
4619
4625
|
return (layer === null || layer === void 0 ? void 0 : layer.id) === 'base-layer';
|
|
4620
4626
|
});
|
|
4621
|
-
var currBaseSource = lodash_1.get(curr === null || curr === void 0 ? void 0 : curr.sources, (_c = currBaseLayer === null || currBaseLayer === void 0 ? void 0 : currBaseLayer.source) !== null && _c !== void 0 ? _c : '');
|
|
4622
|
-
var nextBaseSource = lodash_1.get(next === null || next === void 0 ? void 0 : next.sources, (_d = nextBaseLayer === null || nextBaseLayer === void 0 ? void 0 : nextBaseLayer.source) !== null && _d !== void 0 ? _d : '');
|
|
4627
|
+
var currBaseSource = (0, lodash_1.get)(curr === null || curr === void 0 ? void 0 : curr.sources, (_c = currBaseLayer === null || currBaseLayer === void 0 ? void 0 : currBaseLayer.source) !== null && _c !== void 0 ? _c : '');
|
|
4628
|
+
var nextBaseSource = (0, lodash_1.get)(next === null || next === void 0 ? void 0 : next.sources, (_d = nextBaseLayer === null || nextBaseLayer === void 0 ? void 0 : nextBaseLayer.source) !== null && _d !== void 0 ? _d : '');
|
|
4623
4629
|
if (!currBaseLayer || !nextBaseLayer || !currBaseSource || !nextBaseSource) {
|
|
4624
4630
|
return false;
|
|
4625
4631
|
}
|
|
4626
|
-
return lodash_1.isEqual(currBaseLayer, nextBaseLayer) && lodash_1.isEqual(currBaseSource, nextBaseSource);
|
|
4632
|
+
return (0, lodash_1.isEqual)(currBaseLayer, nextBaseLayer) && (0, lodash_1.isEqual)(currBaseSource, nextBaseSource);
|
|
4627
4633
|
};
|
|
4628
4634
|
exports.compareBaseStyles = compareBaseStyles;
|
|
4629
4635
|
var formatMetadata = function formatMetadata(choroplethLayer, i) {
|
|
@@ -4638,7 +4644,7 @@ var formatMetadata = function formatMetadata(choroplethLayer, i) {
|
|
|
4638
4644
|
};
|
|
4639
4645
|
return Object.keys(metadata).reduce(function (result, curr) {
|
|
4640
4646
|
var key = "row.".concat(curr, ".value");
|
|
4641
|
-
var val = lodash_1.isObject(metadata[curr]) ? JSON.stringify(metadata[curr]) : String(metadata[curr]);
|
|
4647
|
+
var val = (0, lodash_1.isObject)(metadata[curr]) ? JSON.stringify(metadata[curr]) : String(metadata[curr]);
|
|
4642
4648
|
return Object.assign(Object.assign({}, result), _defineProperty({}, key, val));
|
|
4643
4649
|
}, base);
|
|
4644
4650
|
};
|
|
@@ -4646,7 +4652,7 @@ exports.formatMetadata = formatMetadata;
|
|
|
4646
4652
|
|
|
4647
4653
|
/***/ }),
|
|
4648
4654
|
|
|
4649
|
-
/***/
|
|
4655
|
+
/***/ 92:
|
|
4650
4656
|
/***/ (function(module, exports) {
|
|
4651
4657
|
|
|
4652
4658
|
module.exports = require("d3-scale");
|