Update dependencies
This commit is contained in:
+17
-17
@@ -8,37 +8,37 @@
|
|||||||
},
|
},
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ngrx/store-devtools": "3.2.2",
|
"@ngrx/store-devtools": "3.2.3",
|
||||||
"@ngrx/store-log-monitor": "3.0.2",
|
"@ngrx/store-log-monitor": "3.0.2",
|
||||||
"@types/core-js": "0.9.35",
|
"@types/core-js": "0.9.35",
|
||||||
"@types/electron": "^1.4.29",
|
"@types/electron": "^1.4.29",
|
||||||
"@types/jquery": "2.0.34",
|
"@types/jquery": "2.0.39",
|
||||||
"@types/node": "6.0.52",
|
"@types/node": "6.0.52",
|
||||||
"copy-webpack-plugin": "^4.0.1",
|
"copy-webpack-plugin": "^4.0.1",
|
||||||
"electron": "1.4.13",
|
"electron": "1.4.15",
|
||||||
"expose-loader": "^0.7.1",
|
"expose-loader": "^0.7.1",
|
||||||
"html-loader": "0.4.4",
|
"html-loader": "0.4.4",
|
||||||
"node-sass": "^4.0.0",
|
"node-sass": "^4.3.0",
|
||||||
"npm-run-all": "3.1.2",
|
"npm-run-all": "4.0.1",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"sass-loader": "^4.1.0",
|
"sass-loader": "^4.1.0",
|
||||||
"stylelint": "^7.0.3",
|
"stylelint": "^7.0.3",
|
||||||
"ts-loader": "^1.3.2",
|
"ts-loader": "^1.3.2",
|
||||||
"tslint": "~4.1.1",
|
"tslint": "~4.3.1",
|
||||||
"webpack": "^1.14.0",
|
"webpack": "^1.14.0",
|
||||||
"webpack-dev-server": "^1.16.2",
|
"webpack-dev-server": "^1.16.2",
|
||||||
"webpack-fail-plugin": "^1.0.5",
|
"webpack-fail-plugin": "^1.0.5",
|
||||||
"webpack-svgstore-plugin": "^3.0.6"
|
"webpack-svgstore-plugin": "^3.0.6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.4.1",
|
"@angular/common": "2.4.4",
|
||||||
"@angular/compiler": "2.4.1",
|
"@angular/compiler": "2.4.4",
|
||||||
"@angular/core": "2.4.1",
|
"@angular/core": "2.4.4",
|
||||||
"@angular/forms": "2.4.1",
|
"@angular/forms": "2.4.4",
|
||||||
"@angular/platform-browser": "2.4.1",
|
"@angular/platform-browser": "2.4.4",
|
||||||
"@angular/platform-browser-dynamic": "2.4.1",
|
"@angular/platform-browser-dynamic": "2.4.4",
|
||||||
"@angular/router": "3.4.1",
|
"@angular/router": "3.4.4",
|
||||||
"@ngrx/core": "1.2.0",
|
"@ngrx/core": "1.2.0",
|
||||||
"@ngrx/effects": "2.0.0",
|
"@ngrx/effects": "2.0.0",
|
||||||
"@ngrx/store": "2.2.1",
|
"@ngrx/store": "2.2.1",
|
||||||
@@ -49,13 +49,13 @@
|
|||||||
"font-awesome": "^4.6.3",
|
"font-awesome": "^4.6.3",
|
||||||
"jquery": "3.1.1",
|
"jquery": "3.1.1",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"ng2-dragula": "1.2.2",
|
"ng2-dragula": "1.3.0",
|
||||||
"ng2-select2": "1.0.0-beta.6",
|
"ng2-select2": "1.0.0-beta.6",
|
||||||
"rxjs": "5.0.1",
|
"rxjs": "5.0.3",
|
||||||
"select2": "^4.0.3",
|
"select2": "^4.0.3",
|
||||||
"typescript": "2.1.4",
|
"typescript": "2.1.5",
|
||||||
"xml-loader": "^1.1.0",
|
"xml-loader": "^1.1.0",
|
||||||
"zone.js": "0.7.4"
|
"zone.js": "0.7.6"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tslint": "tslint \"src/**/*.ts\" \"test-serializer/**/*.ts\"",
|
"tslint": "tslint \"src/**/*.ts\" \"test-serializer/**/*.ts\"",
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
this.labelSource = keyAction.keymapAbbreviation;
|
this.labelSource = keyAction.keymapAbbreviation;
|
||||||
} else if (this.keyAction instanceof PlayMacroAction) {
|
} else if (this.keyAction instanceof PlayMacroAction) {
|
||||||
let keyAction: PlayMacroAction = this.keyAction as PlayMacroAction;
|
let keyAction: PlayMacroAction = this.keyAction as PlayMacroAction;
|
||||||
const macro: Macro = this.macros.find((macro: Macro) => macro.id === keyAction.macroId);
|
const macro: Macro = this.macros.find((_macro: Macro) => _macro.id === keyAction.macroId);
|
||||||
this.labelType = LabelTypes.IconText;
|
this.labelType = LabelTypes.IconText;
|
||||||
this.labelSource = {
|
this.labelSource = {
|
||||||
icon: this.mapper.getIcon('macro'),
|
icon: this.mapper.getIcon('macro'),
|
||||||
|
|||||||
@@ -22,18 +22,21 @@ export default function (state = initialState, action: Action): KeymapState {
|
|||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case KeymapActions.ADD:
|
case KeymapActions.ADD:
|
||||||
case KeymapActions.DUPLICATE:
|
case KeymapActions.DUPLICATE:
|
||||||
|
{
|
||||||
|
let newKeymap: Keymap = new Keymap(action.payload);
|
||||||
|
|
||||||
let newKeymap: Keymap = new Keymap(action.payload);
|
newKeymap.abbreviation = generateAbbr(state.entities, newKeymap.abbreviation);
|
||||||
|
newKeymap.name = generateName(state.entities, newKeymap.name);
|
||||||
newKeymap.abbreviation = generateAbbr(state.entities, newKeymap.abbreviation);
|
newKeymap.isDefault = (state.entities.length === 0);
|
||||||
newKeymap.name = generateName(state.entities, newKeymap.name);
|
|
||||||
newKeymap.isDefault = (state.entities.length === 0);
|
|
||||||
|
|
||||||
return {
|
|
||||||
entities: [...state.entities, newKeymap]
|
|
||||||
};
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
entities: [...state.entities, newKeymap]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/* tslint:disable:no-switch-case-fall-through */
|
||||||
|
// tslint bug: https://github.com/palantir/tslint/issues/1538
|
||||||
case KeymapActions.EDIT_NAME:
|
case KeymapActions.EDIT_NAME:
|
||||||
|
/* tslint:enable:no-switch-case-fall-through */
|
||||||
let name: string = generateName(state.entities, action.payload.name);
|
let name: string = generateName(state.entities, action.payload.name);
|
||||||
|
|
||||||
newState = state.entities.map((keymap: Keymap) => {
|
newState = state.entities.map((keymap: Keymap) => {
|
||||||
@@ -111,39 +114,42 @@ export default function (state = initialState, action: Action): KeymapState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
case KeymapActions.SAVE_KEY:
|
case KeymapActions.SAVE_KEY:
|
||||||
|
{
|
||||||
|
const keymap: Keymap = action.payload.keymap;
|
||||||
|
Object.assign(changedKeymap, keymap);
|
||||||
|
|
||||||
const keymap: Keymap = action.payload.keymap;
|
const layerIndex: number = action.payload.layer;
|
||||||
Object.assign(changedKeymap, keymap);
|
const layer: Layer = changedKeymap.layers[layerIndex];
|
||||||
|
const changedLayer: Layer = new Layer();
|
||||||
|
Object.assign(changedLayer, layer);
|
||||||
|
changedKeymap.layers = changedKeymap.layers.slice();
|
||||||
|
changedKeymap.layers[layerIndex] = changedLayer;
|
||||||
|
|
||||||
const layerIndex: number = action.payload.layer;
|
const moduleIndex: number = action.payload.module;
|
||||||
const layer: Layer = changedKeymap.layers[layerIndex];
|
const module: Module = changedLayer.modules[moduleIndex];
|
||||||
const changedLayer: Layer = new Layer();
|
const changedModule: Module = new Module();
|
||||||
Object.assign(changedLayer, layer);
|
Object.assign(changedModule, module);
|
||||||
changedKeymap.layers = changedKeymap.layers.slice();
|
changedLayer.modules[moduleIndex] = changedModule;
|
||||||
changedKeymap.layers[layerIndex] = changedLayer;
|
|
||||||
|
|
||||||
const moduleIndex: number = action.payload.module;
|
const keyIndex: number = action.payload.key;
|
||||||
const module: Module = changedLayer.modules[moduleIndex];
|
changedModule.keyActions[keyIndex] = KeyActionHelper.createKeyAction(action.payload.keyAction);
|
||||||
const changedModule: Module = new Module();
|
|
||||||
Object.assign(changedModule, module);
|
|
||||||
changedLayer.modules[moduleIndex] = changedModule;
|
|
||||||
|
|
||||||
const keyIndex: number = action.payload.key;
|
newState = state.entities.map((_keymap: Keymap) => {
|
||||||
changedModule.keyActions[keyIndex] = KeyActionHelper.createKeyAction(action.payload.keyAction);
|
if (_keymap.abbreviation === changedKeymap.abbreviation) {
|
||||||
|
_keymap = changedKeymap;
|
||||||
|
}
|
||||||
|
|
||||||
newState = state.entities.map((keymap: Keymap) => {
|
return _keymap;
|
||||||
if (keymap.abbreviation === changedKeymap.abbreviation) {
|
});
|
||||||
keymap = changedKeymap;
|
|
||||||
}
|
|
||||||
|
|
||||||
return keymap;
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
entities: newState
|
|
||||||
};
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
entities: newState
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/* tslint:disable:no-switch-case-fall-through */
|
||||||
|
// tslint bug: https://github.com/palantir/tslint/issues/1538
|
||||||
case KeymapActions.CHECK_MACRO:
|
case KeymapActions.CHECK_MACRO:
|
||||||
|
/* tslint:enable:no-switch-case-fall-through */
|
||||||
newState = state.entities.map((keymap: Keymap) => {
|
newState = state.entities.map((keymap: Keymap) => {
|
||||||
changedKeymap = new Keymap();
|
changedKeymap = new Keymap();
|
||||||
Object.assign(changedKeymap, keymap);
|
Object.assign(changedKeymap, keymap);
|
||||||
|
|||||||
Reference in New Issue
Block a user