@splunk/visualizations 24.3.1 → 24.3.4

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.
Files changed (65) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_Tooltip_Dark.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_bubble_layer_geostats_by.png +0 -0
  4. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
  5. package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
  6. package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
  7. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Additional_Cases.png +0 -0
  8. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Internal_Fields.png +0 -0
  9. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Mostly_null.png +0 -0
  10. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Restricted_Zoom.png +0 -0
  11. package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
  12. package/.loki/reference/chrome_docker_Visualizations_Markdown_Markdown_Markdown_with_number_as_DSL.png +0 -0
  13. package/Area.js +121 -65
  14. package/Area.js.map +1 -1
  15. package/Bar.js +121 -65
  16. package/Bar.js.map +1 -1
  17. package/Bubble.js +121 -65
  18. package/Bubble.js.map +1 -1
  19. package/ChoroplethSvg.js +142 -73
  20. package/ChoroplethSvg.js.map +1 -1
  21. package/Column.js +121 -65
  22. package/Column.js.map +1 -1
  23. package/Ellipse.js +121 -65
  24. package/Ellipse.js.map +1 -1
  25. package/FillerGauge.js +121 -65
  26. package/FillerGauge.js.map +1 -1
  27. package/Image.js +125 -69
  28. package/Image.js.map +1 -1
  29. package/Line.js +121 -65
  30. package/Line.js.map +1 -1
  31. package/LinkGraph.js +121 -65
  32. package/LinkGraph.js.map +1 -1
  33. package/Map.config.js +16 -6
  34. package/Map.config.js.map +1 -1
  35. package/Map.js +430 -126
  36. package/Map.js.map +1 -1
  37. package/Markdown.js +136 -78
  38. package/Markdown.js.map +1 -1
  39. package/MarkerGauge.js +135 -79
  40. package/MarkerGauge.js.map +1 -1
  41. package/ParallelCoordinates.js +140 -83
  42. package/ParallelCoordinates.js.map +1 -1
  43. package/Pie.js +133 -77
  44. package/Pie.js.map +1 -1
  45. package/Punchcard.js +144 -87
  46. package/Punchcard.js.map +1 -1
  47. package/Rectangle.js +129 -73
  48. package/Rectangle.js.map +1 -1
  49. package/Sankey.js +204 -148
  50. package/Sankey.js.map +1 -1
  51. package/Scatter.js +131 -75
  52. package/Scatter.js.map +1 -1
  53. package/SingleValue.js +160 -104
  54. package/SingleValue.js.map +1 -1
  55. package/SingleValueIcon.js +135 -78
  56. package/SingleValueIcon.js.map +1 -1
  57. package/SingleValueRadial.js +202 -146
  58. package/SingleValueRadial.js.map +1 -1
  59. package/Table.js +236 -180
  60. package/Table.js.map +1 -1
  61. package/common/utils/hocUtils.js +65 -9
  62. package/common/utils/hocUtils.js.map +1 -1
  63. package/common/withDashboardViz.js +68 -12
  64. package/common/withDashboardViz.js.map +1 -1
  65. package/package.json +10 -10
package/Sankey.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 = 234);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 235);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -509,7 +509,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
509
509
 
510
510
  return React.createElement(FixSizeItem, {
511
511
  "data-test": "fix-size-item",
512
- "data-splunk-visualization-version": "24.3.1 - da5652d2c",
512
+ "data-splunk-visualization-version": "24.3.4 - fa50e80e6",
513
513
  width: width,
514
514
  height: height,
515
515
  backgroundColor: backgroundColor
@@ -550,13 +550,13 @@ var dataSourceUtils_1 = __webpack_require__(99);
550
550
 
551
551
  var colorUtils_1 = __webpack_require__(11);
552
552
 
553
- var withDashboardViz_1 = __webpack_require__(27);
553
+ var withDashboardViz_1 = __webpack_require__(28);
554
554
 
555
555
  var PureSankey_1 = __webpack_require__(81);
556
556
 
557
557
  exports.PureSankey = PureSankey_1.default;
558
558
 
559
- var config_1 = __webpack_require__(239);
559
+ var config_1 = __webpack_require__(240);
560
560
 
561
561
  exports.config = config_1.default;
562
562
  /**
@@ -706,7 +706,7 @@ var T = __webpack_require__(0);
706
706
 
707
707
  var lodash_1 = __webpack_require__(2);
708
708
 
709
- var DataSource_1 = __webpack_require__(33);
709
+ var DataSource_1 = __webpack_require__(34);
710
710
 
711
711
  exports.SortParamsPropTypes = T.shape({
712
712
  currentSortKey: T.string,
@@ -760,7 +760,7 @@ exports.getSortingParams = getSortingParams;
760
760
 
761
761
  /***/ }),
762
762
 
763
- /***/ 234:
763
+ /***/ 235:
764
764
  /***/ (function(module, exports, __webpack_require__) {
765
765
 
766
766
  "use strict";
@@ -803,7 +803,7 @@ Object.defineProperty(exports, "default", {
803
803
 
804
804
  /***/ }),
805
805
 
806
- /***/ 235:
806
+ /***/ 236:
807
807
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
808
808
 
809
809
  "use strict";
@@ -1370,7 +1370,7 @@ var d3_sankey = function d3_sankey() {
1370
1370
 
1371
1371
  /***/ }),
1372
1372
 
1373
- /***/ 236:
1373
+ /***/ 237:
1374
1374
  /***/ (function(module, exports, __webpack_require__) {
1375
1375
 
1376
1376
  "use strict";
@@ -1491,7 +1491,7 @@ exports.default = SankeyNode;
1491
1491
 
1492
1492
  /***/ }),
1493
1493
 
1494
- /***/ 237:
1494
+ /***/ 238:
1495
1495
  /***/ (function(module, exports, __webpack_require__) {
1496
1496
 
1497
1497
  "use strict";
@@ -1600,7 +1600,7 @@ exports.default = SankeyLink;
1600
1600
 
1601
1601
  /***/ }),
1602
1602
 
1603
- /***/ 238:
1603
+ /***/ 239:
1604
1604
  /***/ (function(module, exports, __webpack_require__) {
1605
1605
 
1606
1606
  "use strict";
@@ -1871,7 +1871,72 @@ exports.default = SankeyTooltip;
1871
1871
 
1872
1872
  /***/ }),
1873
1873
 
1874
- /***/ 239:
1874
+ /***/ 24:
1875
+ /***/ (function(module, exports, __webpack_require__) {
1876
+
1877
+ "use strict";
1878
+
1879
+
1880
+ Object.defineProperty(exports, "__esModule", {
1881
+ value: true
1882
+ });
1883
+ exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
1884
+
1885
+ var T = __webpack_require__(0);
1886
+
1887
+ var lodash_1 = __webpack_require__(2);
1888
+
1889
+ exports.PaginatorParamsPropTypes = T.shape({
1890
+ isPaging: T.bool,
1891
+ current: T.number,
1892
+ totalPages: T.number,
1893
+ onChange: T.func
1894
+ });
1895
+
1896
+ var getPaginationParams = function getPaginationParams(_ref) {
1897
+ var requestParams = _ref.requestParams,
1898
+ meta = _ref.meta,
1899
+ onRequestParamsChange = _ref.onRequestParamsChange;
1900
+ var totalCount = meta && meta.totalCount || 0;
1901
+ var offset = requestParams && requestParams.offset || 0;
1902
+ var count = requestParams && requestParams.count;
1903
+ var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
1904
+ var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
1905
+ var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
1906
+
1907
+ var onChangeHandler = function onChangeHandler(e, _ref2) {
1908
+ var page = _ref2.page,
1909
+ countArg = _ref2.count;
1910
+ var newParams = lodash_1.cloneDeep(requestParams);
1911
+
1912
+ if (typeof countArg === 'number') {
1913
+ newParams.count = countArg;
1914
+ newParams.offset = 0;
1915
+ }
1916
+
1917
+ var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
1918
+
1919
+ if (typeof page === 'number' && page > 0) {
1920
+ newParams.count = pageCount;
1921
+ newParams.offset = (page - 1) * pageCount;
1922
+ }
1923
+
1924
+ onRequestParamsChange(newParams);
1925
+ };
1926
+
1927
+ return {
1928
+ isPaging: isPaging,
1929
+ current: current,
1930
+ totalPages: totalPages,
1931
+ onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
1932
+ };
1933
+ };
1934
+
1935
+ exports.getPaginationParams = getPaginationParams;
1936
+
1937
+ /***/ }),
1938
+
1939
+ /***/ 240:
1875
1940
  /***/ (function(module, exports, __webpack_require__) {
1876
1941
 
1877
1942
  "use strict";
@@ -1895,11 +1960,11 @@ var i18n_1 = __webpack_require__(3);
1895
1960
 
1896
1961
  var VizBehavior_1 = __webpack_require__(5);
1897
1962
 
1898
- var VizCategory_1 = __webpack_require__(26);
1963
+ var VizCategory_1 = __webpack_require__(27);
1899
1964
 
1900
1965
  var configUtils_1 = __webpack_require__(6);
1901
1966
 
1902
- var DynamicLinkColorsEditor_1 = __webpack_require__(240);
1967
+ var DynamicLinkColorsEditor_1 = __webpack_require__(241);
1903
1968
 
1904
1969
  var BackgroundColor_1 = __webpack_require__(45);
1905
1970
 
@@ -2112,72 +2177,7 @@ exports.default = configUtils_1.enhanceConfig(config);
2112
2177
 
2113
2178
  /***/ }),
2114
2179
 
2115
- /***/ 24:
2116
- /***/ (function(module, exports, __webpack_require__) {
2117
-
2118
- "use strict";
2119
-
2120
-
2121
- Object.defineProperty(exports, "__esModule", {
2122
- value: true
2123
- });
2124
- exports.getPaginationParams = exports.PaginatorParamsPropTypes = void 0;
2125
-
2126
- var T = __webpack_require__(0);
2127
-
2128
- var lodash_1 = __webpack_require__(2);
2129
-
2130
- exports.PaginatorParamsPropTypes = T.shape({
2131
- isPaging: T.bool,
2132
- current: T.number,
2133
- totalPages: T.number,
2134
- onChange: T.func
2135
- });
2136
-
2137
- var getPaginationParams = function getPaginationParams(_ref) {
2138
- var requestParams = _ref.requestParams,
2139
- meta = _ref.meta,
2140
- onRequestParamsChange = _ref.onRequestParamsChange;
2141
- var totalCount = meta && meta.totalCount || 0;
2142
- var offset = requestParams && requestParams.offset || 0;
2143
- var count = requestParams && requestParams.count;
2144
- var totalPages = typeof count === 'number' && count > 0 ? Math.ceil(totalCount / count) : 0;
2145
- var current = typeof count === 'number' && count > 0 ? Math.floor(offset / count) + 1 : 0;
2146
- var isPaging = totalPages > 1 && lodash_1.isFunction(onRequestParamsChange);
2147
-
2148
- var onChangeHandler = function onChangeHandler(e, _ref2) {
2149
- var page = _ref2.page,
2150
- countArg = _ref2.count;
2151
- var newParams = lodash_1.cloneDeep(requestParams);
2152
-
2153
- if (typeof countArg === 'number') {
2154
- newParams.count = countArg;
2155
- newParams.offset = 0;
2156
- }
2157
-
2158
- var pageCount = typeof newParams.count === 'number' ? newParams.count : 10;
2159
-
2160
- if (typeof page === 'number' && page > 0) {
2161
- newParams.count = pageCount;
2162
- newParams.offset = (page - 1) * pageCount;
2163
- }
2164
-
2165
- onRequestParamsChange(newParams);
2166
- };
2167
-
2168
- return {
2169
- isPaging: isPaging,
2170
- current: current,
2171
- totalPages: totalPages,
2172
- onChange: lodash_1.isFunction(onRequestParamsChange) ? onChangeHandler : lodash_1.noop
2173
- };
2174
- };
2175
-
2176
- exports.getPaginationParams = getPaginationParams;
2177
-
2178
- /***/ }),
2179
-
2180
- /***/ 240:
2180
+ /***/ 241:
2181
2181
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2182
2182
 
2183
2183
  "use strict";
@@ -2234,6 +2234,40 @@ var getDynamicLinkColorsEditor = function getDynamicLinkColorsEditor(_ref) {
2234
2234
  "use strict";
2235
2235
 
2236
2236
 
2237
+ Object.defineProperty(exports, "__esModule", {
2238
+ value: true
2239
+ });
2240
+ exports.pickFieldFromJSONSchema = void 0;
2241
+
2242
+ var lodash_1 = __webpack_require__(2);
2243
+
2244
+ var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
2245
+ var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
2246
+ return Object.keys(optionsSchema).reduce(function (accum, k) {
2247
+ if (lodash_1.has(optionsSchema[k], fieldName)) {
2248
+ accum[k] = optionsSchema[k][fieldName];
2249
+ } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
2250
+ var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
2251
+
2252
+ if (!lodash_1.isEmpty(nestedSchema)) {
2253
+ accum[k] = nestedSchema;
2254
+ }
2255
+ }
2256
+
2257
+ return accum;
2258
+ }, {});
2259
+ };
2260
+
2261
+ exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
2262
+
2263
+ /***/ }),
2264
+
2265
+ /***/ 26:
2266
+ /***/ (function(module, exports, __webpack_require__) {
2267
+
2268
+ "use strict";
2269
+
2270
+
2237
2271
  Object.defineProperty(exports, "__esModule", {
2238
2272
  value: true
2239
2273
  });
@@ -2317,7 +2351,7 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
2317
2351
 
2318
2352
  /***/ }),
2319
2353
 
2320
- /***/ 26:
2354
+ /***/ 27:
2321
2355
  /***/ (function(module, exports, __webpack_require__) {
2322
2356
 
2323
2357
  "use strict";
@@ -2346,7 +2380,7 @@ var VizCategory;
2346
2380
 
2347
2381
  /***/ }),
2348
2382
 
2349
- /***/ 27:
2383
+ /***/ 28:
2350
2384
  /***/ (function(module, exports, __webpack_require__) {
2351
2385
 
2352
2386
  "use strict";
@@ -2360,15 +2394,15 @@ var React = __webpack_require__(1);
2360
2394
 
2361
2395
  var lodash_1 = __webpack_require__(2);
2362
2396
 
2363
- var getSettingsFromThemedProps_1 = __webpack_require__(28);
2397
+ var getSettingsFromThemedProps_1 = __webpack_require__(29);
2364
2398
 
2365
- var Options_1 = __webpack_require__(29);
2399
+ var Options_1 = __webpack_require__(30);
2366
2400
 
2367
- var SanitizeProps_1 = __webpack_require__(30);
2401
+ var SanitizeProps_1 = __webpack_require__(31);
2368
2402
 
2369
2403
  var styled_components_1 = __webpack_require__(4);
2370
2404
 
2371
- var SplunkVisualization_1 = __webpack_require__(31);
2405
+ var SplunkVisualization_1 = __webpack_require__(32);
2372
2406
 
2373
2407
  var VizBehavior_1 = __webpack_require__(5);
2374
2408
 
@@ -2376,9 +2410,9 @@ var getSorting_1 = __webpack_require__(23);
2376
2410
 
2377
2411
  var getPagination_1 = __webpack_require__(24);
2378
2412
 
2379
- var useDeepMemo_1 = __webpack_require__(34);
2413
+ var useDeepMemo_1 = __webpack_require__(35);
2380
2414
 
2381
- var JSONSchemaUtils_1 = __webpack_require__(35);
2415
+ var JSONSchemaUtils_1 = __webpack_require__(25);
2382
2416
 
2383
2417
  var MissingPropsMessage_1 = __webpack_require__(36);
2384
2418
 
@@ -2440,7 +2474,7 @@ var withDashboardViz = function withDashboardViz(opts) {
2440
2474
  try {
2441
2475
  return Options_1.Options.evaluate({
2442
2476
  context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
2443
- options: hocUtils_1.deepMergeWithArrayOverrides({}, options, defaultOptions)
2477
+ options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
2444
2478
  }, dataSources, themeFunc);
2445
2479
  } catch (e) {
2446
2480
  // eslint-disable-next-line no-console
@@ -2571,35 +2605,35 @@ exports.default = withDashboardViz;
2571
2605
 
2572
2606
  /***/ }),
2573
2607
 
2574
- /***/ 28:
2608
+ /***/ 29:
2575
2609
  /***/ (function(module, exports) {
2576
2610
 
2577
2611
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
2578
2612
 
2579
2613
  /***/ }),
2580
2614
 
2581
- /***/ 29:
2615
+ /***/ 3:
2582
2616
  /***/ (function(module, exports) {
2583
2617
 
2584
- module.exports = require("@splunk/visualization-encoding/Options");
2618
+ module.exports = require("@splunk/ui-utils/i18n");
2585
2619
 
2586
2620
  /***/ }),
2587
2621
 
2588
- /***/ 3:
2622
+ /***/ 30:
2589
2623
  /***/ (function(module, exports) {
2590
2624
 
2591
- module.exports = require("@splunk/ui-utils/i18n");
2625
+ module.exports = require("@splunk/visualization-encoding/Options");
2592
2626
 
2593
2627
  /***/ }),
2594
2628
 
2595
- /***/ 30:
2629
+ /***/ 31:
2596
2630
  /***/ (function(module, exports) {
2597
2631
 
2598
2632
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
2599
2633
 
2600
2634
  /***/ }),
2601
2635
 
2602
- /***/ 31:
2636
+ /***/ 32:
2603
2637
  /***/ (function(module, exports, __webpack_require__) {
2604
2638
 
2605
2639
  "use strict";
@@ -2617,7 +2651,7 @@ var T = __webpack_require__(0);
2617
2651
 
2618
2652
  var lodash_1 = __webpack_require__(2);
2619
2653
 
2620
- var VizActionHandler_1 = __webpack_require__(32); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
2654
+ var VizActionHandler_1 = __webpack_require__(33); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
2621
2655
 
2622
2656
 
2623
2657
  exports.INITIAL_WIDTH = 250;
@@ -2751,7 +2785,7 @@ exports.default = SplunkVisualization;
2751
2785
 
2752
2786
  /***/ }),
2753
2787
 
2754
- /***/ 32:
2788
+ /***/ 33:
2755
2789
  /***/ (function(module, exports, __webpack_require__) {
2756
2790
 
2757
2791
  "use strict";
@@ -2789,7 +2823,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
2789
2823
 
2790
2824
  /***/ }),
2791
2825
 
2792
- /***/ 33:
2826
+ /***/ 34:
2793
2827
  /***/ (function(module, exports, __webpack_require__) {
2794
2828
 
2795
2829
  "use strict";
@@ -2803,7 +2837,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
2803
2837
 
2804
2838
  /***/ }),
2805
2839
 
2806
- /***/ 34:
2840
+ /***/ 35:
2807
2841
  /***/ (function(module, exports, __webpack_require__) {
2808
2842
 
2809
2843
  "use strict";
@@ -2849,40 +2883,6 @@ exports.useDeepMemo = useDeepMemo;
2849
2883
 
2850
2884
  /***/ }),
2851
2885
 
2852
- /***/ 35:
2853
- /***/ (function(module, exports, __webpack_require__) {
2854
-
2855
- "use strict";
2856
-
2857
-
2858
- Object.defineProperty(exports, "__esModule", {
2859
- value: true
2860
- });
2861
- exports.pickFieldFromJSONSchema = void 0;
2862
-
2863
- var lodash_1 = __webpack_require__(2);
2864
-
2865
- var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
2866
- var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
2867
- return Object.keys(optionsSchema).reduce(function (accum, k) {
2868
- if (lodash_1.has(optionsSchema[k], fieldName)) {
2869
- accum[k] = optionsSchema[k][fieldName];
2870
- } else if (lodash_1.get(optionsSchema, [k, 'type']) === 'object' && lodash_1.has(optionsSchema[k], 'properties')) {
2871
- var nestedSchema = exports.pickFieldFromJSONSchema(optionsSchema[k].properties, fieldName);
2872
-
2873
- if (!lodash_1.isEmpty(nestedSchema)) {
2874
- accum[k] = nestedSchema;
2875
- }
2876
- }
2877
-
2878
- return accum;
2879
- }, {});
2880
- };
2881
-
2882
- exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
2883
-
2884
- /***/ }),
2885
-
2886
2886
  /***/ 36:
2887
2887
  /***/ (function(module, exports, __webpack_require__) {
2888
2888
 
@@ -2985,7 +2985,7 @@ var Cover = styled_components_1.default.div.withConfig({
2985
2985
  componentId: "sc-1gsbnxb-0"
2986
2986
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
2987
2987
  var Blocker = styled_components_1.default.div.attrs({
2988
- 'data-splunk-visualization-version': "24.3.1 - da5652d2c"
2988
+ 'data-splunk-visualization-version': "24.3.4 - fa50e80e6"
2989
2989
  }).withConfig({
2990
2990
  displayName: "withEditModeCover__Blocker",
2991
2991
  componentId: "sc-1gsbnxb-1"
@@ -3031,7 +3031,7 @@ var React = __webpack_require__(1);
3031
3031
 
3032
3032
  var colorUtils_1 = __webpack_require__(11);
3033
3033
 
3034
- var IconPlaceholder_1 = __webpack_require__(25);
3034
+ var IconPlaceholder_1 = __webpack_require__(26);
3035
3035
 
3036
3036
  var VizBehavior_1 = __webpack_require__(5);
3037
3037
 
@@ -3429,7 +3429,7 @@ var _typeof = __webpack_require__(20);
3429
3429
  Object.defineProperty(exports, "__esModule", {
3430
3430
  value: true
3431
3431
  });
3432
- exports.deepMergeWithArrayOverrides = exports.extendStaticWrapperProps = void 0;
3432
+ exports.findClosestMatchFromDefaultList = exports.deepMergeWithArrayPrimitiveOverrides = exports.extendStaticWrapperProps = void 0;
3433
3433
 
3434
3434
  var lodash_1 = __webpack_require__(2);
3435
3435
  /**
@@ -3455,17 +3455,19 @@ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
3455
3455
  exports.extendStaticWrapperProps = extendStaticWrapperProps;
3456
3456
  /**
3457
3457
  * helper to deeply merge objects while preserving arrays in earlier source objects
3458
- * 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
3459
- * this prevents default arrays from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one)
3458
+ * 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
3459
+ * 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).
3460
+ * 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
3461
+ * 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.
3460
3462
  *
3461
- * @method deepMergeWithArrayOverrides
3463
+ * @method deepMergeWithArrayPrimitiveOverrides
3462
3464
  * @param {Object} initial - target object to merge values into
3463
3465
  * @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
3464
3466
  *
3465
3467
  * @returns {Object}
3466
3468
  */
3467
3469
 
3468
- var deepMergeWithArrayOverrides = function deepMergeWithArrayOverrides(initial) {
3470
+ var deepMergeWithArrayPrimitiveOverrides = function deepMergeWithArrayPrimitiveOverrides(initial) {
3469
3471
  var clone = lodash_1.cloneDeep(initial);
3470
3472
 
3471
3473
  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -3476,18 +3478,72 @@ var deepMergeWithArrayOverrides = function deepMergeWithArrayOverrides(initial)
3476
3478
  Object.keys(sourceToApply).forEach(function (sourceKey) {
3477
3479
  if (!Object.prototype.hasOwnProperty.call(clone, sourceKey)) {
3478
3480
  clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
3479
- } // object merging excluding arrays
3480
-
3481
+ }
3481
3482
 
3482
3483
  if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
3483
- clone[sourceKey] = exports.deepMergeWithArrayOverrides(clone[sourceKey], sourceToApply[sourceKey]);
3484
+ clone[sourceKey] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey], sourceToApply[sourceKey]);
3485
+ } else if (Array.isArray(clone[sourceKey]) && _typeof(clone[sourceKey][0]) === 'object' && !Array.isArray(clone[sourceKey][0])) {
3486
+ // If option is an array of objects
3487
+ for (var i = 0; i < clone[sourceKey].length; i += 1) {
3488
+ if (_typeof(clone[sourceKey][i]) === 'object') {
3489
+ var closestMatchIdx = exports.findClosestMatchFromDefaultList(sourceToApply[sourceKey], clone[sourceKey][i]);
3490
+
3491
+ if (closestMatchIdx > -1) {
3492
+ clone[sourceKey][i] = exports.deepMergeWithArrayPrimitiveOverrides(clone[sourceKey][i], sourceToApply[sourceKey][closestMatchIdx]);
3493
+ }
3494
+ }
3495
+ }
3484
3496
  }
3485
3497
  });
3486
3498
  });
3487
3499
  return clone;
3488
3500
  };
3489
3501
 
3490
- exports.deepMergeWithArrayOverrides = deepMergeWithArrayOverrides;
3502
+ exports.deepMergeWithArrayPrimitiveOverrides = deepMergeWithArrayPrimitiveOverrides;
3503
+ /**
3504
+ * Finds the closest matching object from the list, which has the max same key value pairs.
3505
+ * Returns the index of match if found, or -1
3506
+ * For eg :-
3507
+ const list = [{
3508
+ type: "marker",
3509
+ lat: "value1"
3510
+ }, {
3511
+ type: "bubble",
3512
+ size: "value2"
3513
+ }];
3514
+
3515
+ const obj = {
3516
+ type: 'bubble'
3517
+ };
3518
+
3519
+ findClosestMatch(list, obj) -> returns index 1.
3520
+ */
3521
+
3522
+ var findClosestMatchFromDefaultList = function findClosestMatchFromDefaultList(searchList, inputObj) {
3523
+ if (!Array.isArray(searchList) || searchList.length === 0) {
3524
+ return -1;
3525
+ }
3526
+
3527
+ var keys = Object.keys(inputObj);
3528
+ var maxMatchCnt = 0;
3529
+ var maxMatchIdx = 0;
3530
+ searchList.forEach(function (item, idx) {
3531
+ var matchCnt = 0;
3532
+ keys.forEach(function (key) {
3533
+ if (item[key] === inputObj[key]) {
3534
+ matchCnt += 1;
3535
+ }
3536
+ });
3537
+
3538
+ if (Math.max(maxMatchCnt, matchCnt) > maxMatchCnt) {
3539
+ maxMatchCnt = matchCnt;
3540
+ maxMatchIdx = idx;
3541
+ }
3542
+ });
3543
+ return maxMatchIdx;
3544
+ };
3545
+
3546
+ exports.findClosestMatchFromDefaultList = findClosestMatchFromDefaultList;
3491
3547
 
3492
3548
  /***/ }),
3493
3549
 
@@ -3541,17 +3597,17 @@ var style_1 = __webpack_require__(13);
3541
3597
  var visualization_color_palettes_1 = __webpack_require__(41); // eslint-disable-next-line camelcase
3542
3598
 
3543
3599
 
3544
- var sankey_1 = __webpack_require__(235);
3600
+ var sankey_1 = __webpack_require__(236);
3545
3601
 
3546
3602
  var VizStyleWrapper_1 = __webpack_require__(59);
3547
3603
 
3548
3604
  var SankeyUtils_1 = __webpack_require__(102);
3549
3605
 
3550
- var SankeyNode_1 = __webpack_require__(236);
3606
+ var SankeyNode_1 = __webpack_require__(237);
3551
3607
 
3552
- var SankeyLink_1 = __webpack_require__(237);
3608
+ var SankeyLink_1 = __webpack_require__(238);
3553
3609
 
3554
- var SankeyTooltip_1 = __webpack_require__(238);
3610
+ var SankeyTooltip_1 = __webpack_require__(239);
3555
3611
 
3556
3612
  exports.DEFAULT_COLORS = {
3557
3613
  backgroundColor: '#ffffff',