Update to angular2-rc.6
This commit is contained in:
14
package.json
14
package.json
@@ -29,12 +29,12 @@
|
|||||||
"yargs": "^4.8.1"
|
"yargs": "^4.8.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.5",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.5",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/core": "2.0.0-rc.5",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "2.0.0-rc.5",
|
"@angular/platform-browser": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||||
"@angular/router": "^3.0.0-rc.1",
|
"@angular/router": "3.0.0-rc.2",
|
||||||
"@types/es6-shim": "0.0.31",
|
"@types/es6-shim": "0.0.31",
|
||||||
"@types/jquery": "1.10.31",
|
"@types/jquery": "1.10.31",
|
||||||
"@types/node": "6.0.38",
|
"@types/node": "6.0.38",
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"ng2-select2": "0.4.2",
|
"ng2-select2": "0.4.2",
|
||||||
"reflect-metadata": "0.1.3",
|
"reflect-metadata": "0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.11",
|
||||||
"select2": "^4.0.3",
|
"select2": "^4.0.3",
|
||||||
"sortablejs": "^1.4.2",
|
"sortablejs": "^1.4.2",
|
||||||
"typescript": "2.0.0",
|
"typescript": "2.0.0",
|
||||||
|
|||||||
@@ -1,48 +1,89 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
|
||||||
|
import { Select2Component } from 'ng2-select2/ng2-select2';
|
||||||
|
|
||||||
import { DataProviderService } from './services/data-provider.service';
|
import { DataProviderService } from './services/data-provider.service';
|
||||||
import { MapperService } from './services/mapper.service';
|
import { MapperService } from './services/mapper.service';
|
||||||
|
import {UhkConfigurationService} from './services/uhk-configuration.service';
|
||||||
|
|
||||||
import { MainAppComponent, APP_ROUTER_PROVIDERS } from './main-app';
|
import { MainAppComponent, appRoutingProviders, routing } from './main-app';
|
||||||
import { KeymapComponent } from './components/keymap';
|
import { KeymapComponent } from './components/keymap';
|
||||||
import { MacroComponent } from './components/macro';
|
import { MacroComponent } from './components/macro';
|
||||||
import { LegacyLoaderComponent } from './components/legacy-loader';
|
import { LegacyLoaderComponent } from './components/legacy-loader';
|
||||||
import { NotificationComponent } from './components/notification';
|
import { NotificationComponent } from './components/notification';
|
||||||
import {
|
import {
|
||||||
SvgKeystrokeKeyComponent, SvgOneLineTextKeyComponent, SvgTwoLineTextKeyComponent
|
SvgIconTextKeyComponent,
|
||||||
|
SvgKeyboardKeyComponent,
|
||||||
|
SvgKeystrokeKeyComponent,
|
||||||
|
SvgOneLineTextKeyComponent,
|
||||||
|
SvgSingleIconKeyComponent,
|
||||||
|
SvgSwitchKeymapKeyComponent,
|
||||||
|
SvgTextIconKeyComponent,
|
||||||
|
SvgTwoLineTextKeyComponent
|
||||||
} from './components/svg/keys';
|
} from './components/svg/keys';
|
||||||
import { SvgKeyboardWrapComponent } from './components/svg/wrap';
|
import { SvgKeyboardWrapComponent } from './components/svg/wrap';
|
||||||
import { LayersComponent } from './components/layers';
|
import { LayersComponent } from './components/layers';
|
||||||
import { SvgKeyboardComponent } from './components/svg/keyboard';
|
import { SvgKeyboardComponent } from './components/svg/keyboard';
|
||||||
|
import { SvgModuleComponent } from './components/svg/module';
|
||||||
import { PopoverComponent } from './components/popover';
|
import { PopoverComponent } from './components/popover';
|
||||||
import { KeymapAddComponent } from './components/keymap';
|
import { KeymapAddComponent } from './components/keymap';
|
||||||
import {UhkConfigurationService} from './services/uhk-configuration.service';
|
import { MacroItemComponent } from './components/popover/tab/macro';
|
||||||
|
import { SideMenuComponent } from './components/side-menu';
|
||||||
|
import {
|
||||||
|
KeypressTabComponent,
|
||||||
|
KeymapTabComponent,
|
||||||
|
LayerTabComponent,
|
||||||
|
MacroTabComponent,
|
||||||
|
MouseTabComponent,
|
||||||
|
NoneTabComponent
|
||||||
|
} from './components/popover/tab';
|
||||||
|
import { CaptureKeystrokeButtonComponent } from './components/popover/widgets/capture-keystroke';
|
||||||
|
import { IconComponent } from './components/popover/widgets/icon';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
Select2Component,
|
||||||
MainAppComponent,
|
MainAppComponent,
|
||||||
KeymapComponent,
|
KeymapComponent,
|
||||||
MacroComponent,
|
MacroComponent,
|
||||||
LegacyLoaderComponent,
|
LegacyLoaderComponent,
|
||||||
NotificationComponent,
|
NotificationComponent,
|
||||||
|
SvgIconTextKeyComponent,
|
||||||
|
SvgKeyboardKeyComponent,
|
||||||
SvgKeystrokeKeyComponent,
|
SvgKeystrokeKeyComponent,
|
||||||
SvgOneLineTextKeyComponent,
|
SvgOneLineTextKeyComponent,
|
||||||
|
SvgSingleIconKeyComponent,
|
||||||
|
SvgSwitchKeymapKeyComponent,
|
||||||
|
SvgTextIconKeyComponent,
|
||||||
SvgTwoLineTextKeyComponent,
|
SvgTwoLineTextKeyComponent,
|
||||||
|
SvgKeyboardKeyComponent,
|
||||||
SvgKeyboardWrapComponent,
|
SvgKeyboardWrapComponent,
|
||||||
|
SvgKeyboardComponent,
|
||||||
|
SvgModuleComponent,
|
||||||
LayersComponent,
|
LayersComponent,
|
||||||
PopoverComponent,
|
PopoverComponent,
|
||||||
SvgKeyboardComponent,
|
KeymapAddComponent,
|
||||||
KeymapAddComponent
|
SideMenuComponent,
|
||||||
|
KeypressTabComponent,
|
||||||
|
KeymapTabComponent,
|
||||||
|
LayerTabComponent,
|
||||||
|
MacroTabComponent,
|
||||||
|
MouseTabComponent,
|
||||||
|
NoneTabComponent,
|
||||||
|
CaptureKeystrokeButtonComponent,
|
||||||
|
IconComponent,
|
||||||
|
MacroItemComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
BrowserModule,
|
||||||
|
routing
|
||||||
],
|
],
|
||||||
imports: [BrowserModule],
|
|
||||||
providers: [
|
providers: [
|
||||||
DataProviderService,
|
DataProviderService,
|
||||||
UhkConfigurationService,
|
UhkConfigurationService,
|
||||||
MapperService,
|
MapperService,
|
||||||
APP_ROUTER_PROVIDERS,
|
appRoutingProviders
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy }
|
|
||||||
],
|
],
|
||||||
bootstrap: [MainAppComponent]
|
bootstrap: [MainAppComponent]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { RouterConfig } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { KeymapComponent } from './keymap.component';
|
import { KeymapComponent } from './keymap.component';
|
||||||
import { KeymapAddComponent } from './add/keymap-add.component';
|
import { KeymapAddComponent } from './add/keymap-add.component';
|
||||||
|
|
||||||
export const keymapRoutes: RouterConfig = [
|
export const keymapRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirectTo: '/keymap',
|
redirectTo: '/keymap',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { DomSanitizationService, SafeResourceUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -13,12 +13,12 @@ import {ActivatedRoute} from '@angular/router';
|
|||||||
export class LegacyLoaderComponent {
|
export class LegacyLoaderComponent {
|
||||||
private safeLink: SafeResourceUrl;
|
private safeLink: SafeResourceUrl;
|
||||||
|
|
||||||
constructor(private sanitationService: DomSanitizationService, private route: ActivatedRoute) { }
|
constructor(private domSanitizer: DomSanitizer, private route: ActivatedRoute) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params.subscribe((params: { id: string }) => {
|
this.route.params.subscribe((params: { id: string }) => {
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
this.safeLink = this.sanitationService.bypassSecurityTrustResourceUrl(params.id + 'Legacy.html');
|
this.safeLink = this.domSanitizer.bypassSecurityTrustResourceUrl(params.id + 'Legacy.html');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { RouterConfig } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import {LegacyLoaderComponent} from './legacy-loader.component';
|
import {LegacyLoaderComponent} from './legacy-loader.component';
|
||||||
|
|
||||||
export const legacyRoutes: RouterConfig = [
|
export const legacyRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'legacy/:id',
|
path: 'legacy/:id',
|
||||||
component: LegacyLoaderComponent
|
component: LegacyLoaderComponent
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { RouterConfig } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { MacroComponent } from './macro.component';
|
import { MacroComponent } from './macro.component';
|
||||||
|
|
||||||
export const macroRoutes: RouterConfig = [
|
export const macroRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'macro',
|
path: 'macro',
|
||||||
component: MacroComponent
|
component: MacroComponent
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
import {Component, OnInit, Input, Output, EventEmitter, ViewChild} from '@angular/core';
|
import {Component, OnInit, Input, Output, EventEmitter, ViewChild} from '@angular/core';
|
||||||
import {NgSwitch, NgSwitchCase} from '@angular/common';
|
|
||||||
|
|
||||||
import {KeyAction} from '../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../config-serializer/config-items/KeyAction';
|
||||||
|
|
||||||
import {KeypressTabComponent} from './tab/keypress/keypress-tab.component';
|
|
||||||
import {LayerTabComponent} from './tab/layer/layer-tab.component';
|
|
||||||
import {MouseTabComponent} from './tab/mouse/mouse-tab.component';
|
|
||||||
import {MacroTabComponent} from './tab/macro/macro-tab.component';
|
|
||||||
import {KeymapTabComponent} from './tab/keymap/keymap-tab.component';
|
|
||||||
import {NoneTabComponent} from './tab/none/none-tab.component';
|
|
||||||
|
|
||||||
import {Tab} from './tab/tab';
|
import {Tab} from './tab/tab';
|
||||||
import {KeystrokeAction} from '../../config-serializer/config-items/KeystrokeAction';
|
import {KeystrokeAction} from '../../config-serializer/config-items/KeystrokeAction';
|
||||||
import {SwitchLayerAction} from '../../config-serializer/config-items/SwitchLayerAction';
|
import {SwitchLayerAction} from '../../config-serializer/config-items/SwitchLayerAction';
|
||||||
@@ -30,18 +22,7 @@ enum TabName {
|
|||||||
selector: 'popover',
|
selector: 'popover',
|
||||||
template: require('./popover.component.html'),
|
template: require('./popover.component.html'),
|
||||||
styles: [require('./popover.component.scss')],
|
styles: [require('./popover.component.scss')],
|
||||||
host: { 'class': 'popover' },
|
host: { 'class': 'popover' }
|
||||||
directives:
|
|
||||||
[
|
|
||||||
NgSwitch,
|
|
||||||
NgSwitchCase,
|
|
||||||
KeypressTabComponent,
|
|
||||||
LayerTabComponent,
|
|
||||||
MouseTabComponent,
|
|
||||||
MacroTabComponent,
|
|
||||||
KeymapTabComponent,
|
|
||||||
NoneTabComponent
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class PopoverComponent implements OnInit {
|
export class PopoverComponent implements OnInit {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -3,17 +3,15 @@ import {Component, OnInit, Input} from '@angular/core';
|
|||||||
import {UhkConfigurationService} from '../../../../services/uhk-configuration.service';
|
import {UhkConfigurationService} from '../../../../services/uhk-configuration.service';
|
||||||
import {Keymap} from '../../../../config-serializer/config-items/Keymap';
|
import {Keymap} from '../../../../config-serializer/config-items/Keymap';
|
||||||
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
||||||
import {SvgKeyboardComponent} from '../../../svg/keyboard';
|
|
||||||
import {Tab} from '../tab';
|
import {Tab} from '../tab';
|
||||||
import {SwitchKeymapAction} from '../../../../config-serializer/config-items/SwitchKeymapAction';
|
import {SwitchKeymapAction} from '../../../../config-serializer/config-items/SwitchKeymapAction';
|
||||||
|
|
||||||
import {Select2Component, Select2OptionData} from 'ng2-select2/ng2-select2';
|
import {Select2OptionData} from 'ng2-select2/ng2-select2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'keymap-tab',
|
selector: 'keymap-tab',
|
||||||
template: require('./keymap-tab.component.html'),
|
template: require('./keymap-tab.component.html'),
|
||||||
styles: [require('./keymap-tab.component.scss')],
|
styles: [require('./keymap-tab.component.scss')]
|
||||||
directives: [SvgKeyboardComponent, Select2Component]
|
|
||||||
})
|
})
|
||||||
export class KeymapTabComponent implements OnInit, Tab {
|
export class KeymapTabComponent implements OnInit, Tab {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
import {Component, OnInit, Input} from '@angular/core';
|
import {Component, OnInit, Input} from '@angular/core';
|
||||||
|
|
||||||
import {Select2Component, Select2OptionData} from 'ng2-select2/ng2-select2';
|
import {Select2OptionData} from 'ng2-select2/ng2-select2';
|
||||||
|
|
||||||
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
||||||
import {KeystrokeAction} from '../../../../config-serializer/config-items/KeystrokeAction';
|
import {KeystrokeAction} from '../../../../config-serializer/config-items/KeystrokeAction';
|
||||||
|
|
||||||
import {IconComponent} from '../../widgets/icon';
|
|
||||||
import {CaptureKeystrokeButtonComponent} from '../../widgets/capture-keystroke';
|
|
||||||
import {Tab} from '../tab';
|
import {Tab} from '../tab';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'keypress-tab',
|
selector: 'keypress-tab',
|
||||||
template: require('./keypress-tab.component.html'),
|
template: require('./keypress-tab.component.html'),
|
||||||
styles: [require('./keypress-tab.component.scss')],
|
styles: [require('./keypress-tab.component.scss')]
|
||||||
directives: [CaptureKeystrokeButtonComponent, IconComponent, Select2Component]
|
|
||||||
})
|
})
|
||||||
export class KeypressTabComponent implements OnInit, Tab {
|
export class KeypressTabComponent implements OnInit, Tab {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {Component, OnInit, Input, ViewChild} from '@angular/core';
|
import {Component, OnInit, Input, ViewChild} from '@angular/core';
|
||||||
import {NgSwitch, NgSwitchCase, NgSwitchDefault} from '@angular/common';
|
|
||||||
|
|
||||||
import {LayerName, SwitchLayerAction} from '../../../../config-serializer/config-items/SwitchLayerAction';
|
import {LayerName, SwitchLayerAction} from '../../../../config-serializer/config-items/SwitchLayerAction';
|
||||||
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
||||||
@@ -11,8 +10,7 @@ import {Tab} from '../tab';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'layer-tab',
|
selector: 'layer-tab',
|
||||||
template: require('./layer-tab.component.html'),
|
template: require('./layer-tab.component.html'),
|
||||||
styles: [require('./layer-tab.component.scss')],
|
styles: [require('./layer-tab.component.scss')]
|
||||||
directives: [Select2Component, NgSwitch, NgSwitchCase, NgSwitchDefault]
|
|
||||||
})
|
})
|
||||||
export class LayerTabComponent implements OnInit, Tab {
|
export class LayerTabComponent implements OnInit, Tab {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -9,15 +9,12 @@ import {ReleaseModifiersMacroAction} from '../../../../config-serializer/config-
|
|||||||
import {ScrollMouseMacroAction} from '../../../../config-serializer/config-items/ScrollMouseMacroAction';
|
import {ScrollMouseMacroAction} from '../../../../config-serializer/config-items/ScrollMouseMacroAction';
|
||||||
import {TextMacroAction} from '../../../../config-serializer/config-items/TextMacroAction';
|
import {TextMacroAction} from '../../../../config-serializer/config-items/TextMacroAction';
|
||||||
|
|
||||||
import {IconComponent} from '../../widgets/icon';
|
|
||||||
|
|
||||||
import {KeyModifiers} from '../../../../config-serializer/config-items/KeyModifiers';
|
import {KeyModifiers} from '../../../../config-serializer/config-items/KeyModifiers';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'macro-item',
|
selector: 'macro-item',
|
||||||
template: require('./macro-item.component.html'),
|
template: require('./macro-item.component.html'),
|
||||||
styles: [require('./macro-item.component.scss')],
|
styles: [require('./macro-item.component.scss')]
|
||||||
directives: [IconComponent]
|
|
||||||
})
|
})
|
||||||
export class MacroItemComponent implements OnInit, OnChanges {
|
export class MacroItemComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,13 @@ import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
|||||||
import {PlayMacroAction} from '../../../../config-serializer/config-items/PlayMacroAction';
|
import {PlayMacroAction} from '../../../../config-serializer/config-items/PlayMacroAction';
|
||||||
|
|
||||||
import {Tab} from '../tab';
|
import {Tab} from '../tab';
|
||||||
import {MacroItemComponent} from './macro-item.component';
|
|
||||||
|
|
||||||
import {Select2Component, Select2OptionData} from 'ng2-select2/ng2-select2';
|
import {Select2OptionData} from 'ng2-select2/ng2-select2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'macro-tab',
|
selector: 'macro-tab',
|
||||||
template: require('./macro-tab.component.html'),
|
template: require('./macro-tab.component.html'),
|
||||||
styles: [require('./macro-tab.component.scss')],
|
styles: [require('./macro-tab.component.scss')]
|
||||||
directives: [MacroItemComponent, Select2Component]
|
|
||||||
})
|
})
|
||||||
export class MacroTabComponent implements OnInit, Tab {
|
export class MacroTabComponent implements OnInit, Tab {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {Component, OnInit, Input} from '@angular/core';
|
import {Component, OnInit, Input} from '@angular/core';
|
||||||
import {NgSwitch, NgSwitchCase, NgSwitchDefault} from '@angular/common';
|
|
||||||
|
|
||||||
import {Tab} from '../tab';
|
import {Tab} from '../tab';
|
||||||
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../../../config-serializer/config-items/KeyAction';
|
||||||
@@ -8,8 +7,7 @@ import {MouseAction, MouseActionParam} from '../../../../config-serializer/confi
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'mouse-tab',
|
selector: 'mouse-tab',
|
||||||
template: require('./mouse-tab.component.html'),
|
template: require('./mouse-tab.component.html'),
|
||||||
styles: [require('./mouse-tab.component.scss')],
|
styles: [require('./mouse-tab.component.scss')]
|
||||||
directives: [NgSwitch, NgSwitchCase, NgSwitchDefault]
|
|
||||||
})
|
})
|
||||||
export class MouseTabComponent implements OnInit, Tab {
|
export class MouseTabComponent implements OnInit, Tab {
|
||||||
@Input() defaultKeyAction: KeyAction;
|
@Input() defaultKeyAction: KeyAction;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
import { NgSwitch, NgSwitchCase } from '@angular/common';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'icon',
|
selector: 'icon',
|
||||||
template: require('./icon.component.html'),
|
template: require('./icon.component.html'),
|
||||||
styles: [require('./icon.component.scss')],
|
styles: [require('./icon.component.scss')]
|
||||||
directives: [NgSwitch, NgSwitchCase]
|
|
||||||
})
|
})
|
||||||
export class IconComponent implements OnInit {
|
export class IconComponent implements OnInit {
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,11 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { Keymap } from '../../config-serializer/config-items/Keymap';
|
import { Keymap } from '../../config-serializer/config-items/Keymap';
|
||||||
import { UhkConfigurationService } from '../../services/uhk-configuration.service';
|
import { UhkConfigurationService } from '../../services/uhk-configuration.service';
|
||||||
import { Macro } from '../../config-serializer/config-items/Macro';
|
import { Macro } from '../../config-serializer/config-items/Macro';
|
||||||
import { ROUTER_DIRECTIVES } from '@angular/router';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'side-menu',
|
selector: 'side-menu',
|
||||||
template: require('./side-menu.component.html'),
|
template: require('./side-menu.component.html'),
|
||||||
styles: [require('./side-menu.component.scss')],
|
styles: [require('./side-menu.component.scss')]
|
||||||
directives: [ROUTER_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class SideMenuComponent implements OnInit {
|
export class SideMenuComponent implements OnInit {
|
||||||
private keymaps: Keymap[];
|
private keymaps: Keymap[];
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
|
import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
|
||||||
|
|
||||||
import {Module} from '../../../config-serializer/config-items/Module';
|
import {Module} from '../../../config-serializer/config-items/Module';
|
||||||
import {SvgModule, SvgModuleComponent} from '../module';
|
import {SvgModule} from '../module';
|
||||||
import {DataProviderService} from '../../../services/data-provider.service';
|
import {DataProviderService} from '../../../services/data-provider.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'svg-keyboard',
|
selector: 'svg-keyboard',
|
||||||
template: require('./svg-keyboard.component.html'),
|
template: require('./svg-keyboard.component.html'),
|
||||||
styles: [require('./svg-keyboard.component.scss')],
|
styles: [require('./svg-keyboard.component.scss')]
|
||||||
directives: [SvgModuleComponent]
|
|
||||||
})
|
})
|
||||||
export class SvgKeyboardComponent implements OnInit {
|
export class SvgKeyboardComponent implements OnInit {
|
||||||
@Input() moduleConfig: Module[];
|
@Input() moduleConfig: Module[];
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ import {UhkConfiguration} from '../../../../config-serializer/config-items/UhkCo
|
|||||||
import {UhkConfigurationService} from '../../../../services/uhk-configuration.service';
|
import {UhkConfigurationService} from '../../../../services/uhk-configuration.service';
|
||||||
import {MapperService} from '../../../../services/mapper.service';
|
import {MapperService} from '../../../../services/mapper.service';
|
||||||
|
|
||||||
import {SvgSingleIconKeyComponent} from '../svg-single-icon-key';
|
|
||||||
import {SvgTextIconKeyComponent} from '../svg-text-icon-key';
|
|
||||||
import {SvgIconTextKeyComponent} from '../svg-icon-text-key';
|
|
||||||
import {SvgSwitchKeymapKeyComponent} from '../svg-switch-keymap-key';
|
|
||||||
|
|
||||||
enum LabelTypes {
|
enum LabelTypes {
|
||||||
KeystrokeKey,
|
KeystrokeKey,
|
||||||
OneLineText,
|
OneLineText,
|
||||||
@@ -27,14 +22,7 @@ enum LabelTypes {
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'g[svg-keyboard-key]',
|
selector: 'g[svg-keyboard-key]',
|
||||||
template: require('./svg-keyboard-key.component.html'),
|
template: require('./svg-keyboard-key.component.html')
|
||||||
directives:
|
|
||||||
[
|
|
||||||
SvgSingleIconKeyComponent,
|
|
||||||
SvgTextIconKeyComponent,
|
|
||||||
SvgIconTextKeyComponent,
|
|
||||||
SvgSwitchKeymapKeyComponent
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class SvgKeyboardKeyComponent implements OnInit, OnChanges {
|
export class SvgKeyboardKeyComponent implements OnInit, OnChanges {
|
||||||
@Input() id: string;
|
@Input() id: string;
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
|
|
||||||
import { SvgKeyboardKey, SvgKeyboardKeyComponent } from '../keys';
|
import { SvgKeyboardKey } from '../keys';
|
||||||
import {KeyAction} from '../../../config-serializer/config-items/KeyAction';
|
import {KeyAction} from '../../../config-serializer/config-items/KeyAction';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'g[svg-module]',
|
selector: 'g[svg-module]',
|
||||||
template: require('./svg-module.component.html'),
|
template: require('./svg-module.component.html'),
|
||||||
styles: [require('./svg-module.component.scss')],
|
styles: [require('./svg-module.component.scss')]
|
||||||
directives: [SvgKeyboardKeyComponent]
|
|
||||||
})
|
})
|
||||||
export class SvgModuleComponent {
|
export class SvgModuleComponent {
|
||||||
@Input() coverages: any[];
|
@Input() coverages: any[];
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
import { ROUTER_DIRECTIVES } from '@angular/router';
|
|
||||||
|
|
||||||
import { SideMenuComponent } from '../components/side-menu';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'main-app',
|
selector: 'main-app',
|
||||||
template: require('./main-app.component.html'),
|
template: require('./main-app.component.html'),
|
||||||
styles: [require('./main-app.component.scss')],
|
styles: [require('./main-app.component.scss')],
|
||||||
directives: [SideMenuComponent, ROUTER_DIRECTIVES],
|
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class MainAppComponent {
|
export class MainAppComponent { }
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import { provideRouter, RouterConfig } from '@angular/router';
|
import { ModuleWithProviders } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
import { keymapRoutes } from '../components/keymap';
|
import { keymapRoutes } from '../components/keymap';
|
||||||
import { macroRoutes } from '../components/macro';
|
import { macroRoutes } from '../components/macro';
|
||||||
import { legacyRoutes } from '../components/legacy-loader';
|
import { legacyRoutes } from '../components/legacy-loader';
|
||||||
|
|
||||||
export const routes: RouterConfig = [
|
const appRoutes: Routes = [
|
||||||
...keymapRoutes,
|
...keymapRoutes,
|
||||||
...macroRoutes,
|
...macroRoutes,
|
||||||
...legacyRoutes
|
...legacyRoutes
|
||||||
];
|
];
|
||||||
|
|
||||||
export const APP_ROUTER_PROVIDERS = [
|
export const appRoutingProviders: any[] = [ ];
|
||||||
provideRouter(routes)
|
|
||||||
];
|
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user