parent
768100516f
commit
53227abe7b
|
@ -89,7 +89,8 @@
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"jasmine": "^2.6.0",
|
"jasmine": "^2.6.0",
|
||||||
"ng-pwa-tools": "^0.0.10",
|
"ng-pwa-tools": "^0.0.10",
|
||||||
"rxjs": "^5.5.2",
|
"rxjs": "^6.0.0-beta.0",
|
||||||
|
"rxjs-compat": "^6.0.0-beta.0",
|
||||||
"tslib": "^1.9.0",
|
"tslib": "^1.9.0",
|
||||||
"web-animations-js": "^2.2.5",
|
"web-animations-js": "^2.2.5",
|
||||||
"zone.js": "^0.8.19"
|
"zone.js": "^0.8.19"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"master": {
|
"master": {
|
||||||
"uncompressed": {
|
"uncompressed": {
|
||||||
"inline": 1971,
|
"inline": 1971,
|
||||||
"main": 774095,
|
"main": 743696,
|
||||||
"polyfills": 40272,
|
"polyfills": 40272,
|
||||||
"prettify": 14888
|
"prettify": 14888
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,7 @@ import { HttpClient } from '@angular/common/http';
|
||||||
import { MatProgressBar, MatSidenav } from '@angular/material';
|
import { MatProgressBar, MatSidenav } from '@angular/material';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, timer } from 'rxjs';
|
||||||
import { timer } from 'rxjs/observable/timer';
|
|
||||||
import 'rxjs/add/operator/mapTo';
|
import 'rxjs/add/operator/mapTo';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
|
@ -13,9 +13,7 @@ import { SearchResults } from 'app/search/interfaces';
|
||||||
import { SearchService } from 'app/search/search.service';
|
import { SearchService } from 'app/search/search.service';
|
||||||
import { TocService } from 'app/shared/toc.service';
|
import { TocService } from 'app/shared/toc.service';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
|
||||||
import { combineLatest } from 'rxjs/observable/combineLatest';
|
|
||||||
import 'rxjs/add/operator/first';
|
import 'rxjs/add/operator/first';
|
||||||
|
|
||||||
const sideNavView = 'SideNav';
|
const sideNavView = 'SideNav';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
import { ApiListComponent } from './api-list.component';
|
import { ApiListComponent } from './api-list.component';
|
||||||
import { ApiItem, ApiSection, ApiService } from './api.service';
|
import { ApiItem, ApiSection, ApiService } from './api.service';
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { combineLatest, Observable, ReplaySubject } from 'rxjs';
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
||||||
import { combineLatest } from 'rxjs/observable/combineLatest';
|
|
||||||
|
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { ApiSection, ApiService } from './api.service';
|
import { ApiSection, ApiService } from './api.service';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||||
|
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
import { ReplaySubject, Subject } from 'rxjs';
|
||||||
import { Subject } from 'rxjs/Subject';
|
|
||||||
import 'rxjs/add/operator/do';
|
import 'rxjs/add/operator/do';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/takeUntil';
|
import 'rxjs/add/operator/takeUntil';
|
||||||
|
|
|
@ -3,6 +3,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { MatSnackBar } from '@angular/material';
|
import { MatSnackBar } from '@angular/material';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import 'rxjs/add/operator/first';
|
||||||
|
import 'rxjs/add/operator/toPromise';
|
||||||
|
|
||||||
import { CodeComponent } from './code.component';
|
import { CodeComponent } from './code.component';
|
||||||
import { CodeModule } from './code.module';
|
import { CodeModule } from './code.module';
|
||||||
|
@ -61,44 +63,53 @@ describe('CodeComponent', () => {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('pretty printing', () => {
|
describe('pretty printing', () => {
|
||||||
it('should format a one-line code sample', () => {
|
const untilCodeFormatted = () => {
|
||||||
|
const emitter = hostComponent.codeComponent.codeFormatted;
|
||||||
|
return emitter.first().toPromise();
|
||||||
|
};
|
||||||
|
const hasLineNumbers = async () => {
|
||||||
|
// presence of `<li>`s are a tell-tale for line numbers
|
||||||
|
await untilCodeFormatted();
|
||||||
|
return 0 < fixture.nativeElement.querySelectorAll('li').length;
|
||||||
|
};
|
||||||
|
|
||||||
|
it('should format a one-line code sample', async () => {
|
||||||
|
hostComponent.setCode(oneLineCode);
|
||||||
|
await untilCodeFormatted();
|
||||||
|
|
||||||
// 'pln' spans are a tell-tale for syntax highlighing
|
// 'pln' spans are a tell-tale for syntax highlighing
|
||||||
const spans = fixture.nativeElement.querySelectorAll('span.pln');
|
const spans = fixture.nativeElement.querySelectorAll('span.pln');
|
||||||
expect(spans.length).toBeGreaterThan(0, 'formatted spans');
|
expect(spans.length).toBeGreaterThan(0, 'formatted spans');
|
||||||
});
|
});
|
||||||
|
|
||||||
function hasLineNumbers() {
|
it('should format a one-line code sample without linenums by default', async () => {
|
||||||
// presence of `<li>`s are a tell-tale for line numbers
|
hostComponent.setCode(oneLineCode);
|
||||||
return 0 < fixture.nativeElement.querySelectorAll('li').length;
|
expect(await hasLineNumbers()).toBe(false);
|
||||||
}
|
|
||||||
|
|
||||||
it('should format a one-line code sample without linenums by default', () => {
|
|
||||||
expect(hasLineNumbers()).toBe(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add line numbers to one-line code sample when linenums set true', () => {
|
it('should add line numbers to one-line code sample when linenums set true', async () => {
|
||||||
hostComponent.linenums = 'true';
|
hostComponent.linenums = 'true';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(hasLineNumbers()).toBe(true);
|
expect(await hasLineNumbers()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should format a small multi-line code without linenums by default', () => {
|
it('should format a small multi-line code without linenums by default', async () => {
|
||||||
hostComponent.setCode(smallMultiLineCode);
|
hostComponent.setCode(smallMultiLineCode);
|
||||||
expect(hasLineNumbers()).toBe(false);
|
expect(await hasLineNumbers()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add line numbers to a big multi-line code by default', () => {
|
it('should add line numbers to a big multi-line code by default', async () => {
|
||||||
hostComponent.setCode(bigMultiLineCode);
|
hostComponent.setCode(bigMultiLineCode);
|
||||||
expect(hasLineNumbers()).toBe(true);
|
expect(await hasLineNumbers()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should format big multi-line code without linenums when linenums set false', () => {
|
it('should format big multi-line code without linenums when linenums set false', async () => {
|
||||||
hostComponent.linenums = false;
|
hostComponent.linenums = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
hostComponent.setCode(bigMultiLineCode);
|
hostComponent.setCode(bigMultiLineCode);
|
||||||
expect(hasLineNumbers()).toBe(false);
|
expect(await hasLineNumbers()).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { Component, ElementRef, ViewChild, Input, OnChanges } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';
|
||||||
import { Logger } from 'app/shared/logger.service';
|
import { Logger } from 'app/shared/logger.service';
|
||||||
import { PrettyPrinter } from './pretty-printer.service';
|
import { PrettyPrinter } from './pretty-printer.service';
|
||||||
import { CopierService } from 'app/shared/copier.service';
|
import { CopierService } from 'app/shared/copier.service';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
|
import 'rxjs/add/operator/do';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If linenums is not set, this is the default maximum number of lines that
|
* If linenums is not set, this is the default maximum number of lines that
|
||||||
|
@ -93,6 +94,8 @@ export class CodeComponent implements OnChanges {
|
||||||
get title(): string { return this._title; }
|
get title(): string { return this._title; }
|
||||||
private _title: string;
|
private _title: string;
|
||||||
|
|
||||||
|
@Output() codeFormatted = new EventEmitter<void>();
|
||||||
|
|
||||||
/** The element in the template that will display the formatted code. */
|
/** The element in the template that will display the formatted code. */
|
||||||
@ViewChild('codeContainer') codeContainer: ElementRef;
|
@ViewChild('codeContainer') codeContainer: ElementRef;
|
||||||
|
|
||||||
|
@ -115,7 +118,9 @@ export class CodeComponent implements OnChanges {
|
||||||
this.setCodeHtml(leftAlignedCode); // start with unformatted code
|
this.setCodeHtml(leftAlignedCode); // start with unformatted code
|
||||||
this.codeText = this.getCodeText(); // store the unformatted code as text (for copying)
|
this.codeText = this.getCodeText(); // store the unformatted code as text (for copying)
|
||||||
|
|
||||||
this.pretty.formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))
|
this.pretty
|
||||||
|
.formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))
|
||||||
|
.do(() => this.codeFormatted.emit())
|
||||||
.subscribe(c => this.setCodeHtml(c), err => { /* ignore failure to format */ }
|
.subscribe(c => this.setCodeHtml(c), err => { /* ignore failure to format */ }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { from as fromPromise, Observable } from 'rxjs';
|
||||||
import { fromPromise } from 'rxjs/observable/fromPromise';
|
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/first';
|
import 'rxjs/add/operator/first';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
|
|
||||||
import { of } from 'rxjs/observable/of';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
import { ContributorGroup } from './contributors.model';
|
import { ContributorGroup } from './contributors.model';
|
||||||
import { ContributorListComponent } from './contributor-list.component';
|
import { ContributorListComponent } from './contributor-list.component';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,7 @@ import {
|
||||||
NgModuleRef,
|
NgModuleRef,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { ELEMENT_MODULE_PATHS_TOKEN } from './element-registry';
|
import { ELEMENT_MODULE_PATHS_TOKEN } from './element-registry';
|
||||||
import { of } from 'rxjs/observable/of';
|
import { from as fromPromise, Observable, of } from 'rxjs';
|
||||||
import { Observable } from 'rxjs/Observable';
|
|
||||||
import { fromPromise } from 'rxjs/observable/fromPromise';
|
|
||||||
import { createCustomElement } from '@angular/elements';
|
import { createCustomElement } from '@angular/elements';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -26,14 +24,14 @@ export class ElementsLoader {
|
||||||
* the browser. Custom elements that are registered will be removed from the list of unregistered
|
* the browser. Custom elements that are registered will be removed from the list of unregistered
|
||||||
* elements so that they will not be queried in subsequent calls.
|
* elements so that they will not be queried in subsequent calls.
|
||||||
*/
|
*/
|
||||||
loadContainingCustomElements(element: HTMLElement): Observable<null> {
|
loadContainingCustomElements(element: HTMLElement): Observable<void> {
|
||||||
const selectors: any[] = Array.from(this.elementsToLoad.keys())
|
const selectors: any[] = Array.from(this.elementsToLoad.keys())
|
||||||
.filter(s => element.querySelector(s));
|
.filter(s => element.querySelector(s));
|
||||||
|
|
||||||
if (!selectors.length) { return of(null); }
|
if (!selectors.length) { return of(undefined); }
|
||||||
|
|
||||||
// Returns observable that completes when all discovered elements have been registered.
|
// Returns observable that completes when all discovered elements have been registered.
|
||||||
return fromPromise(Promise.all(selectors.map(s => this.register(s))).then(result => null));
|
return fromPromise(Promise.all(selectors.map(s => this.register(s))).then(result => undefined));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Registers the custom element defined on the WithCustomElement module factory. */
|
/** Registers the custom element defined on the WithCustomElement module factory. */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { PlatformLocation } from '@angular/common';
|
import { PlatformLocation } from '@angular/common';
|
||||||
|
|
||||||
import { of } from 'rxjs/observable/of';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
import { ResourceListComponent } from './resource-list.component';
|
import { ResourceListComponent } from './resource-list.component';
|
||||||
import { ResourceService } from './resource.service';
|
import { ResourceService } from './resource.service';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { MockLocationService } from 'testing/location.service';
|
import { MockLocationService } from 'testing/location.service';
|
||||||
import { SearchResults } from 'app/search/interfaces';
|
import { SearchResults } from 'app/search/interfaces';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { SearchResults } from 'app/search/interfaces';
|
import { SearchResults } from 'app/search/interfaces';
|
||||||
import { SearchService } from 'app/search/search.service';
|
import { SearchService } from 'app/search/search.service';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { Subscription } from 'rxjs/Subscription';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { MockLocationService } from 'testing/location.service';
|
import { MockLocationService } from 'testing/location.service';
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { AsyncSubject, Observable, of } from 'rxjs';
|
||||||
import { AsyncSubject } from 'rxjs/AsyncSubject';
|
|
||||||
import { of } from 'rxjs/observable/of';
|
|
||||||
import 'rxjs/add/operator/catch';
|
import 'rxjs/add/operator/catch';
|
||||||
import 'rxjs/add/operator/switchMap';
|
import 'rxjs/add/operator/switchMap';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { Title, Meta } from '@angular/platform-browser';
|
import { Title, Meta } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, of } from 'rxjs';
|
||||||
import { of } from 'rxjs/observable/of';
|
|
||||||
|
|
||||||
import { FILE_NOT_FOUND_ID, FETCHING_ERROR_ID } from 'app/documents/document.service';
|
import { FILE_NOT_FOUND_ID, FETCHING_ERROR_ID } from 'app/documents/document.service';
|
||||||
import { Logger } from 'app/shared/logger.service';
|
import { Logger } from 'app/shared/logger.service';
|
||||||
|
@ -297,13 +296,11 @@ describe('DocViewerComponent', () => {
|
||||||
let loadElementsSpy: jasmine.Spy;
|
let loadElementsSpy: jasmine.Spy;
|
||||||
|
|
||||||
const doRender = (contents: string | null, id = 'foo') =>
|
const doRender = (contents: string | null, id = 'foo') =>
|
||||||
new Promise<void>((resolve, reject) =>
|
docViewer.render({contents, id}).toPromise();
|
||||||
docViewer.render({contents, id}).subscribe(resolve, reject));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const elementsLoader = TestBed.get(ElementsLoader) as MockElementsLoader;
|
const elementsLoader = TestBed.get(ElementsLoader) as MockElementsLoader;
|
||||||
loadElementsSpy =
|
loadElementsSpy = elementsLoader.loadContainingCustomElements.and.returnValue(of(undefined));
|
||||||
elementsLoader.loadContainingCustomElements.and.returnValue(of([]));
|
|
||||||
prepareTitleAndTocSpy = spyOn(docViewer, 'prepareTitleAndToc');
|
prepareTitleAndTocSpy = spyOn(docViewer, 'prepareTitleAndToc');
|
||||||
swapViewsSpy = spyOn(docViewer, 'swapViews').and.returnValue(of(undefined));
|
swapViewsSpy = spyOn(docViewer, 'swapViews').and.returnValue(of(undefined));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import { Component, ElementRef, EventEmitter, Input, OnDestroy, Output } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, OnDestroy, Output } from '@angular/core';
|
||||||
import { Title, Meta } from '@angular/platform-browser';
|
import { Title, Meta } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, of, timer } from 'rxjs';
|
||||||
import { of } from 'rxjs/observable/of';
|
|
||||||
import { timer } from 'rxjs/observable/timer';
|
|
||||||
import 'rxjs/add/operator/catch';
|
import 'rxjs/add/operator/catch';
|
||||||
import 'rxjs/add/operator/do';
|
import 'rxjs/add/operator/do';
|
||||||
import 'rxjs/add/operator/switchMap';
|
import 'rxjs/add/operator/switchMap';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { Component, CUSTOM_ELEMENTS_SCHEMA, DebugElement } from '@angular/core';
|
import { Component, CUSTOM_ELEMENTS_SCHEMA, DebugElement } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
import { asapScheduler as asap, BehaviorSubject } from 'rxjs';
|
||||||
import { asap } from 'rxjs/scheduler/asap';
|
|
||||||
|
|
||||||
import { ScrollService } from 'app/shared/scroll.service';
|
import { ScrollService } from 'app/shared/scroll.service';
|
||||||
import { TocComponent } from './toc.component';
|
import { TocComponent } from './toc.component';
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core';
|
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { asapScheduler as asap, Observable, Subject } from 'rxjs';
|
||||||
import { Subject } from 'rxjs/Subject';
|
|
||||||
import { asap } from 'rxjs/scheduler/asap';
|
|
||||||
import 'rxjs/add/observable/combineLatest';
|
import 'rxjs/add/observable/combineLatest';
|
||||||
import 'rxjs/add/operator/subscribeOn';
|
import 'rxjs/add/operator/subscribeOn';
|
||||||
import 'rxjs/add/operator/takeUntil';
|
import 'rxjs/add/operator/takeUntil';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
import { TopMenuComponent } from './top-menu.component';
|
import { TopMenuComponent } from './top-menu.component';
|
||||||
import { NavigationService, NavigationViews } from 'app/navigation/navigation.service';
|
import { NavigationService, NavigationViews } from 'app/navigation/navigation.service';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { combineLatest, Observable } from 'rxjs';
|
||||||
import { combineLatest } from 'rxjs/observable/combineLatest';
|
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
import 'rxjs/add/operator/publishReplay';
|
import 'rxjs/add/operator/publishReplay';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, OnInit, ViewChild, ElementRef, EventEmitter, Output } from '@angular/core';
|
import { Component, OnInit, ViewChild, ElementRef, EventEmitter, Output } from '@angular/core';
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
import 'rxjs/add/operator/distinctUntilChanged';
|
import 'rxjs/add/operator/distinctUntilChanged';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ReflectiveInjector, NgZone } from '@angular/core';
|
import { ReflectiveInjector, NgZone } from '@angular/core';
|
||||||
import { fakeAsync, tick } from '@angular/core/testing';
|
import { fakeAsync, tick } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import 'rxjs/add/observable/of';
|
import 'rxjs/add/observable/of';
|
||||||
import { SearchService } from './search.service';
|
import { SearchService } from './search.service';
|
||||||
import { WebWorkerClient } from 'app/shared/web-worker';
|
import { WebWorkerClient } from 'app/shared/web-worker';
|
||||||
|
|
|
@ -5,10 +5,7 @@ can be found in the LICENSE file at http://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgZone, Injectable } from '@angular/core';
|
import { NgZone, Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, race, ReplaySubject, timer } from 'rxjs';
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
||||||
import { race } from 'rxjs/observable/race';
|
|
||||||
import { timer } from 'rxjs/observable/timer';
|
|
||||||
import 'rxjs/add/operator/concatMap';
|
import 'rxjs/add/operator/concatMap';
|
||||||
import 'rxjs/add/operator/first';
|
import 'rxjs/add/operator/first';
|
||||||
import 'rxjs/add/operator/publishReplay';
|
import 'rxjs/add/operator/publishReplay';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { InjectionToken, Inject, Injectable } from '@angular/core';
|
import { InjectionToken, Inject, Injectable } from '@angular/core';
|
||||||
import { of } from 'rxjs/observable/of';
|
import { of } from 'rxjs';
|
||||||
import { MatIconRegistry } from '@angular/material/icon';
|
import { MatIconRegistry } from '@angular/material/icon';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { Location, LocationStrategy, PlatformLocation } from '@angular/common';
|
import { Location, LocationStrategy, PlatformLocation } from '@angular/common';
|
||||||
import { MockLocationStrategy } from '@angular/common/testing';
|
import { MockLocationStrategy } from '@angular/common/testing';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
import { GaService } from 'app/shared/ga.service';
|
import { GaService } from 'app/shared/ga.service';
|
||||||
import { SwUpdatesService } from 'app/sw-updates/sw-updates.service';
|
import { SwUpdatesService } from 'app/sw-updates/sw-updates.service';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Location, PlatformLocation } from '@angular/common';
|
import { Location, PlatformLocation } from '@angular/common';
|
||||||
|
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
import { ReplaySubject } from 'rxjs';
|
||||||
import 'rxjs/add/operator/do';
|
import 'rxjs/add/operator/do';
|
||||||
|
|
||||||
import { GaService } from 'app/shared/ga.service';
|
import { GaService } from 'app/shared/ga.service';
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Inject, Injectable } from '@angular/core';
|
import { Inject, Injectable } from '@angular/core';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, ReplaySubject, Subject } from 'rxjs';
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
||||||
import { Subject } from 'rxjs/Subject';
|
|
||||||
import 'rxjs/add/observable/fromEvent';
|
import 'rxjs/add/observable/fromEvent';
|
||||||
import 'rxjs/add/operator/auditTime';
|
import 'rxjs/add/operator/auditTime';
|
||||||
import 'rxjs/add/operator/distinctUntilChanged';
|
import 'rxjs/add/operator/distinctUntilChanged';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable, Inject } from '@angular/core';
|
import { Injectable, Inject } from '@angular/core';
|
||||||
import { PlatformLocation } from '@angular/common';
|
import { PlatformLocation } from '@angular/common';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/platform-browser';
|
||||||
import {fromEvent} from 'rxjs/observable/fromEvent';
|
import { fromEvent } from 'rxjs';
|
||||||
|
|
||||||
export const topMargin = 16;
|
export const topMargin = 16;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { DOCUMENT, DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
import { DOCUMENT, DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
import { ScrollItem, ScrollSpyInfo, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
import { ScrollItem, ScrollSpyInfo, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
||||||
import { TocItem, TocService } from './toc.service';
|
import { TocItem, TocService } from './toc.service';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Inject, Injectable } from '@angular/core';
|
import { Inject, Injectable } from '@angular/core';
|
||||||
import { DOCUMENT, DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
import { DOCUMENT, DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||||
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
import { ReplaySubject } from 'rxjs';
|
||||||
import { ScrollSpyInfo, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
import { ScrollSpyInfo, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ can be found in the LICENSE file at http://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {NgZone} from '@angular/core';
|
import {NgZone} from '@angular/core';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {Observable} from 'rxjs';
|
||||||
|
|
||||||
export interface WebWorkerMessage {
|
export interface WebWorkerMessage {
|
||||||
type: string;
|
type: string;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { fakeAsync, tick } from '@angular/core/testing';
|
import { fakeAsync, tick } from '@angular/core/testing';
|
||||||
import { NgServiceWorker } from '@angular/service-worker';
|
import { NgServiceWorker } from '@angular/service-worker';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
import 'rxjs/add/operator/take';
|
import 'rxjs/add/operator/take';
|
||||||
|
|
||||||
import { Logger } from 'app/shared/logger.service';
|
import { Logger } from 'app/shared/logger.service';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
import { NgServiceWorker } from '@angular/service-worker';
|
import { NgServiceWorker } from '@angular/service-worker';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, Subject } from 'rxjs';
|
||||||
import { Subject } from 'rxjs/Subject';
|
|
||||||
import 'rxjs/add/observable/of';
|
import 'rxjs/add/observable/of';
|
||||||
import 'rxjs/add/operator/concat';
|
import 'rxjs/add/operator/concat';
|
||||||
import 'rxjs/add/operator/debounceTime';
|
import 'rxjs/add/operator/debounceTime';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, NgModule, ViewChild } from '@angular/core';
|
import { Component, NgModule, ViewChild } from '@angular/core';
|
||||||
import { Title, Meta } from '@angular/platform-browser';
|
import { Title, Meta } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { DocumentContents } from 'app/documents/document.service';
|
import { DocumentContents } from 'app/documents/document.service';
|
||||||
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
|
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
export class MockLocationService {
|
export class MockLocationService {
|
||||||
urlSubject = new BehaviorSubject<string>(this.initialUrl);
|
urlSubject = new BehaviorSubject<string>(this.initialUrl);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs';
|
||||||
import { SearchResults } from 'app/search/interfaces';
|
import { SearchResults } from 'app/search/interfaces';
|
||||||
|
|
||||||
export class MockSearchService {
|
export class MockSearchService {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eofline": true,
|
"eofline": true,
|
||||||
"forin": true,
|
"forin": true,
|
||||||
"import-blacklist": [true, "rxjs"],
|
"import-blacklist": true,
|
||||||
"import-spacing": true,
|
"import-spacing": true,
|
||||||
"indent": [
|
"indent": [
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -7528,11 +7528,9 @@ rx@2.3.24:
|
||||||
version "2.3.24"
|
version "2.3.24"
|
||||||
resolved "https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7"
|
resolved "https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7"
|
||||||
|
|
||||||
rxjs@^5.5.2:
|
rxjs-compat@^6.0.0-beta.0:
|
||||||
version "5.5.2"
|
version "6.0.0-beta.0"
|
||||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3"
|
resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.0.0-beta.0.tgz#386007624f6d771ce89ec48e31460f9177d19ac4"
|
||||||
dependencies:
|
|
||||||
symbol-observable "^1.0.1"
|
|
||||||
|
|
||||||
rxjs@^5.5.6:
|
rxjs@^5.5.6:
|
||||||
version "5.5.7"
|
version "5.5.7"
|
||||||
|
@ -7540,6 +7538,12 @@ rxjs@^5.5.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
symbol-observable "1.0.1"
|
symbol-observable "1.0.1"
|
||||||
|
|
||||||
|
rxjs@^6.0.0-beta.0:
|
||||||
|
version "6.0.0-beta.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.0.0-beta.0.tgz#cf241936be39d8279ed0b2be4bf417777301f65a"
|
||||||
|
dependencies:
|
||||||
|
tslib "^1.9.0"
|
||||||
|
|
||||||
safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
@ -8417,10 +8421,6 @@ symbol-observable@1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
|
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
|
||||||
|
|
||||||
symbol-observable@^1.0.1:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
|
||||||
|
|
||||||
symbol-tree@^3.2.1:
|
symbol-tree@^3.2.1:
|
||||||
version "3.2.2"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
|
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
|
||||||
|
|
Loading…
Reference in New Issue