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/cluster/cluster-details.directive.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
index 9aa2eb7..c796962 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
@@ -14,16 +14,18 @@
  * limitations under the License.
  */
 import {Directive, ElementRef, EventEmitter, Inject, Input, OnChanges, OnDestroy, OnInit, Output} from '@angular/core';
-import {FnService} from '../../fw/util/fn.service';
-import {LogService} from '../../log.service';
-import {MastService} from '../../fw/mast/mast.service';
-import {DetailsPanelBaseImpl} from '../../fw/widget/detailspanel.base';
-import {LoadingService} from '../../fw/layer/loading.service';
-import {IconService} from '../../fw/svg/icon.service';
-import {LionService} from '../../fw/util/lion.service';
-import {WebSocketService} from '../../fw/remote/websocket.service';
+import {
+    FnService,
+    LogService,
+    MastService,
+    DetailsPanelBaseImpl,
+    LoadingService,
+    IconService,
+    LionService,
+    PanelService,
+    WebSocketService
+} from 'gui2-fw-lib';
 import * as d3 from 'd3';
-import {PanelService} from '../../fw/layer/panel.service';
 import {HostListener} from '@angular/core';
 
 // internal state
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
index d5da0bf..2ffb801 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
@@ -13,20 +13,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import {NgModule} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {SvgModule} from '../../fw/svg/svg.module';
-import {WidgetModule} from '../../fw/widget/widget.module';
-import {ClusterComponent} from './cluster/cluster.component';
-import {ClusterRoutingModule} from './cluster-routing.module';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
+import { ClusterComponent } from './cluster/cluster.component';
+import { ClusterRoutingModule } from './cluster-routing.module';
 import { ClusterDetailsDirective } from './cluster-details.directive';
 
 @NgModule({
     imports: [
         CommonModule,
-        SvgModule,
-        ClusterRoutingModule,
-        WidgetModule
+        Gui2FwLibModule,
+        ClusterRoutingModule
     ],
     declarations: [ClusterComponent, ClusterDetailsDirective]
 })
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
index f0b4908..4756b4e 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
@@ -16,22 +16,26 @@
 import {async, ComponentFixture, TestBed} from '@angular/core/testing';
 
 import {ClusterComponent} from './cluster.component';
-import {FnService} from '../../../fw/util/fn.service';
-import {LogService} from '../../../log.service';
+
+import {
+    FnService,
+    LoadingService,
+    LogService,
+    WebSocketService,
+    IconComponent,
+    IconService,
+    GlyphService,
+    MastService,
+    NavService,
+    ThemeService,
+
+} from 'gui2-fw-lib';
+
 import {ActivatedRoute, Params} from '@angular/router';
 import {of} from 'rxjs/index';
 import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
 import {FormsModule} from '@angular/forms';
 import {RouterTestingModule} from '@angular/router/testing';
-import {IconComponent} from '../../../fw/svg/icon/icon.component';
-import {IconService} from '../../../fw/svg/icon.service';
-import {GlyphService} from '../../../fw/svg/glyph.service';
-import {KeyService} from '../../../fw/util/key.service';
-import {LoadingService} from '../../../fw/layer/loading.service';
-import {MastService} from '../../../fw/mast/mast.service';
-import {NavService} from '../../../fw/nav/nav.service';
-import {WebSocketService} from '../../../fw/remote/websocket.service';
-import {ThemeService} from '../../../fw/util/theme.service';
 import {DebugElement} from '@angular/core';
 import {By} from '@angular/platform-browser';
 
@@ -50,9 +54,6 @@
 class MockGlyphService {
 }
 
-class MockKeyService {
-}
-
 class MockLoadingService {
     startAnim() {
     }
@@ -120,7 +121,6 @@
                 {provide: FnService, useValue: fs},
                 {provide: IconService, useClass: MockIconService},
                 {provide: GlyphService, useClass: MockGlyphService},
-                {provide: KeyService, useClass: MockKeyService},
                 {provide: LoadingService, useClass: MockLoadingService},
                 {provide: MastService, useClass: MockMastService},
                 {provide: NavService, useClass: MockNavService},
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
index 1181a17..f72b1d0 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
@@ -14,12 +14,14 @@
  * limitations under the License.
  */
 import {Component, OnDestroy, OnInit} from '@angular/core';
-import {SortDir, TableBaseImpl, TableResponse} from '../../../fw/widget/table.base';
-import {FnService} from '../../../fw/util/fn.service';
-import {LoadingService} from '../../../fw/layer/loading.service';
-import {LogService} from '../../../log.service';
-import {WebSocketService} from '../../../fw/remote/websocket.service';
-import {LionService} from '../../../fw/util/lion.service';
+import {
+    FnService,
+    LoadingService,
+    LogService,
+    WebSocketService,
+    LionService,
+    SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
 
 /**
  * Model of the response from WebSocket