← All changes
|
classes/Visualizer/Gutenberg/src/Components/Sidebar.js
+7
-21
3.10.0
→
3.3.4
View file →
| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * External dependencies |
| 3 | 3 | */ |
| 4 | 4 | import GeneralSettings from './Sidebar/GeneralSettings.js'; |
| 5 | -import InstanceSettings from './Sidebar/InstanceSettings.js'; | |
| 6 | 5 | import HorizontalAxisSettings from './Sidebar/HorizontalAxisSettings.js'; |
| 7 | 6 | import VerticalAxisSettings from './Sidebar/VerticalAxisSettings.js'; |
| 8 | 7 | import PieSettings from './Sidebar/PieSettings.js'; |
| 9 | 8 | import ResidueSettings from './Sidebar/ResidueSettings.js'; |
| @@ -20,9 +19,8 @@ | ||
| 20 | 19 | import RowCellSettings from './Sidebar/RowCellSettings.js'; |
| 21 | 20 | import ComboSettings from './Sidebar/ComboSettings.js'; |
| 22 | 21 | import SeriesSettings from './Sidebar/SeriesSettings.js'; |
| 23 | 22 | import SlicesSettings from './Sidebar/SlicesSettings.js'; |
| 24 | -import BubbleSettings from './Sidebar/BubbleSettings.js'; | |
| 25 | 23 | import ColumnSettings from './Sidebar/ColumnSettings.js'; |
| 26 | 24 | import LayoutAndChartArea from './Sidebar/LayoutAndChartArea.js'; |
| 27 | 25 | import FrontendActions from './Sidebar/FrontendActions.js'; |
| 28 | 26 | import ManualConfiguration from './Sidebar/ManualConfiguration.js'; |
| @@ -42,22 +40,19 @@ | ||
| 42 | 40 | |
| 43 | 41 | render() { |
| 44 | 42 | |
| 45 | 43 | const type = this.props.chart['visualizer-chart-type']; |
| 46 | - const library = this.props.chart['visualizer-chart-library']; | |
| 47 | 44 | |
| 48 | 45 | return ( |
| 49 | 46 | <Fragment> |
| 50 | 47 | |
| 51 | - <InstanceSettings chart={ this.props.chart } attributes={ this.props.attributes } edit={ this.props.edit } /> | |
| 52 | - | |
| 53 | 48 | <GeneralSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 54 | 49 | |
| 55 | - { ( -1 >= [ 'tabular', 'dataTable', 'gauge', 'geo', 'pie', 'timeline' ].indexOf( type ) ) && ( | |
| 50 | + { ( -1 >= [ 'table', 'gauge', 'geo', 'pie', 'timeline', 'dataTable' ].indexOf( type ) ) && ( | |
| 56 | 51 | <HorizontalAxisSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 57 | 52 | ) } |
| 58 | 53 | |
| 59 | - { ( -1 >= [ 'tabular', 'dataTable', 'gauge', 'geo', 'pie', 'timeline' ].indexOf( type ) ) && ( | |
| 54 | + { ( -1 >= [ 'table', 'gauge', 'geo', 'pie', 'timeline', 'dataTable' ].indexOf( type ) ) && ( | |
| 60 | 55 | <VerticalAxisSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 61 | 56 | ) } |
| 62 | 57 | |
| 63 | 58 | { ( 0 <= [ 'pie' ].indexOf( type ) ) && ( |
| @@ -103,9 +98,9 @@ | ||
| 103 | 98 | { ( 0 <= [ 'timeline' ].indexOf( type ) ) && ( |
| 104 | 99 | <TimelineSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 105 | 100 | ) } |
| 106 | 101 | |
| 107 | - { ( 0 <= [ 'tabular', 'dataTable' ].indexOf( type ) ) && ( | |
| 102 | + { ( 0 <= [ 'table', 'dataTable' ].indexOf( type ) ) && ( | |
| 108 | 103 | <Fragment> |
| 109 | 104 | |
| 110 | 105 | <TableSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 111 | 106 | |
| @@ -117,36 +112,27 @@ | ||
| 117 | 112 | { ( 0 <= [ 'combo' ].indexOf( type ) ) && ( |
| 118 | 113 | <ComboSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 119 | 114 | ) } |
| 120 | 115 | |
| 121 | - { ( -1 >= [ 'timeline', 'bubble', 'gauge', 'geo', 'pie', 'tabular', 'dataTable' ].indexOf( type ) ) && ( | |
| 116 | + { ( -1 >= [ 'timeline', 'gauge', 'geo', 'pie', 'dataTable' ].indexOf( type ) ) && ( | |
| 122 | 117 | <SeriesSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 123 | 118 | ) } |
| 124 | 119 | |
| 125 | - { ( 'tabular' === type && 'GoogleCharts' === library ) && ( | |
| 126 | - <SeriesSettings chart={ this.props.chart } edit={ this.props.edit } /> | |
| 127 | - ) } | |
| 128 | - | |
| 129 | - { ( 0 <= [ 'bubble' ].indexOf( type ) ) && ( | |
| 130 | - <BubbleSettings chart={ this.props.chart } edit={ this.props.edit } /> | |
| 131 | - ) } | |
| 132 | - | |
| 133 | - | |
| 134 | 120 | { ( 0 <= [ 'pie' ].indexOf( type ) ) && ( |
| 135 | 121 | <SlicesSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 136 | 122 | ) } |
| 137 | 123 | |
| 138 | - { ( 'DataTable' === library ) && ( | |
| 124 | + { ( 0 <= [ 'dataTable' ].indexOf( type ) ) && ( | |
| 139 | 125 | <ColumnSettings chart={ this.props.chart } edit={ this.props.edit } /> |
| 140 | 126 | ) } |
| 141 | 127 | |
| 142 | - { ( 'DataTable' !== library ) && ( | |
| 128 | + { ( -1 >= [ 'dataTable' ].indexOf( type ) ) && ( | |
| 143 | 129 | <LayoutAndChartArea chart={ this.props.chart } edit={ this.props.edit } /> |
| 144 | 130 | ) } |
| 145 | 131 | |
| 146 | 132 | <FrontendActions chart={ this.props.chart } edit={ this.props.edit } /> |
| 147 | 133 | |
| 148 | - { ( 'DataTable' !== library ) && ( | |
| 134 | + { ( -1 >= [ 'dataTable' ].indexOf( type ) ) && ( | |
| 149 | 135 | <ManualConfiguration chart={ this.props.chart } edit={ this.props.edit } /> |
| 150 | 136 | ) } |
| 151 | 137 | </Fragment> |
| 152 | 138 | ); |