mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
Merge branch '2.x' into strict-template-policy-2.x
This commit is contained in:
+119
@@ -1,5 +1,124 @@
|
||||
# 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)
|
||||
- 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){};
|
||||
/**
|
||||
* @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 {function (!Event): void} handler Listener function to remove
|
||||
* @return {void}
|
||||
|
||||
@@ -43,6 +43,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @extends {superClass}
|
||||
* @implements {Polymer_ElementMixin}
|
||||
* @private
|
||||
*/
|
||||
let elementBase = Polymer.ElementMixin(superClass);
|
||||
|
||||
@@ -347,6 +348,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @extends {Polymer.Element}
|
||||
* @implements {Polymer_ArraySelectorMixin}
|
||||
* @private
|
||||
*/
|
||||
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_OptionalMutableData}
|
||||
* @implements {Polymer_GestureEventListeners}
|
||||
* @private
|
||||
*/
|
||||
const domBindBase =
|
||||
Polymer.GestureEventListeners(
|
||||
|
||||
@@ -24,6 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @implements {Polymer_OptionalMutableData}
|
||||
* @extends {Polymer.Element}
|
||||
* @private
|
||||
*/
|
||||
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) {
|
||||
|
||||
/** @private */
|
||||
class PolymerGenerated extends Base {
|
||||
|
||||
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_GestureEventListeners}
|
||||
* @implements {Polymer_DirMixin}
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
* @extends {base}
|
||||
* @implements {Polymer_PropertyAccessors}
|
||||
* @private
|
||||
*/
|
||||
const elementBase = Polymer.PropertyAccessors(base);
|
||||
|
||||
|
||||
@@ -45,8 +45,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @extends {base}
|
||||
* @implements {Polymer_ElementMixin}
|
||||
* @private
|
||||
*/
|
||||
const superClass = Polymer.ElementMixin(base);
|
||||
|
||||
/**
|
||||
* @polymer
|
||||
* @mixinClass
|
||||
|
||||
@@ -98,6 +98,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @extends {base}
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
* @implements {Polymer_PropertiesMixin}
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
* @extends {superClass}
|
||||
* @implements {Polymer_PropertiesChanged}
|
||||
* @private
|
||||
*/
|
||||
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}
|
||||
* @implements {Polymer_PropertiesChanged}
|
||||
* @unrestricted
|
||||
* @private
|
||||
*/
|
||||
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);
|
||||
value = detail && detail.value;
|
||||
} else {
|
||||
value = event.target[fromProp];
|
||||
value = event.currentTarget[fromProp];
|
||||
}
|
||||
value = negate ? !value : value;
|
||||
if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) {
|
||||
@@ -1122,6 +1122,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @implements {Polymer_PropertyAccessors}
|
||||
* @implements {Polymer_TemplateStamp}
|
||||
* @unrestricted
|
||||
* @private
|
||||
*/
|
||||
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
|
||||
* @extends {base}
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
* @private
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @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 {function(!Event):void} handler Listener function to remove
|
||||
* @return {void}
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
};
|
||||
/* eslint-enable */
|
||||
|
||||
window.Polymer.version = '2.6.0';
|
||||
window.Polymer.version = '2.6.1';
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
/*
|
||||
|
||||
@@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Function}
|
||||
* @private
|
||||
*/
|
||||
function MixinFunction(){}
|
||||
/** @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
|
||||
// constructor even though no `this` is used and it returns an instance.
|
||||
let newInstance = null;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {HTMLTemplateElement}
|
||||
* @private
|
||||
*/
|
||||
function HTMLTemplateElementExtension() { return newInstance; }
|
||||
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
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
* @extends {HTMLTemplateElementExtension}
|
||||
* @private
|
||||
*/
|
||||
const DataTemplate = Polymer.PropertyEffects(HTMLTemplateElementExtension);
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Polymer_MutableData}
|
||||
* @extends {DataTemplate}
|
||||
* @private
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
// Base class for TemplateInstance's
|
||||
/**
|
||||
* Base class for TemplateInstance.
|
||||
* @constructor
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
* @private
|
||||
*/
|
||||
const base = Polymer.PropertyEffects(class {});
|
||||
|
||||
@@ -268,6 +275,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @extends {TemplateInstanceBase}
|
||||
* @implements {Polymer_MutableData}
|
||||
* @private
|
||||
*/
|
||||
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;
|
||||
if (!klass) {
|
||||
let base = options.mutableData ? MutableDataTemplate : DataTemplate;
|
||||
/** @private */
|
||||
klass = templateInfo.templatizeTemplateClass =
|
||||
class TemplatizedTemplate extends base {};
|
||||
// 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",
|
||||
"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",
|
||||
"main": "polymer.html",
|
||||
"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.
|
||||
*
|
||||
* @customElement
|
||||
* @polymer
|
||||
* @memberof Polymer
|
||||
* @constructor
|
||||
* @implements {Polymer_ElementMixin}
|
||||
* @extends HTMLElement
|
||||
* @extends {HTMLElement}
|
||||
* @appliesMixin Polymer.ElementMixin
|
||||
* @summary Custom element base class that provides the core API for Polymer's
|
||||
* key meta-programming features including template stamping, data-binding,
|
||||
* attribute deserialization, and property change observation
|
||||
*/
|
||||
const Element = Polymer.ElementMixin(HTMLElement);
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Polymer_ElementMixin}
|
||||
* @extends {HTMLElement}
|
||||
*/
|
||||
Polymer.Element = Element;
|
||||
Polymer.Element = Polymer.ElementMixin(HTMLElement);
|
||||
|
||||
// NOTE: this is here for modulizer to export `html` for the module version of this file
|
||||
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');
|
||||
});
|
||||
|
||||
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() {
|
||||
el.clearObserverCounts();
|
||||
el.$.boundChild.customEventObjectValue = 84;
|
||||
|
||||
Vendored
+75
-75
@@ -7,122 +7,122 @@
|
||||
// Types from "externs/polymer-externs.js"
|
||||
|
||||
interface PolymerElementPropertiesMeta {
|
||||
type?: Function;
|
||||
value?: any;
|
||||
readOnly?: boolean;
|
||||
computed?: string;
|
||||
reflectToAttribute?: boolean;
|
||||
notify?: boolean;
|
||||
observer?: string|((val: any, old: any) => void);
|
||||
type?: Function;
|
||||
value?: any;
|
||||
readOnly?: boolean;
|
||||
computed?: string;
|
||||
reflectToAttribute?: boolean;
|
||||
notify?: boolean;
|
||||
observer?: string|((val: any, old: any) => void);
|
||||
}
|
||||
|
||||
type PolymerElementProperties = {
|
||||
[key: string]: PolymerElementPropertiesMeta | Function;
|
||||
[key: string]: PolymerElementPropertiesMeta|Function;
|
||||
};
|
||||
|
||||
// TODO Document these properties.
|
||||
interface PolymerInit {
|
||||
is: string;
|
||||
extends?: string;
|
||||
properties?: PolymerElementProperties;
|
||||
observers?: string[];
|
||||
template?: HTMLTemplateElement|string;
|
||||
hostAttributes?: {[key: string]: any};
|
||||
listeners?: {[key: string]: string};
|
||||
is: string;
|
||||
extends?: string;
|
||||
properties?: PolymerElementProperties;
|
||||
observers?: string[];
|
||||
template?: HTMLTemplateElement|string;
|
||||
hostAttributes?: {[key: string]: any};
|
||||
listeners?: {[key: string]: string};
|
||||
}
|
||||
|
||||
// Types from "externs/polymer-internal-shared-types.js"
|
||||
|
||||
interface StampedTemplate extends DocumentFragment {
|
||||
__noInsertionPoint: boolean;
|
||||
nodeList: Node[];
|
||||
$: {[key: string]: Node};
|
||||
templateInfo?: TemplateInfo;
|
||||
__noInsertionPoint: boolean;
|
||||
nodeList: Node[];
|
||||
$: {[key: string]: Node};
|
||||
templateInfo?: TemplateInfo;
|
||||
}
|
||||
|
||||
interface NodeInfo {
|
||||
id: string;
|
||||
events: {name: string, value: string}[];
|
||||
hasInsertionPoint: boolean;
|
||||
templateInfo: TemplateInfo;
|
||||
parentInfo: NodeInfo;
|
||||
parentIndex: number;
|
||||
infoIndex: number;
|
||||
bindings: Binding[];
|
||||
id: string;
|
||||
events: {name: string, value: string}[];
|
||||
hasInsertionPoint: boolean;
|
||||
templateInfo: TemplateInfo;
|
||||
parentInfo: NodeInfo;
|
||||
parentIndex: number;
|
||||
infoIndex: number;
|
||||
bindings: Binding[];
|
||||
}
|
||||
|
||||
interface TemplateInfo {
|
||||
nodeInfoList: NodeInfo[];
|
||||
nodeList: Node[];
|
||||
stripWhitespace: boolean;
|
||||
hasInsertionPoint?: boolean;
|
||||
hostProps: Object;
|
||||
propertyEffects: Object;
|
||||
nextTemplateInfo?: TemplateInfo;
|
||||
previousTemplateInfo?: TemplateInfo;
|
||||
childNodes: Node[];
|
||||
wasPreBound: boolean;
|
||||
nodeInfoList: NodeInfo[];
|
||||
nodeList: Node[];
|
||||
stripWhitespace: boolean;
|
||||
hasInsertionPoint?: boolean;
|
||||
hostProps: Object;
|
||||
propertyEffects: Object;
|
||||
nextTemplateInfo?: TemplateInfo;
|
||||
previousTemplateInfo?: TemplateInfo;
|
||||
childNodes: Node[];
|
||||
wasPreBound: boolean;
|
||||
}
|
||||
|
||||
interface LiteralBindingPart {
|
||||
literal: string;
|
||||
compoundIndex?: number;
|
||||
literal: string;
|
||||
compoundIndex?: number;
|
||||
}
|
||||
|
||||
interface MethodArg {
|
||||
literal: boolean;
|
||||
name: string;
|
||||
value: string|number;
|
||||
rootProperty?: string;
|
||||
structured?: boolean;
|
||||
wildcard?: boolean;
|
||||
literal: boolean;
|
||||
name: string;
|
||||
value: string|number;
|
||||
rootProperty?: string;
|
||||
structured?: boolean;
|
||||
wildcard?: boolean;
|
||||
}
|
||||
|
||||
interface MethodSignature {
|
||||
methodName: string;
|
||||
static: boolean;
|
||||
args: MethodArg[];
|
||||
dynamicFn?: boolean;
|
||||
methodName: string;
|
||||
static: boolean;
|
||||
args: MethodArg[];
|
||||
dynamicFn?: boolean;
|
||||
}
|
||||
|
||||
interface ExpressionBindingPart {
|
||||
mode: string;
|
||||
negate: boolean;
|
||||
source: string;
|
||||
dependencies: Array<MethodArg|string>;
|
||||
customEvent: boolean;
|
||||
signature: Object|null;
|
||||
event: string;
|
||||
mode: string;
|
||||
negate: boolean;
|
||||
source: string;
|
||||
dependencies: Array<MethodArg|string>;
|
||||
customEvent: boolean;
|
||||
signature: Object|null;
|
||||
event: string;
|
||||
}
|
||||
|
||||
type BindingPart = LiteralBindingPart|ExpressionBindingPart;
|
||||
|
||||
interface Binding {
|
||||
kind: string;
|
||||
target: string;
|
||||
parts: BindingPart[];
|
||||
literal?: string;
|
||||
isCompound: boolean;
|
||||
listenerEvent?: string;
|
||||
listenerNegate?: boolean;
|
||||
kind: string;
|
||||
target: string;
|
||||
parts: BindingPart[];
|
||||
literal?: string;
|
||||
isCompound: boolean;
|
||||
listenerEvent?: string;
|
||||
listenerNegate?: boolean;
|
||||
}
|
||||
|
||||
interface AsyncInterface {
|
||||
run: (fn: Function, delay?: number) => number;
|
||||
cancel: (handle: number) => void;
|
||||
run: (fn: Function, delay?: number) => number;
|
||||
cancel: (handle: number) => void;
|
||||
}
|
||||
|
||||
// Types from "lib/utils/gestures.html"
|
||||
|
||||
interface GestureRecognizer {
|
||||
reset: () => void;
|
||||
mousedown?: (e: MouseEvent) => void;
|
||||
mousemove?: (e: MouseEvent) => void;
|
||||
mouseup?: (e: MouseEvent) => void;
|
||||
touchstart?: (e: TouchEvent) => void;
|
||||
touchmove?: (e: TouchEvent) => void;
|
||||
touchend?: (e: TouchEvent) => void;
|
||||
click?: (e: MouseEvent) => void;
|
||||
reset: () => void;
|
||||
mousedown?: (e: MouseEvent) => void;
|
||||
mousemove?: (e: MouseEvent) => void;
|
||||
mouseup?: (e: MouseEvent) => void;
|
||||
touchstart?: (e: TouchEvent) => void;
|
||||
touchmove?: (e: TouchEvent) => void;
|
||||
touchend?: (e: TouchEvent) => void;
|
||||
click?: (e: MouseEvent) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,8 +130,8 @@ interface GestureRecognizer {
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline
|
||||
*/
|
||||
interface IdleDeadline {
|
||||
didTimeout: boolean;
|
||||
timeRemaining(): number;
|
||||
didTimeout: boolean;
|
||||
timeRemaining(): number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ declare namespace Polymer {
|
||||
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.
|
||||
|
||||
Vendored
+1
-1
@@ -29,7 +29,7 @@ declare namespace Polymer {
|
||||
Polymer.PropertyEffects(
|
||||
Polymer.OptionalMutableData(
|
||||
Polymer.GestureEventListeners(
|
||||
Polymer.Element))) {
|
||||
HTMLElement))) {
|
||||
attributeChangedCallback(): void;
|
||||
connectedCallback(): void;
|
||||
disconnectedCallback(): void;
|
||||
|
||||
Vendored
+1
-1
@@ -210,8 +210,8 @@ declare namespace Polymer {
|
||||
*/
|
||||
targetFramerate: number|null|undefined;
|
||||
readonly _targetFrameTime: number|null|undefined;
|
||||
disconnectedCallback(): void;
|
||||
connectedCallback(): void;
|
||||
disconnectedCallback(): void;
|
||||
|
||||
/**
|
||||
* Forces the element to render its content. Normally rendering is
|
||||
|
||||
Vendored
-20
@@ -93,23 +93,3 @@ declare namespace Polymer {
|
||||
*/
|
||||
function Class(info: PolymerInit): {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;
|
||||
}
|
||||
|
||||
interface LegacyElementMixin {
|
||||
interface LegacyElementMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin, Polymer.GestureEventListeners {
|
||||
isAttached: boolean;
|
||||
_debouncers: {[key: string]: Function|null};
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -44,7 +44,7 @@ declare namespace Polymer {
|
||||
_replaceDirInCssText(text: string): string;
|
||||
}
|
||||
|
||||
interface DirMixin {
|
||||
interface DirMixin extends Polymer.PropertyAccessors, Polymer.PropertiesChanged {
|
||||
ready(): void;
|
||||
connectedCallback(): void;
|
||||
disconnectedCallback(): void;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ declare namespace Polymer {
|
||||
new(...args: any[]): DisableUpgradeMixin;
|
||||
}
|
||||
|
||||
interface DisableUpgradeMixin {
|
||||
interface DisableUpgradeMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin {
|
||||
_initializeProperties(): void;
|
||||
_enableProperties(): void;
|
||||
attributeChangedCallback(name: any, old: any, value: any, namespace: any): void;
|
||||
|
||||
Vendored
+1
-1
@@ -140,7 +140,7 @@ declare namespace Polymer {
|
||||
_finalizeTemplate(is: string): void;
|
||||
}
|
||||
|
||||
interface ElementMixin {
|
||||
interface ElementMixin extends Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin {
|
||||
_template: HTMLTemplateElement|null;
|
||||
_importPath: string;
|
||||
rootPath: string;
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ declare namespace Polymer {
|
||||
_finalizeClass(): void;
|
||||
}
|
||||
|
||||
interface PropertiesMixin {
|
||||
interface PropertiesMixin extends Polymer.PropertiesChanged {
|
||||
|
||||
/**
|
||||
* Overrides `PropertiesChanged` method and adds a call to
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ declare namespace Polymer {
|
||||
createPropertiesForAttributes(): void;
|
||||
}
|
||||
|
||||
interface PropertyAccessors {
|
||||
interface PropertyAccessors extends Polymer.PropertiesChanged {
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
interface PropertyEffects {
|
||||
interface PropertyEffects extends Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged {
|
||||
readonly PROPERTY_EFFECT_TYPES: any;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -62,6 +62,6 @@ declare namespace Polymer {
|
||||
_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 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
|
||||
Polymer.PropertyEffects(
|
||||
Polymer.Element) {
|
||||
Object) {
|
||||
|
||||
/**
|
||||
* Find the parent model of this template instance. The parent model
|
||||
@@ -76,12 +76,6 @@ declare class TemplateInstanceBase extends
|
||||
dispatchEvent(event: Event|null): boolean;
|
||||
}
|
||||
|
||||
declare namespace templateInfo {
|
||||
|
||||
class templatizeTemplateClass {
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace Polymer {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user