Updated to angular 5.2.3 and rxjs 5.5.6

This commit is contained in:
BoykoAlex
2017-11-08 13:31:46 -05:00
parent 9e420d266e
commit c39d28dba2
10 changed files with 40 additions and 40 deletions

View File

@@ -40,12 +40,13 @@
"postinstall": "postinstall-build --only-as-dependency dist \"npm run build && node postinstall.js\""
},
"dependencies": {
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/platform-browser": "4.4.6",
"@angular/core": "5.2.3",
"@angular/forms": "5.2.3",
"@angular/platform-browser": "5.2.3",
"@types/codemirror": "0.0.45",
"@types/jointjs": "1.0.4",
"@types/lodash": "4.14.73",
"rxjs": "5.5.6",
"codemirror": "5.28.0",
"jointjs": "1.0.3",
"lodash": "3.10.1",
@@ -53,18 +54,17 @@
"postinstall-build": "5.0.1"
},
"peerDependencies": {
"@angular/core": ">=4.0.0 <5.0.0 || >=4.0.0-beta <5.0.0",
"@angular/animations": "4.2.4"
"@angular/core": ">=5.0.0 <6.0.0"
},
"devDependencies": {
"@angular/common": "4.4.6",
"@angular/compiler": "4.4.6",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/platform-browser": "4.4.6",
"@angular/platform-browser-dynamic": "4.4.6",
"@angular/platform-server": "4.4.6",
"@angular/common": "5.2.3",
"@angular/compiler": "5.2.3",
"@angular/compiler-cli": "4.4.6",
"@angular/core": "5.2.3",
"@angular/forms": "5.2.3",
"@angular/platform-browser": "5.2.3",
"@angular/platform-browser-dynamic": "5.2.3",
"@angular/platform-server": "5.2.3",
"@types/jasmine": "2.5.36",
"@types/node": "6.0.46",
"camelcase": "4.0.0",
@@ -81,15 +81,15 @@
"lite-server": "2.2.2",
"ngx-bootstrap": "1.8.1",
"rimraf": "2.6.1",
"rollup": "0.48.2",
"rollup": "0.51.6",
"rollup-plugin-sourcemaps": "0.4.2",
"rollup-plugin-uglify": "2.0.1",
"rxjs": "5.4.3",
"rxjs": "5.5.6",
"standard-version": "4.0.0",
"systemjs": "0.19.40",
"tslint": "5.3.2",
"typescript": "2.3.3",
"zone.js": "0.8.14",
"systemjs": "0.20.19",
"tslint": "5.9.1",
"typescript": "2.5.3",
"zone.js": "0.8.18",
"@types/codemirror": "0.0.45",
"@types/jointjs": "1.0.4",
"@types/lodash": "4.14.73",

View File

@@ -1,4 +1,4 @@
import { Component, ViewEncapsulation, EventEmitter, OnInit } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { BsModalRef } from 'ngx-bootstrap';
import { Properties } from 'spring-flo';
import { FormGroup } from '@angular/forms';

View File

@@ -24,6 +24,7 @@
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
// 'rxjs/operators': 'npm:rxjs@5.4.3/operators/index.js',
'rx': 'npm:rx',
'rxjs': 'npm:rxjs',
'jointjs': 'npm:jointjs',
@@ -64,6 +65,9 @@
rxjs: {
defaultExtension: 'js'
},
'rxjs/operators': {
main: './index.js'
},
'ts-disposables': {
defaultExtension: 'js',
main: './dist/index.js'

View File

@@ -1,9 +1,8 @@
import {Directive, Input, Output, EventEmitter, Inject, ElementRef, OnInit, OnDestroy,} from '@angular/core';
import {DOCUMENT} from '@angular/platform-browser'
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/sampleTime';
import { sampleTime } from 'rxjs/operators/sampleTime';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/Rx';
import { CompositeDisposable, Disposable } from 'ts-disposables';
import * as _$ from 'jquery';
const $ : any = _$;
@@ -125,7 +124,7 @@ export class ResizerDirective implements OnInit, OnDestroy {
this.splitSize = this._splitSize;
let subscription1 = Observable.fromEvent($(this.document).get(0), 'mousemove')
.sampleTime(300)
.pipe(sampleTime(300))
.subscribe(this.mouseMoveHandler);
this._subscriptions.add(Disposable.create(() => subscription1.unsubscribe()));
let subscription2 = Observable.fromEvent($(this.document).get(0), 'mouseup')

View File

@@ -1,5 +1,4 @@
import { Component, Input, Output, ElementRef, EventEmitter, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
import 'rxjs/add/operator/debounceTime';
import * as _ from 'lodash';
import * as CodeMirror from 'codemirror';
import * as _$ from 'jquery';

View File

@@ -1,5 +1,5 @@
import { Component, Input, Output, ElementRef, EventEmitter, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
import 'rxjs/add/operator/debounceTime';
import { debounceTime } from 'rxjs/operators/debounceTime';
import { dia } from 'jointjs';
import { Flo } from '../shared/flo-common';
import { Shapes, Constants } from '../shared/shapes';
@@ -564,8 +564,7 @@ export class EditorComponent implements OnInit, OnDestroy {
/**
* Hides DOM Node (used to determine drop target DOM element)
* @param domNode DOM node to hide
* @returns {{visibility: *, children: Array}}
* @private
* @returns
*/
private _hideNode(domNode : HTMLElement) : VisibilityState {
let oldVisibility : VisibilityState = {
@@ -586,7 +585,6 @@ export class EditorComponent implements OnInit, OnDestroy {
* Restored DOM node original visibility (used to determine drop target DOM element)
* @param domNode DOM node to restore visibility of
* @param oldVisibility original visibility parameter
* @private
*/
_restoreNodeVisibility(domNode : HTMLElement, oldVisibility : VisibilityState) {
if (domNode.style) {
@@ -872,7 +870,7 @@ export class EditorComponent implements OnInit, OnDestroy {
this.metamodel.load().then(data => {
this.updateGraphRepresentation();
let textSyncSubscription = this.graphToTextEventEmitter.debounceTime(100).subscribe(() => {
let textSyncSubscription = this.graphToTextEventEmitter.pipe(debounceTime(100)).subscribe(() => {
if (this._graphToTextSyncEnabled) {
this.updateTextRepresentation();
}
@@ -883,10 +881,10 @@ export class EditorComponent implements OnInit, OnDestroy {
let graphValidatedSubscription1 = this.graphToTextEventEmitter.subscribe(() => this.contentValidated.emit(false));
this._disposables.add(Disposable.create(() => graphValidatedSubscription1.unsubscribe));
// let validationSubscription = this.validationEventEmitter.debounceTime(100).subscribe(() => this.validateGraph());
// let validationSubscription = this.validationEventEmitter.pipe(debounceTime(100)).subscribe(() => this.validateGraph());
// this._disposables.add(Disposable.create(() => validationSubscription.unsubscribe()));
let graphSyncSubscription = this.textToGraphEventEmitter.debounceTime(300).subscribe(() => this.updateGraphRepresentation());
let graphSyncSubscription = this.textToGraphEventEmitter.pipe(debounceTime(300)).subscribe(() => this.updateGraphRepresentation());
this._disposables.add(Disposable.create(() => graphSyncSubscription.unsubscribe()));
// Setup content validated event emitter. Emit not validated when text to graph conversion required

View File

@@ -1,6 +1,6 @@
import {Component, ElementRef, Input, Output, EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges, Inject, ViewEncapsulation} from '@angular/core';
import { Subject } from 'rxjs/Subject';
import 'rxjs/add/operator/debounceTime';
import { debounceTime } from 'rxjs/operators/debounceTime';
import { dia } from 'jointjs';
import { Flo } from '../shared/flo-common';
import { Shapes, Constants } from './../shared/shapes';
@@ -91,7 +91,6 @@ export class Palette implements OnInit, OnDestroy, OnChanges {
/**
* The names of any groups in the palette that have been deliberately closed (the arrow clicked on)
* @type {String[]}
*/
private closedGroups : Set<string>;
@@ -172,7 +171,7 @@ export class Palette implements OnInit, OnDestroy, OnChanges {
// Add debounced listener to filter text changes
this.filterTextModel
.debounceTime(DEBOUNCE_TIME)
.pipe(debounceTime(DEBOUNCE_TIME))
.subscribe((value) => this.rebuildPalette());
this.initialized = true;

View File

@@ -1,4 +1,4 @@
import { Component, Input, Output, EventEmitter, OnInit, ViewEncapsulation } from '@angular/core';
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { Properties } from '../shared/flo-properties';

View File

@@ -210,9 +210,9 @@ export namespace Flo {
/**
* Return the metadata for a particular palette entry in a particular group.
* @param {String} name - name of the palette entry
* @param {string} group - group in which the palette entry should exist (e.g. sinks)
* @return {{name:string,group:string,unresolved:Boolean}}
* @param name - name of the palette entry
* @param group - group in which the palette entry should exist (e.g. sinks)
* @return
*/
export function getMetadata(metamodel : Map<string, Map<string, ElementMetadata>>, name : string, group : string) : ElementMetadata {
if (name && group && metamodel.get(group) && metamodel.get(group).get(name)) {

View File

@@ -3,6 +3,8 @@ import { ValidatorFn, AsyncValidatorFn, AbstractControl, ValidationErrors } from
import { Flo } from './flo-common';
import { Subject } from 'rxjs/Subject'
import { Observable } from 'rxjs/Observable';
import { debounceTime } from 'rxjs/operators/debounceTime';
import { mergeMap } from 'rxjs/operators/mergeMap';
export namespace Properties {
@@ -297,8 +299,7 @@ export namespace Properties {
return new Observable(obs => {
if (control.valueChanges && control.value) {
control.valueChanges
.debounceTime(debounce)
.flatMap(value => service(value))
.pipe(debounceTime(debounce), mergeMap(value => service(value)))
.subscribe(() => {
obs.next({uniqueResource: true});
obs.complete();