Migrates internal refs of ui/ to esm

Please note: ESLint and Closure have different opinions on the
necessity of imports, thus // eslint-disable-line no-unused-vars
was added to imports used only for Closure types.

Bug: 1006759
Change-Id: Idd32e12d23a636f1e0fdcb90742e4b706e3cef77
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967134
Commit-Queue: Paul Lewis <[email protected]>
Reviewed-by: Tim van der Lippe <[email protected]>
diff --git a/front_end/ui/Panel.js b/front_end/ui/Panel.js
index 12593c9..103f781 100644
--- a/front_end/ui/Panel.js
+++ b/front_end/ui/Panel.js
@@ -26,10 +26,14 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import {SearchableView} from './SearchableView.js';  // eslint-disable-line no-unused-vars
+import {SplitWidget} from './SplitWidget.js';
+import {VBox} from './Widget.js';
+
 /**
  * @unrestricted
  */
-export default class Panel extends UI.VBox {
+export class Panel extends VBox {
   /**
    * @param {string} name
    */
@@ -50,7 +54,7 @@
   }
 
   /**
-   * @return {?UI.SearchableView}
+   * @return {?SearchableView}
    */
   searchableView() {
     return null;
@@ -76,14 +80,13 @@
   constructor(name, defaultWidth) {
     super(name);
 
-    this._panelSplitWidget =
-        new UI.SplitWidget(true, false, this._panelName + 'PanelSplitViewState', defaultWidth || 200);
+    this._panelSplitWidget = new SplitWidget(true, false, this._panelName + 'PanelSplitViewState', defaultWidth || 200);
     this._panelSplitWidget.show(this.element);
 
-    this._mainWidget = new UI.VBox();
+    this._mainWidget = new VBox();
     this._panelSplitWidget.setMainWidget(this._mainWidget);
 
-    this._sidebarWidget = new UI.VBox();
+    this._sidebarWidget = new VBox();
     this._sidebarWidget.setMinimumSize(100, 25);
     this._panelSplitWidget.setSidebarWidget(this._sidebarWidget);
 
@@ -105,24 +108,9 @@
   }
 
   /**
-   * @return {!UI.SplitWidget}
+   * @return {!SplitWidget}
    */
   splitWidget() {
     return this._panelSplitWidget;
   }
 }
-
-/* Legacy exported object*/
-self.UI = self.UI || {};
-
-/* Legacy exported object*/
-UI = UI || {};
-
-/** @constructor */
-UI.Panel = Panel;
-
-/** @constructor */
-UI.PanelWithSidebar = PanelWithSidebar;
-
-// For testing.
-UI.panels = {};