PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.11
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.11
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.4.11, at classes/Visualizer/Gutenberg/src/Components/Import/ManualData.js

97 lines 1.6 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 ( 'community' !== visualizerLocalize.isPro ) ?
40 <Fragment>
41
42 <PanelBody
43 title={ __( 'Manual Data' ) }
44 initialOpen={ false }
45 >
46
47 <p>{ __( 'You can manually edit the chart data using a spreadsheet like editor.' ) }</p>
48
49 <Button
50 isPrimary
51 isLarge
52 isBusy={ this.state.isOpen }
53 onClick={ this.toggleModal }
54 >
55 { __( 'View Editor' ) }
56 </Button>
57
58 </PanelBody>
59
60 { this.state.isOpen && (
61 <Modal
62 title={ 'Chart Editor' }
63 onRequestClose={ this.toggleModal }
64 shouldCloseOnClickOutside={ false }
65 >
66 <ChartEditor
67 chart={ this.props.chart }
68 editChartData={ this.props.editChartData }
69 toggleModal={ this.toggleModal }
70 />
71 </Modal>
72 ) }
73
74 </Fragment> :
75 <PanelBody
76 title={ __( 'Manual Data' ) }
77 icon="lock"
78 initialOpen={ false }
79 >
80
81 <p>{ __( 'Enable this feature in PRO version!' ) }</p>
82
83 <Button
84 isPrimary
85 href={ visualizerLocalize.proTeaser }
86 target="_blank"
87 >
88 { __( 'Buy Now' ) }
89 </Button>
90
91 </PanelBody>
92 );
93 }
94 }
95
96 export default ManualData;
97