RxJS cleanup

pull/6388/head
Roman Roelofsen 6 years ago
parent 60215c31e8
commit ea737821c5
  1. 2
      frontend/src/app/components/api/op-file-upload/op-file-upload.service.ts
  2. 2
      frontend/src/app/components/resizer/main-menu-resizer.component.ts
  3. 2
      frontend/src/app/components/resizer/main-menu-toggle.service.ts
  4. 36
      frontend/src/app/components/wp-fast-table/state/wp-table-focus.service.ts
  5. 13
      frontend/src/app/components/wp-relations/wp-relations.component.ts
  6. 2
      frontend/src/app/modules/common/focus/focus-within.directive.ts
  7. 12
      frontend/src/app/modules/hal/services/hal-resource-sorting.service.ts

@ -29,7 +29,7 @@
import {Injectable} from "@angular/core";
import {HttpClient, HttpEvent, HttpEventType, HttpResponse} from "@angular/common/http";
import {HalResource} from "core-app/modules/hal/resources/hal-resource";
import {Observable} from "rxjs/Observable";
import {Observable} from "rxjs";
import {filter, map, share} from "rxjs/operators";
import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service";

@ -28,7 +28,7 @@
import {ChangeDetectorRef, Component, ElementRef, HostListener, OnDestroy, OnInit} from '@angular/core';
import {distinctUntilChanged} from 'rxjs/operators';
import {Subscription} from 'rxjs/Subscription';
import {Subscription} from 'rxjs';
import {untilComponentDestroyed} from 'ng2-rx-componentdestroyed';
import {MainMenuToggleService} from "core-components/resizer/main-menu-toggle.service";

@ -27,7 +27,7 @@
// ++
import {Injectable} from '@angular/core';
import {BehaviorSubject} from 'rxjs/BehaviorSubject';
import {BehaviorSubject} from 'rxjs';
import {I18nService} from "core-app/modules/common/i18n/i18n.service";
@Injectable()

@ -1,10 +1,38 @@
import {Observable} from 'rxjs/Observable';
import {States} from '../../states.service';
import {InputState} from 'reactivestates';
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
import {Injectable} from '@angular/core';
import {WorkPackageTableSelection} from 'core-components/wp-fast-table/state/wp-table-selection.service';
import {TableState} from 'core-components/wp-table/table-state/table-state';
import {Injectable} from '@angular/core';
import {InputState} from 'reactivestates';
import {Observable} from 'rxjs';
import {distinctUntilChanged, filter, map} from 'rxjs/operators';
import {States} from '../../states.service';
export interface WPFocusState {
workPackageId:string;

@ -26,18 +26,17 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
import {Observable} from 'rxjs/Observable';
import {zip} from 'rxjs/observable/zip';
import {take, takeUntil} from 'rxjs/operators';
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {RelationResource} from 'core-app/modules/hal/resources/relation-resource';
import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource';
import {componentDestroyed} from 'ng2-rx-componentdestroyed';
import {Observable, zip} from 'rxjs';
import {take, takeUntil} from 'rxjs/operators';
import {WorkPackageCacheService} from '../work-packages/work-package-cache.service';
import {RelatedWorkPackagesGroup} from './wp-relations.interfaces';
import {RelationsStateValue, WorkPackageRelationsService} from './wp-relations.service';
import {Component, Inject, Input, OnDestroy, OnInit} from "@angular/core";
import {componentDestroyed} from "ng2-rx-componentdestroyed";
import {I18nService} from "core-app/modules/common/i18n/i18n.service";
@Component({

@ -26,7 +26,7 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
import {BehaviorSubject} from 'rxjs/BehaviorSubject';
import {BehaviorSubject} from 'rxjs';
import {auditTime, takeUntil} from 'rxjs/operators';
import {Directive, ElementRef, Input, OnDestroy, OnInit} from "@angular/core";
import {componentDestroyed} from "ng2-rx-componentdestroyed";

@ -26,16 +26,8 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
import {Injectable, Injector} from '@angular/core';
import {HttpClient, HttpErrorResponse, HttpHeaders, HttpParams} from '@angular/common/http';
import {catchError, map, tap} from 'rxjs/operators';
import {Observable} from 'rxjs';
import {HalResource, HalResourceClass} from 'core-app/modules/hal/resources/hal-resource';
import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource';
import {HalLink, HalLinkInterface} from 'core-app/modules/hal/hal-link/hal-link';
import {ErrorObservable} from 'rxjs/observable/ErrorObservable';
import {initializeHalProperties} from 'core-app/modules/hal/helpers/hal-resource-builder';
import {URLParamsEncoder} from 'core-app/modules/hal/services/url-params-encoder';
import {Injectable} from '@angular/core';
import {HalResource} from 'core-app/modules/hal/resources/hal-resource';
@Injectable()
export class HalResourceSortingService {

Loading…
Cancel
Save