@splunk/visualizations 23.2.0 → 23.5.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.
Files changed (132) hide show
  1. package/Area.config.js +36 -30
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +243 -203
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +29 -23
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +233 -193
  8. package/Bar.js.map +1 -1
  9. package/Bubble.config.js +36 -23
  10. package/Bubble.config.js.map +1 -1
  11. package/Bubble.js +247 -196
  12. package/Bubble.js.map +1 -1
  13. package/ChoroplethSvg.config.js +15 -12
  14. package/ChoroplethSvg.config.js.map +1 -1
  15. package/ChoroplethSvg.js +201 -148
  16. package/ChoroplethSvg.js.map +1 -1
  17. package/Column.config.js +29 -23
  18. package/Column.config.js.map +1 -1
  19. package/Column.js +235 -194
  20. package/Column.js.map +1 -1
  21. package/Ellipse.config.js +23 -20
  22. package/Ellipse.config.js.map +1 -1
  23. package/Ellipse.js +176 -123
  24. package/Ellipse.js.map +1 -1
  25. package/FillerGauge.config.js +803 -0
  26. package/FillerGauge.config.js.map +1 -0
  27. package/FillerGauge.js +3634 -0
  28. package/FillerGauge.js.map +1 -0
  29. package/Image.config.js +13 -6
  30. package/Image.config.js.map +1 -1
  31. package/Image.js +260 -200
  32. package/Image.js.map +1 -1
  33. package/LICENSE.md +14 -0
  34. package/Line.config.js +40 -31
  35. package/Line.config.js.map +1 -1
  36. package/Line.js +248 -202
  37. package/Line.js.map +1 -1
  38. package/LinkGraph.config.js +107 -123
  39. package/LinkGraph.config.js.map +1 -1
  40. package/LinkGraph.js +241 -193
  41. package/LinkGraph.js.map +1 -1
  42. package/Markdown.config.js +95 -3
  43. package/Markdown.config.js.map +1 -1
  44. package/Markdown.js +272 -118
  45. package/Markdown.js.map +1 -1
  46. package/MarkerGauge.config.js +750 -0
  47. package/MarkerGauge.config.js.map +1 -0
  48. package/MarkerGauge.js +3758 -0
  49. package/MarkerGauge.js.map +1 -0
  50. package/ParallelCoordinates.config.js +52 -46
  51. package/ParallelCoordinates.config.js.map +1 -1
  52. package/ParallelCoordinates.js +257 -164
  53. package/ParallelCoordinates.js.map +1 -1
  54. package/Pie.config.js +61 -46
  55. package/Pie.config.js.map +1 -1
  56. package/Pie.js +254 -186
  57. package/Pie.js.map +1 -1
  58. package/Punchcard.config.js +279 -39
  59. package/Punchcard.config.js.map +1 -1
  60. package/Punchcard.js +825 -193
  61. package/Punchcard.js.map +1 -1
  62. package/README.external.md +45 -0
  63. package/README.md +18 -3
  64. package/Rectangle.config.js +89 -107
  65. package/Rectangle.config.js.map +1 -1
  66. package/Rectangle.js +204 -145
  67. package/Rectangle.js.map +1 -1
  68. package/Sankey.config.js +29 -22
  69. package/Sankey.config.js.map +1 -1
  70. package/Sankey.js +250 -186
  71. package/Sankey.js.map +1 -1
  72. package/Scatter.config.js +39 -28
  73. package/Scatter.config.js.map +1 -1
  74. package/Scatter.js +2375 -2434
  75. package/Scatter.js.map +1 -1
  76. package/SingleValue.config.js +37 -29
  77. package/SingleValue.config.js.map +1 -1
  78. package/SingleValue.js +3108 -3174
  79. package/SingleValue.js.map +1 -1
  80. package/SingleValueBasic.js +37 -23
  81. package/SingleValueBasic.js.map +1 -1
  82. package/SingleValueIcon.config.js +36 -28
  83. package/SingleValueIcon.config.js.map +1 -1
  84. package/SingleValueIcon.js +279 -210
  85. package/SingleValueIcon.js.map +1 -1
  86. package/SingleValueRadial.config.js +15 -13
  87. package/SingleValueRadial.config.js.map +1 -1
  88. package/SingleValueRadial.js +299 -253
  89. package/SingleValueRadial.js.map +1 -1
  90. package/Table.config.js +26 -10
  91. package/Table.config.js.map +1 -1
  92. package/Table.js +382 -265
  93. package/Table.js.map +1 -1
  94. package/common/Charting.js +33 -30
  95. package/common/Charting.js.map +1 -1
  96. package/common/ChartingApi.js +4 -4
  97. package/common/ChartingApi.js.map +1 -1
  98. package/common/EventsDoc.js +36 -34
  99. package/common/EventsDoc.js.map +1 -1
  100. package/common/GaugeMajorTicks.js +386 -0
  101. package/common/GaugeMajorTicks.js.map +1 -0
  102. package/common/GaugeValueMarker.js +333 -0
  103. package/common/GaugeValueMarker.js.map +1 -0
  104. package/common/OptionsDoc.js +47 -33
  105. package/common/OptionsDoc.js.map +1 -1
  106. package/common/OverviewDoc.js +376 -0
  107. package/common/OverviewDoc.js.map +1 -0
  108. package/common/SplunkVisualization.js +6 -6
  109. package/common/SplunkVisualization.js.map +1 -1
  110. package/common/SplunkVisualizationApi.js +10 -10
  111. package/common/SplunkVisualizationApi.js.map +1 -1
  112. package/common/ThemesDoc.js +55 -72
  113. package/common/ThemesDoc.js.map +1 -1
  114. package/common/chartingUtils.js +15 -13
  115. package/common/chartingUtils.js.map +1 -1
  116. package/common/docUtils.js +4 -4
  117. package/common/docUtils.js.map +1 -1
  118. package/common/gaugeUtils.js +893 -0
  119. package/common/gaugeUtils.js.map +1 -0
  120. package/common/shapeUtils.js +8 -8
  121. package/common/shapeUtils.js.map +1 -1
  122. package/common/utils/JSONSchemaUtils.js.map +1 -1
  123. package/common/utils/configUtils.js.map +1 -1
  124. package/common/utils/hocUtils.js +57 -3
  125. package/common/utils/hocUtils.js.map +1 -1
  126. package/common/utils/singleValueUtils.js +24 -10
  127. package/common/utils/singleValueUtils.js.map +1 -1
  128. package/common/withDashboardViz.js +158 -95
  129. package/common/withDashboardViz.js.map +1 -1
  130. package/package.json +18 -14
  131. package/common/utils/eventUtils.js +0 -115
  132. package/common/utils/eventUtils.js.map +0 -1
package/Punchcard.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 = 192);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 206);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ([
@@ -170,6 +170,77 @@ module.exports = require("@babel/runtime/helpers/defineProperty");
170
170
  "use strict";
171
171
 
172
172
 
173
+ var _typeof = __webpack_require__(22);
174
+
175
+ Object.defineProperty(exports, "__esModule", {
176
+ value: true
177
+ });
178
+ exports.deepMergeWithArrayOverrides = exports.extendStaticWrapperProps = void 0;
179
+
180
+ var lodash_1 = __webpack_require__(2);
181
+ /**
182
+ * @method extendStaticWrapperProps
183
+ * @param {Object} props
184
+ * @param {DashboardVizType} props.Wrapper
185
+ * @param {DashboardVizType} props.Visualization
186
+ */
187
+
188
+
189
+ var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
190
+ var Wrapper = _ref.Wrapper,
191
+ Visualization = _ref.Visualization;
192
+ var extendProperties = ['propTypes', 'defaultProps', 'config'];
193
+ extendProperties.forEach(function (prop) {
194
+ if (Visualization[prop]) {
195
+ Wrapper[prop] = Visualization[prop];
196
+ }
197
+ });
198
+ };
199
+
200
+ exports.extendStaticWrapperProps = extendStaticWrapperProps;
201
+ /**
202
+ * helper to deeply merge objects while preserving arrays in earlier source objects
203
+ * 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
204
+ * this prevents default arrays from appending values to user-defined arrays (this occurs if the default array is longer than the user-defined one)
205
+ *
206
+ * @method deepMergeWithArrayOverrides
207
+ * @param {Object} initial - target object to merge values into
208
+ * @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
209
+ *
210
+ * @returns {Object}
211
+ */
212
+
213
+ var deepMergeWithArrayOverrides = function deepMergeWithArrayOverrides(initial) {
214
+ var clone = lodash_1.cloneDeep(initial);
215
+
216
+ for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
217
+ sources[_key - 1] = arguments[_key];
218
+ }
219
+
220
+ sources.forEach(function (sourceToApply) {
221
+ Object.keys(sourceToApply).forEach(function (sourceKey) {
222
+ if (!clone.hasOwnProperty(sourceKey)) {
223
+ clone[sourceKey] = lodash_1.cloneDeep(sourceToApply[sourceKey]);
224
+ } // object merging excluding arrays
225
+
226
+
227
+ if (clone[sourceKey] && _typeof(clone[sourceKey]) === 'object' && !Array.isArray(clone[sourceKey]) && _typeof(sourceToApply[sourceKey]) === 'object') {
228
+ clone[sourceKey] = exports.deepMergeWithArrayOverrides(clone[sourceKey], sourceToApply[sourceKey]);
229
+ }
230
+ });
231
+ });
232
+ return clone;
233
+ };
234
+
235
+ exports.deepMergeWithArrayOverrides = deepMergeWithArrayOverrides;
236
+
237
+ /***/ }),
238
+ /* 8 */
239
+ /***/ (function(module, exports, __webpack_require__) {
240
+
241
+ "use strict";
242
+
243
+
173
244
  var _defineProperty = __webpack_require__(6);
174
245
 
175
246
  var __rest = this && this.__rest || function (s, e) {
@@ -355,25 +426,25 @@ function generatePrecisionValues(numPrecisionValues) {
355
426
  exports.generatePrecisionValues = generatePrecisionValues;
356
427
 
357
428
  /***/ }),
358
- /* 8 */
429
+ /* 9 */
359
430
  /***/ (function(module, exports) {
360
431
 
361
432
  module.exports = require("@splunk/visualizations-shared/Message");
362
433
 
363
434
  /***/ }),
364
- /* 9 */
435
+ /* 10 */
365
436
  /***/ (function(module, exports) {
366
437
 
367
438
  module.exports = require("@babel/runtime/helpers/classCallCheck");
368
439
 
369
440
  /***/ }),
370
- /* 10 */
441
+ /* 11 */
371
442
  /***/ (function(module, exports) {
372
443
 
373
444
  module.exports = require("@splunk/visualizations-shared/colorUtils");
374
445
 
375
446
  /***/ }),
376
- /* 11 */
447
+ /* 12 */
377
448
  /***/ (function(module, exports, __webpack_require__) {
378
449
 
379
450
  "use strict";
@@ -387,11 +458,11 @@ var React = __webpack_require__(1);
387
458
 
388
459
  var styled_components_1 = __webpack_require__(4);
389
460
 
390
- var SizeAwareWrapper_1 = __webpack_require__(18);
461
+ var SizeAwareWrapper_1 = __webpack_require__(17);
391
462
 
392
463
  var style_1 = __webpack_require__(13);
393
464
 
394
- var colorUtils_1 = __webpack_require__(10);
465
+ var colorUtils_1 = __webpack_require__(11);
395
466
 
396
467
  var Item = styled_components_1.default.div.attrs(function (_ref) {
397
468
  var width = _ref.width;
@@ -467,37 +538,6 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
467
538
 
468
539
  exports.default = withFixedSizeContainer;
469
540
 
470
- /***/ }),
471
- /* 12 */
472
- /***/ (function(module, exports, __webpack_require__) {
473
-
474
- "use strict";
475
-
476
-
477
- Object.defineProperty(exports, "__esModule", {
478
- value: true
479
- });
480
- exports.extendStaticWrapperProps = void 0;
481
- /**
482
- * @method extendStaticWrapperProps
483
- * @param {Object} props
484
- * @param {DashboardVizType} props.Wrapper
485
- * @param {DashboardVizType} props.Visualization
486
- */
487
-
488
- var extendStaticWrapperProps = function extendStaticWrapperProps(_ref) {
489
- var Wrapper = _ref.Wrapper,
490
- Visualization = _ref.Visualization;
491
- var extendProperties = ['propTypes', 'defaultProps', 'config'];
492
- extendProperties.forEach(function (prop) {
493
- if (Visualization[prop]) {
494
- Wrapper[prop] = Visualization[prop];
495
- }
496
- });
497
- };
498
-
499
- exports.extendStaticWrapperProps = extendStaticWrapperProps;
500
-
501
541
  /***/ }),
502
542
  /* 13 */
503
543
  /***/ (function(module, exports) {
@@ -512,19 +552,19 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
512
552
 
513
553
  /***/ }),
514
554
  /* 15 */,
515
- /* 16 */,
516
- /* 17 */
555
+ /* 16 */
517
556
  /***/ (function(module, exports) {
518
557
 
519
558
  module.exports = require("@babel/runtime/helpers/createClass");
520
559
 
521
560
  /***/ }),
522
- /* 18 */
561
+ /* 17 */
523
562
  /***/ (function(module, exports) {
524
563
 
525
564
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
526
565
 
527
566
  /***/ }),
567
+ /* 18 */,
528
568
  /* 19 */
529
569
  /***/ (function(module, exports) {
530
570
 
@@ -534,10 +574,22 @@ module.exports = require("@splunk/themes/variables");
534
574
  /* 20 */
535
575
  /***/ (function(module, exports) {
536
576
 
537
- module.exports = require("@splunk/themes/pick");
577
+ module.exports = require("@splunk/visualizations-shared/numberUtils");
538
578
 
539
579
  /***/ }),
540
580
  /* 21 */
581
+ /***/ (function(module, exports) {
582
+
583
+ module.exports = require("@splunk/themes/pick");
584
+
585
+ /***/ }),
586
+ /* 22 */
587
+ /***/ (function(module, exports) {
588
+
589
+ module.exports = require("@babel/runtime/helpers/typeof");
590
+
591
+ /***/ }),
592
+ /* 23 */
541
593
  /***/ (function(module, exports, __webpack_require__) {
542
594
 
543
595
  "use strict";
@@ -554,7 +606,7 @@ var T = __webpack_require__(0);
554
606
 
555
607
  var lodash_1 = __webpack_require__(2);
556
608
 
557
- var DataSource_1 = __webpack_require__(31);
609
+ var DataSource_1 = __webpack_require__(33);
558
610
 
559
611
  exports.SortParamsPropTypes = T.shape({
560
612
  currentSortKey: T.string,
@@ -607,7 +659,7 @@ var getSortingParams = function getSortingParams(_ref) {
607
659
  exports.getSortingParams = getSortingParams;
608
660
 
609
661
  /***/ }),
610
- /* 22 */
662
+ /* 24 */
611
663
  /***/ (function(module, exports, __webpack_require__) {
612
664
 
613
665
  "use strict";
@@ -671,7 +723,7 @@ var getPaginationParams = function getPaginationParams(_ref) {
671
723
  exports.getPaginationParams = getPaginationParams;
672
724
 
673
725
  /***/ }),
674
- /* 23 */
726
+ /* 25 */
675
727
  /***/ (function(module, exports, __webpack_require__) {
676
728
 
677
729
  "use strict";
@@ -690,9 +742,9 @@ var lodash_1 = __webpack_require__(2);
690
742
 
691
743
  var i18n_1 = __webpack_require__(3);
692
744
 
693
- var Message_1 = __webpack_require__(8);
745
+ var Message_1 = __webpack_require__(9);
694
746
 
695
- var FixedSizeContainer_1 = __webpack_require__(11);
747
+ var FixedSizeContainer_1 = __webpack_require__(12);
696
748
  /**
697
749
  * @method shouldShowIconPlaceholder
698
750
  * @param {object} dataSources
@@ -758,7 +810,7 @@ IconPlaceholder.defaultProps = {
758
810
  exports.default = FixedSizeContainer_1.default(IconPlaceholder);
759
811
 
760
812
  /***/ }),
761
- /* 24 */
813
+ /* 26 */
762
814
  /***/ (function(module, exports, __webpack_require__) {
763
815
 
764
816
  "use strict";
@@ -781,10 +833,12 @@ var VizCategory;
781
833
  VizCategory["SHAPES"] = "Shapes";
782
834
  VizCategory["MISC"] = "misc";
783
835
  VizCategory["FLOW"] = "Flow";
836
+ VizCategory["CORRELATION"] = "Correlation";
837
+ VizCategory["SPATIAL"] = "Spatial";
784
838
  })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
785
839
 
786
840
  /***/ }),
787
- /* 25 */
841
+ /* 27 */
788
842
  /***/ (function(module, exports, __webpack_require__) {
789
843
 
790
844
  "use strict";
@@ -798,31 +852,33 @@ var React = __webpack_require__(1);
798
852
 
799
853
  var lodash_1 = __webpack_require__(2);
800
854
 
801
- var getSettingsFromThemedProps_1 = __webpack_require__(26);
802
-
803
- var Options_1 = __webpack_require__(27);
855
+ var getSettingsFromThemedProps_1 = __webpack_require__(28);
804
856
 
805
- var SanitizeProps_1 = __webpack_require__(28);
857
+ var Options_1 = __webpack_require__(29);
806
858
 
807
- var SplunkVisualization_1 = __webpack_require__(29);
859
+ var SanitizeProps_1 = __webpack_require__(30);
808
860
 
809
861
  var styled_components_1 = __webpack_require__(4);
810
862
 
863
+ var SplunkVisualization_1 = __webpack_require__(31);
864
+
811
865
  var VizBehavior_1 = __webpack_require__(5);
812
866
 
813
- var getSorting_1 = __webpack_require__(21);
867
+ var getSorting_1 = __webpack_require__(23);
814
868
 
815
- var getPagination_1 = __webpack_require__(22);
869
+ var getPagination_1 = __webpack_require__(24);
816
870
 
817
- var useDeepMemo_1 = __webpack_require__(32);
871
+ var useDeepMemo_1 = __webpack_require__(34);
818
872
 
819
- var JSONSchemaUtils_1 = __webpack_require__(33);
873
+ var JSONSchemaUtils_1 = __webpack_require__(35);
820
874
 
821
- var MissingPropsMessage_1 = __webpack_require__(34);
875
+ var MissingPropsMessage_1 = __webpack_require__(36);
822
876
 
823
- var withEditModeCover_1 = __webpack_require__(35);
877
+ var withEditModeCover_1 = __webpack_require__(37);
824
878
 
825
- var withPlaceholder_1 = __webpack_require__(36);
879
+ var withPlaceholder_1 = __webpack_require__(38);
880
+
881
+ var hocUtils_1 = __webpack_require__(7);
826
882
  /**
827
883
  * hoc that wraps a pure react visualization in a Dashboard visualization
828
884
  * @param {DashboardVizOpts} opts
@@ -875,7 +931,7 @@ var withDashboardViz = function withDashboardViz(opts) {
875
931
  try {
876
932
  return Options_1.Options.evaluate({
877
933
  context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
878
- options: lodash_1.defaultsDeep({}, options, defaultOptions)
934
+ options: hocUtils_1.deepMergeWithArrayOverrides({}, options, defaultOptions)
879
935
  }, dataSources, themeFunc);
880
936
  } catch (e) {
881
937
  console.error("unexpected error evaluating options: + ".concat(e.message));
@@ -886,7 +942,7 @@ var withDashboardViz = function withDashboardViz(opts) {
886
942
 
887
943
  React.useEffect(function () {
888
944
  onComputedProps(evaluatedOptions);
889
- }); //present warning message if any required props are missing
945
+ }); // present warning message if any required props are missing
890
946
 
891
947
  var _vizConfig$requiredPr = vizConfig.requiredProps,
892
948
  requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
@@ -909,7 +965,7 @@ var withDashboardViz = function withDashboardViz(opts) {
909
965
  if (hasEventHandlers && mode === 'view' && vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.EVENTS) > -1) {
910
966
  var supportedEvents = vizConfig.events;
911
967
  Object.keys(supportedEvents).forEach(function (eventName) {
912
- var eventCallbackPropName = lodash_1.camelCase('on.' + eventName);
968
+ var eventCallbackPropName = lodash_1.camelCase("on.".concat(eventName));
913
969
  eventCallbackProps[eventCallbackPropName] = null; // todo: refactor single value and single value icon to send payload from viz
914
970
  // then remove these lines
915
971
 
@@ -1004,31 +1060,31 @@ var withDashboardViz = function withDashboardViz(opts) {
1004
1060
  exports.default = withDashboardViz;
1005
1061
 
1006
1062
  /***/ }),
1007
- /* 26 */
1063
+ /* 28 */
1008
1064
  /***/ (function(module, exports) {
1009
1065
 
1010
1066
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1011
1067
 
1012
1068
  /***/ }),
1013
- /* 27 */
1069
+ /* 29 */
1014
1070
  /***/ (function(module, exports) {
1015
1071
 
1016
1072
  module.exports = require("@splunk/visualization-encoding/Options");
1017
1073
 
1018
1074
  /***/ }),
1019
- /* 28 */
1075
+ /* 30 */
1020
1076
  /***/ (function(module, exports) {
1021
1077
 
1022
1078
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1023
1079
 
1024
1080
  /***/ }),
1025
- /* 29 */
1081
+ /* 31 */
1026
1082
  /***/ (function(module, exports, __webpack_require__) {
1027
1083
 
1028
1084
  "use strict";
1029
1085
 
1030
1086
 
1031
- var _classCallCheck = __webpack_require__(9);
1087
+ var _classCallCheck = __webpack_require__(10);
1032
1088
 
1033
1089
  Object.defineProperty(exports, "__esModule", {
1034
1090
  value: true
@@ -1040,7 +1096,7 @@ var T = __webpack_require__(0);
1040
1096
 
1041
1097
  var lodash_1 = __webpack_require__(2);
1042
1098
 
1043
- var VizActionHandler_1 = __webpack_require__(30); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1099
+ var VizActionHandler_1 = __webpack_require__(32); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1044
1100
 
1045
1101
 
1046
1102
  exports.INITIAL_WIDTH = 250;
@@ -1173,15 +1229,15 @@ SplunkVisualization.defaultProps = {
1173
1229
  exports.default = SplunkVisualization;
1174
1230
 
1175
1231
  /***/ }),
1176
- /* 30 */
1232
+ /* 32 */
1177
1233
  /***/ (function(module, exports, __webpack_require__) {
1178
1234
 
1179
1235
  "use strict";
1180
1236
 
1181
1237
 
1182
- var _classCallCheck = __webpack_require__(9);
1238
+ var _classCallCheck = __webpack_require__(10);
1183
1239
 
1184
- var _createClass = __webpack_require__(17);
1240
+ var _createClass = __webpack_require__(16);
1185
1241
 
1186
1242
  Object.defineProperty(exports, "__esModule", {
1187
1243
  value: true
@@ -1210,7 +1266,7 @@ var DefaultVizActionHandler = /*#__PURE__*/function () {
1210
1266
  exports.DefaultVizActionHandler = DefaultVizActionHandler;
1211
1267
 
1212
1268
  /***/ }),
1213
- /* 31 */
1269
+ /* 33 */
1214
1270
  /***/ (function(module, exports, __webpack_require__) {
1215
1271
 
1216
1272
  "use strict";
@@ -1223,7 +1279,7 @@ exports.validSortDirs = void 0;
1223
1279
  exports.validSortDirs = ['asc', 'desc', 'none'];
1224
1280
 
1225
1281
  /***/ }),
1226
- /* 32 */
1282
+ /* 34 */
1227
1283
  /***/ (function(module, exports, __webpack_require__) {
1228
1284
 
1229
1285
  "use strict";
@@ -1268,7 +1324,7 @@ var useDeepMemo = function useDeepMemo(fn, dependencies) {
1268
1324
  exports.useDeepMemo = useDeepMemo;
1269
1325
 
1270
1326
  /***/ }),
1271
- /* 33 */
1327
+ /* 35 */
1272
1328
  /***/ (function(module, exports, __webpack_require__) {
1273
1329
 
1274
1330
  "use strict";
@@ -1301,7 +1357,7 @@ var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
1301
1357
  exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
1302
1358
 
1303
1359
  /***/ }),
1304
- /* 34 */
1360
+ /* 36 */
1305
1361
  /***/ (function(module, exports, __webpack_require__) {
1306
1362
 
1307
1363
  "use strict";
@@ -1318,9 +1374,9 @@ var T = __webpack_require__(0);
1318
1374
 
1319
1375
  var i18n_1 = __webpack_require__(3);
1320
1376
 
1321
- var Message_1 = __webpack_require__(8);
1377
+ var Message_1 = __webpack_require__(9);
1322
1378
 
1323
- var FixedSizeContainer_1 = __webpack_require__(11);
1379
+ var FixedSizeContainer_1 = __webpack_require__(12);
1324
1380
  /**
1325
1381
  * @method isMissing
1326
1382
  * @param {any} v
@@ -1380,7 +1436,7 @@ exports.MissingPropsMessage.defaultProps = {
1380
1436
  exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1381
1437
 
1382
1438
  /***/ }),
1383
- /* 35 */
1439
+ /* 37 */
1384
1440
  /***/ (function(module, exports, __webpack_require__) {
1385
1441
 
1386
1442
  "use strict";
@@ -1394,7 +1450,7 @@ var React = __webpack_require__(1);
1394
1450
 
1395
1451
  var styled_components_1 = __webpack_require__(4);
1396
1452
 
1397
- var hocUtils_1 = __webpack_require__(12);
1453
+ var hocUtils_1 = __webpack_require__(7);
1398
1454
 
1399
1455
  var Cover = styled_components_1.default.div.withConfig({
1400
1456
  displayName: "withEditModeCover__Cover",
@@ -1429,7 +1485,7 @@ var withEditModeCover = function withEditModeCover(Visualization) {
1429
1485
  exports.default = withEditModeCover;
1430
1486
 
1431
1487
  /***/ }),
1432
- /* 36 */
1488
+ /* 38 */
1433
1489
  /***/ (function(module, exports, __webpack_require__) {
1434
1490
 
1435
1491
  "use strict";
@@ -1441,13 +1497,13 @@ Object.defineProperty(exports, "__esModule", {
1441
1497
 
1442
1498
  var React = __webpack_require__(1);
1443
1499
 
1444
- var colorUtils_1 = __webpack_require__(10);
1500
+ var colorUtils_1 = __webpack_require__(11);
1445
1501
 
1446
- var IconPlaceholder_1 = __webpack_require__(23);
1502
+ var IconPlaceholder_1 = __webpack_require__(25);
1447
1503
 
1448
1504
  var VizBehavior_1 = __webpack_require__(5);
1449
1505
 
1450
- var hocUtils_1 = __webpack_require__(12);
1506
+ var hocUtils_1 = __webpack_require__(7);
1451
1507
 
1452
1508
  var withPlaceholder = function withPlaceholder(Visualization) {
1453
1509
  var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
@@ -1488,35 +1544,277 @@ var withPlaceholder = function withPlaceholder(Visualization) {
1488
1544
  exports.default = withPlaceholder;
1489
1545
 
1490
1546
  /***/ }),
1491
- /* 37 */
1547
+ /* 39 */
1492
1548
  /***/ (function(module, exports) {
1493
1549
 
1494
- module.exports = require("@splunk/visualizations-shared/numberUtils");
1550
+ module.exports = require("@babel/runtime/helpers/toConsumableArray");
1495
1551
 
1496
1552
  /***/ }),
1497
- /* 38 */,
1498
- /* 39 */
1553
+ /* 40 */,
1554
+ /* 41 */
1499
1555
  /***/ (function(module, exports) {
1500
1556
 
1501
- module.exports = require("@splunk/visualization-icons");
1557
+ module.exports = require("@splunk/visualization-color-palettes");
1502
1558
 
1503
1559
  /***/ }),
1504
- /* 40 */
1560
+ /* 42 */
1505
1561
  /***/ (function(module, exports) {
1506
1562
 
1507
- module.exports = require("@babel/runtime/helpers/toConsumableArray");
1563
+ module.exports = require("@splunk/visualization-icons");
1508
1564
 
1509
1565
  /***/ }),
1510
- /* 41 */
1511
- /***/ (function(module, exports) {
1566
+ /* 43 */,
1567
+ /* 44 */
1568
+ /***/ (function(module, exports, __webpack_require__) {
1512
1569
 
1513
- module.exports = require("@splunk/visualization-color-palettes");
1570
+ "use strict";
1571
+
1572
+
1573
+ Object.defineProperty(exports, "__esModule", {
1574
+ value: true
1575
+ });
1576
+
1577
+ var i18n_1 = __webpack_require__(3);
1578
+
1579
+ var background = function background(_ref) {
1580
+ var label = _ref.label,
1581
+ themes = _ref.themes,
1582
+ labelPosition = _ref.labelPosition;
1583
+ return [{
1584
+ label: i18n_1._(label || 'Background'),
1585
+ option: 'backgroundColor',
1586
+ editor: 'editor.color',
1587
+ editorProps: {
1588
+ labelPosition: labelPosition || 'top',
1589
+ themes: themes
1590
+ }
1591
+ }];
1592
+ };
1593
+
1594
+ exports.default = background;
1595
+
1596
+ /***/ }),
1597
+ /* 45 */
1598
+ /***/ (function(module, exports, __webpack_require__) {
1599
+
1600
+ "use strict";
1601
+
1602
+
1603
+ var _toConsumableArray = __webpack_require__(39);
1604
+
1605
+ var __rest = this && this.__rest || function (s, e) {
1606
+ var t = {};
1607
+
1608
+ for (var p in s) {
1609
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
1610
+ }
1611
+
1612
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1613
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
1614
+ }
1615
+ return t;
1616
+ };
1617
+
1618
+ Object.defineProperty(exports, "__esModule", {
1619
+ value: true
1620
+ });
1621
+ exports.constructFieldsAndColumns = exports.toArrayForSeries = exports.isMultiSeriesData = exports.convertOverlayFields = exports.convertY2AxisOptions = exports.mapToValues = exports.truncateData = exports.getAnnotations = void 0;
1622
+
1623
+ var lodash_1 = __webpack_require__(2);
1624
+ /**
1625
+ * Get formatted annotations
1626
+ * @method getAnnotations
1627
+ * @param {Object} options
1628
+ * @param {Array} options.annotationX
1629
+ * @param {Array} options.annotationColor
1630
+ * @param {Array} options.annotationLabel
1631
+ * @returns {Array}
1632
+ */
1633
+
1634
+
1635
+ var getAnnotations = function getAnnotations(_ref) {
1636
+ var annotationX = _ref.annotationX,
1637
+ annotationColor = _ref.annotationColor,
1638
+ annotationLabel = _ref.annotationLabel;
1639
+ return annotationX && annotationX.length ? annotationX.map(function (timestamp, i) {
1640
+ return {
1641
+ color: annotationColor && annotationColor[i],
1642
+ label: annotationLabel && annotationLabel[i],
1643
+ time: timestamp
1644
+ };
1645
+ }) : [];
1646
+ };
1647
+
1648
+ exports.getAnnotations = getAnnotations;
1649
+ /**
1650
+ * Truncate the result set to given limit
1651
+ * @method truncateData
1652
+ * @param {Object} dataSet - dataSources.primary.data
1653
+ * @param {Number|String} truncationLimit - options['chart.resultTruncationLimit']
1654
+ * @returns {Object}
1655
+ */
1656
+
1657
+ var truncateData = function truncateData(dataSet, truncationLimit) {
1658
+ if (!dataSet) {
1659
+ return null;
1660
+ }
1661
+
1662
+ var limit = parseInt(truncationLimit, 10);
1663
+
1664
+ if (!limit || limit <= 0) {
1665
+ return dataSet;
1666
+ }
1667
+
1668
+ var truncatedData = Object.assign({}, dataSet);
1669
+ truncatedData.columns = truncatedData.columns.map(function (columnData) {
1670
+ return columnData.slice(0, limit);
1671
+ });
1672
+ return truncatedData;
1673
+ };
1674
+
1675
+ exports.truncateData = truncateData;
1676
+ /**
1677
+ * Helper method to update the option values into the values that SC accepts
1678
+ * @method mapToValues
1679
+ * @param {Object} options
1680
+ * @returns {Object}
1681
+ */
1682
+
1683
+ var mapToValues = function mapToValues(optionValuesSCMapping) {
1684
+ return function (options) {
1685
+ var convertedOptions = Object.assign({}, options);
1686
+ Object.keys(optionValuesSCMapping).forEach(function (key) {
1687
+ if (lodash_1.has(options, key)) {
1688
+ var updatedValue = optionValuesSCMapping[key][options[key]];
1689
+
1690
+ if (!lodash_1.isUndefined(updatedValue)) {
1691
+ convertedOptions[key] = updatedValue;
1692
+ }
1693
+ }
1694
+ });
1695
+ return convertedOptions;
1696
+ };
1697
+ };
1698
+
1699
+ exports.mapToValues = mapToValues;
1700
+ /**
1701
+ * Helper method to process options related to y2Fields
1702
+ * @method convertY2AxisOptions
1703
+ * @param {Object} originalOptions
1704
+ * @returns {Object}
1705
+ */
1706
+
1707
+ var convertY2AxisOptions = function convertY2AxisOptions(_a) {
1708
+ var y2Fields = _a.y2Fields,
1709
+ originalOptions = __rest(_a, ["y2Fields"]);
1710
+
1711
+ var convertedOptions = Object.assign({}, originalOptions);
1712
+
1713
+ if (y2Fields) {
1714
+ convertedOptions['axisY2.enabled'] = true;
1715
+ convertedOptions['axisY2.fields'] = lodash_1.isArray(y2Fields) ? y2Fields.filter(function (name) {
1716
+ return name;
1717
+ }).join(',') : y2Fields;
1718
+ }
1719
+
1720
+ return convertedOptions;
1721
+ };
1722
+
1723
+ exports.convertY2AxisOptions = convertY2AxisOptions;
1724
+ /**
1725
+ * Helper method to format value for overlayFields
1726
+ * @method convertOverlayFields
1727
+ * @param {Object} originalOptions
1728
+ * @returns {Object}
1729
+ */
1730
+
1731
+ var convertOverlayFields = function convertOverlayFields(originalOptions) {
1732
+ var convertedOptions = Object.assign({}, originalOptions);
1733
+ var overlayFields = originalOptions.overlayFields;
1734
+
1735
+ if (overlayFields) {
1736
+ convertedOptions.overlayFields = Array.isArray(overlayFields) ? overlayFields.filter(function (field) {
1737
+ return field;
1738
+ }).map(function (field) {
1739
+ return field.trim();
1740
+ }).join(',') : overlayFields;
1741
+ }
1742
+
1743
+ return convertedOptions;
1744
+ };
1745
+
1746
+ exports.convertOverlayFields = convertOverlayFields;
1747
+ /**
1748
+ * checks whether data is multi series data
1749
+ * @param {array} data array
1750
+ * @return {Boolean}
1751
+ */
1752
+
1753
+ var isMultiSeriesData = function isMultiSeriesData(data) {
1754
+ return Array.isArray(data) && Array.isArray(data[0]);
1755
+ };
1756
+
1757
+ exports.isMultiSeriesData = isMultiSeriesData;
1758
+ /**
1759
+ * checks whether data is multi series data and returns value as array
1760
+ * @param {array} data array
1761
+ * @param {*} value to return as array
1762
+ * @return {array}
1763
+ */
1764
+
1765
+ var toArrayForSeries = function toArrayForSeries(data, value) {
1766
+ return exports.isMultiSeriesData(data) ? value : [value];
1767
+ };
1768
+
1769
+ exports.toArrayForSeries = toArrayForSeries;
1770
+
1771
+ var constructFieldsAndColumns = function constructFieldsAndColumns(_ref2) {
1772
+ var _ref2$x = _ref2.x,
1773
+ x = _ref2$x === void 0 ? [] : _ref2$x,
1774
+ _ref2$y = _ref2.y,
1775
+ y = _ref2$y === void 0 ? [] : _ref2$y,
1776
+ xField = _ref2.xField,
1777
+ yFields = _ref2.yFields,
1778
+ y2 = _ref2.y2,
1779
+ y2Fields = _ref2.y2Fields;
1780
+ var columns = [x.map(String)].concat(_toConsumableArray(exports.toArrayForSeries(y, y).map(function (series) {
1781
+ return series.map(String);
1782
+ })));
1783
+ var yFieldsArray = exports.toArrayForSeries(y, yFields);
1784
+ var fields = [{
1785
+ name: xField
1786
+ }].concat(_toConsumableArray(yFieldsArray.map(function (field) {
1787
+ return {
1788
+ name: field
1789
+ };
1790
+ }))); // splunk-charting requires y2 to be part of columns
1791
+ // when y & y2 options are configured with different (mutually exclusive) series
1792
+ // y2 columns need to be added to columns
1793
+
1794
+ if (y2Fields) {
1795
+ var y2FieldsArray = exports.toArrayForSeries(y2, y2Fields);
1796
+ var y2AsArray = exports.toArrayForSeries(y2, y2).map(function (series) {
1797
+ return series === null || series === void 0 ? void 0 : series.map(String);
1798
+ });
1799
+ y2FieldsArray.forEach(function (y2Field, index) {
1800
+ if (yFieldsArray.indexOf(y2Field) === -1 && y2AsArray[index]) {
1801
+ fields.push({
1802
+ name: y2Field
1803
+ });
1804
+ columns.push(y2AsArray[index]);
1805
+ }
1806
+ });
1807
+ }
1808
+
1809
+ return {
1810
+ columns: columns,
1811
+ fields: fields
1812
+ };
1813
+ };
1814
+
1815
+ exports.constructFieldsAndColumns = constructFieldsAndColumns;
1514
1816
 
1515
1817
  /***/ }),
1516
- /* 42 */,
1517
- /* 43 */,
1518
- /* 44 */,
1519
- /* 45 */,
1520
1818
  /* 46 */,
1521
1819
  /* 47 */,
1522
1820
  /* 48 */,
@@ -1547,13 +1845,15 @@ module.exports = require("@babel/runtime/helpers/slicedToArray");
1547
1845
  /* 68 */,
1548
1846
  /* 69 */,
1549
1847
  /* 70 */,
1550
- /* 71 */
1848
+ /* 71 */,
1849
+ /* 72 */,
1850
+ /* 73 */
1551
1851
  /***/ (function(module, exports) {
1552
1852
 
1553
1853
  module.exports = require("d3-scale");
1554
1854
 
1555
1855
  /***/ }),
1556
- /* 72 */
1856
+ /* 74 */
1557
1857
  /***/ (function(module, exports, __webpack_require__) {
1558
1858
 
1559
1859
  "use strict";
@@ -1566,7 +1866,7 @@ Object.defineProperty(exports, "__esModule", {
1566
1866
  });
1567
1867
  exports.truncateAxisLabelText = exports.isBubbleSelected = exports.isSomethingSelected = exports.getDataByRows = exports.createValueScale = exports.getScales = exports.getChartAreaDimensions = exports.getColorCategoryMapping = exports.GRAYSCALE_FILTER_ID = exports.BUBBLE_LABELS_TYPES = exports.COLOR_MODE_TYPES = exports.BUBBLE_SCALE_TYPES = exports.BUBBLE_ROW_SCALE_TYPES = exports.AXIS_ORIENTATION_TYPES = void 0;
1568
1868
 
1569
- var d3_scale_1 = __webpack_require__(71);
1869
+ var d3_scale_1 = __webpack_require__(73);
1570
1870
  /**
1571
1871
  * @enum {AXIS_ORIENTATION_TYPES}
1572
1872
  */
@@ -1761,7 +2061,7 @@ exports.createValueScale = createValueScale;
1761
2061
  * @param {Array<String>} category
1762
2062
  * @param {Function} colorCategoryMapping
1763
2063
  * @param {COLOR_MODE_TYPES} colorMode
1764
- * @param {String} bubbleColor
2064
+ * @param {(String|Array<String>)} bubbleColor
1765
2065
  * @param {Number} minBubbleColorIntensity
1766
2066
  * @param {Array<Number>} size
1767
2067
  * @param {(Array<String>\|Array<Number>)} x
@@ -1797,6 +2097,7 @@ var getDataByRows = function getDataByRows(_ref4) {
1797
2097
  var maxRadius = isBubbleSizeDynamic ? minBand / 2 * maxBubbleSize : maxBubbleRadius;
1798
2098
  var minArea = Math.PI * Math.pow(minRadius, 2);
1799
2099
  var maxArea = Math.PI * Math.pow(maxRadius, 2);
2100
+ var isBubbleColorAnArray = Array.isArray(bubbleColor);
1800
2101
  var globalSizeScale = exports.createValueScale(size);
1801
2102
 
1802
2103
  var getRadiusValue = function getRadiusValue(value, sizeScale) {
@@ -1808,13 +2109,14 @@ var getDataByRows = function getDataByRows(_ref4) {
1808
2109
  };
1809
2110
 
1810
2111
  var getOpacityValue = function getOpacityValue(value, sizeScale) {
1811
- return colorMode === COLOR_MODE_TYPES.CATEGORICAL ? 1 : sizeScale(Math.abs(value)) * (1 - minBubbleColorIntensity) + minBubbleColorIntensity;
2112
+ return colorMode === COLOR_MODE_TYPES.CATEGORICAL || isBubbleColorAnArray ? 1 : sizeScale(Math.abs(value)) * (1 - minBubbleColorIntensity) + minBubbleColorIntensity;
1812
2113
  };
1813
2114
 
1814
2115
  y.forEach(function (yValue, index) {
1815
2116
  var xValue = x[index];
1816
2117
  var sizeValue = size[index];
1817
- var categoryValue = category && category[index] ? category[index] : null; // if we find an invalid data point here (x, y or size is null or undefined), we ignore it
2118
+ var categoryValue = category && category[index] ? category[index] : null;
2119
+ var bubbleColorValue = colorMode === COLOR_MODE_TYPES.SEQUENTIAL && isBubbleColorAnArray ? bubbleColor[index] : getColorValue(categoryValue); // if we find an invalid data point here (x, y or size is null or undefined), we ignore it
1818
2120
 
1819
2121
  if (xValue == null || yValue == null || sizeValue == null) {
1820
2122
  return;
@@ -1836,7 +2138,7 @@ var getDataByRows = function getDataByRows(_ref4) {
1836
2138
  dataByRows[yValue].rowXValues.push(xValue);
1837
2139
  dataByRows[yValue].rowSizeValues.push(sizeValue);
1838
2140
  dataByRows[yValue].rowCategoryValues.push(categoryValue);
1839
- dataByRows[yValue].rowColorValues.push(getColorValue(categoryValue));
2141
+ dataByRows[yValue].rowColorValues.push(bubbleColorValue);
1840
2142
  dataByRows[yValue].rowFillOpacityValues.push(getOpacityValue(size[index], dataByRows[yValue].rowSizeScale));
1841
2143
  dataByRows[yValue].rowRadiusValues.push(getRadiusValue(size[index], dataByRows[yValue].rowSizeScale));
1842
2144
  }); // If we are using row scaling we need to recalculate opacity, radius and size scale
@@ -1959,17 +2261,15 @@ var truncateAxisLabelText = function truncateAxisLabelText(_ref9) {
1959
2261
  exports.truncateAxisLabelText = truncateAxisLabelText;
1960
2262
 
1961
2263
  /***/ }),
1962
- /* 73 */,
1963
- /* 74 */,
1964
2264
  /* 75 */,
1965
2265
  /* 76 */,
1966
- /* 77 */
2266
+ /* 77 */,
2267
+ /* 78 */
1967
2268
  /***/ (function(module, exports) {
1968
2269
 
1969
2270
  module.exports = require("lodash/find");
1970
2271
 
1971
2272
  /***/ }),
1972
- /* 78 */,
1973
2273
  /* 79 */,
1974
2274
  /* 80 */,
1975
2275
  /* 81 */,
@@ -1981,37 +2281,37 @@ module.exports = require("lodash/find");
1981
2281
  /* 87 */,
1982
2282
  /* 88 */,
1983
2283
  /* 89 */,
1984
- /* 90 */
2284
+ /* 90 */,
2285
+ /* 91 */,
2286
+ /* 92 */,
2287
+ /* 93 */,
2288
+ /* 94 */
1985
2289
  /***/ (function(module, exports) {
1986
2290
 
1987
2291
  module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
1988
2292
 
1989
2293
  /***/ }),
1990
- /* 91 */,
1991
- /* 92 */,
1992
- /* 93 */,
1993
- /* 94 */,
1994
2294
  /* 95 */,
1995
2295
  /* 96 */,
1996
2296
  /* 97 */,
1997
2297
  /* 98 */,
1998
2298
  /* 99 */,
1999
2299
  /* 100 */,
2000
- /* 101 */
2300
+ /* 101 */,
2301
+ /* 102 */,
2302
+ /* 103 */,
2303
+ /* 104 */
2001
2304
  /***/ (function(module, exports) {
2002
2305
 
2003
2306
  module.exports = require("lodash/findIndex");
2004
2307
 
2005
2308
  /***/ }),
2006
- /* 102 */
2309
+ /* 105 */
2007
2310
  /***/ (function(module, exports) {
2008
2311
 
2009
2312
  module.exports = require("lodash/flattenDeep");
2010
2313
 
2011
2314
  /***/ }),
2012
- /* 103 */,
2013
- /* 104 */,
2014
- /* 105 */,
2015
2315
  /* 106 */,
2016
2316
  /* 107 */,
2017
2317
  /* 108 */,
@@ -2031,16 +2331,16 @@ module.exports = require("lodash/flattenDeep");
2031
2331
  /* 122 */,
2032
2332
  /* 123 */,
2033
2333
  /* 124 */,
2034
- /* 125 */
2334
+ /* 125 */,
2335
+ /* 126 */,
2336
+ /* 127 */,
2337
+ /* 128 */,
2338
+ /* 129 */
2035
2339
  /***/ (function(module, exports) {
2036
2340
 
2037
2341
  module.exports = require("lodash/sortBy");
2038
2342
 
2039
2343
  /***/ }),
2040
- /* 126 */,
2041
- /* 127 */,
2042
- /* 128 */,
2043
- /* 129 */,
2044
2344
  /* 130 */,
2045
2345
  /* 131 */,
2046
2346
  /* 132 */,
@@ -2103,34 +2403,99 @@ module.exports = require("lodash/sortBy");
2103
2403
  /* 189 */,
2104
2404
  /* 190 */,
2105
2405
  /* 191 */,
2106
- /* 192 */
2406
+ /* 192 */,
2407
+ /* 193 */,
2408
+ /* 194 */,
2409
+ /* 195 */,
2410
+ /* 196 */,
2411
+ /* 197 */,
2412
+ /* 198 */,
2413
+ /* 199 */,
2414
+ /* 200 */,
2415
+ /* 201 */,
2416
+ /* 202 */,
2417
+ /* 203 */,
2418
+ /* 204 */,
2419
+ /* 205 */,
2420
+ /* 206 */
2107
2421
  /***/ (function(module, exports, __webpack_require__) {
2108
2422
 
2109
2423
  "use strict";
2110
2424
 
2111
2425
 
2426
+ var __rest = this && this.__rest || function (s, e) {
2427
+ var t = {};
2428
+
2429
+ for (var p in s) {
2430
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
2431
+ }
2432
+
2433
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2434
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
2435
+ }
2436
+ return t;
2437
+ };
2438
+
2112
2439
  Object.defineProperty(exports, "__esModule", {
2113
2440
  value: true
2114
2441
  });
2115
- exports.themes = exports.PurePunchcard = exports.config = void 0;
2442
+ exports.themes = exports.computeVizProps = exports.PurePunchcard = exports.config = void 0;
2443
+
2444
+ var lodash_1 = __webpack_require__(2);
2445
+
2446
+ var config_1 = __webpack_require__(207);
2447
+
2448
+ var withDashboardViz_1 = __webpack_require__(27);
2116
2449
 
2117
- var config_1 = __webpack_require__(193);
2450
+ var Punchcard_1 = __webpack_require__(208);
2118
2451
 
2119
- var withDashboardViz_1 = __webpack_require__(25);
2452
+ var punchcardUtils_1 = __webpack_require__(216);
2120
2453
 
2121
- var Punchcard_1 = __webpack_require__(194);
2454
+ var visualization_color_palettes_1 = __webpack_require__(41);
2122
2455
 
2123
2456
  exports.config = config_1.default;
2124
2457
  exports.PurePunchcard = Punchcard_1.default;
2458
+ var validOptions = Object.keys(exports.config.optionsSchema);
2459
+
2460
+ var computeVizProps = function computeVizProps(_a) {
2461
+ var onPointClick = _a.onPointClick,
2462
+ onLegendClick = _a.onLegendClick,
2463
+ x = _a.x,
2464
+ y = _a.y,
2465
+ category = _a.category,
2466
+ otherOptions = __rest(_a, ["onPointClick", "onLegendClick", "x", "y", "category"]);
2467
+
2468
+ var options = lodash_1.chain(otherOptions).pick(validOptions).thru(punchcardUtils_1.convertToPunchcardProperties).value();
2469
+
2470
+ if (options.seriesColors && typeof options.seriesColors === 'string') {
2471
+ try {
2472
+ options.seriesColors = JSON.parse(options.seriesColors);
2473
+ } catch (e) {
2474
+ options.seriesColors = visualization_color_palettes_1.VIZ_CATEGORICAL;
2475
+ }
2476
+ }
2477
+
2478
+ return Object.assign({
2479
+ onPointClick: onPointClick,
2480
+ onLegendClick: onLegendClick,
2481
+ x: x,
2482
+ y: y,
2483
+ // PurePunchcard accepts category as string array
2484
+ category: category && category.map(String)
2485
+ }, options);
2486
+ };
2487
+
2488
+ exports.computeVizProps = computeVizProps;
2125
2489
  var viz = withDashboardViz_1.default({
2126
2490
  ReactViz: Punchcard_1.default,
2491
+ computeVizProps: exports.computeVizProps,
2127
2492
  vizConfig: config_1.default
2128
2493
  });
2129
2494
  exports.themes = config_1.default.themes;
2130
2495
  exports.default = viz;
2131
2496
 
2132
2497
  /***/ }),
2133
- /* 193 */
2498
+ /* 207 */
2134
2499
  /***/ (function(module, exports, __webpack_require__) {
2135
2500
 
2136
2501
  "use strict";
@@ -2140,19 +2505,25 @@ Object.defineProperty(exports, "__esModule", {
2140
2505
  value: true
2141
2506
  });
2142
2507
 
2508
+ var i18n_1 = __webpack_require__(3);
2509
+
2143
2510
  var schemaUtils_1 = __webpack_require__(14);
2144
2511
 
2145
- var visualization_icons_1 = __webpack_require__(39);
2512
+ var visualization_icons_1 = __webpack_require__(42);
2513
+
2514
+ var visualization_color_palettes_1 = __webpack_require__(41);
2146
2515
 
2147
- var pick_1 = __webpack_require__(20);
2516
+ var pick_1 = __webpack_require__(21);
2148
2517
 
2149
2518
  var variables_1 = __webpack_require__(19);
2150
2519
 
2151
2520
  var VizBehavior_1 = __webpack_require__(5);
2152
2521
 
2153
- var VizCategory_1 = __webpack_require__(24);
2522
+ var VizCategory_1 = __webpack_require__(26);
2154
2523
 
2155
- var configUtils_1 = __webpack_require__(7);
2524
+ var configUtils_1 = __webpack_require__(8);
2525
+
2526
+ var BackgroundColor_1 = __webpack_require__(44);
2156
2527
 
2157
2528
  var dataContract = {
2158
2529
  requiredDataSources: [{
@@ -2176,7 +2547,11 @@ var size = {
2176
2547
  initialWidth: 300,
2177
2548
  initialHeight: 300
2178
2549
  };
2179
- var defaultContext = {};
2550
+ var defaultContext = {
2551
+ bubbleColorConfig: {
2552
+ colors: ['rgba(123,86,219,0.4)', 'rgba(123,86,219,1)']
2553
+ }
2554
+ };
2180
2555
  var optionsSchema = {
2181
2556
  x: {
2182
2557
  default: '> primary | seriesByIndex(0)',
@@ -2236,6 +2611,79 @@ var optionsSchema = {
2236
2611
  pattern: schemaUtils_1.COLOR_OR_TOKEN_PATTERN,
2237
2612
  type: 'string'
2238
2613
  },
2614
+ bubbleColor: {
2615
+ default: '> size | gradient(bubbleColorConfig)',
2616
+ description: 'Specify the coloring method used for the bubbles when the colorMode “dynamic” is specified. For example “> size | gradient(bubbleColorConfig)".',
2617
+ type: ['string', 'array']
2618
+ },
2619
+ bubbleLabelDisplay: {
2620
+ default: 'all',
2621
+ description: 'Specify whether all bubble labels, the max value bubble labels, or none of the bubble labels should be displayed.',
2622
+ pattern: schemaUtils_1.getPattern(['all', 'max', 'off']),
2623
+ type: 'string'
2624
+ },
2625
+ bubbleRadiusMax: {
2626
+ default: 15,
2627
+ description: 'Specify the max radius (in pixels) of the bubbles when showDynamicBubbleSize option is false. Greater than 0.',
2628
+ type: 'number'
2629
+ },
2630
+ bubbleRadiusMin: {
2631
+ default: 1,
2632
+ description: 'Specify the min radius (in pixels) of the bubbles when showDynamicBubbleSize option is false. Greater than 0.',
2633
+ type: 'number'
2634
+ },
2635
+ bubbleRowScale: {
2636
+ default: 'global',
2637
+ description: 'Specify how bubbles are scaled relative to other rows.',
2638
+ pattern: schemaUtils_1.getPattern(['global', 'row']),
2639
+ type: 'string'
2640
+ },
2641
+ bubbleSizeMax: {
2642
+ default: 1,
2643
+ description: 'Specify the max percentage (in decimal format) of space a bubble should take up within a cell when showDynamicBubbleSize option is true. The number specified must be between 0 and 1.',
2644
+ type: 'number'
2645
+ },
2646
+ bubbleSizeMin: {
2647
+ default: 0.25,
2648
+ description: 'Specify the min percentage (in decimal format) of space a bubble should take up within a cell when showDynamicBubbleSize option is true. The number specified must be between 0 and 1.',
2649
+ type: 'number'
2650
+ },
2651
+ bubbleSizeMethod: {
2652
+ default: 'area',
2653
+ description: 'Specify whether bubble area or diameter corresponds to the size value.',
2654
+ pattern: schemaUtils_1.getPattern(['radius', 'area']),
2655
+ type: 'string'
2656
+ },
2657
+ colorMode: {
2658
+ default: 'dynamic',
2659
+ description: 'Specify the coloring method used for the bubbles.',
2660
+ pattern: schemaUtils_1.getPattern(['categorical', 'dynamic']),
2661
+ type: 'string'
2662
+ },
2663
+ legendDisplay: {
2664
+ default: 'right',
2665
+ description: 'Specify the location of the legend on the panel.',
2666
+ pattern: schemaUtils_1.getPattern(['right', 'off']),
2667
+ type: 'string'
2668
+ },
2669
+ seriesColors: {
2670
+ default: visualization_color_palettes_1.VIZ_CATEGORICAL,
2671
+ description: 'Specify the colors used for a series. For example, "#FF0000", "#0000FF", "#008000".',
2672
+ type: 'array',
2673
+ items: {
2674
+ type: 'string'
2675
+ }
2676
+ },
2677
+ showDefaultSort: {
2678
+ default: false,
2679
+ description: 'Specify whether axes should be sorted based on order of time, digits and strings.',
2680
+ type: 'boolean'
2681
+ },
2682
+ showDynamicBubbleSize: {
2683
+ default: true,
2684
+ description: 'Specify whether the bubble size should be dynamic or fixed.',
2685
+ type: 'boolean'
2686
+ },
2239
2687
  showMaxValuePulsation: {
2240
2688
  default: true,
2241
2689
  description: 'Specify whether the max value bubble should pulsate.',
@@ -2253,7 +2701,116 @@ var themes = {
2253
2701
  })(props);
2254
2702
  }
2255
2703
  };
2256
- var editorConfig = [];
2704
+ var editorConfig = [{
2705
+ label: i18n_1._('General'),
2706
+ open: true,
2707
+ layout: [[{
2708
+ label: i18n_1._('Pulsate Max Value'),
2709
+ option: 'showMaxValuePulsation',
2710
+ editor: 'editor.toggle'
2711
+ }], [{
2712
+ label: i18n_1._('Show Bubble Labels'),
2713
+ option: 'bubbleLabelDisplay',
2714
+ editor: 'editor.radioBar',
2715
+ editorProps: {
2716
+ values: [{
2717
+ label: i18n_1._('All'),
2718
+ value: 'all'
2719
+ }, {
2720
+ label: i18n_1._('Max'),
2721
+ value: 'max'
2722
+ }, {
2723
+ label: i18n_1._('Off'),
2724
+ value: 'off'
2725
+ }]
2726
+ }
2727
+ }], [{
2728
+ label: i18n_1._('Bubble Row Scale'),
2729
+ option: 'bubbleRowScale',
2730
+ editor: 'editor.radioBar',
2731
+ editorProps: {
2732
+ values: [{
2733
+ label: i18n_1._('Global'),
2734
+ value: 'global'
2735
+ }, {
2736
+ label: i18n_1._('By Row'),
2737
+ value: 'row'
2738
+ }]
2739
+ }
2740
+ }], [{
2741
+ label: i18n_1._('Bubble Scale'),
2742
+ option: 'bubbleSizeMethod',
2743
+ editor: 'editor.radioBar',
2744
+ editorProps: {
2745
+ values: [{
2746
+ label: i18n_1._('Radius'),
2747
+ value: 'radius'
2748
+ }, {
2749
+ label: i18n_1._('Area'),
2750
+ value: 'area'
2751
+ }]
2752
+ }
2753
+ }]]
2754
+ }, {
2755
+ label: i18n_1._('Coloring'),
2756
+ open: true,
2757
+ layout: [[{
2758
+ label: i18n_1._('Color Mode'),
2759
+ option: 'colorMode',
2760
+ editor: 'editor.radioBar',
2761
+ editorProps: {
2762
+ values: [{
2763
+ label: i18n_1._('Dynamic'),
2764
+ value: 'dynamic'
2765
+ }, {
2766
+ label: i18n_1._('Categorical'),
2767
+ value: 'categorical'
2768
+ }]
2769
+ }
2770
+ }], [// This should be hidden in categorical color mode
2771
+ {
2772
+ label: i18n_1._('Color by Field'),
2773
+ editor: 'editor.columnSelector',
2774
+ option: 'bubbleColor',
2775
+ context: 'bubbleColorConfig',
2776
+ showEditor: function showEditor(_ref) {
2777
+ var options = _ref.options;
2778
+ return options.colorMode === 'dynamic' || options.colorMode === undefined;
2779
+ },
2780
+ editorProps: {
2781
+ dataSourceKey: 'primary',
2782
+ prepareValue: function prepareValue(definition) {
2783
+ var bubbleColor = definition.options.bubbleColor;
2784
+ return {
2785
+ context: {},
2786
+ options: {
2787
+ bubbleColor: "".concat(bubbleColor, " | gradient(bubbleColorConfig)")
2788
+ }
2789
+ };
2790
+ }
2791
+ }
2792
+ }], BackgroundColor_1.default({
2793
+ themes: themes,
2794
+ labelPosition: 'left'
2795
+ }), [{
2796
+ label: i18n_1._('Legend Display'),
2797
+ option: 'legendDisplay',
2798
+ editor: 'editor.select',
2799
+ editorProps: {
2800
+ values: [{
2801
+ label: i18n_1._('Right'),
2802
+ value: 'right'
2803
+ }, {
2804
+ label: i18n_1._('Off'),
2805
+ value: 'off'
2806
+ }]
2807
+ },
2808
+ showEditor: function showEditor(_ref2) {
2809
+ var options = _ref2.options;
2810
+ return options.colorMode === 'categorical';
2811
+ }
2812
+ }]]
2813
+ }];
2257
2814
  /**
2258
2815
  * visualization configuration
2259
2816
  */
@@ -2268,7 +2825,7 @@ var config = {
2268
2825
  * viz name
2269
2826
  */
2270
2827
  name: 'Punchcard',
2271
- category: VizCategory_1.VizCategory.DISTRIBUTIONS,
2828
+ category: VizCategory_1.VizCategory.COMPARISONS,
2272
2829
 
2273
2830
  /**
2274
2831
  * viz icon
@@ -2288,12 +2845,13 @@ var config = {
2288
2845
  }
2289
2846
  },
2290
2847
  supports: [VizBehavior_1.VizBehavior.DYNAMIC_OPTIONS, VizBehavior_1.VizBehavior.PLACEHOLDER, VizBehavior_1.VizBehavior.EVENTS],
2291
- themes: themes
2848
+ themes: themes,
2849
+ requiredProps: ['x', 'y', 'size']
2292
2850
  };
2293
2851
  exports.default = configUtils_1.enhanceConfig(config);
2294
2852
 
2295
2853
  /***/ }),
2296
- /* 194 */
2854
+ /* 208 */
2297
2855
  /***/ (function(module, exports, __webpack_require__) {
2298
2856
 
2299
2857
  "use strict";
@@ -2309,31 +2867,29 @@ Object.defineProperty(exports, "__esModule", {
2309
2867
 
2310
2868
  var React = __webpack_require__(1);
2311
2869
 
2312
- var react_1 = __webpack_require__(1);
2313
-
2314
2870
  var styled_components_1 = __webpack_require__(4);
2315
2871
 
2316
2872
  var T = __webpack_require__(0);
2317
2873
 
2318
2874
  var lodash_1 = __webpack_require__(2);
2319
2875
 
2320
- var SizeAwareWrapper_1 = __webpack_require__(18);
2876
+ var SizeAwareWrapper_1 = __webpack_require__(17);
2321
2877
 
2322
2878
  var style_1 = __webpack_require__(13);
2323
2879
 
2324
2880
  var visualization_color_palettes_1 = __webpack_require__(41);
2325
2881
 
2326
- var punchcardUtils_1 = __webpack_require__(72);
2882
+ var punchcardUtils_1 = __webpack_require__(74);
2327
2883
 
2328
- var sortUtils_1 = __webpack_require__(195);
2884
+ var sortUtils_1 = __webpack_require__(209);
2329
2885
 
2330
- var PunchcardAxis_1 = __webpack_require__(196);
2886
+ var PunchcardAxis_1 = __webpack_require__(210);
2331
2887
 
2332
- var PunchcardChartArea_1 = __webpack_require__(197);
2888
+ var PunchcardChartArea_1 = __webpack_require__(211);
2333
2889
 
2334
- var PunchcardLegend_1 = __webpack_require__(200);
2890
+ var PunchcardLegend_1 = __webpack_require__(214);
2335
2891
 
2336
- var PunchcardGridLines_1 = __webpack_require__(201);
2892
+ var PunchcardGridLines_1 = __webpack_require__(215);
2337
2893
 
2338
2894
  var Container = styled_components_1.default.div.withConfig({
2339
2895
  displayName: "Punchcard__Container",
@@ -2363,20 +2919,20 @@ var PunchcardSVG = styled_components_1.default.svg.withConfig({
2363
2919
  });
2364
2920
 
2365
2921
  var Punchcard = function Punchcard(props) {
2366
- var _react_1$useState = react_1.useState(null),
2367
- _react_1$useState2 = _slicedToArray(_react_1$useState, 2),
2368
- selectedX = _react_1$useState2[0],
2369
- setSelectedX = _react_1$useState2[1];
2922
+ var _React$useState = React.useState(null),
2923
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2924
+ selectedX = _React$useState2[0],
2925
+ setSelectedX = _React$useState2[1];
2370
2926
 
2371
- var _react_1$useState3 = react_1.useState(null),
2372
- _react_1$useState4 = _slicedToArray(_react_1$useState3, 2),
2373
- selectedY = _react_1$useState4[0],
2374
- setSelectedY = _react_1$useState4[1];
2927
+ var _React$useState3 = React.useState(null),
2928
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
2929
+ selectedY = _React$useState4[0],
2930
+ setSelectedY = _React$useState4[1];
2375
2931
 
2376
- var _react_1$useState5 = react_1.useState(null),
2377
- _react_1$useState6 = _slicedToArray(_react_1$useState5, 2),
2378
- selectedCategory = _react_1$useState6[0],
2379
- setSelectedCategory = _react_1$useState6[1];
2932
+ var _React$useState5 = React.useState(null),
2933
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
2934
+ selectedCategory = _React$useState6[0],
2935
+ setSelectedCategory = _React$useState6[1];
2380
2936
 
2381
2937
  var handleMouseLeave = function handleMouseLeave() {
2382
2938
  setSelectedX(null);
@@ -2438,8 +2994,12 @@ var Punchcard = function Punchcard(props) {
2438
2994
  onLegendClick = props.onLegendClick;
2439
2995
  var calculatedColorMode = category ? colorMode : punchcardUtils_1.COLOR_MODE_TYPES.SEQUENTIAL;
2440
2996
  var displayLegend = showLegend && calculatedColorMode === punchcardUtils_1.COLOR_MODE_TYPES.CATEGORICAL;
2441
- var uniqX = useDefaultSort ? sortUtils_1.sortAxis(lodash_1.uniq(x)) : lodash_1.uniq(x);
2442
- var uniqY = useDefaultSort ? sortUtils_1.sortAxis(lodash_1.uniq(y)) : lodash_1.uniq(y);
2997
+ var uniqX = useDefaultSort ? sortUtils_1.sortAxis(lodash_1.uniq(x.map(function (v) {
2998
+ return "".concat(v);
2999
+ }))) : lodash_1.uniq(x);
3000
+ var uniqY = useDefaultSort ? sortUtils_1.sortAxis(lodash_1.uniq(y.map(function (v) {
3001
+ return "".concat(v);
3002
+ }))) : lodash_1.uniq(y);
2443
3003
  var uniqCategory = lodash_1.uniq(category);
2444
3004
  var colorCategoryMapping = punchcardUtils_1.getColorCategoryMapping({
2445
3005
  category: uniqCategory,
@@ -2601,7 +3161,7 @@ var propTypes = {
2601
3161
  categoryField: T.string,
2602
3162
  colorMode: T.oneOf(Object.values(punchcardUtils_1.COLOR_MODE_TYPES)),
2603
3163
  seriesColors: T.arrayOf(T.string),
2604
- bubbleColor: T.string,
3164
+ bubbleColor: T.oneOfType([T.string, T.arrayOf(T.string)]),
2605
3165
  minBubbleColorIntensity: T.number,
2606
3166
  height: T.oneOfType([T.string, T.number]),
2607
3167
  isBubbleSizeDynamic: T.bool,
@@ -2612,11 +3172,14 @@ var propTypes = {
2612
3172
  useDefaultSort: T.bool,
2613
3173
  showMaxValuePulsation: T.bool,
2614
3174
  showLegend: T.bool,
2615
- size: T.arrayOf(T.number).isRequired,
2616
3175
  sizeField: T.string,
2617
3176
  width: T.oneOfType([T.string, T.number]),
2618
- x: T.arrayOf(T.oneOfType([T.string, T.number])).isRequired,
2619
- y: T.arrayOf(T.oneOfType([T.string, T.number])).isRequired,
3177
+ // hotfix: isRequired check is removed here for x, y and size props
3178
+ // to remove console warnings on early return of this component and
3179
+ // implemented in config file using requiredProps
3180
+ x: T.arrayOf(T.oneOfType([T.string, T.number])),
3181
+ y: T.arrayOf(T.oneOfType([T.string, T.number])),
3182
+ size: T.arrayOf(T.number),
2620
3183
  xField: T.string,
2621
3184
  yField: T.string,
2622
3185
  onPointClick: T.func,
@@ -2657,7 +3220,7 @@ Punchcard.defaultProps = defaultProps;
2657
3220
  exports.default = Punchcard;
2658
3221
 
2659
3222
  /***/ }),
2660
- /* 195 */
3223
+ /* 209 */
2661
3224
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2662
3225
 
2663
3226
  "use strict";
@@ -2667,13 +3230,13 @@ __webpack_require__.r(__webpack_exports__);
2667
3230
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortedByDTime", function() { return sortedByDTime; });
2668
3231
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortByDigitOrAlpha", function() { return sortByDigitOrAlpha; });
2669
3232
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortAxis", function() { return sortAxis; });
2670
- /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(101);
3233
+ /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(104);
2671
3234
  /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__);
2672
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
3235
+ /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78);
2673
3236
  /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
2674
- /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(125);
3237
+ /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(129);
2675
3238
  /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__);
2676
- /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(102);
3239
+ /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(105);
2677
3240
  /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__);
2678
3241
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
2679
3242
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
@@ -2941,7 +3504,7 @@ var sortAxis = function sortAxis(axis) {
2941
3504
  };
2942
3505
 
2943
3506
  /***/ }),
2944
- /* 196 */
3507
+ /* 210 */
2945
3508
  /***/ (function(module, exports, __webpack_require__) {
2946
3509
 
2947
3510
  "use strict";
@@ -2957,11 +3520,11 @@ var T = __webpack_require__(0);
2957
3520
 
2958
3521
  var styled_components_1 = __webpack_require__(4);
2959
3522
 
2960
- var pick_1 = __webpack_require__(20);
3523
+ var pick_1 = __webpack_require__(21);
2961
3524
 
2962
3525
  var variables_1 = __webpack_require__(19);
2963
3526
 
2964
- var punchcardUtils_1 = __webpack_require__(72);
3527
+ var punchcardUtils_1 = __webpack_require__(74);
2965
3528
 
2966
3529
  var AxisLabelText = styled_components_1.default.text.withConfig({
2967
3530
  displayName: "PunchcardAxis__AxisLabelText",
@@ -3039,13 +3602,13 @@ PunchcardAxis.defaultProps = defaultProps;
3039
3602
  exports.default = PunchcardAxis;
3040
3603
 
3041
3604
  /***/ }),
3042
- /* 197 */
3605
+ /* 211 */
3043
3606
  /***/ (function(module, exports, __webpack_require__) {
3044
3607
 
3045
3608
  "use strict";
3046
3609
 
3047
3610
 
3048
- var _toConsumableArray = __webpack_require__(40);
3611
+ var _toConsumableArray = __webpack_require__(39);
3049
3612
 
3050
3613
  var _slicedToArray = __webpack_require__(60);
3051
3614
 
@@ -3057,9 +3620,9 @@ var React = __webpack_require__(1);
3057
3620
 
3058
3621
  var T = __webpack_require__(0);
3059
3622
 
3060
- var punchcardUtils_1 = __webpack_require__(72);
3623
+ var punchcardUtils_1 = __webpack_require__(74);
3061
3624
 
3062
- var PunchcardRow_1 = __webpack_require__(198);
3625
+ var PunchcardRow_1 = __webpack_require__(212);
3063
3626
 
3064
3627
  var PunchcardChartArea = function PunchcardChartArea(props) {
3065
3628
  var showBubbleLabels = props.showBubbleLabels,
@@ -3153,7 +3716,7 @@ var propTypes = {
3153
3716
  category: T.arrayOf(T.string),
3154
3717
  colorCategoryMapping: T.func,
3155
3718
  colorMode: T.oneOf(Object.values(punchcardUtils_1.COLOR_MODE_TYPES)),
3156
- bubbleColor: T.string,
3719
+ bubbleColor: T.oneOfType([T.string, T.arrayOf(T.string)]),
3157
3720
  handleMouseEnter: T.func,
3158
3721
  handleMouseLeave: T.func,
3159
3722
  isBubbleSizeDynamic: T.bool,
@@ -3207,7 +3770,7 @@ PunchcardChartArea.defaultProps = defaultProps;
3207
3770
  exports.default = PunchcardChartArea;
3208
3771
 
3209
3772
  /***/ }),
3210
- /* 198 */
3773
+ /* 212 */
3211
3774
  /***/ (function(module, exports, __webpack_require__) {
3212
3775
 
3213
3776
  "use strict";
@@ -3223,9 +3786,9 @@ var T = __webpack_require__(0);
3223
3786
 
3224
3787
  var styled_components_1 = __webpack_require__(4);
3225
3788
 
3226
- var PunchcardBubble_1 = __webpack_require__(199);
3789
+ var PunchcardBubble_1 = __webpack_require__(213);
3227
3790
 
3228
- var punchcardUtils_1 = __webpack_require__(72);
3791
+ var punchcardUtils_1 = __webpack_require__(74);
3229
3792
 
3230
3793
  var PunchcardRow = function PunchcardRow(props) {
3231
3794
  var showBubbleLabels = props.showBubbleLabels,
@@ -3337,13 +3900,13 @@ PunchcardRow.defaultProps = defaultProps;
3337
3900
  exports.default = styled_components_1.withTheme(PunchcardRow);
3338
3901
 
3339
3902
  /***/ }),
3340
- /* 199 */
3903
+ /* 213 */
3341
3904
  /***/ (function(module, exports, __webpack_require__) {
3342
3905
 
3343
3906
  "use strict";
3344
3907
 
3345
3908
 
3346
- var _taggedTemplateLiteral = __webpack_require__(90);
3909
+ var _taggedTemplateLiteral = __webpack_require__(94);
3347
3910
 
3348
3911
  var _templateObject;
3349
3912
 
@@ -3357,13 +3920,13 @@ var T = __webpack_require__(0);
3357
3920
 
3358
3921
  var styled_components_1 = __webpack_require__(4);
3359
3922
 
3360
- var pick_1 = __webpack_require__(20);
3923
+ var pick_1 = __webpack_require__(21);
3361
3924
 
3362
3925
  var variables_1 = __webpack_require__(19);
3363
3926
 
3364
- var numberUtils_1 = __webpack_require__(37);
3927
+ var numberUtils_1 = __webpack_require__(20);
3365
3928
 
3366
- var punchcardUtils_1 = __webpack_require__(72);
3929
+ var punchcardUtils_1 = __webpack_require__(74);
3367
3930
 
3368
3931
  var BubbleCircle = styled_components_1.default.circle.withConfig({
3369
3932
  displayName: "PunchcardBubble__BubbleCircle",
@@ -3391,7 +3954,7 @@ var pulsateAnimation = function pulsateAnimation(r) {
3391
3954
  var PulsateBubble = styled_components_1.default(BubbleCircle).withConfig({
3392
3955
  displayName: "PunchcardBubble__PulsateBubble",
3393
3956
  componentId: "sc-1jmms9f-1"
3394
- })(["animation:", " 1.4s linear 0.4s infinite;"], function (props) {
3957
+ })(["animation:", " 2.4s linear 0.4s infinite;"], function (props) {
3395
3958
  return pulsateAnimation(props.r);
3396
3959
  });
3397
3960
  var BubbleGroup = styled_components_1.default.g.withConfig({
@@ -3519,7 +4082,7 @@ PunchcardBubble.defaultProps = defaultProps;
3519
4082
  exports.default = PunchcardBubble;
3520
4083
 
3521
4084
  /***/ }),
3522
- /* 200 */
4085
+ /* 214 */
3523
4086
  /***/ (function(module, exports, __webpack_require__) {
3524
4087
 
3525
4088
  "use strict";
@@ -3535,7 +4098,7 @@ var T = __webpack_require__(0);
3535
4098
 
3536
4099
  var styled_components_1 = __webpack_require__(4);
3537
4100
 
3538
- var pick_1 = __webpack_require__(20);
4101
+ var pick_1 = __webpack_require__(21);
3539
4102
 
3540
4103
  var variables_1 = __webpack_require__(19);
3541
4104
 
@@ -3636,7 +4199,7 @@ PunchcardLegend.defaultProps = defaultProps;
3636
4199
  exports.default = PunchcardLegend;
3637
4200
 
3638
4201
  /***/ }),
3639
- /* 201 */
4202
+ /* 215 */
3640
4203
  /***/ (function(module, exports, __webpack_require__) {
3641
4204
 
3642
4205
  "use strict";
@@ -3654,7 +4217,7 @@ var styled_components_1 = __webpack_require__(4);
3654
4217
 
3655
4218
  var lodash_1 = __webpack_require__(2);
3656
4219
 
3657
- var pick_1 = __webpack_require__(20);
4220
+ var pick_1 = __webpack_require__(21);
3658
4221
 
3659
4222
  var variables_1 = __webpack_require__(19); // was previously lineColor in themeRegistry
3660
4223
 
@@ -3720,6 +4283,75 @@ PunchcardGridLines.propTypes = propTypes;
3720
4283
  PunchcardGridLines.defaultProps = defaultProps;
3721
4284
  exports.default = PunchcardGridLines;
3722
4285
 
4286
+ /***/ }),
4287
+ /* 216 */
4288
+ /***/ (function(module, exports, __webpack_require__) {
4289
+
4290
+ "use strict";
4291
+
4292
+
4293
+ Object.defineProperty(exports, "__esModule", {
4294
+ value: true
4295
+ });
4296
+ exports.convertToPunchcardProperties = exports.mapToOldKey = exports.punchcardOptionValuesMapping = void 0;
4297
+
4298
+ var lodash_1 = __webpack_require__(2);
4299
+
4300
+ var chartingUtils_1 = __webpack_require__(45);
4301
+
4302
+ var punchcardOptionsMapping = {
4303
+ legendDisplay: 'showLegend',
4304
+ bubbleLabelDisplay: 'showBubbleLabels',
4305
+ showDefaultSort: 'useDefaultSort',
4306
+ bubbleSizeMethod: 'bubbleScale',
4307
+ showDynamicBubbleSize: 'isBubbleSizeDynamic',
4308
+ bubbleRadiusMax: 'maxBubbleRadius',
4309
+ bubbleRadiusMin: 'minBubbleRadius',
4310
+ bubbleSizeMax: 'maxBubbleSize',
4311
+ bubbleSizeMin: 'minBubbleSize'
4312
+ }; // key value mapping of what options (and their corresponding values) which
4313
+ // we expose in config.ts to property values PurePunchcard understands
4314
+
4315
+ exports.punchcardOptionValuesMapping = {
4316
+ showLegend: {
4317
+ right: true,
4318
+ off: false
4319
+ },
4320
+ showBubbleLabels: {
4321
+ off: 'none'
4322
+ },
4323
+ colorMode: {
4324
+ dynamic: 'sequential'
4325
+ }
4326
+ };
4327
+ /**
4328
+ * Helper method to update the option names which can be mapped to PurePunchcard options
4329
+ * @method mapToOldKey
4330
+ * @param {Object} options
4331
+ * @returns {Object}
4332
+ */
4333
+
4334
+ var mapToOldKey = function mapToOldKey(options) {
4335
+ return lodash_1.mapKeys(options, function (val, key) {
4336
+ return punchcardOptionsMapping[key] ? punchcardOptionsMapping[key] : key;
4337
+ });
4338
+ };
4339
+
4340
+ exports.mapToOldKey = mapToOldKey;
4341
+ /**
4342
+ * Chained helper for mapping the option properties (and values) we expose in config.ts into property values that PurePunchcard accepts
4343
+ * This is for options that has new key name and can not directly be mapped with PurePunchcard props
4344
+ * @method convertToPunchcardProperties
4345
+ * @param {Object} originalOptions
4346
+ * @returns {Object}
4347
+ */
4348
+
4349
+ var convertToPunchcardProperties = function convertToPunchcardProperties(originalOptions) {
4350
+ return lodash_1.chain(exports.mapToOldKey(originalOptions)).thru(chartingUtils_1.mapToValues(exports.punchcardOptionValuesMapping)).value();
4351
+ };
4352
+
4353
+ exports.convertToPunchcardProperties = convertToPunchcardProperties;
4354
+
3723
4355
  /***/ })
3724
4356
  /******/ ]);
3725
4357
  //# sourceMappingURL=Punchcard.js.map