PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.10
4.0.8 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 All 149 releases
← All changes | classes/Visualizer/Gutenberg/src/Components/Sidebar/FrontendActions.js +41 -1 3.1.33.11.10 View file →
@@ -8,8 +8,9 @@
8 8 Fragment
9 9 } = wp.element;
10 10
11 11 const {
12 + Button,
12 13 CheckboxControl,
13 14 PanelBody
14 15 } = wp.components;
15 16
@@ -30,10 +31,12 @@
30 31
31 32 render() {
32 33
33 34 const settings = this.props.chart['visualizer-settings'];
35 + const type = this.props.chart['visualizer-chart-type'];
34 36
35 37 return (
38 + ( '' !== visualizerLocalize.proFeaturesLocked ) ?
36 39 <PanelBody
37 40 title={ __( 'Frontend Actions' ) }
38 41 initialOpen={ false }
39 42 className="visualizer-advanced-panel"
@@ -110,13 +113,50 @@
110 113 this.props.edit( settings );
111 114 } }
112 115 />
113 116
117 + { ( -1 >= [ 'dataTable', 'tabular', 'gauge', 'table' ].indexOf( type ) ) && (
118 + <CheckboxControl
119 + label={ __( 'Download Image' ) }
120 + help={ __( 'To download the chart as an image.' ) }
121 + checked={ ( 0 <= settings.actions.indexOf( 'image' ) ) }
122 + onChange={ e => {
123 + if ( 0 <= settings.actions.indexOf( 'image' ) ) {
124 + const index = settings.actions.indexOf( 'image' );
125 + if ( -1 !== index ) {
126 + settings.actions.splice( index, 1 );
127 + }
128 + } else {
129 + settings.actions.push( 'image' );
130 + }
131 + this.props.edit( settings );
132 + } }
133 + />
134 + ) }
135 +
114 136 </Fragment>
115 137
116 138 ) }
117 139
118 - </PanelBody>
140 + </PanelBody> :
141 + <PanelBody
142 + title={ __( 'Frontend Actions' ) }
143 + initialOpen={ false }
144 + icon="lock"
145 + className="visualizer-advanced-panel"
146 + >
147 +
148 + <p>{ __( 'Enable this feature in PRO version!' ) }</p>
149 +
150 + <Button
151 + isPrimary
152 + href={ visualizerLocalize.proTeaser }
153 + target="_blank"
154 + >
155 + { __( 'Upgrade Now' ) }
156 + </Button>
157 +
158 + </PanelBody>
119 159 );
120 160 }
121 161 }
122 162