From b5334c2658a05d08eaba1e619817cdbab925f693 Mon Sep 17 00:00:00 2001 From: Oleg Pimenov Date: Fri, 7 Jun 2019 15:50:37 +0300 Subject: [PATCH] feat: upgrade to Angular 8 (#138) --- package.json | 43 +- .../aria-describer/aria-describer.spec.ts | 336 ++++--- .../cdk/a11y/aria-describer/aria-describer.ts | 326 +++--- packages/cdk/accordion/accordion.spec.ts | 4 +- packages/cdk/bidi/directionality.spec.ts | 2 +- .../cdk/overlay/overlay-container.spec.ts | 2 +- .../cdk/overlay/overlay-directives.spec.ts | 10 +- packages/cdk/overlay/overlay.spec.ts | 2 +- packages/cdk/portal/portal.spec.ts | 6 +- packages/cdk/schematics/utils/ast.ts | 90 +- .../schematics/utils/ast/ng-module-imports.ts | 110 ++- .../cdk/schematics/utils/build-component.ts | 393 ++++---- packages/cdk/schematics/utils/get-project.ts | 20 +- .../cdk/schematics/utils/project-main-file.ts | 26 +- .../schematics/utils/project-style-file.ts | 52 +- .../cdk/schematics/utils/project-targets.ts | 39 +- .../cdk/schematics/utils/schematic-options.ts | 55 +- .../utils/version-agnostic-typescript.ts | 17 +- .../cdk/scrolling/scroll-dispatcher.spec.ts | 6 +- packages/cdk/scrolling/virtual-for-of.ts | 103 +- .../scrolling/virtual-scroll-viewport.spec.ts | 59 +- .../cdk/scrolling/virtual-scroll-viewport.ts | 2 +- packages/cdk/tree/tree._spec.ts | 30 +- packages/cdk/tree/tree.ts | 2 +- .../{tsconfig-aot.json => tsconfig.aot.json} | 2 +- ...sconfig-build.json => tsconfig.build.json} | 0 packages/mosaic-dev/navbar/module.ts | 2 +- packages/mosaic-dev/sidepanel/module.ts | 2 +- packages/mosaic-dev/tags/module.ts | 8 +- packages/mosaic-dev/tooltip/module.ts | 10 +- packages/mosaic-examples/tsconfig.tests.json | 2 +- .../mosaic-moment-adapter/tsconfig.tests.json | 2 +- .../autocomplete/autocomplete.component.ts | 4 +- .../mosaic/autocomplete/autocomplete.spec.ts | 24 +- .../button-toggle.component.spec.ts | 2 +- .../button-toggle/button-toggle.component.ts | 2 +- .../checkbox/checkbox.component.spec.ts | 2 +- packages/mosaic/checkbox/checkbox.ts | 2 +- packages/mosaic/core/option/option.ts | 2 +- packages/mosaic/datepicker/calendar.ts | 6 +- .../mosaic/datepicker/datepicker-toggle.ts | 4 +- packages/mosaic/datepicker/datepicker.spec.ts | 56 +- packages/mosaic/datepicker/datepicker.ts | 2 +- packages/mosaic/datepicker/month-view.ts | 2 +- .../mosaic/datepicker/multi-year-view.spec.ts | 2 +- packages/mosaic/datepicker/multi-year-view.ts | 2 +- packages/mosaic/datepicker/year-view.spec.ts | 2 +- packages/mosaic/datepicker/year-view.ts | 2 +- packages/mosaic/dropdown/dropdown-item.ts | 2 +- .../mosaic/dropdown/dropdown.component.ts | 4 +- packages/mosaic/dropdown/dropdown.spec.ts | 68 +- packages/mosaic/form-field/form-field.ts | 8 +- .../list/list-selection.component.spec.ts | 2 - .../mosaic/list/list-selection.component.ts | 6 +- packages/mosaic/modal/modal.component.ts | 6 +- .../mosaic/navbar/navbar.component.spec.ts | 2 +- packages/mosaic/navbar/navbar.component.ts | 4 +- packages/mosaic/popover/popover.spec.ts | 14 +- packages/mosaic/radio/radio.component.ts | 2 +- packages/mosaic/radio/radio.spec.ts | 2 +- .../mosaic/select/select.component.spec.ts | 36 +- packages/mosaic/select/select.component.ts | 14 +- .../sidepanel-container.component.ts | 2 +- packages/mosaic/sidepanel/sidepanel.spec.ts | 2 +- packages/mosaic/tabs/tab-body.spec.ts | 4 +- packages/mosaic/tabs/tab-body.ts | 2 +- packages/mosaic/tabs/tab-group.spec.ts | 2 +- packages/mosaic/tabs/tab-group.ts | 4 +- packages/mosaic/tabs/tab-header.spec.ts | 2 +- packages/mosaic/tabs/tab-header.ts | 4 +- .../tabs/tab-nav-bar/tab-nav-bar.spec.ts | 6 +- packages/mosaic/tabs/tab.ts | 6 +- packages/mosaic/tags/tag-input.spec.ts | 2 +- .../mosaic/tags/tag-list.component.spec.ts | 8 +- packages/mosaic/tags/tag.component.spec.ts | 2 +- packages/mosaic/tags/tag.component.ts | 6 +- .../mosaic/toggle/toggle.component.spec.ts | 2 +- packages/mosaic/toggle/toggle.component.ts | 2 +- packages/mosaic/tooltip/tooltip.spec.ts | 26 +- .../tree-select/tree-select.component.spec.ts | 48 +- .../tree-select/tree-select.component.ts | 10 +- packages/mosaic/tree/tree-option.ts | 6 +- packages/mosaic/tree/tree-selection.ts | 4 +- packages/mosaic/tree/tree._spec.ts | 12 +- packages/mosaic/tsconfig.build.json | 2 +- .../vertical-navbar.component.spec.ts | 2 +- ...sconfig-build.json => tsconfig.build.json} | 0 tools/gulp/tasks/aot.ts | 2 +- tools/gulp/tasks/development.ts | 2 +- tools/packages/compile-entry-point.ts | 6 +- tools/webpack/webpack.config.js | 2 +- yarn.lock | 928 +++++++++--------- 92 files changed, 1622 insertions(+), 1533 deletions(-) rename packages/dev-app/{tsconfig-aot.json => tsconfig.aot.json} (98%) rename packages/dev-app/{tsconfig-build.json => tsconfig.build.json} (100%) rename packages/{tsconfig-build.json => tsconfig.build.json} (100%) diff --git a/package.json b/package.json index d2e24843e..292ca2ebd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mosaic", - "version": "1.0.0-beta.7", + "version": "8.0.0-beta.0", "description": "Components for Angular", "homepage": "https://github.com/positive-js/mosaic", "bugs": "https://github.com/positive-js/mosaic/issues", @@ -13,39 +13,38 @@ "node": ">= 8", "npm": ">=5" }, - "requiredAngularVersion": ">=7.0.0", + "requiredAngularVersion": ">=8.0.0", "dependencies": { - "@angular/animations": "^7.2.1", - "@angular/common": "^7.2.1", - "@angular/compiler": "^7.2.1", - "@angular/core": "^7.2.1", - "@angular/elements": "^7.2.1", - "@angular/forms": "^7.2.1", - "@angular/platform-browser": "^7.2.1", + "@angular/animations": "^8.0.0", + "@angular/common": "^8.0.0", + "@angular/compiler": "^8.0.0", + "@angular/core": "^8.0.0", + "@angular/elements": "^8.0.0", + "@angular/forms": "^8.0.0", + "@angular/platform-browser": "^8.0.0", "@ptsecurity/mosaic-icons": "2.7.2", "@webcomponents/custom-elements": "^1.2.1", "core-js": "^2.6.0", - "rxjs": "^6.3.3", + "rxjs": "^6.4.0", "systemjs": "0.19.43", - "tsickle": "0.34.0", + "tsickle": "^0.35.0", "tslib": "^1.9.3", - "zone.js": "^0.8.29" + "zone.js": "~0.9.1" }, "devDependencies": { - "@angular-devkit/core": "^7.1.3", - "@angular-devkit/schematics": "^7.1.3", - "@angular/compiler-cli": "^7.2.1", - "@angular/http": "^7.2.1", - "@angular/platform-browser-dynamic": "^7.2.1", - "@angular/platform-server": "^7.2.1", - "@angular/router": "^7.2.1", - "@angular/upgrade": "^7.2.9", + "@angular-devkit/core": "^8.0.1", + "@angular-devkit/schematics": "^8.0.1", + "@angular/compiler-cli": "^8.0.0", + "@angular/platform-browser-dynamic": "^8.0.0", + "@angular/platform-server": "^8.0.0", + "@angular/router": "^8.0.0", + "@angular/upgrade": "^8.0.0", "@commitlint/cli": "^7.5.0", "@commitlint/config-conventional": "^7.5.0", "@octokit/rest": "^16.2.0", "@ptsecurity/commitlint-config": "^0.2.1", "@ptsecurity/tslint-config": "^0.12.0", - "@schematics/angular": "7.1.4", + "@schematics/angular": "^8.0.1", "@types/browser-sync": "^0.0.42", "@types/chalk": "^2.2.0", "@types/fs-extra": "^5.0.4", @@ -124,7 +123,7 @@ "tsconfig-paths": "^3.7.0", "tsconfig-paths-webpack-plugin": "^3.2.0", "tslint": "^5.15.0", - "typescript": "~3.1.6", + "typescript": "~3.4.x", "typescript-tslint-plugin": "^0.2.0", "uglify-js": "^2.8.29", "url-loader": "^1.1.2", diff --git a/packages/cdk/a11y/aria-describer/aria-describer.spec.ts b/packages/cdk/a11y/aria-describer/aria-describer.spec.ts index dd86a16d2..c8f2c19fa 100644 --- a/packages/cdk/a11y/aria-describer/aria-describer.spec.ts +++ b/packages/cdk/a11y/aria-describer/aria-describer.spec.ts @@ -1,191 +1,221 @@ import { Component, ElementRef, ViewChild } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { A11yModule, CDK_DESCRIBEDBY_HOST_ATTRIBUTE } from '../index'; - import { AriaDescriber, MESSAGES_CONTAINER_ID } from './aria-describer'; +import { A11yModule, CDK_DESCRIBEDBY_HOST_ATTRIBUTE } from '../index'; describe('AriaDescriber', () => { - let ariaDescriber: AriaDescriber; - let component: TestApp; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [A11yModule], - declarations: [TestApp], - providers: [AriaDescriber] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TestApp); - component = fixture.componentInstance; - ariaDescriber = component.ariaDescriber; - }); - - afterEach(() => { - ariaDescriber.ngOnDestroy(); - }); - - it('should initialize without the message container', () => { - expect(getMessagesContainer()).toBeNull(); - }); - - it('should be able to create a message element', () => { - ariaDescriber.describe(component.element1, 'My Message'); - expectMessages(['My Message']); - }); - - it('should not register empty strings', () => { - ariaDescriber.describe(component.element1, ''); - expect(getMessageElements()).toBe(null); - }); - - it('should not register non-string values', () => { - expect(() => ariaDescriber.describe(component.element1, null!)).not.toThrow(); //tslint:disable-line - expect(getMessageElements()).toBe(null); - }); - - it('should not throw when trying to remove non-string value', () => { - expect(() => ariaDescriber.removeDescription(component.element1, null!)).not.toThrow(); //tslint:disable-line - }); - - it('should de-dupe a message registered multiple times', () => { - ariaDescriber.describe(component.element1, 'My Message'); - ariaDescriber.describe(component.element2, 'My Message'); - ariaDescriber.describe(component.element3, 'My Message'); - expectMessages(['My Message']); - expectMessage(component.element1, 'My Message'); - expectMessage(component.element2, 'My Message'); - expectMessage(component.element3, 'My Message'); - }); - - it('should be able to register multiple messages', () => { - ariaDescriber.describe(component.element1, 'First Message'); - ariaDescriber.describe(component.element2, 'Second Message'); - expectMessages(['First Message', 'Second Message']); - expectMessage(component.element1, 'First Message'); - expectMessage(component.element2, 'Second Message'); - }); - - it('should be able to unregister messages', () => { - ariaDescriber.describe(component.element1, 'My Message'); - expectMessages(['My Message']); - - // Register again to check dedupe - ariaDescriber.describe(component.element2, 'My Message'); - expectMessages(['My Message']); - - // Unregister one message and make sure the message is still present in the container - ariaDescriber.removeDescription(component.element1, 'My Message'); - expect(component.element1.hasAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE)).toBeFalsy(); - expectMessages(['My Message']); - - // Unregister the second message, message container should be gone - ariaDescriber.removeDescription(component.element2, 'My Message'); - expect(component.element2.hasAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE)).toBeFalsy(); - expect(getMessagesContainer()).toBeNull(); - }); - - it('should be able to unregister messages while having others registered', () => { - ariaDescriber.describe(component.element1, 'Persistent Message'); - ariaDescriber.describe(component.element2, 'My Message'); - expectMessages(['Persistent Message', 'My Message']); - - // Register again to check dedupe - ariaDescriber.describe(component.element3, 'My Message'); - expectMessages(['Persistent Message', 'My Message']); - - // Unregister one message and make sure the message is still present in the container - ariaDescriber.removeDescription(component.element2, 'My Message'); - expectMessages(['Persistent Message', 'My Message']); - - // Unregister the second message, message container should be gone - ariaDescriber.removeDescription(component.element3, 'My Message'); - expectMessages(['Persistent Message']); - }); - - it('should be able to append to an existing list of aria describedby', () => { - ariaDescriber.describe(component.element4, 'My Message'); - expectMessages(['My Message']); - expectMessage(component.element4, 'My Message'); - }); - - it('should be able to handle multiple regisitrations of the same message to an element', () => { - ariaDescriber.describe(component.element1, 'My Message'); - ariaDescriber.describe(component.element1, 'My Message'); - expectMessages(['My Message']); - expectMessage(component.element1, 'My Message'); - }); - - it('should not throw when attempting to describe a non-element node', () => { - const node: any = document.createComment('Not an element node'); - expect(() => ariaDescriber.describe(node, 'This looks like an element')).not.toThrow(); - }); + let ariaDescriber: AriaDescriber; + let component: TestApp; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [A11yModule], + declarations: [TestApp], + providers: [AriaDescriber] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TestApp); + component = fixture.componentInstance; + ariaDescriber = component.ariaDescriber; + fixture.detectChanges(); + }); + + afterEach(() => { + ariaDescriber.ngOnDestroy(); + }); + + it('should initialize without the message container', () => { + expect(getMessagesContainer()).toBeNull(); + }); + + it('should be able to create a message element', () => { + ariaDescriber.describe(component.element1, 'My Message'); + expectMessages(['My Message']); + }); + + it('should not register empty strings', () => { + ariaDescriber.describe(component.element1, ''); + expect(getMessageElements()).toBe(null); + }); + + it('should not register non-string values', () => { + expect(() => ariaDescriber.describe(component.element1, null!)).not.toThrow(); + expect(getMessageElements()).toBe(null); + }); + + it('should not throw when trying to remove non-string value', () => { + expect(() => ariaDescriber.removeDescription(component.element1, null!)).not.toThrow(); + }); + + it('should de-dupe a message registered multiple times', () => { + ariaDescriber.describe(component.element1, 'My Message'); + ariaDescriber.describe(component.element2, 'My Message'); + ariaDescriber.describe(component.element3, 'My Message'); + expectMessages(['My Message']); + expectMessage(component.element1, 'My Message'); + expectMessage(component.element2, 'My Message'); + expectMessage(component.element3, 'My Message'); + }); + + it('should be able to register multiple messages', () => { + ariaDescriber.describe(component.element1, 'First Message'); + ariaDescriber.describe(component.element2, 'Second Message'); + expectMessages(['First Message', 'Second Message']); + expectMessage(component.element1, 'First Message'); + expectMessage(component.element2, 'Second Message'); + }); + + it('should be able to unregister messages', () => { + ariaDescriber.describe(component.element1, 'My Message'); + expectMessages(['My Message']); + + // Register again to check dedupe + ariaDescriber.describe(component.element2, 'My Message'); + expectMessages(['My Message']); + + // Unregister one message and make sure the message is still present in the container + ariaDescriber.removeDescription(component.element1, 'My Message'); + expect(component.element1.hasAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE)).toBeFalsy(); + expectMessages(['My Message']); + + // Unregister the second message, message container should be gone + ariaDescriber.removeDescription(component.element2, 'My Message'); + expect(component.element2.hasAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE)).toBeFalsy(); + expect(getMessagesContainer()).toBeNull(); + }); + + it('should be able to unregister messages while having others registered', () => { + ariaDescriber.describe(component.element1, 'Persistent Message'); + ariaDescriber.describe(component.element2, 'My Message'); + expectMessages(['Persistent Message', 'My Message']); + + // Register again to check dedupe + ariaDescriber.describe(component.element3, 'My Message'); + expectMessages(['Persistent Message', 'My Message']); + + // Unregister one message and make sure the message is still present in the container + ariaDescriber.removeDescription(component.element2, 'My Message'); + expectMessages(['Persistent Message', 'My Message']); + + // Unregister the second message, message container should be gone + ariaDescriber.removeDescription(component.element3, 'My Message'); + expectMessages(['Persistent Message']); + }); + + it('should be able to append to an existing list of aria describedby', () => { + ariaDescriber.describe(component.element4, 'My Message'); + expectMessages(['My Message']); + expectMessage(component.element4, 'My Message'); + }); + + it('should be able to handle multiple regisitrations of the same message to an element', () => { + ariaDescriber.describe(component.element1, 'My Message'); + ariaDescriber.describe(component.element1, 'My Message'); + expectMessages(['My Message']); + expectMessage(component.element1, 'My Message'); + }); + + it('should not throw when attempting to describe a non-element node', () => { + const node: any = document.createComment('Not an element node'); + expect(() => ariaDescriber.describe(node, 'This looks like an element')).not.toThrow(); + }); + + it('should clear any pre-existing containers', () => { + const extraContainer = document.createElement('div'); + extraContainer.id = MESSAGES_CONTAINER_ID; + document.body.appendChild(extraContainer); + + ariaDescriber.describe(component.element1, 'Hello'); + + // Use `querySelectorAll` with an attribute since `getElementById` will stop at the first match. + expect(document.querySelectorAll(`[id='${MESSAGES_CONTAINER_ID}']`).length).toBe(1); + }); + + it('should not describe messages that match up with the aria-label of the element', () => { + component.element1.setAttribute('aria-label', 'Hello'); + ariaDescriber.describe(component.element1, 'Hello'); + ariaDescriber.describe(component.element1, 'Hi'); + expectMessages(['Hi']); + }); }); function getMessagesContainer() { - return document.querySelector(`#${MESSAGES_CONTAINER_ID}`); + return document.querySelector(`#${MESSAGES_CONTAINER_ID}`); } function getMessageElements(): Node[] | null { - const messagesContainer = getMessagesContainer(); - if (!messagesContainer) { return null; } //tslint:disable-line + const messagesContainer = getMessagesContainer(); + + if (!messagesContainer) { + return null; + } - return messagesContainer ? Array.prototype.slice.call(messagesContainer.children) : null; + return messagesContainer ? Array.prototype.slice.call(messagesContainer.children) : null; } /** Checks that the messages array matches the existing created message elements. */ function expectMessages(messages: string[]) { - const messageElements = getMessageElements(); - expect(messageElements).toBeDefined(); + const messageElements = getMessageElements(); + expect(messageElements).toBeDefined(); - expect(messages.length).toBe(messageElements!.length); //tslint:disable-line - messages.forEach((message, i) => { - expect(messageElements![i].textContent).toBe(message); //tslint:disable-line - }); + expect(messages.length).toBe(messageElements!.length); + messages.forEach((message, i) => { + expect(messageElements![i].textContent).toBe(message); + }); } /** Checks that an element points to a message element that contains the message. */ function expectMessage(el: Element, message: string) { - const ariaDescribedBy = el.getAttribute('aria-describedby'); - expect(ariaDescribedBy).toBeDefined(); + const ariaDescribedBy = el.getAttribute('aria-describedby'); + expect(ariaDescribedBy).toBeDefined(); - const cdkDescribedBy = el.getAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); - expect(cdkDescribedBy).toBeDefined(); + const cdkDescribedBy = el.getAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); + expect(cdkDescribedBy).toBeDefined(); - const messages = ariaDescribedBy!.split(' ').map((referenceId) => { //tslint:disable-line - const messageElement = document.querySelector(`#${referenceId}`); + const messages = ariaDescribedBy!.split(' ').map((referenceId) => { + const messageElement = document.querySelector(`#${referenceId}`); - return messageElement ? messageElement.textContent : ''; - }); + return messageElement ? messageElement.textContent : ''; + }); - expect(messages).toContain(message); + expect(messages).toContain(message); } @Component({ - template: ` -
-
-
-
- ` + template: ` +
+
+
+
+ `, }) class TestApp { - @ViewChild('element1') _element1: ElementRef; - get element1(): Element { return this._element1.nativeElement; } + @ViewChild('element1', {static: false}) _element1: ElementRef; + get element1(): Element { + return this._element1.nativeElement; + } - @ViewChild('element2') _element2: ElementRef; - get element2(): Element { return this._element2.nativeElement; } + @ViewChild('element2', {static: false}) _element2: ElementRef; + get element2(): Element { + return this._element2.nativeElement; + } - @ViewChild('element3') _element3: ElementRef; - get element3(): Element { return this._element3.nativeElement; } + @ViewChild('element3', {static: false}) _element3: ElementRef; + get element3(): Element { + return this._element3.nativeElement; + } - @ViewChild('element4') _element4: ElementRef; - get element4(): Element { return this._element4.nativeElement; } + @ViewChild('element4', {static: false}) _element4: ElementRef; + get element4(): Element { + return this._element4.nativeElement; + } - constructor(public ariaDescriber: AriaDescriber) { } + constructor(public ariaDescriber: AriaDescriber) { + } } diff --git a/packages/cdk/a11y/aria-describer/aria-describer.ts b/packages/cdk/a11y/aria-describer/aria-describer.ts index 51e2be9dd..941ad5c89 100644 --- a/packages/cdk/a11y/aria-describer/aria-describer.ts +++ b/packages/cdk/a11y/aria-describer/aria-describer.ts @@ -1,26 +1,23 @@ -import {DOCUMENT} from '@angular/common'; +import { DOCUMENT } from '@angular/common'; import { - Inject, - Injectable, - InjectionToken, - OnDestroy, - Optional, - SkipSelf + Inject, + Injectable, + OnDestroy } from '@angular/core'; -import {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference'; +import { addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId } from './aria-reference'; /** * Interface used to register message elements and keep a count of how many registrations have * the same message and the reference to the message element used for the `aria-describedby`. */ -export interface IRegisteredMessage { - /** The element containing the message. */ - messageElement: Element; +export interface RegisteredMessage { + /** The element containing the message. */ + messageElement: Element; - /** The number of elements that reference this message element via `aria-describedby`. */ - referenceCount: number; + /** The number of elements that reference this message element via `aria-describedby`. */ + referenceCount: number; } /** ID used for the body container where all messages are appended. */ @@ -36,7 +33,7 @@ export const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host'; let nextId = 0; /** Global map of all registered message elements that have been placed into the document. */ -const messageRegistry = new Map(); +const messageRegistry = new Map(); /** Container for all registered messages. */ let messagesContainer: HTMLElement | null = null; @@ -49,175 +46,182 @@ let messagesContainer: HTMLElement | null = null; */ @Injectable({providedIn: 'root'}) export class AriaDescriber implements OnDestroy { - private _document: Document; - - constructor(@Inject(DOCUMENT) _document: any) { - this._document = _document; - } - - /** - * Adds to the host element an aria-describedby reference to a hidden element that contains - * the message. If the same message has already been registered, then it will reuse the created - * message element. - */ - describe(hostElement: Element, message: string) { - if (!this._canBeDescribed(hostElement, message)) { - return; + private _document: Document; + + constructor(@Inject(DOCUMENT) _document: any) { + this._document = _document; } - if (!messageRegistry.has(message)) { - this._createMessageElement(message); + /** + * Adds to the host element an aria-describedby reference to a hidden element that contains + * the message. If the same message has already been registered, then it will reuse the created + * message element. + */ + describe(hostElement: Element, message: string) { + if (!this._canBeDescribed(hostElement, message)) { + return; + } + + if (!messageRegistry.has(message)) { + this._createMessageElement(message); + } + + if (!this._isElementDescribedByMessage(hostElement, message)) { + this._addMessageReference(hostElement, message); + } } - if (!this._isElementDescribedByMessage(hostElement, message)) { - this._addMessageReference(hostElement, message); + /** Removes the host element's aria-describedby reference to the message element. */ + removeDescription(hostElement: Element, message: string) { + if (!this._isElementNode(hostElement)) { + return; + } + + if (this._isElementDescribedByMessage(hostElement, message)) { + this._removeMessageReference(hostElement, message); + } + + const registeredMessage = messageRegistry.get(message); + if (registeredMessage && registeredMessage.referenceCount === 0) { + this._deleteMessageElement(message); + } + + if (messagesContainer && messagesContainer.childNodes.length === 0) { + this._deleteMessagesContainer(); + } } - } - /** Removes the host element's aria-describedby reference to the message element. */ - removeDescription(hostElement: Element, message: string) { - if (!this._canBeDescribed(hostElement, message)) { - return; + /** Unregisters all created message elements and removes the message container. */ + ngOnDestroy() { + const describedElements = + this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}]`); + + for (let i = 0; i < describedElements.length; i++) { + this._removeCdkDescribedByReferenceIds(describedElements[i]); + describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); + } + + if (messagesContainer) { + this._deleteMessagesContainer(); + } + + messageRegistry.clear(); } - if (this._isElementDescribedByMessage(hostElement, message)) { - this._removeMessageReference(hostElement, message); + /** + * Creates a new element in the visually hidden message container element with the message + * as its content and adds it to the message registry. + */ + private _createMessageElement(message: string) { + const messageElement = this._document.createElement('div'); + messageElement.setAttribute('id', `${CDK_DESCRIBEDBY_ID_PREFIX}-${nextId++}`); + messageElement.appendChild(this._document.createTextNode(message)!); + + this._createMessagesContainer(); + messagesContainer!.appendChild(messageElement); + + messageRegistry.set(message, {messageElement, referenceCount: 0}); } - const registeredMessage = messageRegistry.get(message); - if (registeredMessage && registeredMessage.referenceCount === 0) { - this._deleteMessageElement(message); + /** Deletes the message element from the global messages container. */ + private _deleteMessageElement(message: string) { + const registeredMessage = messageRegistry.get(message); + const messageElement = registeredMessage && registeredMessage.messageElement; + if (messagesContainer && messageElement) { + messagesContainer.removeChild(messageElement); + } + messageRegistry.delete(message); } - if (messagesContainer && messagesContainer.childNodes.length === 0) { - this._deleteMessagesContainer(); + /** Creates the global container for all aria-describedby messages. */ + private _createMessagesContainer() { + if (!messagesContainer) { + const preExistingContainer = this._document.getElementById(MESSAGES_CONTAINER_ID); + + // When going from the server to the client, we may end up in a situation where there's + // already a container on the page, but we don't have a reference to it. Clear the + // old container so we don't get duplicates. Doing this, instead of emptying the previous + // container, should be slightly faster. + if (preExistingContainer) { + preExistingContainer.parentNode!.removeChild(preExistingContainer); + } + + messagesContainer = this._document.createElement('div'); + messagesContainer.id = MESSAGES_CONTAINER_ID; + messagesContainer.setAttribute('aria-hidden', 'true'); + messagesContainer.style.display = 'none'; + this._document.body.appendChild(messagesContainer); + } } - } - /** Unregisters all created message elements and removes the message container. */ - ngOnDestroy() { - const describedElements = - this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}]`); + /** Deletes the global messages container. */ + private _deleteMessagesContainer() { + if (messagesContainer && messagesContainer.parentNode) { + messagesContainer.parentNode.removeChild(messagesContainer); + messagesContainer = null; + } + } - for (let i = 0; i < describedElements.length; i++) { //tslint:disable-line - this._removeCdkDescribedByReferenceIds(describedElements[i]); - describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); + /** Removes all cdk-describedby messages that are hosted through the element. */ + private _removeCdkDescribedByReferenceIds(element: Element) { + // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX + const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby') + .filter((id) => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0); + element.setAttribute('aria-describedby', originalReferenceIds.join(' ')); } - if (messagesContainer) { - this._deleteMessagesContainer(); + /** + * Adds a message reference to the element using aria-describedby and increments the registered + * message's reference count. + */ + private _addMessageReference(element: Element, message: string) { + const registeredMessage = messageRegistry.get(message)!; + + // Add the aria-describedby reference and set the + // describedby_host attribute to mark the element. + addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); + element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, ''); + + registeredMessage.referenceCount++; } - messageRegistry.clear(); - } - - /** - * Creates a new element in the visually hidden message container element with the message - * as its content and adds it to the message registry. - */ - private _createMessageElement(message: string) { - const messageElement = this._document.createElement('div'); - messageElement.setAttribute('id', `${CDK_DESCRIBEDBY_ID_PREFIX}-${nextId++}`); - messageElement.appendChild(this._document.createTextNode(message)!); //tslint:disable-line - - if (!messagesContainer) { this._createMessagesContainer(); } - messagesContainer!.appendChild(messageElement); //tslint:disable-line - - messageRegistry.set(message, {messageElement, referenceCount: 0}); - } - - /** Deletes the message element from the global messages container. */ - private _deleteMessageElement(message: string) { - const registeredMessage = messageRegistry.get(message); - const messageElement = registeredMessage && registeredMessage.messageElement; - if (messagesContainer && messageElement) { - messagesContainer.removeChild(messageElement); + /** + * Removes a message reference from the element using aria-describedby + * and decrements the registered message's reference count. + */ + private _removeMessageReference(element: Element, message: string) { + const registeredMessage = messageRegistry.get(message)!; + registeredMessage.referenceCount--; + + removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); + element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); } - messageRegistry.delete(message); - } - - /** Creates the global container for all aria-describedby messages. */ - private _createMessagesContainer() { - messagesContainer = this._document.createElement('div'); - messagesContainer.setAttribute('id', MESSAGES_CONTAINER_ID); - messagesContainer.setAttribute('aria-hidden', 'true'); - messagesContainer.style.display = 'none'; - this._document.body.appendChild(messagesContainer); - } - - /** Deletes the global messages container. */ - private _deleteMessagesContainer() { - if (messagesContainer && messagesContainer.parentNode) { - messagesContainer.parentNode.removeChild(messagesContainer); - messagesContainer = null; + + /** Returns true if the element has been described by the provided message ID. */ + private _isElementDescribedByMessage(element: Element, message: string): boolean { + const referenceIds = getAriaReferenceIds(element, 'aria-describedby'); + const registeredMessage = messageRegistry.get(message); + const messageId = registeredMessage && registeredMessage.messageElement.id; + + return !!messageId && referenceIds.indexOf(messageId) != -1; } - } - - /** Removes all cdk-describedby messages that are hosted through the element. */ - private _removeCdkDescribedByReferenceIds(element: Element) { - // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX - const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby') - .filter((id) => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) !== 0); - element.setAttribute('aria-describedby', originalReferenceIds.join(' ')); - } - - /** - * Adds a message reference to the element using aria-describedby and increments the registered - * message's reference count. - */ - private _addMessageReference(element: Element, message: string) { - const registeredMessage = messageRegistry.get(message)!; //tslint:disable-line - - // Add the aria-describedby reference and set the - // describedby_host attribute to mark the element. - addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); - element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, ''); - - registeredMessage.referenceCount++; - } - - /** - * Removes a message reference from the element using aria-describedby - * and decrements the registered message's reference count. - */ - private _removeMessageReference(element: Element, message: string) { - const registeredMessage = messageRegistry.get(message)!; //tslint:disable-line - registeredMessage.referenceCount--; - - removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); - element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); - } - - /** Returns true if the element has been described by the provided message ID. */ - private _isElementDescribedByMessage(element: Element, message: string): boolean { - const referenceIds = getAriaReferenceIds(element, 'aria-describedby'); - const registeredMessage = messageRegistry.get(message); - const messageId = registeredMessage && registeredMessage.messageElement.id; - - return !!messageId && referenceIds.indexOf(messageId) !== -1; - } - - /** Determines whether a message can be described on a particular element. */ - private _canBeDescribed(element: Element, message: string): boolean { - return element.nodeType === this._document.ELEMENT_NODE && message != null && - !!`${message}`.trim(); - } -} + /** Determines whether a message can be described on a particular element. */ + private _canBeDescribed(element: Element, message: string): boolean { + if (!this._isElementNode(element)) { + return false; + } + const trimmedMessage = message == null ? '' : `${message}`.trim(); + const ariaLabel = element.getAttribute('aria-label'); -/** @docs-private @deprecated @deletion-target 7.0.0 */ -export function ARIA_DESCRIBER_PROVIDER_FACTORY(parentDispatcher: AriaDescriber, _document: any) { - return parentDispatcher || new AriaDescriber(_document); -} + // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the element, + // because screen readers will end up reading out the same text twice in a row. + return trimmedMessage ? (!ariaLabel || ariaLabel.trim() !== trimmedMessage) : false; + } -/** @docs-private @deprecated @deletion-target 7.0.0 */ -export const ARIA_DESCRIBER_PROVIDER = { - // If there is already an AriaDescriber available, use that. Otherwise, provide a new one. - provide: AriaDescriber, - deps: [ - [new Optional(), new SkipSelf(), AriaDescriber], - DOCUMENT as InjectionToken - ], - useFactory: ARIA_DESCRIBER_PROVIDER_FACTORY -}; + /** Checks whether a node is an Element node. */ + private _isElementNode(element: Node): element is Element { + return element.nodeType === this._document.ELEMENT_NODE; + } +} diff --git a/packages/cdk/accordion/accordion.spec.ts b/packages/cdk/accordion/accordion.spec.ts index 649df29df..c8fb98404 100644 --- a/packages/cdk/accordion/accordion.spec.ts +++ b/packages/cdk/accordion/accordion.spec.ts @@ -83,6 +83,6 @@ class SetOfItems { ` }) class NestedItems { - @ViewChild('outerItem') outerItem: CdkAccordionItem; - @ViewChild('innerItem') innerItem: CdkAccordionItem; + @ViewChild('outerItem', {static: true}) outerItem: CdkAccordionItem; + @ViewChild('innerItem', {static: true}) innerItem: CdkAccordionItem; } diff --git a/packages/cdk/bidi/directionality.spec.ts b/packages/cdk/bidi/directionality.spec.ts index 5dac38594..7888fc8cf 100644 --- a/packages/cdk/bidi/directionality.spec.ts +++ b/packages/cdk/bidi/directionality.spec.ts @@ -137,7 +137,7 @@ describe('Directionality', () => { ` }) class ElementWithDir { - @ViewChild(Dir) dir: Dir; + @ViewChild(Dir, {static: false}) dir: Dir; direction = 'rtl'; changeCount = 0; } diff --git a/packages/cdk/overlay/overlay-container.spec.ts b/packages/cdk/overlay/overlay-container.spec.ts index 1bbd0c26c..a8d31cbc2 100644 --- a/packages/cdk/overlay/overlay-container.spec.ts +++ b/packages/cdk/overlay/overlay-container.spec.ts @@ -63,7 +63,7 @@ describe('OverlayContainer', () => { providers: [Overlay] }) class TestComponentWithTemplatePortals { - @ViewChild(CdkPortal) templatePortal: CdkPortal; + @ViewChild(CdkPortal, {static: true}) templatePortal: CdkPortal; constructor(public viewContainerRef: ViewContainerRef) { } diff --git a/packages/cdk/overlay/overlay-directives.spec.ts b/packages/cdk/overlay/overlay-directives.spec.ts index 71eea8b6a..ff6ef52e5 100644 --- a/packages/cdk/overlay/overlay-directives.spec.ts +++ b/packages/cdk/overlay/overlay-directives.spec.ts @@ -394,9 +394,9 @@ describe('Overlay directives', () => { ` }) class ConnectedOverlayDirectiveTest { - @ViewChild(CdkConnectedOverlay) connectedOverlayDirective: CdkConnectedOverlay; - @ViewChild('trigger') trigger: CdkOverlayOrigin; - @ViewChild('otherTrigger') otherTrigger: CdkOverlayOrigin; + @ViewChild(CdkConnectedOverlay, {static: false}) connectedOverlayDirective: CdkConnectedOverlay; + @ViewChild('trigger', {static: false}) trigger: CdkOverlayOrigin; + @ViewChild('otherTrigger', {static: false}) otherTrigger: CdkOverlayOrigin; isOpen = false; width: number | string; @@ -428,6 +428,6 @@ class ConnectedOverlayDirectiveTest { Menu content` }) class ConnectedOverlayPropertyInitOrder { - @ViewChild(CdkConnectedOverlay) connectedOverlayDirective: CdkConnectedOverlay; - @ViewChild('trigger') trigger: CdkOverlayOrigin; + @ViewChild(CdkConnectedOverlay, {static: false}) connectedOverlayDirective: CdkConnectedOverlay; + @ViewChild('trigger', {static: false}) trigger: CdkOverlayOrigin; } diff --git a/packages/cdk/overlay/overlay.spec.ts b/packages/cdk/overlay/overlay.spec.ts index 27e24b308..b3e096b50 100644 --- a/packages/cdk/overlay/overlay.spec.ts +++ b/packages/cdk/overlay/overlay.spec.ts @@ -637,7 +637,7 @@ class PizzaMsg { Cake` }) class TestComponentWithTemplatePortals { - @ViewChild(CdkPortal) templatePortal: CdkPortal; + @ViewChild(CdkPortal, {static: false}) templatePortal: CdkPortal; constructor(public viewContainerRef: ViewContainerRef) { } diff --git a/packages/cdk/portal/portal.spec.ts b/packages/cdk/portal/portal.spec.ts index e5cf84fa4..80b6bee8f 100644 --- a/packages/cdk/portal/portal.spec.ts +++ b/packages/cdk/portal/portal.spec.ts @@ -548,8 +548,8 @@ class ArbitraryViewContainerRefComponent { }) class PortalTestApp { @ViewChildren(CdkPortal) portals: QueryList; - @ViewChild(CdkPortalOutlet) portalOutlet: CdkPortalOutlet; - @ViewChild('templateRef', { read: TemplateRef }) templateRef: TemplateRef; + @ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet; + @ViewChild('templateRef', { read: TemplateRef, static: true }) templateRef: TemplateRef; selectedPortal: Portal | undefined; fruit: string = 'Banana'; @@ -586,7 +586,7 @@ class PortalTestApp { ` }) class UnboundPortalTestApp { - @ViewChild(CdkPortalOutlet) portalOutlet: CdkPortalOutlet; + @ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet; } // Create a real (non-test) NgModule as a workaround for diff --git a/packages/cdk/schematics/utils/ast.ts b/packages/cdk/schematics/utils/ast.ts index 733fe2476..5a43903ce 100644 --- a/packages/cdk/schematics/utils/ast.ts +++ b/packages/cdk/schematics/utils/ast.ts @@ -1,38 +1,32 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ +import { WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; +import { SchematicsException, Tree } from '@angular-devkit/schematics'; +import { Schema as ComponentOptions } from '@schematics/angular/component/schema'; +import { addImportToModule } from '@schematics/angular/utility/ast-utils'; +import { InsertChange } from '@schematics/angular/utility/change'; +import { getWorkspace } from '@schematics/angular/utility/config'; +import { findModuleFromOptions as internalFindModule } from '@schematics/angular/utility/find-module'; +import { getAppModulePath } from '@schematics/angular/utility/ng-ast-utils'; -import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; -import {SchematicsException, Tree} from '@angular-devkit/schematics'; -import {Schema as ComponentOptions} from '@schematics/angular/component/schema'; -import {addImportToModule} from '@schematics/angular/utility/ast-utils'; -import {InsertChange} from '@schematics/angular/utility/change'; -import {getWorkspace} from '@schematics/angular/utility/config'; -import {findModuleFromOptions as internalFindModule} from '@schematics/angular/utility/find-module'; -import {getAppModulePath} from '@schematics/angular/utility/ng-ast-utils'; -import {getProjectMainFile} from './project-main-file'; -import {ts} from './version-agnostic-typescript'; +import { getProjectMainFile } from './project-main-file'; +import { ts, typescript } from './version-agnostic-typescript'; /** Reads file given path and returns TypeScript source file. */ -export function getSourceFile(host: Tree, path: string) { - const buffer = host.read(path); - if (!buffer) { - throw new SchematicsException(`Could not find file for path: ${path}`); - } - const content = buffer.toString(); - return ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true); +export function getSourceFile(host: Tree, path: string): typescript.SourceFile { + const buffer = host.read(path); + + if (!buffer) { + throw new SchematicsException(`Could not find file for path: ${path}`); + } + + return ts.createSourceFile(path, buffer.toString(), ts.ScriptTarget.Latest, true); } /** Import and add module to root app module. */ export function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: WorkspaceProject) { - const modulePath = getAppModulePath(host, getProjectMainFile(project)); - addModuleImportToModule(host, modulePath, moduleName, src); + const modulePath = getAppModulePath(host, getProjectMainFile(project)); + addModuleImportToModule(host, modulePath, moduleName, src); } /** @@ -45,37 +39,39 @@ export function addModuleImportToRootModule(host: Tree, moduleName: string, src: export function addModuleImportToModule(host: Tree, modulePath: string, moduleName: string, src: string) { - const moduleSource = getSourceFile(host, modulePath); + const moduleSource = getSourceFile(host, modulePath); - if (!moduleSource) { - throw new SchematicsException(`Module not found: ${modulePath}`); - } + if (!moduleSource) { + throw new SchematicsException(`Module not found: ${modulePath}`); + } - const changes = addImportToModule(moduleSource, modulePath, moduleName, src); - const recorder = host.beginUpdate(modulePath); + // TODO: TypeScript version mismatch due to @schematics/angular using a different version + // than Material. Cast to any to avoid the type assignment failure. + const changes = addImportToModule(moduleSource as any, modulePath, moduleName, src); + const recorder = host.beginUpdate(modulePath); - changes.forEach((change) => { - if (change instanceof InsertChange) { - recorder.insertLeft(change.pos, change.toAdd); - } - }); + changes.forEach((change) => { + if (change instanceof InsertChange) { + recorder.insertLeft(change.pos, change.toAdd); + } + }); - host.commitUpdate(recorder); + host.commitUpdate(recorder); } /** Wraps the internal find module from options with undefined path handling */ export function findModuleFromOptions(host: Tree, options: ComponentOptions): string | undefined { - const workspace = getWorkspace(host); + const workspace = getWorkspace(host); - if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; - } + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } - const project = workspace.projects[options.project]; + const project = workspace.projects[options.project]; - if (options.path === undefined) { - options.path = `/${project.root}/packages/app`; - } + if (options.path === undefined) { + options.path = `/${project.root}/src/app`; + } - return internalFindModule(host, options); + return internalFindModule(host, options); } diff --git a/packages/cdk/schematics/utils/ast/ng-module-imports.ts b/packages/cdk/schematics/utils/ast/ng-module-imports.ts index 761303436..0f1a5bccf 100644 --- a/packages/cdk/schematics/utils/ast/ng-module-imports.ts +++ b/packages/cdk/schematics/utils/ast/ng-module-imports.ts @@ -1,56 +1,37 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {Tree} from '@angular-devkit/schematics'; +import { SchematicsException, Tree } from '@angular-devkit/schematics'; import * as ts from 'typescript'; + /** - * Whether the Angular module in the given path imports the specifed module class name. + * Whether the Angular module in the given path imports the specified module class name. */ export function hasNgModuleImport(tree: Tree, modulePath: string, className: string): boolean { - const moduleFileContent = tree.read(modulePath); - - if (!moduleFileContent) { - throw new Error(`Could not read Angular module file: ${modulePath}`); - } - - const parsedFile = ts.createSourceFile(modulePath, moduleFileContent.toString(), - ts.ScriptTarget.Latest, true); - let ngModuleMetadata: ts.ObjectLiteralExpression | null = null; + const moduleFileContent = tree.read(modulePath); - const findModuleDecorator = (node: ts.Node) => { - if (ts.isDecorator(node) && ts.isCallExpression(node.expression) && - isNgModuleCallExpression(node.expression)) { - ngModuleMetadata = node.expression.arguments[0] as ts.ObjectLiteralExpression; - return; + if (!moduleFileContent) { + throw new SchematicsException(`Could not read Angular module file: ${modulePath}`); } - ts.forEachChild(node, findModuleDecorator); - }; + const parsedFile = ts.createSourceFile(modulePath, moduleFileContent.toString(), + ts.ScriptTarget.Latest, true); + const ngModuleMetadata = findNgModuleMetadata(parsedFile); - ts.forEachChild(parsedFile, findModuleDecorator); - - if (!ngModuleMetadata) { - throw new Error(`Could not find NgModule declaration inside: "${modulePath}"`); - } - - for (let property of ngModuleMetadata!.properties) { - if (!ts.isPropertyAssignment(property) || property.name.getText() !== 'imports' || - !ts.isArrayLiteralExpression(property.initializer)) { - continue; + if (!ngModuleMetadata) { + throw new SchematicsException(`Could not find NgModule declaration inside: "${modulePath}"`); } - if (property.initializer.elements.some(element => element.getText() === className)) { - return true; + for (const property of ngModuleMetadata!.properties) { + if (!ts.isPropertyAssignment(property) || property.name.getText() !== 'imports' || + !ts.isArrayLiteralExpression(property.initializer)) { + continue; + } + + if (property.initializer.elements.some((element) => element.getText() === className)) { + return true; + } } - } - return false; + return false; } /** @@ -58,21 +39,46 @@ export function hasNgModuleImport(tree: Tree, modulePath: string, className: str * identifiers of nested property access expressions (e.g. myNamespace.core.NgModule). */ function resolveIdentifierOfExpression(expression: ts.Expression): ts.Identifier | null { - if (ts.isIdentifier(expression)) { - return expression; - } else if (ts.isPropertyAccessExpression(expression)) { - return resolveIdentifierOfExpression(expression.expression); - } - return null; + if (ts.isIdentifier(expression)) { + return expression; + } else if (ts.isPropertyAccessExpression(expression)) { + return expression.name; + } + + return null; +} + +/** + * Finds a NgModule declaration within the specified TypeScript node and returns the + * corresponding metadata for it. This function searches breadth first because + * NgModule's are usually not nested within other expressions or declarations. + */ +function findNgModuleMetadata(rootNode: ts.Node): ts.ObjectLiteralExpression | null { + // Add immediate child nodes of the root node to the queue. + const nodeQueue: ts.Node[] = [...rootNode.getChildren()]; + + while (nodeQueue.length) { + const node = nodeQueue.shift()!; + + if (ts.isDecorator(node) && ts.isCallExpression(node.expression) && + isNgModuleCallExpression(node.expression)) { + return node.expression.arguments[0] as ts.ObjectLiteralExpression; + } else { + nodeQueue.push(...node.getChildren()); + } + } + + return null; } /** Whether the specified call expression is referring to a NgModule definition. */ function isNgModuleCallExpression(callExpression: ts.CallExpression): boolean { - if (!callExpression.arguments.length || - !ts.isObjectLiteralExpression(callExpression.arguments[0])) { - return false; - } + if (!callExpression.arguments.length || + !ts.isObjectLiteralExpression(callExpression.arguments[0])) { + return false; + } + + const decoratorIdentifier = resolveIdentifierOfExpression(callExpression.expression); - const decoratorIdentifier = resolveIdentifierOfExpression(callExpression.expression); - return decoratorIdentifier ? decoratorIdentifier.text === 'NgModule' : false; + return decoratorIdentifier ? decoratorIdentifier.text === 'NgModule' : false; } diff --git a/packages/cdk/schematics/utils/build-component.ts b/packages/cdk/schematics/utils/build-component.ts index eb06c65cd..cfb3e810e 100644 --- a/packages/cdk/schematics/utils/build-component.ts +++ b/packages/cdk/schematics/utils/build-component.ts @@ -1,139 +1,146 @@ -/* tslint:disable */ - -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {strings, template as interpolateTemplate} from '@angular-devkit/core'; +import { strings, template as interpolateTemplate } from '@angular-devkit/core'; import { - apply, - branchAndMerge, - chain, - filter, - mergeWith, - move, - noop, - Rule, - SchematicsException, - template, - Tree, - url, + apply, + branchAndMerge, + chain, + filter, + mergeWith, + move, + noop, + Rule, + SchematicsException, + template, + Tree, + url } from '@angular-devkit/schematics'; -import {FileSystemSchematicContext} from '@angular-devkit/schematics/tools'; -import {Schema as ComponentOptions} from '@schematics/angular/component/schema'; +import { FileSystemSchematicContext } from '@angular-devkit/schematics/tools'; +import { Schema as ComponentOptions, Style } from '@schematics/angular/component/schema'; import { - addDeclarationToModule, - addEntryComponentToModule, - addExportToModule, + addDeclarationToModule, + addEntryComponentToModule, + addExportToModule } from '@schematics/angular/utility/ast-utils'; -import {InsertChange} from '@schematics/angular/utility/change'; -import {getWorkspace} from '@schematics/angular/utility/config'; -import {buildRelativePath, findModuleFromOptions} from '@schematics/angular/utility/find-module'; -import {parseName} from '@schematics/angular/utility/parse-name'; -import {buildDefaultPath} from '@schematics/angular/utility/project'; -import {validateHtmlSelector, validateName} from '@schematics/angular/utility/validation'; -import {readFileSync, statSync} from 'fs'; -import {dirname, join, resolve} from 'path'; -import {getProjectFromWorkspace} from './get-project'; -import {getDefaultComponentOptions} from './schematic-options'; -import {ts} from './version-agnostic-typescript'; +import { InsertChange } from '@schematics/angular/utility/change'; +import { getWorkspace } from '@schematics/angular/utility/config'; +import { buildRelativePath, findModuleFromOptions } from '@schematics/angular/utility/find-module'; +import { parseName } from '@schematics/angular/utility/parse-name'; +import { buildDefaultPath } from '@schematics/angular/utility/project'; +import { validateHtmlSelector, validateName } from '@schematics/angular/utility/validation'; +import { readFileSync, statSync } from 'fs'; +import { dirname, join, resolve } from 'path'; + +import { getProjectFromWorkspace } from './get-project'; +import { getDefaultComponentOptions } from './schematic-options'; +import { ts } from './version-agnostic-typescript'; + + +/** + * List of style extensions which are CSS compatible. All supported CLI style extensions can be + * found here: angular/angular-cli/master/packages/schematics/angular/ng-new/schema.json#L118-L122 + */ +const supportedCssExtensions = ['css', 'scss', 'less']; function readIntoSourceFile(host: Tree, modulePath: string) { - const text = host.read(modulePath); - if (text === null) { - throw new SchematicsException(`File ${modulePath} does not exist.`); - } + const text = host.read(modulePath); + + if (text === null) { + throw new SchematicsException(`File ${modulePath} does not exist.`); + } - return ts.createSourceFile(modulePath, text.toString('utf-8'), ts.ScriptTarget.Latest, true); + return ts.createSourceFile(modulePath, text.toString('utf-8'), ts.ScriptTarget.Latest, true); } function addDeclarationToNgModule(options: ComponentOptions): Rule { - return (host: Tree) => { - if (options.skipImport || !options.module) { - return host; - } - - const modulePath = options.module; - const source = readIntoSourceFile(host, modulePath); - - const componentPath = `/${options.path}/` - + (options.flat ? '' : strings.dasherize(options.name) + '/') - + strings.dasherize(options.name) - + '.component'; - const relativePath = buildRelativePath(modulePath, componentPath); - const classifiedName = strings.classify(`${options.name}Component`); - - const declarationChanges = addDeclarationToModule( - source, - modulePath, - classifiedName, - relativePath); - - const declarationRecorder = host.beginUpdate(modulePath); - for (const change of declarationChanges) { - if (change instanceof InsertChange) { - declarationRecorder.insertLeft(change.pos, change.toAdd); - } - } - host.commitUpdate(declarationRecorder); - - if (options.export) { - // Need to refresh the AST because we overwrote the file in the host. - const source = readIntoSourceFile(host, modulePath); - const exportRecorder = host.beginUpdate(modulePath); - - const exportChanges = addExportToModule( - source, - modulePath, - strings.classify(`${options.name}Component`), - relativePath); - - for (const change of exportChanges) { - if (change instanceof InsertChange) { - exportRecorder.insertLeft(change.pos, change.toAdd); + return (host: Tree) => { + if (options.skipImport || !options.module) { + return host; } - } - host.commitUpdate(exportRecorder); - } - if (options.entryComponent) { - // Need to refresh the AST because we overwrote the file in the host. - const source = readIntoSourceFile(host, modulePath); - const entryComponentRecorder = host.beginUpdate(modulePath); - - const entryComponentChanges = addEntryComponentToModule( - source, - modulePath, - strings.classify(`${options.name}Component`), - relativePath); + const modulePath = options.module; + let source = readIntoSourceFile(host, modulePath); + + const componentPath = `/${options.path}/` + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + + '.component'; + const relativePath = buildRelativePath(modulePath, componentPath); + const classifiedName = strings.classify(`${options.name}Component`); + + const declarationChanges = addDeclarationToModule( + // TODO: TypeScript version mismatch due to @schematics/angular using a different version + // than Material. Cast to any to avoid the type assignment failure. + source as any, + modulePath, + classifiedName, + relativePath); + + const declarationRecorder = host.beginUpdate(modulePath); + + for (const change of declarationChanges) { + if (change instanceof InsertChange) { + declarationRecorder.insertLeft(change.pos, change.toAdd); + } + } + host.commitUpdate(declarationRecorder); + + if (options.export) { + // Need to refresh the AST because we overwrote the file in the host. + source = readIntoSourceFile(host, modulePath); + + const exportRecorder = host.beginUpdate(modulePath); + const exportChanges = addExportToModule( + // TODO: TypeScript version mismatch due to @schematics/angular using a different version + // than Material. Cast to any to avoid the type assignment failure. + source as any, + modulePath, + strings.classify(`${options.name}Component`), + relativePath); + + for (const change of exportChanges) { + if (change instanceof InsertChange) { + exportRecorder.insertLeft(change.pos, change.toAdd); + } + } + host.commitUpdate(exportRecorder); + } - for (const change of entryComponentChanges) { - if (change instanceof InsertChange) { - entryComponentRecorder.insertLeft(change.pos, change.toAdd); + if (options.entryComponent) { + // Need to refresh the AST because we overwrote the file in the host. + source = readIntoSourceFile(host, modulePath); + + const entryComponentRecorder = host.beginUpdate(modulePath); + const entryComponentChanges = addEntryComponentToModule( + // TODO: TypeScript version mismatch due to @schematics/angular using a different version + // than Material. Cast to any to avoid the type assignment failure. + source as any, + modulePath, + strings.classify(`${options.name}Component`), + relativePath); + + for (const change of entryComponentChanges) { + if (change instanceof InsertChange) { + entryComponentRecorder.insertLeft(change.pos, change.toAdd); + } + } + host.commitUpdate(entryComponentRecorder); } - } - host.commitUpdate(entryComponentRecorder); - } - return host; - }; + return host; + }; } function buildSelector(options: ComponentOptions, projectPrefix: string) { - let selector = strings.dasherize(options.name); - if (options.prefix) { - selector = `${options.prefix}-${selector}`; - } else if (options.prefix === undefined && projectPrefix) { - selector = `${projectPrefix}-${selector}`; - } - - return selector; + let selector = strings.dasherize(options.name); + + if (options.prefix) { + selector = `${options.prefix}-${selector}`; + } else if (options.prefix === undefined && projectPrefix) { + selector = `${projectPrefix}-${selector}`; + } + + return selector; } /** @@ -142,9 +149,9 @@ function buildSelector(options: ComponentOptions, projectPrefix: string) { * include the additional files. */ function indentTextContent(text: string, numSpaces: number): string { - // In the project there should be only LF line-endings, but the schematic files - // are not being linted and therefore there can be also CRLF or just CR line-endings. - return text.replace(/(\r\n|\r|\n)/g, `$1${' '.repeat(numSpaces)}`); + // In the Material project there should be only LF line-endings, but the schematic files + // are not being linted and therefore there can be also CRLF or just CR line-endings. + return text.replace(/(\r\n|\r|\n)/g, `$1${' '.repeat(numSpaces)}`); } /** @@ -158,82 +165,92 @@ function indentTextContent(text: string, numSpaces: number): string { export function buildComponent(options: ComponentOptions, additionalFiles: {[key: string]: string} = {}): Rule { - return (host: Tree, context: FileSystemSchematicContext) => { - const workspace = getWorkspace(host); - const project = getProjectFromWorkspace(workspace, options.project); - const defaultComponentOptions = getDefaultComponentOptions(project); - - // TODO(devversion): Remove if we drop support for older CLI versions. - // This handles an unreported breaking change from the @angular-devkit/schematics. Previously - // the description path resolved to the factory file, but starting from 6.2.0, it resolves - // to the factory directory. - const schematicPath = statSync(context.schematic.description.path).isDirectory() ? - context.schematic.description.path : - dirname(context.schematic.description.path); - - const schematicFilesUrl = './files'; - const schematicFilesPath = resolve(schematicPath, schematicFilesUrl); - - // Add the default component option values to the options if an option is not explicitly - // specified but a default component option is available. - Object.keys(options) - .filter(optionName => options[optionName] == null && defaultComponentOptions[optionName]) - .forEach(optionName => options[optionName] = defaultComponentOptions[optionName]); - - if (options.path === undefined) { - // TODO(jelbourn): figure out if the need for this `as any` is a bug due to two different - // incompatible `WorkspaceProject` classes in @angular-devkit - options.path = buildDefaultPath(project as any); - } + return (host: Tree, context: FileSystemSchematicContext) => { + const workspace = getWorkspace(host); + const project = getProjectFromWorkspace(workspace, options.project); + const defaultComponentOptions = getDefaultComponentOptions(project); + + // TODO(devversion): Remove if we drop support for older CLI versions. + // This handles an unreported breaking change from the @angular-devkit/schematics. Previously + // the description path resolved to the factory file, but starting from 6.2.0, it resolves + // to the factory directory. + const schematicPath = statSync(context.schematic.description.path).isDirectory() ? + context.schematic.description.path : + dirname(context.schematic.description.path); + + const schematicFilesUrl = './files'; + const schematicFilesPath = resolve(schematicPath, schematicFilesUrl); + + // Add the default component option values to the options if an option is not explicitly + // specified but a default component option is available. + Object.keys(options) + .filter((optionName) => options[optionName] == null && defaultComponentOptions[optionName]) + .forEach((optionName) => options[optionName] = defaultComponentOptions[optionName]); + + if (options.path === undefined) { + // TODO(jelbourn): figure out if the need for this `as any` is a bug due to two different + // incompatible `WorkspaceProject` classes in @angular-devkit + options.path = buildDefaultPath(project as any); + } - options.module = findModuleFromOptions(host, options); + options.module = findModuleFromOptions(host, options); - const parsedPath = parseName(options.path!, options.name); + const parsedPath = parseName(options.path!, options.name); - options.name = parsedPath.name; - options.path = parsedPath.path; - options.selector = options.selector || buildSelector(options, project.prefix); + options.name = parsedPath.name; + options.path = parsedPath.path; + options.selector = options.selector || buildSelector(options, project.prefix); - validateName(options.name); - validateHtmlSelector(options.selector!); + validateName(options.name); + validateHtmlSelector(options.selector!); - // Object that will be used as context for the EJS templates. - const baseTemplateContext = { - ...strings, - 'if-flat': (s: string) => options.flat ? '' : s, - ...options, - }; + // In case the specified style extension is not part of the supported CSS supersets, + // we generate the stylesheets with the "css" extension. This ensures that we don't + // accidentally generate invalid stylesheets (e.g. drag-drop-comp.styl) which will + // break the Angular CLI project. See: https://github.com/angular/components/issues/15164 + if (!supportedCssExtensions.includes(options.style!)) { + // TODO: Cast is necessary as we can't use the Style enum which has been introduced + // within CLI v7.3.0-rc.0. This would break the schematic for older CLI versions. + options.style = 'css' as Style; + } - // Key-value object that includes the specified additional files with their loaded content. - // The resolved contents can be used inside EJS templates. - const resolvedFiles = {}; + // Object that will be used as context for the EJS templates. + const baseTemplateContext = { + ...strings, + 'if-flat': (s: string) => options.flat ? '' : s, + ...options + }; - for (let key in additionalFiles) { - if (additionalFiles[key]) { - const fileContent = readFileSync(join(schematicFilesPath, additionalFiles[key]), 'utf-8'); + // Key-value object that includes the specified additional files with their loaded content. + // The resolved contents can be used inside EJS templates. + const resolvedFiles = {}; - // Interpolate the additional files with the base EJS template context. - resolvedFiles[key] = interpolateTemplate(fileContent)(baseTemplateContext); - } - } + for (const key in additionalFiles) { + if (additionalFiles[key]) { + const fileContent = readFileSync(join(schematicFilesPath, additionalFiles[key]), 'utf-8'); + + // Interpolate the additional files with the base EJS template context. + resolvedFiles[key] = interpolateTemplate(fileContent)(baseTemplateContext); + } + } - const templateSource = apply(url(schematicFilesUrl), [ - options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), - options.inlineStyle ? filter(path => !path.endsWith('.__styleext__')) : noop(), - options.inlineTemplate ? filter(path => !path.endsWith('.html')) : noop(), - // Treat the template options as any, because the type definition for the template options - // is made unnecessarily explicit. Every type of object can be used in the EJS template. - template({indentTextContent, resolvedFiles, ...baseTemplateContext} as any), - // TODO(devversion): figure out why we cannot just remove the first parameter - // See for example: angular-cli#schematics/angular/component/index.ts#L160 - move(null as any, parsedPath.path), - ]); - - return chain([ - branchAndMerge(chain([ - addDeclarationToNgModule(options), - mergeWith(templateSource), - ])), - ])(host, context); - }; + const templateSource = apply(url(schematicFilesUrl), [ + options.skipTests ? filter((path) => !path.endsWith('.spec.ts')) : noop(), + options.inlineStyle ? filter((path) => !path.endsWith('.__style__')) : noop(), + options.inlineTemplate ? filter((path) => !path.endsWith('.html')) : noop(), + // Treat the template options as any, because the type definition for the template options + // is made unnecessarily explicit. Every type of object can be used in the EJS template. + template({indentTextContent, resolvedFiles, ...baseTemplateContext} as any), + // TODO(devversion): figure out why we cannot just remove the first parameter + // See for example: angular-cli#schematics/angular/component/index.ts#L160 + move(null as any, parsedPath.path) + ]); + + return chain([ + branchAndMerge(chain([ + addDeclarationToNgModule(options), + mergeWith(templateSource) + ])) + ])(host, context); + }; } diff --git a/packages/cdk/schematics/utils/get-project.ts b/packages/cdk/schematics/utils/get-project.ts index 4d4045d2e..f862f1b29 100644 --- a/packages/cdk/schematics/utils/get-project.ts +++ b/packages/cdk/schematics/utils/get-project.ts @@ -1,12 +1,6 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ +import { WorkspaceSchema, WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; +import { SchematicsException } from '@angular-devkit/schematics'; -import {WorkspaceSchema, WorkspaceProject} from '@angular-devkit/core/src/workspace'; /** * Finds the specified project configuration in the workspace. Throws an error if the project @@ -16,11 +10,11 @@ export function getProjectFromWorkspace( workspace: WorkspaceSchema, projectName?: string): WorkspaceProject { - const project = workspace.projects[projectName || workspace.defaultProject!]; + const project = workspace.projects[projectName || workspace.defaultProject!]; - if (!project) { - throw new Error(`Could not find project in workspace: ${projectName}`); - } + if (!project) { + throw new SchematicsException(`Could not find project in workspace: ${projectName}`); + } - return project; + return project; } diff --git a/packages/cdk/schematics/utils/project-main-file.ts b/packages/cdk/schematics/utils/project-main-file.ts index e822f5fd3..3587fcb06 100644 --- a/packages/cdk/schematics/utils/project-main-file.ts +++ b/packages/cdk/schematics/utils/project-main-file.ts @@ -1,23 +1,17 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ +import { WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; +import { SchematicsException } from '@angular-devkit/schematics'; + +import { getProjectTargetOptions } from './project-targets'; -import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; -import {SchematicsException} from '@angular-devkit/schematics'; -import {getProjectTargetOptions} from './project-targets'; /** Looks for the main TypeScript file in the given project and returns its path. */ export function getProjectMainFile(project: WorkspaceProject): string { - const buildOptions = getProjectTargetOptions(project, 'build'); + const buildOptions = getProjectTargetOptions(project, 'build'); - if (!buildOptions.main) { - throw new SchematicsException(`Could not find the project main file inside of the ` + - `workspace config (${project.sourceRoot})`); - } + if (!buildOptions.main) { + throw new SchematicsException(`Could not find the project main file inside of the ` + + `workspace config (${project.sourceRoot})`); + } - return buildOptions.main; + return buildOptions.main; } diff --git a/packages/cdk/schematics/utils/project-style-file.ts b/packages/cdk/schematics/utils/project-style-file.ts index 8b9cf0751..4cab3a856 100644 --- a/packages/cdk/schematics/utils/project-style-file.ts +++ b/packages/cdk/schematics/utils/project-style-file.ts @@ -1,14 +1,8 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ +import { normalize } from '@angular-devkit/core'; +import { WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; + +import { getProjectTargetOptions } from './project-targets'; -import {normalize} from '@angular-devkit/core'; -import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; -import {getProjectTargetOptions} from './project-targets'; /** Regular expression that matches all possible Angular CLI default style files. */ const defaultStyleFileRegex = /styles\.(c|le|sc)ss/; @@ -21,30 +15,30 @@ const validStyleFileRegex = /\.(c|le|sc)ss/; * extension is specified, any style file with a valid extension will be returned. */ export function getProjectStyleFile(project: WorkspaceProject, extension?: string): string | null { - const buildOptions = getProjectTargetOptions(project, 'build'); + const buildOptions = getProjectTargetOptions(project, 'build'); - if (buildOptions.styles && buildOptions.styles.length) { - const styles = buildOptions.styles.map(s => typeof s === 'string' ? s : s.input); + if (buildOptions.styles && buildOptions.styles.length) { + const styles = buildOptions.styles.map((s) => typeof s === 'string' ? s : s.input); - // Look for the default style file that is generated for new projects by the Angular CLI. This - // default style file is usually called `styles.ext` unless it has been changed explicitly. - const defaultMainStylePath = styles - .find(file => extension ? file === `styles.${extension}` : defaultStyleFileRegex.test(file)); + // Look for the default style file that is generated for new projects by the Angular CLI. This + // default style file is usually called `styles.ext` unless it has been changed explicitly. + const defaultMainStylePath = styles + .find((file) => extension ? file === `styles.${extension}` : defaultStyleFileRegex.test(file)); - if (defaultMainStylePath) { - return normalize(defaultMainStylePath); - } + if (defaultMainStylePath) { + return normalize(defaultMainStylePath); + } - // If no default style file could be found, use the first style file that matches the given - // extension. If no extension specified explicitly, we look for any file with a valid style - // file extension. - const fallbackStylePath = styles - .find(file => extension ? file.endsWith(`.${extension}`) : validStyleFileRegex.test(file)); + // If no default style file could be found, use the first style file that matches the given + // extension. If no extension specified explicitly, we look for any file with a valid style + // file extension. + const fallbackStylePath = styles + .find((file) => extension ? file.endsWith(`.${extension}`) : validStyleFileRegex.test(file)); - if (fallbackStylePath) { - return normalize(fallbackStylePath); + if (fallbackStylePath) { + return normalize(fallbackStylePath); + } } - } - return null; + return null; } diff --git a/packages/cdk/schematics/utils/project-targets.ts b/packages/cdk/schematics/utils/project-targets.ts index 39a0e5ad6..7288e7e3c 100644 --- a/packages/cdk/schematics/utils/project-targets.ts +++ b/packages/cdk/schematics/utils/project-targets.ts @@ -1,31 +1,26 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ +import { WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; +import { SchematicsException } from '@angular-devkit/schematics'; -import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; /** Resolves the architect options for the build target of the given project. */ export function getProjectTargetOptions(project: WorkspaceProject, buildTarget: string) { - if (project.targets && - project.targets[buildTarget] && - project.targets[buildTarget].options) { + if (project.targets && + project.targets[buildTarget] && + project.targets[buildTarget].options) { - return project.targets[buildTarget].options; - } + return project.targets[buildTarget].options; + } - // TODO(devversion): consider removing this architect check if the CLI completely switched - // over to `targets`, and the `architect` support has been removed. - // See: https://github.com/angular/angular-cli/commit/307160806cb48c95ecb8982854f452303801ac9f - if (project.architect && - project.architect[buildTarget] && - project.architect[buildTarget].options) { + // over to `targets`, and the `architect` support has been removed. + // See: https://github.com/angular/angular-cli/commit/307160806cb48c95ecb8982854f452303801ac9f + if (project.architect && + project.architect[buildTarget] && + project.architect[buildTarget].options) { - return project.architect[buildTarget].options; - } + return project.architect[buildTarget].options; + } - throw new Error(`Cannot determine project target configuration for: ${buildTarget}.`); + throw new SchematicsException( + `Cannot determine project target configuration for: ${buildTarget}.`); } + diff --git a/packages/cdk/schematics/utils/schematic-options.ts b/packages/cdk/schematics/utils/schematic-options.ts index a6cdc9f0b..2fefa12d0 100644 --- a/packages/cdk/schematics/utils/schematic-options.ts +++ b/packages/cdk/schematics/utils/schematic-options.ts @@ -1,12 +1,4 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; +import { WorkspaceProject } from '@angular-devkit/core/src/experimental/workspace'; /** @@ -17,15 +9,24 @@ import {WorkspaceProject} from '@angular-devkit/core/src/workspace'; * "--inlineStyle", "--skipTests" and "--inlineTemplate" options to the "component" schematic. */ export function getDefaultComponentOptions(project: WorkspaceProject) { - // Note: Not all options which are available when running "ng new" will be stored in the - // workspace config. List of options which will be available in the configuration: - // angular/angular-cli/blob/master/packages/schematics/angular/application/index.ts#L109-L131 - return { - styleext: getDefaultComponentOption(project, 'styleext', 'css'), - inlineStyle: getDefaultComponentOption(project, 'inlineStyle', false), - inlineTemplate: getDefaultComponentOption(project, 'inlineTemplate', false), - spec: getDefaultComponentOption(project, 'spec', true), - }; + // Note: Not all options which are available when running "ng new" will be stored in the + // workspace config. List of options which will be available in the configuration: + // angular/angular-cli/blob/master/packages/schematics/angular/application/index.ts#L109-L131 + let skipTests = getDefaultComponentOption(project, ['skipTests'], null); + + // In case "skipTests" is not set explicitly, also look for the "spec" option. The "spec" + // option has been deprecated but can be still used in older Angular CLI projects. + // See: https://github.com/angular/angular-cli/commit/a12a4e02a4689b5bdbc6e740c0d9865afb55671a + if (skipTests === null) { + skipTests = !getDefaultComponentOption(project, ['spec'], true); + } + + return { + style: getDefaultComponentOption(project, ['style', 'styleext'], 'css'), + inlineStyle: getDefaultComponentOption(project, ['inlineStyle'], false), + inlineTemplate: getDefaultComponentOption(project, ['inlineTemplate'], false), + skipTests + }; } /** @@ -33,14 +34,16 @@ export function getDefaultComponentOptions(project: WorkspaceProject) { * by looking at the stored schematic options for `@schematics/angular:component` in the * CLI workspace configuration. */ -function getDefaultComponentOption(project: WorkspaceProject, optionName: string, - fallbackValue: T): T | null { - if (project.schematics && - project.schematics['@schematics/angular:component'] && - project.schematics['@schematics/angular:component'][optionName] != null) { +function getDefaultComponentOption(project: WorkspaceProject, optionNames: string[], + fallbackValue: T): T { + for (let optionName of optionNames) { + if (project.schematics && + project.schematics['@schematics/angular:component'] && + project.schematics['@schematics/angular:component'][optionName] != null) { - return project.schematics['@schematics/angular:component'][optionName]; - } + return project.schematics['@schematics/angular:component'][optionName]; + } + } - return fallbackValue; + return fallbackValue; } diff --git a/packages/cdk/schematics/utils/version-agnostic-typescript.ts b/packages/cdk/schematics/utils/version-agnostic-typescript.ts index 66cb5d0bd..6a6496a6d 100644 --- a/packages/cdk/schematics/utils/version-agnostic-typescript.ts +++ b/packages/cdk/schematics/utils/version-agnostic-typescript.ts @@ -1,17 +1,12 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - /** * This is just a type import and won't be generated in the release output. * * Note that we always need to adjust this type import based on the location of the Typescript * dependency that will be shipped with `@schematics/angular`. */ +import { SchematicsException } from '@angular-devkit/schematics'; + + import typescript = require('typescript'); /** @@ -30,9 +25,9 @@ try { try { ts = require('typescript'); } catch { - throw new Error('Error: Could not find a TypeScript version for the schematics. ' + - 'Please report an issue on the Angular Material repository.'); + throw new SchematicsException('Error: Could not find a TypeScript version for the ' + + 'schematics. Please report an issue on the Angular Material repository.'); } } -export {ts}; +export { ts, typescript }; diff --git a/packages/cdk/scrolling/scroll-dispatcher.spec.ts b/packages/cdk/scrolling/scroll-dispatcher.spec.ts index a412ee492..ac81e7c45 100644 --- a/packages/cdk/scrolling/scroll-dispatcher.spec.ts +++ b/packages/cdk/scrolling/scroll-dispatcher.spec.ts @@ -229,8 +229,8 @@ describe('ScrollDispatcher', () => { template: `
` }) class ScrollingComponent { - @ViewChild(CdkScrollable) scrollable: CdkScrollable; - @ViewChild('scrollingElement') scrollingElement: ElementRef; + @ViewChild(CdkScrollable, {static: false}) scrollable: CdkScrollable; + @ViewChild('scrollingElement', {static: false}) scrollingElement: ElementRef; } @@ -247,7 +247,7 @@ class ScrollingComponent { ` }) class NestedScrollingComponent { - @ViewChild('interestingElement') interestingElement: ElementRef; + @ViewChild('interestingElement', {static: false}) interestingElement: ElementRef; } const TEST_COMPONENTS = [ScrollingComponent, NestedScrollingComponent]; diff --git a/packages/cdk/scrolling/virtual-for-of.ts b/packages/cdk/scrolling/virtual-for-of.ts index 705f335ed..e2c496422 100644 --- a/packages/cdk/scrolling/virtual-for-of.ts +++ b/packages/cdk/scrolling/virtual-for-of.ts @@ -15,15 +15,23 @@ import { TrackByFunction, ViewContainerRef } from '@angular/core'; -import { ArrayDataSource, ICollectionViewer, DataSource, ListRange, isDataSource } from '@ptsecurity/cdk/collections'; -import { Observable, Subject } from 'rxjs'; + +import { Observable, Subject, of as observableOf } from 'rxjs'; import { pairwise, shareReplay, startWith, switchMap, takeUntil } from 'rxjs/operators'; +import { + ArrayDataSource, + ICollectionViewer, + DataSource, + ListRange, + isDataSource +} from '@ptsecurity/cdk/collections'; + import { CdkVirtualScrollViewport } from './virtual-scroll-viewport'; /** The context for an item rendered by `CdkVirtualForOf` */ -export interface CdkVirtualForOfContext { +export type CdkVirtualForOfContext = { /** The item value. */ $implicit: T; /** The DataSource, Observable, or NgIterable that was passed to *cdkVirtualFor. */ @@ -40,7 +48,7 @@ export interface CdkVirtualForOfContext { even: boolean; /** Whether the index is odd. */ odd: boolean; -} +}; /** Helper to extract size from a DOM Node. */ @@ -52,7 +60,7 @@ function getSize(orientation: 'horizontal' | 'vertical', node: Node): number { } const rect = el.getBoundingClientRect(); - return orientation == 'horizontal' ? rect.width : rect.height; + return orientation === 'horizontal' ? rect.width : rect.height; } @@ -61,16 +69,20 @@ function getSize(orientation: 'horizontal' | 'vertical', node: Node): number { * container. */ @Directive({ - selector: '[cdkVirtualFor][cdkVirtualForOf]' + selector: '[cdkVirtualFor][cdkVirtualForOf]', }) export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy { + /** Emits when the rendered view of the data changes. */ + viewChange = new Subject(); + + /** Subject that emits when a new DataSource instance is given. */ + private _dataSourceChanges = new Subject>(); /** The DataSource to display. */ @Input() get cdkVirtualForOf(): DataSource | Observable | NgIterable { return this._cdkVirtualForOf; } - set cdkVirtualForOf(value: DataSource | Observable | NgIterable) { this._cdkVirtualForOf = value; const ds = isDataSource(value) ? value : @@ -79,6 +91,7 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy value instanceof Observable ? value : Array.prototype.slice.call(value || [])); this._dataSourceChanges.next(ds); } + _cdkVirtualForOf: DataSource | Observable | NgIterable; /** * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and @@ -88,13 +101,13 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy get cdkVirtualForTrackBy(): TrackByFunction | undefined { return this._cdkVirtualForTrackBy; } - set cdkVirtualForTrackBy(fn: TrackByFunction | undefined) { this._needsUpdate = true; this._cdkVirtualForTrackBy = fn ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item) : undefined; } + private _cdkVirtualForTrackBy: TrackByFunction | undefined; /** The template used to stamp out new elements. */ @Input() @@ -105,24 +118,17 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy } } - /** Emits when the rendered view of the data changes. */ - viewChange = new Subject(); - _cdkVirtualForOf: DataSource | Observable | NgIterable; - /** * The size of the cache used to store templates that are not being used for re-use later. * Setting the cache size to `0` will disable caching. Defaults to 20 templates. */ @Input() cdkVirtualForTemplateCacheSize: number = 20; - /** Subject that emits when a new DataSource instance is given. */ - private _dataSourceChanges = new Subject>(); - /** Emits whenever the data in the current DataSource changes. */ dataStream: Observable> = this._dataSourceChanges .pipe( // Start off with null `DataSource`. - startWith>(null!), + startWith(null!), // Bundle up the previous and current data sources so we can work with both. pairwise(), // Use `_changeDataSource` to disconnect from the previous data source and connect to the @@ -132,8 +138,6 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy // Replay the last emitted data when someone subscribes. shareReplay(1)); - private _cdkVirtualForTrackBy: TrackByFunction | undefined; - /** The differ used to calculate changes to the data. */ private _differ: IterableDiffer | null = null; @@ -168,11 +172,11 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy /** The virtual scrolling viewport that these items are being rendered in. */ @SkipSelf() private _viewport: CdkVirtualScrollViewport, ngZone: NgZone) { - this.dataStream.subscribe((data) => { + this.dataStream.subscribe(data => { this._data = data; this._onRenderedDataChange(); }); - this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe((range) => { + this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => { this._renderedRange = range; ngZone.run(() => this.viewChange.next(this._renderedRange)); this._onRenderedDataChange(); @@ -231,13 +235,14 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy ngOnDestroy() { this._viewport.detach(); + this._dataSourceChanges.next(); this._dataSourceChanges.complete(); this.viewChange.complete(); this._destroyed.next(); this._destroyed.complete(); - for (const view of this._templateCache) { + for (let view of this._templateCache) { view.destroy(); } } @@ -255,7 +260,7 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy } /** Swap out one `DataSource` for another. */ - private _changeDataSource(oldDs: DataSource | null, newDs: DataSource): + private _changeDataSource(oldDs: DataSource | null, newDs: DataSource | null): Observable> { if (oldDs) { @@ -264,7 +269,7 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy this._needsUpdate = true; - return newDs.connect(this); + return newDs ? newDs.connect(this) : observableOf(); } /** Update the `CdkVirtualForOfContext` for all views. */ @@ -272,7 +277,7 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy const count = this._data.length; let i = this._viewContainerRef.length; while (i--) { - const view = this._viewContainerRef.get(i) as EmbeddedViewRef>; + let view = this._viewContainerRef.get(i) as EmbeddedViewRef>; view.context.index = this._renderedRange.start + i; view.context.count = count; this._updateComputedContextProperties(view.context); @@ -287,12 +292,10 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy adjustedPreviousIndex: number | null, currentIndex: number | null) => { if (record.previousIndex == null) { // Item added. - const view = this._getViewForNewItem(); - this._viewContainerRef.insert(view, currentIndex!); + const view = this._insertViewForNewItem(currentIndex!); view.context.$implicit = record.item; } else if (currentIndex == null) { // Item removed. - this._cacheView(this._viewContainerRef.detach(adjustedPreviousIndex!) as - EmbeddedViewRef>); + this._cacheView(this._detachView(adjustedPreviousIndex !)); } else { // Item moved. const view = this._viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef>; @@ -337,9 +340,22 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy } } - /** Get a view for a new item, either from the cache or by creating a new one. */ - private _getViewForNewItem(): EmbeddedViewRef> { - return this._templateCache.pop() || this._viewContainerRef.createEmbeddedView(this._template, { + /** Inserts a view for a new item, either from the cache or by creating a new one. */ + private _insertViewForNewItem(index: number): EmbeddedViewRef> { + return this._insertViewFromCache(index) || this._createEmbeddedViewAt(index); + } + + /** Update the computed properties on the `CdkVirtualForOfContext`. */ + private _updateComputedContextProperties(context: CdkVirtualForOfContext) { + context.first = context.index === 0; + context.last = context.index === context.count - 1; + context.even = context.index % 2 === 0; + context.odd = !context.even; + } + + /** Creates a new embedded view and moves it to the given index */ + private _createEmbeddedViewAt(index: number): EmbeddedViewRef> { + const view = this._viewContainerRef.createEmbeddedView(this._template, { $implicit: null!, cdkVirtualForOf: this._cdkVirtualForOf, index: -1, @@ -349,13 +365,26 @@ export class CdkVirtualForOf implements ICollectionViewer, DoCheck, OnDestroy odd: false, even: false }); + if (index < this._viewContainerRef.length) { + this._viewContainerRef.move(view, index); + } + + return view; } - /** Update the computed properties on the `CdkVirtualForOfContext`. */ - private _updateComputedContextProperties(context: CdkVirtualForOfContext) { - context.first = context.index === 0; - context.last = context.index === context.count - 1; - context.even = context.index % 2 === 0; - context.odd = !context.even; + /** Inserts a recycled view from the cache at the given index. */ + private _insertViewFromCache(index: number): EmbeddedViewRef>|null { + const cachedView = this._templateCache.pop(); + if (cachedView) { + this._viewContainerRef.insert(cachedView, index); + } + + return cachedView || null; + } + + /** Detaches the embedded view at the given index. */ + private _detachView(index: number): EmbeddedViewRef> { + return this._viewContainerRef.detach(index) as + EmbeddedViewRef>; } } diff --git a/packages/cdk/scrolling/virtual-scroll-viewport.spec.ts b/packages/cdk/scrolling/virtual-scroll-viewport.spec.ts index 5bcca0b10..0373add33 100644 --- a/packages/cdk/scrolling/virtual-scroll-viewport.spec.ts +++ b/packages/cdk/scrolling/virtual-scroll-viewport.spec.ts @@ -19,6 +19,7 @@ import { dispatchFakeEvent } from '@ptsecurity/cdk/testing'; import { animationFrameScheduler, Subject } from 'rxjs'; +// tslint:disable:no-magic-numbers describe('CdkVirtualScrollViewport', () => { describe('with FixedSizeVirtualScrollStrategy', () => { let fixture: ComponentFixture; @@ -258,6 +259,7 @@ describe('CdkVirtualScrollViewport', () => { const maxOffset = testComponent.itemSize * testComponent.items.length - testComponent.viewportSize; + for (let offset = 1; offset <= maxOffset; offset += 10) { triggerScroll(viewport, offset); fixture.detectChanges(); @@ -284,6 +286,7 @@ describe('CdkVirtualScrollViewport', () => { const maxOffset = testComponent.itemSize * testComponent.items.length - testComponent.viewportSize; + for (let offset = maxOffset - 1; offset >= 0; offset -= 10) { triggerScroll(viewport, offset); fixture.detectChanges(); @@ -404,6 +407,7 @@ describe('CdkVirtualScrollViewport', () => { const maxOffset = testComponent.itemSize * testComponent.items.length - testComponent.viewportSize; + for (let offset = 1; offset <= maxOffset; offset += 10) { triggerScroll(viewport, offset); fixture.detectChanges(); @@ -431,6 +435,7 @@ describe('CdkVirtualScrollViewport', () => { const maxOffset = testComponent.itemSize * testComponent.items.length - testComponent.viewportSize; + for (let offset = maxOffset - 1; offset >= 0; offset -= 10) { triggerScroll(viewport, offset); fixture.detectChanges(); @@ -486,49 +491,51 @@ describe('CdkVirtualScrollViewport', () => { it('should trackBy value by default', fakeAsync(() => { testComponent.items = []; - spyOn(testComponent.virtualForViewContainer, 'detach').and.callThrough(); + spyOn(testComponent.virtualForOf, '_detachView').and.callThrough(); finishInit(fixture); testComponent.items = [0]; fixture.detectChanges(); flush(); - expect(testComponent.virtualForViewContainer.detach).not.toHaveBeenCalled(); + expect(testComponent.virtualForOf._detachView).not.toHaveBeenCalled(); testComponent.items = [1]; fixture.detectChanges(); flush(); - expect(testComponent.virtualForViewContainer.detach).toHaveBeenCalled(); + expect(testComponent.virtualForOf._detachView).toHaveBeenCalled(); })); it('should trackBy index when specified', fakeAsync(() => { testComponent.trackBy = (i) => i; testComponent.items = []; - spyOn(testComponent.virtualForViewContainer, 'detach').and.callThrough(); + spyOn(testComponent.virtualForOf, '_detachView').and.callThrough(); finishInit(fixture); testComponent.items = [0]; fixture.detectChanges(); flush(); - expect(testComponent.virtualForViewContainer.detach).not.toHaveBeenCalled(); + expect(testComponent.virtualForOf._detachView).not.toHaveBeenCalled(); testComponent.items = [1]; fixture.detectChanges(); flush(); - expect(testComponent.virtualForViewContainer.detach).not.toHaveBeenCalled(); + expect(testComponent.virtualForOf._detachView).not.toHaveBeenCalled(); })); it('should recycle views when template cache is large enough to accommodate', fakeAsync(() => { - testComponent.trackBy = (i) => i; - const spy = - spyOn(testComponent.virtualForViewContainer, 'createEmbeddedView').and.callThrough(); + testComponent.trackBy = i => i; + const spy = spyOn(testComponent.virtualForOf, '_createEmbeddedViewAt') + .and.callThrough(); + finishInit(fixture); // Should create views for the initial rendered items. - expect(testComponent.virtualForViewContainer.createEmbeddedView).toHaveBeenCalledTimes(4); + expect(testComponent.virtualForOf._createEmbeddedViewAt) + .toHaveBeenCalledTimes(4); spy.calls.reset(); triggerScroll(viewport, 10); @@ -538,7 +545,8 @@ describe('CdkVirtualScrollViewport', () => { // As we first start to scroll we need to create one more item. This is because the first item // is still partially on screen and therefore can't be removed yet. At the same time a new // item is now partially on the screen at the bottom and so a new view is needed. - expect(testComponent.virtualForViewContainer.createEmbeddedView).toHaveBeenCalledTimes(1); + expect(testComponent.virtualForOf._createEmbeddedViewAt) + .toHaveBeenCalledTimes(1); spy.calls.reset(); const maxOffset = @@ -551,18 +559,19 @@ describe('CdkVirtualScrollViewport', () => { // As we scroll through the rest of the items, no new views should be created, our existing 5 // can just be recycled as appropriate. - expect(testComponent.virtualForViewContainer.createEmbeddedView).not.toHaveBeenCalled(); + expect(testComponent.virtualForOf._createEmbeddedViewAt) + .not.toHaveBeenCalled(); })); it('should not recycle views when template cache is full', fakeAsync(() => { testComponent.trackBy = (i) => i; testComponent.templateCacheSize = 0; const spy = - spyOn(testComponent.virtualForViewContainer, 'createEmbeddedView').and.callThrough(); + spyOn(testComponent.virtualForOf, '_createEmbeddedViewAt').and.callThrough(); finishInit(fixture); // Should create views for the initial rendered items. - expect(testComponent.virtualForViewContainer.createEmbeddedView).toHaveBeenCalledTimes(4); + expect(testComponent.virtualForOf._createEmbeddedViewAt).toHaveBeenCalledTimes(4); spy.calls.reset(); triggerScroll(viewport, 10); @@ -572,11 +581,12 @@ describe('CdkVirtualScrollViewport', () => { // As we first start to scroll we need to create one more item. This is because the first item // is still partially on screen and therefore can't be removed yet. At the same time a new // item is now partially on the screen at the bottom and so a new view is needed. - expect(testComponent.virtualForViewContainer.createEmbeddedView).toHaveBeenCalledTimes(1); + expect(testComponent.virtualForOf._createEmbeddedViewAt).toHaveBeenCalledTimes(1); spy.calls.reset(); const maxOffset = testComponent.itemSize * testComponent.items.length - testComponent.viewportSize; + for (let offset = 10; offset <= maxOffset; offset += 10) { triggerScroll(viewport, offset); fixture.detectChanges(); @@ -585,7 +595,7 @@ describe('CdkVirtualScrollViewport', () => { // Since our template cache size is 0, as we scroll through the rest of the items, we need to // create a new view for each one. - expect(testComponent.virtualForViewContainer.createEmbeddedView).toHaveBeenCalledTimes(5); + expect(testComponent.virtualForOf._createEmbeddedViewAt).toHaveBeenCalledTimes(5); })); it('should render up to maxBufferPx when buffer dips below minBufferPx', fakeAsync(() => { @@ -827,9 +837,9 @@ function triggerScroll(viewport: CdkVirtualScrollViewport, offset?: number) { encapsulation: ViewEncapsulation.None }) class FixedSizeVirtualScroll { - @ViewChild(CdkVirtualScrollViewport) viewport: CdkVirtualScrollViewport; - @ViewChild(CdkVirtualForOf) virtualForOf: CdkVirtualForOf; - @ViewChild(CdkVirtualForOf, {read: ViewContainerRef}) virtualForViewContainer: ViewContainerRef; + @ViewChild(CdkVirtualScrollViewport, {static: true}) viewport: CdkVirtualScrollViewport; + // Casting virtualForOf as any so we can spy on private methods + @ViewChild(CdkVirtualForOf, {static: true}) virtualForOf: any; @Input() orientation = 'vertical'; @Input() viewportSize = 200; @@ -844,11 +854,11 @@ class FixedSizeVirtualScroll { scrolledToIndex = 0; get viewportWidth() { - return this.orientation == 'horizontal' ? this.viewportSize : this.viewportCrossSize; + return this.orientation === 'horizontal' ? this.viewportSize : this.viewportCrossSize; } get viewportHeight() { - return this.orientation == 'horizontal' ? this.viewportCrossSize : this.viewportSize; + return this.orientation === 'horizontal' ? this.viewportCrossSize : this.viewportSize; } } @@ -879,8 +889,7 @@ class FixedSizeVirtualScroll { encapsulation: ViewEncapsulation.None }) class FixedSizeVirtualScrollWithRtlDirection { - @ViewChild(CdkVirtualScrollViewport) viewport: CdkVirtualScrollViewport; - @ViewChild(CdkVirtualForOf, {read: ViewContainerRef}) virtualForViewContainer: ViewContainerRef; + @ViewChild(CdkVirtualScrollViewport, {static: true}) viewport: CdkVirtualScrollViewport; @Input() orientation = 'vertical'; @Input() viewportSize = 200; @@ -895,11 +904,11 @@ class FixedSizeVirtualScrollWithRtlDirection { scrolledToIndex = 0; get viewportWidth() { - return this.orientation == 'horizontal' ? this.viewportSize : this.viewportCrossSize; + return this.orientation === 'horizontal' ? this.viewportSize : this.viewportCrossSize; } get viewportHeight() { - return this.orientation == 'horizontal' ? this.viewportCrossSize : this.viewportSize; + return this.orientation === 'horizontal' ? this.viewportCrossSize : this.viewportSize; } } diff --git a/packages/cdk/scrolling/virtual-scroll-viewport.ts b/packages/cdk/scrolling/virtual-scroll-viewport.ts index 628e30c31..d308bf244 100644 --- a/packages/cdk/scrolling/virtual-scroll-viewport.ts +++ b/packages/cdk/scrolling/virtual-scroll-viewport.ts @@ -63,7 +63,7 @@ export class CdkVirtualScrollViewport extends CdkScrollable implements OnInit, O Promise.resolve().then(() => this.ngZone.run(() => observer.next(index))))); /** The element that wraps the rendered content. */ - @ViewChild('contentWrapper') _contentWrapper: ElementRef; + @ViewChild('contentWrapper', {static: true}) _contentWrapper: ElementRef; /** Emits when the viewport is detached from a CdkVirtualForOf. */ private _detachedSubject = new Subject(); diff --git a/packages/cdk/tree/tree._spec.ts b/packages/cdk/tree/tree._spec.ts index 966f50bdc..2fe3fd87d 100644 --- a/packages/cdk/tree/tree._spec.ts +++ b/packages/cdk/tree/tree._spec.ts @@ -1050,7 +1050,7 @@ class SimpleCdkTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @@ -1071,7 +1071,7 @@ class NestedCdkTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1097,7 +1097,7 @@ class WhenNodeNestedCdkTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @@ -1121,7 +1121,7 @@ class CdkTreeAppWithToggle { treeControl: ITreeControl = new FlatTreeControl(this.getLevel, this.isExpandable); dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1145,7 +1145,7 @@ class NestedCdkTreeAppWithToggle { treeControl: ITreeControl = new NestedTreeControl(this.getChildren); dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1173,7 +1173,7 @@ class WhenNodeCdkTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1199,7 +1199,7 @@ class ArrayDataSourceCdkTreeApp { return this.dataSource.data; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1225,7 +1225,7 @@ class ObservableDataSourceCdkTreeApp { return this.dataSource._dataChange; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1250,7 +1250,7 @@ class ArrayDataSourceNestedCdkTreeApp { return this.dataSource.data; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1275,7 +1275,7 @@ class ObservableDataSourceNestedCdkTreeApp { return this.dataSource._dataChange; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1297,7 +1297,7 @@ class NestedCdkErrorTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } class FakeTreeControl extends BaseTreeControl { @@ -1330,7 +1330,7 @@ class FlatCdkErrorTreeApp { dataSource: FakeDataSource | null = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @@ -1357,7 +1357,7 @@ class DepthNestedCdkTreeApp { return this.dataSource.data; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1389,7 +1389,7 @@ class CdkTreeAppWithTrackBy { treeControl: ITreeControl = new FlatTreeControl(this.getLevel, this.isExpandable); dataSource: FakeDataSource = new FakeDataSource(this.treeControl); - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } @Component({ @@ -1426,5 +1426,5 @@ class NestedCdkTreeAppWithTrackBy { return this.dataSource.data; } - @ViewChild(CdkTree) tree: CdkTree; + @ViewChild(CdkTree, {static: false}) tree: CdkTree; } diff --git a/packages/cdk/tree/tree.ts b/packages/cdk/tree/tree.ts index 4bd8e8eaa..3715c068f 100644 --- a/packages/cdk/tree/tree.ts +++ b/packages/cdk/tree/tree.ts @@ -66,7 +66,7 @@ export class CdkTree implements AfterContentChecked, ICollectionViewer, OnDes @Input() trackBy: TrackByFunction; // Outlets within the tree's template where the dataNodes will be inserted. - @ViewChild(CdkTreeNodeOutlet) nodeOutlet: CdkTreeNodeOutlet; + @ViewChild(CdkTreeNodeOutlet, {static: true}) nodeOutlet: CdkTreeNodeOutlet; /** The tree node template for the tree */ @ContentChildren(CdkTreeNodeDef) nodeDefs: QueryList>; diff --git a/packages/dev-app/tsconfig-aot.json b/packages/dev-app/tsconfig.aot.json similarity index 98% rename from packages/dev-app/tsconfig-aot.json rename to packages/dev-app/tsconfig.aot.json index 7305662ae..602f7093f 100644 --- a/packages/dev-app/tsconfig-aot.json +++ b/packages/dev-app/tsconfig.aot.json @@ -1,7 +1,7 @@ // TypeScript config that extends the dev-app tsconfig file. This config compiles the // "main-aot.ts" file and also enables templage code generation / AOT. { - "extends": "./tsconfig-build", + "extends": "./tsconfig.build", "compilerOptions": { // Needed for Moment.js since it doesn't have a default export. "allowSyntheticDefaultImports": true, diff --git a/packages/dev-app/tsconfig-build.json b/packages/dev-app/tsconfig.build.json similarity index 100% rename from packages/dev-app/tsconfig-build.json rename to packages/dev-app/tsconfig.build.json diff --git a/packages/mosaic-dev/navbar/module.ts b/packages/mosaic-dev/navbar/module.ts index 2c377e843..2c6494c51 100644 --- a/packages/mosaic-dev/navbar/module.ts +++ b/packages/mosaic-dev/navbar/module.ts @@ -16,7 +16,7 @@ import { McNavbarModule, McNavbar, IMcNavbarDropdownItem } from '../../mosaic/na }) export class NavbarDemoComponent { - @ViewChild('navbar') + @ViewChild('navbar', {static: false}) navbar: McNavbar; readonly minNavbarWidth: number = 940; diff --git a/packages/mosaic-dev/sidepanel/module.ts b/packages/mosaic-dev/sidepanel/module.ts index 663ed05f4..5167212a2 100644 --- a/packages/mosaic-dev/sidepanel/module.ts +++ b/packages/mosaic-dev/sidepanel/module.ts @@ -24,7 +24,7 @@ import { McSidepanelModule } from '@ptsecurity/mosaic/sidepanel/sidepanel.module encapsulation: ViewEncapsulation.None }) export class SidepanelDemoComponent { - @ViewChild(TemplateRef) template: TemplateRef; + @ViewChild(TemplateRef, {static: false}) template: TemplateRef; array = new Array(40); // tslint:disable-line diff --git a/packages/mosaic-dev/tags/module.ts b/packages/mosaic-dev/tags/module.ts index ccc7451b2..ddc84fb3f 100644 --- a/packages/mosaic-dev/tags/module.ts +++ b/packages/mosaic-dev/tags/module.ts @@ -40,11 +40,11 @@ export class DemoComponent implements OnInit { readonly separatorKeysCodes: number[] = [ENTER, COMMA]; - @ViewChild('inputTagInput') inputTagInput: ElementRef; - @ViewChild('inputTagList') inputTagList: McTagList; + @ViewChild('inputTagInput', {static: false}) inputTagInput: ElementRef; + @ViewChild('inputTagList', {static: false}) inputTagList: McTagList; - @ViewChild('autocompleteTagInput') autocompleteTagInput: ElementRef; - @ViewChild('autocompleteTagList') autocompleteTagList: McTagList; + @ViewChild('autocompleteTagInput', {static: false}) autocompleteTagInput: ElementRef; + @ViewChild('autocompleteTagList', {static: false}) autocompleteTagList: McTagList; ngOnInit(): void { this.autocompleteFilteredTags = merge( diff --git a/packages/mosaic-dev/tooltip/module.ts b/packages/mosaic-dev/tooltip/module.ts index c4629d296..3a9c74d04 100644 --- a/packages/mosaic-dev/tooltip/module.ts +++ b/packages/mosaic-dev/tooltip/module.ts @@ -1,11 +1,11 @@ -import { Component, NgModule, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, NgModule, ViewChild, ViewEncapsulation } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { McButtonModule } from '@ptsecurity/mosaic/button'; -import { McFormFieldModule} from '@ptsecurity/mosaic/form-field'; +import { McFormFieldModule } from '@ptsecurity/mosaic/form-field'; import { McInputModule } from '@ptsecurity/mosaic/input'; import { McListModule } from '@ptsecurity/mosaic/list'; import { McRadioModule } from '@ptsecurity/mosaic/radio'; @@ -21,9 +21,9 @@ import { McToolTipModule } from '@ptsecurity/mosaic/tooltip'; }) export class DemoComponent { - @ViewChild('manualTooltip') manualTooltip: any; - @ViewChild('tooltip') tooltip: any; - @ViewChild('tooltipRef') tooltipRef: any; + @ViewChild('manualTooltip', {static: false}) manualTooltip: any; + @ViewChild('tooltip', {static: false}) tooltip: any; + @ViewChild('tooltipRef', {static: false}) tooltipRef: any; triggerTooltip: boolean = false; tooltipPosition: string = 'left'; diff --git a/packages/mosaic-examples/tsconfig.tests.json b/packages/mosaic-examples/tsconfig.tests.json index 771bde46d..ef2cf1bbd 100644 --- a/packages/mosaic-examples/tsconfig.tests.json +++ b/packages/mosaic-examples/tsconfig.tests.json @@ -2,7 +2,7 @@ // also compile the unit-test files. Since the code will run inside of the browser, the target is // set to ES5. Also the format needs to be CommonJS for Karma. { - "extends": "./tsconfig-build", + "extends": "./tsconfig.build", "compilerOptions": { "importHelpers": false, "module": "commonjs", diff --git a/packages/mosaic-moment-adapter/tsconfig.tests.json b/packages/mosaic-moment-adapter/tsconfig.tests.json index c81c3424f..e19478b1c 100644 --- a/packages/mosaic-moment-adapter/tsconfig.tests.json +++ b/packages/mosaic-moment-adapter/tsconfig.tests.json @@ -13,7 +13,7 @@ "experimentalDecorators": true, "fullTemplateTypeCheck": true, - // Unset options inherited from tsconfig-build + // Unset options inherited from tsconfig.build "annotateForClosureCompiler": false, "flatModuleOutFile": null, "flatModuleId": null diff --git a/packages/mosaic/autocomplete/autocomplete.component.ts b/packages/mosaic/autocomplete/autocomplete.component.ts index dd4ba316e..36a67db6a 100644 --- a/packages/mosaic/autocomplete/autocomplete.component.ts +++ b/packages/mosaic/autocomplete/autocomplete.component.ts @@ -71,9 +71,9 @@ export class McAutocomplete implements AfterContentInit { /** Whether the autocomplete panel should be visible, depending on option length. */ showPanel: boolean = false; - @ViewChild(TemplateRef) template: TemplateRef; + @ViewChild(TemplateRef, {static: true}) template: TemplateRef; - @ViewChild('panel') panel: ElementRef; + @ViewChild('panel', {static: false}) panel: ElementRef; @ContentChildren(McOption, { descendants: true }) options: QueryList; diff --git a/packages/mosaic/autocomplete/autocomplete.spec.ts b/packages/mosaic/autocomplete/autocomplete.spec.ts index ec6202227..0b6e77213 100644 --- a/packages/mosaic/autocomplete/autocomplete.spec.ts +++ b/packages/mosaic/autocomplete/autocomplete.spec.ts @@ -2226,9 +2226,9 @@ class SimpleAutocomplete implements OnDestroy { openedSpy = jasmine.createSpy('autocomplete opened spy'); closedSpy = jasmine.createSpy('autocomplete closed spy'); - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; - @ViewChild(McAutocomplete) panel: McAutocomplete; - @ViewChild(McFormField) formField: McFormField; + @ViewChild(McAutocompleteTrigger, {static: true}) trigger: McAutocompleteTrigger; + @ViewChild(McAutocomplete, {static: false}) panel: McAutocomplete; + @ViewChild(McFormField, {static: false}) formField: McFormField; @ViewChildren(McOption) options: QueryList; states = [ @@ -2283,7 +2283,7 @@ class NgIfAutocomplete { isVisible = true; options = ['One', 'Two', 'Three']; - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; @ViewChildren(McOption) mcOptions: QueryList; constructor() { @@ -2384,7 +2384,7 @@ class AutocompleteWithNumbers { ` }) class AutocompleteWithOnPushDelay implements OnInit { - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; options: string[]; ngOnInit() { @@ -2410,7 +2410,7 @@ class AutocompleteWithNativeInput { filteredOptions: Observable; options = ['En', 'To', 'Tre', 'Fire', 'Fem']; - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; @ViewChildren(McOption) mcOptions: QueryList; constructor() { @@ -2428,7 +2428,7 @@ class AutocompleteWithNativeInput { template: `` }) class AutocompleteWithoutPanel { - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; control = new FormControl(); } @@ -2465,7 +2465,7 @@ class AutocompleteWithFormsAndNonfloatingLabel { ` }) class AutocompleteWithGroups { - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; selectedState: string; stateGroups = [ { @@ -2501,8 +2501,8 @@ class AutocompleteWithSelectEvent { states = ['New York', 'Washington', 'Oregon']; optionSelected = jasmine.createSpy('optionSelected callback'); - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; - @ViewChild(McAutocomplete) autocomplete: McAutocomplete; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; + @ViewChild(McAutocomplete, {static: false}) autocomplete: McAutocomplete; } @@ -2559,8 +2559,8 @@ class AutocompleteWithNumberInputAndNgModel { ` }) class AutocompleteWithDifferentOrigin { - @ViewChild(McAutocompleteTrigger) trigger: McAutocompleteTrigger; - @ViewChild(McAutocompleteOrigin) alternateOrigin: McAutocompleteOrigin; + @ViewChild(McAutocompleteTrigger, {static: false}) trigger: McAutocompleteTrigger; + @ViewChild(McAutocompleteOrigin, {static: false}) alternateOrigin: McAutocompleteOrigin; selectedValue: string; values = ['one', 'two', 'three']; diff --git a/packages/mosaic/button-toggle/button-toggle.component.spec.ts b/packages/mosaic/button-toggle/button-toggle.component.spec.ts index 3e5eb7b75..549cfcbce 100644 --- a/packages/mosaic/button-toggle/button-toggle.component.spec.ts +++ b/packages/mosaic/button-toggle/button-toggle.component.spec.ts @@ -772,7 +772,7 @@ class ButtonToggleGroupWithFormControl { ` }) class RepeatedButtonTogglesWithPreselectedValue { - @ViewChild(McButtonToggleGroup) toggleGroup: McButtonToggleGroup; + @ViewChild(McButtonToggleGroup, {static: false}) toggleGroup: McButtonToggleGroup; @ViewChildren(McButtonToggle) toggles: QueryList; possibleValues = ['One', 'Two', 'Three']; diff --git a/packages/mosaic/button-toggle/button-toggle.component.ts b/packages/mosaic/button-toggle/button-toggle.component.ts index 8282cd6f9..c48119522 100644 --- a/packages/mosaic/button-toggle/button-toggle.component.ts +++ b/packages/mosaic/button-toggle/button-toggle.component.ts @@ -342,7 +342,7 @@ export class McButtonToggle implements OnInit, OnDestroy { // tslint:disable-next-line:no-reserved-keywords type: ToggleType; - @ViewChild(McButton) mcButton: McButton; + @ViewChild(McButton, {static: false}) mcButton: McButton; /** McButtonToggleGroup reads this to assign its own value. */ @Input() value: any; diff --git a/packages/mosaic/checkbox/checkbox.component.spec.ts b/packages/mosaic/checkbox/checkbox.component.spec.ts index 80238b101..e82e2da11 100644 --- a/packages/mosaic/checkbox/checkbox.component.spec.ts +++ b/packages/mosaic/checkbox/checkbox.component.spec.ts @@ -985,7 +985,7 @@ class CheckboxWithTabIndex { ` }) class CheckboxUsingViewChild { - @ViewChild(McCheckbox) checkbox; + @ViewChild(McCheckbox, {static: false}) checkbox; set isDisabled(value: boolean) { this.checkbox.disabled = value; diff --git a/packages/mosaic/checkbox/checkbox.ts b/packages/mosaic/checkbox/checkbox.ts index 14a9d18bb..7a96c100d 100644 --- a/packages/mosaic/checkbox/checkbox.ts +++ b/packages/mosaic/checkbox/checkbox.ts @@ -161,7 +161,7 @@ export class McCheckbox extends _McCheckboxMixinBase implements ControlValueAcce @Input() value: string; /** The native `` element */ - @ViewChild('input') _inputElement: ElementRef; + @ViewChild('input', {static: false}) _inputElement: ElementRef; /** * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. diff --git a/packages/mosaic/core/option/option.ts b/packages/mosaic/core/option/option.ts index d3692ae67..94e8ddcac 100644 --- a/packages/mosaic/core/option/option.ts +++ b/packages/mosaic/core/option/option.ts @@ -87,7 +87,7 @@ export class McOption implements AfterViewChecked, OnDestroy { * select's trigger. */ get viewValue(): string { - // TODO(kara): Add input property alternative for node envs. + // TODO: Add input property alternative for node envs. return (this.getHostElement().textContent || '').trim(); } diff --git a/packages/mosaic/datepicker/calendar.ts b/packages/mosaic/datepicker/calendar.ts index 6e325a3d4..3f711e7e9 100644 --- a/packages/mosaic/datepicker/calendar.ts +++ b/packages/mosaic/datepicker/calendar.ts @@ -269,13 +269,13 @@ export class McCalendar implements AfterContentInit, AfterViewChecked, OnDest @Output() readonly userSelection: EventEmitter = new EventEmitter(); /** Reference to the current month view component. */ - @ViewChild(McMonthView) monthView: McMonthView; + @ViewChild(McMonthView, {static: false}) monthView: McMonthView; /** Reference to the current year view component. */ - @ViewChild(McYearView) yearView: McYearView; + @ViewChild(McYearView, {static: false}) yearView: McYearView; /** Reference to the current multi-year view component. */ - @ViewChild(McMultiYearView) multiYearView: McMultiYearView; + @ViewChild(McMultiYearView, {static: false}) multiYearView: McMultiYearView; /** * Emits whenever there is a state change that the header may need to respond to. diff --git a/packages/mosaic/datepicker/datepicker-toggle.ts b/packages/mosaic/datepicker/datepicker-toggle.ts index e520b09fd..58be8f921 100644 --- a/packages/mosaic/datepicker/datepicker-toggle.ts +++ b/packages/mosaic/datepicker/datepicker-toggle.ts @@ -65,10 +65,10 @@ export class McDatepickerToggle implements AfterContentInit, OnChanges, OnDes @Input() tabIndex: number | null; /** Custom icon set by the consumer. */ - @ContentChild(McDatepickerToggleIcon) customIcon: McDatepickerToggleIcon; + @ContentChild(McDatepickerToggleIcon, {static: false}) customIcon: McDatepickerToggleIcon; /** Underlying button element. */ - @ViewChild('button') button: McButton; + @ViewChild('button', {static: false}) button: McButton; private stateChanges = Subscription.EMPTY; private _disabled: boolean; diff --git a/packages/mosaic/datepicker/datepicker.spec.ts b/packages/mosaic/datepicker/datepicker.spec.ts index 53964e1b7..d87f116ea 100644 --- a/packages/mosaic/datepicker/datepicker.spec.ts +++ b/packages/mosaic/datepicker/datepicker.spec.ts @@ -1402,8 +1402,8 @@ class StandardDatepicker { opened = false; disabled = false; date: Moment | null = moment([2020, 0, 1]); - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; } @@ -1422,7 +1422,7 @@ class MultiInputDatepicker { ` }) class NoInputDatepicker { - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; } @@ -1435,7 +1435,7 @@ class NoInputDatepicker { class DatepickerWithStartAt { date = moment([2020, 0, 1]); startDate = moment([2010, 0, 1]); - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; } @@ -1447,7 +1447,7 @@ class DatepickerWithStartAt { }) class DatepickerWithStartViewYear { date = moment([2020, 0, 1]); - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; onYearSelection() { } @@ -1463,7 +1463,7 @@ class DatepickerWithStartViewYear { }) class DatepickerWithStartViewMultiYear { date = moment([2020, 0, 1]); - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; onMultiYearSelection() { } @@ -1478,8 +1478,8 @@ class DatepickerWithStartViewMultiYear { }) class DatepickerWithNgModel { selected: Moment | null = null; - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; } @@ -1492,9 +1492,9 @@ class DatepickerWithNgModel { }) class DatepickerWithFormControl { formControl = new FormControl(); - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; - @ViewChild(McDatepickerToggle) datepickerToggle: McDatepickerToggle; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; + @ViewChild(McDatepickerToggle, {static: false}) datepickerToggle: McDatepickerToggle; } @@ -1506,8 +1506,8 @@ class DatepickerWithFormControl { ` }) class DatepickerWithToggle { - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) input: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) input: McDatepickerInput; } @@ -1533,9 +1533,9 @@ class DatepickerWithCustomIcon { ` }) class FormFieldDatepicker { - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; - @ViewChild(McFormField) formField: McFormField; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; + @ViewChild(McFormField, {static: false}) formField: McFormField; } @@ -1547,7 +1547,7 @@ class FormFieldDatepicker { ` }) class DatepickerWithMinAndMaxValidation { - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; date: Moment | null; minDate = moment([2010, 0, 1]); maxDate = moment([2020, 0, 1]); @@ -1562,7 +1562,7 @@ class DatepickerWithMinAndMaxValidation { ` }) class DatepickerWithFilterAndValidation { - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; date: Moment; filter = (date: Moment) => date.date() !== 1; } @@ -1576,7 +1576,7 @@ class DatepickerWithFilterAndValidation { ` }) class DatepickerWithChangeAndInputEvents { - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; onChange() { } @@ -1600,8 +1600,8 @@ class DatepickerWithChangeAndInputEvents { }) class DatepickerWithi18n { date: Moment | null = moment([2010, 0, 1]); - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; } @@ -1617,8 +1617,8 @@ class DatepickerWithISOStrings { min = new Date(2017, 0, 1).toISOString(); max = new Date (2017, 11, 31).toISOString(); startAt = new Date(2017, 6, 1).toISOString(); - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; } @@ -1632,7 +1632,7 @@ class DatepickerWithEvents { selected: Moment | null = null; openedSpy = jasmine.createSpy('opened spy'); closedSpy = jasmine.createSpy('closed spy'); - @ViewChild('d') datepicker: McDatepicker; + @ViewChild('d', {static: false}) datepicker: McDatepicker; } @@ -1643,7 +1643,7 @@ class DatepickerWithEvents { ` }) class DatepickerOpeningOnFocus { - @ViewChild(McDatepicker) datepicker: McDatepicker; + @ViewChild(McDatepicker, {static: false}) datepicker: McDatepicker; } @@ -1654,7 +1654,7 @@ class DatepickerOpeningOnFocus { ` }) class DatepickerWithCustomHeader { - @ViewChild('ch') datepicker: McDatepicker; + @ViewChild('ch', {static: false}) datepicker: McDatepicker; customHeaderForDatePicker = CustomHeaderForDatepicker; } @@ -1674,8 +1674,8 @@ class CustomHeaderForDatepicker { ` }) class DelayedDatepicker { - @ViewChild('d') datepicker: McDatepicker; - @ViewChild(McDatepickerInput) datepickerInput: McDatepickerInput; + @ViewChild('d', {static: false}) datepicker: McDatepicker; + @ViewChild(McDatepickerInput, {static: false}) datepickerInput: McDatepickerInput; date: Moment | null; assignedDatepicker: McDatepicker; } diff --git a/packages/mosaic/datepicker/datepicker.ts b/packages/mosaic/datepicker/datepicker.ts index 90d3a46ec..468e71968 100644 --- a/packages/mosaic/datepicker/datepicker.ts +++ b/packages/mosaic/datepicker/datepicker.ts @@ -108,7 +108,7 @@ export class McDatepickerContent extends McDatepickerContentMixinBase implements AfterViewInit, CanColor { /** Reference to the internal calendar component. */ - @ViewChild(McCalendar) calendar: McCalendar; + @ViewChild(McCalendar, {static: false}) calendar: McCalendar; /** Reference to the datepicker that created the overlay. */ datepicker: McDatepicker; diff --git a/packages/mosaic/datepicker/month-view.ts b/packages/mosaic/datepicker/month-view.ts index 1d230aa40..438d6572c 100644 --- a/packages/mosaic/datepicker/month-view.ts +++ b/packages/mosaic/datepicker/month-view.ts @@ -112,7 +112,7 @@ export class McMonthView implements AfterContentInit { @Output() readonly activeDateChange: EventEmitter = new EventEmitter(); /** The body of calendar table */ - @ViewChild(McCalendarBody) mcCalendarBody: McCalendarBody; + @ViewChild(McCalendarBody, {static: false}) mcCalendarBody: McCalendarBody; /** The label for this month (e.g. "January 2017"). */ monthLabel: string; diff --git a/packages/mosaic/datepicker/multi-year-view.spec.ts b/packages/mosaic/datepicker/multi-year-view.spec.ts index ffe4fa92a..f8262695b 100644 --- a/packages/mosaic/datepicker/multi-year-view.spec.ts +++ b/packages/mosaic/datepicker/multi-year-view.spec.ts @@ -270,7 +270,7 @@ class StandardMultiYearView { selected = moment([2020, 0, 1]); selectedYear: Moment; - @ViewChild(McMultiYearView) multiYearView: McMultiYearView; + @ViewChild(McMultiYearView, {static: false}) multiYearView: McMultiYearView; } @Component({ diff --git a/packages/mosaic/datepicker/multi-year-view.ts b/packages/mosaic/datepicker/multi-year-view.ts index 084a12680..3e66e1042 100644 --- a/packages/mosaic/datepicker/multi-year-view.ts +++ b/packages/mosaic/datepicker/multi-year-view.ts @@ -109,7 +109,7 @@ export class McMultiYearView implements AfterContentInit { @Output() readonly activeDateChange: EventEmitter = new EventEmitter(); /** The body of calendar table */ - @ViewChild(McCalendarBody) mcCalendarBody: McCalendarBody; + @ViewChild(McCalendarBody, {static: false}) mcCalendarBody: McCalendarBody; /** Grid of calendar cells representing the currently displayed years. */ years: McCalendarCell[][]; diff --git a/packages/mosaic/datepicker/year-view.spec.ts b/packages/mosaic/datepicker/year-view.spec.ts index 9e6c57ba1..c0453fb92 100644 --- a/packages/mosaic/datepicker/year-view.spec.ts +++ b/packages/mosaic/datepicker/year-view.spec.ts @@ -338,7 +338,7 @@ class StandardYearView { selected = moment([2017, 2, 10]); selectedMonth: Moment; - @ViewChild(McYearView) yearView: McYearView; + @ViewChild(McYearView, {static: false}) yearView: McYearView; } diff --git a/packages/mosaic/datepicker/year-view.ts b/packages/mosaic/datepicker/year-view.ts index dc174d2ce..b02dfee17 100644 --- a/packages/mosaic/datepicker/year-view.ts +++ b/packages/mosaic/datepicker/year-view.ts @@ -103,7 +103,7 @@ export class McYearView implements AfterContentInit { @Output() readonly activeDateChange: EventEmitter = new EventEmitter(); /** The body of calendar table */ - @ViewChild(McCalendarBody) mcCalendarBody: McCalendarBody; + @ViewChild(McCalendarBody, {static: false}) mcCalendarBody: McCalendarBody; /** Grid of calendar cells representing the months of the year. */ months: McCalendarCell[][]; diff --git a/packages/mosaic/dropdown/dropdown-item.ts b/packages/mosaic/dropdown/dropdown-item.ts index 9a5432a6c..77c5a00d1 100644 --- a/packages/mosaic/dropdown/dropdown-item.ts +++ b/packages/mosaic/dropdown/dropdown-item.ts @@ -56,7 +56,7 @@ export class McDropdownItem extends _McDropdownItemMixinBase /** ARIA role for the dropdown item. */ @Input() role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox' = 'menuitem'; - @ViewChild('content') content; + @ViewChild('content', {static: false}) content; private _document: Document; diff --git a/packages/mosaic/dropdown/dropdown.component.ts b/packages/mosaic/dropdown/dropdown.component.ts index 0df0d8365..3effdbc0c 100644 --- a/packages/mosaic/dropdown/dropdown.component.ts +++ b/packages/mosaic/dropdown/dropdown.component.ts @@ -198,7 +198,7 @@ export class McDropdown implements AfterContentInit, McDropdownPanel; + @ViewChild(TemplateRef, {static: false}) templateRef: TemplateRef; /** * List of the items inside of a dropdown. @@ -209,7 +209,7 @@ export class McDropdown implements AfterContentInit, McDropdownPanel { // tslint:disable-next-line const scrolledSubject = new Subject(); const fixture = createComponent(SimpleDropdown, [ - {provide: ScrollDispatcher, useFactory: () => ({scrolled: () => scrolledSubject})}, + { + provide: ScrollDispatcher, useFactory: () => ({scrolled: () => scrolledSubject}) + }, { provide: MC_DROPDOWN_SCROLL_STRATEGY, deps: [Overlay], useFactory: (overlay: Overlay) => () => overlay.scrollStrategies.close() } ], [FakeIcon]); - const trigger = fixture.componentInstance.trigger; fixture.detectChanges(); + + const trigger = fixture.componentInstance.trigger; + trigger.open(); fixture.detectChanges(); @@ -1721,9 +1725,9 @@ describe('McDropdown default overrides', () => { ` }) class SimpleDropdown { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; - @ViewChild('triggerEl') triggerEl: ElementRef; - @ViewChild(McDropdown) dropdown: McDropdown; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; + @ViewChild('triggerEl', {static: false}) triggerEl: ElementRef; + @ViewChild(McDropdown, {static: false}) dropdown: McDropdown; @ViewChildren(McDropdownItem) items: QueryList; extraItems: string[] = []; closeCallback = jasmine.createSpy('dropdown closed callback'); @@ -1739,8 +1743,8 @@ class SimpleDropdown { ` }) class PositionedDropdown { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; - @ViewChild('triggerEl') triggerEl: ElementRef; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; + @ViewChild('triggerEl', {static: false}) triggerEl: ElementRef; xPosition: DropdownPositionX = 'before'; yPosition: DropdownPositionY = 'above'; } @@ -1760,8 +1764,8 @@ interface TestableDropdown { }) class OverlapDropdown implements TestableDropdown { @Input() overlapTriggerY: boolean; - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; - @ViewChild('triggerEl') triggerEl: ElementRef; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; + @ViewChild('triggerEl', {static: false}) triggerEl: ElementRef; } @Component({ @@ -1782,7 +1786,7 @@ class CustomDropdownPanel implements McDropdownPanel { overlapTriggerY = true; parent: McDropdownPanel; - @ViewChild(TemplateRef) templateRef: TemplateRef; + @ViewChild(TemplateRef, {static: false}) templateRef: TemplateRef; @Output() closed = new EventEmitter(); backdropClass: string; hasBackdrop: boolean; @@ -1805,7 +1809,7 @@ class CustomDropdownPanel implements McDropdownPanel { ` }) class CustomDropdown { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; } @Component({ @@ -1860,22 +1864,22 @@ class CustomDropdown { ` }) class NestedDropdown { - @ViewChild('root') rootDropdown: McDropdown; - @ViewChild('rootTrigger') rootTrigger: McDropdownTrigger; - @ViewChild('rootTriggerEl') rootTriggerEl: ElementRef; - @ViewChild('alternateTrigger') alternateTrigger: McDropdownTrigger; + @ViewChild('root', {static: false}) rootDropdown: McDropdown; + @ViewChild('rootTrigger', {static: false}) rootTrigger: McDropdownTrigger; + @ViewChild('rootTriggerEl', {static: false}) rootTriggerEl: ElementRef; + @ViewChild('alternateTrigger', {static: false}) alternateTrigger: McDropdownTrigger; readonly rootCloseCallback = jasmine.createSpy('root dropdown closed callback'); - @ViewChild('levelOne') levelOneDropdown: McDropdown; - @ViewChild('levelOneTrigger') levelOneTrigger: McDropdownTrigger; + @ViewChild('levelOne', {static: false}) levelOneDropdown: McDropdown; + @ViewChild('levelOneTrigger', {static: false}) levelOneTrigger: McDropdownTrigger; readonly levelOneCloseCallback = jasmine.createSpy('level one dropdown closed callback'); - @ViewChild('levelTwo') levelTwoDropdown: McDropdown; - @ViewChild('levelTwoTrigger') levelTwoTrigger: McDropdownTrigger; + @ViewChild('levelTwo', {static: false}) levelTwoDropdown: McDropdown; + @ViewChild('levelTwoTrigger', {static: false}) levelTwoTrigger: McDropdownTrigger; readonly levelTwoCloseCallback = jasmine.createSpy('level one dropdown closed callback'); - @ViewChild('lazy') lazyDropdown: McDropdown; - @ViewChild('lazyTrigger') lazyTrigger: McDropdownTrigger; + @ViewChild('lazy', {static: false}) lazyDropdown: McDropdown; + @ViewChild('lazyTrigger', {static: false}) lazyTrigger: McDropdownTrigger; showLazy = false; } @@ -1898,8 +1902,8 @@ class NestedDropdown { ` }) class NestedDropdownRepeater { - @ViewChild('rootTriggerEl') rootTriggerEl: ElementRef; - @ViewChild('levelOneTrigger') levelOneTrigger: McDropdownTrigger; + @ViewChild('rootTriggerEl', {static: false}) rootTriggerEl: ElementRef; + @ViewChild('levelOneTrigger', {static: false}) levelOneTrigger: McDropdownTrigger; items = ['one', 'two', 'three']; } @@ -1919,7 +1923,7 @@ class NestedDropdownRepeater { ` }) class NestedDropdownDeclaredInsideParentDropdown { - @ViewChild('rootTriggerEl') rootTriggerEl: ElementRef; + @ViewChild('rootTriggerEl', {static: false}) rootTriggerEl: ElementRef; } @@ -1942,8 +1946,8 @@ class FakeIcon {} ` }) class SimpleLazyDropdown { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; - @ViewChild('triggerEl') triggerEl: ElementRef; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; + @ViewChild('triggerEl', {static: false}) triggerEl: ElementRef; @ViewChildren(McDropdownItem) items: QueryList; } @@ -1968,8 +1972,8 @@ class SimpleLazyDropdown { ` }) class LazyDropdownWithContext { - @ViewChild('triggerOne') triggerOne: McDropdownTrigger; - @ViewChild('triggerTwo') triggerTwo: McDropdownTrigger; + @ViewChild('triggerOne', {static: false}) triggerOne: McDropdownTrigger; + @ViewChild('triggerTwo', {static: false}) triggerTwo: McDropdownTrigger; } @@ -1986,9 +1990,9 @@ class LazyDropdownWithContext { ` }) class DynamicPanelDropdown { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; - @ViewChild('one') first: McDropdown; - @ViewChild('two') second: McDropdown; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; + @ViewChild('one', {static: false}) first: McDropdown; + @ViewChild('two', {static: false}) second: McDropdown; } @@ -2003,5 +2007,5 @@ class DynamicPanelDropdown { ` }) class DropdownWithCheckboxItems { - @ViewChild(McDropdownTrigger) trigger: McDropdownTrigger; + @ViewChild(McDropdownTrigger, {static: false}) trigger: McDropdownTrigger; } diff --git a/packages/mosaic/form-field/form-field.ts b/packages/mosaic/form-field/form-field.ts index c3a3041f0..5032a702f 100644 --- a/packages/mosaic/form-field/form-field.ts +++ b/packages/mosaic/form-field/form-field.ts @@ -76,16 +76,16 @@ export const _McFormFieldMixinBase: CanColorCtor & typeof McFormFieldBase = mixi export class McFormField extends _McFormFieldMixinBase implements AfterContentInit, AfterContentChecked, AfterViewInit, CanColor { - @ContentChild(McFormFieldControl) _control: McFormFieldControl; - @ContentChild(McFormFieldNumberControl) _numberControl: McFormFieldNumberControl; - @ContentChild(McStepper) _stepper: McStepper; + @ContentChild(McFormFieldControl, {static: false}) _control: McFormFieldControl; + @ContentChild(McFormFieldNumberControl, {static: false}) _numberControl: McFormFieldNumberControl; + @ContentChild(McStepper, {static: false}) _stepper: McStepper; @ContentChildren(McHint) _hint: QueryList; @ContentChildren(McSuffix) _suffix: QueryList; @ContentChildren(McPrefix) _prefix: QueryList; @ContentChildren(McCleaner) _cleaner: QueryList; - @ViewChild('connectionContainer') connectionContainerRef: ElementRef; + @ViewChild('connectionContainer', {static: true}) connectionContainerRef: ElementRef; // Unique id for the internal form field label. _labelId = `mc-form-field-label-${nextUniqueId++}`; diff --git a/packages/mosaic/list/list-selection.component.spec.ts b/packages/mosaic/list/list-selection.component.spec.ts index 6d99bef27..fbe98f3c9 100644 --- a/packages/mosaic/list/list-selection.component.spec.ts +++ b/packages/mosaic/list/list-selection.component.spec.ts @@ -313,14 +313,12 @@ describe('McListSelection without forms', () => { fixture.detectChanges(); tick(201); - console.log(manager.activeItemIndex); expect(manager.activeItemIndex).toBe(1); dispatchEvent(listEl, createKeyboardEvent('keydown', 68, undefined, 'd')); fixture.detectChanges(); tick(200); - console.log(manager.activeItemIndex); expect(manager.activeItemIndex).toBe(3); })); diff --git a/packages/mosaic/list/list-selection.component.ts b/packages/mosaic/list/list-selection.component.ts index 494527fb4..cfe4c414d 100644 --- a/packages/mosaic/list/list-selection.component.ts +++ b/packages/mosaic/list/list-selection.component.ts @@ -25,9 +25,9 @@ import { END, ENTER, hasModifierKey, - HOME, LEFT_ARROW, + HOME, PAGE_DOWN, - PAGE_UP, RIGHT_ARROW, + PAGE_UP, SPACE, TAB, UP_ARROW @@ -69,7 +69,7 @@ export class McListOption implements OnDestroy, OnInit, IFocusableOption { @ContentChildren(McLine) lines: QueryList; - @ViewChild('text') text: ElementRef; + @ViewChild('text', {static: false}) text: ElementRef; // Whether the label should appear before or after the checkbox. Defaults to 'after' @Input() checkboxPosition: 'before' | 'after' = 'after'; diff --git a/packages/mosaic/modal/modal.component.ts b/packages/mosaic/modal/modal.component.ts index 4e716438f..e5d4b185c 100644 --- a/packages/mosaic/modal/modal.component.ts +++ b/packages/mosaic/modal/modal.component.ts @@ -117,10 +117,10 @@ export class McModalComponent extends McModalRef @Input() @Output() mcOnCancel: EventEmitter | OnClickCallback = new EventEmitter(); - @ViewChild('modalContainer') modalContainer: ElementRef; - @ViewChild('bodyContainer', { read: ViewContainerRef }) bodyContainer: ViewContainerRef; + @ViewChild('modalContainer', {static: false}) modalContainer: ElementRef; + @ViewChild('bodyContainer', { read: ViewContainerRef, static: false}) bodyContainer: ViewContainerRef; // Only aim to focus the ok button that needs to be auto focused - @ViewChild('autoFocusButtonOk', { read: ElementRef }) autoFocusButtonOk: ElementRef; + @ViewChild('autoFocusButtonOk', { read: ElementRef, static: false}) autoFocusButtonOk: ElementRef; maskAnimationClassMap: object; modalAnimationClassMap: object; diff --git a/packages/mosaic/navbar/navbar.component.spec.ts b/packages/mosaic/navbar/navbar.component.spec.ts index ca6af78b5..3c2549d76 100644 --- a/packages/mosaic/navbar/navbar.component.spec.ts +++ b/packages/mosaic/navbar/navbar.component.spec.ts @@ -190,7 +190,7 @@ describe('McNavbar', () => { templateUrl: './navbar.component.spec.html' }) class TestApp { - @ViewChild('navbar') + @ViewChild('navbar', {static: false}) navbar: McNavbar; counter: number = 0; diff --git a/packages/mosaic/navbar/navbar.component.ts b/packages/mosaic/navbar/navbar.component.ts index 21d3c27d6..61d158895 100644 --- a/packages/mosaic/navbar/navbar.component.ts +++ b/packages/mosaic/navbar/navbar.component.ts @@ -124,10 +124,10 @@ export class McNavbarItem extends _McNavbarMixinBase implements OnInit, AfterVie this.elementRef.nativeElement.setAttribute('computedTitle', encodeURI(value)); } - @ContentChild('dropdownItemTmpl', { read: TemplateRef }) + @ContentChild('dropdownItemTmpl', { read: TemplateRef, static: false }) dropdownItemTmpl: TemplateRef; - @ViewChild('dropdownContent', { read: ElementRef }) + @ViewChild('dropdownContent', { read: ElementRef, static: false }) dropdownContent: ElementRef; get hasDropdownContent() { diff --git a/packages/mosaic/popover/popover.spec.ts b/packages/mosaic/popover/popover.spec.ts index 21dd3c0a4..c3efc471a 100644 --- a/packages/mosaic/popover/popover.spec.ts +++ b/packages/mosaic/popover/popover.spec.ts @@ -175,12 +175,12 @@ describe('McPopover', () => { class McPopoverTestComponent { popoverVisibility: boolean = false; - @ViewChild('test1') test1: ElementRef; - @ViewChild('test2') test2: ElementRef; - @ViewChild('test3') test3: ElementRef; - @ViewChild('test4') test4: ElementRef; - @ViewChild('test5') test5: ElementRef; - @ViewChild('test6') test6: ElementRef; - @ViewChild('test7') test7: ElementRef; + @ViewChild('test1', {static: false}) test1: ElementRef; + @ViewChild('test2', {static: false}) test2: ElementRef; + @ViewChild('test3', {static: false}) test3: ElementRef; + @ViewChild('test4', {static: false}) test4: ElementRef; + @ViewChild('test5', {static: false}) test5: ElementRef; + @ViewChild('test6', {static: false}) test6: ElementRef; + @ViewChild('test7', {static: false}) test7: ElementRef; } diff --git a/packages/mosaic/radio/radio.component.ts b/packages/mosaic/radio/radio.component.ts index d099bbc5c..90247ebd3 100644 --- a/packages/mosaic/radio/radio.component.ts +++ b/packages/mosaic/radio/radio.component.ts @@ -408,7 +408,7 @@ export class McRadioButton extends _McRadioButtonMixinBase private _labelPosition: 'before' | 'after'; /** The native `` element */ - @ViewChild('input') _inputElement: ElementRef; + @ViewChild('input', {static: false}) _inputElement: ElementRef; /** * Event emitted when the checked state of this radio button changes. diff --git a/packages/mosaic/radio/radio.spec.ts b/packages/mosaic/radio/radio.spec.ts index ecc85aee3..62744e480 100644 --- a/packages/mosaic/radio/radio.spec.ts +++ b/packages/mosaic/radio/radio.spec.ts @@ -356,7 +356,7 @@ class RadiosInsideRadioGroup { template: `One` }) class DisableableRadioButton { - @ViewChild(McRadioButton) mcRadioButton; + @ViewChild(McRadioButton, {static: false}) mcRadioButton; set disabled(value: boolean) { this.mcRadioButton.disabled = value; diff --git a/packages/mosaic/select/select.component.spec.ts b/packages/mosaic/select/select.component.spec.ts index 837af5947..41bd2baa2 100644 --- a/packages/mosaic/select/select.component.spec.ts +++ b/packages/mosaic/select/select.component.spec.ts @@ -132,7 +132,7 @@ class BasicSelect { tabIndexOverride: number; panelClass = ['custom-one', 'custom-two']; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: true}) select: McSelect; @ViewChildren(McOption) options: QueryList; } @@ -156,7 +156,7 @@ class NgModelSelect { ]; isDisabled: boolean; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; } @@ -203,7 +203,7 @@ class NgIfSelect { ]; control = new FormControl('pizza-1'); - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; } @Component({ @@ -287,7 +287,7 @@ class SelectWithSearch { }] }) class CustomSelectAccessor implements ControlValueAccessor { - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; writeValue: (value?: any) => void = () => {}; registerOnChange: (changeFn?: (value: any) => void) => void = () => {}; @@ -306,7 +306,7 @@ class CustomSelectAccessor implements ControlValueAccessor { }) class CompWithCustomSelect { ctrl = new FormControl('initial value'); - @ViewChild(CustomSelectAccessor) customAccessor: CustomSelectAccessor; + @ViewChild(CustomSelectAccessor, {static: true}) customAccessor: CustomSelectAccessor; } @Component({ @@ -402,7 +402,7 @@ class MultiSelect { ]; control = new FormControl(); - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; sortComparator: (a: McOption, b: McOption, options: McOption[]) => number; } @@ -468,7 +468,7 @@ class BasicSelectNoPlaceholder { ` }) class BasicSelectWithTheming { - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; theme: string; } @@ -496,7 +496,7 @@ class ResetValuesSelect { ]; control = new FormControl(); - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; } @Component({ @@ -572,7 +572,7 @@ class SelectWithGroups { } ]; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; } @@ -626,8 +626,8 @@ class InvalidSelectInForm { ` }) class SelectInsideFormGroup { - @ViewChild(FormGroupDirective) formGroupDirective: FormGroupDirective; - @ViewChild(McSelect) select: McSelect; + @ViewChild(FormGroupDirective, {static: false}) formGroupDirective: FormGroupDirective; + @ViewChild(McSelect, {static: false}) select: McSelect; formControl = new FormControl('', Validators.required); formGroup = new FormGroup({ food: this.formControl @@ -653,7 +653,7 @@ class BasicSelectWithoutForms { { value: 'sandwich-2', viewValue: 'Sandwich' } ]; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; } @Component({ @@ -674,7 +674,7 @@ class BasicSelectWithoutFormsPreselected { { value: 'pizza-1', viewValue: 'Pizza' } ]; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; } @Component({ @@ -696,7 +696,7 @@ class BasicSelectWithoutFormsMultiple { { value: 'sandwich-2', viewValue: 'Sandwich' } ]; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; } @Component({ @@ -742,7 +742,7 @@ class NgModelCompareWithSelect { selectedFood: { value: string; viewValue: string } = { value: 'pizza-1', viewValue: 'Pizza' }; comparator: ((f1: any, f2: any) => boolean) | null = this.compareByValue; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; useCompareByValue() { @@ -780,7 +780,7 @@ class NgModelCompareWithSelect { ` }) class CustomErrorBehaviorSelect { - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; control = new FormControl(); foods: any[] = [ { value: 'steak-0', viewValue: 'Steak' }, @@ -809,7 +809,7 @@ class SingleSelectWithPreselectedArrayValues { selectedFoods = this.foods[1].value; - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; } @@ -838,7 +838,7 @@ class SelectWithoutOptionCentering { ]; control = new FormControl('pizza-1'); - @ViewChild(McSelect) select: McSelect; + @ViewChild(McSelect, {static: false}) select: McSelect; @ViewChildren(McOption) options: QueryList; } diff --git a/packages/mosaic/select/select.component.ts b/packages/mosaic/select/select.component.ts index 427163c31..c3c173962 100644 --- a/packages/mosaic/select/select.component.ts +++ b/packages/mosaic/select/select.component.ts @@ -121,7 +121,7 @@ const McSelectMixinBase: CanDisableCtor & HasTabIndexCtor & CanUpdateErrorStateC exportAs: 'mcSelectSearch' }) export class McSelectSearch implements AfterContentInit, OnDestroy { - @ContentChild(McInput) input: McInput; + @ContentChild(McInput, {static: false}) input: McInput; searchChangesSubscription: Subscription = new Subscription(); @@ -256,18 +256,18 @@ export class McSelect extends McSelectMixinBase implements } ]; - @ViewChild('trigger') trigger: ElementRef; + @ViewChild('trigger', {static: false}) trigger: ElementRef; - @ViewChild('panel') panel: ElementRef; + @ViewChild('panel', {static: false}) panel: ElementRef; - @ViewChild('optionsContainer') optionsContainer: ElementRef; + @ViewChild('optionsContainer', {static: false}) optionsContainer: ElementRef; - @ViewChild(CdkConnectedOverlay) overlayDir: CdkConnectedOverlay; + @ViewChild(CdkConnectedOverlay, {static: false}) overlayDir: CdkConnectedOverlay; @ViewChildren(McTag) tags: QueryList; /** User-supplied override of the trigger element. */ - @ContentChild(McSelectTrigger) customTrigger: McSelectTrigger; + @ContentChild(McSelectTrigger, {static: false}) customTrigger: McSelectTrigger; /** All of the defined select options. */ @ContentChildren(McOption, { descendants: true }) options: QueryList; @@ -275,7 +275,7 @@ export class McSelect extends McSelectMixinBase implements /** All of the defined groups of options. */ @ContentChildren(McOptgroup) optionGroups: QueryList; - @ContentChild(McSelectSearch) search: McSelectSearch; + @ContentChild(McSelectSearch, {static: false}) search: McSelectSearch; /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */ @Input() panelClass: string | string[] | Set | { [key: string]: any }; diff --git a/packages/mosaic/sidepanel/sidepanel-container.component.ts b/packages/mosaic/sidepanel/sidepanel-container.component.ts index d8a6f2be4..705e9d5e8 100644 --- a/packages/mosaic/sidepanel/sidepanel-container.component.ts +++ b/packages/mosaic/sidepanel/sidepanel-container.component.ts @@ -55,7 +55,7 @@ export class McSidepanelContainerComponent extends BasePortalOutlet implements O id: string; /** The portal outlet inside of this container into which the content will be loaded. */ - @ViewChild(CdkPortalOutlet) portalOutlet: CdkPortalOutlet; + @ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet; /** The state of the sidepanel animations. */ animationState: McSidepanelAnimationState = McSidepanelAnimationState.Void; diff --git a/packages/mosaic/sidepanel/sidepanel.spec.ts b/packages/mosaic/sidepanel/sidepanel.spec.ts index 8add91efe..8fb04d8b7 100644 --- a/packages/mosaic/sidepanel/sidepanel.spec.ts +++ b/packages/mosaic/sidepanel/sidepanel.spec.ts @@ -289,7 +289,7 @@ class ComponentWithTemplateForSidepanel { localValue: string; sidepanelRef: McSidepanelRef; - @ViewChild(TemplateRef) templateRef: TemplateRef; + @ViewChild(TemplateRef, {static: true}) templateRef: TemplateRef; setSidepanelRef(sidepanelRef: McSidepanelRef): string { this.sidepanelRef = sidepanelRef; diff --git a/packages/mosaic/tabs/tab-body.spec.ts b/packages/mosaic/tabs/tab-body.spec.ts index 587f27896..7a6a2bcf7 100644 --- a/packages/mosaic/tabs/tab-body.spec.ts +++ b/packages/mosaic/tabs/tab-body.spec.ts @@ -192,8 +192,8 @@ class SimpleTabBodyApp implements AfterContentInit { position: number; origin: number | null; - @ViewChild(McTabBody) tabBody: McTabBody; - @ViewChild(TemplateRef) template: TemplateRef; + @ViewChild(McTabBody, {static: false}) tabBody: McTabBody; + @ViewChild(TemplateRef, {static: true}) template: TemplateRef; constructor(private viewContainerRef: ViewContainerRef) { } diff --git a/packages/mosaic/tabs/tab-body.ts b/packages/mosaic/tabs/tab-body.ts index 35c2537da..99033a245 100644 --- a/packages/mosaic/tabs/tab-body.ts +++ b/packages/mosaic/tabs/tab-body.ts @@ -87,7 +87,7 @@ export class McTabBody implements OnInit, OnDestroy { @Output() readonly onCentered: EventEmitter = new EventEmitter(true); /** The portal host inside of this container into which the tab body content will be loaded. */ - @ViewChild(PortalHostDirective) portalHost: PortalHostDirective; + @ViewChild(PortalHostDirective, {static: false}) portalHost: PortalHostDirective; /** The tab body content to display. */ @Input('content') content: TemplatePortal; diff --git a/packages/mosaic/tabs/tab-group.spec.ts b/packages/mosaic/tabs/tab-group.spec.ts index cb5944100..7df3fbf6b 100644 --- a/packages/mosaic/tabs/tab-group.spec.ts +++ b/packages/mosaic/tabs/tab-group.spec.ts @@ -770,7 +770,7 @@ class AsyncTabsTestApp implements OnInit { class TabGroupWithSimpleApi { otherLabel = 'Fruit'; otherContent = 'Apples, grapes'; - @ViewChild('legumes') legumes: any; + @ViewChild('legumes', {static: false}) legumes: any; } diff --git a/packages/mosaic/tabs/tab-group.ts b/packages/mosaic/tabs/tab-group.ts index 4d79ef8f8..96d1a53cc 100644 --- a/packages/mosaic/tabs/tab-group.ts +++ b/packages/mosaic/tabs/tab-group.ts @@ -125,9 +125,9 @@ export class McTabGroup extends mcTabGroupMixinBase implements AfterContentInit, @ContentChildren(McTab) tabs: QueryList; - @ViewChild('tabBodyWrapper') tabBodyWrapper: ElementRef; + @ViewChild('tabBodyWrapper', {static: false}) tabBodyWrapper: ElementRef; - @ViewChild('tabHeader') tabHeader: McTabHeader; + @ViewChild('tabHeader', {static: false}) tabHeader: McTabHeader; /** Position of the tab header. */ @Input() headerPosition: McTabHeaderPosition = 'above'; diff --git a/packages/mosaic/tabs/tab-header.spec.ts b/packages/mosaic/tabs/tab-header.spec.ts index 80e21d679..084064a9d 100644 --- a/packages/mosaic/tabs/tab-header.spec.ts +++ b/packages/mosaic/tabs/tab-header.spec.ts @@ -355,7 +355,7 @@ class SimpleTabHeaderApp { ]; dir: Direction = 'ltr'; - @ViewChild(McTabHeader) + @ViewChild(McTabHeader, {static: true}) tabHeader: McTabHeader; constructor() { diff --git a/packages/mosaic/tabs/tab-header.ts b/packages/mosaic/tabs/tab-header.ts index ed83a304b..00e7157a6 100644 --- a/packages/mosaic/tabs/tab-header.ts +++ b/packages/mosaic/tabs/tab-header.ts @@ -121,9 +121,9 @@ export class McTabHeader extends McTabHeaderBase @ContentChildren(McTabLabelWrapper) labelWrappers: QueryList; - @ViewChild('tabListContainer') + @ViewChild('tabListContainer', {static: true}) tabListContainer: ElementRef; - @ViewChild('tabList') + @ViewChild('tabList', {static: true}) tabList: ElementRef; /** Whether the controls for pagination should be displayed */ diff --git a/packages/mosaic/tabs/tab-nav-bar/tab-nav-bar.spec.ts b/packages/mosaic/tabs/tab-nav-bar/tab-nav-bar.spec.ts index 1bf2986fb..75f100b47 100644 --- a/packages/mosaic/tabs/tab-nav-bar/tab-nav-bar.spec.ts +++ b/packages/mosaic/tabs/tab-nav-bar/tab-nav-bar.spec.ts @@ -257,10 +257,8 @@ describe('McTabNavBar', () => { ` }) class SimpleTabNavBarTestApp { - @ViewChild(McTabNav) - tabNavBar: McTabNav; - @ViewChildren(McTabLink) - tabLinks: QueryList; + @ViewChild(McTabNav, {static: false}) tabNavBar: McTabNav; + @ViewChildren(McTabLink) tabLinks: QueryList; label = ''; disabled = false; diff --git a/packages/mosaic/tabs/tab.ts b/packages/mosaic/tabs/tab.ts index 77e5f5842..6b2638650 100644 --- a/packages/mosaic/tabs/tab.ts +++ b/packages/mosaic/tabs/tab.ts @@ -47,17 +47,17 @@ export class McTab extends mcTabMixinBase return this.contentPortal; } /** Content for the tab label given by ``. */ - @ContentChild(McTabLabel) + @ContentChild(McTabLabel, {static: false}) templateLabel: McTabLabel; /** * Template provided in the tab content that will be used if present, used to enable lazy-loading */ - @ContentChild(McTabContent, { read: TemplateRef }) + @ContentChild(McTabContent, { read: TemplateRef, static: true }) explicitContent: TemplateRef; /** Template inside the McTab view that contains an ``. */ - @ViewChild(TemplateRef) + @ViewChild(TemplateRef, {static: true}) implicitContent: TemplateRef; /** Plain text label for the tab, used when there is no template label. */ diff --git a/packages/mosaic/tags/tag-input.spec.ts b/packages/mosaic/tags/tag-input.spec.ts index 10157885b..50065d782 100644 --- a/packages/mosaic/tags/tag-input.spec.ts +++ b/packages/mosaic/tags/tag-input.spec.ts @@ -217,7 +217,7 @@ describe('McTagInput', () => { ` }) class TestTagInput { - @ViewChild(McTagList) tagListInstance: McTagList; + @ViewChild(McTagList, {static: false}) tagListInstance: McTagList; addOnBlur: boolean = false; placeholder = ''; diff --git a/packages/mosaic/tags/tag-list.component.spec.ts b/packages/mosaic/tags/tag-list.component.spec.ts index 990f210b1..099416e0f 100644 --- a/packages/mosaic/tags/tag-list.component.spec.ts +++ b/packages/mosaic/tags/tag-list.component.spec.ts @@ -1377,7 +1377,7 @@ class BasicTagList { tabIndexOverride: number; selectable: boolean; - @ViewChild(McTagList) tagList: McTagList; + @ViewChild(McTagList, {static: false}) tagList: McTagList; @ViewChildren(McTag) tags: QueryList; } @@ -1412,7 +1412,7 @@ class MultiSelectionTagList { tabIndexOverride: number; selectable: boolean; - @ViewChild(McTagList) tagList: McTagList; + @ViewChild(McTagList, {static: false}) tagList: McTagList; @ViewChildren(McTag) tags: QueryList; } @@ -1451,7 +1451,7 @@ class InputTagList { addOnBlur: boolean = true; isRequired: boolean; - @ViewChild(McTagList) tagList: McTagList; + @ViewChild(McTagList, {static: false}) tagList: McTagList; @ViewChildren(McTag) tags: QueryList; add(event: McTagInputEvent): void { @@ -1543,7 +1543,7 @@ class TagListWithFormErrorMessages { @ViewChildren(McTag) tags: QueryList; - @ViewChild('form') form: NgForm; + @ViewChild('form', {static: false}) form: NgForm; } diff --git a/packages/mosaic/tags/tag.component.spec.ts b/packages/mosaic/tags/tag.component.spec.ts index d9665c3e8..06a505897 100644 --- a/packages/mosaic/tags/tag.component.spec.ts +++ b/packages/mosaic/tags/tag.component.spec.ts @@ -370,7 +370,7 @@ class SingleTag { removable: boolean = true; shouldShow: boolean = true; - @ViewChild(McTagList) tagList: McTagList; + @ViewChild(McTagList, {static: false}) tagList: McTagList; tagFocus: (event?: McTagEvent) => void = () => {}; tagDestroy: (event?: McTagEvent) => void = () => {}; diff --git a/packages/mosaic/tags/tag.component.ts b/packages/mosaic/tags/tag.component.ts index 3d24c015a..e0ee10324 100644 --- a/packages/mosaic/tags/tag.component.ts +++ b/packages/mosaic/tags/tag.component.ts @@ -114,13 +114,13 @@ export class McTag extends _McTagMixinBase implements IFocusableOption, OnDestro @ContentChildren(McIcon) contentChildren: QueryList; /** The tag avatar */ - @ContentChild(McTagAvatar) avatar: McTagAvatar; + @ContentChild(McTagAvatar, {static: false}) avatar: McTagAvatar; /** The tag's trailing icon. */ - @ContentChild(McTagTrailingIcon) trailingIcon: McTagTrailingIcon; + @ContentChild(McTagTrailingIcon, {static: false}) trailingIcon: McTagTrailingIcon; /** The tag's remove toggler. */ - @ContentChild(forwardRef(() => McTagRemove)) removeIcon: McTagRemove; + @ContentChild(forwardRef(() => McTagRemove), {static: false}) removeIcon: McTagRemove; /** Emitted when the tag is selected or deselected. */ @Output() readonly selectionChange: EventEmitter = diff --git a/packages/mosaic/toggle/toggle.component.spec.ts b/packages/mosaic/toggle/toggle.component.spec.ts index 3d756fccc..79f3cda72 100644 --- a/packages/mosaic/toggle/toggle.component.spec.ts +++ b/packages/mosaic/toggle/toggle.component.spec.ts @@ -574,7 +574,7 @@ class ToggleWithTabIndex { ` }) class ToggleUsingViewChild { - @ViewChild(McToggleComponent) toggle; + @ViewChild(McToggleComponent, {static: false}) toggle; set isDisabled(value: boolean) { this.toggle.disabled = value; diff --git a/packages/mosaic/toggle/toggle.component.ts b/packages/mosaic/toggle/toggle.component.ts index ef576d00c..0e89e1571 100644 --- a/packages/mosaic/toggle/toggle.component.ts +++ b/packages/mosaic/toggle/toggle.component.ts @@ -68,7 +68,7 @@ export class McToggleChange { export class McToggleComponent extends _McToggleMixinBase implements ControlValueAccessor, CanColor, CanDisable, HasTabIndex { - @ViewChild('input') _inputElement: ElementRef; + @ViewChild('input', {static: false}) _inputElement: ElementRef; @Input() labelPosition: ToggleLabelPositionType = 'right'; diff --git a/packages/mosaic/tooltip/tooltip.spec.ts b/packages/mosaic/tooltip/tooltip.spec.ts index f47901078..0d42b4342 100644 --- a/packages/mosaic/tooltip/tooltip.spec.ts +++ b/packages/mosaic/tooltip/tooltip.spec.ts @@ -2,7 +2,7 @@ import { Component, ElementRef, ViewChild } from '@angular/core'; import { fakeAsync, inject, tick, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { OverlayContainer } from '@ptsecurity/cdk/overlay'; -import { dispatchMouseEvent, dispatchFakeEvent } from '@ptsecurity/cdk/testing'; +import { dispatchMouseEvent } from '@ptsecurity/cdk/testing'; import { McTooltip } from './tooltip.component'; import { McToolTipModule } from './tooltip.module'; @@ -174,10 +174,10 @@ describe('McTooltip', () => { ` }) class McTooltipTestNewComponent { - @ViewChild('titleString') titleString: ElementRef; - @ViewChild('titleString', { read: McTooltip }) titleStringMcTooltipDirective: McTooltip; - @ViewChild('titleTemplate') titleTemplate: ElementRef; - @ViewChild('titleTemplate', { read: McTooltip }) titleTemplateMcTooltipDirective: McTooltip; + @ViewChild('titleString', {static: false}) titleString: ElementRef; + @ViewChild('titleString', { read: McTooltip, static: false}) titleStringMcTooltipDirective: McTooltip; + @ViewChild('titleTemplate', {static: false}) titleTemplate: ElementRef; + @ViewChild('titleTemplate', { read: McTooltip, static: false}) titleTemplateMcTooltipDirective: McTooltip; } @Component({ selector: 'mc-tooltip-test-wrapper', @@ -197,13 +197,13 @@ class McTooltipTestNewComponent { ` }) class McTooltipTestWrapperComponent { - @ViewChild('normalTrigger') normalTrigger: ElementRef; - @ViewChild('normalTrigger', { read: McTooltip }) normalDirective: McTooltip; - @ViewChild('focusTrigger') focusTrigger: ElementRef; + @ViewChild('normalTrigger', {static: false}) normalTrigger: ElementRef; + @ViewChild('normalTrigger', { read: McTooltip, static: false }) normalDirective: McTooltip; + @ViewChild('focusTrigger', {static: false}) focusTrigger: ElementRef; visible: boolean; - @ViewChild('visibleTrigger') visibleTrigger: ElementRef; - @ViewChild('mostSimpleTrigger') mostSimpleTrigger: ElementRef; - @ViewChild('mostSimpleTrigger', { read: McTooltip }) mostSimpleDirective: McTooltip; + @ViewChild('visibleTrigger', {static: false}) visibleTrigger: ElementRef; + @ViewChild('mostSimpleTrigger', {static: false}) mostSimpleTrigger: ElementRef; + @ViewChild('mostSimpleTrigger', { read: McTooltip, static: false }) mostSimpleDirective: McTooltip; } @Component({ @@ -217,6 +217,6 @@ class McTooltipTestWrapperComponent { ` }) class McTooltipDisabledComponent { - @ViewChild('disabledAttribute') disabledTrigger: ElementRef; - @ViewChild('disabledAttribute', { read: McTooltip }) disabledDirective: McTooltip; + @ViewChild('disabledAttribute', {static: false}) disabledTrigger: ElementRef; + @ViewChild('disabledAttribute', { read: McTooltip, static: false }) disabledDirective: McTooltip; } diff --git a/packages/mosaic/tree-select/tree-select.component.spec.ts b/packages/mosaic/tree-select/tree-select.component.spec.ts index eb9debf26..25489a901 100644 --- a/packages/mosaic/tree-select/tree-select.component.spec.ts +++ b/packages/mosaic/tree-select/tree-select.component.spec.ts @@ -255,7 +255,7 @@ class BasicTreeSelect { tabIndexOverride: number; panelClass = ['custom-one', 'custom-two']; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: true}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; constructor(database: FileDatabase) { @@ -303,7 +303,7 @@ class NgModelSelect { dataSource: McTreeFlatDataSource; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; constructor(database: FileDatabase) { @@ -416,7 +416,7 @@ class NgIfSelect { dataSource: McTreeFlatDataSource; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; constructor(database: FileDatabase) { this.dataSource = new McTreeFlatDataSource(this.treeControl, this.treeFlattener); @@ -502,7 +502,7 @@ class SelectWithChangeEvent { class SelectInitWithoutOptions { control = new FormControl('rootNode_1'); - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; treeControl = new FlatTreeControl(getLevel, isExpandable); @@ -534,7 +534,7 @@ class SelectInitWithoutOptions { }] }) class CustomSelectAccessor implements ControlValueAccessor { - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; writeValue: (value?: any) => void = () => {}; registerOnChange: (changeFn?: (value: any) => void) => void = () => {}; @@ -553,7 +553,7 @@ class CustomSelectAccessor implements ControlValueAccessor { }) class CompWithCustomSelect { ctrl = new FormControl('initial value'); - @ViewChild(CustomSelectAccessor) customAccessor: CustomSelectAccessor; + @ViewChild(CustomSelectAccessor, {static: true}) customAccessor: CustomSelectAccessor; } @Component({ @@ -698,10 +698,8 @@ class MultiSelect { dataSource: McTreeFlatDataSource; - @ViewChild(McTreeSelect) select: McTreeSelect; - + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; - sortComparator: (a: McTreeOption, b: McTreeOption, options: McTreeOption[]) => number; constructor(database: FileDatabase) { @@ -710,6 +708,8 @@ class MultiSelect { database.dataChange.subscribe((data) => this.dataSource.data = data); } + + hasChild(_: number, nodeData: FileFlatNode) { return nodeData.expandable; } @@ -832,7 +832,7 @@ class BasicSelectNoPlaceholder { ` }) class BasicSelectWithTheming { - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; theme: string; } @@ -861,7 +861,7 @@ class BasicSelectWithTheming { class ResetValuesSelect { control = new FormControl(); - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; treeControl = new FlatTreeControl(getLevel, isExpandable); treeFlattener = new McTreeFlattener(transformer, getLevel, isExpandable, getChildren); @@ -959,8 +959,8 @@ class InvalidSelectInForm { ` }) class SelectInsideFormGroup { - @ViewChild(FormGroupDirective) formGroupDirective: FormGroupDirective; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(FormGroupDirective, {static: false}) formGroupDirective: FormGroupDirective; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; formControl = new FormControl('', Validators.required); formGroup = new FormGroup({ @@ -1007,7 +1007,7 @@ class SelectInsideFormGroup { class BasicSelectWithoutForms { selectedFood: string | null; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; treeControl = new FlatTreeControl(getLevel, isExpandable); treeFlattener = new McTreeFlattener(transformer, getLevel, isExpandable, getChildren); @@ -1049,7 +1049,7 @@ class BasicSelectWithoutForms { class BasicSelectWithoutFormsPreselected { selectedFood = 'Pictures'; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; treeControl = new FlatTreeControl(getLevel, isExpandable); treeFlattener = new McTreeFlattener(transformer, getLevel, isExpandable, getChildren); @@ -1091,7 +1091,7 @@ class BasicSelectWithoutFormsPreselected { class BasicSelectWithoutFormsMultiple { selectedFoods: string[]; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; treeControl = new FlatTreeControl(getLevel, isExpandable); treeFlattener = new McTreeFlattener(transformer, getLevel, isExpandable, getChildren); @@ -1182,7 +1182,7 @@ class NgModelCompareWithSelect { selectedFood: { name: string; type: string } = { name: 'rootNode_1', type: 'app' }; comparator: ((f1: any, f2: any) => boolean) | null = this.compareByValue; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; treeControl = new FlatTreeControl(getLevel, isExpandable); @@ -1245,7 +1245,7 @@ class NgModelCompareWithSelect { ` }) class CustomErrorBehaviorSelect { - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; control = new FormControl(); @@ -1291,7 +1291,7 @@ class CustomErrorBehaviorSelect { class SingleSelectWithPreselectedArrayValues { selectedFood = { name: 'Pictures', type: 'app' }; - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; treeControl = new FlatTreeControl(getLevel, isExpandable); @@ -1335,7 +1335,7 @@ class SingleSelectWithPreselectedArrayValues { class SelectWithoutOptionCentering { control = new FormControl('rootNode_1'); - @ViewChild(McTreeSelect) select: McTreeSelect; + @ViewChild(McTreeSelect, {static: false}) select: McTreeSelect; @ViewChildren(McTreeOption) options: QueryList; treeControl = new FlatTreeControl(getLevel, isExpandable); @@ -1681,6 +1681,7 @@ describe('McTreeSelect', () => { const multiFixture = TestBed.createComponent(MultiSelect); const instance = multiFixture.componentInstance; + multiFixture.detectChanges(); select = multiFixture.debugElement.query(By.css('mc-tree-select')).nativeElement; const initialValue = instance.control.value; @@ -2779,8 +2780,9 @@ describe('McTreeSelect', () => { expect(fixture.componentInstance.changeListener).toHaveBeenCalled(); })); - - it('should not emit multiple change events for the same option', fakeAsync(() => { + // todo эта проверка для ситуации когда нельзя снять выделение с элемента, + // но для этого требуется реализация параметра noUnselect, поэтому пока этот TC добавлен в исключения. + xit('should not emit multiple change events for the same option', fakeAsync(() => { trigger.click(); fixture.detectChanges(); @@ -4330,6 +4332,7 @@ describe('McTreeSelect', () => { option.click(); fixture.detectChanges(); + flush(); expect(testInstance.control.value).toEqual(['rootNode_1']); @@ -4351,6 +4354,7 @@ describe('McTreeSelect', () => { options[2].click(); options[4].click(); fixture.detectChanges(); + flush(); expect(Array.from(trigger.querySelectorAll('mc-tag'), (item) => item.textContent!.trim())) .toEqual(['rootNode_1', 'Documents :', 'Applications :']); diff --git a/packages/mosaic/tree-select/tree-select.component.ts b/packages/mosaic/tree-select/tree-select.component.ts index cfe09f6a6..017d1578b 100644 --- a/packages/mosaic/tree-select/tree-select.component.ts +++ b/packages/mosaic/tree-select/tree-select.component.ts @@ -207,18 +207,18 @@ export class McTreeSelect extends McTreeSelectMixinBase implements } ]; - @ViewChild('trigger') trigger: ElementRef; + @ViewChild('trigger', {static: false}) trigger: ElementRef; - @ViewChild('panel') panel: ElementRef; + @ViewChild('panel', {static: false}) panel: ElementRef; - @ViewChild(CdkConnectedOverlay) overlayDir: CdkConnectedOverlay; + @ViewChild(CdkConnectedOverlay, {static: false}) overlayDir: CdkConnectedOverlay; @ViewChildren(McTag) tags: QueryList; /** User-supplied override of the trigger element. */ - @ContentChild(McTreeSelectTrigger) customTrigger: McTreeSelectTrigger; + @ContentChild(McTreeSelectTrigger, {static: false}) customTrigger: McTreeSelectTrigger; - @ContentChild(McTreeSelection) tree: McTreeSelection; + @ContentChild(McTreeSelection, {static: false}) tree: McTreeSelection; /** Event emitted when the select panel has been toggled. */ @Output() readonly openedChange: EventEmitter = new EventEmitter(); diff --git a/packages/mosaic/tree/tree-option.ts b/packages/mosaic/tree/tree-option.ts index 8d48de6f0..656f8e2e8 100644 --- a/packages/mosaic/tree/tree-option.ts +++ b/packages/mosaic/tree/tree-option.ts @@ -7,7 +7,7 @@ import { ElementRef, Inject, Optional, - InjectionToken + InjectionToken, ViewEncapsulation } from '@angular/core'; import { SelectionModel } from '@ptsecurity/cdk/collections'; import { CdkTreeNode } from '@ptsecurity/cdk/tree'; @@ -196,7 +196,7 @@ export class McTreeOption extends CdkTreeNode implements CanDisabl * select's trigger. */ get viewValue(): string { - // TODO(kara): Add input property alternative for node envs. + // TODO: Add input property alternative for node envs. return (this.getHostElement().textContent || '').trim(); } @@ -218,7 +218,7 @@ export class McTreeOption extends CdkTreeNode implements CanDisabl selectViaInteraction(): void { if (!this.disabled) { - this._selected = this.multiple ? !this._selected : true; + this._selected = !this._selected; this.changeDetectorRef.markForCheck(); this.emitSelectionChangeEvent(true); diff --git a/packages/mosaic/tree/tree-selection.ts b/packages/mosaic/tree/tree-selection.ts index fe1b12737..30094590a 100644 --- a/packages/mosaic/tree/tree-selection.ts +++ b/packages/mosaic/tree/tree-selection.ts @@ -15,7 +15,7 @@ import { ViewEncapsulation, ElementRef } from '@angular/core'; -import { NodeDef, ViewData } from '@angular/core/src/view'; +import { NodeDef, ViewData } from '@angular/core/esm2015/src/view'; import { ActiveDescendantKeyManager } from '@ptsecurity/cdk/a11y'; import { SelectionModel } from '@ptsecurity/cdk/collections'; import { END, ENTER, HOME, LEFT_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, SPACE } from '@ptsecurity/cdk/keycodes'; @@ -79,7 +79,7 @@ const McTreeSelectionBaseMixin: HasTabIndexCtor & CanDisableCtor & export class McTreeSelection extends McTreeSelectionBaseMixin implements AfterContentInit, CanDisable, HasTabIndex { - @ViewChild(CdkTreeNodeOutlet) nodeOutlet: CdkTreeNodeOutlet; + @ViewChild(CdkTreeNodeOutlet, {static: true}) nodeOutlet: CdkTreeNodeOutlet; @ContentChildren(McTreeOption) options: QueryList; diff --git a/packages/mosaic/tree/tree._spec.ts b/packages/mosaic/tree/tree._spec.ts index f877e0d3a..65ea089dc 100644 --- a/packages/mosaic/tree/tree._spec.ts +++ b/packages/mosaic/tree/tree._spec.ts @@ -614,7 +614,7 @@ class SimpleMatTreeApp { underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { @@ -642,7 +642,7 @@ class NestedMatTreeApp { dataSource = new McTreeNestedDataSource(); underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { @@ -677,7 +677,7 @@ class WhenNodeNestedMatTreeApp { dataSource = new McTreeNestedDataSource(); underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { @@ -720,7 +720,7 @@ class MatTreeAppWithToggle { dataSource = new McTreeFlatDataSource(this.treeControl, this.treeFlattener); underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { @@ -751,7 +751,7 @@ class NestedMatTreeAppWithToggle { dataSource = new McTreeNestedDataSource(); underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { @@ -795,7 +795,7 @@ class WhenNodeMatTreeApp { dataSource = new McTreeFlatDataSource(this.treeControl, this.treeFlattener); underlyingDataSource = new FakeDataSource(); - @ViewChild(McTreeSelection) tree: McTreeSelection; + @ViewChild(McTreeSelection, {static: false}) tree: McTreeSelection; constructor() { this.underlyingDataSource.connect().subscribe((data) => { diff --git a/packages/mosaic/tsconfig.build.json b/packages/mosaic/tsconfig.build.json index 2cbbbeb15..aeeb6961c 100644 --- a/packages/mosaic/tsconfig.build.json +++ b/packages/mosaic/tsconfig.build.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig-build.json", + "extends": "../tsconfig.build.json", "compilerOptions": { "outDir": "../../dist/packages/mosaic", "rootDir": ".", diff --git a/packages/mosaic/vertical-navbar/vertical-navbar.component.spec.ts b/packages/mosaic/vertical-navbar/vertical-navbar.component.spec.ts index 54e0bef89..f2cb878ca 100644 --- a/packages/mosaic/vertical-navbar/vertical-navbar.component.spec.ts +++ b/packages/mosaic/vertical-navbar/vertical-navbar.component.spec.ts @@ -49,7 +49,7 @@ describe('McVerticalNavbar', () => { templateUrl: './vertical-navbar.component.spec.html' }) class TestApp { - @ViewChild('navbar') + @ViewChild('navbar', {static: false}) navbar: McVerticalNavbar; counter: number = 0; diff --git a/packages/tsconfig-build.json b/packages/tsconfig.build.json similarity index 100% rename from packages/tsconfig-build.json rename to packages/tsconfig.build.json diff --git a/tools/gulp/tasks/aot.ts b/tools/gulp/tasks/aot.ts index 5f48d1db7..4290c343e 100644 --- a/tools/gulp/tasks/aot.ts +++ b/tools/gulp/tasks/aot.ts @@ -11,7 +11,7 @@ const { packagesDir } = buildConfig; const devAppSource = join(packagesDir, 'dev-app'); /** Path to the tsconfig file that builds the AOT files. */ -const tsconfigFile = join(devAppSource, 'tsconfig-aot.json'); +const tsconfigFile = join(devAppSource, 'tsconfig.aot.json'); /** Builds the dev-app assets and builds the required release packages. */ diff --git a/tools/gulp/tasks/development.ts b/tools/gulp/tasks/development.ts index 47f66149c..8df4bc297 100644 --- a/tools/gulp/tasks/development.ts +++ b/tools/gulp/tasks/development.ts @@ -23,7 +23,7 @@ const outDir = join(outputDir, 'packages', 'dev-app'); const assetsGlob = join(appDir, `**/*.+(html|css|svg|ico)`); /** Path to the dev-app tsconfig file. */ -const tsconfigPath = join(appDir, 'tsconfig-build.json'); +const tsconfigPath = join(appDir, 'tsconfig.build.json'); task(':build:devapp:ts', tsBuildTask(tsconfigPath)); task(':build:devapp:assets', copyTask(assetsGlob, outDir)); diff --git a/tools/packages/compile-entry-point.ts b/tools/packages/compile-entry-point.ts index db3b202fd..0932ff60c 100644 --- a/tools/packages/compile-entry-point.ts +++ b/tools/packages/compile-entry-point.ts @@ -87,7 +87,11 @@ function addIdToGlob(outputPath: string, entryPointId: number): void { glob(join(outputPath, '**/*.+(js|d.ts|metadata.json)')).forEach((filePath) => { let fileContent = readFileSync(filePath, 'utf-8'); - fileContent = fileContent.replace(/(ɵ[a-z]+)/g, `$1${entryPointId}`); + // We check for double ɵ to avoid mangling symbols like `ɵɵdefineInjectable`. + fileContent = fileContent.replace(/ɵ(ɵ)?[a-z]+/g, + (match, isDoubleTheta) => { + return isDoubleTheta ? match : match + entryPointId; + }); writeFileSync(filePath, fileContent, 'utf-8'); }); diff --git a/tools/webpack/webpack.config.js b/tools/webpack/webpack.config.js index 631783c5e..f18ed198d 100644 --- a/tools/webpack/webpack.config.js +++ b/tools/webpack/webpack.config.js @@ -101,7 +101,7 @@ module.exports = function (options) { loader: 'postcss-loader', options: { sourceMap: true, - plugins: () => [require('autoprefixer')({ browsers: ['last 2 versions'] })] + plugins: () => [require('autoprefixer')({ overrideBrowserslist: ['last 2 versions'] })] } }, 'resolve-url-loader', diff --git a/yarn.lock b/yarn.lock index c6c04ec73..ad2f449a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,62 +2,43 @@ # yarn lockfile v1 -"@angular-devkit/core@7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-7.1.4.tgz#4d903fd2ecc259b716ae76da19695d03993e583c" - integrity sha512-3cBVHjSQjMyE/mIyOX82ekdybNRQlN+kUfmdZS6oVW9aV48vdxcVbEGdl8t1H4enMf89u8kXiAAET9jFaqWopg== - dependencies: - ajv "6.5.3" - chokidar "2.0.4" - fast-json-stable-stringify "2.0.0" - rxjs "6.3.3" - source-map "0.7.3" - -"@angular-devkit/core@7.3.9", "@angular-devkit/core@^7.1.3": - version "7.3.9" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-7.3.9.tgz#bef2aaa0be7219c546fb99ea0ba9dd3a6dcd288a" - integrity sha512-SaxD+nKFW3iCBKsxNR7+66J30EexW/y7tm8m5AvUH+GwSAgIj0ZYmRUzFEPggcaLVA4WnE/YWqIXZMJW5dT7gw== +"@angular-devkit/core@8.0.1", "@angular-devkit/core@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.1.tgz#4a38141006deefa2f60f105b458d32885ffc1bec" + integrity sha512-GQtspR2umZeuTUDTLy2dpUstvQfK7oAwE0o+rWSa8mx0DyhYssrfBbvfE4GzUzKp6OSz1sbZAatSO+iimZjbQw== dependencies: - ajv "6.9.1" - chokidar "2.0.4" + ajv "6.10.0" fast-json-stable-stringify "2.0.0" - rxjs "6.3.3" + magic-string "0.25.2" + rxjs "6.4.0" source-map "0.7.3" -"@angular-devkit/schematics@7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.1.4.tgz#d2828fb86b5453395fab12a36779d0fd9fbdadc2" - integrity sha512-+rn3ppcC3grsi9vV2uUIYh/5mUBEJ+JRCKW11BJoUqLMeu8W7h+vbVonyfwJXsk3FSTf9ZY0C7F7UqggRS3cWw== - dependencies: - "@angular-devkit/core" "7.1.4" - rxjs "6.3.3" - -"@angular-devkit/schematics@^7.1.3": - version "7.3.9" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-7.3.9.tgz#4fe7bc878b116b157a3adf00583c28c951215877" - integrity sha512-xzROGCYp7aQbeJ3V6YC0MND7wKEAdWqmm/GaCufEk0dDS8ZGe0sQhcM2oBRa2nQqGQNeThFIH51kx+FayrJP0w== +"@angular-devkit/schematics@8.0.1", "@angular-devkit/schematics@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.1.tgz#1f0f616681eb451de31fa5f2d848f5ecbc6226d4" + integrity sha512-AbE/Gt0h/6pGu/sQ2oMXZo5ZMDeUhkdU32Nq5styh+B5nVXzGuZK4CGqyDNttdnzebhHt4Bi5ZtF2Avlwt+KEA== dependencies: - "@angular-devkit/core" "7.3.9" - rxjs "6.3.3" + "@angular-devkit/core" "8.0.1" + rxjs "6.4.0" -"@angular/animations@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-7.2.15.tgz#980c1f523a79d4b7cb44508f57fba06f2e0872fa" - integrity sha512-8oBt3HLgd2+kyJHUgsd7OzKCCss67t2sch15XNoIWlOLfxclqU+EfFE6t/vCzpT8/+lpZS6LU9ZrTnb+UBj5jg== +"@angular/animations@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.0.0.tgz#6286094babdb3879f7aefcd73aa31772469e50b4" + integrity sha512-hggSRi83rmocLwzrKZtmFcqPdivKSJqp2yiYaiNmJ2yQWJ1JW/Lurypv9H347RWxmwCCwC2kV8embTGbOXIFDQ== dependencies: tslib "^1.9.0" -"@angular/common@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-7.2.15.tgz#e6c2f6913cdc49f87adcaabc30604e721561374b" - integrity sha512-2b5JY2HWVHCf3D1GZjmde7jdAXSTXkYtmjLtA9tQkjOOTr80eHpNSujQqnzb97dk9VT9OjfjqTQd7K3pxZz8jw== +"@angular/common@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.0.0.tgz#700aeda9be8af96692fce0ea6bf6157f7c874c0e" + integrity sha512-iOAJZ0+1zTRHnHE/5G30+4Q66W1pfZkSkxZIXvgijZ+wtuNloYdWNy/IdZ/m7ayBI7A6FsYEhyMUoWz2HVEJNw== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-7.2.15.tgz#25cc3a6556ba726d00c4992ad894f8db203f4fbc" - integrity sha512-+AsfyKawmj/sa+m4Pz8VSRFbCfx/3IOjAuuEjhopbyr154YpPDSu8NTbcwzq3yfbVcPwK4/4exmbQzpsndaCTg== +"@angular/compiler-cli@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.0.0.tgz#b53ebb5accc34a68bf7a63d16130ca7c568f8a51" + integrity sha512-Z0U0Ih8A7V3J1gq7AXnXbrGAD2ERmz7JbREJJRHDWiUNxIqGQiV3Odo1V8FL5n/cKvLwSYM2Ubvk10gb0+3njA== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -69,77 +50,70 @@ shelljs "^0.8.1" source-map "^0.6.1" tslib "^1.9.0" - yargs "9.0.1" + yargs "13.1.0" -"@angular/compiler@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-7.2.15.tgz#9698dac49dbb46956f0b8a6280580025ea7ab04e" - integrity sha512-5yb4NcLk8GuXkYf7Dcor4XkGueYp4dgihzDmMjYDUrV0NPhubKlr+SwGtLOtzgRBWJ1I2bO0S3zwa0q0OgIPOw== +"@angular/compiler@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.0.0.tgz#302c987737e1473db3a113ff70fbbb315aa41b58" + integrity sha512-4rKsVFMNykF83tPL1VE1+j9kZ3cWHUsLOAB/VqmF64EcR/GsbjKog2v23rSso5kqUtPiVq/FWGYllW6qMdxtJA== dependencies: tslib "^1.9.0" -"@angular/core@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-7.2.15.tgz#c00d4be0ebe95b70f7631154169509cc97934e9a" - integrity sha512-XsuYm0jEU/mOqwDOk2utThv8J9kESkAerfuCHClE9rB2TtHUOGCfekF7lJWqjjypu6/J9ygoPFo7hdAE058ZGg== +"@angular/core@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.0.0.tgz#bf7a582b818e9181d830219907470e2b865ba32f" + integrity sha512-mrkP1PTzqCmZGLYll+TDyawLXHzi+FcRPqSuRxCmDMthUUE93SLXT2yISDkx9aMPtFKgFr6KfrIkKuCz16BP/g== dependencies: tslib "^1.9.0" -"@angular/elements@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-7.2.15.tgz#77fec5c879e171708a54dd1348135826d3ff8639" - integrity sha512-bt6BxWaN3gRnAXT5+Xlg7ln2RHqp5qFVpcEJn46zsuy44tf4ygY9/xQy1+PcRU5dqNkRrXZiqkJwt07MPYB95w== +"@angular/elements@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.0.0.tgz#7d25f95ba6854adb7361f106701cb1280394867f" + integrity sha512-vDs/O/9RNpmXaGJjmtFZ6MNFr2rqfB2qgq8tDcYkY7bAF11ulfwI2OXsI2vFnf4/qBlstdwXTmI5zar+ZU6MGA== dependencies: tslib "^1.9.0" -"@angular/forms@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-7.2.15.tgz#6b6e10b5f4687b6be3081abcc02a055b3ceeb6d8" - integrity sha512-p0kcIQLtBBC1qeTA6M3nOuXf/k91E80FKquVM9zEsO2kDjI0oZJVfFYL2UMov5samlJOPN+t6lRHEIUa7ApPsw== +"@angular/forms@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.0.0.tgz#6d636c4f83004290e1a5732a05e87148aaf6ed64" + integrity sha512-T6XdG3mALWzvnrN3fA1hAmfwvraiF1SPMWNXgPk2riuMf8CFdoro+tQZ4eo1islHrTTw5QzmqN8JJALfhAG6bg== dependencies: tslib "^1.9.0" -"@angular/http@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/http/-/http-7.2.15.tgz#a32bea9e67e99eef88150085aeebbe7aeecd39eb" - integrity sha512-TR7PEdmLWNIre3Zn8lvyb4lSrvPUJhKLystLnp4hBMcWsJqq5iK8S3bnlR4viZ9HMlf7bW7+Hm4SI6aB3tdUtw== +"@angular/platform-browser-dynamic@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.0.tgz#c15f394579ff44f3752033de58edc1afa5065d59" + integrity sha512-dx7W7JoSFbsveexjZ/BPlsXbMDLWVLmRCo7IqLvibMrTbdpaaOCNJIXJk1X+f7JJrQ7SwlZaVkoLCMoDWw6fmA== dependencies: tslib "^1.9.0" -"@angular/platform-browser-dynamic@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.15.tgz#e697159b565ef78bd7d276fa876d099172ad8735" - integrity sha512-UL2PqhzXMD769NQ6Lh6pxlBDKvN9Qol3XLRFil80lwJ1GRW16ITeYbCamcafIH2GOyd88IhmYcbMfUQ/6q4MMQ== +"@angular/platform-browser@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.0.0.tgz#fc7c55a0483e67e5606e499c129fda60ae8d4363" + integrity sha512-fTD+pTMbq+On9Uv3VXiei2lfuX7GX31dngm/Y4yWTFeW6eXy0+7kkfflzpLOb0hykCZvcXzarqCuEBBYNLrrOg== dependencies: tslib "^1.9.0" -"@angular/platform-browser@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-7.2.15.tgz#d6df74c427453e563c12bc2ec03a83bf10bb3805" - integrity sha512-aYgmPsbC9Tvp9vmKWD8voeAp4crwCay7/D6lM3ClEe2EeK934LuEXq3/uczMrFVbnIX7BBIo8fh03Tl7wbiGPw== +"@angular/platform-server@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-8.0.0.tgz#87e80acba6b09955046dc0a9da7cd6b2e005061a" + integrity sha512-pA6m1okOfyy2qH5A6jUxrhx6z7eAG+ne7IM+j/6JUBDjp4KO9BC84aa/xfpZq5dsskl8E8II9c4hUKocMyeRjA== dependencies: - tslib "^1.9.0" - -"@angular/platform-server@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-7.2.15.tgz#06c8a4c1850da6289f643bd690fc7e1e8bdd6376" - integrity sha512-a7XhYlbmQ7pN6liFq8WqdX4GNoxCIXhlZqotZkfwJDsDy2E2yyvVx6BYCEOnSRvO9xXwfyBXiLfZ4Y2A7xeCoQ== - dependencies: - domino "^2.1.0" + domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@^7.2.1": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-7.2.15.tgz#b2acbd07c17158801006cdd7e93113d6ec1f116e" - integrity sha512-qAubRJRQanguUqJQ76J9GSZ4JFtoyhJKRmX5P23ANZJXpB6YLzF2fJmOGi+E6cV8F0tKBMEq1pjxFTisx0MXwQ== +"@angular/router@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.0.0.tgz#26094fd473e17441b0ae8af4883ec1b4ea3ad569" + integrity sha512-DGUTb8qpndE5m716xh00GxuC8o7qamlqbUruGB+SQD6ynU7s5yLGxtKffxqb1BT63+YewpsVxc2Koruvb1qjDw== dependencies: tslib "^1.9.0" -"@angular/upgrade@^7.2.9": - version "7.2.15" - resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-7.2.15.tgz#6ab617733e12e0ffbe17ff01b222e0b8becf8cc2" - integrity sha512-XsDEoywrAr4kpvaVONfRfo1D8Po+Y9KjnH3uMBxx4684O88VPr8Bg44hfaeij6+LxWsiv76jx8mCmRHEXlQ0Qg== +"@angular/upgrade@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-8.0.0.tgz#7a756815c553350ba4cd64a0275ac6fc14286898" + integrity sha512-HRL99P13Mql3/kyrX/XUHqA8fdXC6QAmEnbcatAyCq6BGjJ047z1EFv/A6LHXXN5GFAgziyQbEqw3CnhjUeRVw== dependencies: tslib "^1.9.0" @@ -261,13 +235,13 @@ to-fast-properties "^2.0.0" "@commitlint/cli@^7.5.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.6.0.tgz#4f046342149ca7c5819d6f799509f77ab824e02e" - integrity sha512-3n4qNS1xOIQcL2uLSo+aF8q79kt8qWFUqtVUrlsKsn4B++htJDav3Y2TPjbNXEZD2tO1kg1jfjNE8LLkrHTxqg== + version "7.6.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.6.1.tgz#a93cf995082831999937f6d5ec1a582c8fc0393a" + integrity sha512-HEJwQ/aK0AOcAwn77ZKbb/GZhlGxBSPhtVp07uoJFVqM12l2Ia2JHA+MTpfHCFdVahKyYGREZgxde6LyKyG8aQ== dependencies: - "@commitlint/format" "^7.6.0" + "@commitlint/format" "^7.6.1" "@commitlint/lint" "^7.6.0" - "@commitlint/load" "^7.6.0" + "@commitlint/load" "^7.6.1" "@commitlint/read" "^7.6.0" babel-polyfill "6.26.0" chalk "2.3.1" @@ -296,10 +270,10 @@ dependencies: babel-runtime "6.26.0" -"@commitlint/format@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-7.6.0.tgz#f954cd9a8658d0ac3eba1bba6a131f57e3f2b570" - integrity sha512-Q/gFHImEfGSwp4bSX1ag6C/6GVuMf7KFh3BZIXk9dcbcQbNvyz/NgvS2p/FdZGp6dk8SghXfCiZHNlwNupgbnA== +"@commitlint/format@^7.6.1": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-7.6.1.tgz#106750de50fab7d153eed80e7577c768bb9a3a1b" + integrity sha512-Ldzf5N2Sr9RQqvlYwaQn4vz1WOZ7byYinspC/WCrbfcETGy28j7QE4OueZU6nNB9TjwwEorKm13uy7tDWPR7dg== dependencies: babel-runtime "^6.23.0" chalk "^2.0.1" @@ -322,10 +296,10 @@ babel-runtime "^6.23.0" lodash "4.17.11" -"@commitlint/load@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-7.6.0.tgz#c1eccbc0b8714a0c7dc26dacbc49bbc73abc0d27" - integrity sha512-MNuemmf8ag7hLwypmmvTBLU9W2scTGRB1RfB59MHVG3surLZS/LB5nUgoCHIeAz2KG4W/T4HXJ3G3Yaiw7ML6Q== +"@commitlint/load@^7.6.1": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-7.6.2.tgz#b5ed8163fa3117d60faf70a4e677b2017bbc71bb" + integrity sha512-I+xk+BkXAG1roXNrPsR1eOd5hEa+oLc6HLYnHAT/HLGKKB3E01IGg3O5SGlg7lpf1yiAaYI+wAnNTr3f3sIbWQ== dependencies: "@commitlint/execute-rule" "^7.6.0" "@commitlint/resolve-extends" "^7.6.0" @@ -414,37 +388,47 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@octokit/endpoint@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.0.tgz#242e32e9d5e2aa9a3075a3de086f198f423d7e39" - integrity sha512-H2DQxteNHrZ2infTlaHPFd6OC+4+erPXwYWDlp/Ey+64FI0kBk7uO2CL6VYNTJdVEoD4OGV+4uyHZgJTkvobIw== + version "5.1.4" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.4.tgz#e6bb3ceda8923fdc9703ded78c9acc28eff88c06" + integrity sha512-DypS8gbbcc9rlOCDW0wV9a+B18+ylduj6PpxeE+qa3IK1h5b0eW4CKj5pxxXWOZUYhEKwgOnh3+Q+Y/hx/bOPw== dependencies: deepmerge "3.2.0" is-plain-object "^3.0.0" - universal-user-agent "^2.0.1" + universal-user-agent "^2.1.0" url-template "^2.0.8" -"@octokit/request@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-3.0.2.tgz#dd2424691f486d7ea332ec06e3de55b1ea13c5dc" - integrity sha512-lBH2hf2Yuh9XlmP3MSpn3jL9DyCGG+cuPXDRQiJMK42BwW6xFhwWmG1k6xWykcLM4GwZG/5fuwcqnQXYG0ZTSg== +"@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.2.tgz#e6dbc5be13be1041ef8eca9225520982add574cf" + integrity sha512-T9swMS/Vc4QlfWrvyeSyp/GjhXtYaBzCcibjGywV4k4D2qVrQKfEMPy8OxMDEj7zkIIdpHwqdpVbKCvnUPqkXw== + dependencies: + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^4.0.1": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-4.1.0.tgz#e85dc377113baf2fe24433af8feb20e8a32e21b0" + integrity sha512-RvpQAba4i+BNH0z8i0gPRc1ShlHidj4puQjI/Tno6s+Q3/Mzb0XRSHJiOhpeFrZ22V7Mwjq1E7QS27P5CgpWYA== dependencies: "@octokit/endpoint" "^5.1.0" - deprecation "^1.0.1" + "@octokit/request-error" "^1.0.1" + deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^2.0.1" + universal-user-agent "^2.1.0" "@octokit/rest@^16.2.0": - version "16.25.3" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.25.3.tgz#ce9e7a6230d20d58574ec929f622f2778ead7eb4" - integrity sha512-/6/Isn9pNoKUQwuWUaskxMC6kFxtXTHhzsgYbyirEQ3UvcLciHvPgtRTbuV3bbVf0x4+4WEfKaI9UzxmPQ3W3A== + version "16.27.3" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.27.3.tgz#20ad5d0c7043364d1e1f72fa74f825c181771fc0" + integrity sha512-WWH/SHF4kus6FG+EAfX7/JYH70EjgFYa4AAd2Lf1hgmgzodhrsoxpXPSZliZ5BdJruZPMP7ZYaPoTrYCCKYzmQ== dependencies: - "@octokit/request" "3.0.2" + "@octokit/request" "^4.0.1" + "@octokit/request-error" "^1.0.2" atob-lite "^2.0.0" before-after-hook "^1.4.0" btoa-lite "^1.0.0" - deprecation "^1.0.1" + deprecation "^2.0.0" lodash.get "^4.4.2" lodash.set "^4.3.2" lodash.uniq "^4.5.0" @@ -489,14 +473,13 @@ dependencies: any-observable "^0.3.0" -"@schematics/angular@7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-7.1.4.tgz#cec4a5b793e54bd624018b6b5b4b917c467d22a5" - integrity sha512-4QVSmvQtOELek+FDq+k2ROeH9YrRrPJ6jWK179+qOruKSd4uTgEti/jy+fS0rfr52kDSGdDhz7XTh/QvQB89fg== +"@schematics/angular@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.1.tgz#8d5bfb00c0ba79cc248c6d17b4782b00b6453d79" + integrity sha512-/FyFJbHuxWfvVgTBSnEa0fiDgeLhAmfK7NeT8Owj2xDAqvVMxfSxupfdr7a9cDr82WImW09SX7PUlv2EomcGLA== dependencies: - "@angular-devkit/core" "7.1.4" - "@angular-devkit/schematics" "7.1.4" - typescript "3.1.6" + "@angular-devkit/core" "8.0.1" + "@angular-devkit/schematics" "8.0.1" "@types/anymatch@*": version "1.3.1" @@ -591,9 +574,9 @@ chokidar "^2.1.2" "@types/jasmine@^3.3.8": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.3.12.tgz#bf282cb540e9ad7a0a04b742082c073b655eab39" - integrity sha512-lXvr2xFQEVQLkIhuGaR3GC1L9lMU1IxeWnAF/wNY5ZWpC4p9dgxkKkzMp7pntpAdv9pZSnYqgsBkCg32MXSZMg== + version "3.3.13" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.3.13.tgz#d5daabb0af47bcddee40597acf6e804433bab439" + integrity sha512-iczmLoIiVymaD1TIr2UctxjFkNEslVE/QtNAUmpDsD71cZfZBAsPCUv1Y+8AwsfA8bLx2ccr7d95T9w/UAirlQ== "@types/json5@^0.0.29": version "0.0.29" @@ -630,9 +613,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.0.tgz#d11813b9c0ff8aaca29f04cbc12817f4c7d656e5" - integrity sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg== + version "12.0.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.5.tgz#ac14404c33d1a789973c45379a67f7f7e58a01b9" + integrity sha512-CFLSALoE+93+Hcb5pFjp0J1uMrrbLRe+L1+gFwerJ776R3TACSF0kTVRQ7AvRa7aFx70nqYHAc7wQPlt9kY2Mg== "@types/node@~8.9.4": version "8.9.5" @@ -737,9 +720,9 @@ "@types/node" "*" "@types/webpack@^4.4.20": - version "4.4.31" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.31.tgz#f59b9d8210cf4d2fd254fe6d1f5ba86e557867f5" - integrity sha512-WNALmv/wxy2+OoF7A5GD8BVotXnkuMHlojVWKj/neFHU3Ut2Azbu1A7Yi2Vr6eX3z+31XgR/dJ5NpX4pQZ7ieQ== + version "4.4.32" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.32.tgz#2d460cd33a15e568e93f38de5e628cf846396c51" + integrity sha512-mNARoaSJTzbiHxtZbf9NULFilu2frqD+g9Iyl9V2jPYJWXi+AC3Hz8lQWPZ5LLtgUm7iF4SDDMB/1bPrbRQgFw== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -944,7 +927,7 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= -accepts@~1.3.4, accepts@~1.3.5: +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -1020,27 +1003,7 @@ ajv-keywords@^3.1.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d" integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw== -ajv@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" - integrity sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@6.9.1: - version "6.9.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.1.tgz#a4d3683d74abc5670e75f0b16520f70a20ea8dc1" - integrity sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: +ajv@6.10.0, ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: version "6.10.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== @@ -1396,7 +1359,15 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@^1.1.1, assert@^1.3.0: +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assert@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= @@ -1433,7 +1404,7 @@ async-each-series@0.1.1: resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" integrity sha1-dhfBkXQB/Yykooqtzj266Yr+tDI= -async-each@^1.0.0, async-each@^1.0.1: +async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== @@ -1507,15 +1478,16 @@ autoprefixer@^9.0.0: postcss-value-parser "^3.3.1" autoprefixer@^9.4.2: - version "9.5.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.1.tgz#243b1267b67e7e947f28919d786b50d3bb0fb357" - integrity sha512-KJSzkStUl3wP0D5sdMlP82Q52JLy5+atf2MHAre48+ckWkXgixmfHyWmA77wFDy6jTHU6mIgXv6hAQ2mf1PjJQ== + version "9.6.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.0.tgz#0111c6bde2ad20c6f17995a33fad7cf6854b4c87" + integrity sha512-kuip9YilBqhirhHEGHaBTZKXL//xxGnzvsD0FtBQa6z+A69qZD6s/BAX9VzDF1i9VKDquTJDQaPLSEhOnL6FvQ== dependencies: - browserslist "^4.5.4" - caniuse-lite "^1.0.30000957" + browserslist "^4.6.1" + caniuse-lite "^1.0.30000971" + chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.14" + postcss "^7.0.16" postcss-value-parser "^3.3.1" awesome-typescript-loader@^5.2.1: @@ -1695,16 +1667,32 @@ bluebird@^3.3.0: integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== bluebird@^3.5.3: - version "3.5.4" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" - integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw== + version "3.5.5" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -body-parser@1.18.3, body-parser@^1.16.1: +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +body-parser@^1.16.1: version "1.18.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= @@ -1745,7 +1733,7 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.0, braces@^2.3.1, braces@^2.3.2: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1888,7 +1876,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.4.2, browserslist@^4.5.4: +browserslist@^4.4.2: version "4.5.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.6.tgz#ea42e8581ca2513fa7f371d4dd66da763938163d" integrity sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg== @@ -1897,6 +1885,15 @@ browserslist@^4.4.2, browserslist@^4.5.4: electron-to-chromium "^1.3.127" node-releases "^1.1.17" +browserslist@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.1.tgz#ee5059b1aec18cbec9d055d6cb5e24ae50343a9b" + integrity sha512-1MC18ooMPRG2UuVFJTHFIAkk6mpByJfxCrnUyvSlu/hyQSFHMrlhM02SzNuCV+quTP4CKmqtOMAIjrifrpBJXQ== + dependencies: + caniuse-lite "^1.0.30000971" + electron-to-chromium "^1.3.137" + node-releases "^1.1.21" + bs-recipes@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/bs-recipes/-/bs-recipes-1.3.4.tgz#0d2d4d48a718c8c044769fdc4f89592dc8b69585" @@ -2004,7 +2001,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^11.0.2: +cacache@^11.3.2: version "11.3.2" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa" integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg== @@ -2123,11 +2120,16 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30000940, caniuse-lite@^1.0.30000957, caniuse-lite@^1.0.30000963: +caniuse-lite@^1.0.30000940: version "1.0.30000967" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz#a5039577806fccee80a04aaafb2c0890b1ee2f73" integrity sha512-rUBIbap+VJfxTzrM4akJ00lkvVb5/n5v3EGXfWzSH5zT8aJmGzjA8HWhJ4U6kCpzxozUSnB+yvAYDRPY6mRpgQ== +caniuse-lite@^1.0.30000963, caniuse-lite@^1.0.30000971: + version "1.0.30000974" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000974.tgz#b7afe14ee004e97ce6dc73e3f878290a12928ad8" + integrity sha512-xc3rkNS/Zc3CmpMKuczWEdY2sZgx09BkAxfvkxlAEBTqcMHeL8QnPqhKse+5sRTi3nrw2pJwToD2WvKn1Uhvww== + canonical-path@0.0.2, canonical-path@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-0.0.2.tgz#e31eb937a8c93ee2a01df1839794721902874574" @@ -2271,30 +2273,29 @@ chokidar@*, chokidar@^2.0.3, chokidar@^2.1.2: optionalDependencies: fsevents "^1.2.7" -chokidar@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" - integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== +chokidar@^2.0.0, chokidar@^2.0.4, chokidar@^2.1.1: + version "2.1.5" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" + integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== dependencies: anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" + async-each "^1.0.1" + braces "^2.3.2" glob-parent "^3.1.0" - inherits "^2.0.1" + inherits "^2.0.3" is-binary-path "^1.0.0" is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" + normalize-path "^3.0.0" path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" + readdirp "^2.2.1" + upath "^1.1.1" optionalDependencies: - fsevents "^1.2.2" + fsevents "^1.2.7" -chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4, chokidar@^2.1.1, chokidar@^2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" - integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== +chokidar@^2.0.2, chokidar@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" + integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== dependencies: anymatch "^2.0.0" async-each "^1.0.1" @@ -2316,9 +2317,9 @@ chownr@^1.1.1: integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== chrome-trace-event@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48" - integrity sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A== + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== dependencies: tslib "^1.9.0" @@ -2660,10 +2661,12 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" content-type@~1.0.4: version "1.0.4" @@ -2857,6 +2860,11 @@ cookie@0.3.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -2882,11 +2890,16 @@ copy-props@^2.0.1: each-props "^1.3.0" is-plain-object "^2.0.1" -core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.0: +core-js@^2.2.0: version "2.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" + integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2914,13 +2927,13 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.0.2, cosmiconfig@^5.0.7: parse-json "^4.0.0" cosmiconfig@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.0.tgz#45038e4d28a7fe787203aede9c25bca4a08b12c8" - integrity sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g== + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== dependencies: import-fresh "^2.0.0" is-directory "^0.3.1" - js-yaml "^3.13.0" + js-yaml "^3.13.1" parse-json "^4.0.0" crc32-stream@^2.0.0: @@ -3285,7 +3298,7 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -del@^4.1.0: +del@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== @@ -3328,10 +3341,10 @@ dependency-tree@^7.0.2: filing-cabinet "^2.3.1" precinct "^6.1.1" -deprecation@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-1.0.1.tgz#2df79b79005752180816b7b6e079cbd80490d711" - integrity sha512-ccVHpE72+tcIKaGMql33x5MAjKQIZrk+3x2GbJ7TeraUCZWHoT+KSZpoC+JQFsUBlSTXUrBaGiF0j6zVTepPLg== +deprecation@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.0.0.tgz#dd0427cd920c78bc575ec39dab2f22e7c304fb9d" + integrity sha512-lbQN037mB3VfA2JFuguM5GCJ+zPinMeCrFe+AfSZ6eqrnJA/Fs+EYMnd6Nb2mn9lf2jO9xwEd9o9lic+D4vkcw== des.js@^1.0.0: version "1.0.0" @@ -3596,7 +3609,7 @@ domhandler@^2.3.0: dependencies: domelementtype "1" -domino@^2.1.0: +domino@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.3.tgz#0ca1ad02cbd316ebe2e99e0ac9fb0010407d4601" integrity sha512-EwjTbUv1Q/RLQOdn9k7ClHutrQcWGsfXaRQNOnM/KgK4xDBoLFEcIRFuBSxAx13Vfa63X029gXYrNFrSy+DOSg== @@ -3695,10 +3708,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.127: - version "1.3.133" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz#c47639c19b91feee3e22fad69f5556142007008c" - integrity sha512-lyoC8aoqbbDqsprb6aPdt9n3DpOZZzdz/T4IZKsR0/dkZIxnJVUjjcpOSwA66jPRIOyDAamCTAUqweU05kKNSg== +electron-to-chromium@^1.3.127, electron-to-chromium@^1.3.137: + version "1.3.148" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.148.tgz#5796c0d9eb0358d397163413b90bf376c5d8bf08" + integrity sha512-nuCOlXNlGMQmdzihIPGm2K3Yf3H1hke/1rK381i02pH8wNliJU9hVNnOi/xjmxt+mjABd/BzufP5nPHWKshLWA== elegant-spinner@^1.0.1: version "1.0.1" @@ -4035,19 +4048,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" @@ -4101,39 +4101,39 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -express@^4.16.4: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== dependencies: - accepts "~1.3.5" + accepts "~1.3.7" array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" + body-parser "1.19.0" + content-disposition "0.5.3" content-type "~1.0.4" - cookie "0.3.1" + cookie "0.4.0" cookie-signature "1.0.6" debug "2.6.9" depd "~1.1.2" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.1.1" + finalhandler "~1.1.2" fresh "0.5.2" merge-descriptors "1.0.1" methods "~1.1.2" on-finished "~2.3.0" - parseurl "~1.3.2" + parseurl "~1.3.3" path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -4326,17 +4326,17 @@ finalhandler@1.1.0: statuses "~1.3.1" unpipe "~1.0.0" -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" + parseurl "~1.3.3" + statuses "~1.5.0" unpipe "~1.0.0" find-cache-dir@^2.0.0: @@ -4553,9 +4553,9 @@ fs-extra@^7.0.1: universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" + integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== dependencies: minipass "^2.2.1" @@ -4582,7 +4582,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.2, fsevents@^1.2.7: +fsevents@^1.2.7: version "1.2.9" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== @@ -5288,11 +5288,16 @@ header-case@^1.0.0: no-case "^2.2.0" upper-case "^1.1.3" -highlight.js@^9.12.0, highlight.js@^9.13.1: +highlight.js@^9.12.0: version "9.15.6" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.6.tgz#72d4d8d779ec066af9a17cb14360c3def0aa57c4" integrity sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ== +highlight.js@^9.13.1: + version "9.15.8" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.8.tgz#f344fda123f36f1a65490e932cf90569e4999971" + integrity sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA== + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -5394,7 +5399,7 @@ http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" -http-errors@1.7.2: +http-errors@1.7.2, http-errors@~1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== @@ -5643,7 +5648,7 @@ inquirer@^6.2.1: strip-ansi "^5.1.0" through "^2.3.6" -internal-ip@^4.2.0: +internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== @@ -6162,7 +6167,7 @@ js-yaml@3.x: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.13.0, js-yaml@^3.9.0: +js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -6237,9 +6242,9 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json3@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= + version "3.3.3" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== json5@^0.5.0: version "0.5.1" @@ -6603,16 +6608,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -6638,7 +6633,7 @@ loader-utils@^0.2.15, loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" -loader-utils@^1.0.1, loader-utils@^1.1.0: +loader-utils@^1.0.1, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== @@ -6930,10 +6925,10 @@ log4js@^4.0.0: rfdc "^1.1.2" streamroller "^1.0.5" -loglevel@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - integrity sha1-4PyVEztu8nbNyIh82vJKpvFW+Po= +loglevel@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.2.tgz#668c77948a03dbd22502a3513ace1f62a80cc372" + integrity sha512-Jt2MHrCNdtIe1W6co3tF5KXGRkzF+TYffiQstfXa04mrss9IKXzAAXYWak8LbZseAQY03sH2GzMCMU0ZOUc9bg== loglevelnext@^1.0.1: version "1.0.5" @@ -7011,6 +7006,13 @@ madge@^3.3.0: rc "^1.2.7" walkdir "^0.0.12" +magic-string@0.25.2, magic-string@^0.25.0: + version "0.25.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" + integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== + dependencies: + sourcemap-codec "^1.4.4" + magic-string@^0.22.5: version "0.22.5" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" @@ -7018,13 +7020,6 @@ magic-string@^0.22.5: dependencies: vlq "^0.2.2" -magic-string@^0.25.0: - version "0.25.2" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" - integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== - dependencies: - sourcemap-codec "^1.4.4" - make-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -7137,13 +7132,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - mem@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" @@ -7287,15 +7275,20 @@ mime@1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mime@^2.0.3: version "2.4.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w== -mime@^2.3.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" - integrity sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg== +mime@^2.3.1, mime@^2.4.2: + version "2.4.3" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.3.tgz#229687331e86f68924e6cb59e1cdd937f18275fe" + integrity sha512-QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw== mimic-fn@^1.0.0: version "1.2.0" @@ -7359,7 +7352,7 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.4: +minipass@^2.2.1, minipass@^2.3.5: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== @@ -7367,7 +7360,7 @@ minipass@^2.2.1, minipass@^2.3.4: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.1: +minizlib@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== @@ -7485,7 +7478,7 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.1.1: +ms@2.1.1, ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== @@ -7520,11 +7513,16 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.10.0, nan@^2.12.1, nan@^2.13.2: +nan@^2.10.0, nan@^2.13.2: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -7543,11 +7541,11 @@ nanomatch@^1.2.9: to-regex "^3.0.1" needle@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.1.tgz#d272f2f4034afb9c4c9ab1379aabc17fc85c9388" - integrity sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg== + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== dependencies: - debug "^4.1.0" + debug "^3.2.6" iconv-lite "^0.4.4" sax "^1.2.4" @@ -7556,7 +7554,12 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0, neo-async@^2.6.0: +neo-async@^2.5.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +neo-async@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== @@ -7579,9 +7582,9 @@ no-case@^2.2.0: lower-case "^1.1.1" node-fetch@^2.3.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.5.0.tgz#8028c49fc1191bba56a07adc6e2a954644a48501" - integrity sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw== + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== node-forge@0.7.5: version "0.7.5" @@ -7656,10 +7659,10 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.17: - version "1.1.18" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.18.tgz#cc98fd75598a324a77188ebddf6650e9cbd8b1d5" - integrity sha512-/mnVgm6u/8OwlIsoyRXtTI0RfQcxZoAZbdwyXap0EeWwcOpDDymyCHM2/aR9XKmHXrvizHoPAOs0pcbiJ6RUaA== +node-releases@^1.1.17, node-releases@^1.1.21: + version "1.1.23" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.23.tgz#de7409f72de044a2fa59c097f436ba89c39997f0" + integrity sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w== dependencies: semver "^5.3.0" @@ -7873,7 +7876,7 @@ object-assign@^3.0.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" integrity sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I= -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -8083,15 +8086,6 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -8171,9 +8165,9 @@ p-map@^1.1.1: integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== p-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" - integrity sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w== + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== p-try@^1.0.0: version "1.0.0" @@ -8300,7 +8294,7 @@ parseuri@0.0.5: dependencies: better-assert "~1.0.0" -parseurl@~1.3.2: +parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -8393,13 +8387,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -8652,10 +8639,10 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.2, postcss@^7.0.7: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.14: - version "7.0.16" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.16.tgz#48f64f1b4b558cb8b52c88987724359acb010da2" - integrity sha512-MOo8zNSlIqh22Uaa3drkdIAgUGEL+AD1ESiSdmElLUmE2uVDo1QloiT/IfW9qRw8Gw+Y/w69UVMGwbufMSftxA== +postcss@^7.0.14, postcss@^7.0.16: + version "7.0.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" + integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -8745,7 +8732,7 @@ promise@^8.0.1: dependencies: asap "~2.0.6" -proxy-addr@~2.0.4: +proxy-addr@~2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== @@ -8845,6 +8832,11 @@ qs@6.5.2, qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -8880,11 +8872,16 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: +range-parser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= +range-parser@^1.2.1, range-parser@~1.2.0, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + raw-body@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" @@ -8895,7 +8892,7 @@ raw-body@2.3.3: iconv-lite "0.4.23" unpipe "1.0.0" -raw-body@^2.3.2: +raw-body@2.4.0, raw-body@^2.3.2: version "2.4.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== @@ -8954,14 +8951,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -8979,15 +8968,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -9019,7 +8999,7 @@ read-pkg@^4.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6: +"readable-stream@2 || 3", readable-stream@^3.0.2: version "3.3.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.3.0.tgz#cb8011aad002eb717bf040291feba8569c986fb9" integrity sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw== @@ -9028,6 +9008,15 @@ read-pkg@^4.0.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^3.0.6: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readable-stream@^3.1.1: version "3.2.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.2.0.tgz#de17f229864c120a9f56945756e4f32c4045245d" @@ -9069,7 +9058,7 @@ readdir-scoped-modules@^1.0.0: graceful-fs "^4.1.2" once "^1.3.0" -readdirp@^2.0.0, readdirp@^2.2.1: +readdirp@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== @@ -9432,13 +9421,20 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0: +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2, resolve@^1.4.0: version "1.10.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== dependencies: path-parse "^1.0.6" +resolve@^1.10.0: + version "1.11.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" + integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== + dependencies: + path-parse "^1.0.6" + resolve@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" @@ -9563,10 +9559,10 @@ rxjs-tslint-rules@4.10.0: tslib "^1.8.0" tsutils "^3.0.0" -rxjs@6.3.3: - version "6.3.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" - integrity sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw== +rxjs@6.4.0, rxjs@^6.3.3: + version "6.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" + integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== dependencies: tslib "^1.9.0" @@ -9577,13 +9573,6 @@ rxjs@^5.5.6: dependencies: symbol-observable "1.0.1" -rxjs@^6.3.3: - version "6.4.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" - integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== - dependencies: - tslib "^1.9.0" - rxjs@^6.4.0: version "6.5.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.1.tgz#f7a005a9386361921b8524f38f54cbf80e5d08f4" @@ -9752,7 +9741,7 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@6.0.0, semver@^6.0.0: +semver@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== @@ -9762,6 +9751,11 @@ semver@^5.2.0, semver@^5.4.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" + integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -9786,6 +9780,25 @@ send@0.16.2: range-parser "~1.2.0" statuses "~1.4.0" +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + sentence-case@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" @@ -9794,7 +9807,7 @@ sentence-case@^2.1.0: no-case "^2.2.0" upper-case-first "^1.1.2" -serialize-javascript@^1.4.0: +serialize-javascript@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== @@ -9822,6 +9835,16 @@ serve-static@1.13.2: parseurl "~1.3.2" send "0.16.2" +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + server-destroy@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" @@ -10368,7 +10391,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2": +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -10620,9 +10643,9 @@ stylelint-config-standard@^18.2.0: stylelint-config-recommended "^2.2.0" stylelint-scss@^3.3.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-3.6.1.tgz#eef14df2b6314cbd20d240b72d5b97c40751fef5" - integrity sha512-6bB2EHUZsE/bDVKUdzBXqOcfgXmg3zq9Lglgbu16EqMa4PM8Y48XKcB8coOj8CKr07GtlqtOdCNA2E5njoI9Kw== + version "3.8.0" + resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-3.8.0.tgz#fc372306c2105b461d0c162199e65f0c09fada2a" + integrity sha512-J55tNmxXEh/ymhz5BiscIiUcHgPmJ2Nv+0+zgnqTqdQBe1URQbrdjlAyK3xq+7i2nVpWr2wlRj25SjoonZFcHg== dependencies: lodash "^4.17.11" postcss-media-query-parser "^0.2.3" @@ -10810,17 +10833,17 @@ tar@^2.0.0: inherits "2" tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== + version "4.4.10" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" + integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" + minipass "^2.3.5" + minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" - yallist "^3.0.2" + yallist "^3.0.3" temp@~0.4.0: version "0.4.0" @@ -10838,23 +10861,25 @@ ternary-stream@^2.0.1: through2 "^2.0.1" terser-webpack-plugin@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz#3f98bc902fac3e5d0de730869f50668561262ec8" - integrity sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA== + version "1.3.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz#69aa22426299f4b5b3775cbed8cb2c5d419aa1d4" + integrity sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg== dependencies: - cacache "^11.0.2" + cacache "^11.3.2" find-cache-dir "^2.0.0" + is-wsl "^1.1.0" + loader-utils "^1.2.3" schema-utils "^1.0.0" - serialize-javascript "^1.4.0" + serialize-javascript "^1.7.0" source-map "^0.6.1" - terser "^3.16.1" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" + terser "^4.0.0" + webpack-sources "^1.3.0" + worker-farm "^1.7.0" -terser@^3.16.1: - version "3.17.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" - integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== +terser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.0.0.tgz#ef356f6f359a963e2cc675517f21c1c382877374" + integrity sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA== dependencies: commander "^2.19.0" source-map "~0.6.1" @@ -11145,10 +11170,10 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tsickle@0.34.0: - version "0.34.0" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.34.0.tgz#10187fa6401a288a65efb93a60bf28b2ff95f90b" - integrity sha512-O3wCPRtL18Hc/ZBnaiKwmmjVzeCWTOTpsi0btfC7FWL3RnXpxLPxD6hoJ0QEXuSfG/0QJk+MWNjqT9N6fOyyIg== +tsickle@^0.35.0: + version "0.35.0" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.35.0.tgz#59235df45937c0ec5d072c616c26d2d97fba54b9" + integrity sha512-irsZLX4293YUl9TuwNC5Fy020eLSc4bC3LfKnxnx1oq5wmZD9zSP8qvNNTiwRmf2/rxH+58JINcTARDjuvn+oQ== dependencies: minimist "^1.2.0" mkdirp "^0.5.1" @@ -11251,7 +11276,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-is@~1.6.16: +type-is@~1.6.16, type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -11273,11 +11298,6 @@ typescript-tslint-plugin@^0.2.0: mock-require "^3.0.2" vscode-languageserver "^5.1.0" -typescript@3.1.6, typescript@~3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68" - integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== - typescript@3.3.3333, typescript@^3.0.3: version "3.3.3333" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" @@ -11288,6 +11308,11 @@ typescript@~2.7.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836" integrity sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw== +typescript@~3.4.x: + version "3.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" + integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== + ua-parser-js@0.7.17: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" @@ -11463,10 +11488,10 @@ unist-util-visit@^1.1.0: dependencies: unist-util-visit-parents "^2.0.0" -universal-user-agent@^2.0.0, universal-user-agent@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.0.3.tgz#9f6f09f9cc33de867bb720d84c08069b14937c6c" - integrity sha512-eRHEHhChCBHrZsA4WEhdgiOKgdvgrMIHwnwnqD0r5C6AO8kwKcG7qSku3iXdhvHL3YvsS9ZkSGN8h/hIpoFC8g== +universal-user-agent@^2.0.0, universal-user-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" + integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== dependencies: os-name "^3.0.0" @@ -11488,7 +11513,7 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.0.5, upath@^1.1.0, upath@^1.1.1: +upath@^1.1.0, upath@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== @@ -11876,41 +11901,41 @@ webpack-cli@^3.1.2: v8-compile-cache "^2.0.2" yargs "^12.0.5" -webpack-dev-middleware@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.2.tgz#f37a27ad7c09cd7dc67cd97655413abaa1f55942" - integrity sha512-A47I5SX60IkHrMmZUlB0ZKSWi29TZTcPz7cha1Z75yYOsgWh/1AcPmQEbC8ZIbU3A1ytSv1PMU0PyPz2Lmz2jg== +webpack-dev-middleware@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz#ef751d25f4e9a5c8a35da600c5fda3582b5c6cff" + integrity sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA== dependencies: memory-fs "^0.4.1" - mime "^2.3.1" - range-parser "^1.0.3" + mime "^2.4.2" + range-parser "^1.2.1" webpack-log "^2.0.0" webpack-dev-server@^3.1.9: - version "3.3.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.3.1.tgz#7046e49ded5c1255a82c5d942bcdda552b72a62d" - integrity sha512-jY09LikOyGZrxVTXK0mgIq9y2IhCoJ05848dKZqX1gAGLU1YDqgpOT71+W53JH/wI4v6ky4hm+KvSyW14JEs5A== + version "3.6.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.6.0.tgz#7f675f69bf0999e5f489d1e2532182cfdf55706c" + integrity sha512-49CWhocbMzjNW2Dzo3ETnxtzifcKGx4Pa3Hx+sl0hBU5/t7zJTkOvMP1sCnu9/qGNDYW1PKCuszYQn5r2g5Sww== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" - chokidar "^2.1.5" + chokidar "^2.1.6" compression "^1.7.4" connect-history-api-fallback "^1.6.0" debug "^4.1.1" - del "^4.1.0" - express "^4.16.4" + del "^4.1.1" + express "^4.17.1" html-entities "^1.2.1" http-proxy-middleware "^0.19.1" import-local "^2.0.0" - internal-ip "^4.2.0" + internal-ip "^4.3.0" ip "^1.1.5" killable "^1.0.1" - loglevel "^1.6.1" + loglevel "^1.6.2" opn "^5.5.0" portfinder "^1.0.20" schema-utils "^1.0.0" selfsigned "^1.10.4" - semver "^6.0.0" + semver "^6.1.1" serve-index "^1.9.1" sockjs "0.3.19" sockjs-client "1.3.0" @@ -11918,7 +11943,7 @@ webpack-dev-server@^3.1.9: strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" - webpack-dev-middleware "^3.6.2" + webpack-dev-middleware "^3.7.0" webpack-log "^2.0.0" yargs "12.0.5" @@ -11940,7 +11965,7 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-sources@^1.1.0, webpack-sources@^1.3.0: +webpack-sources@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== @@ -11949,9 +11974,9 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: source-map "~0.6.1" webpack@^4.27.0: - version "4.30.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.30.0.tgz#aca76ef75630a22c49fcc235b39b4c57591d33a9" - integrity sha512-4hgvO2YbAFUhyTdlR4FNyt2+YaYBYHavyzjCMbZzgglo02rlKi/pcsEzwCuCpsn1ryzIl1cq/u8ArIKu8JBYMg== + version "4.33.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.33.0.tgz#c30fc4307db432e5c5e3333aaa7c16a15a3b277e" + integrity sha512-ggWMb0B2QUuYso6FPZKUohOgfm+Z0sVFs8WwWuSH1IAvkWs428VDNmOlAxvHGTB9Dm/qOB/qtE5cRx5y01clxw== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" @@ -12090,7 +12115,7 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -worker-farm@^1.5.2: +worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== @@ -12203,7 +12228,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== @@ -12245,13 +12270,6 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= - dependencies: - camelcase "^4.1.0" - yargs@12.0.5, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -12270,6 +12288,23 @@ yargs@12.0.5, yargs@^12.0.5: y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" +yargs@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.1.0.tgz#b2729ce4bfc0c584939719514099d8a916ad2301" + integrity sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg== + dependencies: + cliui "^4.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.0.0" + yargs@6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.4.0.tgz#816e1a866d5598ccf34e5596ddce22d92da490d4" @@ -12309,25 +12344,6 @@ yargs@6.6.0: y18n "^3.2.1" yargs-parser "^4.2.0" -yargs@9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" - integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w= - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - yargs@^13.1.0: version "13.2.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993" @@ -12407,7 +12423,7 @@ zip-stream@^1.2.0: lodash "^4.8.0" readable-stream "^2.0.0" -zone.js@^0.8.29: - version "0.8.29" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.29.tgz#8dce92aa0dd553b50bc5bfbb90af9986ad845a12" - integrity sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ== +zone.js@~0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.1.tgz#e37c6e5c54c13fae4de26b5ffe8d8e9212da6d9b" + integrity sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag==