| @@ -123,8 +123,11 @@ | ||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | editSettings( settings ) { |
| 126 | 126 | let chart = { ...this.state.chart }; |
| 127 | + if ( '1' !== settings.pagination ) { | |
| 128 | + delete settings.pageSize; | |
| 129 | + } | |
| 127 | 130 | chart['visualizer-settings'] = settings; |
| 128 | 131 | this.setState({ |
| 129 | 132 | chart, |
| 130 | 133 | isModified: true |
| @@ -465,8 +468,20 @@ | ||
| 465 | 468 | </Notice> |
| 466 | 469 | ); |
| 467 | 470 | } |
| 468 | 471 | |
| 472 | + if ( '1' === visualizerLocalize.isFullSiteEditor ) { | |
| 473 | + return ( | |
| 474 | + <Notice | |
| 475 | + status="error" | |
| 476 | + isDismissible={ false } | |
| 477 | + > | |
| 478 | + <Dashicon icon="chart-pie" /> | |
| 479 | + { __( 'Visualizer block charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag.' ) } | |
| 480 | + </Notice> | |
| 481 | + ); | |
| 482 | + } | |
| 483 | + | |
| 469 | 484 | if ( 'renderChart' === this.state.route && null !== this.state.chart ) { |
| 470 | 485 | return ( |
| 471 | 486 | <ChartRender |
| 472 | 487 | id={ this.props.attributes.id } |
| @@ -571,9 +586,9 @@ | ||
| 571 | 586 | { ( 'showCharts' === this.state.route || 'chartSelect' === this.state.route ) && |
| 572 | 587 | <ButtonGroup> |
| 573 | 588 | |
| 574 | 589 | <Button |
| 575 | - isDefault | |
| 590 | + variant="secondary" | |
| 576 | 591 | isLarge |
| 577 | 592 | onClick={ () => { |
| 578 | 593 | let route; |
| 579 | 594 | if ( 'showCharts' === this.state.route ) { |
| @@ -592,9 +607,9 @@ | ||
| 592 | 607 | <Fragment> |
| 593 | 608 | |
| 594 | 609 | { false === this.state.isModified ? |
| 595 | 610 | <Button |
| 596 | - isDefault | |
| 611 | + variant="secondary" | |
| 597 | 612 | isLarge |
| 598 | 613 | className="visualizer-bttn-done" |
| 599 | 614 | onClick={ () => { |
| 600 | 615 | this.setState({ route: 'renderChart', isModified: true }); |