Merge remote-tracking branch 'upstream/master' into patch-6
to fix the conflicts with current master
This commit is contained in:
commit
2fcf71fa17
15 changed files with 259 additions and 248 deletions
|
|
@ -137,6 +137,6 @@ module.exports = {
|
||||||
// flow
|
// flow
|
||||||
"flowtype/no-dupe-keys": "error",
|
"flowtype/no-dupe-keys": "error",
|
||||||
"flowtype/no-weak-types": "warn",
|
"flowtype/no-weak-types": "warn",
|
||||||
"flowtype/require-variable-type": "warn"
|
"flowtype/require-variable-type": "off" // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/198 to be resolved
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,5 @@ types/types.js
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
esproposal.export_star_as=enable
|
esproposal.export_star_as=enable
|
||||||
unsafe.enable_getters_and_setters=true
|
|
||||||
module.system.node.resolve_dirname=node_modules
|
module.system.node.resolve_dirname=node_modules
|
||||||
module.system.node.resolve_dirname=src
|
module.system.node.resolve_dirname=src
|
||||||
|
|
||||||
[lints]
|
|
||||||
all=warn
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 7
|
- 6
|
||||||
- 8
|
- 8
|
||||||
|
- 9
|
||||||
script:
|
script:
|
||||||
- yarn travis
|
- yarn travis
|
||||||
cache:
|
cache:
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ const config : Config = {
|
||||||
infoscreen: {
|
infoscreen: {
|
||||||
name: "Infoscreen",
|
name: "Infoscreen",
|
||||||
position: [255, 495],
|
position: [255, 495],
|
||||||
icon: "developer-board",
|
icon: "television-guide",
|
||||||
iconColor: ({infoscreen}) => infoscreen == "on" ? "#4444FF" : "#000000",
|
iconColor: ({infoscreen}) => infoscreen == "on" ? "#4444FF" : "#000000",
|
||||||
ui: [
|
ui: [
|
||||||
{
|
{
|
||||||
|
|
@ -441,6 +441,18 @@ const config : Config = {
|
||||||
text: "Open Webinterface"
|
text: "Open Webinterface"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
partkeepr: {
|
||||||
|
name: "Partkeepr",
|
||||||
|
position: [48, 450],
|
||||||
|
icon: "chip",
|
||||||
|
ui: [
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
link: "http://partkeepr.rzl/",
|
||||||
|
text: "Open Partkeepr"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
layers: [
|
layers: [
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -13,7 +13,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
"leaflet": "^1.2.0",
|
"leaflet": "^1.3.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"material-ui": "npm:material-ui@next",
|
"material-ui": "npm:material-ui@next",
|
||||||
"material-ui-old": "npm:material-ui@latest",
|
"material-ui-old": "npm:material-ui@latest",
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"mqtt": "^2.14.0",
|
"mqtt": "^2.14.0",
|
||||||
"react": "^16.0.0",
|
"react": "^16.0.0",
|
||||||
"react-dom": "^16.0.0",
|
"react-dom": "^16.0.0",
|
||||||
"react-leaflet": "^1.5.0",
|
"react-leaflet": "^1.8.0",
|
||||||
"react-tap-event-plugin": "^3.0.0",
|
"react-tap-event-plugin": "^3.0.0",
|
||||||
"redux": "^3.7.2"
|
"redux": "^3.7.2"
|
||||||
},
|
},
|
||||||
|
|
@ -33,20 +33,20 @@
|
||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"clean-webpack-plugin": "^0.1.17",
|
"clean-webpack-plugin": "^0.1.17",
|
||||||
"css-loader": "^0.28.7",
|
"css-loader": "^0.28.9",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.10.0",
|
||||||
"eslint-plugin-flowtype": "^2.39.1",
|
"eslint-plugin-flowtype": "^2.39.1",
|
||||||
"eslint-plugin-react": "^7.4.0",
|
"eslint-plugin-react": "^7.4.0",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
"extract-text-webpack-plugin": "^3.0.2",
|
||||||
"file-loader": "^1.1.5",
|
"file-loader": "^1.1.5",
|
||||||
"flow": "^0.2.3",
|
"flow": "^0.2.3",
|
||||||
"flow-bin": "^0.50.0",
|
"flow-bin": "^0.63.1",
|
||||||
"flow-typed": "^2.2.1",
|
"flow-typed": "^2.2.1",
|
||||||
"html-webpack-plugin": "^2.30.1",
|
"html-webpack-plugin": "^2.30.1",
|
||||||
"husky": "^0.14.3",
|
"husky": "^0.14.3",
|
||||||
"style-loader": "^0.19.0",
|
"style-loader": "^0.19.0",
|
||||||
"webpack": "^3.1.0",
|
"webpack": "^3.1.0",
|
||||||
"webpack-dev-server": "^2.9.4",
|
"webpack-dev-server": "^2.11.0",
|
||||||
"webpack-merge": "^4.1.1",
|
"webpack-merge": "^4.1.1",
|
||||||
"webpack-shell-plugin": "^0.5.0"
|
"webpack-shell-plugin": "^0.5.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export type AppState = {
|
||||||
selectedControl: ?Control,
|
selectedControl: ?Control,
|
||||||
drawerOpened: boolean,
|
drawerOpened: boolean,
|
||||||
mqttState: State,
|
mqttState: State,
|
||||||
mqttSend: (topic: string, value: any) => void,
|
mqttSend: (topic: string, value: Actual) => void,
|
||||||
mqttConnected: boolean,
|
mqttConnected: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ class App extends React.Component<AppProps & Classes, AppState> {
|
||||||
this.setState({drawerOpened: false});
|
this.setState({drawerOpened: false});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeState(topic: string, value: any) {
|
changeState(topic: string, value: Actual) {
|
||||||
const rawTopic = this.props.config.topics[topic].command;
|
const rawTopic = this.props.config.topics[topic].command;
|
||||||
if (rawTopic == null) {
|
if (rawTopic == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import parseIconName, { controlGetIcon } from "utils/parseIconName";
|
||||||
|
|
||||||
export type Point = [number, number];
|
export type Point = [number, number];
|
||||||
|
|
||||||
const convertPoint = ([y,x]: Point): Point => [-x, y];
|
const convertPoint = ([y, x]: Point): Point => [-x, y];
|
||||||
|
|
||||||
export type ControlMapProps = {
|
export type ControlMapProps = {
|
||||||
width: number,
|
width: number,
|
||||||
|
|
@ -58,12 +58,10 @@ export default class ControlMap extends React.Component<ControlMapProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
iconColor(control: Control): string {
|
iconColor(control: Control): string {
|
||||||
|
const ints = _.mapValues(this.props.state, (x) => x.internal || x.actual);
|
||||||
|
const acts = _.mapValues(this.props.state, (x) => x.actual);
|
||||||
if (control.iconColor != null) {
|
if (control.iconColor != null) {
|
||||||
return control.iconColor(
|
return control.iconColor(ints, acts, this.props.state);
|
||||||
_.mapValues(this.props.state, (x) => x.internal || x.actual),
|
|
||||||
_.mapValues(this.props.state, (x) => x.actual),
|
|
||||||
this.props.state
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return "#000";
|
return "#000";
|
||||||
}
|
}
|
||||||
|
|
@ -94,9 +92,16 @@ export default class ControlMap extends React.Component<ControlMapProps> {
|
||||||
<LayersControlType
|
<LayersControlType
|
||||||
key={layer.name}
|
key={layer.name}
|
||||||
name={layer.name}
|
name={layer.name}
|
||||||
checked={layer.defaultVisibility === "visible"}>
|
checked={layer.defaultVisibility === "visible"}
|
||||||
|
removeLayer={(_layer) => {}}
|
||||||
|
removeLayerControl={(_layer) => {}}
|
||||||
|
addOverlay={(_layer, _name, _checked) => {}}
|
||||||
|
addBaseLayer={(_layer, _name, _checked) => {}}>
|
||||||
<ImageOverlay url={layer.image}
|
<ImageOverlay url={layer.image}
|
||||||
bounds={Object.values(layer.bounds).map(convertPoint)}
|
bounds={[
|
||||||
|
convertPoint(layer.bounds.topLeft),
|
||||||
|
convertPoint(layer.bounds.bottomRight)
|
||||||
|
]}
|
||||||
opacity={layer.opacity || 1} />
|
opacity={layer.opacity || 1} />
|
||||||
</LayersControlType>
|
</LayersControlType>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
import withStyles from "material-ui/styles/withStyles";
|
import withStyles from "material-ui/styles/withStyles";
|
||||||
import Drawer from "material-ui/Drawer";
|
import Drawer from "material-ui/Drawer";
|
||||||
|
|
@ -14,7 +14,8 @@ export type SideBarProps = {
|
||||||
control: ?Control,
|
control: ?Control,
|
||||||
open: boolean,
|
open: boolean,
|
||||||
onCloseRequest: () => void,
|
onCloseRequest: () => void,
|
||||||
icon?: ?string
|
icon?: ?string,
|
||||||
|
children?: React.Node
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SideBarState = {
|
export type SideBarState = {
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,16 @@ import { MenuItem } from "material-ui/Menu";
|
||||||
import Button from "material-ui/Button";
|
import Button from "material-ui/Button";
|
||||||
|
|
||||||
import keyOf from "utils/keyOf";
|
import keyOf from "utils/keyOf";
|
||||||
|
import { getInternals, getActuals } from "utils/state";
|
||||||
|
|
||||||
type UiItemProps<I> = {
|
type UiItemProps<I> = {
|
||||||
item: I,
|
item: I,
|
||||||
state: State,
|
state: State,
|
||||||
onChangeState: (topic: string, nextState: any) => void
|
onChangeState: (topic: string, nextState: Actual) => void
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class UiItem<I> extends React.Component<UiItemProps<I>> {
|
// eslint-disable-next-line flowtype/no-weak-types
|
||||||
|
export default class UiItem<I:Object> extends React.Component<UiItemProps<I>> {
|
||||||
constructor(props: UiItemProps<I>) {
|
constructor(props: UiItemProps<I>) {
|
||||||
super(props);
|
super(props);
|
||||||
}
|
}
|
||||||
|
|
@ -30,48 +32,79 @@ export default class UiItem<I> extends React.Component<UiItemProps<I>> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
changeState(next: any) {
|
render() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: The type system can't really check if the enableCondition is of
|
||||||
|
* any function type or if it is a TopicDependentOption or a
|
||||||
|
* StateDependentOption. This should be fixed.
|
||||||
|
*/
|
||||||
|
isEnabled() {
|
||||||
|
if (Object.keys(this.props.item).includes("enableCondition") &&
|
||||||
|
typeof this.props.item.enableCondition == "function") {
|
||||||
|
const enableCondition = this.props.item.enableCondition;
|
||||||
|
const state = this.props.state;
|
||||||
|
const internals = getInternals(state);
|
||||||
|
const actuals = getActuals(state);
|
||||||
|
return enableCondition(internals, actuals, state);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UiControl<I: UIControl> extends UiItem<I> {
|
||||||
|
constructor(props: UiItemProps<I>) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
changeState(next: Actual) {
|
||||||
if (this.props.item.topic == null) {
|
if (this.props.item.topic == null) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Undefined topic in ${this.props.item.type} "${this.props.item.text}"`
|
`Missing topic in ${this.props.item.type} "${this.props.item.text}"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.props.onChangeState(this.props.item.topic, next);
|
this.props.onChangeState(this.props.item.topic, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
getValue() {
|
getValue() {
|
||||||
const topic: string = this.props.item.topic || "";
|
const control = this.props.item;
|
||||||
|
const topic: string = control.topic || "";
|
||||||
const value = this.props.state[topic];
|
const value = this.props.state[topic];
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
const control = this.props.item;
|
if (topic === "") {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unknown topic "${control.topic}" in ${control.type} "${control.text}"`
|
`Missing topic in ${control.type} "${control.text}"`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
throw new Error(
|
||||||
|
`Unknown topic "${topic}" in ${control.type} "${control.text}"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
isEnabled() {
|
isEnabled() {
|
||||||
|
if (Object.keys(this.props.item).includes("enableCondition") &&
|
||||||
|
typeof this.props.item.enableCondition == "function") {
|
||||||
const enableCondition = this.props.item.enableCondition;
|
const enableCondition = this.props.item.enableCondition;
|
||||||
if (enableCondition == null) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
const value = this.getValue();
|
const value = this.getValue();
|
||||||
return enableCondition(
|
return enableCondition(
|
||||||
value.internal || value.actual, value.actual, this.props.state);
|
value.internal || value.actual, value.actual, this.props.state);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Toggle extends UiItem<UIToggle> {
|
export class Toggle extends UiControl<UIToggle> {
|
||||||
isToggled = () => {
|
isToggled = () => {
|
||||||
const value = this.getValue();
|
const value = this.getValue();
|
||||||
const control = this.props.item;
|
const control = this.props.item;
|
||||||
const isChecked = control.toggled || ((i) => i === (control.on || "on"));
|
const isChecked = control.toggled ||
|
||||||
|
((i, _a, _s) => i === (control.on || "on"));
|
||||||
const checked = isChecked(
|
const checked = isChecked(
|
||||||
value.internal || value.actual, value.actual, this.props.state);
|
value.internal || value.actual, value.actual, this.props.state);
|
||||||
return checked;
|
return checked;
|
||||||
|
|
@ -99,8 +132,8 @@ export class Toggle extends UiItem<UIToggle> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DropDown extends UiItem<UIDropDown> {
|
export class DropDown extends UiControl<UIDropDown> {
|
||||||
runPrimaryAction = (next?: any) => {
|
runPrimaryAction = (next?: Actual) => {
|
||||||
if (this.isEnabled()) {
|
if (this.isEnabled()) {
|
||||||
const control = this.props.item;
|
const control = this.props.item;
|
||||||
const keys = _.keys(control.options);
|
const keys = _.keys(control.options);
|
||||||
|
|
@ -117,7 +150,7 @@ export class DropDown extends UiItem<UIDropDown> {
|
||||||
render() {
|
render() {
|
||||||
const control = this.props.item;
|
const control = this.props.item;
|
||||||
const value = this.getValue();
|
const value = this.getValue();
|
||||||
const id = `${control.topic}-${control.name}`;
|
const id = `${control.topic}-${control.text}`;
|
||||||
const options = control.options;
|
const options = control.options;
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|
@ -173,7 +206,7 @@ export class Section extends UiItem<UISection> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Text extends UiItem<UIText> {
|
export class Text extends UiControl<UIText> {
|
||||||
render() {
|
render() {
|
||||||
return [
|
return [
|
||||||
<ListItemText key="label" primary={this.props.item.text} />,
|
<ListItemText key="label" primary={this.props.item.text} />,
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,9 @@ import {
|
||||||
ListItem,
|
ListItem,
|
||||||
ListItemIcon,
|
ListItemIcon,
|
||||||
ListItemSecondaryAction,
|
ListItemSecondaryAction,
|
||||||
ListItemText,
|
ListItemText
|
||||||
ListSubheader
|
|
||||||
} from "material-ui/List";
|
} from "material-ui/List";
|
||||||
import Switch from "material-ui/Switch";
|
|
||||||
import { renderIcon } from "utils/parseIconName";
|
import { renderIcon } from "utils/parseIconName";
|
||||||
import Input, { InputLabel } from "material-ui/Input";
|
|
||||||
import { FormControl } from "material-ui/Form";
|
|
||||||
import Select from "material-ui/Select";
|
|
||||||
import { MenuItem } from "material-ui/Menu";
|
|
||||||
import Button from "material-ui/Button";
|
|
||||||
|
|
||||||
// TODO: Use something else
|
// TODO: Use something else
|
||||||
import Slider from "material-ui-old/Slider";
|
import Slider from "material-ui-old/Slider";
|
||||||
|
|
@ -25,7 +18,7 @@ import { Toggle, DropDown, Link, Section, Text } from "./UiItem";
|
||||||
export type UiItemListProps = {
|
export type UiItemListProps = {
|
||||||
controls: Array<ControlUI>,
|
controls: Array<ControlUI>,
|
||||||
state: State,
|
state: State,
|
||||||
onChangeState: (topic: string, nextState: any) => void
|
onChangeState: (topic: string, nextState: Actual) => void
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class UiItemList extends React.Component<UiItemListProps> {
|
export default class UiItemList extends React.Component<UiItemListProps> {
|
||||||
|
|
@ -91,18 +84,7 @@ export default class UiItemList extends React.Component<UiItemListProps> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isEnabled(control: ControlUI) {
|
getValue(control: UIControl) {
|
||||||
const enableCondition = control.enableCondition;
|
|
||||||
if (enableCondition == null) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
const value = this.getValue(control);
|
|
||||||
return enableCondition(
|
|
||||||
value.internal || value.actual, value.actual, this.props.state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getValue(control: ControlUI) {
|
|
||||||
const value = this.props.state[control.topic];
|
const value = this.props.state[control.topic];
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|
@ -112,77 +94,7 @@ export default class UiItemList extends React.Component<UiItemListProps> {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleSwitch(control: ControlUI, newState: boolean) {
|
renderSlider(control: UISlider) {
|
||||||
this.props.onChangeState(control.topic,
|
|
||||||
newState ? (control.on || "on") : (control.off || "off"));
|
|
||||||
}
|
|
||||||
|
|
||||||
renderToggle(control: ControlUI) {
|
|
||||||
const value = this.getValue(control);
|
|
||||||
const isToggled = control.toggled || ((i) => i === (control.on || "on"));
|
|
||||||
const checked = isToggled(
|
|
||||||
value.internal || value.actual, value.actual, this.props.state);
|
|
||||||
return [
|
|
||||||
<ListItemText key="label" primary={control.text} />,
|
|
||||||
<ListItemSecondaryAction key="action">
|
|
||||||
<Switch label={control.text}
|
|
||||||
checked={checked}
|
|
||||||
onChange={(_event, state) => this.toggleSwitch(control, state)}
|
|
||||||
disabled={!this.isEnabled(control)} />
|
|
||||||
</ListItemSecondaryAction>
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
changeDropDown(control: ControlUI, newState: string) {
|
|
||||||
this.props.onChangeState(control.topic, newState);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderDropDown(control: ControlUI) {
|
|
||||||
const value = this.getValue(control);
|
|
||||||
const id = `${control.topic}-${control.name}`;
|
|
||||||
const options = control.options;
|
|
||||||
if (options == null) {
|
|
||||||
throw new Error(
|
|
||||||
`Parameter "options" missing for ${control.type} "${control.text}"`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<FormControl>
|
|
||||||
<InputLabel htmlFor={id}>{control.text}</InputLabel>
|
|
||||||
<Select value={value.internal || value.actual}
|
|
||||||
onChange={(event) => this.changeDropDown(control, event.target.value)}
|
|
||||||
disabled={!this.isEnabled(control)}
|
|
||||||
input={<Input id={id} />}
|
|
||||||
>
|
|
||||||
{_.map(options, (v, k) => <MenuItem value={k} key={k}>{v}</MenuItem>)}
|
|
||||||
</Select>
|
|
||||||
</FormControl>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderSection(control: ControlUI) {
|
|
||||||
return (
|
|
||||||
<ListSubheader key={control.text}>{control.text}</ListSubheader>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderLink(control: ControlUI) {
|
|
||||||
if (control.link == null) {
|
|
||||||
throw new Error(
|
|
||||||
`Parameter "link" missing for ${control.type} "${control.text}"`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<Button raised
|
|
||||||
onClick={() => window.open(control.link, "_blank")}
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
{control.text}
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderSlider(control: ControlUI) {
|
|
||||||
const value = this.getValue(control);
|
const value = this.getValue(control);
|
||||||
return [
|
return [
|
||||||
<ListItemText primary={control.text} key="text" />,
|
<ListItemText primary={control.text} key="text" />,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,24 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from "react";
|
import * as React from "react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { getInternals, getActuals } from "utils/state";
|
||||||
|
|
||||||
export default function parseIconName(name: string): string {
|
export default function parseIconName(name: string): string {
|
||||||
return `mdi ${name.split(" ").map((icon) => "mdi-".concat(icon)).join(" ")}`;
|
return `mdi ${name.split(" ").map((icon) => "mdi-".concat(icon)).join(" ")}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const renderIcon = (name: string, extraClass?: string) => {
|
export const renderIcon = (name: string, extraClass?: string): React.Node => {
|
||||||
return <i className={`${extraClass || ""} ${parseIconName(name)}`}></i>;
|
return <i className={`${extraClass || ""} ${parseIconName(name)}`}></i>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const controlGetIcon = (control: Control, state: State): string => {
|
export const controlGetIcon = (control: Control, state: State): string => {
|
||||||
const internals = _.mapValues(state, (x) => x.internal || x.actual);
|
const internals: Map<string, Internal> = getInternals(state);
|
||||||
const actuals = _.mapValues(state, (x) => x.actual);
|
const actuals: Map<string, Actual> = getActuals(state);
|
||||||
return typeof control.icon !== "function" ? control.icon
|
return typeof control.icon !== "function" ? control.icon
|
||||||
: control.icon(internals, actuals, state);
|
: control.icon(internals, actuals, state);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const renderControlIcon = (control: Control,
|
export const renderControlIcon = (control: Control,
|
||||||
state: State, extraClass?: string) => {
|
state: State, extraClass?: string): React.Node => {
|
||||||
return renderIcon(controlGetIcon(control, state), extraClass);
|
return renderIcon(controlGetIcon(control, state), extraClass);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
8
src/utils/state.js
Normal file
8
src/utils/state.js
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
// @flow
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export const getInternals = (state: State): Map<string, Internal> =>
|
||||||
|
_.mapValues(state, (x) => x.internal || x.actual);
|
||||||
|
|
||||||
|
export const getActuals = (state: State): Map<string, Actual> =>
|
||||||
|
_.mapValues(state, (x) => x.actual);
|
||||||
|
|
@ -13,46 +13,76 @@ declare type Topic = {
|
||||||
};
|
};
|
||||||
declare type Topics = Map<string,Topic>;
|
declare type Topics = Map<string,Topic>;
|
||||||
|
|
||||||
declare type UIBase = {
|
declare type TopicDependentOption<T> = (
|
||||||
text: string,
|
internal: string, actual: any, state: State
|
||||||
topic?: string,
|
) => T;
|
||||||
icon?: string,
|
declare type StateDependentOption<T> = (
|
||||||
enableCondition?: (internal: string, actual: any, state: State) => boolean
|
internals: Map<string, string>, actuals: Map<string, any>, state: State
|
||||||
}
|
) => T;
|
||||||
|
|
||||||
declare type UIToggle = {
|
interface UIControl {
|
||||||
|
+type: string,
|
||||||
|
+text: string,
|
||||||
|
+topic: string
|
||||||
|
};
|
||||||
|
|
||||||
|
interface Enableable {
|
||||||
|
enableCondition?: TopicDependentOption<boolean>
|
||||||
|
};
|
||||||
|
|
||||||
|
declare type UIToggle = $ReadOnly<{|
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
text: string,
|
||||||
|
topic: string,
|
||||||
|
icon?: string,
|
||||||
|
enableCondition?: TopicDependentOption<boolean>,
|
||||||
on?: string,
|
on?: string,
|
||||||
off?: string,
|
off?: string,
|
||||||
toggled?: (internal: string, actual: any, state: State) => boolean,
|
toggled?: TopicDependentOption<boolean>
|
||||||
} & UIBase;
|
|}>;
|
||||||
|
|
||||||
declare type UIDropDown = {
|
declare type UIDropDown = $ReadOnly<{|
|
||||||
type: "dropDown",
|
type: "dropDown",
|
||||||
|
text: string,
|
||||||
|
topic: string,
|
||||||
|
icon?: string,
|
||||||
|
enableCondition?: TopicDependentOption<boolean>,
|
||||||
options: Map<string, any>,
|
options: Map<string, any>,
|
||||||
renderValue?: (value: string) => string
|
renderValue?: (value: string) => string
|
||||||
} & UIBase;
|
|}>;
|
||||||
|
|
||||||
declare type UISlider = {
|
declare type UISlider = $ReadOnly<{|
|
||||||
type: "slider",
|
type: "slider",
|
||||||
|
text: string,
|
||||||
|
topic: string,
|
||||||
|
icon?: string,
|
||||||
|
enableCondition?: TopicDependentOption<boolean>,
|
||||||
min?: number,
|
min?: number,
|
||||||
max?: number,
|
max?: number,
|
||||||
step?: number
|
step?: number
|
||||||
} & UIBase;
|
|}>;
|
||||||
|
|
||||||
declare type UISection = {
|
declare type UISection = $ReadOnly<{|
|
||||||
type: "section",
|
type: "section",
|
||||||
text: string
|
text: string
|
||||||
};
|
|}>;
|
||||||
|
|
||||||
declare type UILink = {
|
declare type UILink = $ReadOnly<{|
|
||||||
type: "link",
|
type: "link",
|
||||||
link: string
|
text: string,
|
||||||
} & UIBase;
|
link: string,
|
||||||
|
enableCondition?: StateDependentOption<boolean>,
|
||||||
|
|
||||||
declare type UIText = {
|
// TODO: check if both the following options are implemented
|
||||||
type: "text"
|
icon?: string
|
||||||
} & UIBase;
|
|}>;
|
||||||
|
|
||||||
|
declare type UIText = $ReadOnly<{|
|
||||||
|
type: "text",
|
||||||
|
text: string,
|
||||||
|
topic: string,
|
||||||
|
icon?: string
|
||||||
|
|}>;
|
||||||
|
|
||||||
declare type ControlUI =
|
declare type ControlUI =
|
||||||
UIToggle
|
UIToggle
|
||||||
|
|
@ -64,7 +94,7 @@ declare type ControlUI =
|
||||||
|
|
||||||
declare type Control = {
|
declare type Control = {
|
||||||
name: string,
|
name: string,
|
||||||
position: Array<number>,
|
position: [number, number],
|
||||||
icon: string | (
|
icon: string | (
|
||||||
internals: Map<string, string>,
|
internals: Map<string, string>,
|
||||||
actuals: Map<string, any>,
|
actuals: Map<string, any>,
|
||||||
|
|
@ -93,6 +123,8 @@ declare type Space = {
|
||||||
mqtt: string
|
mqtt: string
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declare type Internal = string;
|
||||||
|
declare type Actual = any;
|
||||||
declare type StateValue = {
|
declare type StateValue = {
|
||||||
internal: string,
|
internal: string,
|
||||||
actual: any
|
actual: any
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CleanWebpackPlugin(["dist"]),
|
new CleanWebpackPlugin(["dist"]),
|
||||||
// new WebpackShellPlugin({onBuildStart:preBuildScripts}),
|
new WebpackShellPlugin({onBuildStart:preBuildScripts}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
title: 'Space Map',
|
title: 'Space Map',
|
||||||
template: 'index.ejs'
|
template: 'index.ejs'
|
||||||
|
|
|
||||||
156
yarn.lock
156
yarn.lock
|
|
@ -54,6 +54,20 @@
|
||||||
lodash "^4.2.0"
|
lodash "^4.2.0"
|
||||||
to-fast-properties "^2.0.0"
|
to-fast-properties "^2.0.0"
|
||||||
|
|
||||||
|
"@types/jss@^9.3.0":
|
||||||
|
version "9.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.3.0.tgz#0f8484fd03ded206917be27b58217f274a0ad59f"
|
||||||
|
|
||||||
|
"@types/react-transition-group@^2.0.6":
|
||||||
|
version "2.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.0.6.tgz#8903fa2cf540ba454461590bff811a787889617c"
|
||||||
|
dependencies:
|
||||||
|
"@types/react" "*"
|
||||||
|
|
||||||
|
"@types/react@*":
|
||||||
|
version "16.0.34"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.34.tgz#7a8f795afd8a404a9c4af9539b24c75d3996914e"
|
||||||
|
|
||||||
abbrev@1:
|
abbrev@1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||||
|
|
@ -1131,10 +1145,10 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
|
||||||
electron-to-chromium "^1.2.7"
|
electron-to-chromium "^1.2.7"
|
||||||
|
|
||||||
browserslist@^2.1.2:
|
browserslist@^2.1.2:
|
||||||
version "2.11.1"
|
version "2.11.3"
|
||||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.1.tgz#02fda29d9a2164b879100126e7b0d0b57e43a7bb"
|
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2"
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite "^1.0.30000789"
|
caniuse-lite "^1.0.30000792"
|
||||||
electron-to-chromium "^1.3.30"
|
electron-to-chromium "^1.3.30"
|
||||||
|
|
||||||
buffer-indexof@^1.0.0:
|
buffer-indexof@^1.0.0:
|
||||||
|
|
@ -1240,12 +1254,12 @@ caniuse-api@^1.5.2:
|
||||||
lodash.uniq "^4.5.0"
|
lodash.uniq "^4.5.0"
|
||||||
|
|
||||||
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
||||||
version "1.0.30000791"
|
version "1.0.30000793"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000791.tgz#06787f56caef4300a17e35d137447123bdf536f9"
|
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000793.tgz#3c00c66e423a7a1907c7dd96769a78b2afa8a72e"
|
||||||
|
|
||||||
caniuse-lite@^1.0.30000789:
|
caniuse-lite@^1.0.30000792:
|
||||||
version "1.0.30000791"
|
version "1.0.30000792"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000791.tgz#8e35745efd483a3e23bb7d350990326d2319fc16"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000792.tgz#d0cea981f8118f3961471afbb43c9a1e5bbf0332"
|
||||||
|
|
||||||
caseless@~0.12.0:
|
caseless@~0.12.0:
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
|
|
@ -1653,9 +1667,9 @@ css-in-js-utils@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
hyphenate-style-name "^1.0.2"
|
hyphenate-style-name "^1.0.2"
|
||||||
|
|
||||||
css-loader@^0.28.7:
|
css-loader@^0.28.9:
|
||||||
version "0.28.8"
|
version "0.28.9"
|
||||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.8.tgz#ff36381464dea18fe60f2601a060ba6445886bd5"
|
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.9.tgz#68064b85f4e271d7ce4c48a58300928e535d1c95"
|
||||||
dependencies:
|
dependencies:
|
||||||
babel-code-frame "^6.26.0"
|
babel-code-frame "^6.26.0"
|
||||||
css-selector-tokenizer "^0.7.0"
|
css-selector-tokenizer "^0.7.0"
|
||||||
|
|
@ -1665,7 +1679,7 @@ css-loader@^0.28.7:
|
||||||
lodash.camelcase "^4.3.0"
|
lodash.camelcase "^4.3.0"
|
||||||
object-assign "^4.1.1"
|
object-assign "^4.1.1"
|
||||||
postcss "^5.0.6"
|
postcss "^5.0.6"
|
||||||
postcss-modules-extract-imports "^1.1.0"
|
postcss-modules-extract-imports "^1.2.0"
|
||||||
postcss-modules-local-by-default "^1.2.0"
|
postcss-modules-local-by-default "^1.2.0"
|
||||||
postcss-modules-scope "^1.1.0"
|
postcss-modules-scope "^1.1.0"
|
||||||
postcss-modules-values "^1.3.0"
|
postcss-modules-values "^1.3.0"
|
||||||
|
|
@ -2004,15 +2018,9 @@ ee-first@1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||||
|
|
||||||
electron-releases@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/electron-releases/-/electron-releases-2.1.0.tgz#c5614bf811f176ce3c836e368a0625782341fd4e"
|
|
||||||
|
|
||||||
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
|
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
|
||||||
version "1.3.30"
|
version "1.3.31"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.30.tgz#9666f532a64586651fc56a72513692e820d06a80"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f"
|
||||||
dependencies:
|
|
||||||
electron-releases "^2.1.0"
|
|
||||||
|
|
||||||
elliptic@^6.0.0:
|
elliptic@^6.0.0:
|
||||||
version "6.4.0"
|
version "6.4.0"
|
||||||
|
|
@ -2090,13 +2098,13 @@ es-to-primitive@^1.1.1:
|
||||||
is-symbol "^1.0.1"
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
|
es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
|
||||||
version "0.10.37"
|
version "0.10.38"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.37.tgz#0ee741d148b80069ba27d020393756af257defc3"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.38.tgz#fa7d40d65bbc9bb8a67e1d3f9cc656a00530eed3"
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "~2.0.1"
|
es6-iterator "~2.0.3"
|
||||||
es6-symbol "~3.1.1"
|
es6-symbol "~3.1.1"
|
||||||
|
|
||||||
es6-iterator@^2.0.1, es6-iterator@~2.0.1:
|
es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
|
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -2555,9 +2563,9 @@ flatten@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
||||||
|
|
||||||
flow-bin@^0.50.0:
|
flow-bin@^0.63.1:
|
||||||
version "0.50.0"
|
version "0.63.1"
|
||||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.50.0.tgz#d4cdb2430dee1a3599f0eb6fe551146e3027256a"
|
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.63.1.tgz#ab00067c197169a5fb5b4996c8f6927b06694828"
|
||||||
|
|
||||||
flow-typed@^2.2.1:
|
flow-typed@^2.2.1:
|
||||||
version "2.2.3"
|
version "2.2.3"
|
||||||
|
|
@ -3561,8 +3569,8 @@ isurl@^1.0.0-alpha5:
|
||||||
is-object "^1.0.1"
|
is-object "^1.0.1"
|
||||||
|
|
||||||
js-base64@^2.1.9:
|
js-base64@^2.1.9:
|
||||||
version "2.4.0"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.0.tgz#9e566fee624751a1d720c966cd6226d29d4025aa"
|
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.1.tgz#e02813181cd53002888e918935467acb2910e596"
|
||||||
|
|
||||||
js-tokens@^3.0.0, js-tokens@^3.0.2:
|
js-tokens@^3.0.0, js-tokens@^3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
|
|
@ -3657,15 +3665,15 @@ jss-compose@^5.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
jss-default-unit@^8.0.0, jss-default-unit@^8.0.2:
|
jss-default-unit@^8.0.2:
|
||||||
version "8.0.2"
|
version "8.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/jss-default-unit/-/jss-default-unit-8.0.2.tgz#cc1e889bae4c0b9419327b314ab1c8e2826890e6"
|
resolved "https://registry.yarnpkg.com/jss-default-unit/-/jss-default-unit-8.0.2.tgz#cc1e889bae4c0b9419327b314ab1c8e2826890e6"
|
||||||
|
|
||||||
jss-expand@^5.0.0:
|
jss-expand@^5.1.0:
|
||||||
version "5.1.0"
|
version "5.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/jss-expand/-/jss-expand-5.1.0.tgz#b1ad74ec18631f34f65a2124fcfceb6400610e3d"
|
resolved "https://registry.yarnpkg.com/jss-expand/-/jss-expand-5.1.0.tgz#b1ad74ec18631f34f65a2124fcfceb6400610e3d"
|
||||||
|
|
||||||
jss-extend@^6.0.1:
|
jss-extend@^6.1.0:
|
||||||
version "6.1.0"
|
version "6.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/jss-extend/-/jss-extend-6.1.0.tgz#85f3d39944018e8f44b322c14fa316068aa7bb0b"
|
resolved "https://registry.yarnpkg.com/jss-extend/-/jss-extend-6.1.0.tgz#85f3d39944018e8f44b322c14fa316068aa7bb0b"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -3682,27 +3690,27 @@ jss-nested@^6.0.1:
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
jss-preset-default@^4.0.1:
|
jss-preset-default@^4.0.1:
|
||||||
version "4.0.1"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/jss-preset-default/-/jss-preset-default-4.0.1.tgz#822cecb87c27ff91633774422f4c221d61486b65"
|
resolved "https://registry.yarnpkg.com/jss-preset-default/-/jss-preset-default-4.1.0.tgz#8a07d8de92cb0c55b70dc1919b802aed9cc4ebe9"
|
||||||
dependencies:
|
dependencies:
|
||||||
jss-camel-case "^6.0.0"
|
jss-camel-case "^6.0.0"
|
||||||
jss-compose "^5.0.0"
|
jss-compose "^5.0.0"
|
||||||
jss-default-unit "^8.0.0"
|
jss-default-unit "^8.0.2"
|
||||||
jss-expand "^5.0.0"
|
jss-expand "^5.1.0"
|
||||||
jss-extend "^6.0.1"
|
jss-extend "^6.1.0"
|
||||||
jss-global "^3.0.0"
|
jss-global "^3.0.0"
|
||||||
jss-nested "^6.0.1"
|
jss-nested "^6.0.1"
|
||||||
jss-props-sort "^6.0.0"
|
jss-props-sort "^6.0.0"
|
||||||
jss-template "^1.0.0"
|
jss-template "^1.0.1"
|
||||||
jss-vendor-prefixer "^7.0.0"
|
jss-vendor-prefixer "^7.0.0"
|
||||||
|
|
||||||
jss-props-sort@^6.0.0:
|
jss-props-sort@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/jss-props-sort/-/jss-props-sort-6.0.0.tgz#9105101a3b5071fab61e2d85ea74cc22e9b16323"
|
resolved "https://registry.yarnpkg.com/jss-props-sort/-/jss-props-sort-6.0.0.tgz#9105101a3b5071fab61e2d85ea74cc22e9b16323"
|
||||||
|
|
||||||
jss-template@^1.0.0:
|
jss-template@^1.0.1:
|
||||||
version "1.0.0"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/jss-template/-/jss-template-1.0.0.tgz#4b874608706ddceecacdb5567e254aecb6ea69b3"
|
resolved "https://registry.yarnpkg.com/jss-template/-/jss-template-1.0.1.tgz#09aed9d86cc547b07f53ef355d7e1777f7da430a"
|
||||||
dependencies:
|
dependencies:
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
|
|
@ -3770,9 +3778,9 @@ lcid@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
invert-kv "^1.0.0"
|
invert-kv "^1.0.0"
|
||||||
|
|
||||||
leaflet@^1.2.0:
|
leaflet@^1.3.1:
|
||||||
version "1.2.0"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.2.0.tgz#fd5d93d9cb00091f5f8a69206d0d6744c1c82697"
|
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.3.1.tgz#86f336d2fb0e2d0ff446677049a5dc34cf0ea60e"
|
||||||
|
|
||||||
leven@^1.0.0:
|
leven@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
|
@ -3948,9 +3956,11 @@ map-visit@^1.0.0:
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
"material-ui@npm:material-ui@next":
|
"material-ui@npm:material-ui@next":
|
||||||
version "1.0.0-beta.27"
|
version "1.0.0-beta.29"
|
||||||
resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-1.0.0-beta.27.tgz#f3073b7acffebd1fc6d0339a3260d4555445daf7"
|
resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-1.0.0-beta.29.tgz#21ddf110d7aae4a6582584fc10ce948f144b1f2b"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@types/jss" "^9.3.0"
|
||||||
|
"@types/react-transition-group" "^2.0.6"
|
||||||
babel-runtime "^6.26.0"
|
babel-runtime "^6.26.0"
|
||||||
brcast "^3.0.1"
|
brcast "^3.0.1"
|
||||||
classnames "^2.2.5"
|
classnames "^2.2.5"
|
||||||
|
|
@ -4190,8 +4200,8 @@ multicast-dns-service-types@^1.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
|
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
|
||||||
|
|
||||||
multicast-dns@^6.0.1:
|
multicast-dns@^6.0.1:
|
||||||
version "6.2.1"
|
version "6.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.1.tgz#c5035defa9219d30640558a49298067352098060"
|
resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.2.tgz#300b6133361f8aaaf2b8d1248e85c363fe5b95a0"
|
||||||
dependencies:
|
dependencies:
|
||||||
dns-packet "^1.0.1"
|
dns-packet "^1.0.1"
|
||||||
thunky "^0.1.0"
|
thunky "^0.1.0"
|
||||||
|
|
@ -4437,8 +4447,8 @@ onetime@^2.0.0:
|
||||||
mimic-fn "^1.0.0"
|
mimic-fn "^1.0.0"
|
||||||
|
|
||||||
opn@^5.1.0:
|
opn@^5.1.0:
|
||||||
version "5.1.0"
|
version "5.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519"
|
resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225"
|
||||||
dependencies:
|
dependencies:
|
||||||
is-wsl "^1.1.0"
|
is-wsl "^1.1.0"
|
||||||
|
|
||||||
|
|
@ -4819,9 +4829,9 @@ postcss-minify-selectors@^2.0.4:
|
||||||
postcss "^5.0.14"
|
postcss "^5.0.14"
|
||||||
postcss-selector-parser "^2.0.0"
|
postcss-selector-parser "^2.0.0"
|
||||||
|
|
||||||
postcss-modules-extract-imports@^1.1.0:
|
postcss-modules-extract-imports@^1.2.0:
|
||||||
version "1.1.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb"
|
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85"
|
||||||
dependencies:
|
dependencies:
|
||||||
postcss "^6.0.1"
|
postcss "^6.0.1"
|
||||||
|
|
||||||
|
|
@ -5038,8 +5048,8 @@ pump@^2.0.0:
|
||||||
once "^1.3.1"
|
once "^1.3.1"
|
||||||
|
|
||||||
pumpify@^1.3.5:
|
pumpify@^1.3.5:
|
||||||
version "1.3.6"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.6.tgz#00d40e5ded0a3bf1e0788b1c0cf426a42882ab64"
|
resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb"
|
||||||
dependencies:
|
dependencies:
|
||||||
duplexify "^3.5.3"
|
duplexify "^3.5.3"
|
||||||
inherits "^2.0.3"
|
inherits "^2.0.3"
|
||||||
|
|
@ -5128,8 +5138,8 @@ raw-body@2.3.2:
|
||||||
unpipe "1.0.0"
|
unpipe "1.0.0"
|
||||||
|
|
||||||
rc@^1.1.7:
|
rc@^1.1.7:
|
||||||
version "1.2.3"
|
version "1.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.3.tgz#51575a900f8dd68381c710b4712c2154c3e2035b"
|
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.4.tgz#a0f606caae2a3b862bbd0ef85482c0125b315fa3"
|
||||||
dependencies:
|
dependencies:
|
||||||
deep-extend "~0.4.0"
|
deep-extend "~0.4.0"
|
||||||
ini "~1.3.0"
|
ini "~1.3.0"
|
||||||
|
|
@ -5164,9 +5174,9 @@ react-jss@^8.1.0:
|
||||||
prop-types "^15.6.0"
|
prop-types "^15.6.0"
|
||||||
theming "^1.3.0"
|
theming "^1.3.0"
|
||||||
|
|
||||||
react-leaflet@^1.5.0:
|
react-leaflet@^1.8.0:
|
||||||
version "1.7.8"
|
version "1.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-1.7.8.tgz#5b58be948a7e2efe5c302a65746c9e8b25477c59"
|
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-1.8.0.tgz#e33ba704910e2ad86dd29b5a4a52acb7030fe2c4"
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.0.0"
|
lodash "^4.0.0"
|
||||||
lodash-es "^4.0.0"
|
lodash-es "^4.0.0"
|
||||||
|
|
@ -5262,7 +5272,7 @@ readable-stream@1.0, readable-stream@~1.0.0, readable-stream@~1.0.31:
|
||||||
isarray "0.0.1"
|
isarray "0.0.1"
|
||||||
string_decoder "~0.10.x"
|
string_decoder "~0.10.x"
|
||||||
|
|
||||||
"readable-stream@> 1.0.0 < 3.0.0", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3:
|
"readable-stream@> 1.0.0 < 3.0.0", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3:
|
||||||
version "2.3.3"
|
version "2.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -5580,8 +5590,8 @@ selfsigned@^1.9.1:
|
||||||
node-forge "0.6.33"
|
node-forge "0.6.33"
|
||||||
|
|
||||||
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
|
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
|
||||||
version "5.4.1"
|
version "5.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
||||||
|
|
||||||
send@0.16.1:
|
send@0.16.1:
|
||||||
version "0.16.1"
|
version "0.16.1"
|
||||||
|
|
@ -5892,12 +5902,12 @@ stream-browserify@^2.0.1:
|
||||||
readable-stream "^2.0.2"
|
readable-stream "^2.0.2"
|
||||||
|
|
||||||
stream-http@^2.7.2:
|
stream-http@^2.7.2:
|
||||||
version "2.7.2"
|
version "2.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad"
|
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10"
|
||||||
dependencies:
|
dependencies:
|
||||||
builtin-status-codes "^3.0.0"
|
builtin-status-codes "^3.0.0"
|
||||||
inherits "^2.0.1"
|
inherits "^2.0.1"
|
||||||
readable-stream "^2.2.6"
|
readable-stream "^2.3.3"
|
||||||
to-arraybuffer "^1.0.0"
|
to-arraybuffer "^1.0.0"
|
||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
|
|
||||||
|
|
@ -6212,8 +6222,8 @@ ua-parser-js@^0.7.9:
|
||||||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
||||||
|
|
||||||
uglify-js@3.3.x:
|
uglify-js@3.3.x:
|
||||||
version "3.3.6"
|
version "3.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.6.tgz#3ca624e713f1981df455d72a02ab6ffe632b5d2d"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.7.tgz#28463e7c7451f89061d2b235e30925bf5625e14d"
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.13.0"
|
commander "~2.13.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
|
|
@ -6381,8 +6391,8 @@ utils-merge@1.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
||||||
|
|
||||||
uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0:
|
uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
|
||||||
|
|
||||||
v8flags@^2.1.1:
|
v8flags@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
|
@ -6449,9 +6459,9 @@ webpack-dev-middleware@1.12.2:
|
||||||
range-parser "^1.0.3"
|
range-parser "^1.0.3"
|
||||||
time-stamp "^2.0.0"
|
time-stamp "^2.0.0"
|
||||||
|
|
||||||
webpack-dev-server@^2.9.4:
|
webpack-dev-server@^2.11.0:
|
||||||
version "2.10.1"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.10.1.tgz#a9768375346e62155860fe3cef3d4d641b24273e"
|
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.11.0.tgz#e9d4830ab7eb16c6f92ed68b92f6089027960e1b"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-html "0.0.7"
|
ansi-html "0.0.7"
|
||||||
array-includes "^3.0.3"
|
array-includes "^3.0.3"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue