GUI2 Framework as a standalone NPM Library

There are a few changes going on here
1) The fw part of GUI has been moved out in to its own project
 a) several files are renamed (files 21-83)
 b) the project has its own BUILD file (file 5)
 c) there are a few files created by Angular CLI here - mostly script generated (files 7-20)
 d) package-lock.json is a big generated file that has to be versioned (file 13)

2) The view in the main GUI2 project now refer to this library (see BUILD file 110)
 a) some useless files were removed (files 115 - 139)
 b) several files are changed to update references (files 140-202)
 c) this breaks the BUCK build so I've removed the BUCK file and references to it (file 109)

Change-Id: I48bc3253edfcf5947f1582731ba739a1296012f5
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.module.ts b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
index 0e79a2b..464ad3c 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
@@ -19,9 +19,7 @@
 import { AppsRoutingModule } from './apps-routing.module';
 import { AppsComponent } from './apps/apps.component';
 import { AppsDetailsComponent } from './appsdetails/appsdetails.component';
-import { LayerModule } from '../../fw/layer/layer.module';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
 
 /**
  * ONOS GUI -- Apps View Module
@@ -34,10 +32,8 @@
     imports: [
         CommonModule,
         AppsRoutingModule,
-        SvgModule,
-        WidgetModule,
-        FormsModule,
-        LayerModule
+        Gui2FwLibModule,
+        FormsModule
     ],
     declarations: [
         AppsComponent,
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
index e022ebc..f1dfe0d 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
@@ -21,22 +21,24 @@
 import { By } from '@angular/platform-browser';
 import { HttpClient, HttpErrorResponse } from '@angular/common/http';
 
-import { LogService } from '../../../log.service';
+import {
+    FnService,
+    IconService,
+    LionService,
+    LoadingService,
+    LogService,
+    TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir,
+    UrlFnService,
+    WebSocketService,
+    TableFilterPipe,
+    ConfirmComponent,
+    FlashComponent,
+    IconComponent,
+    ThemeService,
+} from 'gui2-fw-lib';
+
 import { AppsComponent } from './apps.component';
 import { AppsDetailsComponent } from '../appsdetails/appsdetails.component';
-import { ConfirmComponent } from '../../../fw/layer/confirm/confirm.component';
-import { DialogService } from '../../../fw/layer/dialog.service';
-import { FlashComponent } from '../../../fw/layer/flash/flash.component';
-import { FnService } from '../../../fw/util/fn.service';
-import { IconComponent } from '../../../fw/svg/icon/icon.component';
-import { IconService } from '../../../fw/svg/icon.service';
-import { KeyService } from '../../../fw/util/key.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { ThemeService } from '../../../fw/util/theme.service';
-import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
-import { UrlFnService } from '../../../fw/remote/urlfn.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
 import { of } from 'rxjs';
 import { } from 'jasmine';
 
@@ -47,8 +49,6 @@
     }
 }
 
-class MockDialogService { }
-
 class MockFnService { }
 
 class MockHttpClient {}
@@ -57,8 +57,6 @@
     loadIconDef() { }
 }
 
-class MockKeyService { }
-
 class MockLoadingService {
     startAnim() { }
     stop() { }
@@ -123,11 +121,9 @@
                 FlashComponent
             ],
             providers: [
-                { provide: DialogService, useClass: MockDialogService },
                 { provide: FnService, useValue: fs },
                 { provide: HttpClient, useClass: MockHttpClient },
                 { provide: IconService, useClass: MockIconService },
-                { provide: KeyService, useClass: MockKeyService },
                 {
                     provide: LionService, useFactory: (() => {
                         return {
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
index 3a8e2a8..c933053 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
@@ -16,17 +16,17 @@
 import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
 import { HttpClient, HttpErrorResponse } from '@angular/common/http';
 
-import { DialogService } from '../../../fw/layer/dialog.service';
-import { FnService } from '../../../fw/util/fn.service';
-import { IconService } from '../../../fw/svg/icon.service';
-import { KeyService } from '../../../fw/util/key.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir } from '../../../fw/widget/table.base';
-import { UrlFnService } from '../../../fw/remote/urlfn.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import {
+    FnService,
+    IconService,
+    LionService,
+    LoadingService,
+    LogService,
+    TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir,
+    UrlFnService,
+    WebSocketService,
+    TableFilterPipe
+} from 'gui2-fw-lib';
 
 const INSTALLED = 'INSTALLED';
 const ACTIVE = 'ACTIVE';
@@ -131,9 +131,7 @@
 
     constructor(
         protected fs: FnService,
-        private ds: DialogService,
         private is: IconService,
-        private ks: KeyService,
         private lion: LionService,
         protected ls: LoadingService,
         protected log: LogService,
diff --git a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
index 75f5f8e..ed45a02 100644
--- a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
@@ -19,14 +19,18 @@
 import { DebugElement } from '@angular/core';
 import { By } from '@angular/platform-browser';
 
-import { LogService } from '../../../log.service';
+import {
+    FnService,
+    IconService,
+    LionService,
+    LogService,
+    UrlFnService,
+    WebSocketService,
+    TableFilterPipe,
+    IconComponent
+} from 'gui2-fw-lib';
+
 import { AppsDetailsComponent } from './appsdetails.component';
-import { FnService } from '../../../fw/util/fn.service';
-import { IconComponent } from '../../../fw/svg/icon/icon.component';
-import { IconService } from '../../../fw/svg/icon.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { UrlFnService } from '../../../fw/remote/urlfn.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
 import { of } from 'rxjs';
 
 class MockActivatedRoute extends ActivatedRoute {
diff --git a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
index c0d2e02..d01d409 100644
--- a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
@@ -15,14 +15,15 @@
  */
 import { Component, Input, OnInit, OnDestroy, OnChanges } from '@angular/core';
 import { trigger, state, style, animate, transition } from '@angular/animations';
+import {
+    FnService,
+    LionService,
+    LoadingService,
+    LogService,
+    DetailsPanelBaseImpl,
+    WebSocketService
+} from 'gui2-fw-lib';
 
-import { FnService } from '../../../fw/util/fn.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
 import { App, APPURLPREFIX, ICONURLSUFFIX } from '../apps/apps.component';
 
 /**