mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
Merge branch '2.x' into 5262-kschaaf-legacy-undefined
This commit is contained in:
+119
@@ -1,5 +1,124 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [v2.6.1](https://github.com/Polymer/polymer/tree/v2.6.1) (2018-08-23)
|
||||||
|
- Make event notification handler read the value from currentTarget, (#5309) ([commit](https://github.com/Polymer/polymer/commit/ffe8f7e8))
|
||||||
|
|
||||||
|
- Regenerate types. ([commit](https://github.com/Polymer/polymer/commit/7f68ab5b))
|
||||||
|
|
||||||
|
- Annotate another two ephemeral classes. ([commit](https://github.com/Polymer/polymer/commit/50ba80b8))
|
||||||
|
|
||||||
|
- Mark some ephemeral super classes as private. ([commit](https://github.com/Polymer/polymer/commit/0bf03d3c))
|
||||||
|
|
||||||
|
- Annotate Node parameter as not null. ([commit](https://github.com/Polymer/polymer/commit/04289ac7))
|
||||||
|
|
||||||
|
- Updates for improved type generation. ([commit](https://github.com/Polymer/polymer/commit/748db7ce))
|
||||||
|
|
||||||
|
- Disable combined CE+SD polyfill testing on browsers with native support, for test economy. ([commit](https://github.com/Polymer/polymer/commit/e24f4f7e))
|
||||||
|
|
||||||
|
- Extend Safari exceptions beyond 10.1 ([commit](https://github.com/Polymer/polymer/commit/fac5f27f))
|
||||||
|
|
||||||
|
- Extend Edge exceptions beyond Edge 16 ([commit](https://github.com/Polymer/polymer/commit/2ac2c6e4))
|
||||||
|
|
||||||
|
- Ignore shady CSS scoping in getComposedHTML ([commit](https://github.com/Polymer/polymer/commit/2729662b))
|
||||||
|
|
||||||
|
- Update gen-typescript-declarations and generate constructor types (#5281) ([commit](https://github.com/Polymer/polymer/commit/2a7c43f3))
|
||||||
|
|
||||||
|
- split chrome and firefox runs, maybe fewer timeouts for firefox ([commit](https://github.com/Polymer/polymer/commit/80512201))
|
||||||
|
|
||||||
|
- port other fixes as well ([commit](https://github.com/Polymer/polymer/commit/bcd01b96))
|
||||||
|
|
||||||
|
- Port Closure Compiler fixes to polymer-externs ([commit](https://github.com/Polymer/polymer/commit/bbaaf727))
|
||||||
|
|
||||||
|
- Fix method to force CE polyfill on. Fixes #5267. ([commit](https://github.com/Polymer/polymer/commit/12b6253f))
|
||||||
|
|
||||||
|
- Fix lint errors. ([commit](https://github.com/Polymer/polymer/commit/77d4de10))
|
||||||
|
|
||||||
|
- Add a test for touches on labels causing clicks on the labelled element. ([commit](https://github.com/Polymer/polymer/commit/6ac4813f))
|
||||||
|
|
||||||
|
- Replace an attempt to spread a NodeList to an array with `Array.from` for Safari 9, where NodeList is not iterable. ([commit](https://github.com/Polymer/polymer/commit/cb40bb41))
|
||||||
|
|
||||||
|
- IE fixes ([commit](https://github.com/Polymer/polymer/commit/6255cdb9))
|
||||||
|
|
||||||
|
- Use node 8 ([commit](https://github.com/Polymer/polymer/commit/28625d61))
|
||||||
|
|
||||||
|
- Only disable tabs for "disablable" elements ([commit](https://github.com/Polymer/polymer/commit/2bca0eeb))
|
||||||
|
|
||||||
|
- Add `@const` to elements ([commit](https://github.com/Polymer/polymer/commit/8009e497))
|
||||||
|
|
||||||
|
- Add user-importable files to `bower.json`'s `main` field for modulizer. ([commit](https://github.com/Polymer/polymer/commit/40e312f8))
|
||||||
|
|
||||||
|
- Add reasoning for suppress missingProperties ([commit](https://github.com/Polymer/polymer/commit/61ca60e4))
|
||||||
|
|
||||||
|
- Don't rely on dom-module synchronously until WCR. ([commit](https://github.com/Polymer/polymer/commit/e64bd0ba))
|
||||||
|
|
||||||
|
- Avoid closure warnings. ([commit](https://github.com/Polymer/polymer/commit/412bb1e0))
|
||||||
|
|
||||||
|
- Add ability to define importMeta on legacy elements. Fixes #5163 ([commit](https://github.com/Polymer/polymer/commit/616f6662))
|
||||||
|
|
||||||
|
- Allow legacy element property definitions with only a type. Fixes #5173 ([commit](https://github.com/Polymer/polymer/commit/d321c6c9))
|
||||||
|
|
||||||
|
- Update docs. ([commit](https://github.com/Polymer/polymer/commit/c8c9e24d))
|
||||||
|
|
||||||
|
- Use Polymer.ResolveUrl.pathFromUrl ([commit](https://github.com/Polymer/polymer/commit/d9d3e439))
|
||||||
|
|
||||||
|
- Fix test under shadydom. Slight logic refactor. ([commit](https://github.com/Polymer/polymer/commit/2128ebe2))
|
||||||
|
|
||||||
|
- Fix lint warning ([commit](https://github.com/Polymer/polymer/commit/fb741ee3))
|
||||||
|
|
||||||
|
- Add importMeta getter to derive importPath from modules. Fixes #5163 ([commit](https://github.com/Polymer/polymer/commit/f7672da9))
|
||||||
|
|
||||||
|
- Reference dependencies as siblings in tests. ([commit](https://github.com/Polymer/polymer/commit/2561d868))
|
||||||
|
|
||||||
|
- Update types ([commit](https://github.com/Polymer/polymer/commit/23ba7dee))
|
||||||
|
|
||||||
|
- Add note about performance vs correctness ([commit](https://github.com/Polymer/polymer/commit/89ab7385))
|
||||||
|
|
||||||
|
- Update types. ([commit](https://github.com/Polymer/polymer/commit/5357d64a))
|
||||||
|
|
||||||
|
- Lint clean. ([commit](https://github.com/Polymer/polymer/commit/f78b0518))
|
||||||
|
|
||||||
|
- Pass through fourth namespace param on attributeChangedCallback. ([commit](https://github.com/Polymer/polymer/commit/91d4aeba))
|
||||||
|
|
||||||
|
- Add a @const annotation to help the Closure Compiler understand that Polymer.Debouncer is the name of a type. ([commit](https://github.com/Polymer/polymer/commit/e5a5725d))
|
||||||
|
|
||||||
|
- [ci skip] update changelog ([commit](https://github.com/Polymer/polymer/commit/92d282a9))
|
||||||
|
|
||||||
|
- Update docs and types ([commit](https://github.com/Polymer/polymer/commit/211c223f))
|
||||||
|
|
||||||
|
- Update perf test to use strict-binding-parser ([commit](https://github.com/Polymer/polymer/commit/f53e9e8a))
|
||||||
|
|
||||||
|
- Correct import paths ([commit](https://github.com/Polymer/polymer/commit/ab93ab08))
|
||||||
|
|
||||||
|
- Only store method once for dynamic functions ([commit](https://github.com/Polymer/polymer/commit/0f0ccdad))
|
||||||
|
|
||||||
|
- Move strict-binding-parser to lib/mixins ([commit](https://github.com/Polymer/polymer/commit/a4d4eb9a))
|
||||||
|
|
||||||
|
- Rename to StrictBindingParser ([commit](https://github.com/Polymer/polymer/commit/19d4b8cb))
|
||||||
|
|
||||||
|
- Fix linter errors ([commit](https://github.com/Polymer/polymer/commit/d8cf449e))
|
||||||
|
|
||||||
|
- Extract to a mixin ([commit](https://github.com/Polymer/polymer/commit/57a14236))
|
||||||
|
|
||||||
|
- Add missing dependency to bower.json ([commit](https://github.com/Polymer/polymer/commit/333a4664))
|
||||||
|
|
||||||
|
- Fix linter warning ([commit](https://github.com/Polymer/polymer/commit/14fac019))
|
||||||
|
|
||||||
|
- Add documentation ([commit](https://github.com/Polymer/polymer/commit/df0ee354))
|
||||||
|
|
||||||
|
- Add performance test for binding-expressions ([commit](https://github.com/Polymer/polymer/commit/42f7d785))
|
||||||
|
|
||||||
|
- Rewrite parser to use switch-case instead of functions ([commit](https://github.com/Polymer/polymer/commit/423074d1))
|
||||||
|
|
||||||
|
- Remove escaping from bindings ([commit](https://github.com/Polymer/polymer/commit/8cd49479))
|
||||||
|
|
||||||
|
- Fix linter warning ([commit](https://github.com/Polymer/polymer/commit/8a5525b0))
|
||||||
|
|
||||||
|
- Refactor to be functional and add more tests ([commit](https://github.com/Polymer/polymer/commit/7eb1a627))
|
||||||
|
|
||||||
|
- Fix linter warnings ([commit](https://github.com/Polymer/polymer/commit/79d05b8a))
|
||||||
|
|
||||||
|
- Rewrite expression parser to state machine ([commit](https://github.com/Polymer/polymer/commit/13b834df))
|
||||||
|
|
||||||
## [v2.6.0](https://github.com/Polymer/polymer/tree/v2.6.0) (2018-03-22)
|
## [v2.6.0](https://github.com/Polymer/polymer/tree/v2.6.0) (2018-03-22)
|
||||||
- Use function instead of Set ([commit](https://github.com/Polymer/polymer/commit/33d2e1a8))
|
- Use function instead of Set ([commit](https://github.com/Polymer/polymer/commit/33d2e1a8))
|
||||||
|
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ Polymer_TemplateStamp.prototype._addMethodEventListenerToNode = function(node, e
|
|||||||
*/
|
*/
|
||||||
Polymer_TemplateStamp.prototype._addEventListenerToNode = function(node, eventName, handler){};
|
Polymer_TemplateStamp.prototype._addEventListenerToNode = function(node, eventName, handler){};
|
||||||
/**
|
/**
|
||||||
* @param {Node} node Node to remove event listener from
|
* @param {!Node} node Node to remove event listener from
|
||||||
* @param {string} eventName Name of event
|
* @param {string} eventName Name of event
|
||||||
* @param {function (!Event): void} handler Listener function to remove
|
* @param {function (!Event): void} handler Listener function to remove
|
||||||
* @return {void}
|
* @return {void}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {superClass}
|
* @extends {superClass}
|
||||||
* @implements {Polymer_ElementMixin}
|
* @implements {Polymer_ElementMixin}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
let elementBase = Polymer.ElementMixin(superClass);
|
let elementBase = Polymer.ElementMixin(superClass);
|
||||||
|
|
||||||
@@ -347,6 +348,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {Polymer.Element}
|
* @extends {Polymer.Element}
|
||||||
* @implements {Polymer_ArraySelectorMixin}
|
* @implements {Polymer_ArraySelectorMixin}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
let baseArraySelector = ArraySelectorMixin(Polymer.Element);
|
let baseArraySelector = ArraySelectorMixin(Polymer.Element);
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @implements {Polymer_PropertyEffects}
|
* @implements {Polymer_PropertyEffects}
|
||||||
* @implements {Polymer_OptionalMutableData}
|
* @implements {Polymer_OptionalMutableData}
|
||||||
* @implements {Polymer_GestureEventListeners}
|
* @implements {Polymer_GestureEventListeners}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const domBindBase =
|
const domBindBase =
|
||||||
Polymer.GestureEventListeners(
|
Polymer.GestureEventListeners(
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @implements {Polymer_OptionalMutableData}
|
* @implements {Polymer_OptionalMutableData}
|
||||||
* @extends {Polymer.Element}
|
* @extends {Polymer.Element}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const domRepeatBase = Polymer.OptionalMutableData(Polymer.Element);
|
const domRepeatBase = Polymer.OptionalMutableData(Polymer.Element);
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
*/
|
*/
|
||||||
function GenerateClassFromInfo(info, Base) {
|
function GenerateClassFromInfo(info, Base) {
|
||||||
|
|
||||||
|
/** @private */
|
||||||
class PolymerGenerated extends Base {
|
class PolymerGenerated extends Base {
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @implements {Polymer_ElementMixin}
|
* @implements {Polymer_ElementMixin}
|
||||||
* @implements {Polymer_GestureEventListeners}
|
* @implements {Polymer_GestureEventListeners}
|
||||||
* @implements {Polymer_DirMixin}
|
* @implements {Polymer_DirMixin}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const legacyElementBase = Polymer.DirMixin(Polymer.GestureEventListeners(Polymer.ElementMixin(base)));
|
const legacyElementBase = Polymer.DirMixin(Polymer.GestureEventListeners(Polymer.ElementMixin(base)));
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {base}
|
* @extends {base}
|
||||||
* @implements {Polymer_PropertyAccessors}
|
* @implements {Polymer_PropertyAccessors}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const elementBase = Polymer.PropertyAccessors(base);
|
const elementBase = Polymer.PropertyAccessors(base);
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {base}
|
* @extends {base}
|
||||||
* @implements {Polymer_ElementMixin}
|
* @implements {Polymer_ElementMixin}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const superClass = Polymer.ElementMixin(base);
|
const superClass = Polymer.ElementMixin(base);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @polymer
|
* @polymer
|
||||||
* @mixinClass
|
* @mixinClass
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @extends {base}
|
* @extends {base}
|
||||||
* @implements {Polymer_PropertyEffects}
|
* @implements {Polymer_PropertyEffects}
|
||||||
* @implements {Polymer_PropertiesMixin}
|
* @implements {Polymer_PropertiesMixin}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const polymerElementBase = Polymer.PropertiesMixin(Polymer.PropertyEffects(base));
|
const polymerElementBase = Polymer.PropertiesMixin(Polymer.PropertyEffects(base));
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {superClass}
|
* @extends {superClass}
|
||||||
* @implements {Polymer_PropertiesChanged}
|
* @implements {Polymer_PropertiesChanged}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const base = Polymer.PropertiesChanged(superClass);
|
const base = Polymer.PropertiesChanged(superClass);
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @extends {superClass}
|
* @extends {superClass}
|
||||||
* @implements {Polymer_PropertiesChanged}
|
* @implements {Polymer_PropertiesChanged}
|
||||||
* @unrestricted
|
* @unrestricted
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const base = Polymer.PropertiesChanged(superClass);
|
const base = Polymer.PropertiesChanged(superClass);
|
||||||
|
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
toPath = Polymer.Path.translate(fromProp, toPath, fromPath);
|
toPath = Polymer.Path.translate(fromProp, toPath, fromPath);
|
||||||
value = detail && detail.value;
|
value = detail && detail.value;
|
||||||
} else {
|
} else {
|
||||||
value = event.target[fromProp];
|
value = event.currentTarget[fromProp];
|
||||||
}
|
}
|
||||||
value = negate ? !value : value;
|
value = negate ? !value : value;
|
||||||
if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) {
|
if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) {
|
||||||
@@ -1072,6 +1072,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @implements {Polymer_PropertyAccessors}
|
* @implements {Polymer_PropertyAccessors}
|
||||||
* @implements {Polymer_TemplateStamp}
|
* @implements {Polymer_TemplateStamp}
|
||||||
* @unrestricted
|
* @unrestricted
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const propertyEffectsBase = Polymer.TemplateStamp(Polymer.PropertyAccessors(superClass));
|
const propertyEffectsBase = Polymer.TemplateStamp(Polymer.PropertyAccessors(superClass));
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {base}
|
* @extends {base}
|
||||||
* @implements {Polymer_PropertyEffects}
|
* @implements {Polymer_PropertyEffects}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const elementBase = Polymer.PropertyEffects(base);
|
const elementBase = Polymer.PropertyEffects(base);
|
||||||
|
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
/**
|
/**
|
||||||
* Override point for adding custom or simulated event handling.
|
* Override point for adding custom or simulated event handling.
|
||||||
*
|
*
|
||||||
* @param {Node} node Node to remove event listener from
|
* @param {!Node} node Node to remove event listener from
|
||||||
* @param {string} eventName Name of event
|
* @param {string} eventName Name of event
|
||||||
* @param {function(!Event):void} handler Listener function to remove
|
* @param {function(!Event):void} handler Listener function to remove
|
||||||
* @return {void}
|
* @return {void}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
};
|
};
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
window.Polymer.version = '2.6.0';
|
window.Polymer.version = '2.6.1';
|
||||||
|
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {Function}
|
* @extends {Function}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
function MixinFunction(){}
|
function MixinFunction(){}
|
||||||
/** @type {(WeakMap | undefined)} */
|
/** @type {(WeakMap | undefined)} */
|
||||||
|
|||||||
@@ -21,9 +21,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
// class only because Babel (incorrectly) requires super() in the class
|
// class only because Babel (incorrectly) requires super() in the class
|
||||||
// constructor even though no `this` is used and it returns an instance.
|
// constructor even though no `this` is used and it returns an instance.
|
||||||
let newInstance = null;
|
let newInstance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {HTMLTemplateElement}
|
* @extends {HTMLTemplateElement}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
function HTMLTemplateElementExtension() { return newInstance; }
|
function HTMLTemplateElementExtension() { return newInstance; }
|
||||||
HTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.prototype, {
|
HTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.prototype, {
|
||||||
@@ -32,16 +34,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
writable: true
|
writable: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {Polymer_PropertyEffects}
|
* @implements {Polymer_PropertyEffects}
|
||||||
* @extends {HTMLTemplateElementExtension}
|
* @extends {HTMLTemplateElementExtension}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const DataTemplate = Polymer.PropertyEffects(HTMLTemplateElementExtension);
|
const DataTemplate = Polymer.PropertyEffects(HTMLTemplateElementExtension);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {Polymer_MutableData}
|
* @implements {Polymer_MutableData}
|
||||||
* @extends {DataTemplate}
|
* @extends {DataTemplate}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const MutableDataTemplate = Polymer.MutableData(DataTemplate);
|
const MutableDataTemplate = Polymer.MutableData(DataTemplate);
|
||||||
|
|
||||||
@@ -53,10 +59,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
newInstance = null;
|
newInstance = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base class for TemplateInstance's
|
|
||||||
/**
|
/**
|
||||||
|
* Base class for TemplateInstance.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {Polymer_PropertyEffects}
|
* @implements {Polymer_PropertyEffects}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const base = Polymer.PropertyEffects(class {});
|
const base = Polymer.PropertyEffects(class {});
|
||||||
|
|
||||||
@@ -268,6 +275,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {TemplateInstanceBase}
|
* @extends {TemplateInstanceBase}
|
||||||
* @implements {Polymer_MutableData}
|
* @implements {Polymer_MutableData}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
const MutableTemplateInstanceBase = Polymer.MutableData(TemplateInstanceBase);
|
const MutableTemplateInstanceBase = Polymer.MutableData(TemplateInstanceBase);
|
||||||
|
|
||||||
@@ -311,6 +319,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
let klass = templateInfo.templatizeTemplateClass;
|
let klass = templateInfo.templatizeTemplateClass;
|
||||||
if (!klass) {
|
if (!klass) {
|
||||||
let base = options.mutableData ? MutableDataTemplate : DataTemplate;
|
let base = options.mutableData ? MutableDataTemplate : DataTemplate;
|
||||||
|
/** @private */
|
||||||
klass = templateInfo.templatizeTemplateClass =
|
klass = templateInfo.templatizeTemplateClass =
|
||||||
class TemplatizedTemplate extends base {};
|
class TemplatizedTemplate extends base {};
|
||||||
// Add template - >instances effects
|
// Add template - >instances effects
|
||||||
|
|||||||
Generated
+4187
-2293
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@polymer/polymer",
|
"name": "@polymer/polymer",
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"description": "The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to write",
|
"description": "The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to write",
|
||||||
"main": "polymer.html",
|
"main": "polymer.html",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
+3
-10
@@ -20,25 +20,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
* and property change observation.
|
* and property change observation.
|
||||||
*
|
*
|
||||||
* @customElement
|
* @customElement
|
||||||
* @polymer
|
|
||||||
* @memberof Polymer
|
* @memberof Polymer
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {Polymer_ElementMixin}
|
* @implements {Polymer_ElementMixin}
|
||||||
* @extends HTMLElement
|
* @extends {HTMLElement}
|
||||||
* @appliesMixin Polymer.ElementMixin
|
* @appliesMixin Polymer.ElementMixin
|
||||||
* @summary Custom element base class that provides the core API for Polymer's
|
* @summary Custom element base class that provides the core API for Polymer's
|
||||||
* key meta-programming features including template stamping, data-binding,
|
* key meta-programming features including template stamping, data-binding,
|
||||||
* attribute deserialization, and property change observation
|
* attribute deserialization, and property change observation
|
||||||
*/
|
*/
|
||||||
const Element = Polymer.ElementMixin(HTMLElement);
|
Polymer.Element = Polymer.ElementMixin(HTMLElement);
|
||||||
/**
|
|
||||||
* @constructor
|
|
||||||
* @implements {Polymer_ElementMixin}
|
|
||||||
* @extends {HTMLElement}
|
|
||||||
*/
|
|
||||||
Polymer.Element = Element;
|
|
||||||
|
|
||||||
// NOTE: this is here for modulizer to export `html` for the module version of this file
|
// NOTE: this is here for modulizer to export `html` for the module version of this file
|
||||||
Polymer.html = Polymer.html;
|
Polymer.html = Polymer.html;
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -329,6 +329,16 @@ suite('single-element binding effects', function() {
|
|||||||
assert.equal(el.observerCounts.customEventValueChanged, 1, 'custom bound property observer not called');
|
assert.equal(el.observerCounts.customEventValueChanged, 1, 'custom bound property observer not called');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('custom notification bubbling event to property', function() {
|
||||||
|
const child = document.createElement('div');
|
||||||
|
el.$.boundChild.appendChild(child);
|
||||||
|
|
||||||
|
el.$.boundChild.customEventValue = 42;
|
||||||
|
child.dispatchEvent(new Event('custom', {bubbles: true}));
|
||||||
|
assert.equal(el.customEventValue, 42, 'custom bound property incorrect');
|
||||||
|
assert.equal(el.observerCounts.customEventValueChanged, 1, 'custom bound property observer not called');
|
||||||
|
});
|
||||||
|
|
||||||
test('custom notification event to path', function() {
|
test('custom notification event to path', function() {
|
||||||
el.clearObserverCounts();
|
el.clearObserverCounts();
|
||||||
el.$.boundChild.customEventObjectValue = 84;
|
el.$.boundChild.customEventObjectValue = 84;
|
||||||
|
|||||||
Vendored
+75
-75
@@ -7,122 +7,122 @@
|
|||||||
// Types from "externs/polymer-externs.js"
|
// Types from "externs/polymer-externs.js"
|
||||||
|
|
||||||
interface PolymerElementPropertiesMeta {
|
interface PolymerElementPropertiesMeta {
|
||||||
type?: Function;
|
type?: Function;
|
||||||
value?: any;
|
value?: any;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
computed?: string;
|
computed?: string;
|
||||||
reflectToAttribute?: boolean;
|
reflectToAttribute?: boolean;
|
||||||
notify?: boolean;
|
notify?: boolean;
|
||||||
observer?: string|((val: any, old: any) => void);
|
observer?: string|((val: any, old: any) => void);
|
||||||
}
|
}
|
||||||
|
|
||||||
type PolymerElementProperties = {
|
type PolymerElementProperties = {
|
||||||
[key: string]: PolymerElementPropertiesMeta | Function;
|
[key: string]: PolymerElementPropertiesMeta|Function;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO Document these properties.
|
// TODO Document these properties.
|
||||||
interface PolymerInit {
|
interface PolymerInit {
|
||||||
is: string;
|
is: string;
|
||||||
extends?: string;
|
extends?: string;
|
||||||
properties?: PolymerElementProperties;
|
properties?: PolymerElementProperties;
|
||||||
observers?: string[];
|
observers?: string[];
|
||||||
template?: HTMLTemplateElement|string;
|
template?: HTMLTemplateElement|string;
|
||||||
hostAttributes?: {[key: string]: any};
|
hostAttributes?: {[key: string]: any};
|
||||||
listeners?: {[key: string]: string};
|
listeners?: {[key: string]: string};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Types from "externs/polymer-internal-shared-types.js"
|
// Types from "externs/polymer-internal-shared-types.js"
|
||||||
|
|
||||||
interface StampedTemplate extends DocumentFragment {
|
interface StampedTemplate extends DocumentFragment {
|
||||||
__noInsertionPoint: boolean;
|
__noInsertionPoint: boolean;
|
||||||
nodeList: Node[];
|
nodeList: Node[];
|
||||||
$: {[key: string]: Node};
|
$: {[key: string]: Node};
|
||||||
templateInfo?: TemplateInfo;
|
templateInfo?: TemplateInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NodeInfo {
|
interface NodeInfo {
|
||||||
id: string;
|
id: string;
|
||||||
events: {name: string, value: string}[];
|
events: {name: string, value: string}[];
|
||||||
hasInsertionPoint: boolean;
|
hasInsertionPoint: boolean;
|
||||||
templateInfo: TemplateInfo;
|
templateInfo: TemplateInfo;
|
||||||
parentInfo: NodeInfo;
|
parentInfo: NodeInfo;
|
||||||
parentIndex: number;
|
parentIndex: number;
|
||||||
infoIndex: number;
|
infoIndex: number;
|
||||||
bindings: Binding[];
|
bindings: Binding[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TemplateInfo {
|
interface TemplateInfo {
|
||||||
nodeInfoList: NodeInfo[];
|
nodeInfoList: NodeInfo[];
|
||||||
nodeList: Node[];
|
nodeList: Node[];
|
||||||
stripWhitespace: boolean;
|
stripWhitespace: boolean;
|
||||||
hasInsertionPoint?: boolean;
|
hasInsertionPoint?: boolean;
|
||||||
hostProps: Object;
|
hostProps: Object;
|
||||||
propertyEffects: Object;
|
propertyEffects: Object;
|
||||||
nextTemplateInfo?: TemplateInfo;
|
nextTemplateInfo?: TemplateInfo;
|
||||||
previousTemplateInfo?: TemplateInfo;
|
previousTemplateInfo?: TemplateInfo;
|
||||||
childNodes: Node[];
|
childNodes: Node[];
|
||||||
wasPreBound: boolean;
|
wasPreBound: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LiteralBindingPart {
|
interface LiteralBindingPart {
|
||||||
literal: string;
|
literal: string;
|
||||||
compoundIndex?: number;
|
compoundIndex?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MethodArg {
|
interface MethodArg {
|
||||||
literal: boolean;
|
literal: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
value: string|number;
|
value: string|number;
|
||||||
rootProperty?: string;
|
rootProperty?: string;
|
||||||
structured?: boolean;
|
structured?: boolean;
|
||||||
wildcard?: boolean;
|
wildcard?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MethodSignature {
|
interface MethodSignature {
|
||||||
methodName: string;
|
methodName: string;
|
||||||
static: boolean;
|
static: boolean;
|
||||||
args: MethodArg[];
|
args: MethodArg[];
|
||||||
dynamicFn?: boolean;
|
dynamicFn?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ExpressionBindingPart {
|
interface ExpressionBindingPart {
|
||||||
mode: string;
|
mode: string;
|
||||||
negate: boolean;
|
negate: boolean;
|
||||||
source: string;
|
source: string;
|
||||||
dependencies: Array<MethodArg|string>;
|
dependencies: Array<MethodArg|string>;
|
||||||
customEvent: boolean;
|
customEvent: boolean;
|
||||||
signature: Object|null;
|
signature: Object|null;
|
||||||
event: string;
|
event: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type BindingPart = LiteralBindingPart|ExpressionBindingPart;
|
type BindingPart = LiteralBindingPart|ExpressionBindingPart;
|
||||||
|
|
||||||
interface Binding {
|
interface Binding {
|
||||||
kind: string;
|
kind: string;
|
||||||
target: string;
|
target: string;
|
||||||
parts: BindingPart[];
|
parts: BindingPart[];
|
||||||
literal?: string;
|
literal?: string;
|
||||||
isCompound: boolean;
|
isCompound: boolean;
|
||||||
listenerEvent?: string;
|
listenerEvent?: string;
|
||||||
listenerNegate?: boolean;
|
listenerNegate?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AsyncInterface {
|
interface AsyncInterface {
|
||||||
run: (fn: Function, delay?: number) => number;
|
run: (fn: Function, delay?: number) => number;
|
||||||
cancel: (handle: number) => void;
|
cancel: (handle: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Types from "lib/utils/gestures.html"
|
// Types from "lib/utils/gestures.html"
|
||||||
|
|
||||||
interface GestureRecognizer {
|
interface GestureRecognizer {
|
||||||
reset: () => void;
|
reset: () => void;
|
||||||
mousedown?: (e: MouseEvent) => void;
|
mousedown?: (e: MouseEvent) => void;
|
||||||
mousemove?: (e: MouseEvent) => void;
|
mousemove?: (e: MouseEvent) => void;
|
||||||
mouseup?: (e: MouseEvent) => void;
|
mouseup?: (e: MouseEvent) => void;
|
||||||
touchstart?: (e: TouchEvent) => void;
|
touchstart?: (e: TouchEvent) => void;
|
||||||
touchmove?: (e: TouchEvent) => void;
|
touchmove?: (e: TouchEvent) => void;
|
||||||
touchend?: (e: TouchEvent) => void;
|
touchend?: (e: TouchEvent) => void;
|
||||||
click?: (e: MouseEvent) => void;
|
click?: (e: MouseEvent) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,8 +130,8 @@ interface GestureRecognizer {
|
|||||||
* See https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline
|
* See https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline
|
||||||
*/
|
*/
|
||||||
interface IdleDeadline {
|
interface IdleDeadline {
|
||||||
didTimeout: boolean;
|
didTimeout: boolean;
|
||||||
timeRemaining(): number;
|
timeRemaining(): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ declare namespace Polymer {
|
|||||||
new(...args: any[]): ArraySelectorMixin;
|
new(...args: any[]): ArraySelectorMixin;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArraySelectorMixin {
|
interface ArraySelectorMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array containing items from which selection will be made.
|
* An array containing items from which selection will be made.
|
||||||
|
|||||||
Vendored
+1
-1
@@ -29,7 +29,7 @@ declare namespace Polymer {
|
|||||||
Polymer.PropertyEffects(
|
Polymer.PropertyEffects(
|
||||||
Polymer.OptionalMutableData(
|
Polymer.OptionalMutableData(
|
||||||
Polymer.GestureEventListeners(
|
Polymer.GestureEventListeners(
|
||||||
Polymer.Element))) {
|
HTMLElement))) {
|
||||||
attributeChangedCallback(): void;
|
attributeChangedCallback(): void;
|
||||||
connectedCallback(): void;
|
connectedCallback(): void;
|
||||||
disconnectedCallback(): void;
|
disconnectedCallback(): void;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -210,8 +210,8 @@ declare namespace Polymer {
|
|||||||
*/
|
*/
|
||||||
targetFramerate: number|null|undefined;
|
targetFramerate: number|null|undefined;
|
||||||
readonly _targetFrameTime: number|null|undefined;
|
readonly _targetFrameTime: number|null|undefined;
|
||||||
disconnectedCallback(): void;
|
|
||||||
connectedCallback(): void;
|
connectedCallback(): void;
|
||||||
|
disconnectedCallback(): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forces the element to render its content. Normally rendering is
|
* Forces the element to render its content. Normally rendering is
|
||||||
|
|||||||
Vendored
-20
@@ -93,23 +93,3 @@ declare namespace Polymer {
|
|||||||
*/
|
*/
|
||||||
function Class<T>(info: PolymerInit, mixin: (p0: T) => T): {new(): HTMLElement};
|
function Class<T>(info: PolymerInit, mixin: (p0: T) => T): {new(): HTMLElement};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class PolymerGenerated {
|
|
||||||
created(): void;
|
|
||||||
_registered(): void;
|
|
||||||
_applyListeners(): void;
|
|
||||||
_ensureAttributes(): void;
|
|
||||||
ready(): void;
|
|
||||||
attached(): void;
|
|
||||||
detached(): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements native Custom Elements `attributeChangedCallback` to
|
|
||||||
* set an attribute value to a property via `_attributeToProperty`.
|
|
||||||
*
|
|
||||||
* @param name Name of attribute that changed
|
|
||||||
* @param old Old attribute value
|
|
||||||
* @param value New attribute value
|
|
||||||
*/
|
|
||||||
attributeChanged(name: string, old: string|null, value: string|null): void;
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ declare namespace Polymer {
|
|||||||
new(...args: any[]): LegacyElementMixin;
|
new(...args: any[]): LegacyElementMixin;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LegacyElementMixin {
|
interface LegacyElementMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin, Polymer.GestureEventListeners {
|
||||||
isAttached: boolean;
|
isAttached: boolean;
|
||||||
_debouncers: {[key: string]: Function|null};
|
_debouncers: {[key: string]: Function|null};
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -44,7 +44,7 @@ declare namespace Polymer {
|
|||||||
_replaceDirInCssText(text: string): string;
|
_replaceDirInCssText(text: string): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DirMixin {
|
interface DirMixin extends Polymer.PropertyAccessors, Polymer.PropertiesChanged {
|
||||||
ready(): void;
|
ready(): void;
|
||||||
connectedCallback(): void;
|
connectedCallback(): void;
|
||||||
disconnectedCallback(): void;
|
disconnectedCallback(): void;
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ declare namespace Polymer {
|
|||||||
new(...args: any[]): DisableUpgradeMixin;
|
new(...args: any[]): DisableUpgradeMixin;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DisableUpgradeMixin {
|
interface DisableUpgradeMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin {
|
||||||
_initializeProperties(): void;
|
_initializeProperties(): void;
|
||||||
_enableProperties(): void;
|
_enableProperties(): void;
|
||||||
attributeChangedCallback(name: any, old: any, value: any, namespace: any): void;
|
attributeChangedCallback(name: any, old: any, value: any, namespace: any): void;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -132,7 +132,7 @@ declare namespace Polymer {
|
|||||||
_finalizeTemplate(is: string): void;
|
_finalizeTemplate(is: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ElementMixin {
|
interface ElementMixin extends Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin {
|
||||||
_template: HTMLTemplateElement|null;
|
_template: HTMLTemplateElement|null;
|
||||||
_importPath: string;
|
_importPath: string;
|
||||||
rootPath: string;
|
rootPath: string;
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ declare namespace Polymer {
|
|||||||
_finalizeClass(): void;
|
_finalizeClass(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PropertiesMixin {
|
interface PropertiesMixin extends Polymer.PropertiesChanged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides `PropertiesChanged` method and adds a call to
|
* Overrides `PropertiesChanged` method and adds a call to
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ declare namespace Polymer {
|
|||||||
createPropertiesForAttributes(): void;
|
createPropertiesForAttributes(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PropertyAccessors {
|
interface PropertyAccessors extends Polymer.PropertiesChanged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides PropertiesChanged implementation to save existing prototype
|
* Overrides PropertiesChanged implementation to save existing prototype
|
||||||
|
|||||||
+1
-1
@@ -290,7 +290,7 @@ declare namespace Polymer {
|
|||||||
_evaluateBinding(inst: this|null, part: BindingPart|null, path: string, props: object|null, oldProps: object|null, hasPaths: boolean): any;
|
_evaluateBinding(inst: this|null, part: BindingPart|null, path: string, props: object|null, oldProps: object|null, hasPaths: boolean): any;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PropertyEffects {
|
interface PropertyEffects extends Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged {
|
||||||
readonly PROPERTY_EFFECT_TYPES: any;
|
readonly PROPERTY_EFFECT_TYPES: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -62,6 +62,6 @@ declare namespace Polymer {
|
|||||||
_parseBindings(text: string, templateInfo: object|null): BindingPart[]|null;
|
_parseBindings(text: string, templateInfo: object|null): BindingPart[]|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StrictBindingParser {
|
interface StrictBindingParser extends Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -253,6 +253,6 @@ declare namespace Polymer {
|
|||||||
* @param eventName Name of event
|
* @param eventName Name of event
|
||||||
* @param handler Listener function to remove
|
* @param handler Listener function to remove
|
||||||
*/
|
*/
|
||||||
_removeEventListenerFromNode(node: Node|null, eventName: string, handler: (p0: Event) => void): void;
|
_removeEventListenerFromNode(node: Node, eventName: string, handler: (p0: Event) => void): void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-7
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
declare class TemplateInstanceBase extends
|
declare class TemplateInstanceBase extends
|
||||||
Polymer.PropertyEffects(
|
Polymer.PropertyEffects(
|
||||||
Polymer.Element) {
|
Object) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the parent model of this template instance. The parent model
|
* Find the parent model of this template instance. The parent model
|
||||||
@@ -76,12 +76,6 @@ declare class TemplateInstanceBase extends
|
|||||||
dispatchEvent(event: Event|null): boolean;
|
dispatchEvent(event: Event|null): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare namespace templateInfo {
|
|
||||||
|
|
||||||
class templatizeTemplateClass {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace Polymer {
|
declare namespace Polymer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user