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