From 7547065a0bbcd11d97e915f0b79268164e9a0c93 Mon Sep 17 00:00:00 2001 From: cbourget Date: Fri, 21 Jun 2019 11:12:11 -0400 Subject: [PATCH] style(*): remove unused files --- ...space-workspace-widget-outlet.component.ts | 84 ------------------- ...orkspace-workspace-widget-outlet.module.ts | 23 ----- 2 files changed, 107 deletions(-) delete mode 100644 packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.component.ts delete mode 100644 packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.module.ts diff --git a/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.component.ts b/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.component.ts deleted file mode 100644 index 69e9ba274c..0000000000 --- a/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.component.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - Component, - Input, - Output, - EventEmitter, - ChangeDetectionStrategy -} from '@angular/core'; - -import { BehaviorSubject } from 'rxjs'; - -import { Widget } from '../../widget'; -import { Workspace } from '../shared/workspace'; - -/** - * This component dynamically render an Workspace's active widget. - * It also deactivate that widget whenever the widget's component - * emit the 'cancel' or 'complete' event. - */ -@Component({ - selector: 'igo-workspace-widget-outlet', - templateUrl: './workspace-widget-outlet.component.html', - styleUrls: ['./workspace-widget-outlet.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class WorkspaceWidgetOutletComponent { - - /** - * Workspace - */ - @Input() workspace: Workspace; - - /** - * Event emitted when a widget is deactivate which happens - * when the widget's component emits the 'cancel' or 'complete' event. - */ - @Output() deactivateWidget = new EventEmitter(); - - /** - * Observable of the workspace's active widget - * @internal - */ - get widget$(): BehaviorSubject { return this.workspace.widget$; } - - /** - * Observable of the workspace's widget inputs - * @internal - */ - get widgetInputs$(): BehaviorSubject<{[key: string]: any}> { - return this.workspace.widgetInputs$; - } - - /** - * Observable of the workspace's widget inputs - * @internal - */ - get widgetSubscribers$(): BehaviorSubject<{[key: string]: (event: any) => void}> { - return this.workspace.widgetSubscribers$; - } - - constructor() {} - - /** - * When a widget's component emit the 'cancel' event, - * deactivate that widget and emit the 'deactivateWidget' event. - * @param widget Widget - * @internal - */ - onWidgetCancel(widget: Widget) { - this.workspace.deactivateWidget(); - this.deactivateWidget.emit(widget); - } - - /** - * When a widget's component emit the 'cancel' event, - * deactivate that widget and emit the 'deactivateWidget' event. - * @param widget Widget - * @internal - */ - onWidgetComplete(widget: Widget) { - this.workspace.deactivateWidget(); - this.deactivateWidget.emit(widget); - } - -} diff --git a/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.module.ts b/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.module.ts deleted file mode 100644 index 8ac4c119ef..0000000000 --- a/packages/common/src/lib/workspace/workspace-widget-outlet/workspace-workspace-widget-outlet.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { IgoWidgetOutletModule } from '../../widget/widget-outlet/widget-outlet.module'; - -import { WorkspaceWidgetOutletComponent } from './workspace-widget-outlet.component'; - -/** - * @ignore - */ -@NgModule({ - imports: [ - CommonModule, - IgoWidgetOutletModule - ], - exports: [ - WorkspaceWidgetOutletComponent - ], - declarations: [ - WorkspaceWidgetOutletComponent - ] -}) -export class IgoWorkspaceWidgetOutletModule {}