PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.13
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.13
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
visualizer / classes / Visualizer / Gutenberg / src / Components / Import / ManualData.js

ManualData.js in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.11.13, at classes/Visualizer/Gutenberg/src/Components/Import/ManualData.js

77 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * External dependencies
3 */
4 import ChartEditor from '../ChartEditor.js';
5
6 /**
7 * WordPress dependencies
8 */
9 const { __ } = wp.i18n;
10
11 const {
12 Component,
13 Fragment
14 } = wp.element;
15
16 const {
17 Button,
18 Modal,
19 PanelBody
20 } = wp.components;
21
22 class ManualData extends Component {
23 constructor() {
24 super( ...arguments );
25
26 this.toggleModal = this.toggleModal.bind( this );
27
28 this.state = {
29 isOpen: false
30 };
31 }
32
33 toggleModal() {
34 this.setState({ isOpen: ! this.state.isOpen });
35 }
36
37 render() {
38 return (
39 <Fragment>
40 <PanelBody
41 title={ __( 'Manual Data' ) }
42 initialOpen={ false }
43 >
44
45 <p>{ __( 'You can manually edit the chart data using a spreadsheet like editor.' ) }</p>
46
47 <Button
48 isPrimary
49 isLarge
50 isBusy={ this.state.isOpen }
51 onClick={ this.toggleModal }
52 >
53 { __( 'View Editor' ) }
54 </Button>
55
56 </PanelBody>
57
58 { this.state.isOpen && (
59 <Modal
60 title={ 'Chart Editor' }
61 onRequestClose={ this.toggleModal }
62 shouldCloseOnClickOutside={ false }
63 >
64 <ChartEditor
65 chart={ this.props.chart }
66 editChartData={ this.props.editChartData }
67 toggleModal={ this.toggleModal }
68 />
69 </Modal>
70 ) }
71 </Fragment>
72 );
73 }
74 }
75
76 export default ManualData;
77