@splunk/visualizations 24.3.2 → 24.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Dark.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_geostats_by.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Additional_Cases.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Internal_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Mostly_null.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Restricted_Zoom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
- package/Area.js +121 -65
- package/Area.js.map +1 -1
- package/Bar.js +121 -65
- package/Bar.js.map +1 -1
- package/Bubble.js +121 -65
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.js +142 -73
- package/ChoroplethSvg.js.map +1 -1
- package/Column.js +121 -65
- package/Column.js.map +1 -1
- package/Ellipse.js +121 -65
- package/Ellipse.js.map +1 -1
- package/FillerGauge.js +121 -65
- package/FillerGauge.js.map +1 -1
- package/Image.js +125 -69
- package/Image.js.map +1 -1
- package/Line.js +121 -65
- package/Line.js.map +1 -1
- package/LinkGraph.js +121 -65
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +16 -6
- package/Map.config.js.map +1 -1
- package/Map.js +430 -126
- package/Map.js.map +1 -1
- package/Markdown.js +131 -75
- package/Markdown.js.map +1 -1
- package/MarkerGauge.js +135 -79
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.js +140 -83
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.js +133 -77
- package/Pie.js.map +1 -1
- package/Punchcard.js +144 -87
- package/Punchcard.js.map +1 -1
- package/Rectangle.js +129 -73
- package/Rectangle.js.map +1 -1
- package/Sankey.js +204 -148
- package/Sankey.js.map +1 -1
- package/Scatter.js +131 -75
- package/Scatter.js.map +1 -1
- package/SingleValue.js +160 -104
- package/SingleValue.js.map +1 -1
- package/SingleValueIcon.js +135 -78
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.js +202 -146
- package/SingleValueRadial.js.map +1 -1
- package/Table.js +236 -180
- package/Table.js.map +1 -1
- package/common/utils/hocUtils.js +65 -9
- package/common/utils/hocUtils.js.map +1 -1
- package/common/withDashboardViz.js +68 -12
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +9 -9
package/ChoroplethSvg.js
CHANGED
|
@@ -360,7 +360,7 @@ var _typeof = __webpack_require__(20);
|
|
|
360
360
|
Object.defineProperty(exports, "__esModule", {
|
|
361
361
|
value: true
|
|
362
362
|
});
|
|
363
|
-
exports.
|
|
363
|
+
exports.findClosestMatchFromDefaultList = exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
|
|
364
364
|
|
|
365
365
|
var lodash_1 = __webpack_require__(2);
|
|
366
366
|
/**
|
|
@@ -386,17 +386,19 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
|
|
|
386
386
|
exports.extendStaticWrapperProps = extendStaticWrapperProps;
|
|
387
387
|
/**
|
|
388
388
|
* helper to deeply merge objects while preserving arrays in earlier source objects
|
|
389
|
-
* deeply nested primitive keys are merged similarly to lodash's defaultsDeep, while keys with arrays will be preserved if already present in the resultant merged object
|
|
390
|
-
* this prevents default arrays from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one)
|
|
389
|
+
* deeply nested primitive keys are merged similarly to lodash's defaultsDeep, while keys with arrays of primitives will be preserved if already present in the resultant merged object
|
|
390
|
+
* this prevents default arrays of primitives from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one).
|
|
391
|
+
* Array of objects gets merged with the defaults, where the defaults can be an array of objects. Closest matching default object from the defaults list based on key - value pair
|
|
392
|
+
* will be used for merging defaults for each object in the array. If no closest match found, first object in default array list used for merging.
|
|
391
393
|
*
|
|
392
|
-
* @method
|
|
394
|
+
* @method deepMergeWithArrayPrimitiveOverrides
|
|
393
395
|
* @param {Object} initial - target object to merge values into
|
|
394
396
|
* @param {Object[]} sources - other default options to be merged into the resultant object if no explicit value is provided, with earlier args taking precedence over later ones
|
|
395
397
|
*
|
|
396
398
|
* @returns {Object}
|
|
397
399
|
*/
|
|
398
400
|
|
|
399
|
-
var
|
|
401
|
+
var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
|
|
400
402
|
var clone = lodash_1.cloneDeep(initial);
|
|
401
403
|
|
|
402
404
|
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -407,18 +409,72 @@ var deepMergeWithArrayOverrides = function deepMergeWithArrayOverrides(initial)
|
|
|
407
409
|
Object.keys(sourceToApply).forEach(function (sourceKey) {
|
|
408
410
|
if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
|
|
409
411
|
clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
+
}
|
|
412
413
|
|
|
413
414
|
if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
|
|
414
|
-
clone[sourceKey] = exports.
|
|
415
|
+
clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
|
|
416
|
+
} else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
|
|
417
|
+
// If option is an array of objects
|
|
418
|
+
for (var i = 0; i < clone[sourceKey].length; i += 1) {
|
|
419
|
+
if (_typeof(clone[sourceKey][i]) === 'object') {
|
|
420
|
+
var closestMatchIdx = exports.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
|
|
421
|
+
|
|
422
|
+
if (closestMatchIdx > -1) {
|
|
423
|
+
clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
415
427
|
}
|
|
416
428
|
});
|
|
417
429
|
});
|
|
418
430
|
return clone;
|
|
419
431
|
};
|
|
420
432
|
|
|
421
|
-
exports.
|
|
433
|
+
exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
|
|
434
|
+
/**
|
|
435
|
+
* Finds the closest matching object from the list, which has the max same key value pairs.
|
|
436
|
+
* Returns the index of match if found, or -1
|
|
437
|
+
* For eg :-
|
|
438
|
+
const list = [{
|
|
439
|
+
type: "marker",
|
|
440
|
+
lat: "value1"
|
|
441
|
+
}, {
|
|
442
|
+
type: "bubble",
|
|
443
|
+
size: "value2"
|
|
444
|
+
}];
|
|
445
|
+
|
|
446
|
+
const obj = {
|
|
447
|
+
type: 'bubble'
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
findClosestMatch(list, obj) -> returns index 1.
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
var findClosestMatchFromDefaultList = function findClosestMatchFromDefaultList(searchList, inputObj) {
|
|
454
|
+
if (!Array.isArray(searchList) || searchList.length === 0) {
|
|
455
|
+
return -1;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
var keys = Object.keys(inputObj);
|
|
459
|
+
var maxMatchCnt = 0;
|
|
460
|
+
var maxMatchIdx = 0;
|
|
461
|
+
searchList.forEach(function (item, idx) {
|
|
462
|
+
var matchCnt = 0;
|
|
463
|
+
keys.forEach(function (key) {
|
|
464
|
+
if (item[key] === inputObj[key]) {
|
|
465
|
+
matchCnt += 1;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
if (Math.max(maxMatchCnt, matchCnt) > maxMatchCnt) {
|
|
470
|
+
maxMatchCnt = matchCnt;
|
|
471
|
+
maxMatchIdx = idx;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
return maxMatchIdx;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
exports.findClosestMatchFromDefaultList = findClosestMatchFromDefaultList;
|
|
422
478
|
|
|
423
479
|
/***/ }),
|
|
424
480
|
/* 8 */
|
|
@@ -520,7 +576,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
520
576
|
|
|
521
577
|
return React.createElement(FixSizeItem, {
|
|
522
578
|
"data-test": "fix-size-item",
|
|
523
|
-
"data-splunk-visualization-version": "24.3.
|
|
579
|
+
"data-splunk-visualization-version": "24.3.3 - 8d441d88c",
|
|
524
580
|
width: width,
|
|
525
581
|
height: height,
|
|
526
582
|
backgroundColor: backgroundColor
|
|
@@ -603,7 +659,7 @@ var T = __webpack_require__(0);
|
|
|
603
659
|
|
|
604
660
|
var lodash_1 = __webpack_require__(2);
|
|
605
661
|
|
|
606
|
-
var DataSource_1 = __webpack_require__(
|
|
662
|
+
var DataSource_1 = __webpack_require__(34);
|
|
607
663
|
|
|
608
664
|
exports.SortParamsPropTypes = T.shape({
|
|
609
665
|
currentSortKey: T.string,
|
|
@@ -726,6 +782,39 @@ exports.getPaginationParams = getPaginationParams;
|
|
|
726
782
|
"use strict";
|
|
727
783
|
|
|
728
784
|
|
|
785
|
+
Object.defineProperty(exports, "__esModule", {
|
|
786
|
+
value: true
|
|
787
|
+
});
|
|
788
|
+
exports.pickFieldFromJSONSchema = void 0;
|
|
789
|
+
|
|
790
|
+
var lodash_1 = __webpack_require__(2);
|
|
791
|
+
|
|
792
|
+
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
793
|
+
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
794
|
+
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
795
|
+
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
796
|
+
accum[k] = optionsSchema[k][fieldName];
|
|
797
|
+
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
798
|
+
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
799
|
+
|
|
800
|
+
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
801
|
+
accum[k] = nestedSchema;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
return accum;
|
|
806
|
+
}, {});
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
810
|
+
|
|
811
|
+
/***/ }),
|
|
812
|
+
/* 26 */
|
|
813
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
814
|
+
|
|
815
|
+
"use strict";
|
|
816
|
+
|
|
817
|
+
|
|
729
818
|
Object.defineProperty(exports, "__esModule", {
|
|
730
819
|
value: true
|
|
731
820
|
});
|
|
@@ -808,7 +897,7 @@ IconPlaceholder.defaultProps = {
|
|
|
808
897
|
exports.default = FixedSizeContainer_1.default(IconPlaceholder);
|
|
809
898
|
|
|
810
899
|
/***/ }),
|
|
811
|
-
/*
|
|
900
|
+
/* 27 */
|
|
812
901
|
/***/ (function(module, exports, __webpack_require__) {
|
|
813
902
|
|
|
814
903
|
"use strict";
|
|
@@ -836,7 +925,7 @@ var VizCategory;
|
|
|
836
925
|
})(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
|
|
837
926
|
|
|
838
927
|
/***/ }),
|
|
839
|
-
/*
|
|
928
|
+
/* 28 */
|
|
840
929
|
/***/ (function(module, exports, __webpack_require__) {
|
|
841
930
|
|
|
842
931
|
"use strict";
|
|
@@ -850,15 +939,15 @@ var React = __webpack_require__(1);
|
|
|
850
939
|
|
|
851
940
|
var lodash_1 = __webpack_require__(2);
|
|
852
941
|
|
|
853
|
-
var getSettingsFromThemedProps_1 = __webpack_require__(
|
|
942
|
+
var getSettingsFromThemedProps_1 = __webpack_require__(29);
|
|
854
943
|
|
|
855
|
-
var Options_1 = __webpack_require__(
|
|
944
|
+
var Options_1 = __webpack_require__(30);
|
|
856
945
|
|
|
857
|
-
var SanitizeProps_1 = __webpack_require__(
|
|
946
|
+
var SanitizeProps_1 = __webpack_require__(31);
|
|
858
947
|
|
|
859
948
|
var styled_components_1 = __webpack_require__(4);
|
|
860
949
|
|
|
861
|
-
var SplunkVisualization_1 = __webpack_require__(
|
|
950
|
+
var SplunkVisualization_1 = __webpack_require__(32);
|
|
862
951
|
|
|
863
952
|
var VizBehavior_1 = __webpack_require__(5);
|
|
864
953
|
|
|
@@ -866,9 +955,9 @@ var getSorting_1 = __webpack_require__(23);
|
|
|
866
955
|
|
|
867
956
|
var getPagination_1 = __webpack_require__(24);
|
|
868
957
|
|
|
869
|
-
var useDeepMemo_1 = __webpack_require__(
|
|
958
|
+
var useDeepMemo_1 = __webpack_require__(35);
|
|
870
959
|
|
|
871
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
960
|
+
var JSONSchemaUtils_1 = __webpack_require__(25);
|
|
872
961
|
|
|
873
962
|
var MissingPropsMessage_1 = __webpack_require__(36);
|
|
874
963
|
|
|
@@ -930,7 +1019,7 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
930
1019
|
try {
|
|
931
1020
|
return Options_1.Options.evaluate({
|
|
932
1021
|
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
933
|
-
options: hocUtils_1.
|
|
1022
|
+
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
934
1023
|
}, dataSources, themeFunc);
|
|
935
1024
|
} catch (e) {
|
|
936
1025
|
// eslint-disable-next-line no-console
|
|
@@ -1060,25 +1149,25 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1060
1149
|
exports.default = withDashboardViz;
|
|
1061
1150
|
|
|
1062
1151
|
/***/ }),
|
|
1063
|
-
/*
|
|
1152
|
+
/* 29 */
|
|
1064
1153
|
/***/ (function(module, exports) {
|
|
1065
1154
|
|
|
1066
1155
|
module.exports = require("@splunk/themes/getSettingsFromThemedProps");
|
|
1067
1156
|
|
|
1068
1157
|
/***/ }),
|
|
1069
|
-
/*
|
|
1158
|
+
/* 30 */
|
|
1070
1159
|
/***/ (function(module, exports) {
|
|
1071
1160
|
|
|
1072
1161
|
module.exports = require("@splunk/visualization-encoding/Options");
|
|
1073
1162
|
|
|
1074
1163
|
/***/ }),
|
|
1075
|
-
/*
|
|
1164
|
+
/* 31 */
|
|
1076
1165
|
/***/ (function(module, exports) {
|
|
1077
1166
|
|
|
1078
1167
|
module.exports = require("@splunk/visualizations-shared/SanitizeProps");
|
|
1079
1168
|
|
|
1080
1169
|
/***/ }),
|
|
1081
|
-
/*
|
|
1170
|
+
/* 32 */
|
|
1082
1171
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1083
1172
|
|
|
1084
1173
|
"use strict";
|
|
@@ -1096,7 +1185,7 @@ var T = __webpack_require__(0);
|
|
|
1096
1185
|
|
|
1097
1186
|
var lodash_1 = __webpack_require__(2);
|
|
1098
1187
|
|
|
1099
|
-
var VizActionHandler_1 = __webpack_require__(
|
|
1188
|
+
var VizActionHandler_1 = __webpack_require__(33); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
|
|
1100
1189
|
|
|
1101
1190
|
|
|
1102
1191
|
exports.INITIAL_WIDTH = 250;
|
|
@@ -1229,7 +1318,7 @@ SplunkVisualization.defaultProps = {
|
|
|
1229
1318
|
exports.default = SplunkVisualization;
|
|
1230
1319
|
|
|
1231
1320
|
/***/ }),
|
|
1232
|
-
/*
|
|
1321
|
+
/* 33 */
|
|
1233
1322
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1234
1323
|
|
|
1235
1324
|
"use strict";
|
|
@@ -1266,7 +1355,7 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
|
|
|
1266
1355
|
exports.DefaultVizActionHandler = DefaultVizActionHandler;
|
|
1267
1356
|
|
|
1268
1357
|
/***/ }),
|
|
1269
|
-
/*
|
|
1358
|
+
/* 34 */
|
|
1270
1359
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1271
1360
|
|
|
1272
1361
|
"use strict";
|
|
@@ -1279,7 +1368,7 @@ exports.validSortDirs = void 0;
|
|
|
1279
1368
|
exports.validSortDirs = ['asc', 'desc', 'none'];
|
|
1280
1369
|
|
|
1281
1370
|
/***/ }),
|
|
1282
|
-
/*
|
|
1371
|
+
/* 35 */
|
|
1283
1372
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1284
1373
|
|
|
1285
1374
|
"use strict";
|
|
@@ -1323,39 +1412,6 @@ var useDeepMemo = function useDeepMemo(fn, dependencies) {
|
|
|
1323
1412
|
|
|
1324
1413
|
exports.useDeepMemo = useDeepMemo;
|
|
1325
1414
|
|
|
1326
|
-
/***/ }),
|
|
1327
|
-
/* 35 */
|
|
1328
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1329
|
-
|
|
1330
|
-
"use strict";
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1334
|
-
value: true
|
|
1335
|
-
});
|
|
1336
|
-
exports.pickFieldFromJSONSchema = void 0;
|
|
1337
|
-
|
|
1338
|
-
var lodash_1 = __webpack_require__(2);
|
|
1339
|
-
|
|
1340
|
-
var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
1341
|
-
var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
1342
|
-
return Object.keys(optionsSchema).reduce(function (accum, k) {
|
|
1343
|
-
if (lodash_1.has(optionsSchema[k], fieldName)) {
|
|
1344
|
-
accum[k] = optionsSchema[k][fieldName];
|
|
1345
|
-
} else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
|
|
1346
|
-
var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
|
|
1347
|
-
|
|
1348
|
-
if (!lodash_1.isEmpty(nestedSchema)) {
|
|
1349
|
-
accum[k] = nestedSchema;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
return accum;
|
|
1354
|
-
}, {});
|
|
1355
|
-
};
|
|
1356
|
-
|
|
1357
|
-
exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
1358
|
-
|
|
1359
1415
|
/***/ }),
|
|
1360
1416
|
/* 36 */
|
|
1361
1417
|
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -1458,7 +1514,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1458
1514
|
componentId: "sc-1gsbnxb-0"
|
|
1459
1515
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1460
1516
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1461
|
-
'data-splunk-visualization-version': "24.3.
|
|
1517
|
+
'data-splunk-visualization-version': "24.3.3 - 8d441d88c"
|
|
1462
1518
|
}).withConfig({
|
|
1463
1519
|
displayName: "withEditModeCover__Blocker",
|
|
1464
1520
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1503,7 +1559,7 @@ var React = __webpack_require__(1);
|
|
|
1503
1559
|
|
|
1504
1560
|
var colorUtils_1 = __webpack_require__(11);
|
|
1505
1561
|
|
|
1506
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1562
|
+
var IconPlaceholder_1 = __webpack_require__(26);
|
|
1507
1563
|
|
|
1508
1564
|
var VizBehavior_1 = __webpack_require__(5);
|
|
1509
1565
|
|
|
@@ -1918,7 +1974,7 @@ var FileDownloader_1 = __webpack_require__(150);
|
|
|
1918
1974
|
|
|
1919
1975
|
var Downloader_1 = __webpack_require__(151);
|
|
1920
1976
|
|
|
1921
|
-
var withDashboardViz_1 = __webpack_require__(
|
|
1977
|
+
var withDashboardViz_1 = __webpack_require__(28);
|
|
1922
1978
|
|
|
1923
1979
|
var PureChoroplethSvg_1 = __webpack_require__(152);
|
|
1924
1980
|
|
|
@@ -1926,7 +1982,7 @@ var SvgChoroplethDynamic_1 = __webpack_require__(114);
|
|
|
1926
1982
|
|
|
1927
1983
|
var config_1 = __webpack_require__(157);
|
|
1928
1984
|
|
|
1929
|
-
var IconPlaceholder_1 = __webpack_require__(
|
|
1985
|
+
var IconPlaceholder_1 = __webpack_require__(26);
|
|
1930
1986
|
|
|
1931
1987
|
exports.config = config_1.default;
|
|
1932
1988
|
exports.PureChoroplethSvg = PureChoroplethSvg_1.default; // todo: need remove when deleting @splunk/react-visualizations package
|
|
@@ -2382,6 +2438,21 @@ var SvgMutator = /*#__PURE__*/function () {
|
|
|
2382
2438
|
var xpath = jexl.evalSync(xpathExpr, context);
|
|
2383
2439
|
return XPath.evaluate(xpath, doc, resolver, XPathResult.ANY_TYPE, null);
|
|
2384
2440
|
}
|
|
2441
|
+
}, {
|
|
2442
|
+
key: "getTitle",
|
|
2443
|
+
value: function getTitle(data, i) {
|
|
2444
|
+
var title = '';
|
|
2445
|
+
|
|
2446
|
+
if (data.featureIDs && data.featureIDs[i]) {
|
|
2447
|
+
title += "name: ".concat(data.featureIDs[i]);
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
if (data.values && data.values[i] !== undefined) {
|
|
2451
|
+
title += "\nvalue: ".concat(data.values[i]);
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
return title;
|
|
2455
|
+
}
|
|
2385
2456
|
/**
|
|
2386
2457
|
* At this point we have identified an SVG attribute Node that we wish to mutate. That node is passed in here along
|
|
2387
2458
|
* with the data binding and the data. We have already used the dataBinding's xpath (that is how we found the
|
|
@@ -2421,17 +2492,15 @@ var SvgMutator = /*#__PURE__*/function () {
|
|
|
2421
2492
|
n.value = computed; // So you may ask...why do we set BOTH the nodeValue and the Attr value. The nodeValue seems to be the one that "shows up" as reflecting the change. We use nodeValue down in addSubtree. Yet XMLSerializer will only see the changes from Attr.value. So what the heck, we use BOTH
|
|
2422
2493
|
// we also add data-* attributes to the node and a title that behaves like a hover
|
|
2423
2494
|
|
|
2424
|
-
var title = '';
|
|
2425
2495
|
var parent = n.ownerElement;
|
|
2426
|
-
|
|
2427
|
-
if (data.values && data.values[i]) {
|
|
2428
|
-
parent.setAttribute('data-value', data.values[i]);
|
|
2429
|
-
title += "name: ".concat(data.values[i]);
|
|
2430
|
-
}
|
|
2496
|
+
var title = SvgMutator.getTitle(data, i);
|
|
2431
2497
|
|
|
2432
2498
|
if (data.featureIDs && data.featureIDs[i]) {
|
|
2433
2499
|
parent.setAttribute('data-name', data.featureIDs[i]);
|
|
2434
|
-
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
if (data.values && data.values[i] !== undefined) {
|
|
2503
|
+
parent.setAttribute('data-value', data.values[i]);
|
|
2435
2504
|
}
|
|
2436
2505
|
|
|
2437
2506
|
if (title !== '') {
|
|
@@ -2582,7 +2651,7 @@ var VizBehavior_1 = __webpack_require__(5);
|
|
|
2582
2651
|
|
|
2583
2652
|
var configUtils_1 = __webpack_require__(6);
|
|
2584
2653
|
|
|
2585
|
-
var VizCategory_1 = __webpack_require__(
|
|
2654
|
+
var VizCategory_1 = __webpack_require__(27);
|
|
2586
2655
|
|
|
2587
2656
|
var StaticBackgroundColorEditor_1 = __webpack_require__(68);
|
|
2588
2657
|
|