@splunk/visualizations 25.6.0 → 25.7.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_VisualizationEditors_Editors_Bar_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_LinkGraph_Editor.png +0 -0
- package/.loki/reference/chrome_docker_VisualizationEditors_Editors_Map_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_Rectangle_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_Bar_Bar_Legend_Mode_Series_Compare.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Column_Column_Legend_Mode_Series_Compare.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Icon_Single_Value_Icon_Basic_Single_Value_Icon_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Chart_Count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_Timechart.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Radial_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Radial_Single_Value_Radial_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_Pagination.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_assign_default_trellisSplitBy_value_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_background_color.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_chart_cmd_max_count_avg_count_by_status_user_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_layout_options.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_makeresults_name_age_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_avg_count_max_count_by_status_value_by_max_count.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_stats_cmd_count_by_status_user_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_table_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Basic_Single_Value_Trellis_timechart_cmd_max_count_avg_count_by_status_aggregations.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Major_value_data_null_show_N_A.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Single_Value_Single_Value_Set_The_Background_Color_Based_On_The_Major_Value_Trellis.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_100_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Height_Percentage_50_no_paginator.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Custom.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparkline_Width.png +0 -0
- package/.loki/reference/chrome_docker_Visualizations_Table_Table_Sparklines_Adv.png +0 -0
- package/Area.config.js +12 -7
- package/Area.config.js.map +1 -1
- package/Area.js +192 -171
- package/Area.js.map +1 -1
- package/Bar.config.js +36 -8
- package/Bar.config.js.map +1 -1
- package/Bar.js +216 -172
- package/Bar.js.map +1 -1
- package/Bubble.config.js +7 -2
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +183 -162
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +12 -8
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +191 -174
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +36 -8
- package/Column.config.js.map +1 -1
- package/Column.js +216 -172
- package/Column.js.map +1 -1
- package/Ellipse.config.js +23 -20
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +168 -149
- package/Ellipse.js.map +1 -1
- package/Events.config.js +79 -19
- package/Events.config.js.map +1 -1
- package/Events.js +404 -244
- package/Events.js.map +1 -1
- package/FEATUREFLAGS.md +40 -0
- package/FillerGauge.config.js +22 -19
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +170 -151
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +3 -3
- package/Image.config.js.map +1 -1
- package/Image.js +143 -130
- package/Image.js.map +1 -1
- package/LICENSE.md +444 -8
- package/Line.config.js +12 -7
- package/Line.config.js.map +1 -1
- package/Line.js +192 -171
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +9 -15
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +743 -729
- package/LinkGraph.js.map +1 -1
- package/Map.config.js +51 -48
- package/Map.config.js.map +1 -1
- package/Map.js +602 -587
- package/Map.js.map +1 -1
- package/Markdown.config.js +10 -9
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +185 -171
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +71 -70
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +193 -179
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +3 -3
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +179 -155
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +30 -6
- package/Pie.config.js.map +1 -1
- package/Pie.js +237 -200
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +3 -2
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +305 -291
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +22 -23
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +232 -220
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +14 -13
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +1311 -1297
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +552 -580
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +258 -244
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +242 -52
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1456 -350
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +40 -29
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +267 -58
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +1490 -363
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +249 -41
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +1435 -286
- package/SingleValueRadial.js.map +1 -1
- package/TRELLIS.md +296 -0
- package/Table.config.js +39 -41
- package/Table.config.js.map +1 -1
- package/Table.js +352 -306
- package/Table.js.map +1 -1
- package/common/EventsDoc.js +9 -3
- package/common/EventsDoc.js.map +1 -1
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +1 -1
- package/common/utils/configUtils.js +26 -20
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +2 -2
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +2 -2
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +115 -0
- package/common/utils/layoutUtils.js.map +1 -0
- package/common/utils/mapUtils.js +1166 -23
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +54 -46
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +14 -14
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +612 -0
- package/common/utils/trellisUtils.js.map +1 -0
- package/common/withDashboardViz.js +31 -17
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +12 -12
package/common/EventsDoc.js
CHANGED
|
@@ -396,14 +396,18 @@ var VisExample = /*#__PURE__*/function (_PureComponent) {
|
|
|
396
396
|
options = _this$props$options === void 0 ? {} : _this$props$options,
|
|
397
397
|
Visualization = _this$props.Visualization,
|
|
398
398
|
dsState = _this$props.dsState,
|
|
399
|
-
onEventTrigger = _this$props.onEventTrigger
|
|
399
|
+
onEventTrigger = _this$props.onEventTrigger,
|
|
400
|
+
height = _this$props.height,
|
|
401
|
+
width = _this$props.width;
|
|
400
402
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventTester, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
|
|
401
403
|
level: 4
|
|
402
404
|
}, "Test Visualization"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(Visualization, {
|
|
403
405
|
options: options,
|
|
404
406
|
dataSources: dsState,
|
|
405
407
|
onEventTrigger: onEventTrigger,
|
|
406
|
-
hasEventHandlers: true
|
|
408
|
+
hasEventHandlers: true,
|
|
409
|
+
height: height,
|
|
410
|
+
width: width
|
|
407
411
|
}));
|
|
408
412
|
}
|
|
409
413
|
}]);
|
|
@@ -415,7 +419,9 @@ VisExample.propTypes = {
|
|
|
415
419
|
options: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
|
|
416
420
|
Visualization: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any,
|
|
417
421
|
dsState: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
|
|
418
|
-
onEventTrigger: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func
|
|
422
|
+
onEventTrigger: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func,
|
|
423
|
+
height: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number,
|
|
424
|
+
width: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number
|
|
419
425
|
};
|
|
420
426
|
|
|
421
427
|
var EventExample = function EventExample(_ref3) {
|
package/common/EventsDoc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","Event","EventName","EventItem","name","desc","marginLeft","T","string","EventsDesc","events","vizType","Object","description","VisExample","options","Visualization","dsState","onEventTrigger","PureComponent","func","EventExample","event","eventToDisplay","object","EventsDoc","e","key","handleEvent","Component","any"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,kC;;;;;;ACAA,uC;;;;;;ACAA,8C;;;;;;;ACAA,kE;;;;;;ACAA,qD;;;;;;ACAA,+D;;;;;;;ACAA,kE;;;;;;ACAA,2D;;;;;;;;;;;ACA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F,qCAA4B;AAAA;;AAAA;;AACxB;;AADwB,4LAOd,aAAK;AACf,qBAAc;AACVC,SAAC,EAADA;AADU,OAAd;AARwB;;AAExB,kBAAa;AACTA,OAAC,EAAE;AADM,KAAb;AAFwB;AAK3B;;;;WAQD,kBAAS;AAAA;;AACL,0BACI,qFACI;AAAY,cAAM,EAAE,WAApB;AAAuC,eAAO,kBAAE,KAAF,+EAAE,aAAF,iGAAE,sBAAF,iEAAE,uBAAmCC;AAAnF,QADJ,eAEI,iJAAgB,KAAhB;AAA4B,sBAAc,EAAE,KAAKC;AAAjD,SAFJ,eAGI;AAAc,aAAK,EAAE,WAAWF;AAAhC,QAHJ,CADJ;AAOH;;;;EAtBmBG,+C;;AAyBxBJ,SAAS,CAATA,YAAsB;AAClBV,SAAO,EAAER,iDAAC,CADQ;AAElBG,QAAM,EAAEH,iDAAC,CAFS;AAGlBU,SAAO,EAAEV,iDAAC,CAHQ;AAIlBS,eAAa,EAAET,iDAAC,CAACuB;AAJC,CAAtBL;AAOA,0E","file":"EventsDoc.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/no-multi-comp */\n/* eslint-disable max-classes-per-file */\nimport React, { Component, PureComponent } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport JSONTree from '@splunk/react-ui/JSONTree';\nimport styled from 'styled-components';\n\nconst EventTester = styled.div`\n margin-top: 50px;\n`;\n\nconst Event = styled.div`\n margin-top: 20px;\n`;\nconst EventName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\n\nconst EventItem = ({ name, desc }) => (\n <Event>\n <EventName>{name}</EventName>\n <Markdown style={{ marginLeft: 40 }} text={desc} />\n </Event>\n);\n\nEventItem.propTypes = {\n name: T.string,\n desc: T.string,\n};\n\nconst EventsDesc = ({ events, vizType }) => (\n <div>\n <Heading level={4}>\n {Object.keys(events).length !== 0 || vizType === 'splunk.events' ? 'Events' : 'No Events'}\n </Heading>\n {vizType === 'splunk.events' && (\n <Markdown text=\"Events are dynamically added via the `eventActions` and `fieldActions` options for the Events visualization.\" />\n )}\n {Object.keys(events).map(eventName => (\n <EventItem key={eventName} name={eventName} desc={events[eventName].description} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.object.isRequired,\n vizType: T.string,\n};\n\nclass VisExample extends PureComponent {\n render() {\n const { options = {}, Visualization, dsState, onEventTrigger } = this.props;\n return (\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n options={options}\n dataSources={dsState}\n onEventTrigger={onEventTrigger}\n hasEventHandlers\n />\n </EventTester>\n );\n }\n}\n\nVisExample.propTypes = {\n options: T.object,\n Visualization: T.any,\n dsState: T.object,\n onEventTrigger: T.func,\n};\n\nconst EventExample = ({ event }) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n\n return (\n <React.Fragment>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </React.Fragment>\n );\n};\n\nEventExample.propTypes = {\n event: T.object,\n};\n\nclass EventsDoc extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n e: null,\n };\n }\n\n handleEvent = e => {\n this.setState({\n e,\n });\n };\n\n render() {\n return (\n <div>\n <EventsDesc events={this.props.events} vizType={this.props?.Visualization?.config?.key} />\n <VisExample {...this.props} onEventTrigger={this.handleEvent} />\n <EventExample event={this.state.e} />\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n options: T.object,\n events: T.object,\n dsState: T.object,\n Visualization: T.any,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///external \"styled-components\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"@splunk/react-ui/Heading\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@splunk/react-ui/Markdown\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@splunk/react-ui/JSONTree\"","webpack:///./src/common/EventsDoc.jsx"],"names":["EventTester","styled","Event","EventName","EventItem","name","desc","marginLeft","T","string","EventsDesc","events","vizType","Object","description","VisExample","options","Visualization","dsState","onEventTrigger","height","width","PureComponent","number","EventExample","event","eventToDisplay","object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,aAAK,EAAE,WAAWF;AAAhC,QAHJ,CADJ;AAOH;;;;EAtBmBG,+C;;AAyBxBJ,SAAS,CAATA,YAAsB;AAClBZ,SAAO,EAAER,iDAAC,CADQ;AAElBG,QAAM,EAAEH,iDAAC,CAFS;AAGlBU,SAAO,EAAEV,iDAAC,CAHQ;AAIlBS,eAAa,EAAET,iDAAC,CAACyB;AAJC,CAAtBL;AAOA,0E","file":"EventsDoc.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = require(\"react\");","module.exports = require(\"prop-types\");","module.exports = require(\"styled-components\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"@splunk/react-ui/Heading\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@splunk/react-ui/Markdown\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@splunk/react-ui/JSONTree\");","/* eslint-disable react/no-multi-comp */\n/* eslint-disable max-classes-per-file */\nimport React, { Component, PureComponent } from 'react';\nimport T from 'prop-types';\nimport Heading from '@splunk/react-ui/Heading';\nimport Markdown from '@splunk/react-ui/Markdown';\nimport JSONTree from '@splunk/react-ui/JSONTree';\nimport styled from 'styled-components';\n\nconst EventTester = styled.div`\n margin-top: 50px;\n`;\n\nconst Event = styled.div`\n margin-top: 20px;\n`;\nconst EventName = styled.div`\n color: #5ca300;\n padding-bottom: 5px;\n`;\n\nconst EventItem = ({ name, desc }) => (\n <Event>\n <EventName>{name}</EventName>\n <Markdown style={{ marginLeft: 40 }} text={desc} />\n </Event>\n);\n\nEventItem.propTypes = {\n name: T.string,\n desc: T.string,\n};\n\nconst EventsDesc = ({ events, vizType }) => (\n <div>\n <Heading level={4}>\n {Object.keys(events).length !== 0 || vizType === 'splunk.events' ? 'Events' : 'No Events'}\n </Heading>\n {vizType === 'splunk.events' && (\n <Markdown text=\"Events are dynamically added via the `eventActions` and `fieldActions` options for the Events visualization.\" />\n )}\n {Object.keys(events).map(eventName => (\n <EventItem key={eventName} name={eventName} desc={events[eventName].description} />\n ))}\n </div>\n);\n\nEventsDesc.propTypes = {\n events: T.object.isRequired,\n vizType: T.string,\n};\n\nclass VisExample extends PureComponent {\n render() {\n const { options = {}, Visualization, dsState, onEventTrigger, height, width } = this.props;\n return (\n <EventTester>\n <Heading level={4}>Test Visualization</Heading>\n <Visualization\n options={options}\n dataSources={dsState}\n onEventTrigger={onEventTrigger}\n hasEventHandlers\n height={height}\n width={width}\n />\n </EventTester>\n );\n }\n}\n\nVisExample.propTypes = {\n options: T.object,\n Visualization: T.any,\n dsState: T.object,\n onEventTrigger: T.func,\n height: T.number,\n width: T.number,\n};\n\nconst EventExample = ({ event }) => {\n const eventToDisplay = {\n ...event,\n };\n if (eventToDisplay.originalEvent != null) {\n eventToDisplay.originalEvent = '...Original Event instance...';\n }\n\n return (\n <React.Fragment>\n <Heading level={4}>Event Monitor</Heading>\n <div>\n <JSONTree json={eventToDisplay} expandChildren />\n </div>\n </React.Fragment>\n );\n};\n\nEventExample.propTypes = {\n event: T.object,\n};\n\nclass EventsDoc extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n e: null,\n };\n }\n\n handleEvent = e => {\n this.setState({\n e,\n });\n };\n\n render() {\n return (\n <div>\n <EventsDesc events={this.props.events} vizType={this.props?.Visualization?.config?.key} />\n <VisExample {...this.props} onEventTrigger={this.handleEvent} />\n <EventExample event={this.state.e} />\n </div>\n );\n }\n}\n\nEventsDoc.propTypes = {\n options: T.object,\n events: T.object,\n dsState: T.object,\n Visualization: T.any,\n};\n\nexport default EventsDoc;\n"],"sourceRoot":""}
|
package/common/docUtils.js
CHANGED
|
@@ -114,7 +114,7 @@ var React = __webpack_require__(0);
|
|
|
114
114
|
|
|
115
115
|
var UtilPage_1 = __webpack_require__(68);
|
|
116
116
|
|
|
117
|
-
var sharedSelectors = ['getField', 'min', 'max'];
|
|
117
|
+
var sharedSelectors = ['getField', 'getType', 'min', 'max'];
|
|
118
118
|
|
|
119
119
|
var formatSidebarItemName = function formatSidebarItemName(name, className) {
|
|
120
120
|
return sharedSelectors.find(function (sharedSelector) {
|
package/common/docUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/docUtils.tsx","webpack:///external \"@splunk/react-docs/UtilPage\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;;;;;;;;;ACAA;;AACA;;AAeA,IAAM,eAAe,GAAG,CAAC,UAAD,EAAa,
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///./src/common/docUtils.tsx","webpack:///external \"@splunk/react-docs/UtilPage\""],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFA,kC;;;;;;;;;;;;;;;ACAA;;AACA;;AAeA,IAAM,eAAe,GAAG,CAAC,UAAD,EAAa,SAAb,EAAwB,KAAxB,EAA+B,KAA/B,CAAxB;;AAEA,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,IAAD,EAAe,SAAf,EAA4C;AACtE,SAAO,eAAe,CAAC,IAAhB,CAAqB,wBAAc;AAAA,WAAI,IAAI,KAAK,cAAb;AAAA,GAAnC,cAAqE,SAArE,cAAkF,IAAlF,IAA2F,IAAlG;AACH,CAFD;;AAIA,IAAM,wBAAwB,GAAG,SAA3B,wBAA2B;AAAA,MAAC,QAAD,uEAAY,EAAZ;AAAA,SAA2B,QAAQ,CAAC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AK,YAAK,SAAL,cAAkB,GAAG,CAAC,IAAtB,CADA;AAEL,gBAAM,EAAE,CAFH;AAGL,cAAI,EAAE,CAAC,cAAD,EAAiB,GAAjB,EAAsB,OAAtB;AAHD,SAAT,CADJ;AAOH;AAXQ,KAAL;AAAA,GADL,EAcF,IAdE,CAcG,UAAC,CAAD,EAAI,CAAJ;AAAA,WAAU,CAAC,CAAC,IAAF,CAAO,aAAP,CAAqB,CAAC,CAAC,IAAvB,CAAV;AAAA,GAdH,CAAP;AAeH,CAzBM;;AAAM,0BAAe,eAAf,C;;;;;;;ACtCb,wD","file":"docUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 67);\n","module.exports = require(\"react\");","import * as React from 'react';\nimport UtilPage from '@splunk/react-docs/UtilPage';\n\n// https://github.com/jsdoc2md/jsdoc-api#synopsis\ninterface JsDoc {\n access?: string;\n classdesc?: string;\n comment: string;\n kind: string;\n longname: string;\n meta: Record<string, unknown>;\n member: string;\n name: string;\n scope: string;\n}\n\nconst sharedSelectors = ['getField', 'getType', 'min', 'max'];\n\nconst formatSidebarItemName = (name: string, className: string): string => {\n return sharedSelectors.find(sharedSelector => name === sharedSelector) ? `${className}#${name}` : name;\n};\n\nconst removePrependedClassName = (longname = ''): string => longname.slice(longname.indexOf('#') + 1);\n\nconst formatDSLSelectorDocs = (docs: JsDoc[]): JsDoc[] =>\n docs.map(doc => ({\n ...doc,\n longname: removePrependedClassName(doc.longname),\n }));\n\nexport const getFormatterClassdesc = (\n formatterDocs: JsDoc[],\n name: string\n): { name: string; markdown: string } => ({\n name,\n markdown: `# ${name}\\n ${formatterDocs.find(doc => doc.name === name && doc.kind === 'class').classdesc}`,\n});\n\nexport const extractDocItems = (\n docs: JsDoc[],\n className: string\n): { name: string; component: (...args: any[]) => any }[] => {\n const classHeaderDoc = docs[0];\n const fileDoc = docs[docs.length - 1];\n const filteredDocs = formatDSLSelectorDocs(docs).filter(\n ({ access, comment }) => access === 'public' && comment\n );\n\n return filteredDocs\n .map(doc => ({\n name: formatSidebarItemName(doc.name, className),\n component: function UtilDoc() {\n // named function so linter doesnt raise react/display-name error\n return (\n <UtilPage\n title={`${className}#${doc.name}`}\n status={1}\n docs={[classHeaderDoc, doc, fileDoc]}\n />\n );\n },\n }))\n .sort((a, b) => a.name.localeCompare(b.name));\n};\n","module.exports = require(\"@splunk/react-docs/UtilPage\");"],"sourceRoot":""}
|
|
@@ -87,35 +87,46 @@ 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 = 12);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ([
|
|
94
94
|
/* 0 */
|
|
95
95
|
/***/ (function(module, exports) {
|
|
96
96
|
|
|
97
|
+
module.exports = require("lodash");
|
|
98
|
+
|
|
99
|
+
/***/ }),
|
|
100
|
+
/* 1 */
|
|
101
|
+
/***/ (function(module, exports) {
|
|
102
|
+
|
|
97
103
|
module.exports = require("@babel/runtime/helpers/defineProperty");
|
|
98
104
|
|
|
99
105
|
/***/ }),
|
|
100
|
-
/*
|
|
101
|
-
/* 2 */,
|
|
102
|
-
/* 3 */,
|
|
103
|
-
/* 4 */
|
|
106
|
+
/* 2 */
|
|
104
107
|
/***/ (function(module, exports) {
|
|
105
108
|
|
|
106
|
-
module.exports = require("
|
|
109
|
+
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
107
110
|
|
|
108
111
|
/***/ }),
|
|
112
|
+
/* 3 */,
|
|
113
|
+
/* 4 */,
|
|
109
114
|
/* 5 */,
|
|
110
|
-
/* 6
|
|
115
|
+
/* 6 */,
|
|
116
|
+
/* 7 */,
|
|
117
|
+
/* 8 */,
|
|
118
|
+
/* 9 */,
|
|
119
|
+
/* 10 */,
|
|
120
|
+
/* 11 */,
|
|
121
|
+
/* 12 */
|
|
111
122
|
/***/ (function(module, exports, __webpack_require__) {
|
|
112
123
|
|
|
113
124
|
"use strict";
|
|
114
125
|
|
|
115
126
|
|
|
116
|
-
var _toConsumableArray = __webpack_require__(
|
|
127
|
+
var _toConsumableArray = __webpack_require__(2);
|
|
117
128
|
|
|
118
|
-
var _defineProperty = __webpack_require__(
|
|
129
|
+
var _defineProperty = __webpack_require__(1);
|
|
119
130
|
|
|
120
131
|
var __rest = this && this.__rest || function (s, e) {
|
|
121
132
|
var t = {};
|
|
@@ -135,11 +146,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
135
146
|
});
|
|
136
147
|
exports.insertLayout = exports.isDynamicOption = exports.uncollapseEditorConfig = exports.generatePrecisionValues = exports.getInitialPreset = exports.enhanceOptionsSchemaWithDynamicOptions = exports.enhanceConfig = void 0;
|
|
137
148
|
|
|
138
|
-
var lodash_1 = __webpack_require__(
|
|
149
|
+
var lodash_1 = __webpack_require__(0);
|
|
139
150
|
|
|
140
|
-
var schemaUtils_1 = __webpack_require__(
|
|
151
|
+
var schemaUtils_1 = __webpack_require__(13);
|
|
141
152
|
|
|
142
|
-
var VizBehavior_1 = __webpack_require__(
|
|
153
|
+
var VizBehavior_1 = __webpack_require__(14);
|
|
143
154
|
|
|
144
155
|
var dynamicOptionsDSLType = {
|
|
145
156
|
type: 'string',
|
|
@@ -343,19 +354,13 @@ var insertLayout = function insertLayout(layout, index) {
|
|
|
343
354
|
exports.insertLayout = insertLayout;
|
|
344
355
|
|
|
345
356
|
/***/ }),
|
|
346
|
-
/*
|
|
347
|
-
/***/ (function(module, exports) {
|
|
348
|
-
|
|
349
|
-
module.exports = require("@babel/runtime/helpers/toConsumableArray");
|
|
350
|
-
|
|
351
|
-
/***/ }),
|
|
352
|
-
/* 8 */
|
|
357
|
+
/* 13 */
|
|
353
358
|
/***/ (function(module, exports) {
|
|
354
359
|
|
|
355
360
|
module.exports = require("@splunk/visualizations-shared/schemaUtils");
|
|
356
361
|
|
|
357
362
|
/***/ }),
|
|
358
|
-
/*
|
|
363
|
+
/* 14 */
|
|
359
364
|
/***/ (function(module, exports, __webpack_require__) {
|
|
360
365
|
|
|
361
366
|
"use strict";
|
|
@@ -389,6 +394,7 @@ var VizBehavior;
|
|
|
389
394
|
|
|
390
395
|
VizBehavior["PLACEHOLDER"] = "placeholder";
|
|
391
396
|
VizBehavior["PAGE_AND_SORT"] = "page-and-sort";
|
|
397
|
+
VizBehavior["TRELLIS"] = "trellis";
|
|
392
398
|
})(VizBehavior = exports.VizBehavior || (exports.VizBehavior = {}));
|
|
393
399
|
|
|
394
400
|
/***/ })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"lodash\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/interfaces/VizBehavior.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAE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CAAX,CAA/B,MADgB;AAErB,WAAK,EAAE;AAFc,KAAzB;AAAA,GADG,CAAP;AAMH;;AAMG;AAKJ;;;;;;;AAOG;;AACI,IAAM,YAAY,GAAG,SAAf,YAAe,CACxB,MADwB,EAExB,KAFwB;AAAA,oCAGrB,WAHqB;AAGrB,eAHqB;AAAA;;AAAA,sCAMrB,MAAM,CAAC,KAAP,CAAa,CAAb,EAAgB,KAAhB,CANqB,GAQrB,WARqB,qBAUrB,MAAM,CAAC,KAAP,CAAa,KAAb,CAVqB;AAAA,CAArB;;AAAM,uBAAY,YAAZ,C;;;;;;ACxOb,qE;;;;;;ACAA,sE;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;;;;;;;;;;AAUG;AACH;AACA;AACA;;;;AAIG;;AACH;AACA;AACH,CArBD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"configUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"lodash\"","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///./src/common/utils/configUtils.ts","webpack:///external \"@splunk/visualizations-shared/schemaUtils\"","webpack:///./src/common/interfaces/VizBehavior.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,mC;;;;;;ACAA,kE;;;;;;ACAA,qE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AACA;;AAGA;;AAWA,IAAM,qBAAqB,GAAG;AAC1B,MAAI,EAAE,QADoB;AAE1B,SAAO,EAAE;AAFiB,CAA9B;AAKA;;;;AAIG;;AACH,SAAS,sCAAT,CACI,aADJ,EACwD;AAEpD,MAAM,qBAAqB,GAAkB,EAA7C;AACA,QAAM,CAAC,IAAP,CAAY,aAAZ,EAA2B,OAA3B,CAAmC,UAAC,GAAD,EAAc;AACvC,aAgBF,aAAa,CAhBX,GAgBW,CAhBX;AAAA,QAIF,KAJE,GAae,EAbf,CAIF,KAJE;AAAA,QAKF,WALE,GAae,EAbf,CAKF,WALE;AAAA,QAMF,QANE,GAae,EAbf,CAMF,QANE;AAAA,QAOF,SAPE,GAae,EAbf,CAOF,SAPE;AAAA,QAQF,QARE,GA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,KAA4B,CAAlE,EAAqE,OAAO,KAAP;AAErE,WACI,qBAAqB,CAAC,UAAD,EAAa,aAAb,CAArB,IACA,oBAAoB,CAAC,UAAD,EAAa,aAAb,CAFxB;AAIH,GAdM,CAAP;AAeH;;AAyBG;AAlBJ;;;;;AAKG;;AACH,SAAS,uBAAT,CAAiC,kBAAjC,EAA2D;AACvD,SAAO,eAAM,CAAN,EAAS,kBAAkB,GAAG,CAA9B,EAAiC,GAAjC,CACH,UAAC,CAAD;AAAA,WAAyB;AACrB,WAAK,YAAK,CAAL,gBAAY,CAAC,GAAG,CAAJ,GAAQ,GAAR,GAAc,EAA1B,SAA+B,IAAI,MAAJ,CAAW,CAAX,CAA/B,MADgB;AAErB,WAAK,EAAE;AAFc,KAAzB;AAAA,GADG,CAAP;AAMH;;AAMG;AAKJ;;;;;;;AAOG;;AACI,IAAM,YAAY,GAAG,SAAf,YAAe,CACxB,MADwB,EAExB,KAFwB;AAAA,oCAGrB,WAHqB;AAGrB,eAHqB;AAAA;;AAAA,sCAMrB,MAAM,CAAC,KAAP,CAAa,CAAb,EAAgB,KAAhB,CANqB,GAQrB,WARqB,qBAUrB,MAAM,CAAC,KAAP,CAAa,KAAb,CAVqB;AAAA,CAArB;;AAAM,uBAAY,YAAZ,C;;;;;;ACxOb,sE;;;;;;;;;;;;;ACAA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;;;;;;;;;;AAUG;AACH;AACA;AACA;;;;AAIG;;AACH;AACA;AACA;AACH,CAtBD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"configUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","module.exports = require(\"lodash\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","import { get, range } from 'lodash';\nimport { DYNAMIC_OPTIONS_DSL_PATTERN } from '@splunk/visualizations-shared/schemaUtils';\nimport type { JSONSchema7Definition } from 'json-schema';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizBehavior } from '../interfaces/VizBehavior';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { OptionsSchema } from '../interfaces/OptionsSchema';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\nconst dynamicOptionsDSLType = {\n type: 'string',\n pattern: DYNAMIC_OPTIONS_DSL_PATTERN,\n} as const;\n\n/**\n * Helper function to extend an options schema with dynamic options DSL\n * @param optionsSchema a visualization's options schema\n * @returns an updated options schema that additionally allows strings starting with > for each option\n */\nfunction enhanceOptionsSchemaWithDynamicOptions(\n optionsSchema: OptionsSchema | JSONSchema7Definition\n): OptionsSchema {\n const enhancedOptionsSchema: OptionsSchema = {};\n Object.keys(optionsSchema).forEach((key): void => {\n const {\n // The next a few are schema annotations, we should leave them as is.\n // Note: in reality we don't use `readOnly`, `writeOnly` or `examples`, but they are listed here for completeness.\n // Ref: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n title,\n description,\n readOnly,\n writeOnly,\n examples,\n default: defaultValue,\n // The next a few need special care\n type,\n properties,\n patternProperties,\n // The rest should be handled together\n ...remainingSchemaEntry\n } = optionsSchema[key];\n\n const annotations = {\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(readOnly !== undefined && { readOnly }),\n ...(writeOnly !== undefined && { writeOnly }),\n ...(examples !== undefined && { examples }),\n ...(defaultValue !== undefined && { default: defaultValue }),\n };\n\n if (type === 'object') {\n enhancedOptionsSchema[key] = {\n ...remainingSchemaEntry,\n ...annotations,\n type,\n ...(properties && { properties: enhanceOptionsSchemaWithDynamicOptions(properties) }),\n };\n if (patternProperties) {\n let enhancedPatternProperties = {};\n Object.keys(patternProperties).forEach((opt): void => {\n enhancedPatternProperties = {\n ...enhancedPatternProperties,\n ...enhanceOptionsSchemaWithDynamicOptions({ [opt]: patternProperties[opt] }),\n };\n });\n enhancedOptionsSchema[key].patternProperties = enhancedPatternProperties;\n }\n } else {\n enhancedOptionsSchema[key] = {\n ...annotations,\n anyOf: [\n // we can't assume `type` is always there because there are `enum` and `const`.\n { ...(type !== undefined && { type }), ...remainingSchemaEntry },\n dynamicOptionsDSLType,\n ],\n };\n }\n });\n return enhancedOptionsSchema;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n if (vizConfig.supports.indexOf(VizBehavior.DYNAMIC_OPTIONS) !== -1) {\n enhancedConfig.optionsSchema = enhanceOptionsSchemaWithDynamicOptions(vizConfig.optionsSchema);\n }\n enhancedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n }\n );\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\nfunction isDynamicOption(option?: string): boolean {\n return (option && typeof option === 'string' && option.trim().startsWith('>')) || false;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport {\n enhanceConfig,\n enhanceOptionsSchemaWithDynamicOptions,\n getInitialPreset,\n generatePrecisionValues,\n uncollapseEditorConfig,\n isDynamicOption,\n};\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n","module.exports = require(\"@splunk/visualizations-shared/schemaUtils\");","export enum VizBehavior {\n /**\n * Dynamic Options Behavior.\n * This allows visualization options to be powered by data\n *\n * **Example**\n *\n * sparklineValues: \">primary|seriesByIndex(0)\"\n * would configure sparklineValues with an array of data points\n * coming from the first series in the primary datasource\n *\n */\n DYNAMIC_OPTIONS = 'dynamic-options',\n EVENTS = 'events',\n /**\n * Placeholder behavior: visualization will display a placeholder rather than fail if any of the `requiredProps` is\n * missing.\n * @type {string}\n */\n PLACEHOLDER = 'placeholder',\n PAGE_AND_SORT = 'page-and-sort',\n TRELLIS = 'trellis',\n}\n"],"sourceRoot":""}
|
|
@@ -87,12 +87,12 @@ 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 = 15);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
94
94
|
|
|
95
|
-
/***/
|
|
95
|
+
/***/ 15:
|
|
96
96
|
/***/ (function(module, exports, __webpack_require__) {
|
|
97
97
|
|
|
98
98
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/dataUtils.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;wCClFA;;AACO,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,OAAD,EAAU,MAAV,EAAoB;AACrD,MAAI,CAAC,OAAD,IAAY,CAAC,OAAO,CAAC,CAAD,CAAP,CAAW,MAA5B,EAAoC,OAAO,EAAP;AAEpC,MAAM,IAAI,GAAG,EAAb;;AAHqD,6BAK5C,CAL4C;AAMjD,QAAM,MAAM,GAAG,EAAf;AACA,UAAM,CAAC,OAAP,CAAe,UAAC,KAAD,EAAQ,KAAR,EAAiB;AAC5B,UAAM,SAAS,GAAG,OAAO,KAAP,KAAiB,QAAjB,GAA4B,KAA5B,GAAoC,KAAK,CAAC,IAA5D;;AACA,UAAI,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,MAAsB,EAA1B,EAA8B;AAC1B,cAAM,CAAC,SAAD,CAAN,GAAoB,IAApB;AACH,OAFD,MAEO;AACH,cAAM,CAAC,SAAD,CAAN,GAAoB,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,CAApB;AACH;AACJ,KAPD;AAQA,QAAI,CAAC,IAAL,CAAU,MAAV;AAfiD;;AAKrD,OAAK,IAAI,CAAC,GAAG,CAAb,EAAgB,CAAC,GAAG,OAAO,CAAC,CAAD,CAAP,CAAW,MAA/B,EAAuC,CAAC,IAAI,CAA5C,EAA+C;AAAA,UAAtC,CAAsC;AAW9C;;AAED,SAAO,IAAP;AACH,CAnBM;;AAAM,gCAAqB,qBAArB,C","file":"dataUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s =
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/dataUtils.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;wCClFA;;AACO,IAAM,qBAAqB,GAAG,SAAxB,qBAAwB,CAAC,OAAD,EAAU,MAAV,EAAoB;AACrD,MAAI,CAAC,OAAD,IAAY,CAAC,OAAO,CAAC,CAAD,CAAP,CAAW,MAA5B,EAAoC,OAAO,EAAP;AAEpC,MAAM,IAAI,GAAG,EAAb;;AAHqD,6BAK5C,CAL4C;AAMjD,QAAM,MAAM,GAAG,EAAf;AACA,UAAM,CAAC,OAAP,CAAe,UAAC,KAAD,EAAQ,KAAR,EAAiB;AAC5B,UAAM,SAAS,GAAG,OAAO,KAAP,KAAiB,QAAjB,GAA4B,KAA5B,GAAoC,KAAK,CAAC,IAA5D;;AACA,UAAI,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,MAAsB,EAA1B,EAA8B;AAC1B,cAAM,CAAC,SAAD,CAAN,GAAoB,IAApB;AACH,OAFD,MAEO;AACH,cAAM,CAAC,SAAD,CAAN,GAAoB,OAAO,CAAC,KAAD,CAAP,CAAe,CAAf,CAApB;AACH;AACJ,KAPD;AAQA,QAAI,CAAC,IAAL,CAAU,MAAV;AAfiD;;AAKrD,OAAK,IAAI,CAAC,GAAG,CAAb,EAAgB,CAAC,GAAG,OAAO,CAAC,CAAD,CAAP,CAAW,MAA/B,EAAuC,CAAC,IAAI,CAA5C,EAA+C;AAAA,UAAtC,CAAsC;AAW9C;;AAED,SAAO,IAAP;AACH,CAnBM;;AAAM,gCAAqB,qBAArB,C","file":"dataUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 15);\n","// TODO: utilize this fn in ParallelCoordinates\nexport const convertToArrOfObjects = (columns, fields) => {\n if (!columns || !columns[0].length) return [];\n\n const data = [];\n\n for (let i = 0; i < columns[0].length; i += 1) {\n const newObj = {};\n fields.forEach((field, index) => {\n const fieldName = typeof field === 'string' ? field : field.name;\n if (columns[index][i] === '') {\n newObj[fieldName] = null;\n } else {\n newObj[fieldName] = columns[index][i];\n }\n });\n data.push(newObj);\n }\n\n return data;\n};\n"],"sourceRoot":""}
|
package/common/utils/hocUtils.js
CHANGED
|
@@ -87,12 +87,12 @@ 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 = 16);
|
|
91
91
|
/******/ })
|
|
92
92
|
/************************************************************************/
|
|
93
93
|
/******/ ({
|
|
94
94
|
|
|
95
|
-
/***/
|
|
95
|
+
/***/ 16:
|
|
96
96
|
/***/ (function(module, exports, __webpack_require__) {
|
|
97
97
|
|
|
98
98
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/hocUtils.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;AC9EA;;;;;AAKG;;AACI,IAAM,wBAAwB,GAAG,SAA3B,wBAA2B,OAK7B;AAAA,MAJP,OAIO,QAJP,OAIO;AAAA,MAHP,aAGO,QAHP,aAGO;AACP,MAAM,gBAAgB,GAAG,CAAC,WAAD,EAAc,cAAd,EAA8B,QAA9B,CAAzB;AACA,kBAAgB,CAAC,OAAjB,CAAyB,UAAC,IAAD,EAAuB;AAC5C,QAAI,aAAa,CAAC,IAAD,CAAjB,EAAyB;AACrB;AACA,aAAO,CAAC,IAAD,CAAP,GAAgB,aAAa,CAAC,IAAD,CAA7B;AACH;AACJ,GALD;AAMH,CAbM;;AAAM,mCAAwB,wBAAxB,C","file":"hocUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s =
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/hocUtils.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;AC9EA;;;;;AAKG;;AACI,IAAM,wBAAwB,GAAG,SAA3B,wBAA2B,OAK7B;AAAA,MAJP,OAIO,QAJP,OAIO;AAAA,MAHP,aAGO,QAHP,aAGO;AACP,MAAM,gBAAgB,GAAG,CAAC,WAAD,EAAc,cAAd,EAA8B,QAA9B,CAAzB;AACA,kBAAgB,CAAC,OAAjB,CAAyB,UAAC,IAAD,EAAuB;AAC5C,QAAI,aAAa,CAAC,IAAD,CAAjB,EAAyB;AACrB;AACA,aAAO,CAAC,IAAD,CAAP,GAAgB,aAAa,CAAC,IAAD,CAA7B;AACH;AACJ,GALD;AAMH,CAbM;;AAAM,mCAAwB,wBAAxB,C","file":"hocUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","import { DashboardVizProps } from '../interfaces/DashboardVizProps';\n\nexport type DashboardVizType = React.ComponentType<DashboardVizProps>;\n\n/**\n * @method extendStaticWrapperProps\n * @param {Object} props\n * @param {DashboardVizType} props.Wrapper\n * @param {DashboardVizType} props.Visualization\n */\nexport const extendStaticWrapperProps = ({\n Wrapper,\n Visualization,\n}: {\n [key: string]: DashboardVizType;\n}): void => {\n const extendProperties = ['propTypes', 'defaultProps', 'config'];\n extendProperties.forEach((prop: string): void => {\n if (Visualization[prop]) {\n // eslint-disable-next-line no-param-reassign\n Wrapper[prop] = Visualization[prop];\n }\n });\n};\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright © 2018 Splunk Inc.
|
|
3
|
+
* SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
|
|
4
|
+
* in part without a valid written license from Splunk Inc. is PROHIBITED.
|
|
5
|
+
*/
|
|
6
|
+
module.exports =
|
|
7
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
8
|
+
/******/ // The module cache
|
|
9
|
+
/******/ var installedModules = {};
|
|
10
|
+
/******/
|
|
11
|
+
/******/ // The require function
|
|
12
|
+
/******/ function __webpack_require__(moduleId) {
|
|
13
|
+
/******/
|
|
14
|
+
/******/ // Check if module is in cache
|
|
15
|
+
/******/ if(installedModules[moduleId]) {
|
|
16
|
+
/******/ return installedModules[moduleId].exports;
|
|
17
|
+
/******/ }
|
|
18
|
+
/******/ // Create a new module (and put it into the cache)
|
|
19
|
+
/******/ var module = installedModules[moduleId] = {
|
|
20
|
+
/******/ i: moduleId,
|
|
21
|
+
/******/ l: false,
|
|
22
|
+
/******/ exports: {}
|
|
23
|
+
/******/ };
|
|
24
|
+
/******/
|
|
25
|
+
/******/ // Execute the module function
|
|
26
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
27
|
+
/******/
|
|
28
|
+
/******/ // Flag the module as loaded
|
|
29
|
+
/******/ module.l = true;
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // Return the exports of the module
|
|
32
|
+
/******/ return module.exports;
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/
|
|
35
|
+
/******/
|
|
36
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
37
|
+
/******/ __webpack_require__.m = modules;
|
|
38
|
+
/******/
|
|
39
|
+
/******/ // expose the module cache
|
|
40
|
+
/******/ __webpack_require__.c = installedModules;
|
|
41
|
+
/******/
|
|
42
|
+
/******/ // define getter function for harmony exports
|
|
43
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
44
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
45
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
46
|
+
/******/ }
|
|
47
|
+
/******/ };
|
|
48
|
+
/******/
|
|
49
|
+
/******/ // define __esModule on exports
|
|
50
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
51
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
52
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
53
|
+
/******/ }
|
|
54
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
55
|
+
/******/ };
|
|
56
|
+
/******/
|
|
57
|
+
/******/ // create a fake namespace object
|
|
58
|
+
/******/ // mode & 1: value is a module id, require it
|
|
59
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
60
|
+
/******/ // mode & 4: return value when already ns object
|
|
61
|
+
/******/ // mode & 8|1: behave like require
|
|
62
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
63
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
64
|
+
/******/ if(mode & 8) return value;
|
|
65
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
66
|
+
/******/ var ns = Object.create(null);
|
|
67
|
+
/******/ __webpack_require__.r(ns);
|
|
68
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
69
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
70
|
+
/******/ return ns;
|
|
71
|
+
/******/ };
|
|
72
|
+
/******/
|
|
73
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
74
|
+
/******/ __webpack_require__.n = function(module) {
|
|
75
|
+
/******/ var getter = module && module.__esModule ?
|
|
76
|
+
/******/ function getDefault() { return module['default']; } :
|
|
77
|
+
/******/ function getModuleExports() { return module; };
|
|
78
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
79
|
+
/******/ return getter;
|
|
80
|
+
/******/ };
|
|
81
|
+
/******/
|
|
82
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
83
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
84
|
+
/******/
|
|
85
|
+
/******/ // __webpack_public_path__
|
|
86
|
+
/******/ __webpack_require__.p = "";
|
|
87
|
+
/******/
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // Load entry module and return exports
|
|
90
|
+
/******/ return __webpack_require__(__webpack_require__.s = 17);
|
|
91
|
+
/******/ })
|
|
92
|
+
/************************************************************************/
|
|
93
|
+
/******/ ({
|
|
94
|
+
|
|
95
|
+
/***/ 17:
|
|
96
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
97
|
+
|
|
98
|
+
"use strict";
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
Object.defineProperty(exports, "__esModule", {
|
|
102
|
+
value: true
|
|
103
|
+
});
|
|
104
|
+
exports.LAYOUT_TYPE = void 0;
|
|
105
|
+
var LAYOUT_TYPE;
|
|
106
|
+
|
|
107
|
+
(function (LAYOUT_TYPE) {
|
|
108
|
+
LAYOUT_TYPE["Off"] = "off";
|
|
109
|
+
LAYOUT_TYPE["Trellis"] = "trellis";
|
|
110
|
+
})(LAYOUT_TYPE = exports.LAYOUT_TYPE || (exports.LAYOUT_TYPE = {}));
|
|
111
|
+
|
|
112
|
+
/***/ })
|
|
113
|
+
|
|
114
|
+
/******/ });
|
|
115
|
+
//# sourceMappingURL=layoutUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/common/utils/layoutUtils.ts"],"names":[],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;AClFA,IAAY,WAAZ;;AAAA,WAAY,WAAZ,EAAuB;AACnB;AACA;AACH,CAHD,EAAY,WAAW,GAAX,8CAAW,EAAX,CAAZ,E","file":"layoutUtils.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 17);\n","export enum LAYOUT_TYPE {\n Off = 'off',\n Trellis = 'trellis',\n}\n"],"sourceRoot":""}
|