@splunk/visualizations 25.5.0 → 25.6.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 (76) hide show
  1. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Dark.png +0 -0
  2. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_DarkPrisma.png +0 -0
  3. package/.loki/reference/chrome_docker_PureVisualizations_PureEvents_TimeControlsPopover_Light.png +0 -0
  4. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Background_Color_Light_Blue.png +0 -0
  5. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Basic_Events.png +0 -0
  6. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Event_Actions.png +0 -0
  7. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Actions.png +0 -0
  8. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary.png +0 -0
  9. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Field_Summary_Simulated_Instance.png +0 -0
  10. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Footer_Fields.png +0 -0
  11. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Value_Highlighting.png +0 -0
  12. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Height.png +0 -0
  13. package/.loki/reference/chrome_docker_Visualizations_Events_Events_Width_Percentage_50.png +0 -0
  14. package/Area.js +226 -143
  15. package/Area.js.map +1 -1
  16. package/Bar.js +226 -143
  17. package/Bar.js.map +1 -1
  18. package/Bubble.js +218 -135
  19. package/Bubble.js.map +1 -1
  20. package/ChoroplethSvg.js +217 -139
  21. package/ChoroplethSvg.js.map +1 -1
  22. package/Column.js +226 -143
  23. package/Column.js.map +1 -1
  24. package/Ellipse.js +188 -105
  25. package/Ellipse.js.map +1 -1
  26. package/Events.config.js +3 -0
  27. package/Events.config.js.map +1 -1
  28. package/Events.js +967 -267
  29. package/Events.js.map +1 -1
  30. package/FillerGauge.js +214 -126
  31. package/FillerGauge.js.map +1 -1
  32. package/Image.js +210 -125
  33. package/Image.js.map +1 -1
  34. package/Line.js +231 -143
  35. package/Line.js.map +1 -1
  36. package/LinkGraph.js +601 -524
  37. package/LinkGraph.js.map +1 -1
  38. package/Map.js +484 -406
  39. package/Map.js.map +1 -1
  40. package/Markdown.js +295 -210
  41. package/Markdown.js.map +1 -1
  42. package/MarkerGauge.js +388 -310
  43. package/MarkerGauge.js.map +1 -1
  44. package/ParallelCoordinates.js +469 -391
  45. package/ParallelCoordinates.js.map +1 -1
  46. package/Pie.js +428 -343
  47. package/Pie.js.map +1 -1
  48. package/Punchcard.js +480 -402
  49. package/Punchcard.js.map +1 -1
  50. package/Rectangle.js +437 -352
  51. package/Rectangle.js.map +1 -1
  52. package/Sankey.js +497 -419
  53. package/Sankey.js.map +1 -1
  54. package/Scatter.js +361 -276
  55. package/Scatter.js.map +1 -1
  56. package/SingleValue.js +386 -301
  57. package/SingleValue.js.map +1 -1
  58. package/SingleValueBasic.js +23 -23
  59. package/SingleValueBasic.js.map +1 -1
  60. package/SingleValueIcon.js +385 -300
  61. package/SingleValueIcon.js.map +1 -1
  62. package/SingleValueRadial.js +319 -234
  63. package/SingleValueRadial.js.map +1 -1
  64. package/Table.js +309 -231
  65. package/Table.js.map +1 -1
  66. package/common/EventsDoc.js +3 -3
  67. package/common/EventsDoc.js.map +1 -1
  68. package/common/GaugeMajorTicks.js +2 -2
  69. package/common/GaugeValueMarker.js +2 -2
  70. package/common/OptionsDoc.js +14 -14
  71. package/common/OptionsDoc.js.map +1 -1
  72. package/common/ThemesDoc.js +10 -10
  73. package/common/ThemesDoc.js.map +1 -1
  74. package/common/withDashboardViz.js +122 -42
  75. package/common/withDashboardViz.js.map +1 -1
  76. package/package.json +13 -11
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 = 425);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 433);
91
91
  /******/ })
92
92
  /************************************************************************/
93
93
  /******/ ({
@@ -113,7 +113,7 @@ module.exports = require("@splunk/visualizations-shared/Message");
113
113
 
114
114
  /***/ }),
115
115
 
116
- /***/ 100:
116
+ /***/ 102:
117
117
  /***/ (function(module, exports) {
118
118
 
119
119
  module.exports = require("lodash/find");
@@ -134,14 +134,14 @@ module.exports = require("@splunk/visualizations-shared/colorUtils");
134
134
 
135
135
  /***/ }),
136
136
 
137
- /***/ 121:
137
+ /***/ 127:
138
138
  /***/ (function(module, exports) {
139
139
 
140
140
  module.exports = require("lodash/findIndex");
141
141
 
142
142
  /***/ }),
143
143
 
144
- /***/ 122:
144
+ /***/ 128:
145
145
  /***/ (function(module, exports) {
146
146
 
147
147
  module.exports = require("lodash/flattenDeep");
@@ -162,7 +162,7 @@ var React = __webpack_require__(1);
162
162
 
163
163
  var styled_components_1 = __webpack_require__(4);
164
164
 
165
- var SizeAwareWrapper_1 = __webpack_require__(20);
165
+ var SizeAwareWrapper_1 = __webpack_require__(21);
166
166
 
167
167
  var style_1 = __webpack_require__(15);
168
168
 
@@ -223,7 +223,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
223
223
 
224
224
  return React.createElement(FixSizeItem, {
225
225
  "data-test": "fix-size-item",
226
- "data-splunk-visualization-version": "25.5.0 - 12c0447a7",
226
+ "data-splunk-visualization-version": "25.6.0 - f5eb3abf9",
227
227
  width: width,
228
228
  height: height,
229
229
  backgroundColor: backgroundColor
@@ -285,7 +285,7 @@ module.exports = require("@splunk/visualizations-shared/style");
285
285
 
286
286
  /***/ }),
287
287
 
288
- /***/ 153:
288
+ /***/ 159:
289
289
  /***/ (function(module, exports) {
290
290
 
291
291
  module.exports = require("lodash/sortBy");
@@ -300,6 +300,13 @@ module.exports = require("@splunk/visualizations-shared/schemaUtils");
300
300
  /***/ }),
301
301
 
302
302
  /***/ 17:
303
+ /***/ (function(module, exports) {
304
+
305
+ module.exports = require("@babel/runtime/helpers/slicedToArray");
306
+
307
+ /***/ }),
308
+
309
+ /***/ 18:
303
310
  /***/ (function(module, exports, __webpack_require__) {
304
311
 
305
312
  "use strict";
@@ -536,56 +543,77 @@ exports.insertLayout = insertLayout;
536
543
 
537
544
  /***/ }),
538
545
 
539
- /***/ 19:
546
+ /***/ 2:
540
547
  /***/ (function(module, exports) {
541
548
 
542
- module.exports = require("@babel/runtime/helpers/createClass");
549
+ module.exports = require("@splunk/ui-utils/i18n");
543
550
 
544
551
  /***/ }),
545
552
 
546
- /***/ 2:
553
+ /***/ 20:
547
554
  /***/ (function(module, exports) {
548
555
 
549
- module.exports = require("@splunk/ui-utils/i18n");
556
+ module.exports = require("@babel/runtime/helpers/createClass");
550
557
 
551
558
  /***/ }),
552
559
 
553
- /***/ 20:
560
+ /***/ 21:
554
561
  /***/ (function(module, exports) {
555
562
 
556
563
  module.exports = require("@splunk/visualizations-shared/SizeAwareWrapper");
557
564
 
558
565
  /***/ }),
559
566
 
560
- /***/ 21:
567
+ /***/ 22:
561
568
  /***/ (function(module, exports) {
562
569
 
563
570
  module.exports = require("@splunk/themes/pick");
564
571
 
565
572
  /***/ }),
566
573
 
567
- /***/ 23:
574
+ /***/ 24:
568
575
  /***/ (function(module, exports) {
569
576
 
570
577
  module.exports = require("@splunk/visualization-context/TimezoneContext");
571
578
 
572
579
  /***/ }),
573
580
 
574
- /***/ 25:
581
+ /***/ 26:
582
+ /***/ (function(module, exports) {
583
+
584
+ module.exports = require("@splunk/visualization-context/FeatureFlagContext");
585
+
586
+ /***/ }),
587
+
588
+ /***/ 27:
575
589
  /***/ (function(module, exports) {
576
590
 
577
591
  module.exports = require("@splunk/visualizations-shared/hocUtils");
578
592
 
579
593
  /***/ }),
580
594
 
581
- /***/ 26:
595
+ /***/ 28:
582
596
  /***/ (function(module, exports) {
583
597
 
584
598
  module.exports = require("@splunk/visualizations-shared/JSONSchemaUtils");
585
599
 
586
600
  /***/ }),
587
601
 
588
- /***/ 27:
602
+ /***/ 29:
603
+ /***/ (function(module, exports) {
604
+
605
+ module.exports = require("@splunk/visualizations-shared/numberUtils");
606
+
607
+ /***/ }),
608
+
609
+ /***/ 3:
610
+ /***/ (function(module, exports) {
611
+
612
+ module.exports = require("lodash");
613
+
614
+ /***/ }),
615
+
616
+ /***/ 30:
589
617
  /***/ (function(module, exports, __webpack_require__) {
590
618
 
591
619
  "use strict";
@@ -677,7 +705,14 @@ exports.default = FixedSizeContainer_1.default(IconPlaceholder);
677
705
 
678
706
  /***/ }),
679
707
 
680
- /***/ 28:
708
+ /***/ 31:
709
+ /***/ (function(module, exports) {
710
+
711
+ module.exports = require("@splunk/ui-utils/id");
712
+
713
+ /***/ }),
714
+
715
+ /***/ 32:
681
716
  /***/ (function(module, exports, __webpack_require__) {
682
717
 
683
718
  "use strict";
@@ -694,7 +729,7 @@ var T = __webpack_require__(0);
694
729
 
695
730
  var lodash_1 = __webpack_require__(3);
696
731
 
697
- var DataSource_1 = __webpack_require__(39);
732
+ var DataSource_1 = __webpack_require__(43);
698
733
 
699
734
  exports.SortParamsPropTypes = T.shape({
700
735
  currentSortKey: T.string,
@@ -748,7 +783,7 @@ exports.getSortingParams = getSortingParams;
748
783
 
749
784
  /***/ }),
750
785
 
751
- /***/ 29:
786
+ /***/ 33:
752
787
  /***/ (function(module, exports, __webpack_require__) {
753
788
 
754
789
  "use strict";
@@ -813,21 +848,7 @@ exports.getPaginationParams = getPaginationParams;
813
848
 
814
849
  /***/ }),
815
850
 
816
- /***/ 3:
817
- /***/ (function(module, exports) {
818
-
819
- module.exports = require("lodash");
820
-
821
- /***/ }),
822
-
823
- /***/ 30:
824
- /***/ (function(module, exports) {
825
-
826
- module.exports = require("@splunk/visualizations-shared/numberUtils");
827
-
828
- /***/ }),
829
-
830
- /***/ 31:
851
+ /***/ 34:
831
852
  /***/ (function(module, exports, __webpack_require__) {
832
853
 
833
854
  "use strict";
@@ -856,12 +877,14 @@ var VizCategory;
856
877
 
857
878
  /***/ }),
858
879
 
859
- /***/ 32:
880
+ /***/ 35:
860
881
  /***/ (function(module, exports, __webpack_require__) {
861
882
 
862
883
  "use strict";
863
884
 
864
885
 
886
+ var _slicedToArray = __webpack_require__(17);
887
+
865
888
  Object.defineProperty(exports, "__esModule", {
866
889
  value: true
867
890
  });
@@ -870,44 +893,51 @@ var React = __webpack_require__(1);
870
893
 
871
894
  var lodash_1 = __webpack_require__(3);
872
895
 
873
- var getSettingsFromThemedProps_1 = __webpack_require__(33);
896
+ var getSettingsFromThemedProps_1 = __webpack_require__(36);
874
897
 
875
- var Options_1 = __webpack_require__(34);
898
+ var Options_1 = __webpack_require__(37);
876
899
 
877
- var SanitizeProps_1 = __webpack_require__(35);
900
+ var SanitizeProps_1 = __webpack_require__(38);
878
901
 
879
- var TimezoneContext_1 = __webpack_require__(23);
902
+ var TimezoneContext_1 = __webpack_require__(24);
880
903
 
881
- var moment_1 = __webpack_require__(36);
904
+ var moment_1 = __webpack_require__(39);
905
+
906
+ var FeatureFlagContext_1 = __webpack_require__(26);
882
907
 
883
908
  var styled_components_1 = __webpack_require__(4);
884
909
 
885
- var hocUtils_1 = __webpack_require__(25);
910
+ var hocUtils_1 = __webpack_require__(27);
911
+
912
+ var JSONSchemaUtils_1 = __webpack_require__(28);
913
+
914
+ var async_dynamic_options_evaluator_1 = __webpack_require__(40);
886
915
 
887
- var JSONSchemaUtils_1 = __webpack_require__(26);
916
+ var id_1 = __webpack_require__(31);
888
917
 
889
- var SplunkVisualization_1 = __webpack_require__(37);
918
+ var SplunkVisualization_1 = __webpack_require__(41);
890
919
 
891
920
  var VizBehavior_1 = __webpack_require__(6);
892
921
 
893
- var getSorting_1 = __webpack_require__(28);
922
+ var getSorting_1 = __webpack_require__(32);
894
923
 
895
- var getPagination_1 = __webpack_require__(29);
924
+ var getPagination_1 = __webpack_require__(33);
896
925
 
897
- var useDeepMemo_1 = __webpack_require__(40);
926
+ var useDeepMemo_1 = __webpack_require__(44);
898
927
 
899
- var MissingPropsMessage_1 = __webpack_require__(41);
928
+ var MissingPropsMessage_1 = __webpack_require__(45);
900
929
 
901
- var withEditModeCover_1 = __webpack_require__(42);
930
+ var withEditModeCover_1 = __webpack_require__(46);
902
931
 
903
- var withPlaceholder_1 = __webpack_require__(43);
932
+ var withPlaceholder_1 = __webpack_require__(47);
933
+
934
+ var UUID = id_1.createGUID();
904
935
  /**
905
936
  * hoc that wraps a pure react visualization in a Dashboard visualization
906
937
  * @param {DashboardVizOpts} opts
907
938
  * @returns {HOC}
908
939
  */
909
940
 
910
-
911
941
  var withDashboardViz = function withDashboardViz(opts) {
912
942
  var ReactViz = opts.ReactViz,
913
943
  vizConfig = opts.vizConfig,
@@ -967,28 +997,76 @@ var withDashboardViz = function withDashboardViz(opts) {
967
997
 
968
998
  var evaluatedOptions = {}; // evaluatedOptions need to be initialized as an empty object
969
999
 
1000
+ var _React$useState = React.useState({}),
1001
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1002
+ evaluatedOptionsAsync = _React$useState2[0],
1003
+ setEvaluatedOptionsAsync = _React$useState2[1]; // evaluatedOptions need to be initialized as an empty object
1004
+
1005
+
1006
+ var featureFlagContext = React.useContext(FeatureFlagContext_1.default);
1007
+
1008
+ var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(UUID)),
1009
+ _React$useState4 = _slicedToArray(_React$useState3, 1),
1010
+ visualizationID = _React$useState4[0];
1011
+
1012
+ var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext['visualizations.useWebWorkersForDSL'] && typeof Worker !== 'undefined')),
1013
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
1014
+ useAsyncEvaluatedOptions = _React$useState6[0],
1015
+ setUseAsyncEvaluatedOptions = _React$useState6[1];
1016
+
970
1017
  evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
971
1018
  try {
972
- return Options_1.Options.evaluate({
973
- context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
974
- options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
975
- }, dataSources, themeFunc);
1019
+ if (useAsyncEvaluatedOptions) {
1020
+ var optionsToEvaluate = {
1021
+ context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
1022
+ options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
1023
+ };
1024
+ var asyncDynamicOptionsEvaluatorParams = {
1025
+ visualizationID: visualizationID,
1026
+ props: props,
1027
+ options: optionsToEvaluate,
1028
+ dataSources: dataSources,
1029
+ theme: vizConfig.themes
1030
+ };
1031
+ async_dynamic_options_evaluator_1.default.evaluate(asyncDynamicOptionsEvaluatorParams).then(function (results) {
1032
+ setEvaluatedOptionsAsync(results.results);
1033
+ }).catch(function (e) {
1034
+ // eslint-disable-next-line no-console
1035
+ console.error("unexpected error evaluating options - async: ".concat(e.message));
1036
+ setUseAsyncEvaluatedOptions(false);
1037
+ });
1038
+ } else {
1039
+ return Options_1.Options.evaluate({
1040
+ context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
1041
+ options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
1042
+ }, dataSources, themeFunc);
1043
+ }
976
1044
  } catch (e) {
977
1045
  // eslint-disable-next-line no-console
978
- console.error("unexpected error evaluating options: + ".concat(e.message));
1046
+ console.error("unexpected error evaluating options: ".concat(e.message));
979
1047
  return {};
980
1048
  }
981
- }, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone]); // useEffect hook needs to be initialized before any early returns
1049
+
1050
+ return {};
1051
+ }, [currentThemeFamily, currentThemeColorScheme, currentThemeDensity, options, context, dataSources, serializedTimezone, useAsyncEvaluatedOptions]);
1052
+ var evaluatedOptionsToUse = !useAsyncEvaluatedOptions ? evaluatedOptions : evaluatedOptionsAsync; // useEffect hook needs to be initialized before any early returns
982
1053
  // this is in accordance with the order of hook calls being the same on each render https://reactjs.org/docs/hooks-rules.html#explanation
983
1054
 
984
1055
  React.useEffect(function () {
985
- onComputedProps(evaluatedOptions);
986
- }); // present warning message if any required props are missing
1056
+ onComputedProps(evaluatedOptionsToUse);
1057
+ });
1058
+ React.useEffect(function () {
1059
+ return function () {
1060
+ if (useAsyncEvaluatedOptions) {
1061
+ async_dynamic_options_evaluator_1.default.reset(visualizationID);
1062
+ }
1063
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
1064
+ }, []); // present warning message if any required props are missing
987
1065
 
988
1066
  var _vizConfig$requiredPr = vizConfig.requiredProps,
989
1067
  requiredProps = _vizConfig$requiredPr === void 0 ? [] : _vizConfig$requiredPr,
990
1068
  supports = vizConfig.supports;
991
- var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptions);
1069
+ var missing = MissingPropsMessage_1.missingKeys(requiredProps, evaluatedOptionsToUse);
992
1070
 
993
1071
  if (missing.length > 0 && supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER)) {
994
1072
  return React.createElement(MissingPropsMessage_1.default, {
@@ -1015,7 +1093,7 @@ var withDashboardViz = function withDashboardViz(opts) {
1015
1093
 
1016
1094
  if (Array.isArray(payloadKeys) && payloadKeys.length) {
1017
1095
  payloadKeys.forEach(function (p) {
1018
- payload[p] = evaluatedOptions[p];
1096
+ payload[p] = evaluatedOptionsToUse[p];
1019
1097
  });
1020
1098
  }
1021
1099
 
@@ -1034,7 +1112,7 @@ var withDashboardViz = function withDashboardViz(opts) {
1034
1112
  } // compute pure viz props which are not from options
1035
1113
 
1036
1114
 
1037
- var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptions), eventCallbackProps), {
1115
+ var computedVizProps = computeVizProps(Object.assign(Object.assign(Object.assign(Object.assign({}, props), evaluatedOptionsToUse), eventCallbackProps), {
1038
1116
  themeFunc: themeFunc
1039
1117
  }));
1040
1118
  /**
@@ -1054,7 +1132,7 @@ var withDashboardViz = function withDashboardViz(opts) {
1054
1132
 
1055
1133
  var dataSourceMetadata = {};
1056
1134
  var OptionKey = 'paginateDataSourceKey';
1057
- var paginateDataSourceKey = lodash_1.has(evaluatedOptions, OptionKey) && evaluatedOptions[OptionKey] || 'primary';
1135
+ var paginateDataSourceKey = lodash_1.has(evaluatedOptionsToUse, OptionKey) && evaluatedOptionsToUse[OptionKey] || 'primary';
1058
1136
 
1059
1137
  if (vizConfig.supports.indexOf(VizBehavior_1.VizBehavior.PAGE_AND_SORT) > -1 && lodash_1.has(dataSources, paginateDataSourceKey)) {
1060
1138
  var requestParams = lodash_1.get(dataSources, [paginateDataSourceKey, 'requestParams'], {});
@@ -1084,7 +1162,7 @@ var withDashboardViz = function withDashboardViz(opts) {
1084
1162
  mode: mode,
1085
1163
  width: width,
1086
1164
  height: height
1087
- }, evaluatedOptions, computedVizProps, eventCallbackProps, dataSourceMetadata));
1165
+ }, evaluatedOptionsToUse, computedVizProps, eventCallbackProps, dataSourceMetadata));
1088
1166
  };
1089
1167
 
1090
1168
  DashboardViz.propTypes = Object.assign(Object.assign({}, SplunkVisualization_1.default.propTypes), ReactViz.propTypes);
@@ -1102,35 +1180,49 @@ exports.default = withDashboardViz;
1102
1180
 
1103
1181
  /***/ }),
1104
1182
 
1105
- /***/ 33:
1183
+ /***/ 36:
1106
1184
  /***/ (function(module, exports) {
1107
1185
 
1108
1186
  module.exports = require("@splunk/themes/getSettingsFromThemedProps");
1109
1187
 
1110
1188
  /***/ }),
1111
1189
 
1112
- /***/ 34:
1190
+ /***/ 37:
1113
1191
  /***/ (function(module, exports) {
1114
1192
 
1115
1193
  module.exports = require("@splunk/visualization-encoding/Options");
1116
1194
 
1117
1195
  /***/ }),
1118
1196
 
1119
- /***/ 35:
1197
+ /***/ 38:
1120
1198
  /***/ (function(module, exports) {
1121
1199
 
1122
1200
  module.exports = require("@splunk/visualizations-shared/SanitizeProps");
1123
1201
 
1124
1202
  /***/ }),
1125
1203
 
1126
- /***/ 36:
1204
+ /***/ 39:
1127
1205
  /***/ (function(module, exports) {
1128
1206
 
1129
1207
  module.exports = require("@splunk/moment");
1130
1208
 
1131
1209
  /***/ }),
1132
1210
 
1133
- /***/ 37:
1211
+ /***/ 4:
1212
+ /***/ (function(module, exports) {
1213
+
1214
+ module.exports = require("styled-components");
1215
+
1216
+ /***/ }),
1217
+
1218
+ /***/ 40:
1219
+ /***/ (function(module, exports) {
1220
+
1221
+ module.exports = require("@splunk/async-dynamic-options-evaluator");
1222
+
1223
+ /***/ }),
1224
+
1225
+ /***/ 41:
1134
1226
  /***/ (function(module, exports, __webpack_require__) {
1135
1227
 
1136
1228
  "use strict";
@@ -1148,7 +1240,7 @@ var T = __webpack_require__(0);
1148
1240
 
1149
1241
  var lodash_1 = __webpack_require__(3);
1150
1242
 
1151
- var VizActionHandler_1 = __webpack_require__(38); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1243
+ var VizActionHandler_1 = __webpack_require__(42); // this is identical to the initial height and width we use in BaseVisualization in dashboard-visualizations
1152
1244
 
1153
1245
 
1154
1246
  exports.INITIAL_WIDTH = 250;
@@ -1282,7 +1374,7 @@ exports.default = SplunkVisualization;
1282
1374
 
1283
1375
  /***/ }),
1284
1376
 
1285
- /***/ 38:
1377
+ /***/ 42:
1286
1378
  /***/ (function(module, exports, __webpack_require__) {
1287
1379
 
1288
1380
  "use strict";
@@ -1290,7 +1382,7 @@ exports.default = SplunkVisualization;
1290
1382
 
1291
1383
  var _classCallCheck = __webpack_require__(11);
1292
1384
 
1293
- var _createClass = __webpack_require__(19);
1385
+ var _createClass = __webpack_require__(20);
1294
1386
 
1295
1387
  Object.defineProperty(exports, "__esModule", {
1296
1388
  value: true
@@ -1320,7 +1412,7 @@ exports.DefaultVizActionHandler = DefaultVizActionHandler;
1320
1412
 
1321
1413
  /***/ }),
1322
1414
 
1323
- /***/ 39:
1415
+ /***/ 43:
1324
1416
  /***/ (function(module, exports, __webpack_require__) {
1325
1417
 
1326
1418
  "use strict";
@@ -1334,194 +1426,7 @@ exports.validSortDirs = ['asc', 'desc', 'none'];
1334
1426
 
1335
1427
  /***/ }),
1336
1428
 
1337
- /***/ 4:
1338
- /***/ (function(module, exports) {
1339
-
1340
- module.exports = require("styled-components");
1341
-
1342
- /***/ }),
1343
-
1344
- /***/ 40:
1345
- /***/ (function(module, exports, __webpack_require__) {
1346
-
1347
- "use strict";
1348
-
1349
-
1350
- Object.defineProperty(exports, "__esModule", {
1351
- value: true
1352
- });
1353
- exports.useDeepMemo = void 0;
1354
-
1355
- var react_1 = __webpack_require__(1);
1356
-
1357
- var lodash_1 = __webpack_require__(3);
1358
- /**
1359
- * This hook evaluates and stores the result of a passed function and only
1360
- * re-evaluates the function when passed dependencies change.
1361
- *
1362
- * It is different from the internal React useMemo in the following aspects:
1363
- * - it only stores the last evaluated result
1364
- * - it uses a deep equality check to determine if dependencies have changed
1365
- *
1366
- * Inspired by apollo-client's useDeepMemo
1367
- *
1368
- * @param fn the function to be executed and
1369
- * @param dependencies an array of dependencies
1370
- */
1371
-
1372
-
1373
- var useDeepMemo = function useDeepMemo(fn, dependencies) {
1374
- var ref = react_1.useRef();
1375
-
1376
- if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
1377
- ref.current = {
1378
- dependencies: dependencies,
1379
- value: fn()
1380
- };
1381
- }
1382
-
1383
- return ref.current.value;
1384
- };
1385
-
1386
- exports.useDeepMemo = useDeepMemo;
1387
-
1388
- /***/ }),
1389
-
1390
- /***/ 41:
1391
- /***/ (function(module, exports, __webpack_require__) {
1392
-
1393
- "use strict";
1394
-
1395
-
1396
- Object.defineProperty(exports, "__esModule", {
1397
- value: true
1398
- });
1399
- exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
1400
-
1401
- var React = __webpack_require__(1);
1402
-
1403
- var T = __webpack_require__(0);
1404
-
1405
- var i18n_1 = __webpack_require__(2);
1406
-
1407
- var Message_1 = __webpack_require__(10);
1408
-
1409
- var FixedSizeContainer_1 = __webpack_require__(13);
1410
- /**
1411
- * @method isMissing
1412
- * @param {any} v
1413
- * @returns {boolean} true if the input value === null or undefined
1414
- */
1415
-
1416
-
1417
- var isMissing = function isMissing(v) {
1418
- return v === null || v === undefined;
1419
- };
1420
-
1421
- exports.isMissing = isMissing;
1422
- /**
1423
- * @method misskingKeys
1424
- * @param {string[]} keys
1425
- * @param {object} target
1426
- * @returns {string[]} the keys of missing required props
1427
- */
1428
-
1429
- var missingKeys = function missingKeys(keys, target) {
1430
- return keys.filter(function (k) {
1431
- return exports.isMissing(target[k]);
1432
- });
1433
- };
1434
-
1435
- exports.missingKeys = missingKeys;
1436
- var propTypes = {
1437
- width: T.oneOfType([T.string, T.number]),
1438
- height: T.oneOfType([T.string, T.number]),
1439
- // eslint-disable-next-line react/no-unused-prop-types
1440
- backgroundColor: T.string,
1441
- missingProps: T.arrayOf(T.string)
1442
- };
1443
- /**
1444
- * @method MissingPropsMessage
1445
- * @param {MissingPropsProps} props
1446
- * @returns {React.ReactElement}
1447
- */
1448
-
1449
- var MissingPropsMessage = function MissingPropsMessage(props) {
1450
- var width = props.width,
1451
- height = props.height,
1452
- missingProps = props.missingProps;
1453
- return React.createElement(Message_1.default, {
1454
- "data-test": "message",
1455
- width: width,
1456
- height: height,
1457
- message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
1458
- });
1459
- };
1460
-
1461
- exports.MissingPropsMessage = MissingPropsMessage;
1462
- exports.MissingPropsMessage.propTypes = propTypes;
1463
- exports.MissingPropsMessage.defaultProps = {
1464
- width: '100%',
1465
- height: 250
1466
- };
1467
- exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
1468
-
1469
- /***/ }),
1470
-
1471
- /***/ 42:
1472
- /***/ (function(module, exports, __webpack_require__) {
1473
-
1474
- "use strict";
1475
-
1476
-
1477
- Object.defineProperty(exports, "__esModule", {
1478
- value: true
1479
- });
1480
-
1481
- var React = __webpack_require__(1);
1482
-
1483
- var styled_components_1 = __webpack_require__(4);
1484
-
1485
- var hocUtils_1 = __webpack_require__(14);
1486
-
1487
- var Cover = styled_components_1.default.div.withConfig({
1488
- displayName: "withEditModeCover__Cover",
1489
- componentId: "sc-1gsbnxb-0"
1490
- })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1491
- var Blocker = styled_components_1.default.div.attrs({
1492
- 'data-splunk-visualization-version': "25.5.0 - 12c0447a7"
1493
- }).withConfig({
1494
- displayName: "withEditModeCover__Blocker",
1495
- componentId: "sc-1gsbnxb-1"
1496
- })(["position:relative;width:100%;height:100%;"]);
1497
- /**
1498
- * HOC that renders a cover layer in edit mode
1499
- * @method withEditModeCover
1500
- * @param {ExtendedDashViz} Visualization
1501
- * @returns {ExtendedDashViz} Wrapper
1502
- */
1503
-
1504
- var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
1505
- var Wrapper = function Wrapper(props) {
1506
- var mode = props.mode;
1507
- var showEditCover = mode === 'edit' && !disableEditModeCover;
1508
- return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
1509
- "data-test": "edit-mode-cover"
1510
- }));
1511
- };
1512
-
1513
- hocUtils_1.extendStaticWrapperProps({
1514
- Wrapper: Wrapper,
1515
- Visualization: Visualization
1516
- });
1517
- return Wrapper;
1518
- };
1519
-
1520
- exports.default = withEditModeCover;
1521
-
1522
- /***/ }),
1523
-
1524
- /***/ 425:
1429
+ /***/ 433:
1525
1430
  /***/ (function(module, exports, __webpack_require__) {
1526
1431
 
1527
1432
  "use strict";
@@ -1547,15 +1452,15 @@ exports.themes = exports.computeVizProps = exports.PurePunchcard = exports.confi
1547
1452
 
1548
1453
  var lodash_1 = __webpack_require__(3);
1549
1454
 
1550
- var visualization_color_palettes_1 = __webpack_require__(46);
1455
+ var visualization_color_palettes_1 = __webpack_require__(50);
1551
1456
 
1552
- var config_1 = __webpack_require__(426);
1457
+ var config_1 = __webpack_require__(434);
1553
1458
 
1554
- var withDashboardViz_1 = __webpack_require__(32);
1459
+ var withDashboardViz_1 = __webpack_require__(35);
1555
1460
 
1556
- var Punchcard_1 = __webpack_require__(427);
1461
+ var Punchcard_1 = __webpack_require__(435);
1557
1462
 
1558
- var punchcardUtils_1 = __webpack_require__(435);
1463
+ var punchcardUtils_1 = __webpack_require__(443);
1559
1464
 
1560
1465
  exports.config = config_1.default;
1561
1466
  exports.PurePunchcard = Punchcard_1.default;
@@ -1600,7 +1505,7 @@ exports.default = viz;
1600
1505
 
1601
1506
  /***/ }),
1602
1507
 
1603
- /***/ 426:
1508
+ /***/ 434:
1604
1509
  /***/ (function(module, exports, __webpack_require__) {
1605
1510
 
1606
1511
  "use strict";
@@ -1614,23 +1519,23 @@ var i18n_1 = __webpack_require__(2);
1614
1519
 
1615
1520
  var schemaUtils_1 = __webpack_require__(16);
1616
1521
 
1617
- var visualization_icons_1 = __webpack_require__(47);
1522
+ var visualization_icons_1 = __webpack_require__(51);
1618
1523
 
1619
- var placeholders_1 = __webpack_require__(44);
1524
+ var placeholders_1 = __webpack_require__(48);
1620
1525
 
1621
- var visualization_color_palettes_1 = __webpack_require__(46);
1526
+ var visualization_color_palettes_1 = __webpack_require__(50);
1622
1527
 
1623
- var pick_1 = __webpack_require__(21);
1528
+ var pick_1 = __webpack_require__(22);
1624
1529
 
1625
1530
  var variables_1 = __webpack_require__(9);
1626
1531
 
1627
1532
  var VizBehavior_1 = __webpack_require__(6);
1628
1533
 
1629
- var VizCategory_1 = __webpack_require__(31);
1534
+ var VizCategory_1 = __webpack_require__(34);
1630
1535
 
1631
- var configUtils_1 = __webpack_require__(17);
1536
+ var configUtils_1 = __webpack_require__(18);
1632
1537
 
1633
- var BackgroundColor_1 = __webpack_require__(49);
1538
+ var BackgroundColor_1 = __webpack_require__(53);
1634
1539
 
1635
1540
  var dataContract = {
1636
1541
  requiredDataSources: [{
@@ -1957,7 +1862,7 @@ exports.default = configUtils_1.enhanceConfig(config);
1957
1862
 
1958
1863
  /***/ }),
1959
1864
 
1960
- /***/ 427:
1865
+ /***/ 435:
1961
1866
  /***/ (function(module, exports, __webpack_require__) {
1962
1867
 
1963
1868
  "use strict";
@@ -1965,7 +1870,7 @@ exports.default = configUtils_1.enhanceConfig(config);
1965
1870
 
1966
1871
  var _defineProperty = __webpack_require__(7);
1967
1872
 
1968
- var _slicedToArray = __webpack_require__(51);
1873
+ var _slicedToArray = __webpack_require__(17);
1969
1874
 
1970
1875
  Object.defineProperty(exports, "__esModule", {
1971
1876
  value: true
@@ -1979,23 +1884,23 @@ var T = __webpack_require__(0);
1979
1884
 
1980
1885
  var lodash_1 = __webpack_require__(3);
1981
1886
 
1982
- var SizeAwareWrapper_1 = __webpack_require__(20);
1887
+ var SizeAwareWrapper_1 = __webpack_require__(21);
1983
1888
 
1984
1889
  var style_1 = __webpack_require__(15);
1985
1890
 
1986
- var visualization_color_palettes_1 = __webpack_require__(46);
1891
+ var visualization_color_palettes_1 = __webpack_require__(50);
1987
1892
 
1988
- var punchcardUtils_1 = __webpack_require__(87);
1893
+ var punchcardUtils_1 = __webpack_require__(90);
1989
1894
 
1990
- var sortUtils_1 = __webpack_require__(428);
1895
+ var sortUtils_1 = __webpack_require__(436);
1991
1896
 
1992
- var PunchcardAxis_1 = __webpack_require__(429);
1897
+ var PunchcardAxis_1 = __webpack_require__(437);
1993
1898
 
1994
- var PunchcardChartArea_1 = __webpack_require__(430);
1899
+ var PunchcardChartArea_1 = __webpack_require__(438);
1995
1900
 
1996
- var PunchcardLegend_1 = __webpack_require__(433);
1901
+ var PunchcardLegend_1 = __webpack_require__(441);
1997
1902
 
1998
- var PunchcardGridLines_1 = __webpack_require__(434);
1903
+ var PunchcardGridLines_1 = __webpack_require__(442);
1999
1904
 
2000
1905
  var Container = styled_components_1.default.div.withConfig({
2001
1906
  displayName: "Punchcard__Container",
@@ -2327,7 +2232,7 @@ exports.default = Punchcard;
2327
2232
 
2328
2233
  /***/ }),
2329
2234
 
2330
- /***/ 428:
2235
+ /***/ 436:
2331
2236
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2332
2237
 
2333
2238
  "use strict";
@@ -2337,13 +2242,13 @@ __webpack_require__.r(__webpack_exports__);
2337
2242
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortedByDTime", function() { return sortedByDTime; });
2338
2243
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortByDigitOrAlpha", function() { return sortByDigitOrAlpha; });
2339
2244
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortAxis", function() { return sortAxis; });
2340
- /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(121);
2245
+ /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(127);
2341
2246
  /* harmony import */ var lodash_findIndex__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_findIndex__WEBPACK_IMPORTED_MODULE_0__);
2342
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
2247
+ /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(102);
2343
2248
  /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
2344
- /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
2249
+ /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(159);
2345
2250
  /* harmony import */ var lodash_sortBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_sortBy__WEBPACK_IMPORTED_MODULE_2__);
2346
- /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(122);
2251
+ /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(128);
2347
2252
  /* harmony import */ var lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_flattenDeep__WEBPACK_IMPORTED_MODULE_3__);
2348
2253
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
2349
2254
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
@@ -2612,7 +2517,7 @@ var sortAxis = function sortAxis(axis) {
2612
2517
 
2613
2518
  /***/ }),
2614
2519
 
2615
- /***/ 429:
2520
+ /***/ 437:
2616
2521
  /***/ (function(module, exports, __webpack_require__) {
2617
2522
 
2618
2523
  "use strict";
@@ -2628,11 +2533,11 @@ var T = __webpack_require__(0);
2628
2533
 
2629
2534
  var styled_components_1 = __webpack_require__(4);
2630
2535
 
2631
- var pick_1 = __webpack_require__(21);
2536
+ var pick_1 = __webpack_require__(22);
2632
2537
 
2633
2538
  var variables_1 = __webpack_require__(9);
2634
2539
 
2635
- var punchcardUtils_1 = __webpack_require__(87);
2540
+ var punchcardUtils_1 = __webpack_require__(90);
2636
2541
 
2637
2542
  var AxisLabelText = styled_components_1.default.text.withConfig({
2638
2543
  displayName: "PunchcardAxis__AxisLabelText",
@@ -2713,72 +2618,7 @@ exports.default = PunchcardAxis;
2713
2618
 
2714
2619
  /***/ }),
2715
2620
 
2716
- /***/ 43:
2717
- /***/ (function(module, exports, __webpack_require__) {
2718
-
2719
- "use strict";
2720
-
2721
-
2722
- Object.defineProperty(exports, "__esModule", {
2723
- value: true
2724
- });
2725
-
2726
- var React = __webpack_require__(1);
2727
-
2728
- var colorUtils_1 = __webpack_require__(12);
2729
-
2730
- var variables_1 = __webpack_require__(9);
2731
-
2732
- var IconPlaceholder_1 = __webpack_require__(27);
2733
-
2734
- var VizBehavior_1 = __webpack_require__(6);
2735
-
2736
- var hocUtils_1 = __webpack_require__(14);
2737
-
2738
- var withPlaceholder = function withPlaceholder(Visualization) {
2739
- var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
2740
- var config = Visualization.config;
2741
- var themes = config.themes;
2742
-
2743
- var Wrapper = function Wrapper(props) {
2744
- var _a, _b;
2745
-
2746
- var dataSources = props.dataSources,
2747
- loading = props.loading,
2748
- options = props.options,
2749
- height = props.height,
2750
- width = props.width;
2751
- var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
2752
- var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
2753
- var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
2754
- var iconColor = variables_1.default.contentColorActive(props);
2755
-
2756
- if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
2757
- return React.createElement(IconPlaceholder_1.default, {
2758
- "data-test": "icon-placeholder",
2759
- icon: icon,
2760
- width: width,
2761
- height: height,
2762
- backgroundColor: bgColorFromTheme,
2763
- iconColor: iconColor
2764
- });
2765
- }
2766
-
2767
- return React.createElement(Visualization, Object.assign({}, props));
2768
- };
2769
-
2770
- hocUtils_1.extendStaticWrapperProps({
2771
- Wrapper: Wrapper,
2772
- Visualization: Visualization
2773
- });
2774
- return Wrapper;
2775
- };
2776
-
2777
- exports.default = withPlaceholder;
2778
-
2779
- /***/ }),
2780
-
2781
- /***/ 430:
2621
+ /***/ 438:
2782
2622
  /***/ (function(module, exports, __webpack_require__) {
2783
2623
 
2784
2624
  "use strict";
@@ -2786,7 +2626,7 @@ exports.default = withPlaceholder;
2786
2626
 
2787
2627
  var _toConsumableArray = __webpack_require__(8);
2788
2628
 
2789
- var _slicedToArray = __webpack_require__(51);
2629
+ var _slicedToArray = __webpack_require__(17);
2790
2630
 
2791
2631
  Object.defineProperty(exports, "__esModule", {
2792
2632
  value: true
@@ -2796,9 +2636,9 @@ var React = __webpack_require__(1);
2796
2636
 
2797
2637
  var T = __webpack_require__(0);
2798
2638
 
2799
- var punchcardUtils_1 = __webpack_require__(87);
2639
+ var punchcardUtils_1 = __webpack_require__(90);
2800
2640
 
2801
- var PunchcardRow_1 = __webpack_require__(431);
2641
+ var PunchcardRow_1 = __webpack_require__(439);
2802
2642
 
2803
2643
  var PunchcardChartArea = function PunchcardChartArea(props) {
2804
2644
  var showBubbleLabels = props.showBubbleLabels,
@@ -2950,7 +2790,7 @@ exports.default = PunchcardChartArea;
2950
2790
 
2951
2791
  /***/ }),
2952
2792
 
2953
- /***/ 431:
2793
+ /***/ 439:
2954
2794
  /***/ (function(module, exports, __webpack_require__) {
2955
2795
 
2956
2796
  "use strict";
@@ -2966,9 +2806,9 @@ var T = __webpack_require__(0);
2966
2806
 
2967
2807
  var styled_components_1 = __webpack_require__(4);
2968
2808
 
2969
- var PunchcardBubble_1 = __webpack_require__(432);
2809
+ var PunchcardBubble_1 = __webpack_require__(440);
2970
2810
 
2971
- var punchcardUtils_1 = __webpack_require__(87);
2811
+ var punchcardUtils_1 = __webpack_require__(90);
2972
2812
 
2973
2813
  var PunchcardRow = function PunchcardRow(props) {
2974
2814
  var showBubbleLabels = props.showBubbleLabels,
@@ -3076,19 +2916,65 @@ var defaultProps = {
3076
2916
  yValue: null,
3077
2917
  handlePointClick: function handlePointClick() {}
3078
2918
  };
3079
- PunchcardRow.propTypes = propTypes;
3080
- PunchcardRow.defaultProps = defaultProps;
3081
- exports.default = styled_components_1.withTheme(PunchcardRow);
2919
+ PunchcardRow.propTypes = propTypes;
2920
+ PunchcardRow.defaultProps = defaultProps;
2921
+ exports.default = styled_components_1.withTheme(PunchcardRow);
2922
+
2923
+ /***/ }),
2924
+
2925
+ /***/ 44:
2926
+ /***/ (function(module, exports, __webpack_require__) {
2927
+
2928
+ "use strict";
2929
+
2930
+
2931
+ Object.defineProperty(exports, "__esModule", {
2932
+ value: true
2933
+ });
2934
+ exports.useDeepMemo = void 0;
2935
+
2936
+ var react_1 = __webpack_require__(1);
2937
+
2938
+ var lodash_1 = __webpack_require__(3);
2939
+ /**
2940
+ * This hook evaluates and stores the result of a passed function and only
2941
+ * re-evaluates the function when passed dependencies change.
2942
+ *
2943
+ * It is different from the internal React useMemo in the following aspects:
2944
+ * - it only stores the last evaluated result
2945
+ * - it uses a deep equality check to determine if dependencies have changed
2946
+ *
2947
+ * Inspired by apollo-client's useDeepMemo
2948
+ *
2949
+ * @param fn the function to be executed and
2950
+ * @param dependencies an array of dependencies
2951
+ */
2952
+
2953
+
2954
+ var useDeepMemo = function useDeepMemo(fn, dependencies) {
2955
+ var ref = react_1.useRef();
2956
+
2957
+ if (!ref.current || !lodash_1.isEqual(dependencies, ref.current.dependencies)) {
2958
+ ref.current = {
2959
+ dependencies: dependencies,
2960
+ value: fn()
2961
+ };
2962
+ }
2963
+
2964
+ return ref.current.value;
2965
+ };
2966
+
2967
+ exports.useDeepMemo = useDeepMemo;
3082
2968
 
3083
2969
  /***/ }),
3084
2970
 
3085
- /***/ 432:
2971
+ /***/ 440:
3086
2972
  /***/ (function(module, exports, __webpack_require__) {
3087
2973
 
3088
2974
  "use strict";
3089
2975
 
3090
2976
 
3091
- var _taggedTemplateLiteral = __webpack_require__(86);
2977
+ var _taggedTemplateLiteral = __webpack_require__(89);
3092
2978
 
3093
2979
  var _templateObject;
3094
2980
 
@@ -3102,13 +2988,13 @@ var T = __webpack_require__(0);
3102
2988
 
3103
2989
  var styled_components_1 = __webpack_require__(4);
3104
2990
 
3105
- var pick_1 = __webpack_require__(21);
2991
+ var pick_1 = __webpack_require__(22);
3106
2992
 
3107
2993
  var variables_1 = __webpack_require__(9);
3108
2994
 
3109
- var numberUtils_1 = __webpack_require__(30);
2995
+ var numberUtils_1 = __webpack_require__(29);
3110
2996
 
3111
- var punchcardUtils_1 = __webpack_require__(87);
2997
+ var punchcardUtils_1 = __webpack_require__(90);
3112
2998
 
3113
2999
  var BubbleCircle = styled_components_1.default.circle.withConfig({
3114
3000
  displayName: "PunchcardBubble__BubbleCircle",
@@ -3265,7 +3151,7 @@ exports.default = PunchcardBubble;
3265
3151
 
3266
3152
  /***/ }),
3267
3153
 
3268
- /***/ 433:
3154
+ /***/ 441:
3269
3155
  /***/ (function(module, exports, __webpack_require__) {
3270
3156
 
3271
3157
  "use strict";
@@ -3281,7 +3167,7 @@ var T = __webpack_require__(0);
3281
3167
 
3282
3168
  var styled_components_1 = __webpack_require__(4);
3283
3169
 
3284
- var pick_1 = __webpack_require__(21);
3170
+ var pick_1 = __webpack_require__(22);
3285
3171
 
3286
3172
  var variables_1 = __webpack_require__(9);
3287
3173
 
@@ -3384,7 +3270,7 @@ exports.default = PunchcardLegend;
3384
3270
 
3385
3271
  /***/ }),
3386
3272
 
3387
- /***/ 434:
3273
+ /***/ 442:
3388
3274
  /***/ (function(module, exports, __webpack_require__) {
3389
3275
 
3390
3276
  "use strict";
@@ -3402,7 +3288,7 @@ var styled_components_1 = __webpack_require__(4);
3402
3288
 
3403
3289
  var lodash_1 = __webpack_require__(3);
3404
3290
 
3405
- var pick_1 = __webpack_require__(21);
3291
+ var pick_1 = __webpack_require__(22);
3406
3292
 
3407
3293
  var variables_1 = __webpack_require__(9); // was previously lineColor in themeRegistry
3408
3294
 
@@ -3470,7 +3356,7 @@ exports.default = PunchcardGridLines;
3470
3356
 
3471
3357
  /***/ }),
3472
3358
 
3473
- /***/ 435:
3359
+ /***/ 443:
3474
3360
  /***/ (function(module, exports, __webpack_require__) {
3475
3361
 
3476
3362
  "use strict";
@@ -3483,7 +3369,7 @@ exports.convertToPunchcardProperties = exports.mapToOldKey = exports.punchcardOp
3483
3369
 
3484
3370
  var lodash_1 = __webpack_require__(3);
3485
3371
 
3486
- var chartingUtils_1 = __webpack_require__(52);
3372
+ var chartingUtils_1 = __webpack_require__(55);
3487
3373
 
3488
3374
  var punchcardOptionsMapping = {
3489
3375
  legendDisplay: 'showLegend',
@@ -3540,28 +3426,227 @@ exports.convertToPunchcardProperties = convertToPunchcardProperties;
3540
3426
 
3541
3427
  /***/ }),
3542
3428
 
3543
- /***/ 44:
3429
+ /***/ 45:
3430
+ /***/ (function(module, exports, __webpack_require__) {
3431
+
3432
+ "use strict";
3433
+
3434
+
3435
+ Object.defineProperty(exports, "__esModule", {
3436
+ value: true
3437
+ });
3438
+ exports.MissingPropsMessage = exports.missingKeys = exports.isMissing = void 0;
3439
+
3440
+ var React = __webpack_require__(1);
3441
+
3442
+ var T = __webpack_require__(0);
3443
+
3444
+ var i18n_1 = __webpack_require__(2);
3445
+
3446
+ var Message_1 = __webpack_require__(10);
3447
+
3448
+ var FixedSizeContainer_1 = __webpack_require__(13);
3449
+ /**
3450
+ * @method isMissing
3451
+ * @param {any} v
3452
+ * @returns {boolean} true if the input value === null or undefined
3453
+ */
3454
+
3455
+
3456
+ var isMissing = function isMissing(v) {
3457
+ return v === null || v === undefined;
3458
+ };
3459
+
3460
+ exports.isMissing = isMissing;
3461
+ /**
3462
+ * @method misskingKeys
3463
+ * @param {string[]} keys
3464
+ * @param {object} target
3465
+ * @returns {string[]} the keys of missing required props
3466
+ */
3467
+
3468
+ var missingKeys = function missingKeys(keys, target) {
3469
+ return keys.filter(function (k) {
3470
+ return exports.isMissing(target[k]);
3471
+ });
3472
+ };
3473
+
3474
+ exports.missingKeys = missingKeys;
3475
+ var propTypes = {
3476
+ width: T.oneOfType([T.string, T.number]),
3477
+ height: T.oneOfType([T.string, T.number]),
3478
+ // eslint-disable-next-line react/no-unused-prop-types
3479
+ backgroundColor: T.string,
3480
+ missingProps: T.arrayOf(T.string)
3481
+ };
3482
+ /**
3483
+ * @method MissingPropsMessage
3484
+ * @param {MissingPropsProps} props
3485
+ * @returns {React.ReactElement}
3486
+ */
3487
+
3488
+ var MissingPropsMessage = function MissingPropsMessage(props) {
3489
+ var width = props.width,
3490
+ height = props.height,
3491
+ missingProps = props.missingProps;
3492
+ return React.createElement(Message_1.default, {
3493
+ "data-test": "message",
3494
+ width: width,
3495
+ height: height,
3496
+ message: i18n_1._("Missing property: ".concat(missingProps.join(', ')))
3497
+ });
3498
+ };
3499
+
3500
+ exports.MissingPropsMessage = MissingPropsMessage;
3501
+ exports.MissingPropsMessage.propTypes = propTypes;
3502
+ exports.MissingPropsMessage.defaultProps = {
3503
+ width: '100%',
3504
+ height: 250
3505
+ };
3506
+ exports.default = FixedSizeContainer_1.default(exports.MissingPropsMessage);
3507
+
3508
+ /***/ }),
3509
+
3510
+ /***/ 46:
3511
+ /***/ (function(module, exports, __webpack_require__) {
3512
+
3513
+ "use strict";
3514
+
3515
+
3516
+ Object.defineProperty(exports, "__esModule", {
3517
+ value: true
3518
+ });
3519
+
3520
+ var React = __webpack_require__(1);
3521
+
3522
+ var styled_components_1 = __webpack_require__(4);
3523
+
3524
+ var hocUtils_1 = __webpack_require__(14);
3525
+
3526
+ var Cover = styled_components_1.default.div.withConfig({
3527
+ displayName: "withEditModeCover__Cover",
3528
+ componentId: "sc-1gsbnxb-0"
3529
+ })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
3530
+ var Blocker = styled_components_1.default.div.attrs({
3531
+ 'data-splunk-visualization-version': "25.6.0 - f5eb3abf9"
3532
+ }).withConfig({
3533
+ displayName: "withEditModeCover__Blocker",
3534
+ componentId: "sc-1gsbnxb-1"
3535
+ })(["position:relative;width:100%;height:100%;"]);
3536
+ /**
3537
+ * HOC that renders a cover layer in edit mode
3538
+ * @method withEditModeCover
3539
+ * @param {ExtendedDashViz} Visualization
3540
+ * @returns {ExtendedDashViz} Wrapper
3541
+ */
3542
+
3543
+ var withEditModeCover = function withEditModeCover(Visualization, disableEditModeCover) {
3544
+ var Wrapper = function Wrapper(props) {
3545
+ var mode = props.mode;
3546
+ var showEditCover = mode === 'edit' && !disableEditModeCover;
3547
+ return React.createElement(Blocker, null, React.createElement(Visualization, Object.assign({}, props)), showEditCover && React.createElement(Cover, {
3548
+ "data-test": "edit-mode-cover"
3549
+ }));
3550
+ };
3551
+
3552
+ hocUtils_1.extendStaticWrapperProps({
3553
+ Wrapper: Wrapper,
3554
+ Visualization: Visualization
3555
+ });
3556
+ return Wrapper;
3557
+ };
3558
+
3559
+ exports.default = withEditModeCover;
3560
+
3561
+ /***/ }),
3562
+
3563
+ /***/ 47:
3564
+ /***/ (function(module, exports, __webpack_require__) {
3565
+
3566
+ "use strict";
3567
+
3568
+
3569
+ Object.defineProperty(exports, "__esModule", {
3570
+ value: true
3571
+ });
3572
+
3573
+ var React = __webpack_require__(1);
3574
+
3575
+ var colorUtils_1 = __webpack_require__(12);
3576
+
3577
+ var variables_1 = __webpack_require__(9);
3578
+
3579
+ var IconPlaceholder_1 = __webpack_require__(30);
3580
+
3581
+ var VizBehavior_1 = __webpack_require__(6);
3582
+
3583
+ var hocUtils_1 = __webpack_require__(14);
3584
+
3585
+ var withPlaceholder = function withPlaceholder(Visualization) {
3586
+ var useIconPlaceholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IconPlaceholder_1.shouldShowIconPlaceholder;
3587
+ var config = Visualization.config;
3588
+ var themes = config.themes;
3589
+
3590
+ var Wrapper = function Wrapper(props) {
3591
+ var _a, _b;
3592
+
3593
+ var dataSources = props.dataSources,
3594
+ loading = props.loading,
3595
+ options = props.options,
3596
+ height = props.height,
3597
+ width = props.width;
3598
+ var showPlaceholder = useIconPlaceholder(dataSources, loading, options);
3599
+ var bgColorFromTheme = colorUtils_1.isColor(options === null || options === void 0 ? void 0 : options.backgroundColor) ? options === null || options === void 0 ? void 0 : options.backgroundColor : (_a = themes === null || themes === void 0 ? void 0 : themes.defaultBackgroundColor) === null || _a === void 0 ? void 0 : _a.call(themes, props);
3600
+ var icon = (_b = config.placeholderIcon) !== null && _b !== void 0 ? _b : config.icon;
3601
+ var iconColor = variables_1.default.contentColorActive(props);
3602
+
3603
+ if (config.supports.includes(VizBehavior_1.VizBehavior.PLACEHOLDER) && showPlaceholder) {
3604
+ return React.createElement(IconPlaceholder_1.default, {
3605
+ "data-test": "icon-placeholder",
3606
+ icon: icon,
3607
+ width: width,
3608
+ height: height,
3609
+ backgroundColor: bgColorFromTheme,
3610
+ iconColor: iconColor
3611
+ });
3612
+ }
3613
+
3614
+ return React.createElement(Visualization, Object.assign({}, props));
3615
+ };
3616
+
3617
+ hocUtils_1.extendStaticWrapperProps({
3618
+ Wrapper: Wrapper,
3619
+ Visualization: Visualization
3620
+ });
3621
+ return Wrapper;
3622
+ };
3623
+
3624
+ exports.default = withPlaceholder;
3625
+
3626
+ /***/ }),
3627
+
3628
+ /***/ 48:
3544
3629
  /***/ (function(module, exports) {
3545
3630
 
3546
3631
  module.exports = require("@splunk/visualization-icons/placeholders");
3547
3632
 
3548
3633
  /***/ }),
3549
3634
 
3550
- /***/ 46:
3635
+ /***/ 50:
3551
3636
  /***/ (function(module, exports) {
3552
3637
 
3553
3638
  module.exports = require("@splunk/visualization-color-palettes");
3554
3639
 
3555
3640
  /***/ }),
3556
3641
 
3557
- /***/ 47:
3642
+ /***/ 51:
3558
3643
  /***/ (function(module, exports) {
3559
3644
 
3560
3645
  module.exports = require("@splunk/visualization-icons");
3561
3646
 
3562
3647
  /***/ }),
3563
3648
 
3564
- /***/ 49:
3649
+ /***/ 53:
3565
3650
  /***/ (function(module, exports, __webpack_require__) {
3566
3651
 
3567
3652
  "use strict";
@@ -3592,14 +3677,7 @@ exports.default = background;
3592
3677
 
3593
3678
  /***/ }),
3594
3679
 
3595
- /***/ 51:
3596
- /***/ (function(module, exports) {
3597
-
3598
- module.exports = require("@babel/runtime/helpers/slicedToArray");
3599
-
3600
- /***/ }),
3601
-
3602
- /***/ 52:
3680
+ /***/ 55:
3603
3681
  /***/ (function(module, exports, __webpack_require__) {
3604
3682
 
3605
3683
  "use strict";
@@ -3873,34 +3951,41 @@ module.exports = require("@babel/runtime/helpers/toConsumableArray");
3873
3951
 
3874
3952
  /***/ }),
3875
3953
 
3876
- /***/ 80:
3954
+ /***/ 83:
3877
3955
  /***/ (function(module, exports) {
3878
3956
 
3879
3957
  module.exports = require("d3-scale");
3880
3958
 
3881
3959
  /***/ }),
3882
3960
 
3883
- /***/ 86:
3961
+ /***/ 89:
3884
3962
  /***/ (function(module, exports) {
3885
3963
 
3886
3964
  module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
3887
3965
 
3888
3966
  /***/ }),
3889
3967
 
3890
- /***/ 87:
3968
+ /***/ 9:
3969
+ /***/ (function(module, exports) {
3970
+
3971
+ module.exports = require("@splunk/themes/variables");
3972
+
3973
+ /***/ }),
3974
+
3975
+ /***/ 90:
3891
3976
  /***/ (function(module, exports, __webpack_require__) {
3892
3977
 
3893
3978
  "use strict";
3894
3979
 
3895
3980
 
3896
- var _slicedToArray = __webpack_require__(51);
3981
+ var _slicedToArray = __webpack_require__(17);
3897
3982
 
3898
3983
  Object.defineProperty(exports, "__esModule", {
3899
3984
  value: true
3900
3985
  });
3901
3986
  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;
3902
3987
 
3903
- var d3_scale_1 = __webpack_require__(80);
3988
+ var d3_scale_1 = __webpack_require__(83);
3904
3989
  /**
3905
3990
  * @enum {AXIS_ORIENTATION_TYPES}
3906
3991
  */
@@ -4294,13 +4379,6 @@ var truncateAxisLabelText = function truncateAxisLabelText(_ref9) {
4294
4379
 
4295
4380
  exports.truncateAxisLabelText = truncateAxisLabelText;
4296
4381
 
4297
- /***/ }),
4298
-
4299
- /***/ 9:
4300
- /***/ (function(module, exports) {
4301
-
4302
- module.exports = require("@splunk/themes/variables");
4303
-
4304
4382
  /***/ })
4305
4383
 
4306
4384
  /******/ });