Bumping the JS libs to fix the build (#2616)

* bumping the js libs

* New linting rules

* More linting

* More

* Done linting

* npm >=4.5.0

* Bumping node

* Tweaking the build

* Fixing the damn build

* Fixing the apps
This commit is contained in:
Maxime Beauchemin
2017-04-13 15:04:09 -07:00
committed by GitHub
parent a2b30f35fc
commit 366ecefbaa
132 changed files with 611 additions and 553 deletions

View File

@@ -1,9 +1,10 @@
const $ = window.$ = require('jquery');
import React, { PropTypes } from 'react';
import Select from 'react-select';
import { Button, Row, Col } from 'react-bootstrap';
import SelectControl from './SelectControl';
const $ = window.$ = require('jquery');
const operatorsArr = [
{ val: 'in', type: 'array', useSelect: true, multi: true },
{ val: 'not in', type: 'array', useSelect: true, multi: true },
@@ -17,7 +18,7 @@ const operatorsArr = [
{ val: 'LIKE', type: 'string', datasourceTypes: ['table'] },
];
const operators = {};
operatorsArr.forEach(op => {
operatorsArr.forEach((op) => {
operators[op.val] = op;
});

View File

@@ -13,11 +13,9 @@ const defaultProps = {
onChange: () => {},
};
export default class HiddenControl extends React.PureComponent {
render() {
// This wouldn't be necessary but might as well
return <FormControl type="hidden" value={this.props.value} />;
}
export default function HiddenControl(props) {
// This wouldn't be necessary but might as well
return <FormControl type="hidden" value={props.value} />;
}
HiddenControl.propTypes = propTypes;

View File

@@ -42,13 +42,13 @@ export default class SelectControl extends React.PureComponent {
let optionValue = opt ? opt.value : null;
// if multi, return options values as an array
if (this.props.multi) {
optionValue = opt ? opt.map((o) => o.value) : null;
optionValue = opt ? opt.map(o => o.value) : null;
}
this.props.onChange(optionValue);
}
getOptions(props) {
// Accepts different formats of input
const options = props.choices.map(c => {
const options = props.choices.map((c) => {
let option;
if (Array.isArray(c)) {
const label = c.length > 1 ? c[1] : c[0];
@@ -75,7 +75,7 @@ export default class SelectControl extends React.PureComponent {
if (!Array.isArray(valuesToAdd)) {
valuesToAdd = [valuesToAdd];
}
valuesToAdd.forEach(v => {
valuesToAdd.forEach((v) => {
if (values.indexOf(v) < 0) {
options.push({ value: v, label: v });
}