@splunk/visualizations 26.1.0 → 26.1.2

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 (117) hide show
  1. package/Area.config.js +1 -1
  2. package/Area.js +31 -25
  3. package/Area.js.map +1 -1
  4. package/Bar.config.js +1 -1
  5. package/Bar.js +33 -22
  6. package/Bar.js.map +1 -1
  7. package/Bubble.config.js +1 -1
  8. package/Bubble.js +33 -22
  9. package/Bubble.js.map +1 -1
  10. package/ChoroplethSvg.config.js +1 -1
  11. package/ChoroplethSvg.js +42 -31
  12. package/ChoroplethSvg.js.map +1 -1
  13. package/Column.config.js +1 -1
  14. package/Column.js +33 -22
  15. package/Column.js.map +1 -1
  16. package/Ellipse.config.js +1 -1
  17. package/Ellipse.js +22 -11
  18. package/Ellipse.js.map +1 -1
  19. package/Events.config.js +1 -1
  20. package/Events.js +45 -34
  21. package/Events.js.map +1 -1
  22. package/FillerGauge.config.js +1 -1
  23. package/FillerGauge.js +30 -19
  24. package/FillerGauge.js.map +1 -1
  25. package/Image.config.js +1 -1
  26. package/Image.js +23 -13
  27. package/Image.js.map +1 -1
  28. package/Line.config.js +1 -1
  29. package/Line.js +234 -257
  30. package/Line.js.map +1 -1
  31. package/LinkGraph.config.js +1 -1
  32. package/LinkGraph.js +24 -14
  33. package/LinkGraph.js.map +1 -1
  34. package/Map.config.js +3 -2
  35. package/Map.config.js.map +1 -1
  36. package/Map.js +31 -20
  37. package/Map.js.map +1 -1
  38. package/Markdown.config.js +1 -1
  39. package/Markdown.js +20 -10
  40. package/Markdown.js.map +1 -1
  41. package/MarkerGauge.config.js +1 -1
  42. package/MarkerGauge.js +20 -10
  43. package/MarkerGauge.js.map +1 -1
  44. package/ParallelCoordinates.config.js +1 -1
  45. package/ParallelCoordinates.js +20 -10
  46. package/ParallelCoordinates.js.map +1 -1
  47. package/Pie.config.js +1 -1
  48. package/Pie.js +29 -19
  49. package/Pie.js.map +1 -1
  50. package/Punchcard.config.js +1 -1
  51. package/Punchcard.js +23 -12
  52. package/Punchcard.js.map +1 -1
  53. package/Rectangle.config.js +1 -1
  54. package/Rectangle.js +20 -10
  55. package/Rectangle.js.map +1 -1
  56. package/Sankey.config.js +1 -1
  57. package/Sankey.js +20 -10
  58. package/Sankey.js.map +1 -1
  59. package/Scatter.config.js +1 -1
  60. package/Scatter.js +30 -20
  61. package/Scatter.js.map +1 -1
  62. package/SingleValue.config.js +1 -1
  63. package/SingleValue.js +19 -9
  64. package/SingleValue.js.map +1 -1
  65. package/SingleValueBasic.js +1 -1
  66. package/SingleValueIcon.config.js +1 -1
  67. package/SingleValueIcon.js +29 -19
  68. package/SingleValueIcon.js.map +1 -1
  69. package/SingleValueRadial.config.js +1 -1
  70. package/SingleValueRadial.js +21 -11
  71. package/SingleValueRadial.js.map +1 -1
  72. package/SparkLine.js +1 -1
  73. package/Table.config.js +1 -1
  74. package/Table.js +37 -27
  75. package/Table.js.map +1 -1
  76. package/common/Charting.js +45 -34
  77. package/common/Charting.js.map +1 -1
  78. package/common/ChartingApi.js +7 -7
  79. package/common/ChartingApi.js.map +1 -1
  80. package/common/DocExampleWithVizSandbox.js +530 -0
  81. package/common/DocExampleWithVizSandbox.js.map +1 -0
  82. package/common/EventsDoc.js +63 -82
  83. package/common/EventsDoc.js.map +1 -1
  84. package/common/GaugeMajorTicks.js +11 -11
  85. package/common/GaugeMajorTicks.js.map +1 -1
  86. package/common/GaugeValueMarker.js +11 -11
  87. package/common/GaugeValueMarker.js.map +1 -1
  88. package/common/OptionsDoc.js +22 -22
  89. package/common/OptionsDoc.js.map +1 -1
  90. package/common/OverviewDoc.js +498 -64
  91. package/common/OverviewDoc.js.map +1 -1
  92. package/common/SplunkVisualization.js +17 -17
  93. package/common/SplunkVisualization.js.map +1 -1
  94. package/common/SplunkVisualizationApi.js +7 -7
  95. package/common/SplunkVisualizationApi.js.map +1 -1
  96. package/common/ThemesDoc.js +30 -30
  97. package/common/ThemesDoc.js.map +1 -1
  98. package/common/chartingUtils.js +8 -8
  99. package/common/chartingUtils.js.map +1 -1
  100. package/common/docUtils.js +128 -6
  101. package/common/docUtils.js.map +1 -1
  102. package/common/gaugeUtils.js +12 -12
  103. package/common/gaugeUtils.js.map +1 -1
  104. package/common/shapeUtils.js +15 -15
  105. package/common/shapeUtils.js.map +1 -1
  106. package/common/utils/configUtils.js +1 -1
  107. package/common/utils/dataUtils.js +1 -1
  108. package/common/utils/hocUtils.js +1 -1
  109. package/common/utils/layoutUtils.js +1 -1
  110. package/common/utils/mapUtils.js +1 -1
  111. package/common/utils/singleValueUtils.js +1 -1
  112. package/common/utils/testHelper.js +1 -1
  113. package/common/utils/trellisUtils.js +1 -1
  114. package/common/utils/urlUtils.js +1 -1
  115. package/common/withDashboardViz.js +119 -101
  116. package/common/withDashboardViz.js.map +1 -1
  117. package/package.json +14 -20
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright © 2018 Splunk Inc.
2
+ * Copyright © 2024 Splunk Inc.
3
3
  * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
4
4
  * in part without a valid written license from Splunk Inc. is PROHIBITED.
5
5
  */
@@ -87,55 +87,505 @@ module.exports =
87
87
  /******/
88
88
  /******/
89
89
  /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 54);
90
+ /******/ return __webpack_require__(__webpack_require__.s = 65);
91
91
  /******/ })
92
92
  /************************************************************************/
93
- /******/ ({
94
-
95
- /***/ 0:
93
+ /******/ ([
94
+ /* 0 */
96
95
  /***/ (function(module, exports) {
97
96
 
98
97
  module.exports = require("react");
99
98
 
100
99
  /***/ }),
101
-
102
- /***/ 1:
100
+ /* 1 */
103
101
  /***/ (function(module, exports) {
104
102
 
105
103
  module.exports = require("prop-types");
106
104
 
107
105
  /***/ }),
108
-
109
- /***/ 2:
106
+ /* 2 */
110
107
  /***/ (function(module, exports) {
111
108
 
112
109
  module.exports = require("styled-components");
113
110
 
114
111
  /***/ }),
112
+ /* 3 */,
113
+ /* 4 */
114
+ /***/ (function(module, exports) {
115
+
116
+ module.exports = require("@splunk/ui-utils/i18n");
115
117
 
116
- /***/ 23:
118
+ /***/ }),
119
+ /* 5 */,
120
+ /* 6 */
117
121
  /***/ (function(module, exports) {
118
122
 
119
- module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
123
+ module.exports = require("@splunk/react-ui/Heading");
120
124
 
121
125
  /***/ }),
126
+ /* 7 */,
127
+ /* 8 */
128
+ /***/ (function(module, exports) {
129
+
130
+ module.exports = require("@babel/runtime/helpers/slicedToArray");
122
131
 
123
- /***/ 5:
132
+ /***/ }),
133
+ /* 9 */
124
134
  /***/ (function(module, exports) {
125
135
 
126
- module.exports = require("@splunk/react-ui/Heading");
136
+ module.exports = require("@babel/runtime/helpers/defineProperty");
137
+
138
+ /***/ }),
139
+ /* 10 */,
140
+ /* 11 */,
141
+ /* 12 */,
142
+ /* 13 */,
143
+ /* 14 */,
144
+ /* 15 */,
145
+ /* 16 */,
146
+ /* 17 */
147
+ /***/ (function(module, exports, __webpack_require__) {
148
+
149
+ "use strict";
150
+
151
+
152
+ Object.defineProperty(exports, "__esModule", {
153
+ value: true
154
+ });
155
+ exports.convertToDashboardJSON = exports.extractDataFromReactCode = exports.formatCodeStringToObject = exports.extractDocItems = exports.getFormatterClassdesc = void 0;
156
+
157
+ var React = __webpack_require__(0);
158
+
159
+ var UtilPage_1 = __webpack_require__(18);
160
+
161
+ var sharedSelectors = ['getField', 'getType', 'min', 'max'];
162
+
163
+ var formatSidebarItemName = function formatSidebarItemName(name, className) {
164
+ return sharedSelectors.find(function (sharedSelector) {
165
+ return name === sharedSelector;
166
+ }) ? "".concat(className, "#").concat(name) : name;
167
+ };
168
+
169
+ var removePrependedClassName = function removePrependedClassName() {
170
+ var longname = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
171
+ return longname.slice(longname.indexOf('#') + 1);
172
+ };
173
+
174
+ var formatDSLSelectorDocs = function formatDSLSelectorDocs(docs) {
175
+ return docs.map(function (doc) {
176
+ return Object.assign(Object.assign({}, doc), {
177
+ longname: removePrependedClassName(doc.longname)
178
+ });
179
+ });
180
+ };
181
+
182
+ var getFormatterClassdesc = function getFormatterClassdesc(formatterDocs, name) {
183
+ return {
184
+ name: name,
185
+ markdown: "# ".concat(name, "\n ").concat(formatterDocs.find(function (doc) {
186
+ return doc.name === name && doc.kind === 'class';
187
+ }).classdesc)
188
+ };
189
+ };
190
+
191
+ exports.getFormatterClassdesc = getFormatterClassdesc;
192
+
193
+ var extractDocItems = function extractDocItems(docs, className) {
194
+ var classHeaderDoc = docs[0];
195
+ var fileDoc = docs[docs.length - 1];
196
+ var filteredDocs = formatDSLSelectorDocs(docs).filter(function (_ref) {
197
+ var access = _ref.access,
198
+ comment = _ref.comment;
199
+ return access === 'public' && comment;
200
+ });
201
+ return filteredDocs.map(function (doc) {
202
+ return {
203
+ name: formatSidebarItemName(doc.name, className),
204
+ component: function UtilDoc() {
205
+ // named function so linter doesnt raise react/display-name error
206
+ return React.createElement(UtilPage_1.default, {
207
+ title: "".concat(className, "#").concat(doc.name),
208
+ status: 1,
209
+ docs: [classHeaderDoc, doc, fileDoc]
210
+ });
211
+ }
212
+ };
213
+ }).sort(function (a, b) {
214
+ return a.name.localeCompare(b.name);
215
+ });
216
+ };
217
+
218
+ exports.extractDocItems = extractDocItems;
219
+
220
+ var formatCodeStringToObject = function formatCodeStringToObject(codeString, regexMatch) {
221
+ var match = regexMatch.exec(codeString);
222
+ if (!match) return null;
223
+ var stringToParse = "{".concat(match[1], "}"); // remove trailing commas
224
+
225
+ var removedCommas = stringToParse.replace(/,(?!\s*?[-{["'\w])/g, ''); // convert double quotes (which only occur inside strings) to back quotes
226
+
227
+ var backQuotes = removedCommas.replace(/"/g, '`'); // replace single quotes with double quotes
228
+
229
+ var doubleQuotes = backQuotes.replace(/'/g, '"'); // replace back quotes with single quotes
230
+
231
+ var singleQuotes = doubleQuotes.replace(/`/g, "'"); // add quotes around keys
232
+
233
+ var quotesAroundKeys = singleQuotes.replace(/\b(\w+)\s*:(?=\s)/g, '"$1":');
234
+ var retval = null;
235
+
236
+ try {
237
+ retval = JSON.parse(quotesAroundKeys);
238
+ } catch (e) {
239
+ // eslint-disable-next-line no-console
240
+ console.error(e);
241
+ }
242
+
243
+ return retval;
244
+ };
245
+
246
+ exports.formatCodeStringToObject = formatCodeStringToObject;
247
+
248
+ var extractDataFromReactCode = function extractDataFromReactCode(codeString) {
249
+ var _a;
250
+
251
+ var primaryRegex = /dataSources={{([\s\S]*?primary:[\s\S]*?)}}/;
252
+
253
+ var _ref2 = (_a = (0, exports.formatCodeStringToObject)(codeString, primaryRegex)) !== null && _a !== void 0 ? _a : {},
254
+ primary = _ref2.primary;
255
+
256
+ var optionsRegex = /options={{([\s\S]*?)}}/;
257
+ var options = (0, exports.formatCodeStringToObject)(codeString, optionsRegex);
258
+ var contextRegex = /context={{([\s\S]*?)}}/;
259
+ var context = (0, exports.formatCodeStringToObject)(codeString, contextRegex);
260
+ return {
261
+ primary: primary,
262
+ options: options,
263
+ context: context
264
+ };
265
+ };
266
+
267
+ exports.extractDataFromReactCode = extractDataFromReactCode; // Takes a stringified react viz example and a viz type
268
+ // Returns a dashboard definition object.
269
+ // e.g. codeString: '<Area dataSources={{}} options={{}} />'
270
+ // type: 'splunk.area'
271
+
272
+ var convertToDashboardJSON = function convertToDashboardJSON(codeString, type) {
273
+ var _ref3 = (0, exports.extractDataFromReactCode)(codeString),
274
+ options = _ref3.options,
275
+ primary = _ref3.primary,
276
+ context = _ref3.context;
277
+
278
+ return Object.assign(Object.assign({
279
+ visualizations: {
280
+ test_viz: Object.assign(Object.assign(Object.assign({
281
+ type: type
282
+ }, options ? {
283
+ options: options
284
+ } : {}), primary ? {
285
+ dataSources: {
286
+ primary: 'primary'
287
+ }
288
+ } : {}), context ? {
289
+ context: context
290
+ } : {})
291
+ }
292
+ }, primary ? {
293
+ dataSources: {
294
+ primary: {
295
+ type: 'ds.test',
296
+ options: primary
297
+ }
298
+ }
299
+ } : {}), {
300
+ defaults: {
301
+ dataSources: {
302
+ global: {
303
+ options: {
304
+ queryParameters: {
305
+ latest: '$global_time.latest$',
306
+ earliest: '$global_time.earliest$'
307
+ }
308
+ }
309
+ }
310
+ }
311
+ },
312
+ inputs: {
313
+ input_global_trp: {
314
+ type: 'input.timerange',
315
+ options: {
316
+ token: 'global_time',
317
+ defaultValue: '-24h@h,now'
318
+ },
319
+ title: 'Global Time Range'
320
+ }
321
+ },
322
+ layout: {
323
+ type: 'absolute',
324
+ options: {},
325
+ structure: [{
326
+ item: 'test_viz',
327
+ type: 'block',
328
+ position: {
329
+ x: 0,
330
+ y: 0,
331
+ w: 800,
332
+ h: 500
333
+ }
334
+ }],
335
+ globalInputs: ['input_global_trp']
336
+ }
337
+ });
338
+ };
339
+
340
+ exports.convertToDashboardJSON = convertToDashboardJSON;
127
341
 
128
342
  /***/ }),
343
+ /* 18 */
344
+ /***/ (function(module, exports) {
345
+
346
+ module.exports = require("@splunk/react-docs/UtilPage");
129
347
 
130
- /***/ 54:
348
+ /***/ }),
349
+ /* 19 */,
350
+ /* 20 */,
351
+ /* 21 */,
352
+ /* 22 */,
353
+ /* 23 */,
354
+ /* 24 */,
355
+ /* 25 */
131
356
  /***/ (function(module, exports, __webpack_require__) {
132
357
 
133
358
  "use strict";
134
359
 
135
360
 
136
- var _taggedTemplateLiteral = __webpack_require__(23);
361
+ var _slicedToArray = __webpack_require__(8);
362
+
363
+ Object.defineProperty(exports, "__esModule", {
364
+ value: true
365
+ });
366
+
367
+ var React = __webpack_require__(0);
368
+
369
+ var DocExample_1 = __webpack_require__(26);
137
370
 
138
- var _defineProperty = __webpack_require__(8);
371
+ var Button_1 = __webpack_require__(27);
372
+
373
+ var Code_1 = __webpack_require__(28);
374
+
375
+ var TransitionOpen_1 = __webpack_require__(29);
376
+
377
+ var SquaresLayered_1 = __webpack_require__(30);
378
+
379
+ var Checkmark_1 = __webpack_require__(31);
380
+
381
+ var EyeSlashed_1 = __webpack_require__(32);
382
+
383
+ var WindowChevronsSlash_1 = __webpack_require__(33);
384
+
385
+ var i18n_1 = __webpack_require__(4);
386
+
387
+ var T = __webpack_require__(1);
388
+
389
+ var docUtils_1 = __webpack_require__(17);
390
+
391
+ var DocExampleWithVizSandbox = function DocExampleWithVizSandbox(props) {
392
+ var type = props.type,
393
+ title = props.title,
394
+ code = props.code,
395
+ example = props.example,
396
+ _props$hideSandbox = props.hideSandbox,
397
+ hideSandbox = _props$hideSandbox === void 0 ? false : _props$hideSandbox,
398
+ description = props.description;
399
+
400
+ var _React$useState = React.useState(false),
401
+ _React$useState2 = _slicedToArray(_React$useState, 2),
402
+ isCopied = _React$useState2[0],
403
+ setIsCopied = _React$useState2[1];
404
+
405
+ var _React$useState3 = React.useState(false),
406
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
407
+ showCode = _React$useState4[0],
408
+ setShowCode = _React$useState4[1];
409
+
410
+ var isMounted = React.useRef(true);
411
+ var toggleShowCode = React.useCallback(function () {
412
+ setShowCode(function (state) {
413
+ return !state;
414
+ });
415
+ }, []);
416
+ React.useEffect(function () {
417
+ return function () {
418
+ isMounted.current = false;
419
+ setIsCopied(false);
420
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
421
+ }, []);
422
+ if (hideSandbox) return React.createElement(DocExample_1.default, {
423
+ title: title,
424
+ code: code,
425
+ example: example
426
+ });
427
+ var objDefn = (0, docUtils_1.convertToDashboardJSON)(code, type); // set spacing level to 4
428
+
429
+ var prettyJson = JSON.stringify(objDefn, null, 4);
430
+
431
+ var copyToClipBoard = function copyToClipBoard() {
432
+ if ('clipboard' in navigator) {
433
+ navigator.clipboard.writeText(prettyJson);
434
+ setIsCopied(true);
435
+ }
436
+
437
+ setTimeout(function () {
438
+ if (isMounted.current) {
439
+ setIsCopied(false);
440
+ }
441
+ }, 5000);
442
+ };
443
+
444
+ var renderAdditionalActions = function renderAdditionalActions() {
445
+ return [React.createElement(Button_1.default, {
446
+ key: "show-dashboard-definition",
447
+ appearance: "toggle",
448
+ onClick: toggleShowCode,
449
+ icon: showCode ? React.createElement(EyeSlashed_1.default, null) : React.createElement(WindowChevronsSlash_1.default, null),
450
+ label: showCode ? (0, i18n_1._)('Hide dashboard definition') : (0, i18n_1._)('Show dashboard definition')
451
+ })];
452
+ };
453
+
454
+ return React.createElement(DocExample_1.default, {
455
+ renderAdditionalActions: renderAdditionalActions,
456
+ title: title,
457
+ code: code,
458
+ example: example,
459
+ description: description
460
+ }, React.createElement(TransitionOpen_1.default, {
461
+ animation: "slideFromTop",
462
+ open: showCode,
463
+ retainFocus: false,
464
+ takeFocus: false,
465
+ renderChildrenWhenCollapsed: false,
466
+ animateOnMount: false
467
+ }, React.createElement("div", {
468
+ style: {
469
+ display: 'flex',
470
+ justifyContent: 'space-between'
471
+ }
472
+ }, React.createElement(Code_1.default, {
473
+ value: prettyJson,
474
+ language: "json"
475
+ }), React.createElement(Button_1.default, {
476
+ onClick: copyToClipBoard,
477
+ icon: isCopied ? React.createElement(Checkmark_1.default, null) : React.createElement(SquaresLayered_1.default, null),
478
+ label: isCopied ? (0, i18n_1._)('Copied') : (0, i18n_1._)('Copy to clipboard'),
479
+ style: {
480
+ height: '30px',
481
+ maxWidth: '164px'
482
+ }
483
+ }))));
484
+ };
485
+
486
+ DocExampleWithVizSandbox.propTypes = {
487
+ type: T.string,
488
+ title: T.string,
489
+ code: T.string,
490
+ example: T.func,
491
+ hideSandbox: T.bool
492
+ };
493
+ exports.default = DocExampleWithVizSandbox;
494
+
495
+ /***/ }),
496
+ /* 26 */
497
+ /***/ (function(module, exports) {
498
+
499
+ module.exports = require("@splunk/react-docs/DocExample");
500
+
501
+ /***/ }),
502
+ /* 27 */
503
+ /***/ (function(module, exports) {
504
+
505
+ module.exports = require("@splunk/react-ui/Button");
506
+
507
+ /***/ }),
508
+ /* 28 */
509
+ /***/ (function(module, exports) {
510
+
511
+ module.exports = require("@splunk/react-ui/Code");
512
+
513
+ /***/ }),
514
+ /* 29 */
515
+ /***/ (function(module, exports) {
516
+
517
+ module.exports = require("@splunk/react-ui/TransitionOpen");
518
+
519
+ /***/ }),
520
+ /* 30 */
521
+ /***/ (function(module, exports) {
522
+
523
+ module.exports = require("@splunk/react-icons/SquaresLayered");
524
+
525
+ /***/ }),
526
+ /* 31 */
527
+ /***/ (function(module, exports) {
528
+
529
+ module.exports = require("@splunk/react-icons/Checkmark");
530
+
531
+ /***/ }),
532
+ /* 32 */
533
+ /***/ (function(module, exports) {
534
+
535
+ module.exports = require("@splunk/react-icons/EyeSlashed");
536
+
537
+ /***/ }),
538
+ /* 33 */
539
+ /***/ (function(module, exports) {
540
+
541
+ module.exports = require("@splunk/react-icons/WindowChevronsSlash");
542
+
543
+ /***/ }),
544
+ /* 34 */
545
+ /***/ (function(module, exports) {
546
+
547
+ module.exports = require("@babel/runtime/helpers/taggedTemplateLiteral");
548
+
549
+ /***/ }),
550
+ /* 35 */,
551
+ /* 36 */,
552
+ /* 37 */,
553
+ /* 38 */,
554
+ /* 39 */,
555
+ /* 40 */,
556
+ /* 41 */,
557
+ /* 42 */,
558
+ /* 43 */,
559
+ /* 44 */,
560
+ /* 45 */,
561
+ /* 46 */,
562
+ /* 47 */,
563
+ /* 48 */,
564
+ /* 49 */,
565
+ /* 50 */,
566
+ /* 51 */,
567
+ /* 52 */,
568
+ /* 53 */,
569
+ /* 54 */,
570
+ /* 55 */,
571
+ /* 56 */,
572
+ /* 57 */,
573
+ /* 58 */,
574
+ /* 59 */,
575
+ /* 60 */,
576
+ /* 61 */,
577
+ /* 62 */,
578
+ /* 63 */,
579
+ /* 64 */,
580
+ /* 65 */
581
+ /***/ (function(module, exports, __webpack_require__) {
582
+
583
+ "use strict";
584
+
585
+
586
+ var _taggedTemplateLiteral = __webpack_require__(34);
587
+
588
+ var _defineProperty = __webpack_require__(9);
139
589
 
140
590
  var _chipType, _templateObject;
141
591
 
@@ -149,27 +599,27 @@ var T = __webpack_require__(1);
149
599
 
150
600
  var styled_components_1 = __webpack_require__(2);
151
601
 
152
- var DocExample_1 = __webpack_require__(55);
602
+ var Paragraph_1 = __webpack_require__(66);
153
603
 
154
- var Paragraph_1 = __webpack_require__(56);
604
+ var Heading_1 = __webpack_require__(6);
155
605
 
156
- var Heading_1 = __webpack_require__(5);
606
+ var List_1 = __webpack_require__(67);
157
607
 
158
- var List_1 = __webpack_require__(57);
608
+ var Chip_1 = __webpack_require__(68);
159
609
 
160
- var Chip_1 = __webpack_require__(58);
610
+ var ChartLine_1 = __webpack_require__(69);
161
611
 
162
- var ChartLine_1 = __webpack_require__(59);
612
+ var ChartBar_1 = __webpack_require__(70);
163
613
 
164
- var ChartBar_1 = __webpack_require__(60);
614
+ var ChartScatter_1 = __webpack_require__(71);
165
615
 
166
- var ChartScatter_1 = __webpack_require__(61);
616
+ var ChoroplethMap_1 = __webpack_require__(72);
167
617
 
168
- var ChoroplethMap_1 = __webpack_require__(62);
618
+ var SplitBy_1 = __webpack_require__(73);
169
619
 
170
- var SplitBy_1 = __webpack_require__(63);
620
+ var VizCategory_1 = __webpack_require__(74);
171
621
 
172
- var VizCategory_1 = __webpack_require__(64);
622
+ var DocExampleWithVizSandbox_1 = __webpack_require__(25);
173
623
 
174
624
  var chipIconStyles = {
175
625
  color: 'white'
@@ -204,10 +654,15 @@ var StyledChip = (0, styled_components_1.default)(Chip_1.default)(_templateObjec
204
654
 
205
655
  var Variations = function Variations(_ref) {
206
656
  var variations = _ref.variations,
207
- variationCode = _ref.variationCode;
657
+ variationCode = _ref.variationCode,
658
+ type = _ref.type;
208
659
  return React.createElement(React.Fragment, null, variations.map(function (v) {
660
+ var _a;
661
+
209
662
  var variationObj = variationCode[v.key];
210
- return React.createElement(DocExample_1.default, Object.assign({
663
+ return React.createElement(DocExampleWithVizSandbox_1.default, Object.assign({
664
+ hideSandbox: (_a = v.hideSandbox) !== null && _a !== void 0 ? _a : false,
665
+ type: type,
211
666
  key: v.key,
212
667
  code: variationObj.code,
213
668
  example: variationObj.example
@@ -217,7 +672,8 @@ var Variations = function Variations(_ref) {
217
672
 
218
673
  Variations.propTypes = {
219
674
  variations: T.array,
220
- variationCode: T.object
675
+ variationCode: T.object,
676
+ type: T.string
221
677
  };
222
678
 
223
679
  var Tip = function Tip(_ref2) {
@@ -250,6 +706,7 @@ var OverviewDoc = function OverviewDoc(props) {
250
706
 
251
707
  var _props$overview = props.overview,
252
708
  typeOfViz = _props$overview.typeOfViz,
709
+ type = _props$overview.type,
253
710
  overview = _props$overview.overview,
254
711
  tips = _props$overview.tips,
255
712
  variations = _props$overview.variations;
@@ -267,6 +724,7 @@ var OverviewDoc = function OverviewDoc(props) {
267
724
  tips: tips
268
725
  }), variationCode && React.createElement(Variations, {
269
726
  variations: variations,
727
+ type: type,
270
728
  variationCode: variationCode
271
729
  }));
272
730
  };
@@ -278,71 +736,55 @@ OverviewDoc.propTypes = {
278
736
  exports.default = OverviewDoc;
279
737
 
280
738
  /***/ }),
281
-
282
- /***/ 55:
283
- /***/ (function(module, exports) {
284
-
285
- module.exports = require("@splunk/react-docs/DocExample");
286
-
287
- /***/ }),
288
-
289
- /***/ 56:
739
+ /* 66 */
290
740
  /***/ (function(module, exports) {
291
741
 
292
742
  module.exports = require("@splunk/react-ui/Paragraph");
293
743
 
294
744
  /***/ }),
295
-
296
- /***/ 57:
745
+ /* 67 */
297
746
  /***/ (function(module, exports) {
298
747
 
299
748
  module.exports = require("@splunk/react-ui/List");
300
749
 
301
750
  /***/ }),
302
-
303
- /***/ 58:
751
+ /* 68 */
304
752
  /***/ (function(module, exports) {
305
753
 
306
754
  module.exports = require("@splunk/react-ui/Chip");
307
755
 
308
756
  /***/ }),
309
-
310
- /***/ 59:
757
+ /* 69 */
311
758
  /***/ (function(module, exports) {
312
759
 
313
760
  module.exports = require("@splunk/react-icons/enterprise/ChartLine");
314
761
 
315
762
  /***/ }),
316
-
317
- /***/ 60:
763
+ /* 70 */
318
764
  /***/ (function(module, exports) {
319
765
 
320
766
  module.exports = require("@splunk/react-icons/enterprise/ChartBar");
321
767
 
322
768
  /***/ }),
323
-
324
- /***/ 61:
769
+ /* 71 */
325
770
  /***/ (function(module, exports) {
326
771
 
327
772
  module.exports = require("@splunk/react-icons/enterprise/ChartScatter");
328
773
 
329
774
  /***/ }),
330
-
331
- /***/ 62:
775
+ /* 72 */
332
776
  /***/ (function(module, exports) {
333
777
 
334
778
  module.exports = require("@splunk/react-icons/enterprise/ChoroplethMap");
335
779
 
336
780
  /***/ }),
337
-
338
- /***/ 63:
781
+ /* 73 */
339
782
  /***/ (function(module, exports) {
340
783
 
341
784
  module.exports = require("@splunk/react-icons/enterprise/SplitBy");
342
785
 
343
786
  /***/ }),
344
-
345
- /***/ 64:
787
+ /* 74 */
346
788
  /***/ (function(module, exports, __webpack_require__) {
347
789
 
348
790
  "use strict";
@@ -369,14 +811,6 @@ var VizCategory;
369
811
  VizCategory["SPATIAL"] = "Spatial";
370
812
  })(VizCategory = exports.VizCategory || (exports.VizCategory = {}));
371
813
 
372
- /***/ }),
373
-
374
- /***/ 8:
375
- /***/ (function(module, exports) {
376
-
377
- module.exports = require("@babel/runtime/helpers/defineProperty");
378
-
379
814
  /***/ })
380
-
381
- /******/ });
815
+ /******/ ]);
382
816
  //# sourceMappingURL=OverviewDoc.js.map