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/nav/nav.component.ts b/web/gui2/src/main/webapp/app/nav/nav.component.ts
new file mode 100644
index 0000000..b543049
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/nav/nav.component.ts
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { trigger, state, style, animate, transition } from '@angular/animations';
+
+import {
+    LionService,
+    LogService,
+    NavService
+} from 'gui2-fw-lib';
+
+/**
+ * ONOS GUI -- Navigation Module
+ *
+ * Note: While this NavComponent could arguably be moved to the gui2-fw-lib
+ * it brings problems in recognizing the "routerlink" directives as being part
+ * of this application. So for that reason Nav must remain here for routing to work
+ */
+@Component({
+  selector: 'onos-nav',
+  templateUrl: './nav.component.html',
+  styleUrls: ['./nav.theme.css', './nav.component.css'],
+  animations: [
+    trigger('navState', [
+      state('false', style({
+        transform: 'translateY(-100%)'
+      })),
+      state('true', style({
+        transform: 'translateY(0%)'
+      })),
+      transition('0 => 1', animate('100ms ease-in')),
+      transition('1 => 0', animate('100ms ease-out'))
+    ])
+  ]
+})
+export class NavComponent implements OnInit, OnDestroy {
+    lionFn; // Function
+
+    constructor(
+        private log: LogService,
+        private lion: LionService,
+        public ns: NavService
+    ) {
+        this.log.debug('NavComponent constructed');
+    }
+
+    /**
+     * If LION is not ready we make do with a dummy function
+     * As soon a lion gets loaded this function will be replaced with
+     * the real thing
+     */
+    ngOnInit() {
+        if (this.lion.ubercache.length === 0) {
+            this.lionFn = this.dummyLion;
+            this.lion.loadCbs.set('nav', () => this.doLion());
+            this.log.debug('LION not available when NavComponent initialized');
+        } else {
+            this.doLion();
+        }
+    }
+
+    /**
+     * Nav component should never be closed, but in case it does, it's
+     * safer to tidy up after itself
+     */
+    ngOnDestroy() {
+        this.lion.loadCbs.delete('nav');
+    }
+
+    /**
+    * Read the LION bundle for App and set up the lionFn
+    */
+    doLion() {
+        this.lionFn = this.lion.bundle('core.fw.Nav');
+    }
+
+    /**
+    * A dummy implementation of the lionFn until the response is received and the LION
+    * bundle is received from the WebSocket
+    */
+    dummyLion(key: string): string {
+        return '%' + key + '%';
+    }
+
+}