@angular/elements
Advanced tools
Comparing version 6.1.0-beta.3 to 6.1.0-rc.0
/** | ||
* @license Angular v6.1.0-beta.3 | ||
* @license Angular v6.1.0-rc.0 | ||
* (c) 2010-2018 Google, Inc. https://angular.io/ | ||
@@ -8,596 +8,561 @@ * License: MIT | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define('@angular/elements', ['exports', '@angular/core', 'rxjs', 'rxjs/operators'], factory) : | ||
(factory((global.ng = global.ng || {}, global.ng.elements = {}),global.ng.core,global.rxjs,global.rxjs.operators)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define('@angular/elements', ['exports', '@angular/core', 'rxjs', 'rxjs/operators'], factory) : | ||
(factory((global.ng = global.ng || {}, global.ng.elements = {}),global.ng.core,global.rxjs,global.rxjs.operators)); | ||
}(this, (function (exports,core,rxjs,operators) { 'use strict'; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
finally { if (e) throw e.error; } | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
} | ||
return ar; | ||
} | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
var elProto = Element.prototype; | ||
var matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || | ||
elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector; | ||
/** | ||
* Provide methods for scheduling the execution of a callback. | ||
*/ | ||
var scheduler = { | ||
/** | ||
* Schedule a callback to be called after some delay. | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
* 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 | ||
*/ | ||
schedule: function (taskFn, delay) { var id = setTimeout(taskFn, delay); return function () { return clearTimeout(id); }; }, | ||
var elProto = Element.prototype; | ||
var matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || | ||
elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector; | ||
/** | ||
* Schedule a callback to be called before the next render. | ||
* (If `window.requestAnimationFrame()` is not available, use `scheduler.schedule()` instead.) | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
* Provide methods for scheduling the execution of a callback. | ||
*/ | ||
scheduleBeforeRender: function (taskFn) { | ||
// TODO(gkalpak): Implement a better way of accessing `requestAnimationFrame()` | ||
// (e.g. accounting for vendor prefix, SSR-compatibility, etc). | ||
if (typeof window === 'undefined') { | ||
// For SSR just schedule immediately. | ||
return scheduler.schedule(taskFn, 0); | ||
} | ||
if (typeof window.requestAnimationFrame === 'undefined') { | ||
var frameMs = 16; | ||
return scheduler.schedule(taskFn, frameMs); | ||
} | ||
var id = window.requestAnimationFrame(taskFn); | ||
return function () { return window.cancelAnimationFrame(id); }; | ||
}, | ||
}; | ||
/** | ||
* Convert a camelCased string to kebab-cased. | ||
*/ | ||
function camelToDashCase(input) { | ||
return input.replace(/[A-Z]/g, function (char) { return "-" + char.toLowerCase(); }); | ||
} | ||
/** | ||
* Create a `CustomEvent` (even on browsers where `CustomEvent` is not a constructor). | ||
*/ | ||
function createCustomEvent(doc, name, detail) { | ||
var bubbles = false; | ||
var cancelable = false; | ||
// On IE9-11, `CustomEvent` is not a constructor. | ||
if (typeof CustomEvent !== 'function') { | ||
var event_1 = doc.createEvent('CustomEvent'); | ||
event_1.initCustomEvent(name, bubbles, cancelable, detail); | ||
return event_1; | ||
} | ||
return new CustomEvent(name, { bubbles: bubbles, cancelable: cancelable, detail: detail }); | ||
} | ||
/** | ||
* Check whether the input is an `Element`. | ||
*/ | ||
function isElement(node) { | ||
return node.nodeType === Node.ELEMENT_NODE; | ||
} | ||
/** | ||
* Check whether the input is a function. | ||
*/ | ||
function isFunction(value) { | ||
return typeof value === 'function'; | ||
} | ||
/** | ||
* Convert a kebab-cased string to camelCased. | ||
*/ | ||
/** | ||
* Check whether an `Element` matches a CSS selector. | ||
*/ | ||
function matchesSelector(element, selector) { | ||
return matches.call(element, selector); | ||
} | ||
/** | ||
* Test two values for strict equality, accounting for the fact that `NaN !== NaN`. | ||
*/ | ||
function strictEquals(value1, value2) { | ||
return value1 === value2 || (value1 !== value1 && value2 !== value2); | ||
} | ||
/** Gets a map of default set of attributes to observe and the properties they affect. */ | ||
function getDefaultAttributeToPropertyInputs(inputs) { | ||
var attributeToPropertyInputs = {}; | ||
inputs.forEach(function (_a) { | ||
var propName = _a.propName, templateName = _a.templateName; | ||
attributeToPropertyInputs[camelToDashCase(templateName)] = propName; | ||
}); | ||
return attributeToPropertyInputs; | ||
} | ||
/** | ||
* Gets a component's set of inputs. Uses the injector to get the component factory where the inputs | ||
* are defined. | ||
*/ | ||
function getComponentInputs(component, injector) { | ||
var componentFactoryResolver = injector.get(core.ComponentFactoryResolver); | ||
var componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
return componentFactory.inputs; | ||
} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
// NOTE: This is a (slightly improved) version of what is used in ngUpgrade's | ||
// `DowngradeComponentAdapter`. | ||
// TODO(gkalpak): Investigate if it makes sense to share the code. | ||
function extractProjectableNodes(host, ngContentSelectors) { | ||
var nodes = host.childNodes; | ||
var projectableNodes = ngContentSelectors.map(function () { return []; }); | ||
var wildcardIndex = -1; | ||
ngContentSelectors.some(function (selector, i) { | ||
if (selector === '*') { | ||
wildcardIndex = i; | ||
return true; | ||
} | ||
return false; | ||
}); | ||
for (var i = 0, ii = nodes.length; i < ii; ++i) { | ||
var node = nodes[i]; | ||
var ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
if (ngContentIndex !== -1) { | ||
projectableNodes[ngContentIndex].push(node); | ||
} | ||
} | ||
return projectableNodes; | ||
} | ||
function findMatchingIndex(node, selectors, defaultIndex) { | ||
var matchingIndex = defaultIndex; | ||
if (isElement(node)) { | ||
selectors.some(function (selector, i) { | ||
if ((selector !== '*') && matchesSelector(node, selector)) { | ||
matchingIndex = i; | ||
return true; | ||
var scheduler = { | ||
/** | ||
* Schedule a callback to be called after some delay. | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
*/ | ||
schedule: function (taskFn, delay) { var id = setTimeout(taskFn, delay); return function () { return clearTimeout(id); }; }, | ||
/** | ||
* Schedule a callback to be called before the next render. | ||
* (If `window.requestAnimationFrame()` is not available, use `scheduler.schedule()` instead.) | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
*/ | ||
scheduleBeforeRender: function (taskFn) { | ||
// TODO(gkalpak): Implement a better way of accessing `requestAnimationFrame()` | ||
// (e.g. accounting for vendor prefix, SSR-compatibility, etc). | ||
if (typeof window === 'undefined') { | ||
// For SSR just schedule immediately. | ||
return scheduler.schedule(taskFn, 0); | ||
} | ||
return false; | ||
}); | ||
} | ||
return matchingIndex; | ||
} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** Time in milliseconds to wait before destroying the component ref when disconnected. */ | ||
var DESTROY_DELAY = 10; | ||
/** | ||
* Factory that creates new ComponentNgElementStrategy instance. Gets the component factory with the | ||
* constructor's injector's factory resolver and passes that factory to each strategy. | ||
* | ||
* @experimental | ||
*/ | ||
var ComponentNgElementStrategyFactory = /** @class */ (function () { | ||
function ComponentNgElementStrategyFactory(component, injector) { | ||
this.component = component; | ||
this.injector = injector; | ||
this.componentFactory = | ||
injector.get(core.ComponentFactoryResolver).resolveComponentFactory(component); | ||
} | ||
ComponentNgElementStrategyFactory.prototype.create = function (injector) { | ||
return new ComponentNgElementStrategy(this.componentFactory, injector); | ||
if (typeof window.requestAnimationFrame === 'undefined') { | ||
var frameMs = 16; | ||
return scheduler.schedule(taskFn, frameMs); | ||
} | ||
var id = window.requestAnimationFrame(taskFn); | ||
return function () { return window.cancelAnimationFrame(id); }; | ||
}, | ||
}; | ||
return ComponentNgElementStrategyFactory; | ||
}()); | ||
/** | ||
* Creates and destroys a component ref using a component factory and handles change detection | ||
* in response to input changes. | ||
* | ||
* @experimental | ||
*/ | ||
var ComponentNgElementStrategy = /** @class */ (function () { | ||
function ComponentNgElementStrategy(componentFactory, injector) { | ||
this.componentFactory = componentFactory; | ||
this.injector = injector; | ||
/** Changes that have been made to the component ref since the last time onChanges was called. */ | ||
this.inputChanges = null; | ||
/** Whether the created component implements the onChanges function. */ | ||
this.implementsOnChanges = false; | ||
/** Whether a change detection has been scheduled to run on the component. */ | ||
this.scheduledChangeDetectionFn = null; | ||
/** Callback function that when called will cancel a scheduled destruction on the component. */ | ||
this.scheduledDestroyFn = null; | ||
/** Initial input values that were set before the component was created. */ | ||
this.initialInputValues = new Map(); | ||
/** Set of inputs that were not initially set when the component was created. */ | ||
this.uninitializedInputs = new Set(); | ||
/** | ||
* Convert a camelCased string to kebab-cased. | ||
*/ | ||
function camelToDashCase(input) { | ||
return input.replace(/[A-Z]/g, function (char) { return "-" + char.toLowerCase(); }); | ||
} | ||
/** | ||
* Initializes a new component if one has not yet been created and cancels any scheduled | ||
* destruction. | ||
* Create a `CustomEvent` (even on browsers where `CustomEvent` is not a constructor). | ||
*/ | ||
ComponentNgElementStrategy.prototype.connect = function (element) { | ||
// If the element is marked to be destroyed, cancel the task since the component was reconnected | ||
if (this.scheduledDestroyFn !== null) { | ||
this.scheduledDestroyFn(); | ||
this.scheduledDestroyFn = null; | ||
return; | ||
function createCustomEvent(doc, name, detail) { | ||
var bubbles = false; | ||
var cancelable = false; | ||
// On IE9-11, `CustomEvent` is not a constructor. | ||
if (typeof CustomEvent !== 'function') { | ||
var event_1 = doc.createEvent('CustomEvent'); | ||
event_1.initCustomEvent(name, bubbles, cancelable, detail); | ||
return event_1; | ||
} | ||
if (!this.componentRef) { | ||
this.initializeComponent(element); | ||
} | ||
}; | ||
return new CustomEvent(name, { bubbles: bubbles, cancelable: cancelable, detail: detail }); | ||
} | ||
/** | ||
* Schedules the component to be destroyed after some small delay in case the element is just | ||
* being moved across the DOM. | ||
* Check whether the input is an `Element`. | ||
*/ | ||
ComponentNgElementStrategy.prototype.disconnect = function () { | ||
var _this = this; | ||
// Return if there is no componentRef or the component is already scheduled for destruction | ||
if (!this.componentRef || this.scheduledDestroyFn !== null) { | ||
return; | ||
} | ||
// Schedule the component to be destroyed after a small timeout in case it is being | ||
// moved elsewhere in the DOM | ||
this.scheduledDestroyFn = scheduler.schedule(function () { | ||
if (_this.componentRef) { | ||
_this.componentRef.destroy(); | ||
_this.componentRef = null; | ||
} | ||
}, DESTROY_DELAY); | ||
}; | ||
function isElement(node) { | ||
return node.nodeType === Node.ELEMENT_NODE; | ||
} | ||
/** | ||
* Returns the component property value. If the component has not yet been created, the value is | ||
* retrieved from the cached initialization values. | ||
* Check whether the input is a function. | ||
*/ | ||
ComponentNgElementStrategy.prototype.getInputValue = function (property) { | ||
if (!this.componentRef) { | ||
return this.initialInputValues.get(property); | ||
} | ||
return this.componentRef.instance[property]; | ||
}; | ||
function isFunction(value) { | ||
return typeof value === 'function'; | ||
} | ||
/** | ||
* Sets the input value for the property. If the component has not yet been created, the value is | ||
* cached and set when the component is created. | ||
* Check whether an `Element` matches a CSS selector. | ||
*/ | ||
ComponentNgElementStrategy.prototype.setInputValue = function (property, value) { | ||
if (strictEquals(value, this.getInputValue(property))) { | ||
return; | ||
} | ||
if (!this.componentRef) { | ||
this.initialInputValues.set(property, value); | ||
return; | ||
} | ||
this.recordInputChange(property, value); | ||
this.componentRef.instance[property] = value; | ||
this.scheduleDetectChanges(); | ||
}; | ||
function matchesSelector(element, selector) { | ||
return matches.call(element, selector); | ||
} | ||
/** | ||
* Creates a new component through the component factory with the provided element host and | ||
* sets up its initial inputs, listens for outputs changes, and runs an initial change detection. | ||
* Test two values for strict equality, accounting for the fact that `NaN !== NaN`. | ||
*/ | ||
ComponentNgElementStrategy.prototype.initializeComponent = function (element) { | ||
var childInjector = core.Injector.create({ providers: [], parent: this.injector }); | ||
var projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element); | ||
this.implementsOnChanges = | ||
isFunction(this.componentRef.instance.ngOnChanges); | ||
this.initializeInputs(); | ||
this.initializeOutputs(); | ||
this.detectChanges(); | ||
var applicationRef = this.injector.get(core.ApplicationRef); | ||
applicationRef.attachView(this.componentRef.hostView); | ||
}; | ||
/** Set any stored initial inputs on the component's properties. */ | ||
ComponentNgElementStrategy.prototype.initializeInputs = function () { | ||
var _this = this; | ||
this.componentFactory.inputs.forEach(function (_a) { | ||
var propName = _a.propName; | ||
var initialValue = _this.initialInputValues.get(propName); | ||
if (initialValue) { | ||
_this.setInputValue(propName, initialValue); | ||
} | ||
else { | ||
// Keep track of inputs that were not initialized in case we need to know this for | ||
// calling ngOnChanges with SimpleChanges | ||
_this.uninitializedInputs.add(propName); | ||
} | ||
}); | ||
this.initialInputValues.clear(); | ||
}; | ||
/** Sets up listeners for the component's outputs so that the events stream emits the events. */ | ||
ComponentNgElementStrategy.prototype.initializeOutputs = function () { | ||
var _this = this; | ||
var eventEmitters = this.componentFactory.outputs.map(function (_a) { | ||
function strictEquals(value1, value2) { | ||
return value1 === value2 || (value1 !== value1 && value2 !== value2); | ||
} | ||
/** Gets a map of default set of attributes to observe and the properties they affect. */ | ||
function getDefaultAttributeToPropertyInputs(inputs) { | ||
var attributeToPropertyInputs = {}; | ||
inputs.forEach(function (_a) { | ||
var propName = _a.propName, templateName = _a.templateName; | ||
var emitter = _this.componentRef.instance[propName]; | ||
return emitter.pipe(operators.map(function (value) { return ({ name: templateName, value: value }); })); | ||
attributeToPropertyInputs[camelToDashCase(templateName)] = propName; | ||
}); | ||
this.events = rxjs.merge.apply(void 0, __spread(eventEmitters)); | ||
}; | ||
/** Calls ngOnChanges with all the inputs that have changed since the last call. */ | ||
ComponentNgElementStrategy.prototype.callNgOnChanges = function () { | ||
if (!this.implementsOnChanges || this.inputChanges === null) { | ||
return; | ||
} | ||
// Cache the changes and set inputChanges to null to capture any changes that might occur | ||
// during ngOnChanges. | ||
var inputChanges = this.inputChanges; | ||
this.inputChanges = null; | ||
this.componentRef.instance.ngOnChanges(inputChanges); | ||
}; | ||
return attributeToPropertyInputs; | ||
} | ||
/** | ||
* Schedules change detection to run on the component. | ||
* Ignores subsequent calls if already scheduled. | ||
* Gets a component's set of inputs. Uses the injector to get the component factory where the inputs | ||
* are defined. | ||
*/ | ||
ComponentNgElementStrategy.prototype.scheduleDetectChanges = function () { | ||
var _this = this; | ||
if (this.scheduledChangeDetectionFn) { | ||
return; | ||
} | ||
this.scheduledChangeDetectionFn = scheduler.scheduleBeforeRender(function () { | ||
_this.scheduledChangeDetectionFn = null; | ||
_this.detectChanges(); | ||
}); | ||
}; | ||
function getComponentInputs(component, injector) { | ||
var componentFactoryResolver = injector.get(core.ComponentFactoryResolver); | ||
var componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
return componentFactory.inputs; | ||
} | ||
/** | ||
* Records input changes so that the component receives SimpleChanges in its onChanges function. | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
ComponentNgElementStrategy.prototype.recordInputChange = function (property, currentValue) { | ||
// Do not record the change if the component does not implement `OnChanges`. | ||
if (this.componentRef && !this.implementsOnChanges) { | ||
return; | ||
function extractProjectableNodes(host, ngContentSelectors) { | ||
var nodes = host.childNodes; | ||
var projectableNodes = ngContentSelectors.map(function () { return []; }); | ||
var wildcardIndex = -1; | ||
ngContentSelectors.some(function (selector, i) { | ||
if (selector === '*') { | ||
wildcardIndex = i; | ||
return true; | ||
} | ||
return false; | ||
}); | ||
for (var i = 0, ii = nodes.length; i < ii; ++i) { | ||
var node = nodes[i]; | ||
var ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
if (ngContentIndex !== -1) { | ||
projectableNodes[ngContentIndex].push(node); | ||
} | ||
} | ||
if (this.inputChanges === null) { | ||
this.inputChanges = {}; | ||
return projectableNodes; | ||
} | ||
function findMatchingIndex(node, selectors, defaultIndex) { | ||
var matchingIndex = defaultIndex; | ||
if (isElement(node)) { | ||
selectors.some(function (selector, i) { | ||
if ((selector !== '*') && matchesSelector(node, selector)) { | ||
matchingIndex = i; | ||
return true; | ||
} | ||
return false; | ||
}); | ||
} | ||
// If there already is a change, modify the current value to match but leave the values for | ||
// previousValue and isFirstChange. | ||
var pendingChange = this.inputChanges[property]; | ||
if (pendingChange) { | ||
pendingChange.currentValue = currentValue; | ||
return; | ||
return matchingIndex; | ||
} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** Time in milliseconds to wait before destroying the component ref when disconnected. */ | ||
var DESTROY_DELAY = 10; | ||
/** | ||
* Factory that creates new ComponentNgElementStrategy instance. Gets the component factory with the | ||
* constructor's injector's factory resolver and passes that factory to each strategy. | ||
* | ||
* @experimental | ||
*/ | ||
var ComponentNgElementStrategyFactory = /** @class */ (function () { | ||
function ComponentNgElementStrategyFactory(component, injector) { | ||
this.component = component; | ||
this.injector = injector; | ||
this.componentFactory = | ||
injector.get(core.ComponentFactoryResolver).resolveComponentFactory(component); | ||
} | ||
var isFirstChange = this.uninitializedInputs.has(property); | ||
this.uninitializedInputs.delete(property); | ||
var previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
this.inputChanges[property] = new core.SimpleChange(previousValue, currentValue, isFirstChange); | ||
}; | ||
/** Runs change detection on the component. */ | ||
ComponentNgElementStrategy.prototype.detectChanges = function () { | ||
if (!this.componentRef) { | ||
return; | ||
ComponentNgElementStrategyFactory.prototype.create = function (injector) { | ||
return new ComponentNgElementStrategy(this.componentFactory, injector); | ||
}; | ||
return ComponentNgElementStrategyFactory; | ||
}()); | ||
/** | ||
* Creates and destroys a component ref using a component factory and handles change detection | ||
* in response to input changes. | ||
* | ||
* @experimental | ||
*/ | ||
var ComponentNgElementStrategy = /** @class */ (function () { | ||
function ComponentNgElementStrategy(componentFactory, injector) { | ||
this.componentFactory = componentFactory; | ||
this.injector = injector; | ||
/** Changes that have been made to the component ref since the last time onChanges was called. */ | ||
this.inputChanges = null; | ||
/** Whether the created component implements the onChanges function. */ | ||
this.implementsOnChanges = false; | ||
/** Whether a change detection has been scheduled to run on the component. */ | ||
this.scheduledChangeDetectionFn = null; | ||
/** Callback function that when called will cancel a scheduled destruction on the component. */ | ||
this.scheduledDestroyFn = null; | ||
/** Initial input values that were set before the component was created. */ | ||
this.initialInputValues = new Map(); | ||
/** Set of inputs that were not initially set when the component was created. */ | ||
this.uninitializedInputs = new Set(); | ||
} | ||
this.callNgOnChanges(); | ||
this.componentRef.changeDetectorRef.detectChanges(); | ||
}; | ||
return ComponentNgElementStrategy; | ||
}()); | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* Implements the functionality needed for a custom element. | ||
* | ||
* @experimental | ||
*/ | ||
var NgElement = /** @class */ (function (_super) { | ||
__extends(NgElement, _super); | ||
function NgElement() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
/** | ||
* A subscription to change, connect, and disconnect events in the custom element. | ||
* Initializes a new component if one has not yet been created and cancels any scheduled | ||
* destruction. | ||
*/ | ||
_this.ngElementEventsSubscription = null; | ||
return _this; | ||
} | ||
return NgElement; | ||
}(HTMLElement)); | ||
/** | ||
* @description Creates a custom element class based on an Angular component. | ||
* | ||
* Builds a class that encapsulates the functionality of the provided component and | ||
* uses the configuration information to provide more context to the class. | ||
* Takes the component factory's inputs and outputs to convert them to the proper | ||
* custom element API and add hooks to input changes. | ||
* | ||
* The configuration's injector is the initial injector set on the class, | ||
* and used by default for each created instance.This behavior can be overridden with the | ||
* static property to affect all newly created instances, or as a constructor argument for | ||
* one-off creations. | ||
* | ||
* @param component The component to transform. | ||
* @param config A configuration that provides initialization information to the created class. | ||
* @returns The custom-element construction class, which can be registered with | ||
* a browser's `CustomElementRegistry`. | ||
* | ||
* @experimental | ||
*/ | ||
function createCustomElement(component, config) { | ||
var inputs = getComponentInputs(component, config.injector); | ||
var strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
var attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
var NgElementImpl = /** @class */ (function (_super) { | ||
__extends(NgElementImpl, _super); | ||
function NgElementImpl(injector) { | ||
var _this = _super.call(this) || this; | ||
// Note that some polyfills (e.g. document-register-element) do not call the constructor. | ||
// Do not assume this strategy has been created. | ||
// TODO(andrewseguin): Add e2e tests that cover cases where the constructor isn't called. For | ||
// now this is tested using a Google internal test suite. | ||
_this.ngElementStrategy = strategyFactory.create(injector || config.injector); | ||
return _this; | ||
} | ||
NgElementImpl.prototype.attributeChangedCallback = function (attrName, oldValue, newValue, namespace) { | ||
if (!this.ngElementStrategy) { | ||
this.ngElementStrategy = strategyFactory.create(config.injector); | ||
ComponentNgElementStrategy.prototype.connect = function (element) { | ||
// If the element is marked to be destroyed, cancel the task since the component was reconnected | ||
if (this.scheduledDestroyFn !== null) { | ||
this.scheduledDestroyFn(); | ||
this.scheduledDestroyFn = null; | ||
return; | ||
} | ||
var propName = attributeToPropertyInputs[attrName]; | ||
this.ngElementStrategy.setInputValue(propName, newValue); | ||
if (!this.componentRef) { | ||
this.initializeComponent(element); | ||
} | ||
}; | ||
NgElementImpl.prototype.connectedCallback = function () { | ||
/** | ||
* Schedules the component to be destroyed after some small delay in case the element is just | ||
* being moved across the DOM. | ||
*/ | ||
ComponentNgElementStrategy.prototype.disconnect = function () { | ||
var _this = this; | ||
if (!this.ngElementStrategy) { | ||
this.ngElementStrategy = strategyFactory.create(config.injector); | ||
// Return if there is no componentRef or the component is already scheduled for destruction | ||
if (!this.componentRef || this.scheduledDestroyFn !== null) { | ||
return; | ||
} | ||
this.ngElementStrategy.connect(this); | ||
// Listen for events from the strategy and dispatch them as custom events | ||
this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(function (e) { | ||
var customEvent = createCustomEvent(_this.ownerDocument, e.name, e.value); | ||
_this.dispatchEvent(customEvent); | ||
// Schedule the component to be destroyed after a small timeout in case it is being | ||
// moved elsewhere in the DOM | ||
this.scheduledDestroyFn = scheduler.schedule(function () { | ||
if (_this.componentRef) { | ||
_this.componentRef.destroy(); | ||
_this.componentRef = null; | ||
} | ||
}, DESTROY_DELAY); | ||
}; | ||
/** | ||
* Returns the component property value. If the component has not yet been created, the value is | ||
* retrieved from the cached initialization values. | ||
*/ | ||
ComponentNgElementStrategy.prototype.getInputValue = function (property) { | ||
if (!this.componentRef) { | ||
return this.initialInputValues.get(property); | ||
} | ||
return this.componentRef.instance[property]; | ||
}; | ||
/** | ||
* Sets the input value for the property. If the component has not yet been created, the value is | ||
* cached and set when the component is created. | ||
*/ | ||
ComponentNgElementStrategy.prototype.setInputValue = function (property, value) { | ||
if (strictEquals(value, this.getInputValue(property))) { | ||
return; | ||
} | ||
if (!this.componentRef) { | ||
this.initialInputValues.set(property, value); | ||
return; | ||
} | ||
this.recordInputChange(property, value); | ||
this.componentRef.instance[property] = value; | ||
this.scheduleDetectChanges(); | ||
}; | ||
/** | ||
* Creates a new component through the component factory with the provided element host and | ||
* sets up its initial inputs, listens for outputs changes, and runs an initial change detection. | ||
*/ | ||
ComponentNgElementStrategy.prototype.initializeComponent = function (element) { | ||
var childInjector = core.Injector.create({ providers: [], parent: this.injector }); | ||
var projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element); | ||
this.implementsOnChanges = | ||
isFunction(this.componentRef.instance.ngOnChanges); | ||
this.initializeInputs(); | ||
this.initializeOutputs(); | ||
this.detectChanges(); | ||
var applicationRef = this.injector.get(core.ApplicationRef); | ||
applicationRef.attachView(this.componentRef.hostView); | ||
}; | ||
/** Set any stored initial inputs on the component's properties. */ | ||
ComponentNgElementStrategy.prototype.initializeInputs = function () { | ||
var _this = this; | ||
this.componentFactory.inputs.forEach(function (_a) { | ||
var propName = _a.propName; | ||
var initialValue = _this.initialInputValues.get(propName); | ||
if (initialValue) { | ||
_this.setInputValue(propName, initialValue); | ||
} | ||
else { | ||
// Keep track of inputs that were not initialized in case we need to know this for | ||
// calling ngOnChanges with SimpleChanges | ||
_this.uninitializedInputs.add(propName); | ||
} | ||
}); | ||
this.initialInputValues.clear(); | ||
}; | ||
NgElementImpl.prototype.disconnectedCallback = function () { | ||
if (this.ngElementStrategy) { | ||
this.ngElementStrategy.disconnect(); | ||
/** Sets up listeners for the component's outputs so that the events stream emits the events. */ | ||
ComponentNgElementStrategy.prototype.initializeOutputs = function () { | ||
var _this = this; | ||
var eventEmitters = this.componentFactory.outputs.map(function (_a) { | ||
var propName = _a.propName, templateName = _a.templateName; | ||
var emitter = _this.componentRef.instance[propName]; | ||
return emitter.pipe(operators.map(function (value) { return ({ name: templateName, value: value }); })); | ||
}); | ||
this.events = rxjs.merge.apply(void 0, __spread(eventEmitters)); | ||
}; | ||
/** Calls ngOnChanges with all the inputs that have changed since the last call. */ | ||
ComponentNgElementStrategy.prototype.callNgOnChanges = function () { | ||
if (!this.implementsOnChanges || this.inputChanges === null) { | ||
return; | ||
} | ||
if (this.ngElementEventsSubscription) { | ||
this.ngElementEventsSubscription.unsubscribe(); | ||
this.ngElementEventsSubscription = null; | ||
// Cache the changes and set inputChanges to null to capture any changes that might occur | ||
// during ngOnChanges. | ||
var inputChanges = this.inputChanges; | ||
this.inputChanges = null; | ||
this.componentRef.instance.ngOnChanges(inputChanges); | ||
}; | ||
/** | ||
* Schedules change detection to run on the component. | ||
* Ignores subsequent calls if already scheduled. | ||
*/ | ||
ComponentNgElementStrategy.prototype.scheduleDetectChanges = function () { | ||
var _this = this; | ||
if (this.scheduledChangeDetectionFn) { | ||
return; | ||
} | ||
this.scheduledChangeDetectionFn = scheduler.scheduleBeforeRender(function () { | ||
_this.scheduledChangeDetectionFn = null; | ||
_this.detectChanges(); | ||
}); | ||
}; | ||
// Work around a bug in closure typed optimizations(b/79557487) where it is not honoring static | ||
// field externs. So using quoted access to explicitly prevent renaming. | ||
NgElementImpl['observedAttributes'] = Object.keys(attributeToPropertyInputs); | ||
/** | ||
* Records input changes so that the component receives SimpleChanges in its onChanges function. | ||
*/ | ||
ComponentNgElementStrategy.prototype.recordInputChange = function (property, currentValue) { | ||
// Do not record the change if the component does not implement `OnChanges`. | ||
if (this.componentRef && !this.implementsOnChanges) { | ||
return; | ||
} | ||
if (this.inputChanges === null) { | ||
this.inputChanges = {}; | ||
} | ||
// If there already is a change, modify the current value to match but leave the values for | ||
// previousValue and isFirstChange. | ||
var pendingChange = this.inputChanges[property]; | ||
if (pendingChange) { | ||
pendingChange.currentValue = currentValue; | ||
return; | ||
} | ||
var isFirstChange = this.uninitializedInputs.has(property); | ||
this.uninitializedInputs.delete(property); | ||
var previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
this.inputChanges[property] = new core.SimpleChange(previousValue, currentValue, isFirstChange); | ||
}; | ||
/** Runs change detection on the component. */ | ||
ComponentNgElementStrategy.prototype.detectChanges = function () { | ||
if (!this.componentRef) { | ||
return; | ||
} | ||
this.callNgOnChanges(); | ||
this.componentRef.changeDetectorRef.detectChanges(); | ||
}; | ||
return ComponentNgElementStrategy; | ||
}()); | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* Implements the functionality needed for a custom element. | ||
* | ||
* @experimental | ||
*/ | ||
var NgElement = /** @class */ (function (_super) { | ||
__extends(NgElement, _super); | ||
function NgElement() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
/** | ||
* A subscription to change, connect, and disconnect events in the custom element. | ||
*/ | ||
_this.ngElementEventsSubscription = null; | ||
return _this; | ||
} | ||
return NgElement; | ||
}(HTMLElement)); | ||
/** | ||
* @description Creates a custom element class based on an Angular component. | ||
* | ||
* Builds a class that encapsulates the functionality of the provided component and | ||
* uses the configuration information to provide more context to the class. | ||
* Takes the component factory's inputs and outputs to convert them to the proper | ||
* custom element API and add hooks to input changes. | ||
* | ||
* The configuration's injector is the initial injector set on the class, | ||
* and used by default for each created instance.This behavior can be overridden with the | ||
* static property to affect all newly created instances, or as a constructor argument for | ||
* one-off creations. | ||
* | ||
* @param component The component to transform. | ||
* @param config A configuration that provides initialization information to the created class. | ||
* @returns The custom-element construction class, which can be registered with | ||
* a browser's `CustomElementRegistry`. | ||
* | ||
* @experimental | ||
*/ | ||
function createCustomElement(component, config) { | ||
var inputs = getComponentInputs(component, config.injector); | ||
var strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
var attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
var NgElementImpl = /** @class */ (function (_super) { | ||
__extends(NgElementImpl, _super); | ||
function NgElementImpl(injector) { | ||
var _this = _super.call(this) || this; | ||
// Note that some polyfills (e.g. document-register-element) do not call the constructor. | ||
// Do not assume this strategy has been created. | ||
// TODO(andrewseguin): Add e2e tests that cover cases where the constructor isn't called. For | ||
// now this is tested using a Google internal test suite. | ||
_this.ngElementStrategy = strategyFactory.create(injector || config.injector); | ||
return _this; | ||
} | ||
NgElementImpl.prototype.attributeChangedCallback = function (attrName, oldValue, newValue, namespace) { | ||
if (!this.ngElementStrategy) { | ||
this.ngElementStrategy = strategyFactory.create(config.injector); | ||
} | ||
var propName = attributeToPropertyInputs[attrName]; | ||
this.ngElementStrategy.setInputValue(propName, newValue); | ||
}; | ||
NgElementImpl.prototype.connectedCallback = function () { | ||
var _this = this; | ||
if (!this.ngElementStrategy) { | ||
this.ngElementStrategy = strategyFactory.create(config.injector); | ||
} | ||
this.ngElementStrategy.connect(this); | ||
// Listen for events from the strategy and dispatch them as custom events | ||
this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(function (e) { | ||
var customEvent = createCustomEvent(_this.ownerDocument, e.name, e.value); | ||
_this.dispatchEvent(customEvent); | ||
}); | ||
}; | ||
NgElementImpl.prototype.disconnectedCallback = function () { | ||
if (this.ngElementStrategy) { | ||
this.ngElementStrategy.disconnect(); | ||
} | ||
if (this.ngElementEventsSubscription) { | ||
this.ngElementEventsSubscription.unsubscribe(); | ||
this.ngElementEventsSubscription = null; | ||
} | ||
}; | ||
// Work around a bug in closure typed optimizations(b/79557487) where it is not honoring static | ||
// field externs. So using quoted access to explicitly prevent renaming. | ||
NgElementImpl['observedAttributes'] = Object.keys(attributeToPropertyInputs); | ||
return NgElementImpl; | ||
}(NgElement)); | ||
// Add getters and setters to the prototype for each property input. If the config does not | ||
// contain property inputs, use all inputs by default. | ||
inputs.map(function (_a) { | ||
var propName = _a.propName; | ||
return propName; | ||
}).forEach(function (property) { | ||
Object.defineProperty(NgElementImpl.prototype, property, { | ||
get: function () { return this.ngElementStrategy.getInputValue(property); }, | ||
set: function (newValue) { this.ngElementStrategy.setInputValue(property, newValue); }, | ||
configurable: true, | ||
enumerable: true, | ||
}); | ||
}); | ||
return NgElementImpl; | ||
}(NgElement)); | ||
// Add getters and setters to the prototype for each property input. If the config does not | ||
// contain property inputs, use all inputs by default. | ||
inputs.map(function (_a) { | ||
var propName = _a.propName; | ||
return propName; | ||
}).forEach(function (property) { | ||
Object.defineProperty(NgElementImpl.prototype, property, { | ||
get: function () { return this.ngElementStrategy.getInputValue(property); }, | ||
set: function (newValue) { this.ngElementStrategy.setInputValue(property, newValue); }, | ||
configurable: true, | ||
enumerable: true, | ||
}); | ||
}); | ||
return NgElementImpl; | ||
} | ||
} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @experimental | ||
*/ | ||
var VERSION = new core.Version('6.1.0-beta.3'); | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @experimental | ||
*/ | ||
var VERSION = new core.Version('6.1.0-rc.0'); | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @module | ||
* @description | ||
* Entry point for all public APIs of the `elements` package. | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 file only reexports content of the `src` folder. Keep it that way. | ||
// This file only reexports content of the `src` folder. Keep it that way. | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 file is not used to build this module. It is only used during editing | ||
// by the TypeScript language service and during build for verification. `ngc` | ||
// replaces this file with production index.ts when it rewrites private symbol | ||
// names. | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
exports.NgElement = NgElement; | ||
exports.createCustomElement = createCustomElement; | ||
exports.VERSION = VERSION; | ||
exports.NgElement = NgElement; | ||
exports.createCustomElement = createCustomElement; | ||
exports.VERSION = VERSION; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
//# sourceMappingURL=elements.umd.js.map |
/** | ||
* @license Angular v6.1.0-beta.3 | ||
* @license Angular v6.1.0-rc.0 | ||
* (c) 2010-2018 Google, Inc. https://angular.io/ | ||
@@ -8,45 +8,45 @@ * License: MIT | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
var u=Element.prototype,c=u.matches||u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector,a={schedule:function(t,e){var n=setTimeout(t,e);return function(){return clearTimeout(n)}},scheduleBeforeRender:function(t){if("undefined"==typeof window)return a.schedule(t,0);if(void 0===window.requestAnimationFrame)return a.schedule(t,16);var e=window.requestAnimationFrame(t);return function(){return window.cancelAnimationFrame(e)}}};function l(t,e,n){var o=n;return function i(t){return t.nodeType===Node.ELEMENT_NODE}(t)&&e.some(function(e,n){return!("*"===e||!function i(t,e){return c.call(t,e)}(t,e)||(o=n,0))}),o} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/var p=function(){function t(t,n){this.component=t,this.injector=n,this.componentFactory=n.get(e.ComponentFactoryResolver).resolveComponentFactory(t)}return t.prototype.create=function(t){return new h(this.componentFactory,t)},t}(),h=function(){function t(t,e){this.componentFactory=t,this.injector=e,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.uninitializedInputs=new Set}return t.prototype.connect=function(t){if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);this.componentRef||this.initializeComponent(t)},t.prototype.disconnect=function(){var t=this;this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=a.schedule(function(){t.componentRef&&(t.componentRef.destroy(),t.componentRef=null)},10))},t.prototype.getInputValue=function(t){return this.componentRef?this.componentRef.instance[t]:this.initialInputValues.get(t)},t.prototype.setInputValue=function(t,e){(function n(t,e){return t===e||t!=t&&e!=e})(e,this.getInputValue(t))||(this.componentRef?(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e))},t.prototype.initializeComponent=function(t){var n=e.Injector.create({providers:[],parent:this.injector}),o= | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/var p=function(){function t(t,n){this.component=t,this.injector=n,this.componentFactory=n.get(e.ComponentFactoryResolver).resolveComponentFactory(t)}return t.prototype.create=function(t){return new h(this.componentFactory,t)},t}(),h=function(){function t(t,e){this.componentFactory=t,this.injector=e,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.uninitializedInputs=new Set}return t.prototype.connect=function(t){if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);this.componentRef||this.initializeComponent(t)},t.prototype.disconnect=function(){var t=this;this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=a.schedule(function(){t.componentRef&&(t.componentRef.destroy(),t.componentRef=null)},10))},t.prototype.getInputValue=function(t){return this.componentRef?this.componentRef.instance[t]:this.initialInputValues.get(t)},t.prototype.setInputValue=function(t,e){(function n(t,e){return t===e||t!=t&&e!=e})(e,this.getInputValue(t))||(this.componentRef?(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e))},t.prototype.initializeComponent=function(t){var n=e.Injector.create({providers:[],parent:this.injector}),o= | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
function i(t,e){var n=t.childNodes,o=e.map(function(){return[]}),i=-1;e.some(function(t,e){return"*"===t&&(i=e,!0)});for(var r=0,s=n.length;r<s;++r){var u=n[r],c=l(u,e,i);-1!==c&&o[c].push(u)}return o}(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,o,t),this.implementsOnChanges=function r(t){return"function"==typeof t}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(),this.detectChanges(),this.injector.get(e.ApplicationRef).attachView(this.componentRef.hostView)},t.prototype.initializeInputs=function(){var t=this;this.componentFactory.inputs.forEach(function(e){var n=e.propName,o=t.initialInputValues.get(n);o?t.setInputValue(n,o):t.uninitializedInputs.add(n)}),this.initialInputValues.clear()},t.prototype.initializeOutputs=function(){var t=this,e=this.componentFactory.outputs.map(function(e){var n=e.templateName;return t.componentRef.instance[e.propName].pipe(o.map(function(t){return{name:n,value:t}}))});this.events=n.merge.apply(void 0,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(e))},t.prototype.callNgOnChanges=function(){if(this.implementsOnChanges&&null!==this.inputChanges){var t=this.inputChanges;this.inputChanges=null,this.componentRef.instance.ngOnChanges(t)}},t.prototype.scheduleDetectChanges=function(){var t=this;this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=a.scheduleBeforeRender(function(){t.scheduledChangeDetectionFn=null,t.detectChanges()}))},t.prototype.recordInputChange=function(t,n){if(!this.componentRef||this.implementsOnChanges){null===this.inputChanges&&(this.inputChanges={});var o=this.inputChanges[t];if(o)o.currentValue=n;else{var i=this.uninitializedInputs.has(t);this.uninitializedInputs.delete(t);var r=i?void 0:this.getInputValue(t);this.inputChanges[t]=new e.SimpleChange(r,n,i)}}},t.prototype.detectChanges=function(){this.componentRef&&(this.callNgOnChanges(),this.componentRef.changeDetectorRef.detectChanges())},t}(),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ngElementEventsSubscription=null,e}return r(e,t),e}(HTMLElement),m=new e.Version("6.1.0-beta.3"); | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
function i(t,e){var n=t.childNodes,o=e.map(function(){return[]}),i=-1;e.some(function(t,e){return"*"===t&&(i=e,!0)});for(var r=0,s=n.length;r<s;++r){var u=n[r],c=l(u,e,i);-1!==c&&o[c].push(u)}return o}(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,o,t),this.implementsOnChanges=function r(t){return"function"==typeof t}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(),this.detectChanges(),this.injector.get(e.ApplicationRef).attachView(this.componentRef.hostView)},t.prototype.initializeInputs=function(){var t=this;this.componentFactory.inputs.forEach(function(e){var n=e.propName,o=t.initialInputValues.get(n);o?t.setInputValue(n,o):t.uninitializedInputs.add(n)}),this.initialInputValues.clear()},t.prototype.initializeOutputs=function(){var t=this,e=this.componentFactory.outputs.map(function(e){var n=e.templateName;return t.componentRef.instance[e.propName].pipe(o.map(function(t){return{name:n,value:t}}))});this.events=n.merge.apply(void 0,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(e))},t.prototype.callNgOnChanges=function(){if(this.implementsOnChanges&&null!==this.inputChanges){var t=this.inputChanges;this.inputChanges=null,this.componentRef.instance.ngOnChanges(t)}},t.prototype.scheduleDetectChanges=function(){var t=this;this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=a.scheduleBeforeRender(function(){t.scheduledChangeDetectionFn=null,t.detectChanges()}))},t.prototype.recordInputChange=function(t,n){if(!this.componentRef||this.implementsOnChanges){null===this.inputChanges&&(this.inputChanges={});var o=this.inputChanges[t];if(o)o.currentValue=n;else{var i=this.uninitializedInputs.has(t);this.uninitializedInputs.delete(t);var r=i?void 0:this.getInputValue(t);this.inputChanges[t]=new e.SimpleChange(r,n,i)}}},t.prototype.detectChanges=function(){this.componentRef&&(this.callNgOnChanges(),this.componentRef.changeDetectorRef.detectChanges())},t}(),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ngElementEventsSubscription=null,e}return r(e,t),e}(HTMLElement),m=new e.Version("6.1.0-rc.0"); | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
t.NgElement=f,t.createCustomElement=function g(t,n){var o=function i(t,n){return n.get(e.ComponentFactoryResolver).resolveComponentFactory(t).inputs}(t,n.injector),s=n.strategyFactory||new p(t,n.injector),u=function c(t){var e={};return t.forEach(function(t){var n=t.propName;e[function o(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})}(t.templateName)]=n}),e}(o),a=function(t){function e(e){var o=t.call(this)||this;return o.ngElementStrategy=s.create(e||n.injector),o}return r(e,t),e.prototype.attributeChangedCallback=function(t,e,o,i){this.ngElementStrategy||(this.ngElementStrategy=s.create(n.injector)),this.ngElementStrategy.setInputValue(u[t],o)},e.prototype.connectedCallback=function(){var t=this;this.ngElementStrategy||(this.ngElementStrategy=s.create(n.injector)),this.ngElementStrategy.connect(this),this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(function(e){var n=function o(t,e,n){if("function"!=typeof CustomEvent){var o=t.createEvent("CustomEvent");return o.initCustomEvent(e,!1,!1,n),o}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(t.ownerDocument,e.name,e.value);t.dispatchEvent(n)})},e.prototype.disconnectedCallback=function(){this.ngElementStrategy&&this.ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)},e.observedAttributes=Object.keys(u),e}(f);return o.map(function(t){return t.propName}).forEach(function(t){Object.defineProperty(a.prototype,t,{get:function(){return this.ngElementStrategy.getInputValue(t)},set:function(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})}),a} | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/,t.VERSION=m,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/,t.VERSION=m,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"NgElement":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"HTMLElement"},"members":{"attributeChangedCallback":[{"__symbolic":"method"}],"connectedCallback":[{"__symbolic":"method"}],"disconnectedCallback":[{"__symbolic":"method"}]}},"NgElementConfig":{"__symbolic":"interface"},"NgElementConstructor":{"__symbolic":"interface"},"WithProperties":{"__symbolic":"interface"},"createCustomElement":{"__symbolic":"function"},"NgElementStrategy":{"__symbolic":"interface"},"NgElementStrategyEvent":{"__symbolic":"interface"},"NgElementStrategyFactory":{"__symbolic":"interface"},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":12,"character":27},"arguments":["6.1.0-beta.3"]}},"origins":{"NgElement":"./src/create-custom-element","NgElementConfig":"./src/create-custom-element","NgElementConstructor":"./src/create-custom-element","WithProperties":"./src/create-custom-element","createCustomElement":"./src/create-custom-element","NgElementStrategy":"./src/element-strategy","NgElementStrategyEvent":"./src/element-strategy","NgElementStrategyFactory":"./src/element-strategy","VERSION":"./src/version"},"importAs":"@angular/elements"} | ||
{"__symbolic":"module","version":4,"metadata":{"NgElement":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"HTMLElement"},"members":{"attributeChangedCallback":[{"__symbolic":"method"}],"connectedCallback":[{"__symbolic":"method"}],"disconnectedCallback":[{"__symbolic":"method"}]}},"NgElementConfig":{"__symbolic":"interface"},"NgElementConstructor":{"__symbolic":"interface"},"WithProperties":{"__symbolic":"interface"},"createCustomElement":{"__symbolic":"function"},"NgElementStrategy":{"__symbolic":"interface"},"NgElementStrategyEvent":{"__symbolic":"interface"},"NgElementStrategyFactory":{"__symbolic":"interface"},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":12,"character":27},"arguments":["6.1.0-rc.0"]}},"origins":{"NgElement":"./src/create-custom-element","NgElementConfig":"./src/create-custom-element","NgElementConstructor":"./src/create-custom-element","WithProperties":"./src/create-custom-element","createCustomElement":"./src/create-custom-element","NgElementStrategy":"./src/element-strategy","NgElementStrategyEvent":"./src/element-strategy","NgElementStrategyFactory":"./src/element-strategy","VERSION":"./src/version"},"importAs":"@angular/elements"} |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -17,6 +17,6 @@ /** | ||
import { isFunction, scheduler, strictEquals } from './utils'; | ||
/** | ||
/** * | ||
* Time in milliseconds to wait before destroying the component ref when disconnected. | ||
*/ | ||
const /** @type {?} */ DESTROY_DELAY = 10; | ||
@type {?} */ | ||
const DESTROY_DELAY = 10; | ||
/** | ||
@@ -47,3 +47,3 @@ * Factory that creates new ComponentNgElementStrategy instance. Gets the component factory with the | ||
} | ||
function ComponentNgElementStrategyFactory_tsickle_Closure_declarations() { | ||
if (false) { | ||
/** @type {?} */ | ||
@@ -169,4 +169,6 @@ ComponentNgElementStrategyFactory.prototype.componentFactory; | ||
initializeComponent(element) { | ||
const /** @type {?} */ childInjector = Injector.create({ providers: [], parent: this.injector }); | ||
const /** @type {?} */ projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
/** @type {?} */ | ||
const childInjector = Injector.create({ providers: [], parent: this.injector }); | ||
/** @type {?} */ | ||
const projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element); | ||
@@ -178,3 +180,4 @@ this.implementsOnChanges = | ||
this.detectChanges(); | ||
const /** @type {?} */ applicationRef = this.injector.get(ApplicationRef); | ||
/** @type {?} */ | ||
const applicationRef = this.injector.get(ApplicationRef); | ||
applicationRef.attachView(this.componentRef.hostView); | ||
@@ -188,3 +191,4 @@ } | ||
this.componentFactory.inputs.forEach(({ propName }) => { | ||
const /** @type {?} */ initialValue = this.initialInputValues.get(propName); | ||
/** @type {?} */ | ||
const initialValue = this.initialInputValues.get(propName); | ||
if (initialValue) { | ||
@@ -206,4 +210,6 @@ this.setInputValue(propName, initialValue); | ||
initializeOutputs() { | ||
const /** @type {?} */ eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => { | ||
const /** @type {?} */ emitter = /** @type {?} */ ((/** @type {?} */ (((this.componentRef)).instance))[propName]); | ||
/** @type {?} */ | ||
const eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => { | ||
/** @type {?} */ | ||
const emitter = /** @type {?} */ ((/** @type {?} */ (((this.componentRef)).instance))[propName]); | ||
return emitter.pipe(map((value) => ({ name: templateName, value }))); | ||
@@ -221,5 +227,4 @@ }); | ||
} | ||
// Cache the changes and set inputChanges to null to capture any changes that might occur | ||
// during ngOnChanges. | ||
const /** @type {?} */ inputChanges = this.inputChanges; | ||
/** @type {?} */ | ||
const inputChanges = this.inputChanges; | ||
this.inputChanges = null; | ||
@@ -256,5 +261,4 @@ (/** @type {?} */ ((((this.componentRef)).instance))).ngOnChanges(inputChanges); | ||
} | ||
// If there already is a change, modify the current value to match but leave the values for | ||
// previousValue and isFirstChange. | ||
const /** @type {?} */ pendingChange = this.inputChanges[property]; | ||
/** @type {?} */ | ||
const pendingChange = this.inputChanges[property]; | ||
if (pendingChange) { | ||
@@ -264,5 +268,7 @@ pendingChange.currentValue = currentValue; | ||
} | ||
const /** @type {?} */ isFirstChange = this.uninitializedInputs.has(property); | ||
/** @type {?} */ | ||
const isFirstChange = this.uninitializedInputs.has(property); | ||
this.uninitializedInputs.delete(property); | ||
const /** @type {?} */ previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
/** @type {?} */ | ||
const previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
this.inputChanges[property] = new SimpleChange(previousValue, currentValue, isFirstChange); | ||
@@ -282,3 +288,3 @@ } | ||
} | ||
function ComponentNgElementStrategy_tsickle_Closure_declarations() { | ||
if (false) { | ||
/** | ||
@@ -330,2 +336,2 @@ * Merged stream of the component's output events. | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LWZhY3Rvcnktc3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9lbGVtZW50cy9zcmMvY29tcG9uZW50LWZhY3Rvcnktc3RyYXRlZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFRQSxPQUFPLEVBQUMsY0FBYyxFQUFvQix3QkFBd0IsRUFBOEIsUUFBUSxFQUFhLFlBQVksRUFBc0IsTUFBTSxlQUFlLENBQUM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IS5jaGFuZ2VEZXRlY3RvclJlZi5kZXRlY3RDaGFuZ2VzKCk7XG4gIH1cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -24,14 +24,9 @@ /** | ||
export function NgElementConstructor() { } | ||
function NgElementConstructor_tsickle_Closure_declarations() { | ||
/** | ||
* An array of observed attribute names for the custom element, | ||
* derived by transforming input property names from the source component. | ||
* @type {?} | ||
*/ | ||
NgElementConstructor.prototype.observedAttributes; | ||
/* TODO: handle strange member: | ||
new (injector: Injector): NgElement&WithProperties<P>; | ||
*/ | ||
} | ||
/** | ||
* An array of observed attribute names for the custom element, | ||
* derived by transforming input property names from the source component. | ||
* @type {?} | ||
*/ | ||
NgElementConstructor.prototype.observedAttributes; | ||
/** | ||
* Implements the functionality needed for a custom element. | ||
@@ -51,3 +46,3 @@ * | ||
} | ||
function NgElement_tsickle_Closure_declarations() { | ||
if (false) { | ||
/** | ||
@@ -86,2 +81,5 @@ * The strategy that controls how a component is transformed in a custom element. | ||
} | ||
/** @typedef {?} */ | ||
var WithProperties; | ||
export { WithProperties }; | ||
/** | ||
@@ -96,16 +94,14 @@ * A configuration that initializes an NgElementConstructor with the | ||
export function NgElementConfig() { } | ||
function NgElementConfig_tsickle_Closure_declarations() { | ||
/** | ||
* The injector to use for retrieving the component's factory. | ||
* @type {?} | ||
*/ | ||
NgElementConfig.prototype.injector; | ||
/** | ||
* An optional custom strategy factory to use instead of the default. | ||
* The strategy controls how the tranformation is performed. | ||
* @type {?|undefined} | ||
*/ | ||
NgElementConfig.prototype.strategyFactory; | ||
} | ||
/** | ||
* The injector to use for retrieving the component's factory. | ||
* @type {?} | ||
*/ | ||
NgElementConfig.prototype.injector; | ||
/** | ||
* An optional custom strategy factory to use instead of the default. | ||
* The strategy controls how the tranformation is performed. | ||
* @type {?|undefined} | ||
*/ | ||
NgElementConfig.prototype.strategyFactory; | ||
/** | ||
* \@description Creates a custom element class based on an Angular component. | ||
@@ -132,5 +128,8 @@ * | ||
export function createCustomElement(component, config) { | ||
const /** @type {?} */ inputs = getComponentInputs(component, config.injector); | ||
const /** @type {?} */ strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
const /** @type {?} */ attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
/** @type {?} */ | ||
const inputs = getComponentInputs(component, config.injector); | ||
/** @type {?} */ | ||
const strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
/** @type {?} */ | ||
const attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
class NgElementImpl extends NgElement { | ||
@@ -159,3 +158,4 @@ /** | ||
} | ||
const /** @type {?} */ propName = /** @type {?} */ ((attributeToPropertyInputs[attrName])); | ||
/** @type {?} */ | ||
const propName = /** @type {?} */ ((attributeToPropertyInputs[attrName])); | ||
this.ngElementStrategy.setInputValue(propName, newValue); | ||
@@ -173,3 +173,4 @@ } | ||
this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(e => { | ||
const /** @type {?} */ customEvent = createCustomEvent(this.ownerDocument, e.name, e.value); | ||
/** @type {?} */ | ||
const customEvent = createCustomEvent(this.ownerDocument, e.name, e.value); | ||
this.dispatchEvent(customEvent); | ||
@@ -192,3 +193,3 @@ }); | ||
NgElementImpl['observedAttributes'] = Object.keys(attributeToPropertyInputs); | ||
function NgElementImpl_tsickle_Closure_declarations() { | ||
if (false) { | ||
/* TODO: handle strange member: | ||
@@ -211,2 +212,2 @@ static readonly['observedAttributes'] = Object.keys(attributeToPropertyInputs); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWN1c3RvbS1lbGVtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZWxlbWV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mdFbGVtZW50U3RyYXRlZ3kuc2V0SW5wdXRWYWx1ZShwcm9wZXJ0eSwgbmV3VmFsdWUpOyB9LFxuICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICB9KTtcbiAgfSk7XG5cbiAgcmV0dXJuIChOZ0VsZW1lbnRJbXBsIGFzIGFueSkgYXMgTmdFbGVtZW50Q29uc3RydWN0b3I8UD47XG59Il19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -12,8 +12,6 @@ /** | ||
export function NgElementStrategyEvent() { } | ||
function NgElementStrategyEvent_tsickle_Closure_declarations() { | ||
/** @type {?} */ | ||
NgElementStrategyEvent.prototype.name; | ||
/** @type {?} */ | ||
NgElementStrategyEvent.prototype.value; | ||
} | ||
/** @type {?} */ | ||
NgElementStrategyEvent.prototype.name; | ||
/** @type {?} */ | ||
NgElementStrategyEvent.prototype.value; | ||
/** | ||
@@ -27,14 +25,12 @@ * Underlying strategy used by the NgElement to create/destroy the component and react to input | ||
export function NgElementStrategy() { } | ||
function NgElementStrategy_tsickle_Closure_declarations() { | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.events; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.connect; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.disconnect; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.getInputValue; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.setInputValue; | ||
} | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.events; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.connect; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.disconnect; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.getInputValue; | ||
/** @type {?} */ | ||
NgElementStrategy.prototype.setInputValue; | ||
/** | ||
@@ -47,10 +43,8 @@ * Factory used to create new strategies for each NgElement instance. | ||
export function NgElementStrategyFactory() { } | ||
function NgElementStrategyFactory_tsickle_Closure_declarations() { | ||
/** | ||
* Creates a new instance to be used for an NgElement. | ||
* @type {?} | ||
*/ | ||
NgElementStrategyFactory.prototype.create; | ||
} | ||
/** | ||
* Creates a new instance to be used for an NgElement. | ||
* @type {?} | ||
*/ | ||
NgElementStrategyFactory.prototype.create; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudC1zdHJhdGVneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2VsZW1lbnRzL3NyYy9lbGVtZW50LXN0cmF0ZWd5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5pbXBvcnQge0NvbXBvbmVudEZhY3RvcnksIEluamVjdG9yfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7T2JzZXJ2YWJsZX0gZnJvbSAncnhqcyc7XG5cbi8qKlxuICogSW50ZXJmYWNlIGZvciB0aGUgZXZlbnRzIGVtaXR0ZWQgdGhyb3VnaCB0aGUgTmdFbGVtZW50U3RyYXRlZ3kuXG4gKlxuICogQGV4cGVyaW1lbnRhbFxuICovXG5leHBvcnQgaW50ZXJmYWNlIE5nRWxlbWVudFN0cmF0ZWd5RXZlbnQge1xuICBuYW1lOiBzdHJpbmc7XG4gIHZhbHVlOiBhbnk7XG59XG5cbi8qKlxuICogVW5kZXJseWluZyBzdHJhdGVneSB1c2VkIGJ5IHRoZSBOZ0VsZW1lbnQgdG8gY3JlYXRlL2Rlc3Ryb3kgdGhlIGNvbXBvbmVudCBhbmQgcmVhY3QgdG8gaW5wdXRcbiAqIGNoYW5nZXMuXG4gKlxuICogQGV4cGVyaW1lbnRhbFxuICovXG5leHBvcnQgaW50ZXJmYWNlIE5nRWxlbWVudFN0cmF0ZWd5IHtcbiAgZXZlbnRzOiBPYnNlcnZhYmxlPE5nRWxlbWVudFN0cmF0ZWd5RXZlbnQ+O1xuXG4gIGNvbm5lY3QoZWxlbWVudDogSFRNTEVsZW1lbnQpOiB2b2lkO1xuICBkaXNjb25uZWN0KCk6IHZvaWQ7XG4gIGdldElucHV0VmFsdWUocHJvcE5hbWU6IHN0cmluZyk6IGFueTtcbiAgc2V0SW5wdXRWYWx1ZShwcm9wTmFtZTogc3RyaW5nLCB2YWx1ZTogc3RyaW5nKTogdm9pZDtcbn1cblxuLyoqXG4gKiBGYWN0b3J5IHVzZWQgdG8gY3JlYXRlIG5ldyBzdHJhdGVnaWVzIGZvciBlYWNoIE5nRWxlbWVudCBpbnN0YW5jZS5cbiAqXG4gKiBAZXhwZXJpbWVudGFsXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgTmdFbGVtZW50U3RyYXRlZ3lGYWN0b3J5IHtcbiAgLyoqIENyZWF0ZXMgYSBuZXcgaW5zdGFuY2UgdG8gYmUgdXNlZCBmb3IgYW4gTmdFbGVtZW50LiAqL1xuICBjcmVhdGUoaW5qZWN0b3I6IEluamVjdG9yKTogTmdFbGVtZW50U3RyYXRlZ3k7XG59XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -19,5 +19,8 @@ /** | ||
export function extractProjectableNodes(host, ngContentSelectors) { | ||
const /** @type {?} */ nodes = host.childNodes; | ||
const /** @type {?} */ projectableNodes = ngContentSelectors.map(() => []); | ||
let /** @type {?} */ wildcardIndex = -1; | ||
/** @type {?} */ | ||
const nodes = host.childNodes; | ||
/** @type {?} */ | ||
const projectableNodes = ngContentSelectors.map(() => []); | ||
/** @type {?} */ | ||
let wildcardIndex = -1; | ||
ngContentSelectors.some((selector, i) => { | ||
@@ -30,5 +33,7 @@ if (selector === '*') { | ||
}); | ||
for (let /** @type {?} */ i = 0, /** @type {?} */ ii = nodes.length; i < ii; ++i) { | ||
const /** @type {?} */ node = nodes[i]; | ||
const /** @type {?} */ ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
for (let i = 0, ii = nodes.length; i < ii; ++i) { | ||
/** @type {?} */ | ||
const node = nodes[i]; | ||
/** @type {?} */ | ||
const ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
if (ngContentIndex !== -1) { | ||
@@ -47,3 +52,4 @@ projectableNodes[ngContentIndex].push(node); | ||
function findMatchingIndex(node, selectors, defaultIndex) { | ||
let /** @type {?} */ matchingIndex = defaultIndex; | ||
/** @type {?} */ | ||
let matchingIndex = defaultIndex; | ||
if (isElement(node)) { | ||
@@ -61,2 +67,2 @@ selectors.some((selector, i) => { | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0cmFjdC1wcm9qZWN0YWJsZS1ub2Rlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2VsZW1lbnRzL3NyYy9leHRyYWN0LXByb2plY3RhYmxlLW5vZGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBWUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxlQUFlLEVBQUMsTUFBTSxTQUFTLENBQUM7Oz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ge1xuICAgICAgd2lsZGNhcmRJbmRleCA9IGk7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9KTtcblxuICBmb3IgKGxldCBpID0gMCwgaWkgPSBub2Rlcy5sZW5ndGg7IGkgPCBpaTsgKytpKSB7XG4gICAgY29uc3Qgbm9kZSA9IG5vZGVzW2ldO1xuICAgIGNvbnN0IG5nQ29udGVudEluZGV4ID0gZmluZE1hdGNoaW5nSW5kZXgobm9kZSwgbmdDb250ZW50U2VsZWN0b3JzLCB3aWxkY2FyZEluZGV4KTtcblxuICAgIGlmIChuZ0NvbnRlbnRJbmRleCAhPT0gLTEpIHtcbiAgICAgIHByb2plY3RhYmxlTm9kZXNbbmdDb250ZW50SW5kZXhdLnB1c2gobm9kZSk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHByb2plY3RhYmxlTm9kZXM7XG59XG5cbmZ1bmN0aW9uIGZpbmRNYXRjaGluZ0luZGV4KG5vZGU6IE5vZGUsIHNlbGVjdG9yczogc3RyaW5nW10sIGRlZmF1bHRJbmRleDogbnVtYmVyKTogbnVtYmVyIHtcbiAgbGV0IG1hdGNoaW5nSW5kZXggPSBkZWZhdWx0SW5kZXg7XG5cbiAgaWYgKGlzRWxlbWVudChub2RlKSkge1xuICAgIHNlbGVjdG9ycy5zb21lKChzZWxlY3RvciwgaSkgPT4ge1xuICAgICAgaWYgKChzZWxlY3RvciAhPT0gJyonKSAmJiBtYXRjaGVzU2VsZWN0b3Iobm9kZSwgc2VsZWN0b3IpKSB7XG4gICAgICAgIG1hdGNoaW5nSW5kZXggPSBpO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9KTtcbiAgfVxuXG4gIHJldHVybiBtYXRjaGluZ0luZGV4O1xufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
import { ComponentFactoryResolver } from '@angular/core'; | ||
const /** @type {?} */ elProto = /** @type {?} */ (Element.prototype); | ||
const /** @type {?} */ matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || | ||
/** @type {?} */ | ||
const elProto = /** @type {?} */ (Element.prototype); | ||
/** @type {?} */ | ||
const matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || | ||
elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector; | ||
/** | ||
/** * | ||
* Provide methods for scheduling the execution of a callback. | ||
*/ | ||
export const /** @type {?} */ scheduler = { | ||
@type {?} */ | ||
export const scheduler = { | ||
/** | ||
@@ -21,3 +23,7 @@ * Schedule a callback to be called after some delay. | ||
*/ | ||
schedule(taskFn, delay) { const /** @type {?} */ id = setTimeout(taskFn, delay); return () => clearTimeout(id); }, | ||
schedule(taskFn, delay) { | ||
/** @type {?} */ | ||
const id = setTimeout(taskFn, delay); | ||
return () => clearTimeout(id); | ||
}, | ||
/** | ||
@@ -39,6 +45,8 @@ * Schedule a callback to be called before the next render. | ||
if (typeof window.requestAnimationFrame === 'undefined') { | ||
const /** @type {?} */ frameMs = 16; | ||
/** @type {?} */ | ||
const frameMs = 16; | ||
return scheduler.schedule(taskFn, frameMs); | ||
} | ||
const /** @type {?} */ id = window.requestAnimationFrame(taskFn); | ||
/** @type {?} */ | ||
const id = window.requestAnimationFrame(taskFn); | ||
return () => window.cancelAnimationFrame(id); | ||
@@ -63,7 +71,10 @@ }, | ||
export function createCustomEvent(doc, name, detail) { | ||
const /** @type {?} */ bubbles = false; | ||
const /** @type {?} */ cancelable = false; | ||
/** @type {?} */ | ||
const bubbles = false; | ||
/** @type {?} */ | ||
const cancelable = false; | ||
// On IE9-11, `CustomEvent` is not a constructor. | ||
if (typeof CustomEvent !== 'function') { | ||
const /** @type {?} */ event = doc.createEvent('CustomEvent'); | ||
/** @type {?} */ | ||
const event = doc.createEvent('CustomEvent'); | ||
event.initCustomEvent(name, bubbles, cancelable, detail); | ||
@@ -122,3 +133,4 @@ return event; | ||
export function getDefaultAttributeToPropertyInputs(inputs) { | ||
const /** @type {?} */ attributeToPropertyInputs = {}; | ||
/** @type {?} */ | ||
const attributeToPropertyInputs = {}; | ||
inputs.forEach(({ propName, templateName }) => { | ||
@@ -137,7 +149,9 @@ attributeToPropertyInputs[camelToDashCase(templateName)] = propName; | ||
export function getComponentInputs(component, injector) { | ||
const /** @type {?} */ componentFactoryResolver = injector.get(ComponentFactoryResolver); | ||
const /** @type {?} */ componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
/** @type {?} */ | ||
const componentFactoryResolver = injector.get(ComponentFactoryResolver); | ||
/** @type {?} */ | ||
const componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
return componentFactory.inputs; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9lbGVtZW50cy9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQU9BLE9BQU8sRUFBQyx3QkFBd0IsRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFFdkUsdUJBQU0sT0FBTyxxQkFBRyxPQUFPLENBQUMsU0FBZ0IsQ0FBQSxDQUFDO0FBQ3pDLHVCQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxlQUFlLElBQUksT0FBTyxDQUFDLGtCQUFrQjtJQUNwRixPQUFPLENBQUMsaUJBQWlCLElBQUksT0FBTyxDQUFDLGdCQUFnQixJQUFJLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBQzs7OztBQUszRixNQUFNLENBQUMsdUJBQU0sU0FBUyxHQUFHOzs7Ozs7Ozs7SUFNdkIsU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2tleTogc3RyaW5nXTogc3RyaW5nfSA9IHt9O1xuICBpbnB1dHMuZm9yRWFjaCgoe3Byb3BOYW1lLCB0ZW1wbGF0ZU5hbWV9KSA9PiB7XG4gICAgYXR0cmlidXRlVG9Qcm9wZXJ0eUlucHV0c1tjYW1lbFRvRGFzaENhc2UodGVtcGxhdGVOYW1lKV0gPSBwcm9wTmFtZTtcbiAgfSk7XG5cbiAgcmV0dXJuIGF0dHJpYnV0ZVRvUHJvcGVydHlJbnB1dHM7XG59XG5cbi8qKlxuICogR2V0cyBhIGNvbXBvbmVudCdzIHNldCBvZiBpbnB1dHMuIFVzZXMgdGhlIGluamVjdG9yIHRvIGdldCB0aGUgY29tcG9uZW50IGZhY3Rvcnkgd2hlcmUgdGhlIGlucHV0c1xuICogYXJlIGRlZmluZWQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRDb21wb25lbnRJbnB1dHMoXG4gICAgY29tcG9uZW50OiBUeXBlPGFueT4sIGluamVjdG9yOiBJbmplY3Rvcik6IHtwcm9wTmFtZTogc3RyaW5nLCB0ZW1wbGF0ZU5hbWU6IHN0cmluZ31bXSB7XG4gIGNvbnN0IGNvbXBvbmVudEZhY3RvcnlSZXNvbHZlcjogQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyID0gaW5qZWN0b3IuZ2V0KENvbXBvbmVudEZhY3RvcnlSZXNvbHZlcik7XG4gIGNvbnN0IGNvbXBvbmVudEZhY3RvcnkgPSBjb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIucmVzb2x2ZUNvbXBvbmVudEZhY3RvcnkoY29tcG9uZW50KTtcbiAgcmV0dXJuIGNvbXBvbmVudEZhY3RvcnkuaW5wdXRzO1xufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
@@ -13,7 +13,7 @@ /** | ||
import { Version } from '@angular/core'; | ||
/** | ||
/** * | ||
* \@experimental | ||
*/ | ||
export const /** @type {?} */ VERSION = new Version('6.1.0-beta.3'); | ||
@type {?} */ | ||
export const VERSION = new Version('6.1.0-rc.0'); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2VsZW1lbnRzL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBUUEsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWUsQ0FBQzs7OztBQUl0QyxNQUFNLENBQUMsdUJBQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG4vKipcbiAqIEBleHBlcmltZW50YWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL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NRztBQUVILE9BQU8sRUFBQyxPQUFPLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdEM7O0dBRUc7QUFDSCxNQUFNLENBQUMsSUFBTSxPQUFPLEdBQUcsSUFBSSxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuaW1wb3J0IHtWZXJzaW9ufSBmcm9tICdAYW5ndWxhci9jb3JlJztcbi8qKlxuICogQGV4cGVyaW1lbnRhbFxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19 |
/** | ||
* @license Angular v6.1.0-beta.3 | ||
* @license Angular v6.1.0-rc.0 | ||
* (c) 2010-2018 Google, Inc. https://angular.io/ | ||
@@ -7,3 +7,3 @@ * License: MIT | ||
import { ApplicationRef, ComponentFactoryResolver, Injector, SimpleChange, Version } from '@angular/core'; | ||
import { ComponentFactoryResolver, ApplicationRef, Injector, SimpleChange, Version } from '@angular/core'; | ||
import { merge } from 'rxjs'; | ||
@@ -14,10 +14,12 @@ import { map } from 'rxjs/operators'; | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** @type {?} */ | ||
const elProto = /** @type {?} */ (Element.prototype); | ||
/** @type {?} */ | ||
const matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || | ||
elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector; | ||
/** | ||
/** * | ||
* Provide methods for scheduling the execution of a callback. | ||
*/ | ||
@type {?} */ | ||
const scheduler = { | ||
@@ -32,3 +34,7 @@ /** | ||
*/ | ||
schedule(taskFn, delay) { const /** @type {?} */ id = setTimeout(taskFn, delay); return () => clearTimeout(id); }, | ||
schedule(taskFn, delay) { | ||
/** @type {?} */ | ||
const id = setTimeout(taskFn, delay); | ||
return () => clearTimeout(id); | ||
}, | ||
/** | ||
@@ -50,6 +56,8 @@ * Schedule a callback to be called before the next render. | ||
if (typeof window.requestAnimationFrame === 'undefined') { | ||
const /** @type {?} */ frameMs = 16; | ||
/** @type {?} */ | ||
const frameMs = 16; | ||
return scheduler.schedule(taskFn, frameMs); | ||
} | ||
const /** @type {?} */ id = window.requestAnimationFrame(taskFn); | ||
/** @type {?} */ | ||
const id = window.requestAnimationFrame(taskFn); | ||
return () => window.cancelAnimationFrame(id); | ||
@@ -74,7 +82,10 @@ }, | ||
function createCustomEvent(doc, name, detail) { | ||
const /** @type {?} */ bubbles = false; | ||
const /** @type {?} */ cancelable = false; | ||
/** @type {?} */ | ||
const bubbles = false; | ||
/** @type {?} */ | ||
const cancelable = false; | ||
// On IE9-11, `CustomEvent` is not a constructor. | ||
if (typeof CustomEvent !== 'function') { | ||
const /** @type {?} */ event = doc.createEvent('CustomEvent'); | ||
/** @type {?} */ | ||
const event = doc.createEvent('CustomEvent'); | ||
event.initCustomEvent(name, bubbles, cancelable, detail); | ||
@@ -102,8 +113,2 @@ return event; | ||
/** | ||
* Convert a kebab-cased string to camelCased. | ||
* @param {?} input | ||
* @return {?} | ||
*/ | ||
/** | ||
* Check whether an `Element` matches a CSS selector. | ||
@@ -132,3 +137,4 @@ * @param {?} element | ||
function getDefaultAttributeToPropertyInputs(inputs) { | ||
const /** @type {?} */ attributeToPropertyInputs = {}; | ||
/** @type {?} */ | ||
const attributeToPropertyInputs = {}; | ||
inputs.forEach(({ propName, templateName }) => { | ||
@@ -147,4 +153,6 @@ attributeToPropertyInputs[camelToDashCase(templateName)] = propName; | ||
function getComponentInputs(component, injector) { | ||
const /** @type {?} */ componentFactoryResolver = injector.get(ComponentFactoryResolver); | ||
const /** @type {?} */ componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
/** @type {?} */ | ||
const componentFactoryResolver = injector.get(ComponentFactoryResolver); | ||
/** @type {?} */ | ||
const componentFactory = componentFactoryResolver.resolveComponentFactory(component); | ||
return componentFactory.inputs; | ||
@@ -155,12 +163,5 @@ } | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* @param {?} host | ||
@@ -171,5 +172,8 @@ * @param {?} ngContentSelectors | ||
function extractProjectableNodes(host, ngContentSelectors) { | ||
const /** @type {?} */ nodes = host.childNodes; | ||
const /** @type {?} */ projectableNodes = ngContentSelectors.map(() => []); | ||
let /** @type {?} */ wildcardIndex = -1; | ||
/** @type {?} */ | ||
const nodes = host.childNodes; | ||
/** @type {?} */ | ||
const projectableNodes = ngContentSelectors.map(() => []); | ||
/** @type {?} */ | ||
let wildcardIndex = -1; | ||
ngContentSelectors.some((selector, i) => { | ||
@@ -182,5 +186,7 @@ if (selector === '*') { | ||
}); | ||
for (let /** @type {?} */ i = 0, /** @type {?} */ ii = nodes.length; i < ii; ++i) { | ||
const /** @type {?} */ node = nodes[i]; | ||
const /** @type {?} */ ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
for (let i = 0, ii = nodes.length; i < ii; ++i) { | ||
/** @type {?} */ | ||
const node = nodes[i]; | ||
/** @type {?} */ | ||
const ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex); | ||
if (ngContentIndex !== -1) { | ||
@@ -199,3 +205,4 @@ projectableNodes[ngContentIndex].push(node); | ||
function findMatchingIndex(node, selectors, defaultIndex) { | ||
let /** @type {?} */ matchingIndex = defaultIndex; | ||
/** @type {?} */ | ||
let matchingIndex = defaultIndex; | ||
if (isElement(node)) { | ||
@@ -215,14 +222,7 @@ selectors.some((selector, i) => { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
/** * | ||
* Time in milliseconds to wait before destroying the component ref when disconnected. | ||
*/ | ||
@type {?} */ | ||
const DESTROY_DELAY = 10; | ||
@@ -367,4 +367,6 @@ /** | ||
initializeComponent(element) { | ||
const /** @type {?} */ childInjector = Injector.create({ providers: [], parent: this.injector }); | ||
const /** @type {?} */ projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
/** @type {?} */ | ||
const childInjector = Injector.create({ providers: [], parent: this.injector }); | ||
/** @type {?} */ | ||
const projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors); | ||
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element); | ||
@@ -376,3 +378,4 @@ this.implementsOnChanges = | ||
this.detectChanges(); | ||
const /** @type {?} */ applicationRef = this.injector.get(ApplicationRef); | ||
/** @type {?} */ | ||
const applicationRef = this.injector.get(ApplicationRef); | ||
applicationRef.attachView(this.componentRef.hostView); | ||
@@ -386,3 +389,4 @@ } | ||
this.componentFactory.inputs.forEach(({ propName }) => { | ||
const /** @type {?} */ initialValue = this.initialInputValues.get(propName); | ||
/** @type {?} */ | ||
const initialValue = this.initialInputValues.get(propName); | ||
if (initialValue) { | ||
@@ -404,4 +408,6 @@ this.setInputValue(propName, initialValue); | ||
initializeOutputs() { | ||
const /** @type {?} */ eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => { | ||
const /** @type {?} */ emitter = /** @type {?} */ ((/** @type {?} */ (((this.componentRef)).instance))[propName]); | ||
/** @type {?} */ | ||
const eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => { | ||
/** @type {?} */ | ||
const emitter = /** @type {?} */ ((/** @type {?} */ (((this.componentRef)).instance))[propName]); | ||
return emitter.pipe(map((value) => ({ name: templateName, value }))); | ||
@@ -419,5 +425,4 @@ }); | ||
} | ||
// Cache the changes and set inputChanges to null to capture any changes that might occur | ||
// during ngOnChanges. | ||
const /** @type {?} */ inputChanges = this.inputChanges; | ||
/** @type {?} */ | ||
const inputChanges = this.inputChanges; | ||
this.inputChanges = null; | ||
@@ -454,5 +459,4 @@ (/** @type {?} */ ((((this.componentRef)).instance))).ngOnChanges(inputChanges); | ||
} | ||
// If there already is a change, modify the current value to match but leave the values for | ||
// previousValue and isFirstChange. | ||
const /** @type {?} */ pendingChange = this.inputChanges[property]; | ||
/** @type {?} */ | ||
const pendingChange = this.inputChanges[property]; | ||
if (pendingChange) { | ||
@@ -462,5 +466,7 @@ pendingChange.currentValue = currentValue; | ||
} | ||
const /** @type {?} */ isFirstChange = this.uninitializedInputs.has(property); | ||
/** @type {?} */ | ||
const isFirstChange = this.uninitializedInputs.has(property); | ||
this.uninitializedInputs.delete(property); | ||
const /** @type {?} */ previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
/** @type {?} */ | ||
const previousValue = isFirstChange ? undefined : this.getInputValue(property); | ||
this.inputChanges[property] = new SimpleChange(previousValue, currentValue, isFirstChange); | ||
@@ -483,22 +489,5 @@ } | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
* Prototype for a class constructor based on an Angular component | ||
* that can be used for custom element registration. Implemented and returned | ||
* by the {\@link createCustomElement createCustomElement() function}. | ||
* | ||
* \@experimental | ||
* @record | ||
* @template P | ||
*/ | ||
/** | ||
* Implements the functionality needed for a custom element. | ||
@@ -519,11 +508,2 @@ * | ||
/** | ||
* A configuration that initializes an NgElementConstructor with the | ||
* dependencies and strategy it needs to transform a component into | ||
* a custom element class. | ||
* | ||
* \@experimental | ||
* @record | ||
*/ | ||
/** | ||
* \@description Creates a custom element class based on an Angular component. | ||
@@ -550,5 +530,8 @@ * | ||
function createCustomElement(component, config) { | ||
const /** @type {?} */ inputs = getComponentInputs(component, config.injector); | ||
const /** @type {?} */ strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
const /** @type {?} */ attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
/** @type {?} */ | ||
const inputs = getComponentInputs(component, config.injector); | ||
/** @type {?} */ | ||
const strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector); | ||
/** @type {?} */ | ||
const attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs); | ||
class NgElementImpl extends NgElement { | ||
@@ -577,3 +560,4 @@ /** | ||
} | ||
const /** @type {?} */ propName = /** @type {?} */ ((attributeToPropertyInputs[attrName])); | ||
/** @type {?} */ | ||
const propName = /** @type {?} */ ((attributeToPropertyInputs[attrName])); | ||
this.ngElementStrategy.setInputValue(propName, newValue); | ||
@@ -591,3 +575,4 @@ } | ||
this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(e => { | ||
const /** @type {?} */ customEvent = createCustomEvent(this.ownerDocument, e.name, e.value); | ||
/** @type {?} */ | ||
const customEvent = createCustomEvent(this.ownerDocument, e.name, e.value); | ||
this.dispatchEvent(customEvent); | ||
@@ -610,2 +595,4 @@ }); | ||
NgElementImpl['observedAttributes'] = Object.keys(attributeToPropertyInputs); | ||
// Add getters and setters to the prototype for each property input. If the config does not | ||
// contain property inputs, use all inputs by default. | ||
inputs.map(({ propName }) => propName).forEach(property => { | ||
@@ -624,28 +611,13 @@ Object.defineProperty(NgElementImpl.prototype, property, { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
/** | ||
/** * | ||
* \@experimental | ||
*/ | ||
const VERSION = new Version('6.1.0-beta.3'); | ||
@type {?} */ | ||
const VERSION = new Version('6.1.0-rc.0'); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 file only reexports content of the `src` folder. Keep it that way. | ||
@@ -655,15 +627,4 @@ | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 file is not used to build this module. It is only used during editing | ||
// by the TypeScript language service and during build for verification. `ngc` | ||
// replaces this file with production index.ts when it rewrites private symbol | ||
// names. | ||
@@ -670,0 +631,0 @@ /** |
/** | ||
* @license Angular v6.1.0-beta.3 | ||
* @license Angular v6.1.0-rc.0 | ||
* (c) 2010-2018 Google, Inc. https://angular.io/ | ||
@@ -7,4 +7,4 @@ * License: MIT | ||
import { ComponentFactoryResolver, ApplicationRef, Injector, SimpleChange, Version } from '@angular/core'; | ||
import { __extends, __spread } from 'tslib'; | ||
import { ApplicationRef, ComponentFactoryResolver, Injector, SimpleChange, Version } from '@angular/core'; | ||
import { merge } from 'rxjs'; | ||
@@ -87,6 +87,2 @@ import { map } from 'rxjs/operators'; | ||
/** | ||
* Convert a kebab-cased string to camelCased. | ||
*/ | ||
/** | ||
* Check whether an `Element` matches a CSS selector. | ||
@@ -129,5 +125,2 @@ */ | ||
*/ | ||
// NOTE: This is a (slightly improved) version of what is used in ngUpgrade's | ||
// `DowngradeComponentAdapter`. | ||
// TODO(gkalpak): Investigate if it makes sense to share the code. | ||
function extractProjectableNodes(host, ngContentSelectors) { | ||
@@ -497,3 +490,3 @@ var nodes = host.childNodes; | ||
*/ | ||
var VERSION = new Version('6.1.0-beta.3'); | ||
var VERSION = new Version('6.1.0-rc.0'); | ||
@@ -507,8 +500,2 @@ /** | ||
*/ | ||
/** | ||
* @module | ||
* @description | ||
* Entry point for all public APIs of the `elements` package. | ||
*/ | ||
// This file only reexports content of the `src` folder. Keep it that way. | ||
@@ -523,6 +510,2 @@ | ||
*/ | ||
// This file is not used to build this module. It is only used during editing | ||
// by the TypeScript language service and during build for verification. `ngc` | ||
// replaces this file with production index.ts when it rewrites private symbol | ||
// names. | ||
@@ -529,0 +512,0 @@ /** |
{ | ||
"name": "@angular/elements", | ||
"version": "6.1.0-beta.3", | ||
"version": "6.1.0-rc.0", | ||
"description": "Angular - library for using Angular Components as Custom Elements", | ||
@@ -19,4 +19,4 @@ "main": "./bundles/elements.umd.js", | ||
"peerDependencies": { | ||
"@angular/core": "6.1.0-beta.3", | ||
"@angular/platform-browser": "6.1.0-beta.3", | ||
"@angular/core": "6.1.0-rc.0", | ||
"@angular/platform-browser": "6.1.0-rc.0", | ||
"rxjs": "^6.0.0" | ||
@@ -23,0 +23,0 @@ }, |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="angular/packages/elements/schematics/ng-add/schema" /> | ||
/** | ||
@@ -9,2 +8,3 @@ * @license | ||
*/ | ||
/// <amd-module name="angular/packages/elements/schematics/ng-add/schema" /> | ||
export interface Schema { | ||
@@ -11,0 +11,0 @@ /** |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. 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 | ||
*/ | ||
export declare function extractProjectableNodes(host: HTMLElement, ngContentSelectors: string[]): Node[][]; |
@@ -13,3 +13,14 @@ /** | ||
export declare const scheduler: { | ||
/** | ||
* Schedule a callback to be called after some delay. | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
*/ | ||
schedule(taskFn: () => void, delay: number): () => void; | ||
/** | ||
* Schedule a callback to be called before the next render. | ||
* (If `window.requestAnimationFrame()` is not available, use `scheduler.schedule()` instead.) | ||
* | ||
* Returns a function that when executed will cancel the scheduled function. | ||
*/ | ||
scheduleBeforeRender(taskFn: () => void): () => void; | ||
@@ -16,0 +27,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
407484
3579