@splunk/visualizations 25.0.0 → 25.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_basic.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_dynamic_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_marker_layer_static_color_with_no_seriesColors.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_off.png +0 -0
- package/.loki/reference/chrome_docker_PureVisualizations_PureMap_scale_unit_metric.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Area_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bar_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Bubble_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_ChoroplethSvg_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Column_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Ellipse_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_FillerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Image_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Line_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Markdown_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_MarkerGauge_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Parallel_Coordinates_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Pie_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Punchcard_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Rectangle_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Sankey_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Scatter_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Icon_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Single_Value_Radial_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Table_Editor.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_datasource_does_not_have_any_data.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Line_Line_Placeholder_if_viz_does_not_connect_to_datasource.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Basic_Map.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_GET_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Internal_Fields.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_By_Static_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Bubble_Layer_Geostats_Dynamic_Coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Dynamic_coloring.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Marker_layer_Result_Limit_Set_To_3.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Restricted_Zoom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Map_Map_Set_Map_tiles.png +0 -0
- package/Area.config.js +26 -1
- package/Area.config.js.map +1 -1
- package/Area.js +49 -23
- package/Area.js.map +1 -1
- package/Bar.config.js +26 -1
- package/Bar.config.js.map +1 -1
- package/Bar.js +49 -23
- package/Bar.js.map +1 -1
- package/Bubble.config.js +26 -1
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +49 -23
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +27 -3
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +73 -48
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +26 -1
- package/Column.config.js.map +1 -1
- package/Column.js +49 -23
- package/Column.js.map +1 -1
- package/Ellipse.config.js +26 -1
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +58 -32
- package/Ellipse.js.map +1 -1
- package/FillerGauge.config.js +27 -2
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +60 -34
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +27 -3
- package/Image.config.js.map +1 -1
- package/Image.js +58 -34
- package/Image.js.map +1 -1
- package/Line.config.js +26 -1
- package/Line.config.js.map +1 -1
- package/Line.js +49 -23
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +26 -1
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +87 -61
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +42 -5
- package/Map.config.js.map +1 -1
- package/Map.js +100 -60
- package/Map.js.map +1 -1
- package/Markdown.config.js +28 -5
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +58 -35
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +31 -7
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +2939 -3022
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +35 -10
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +61 -35
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +32 -8
- package/Pie.config.js.map +1 -1
- package/Pie.js +2242 -2330
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +28 -5
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +72 -48
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +28 -3
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +155 -130
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +30 -5
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +107 -82
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +29 -3
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +47 -22
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +33 -7
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +63 -38
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +2 -2
- package/SingleValueIcon.config.js +31 -5
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +71 -45
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +160 -165
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +112 -87
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +31 -6
- package/Table.config.js.map +1 -1
- package/Table.js +249 -224
- package/Table.js.map +1 -1
- package/common/OptionsDoc.js +26 -1
- package/common/OptionsDoc.js.map +1 -1
- package/common/utils/configUtils.js +26 -1
- package/common/utils/configUtils.js.map +1 -1
- package/common/withDashboardViz.js +2 -2
- package/package.json +10 -10
package/Sankey.js
CHANGED
|
@@ -87,7 +87,7 @@ module.exports =
|
|
|
87
87
|
/******/
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Load entry module and return exports
|
|
90
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 245);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
@@ -184,7 +184,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
184
184
|
Object.defineProperty(exports, "__esModule", {
|
|
185
185
|
value: true
|
|
186
186
|
});
|
|
187
|
-
exports.insertLayout = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
187
|
+
exports.insertLayout = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.isDynamicOption = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
188
188
|
|
|
189
189
|
var lodash_1 = __webpack_require__(2);
|
|
190
190
|
|
|
@@ -259,8 +259,10 @@ function enhanceOptionsSchemaWithDynamicOptions(optionsSchema) {
|
|
|
259
259
|
exports.enhanceOptionsSchemaWithDynamicOptions = enhanceOptionsSchemaWithDynamicOptions;
|
|
260
260
|
/**
|
|
261
261
|
* Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block
|
|
262
|
+
* this function also collapse all editor panels
|
|
262
263
|
* @param vizConfig a Visualization Config
|
|
263
264
|
* @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports
|
|
265
|
+
* and containing `open: false` for all editor panels in editorConfig
|
|
264
266
|
*/
|
|
265
267
|
|
|
266
268
|
function enhanceConfig(vizConfig) {
|
|
@@ -270,10 +272,33 @@ function enhanceConfig(vizConfig) {
|
|
|
270
272
|
enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);
|
|
271
273
|
}
|
|
272
274
|
|
|
275
|
+
enhancedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
276
|
+
return Object.assign(Object.assign({}, config), {
|
|
277
|
+
open: false
|
|
278
|
+
});
|
|
279
|
+
});
|
|
273
280
|
return enhancedConfig;
|
|
274
281
|
}
|
|
275
282
|
|
|
276
283
|
exports.enhanceConfig = enhanceConfig;
|
|
284
|
+
/**
|
|
285
|
+
* Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig
|
|
286
|
+
* Created for editor unit tests
|
|
287
|
+
* @param vizConfig a Visualization Config
|
|
288
|
+
* @returns a Visualization Config containing `open: true` for all editor panels in editorConfig
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
function uncollapseEditorConfig(vizConfig) {
|
|
292
|
+
var editorPanelUncollapsedConfig = vizConfig;
|
|
293
|
+
editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(function (config) {
|
|
294
|
+
return Object.assign(Object.assign({}, config), {
|
|
295
|
+
open: true
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
return editorPanelUncollapsedConfig;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
exports.uncollapseEditorConfig = uncollapseEditorConfig;
|
|
277
302
|
|
|
278
303
|
function isDynamicOption(option) {
|
|
279
304
|
return option && typeof option === 'string' && option.trim().startsWith('>') || false;
|
|
@@ -381,7 +406,7 @@ module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
|
381
406
|
"use strict";
|
|
382
407
|
|
|
383
408
|
|
|
384
|
-
var _typeof = __webpack_require__(
|
|
409
|
+
var _typeof = __webpack_require__(25);
|
|
385
410
|
|
|
386
411
|
Object.defineProperty(exports, "__esModule", {
|
|
387
412
|
value: true
|
|
@@ -566,7 +591,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
566
591
|
|
|
567
592
|
return React.createElement(FixSizeItem, {
|
|
568
593
|
"data-test": "fix-size-item",
|
|
569
|
-
"data-splunk-visualization-version": "25.0.
|
|
594
|
+
"data-splunk-visualization-version": "25.0.1 - de10ad954",
|
|
570
595
|
width: width,
|
|
571
596
|
height: height,
|
|
572
597
|
backgroundColor: backgroundColor
|
|
@@ -623,16 +648,10 @@ module.exports = require("@splunk/visualization-context/TimezoneContext");
|
|
|
623
648
|
/* 23 */
|
|
624
649
|
/***/ (function(module, exports) {
|
|
625
650
|
|
|
626
|
-
module.exports = require("@babel/runtime/helpers/typeof");
|
|
627
|
-
|
|
628
|
-
/***/ }),
|
|
629
|
-
/* 24 */
|
|
630
|
-
/***/ (function(module, exports) {
|
|
631
|
-
|
|
632
651
|
module.exports = require("@splunk/visualizations-shared/numberUtils");
|
|
633
652
|
|
|
634
653
|
/***/ }),
|
|
635
|
-
/*
|
|
654
|
+
/* 24 */
|
|
636
655
|
/***/ (function(module, exports, __webpack_require__) {
|
|
637
656
|
|
|
638
657
|
"use strict";
|
|
@@ -664,6 +683,12 @@ var pickFieldFromJSONSchema = function pickFieldFromJSONSchema(optionsSchema) {
|
|
|
664
683
|
|
|
665
684
|
exports.pickFieldFromJSONSchema = pickFieldFromJSONSchema;
|
|
666
685
|
|
|
686
|
+
/***/ }),
|
|
687
|
+
/* 25 */
|
|
688
|
+
/***/ (function(module, exports) {
|
|
689
|
+
|
|
690
|
+
module.exports = require("@babel/runtime/helpers/typeof");
|
|
691
|
+
|
|
667
692
|
/***/ }),
|
|
668
693
|
/* 26 */
|
|
669
694
|
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -954,7 +979,7 @@ var getPagination_1 = __webpack_require__(28);
|
|
|
954
979
|
|
|
955
980
|
var useDeepMemo_1 = __webpack_require__(38);
|
|
956
981
|
|
|
957
|
-
var JSONSchemaUtils_1 = __webpack_require__(
|
|
982
|
+
var JSONSchemaUtils_1 = __webpack_require__(24);
|
|
958
983
|
|
|
959
984
|
var MissingPropsMessage_1 = __webpack_require__(39);
|
|
960
985
|
|
|
@@ -1534,7 +1559,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
1534
1559
|
componentId: "sc-1gsbnxb-0"
|
|
1535
1560
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
1536
1561
|
var Blocker = styled_components_1.default.div.attrs({
|
|
1537
|
-
'data-splunk-visualization-version': "25.0.
|
|
1562
|
+
'data-splunk-visualization-version': "25.0.1 - de10ad954"
|
|
1538
1563
|
}).withConfig({
|
|
1539
1564
|
displayName: "withEditModeCover__Blocker",
|
|
1540
1565
|
componentId: "sc-1gsbnxb-1"
|
|
@@ -1772,6 +1797,12 @@ module.exports = require("d3-scale");
|
|
|
1772
1797
|
/* 86 */,
|
|
1773
1798
|
/* 87 */,
|
|
1774
1799
|
/* 88 */
|
|
1800
|
+
/***/ (function(module, exports) {
|
|
1801
|
+
|
|
1802
|
+
module.exports = require("@splunk/visualization-encoding/utils/types");
|
|
1803
|
+
|
|
1804
|
+
/***/ }),
|
|
1805
|
+
/* 89 */
|
|
1775
1806
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1776
1807
|
|
|
1777
1808
|
"use strict";
|
|
@@ -1807,17 +1838,17 @@ var style_1 = __webpack_require__(15);
|
|
|
1807
1838
|
var visualization_color_palettes_1 = __webpack_require__(44); // eslint-disable-next-line camelcase
|
|
1808
1839
|
|
|
1809
1840
|
|
|
1810
|
-
var sankey_1 = __webpack_require__(
|
|
1841
|
+
var sankey_1 = __webpack_require__(246);
|
|
1811
1842
|
|
|
1812
1843
|
var VizStyleWrapper_1 = __webpack_require__(62);
|
|
1813
1844
|
|
|
1814
|
-
var SankeyUtils_1 = __webpack_require__(
|
|
1845
|
+
var SankeyUtils_1 = __webpack_require__(109);
|
|
1815
1846
|
|
|
1816
|
-
var SankeyNode_1 = __webpack_require__(
|
|
1847
|
+
var SankeyNode_1 = __webpack_require__(247);
|
|
1817
1848
|
|
|
1818
|
-
var SankeyLink_1 = __webpack_require__(
|
|
1849
|
+
var SankeyLink_1 = __webpack_require__(248);
|
|
1819
1850
|
|
|
1820
|
-
var SankeyTooltip_1 = __webpack_require__(
|
|
1851
|
+
var SankeyTooltip_1 = __webpack_require__(249);
|
|
1821
1852
|
|
|
1822
1853
|
exports.DEFAULT_COLORS = {
|
|
1823
1854
|
backgroundColor: '#ffffff',
|
|
@@ -2153,7 +2184,6 @@ PureSankey.defaultProps = {
|
|
|
2153
2184
|
exports.default = PureSankey;
|
|
2154
2185
|
|
|
2155
2186
|
/***/ }),
|
|
2156
|
-
/* 89 */,
|
|
2157
2187
|
/* 90 */,
|
|
2158
2188
|
/* 91 */,
|
|
2159
2189
|
/* 92 */,
|
|
@@ -2167,29 +2197,28 @@ exports.default = PureSankey;
|
|
|
2167
2197
|
/* 100 */,
|
|
2168
2198
|
/* 101 */,
|
|
2169
2199
|
/* 102 */,
|
|
2170
|
-
/* 103
|
|
2200
|
+
/* 103 */,
|
|
2201
|
+
/* 104 */
|
|
2171
2202
|
/***/ (function(module, exports) {
|
|
2172
2203
|
|
|
2173
2204
|
module.exports = require("@splunk/visualizations-shared/dataSourceUtils");
|
|
2174
2205
|
|
|
2175
2206
|
/***/ }),
|
|
2176
|
-
/* 104 */,
|
|
2177
2207
|
/* 105 */,
|
|
2178
2208
|
/* 106 */,
|
|
2179
|
-
/* 107
|
|
2209
|
+
/* 107 */,
|
|
2210
|
+
/* 108 */
|
|
2180
2211
|
/***/ (function(module, exports) {
|
|
2181
2212
|
|
|
2182
2213
|
module.exports = require("@splunk/react-ui/Popover");
|
|
2183
2214
|
|
|
2184
2215
|
/***/ }),
|
|
2185
|
-
/*
|
|
2216
|
+
/* 109 */
|
|
2186
2217
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2187
2218
|
|
|
2188
2219
|
"use strict";
|
|
2189
2220
|
|
|
2190
2221
|
|
|
2191
|
-
var _typeof = __webpack_require__(23);
|
|
2192
|
-
|
|
2193
2222
|
Object.defineProperty(exports, "__esModule", {
|
|
2194
2223
|
value: true
|
|
2195
2224
|
});
|
|
@@ -2198,6 +2227,8 @@ exports.truncateSVGTextWithEllipsis = exports.checkDigitsOnly = exports.computeA
|
|
|
2198
2227
|
|
|
2199
2228
|
var d3_scale_1 = __webpack_require__(78);
|
|
2200
2229
|
|
|
2230
|
+
var types_1 = __webpack_require__(88);
|
|
2231
|
+
|
|
2201
2232
|
var insertNodeIfNotExist = function insertNodeIfNotExist(sankeyData, nodeName) {
|
|
2202
2233
|
var nodes = sankeyData.nodes;
|
|
2203
2234
|
nodes = nodes || [];
|
|
@@ -2257,7 +2288,7 @@ var getColorCategoryMapping = function getColorCategoryMapping(_ref) {
|
|
|
2257
2288
|
exports.getColorCategoryMapping = getColorCategoryMapping;
|
|
2258
2289
|
|
|
2259
2290
|
var convertInputToSankeyDataFormat = function convertInputToSankeyDataFormat(columns, sourceFieldIdx, targetFieldIdx, linkValueFieldIdx, resultLimit) {
|
|
2260
|
-
if (!columns || !Array.isArray(columns) || !columns.length || !columns[sourceFieldIdx] || !columns[targetFieldIdx] || !columns[linkValueFieldIdx] || columns.length < 3 || !Array.isArray(columns[sourceFieldIdx]) || !Array.isArray(columns[targetFieldIdx]) || !Array.isArray(columns[linkValueFieldIdx]) || !columns[sourceFieldIdx] || typeof columns[sourceFieldIdx][0] !== 'string' || !columns[targetFieldIdx] || typeof columns[targetFieldIdx][0] !== 'string'
|
|
2291
|
+
if (!columns || !Array.isArray(columns) || !columns.length || !columns[sourceFieldIdx] || !columns[targetFieldIdx] || !columns[linkValueFieldIdx] || columns.length < 3 || !Array.isArray(columns[sourceFieldIdx]) || !Array.isArray(columns[targetFieldIdx]) || !Array.isArray(columns[linkValueFieldIdx]) || !columns[sourceFieldIdx] || typeof columns[sourceFieldIdx][0] !== 'string' || !columns[targetFieldIdx] || typeof columns[targetFieldIdx][0] !== 'string') {
|
|
2261
2292
|
return null;
|
|
2262
2293
|
}
|
|
2263
2294
|
|
|
@@ -2267,36 +2298,30 @@ var convertInputToSankeyDataFormat = function convertInputToSankeyDataFormat(col
|
|
|
2267
2298
|
};
|
|
2268
2299
|
var maxlen = Math.min(columns[sourceFieldIdx].length, columns[targetFieldIdx].length, columns[linkValueFieldIdx].length, resultLimit);
|
|
2269
2300
|
|
|
2270
|
-
var
|
|
2271
|
-
if (typeof columns[sourceFieldIdx][i]
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
var targetNodeIdx = exports.getNodesIndex(sankeyData, targetNodeName);
|
|
2285
|
-
var linkExist = sankeyData.links.find(function (link) {
|
|
2286
|
-
return link.source === sourceNodeIdx && link.target === targetNodeIdx;
|
|
2287
|
-
});
|
|
2301
|
+
for (var i = 0; i < maxlen; i += 1) {
|
|
2302
|
+
if (typeof columns[sourceFieldIdx][i] === 'string' && typeof columns[targetFieldIdx][i] === 'string' && types_1.isNumber(columns[linkValueFieldIdx][i])) {
|
|
2303
|
+
(function () {
|
|
2304
|
+
var sourceNodeName = columns[sourceFieldIdx][i].trim();
|
|
2305
|
+
var targetNodeName = columns[targetFieldIdx][i].trim();
|
|
2306
|
+
insertNodeIfNotExist(sankeyData, sourceNodeName);
|
|
2307
|
+
insertNodeIfNotExist(sankeyData, targetNodeName); // If same link exists then sum up the value and donot insert new link
|
|
2308
|
+
|
|
2309
|
+
var sourceNodeIdx = exports.getNodesIndex(sankeyData, sourceNodeName);
|
|
2310
|
+
var targetNodeIdx = exports.getNodesIndex(sankeyData, targetNodeName);
|
|
2311
|
+
var linkExist = sankeyData.links.find(function (link) {
|
|
2312
|
+
return link.source === sourceNodeIdx && link.target === targetNodeIdx;
|
|
2313
|
+
});
|
|
2314
|
+
var linkValue = +columns[linkValueFieldIdx][i];
|
|
2288
2315
|
|
|
2289
|
-
|
|
2290
|
-
|
|
2316
|
+
if (linkExist) {
|
|
2317
|
+
linkExist.value += linkValue;
|
|
2318
|
+
} else {
|
|
2319
|
+
insertLink(sankeyData, sourceNodeIdx, targetNodeIdx, linkValue, i);
|
|
2320
|
+
}
|
|
2321
|
+
})();
|
|
2291
2322
|
} else {
|
|
2292
|
-
|
|
2323
|
+
console.error('Link excluded. Invalid type in column input, row :- ', i, "[".concat(columns[sourceFieldIdx][i], ", ").concat(columns[targetFieldIdx][i], ", ").concat(columns[linkValueFieldIdx][i], "]"));
|
|
2293
2324
|
}
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
for (var i = 0; i < maxlen; i += 1) {
|
|
2297
|
-
var _ret = _loop(i);
|
|
2298
|
-
|
|
2299
|
-
if (_typeof(_ret) === "object") return _ret.v;
|
|
2300
2325
|
}
|
|
2301
2326
|
|
|
2302
2327
|
return sankeyData;
|
|
@@ -2474,24 +2499,23 @@ var truncateSVGTextWithEllipsis = function truncateSVGTextWithEllipsis(textEleme
|
|
|
2474
2499
|
exports.truncateSVGTextWithEllipsis = truncateSVGTextWithEllipsis;
|
|
2475
2500
|
|
|
2476
2501
|
/***/ }),
|
|
2477
|
-
/* 109 */,
|
|
2478
2502
|
/* 110 */,
|
|
2479
2503
|
/* 111 */,
|
|
2480
2504
|
/* 112 */,
|
|
2481
2505
|
/* 113 */,
|
|
2482
|
-
/* 114
|
|
2506
|
+
/* 114 */,
|
|
2507
|
+
/* 115 */
|
|
2483
2508
|
/***/ (function(module, exports) {
|
|
2484
2509
|
|
|
2485
2510
|
module.exports = require("d3-interpolate");
|
|
2486
2511
|
|
|
2487
2512
|
/***/ }),
|
|
2488
|
-
/*
|
|
2513
|
+
/* 116 */
|
|
2489
2514
|
/***/ (function(module, exports) {
|
|
2490
2515
|
|
|
2491
2516
|
module.exports = require("d3-collection");
|
|
2492
2517
|
|
|
2493
2518
|
/***/ }),
|
|
2494
|
-
/* 116 */,
|
|
2495
2519
|
/* 117 */,
|
|
2496
2520
|
/* 118 */,
|
|
2497
2521
|
/* 119 */,
|
|
@@ -2511,13 +2535,14 @@ module.exports = require("d3-collection");
|
|
|
2511
2535
|
/* 133 */,
|
|
2512
2536
|
/* 134 */,
|
|
2513
2537
|
/* 135 */,
|
|
2514
|
-
/* 136
|
|
2538
|
+
/* 136 */,
|
|
2539
|
+
/* 137 */
|
|
2515
2540
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2516
2541
|
|
|
2517
2542
|
"use strict";
|
|
2518
2543
|
|
|
2519
2544
|
|
|
2520
|
-
var _typeof = __webpack_require__(
|
|
2545
|
+
var _typeof = __webpack_require__(25);
|
|
2521
2546
|
|
|
2522
2547
|
Object.defineProperty(exports, "__esModule", {
|
|
2523
2548
|
value: true
|
|
@@ -2526,17 +2551,17 @@ exports.PureSankey = exports.config = exports.themes = exports.computeVizProps =
|
|
|
2526
2551
|
|
|
2527
2552
|
var lodash_1 = __webpack_require__(2);
|
|
2528
2553
|
|
|
2529
|
-
var dataSourceUtils_1 = __webpack_require__(
|
|
2554
|
+
var dataSourceUtils_1 = __webpack_require__(104);
|
|
2530
2555
|
|
|
2531
2556
|
var colorUtils_1 = __webpack_require__(13);
|
|
2532
2557
|
|
|
2533
2558
|
var withDashboardViz_1 = __webpack_require__(30);
|
|
2534
2559
|
|
|
2535
|
-
var PureSankey_1 = __webpack_require__(
|
|
2560
|
+
var PureSankey_1 = __webpack_require__(89);
|
|
2536
2561
|
|
|
2537
2562
|
exports.PureSankey = PureSankey_1.default;
|
|
2538
2563
|
|
|
2539
|
-
var config_1 = __webpack_require__(
|
|
2564
|
+
var config_1 = __webpack_require__(250);
|
|
2540
2565
|
|
|
2541
2566
|
exports.config = config_1.default;
|
|
2542
2567
|
/**
|
|
@@ -2624,7 +2649,6 @@ exports.themes = themes;
|
|
|
2624
2649
|
exports.default = Sankey;
|
|
2625
2650
|
|
|
2626
2651
|
/***/ }),
|
|
2627
|
-
/* 137 */,
|
|
2628
2652
|
/* 138 */,
|
|
2629
2653
|
/* 139 */,
|
|
2630
2654
|
/* 140 */,
|
|
@@ -2731,7 +2755,8 @@ exports.default = Sankey;
|
|
|
2731
2755
|
/* 241 */,
|
|
2732
2756
|
/* 242 */,
|
|
2733
2757
|
/* 243 */,
|
|
2734
|
-
/* 244
|
|
2758
|
+
/* 244 */,
|
|
2759
|
+
/* 245 */
|
|
2735
2760
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2736
2761
|
|
|
2737
2762
|
"use strict";
|
|
@@ -2761,9 +2786,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2761
2786
|
});
|
|
2762
2787
|
exports.default = void 0;
|
|
2763
2788
|
|
|
2764
|
-
__exportStar(__webpack_require__(
|
|
2789
|
+
__exportStar(__webpack_require__(137), exports);
|
|
2765
2790
|
|
|
2766
|
-
var Sankey_1 = __webpack_require__(
|
|
2791
|
+
var Sankey_1 = __webpack_require__(137);
|
|
2767
2792
|
|
|
2768
2793
|
Object.defineProperty(exports, "default", {
|
|
2769
2794
|
enumerable: true,
|
|
@@ -2773,17 +2798,17 @@ Object.defineProperty(exports, "default", {
|
|
|
2773
2798
|
});
|
|
2774
2799
|
|
|
2775
2800
|
/***/ }),
|
|
2776
|
-
/*
|
|
2801
|
+
/* 246 */
|
|
2777
2802
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2778
2803
|
|
|
2779
2804
|
"use strict";
|
|
2780
2805
|
__webpack_require__.r(__webpack_exports__);
|
|
2781
2806
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d3_sankey", function() { return d3_sankey; });
|
|
2782
|
-
/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2807
|
+
/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(115);
|
|
2783
2808
|
/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__);
|
|
2784
2809
|
/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(54);
|
|
2785
2810
|
/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3_array__WEBPACK_IMPORTED_MODULE_1__);
|
|
2786
|
-
/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2811
|
+
/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(116);
|
|
2787
2812
|
/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3_collection__WEBPACK_IMPORTED_MODULE_2__);
|
|
2788
2813
|
// reference link :- https://github.com/csaladenes/sankey
|
|
2789
2814
|
|
|
@@ -3339,7 +3364,7 @@ var d3_sankey = function d3_sankey() {
|
|
|
3339
3364
|
};
|
|
3340
3365
|
|
|
3341
3366
|
/***/ }),
|
|
3342
|
-
/*
|
|
3367
|
+
/* 247 */
|
|
3343
3368
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3344
3369
|
|
|
3345
3370
|
"use strict";
|
|
@@ -3357,9 +3382,9 @@ var styled_components_1 = __webpack_require__(4);
|
|
|
3357
3382
|
|
|
3358
3383
|
var react_1 = __webpack_require__(1);
|
|
3359
3384
|
|
|
3360
|
-
var PureSankey_1 = __webpack_require__(
|
|
3385
|
+
var PureSankey_1 = __webpack_require__(89);
|
|
3361
3386
|
|
|
3362
|
-
var SankeyUtils_1 = __webpack_require__(
|
|
3387
|
+
var SankeyUtils_1 = __webpack_require__(109);
|
|
3363
3388
|
|
|
3364
3389
|
var MAX_NODE_TEXT_WIDTH = 150;
|
|
3365
3390
|
|
|
@@ -3459,7 +3484,7 @@ SankeyNode.defaultProps = {
|
|
|
3459
3484
|
exports.default = SankeyNode;
|
|
3460
3485
|
|
|
3461
3486
|
/***/ }),
|
|
3462
|
-
/*
|
|
3487
|
+
/* 248 */
|
|
3463
3488
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3464
3489
|
|
|
3465
3490
|
"use strict";
|
|
@@ -3473,9 +3498,9 @@ var React = __webpack_require__(1);
|
|
|
3473
3498
|
|
|
3474
3499
|
var T = __webpack_require__(0);
|
|
3475
3500
|
|
|
3476
|
-
var PureSankey_1 = __webpack_require__(
|
|
3501
|
+
var PureSankey_1 = __webpack_require__(89);
|
|
3477
3502
|
|
|
3478
|
-
var SankeyUtils_1 = __webpack_require__(
|
|
3503
|
+
var SankeyUtils_1 = __webpack_require__(109);
|
|
3479
3504
|
|
|
3480
3505
|
var getLinkFill = function getLinkFill(link, colorCategoryMapping, colorMode) {
|
|
3481
3506
|
if (colorMode === 'categorical') {
|
|
@@ -3567,7 +3592,7 @@ SankeyLink.defaultProps = {
|
|
|
3567
3592
|
exports.default = SankeyLink;
|
|
3568
3593
|
|
|
3569
3594
|
/***/ }),
|
|
3570
|
-
/*
|
|
3595
|
+
/* 249 */
|
|
3571
3596
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3572
3597
|
|
|
3573
3598
|
"use strict";
|
|
@@ -3581,13 +3606,13 @@ var React = __webpack_require__(1);
|
|
|
3581
3606
|
|
|
3582
3607
|
var T = __webpack_require__(0);
|
|
3583
3608
|
|
|
3584
|
-
var Popover_1 = __webpack_require__(
|
|
3609
|
+
var Popover_1 = __webpack_require__(108);
|
|
3585
3610
|
|
|
3586
3611
|
var styled_components_1 = __webpack_require__(4);
|
|
3587
3612
|
|
|
3588
|
-
var numberUtils_1 = __webpack_require__(
|
|
3613
|
+
var numberUtils_1 = __webpack_require__(23);
|
|
3589
3614
|
|
|
3590
|
-
var PureSankey_1 = __webpack_require__(
|
|
3615
|
+
var PureSankey_1 = __webpack_require__(89);
|
|
3591
3616
|
|
|
3592
3617
|
var DEFAULT_PLACEMENT = 'below';
|
|
3593
3618
|
var StyledTooltipContainer = styled_components_1.default.div.withConfig({
|
|
@@ -3837,7 +3862,7 @@ SankeyTooltip.defaultProps = {
|
|
|
3837
3862
|
exports.default = SankeyTooltip;
|
|
3838
3863
|
|
|
3839
3864
|
/***/ }),
|
|
3840
|
-
/*
|
|
3865
|
+
/* 250 */
|
|
3841
3866
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3842
3867
|
|
|
3843
3868
|
"use strict";
|
|
@@ -3867,7 +3892,7 @@ var VizCategory_1 = __webpack_require__(29);
|
|
|
3867
3892
|
|
|
3868
3893
|
var configUtils_1 = __webpack_require__(6);
|
|
3869
3894
|
|
|
3870
|
-
var DynamicLinkColorsEditor_1 = __webpack_require__(
|
|
3895
|
+
var DynamicLinkColorsEditor_1 = __webpack_require__(251);
|
|
3871
3896
|
|
|
3872
3897
|
var BackgroundColor_1 = __webpack_require__(49);
|
|
3873
3898
|
|
|
@@ -4080,7 +4105,7 @@ var config = {
|
|
|
4080
4105
|
exports.default = configUtils_1.enhanceConfig(config);
|
|
4081
4106
|
|
|
4082
4107
|
/***/ }),
|
|
4083
|
-
/*
|
|
4108
|
+
/* 251 */
|
|
4084
4109
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4085
4110
|
|
|
4086
4111
|
"use strict";
|