77 TextareaControl ,
88 TextControl
99} from '@wordpress/components' ;
10- import { PanelColorSettings } from '@wordpress/block-editor' ;
11- import { __ } from '@wordpress/i18n' ;
12- import { togglePanel , ChartMeasures } from '@devgateway/dvz-wp-commons' ;
10+ import { PanelColorSettings } from '@wordpress/block-editor' ;
11+ import { __ } from '@wordpress/i18n' ;
12+ import { togglePanel , Measures } from '@devgateway/dvz-wp-commons' ;
1313
1414const overLayPrototype = ( preFillCsv ) => {
1515 return {
@@ -29,7 +29,7 @@ const LineOverlay = (props) => {
2929 allMeasures,
3030 allCategories,
3131 apps,
32- attributes : { panelStatus, overlays, dimension1, app}
32+ attributes : { panelStatus, overlays, dimension1, app }
3333 } = props ;
3434
3535
@@ -42,30 +42,30 @@ const LineOverlay = (props) => {
4242 preFillCsv = cat ? cat . items . sort ( ( s1 , s2 ) => s1 . position - s2 . position ) . map ( i => i . value ) . join ( ",\r\n" ) + "," : ""
4343 }
4444 const newOverlay = [ ...overlays , overLayPrototype ( preFillCsv ) ] ;
45- setAttributes ( { overlays : newOverlay } ) ;
45+ setAttributes ( { overlays : newOverlay } ) ;
4646 } ;
4747
4848
4949 const remove = ( ) => {
5050 const newOverlay = [ ...overlays ]
5151 newOverlay . pop ( )
52- setAttributes ( { overlays : newOverlay } )
52+ setAttributes ( { overlays : newOverlay } )
5353
5454 }
5555
5656 const onChange = ( idx , attribute , value ) => {
5757 const newOverlay = [ ...overlays ]
5858 newOverlay [ idx ] [ attribute ] = value
5959
60- setAttributes ( { overlays : newOverlay } )
60+ setAttributes ( { overlays : newOverlay } )
6161 }
6262
6363 return < > { overlays && overlays . map ( ( o , idx ) => {
6464 const overlayMeasures = { }
6565 overlayMeasures [ o . app ] = { }
66- overlayMeasures [ o . app ] [ o . measure ] = { selected : true }
66+ overlayMeasures [ o . app ] [ o . measure ] = { selected : true }
6767 return < PanelBody title = { o . title } panelStatus = { panelStatus [ 'series_' ] + idx }
68- onToggle = { e => togglePanel ( panelStatus [ 'series_' ] + idx , panelStatus , setAttributes ) } >
68+ onToggle = { e => togglePanel ( panelStatus [ 'series_' ] + idx , panelStatus , setAttributes ) } >
6969
7070 < PanelRow >
7171 < SelectControl
@@ -94,7 +94,7 @@ const LineOverlay = (props) => {
9494 </ PanelRow > }
9595
9696 { o . app != "csv" &&
97- < ChartMeasures
97+ < Measures
9898 title = { "Select Measure" }
9999 onMeasuresChange = { e => null }
100100 onFormatChange = { a => alert ( "format" ) }
@@ -146,11 +146,11 @@ const LineOverlay = (props) => {
146146 < PanelRow >
147147 < ButtonGroup >
148148 < Button isSecondary = { true }
149- onClick = { add } >
149+ onClick = { add } >
150150 { __ ( "Add Series" ) }
151151 </ Button >
152152 < Button isSecondary = { true }
153- onClick = { remove } >
153+ onClick = { remove } >
154154 { __ ( "Remove Series" ) }
155155 </ Button >
156156 </ ButtonGroup >
0 commit comments