@splunk/react-visualizations 23.5.0 → 24.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_FillerGauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_FillerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_duplicate_entries_from.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_duplicate_entries_to.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_invalid_entries_discontinuous_ranges.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_invalid_entries_from_equals_to_to.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_invalid_entries_from_is_larger_than_to.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Invalid_ranges_missing_entries.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Orientation_horizontal_height_90_show_placeholder.png +0 -0
- package/.loki/reference/chrome_docker_MarkerGauge_Too_Small_to_Render.png +0 -0
- package/.loki/reference/chrome_docker_SvgChoroplethDynamic_SVG_prop_is_missing.png +0 -0
- package/Area.js +36 -27
- package/Area.js.map +1 -1
- package/Bar.js +35 -26
- package/Bar.js.map +1 -1
- package/Bubble.js +80 -93
- package/Bubble.js.map +1 -1
- package/Column.js +36 -27
- package/Column.js.map +1 -1
- package/FillerGauge.js +16 -16
- package/FillerGauge.js.map +1 -1
- package/GeoJsonChoropleth.js +201 -179
- package/GeoJsonChoropleth.js.map +1 -1
- package/Line.js +91 -113
- package/Line.js.map +1 -1
- package/MarkerGauge.js +16 -16
- package/MarkerGauge.js.map +1 -1
- package/Pie.js +30 -30
- package/Pie.js.map +1 -1
- package/Punchcard.js +21 -21
- package/Punchcard.js.map +1 -1
- package/Scatter.js +60 -60
- package/Scatter.js.map +1 -1
- package/SingleValue.js +23 -23
- package/SingleValue.js.map +1 -1
- package/SingleValueIcon.js +25 -25
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +928 -72
- package/SingleValueRadial.js.map +1 -1
- package/SvgChoropleth.js +43 -52
- package/SvgChoropleth.js.map +1 -1
- package/SvgChoroplethDynamic.js +22 -22
- package/SvgChoroplethDynamic.js.map +1 -1
- package/package.json +14 -17
package/GeoJsonChoropleth.js
CHANGED
|
@@ -87,43 +87,43 @@ 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 = 51);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
94
94
|
/* 0 */,
|
|
95
|
-
/* 1
|
|
96
|
-
/* 2 */
|
|
95
|
+
/* 1 */
|
|
97
96
|
/***/ (function(module, exports) {
|
|
98
97
|
|
|
99
98
|
module.exports = require("react");
|
|
100
99
|
|
|
101
100
|
/***/ }),
|
|
101
|
+
/* 2 */,
|
|
102
102
|
/* 3 */
|
|
103
103
|
/***/ (function(module, exports) {
|
|
104
104
|
|
|
105
105
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
106
106
|
|
|
107
107
|
/***/ }),
|
|
108
|
-
/* 4
|
|
108
|
+
/* 4 */,
|
|
109
|
+
/* 5 */
|
|
109
110
|
/***/ (function(module, exports) {
|
|
110
111
|
|
|
111
112
|
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
112
113
|
|
|
113
114
|
/***/ }),
|
|
114
|
-
/* 5 */,
|
|
115
115
|
/* 6 */,
|
|
116
|
-
/* 7
|
|
117
|
-
/* 8 */,
|
|
118
|
-
/* 9 */,
|
|
119
|
-
/* 10 */,
|
|
120
|
-
/* 11 */,
|
|
121
|
-
/* 12 */
|
|
116
|
+
/* 7 */
|
|
122
117
|
/***/ (function(module, exports) {
|
|
123
118
|
|
|
124
119
|
module.exports = require("styled-components");
|
|
125
120
|
|
|
126
121
|
/***/ }),
|
|
122
|
+
/* 8 */,
|
|
123
|
+
/* 9 */,
|
|
124
|
+
/* 10 */,
|
|
125
|
+
/* 11 */,
|
|
126
|
+
/* 12 */,
|
|
127
127
|
/* 13 */,
|
|
128
128
|
/* 14 */,
|
|
129
129
|
/* 15 */,
|
|
@@ -141,34 +141,48 @@ module.exports = require("@babel/runtime/helpers/classCallCheck");
|
|
|
141
141
|
/***/ }),
|
|
142
142
|
/* 18 */,
|
|
143
143
|
/* 19 */,
|
|
144
|
-
/* 20
|
|
144
|
+
/* 20 */,
|
|
145
|
+
/* 21 */
|
|
145
146
|
/***/ (function(module, exports) {
|
|
146
147
|
|
|
147
148
|
module.exports = require("lodash");
|
|
148
149
|
|
|
149
150
|
/***/ }),
|
|
150
|
-
/*
|
|
151
|
+
/* 22 */
|
|
152
|
+
/***/ (function(module, exports) {
|
|
153
|
+
|
|
154
|
+
module.exports = require("@splunk/themes/variables");
|
|
155
|
+
|
|
156
|
+
/***/ }),
|
|
157
|
+
/* 23 */
|
|
151
158
|
/***/ (function(module, exports) {
|
|
152
159
|
|
|
153
160
|
module.exports = require("@babel/runtime/helpers/inherits");
|
|
154
161
|
|
|
155
162
|
/***/ }),
|
|
156
|
-
/*
|
|
163
|
+
/* 24 */
|
|
157
164
|
/***/ (function(module, exports) {
|
|
158
165
|
|
|
159
166
|
module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
160
167
|
|
|
161
168
|
/***/ }),
|
|
162
|
-
/*
|
|
169
|
+
/* 25 */
|
|
163
170
|
/***/ (function(module, exports) {
|
|
164
171
|
|
|
165
172
|
module.exports = require("@babel/runtime/helpers/getPrototypeOf");
|
|
166
173
|
|
|
167
174
|
/***/ }),
|
|
168
|
-
/* 24 */,
|
|
169
|
-
/* 25 */,
|
|
170
175
|
/* 26 */,
|
|
171
|
-
/* 27
|
|
176
|
+
/* 27 */,
|
|
177
|
+
/* 28 */,
|
|
178
|
+
/* 29 */
|
|
179
|
+
/***/ (function(module, exports) {
|
|
180
|
+
|
|
181
|
+
module.exports = require("@splunk/themes/pick");
|
|
182
|
+
|
|
183
|
+
/***/ }),
|
|
184
|
+
/* 30 */,
|
|
185
|
+
/* 31 */
|
|
172
186
|
/***/ (function(module, exports, __webpack_require__) {
|
|
173
187
|
|
|
174
188
|
"use strict";
|
|
@@ -179,9 +193,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
179
193
|
});
|
|
180
194
|
exports.isSpaceCompatible = exports.calculatedTargetBounds = exports.visibleSourceBounds = exports.flipBounds = exports.logicalSpace = exports.geoSpace = exports.screenSpace = void 0;
|
|
181
195
|
|
|
182
|
-
var lodash_1 = __webpack_require__(
|
|
183
|
-
|
|
184
|
-
var lodash_2 = __webpack_require__(20);
|
|
196
|
+
var lodash_1 = __webpack_require__(21);
|
|
185
197
|
|
|
186
198
|
exports.screenSpace = {
|
|
187
199
|
x: {
|
|
@@ -247,7 +259,7 @@ exports.visibleSourceBounds = visibleSourceBounds;
|
|
|
247
259
|
* @returns {Bounds}
|
|
248
260
|
*/
|
|
249
261
|
|
|
250
|
-
var calculatedTargetBounds = function
|
|
262
|
+
var calculatedTargetBounds = function calculateTargetBounds(transformation, sourceBounds) {
|
|
251
263
|
var minSourceCoordinates = lodash_1.mapValues(sourceBounds, function (interval) {
|
|
252
264
|
return interval.min;
|
|
253
265
|
});
|
|
@@ -269,14 +281,17 @@ var calculatedTargetBounds = function visibleSourceBounds(transformation, source
|
|
|
269
281
|
exports.calculatedTargetBounds = calculatedTargetBounds;
|
|
270
282
|
|
|
271
283
|
function isSpaceCompatible(s1, s2) {
|
|
272
|
-
return
|
|
284
|
+
return lodash_1.isEqual(s1, s2);
|
|
273
285
|
}
|
|
274
286
|
|
|
275
287
|
exports.isSpaceCompatible = isSpaceCompatible;
|
|
276
288
|
|
|
277
289
|
/***/ }),
|
|
278
|
-
/*
|
|
279
|
-
/*
|
|
290
|
+
/* 32 */,
|
|
291
|
+
/* 33 */,
|
|
292
|
+
/* 34 */,
|
|
293
|
+
/* 35 */,
|
|
294
|
+
/* 36 */
|
|
280
295
|
/***/ (function(module, exports, __webpack_require__) {
|
|
281
296
|
|
|
282
297
|
"use strict";
|
|
@@ -286,11 +301,11 @@ var _classCallCheck = __webpack_require__(17);
|
|
|
286
301
|
|
|
287
302
|
var _createClass = __webpack_require__(16);
|
|
288
303
|
|
|
289
|
-
var _inherits = __webpack_require__(
|
|
304
|
+
var _inherits = __webpack_require__(23);
|
|
290
305
|
|
|
291
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
306
|
+
var _possibleConstructorReturn = __webpack_require__(24);
|
|
292
307
|
|
|
293
|
-
var _getPrototypeOf = __webpack_require__(
|
|
308
|
+
var _getPrototypeOf = __webpack_require__(25);
|
|
294
309
|
|
|
295
310
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
296
311
|
|
|
@@ -300,12 +315,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
300
315
|
value: true
|
|
301
316
|
});
|
|
302
317
|
exports.DATA_ATTRIBUTE = void 0;
|
|
318
|
+
/* eslint-disable no-param-reassign */
|
|
303
319
|
|
|
304
|
-
var React = __webpack_require__(
|
|
320
|
+
var React = __webpack_require__(1);
|
|
305
321
|
|
|
306
|
-
var lodash_1 = __webpack_require__(
|
|
322
|
+
var lodash_1 = __webpack_require__(21);
|
|
307
323
|
|
|
308
|
-
var styled_components_1 = __webpack_require__(
|
|
324
|
+
var styled_components_1 = __webpack_require__(7);
|
|
309
325
|
|
|
310
326
|
exports.DATA_ATTRIBUTE = 'data-value';
|
|
311
327
|
var StyledSvgChoropleth = styled_components_1.default.div.withConfig({
|
|
@@ -365,7 +381,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
365
381
|
return;
|
|
366
382
|
}
|
|
367
383
|
|
|
368
|
-
var wholeFeature = feature.id ? feature : feature.parentNode; //remove the highlighted country IF we are entering a different country
|
|
384
|
+
var wholeFeature = feature.id ? feature : feature.parentNode; // remove the highlighted country IF we are entering a different country
|
|
369
385
|
|
|
370
386
|
if (_this.highlightedCountry && wholeFeature.id !== _this.highlightedCountry.id) {
|
|
371
387
|
_this.unHighlightCountry();
|
|
@@ -390,13 +406,13 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
390
406
|
} // 'wholeFeature' means the SVG <g> (group) of multipolygon features
|
|
391
407
|
|
|
392
408
|
|
|
393
|
-
var wholeFeature = feature.id ? feature : feature.parentNode; //handling feature leaving should always only deal with the highlighted feature
|
|
409
|
+
var wholeFeature = feature.id ? feature : feature.parentNode; // handling feature leaving should always only deal with the highlighted feature
|
|
394
410
|
|
|
395
411
|
if (wholeFeature !== _this.highlightedCountry) {
|
|
396
412
|
return;
|
|
397
413
|
}
|
|
398
414
|
|
|
399
|
-
_this.unHighlightCountry(); //wholeFeature.style.stroke = this.lastFeatureStroke;
|
|
415
|
+
_this.unHighlightCountry(); // wholeFeature.style.stroke = this.lastFeatureStroke;
|
|
400
416
|
|
|
401
417
|
|
|
402
418
|
if (_this.props.onFeatureHover) {
|
|
@@ -445,6 +461,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
445
461
|
value: function componentDidUpdate(prevProps) {
|
|
446
462
|
if (this.props !== prevProps) {
|
|
447
463
|
if (prevProps.featureCollection !== this.props.featureCollection) {
|
|
464
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
448
465
|
this.setState({
|
|
449
466
|
svgNode: this.props.featureCollection.getSvgNode(this.registerSvg)
|
|
450
467
|
});
|
|
@@ -452,6 +469,12 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
452
469
|
this.updateSvg(this.props);
|
|
453
470
|
}
|
|
454
471
|
}
|
|
472
|
+
} // allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
|
|
473
|
+
|
|
474
|
+
}, {
|
|
475
|
+
key: "getFeatureId",
|
|
476
|
+
value: function getFeatureId(alias) {
|
|
477
|
+
return this.props.featureCollection.resolveAlias(alias);
|
|
455
478
|
}
|
|
456
479
|
/**
|
|
457
480
|
* this method renders a copy of the polygon on top of all the others, with a highlighted boundary.
|
|
@@ -524,12 +547,6 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
524
547
|
node.removeAttribute(exports.DATA_ATTRIBUTE);
|
|
525
548
|
}
|
|
526
549
|
});
|
|
527
|
-
} //allows a provided alias like 'US-CA' to get mapped to 'California' which is the element id for the SVG shape
|
|
528
|
-
|
|
529
|
-
}, {
|
|
530
|
-
key: "getFeatureId",
|
|
531
|
-
value: function getFeatureId(alias) {
|
|
532
|
-
return this.props.featureCollection.resolveAlias(alias);
|
|
533
550
|
}
|
|
534
551
|
}, {
|
|
535
552
|
key: "render",
|
|
@@ -552,7 +569,7 @@ var SvgChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
552
569
|
exports.default = SvgChoropleth;
|
|
553
570
|
|
|
554
571
|
/***/ }),
|
|
555
|
-
/*
|
|
572
|
+
/* 37 */
|
|
556
573
|
/***/ (function(module, exports, __webpack_require__) {
|
|
557
574
|
|
|
558
575
|
"use strict";
|
|
@@ -566,9 +583,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
566
583
|
value: true
|
|
567
584
|
});
|
|
568
585
|
|
|
569
|
-
var ICoordinateTransformation_1 = __webpack_require__(
|
|
586
|
+
var ICoordinateTransformation_1 = __webpack_require__(31);
|
|
570
587
|
|
|
571
|
-
var TransformationChain_1 = __webpack_require__(
|
|
588
|
+
var TransformationChain_1 = __webpack_require__(39);
|
|
572
589
|
|
|
573
590
|
var CoordinateTransformation = /*#__PURE__*/function () {
|
|
574
591
|
function CoordinateTransformation(sourceSpace, targetSpace) {
|
|
@@ -596,19 +613,19 @@ exports.default = CoordinateTransformation;
|
|
|
596
613
|
CoordinateTransformation.INCOMPATIBLE_SPACES_ERROR = "incompatible transformation (appended source space doesn't match chain's output space)";
|
|
597
614
|
|
|
598
615
|
/***/ }),
|
|
599
|
-
/*
|
|
616
|
+
/* 38 */
|
|
600
617
|
/***/ (function(module, exports) {
|
|
601
618
|
|
|
602
619
|
module.exports = require("@babel/runtime/helpers/slicedToArray");
|
|
603
620
|
|
|
604
621
|
/***/ }),
|
|
605
|
-
/*
|
|
622
|
+
/* 39 */
|
|
606
623
|
/***/ (function(module, exports, __webpack_require__) {
|
|
607
624
|
|
|
608
625
|
"use strict";
|
|
609
626
|
|
|
610
627
|
|
|
611
|
-
var _toConsumableArray = __webpack_require__(
|
|
628
|
+
var _toConsumableArray = __webpack_require__(5);
|
|
612
629
|
|
|
613
630
|
var _classCallCheck = __webpack_require__(17);
|
|
614
631
|
|
|
@@ -618,7 +635,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
618
635
|
value: true
|
|
619
636
|
});
|
|
620
637
|
|
|
621
|
-
var lodash_1 = __webpack_require__(
|
|
638
|
+
var lodash_1 = __webpack_require__(21);
|
|
622
639
|
|
|
623
640
|
var TransformationChain = /*#__PURE__*/function () {
|
|
624
641
|
function TransformationChain(transformations) {
|
|
@@ -652,7 +669,7 @@ var TransformationChain = /*#__PURE__*/function () {
|
|
|
652
669
|
value: function transformBack(physicalCoords) {
|
|
653
670
|
var currentCoords = physicalCoords;
|
|
654
671
|
|
|
655
|
-
for (var idx = this.transformations.length - 1; idx >= 0; idx
|
|
672
|
+
for (var idx = this.transformations.length - 1; idx >= 0; idx -= 1) {
|
|
656
673
|
currentCoords = this.transformations[idx].transformBack(currentCoords);
|
|
657
674
|
}
|
|
658
675
|
|
|
@@ -666,7 +683,7 @@ var TransformationChain = /*#__PURE__*/function () {
|
|
|
666
683
|
exports.default = TransformationChain;
|
|
667
684
|
|
|
668
685
|
/***/ }),
|
|
669
|
-
/*
|
|
686
|
+
/* 40 */
|
|
670
687
|
/***/ (function(module, exports, __webpack_require__) {
|
|
671
688
|
|
|
672
689
|
"use strict";
|
|
@@ -748,8 +765,8 @@ var BoundsUtils = /*#__PURE__*/function () {
|
|
|
748
765
|
return {};
|
|
749
766
|
}
|
|
750
767
|
|
|
751
|
-
var xInterval = logicalBounds
|
|
752
|
-
var yInterval = logicalBounds
|
|
768
|
+
var xInterval = logicalBounds.x;
|
|
769
|
+
var yInterval = logicalBounds.y; // use GeoJsonFeatureGrpup f's Bounds to create a CSS inline style to position the inset using a div
|
|
753
770
|
|
|
754
771
|
return {
|
|
755
772
|
position: 'absolute',
|
|
@@ -774,15 +791,17 @@ var BoundsUtils = /*#__PURE__*/function () {
|
|
|
774
791
|
exports.default = BoundsUtils;
|
|
775
792
|
|
|
776
793
|
/***/ }),
|
|
777
|
-
/* 34 */,
|
|
778
|
-
/* 35 */,
|
|
779
|
-
/* 36 */,
|
|
780
|
-
/* 37 */,
|
|
781
|
-
/* 38 */,
|
|
782
|
-
/* 39 */,
|
|
783
|
-
/* 40 */,
|
|
784
794
|
/* 41 */,
|
|
785
|
-
/* 42
|
|
795
|
+
/* 42 */,
|
|
796
|
+
/* 43 */,
|
|
797
|
+
/* 44 */,
|
|
798
|
+
/* 45 */,
|
|
799
|
+
/* 46 */,
|
|
800
|
+
/* 47 */,
|
|
801
|
+
/* 48 */,
|
|
802
|
+
/* 49 */,
|
|
803
|
+
/* 50 */,
|
|
804
|
+
/* 51 */
|
|
786
805
|
/***/ (function(module, exports, __webpack_require__) {
|
|
787
806
|
|
|
788
807
|
"use strict";
|
|
@@ -790,13 +809,13 @@ exports.default = BoundsUtils;
|
|
|
790
809
|
|
|
791
810
|
var _createClass = __webpack_require__(16);
|
|
792
811
|
|
|
793
|
-
var _assertThisInitialized = __webpack_require__(
|
|
812
|
+
var _assertThisInitialized = __webpack_require__(52);
|
|
794
813
|
|
|
795
|
-
var _inherits = __webpack_require__(
|
|
814
|
+
var _inherits = __webpack_require__(23);
|
|
796
815
|
|
|
797
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
816
|
+
var _possibleConstructorReturn = __webpack_require__(24);
|
|
798
817
|
|
|
799
|
-
var _getPrototypeOf = __webpack_require__(
|
|
818
|
+
var _getPrototypeOf = __webpack_require__(25);
|
|
800
819
|
|
|
801
820
|
var _classCallCheck = __webpack_require__(17);
|
|
802
821
|
|
|
@@ -808,24 +827,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
808
827
|
value: true
|
|
809
828
|
});
|
|
810
829
|
exports.createFeatureCollections = exports.valueText = exports.estimateTextWidth = exports.round2 = exports.LABEL_FONT_SIZE = void 0;
|
|
830
|
+
/* eslint-disable max-classes-per-file */
|
|
811
831
|
|
|
812
|
-
var React = __webpack_require__(
|
|
832
|
+
var React = __webpack_require__(1);
|
|
813
833
|
|
|
814
|
-
var styled_components_1 = __webpack_require__(
|
|
834
|
+
var styled_components_1 = __webpack_require__(7);
|
|
815
835
|
|
|
816
|
-
var lodash_1 = __webpack_require__(
|
|
836
|
+
var lodash_1 = __webpack_require__(21);
|
|
817
837
|
|
|
818
|
-
var pick_1 = __webpack_require__(
|
|
838
|
+
var pick_1 = __webpack_require__(29);
|
|
819
839
|
|
|
820
|
-
var variables_1 = __webpack_require__(
|
|
840
|
+
var variables_1 = __webpack_require__(22);
|
|
821
841
|
|
|
822
842
|
var SanitizeProps_1 = __webpack_require__(3);
|
|
823
843
|
|
|
824
|
-
var SvgChoropleth_1 = __webpack_require__(
|
|
844
|
+
var SvgChoropleth_1 = __webpack_require__(36);
|
|
825
845
|
|
|
826
|
-
var GeoJsonFeatureCollection_1 = __webpack_require__(
|
|
846
|
+
var GeoJsonFeatureCollection_1 = __webpack_require__(53);
|
|
827
847
|
|
|
828
|
-
var BoundsUtils_1 = __webpack_require__(
|
|
848
|
+
var BoundsUtils_1 = __webpack_require__(40);
|
|
829
849
|
|
|
830
850
|
exports.LABEL_FONT_SIZE = 14;
|
|
831
851
|
|
|
@@ -1054,24 +1074,12 @@ var GeoJsonChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
1054
1074
|
geoJson = _this$props.geoJson;
|
|
1055
1075
|
|
|
1056
1076
|
if (prevProps.geoJson !== geoJson || prevProps.sourceBounds !== sourceBounds || prevProps.logicalBounds !== logicalBounds || prevProps.projection !== projection) {
|
|
1077
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
1057
1078
|
this.setState({
|
|
1058
1079
|
featureCollections: createFeatureCollections(this.props)
|
|
1059
1080
|
});
|
|
1060
1081
|
}
|
|
1061
1082
|
}
|
|
1062
|
-
}, {
|
|
1063
|
-
key: "getLocalCoords",
|
|
1064
|
-
value: function getLocalCoords(clientX, clientY) {
|
|
1065
|
-
var rect = this.containerRef.current.getBoundingClientRect();
|
|
1066
|
-
var physX = rect.left;
|
|
1067
|
-
var physY = rect.top;
|
|
1068
|
-
var scaleX = this.containerRef.current.offsetWidth / rect.width;
|
|
1069
|
-
var scaleY = this.containerRef.current.offsetHeight / rect.height;
|
|
1070
|
-
return {
|
|
1071
|
-
x: (clientX - physX) * scaleX,
|
|
1072
|
-
y: (clientY - physY) * scaleY
|
|
1073
|
-
};
|
|
1074
|
-
}
|
|
1075
1083
|
}, {
|
|
1076
1084
|
key: "handleMouseMove",
|
|
1077
1085
|
value: function handleMouseMove(ev) {
|
|
@@ -1108,6 +1116,19 @@ var GeoJsonChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
1108
1116
|
externalHandler(featureId);
|
|
1109
1117
|
}
|
|
1110
1118
|
}
|
|
1119
|
+
}, {
|
|
1120
|
+
key: "getLocalCoords",
|
|
1121
|
+
value: function getLocalCoords(clientX, clientY) {
|
|
1122
|
+
var rect = this.containerRef.current.getBoundingClientRect();
|
|
1123
|
+
var physX = rect.left;
|
|
1124
|
+
var physY = rect.top;
|
|
1125
|
+
var scaleX = this.containerRef.current.offsetWidth / rect.width;
|
|
1126
|
+
var scaleY = this.containerRef.current.offsetHeight / rect.height;
|
|
1127
|
+
return {
|
|
1128
|
+
x: (clientX - physX) * scaleX,
|
|
1129
|
+
y: (clientY - physY) * scaleY
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1111
1132
|
}, {
|
|
1112
1133
|
key: "render",
|
|
1113
1134
|
value: function render() {
|
|
@@ -1155,25 +1176,13 @@ var GeoJsonChoropleth = /*#__PURE__*/function (_React$Component) {
|
|
|
1155
1176
|
exports.default = SanitizeProps_1.withSanitizedProps(GeoJsonChoropleth);
|
|
1156
1177
|
|
|
1157
1178
|
/***/ }),
|
|
1158
|
-
/*
|
|
1179
|
+
/* 52 */
|
|
1159
1180
|
/***/ (function(module, exports) {
|
|
1160
1181
|
|
|
1161
1182
|
module.exports = require("@babel/runtime/helpers/assertThisInitialized");
|
|
1162
1183
|
|
|
1163
1184
|
/***/ }),
|
|
1164
|
-
/*
|
|
1165
|
-
/***/ (function(module, exports) {
|
|
1166
|
-
|
|
1167
|
-
module.exports = require("@splunk/themes/pick");
|
|
1168
|
-
|
|
1169
|
-
/***/ }),
|
|
1170
|
-
/* 45 */
|
|
1171
|
-
/***/ (function(module, exports) {
|
|
1172
|
-
|
|
1173
|
-
module.exports = require("@splunk/themes/variables");
|
|
1174
|
-
|
|
1175
|
-
/***/ }),
|
|
1176
|
-
/* 46 */
|
|
1185
|
+
/* 53 */
|
|
1177
1186
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1178
1187
|
|
|
1179
1188
|
"use strict";
|
|
@@ -1183,28 +1192,28 @@ var _classCallCheck = __webpack_require__(17);
|
|
|
1183
1192
|
|
|
1184
1193
|
var _createClass = __webpack_require__(16);
|
|
1185
1194
|
|
|
1186
|
-
var _slicedToArray = __webpack_require__(
|
|
1195
|
+
var _slicedToArray = __webpack_require__(38);
|
|
1187
1196
|
|
|
1188
1197
|
Object.defineProperty(exports, "__esModule", {
|
|
1189
1198
|
value: true
|
|
1190
1199
|
});
|
|
1191
1200
|
exports.renderGeoJsonFeature = exports.polygon = exports.ring = exports.pickLogicalBnds = exports.DEFAULT_LOGICAL_BOUNDS = exports.featureGroupMatcher = exports.MATCH_ALL_FEATUREGROUP_MATCHER = void 0;
|
|
1192
1201
|
|
|
1193
|
-
var
|
|
1202
|
+
var lodash_1 = __webpack_require__(21);
|
|
1194
1203
|
|
|
1195
|
-
var
|
|
1204
|
+
var bbox_clip_1 = __webpack_require__(54);
|
|
1196
1205
|
|
|
1197
|
-
var
|
|
1206
|
+
var MercatorTransformation_1 = __webpack_require__(55);
|
|
1198
1207
|
|
|
1199
|
-
var
|
|
1208
|
+
var GeometryStreamSVGRenderer_1 = __webpack_require__(56);
|
|
1200
1209
|
|
|
1201
|
-
var
|
|
1210
|
+
var ICoordinateTransformation_1 = __webpack_require__(31);
|
|
1202
1211
|
|
|
1203
|
-
var
|
|
1212
|
+
var LinearTransformation_1 = __webpack_require__(61);
|
|
1204
1213
|
|
|
1205
|
-
var
|
|
1214
|
+
var TransformationChain_1 = __webpack_require__(39);
|
|
1206
1215
|
|
|
1207
|
-
var
|
|
1216
|
+
var BoundsUtils_1 = __webpack_require__(40); // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1208
1217
|
|
|
1209
1218
|
|
|
1210
1219
|
var MATCH_ALL_FEATUREGROUP_MATCHER = function MATCH_ALL_FEATUREGROUP_MATCHER(feature) {
|
|
@@ -1261,10 +1270,10 @@ function pickLogicalBnds(globalLogicalBnds, g) {
|
|
|
1261
1270
|
exports.pickLogicalBnds = pickLogicalBnds;
|
|
1262
1271
|
|
|
1263
1272
|
function ring(coords, renderer, bounds, props) {
|
|
1264
|
-
//polygon coords is array of number array
|
|
1273
|
+
// polygon coords is array of number array
|
|
1265
1274
|
renderer.beginNode('polygon', props);
|
|
1266
1275
|
|
|
1267
|
-
for (var i = 0; i < coords.length; i
|
|
1276
|
+
for (var i = 0; i < coords.length; i += 1) {
|
|
1268
1277
|
var _coords$i = _slicedToArray(coords[i], 2),
|
|
1269
1278
|
long = _coords$i[0],
|
|
1270
1279
|
lat = _coords$i[1];
|
|
@@ -1279,12 +1288,12 @@ function ring(coords, renderer, bounds, props) {
|
|
|
1279
1288
|
renderer.cancelNode();
|
|
1280
1289
|
console.warn("out-of-bounds polygon dropped: ".concat(JSON.stringify(props)));
|
|
1281
1290
|
return; // bail ... we don't need to endNode() since we cancelled it
|
|
1282
|
-
} else {
|
|
1283
|
-
renderer.addPoint({
|
|
1284
|
-
long: long,
|
|
1285
|
-
lat: lat
|
|
1286
|
-
});
|
|
1287
1291
|
}
|
|
1292
|
+
|
|
1293
|
+
renderer.addPoint({
|
|
1294
|
+
long: long,
|
|
1295
|
+
lat: lat
|
|
1296
|
+
});
|
|
1288
1297
|
}
|
|
1289
1298
|
|
|
1290
1299
|
renderer.endNode();
|
|
@@ -1293,8 +1302,8 @@ function ring(coords, renderer, bounds, props) {
|
|
|
1293
1302
|
exports.ring = ring;
|
|
1294
1303
|
|
|
1295
1304
|
function polygon(coords, renderer, bounds) {
|
|
1296
|
-
//polygon coords is array of number array
|
|
1297
|
-
for (var poly = 0; poly < coords.length; poly
|
|
1305
|
+
// polygon coords is array of number array
|
|
1306
|
+
for (var poly = 0; poly < coords.length; poly += 1) {
|
|
1298
1307
|
ring(coords[poly], renderer, bounds);
|
|
1299
1308
|
}
|
|
1300
1309
|
}
|
|
@@ -1303,16 +1312,16 @@ exports.polygon = polygon;
|
|
|
1303
1312
|
|
|
1304
1313
|
function renderGeoJsonFeature(feature, renderer, bounds) {
|
|
1305
1314
|
var bbox = bounds ? BoundsUtils_1.default.toTurfBBox(bounds) : undefined;
|
|
1306
|
-
var type = feature
|
|
1315
|
+
var type = feature.geometry.type;
|
|
1307
1316
|
|
|
1308
1317
|
if (lodash_1.get(feature, ['properties', 'name']) === 'Antarctica') {
|
|
1309
|
-
//skip shapes that cannot be mercator projected
|
|
1310
|
-
//no-op
|
|
1318
|
+
// skip shapes that cannot be mercator projected
|
|
1319
|
+
// no-op
|
|
1311
1320
|
return;
|
|
1312
1321
|
} // demo hack...
|
|
1313
1322
|
|
|
1314
1323
|
|
|
1315
|
-
var props = feature
|
|
1324
|
+
var props = feature.properties;
|
|
1316
1325
|
|
|
1317
1326
|
if (props.iso_3166_2) {
|
|
1318
1327
|
props.id = props.iso_3166_2;
|
|
@@ -1325,7 +1334,8 @@ function renderGeoJsonFeature(feature, renderer, bounds) {
|
|
|
1325
1334
|
switch (type) {
|
|
1326
1335
|
case 'MultiPolygon':
|
|
1327
1336
|
{
|
|
1328
|
-
renderer.beginNode('g', props); //svg has groups ('g') but no polygon
|
|
1337
|
+
renderer.beginNode('g', props); // svg has groups ('g') but no polygon
|
|
1338
|
+
// eslint-disable-next-line no-param-reassign
|
|
1329
1339
|
|
|
1330
1340
|
feature = bbox ? bbox_clip_1.default(feature, bbox) : feature;
|
|
1331
1341
|
var multis = lodash_1.get(feature, ['geometry', 'coordinates']);
|
|
@@ -1338,6 +1348,7 @@ function renderGeoJsonFeature(feature, renderer, bounds) {
|
|
|
1338
1348
|
|
|
1339
1349
|
case 'Polygon':
|
|
1340
1350
|
{
|
|
1351
|
+
// eslint-disable-next-line no-param-reassign
|
|
1341
1352
|
feature = bbox ? bbox_clip_1.default(feature, bbox) : feature;
|
|
1342
1353
|
var rings = lodash_1.get(feature, ['geometry', 'coordinates']);
|
|
1343
1354
|
rings.forEach(function (r) {
|
|
@@ -1348,7 +1359,7 @@ function renderGeoJsonFeature(feature, renderer, bounds) {
|
|
|
1348
1359
|
|
|
1349
1360
|
default:
|
|
1350
1361
|
{
|
|
1351
|
-
throw new Error(
|
|
1362
|
+
throw new Error("Unsupported geojson type: ".concat(type));
|
|
1352
1363
|
}
|
|
1353
1364
|
}
|
|
1354
1365
|
}
|
|
@@ -1356,10 +1367,10 @@ function renderGeoJsonFeature(feature, renderer, bounds) {
|
|
|
1356
1367
|
exports.renderGeoJsonFeature = renderGeoJsonFeature;
|
|
1357
1368
|
|
|
1358
1369
|
function computeBounds(geoJson, matcher) {
|
|
1359
|
-
//replace the renderer with one that is configured only to compute logicalBounds (for performance)
|
|
1370
|
+
// replace the renderer with one that is configured only to compute logicalBounds (for performance)
|
|
1360
1371
|
var boundsComputer = new GeometryStreamSVGRenderer_1.GeometryStreamSVGRenderer();
|
|
1361
1372
|
boundsComputer.computeBoundsOnly = true;
|
|
1362
|
-
geoJson
|
|
1373
|
+
geoJson.features.forEach(function (feature) {
|
|
1363
1374
|
if (matcher(feature)) {
|
|
1364
1375
|
renderGeoJsonFeature(feature, boundsComputer);
|
|
1365
1376
|
}
|
|
@@ -1379,7 +1390,7 @@ function pickSrcBnds(geoJson, g, globalSrcBnds, featureMatcher) {
|
|
|
1379
1390
|
} // ...'auto' compute the source bounds from the data.
|
|
1380
1391
|
|
|
1381
1392
|
|
|
1382
|
-
var b = computeBounds(geoJson, featureMatcher); //automatically compute sourceBounds if not provided
|
|
1393
|
+
var b = computeBounds(geoJson, featureMatcher); // automatically compute sourceBounds if not provided
|
|
1383
1394
|
|
|
1384
1395
|
if (!b) {
|
|
1385
1396
|
throw new Error("Could not determine bounds for geoFeatureGroup name='".concat(this.name, "' (no features matched)"));
|
|
@@ -1418,7 +1429,7 @@ var GeoJsonFeatureCollection = /*#__PURE__*/function () {
|
|
|
1418
1429
|
|
|
1419
1430
|
default:
|
|
1420
1431
|
{
|
|
1421
|
-
throw new Error(
|
|
1432
|
+
throw new Error("Unsupported projection: ".concat(projectionType));
|
|
1422
1433
|
}
|
|
1423
1434
|
}
|
|
1424
1435
|
|
|
@@ -1467,7 +1478,7 @@ var GeoJsonFeatureCollection = /*#__PURE__*/function () {
|
|
|
1467
1478
|
key: "resolveAlias",
|
|
1468
1479
|
value: function resolveAlias(alias) {
|
|
1469
1480
|
if (!this.aliases) {
|
|
1470
|
-
this.aliases = GeoJsonFeatureCollection.makeAliasMap(this.geoJson.features); //memoize
|
|
1481
|
+
this.aliases = GeoJsonFeatureCollection.makeAliasMap(this.geoJson.features); // memoize
|
|
1471
1482
|
}
|
|
1472
1483
|
|
|
1473
1484
|
var aliases = this.aliases;
|
|
@@ -1483,11 +1494,13 @@ var GeoJsonFeatureCollection = /*#__PURE__*/function () {
|
|
|
1483
1494
|
value: function makeAliasMap(features) {
|
|
1484
1495
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1485
1496
|
return features.reduce(function (aliases, feature) {
|
|
1486
|
-
var geoJsonProperties = feature
|
|
1497
|
+
var geoJsonProperties = feature.properties;
|
|
1487
1498
|
var name = geoJsonProperties.iso_3166_2; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1488
1499
|
|
|
1489
1500
|
Object.keys(geoJsonProperties).forEach(function (k) {
|
|
1490
|
-
|
|
1501
|
+
if (k !== name) {
|
|
1502
|
+
aliases.set(geoJsonProperties[k].toLowerCase(), name); // alias all the other properies to the name property
|
|
1503
|
+
}
|
|
1491
1504
|
});
|
|
1492
1505
|
return aliases;
|
|
1493
1506
|
}, new Map());
|
|
@@ -1500,7 +1513,13 @@ var GeoJsonFeatureCollection = /*#__PURE__*/function () {
|
|
|
1500
1513
|
exports.default = GeoJsonFeatureCollection;
|
|
1501
1514
|
|
|
1502
1515
|
/***/ }),
|
|
1503
|
-
/*
|
|
1516
|
+
/* 54 */
|
|
1517
|
+
/***/ (function(module, exports) {
|
|
1518
|
+
|
|
1519
|
+
module.exports = require("@turf/bbox-clip");
|
|
1520
|
+
|
|
1521
|
+
/***/ }),
|
|
1522
|
+
/* 55 */
|
|
1504
1523
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1505
1524
|
|
|
1506
1525
|
"use strict";
|
|
@@ -1510,11 +1529,11 @@ var _classCallCheck = __webpack_require__(17);
|
|
|
1510
1529
|
|
|
1511
1530
|
var _createClass = __webpack_require__(16);
|
|
1512
1531
|
|
|
1513
|
-
var _inherits = __webpack_require__(
|
|
1532
|
+
var _inherits = __webpack_require__(23);
|
|
1514
1533
|
|
|
1515
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
1534
|
+
var _possibleConstructorReturn = __webpack_require__(24);
|
|
1516
1535
|
|
|
1517
|
-
var _getPrototypeOf = __webpack_require__(
|
|
1536
|
+
var _getPrototypeOf = __webpack_require__(25);
|
|
1518
1537
|
|
|
1519
1538
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1520
1539
|
|
|
@@ -1524,10 +1543,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1524
1543
|
value: true
|
|
1525
1544
|
});
|
|
1526
1545
|
exports.MercatorTransformation = void 0;
|
|
1546
|
+
/* eslint-disable class-methods-use-this */
|
|
1527
1547
|
|
|
1528
|
-
var ICoordinateTransformation_1 = __webpack_require__(
|
|
1548
|
+
var ICoordinateTransformation_1 = __webpack_require__(31);
|
|
1529
1549
|
|
|
1530
|
-
var CoordinateTransformation_1 = __webpack_require__(
|
|
1550
|
+
var CoordinateTransformation_1 = __webpack_require__(37); // transform converts degrees to an x,y mercator map whose units are radians. InverseTransform goes from radians on the x,y map back to degrees.
|
|
1531
1551
|
|
|
1532
1552
|
|
|
1533
1553
|
var MercatorTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
@@ -1590,23 +1610,23 @@ var MercatorTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
|
1590
1610
|
exports.MercatorTransformation = MercatorTransformation;
|
|
1591
1611
|
|
|
1592
1612
|
/***/ }),
|
|
1593
|
-
/*
|
|
1613
|
+
/* 56 */
|
|
1594
1614
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1595
1615
|
|
|
1596
1616
|
"use strict";
|
|
1597
1617
|
|
|
1598
1618
|
|
|
1599
|
-
var _get = __webpack_require__(
|
|
1619
|
+
var _get = __webpack_require__(57);
|
|
1600
1620
|
|
|
1601
1621
|
var _classCallCheck = __webpack_require__(17);
|
|
1602
1622
|
|
|
1603
1623
|
var _createClass = __webpack_require__(16);
|
|
1604
1624
|
|
|
1605
|
-
var _inherits = __webpack_require__(
|
|
1625
|
+
var _inherits = __webpack_require__(23);
|
|
1606
1626
|
|
|
1607
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
1627
|
+
var _possibleConstructorReturn = __webpack_require__(24);
|
|
1608
1628
|
|
|
1609
|
-
var _getPrototypeOf = __webpack_require__(
|
|
1629
|
+
var _getPrototypeOf = __webpack_require__(25);
|
|
1610
1630
|
|
|
1611
1631
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1612
1632
|
|
|
@@ -1617,13 +1637,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1617
1637
|
});
|
|
1618
1638
|
exports.GeometryStreamSVGRenderer = exports.IdentityTransform = void 0;
|
|
1619
1639
|
|
|
1620
|
-
var ICoordinateTransformation_1 = __webpack_require__(
|
|
1640
|
+
var ICoordinateTransformation_1 = __webpack_require__(31);
|
|
1621
1641
|
|
|
1622
|
-
var CoordinateTransformation_1 = __webpack_require__(
|
|
1642
|
+
var CoordinateTransformation_1 = __webpack_require__(37);
|
|
1623
1643
|
|
|
1624
|
-
var BoundsCollector_1 = __webpack_require__(
|
|
1644
|
+
var BoundsCollector_1 = __webpack_require__(58);
|
|
1625
1645
|
|
|
1626
|
-
var NodeTreeReactGenerator_1 = __webpack_require__(
|
|
1646
|
+
var NodeTreeReactGenerator_1 = __webpack_require__(59); // fixme TODO: should the identity transform really have different source and target spaces? That's a bit confusing
|
|
1627
1647
|
// as one would expect the identity transform could be inserted anywhere in a TransformationChain
|
|
1628
1648
|
|
|
1629
1649
|
|
|
@@ -1694,12 +1714,12 @@ var GeometryStreamSVGRenderer = /*#__PURE__*/function (_NodeTreeReactGenerat) {
|
|
|
1694
1714
|
|
|
1695
1715
|
var el = _get(_getPrototypeOf(GeometryStreamSVGRenderer.prototype), "peek", this).call(this);
|
|
1696
1716
|
|
|
1697
|
-
var points = el.attributes
|
|
1717
|
+
var points = el.attributes.points;
|
|
1698
1718
|
|
|
1699
1719
|
if (points) {
|
|
1700
|
-
el.attributes
|
|
1720
|
+
el.attributes.points += ' ';
|
|
1701
1721
|
} else {
|
|
1702
|
-
el.attributes
|
|
1722
|
+
el.attributes.points = ''; // initialize
|
|
1703
1723
|
}
|
|
1704
1724
|
|
|
1705
1725
|
var _this$transformer$tra = this.transformer.transform(p),
|
|
@@ -1712,7 +1732,7 @@ var GeometryStreamSVGRenderer = /*#__PURE__*/function (_NodeTreeReactGenerat) {
|
|
|
1712
1732
|
*/
|
|
1713
1733
|
|
|
1714
1734
|
|
|
1715
|
-
el.attributes
|
|
1735
|
+
el.attributes.points += "".concat(x, ",").concat(y); // FIXME TODO probably should not look for hard coded x and y in DataPoint
|
|
1716
1736
|
}
|
|
1717
1737
|
}, {
|
|
1718
1738
|
key: "beginNode",
|
|
@@ -1723,7 +1743,7 @@ var GeometryStreamSVGRenderer = /*#__PURE__*/function (_NodeTreeReactGenerat) {
|
|
|
1723
1743
|
return;
|
|
1724
1744
|
}
|
|
1725
1745
|
|
|
1726
|
-
|
|
1746
|
+
_get(_getPrototypeOf(GeometryStreamSVGRenderer.prototype), "beginNode", this).call(this, name, attributes);
|
|
1727
1747
|
}
|
|
1728
1748
|
}, {
|
|
1729
1749
|
key: "endNode",
|
|
@@ -1755,13 +1775,13 @@ var GeometryStreamSVGRenderer = /*#__PURE__*/function (_NodeTreeReactGenerat) {
|
|
|
1755
1775
|
exports.GeometryStreamSVGRenderer = GeometryStreamSVGRenderer;
|
|
1756
1776
|
|
|
1757
1777
|
/***/ }),
|
|
1758
|
-
/*
|
|
1778
|
+
/* 57 */
|
|
1759
1779
|
/***/ (function(module, exports) {
|
|
1760
1780
|
|
|
1761
1781
|
module.exports = require("@babel/runtime/helpers/get");
|
|
1762
1782
|
|
|
1763
1783
|
/***/ }),
|
|
1764
|
-
/*
|
|
1784
|
+
/* 58 */
|
|
1765
1785
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1766
1786
|
|
|
1767
1787
|
"use strict";
|
|
@@ -1822,13 +1842,13 @@ var BoundsCollector = /*#__PURE__*/function () {
|
|
|
1822
1842
|
exports.default = BoundsCollector;
|
|
1823
1843
|
|
|
1824
1844
|
/***/ }),
|
|
1825
|
-
/*
|
|
1845
|
+
/* 59 */
|
|
1826
1846
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1827
1847
|
|
|
1828
1848
|
"use strict";
|
|
1829
1849
|
|
|
1830
1850
|
|
|
1831
|
-
var _slicedToArray = __webpack_require__(
|
|
1851
|
+
var _slicedToArray = __webpack_require__(38);
|
|
1832
1852
|
|
|
1833
1853
|
var _classCallCheck = __webpack_require__(17);
|
|
1834
1854
|
|
|
@@ -1838,10 +1858,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1838
1858
|
value: true
|
|
1839
1859
|
});
|
|
1840
1860
|
exports.NodeTreeReactGenerator = exports.ElementStructure = void 0;
|
|
1861
|
+
/* eslint-disable max-classes-per-file */
|
|
1862
|
+
|
|
1863
|
+
/* eslint-disable no-underscore-dangle */
|
|
1864
|
+
|
|
1865
|
+
/* eslint-disable no-param-reassign */
|
|
1841
1866
|
|
|
1842
|
-
var React = __webpack_require__(
|
|
1867
|
+
var React = __webpack_require__(1); // eslint-disable-next-line import/order
|
|
1843
1868
|
|
|
1844
|
-
|
|
1869
|
+
|
|
1870
|
+
var camelCase = __webpack_require__(60);
|
|
1845
1871
|
/**
|
|
1846
1872
|
* This class represents the structure of a React element.
|
|
1847
1873
|
*/
|
|
@@ -1870,8 +1896,8 @@ var ElementStructure = /*#__PURE__*/function () {
|
|
|
1870
1896
|
_createClass(ElementStructure, null, [{
|
|
1871
1897
|
key: "processStyleAttributes",
|
|
1872
1898
|
value: function processStyleAttributes(a) {
|
|
1873
|
-
if (a
|
|
1874
|
-
a
|
|
1899
|
+
if (a.style) {
|
|
1900
|
+
a.style = ElementStructure.parseStyle(a.style);
|
|
1875
1901
|
}
|
|
1876
1902
|
|
|
1877
1903
|
return a;
|
|
@@ -2003,9 +2029,9 @@ var NodeTreeReactGenerator = /*#__PURE__*/function () {
|
|
|
2003
2029
|
value: function getRoot() {
|
|
2004
2030
|
if (this._root) {
|
|
2005
2031
|
return this._root;
|
|
2006
|
-
} else {
|
|
2007
|
-
throw new Error("Can't compute ReactElement until root node has been closed. Node stack: ".concat(this._stack));
|
|
2008
2032
|
}
|
|
2033
|
+
|
|
2034
|
+
throw new Error("Can't compute ReactElement until root node has been closed. Node stack: ".concat(this._stack));
|
|
2009
2035
|
}
|
|
2010
2036
|
/**
|
|
2011
2037
|
* Clears internal structures so this instance can be used to process a new tree.
|
|
@@ -2034,13 +2060,13 @@ var NodeTreeReactGenerator = /*#__PURE__*/function () {
|
|
|
2034
2060
|
exports.NodeTreeReactGenerator = NodeTreeReactGenerator;
|
|
2035
2061
|
|
|
2036
2062
|
/***/ }),
|
|
2037
|
-
/*
|
|
2063
|
+
/* 60 */
|
|
2038
2064
|
/***/ (function(module, exports) {
|
|
2039
2065
|
|
|
2040
2066
|
module.exports = require("lodash/camelCase");
|
|
2041
2067
|
|
|
2042
2068
|
/***/ }),
|
|
2043
|
-
/*
|
|
2069
|
+
/* 61 */
|
|
2044
2070
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2045
2071
|
|
|
2046
2072
|
"use strict";
|
|
@@ -2050,11 +2076,11 @@ var _classCallCheck = __webpack_require__(17);
|
|
|
2050
2076
|
|
|
2051
2077
|
var _createClass = __webpack_require__(16);
|
|
2052
2078
|
|
|
2053
|
-
var _inherits = __webpack_require__(
|
|
2079
|
+
var _inherits = __webpack_require__(23);
|
|
2054
2080
|
|
|
2055
|
-
var _possibleConstructorReturn = __webpack_require__(
|
|
2081
|
+
var _possibleConstructorReturn = __webpack_require__(24);
|
|
2056
2082
|
|
|
2057
|
-
var _getPrototypeOf = __webpack_require__(
|
|
2083
|
+
var _getPrototypeOf = __webpack_require__(25);
|
|
2058
2084
|
|
|
2059
2085
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2060
2086
|
|
|
@@ -2065,11 +2091,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2065
2091
|
});
|
|
2066
2092
|
exports.createBoundsInfo = void 0;
|
|
2067
2093
|
|
|
2068
|
-
var lodash_1 = __webpack_require__(
|
|
2094
|
+
var lodash_1 = __webpack_require__(21);
|
|
2069
2095
|
|
|
2070
|
-
var Scale_1 = __webpack_require__(
|
|
2096
|
+
var Scale_1 = __webpack_require__(62);
|
|
2071
2097
|
|
|
2072
|
-
var CoordinateTransformation_1 = __webpack_require__(
|
|
2098
|
+
var CoordinateTransformation_1 = __webpack_require__(37);
|
|
2073
2099
|
|
|
2074
2100
|
var sign = Math.sign || function (n) {
|
|
2075
2101
|
if (n < 0) return -1;
|
|
@@ -2132,9 +2158,9 @@ var LinearTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
|
2132
2158
|
value: function fit(sourceRanges, targetRanges) {
|
|
2133
2159
|
if (this.preserveAspectRatio) {
|
|
2134
2160
|
return this.fitUndistorted(sourceRanges, targetRanges);
|
|
2135
|
-
} else {
|
|
2136
|
-
return this.fitIndependently(sourceRanges, targetRanges);
|
|
2137
2161
|
}
|
|
2162
|
+
|
|
2163
|
+
return this.fitIndependently(sourceRanges, targetRanges);
|
|
2138
2164
|
}
|
|
2139
2165
|
}, {
|
|
2140
2166
|
key: "fitUndistorted",
|
|
@@ -2183,7 +2209,9 @@ var LinearTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
|
2183
2209
|
var _this4 = this;
|
|
2184
2210
|
|
|
2185
2211
|
var result = {};
|
|
2186
|
-
Object.keys(this.sourceSpace).forEach(
|
|
2212
|
+
Object.keys(this.sourceSpace).forEach( // TODO: move to explicit return
|
|
2213
|
+
// eslint-disable-next-line no-return-assign
|
|
2214
|
+
function (dimension) {
|
|
2187
2215
|
return result[_this4.targetCoordinate[dimension]] = _this4.scales[dimension].source2Target(sourcePoint[dimension]);
|
|
2188
2216
|
});
|
|
2189
2217
|
return result;
|
|
@@ -2215,7 +2243,7 @@ var LinearTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
|
2215
2243
|
value: function zoomAroundTarget(targetCenter, factor, minScale, maxScale) {
|
|
2216
2244
|
var _this6 = this;
|
|
2217
2245
|
|
|
2218
|
-
var currentScale = this.scales
|
|
2246
|
+
var currentScale = this.scales.x.scaleFactor;
|
|
2219
2247
|
var newScale = Math.min(maxScale || Number.MAX_VALUE, Math.max(currentScale * factor, minScale || 0));
|
|
2220
2248
|
var sourceCenter = this.transformBack(targetCenter);
|
|
2221
2249
|
['x', 'y'].forEach(function (axis) {
|
|
@@ -2254,7 +2282,7 @@ var LinearTransformation = /*#__PURE__*/function (_CoordinateTransforma) {
|
|
|
2254
2282
|
exports.default = LinearTransformation;
|
|
2255
2283
|
|
|
2256
2284
|
/***/ }),
|
|
2257
|
-
/*
|
|
2285
|
+
/* 62 */
|
|
2258
2286
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2259
2287
|
|
|
2260
2288
|
"use strict";
|
|
@@ -2270,7 +2298,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2270
2298
|
exports.Scale = exports.toInterval = void 0;
|
|
2271
2299
|
|
|
2272
2300
|
var isInterval = function isInterval(object) {
|
|
2273
|
-
return object
|
|
2301
|
+
return object.min != null && object.max != null;
|
|
2274
2302
|
};
|
|
2275
2303
|
|
|
2276
2304
|
var toInterval = function toInterval(object) {
|
|
@@ -2364,12 +2392,6 @@ var Scale = /*#__PURE__*/function () {
|
|
|
2364
2392
|
|
|
2365
2393
|
exports.Scale = Scale;
|
|
2366
2394
|
|
|
2367
|
-
/***/ }),
|
|
2368
|
-
/* 55 */
|
|
2369
|
-
/***/ (function(module, exports) {
|
|
2370
|
-
|
|
2371
|
-
module.exports = require("@turf/bbox-clip");
|
|
2372
|
-
|
|
2373
2395
|
/***/ })
|
|
2374
2396
|
/******/ ]);
|
|
2375
2397
|
//# sourceMappingURL=GeoJsonChoropleth.js.map
|