mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 15:21:20 +01:00
Fixed lint errors
This commit is contained in:
parent
5792c632f9
commit
8ed67e98ce
16 changed files with 27 additions and 9 deletions
|
@ -5,6 +5,7 @@ class MessagePanel extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
errors: PropTypes.array,
|
errors: PropTypes.array,
|
||||||
infos: PropTypes.array,
|
infos: PropTypes.array,
|
||||||
|
mapStyle: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -15,7 +16,7 @@ class MessagePanel extends React.Component {
|
||||||
const {mapStyle} = this.props;
|
const {mapStyle} = this.props;
|
||||||
content = (
|
content = (
|
||||||
<>
|
<>
|
||||||
Layer <span>'{mapStyle.layers[parsed.data.index].id}'</span>: {parsed.data.message}
|
Layer <span>'{mapStyle.layers[parsed.data.index].id}'</span>: {parsed.data.message}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ export default class FunctionSpecProperty extends React.Component {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
fieldName: PropTypes.string.isRequired,
|
fieldName: PropTypes.string.isRequired,
|
||||||
fieldSpec: PropTypes.object.isRequired,
|
fieldSpec: PropTypes.object.isRequired,
|
||||||
|
error: PropTypes.object,
|
||||||
|
|
||||||
value: PropTypes.oneOfType([
|
value: PropTypes.oneOfType([
|
||||||
PropTypes.object,
|
PropTypes.object,
|
||||||
|
|
|
@ -40,6 +40,7 @@ export default class PropertyGroup extends React.Component {
|
||||||
groupFields: PropTypes.array.isRequired,
|
groupFields: PropTypes.array.isRequired,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
spec: PropTypes.object.isRequired,
|
spec: PropTypes.object.isRequired,
|
||||||
|
errors: PropTypes.array,
|
||||||
}
|
}
|
||||||
|
|
||||||
onPropertyChange = (property, newValue) => {
|
onPropertyChange = (property, newValue) => {
|
||||||
|
|
|
@ -48,6 +48,7 @@ export default class DataProperty extends React.Component {
|
||||||
PropTypes.bool,
|
PropTypes.bool,
|
||||||
PropTypes.array
|
PropTypes.array
|
||||||
]),
|
]),
|
||||||
|
error: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
|
@ -202,7 +203,6 @@ export default class DataProperty extends React.Component {
|
||||||
<InputBlock
|
<InputBlock
|
||||||
error={this.props.error}
|
error={this.props.error}
|
||||||
fieldSpec={this.props.fieldSpec}
|
fieldSpec={this.props.fieldSpec}
|
||||||
fieldSpec={this.props.fieldSpec}
|
|
||||||
label={labelFromFieldName(this.props.fieldName)}
|
label={labelFromFieldName(this.props.fieldName)}
|
||||||
>
|
>
|
||||||
<div className="maputnik-data-spec-property-group">
|
<div className="maputnik-data-spec-property-group">
|
||||||
|
|
|
@ -19,7 +19,10 @@ export default class ExpressionProperty extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onDelete: PropTypes.func,
|
onDelete: PropTypes.func,
|
||||||
fieldName: PropTypes.string,
|
fieldName: PropTypes.string,
|
||||||
fieldSpec: PropTypes.object
|
fieldSpec: PropTypes.object,
|
||||||
|
value: PropTypes.object,
|
||||||
|
error: PropTypes.object,
|
||||||
|
onChange: PropTypes.func,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
|
|
|
@ -13,7 +13,10 @@ export default class SpecProperty extends React.Component {
|
||||||
onZoomClick: PropTypes.func.isRequired,
|
onZoomClick: PropTypes.func.isRequired,
|
||||||
onDataClick: PropTypes.func.isRequired,
|
onDataClick: PropTypes.func.isRequired,
|
||||||
fieldName: PropTypes.string,
|
fieldName: PropTypes.string,
|
||||||
fieldSpec: PropTypes.object
|
fieldSpec: PropTypes.object,
|
||||||
|
value: PropTypes.any,
|
||||||
|
error: PropTypes.object,
|
||||||
|
onExpressionClick: PropTypes.func,
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -28,7 +31,6 @@ export default class SpecProperty extends React.Component {
|
||||||
return <InputBlock
|
return <InputBlock
|
||||||
error={this.props.error}
|
error={this.props.error}
|
||||||
fieldSpec={this.props.fieldSpec}
|
fieldSpec={this.props.fieldSpec}
|
||||||
fieldSpec={this.props.fieldSpec}
|
|
||||||
label={labelFromFieldName(this.props.fieldName)}
|
label={labelFromFieldName(this.props.fieldName)}
|
||||||
action={functionBtn}
|
action={functionBtn}
|
||||||
>
|
>
|
||||||
|
|
|
@ -44,6 +44,7 @@ export default class ZoomProperty extends React.Component {
|
||||||
onAddStop: PropTypes.func,
|
onAddStop: PropTypes.func,
|
||||||
fieldName: PropTypes.string,
|
fieldName: PropTypes.string,
|
||||||
fieldSpec: PropTypes.object,
|
fieldSpec: PropTypes.object,
|
||||||
|
error: PropTypes.object,
|
||||||
value: PropTypes.oneOfType([
|
value: PropTypes.oneOfType([
|
||||||
PropTypes.object,
|
PropTypes.object,
|
||||||
PropTypes.string,
|
PropTypes.string,
|
||||||
|
|
|
@ -27,6 +27,7 @@ export default class CombiningFilterEditor extends React.Component {
|
||||||
/** Properties of the vector layer and the available fields */
|
/** Properties of the vector layer and the available fields */
|
||||||
properties: PropTypes.object,
|
properties: PropTypes.object,
|
||||||
filter: PropTypes.array,
|
filter: PropTypes.array,
|
||||||
|
errors: PropTypes.array,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ class InputBlock extends React.Component {
|
||||||
style: PropTypes.object,
|
style: PropTypes.object,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
fieldSpec: PropTypes.object,
|
fieldSpec: PropTypes.object,
|
||||||
|
wideMode: PropTypes.bool,
|
||||||
|
error: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
|
|
|
@ -12,6 +12,7 @@ class StringInput extends React.Component {
|
||||||
multi: PropTypes.bool,
|
multi: PropTypes.bool,
|
||||||
required: PropTypes.bool,
|
required: PropTypes.bool,
|
||||||
disabled: PropTypes.bool,
|
disabled: PropTypes.bool,
|
||||||
|
spellCheck: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|
|
@ -24,10 +24,15 @@ class JSONEditor extends React.Component {
|
||||||
maxHeight: PropTypes.number,
|
maxHeight: PropTypes.number,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
lineNumbers: PropTypes.bool,
|
lineNumbers: PropTypes.bool,
|
||||||
|
lineWrapping: PropTypes.bool,
|
||||||
|
getValue: PropTypes.func,
|
||||||
|
gutters: PropTypes.array,
|
||||||
|
className: PropTypes.string,
|
||||||
}
|
}
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
lineWrapping: false,
|
||||||
gutters: ["CodeMirror-lint-markers"],
|
gutters: ["CodeMirror-lint-markers"],
|
||||||
getValue: (data) => {
|
getValue: (data) => {
|
||||||
return JSON.stringify(data, null, 2)
|
return JSON.stringify(data, null, 2)
|
||||||
|
|
|
@ -58,6 +58,7 @@ export default class LayerEditor extends React.Component {
|
||||||
isFirstLayer: PropTypes.bool,
|
isFirstLayer: PropTypes.bool,
|
||||||
isLastLayer: PropTypes.bool,
|
isLastLayer: PropTypes.bool,
|
||||||
layerIndex: PropTypes.number,
|
layerIndex: PropTypes.number,
|
||||||
|
errors: PropTypes.array,
|
||||||
}
|
}
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|
|
@ -11,6 +11,7 @@ class LayerTypeBlock extends React.Component {
|
||||||
value: PropTypes.string.isRequired,
|
value: PropTypes.string.isRequired,
|
||||||
wdKey: PropTypes.string,
|
wdKey: PropTypes.string,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
|
error: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -9,6 +9,7 @@ class MaxZoomBlock extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: PropTypes.number,
|
value: PropTypes.number,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
|
error: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -9,6 +9,7 @@ class MinZoomBlock extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: PropTypes.number,
|
value: PropTypes.number,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
|
error: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
.maputnik-make-zoom-function {
|
.maputnik-make-zoom-function {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-bottom: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 0 $margin-2 0 0;
|
padding: 0 $margin-2 0 0;
|
||||||
|
|
||||||
|
@ -64,8 +62,6 @@
|
||||||
.maputnik-make-data-function {
|
.maputnik-make-data-function {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-bottom: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 0 $margin-2 0 0;
|
padding: 0 $margin-2 0 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue