feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573)

PR Close #22573
This commit is contained in:
Igor Minar
2018-02-27 17:06:06 -05:00
parent c445314239
commit b43f8bc7d3
270 changed files with 10104 additions and 1860 deletions

View File

@ -12,10 +12,8 @@ const sourcemaps = require('rollup-plugin-sourcemaps');
const globals = {
'@angular/core': 'ng.core',
'@angular/platform-browser': 'ng.platformBrowser',
'rxjs/Subscription': 'Rx',
'rxjs/Observable': 'Rx',
'rxjs/observable/merge': 'Rx.Observable',
'rxjs/operator/map': 'Rx.Observable.prototype'
'rxjs': 'rxjs',
'rxjs/operators': 'rxjs.operators'
};
module.exports = {

View File

@ -7,9 +7,8 @@
*/
import {ApplicationRef, ComponentFactory, ComponentFactoryResolver, ComponentRef, EventEmitter, Injector, OnChanges, SimpleChange, SimpleChanges, Type} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {merge} from 'rxjs/observable/merge';
import {map} from 'rxjs/operator/map';
import {Observable, merge} from 'rxjs';
import {map} from 'rxjs/operators';
import {NgElementStrategy, NgElementStrategyEvent, NgElementStrategyFactory} from './element-strategy';
import {extractProjectableNodes} from './extract-projectable-nodes';
@ -180,7 +179,7 @@ export class ComponentNgElementStrategy implements NgElementStrategy {
protected initializeOutputs(): void {
const eventEmitters = this.componentFactory.outputs.map(({propName, templateName}) => {
const emitter = (this.componentRef !.instance as any)[propName] as EventEmitter<any>;
return map.call(emitter, (value: any) => ({name: templateName, value}));
return emitter.pipe(map((value: any) => ({name: templateName, value})));
});
this.events = merge(...eventEmitters);

View File

@ -7,7 +7,7 @@
*/
import {Injector, Type} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';
import {Subscription} from 'rxjs';
import {ComponentNgElementStrategyFactory} from './component-factory-strategy';
import {NgElementStrategy, NgElementStrategyFactory} from './element-strategy';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ComponentFactory, Injector} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observable} from 'rxjs';
/**
* Interface for the events emitted through the NgElementStrategy.

View File

@ -8,7 +8,7 @@
import {ComponentFactory, ComponentRef, Injector, NgModuleRef, SimpleChange, SimpleChanges, Type} from '@angular/core';
import {fakeAsync, tick} from '@angular/core/testing';
import {Subject} from 'rxjs/Subject';
import {Subject} from 'rxjs';
import {ComponentNgElementStrategy, ComponentNgElementStrategyFactory} from '../src/component-factory-strategy';
import {NgElementStrategyEvent} from '../src/element-strategy';

View File

@ -9,7 +9,7 @@
import {Component, EventEmitter, Injector, Input, NgModule, Output, destroyPlatform} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {Subject} from 'rxjs/Subject';
import {Subject} from 'rxjs';
import {NgElementConstructor, createCustomElement} from '../src/create-custom-element';
import {NgElementStrategy, NgElementStrategyEvent, NgElementStrategyFactory} from '../src/element-strategy';