Socket
Socket
Sign inDemoInstall

@polymer/polymer

Package Overview
Dependencies
1
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-pre.12 to 3.0.0-pre.13

bower.json

19

externs/closure-types.js

@@ -108,5 +108,6 @@ /**

* @param {?string} value New attribute value
* @param {?string} namespace Attribute namespace.
* @return {void}
*/
Polymer_PropertiesChanged.prototype.attributeChangedCallback = function(name, old, value){};
Polymer_PropertiesChanged.prototype.attributeChangedCallback = function(name, old, value, namespace){};
/**

@@ -976,5 +977,6 @@ * @param {string} attribute Name of attribute to deserialize.

* @param {?string} value Current value of attribute.
* @param {?string} namespace Attribute namespace.
* @return {void}
*/
Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value){};
Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value, namespace){};
/**

@@ -1382,2 +1384,13 @@ * @override

* @interface
* @extends {Polymer_PropertyEffects}
*/
function Polymer_StrictBindingParser(){}
/**
* @param {string} text Text to parse from attribute or textContent
* @param {Object} templateInfo Current template metadata
* @return {Array.<!BindingPart>}
*/
Polymer_StrictBindingParser._parseBindings = function(text, templateInfo){};
/**
* @interface
* @extends {Polymer_ElementMixin}

@@ -1397,3 +1410,3 @@ */

*/
Polymer_DisableUpgradeMixin.prototype.attributeChangedCallback = function(name, old, value){};
Polymer_DisableUpgradeMixin.prototype.attributeChangedCallback = function(name, old, value, namespace){};
/**

@@ -1400,0 +1413,0 @@ * @override

113

lib/elements/array-selector.js

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PolymerElement } from '../../polymer-element.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -22,4 +32,3 @@ import { calculateSplices } from '../utils/array-splice.js';

* @mixinFunction
* @appliesMixin Polymer.ElementMixin
* @memberof Polymer
* @appliesMixin ElementMixin
* @summary Element mixin for recording dynamic associations between item paths in a

@@ -331,2 +340,3 @@ * master `items` array and a `selected` array

// export mixin
export { ArraySelectorMixin };

@@ -336,3 +346,3 @@

* @constructor
* @extends {Polymer.Element}
* @extends {PolymerElement}
* @implements {Polymer_ArraySelectorMixin}

@@ -343,3 +353,3 @@ */

/**
* Element implementing the `Polymer.ArraySelector` mixin, which records
* Element implementing the `ArraySelector` mixin, which records
* dynamic associations between item paths in a master `items` array and a

@@ -360,59 +370,56 @@ * `selected` array such that path changes to the master array (at the host)

*
* ```html
* <dom-module id="employee-list">
* ```js
* import {PolymerElement} from '@polymer/polymer';
* import '@polymer/polymer/lib/elements/array-selector.js';
*
* <template>
* class EmployeeList extends PolymerElement {
* static get _template() {
* return html`
* <div> Employee list: </div>
* <dom-repeat id="employeeList" items="{{employees}}">
* <template>
* <div>First name: <span>{{item.first}}</span></div>
* <div>Last name: <span>{{item.last}}</span></div>
* <button on-click="toggleSelection">Select</button>
* </template>
* </dom-repeat>
*
* <div> Employee list: </div>
* <dom-repeat id="employeeList" items="{{employees}}">
* <template>
* <div>First name: <span>{{item.first}}</span></div>
* <div>Last name: <span>{{item.last}}</span></div>
* <button on-click="toggleSelection">Select</button>
* </template>
* </dom-repeat>
* <array-selector id="selector"
* items="{{employees}}"
* selected="{{selected}}"
* multi toggle></array-selector>
*
* <array-selector id="selector" items="{{employees}}" selected="{{selected}}" multi toggle></array-selector>
*
* <div> Selected employees: </div>
* <dom-repeat items="{{selected}}">
* <template>
* <div>First name: <span>{{item.first}}</span></div>
* <div>Last name: <span>{{item.last}}</span></div>
* </template>
* </dom-repeat>
*
* </template>
*
* </dom-module>
* <div> Selected employees: </div>
* <dom-repeat items="{{selected}}">
* <template>
* <div>First name: <span>{{item.first}}</span></div>
* <div>Last name: <span>{{item.last}}</span></div>
* </template>
* </dom-repeat>`;
* }
* static get is() { return 'employee-list'; }
* static get properties() {
* return {
* employees: {
* value() {
* return [
* {first: 'Bob', last: 'Smith'},
* {first: 'Sally', last: 'Johnson'},
* ...
* ];
* }
* }
* };
* }
* toggleSelection(e) {
* const item = this.$.employeeList.itemForElement(e.target);
* this.$.selector.select(item);
* }
* }
* ```
*
* ```js
*class EmployeeList extends Polymer.Element {
* static get is() { return 'employee-list'; }
* static get properties() {
* return {
* employees: {
* value() {
* return [
* {first: 'Bob', last: 'Smith'},
* {first: 'Sally', last: 'Johnson'},
* ...
* ];
* }
* }
* };
* }
* toggleSelection(e) {
* let item = this.$.employeeList.itemForElement(e.target);
* this.$.selector.select(item);
* }
*}
* ```
*
* @polymer
* @customElement
* @extends {baseArraySelector}
* @appliesMixin Polymer.ArraySelectorMixin
* @memberof Polymer
* @appliesMixin ArraySelectorMixin
* @summary Custom element that links paths between an input `items` array and

@@ -419,0 +426,0 @@ * an output `selected` item or array based on calls to its selection API.

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '@webcomponents/shadycss/entrypoints/custom-style-interface.js';
import { cssFromModules } from '../utils/style-gather.js';

@@ -51,7 +61,6 @@

* @extends HTMLElement
* @memberof Polymer
* @summary Custom element for defining styles in the main document that can
* take advantage of Polymer's style scoping and custom properties shims.
*/
class CustomStyle extends HTMLElement {
export class CustomStyle extends HTMLElement {
constructor() {

@@ -101,2 +110,1 @@ super();

window.customElements.define('custom-style', CustomStyle);
export { CustomStyle };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { PropertyEffects } from '../mixins/property-effects.js';

@@ -30,11 +40,10 @@ import { OptionalMutableData } from '../mixins/mutable-data.js';

* @customElement
* @appliesMixin Polymer.PropertyEffects
* @appliesMixin Polymer.OptionalMutableData
* @appliesMixin Polymer.GestureEventListeners
* @appliesMixin PropertyEffects
* @appliesMixin OptionalMutableData
* @appliesMixin GestureEventListeners
* @extends {domBindBase}
* @memberof Polymer
* @summary Custom element to allow using Polymer's template features (data
* binding, declarative event listeners, etc.) in the main document.
*/
class DomBind extends domBindBase {
export class DomBind extends domBindBase {

@@ -120,3 +129,1 @@ static get observedAttributes() { return ['mutable-data']; }

customElements.define('dom-bind', DomBind);
export { DomBind };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PolymerElement } from '../../polymer-element.js';
import { templatize } from '../utils/templatize.js';

@@ -25,8 +35,7 @@ import { Debouncer } from '../utils/debounce.js';

* @polymer
* @extends Polymer.Element
* @memberof Polymer
* @extends PolymerElement
* @summary Custom element that conditionally stamps and hides or removes
* template content based on a boolean flag.
*/
class DomIf extends PolymerElement {
export class DomIf extends PolymerElement {

@@ -272,3 +281,1 @@ // Not needed to find template; can be removed once the analyzer

customElements.define(DomIf.is, DomIf);
export { DomIf };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { resolveUrl, pathFromUrl } from '../utils/resolve-url.js';

@@ -37,3 +47,2 @@

* @extends HTMLElement
* @memberof Polymer
* @summary Custom element that provides a registry of relocatable DOM content

@@ -43,3 +52,3 @@ * by `id` that is agnostic to bundling.

*/
class DomModule extends HTMLElement {
export class DomModule extends HTMLElement {

@@ -67,2 +76,3 @@ static get observedAttributes() { return ['id']; }

/* eslint-disable no-unused-vars */
/**

@@ -72,5 +82,6 @@ * @param {string} name Name of attribute.

* @param {?string} value Current value of attribute.
* @param {?string} namespace Attribute namespace.
* @return {void}
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {

@@ -80,2 +91,3 @@ this.register();

}
/* eslint-enable no-unused-args */

@@ -131,3 +143,1 @@ /**

customElements.define('dom-module', DomModule);
export { DomModule };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PolymerElement } from '../../polymer-element.js';
import { TemplateInstanceBase as TemplateInstanceBase$0, templatize, modelForElement as modelForElement$0 } from '../utils/templatize.js';

@@ -14,3 +24,3 @@ import { Debouncer } from '../utils/debounce.js';

* @implements {Polymer_OptionalMutableData}
* @extends {Polymer.Element}
* @extends {PolymerElement}
*/

@@ -50,3 +60,3 @@ const domRepeatBase = OptionalMutableData(PolymerElement);

* ```js
* class EmployeeList extends Polymer.Element {
* class EmployeeList extends PolymerElement {
* static get is() { return 'employee-list'; }

@@ -73,11 +83,10 @@ * static get properties() {

* Mutations to the `items` array itself should be made using the Array
* mutation API's on `Polymer.Base` (`push`, `pop`, `splice`, `shift`,
* `unshift`), and template instances will be kept in sync with the data in the
* array.
* mutation API's on the PropertyEffects mixin (`push`, `pop`, `splice`,
* `shift`, `unshift`), and template instances will be kept in sync with the
* data in the array.
*
* Events caught by event handlers within the `dom-repeat` template will be
* decorated with a `model` property, which represents the binding scope for
* each template instance. The model is an instance of Polymer.Base, and should
* be used to manipulate data on the instance, for example
* `event.model.set('item.checked', true);`.
* each template instance. The model should be used to manipulate data on the
* instance, for example `event.model.set('item.checked', true);`.
*

@@ -119,9 +128,8 @@ * Alternatively, the model for a template instance for an element stamped by

* @polymer
* @memberof Polymer
* @extends {domRepeatBase}
* @appliesMixin Polymer.OptionalMutableData
* @appliesMixin OptionalMutableData
* @summary Custom element for stamping instance of a template bound to
* items in an array.
*/
class DomRepeat extends domRepeatBase {
export class DomRepeat extends domRepeatBase {

@@ -704,3 +712,3 @@ // Not needed to find template; can be removed once the analyzer

* serves as the binding scope for the template instance the element is
* contained in. A template model is an instance of `Polymer.Base`, and
* contained in. A template model
* should be used to manipulate data associated with this template instance.

@@ -726,3 +734,1 @@ *

customElements.define(DomRepeat.is, DomRepeat);
export { DomRepeat };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { LegacyElementMixin } from './legacy-element-mixin.js';
import { DomModule } from '../elements/dom-module.js';

@@ -19,6 +29,7 @@

*
* Note: this method will automatically also apply the `Polymer.LegacyElementMixin`
* Note: this method will automatically also apply the `LegacyElementMixin`
* to ensure that any legacy behaviors can rely on legacy Polymer API on
* the underlying element.
*
* @function
* @template T

@@ -28,7 +39,6 @@ * @param {!Object|!Array<!Object>} behaviors Behavior object or array of behaviors.

* @return {function(new:T)} Returns a new Element class extended by the
* passed in `behaviors` and also by `Polymer.LegacyElementMixin`.
* @memberof Polymer
* passed in `behaviors` and also by `LegacyElementMixin`.
* @suppress {invalidCasts, checkTypes}
*/
function mixinBehaviors(behaviors, klass) {
export function mixinBehaviors(behaviors, klass) {
if (!behaviors) {

@@ -80,3 +90,3 @@ klass = /** @type {HTMLElement} */(klass); // eslint-disable-line no-self-assign

// So, first [A, B, C, A, B] becomes [C, A, B] then,
// the element prototype becomes (oldest) (1) Polymer.Element, (2) class(C),
// the element prototype becomes (oldest) (1) PolymerElement, (2) class(C),
// (3) class(A), (4) class(B), (5) class(Polymer({...})).

@@ -281,5 +291,72 @@ // Result:

/**
* Generates a class that extends `LegacyElement` based on the
* provided info object. Metadata objects on the `info` object
* (`properties`, `observers`, `listeners`, `behaviors`, `is`) are used
* for Polymer's meta-programming systems, and any functions are copied
* to the generated class.
*
* Valid "metadata" values are as follows:
*
* `is`: String providing the tag name to register the element under. In
* addition, if a `dom-module` with the same id exists, the first template
* in that `dom-module` will be stamped into the shadow root of this element,
* with support for declarative event listeners (`on-...`), Polymer data
* bindings (`[[...]]` and `{{...}}`), and id-based node finding into
* `this.$`.
*
* `properties`: Object describing property-related metadata used by Polymer
* features (key: property names, value: object containing property metadata).
* Valid keys in per-property metadata include:
* - `type` (String|Number|Object|Array|...): Used by
* `attributeChangedCallback` to determine how string-based attributes
* are deserialized to JavaScript property values.
* - `notify` (boolean): Causes a change in the property to fire a
* non-bubbling event called `<property>-changed`. Elements that have
* enabled two-way binding to the property use this event to observe changes.
* - `readOnly` (boolean): Creates a getter for the property, but no setter.
* To set a read-only property, use the private setter method
* `_setProperty(property, value)`.
* - `observer` (string): Observer method name that will be called when
* the property changes. The arguments of the method are
* `(value, previousValue)`.
* - `computed` (string): String describing method and dependent properties
* for computing the value of this property (e.g. `'computeFoo(bar, zot)'`).
* Computed properties are read-only by default and can only be changed
* via the return value of the computing method.
*
* `observers`: Array of strings describing multi-property observer methods
* and their dependent properties (e.g. `'observeABC(a, b, c)'`).
*
* `listeners`: Object describing event listeners to be added to each
* instance of this element (key: event name, value: method name).
*
* `behaviors`: Array of additional `info` objects containing metadata
* and callbacks in the same format as the `info` object here which are
* merged into this element.
*
* `hostAttributes`: Object listing attributes to be applied to the host
* once created (key: attribute name, value: attribute value). Values
* are serialized based on the type of the value. Host attributes should
* generally be limited to attributes such as `tabIndex` and `aria-...`.
* Attributes in `hostAttributes` are only applied if a user-supplied
* attribute is not already present (attributes in markup override
* `hostAttributes`).
*
* In addition, the following Polymer-specific callbacks may be provided:
* - `registered`: called after first instance of this element,
* - `created`: called during `constructor`
* - `attached`: called during `connectedCallback`
* - `detached`: called during `disconnectedCallback`
* - `ready`: called before first `attached`, after all properties of
* this element have been propagated to its template and all observers
* have run
*
* @param {!PolymerInit} info Object containing Polymer metadata and functions
* to become class methods.
* @return {function(new:HTMLElement)} Generated class
*/
export const Class = function(info) {
if (!info) {
console.warn('Polymer.Class requires `info` argument');
console.warn(`Polymer's Class function requires \`info\` argument`);
}

@@ -294,3 +371,1 @@ let klass = GenerateClassFromInfo(info, info.behaviors ?

};
export { mixinBehaviors };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '@webcomponents/shadycss/entrypoints/apply-shim.js';
import { ElementMixin } from '../mixins/element-mixin.js';

@@ -17,2 +27,16 @@ import { GestureEventListeners } from '../mixins/gesture-event-listeners.js';

/**
* Element class mixin that provides Polymer's "legacy" API intended to be
* backward-compatible to the greatest extent possible with the API
* found on the Polymer 1.x `Polymer.Base` prototype applied to all elements
* defined using the `Polymer({...})` function.
*
* @mixinFunction
* @polymer
* @appliesMixin Polymer.ElementMixin
* @appliesMixin Polymer.GestureEventListeners
* @property isAttached {boolean} Set to `true` in this element's
* `connectedCallback` and `false` in `disconnectedCallback`
* @summary Element class mixin that provides Polymer's "legacy" API
*/
export const LegacyElementMixin = dedupingMixin((base) => {

@@ -65,2 +89,14 @@

/**
* Forwards `importMeta` from the prototype (i.e. from the info object
* passed to `Polymer({...})`) to the static API.
*
* @return {!Object} The `import.meta` object set on the prototype
* @suppress {missingProperties} `this` is always in the instance in
* closure for some reason even in a static method, rather than the class
*/
static get importMeta() {
return this.prototype.importMeta;
}
/**
* Legacy callback called during the `constructor`, for overriding

@@ -116,8 +152,9 @@ * by the user.

* @param {?string} value Current value of attribute.
* @param {?string} namespace Attribute namespace.
* @return {void}
* @override
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
this.attributeChanged(name, old, value);

@@ -124,0 +161,0 @@ }

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { MutableData } from '../mixins/mutable-data.js';

@@ -9,2 +18,39 @@

/**
* Legacy element behavior to skip strict dirty-checking for objects and arrays,
* (always consider them to be "dirty") for use on legacy API Polymer elements.
*
* By default, `Polymer.PropertyEffects` performs strict dirty checking on
* objects, which means that any deep modifications to an object or array will
* not be propagated unless "immutable" data patterns are used (i.e. all object
* references from the root to the mutation were changed).
*
* Polymer also provides a proprietary data mutation and path notification API
* (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient
* mutation and notification of deep changes in an object graph to all elements
* bound to the same object graph.
*
* In cases where neither immutable patterns nor the data mutation API can be
* used, applying this mixin will cause Polymer to skip dirty checking for
* objects and arrays (always consider them to be "dirty"). This allows a
* user to make a deep modification to a bound object graph, and then either
* simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`
* (e.g. `this.notifyPath('items')`) to update the tree. Note that all
* elements that wish to be updated based on deep mutations must apply this
* mixin or otherwise skip strict dirty checking for objects/arrays.
* Specifically, any elements in the binding tree between the source of a
* mutation and the consumption of it must apply this behavior or enable the
* `Polymer.OptionalMutableDataBehavior`.
*
* In order to make the dirty check strategy configurable, see
* `Polymer.OptionalMutableDataBehavior`.
*
* Note, the performance characteristics of propagating large object graphs
* will be worse as opposed to using strict dirty checking with immutable
* patterns or Polymer's path notification API.
*
* @polymerBehavior
* @summary Behavior to skip strict dirty-checking for objects and
* arrays
*/
export const MutableDataBehavior = {

@@ -34,2 +80,41 @@

/**
* Legacy element behavior to add the optional ability to skip strict
* dirty-checking for objects and arrays (always consider them to be
* "dirty") by setting a `mutable-data` attribute on an element instance.
*
* By default, `Polymer.PropertyEffects` performs strict dirty checking on
* objects, which means that any deep modifications to an object or array will
* not be propagated unless "immutable" data patterns are used (i.e. all object
* references from the root to the mutation were changed).
*
* Polymer also provides a proprietary data mutation and path notification API
* (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient
* mutation and notification of deep changes in an object graph to all elements
* bound to the same object graph.
*
* In cases where neither immutable patterns nor the data mutation API can be
* used, applying this mixin will allow Polymer to skip dirty checking for
* objects and arrays (always consider them to be "dirty"). This allows a
* user to make a deep modification to a bound object graph, and then either
* simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`
* (e.g. `this.notifyPath('items')`) to update the tree. Note that all
* elements that wish to be updated based on deep mutations must apply this
* mixin or otherwise skip strict dirty checking for objects/arrays.
* Specifically, any elements in the binding tree between the source of a
* mutation and the consumption of it must enable this behavior or apply the
* `Polymer.OptionalMutableDataBehavior`.
*
* While this behavior adds the ability to forgo Object/Array dirty checking,
* the `mutableData` flag defaults to false and must be set on the instance.
*
* Note, the performance characteristics of propagating large object graphs
* will be worse by relying on `mutableData: true` as opposed to using
* strict dirty checking with immutable patterns or Polymer's path notification
* API.
*
* @polymerBehavior
* @summary Behavior to optionally skip strict dirty-checking for objects and
* arrays
*/
export const OptionalMutableDataBehavior = {

@@ -36,0 +121,0 @@

@@ -0,4 +1,34 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { Class } from './class.js';
export const Polymer = function(info) {
import '../utils/boot.js';
/**
* Legacy class factory and registration helper for defining Polymer
* elements.
*
* This method is equivalent to
*
* import {Class} from '@polymer/polymer/lib/legacy/class.js';
* customElements.define(info.is, Class(info));
*
* See `Class` for details on valid legacy metadata format for `info`.
*
* @global
* @override
* @function
* @param {!PolymerInit} info Object containing Polymer metadata and functions
* to become class methods.
* @return {function(new: HTMLElement)} Generated class
* @suppress {duplicate, invalidCasts, checkTypes}
*/
const Polymer = function(info) {
// if input is a `class` (aka a function with a prototype), use the prototype

@@ -10,3 +40,3 @@ // remember that the `constructor` will never be called

} else {
klass = Class(info);
klass = Polymer.Class(info);
}

@@ -16,1 +46,5 @@ customElements.define(klass.is, /** @type {!HTMLElement} */(klass));

};
Polymer.Class = Class;
export { Polymer };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import '../utils/settings.js';

@@ -18,3 +28,2 @@ import { FlattenedNodesObserver } from '../utils/flattened-nodes-observer.js';

* @function matchesSelector
* @memberof Polymer.dom
* @param {!Node} node Node to check selector against

@@ -24,3 +33,3 @@ * @param {string} selector Selector to match

*/
const matchesSelector = function(node, selector) {
export const matchesSelector = function(node, selector) {
return normalizedMatchesSelector.call(node, selector);

@@ -33,5 +42,4 @@ };

*
* @memberof Polymer
*/
class DomApi {
export class DomApi {

@@ -283,4 +291,2 @@ /**

export { DomApi };
/**

@@ -344,2 +350,16 @@ * @function

/**
* Legacy DOM and Event manipulation API wrapper factory used to abstract
* differences between native Shadow DOM and "Shady DOM" when polyfilling on
* older browsers.
*
* Note that in Polymer 2.x use of `Polymer.dom` is no longer required and
* in the majority of cases simply facades directly to the standard native
* API.
*
* @summary Legacy DOM and Event manipulation API wrapper factory used to
* abstract differences between native Shadow DOM and "Shady DOM."
* @param {(Node|Event)=} obj Node or event to operate on
* @return {!DomApi|!EventApi} Wrapper providing either node API or event API
*/
export const dom = function(obj) {

@@ -359,4 +379,19 @@ obj = obj || document;

export { matchesSelector };
/**
* Forces several classes of asynchronously queued tasks to flush:
* - Debouncers added via `Polymer.enqueueDebouncer`
* - ShadyDOM distribution
*
* This method facades to `Polymer.flush`.
*
*/
export { flush$0 as flush };
/**
* Adds a `Polymer.Debouncer` to a list of globally flushable tasks.
*
* This method facades to `Polymer.enqueueDebouncer`.
*
* @param {!Polymer.Debouncer} debouncer Debouncer to enqueue
*/
export { enqueueDebouncer as addDebouncer };

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { TemplateInstanceBase as TemplateInstanceBase$0, templatize as templatize$0, modelForElement as modelForElement$0 } from '../utils/templatize.js';

@@ -17,2 +26,63 @@

/**
* The `Templatizer` behavior adds methods to generate instances of
* templates that are each managed by an anonymous `PropertyEffects`
* instance where data-bindings in the stamped template content are bound to
* accessors on itself.
*
* This behavior is provided in Polymer 2.x-3.x as a hybrid-element convenience
* only. For non-hybrid usage, the `Templatize` library
* should be used instead.
*
* Example:
*
* import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
* // Get a template from somewhere, e.g. light DOM
* let template = this.querySelector('template');
* // Prepare the template
* this.templatize(template);
* // Instance the template with an initial data model
* let instance = this.stamp({myProp: 'initial'});
* // Insert the instance's DOM somewhere, e.g. light DOM
* dom(this).appendChild(instance.root);
* // Changing a property on the instance will propagate to bindings
* // in the template
* instance.myProp = 'new value';
*
* Users of `Templatizer` may need to implement the following abstract
* API's to determine how properties and paths from the host should be
* forwarded into to instances:
*
* _forwardHostPropV2: function(prop, value)
*
* Likewise, users may implement these additional abstract API's to determine
* how instance-specific properties that change on the instance should be
* forwarded out to the host, if necessary.
*
* _notifyInstancePropV2: function(inst, prop, value)
*
* In order to determine which properties are instance-specific and require
* custom notification via `_notifyInstanceProp`, define an `_instanceProps`
* object containing keys for each instance prop, for example:
*
* _instanceProps: {
* item: true,
* index: true
* }
*
* Any properties used in the template that are not defined in _instanceProp
* will be forwarded out to the Templatize `owner` automatically.
*
* Users may also implement the following abstract function to show or
* hide any DOM generated using `stamp`:
*
* _showHideChildren: function(shouldHide)
*
* Note that some callbacks are suffixed with `V2` in the Polymer 2.x behavior
* as the implementations will need to differ from the callbacks required
* by the 1.x Templatizer API due to changes in the `TemplateInstance` API
* between versions 1.x and 2.x.
*
* @polymerBehavior
*/
export const Templatizer = {

@@ -19,0 +89,0 @@

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PropertyAccessors } from './property-accessors.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -48,2 +58,25 @@

/**
* Element class mixin that allows elements to use the `:dir` CSS Selector to
* have text direction specific styling.
*
* With this mixin, any stylesheet provided in the template will transform
* `:dir` into `:host([dir])` and sync direction with the page via the
* element's `dir` attribute.
*
* Elements can opt out of the global page text direction by setting the `dir`
* attribute directly in `ready()` or in HTML.
*
* Caveats:
* - Applications must set `<html dir="ltr">` or `<html dir="rtl">` to sync
* direction
* - Automatic left-to-right or right-to-left styling is sync'd with the
* `<html>` element only.
* - Changing `dir` at runtime is supported.
* - Opting out of the global direction styling is permanent
*
* @mixinFunction
* @polymer
* @appliesMixin PropertyAccessors
*/
export const DirMixin = dedupingMixin((base) => {

@@ -50,0 +83,0 @@

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { ElementMixin } from './element-mixin.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -6,2 +16,26 @@

/**
* Element class mixin that allows the element to boot up in a non-enabled
* state when the `disable-upgrade` attribute is present. This mixin is
* designed to be used with element classes like PolymerElement that perform
* initial startup work when they are first connected. When the
* `disable-upgrade` attribute is removed, if the element is connected, it
* boots up and "enables" as it otherwise would; if it is not connected, the
* element boots up when it is next connected.
*
* Using `disable-upgrade` with PolymerElement prevents any data propagation
* to the element, any element DOM from stamping, or any work done in
* connected/disconnctedCallback from occuring, but it does not prevent work
* done in the element constructor.
*
* Note, this mixin must be applied on top of any element class that
* itself implements a `connectedCallback` so that it can control the work
* done in `connectedCallback`. For example,
*
* MyClass = DisableUpgradeMixin(class extends BaseClass {...});
*
* @mixinFunction
* @polymer
* @appliesMixin ElementMixin
*/
export const DisableUpgradeMixin = dedupingMixin((base) => {

@@ -28,3 +62,3 @@

/** @override */
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (name == DISABLED_ATTR) {

@@ -35,3 +69,3 @@ if (!this.__dataEnabled && value == null && this.isConnected) {

} else {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
}

@@ -38,0 +72,0 @@ }

@@ -0,6 +1,16 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { rootPath as rootPath$0 } from '../utils/settings.js';
import { dedupingMixin } from '../utils/mixin.js';
import { stylesFromTemplate, stylesFromModuleImports } from '../utils/style-gather.js';
import { resolveCss, resolveUrl as resolveUrl$0 } from '../utils/resolve-url.js';
import { pathFromUrl, resolveCss, resolveUrl as resolveUrl$0 } from '../utils/resolve-url.js';
import { DomModule } from '../elements/dom-module.js';

@@ -10,2 +20,71 @@ import { PropertyEffects } from './property-effects.js';

/**
* Element class mixin that provides the core API for Polymer's meta-programming
* features including template stamping, data-binding, attribute deserialization,
* and property change observation.
*
* Subclassers may provide the following static getters to return metadata
* used to configure Polymer's features for the class:
*
* - `static get is()`: When the template is provided via a `dom-module`,
* users should return the `dom-module` id from a static `is` getter. If
* no template is needed or the template is provided directly via the
* `template` getter, there is no need to define `is` for the element.
*
* - `static get template()`: Users may provide the template directly (as
* opposed to via `dom-module`) by implementing a static `template` getter.
* The getter may return an `HTMLTemplateElement` or a string, which will
* automatically be parsed into a template.
*
* - `static get properties()`: Should return an object describing
* property-related metadata used by Polymer features (key: property name
* value: object containing property metadata). Valid keys in per-property
* metadata include:
* - `type` (String|Number|Object|Array|...): Used by
* `attributeChangedCallback` to determine how string-based attributes
* are deserialized to JavaScript property values.
* - `notify` (boolean): Causes a change in the property to fire a
* non-bubbling event called `<property>-changed`. Elements that have
* enabled two-way binding to the property use this event to observe changes.
* - `readOnly` (boolean): Creates a getter for the property, but no setter.
* To set a read-only property, use the private setter method
* `_setProperty(property, value)`.
* - `observer` (string): Observer method name that will be called when
* the property changes. The arguments of the method are
* `(value, previousValue)`.
* - `computed` (string): String describing method and dependent properties
* for computing the value of this property (e.g. `'computeFoo(bar, zot)'`).
* Computed properties are read-only by default and can only be changed
* via the return value of the computing method.
*
* - `static get observers()`: Array of strings describing multi-property
* observer methods and their dependent properties (e.g.
* `'observeABC(a, b, c)'`).
*
* The base class provides default implementations for the following standard
* custom element lifecycle callbacks; users may override these, but should
* call the super method to ensure
* - `constructor`: Run when the element is created or upgraded
* - `connectedCallback`: Run each time the element is connected to the
* document
* - `disconnectedCallback`: Run each time the element is disconnected from
* the document
* - `attributeChangedCallback`: Run each time an attribute in
* `observedAttributes` is set or removed (note: this element's default
* `observedAttributes` implementation will automatically return an array
* of dash-cased attributes based on `properties`)
*
* @mixinFunction
* @polymer
* @appliesMixin PropertyEffects
* @appliesMixin PropertiesMixin
* @property rootPath {string} Set to the value of `rootPath`,
* which defaults to the main document path
* @property importPath {string} Set to the value of the class's static
* `importPath` property, which defaults to the path of this element's
* `dom-module` (when `is` is used), but can be overridden for other
* import strategies.
* @summary Element class mixin that provides the core API for Polymer's
* meta-programming features.
*/
export const ElementMixin = dedupingMixin(base => {

@@ -282,3 +361,3 @@

* template via a `dom-module`, it should override this getter and
* return `Polymer.DomModule.import(this.is, 'template')`.
* return `DomModule.import(this.is, 'template')`.
*

@@ -319,16 +398,29 @@ * If a subclass would like to modify the super class template, it should

* Path matching the url from which the element was imported.
*
* This path is used to resolve url's in template style cssText.
* The `importPath` property is also set on element instances and can be
* used to create bindings relative to the import path.
* Defaults to the path matching the url containing a `dom-module` element
* matching this element's static `is` property.
*
* For elements defined in ES modules, users should implement
* `static get importMeta() { return import.meta; }`, and the default
* implementation of `importPath` will return `import.meta.url`'s path.
* For elements defined in HTML imports, this getter will return the path
* to the document containing a `dom-module` element matching this
* element's static `is` property.
*
* Note, this path should contain a trailing `/`.
*
* @return {string} The import path for this element class
* @suppress {missingProperties}
*/
static get importPath() {
if (!this.hasOwnProperty(JSCompiler_renameProperty('_importPath', this))) {
const meta = this.importMeta;
if (meta) {
this._importPath = pathFromUrl(meta.url);
} else {
const module = DomModule && DomModule.import(/** @type {PolymerElementConstructor} */ (this).is);
this._importPath = module ? module.assetpath : '' ||
Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;
this._importPath = (module && module.assetpath) ||
Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;
}
}

@@ -355,3 +447,3 @@ return this._importPath;

/**
* Overrides the default `Polymer.PropertyAccessors` to ensure class
* Overrides the default `PropertyAccessors` to ensure class
* metaprogramming related to property accessors and effects has

@@ -370,3 +462,2 @@ * completed (calls `finalize`).

this.constructor.finalize();
const importPath = this.constructor.importPath;
// note: finalize template when we have access to `localName` to

@@ -378,3 +469,3 @@ // avoid dependence on `is` for polyfilling styling.

this.rootPath = rootPath$0;
this.importPath = importPath;
this.importPath = this.constructor.importPath;
// apply property defaults...

@@ -517,3 +608,3 @@ let p$ = propertyDefaults(this.constructor);

// TODO(sorvell): move to compile-time conditional when supported
'Polymer.Element can create dom as children instead of in ' +
'PolymerElement can create dom as children instead of in ' +
'ShadowDOM by setting `this.root = this;\` before \`ready\`.');

@@ -591,9 +682,40 @@ }

/**
* Provides basic tracking of element definitions (registrations) and
* instance counts.
*
* @summary Provides basic tracking of element definitions (registrations) and
* instance counts.
*/
`TODO(modulizer): A namespace named Polymer.telemetry was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Total number of Polymer element instances created.
* @type {number}
*/
export let instanceCount = 0;
/**
* Array of Polymer element classes that have been finalized.
* @type {Array<PolymerElement>}
*/
export const registrations = [];
export function _regLog(prototype) {
/**
* @param {!PolymerElementConstructor} prototype Element prototype to log
* @this {this}
* @private
*/
function _regLog(prototype) {
console.log('[' + prototype.is + ']: registered');
}
/**
* Registers a class prototype for telemetry purposes.
* @param {HTMLElement} prototype Element prototype to register
* @this {this}
* @protected
*/
export function register(prototype) {

@@ -604,2 +726,7 @@ registrations.push(prototype);

/**
* Logs all elements registered with an `is` to the console.
* @public
* @this {this}
*/
export function dumpRegistrations() {

@@ -609,2 +736,19 @@ registrations.forEach(_regLog);

/**
* When using the ShadyCSS scoping and custom property shim, causes all
* shimmed `styles` (via `custom-style`) in the document (and its subtree)
* to be updated based on current custom property values.
*
* The optional parameter overrides inline custom property styles with an
* object of properties where the keys are CSS properties, and the values
* are strings.
*
* Example: `updateStyles({'--color': 'blue'})`
*
* These properties are retained unless a value of `null` is set.
*
* @param {Object=} props Bag of custom property key/values to
* apply to the document.
* @return {void}
*/
export const updateStyles = function(props) {

@@ -611,0 +755,0 @@ if (window.ShadyCSS) {

@@ -0,10 +1,32 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { dedupingMixin } from '../utils/mixin.js';
import * as gestures$0 from '../utils/gestures.js';
const gestures = gestures$0;
/**
* @const {Polymer.Gestures}
* Element class mixin that provides API for adding Polymer's cross-platform
* gesture events to nodes.
*
* The API is designed to be compatible with override points implemented
* in `TemplateStamp` such that declarative event listeners in
* templates will support gesture events when this mixin is applied along with
* `TemplateStamp`.
*
* @mixinFunction
* @polymer
* @summary Element class mixin that provides API for adding Polymer's
* cross-platform
* gesture events to nodes
*/
const gestures = gestures$0;
export const GestureEventListeners = dedupingMixin(superClass => {

@@ -11,0 +33,0 @@

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { dedupingMixin } from '../utils/mixin.js';

@@ -23,2 +32,41 @@

/**
* Element class mixin to skip strict dirty-checking for objects and arrays
* (always consider them to be "dirty"), for use on elements utilizing
* `PropertyEffects`
*
* By default, `PropertyEffects` performs strict dirty checking on
* objects, which means that any deep modifications to an object or array will
* not be propagated unless "immutable" data patterns are used (i.e. all object
* references from the root to the mutation were changed).
*
* Polymer also provides a proprietary data mutation and path notification API
* (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient
* mutation and notification of deep changes in an object graph to all elements
* bound to the same object graph.
*
* In cases where neither immutable patterns nor the data mutation API can be
* used, applying this mixin will cause Polymer to skip dirty checking for
* objects and arrays (always consider them to be "dirty"). This allows a
* user to make a deep modification to a bound object graph, and then either
* simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`
* (e.g. `this.notifyPath('items')`) to update the tree. Note that all
* elements that wish to be updated based on deep mutations must apply this
* mixin or otherwise skip strict dirty checking for objects/arrays.
* Specifically, any elements in the binding tree between the source of a
* mutation and the consumption of it must apply this mixin or enable the
* `OptionalMutableData` mixin.
*
* In order to make the dirty check strategy configurable, see
* `OptionalMutableData`.
*
* Note, the performance characteristics of propagating large object graphs
* will be worse as opposed to using strict dirty checking with immutable
* patterns or Polymer's path notification API.
*
* @mixinFunction
* @polymer
* @summary Element class mixin to skip strict dirty-checking for objects
* and arrays
*/
export const MutableData = dedupingMixin(superClass => {

@@ -33,3 +81,3 @@

/**
* Overrides `Polymer.PropertyEffects` to provide option for skipping
* Overrides `PropertyEffects` to provide option for skipping
* strict equality checking for Objects and Arrays.

@@ -60,2 +108,42 @@ *

/**
* Element class mixin to add the optional ability to skip strict
* dirty-checking for objects and arrays (always consider them to be
* "dirty") by setting a `mutable-data` attribute on an element instance.
*
* By default, `PropertyEffects` performs strict dirty checking on
* objects, which means that any deep modifications to an object or array will
* not be propagated unless "immutable" data patterns are used (i.e. all object
* references from the root to the mutation were changed).
*
* Polymer also provides a proprietary data mutation and path notification API
* (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient
* mutation and notification of deep changes in an object graph to all elements
* bound to the same object graph.
*
* In cases where neither immutable patterns nor the data mutation API can be
* used, applying this mixin will allow Polymer to skip dirty checking for
* objects and arrays (always consider them to be "dirty"). This allows a
* user to make a deep modification to a bound object graph, and then either
* simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`
* (e.g. `this.notifyPath('items')`) to update the tree. Note that all
* elements that wish to be updated based on deep mutations must apply this
* mixin or otherwise skip strict dirty checking for objects/arrays.
* Specifically, any elements in the binding tree between the source of a
* mutation and the consumption of it must enable this mixin or apply the
* `MutableData` mixin.
*
* While this mixin adds the ability to forgo Object/Array dirty checking,
* the `mutableData` flag defaults to false and must be set on the instance.
*
* Note, the performance characteristics of propagating large object graphs
* will be worse by relying on `mutableData: true` as opposed to using
* strict dirty checking with immutable patterns or Polymer's path notification
* API.
*
* @mixinFunction
* @polymer
* @summary Element class mixin to optionally skip strict dirty-checking
* for objects and arrays
*/
export const OptionalMutableData = dedupingMixin(superClass => {

@@ -82,3 +170,3 @@

/**
* Overrides `Polymer.PropertyEffects` to provide option for skipping
* Overrides `PropertyEffects` to provide option for skipping
* strict equality checking for Objects and Arrays.

@@ -85,0 +173,0 @@ *

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -8,2 +18,20 @@ import { microTask } from '../utils/async.js';

/**
* Element class mixin that provides basic meta-programming for creating one
* or more property accessors (getter/setter pair) that enqueue an async
* (batched) `_propertiesChanged` callback.
*
* For basic usage of this mixin, call `MyClass.createProperties(props)`
* once at class definition time to create property accessors for properties
* named in props, implement `_propertiesChanged` to react as desired to
* property changes, and implement `static get observedAttributes()` and
* include lowercase versions of any property names that should be set from
* attributes. Last, call `this._enableProperties()` in the element's
* `connectedCallback` to enable the accessors.
*
* @mixinFunction
* @polymer
* @summary Element class mixin for reacting to property changes from
* generated property accessors.
*/
export const PropertiesChanged = dedupingMixin(superClass => {

@@ -377,6 +405,7 @@

* @param {?string} value New attribute value
* @param {?string} namespace Attribute namespace.
* @return {void}
* @suppress {missingProperties} Super may or may not implement the callback
*/
attributeChangedCallback(name, old, value) {
attributeChangedCallback(name, old, value, namespace) {
if (old !== value) {

@@ -386,3 +415,3 @@ this._attributeToProperty(name, value);

if (super.attributeChangedCallback) {
super.attributeChangedCallback(name, old, value);
super.attributeChangedCallback(name, old, value, namespace);
}

@@ -389,0 +418,0 @@ }

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -23,2 +33,19 @@ import { PropertiesChanged } from './properties-changed.js';

/**
* Mixin that provides a minimal starting point to using the PropertiesChanged
* mixin by providing a mechanism to declare properties in a static
* getter (e.g. static get properties() { return { foo: String } }). Changes
* are reported via the `_propertiesChanged` method.
*
* This mixin provides no specific support for rendering. Users are expected
* to create a ShadowRoot and put content into it and update it in whatever
* way makes sense. This can be done in reaction to properties changing by
* implementing `_propertiesChanged`.
*
* @mixinFunction
* @polymer
* @appliesMixin PropertiesChanged
* @summary Mixin that provides a minimal starting point for using
* the PropertiesChanged mixin by providing a declarative `properties` object.
*/
export const PropertiesMixin = dedupingMixin(superClass => {

@@ -25,0 +52,0 @@

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -57,2 +67,30 @@ import * as caseMap$0 from '../utils/case-map.js';

/**
* Element class mixin that provides basic meta-programming for creating one
* or more property accessors (getter/setter pair) that enqueue an async
* (batched) `_propertiesChanged` callback.
*
* For basic usage of this mixin:
*
* - Declare attributes to observe via the standard `static get observedAttributes()`. Use
* `dash-case` attribute names to represent `camelCase` property names.
* - Implement the `_propertiesChanged` callback on the class.
* - Call `MyClass.createPropertiesForAttributes()` **once** on the class to generate
* property accessors for each observed attribute. This must be called before the first
* instance is created, for example, by calling it before calling `customElements.define`.
* It can also be called lazily from the element's `constructor`, as long as it's guarded so
* that the call is only made once, when the first instance is created.
* - Call `this._enableProperties()` in the element's `connectedCallback` to enable
* the accessors.
*
* Any `observedAttributes` will automatically be
* deserialized via `attributeChangedCallback` and set to the associated
* property using `dash-case`-to-`camelCase` convention.
*
* @mixinFunction
* @polymer
* @appliesMixin PropertiesChanged
* @summary Element class mixin for reacting to property changes from
* generated property accessors.
*/
export const PropertyAccessors = dedupingMixin(superClass => {

@@ -59,0 +97,0 @@

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import '../utils/boot.js';
import { dedupingMixin } from '../utils/mixin.js';

@@ -85,2 +95,15 @@

/**
* Element mixin that provides basic template parsing and stamping, including
* the following template-related features for stamped templates:
*
* - Declarative event listeners (`on-eventname="listener"`)
* - Map of node id's to stamped node instances (`this.$.id`)
* - Nested template content caching/removal and re-installation (performance
* optimization)
*
* @mixinFunction
* @polymer
* @summary Element class mixin that provides basic template parsing and stamping
*/
export const TemplateStamp = dedupingMixin(superClass => {

@@ -87,0 +110,0 @@

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -252,3 +261,34 @@

function calculateSplices(current, previous) {
/**
* Returns an array of splice records indicating the minimum edits required
* to transform the `previous` array into the `current` array.
*
* Splice records are ordered by index and contain the following fields:
* - `index`: index where edit started
* - `removed`: array of removed items from this index
* - `addedCount`: number of items added at this index
*
* This function is based on the Levenshtein "minimum edit distance"
* algorithm. Note that updates are treated as removal followed by addition.
*
* The worst-case time complexity of this algorithm is `O(l * p)`
* l: The length of the current array
* p: The length of the previous array
*
* However, the worst-case complexity is reduced by an `O(n)` optimization
* to detect any shared prefix & suffix between the two arrays and only
* perform the more expensive minimum edit distance calculation over the
* non-shared portions of the arrays.
*
* @function
* @param {!Array} current The "changed" array for which splices will be
* calculated.
* @param {!Array} previous The "unchanged" original array to compare
* `current` against to determine the splices.
* @return {!Array} Returns an array of splice record objects. Each of these
* contains: `index` the location where the splice occurred; `removed`
* the array of removed items from this location; `addedCount` the number
* of items added at this location.
*/
export function calculateSplices(current, previous) {
return calcSplices(current, 0, current.length, previous, 0,

@@ -261,3 +301,1 @@ previous.length);

}
export { calculateSplices };

@@ -0,1 +1,23 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
* @fileoverview
*
* This module provides a number of strategies for enqueuing asynchronous
* tasks. Each sub-module provides a standard `run(fn)` interface that returns a
* handle, and a `cancel(handle)` interface for canceling async tasks before
* they run.
*
* @summary Module that provides a number of strategies for enqueuing
* asynchronous tasks.
*/
import './boot.js';

@@ -27,3 +49,9 @@

export const timeOut = {
/**
* Async interface wrapper around `setTimeout`.
*
* @namespace
* @summary Async interface wrapper around `setTimeout`.
*/
const timeOut = {
/**

@@ -33,3 +61,3 @@ * Returns a sub-module with the async interface providing the provided

*
* @memberof Polymer.Async.timeOut
* @memberof timeOut
* @param {number=} delay Time to wait before calling callbacks in ms

@@ -49,3 +77,3 @@ * @return {!AsyncInterface} An async timeout interface

*
* @memberof Polymer.Async.timeOut
* @memberof timeOut
* @param {!Function} fn Callback to run

@@ -61,3 +89,3 @@ * @param {number=} delay Delay in milliseconds

*
* @memberof Polymer.Async.timeOut
* @memberof timeOut
* @param {number} handle Handle returned from `run` of callback to cancel

@@ -70,8 +98,15 @@ * @return {void}

};
export {timeOut};
export const animationFrame = {
/**
* Async interface wrapper around `requestAnimationFrame`.
*
* @namespace
* @summary Async interface wrapper around `requestAnimationFrame`.
*/
const animationFrame = {
/**
* Enqueues a function called at `requestAnimationFrame` timing.
*
* @memberof Polymer.Async.animationFrame
* @memberof animationFrame
* @param {function(number):void} fn Callback to run

@@ -86,3 +121,3 @@ * @return {number} Handle used for canceling task

*
* @memberof Polymer.Async.animationFrame
* @memberof animationFrame
* @param {number} handle Handle returned from `run` of callback to cancel

@@ -95,8 +130,16 @@ * @return {void}

};
export {animationFrame};
export const idlePeriod = {
/**
* Async interface wrapper around `requestIdleCallback`. Falls back to
* `setTimeout` on browsers that do not support `requestIdleCallback`.
*
* @namespace
* @summary Async interface wrapper around `requestIdleCallback`.
*/
const idlePeriod = {
/**
* Enqueues a function called at `requestIdleCallback` timing.
*
* @memberof Polymer.Async.idlePeriod
* @memberof idlePeriod
* @param {function(!IdleDeadline):void} fn Callback to run

@@ -113,3 +156,3 @@ * @return {number} Handle used for canceling task

*
* @memberof Polymer.Async.idlePeriod
* @memberof idlePeriod
* @param {number} handle Handle returned from `run` of callback to cancel

@@ -124,4 +167,18 @@ * @return {void}

};
export {idlePeriod};
export const microTask = {
/**
* Async interface for enqueuing callbacks that run at microtask timing.
*
* Note that microtask timing is achieved via a single `MutationObserver`,
* and thus callbacks enqueued with this API will all run in a single
* batch, and not interleaved with other microtasks such as promises.
* Promises are avoided as an implementation choice for the time being
* due to Safari bugs that cause Promises to lack microtask guarantees.
*
* @namespace
* @summary Async interface for enqueuing callbacks that run at microtask
* timing.
*/
const microTask = {

@@ -131,3 +188,3 @@ /**

*
* @memberof Polymer.Async.microTask
* @memberof microTask
* @param {!Function=} callback Callback to run

@@ -145,3 +202,3 @@ * @return {number} Handle used for canceling task

*
* @memberof Polymer.Async.microTask
* @memberof microTask
* @param {number} handle Handle returned from `run` of callback to cancel

@@ -161,1 +218,2 @@ * @return {void}

};
export {microTask};

@@ -0,4 +1,11 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
window.JSCompiler_renameProperty = function(prop, obj) { return prop; }
/** @namespace Polymer */
let __PolymerBootstrap;

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -7,2 +16,20 @@

/**
* Module with utilities for converting between "dash-case" and "camelCase"
* identifiers.
*
* @summary Module that provides utilities for converting between "dash-case"
* and "camelCase".
*/
`TODO(modulizer): A namespace named Polymer.CaseMap was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Converts "dash-case" identifier (e.g. `foo-bar-baz`) to "camelCase"
* (e.g. `fooBarBaz`).
*
* @param {string} dash Dash-case identifier
* @return {string} Camel-case representation of the identifier
*/
export function dashToCamelCase(dash) {

@@ -16,2 +43,9 @@ return caseMap[dash] || (

/**
* Converts "camelCase" identifier (e.g. `fooBarBaz`) to "dash-case"
* (e.g. `foo-bar-baz`).
*
* @param {string} camel Camel-case identifier
* @return {string} Dash-case representation of the identifier
*/
export function camelToDashCase(camel) {

@@ -18,0 +52,0 @@ return caseMap[camel] || (

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
import './mixin.js';

@@ -7,5 +17,4 @@ import './async.js';

* @summary Collapse multiple callbacks into one invocation after a timer.
* @memberof Polymer
*/
class Debouncer {
export const Debouncer = class Debouncer {
constructor() {

@@ -70,8 +79,12 @@ this._asyncModule = null;

*
* ```js
* import {microtask} from '@polymer/polymer/lib/utils/async.js';
* import {Debouncer} from '@polymer/polymer/lib/utils/debounce.js';
* // ...
*
* _debounceWork() {
* this._debounceJob = Polymer.Debouncer.debounce(this._debounceJob,
* Polymer.Async.microTask, () => {
* this._doWork();
* });
* this._debounceJob = Debouncer.debounce(this._debounceJob,
* microTask, () => this._doWork());
* }
* ```
*

@@ -83,6 +96,6 @@ * If the `_debounceWork` method is called multiple times within the same

* Note: In testing it is often convenient to avoid asynchrony. To accomplish
* this with a debouncer, you can use `Polymer.enqueueDebouncer` and
* `Polymer.flush`. For example, extend the above example by adding
* `Polymer.enqueueDebouncer(this._debounceJob)` at the end of the
* `_debounceWork` method. Then in a test, call `Polymer.flush` to ensure
* this with a debouncer, you can use `enqueueDebouncer` and
* `flush`. For example, extend the above example by adding
* `enqueueDebouncer(this._debounceJob)` at the end of the
* `_debounceWork` method. Then in a test, call `flush` to ensure
* the debouncer has completed.

@@ -105,3 +118,1 @@ *

}
export { Debouncer };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
import { calculateSplices } from './array-splice.js';

@@ -37,7 +47,7 @@ import { microTask } from './async.js';

* ```js
* class TestSelfObserve extends Polymer.Element {
* class TestSelfObserve extends PolymerElement {
* static get is() { return 'test-self-observe';}
* connectedCallback() {
* super.connectedCallback();
* this._observer = new Polymer.FlattenedNodesObserver(this, (info) => {
* this._observer = new FlattenedNodesObserver(this, (info) => {
* this.info = info;

@@ -54,7 +64,6 @@ * });

*
* @memberof Polymer
* @summary Class that listens for changes (additions or removals) to
* "flattened nodes" on a given `node`.
*/
class FlattenedNodesObserver {
export class FlattenedNodesObserver {

@@ -298,3 +307,1 @@ /**

}
export { FlattenedNodesObserver };

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -5,2 +14,8 @@

/**
* Adds a `Debouncer` to a list of globally flushable tasks.
*
* @param {!Debouncer} debouncer Debouncer to enqueue
* @return {void}
*/
export const enqueueDebouncer = function(debouncer) {

@@ -24,2 +39,9 @@ debouncerQueue.push(debouncer);

/**
* Forces several classes of asynchronously queued tasks to flush:
* - Debouncers added via `enqueueDebouncer`
* - ShadyDOM distribution
*
* @return {void}
*/
export const flush = function() {

@@ -26,0 +48,0 @@ let shadyDOM, debouncers;

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
import { timeOut, microTask } from './async.js';

@@ -50,6 +60,8 @@ import { Debouncer } from './debounce.js';

/**
* Generate settings for event listeners, dependant on `Polymer.passiveTouchGestures`
* Generate settings for event listeners, dependant on `passiveTouchGestures`
*
* @param {string} eventName Event name to determine if `{passive}` option is needed
* @return {{passive: boolean} | undefined} Options to use for addEventListener and removeEventListener
* @param {string} eventName Event name to determine if `{passive}` option is
* needed
* @return {{passive: boolean} | undefined} Options to use for addEventListener
* and removeEventListener
*/

@@ -316,5 +328,30 @@ function PASSIVE_TOUCH(eventName) {

/**
* Module for adding listeners to a node for the following normalized
* cross-platform "gesture" events:
* - `down` - mouse or touch went down
* - `up` - mouse or touch went up
* - `tap` - mouse click or finger tap
* - `track` - mouse drag or touch move
*
* @summary Module for adding cross-platform gesture event listeners.
*/
`TODO(modulizer): A namespace named Polymer.Gestures was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
export const gestures = {};
export const recognizers = [];
/**
* Finds the element rendered on the screen at the provided coordinates.
*
* Similar to `document.elementFromPoint`, but pierces through
* shadow roots.
*
* @param {number} x Horizontal pixel coordinate
* @param {number} y Vertical pixel coordinate
* @return {Element} Returns the deepest shadowRoot inclusive element
* found at the screen position given.
*/
export function deepTargetFind(x, y) {

@@ -341,3 +378,10 @@ let node = document.elementFromPoint(x, y);

export function _findOriginalTarget(ev) {
/**
* a cheaper check than ev.composedPath()[0];
*
* @private
* @param {Event} ev Event.
* @return {EventTarget} Returns the event target.
*/
function _findOriginalTarget(ev) {
// shadowdom

@@ -353,3 +397,8 @@ if (ev.composedPath) {

export function _handleNative(ev) {
/**
* @private
* @param {Event} ev Event.
* @return {void}
*/
function _handleNative(ev) {
let handled;

@@ -411,3 +460,8 @@ let type = ev.type;

export function _handleTouchAction(ev) {
/**
* @private
* @param {TouchEvent} ev Event.
* @return {void}
*/
function _handleTouchAction(ev) {
let t = ev.changedTouches[0];

@@ -445,2 +499,11 @@ let type = ev.type;

/**
* Adds an event listener to a node for the given gesture type.
*
* @param {!Node} node Node to add listener on
* @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`
* @param {!function(!Event):void} handler Event listener function to call
* @return {boolean} Returns true if a gesture event listener was added.
* @this {Gestures}
*/
export function addListener(node, evType, handler) {

@@ -454,2 +517,12 @@ if (gestures[evType]) {

/**
* Removes an event listener from a node for the given gesture type.
*
* @param {!Node} node Node to remove listener from
* @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`
* @param {!function(!Event):void} handler Event listener function previously passed to
* `addListener`.
* @return {boolean} Returns true if a gesture event listener was removed.
* @this {Gestures}
*/
export function removeListener(node, evType, handler) {

@@ -463,3 +536,13 @@ if (gestures[evType]) {

export function _add(node, evType, handler) {
/**
* automate the event listeners for the native events
*
* @private
* @param {!HTMLElement} node Node on which to add the event.
* @param {string} evType Event type to add.
* @param {function(!Event)} handler Event handler function.
* @return {void}
* @this {Gestures}
*/
function _add(node, evType, handler) {
let recognizer = gestures[evType];

@@ -494,3 +577,13 @@ let deps = recognizer.deps;

export function _remove(node, evType, handler) {
/**
* automate event listener removal for native events
*
* @private
* @param {!HTMLElement} node Node on which to remove the event.
* @param {string} evType Event type to remove.
* @param {function(Event?)} handler Event handler function.
* @return {void}
* @this {Gestures}
*/
function _remove(node, evType, handler) {
let recognizer = gestures[evType];

@@ -516,2 +609,10 @@ let deps = recognizer.deps;

/**
* Registers a new gesture event recognizer for adding new custom
* gesture event types.
*
* @param {!GestureRecognizer} recog Gesture recognizer descriptor
* @return {void}
* @this {Gestures}
*/
export function register(recog) {

@@ -524,3 +625,9 @@ recognizers.push(recog);

export function _findRecognizerByEvent(evName) {
/**
* @private
* @param {string} evName Event name.
* @return {Object} Returns the gesture for the given event name.
* @this {Gestures}
*/
function _findRecognizerByEvent(evName) {
for (let i = 0, r; i < recognizers.length; i++) {

@@ -538,2 +645,12 @@ r = recognizers[i];

/**
* Sets scrolling direction on node.
*
* This value is checked on first move, thus it should be called prior to
* adding event listeners.
*
* @param {!Element} node Node to set touch action setting on
* @param {string} value Touch action value
* @return {void}
*/
export function setTouchAction(node, value) {

@@ -552,3 +669,12 @@ if (HAS_NATIVE_TA) {

export function _fire(target, type, detail) {
/**
* Dispatches an event on the `target` element of `type` with the given
* `detail`.
* @private
* @param {!EventTarget} target The element on which to fire an event.
* @param {string} type The type of event to fire.
* @param {!Object=} detail The detail object to populate on the event.
* @return {void}
*/
function _fire(target, type, detail) {
let ev = new Event(type, { bubbles: true, cancelable: true, composed: true });

@@ -566,2 +692,9 @@ ev.detail = detail;

/**
* Prevents the dispatch and default action of the given event name.
*
* @param {string} evName Event name.
* @return {void}
* @this {Gestures}
*/
export function prevent(evName) {

@@ -574,2 +707,11 @@ let recognizer = _findRecognizerByEvent(evName);

/**
* Reset the 2500ms timeout on processing mouse input after detecting touch input.
*
* Touch inputs create synthesized mouse inputs anywhere from 0 to 2000ms after the touch.
* This method should only be called during testing with simulated touch inputs.
* Calling this method in production may cause duplicate taps or other Gestures.
*
* @return {void}
*/
export function resetMouseCanceller() {

@@ -945,4 +1087,11 @@ if (POINTERSTATE.mouse.mouseIgnoreJob) {

/* eslint-enable valid-jsdoc */
/** @deprecated */
export const findOriginalTarget = _findOriginalTarget;
/** @deprecated */
export const add = addListener;
/** @deprecated */
export const remove = removeListener;

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -29,3 +38,5 @@

} else {
throw new Error(`non-literal value passed to Polymer.htmlLiteral: ${value}`);
throw new Error(
`non-literal value passed to Polymer's htmlLiteral function: ${value}`
);
}

@@ -44,6 +55,41 @@ }

} else {
throw new Error(`non-template value passed to Polymer.html: ${value}`);
throw new Error(
`non-template value passed to Polymer's html function: ${value}`);
}
}
/**
* A template literal tag that creates an HTML <template> element from the
* contents of the string.
*
* This allows you to write a Polymer Template in JavaScript.
*
* Templates can be composed by interpolating `HTMLTemplateElement`s in
* expressions in the JavaScript template literal. The nested template's
* `innerHTML` is included in the containing template. The only other
* values allowed in expressions are those returned from `htmlLiteral`
* which ensures only literal values from JS source ever reach the HTML, to
* guard against XSS risks.
*
* All other values are disallowed in expressions to help prevent XSS
* attacks; however, `htmlLiteral` can be used to compose static
* string values into templates. This is useful to compose strings into
* places that do not accept html, like the css text of a `style`
* element.
*
* Example:
*
* static get template() {
* return html`
* <style>:host{ content:"..." }</style>
* <div class="shadowed">${this.partialTemplate}</div>
* ${super.template}
* `;
* }
* static get partialTemplate() { return html`<span>Partial!</span>`; }
*
* @param {!ITemplateArray} strings Constant parts of tagged template literal
* @param {...*} values Variable parts of tagged template literal
* @return {!HTMLTemplateElement} Constructed HTMLTemplateElement
*/
export const html = function html(strings, ...values) {

@@ -56,2 +102,26 @@ const template = /** @type {!HTMLTemplateElement} */(document.createElement('template'));

/**
* An html literal tag that can be used with `html` to compose.
* a literal string.
*
* Example:
*
* static get template() {
* return html`
* <style>
* :host { display: block; }
* ${this.styleTemplate()}
* </style>
* <div class="shadowed">${staticValue}</div>
* ${super.template}
* `;
* }
* static get styleTemplate() {
* return htmlLiteral`.shadowed { background: gray; }`;
* }
*
* @param {!ITemplateArray} strings Constant parts of tagged template literal
* @param {...*} values Variable parts of tagged template literal
* @return {!LiteralString} Constructed literal string
*/
export const htmlLiteral = function(strings, ...values) {

@@ -58,0 +128,0 @@ return new LiteralString(values.reduce((acc, v, idx) =>

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -13,2 +22,19 @@

/**
* Convenience method for importing an HTML document imperatively.
*
* This method creates a new `<link rel="import">` element with
* the provided URL and appends it to the document to start loading.
* In the `onload` callback, the `import` property of the `link`
* element will contain the imported document contents.
*
* @param {string} href URL to document to load.
* @param {?function(!Event):void=} onload Callback to notify when an import successfully
* loaded.
* @param {?function(!ErrorEvent):void=} onerror Callback to notify when an import
* unsuccessfully loaded.
* @param {boolean=} optAsync True if the import should be loaded `async`.
* Defaults to `false`.
* @return {!HTMLLinkElement} The link element for the URL to be loaded.
*/
export const importHref = function(href, onload, onerror, optAsync) {

@@ -15,0 +41,0 @@ let link = /** @type {HTMLLinkElement} */

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -16,2 +25,13 @@

/* eslint-disable valid-jsdoc */
/**
* Wraps an ES6 class expression mixin such that the mixin is only applied
* if it has not already been applied its base argument. Also memoizes mixin
* applications.
*
* @template T
* @param {T} mixin ES6 class expression mixin to wrap
* @return {T}
* @suppress {invalidCasts}
*/
export const dedupingMixin = function(mixin) {

@@ -47,1 +67,2 @@ let mixinApplications = /** @type {!MixinFunction} */(mixin).__mixinApplications;

};
/* eslint-enable valid-jsdoc */

@@ -0,3 +1,34 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
/**
* Module with utilities for manipulating structured data path strings.
*
* @summary Module with utilities for manipulating structured data path strings.
*/
`TODO(modulizer): A namespace named Polymer.Path was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Returns true if the given string is a structured data path (has dots).
*
* Example:
*
* ```
* isPath('foo.bar.baz') // true
* isPath('foo') // false
* ```
*
* @param {string} path Path string
* @return {boolean} True if the string contained one or more dots
*/
export function isPath(path) {

@@ -7,2 +38,15 @@ return path.indexOf('.') >= 0;

/**
* Returns the root property name for the given path.
*
* Example:
*
* ```
* root('foo.bar.baz') // 'foo'
* root('foo') // 'foo'
* ```
*
* @param {string} path Path string
* @return {string} Root property name
*/
export function root(path) {

@@ -16,2 +60,18 @@ let dotIndex = path.indexOf('.');

/**
* Given `base` is `foo.bar`, `foo` is an ancestor, `foo.bar` is not
* Returns true if the given path is an ancestor of the base path.
*
* Example:
*
* ```
* isAncestor('foo.bar', 'foo') // true
* isAncestor('foo.bar', 'foo.bar') // false
* isAncestor('foo.bar', 'foo.bar.baz') // false
* ```
*
* @param {string} base Path string to test against.
* @param {string} path Path string to test.
* @return {boolean} True if `path` is an ancestor of `base`.
*/
export function isAncestor(base, path) {

@@ -22,2 +82,17 @@ // base.startsWith(path + '.');

/**
* Given `base` is `foo.bar`, `foo.bar.baz` is an descendant
*
* Example:
*
* ```
* isDescendant('foo.bar', 'foo.bar.baz') // true
* isDescendant('foo.bar', 'foo.bar') // false
* isDescendant('foo.bar', 'foo') // false
* ```
*
* @param {string} base Path string to test against.
* @param {string} path Path string to test.
* @return {boolean} True if `path` is a descendant of `base`.
*/
export function isDescendant(base, path) {

@@ -28,2 +103,19 @@ // path.startsWith(base + '.');

/**
* Replaces a previous base path with a new base path, preserving the
* remainder of the path.
*
* User must ensure `path` has a prefix of `base`.
*
* Example:
*
* ```
* translate('foo.bar', 'zot', 'foo.bar.baz') // 'zot.baz'
* ```
*
* @param {string} base Current base string to remove
* @param {string} newBase New base string to replace with
* @param {string} path Path to translate
* @return {string} Translated string
*/
export function translate(base, newBase, path) {

@@ -33,2 +125,8 @@ return newBase + path.slice(base.length);

/**
* @param {string} base Path string to test against
* @param {string} path Path string to test
* @return {boolean} True if `path` is equal to `base`
* @this {Path}
*/
export function matches(base, path) {

@@ -40,2 +138,16 @@ return (base === path) ||

/**
* Converts array-based paths to flattened path. String-based paths
* are returned as-is.
*
* Example:
*
* ```
* normalize(['foo.bar', 0, 'baz']) // 'foo.bar.0.baz'
* normalize('foo.bar.0.baz') // 'foo.bar.0.baz'
* ```
*
* @param {string | !Array<string|number>} path Input path
* @return {string} Flattened path
*/
export function normalize(path) {

@@ -56,2 +168,18 @@ if (Array.isArray(path)) {

/**
* Splits a path into an array of property names. Accepts either arrays
* of path parts or strings.
*
* Example:
*
* ```
* split(['foo.bar', 0, 'baz']) // ['foo', 'bar', '0', 'baz']
* split('foo.bar.0.baz') // ['foo', 'bar', '0', 'baz']
* ```
*
* @param {string | !Array<string|number>} path Input path
* @return {!Array<string>} Array of path parts
* @this {Path}
* @suppress {checkTypes}
*/
export function split(path) {

@@ -64,2 +192,14 @@ if (Array.isArray(path)) {

/**
* Reads a value from a path. If any sub-property in the path is `undefined`,
* this method returns `undefined` (will never throw.
*
* @param {Object} root Object from which to dereference path from
* @param {string | !Array<string|number>} path Path to read
* @param {Object=} info If an object is provided to `info`, the normalized
* (flattened) path will be set to `info.path`.
* @return {*} Value at path, or `undefined` if the path could not be
* fully dereferenced.
* @this {Path}
*/
export function get(root, path, info) {

@@ -82,2 +222,12 @@ let prop = root;

/**
* Sets a value to a path. If any sub-property in the path is `undefined`,
* this method will no-op.
*
* @param {Object} root Object from which to dereference path from
* @param {string | !Array<string|number>} path Path to set
* @param {*} value Value to set to path
* @return {string | undefined} The normalized version of the input path
* @this {Path}
*/
export function set(root, path, value) {

@@ -105,2 +255,18 @@ let prop = root;

/**
* Returns true if the given string is a structured data path (has dots).
*
* This function is deprecated. Use `isPath` instead.
*
* Example:
*
* ```
* isDeep('foo.bar.baz') // true
* isDeep('foo') // false
* ```
*
* @deprecated
* @param {string} path Path string
* @return {boolean} True if the string contained one or more dots
*/
export const isDeep = isPath;

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -53,2 +62,26 @@

/**
* Module for scheduling flushable pre-render and post-render tasks.
*
* @summary Module for scheduling flushable pre-render and post-render tasks.
*/
`TODO(modulizer): A namespace named Polymer.RenderStatus was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Enqueues a callback which will be run before the next render, at
* `requestAnimationFrame` timing.
*
* This method is useful for enqueuing work that requires DOM measurement,
* since measurement may not be reliable in custom element callbacks before
* the first render, as well as for batching measurement tasks in general.
*
* Tasks in this queue may be flushed by calling `flush()`.
*
* @param {*} context Context object the callback function will be bound to
* @param {function(...*):void} callback Callback function
* @param {!Array=} args An array of arguments to call the callback function with
* @return {void}
*/
export function beforeNextRender(context, callback, args) {

@@ -61,2 +94,16 @@ if (!scheduled) {

/**
* Enqueues a callback which will be run after the next render, equivalent
* to one task (`setTimeout`) after the next `requestAnimationFrame`.
*
* This method is useful for tuning the first-render performance of an
* element or application by deferring non-critical work until after the
* first paint. Typical non-render-critical work may include adding UI
* event listeners and aria attributes.
*
* @param {*} context Context object the callback function will be bound to
* @param {function(...*):void} callback Callback function
* @param {!Array=} args An array of arguments to call the callback function with
* @return {void}
*/
export function afterNextRender(context, callback, args) {

@@ -69,2 +116,8 @@ if (!scheduled) {

/**
* Flushes all `beforeNextRender` tasks, followed by all `afterNextRender`
* tasks.
*
* @return {void}
*/
export { flush };

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';

@@ -9,3 +18,3 @@

* Resolves the given URL against the provided `baseUri'.
*
*
* Note that this function performs no resolution for URLs that start

@@ -15,3 +24,2 @@ * with `/` (absolute URLs) or `#` (hash identifiers). For general purpose

*
* @memberof Polymer.ResolveUrl
* @param {string} url Input URL to resolve

@@ -21,3 +29,3 @@ * @param {?string=} baseURI Base URI to resolve the URL against

*/
function resolveUrl(url, baseURI) {
export function resolveUrl(url, baseURI) {
if (url && ABS_URL.test(url)) {

@@ -61,3 +69,2 @@ return url;

*
* @memberof Polymer.ResolveUrl
* @param {string} cssText CSS text to process

@@ -67,3 +74,3 @@ * @param {string} baseURI Base URI to resolve the URL against

*/
function resolveCss(cssText, baseURI) {
export function resolveCss(cssText, baseURI) {
return cssText.replace(CSS_URL_RX, function(m, pre, url, post) {

@@ -80,12 +87,7 @@ return pre + '\'' +

*
* @memberof Polymer.ResolveUrl
* @param {string} url Input URL to transform
* @return {string} resolved path
*/
function pathFromUrl(url) {
export function pathFromUrl(url) {
return url.substring(0, url.lastIndexOf('/') + 1);
}
export { resolveCss };
export { resolveUrl };
export { pathFromUrl };

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
import { pathFromUrl } from './resolve-url.js';

@@ -10,15 +20,18 @@ export const useShadow = !(window.ShadyDOM);

* Globally settable property that is automatically assigned to
* `Polymer.ElementMixin` instances, useful for binding in templates to
* `ElementMixin` instances, useful for binding in templates to
* make URL's relative to an application's root. Defaults to the main
* document URL, but can be overridden by users. It may be useful to set
* `Polymer.rootPath` to provide a stable application mount path when
* `rootPath` to provide a stable application mount path when
* using client side routing.
*
* @memberof Polymer
*/
let rootPath = undefined ||
export let rootPath = undefined ||
pathFromUrl(document.baseURI || window.location.href);
export { rootPath };
/**
* Sets the global rootPath property used by `ElementMixin` and
* available via `rootPath`.
*
* @param {string} path The new root path
* @return {void}
*/
export const setRootPath = function(path) {

@@ -43,8 +56,12 @@ rootPath = path;

* @type {(function(*,string,string,Node):*)|undefined}
* @memberof Polymer
*/
let sanitizeDOMValue = undefined;
export let sanitizeDOMValue = undefined;
export { sanitizeDOMValue };
/**
* Sets the global sanitizeDOMValue available via this module's exported
* `sanitizeDOMValue` variable.
*
* @param {(function(*,string,string,Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback
* @return {void}
*/
export const setSanitizeDOMValue = function(newSanitizeDOMValue) {

@@ -59,11 +76,13 @@ sanitizeDOMValue = newSanitizeDOMValue;

* Defaults to `false` for backwards compatibility.
*/
export let passiveTouchGestures = false;
/**
* Sets `passiveTouchGestures` globally for all elements using Polymer Gestures.
*
* @memberof Polymer
* @param {boolean} usePassive enable or disable passive touch gestures globally
* @return {void}
*/
let passiveTouchGestures = false;
export { passiveTouchGestures };
export const setPassiveTouchGestures = function(usePassive) {
passiveTouchGestures = usePassive;
};

@@ -0,1 +1,10 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { resolveCss } from './resolve-url.js';

@@ -8,3 +17,3 @@

function importModule(moduleId) {
const /** Polymer.DomModule */ PolymerDomModule = customElements.get('dom-module');
const /** DomModule */ PolymerDomModule = customElements.get('dom-module');
if (!PolymerDomModule) {

@@ -31,2 +40,21 @@ return null;

/**
* Module with utilities for collection CSS text from `<templates>`, external
* stylesheets, and `dom-module`s.
*
* @summary Module with utilities for collection CSS text from various sources.
*/
`TODO(modulizer): A namespace named Polymer.StyleGather was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Returns a list of <style> elements in a space-separated list of `dom-module`s.
*
* @function
* @param {string} moduleIds List of dom-module id's within which to
* search for css.
* @return {!Array<!HTMLStyleElement>} Array of contained <style> elements
* @this {StyleGather}
*/
export function stylesFromModules(moduleIds) {

@@ -41,2 +69,12 @@ const modules = moduleIds.trim().split(/\s+/);

/**
* Returns a list of <style> elements in a given `dom-module`.
* Styles in a `dom-module` can come either from `<style>`s within the
* first `<template>`, or else from one or more
* `<link rel="import" type="css">` links outside the template.
*
* @param {string} moduleId dom-module id to gather styles from
* @return {!Array<!HTMLStyleElement>} Array of contained styles.
* @this {StyleGather}
*/
export function stylesFromModule(moduleId) {

@@ -67,2 +105,10 @@ const m = importModule(moduleId);

/**
* Returns the `<style>` elements within a given template.
*
* @param {!HTMLTemplateElement} template Template to gather styles from
* @param {string} baseURI baseURI for style content
* @return {!Array<!HTMLStyleElement>} Array of styles
* @this {StyleGather}
*/
export function stylesFromTemplate(template, baseURI) {

@@ -93,2 +139,9 @@ if (!template._styles) {

/**
* Returns a list of <style> elements from stylesheets loaded via `<link rel="import" type="css">` links within the specified `dom-module`.
*
* @param {string} moduleId Id of `dom-module` to gather CSS from
* @return {!Array<!HTMLStyleElement>} Array of contained styles.
* @this {StyleGather}
*/
export function stylesFromModuleImports(moduleId) {

@@ -99,3 +152,8 @@ let m = importModule(moduleId);

export function _stylesFromModuleImports(module) {
/**
* @this {StyleGather}
* @param {!HTMLElement} module dom-module element that could contain `<link rel="import" type="css">` styles
* @return {!Array<!HTMLStyleElement>} Array of contained styles
*/
function _stylesFromModuleImports(module) {
const styles = [];

@@ -121,2 +179,13 @@ const p$ = module.querySelectorAll(MODULE_STYLE_LINK_SELECTOR);

/**
*
* Returns CSS text of styles in a space-separated list of `dom-module`s.
* Note: This method is deprecated, use `stylesFromModules` instead.
*
* @deprecated
* @param {string} moduleIds List of dom-module id's within which to
* search for css.
* @return {string} Concatenated CSS content from specified `dom-module`s
* @this {StyleGather}
*/
export function cssFromModules(moduleIds) {

@@ -131,2 +200,16 @@ let modules = moduleIds.trim().split(/\s+/);

/**
* Returns CSS text of styles in a given `dom-module`. CSS in a `dom-module`
* can come either from `<style>`s within the first `<template>`, or else
* from one or more `<link rel="import" type="css">` links outside the
* template.
*
* Any `<styles>` processed are removed from their original location.
* Note: This method is deprecated, use `styleFromModule` instead.
*
* @deprecated
* @param {string} moduleId dom-module id to gather styles from
* @return {string} Concatenated CSS content from specified `dom-module`
* @this {StyleGather}
*/
export function cssFromModule(moduleId) {

@@ -151,2 +234,14 @@ let m = importModule(moduleId);

/**
* Returns CSS text of `<styles>` within a given template.
*
* Any `<styles>` processed are removed from their original location.
* Note: This method is deprecated, use `styleFromTemplate` instead.
*
* @deprecated
* @param {!HTMLTemplateElement} template Template to gather styles from
* @param {string} baseURI Base URI to resolve the URL against
* @return {string} Concatenated CSS content from specified template
* @this {StyleGather}
*/
export function cssFromTemplate(template, baseURI) {

@@ -166,2 +261,14 @@ let cssText = '';

/**
* Returns CSS text from stylesheets loaded via `<link rel="import" type="css">`
* links within the specified `dom-module`.
*
* Note: This method is deprecated, use `stylesFromModuleImports` instead.
*
* @deprecated
*
* @param {string} moduleId Id of `dom-module` to gather CSS from
* @return {string} Concatenated CSS content from links in specified `dom-module`
* @this {StyleGather}
*/
export function cssFromModuleImports(moduleId) {

@@ -172,3 +279,9 @@ let m = importModule(moduleId);

export function _cssFromModuleImports(module) {
/**
* @deprecated
* @this {StyleGather}
* @param {!HTMLElement} module dom-module element that could contain `<link rel="import" type="css">` styles
* @return {string} Concatenated CSS content from links in the dom-module
*/
function _cssFromModuleImports(module) {
let cssText = '';

@@ -175,0 +288,0 @@ let styles = _stylesFromModuleImports(module);

@@ -0,2 +1,12 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './boot.js';
import { PropertyEffects } from '../mixins/property-effects.js';

@@ -52,3 +62,3 @@ import { MutableData } from '../mixins/mutable-data.js';

* @customElement
* @appliesMixin Polymer.PropertyEffects
* @appliesMixin PropertyEffects
* @unrestricted

@@ -370,2 +380,120 @@ */

/**
* Module for preparing and stamping instances of templates that utilize
* Polymer's data-binding and declarative event listener features.
*
* Example:
*
* // Get a template from somewhere, e.g. light DOM
* let template = this.querySelector('template');
* // Prepare the template
* let TemplateClass = Templatize.templatize(template);
* // Instance the template with an initial data model
* let instance = new TemplateClass({myProp: 'initial'});
* // Insert the instance's DOM somewhere, e.g. element's shadow DOM
* this.shadowRoot.appendChild(instance.root);
* // Changing a property on the instance will propagate to bindings
* // in the template
* instance.myProp = 'new value';
*
* The `options` dictionary passed to `templatize` allows for customizing
* features of the generated template class, including how outer-scope host
* properties should be forwarded into template instances, how any instance
* properties added into the template's scope should be notified out to
* the host, and whether the instance should be decorated as a "parent model"
* of any event handlers.
*
* // Customize property forwarding and event model decoration
* let TemplateClass = Templatize.templatize(template, this, {
* parentModel: true,
* forwardHostProp(property, value) {...},
* instanceProps: {...},
* notifyInstanceProp(instance, property, value) {...},
* });
*
* @summary Module for preparing and stamping instances of templates
* utilizing Polymer templating features.
*/
`TODO(modulizer): A namespace named Polymer.Templatize was
declared here. The surrounding comments should be reviewed,
and this string can then be deleted`;
/**
* Returns an anonymous `PropertyEffects` class bound to the
* `<template>` provided. Instancing the class will result in the
* template being stamped into a document fragment stored as the instance's
* `root` property, after which it can be appended to the DOM.
*
* Templates may utilize all Polymer data-binding features as well as
* declarative event listeners. Event listeners and inline computing
* functions in the template will be called on the host of the template.
*
* The constructor returned takes a single argument dictionary of initial
* property values to propagate into template bindings. Additionally
* host properties can be forwarded in, and instance properties can be
* notified out by providing optional callbacks in the `options` dictionary.
*
* Valid configuration in `options` are as follows:
*
* - `forwardHostProp(property, value)`: Called when a property referenced
* in the template changed on the template's host. As this library does
* not retain references to templates instanced by the user, it is the
* templatize owner's responsibility to forward host property changes into
* user-stamped instances. The `instance.forwardHostProp(property, value)`
* method on the generated class should be called to forward host
* properties into the template to prevent unnecessary property-changed
* notifications. Any properties referenced in the template that are not
* defined in `instanceProps` will be notified up to the template's host
* automatically.
* - `instanceProps`: Dictionary of property names that will be added
* to the instance by the templatize owner. These properties shadow any
* host properties, and changes within the template to these properties
* will result in `notifyInstanceProp` being called.
* - `mutableData`: When `true`, the generated class will skip strict
* dirty-checking for objects and arrays (always consider them to be
* "dirty").
* - `notifyInstanceProp(instance, property, value)`: Called when
* an instance property changes. Users may choose to call `notifyPath`
* on e.g. the owner to notify the change.
* - `parentModel`: When `true`, events handled by declarative event listeners
* (`on-event="handler"`) will be decorated with a `model` property pointing
* to the template instance that stamped it. It will also be returned
* from `instance.parentModel` in cases where template instance nesting
* causes an inner model to shadow an outer model.
*
* All callbacks are called bound to the `owner`. Any context
* needed for the callbacks (such as references to `instances` stamped)
* should be stored on the `owner` such that they can be retrieved via
* `this`.
*
* When `options.forwardHostProp` is declared as an option, any properties
* referenced in the template will be automatically forwarded from the host of
* the `<template>` to instances, with the exception of any properties listed in
* the `options.instanceProps` object. `instanceProps` are assumed to be
* managed by the owner of the instances, either passed into the constructor
* or set after the fact. Note, any properties passed into the constructor will
* always be set to the instance (regardless of whether they would normally
* be forwarded from the host).
*
* Note that `templatize()` can be run only once for a given `<template>`.
* Further calls will result in an error. Also, there is a special
* behavior if the template was duplicated through a mechanism such as
* `<dom-repeat>` or `<test-fixture>`. In this case, all calls to
* `templatize()` return the same class for all duplicates of a template.
* The class returned from `templatize()` is generated only once using
* the `options` from the first call. This means that any `options`
* provided to subsequent calls will be ignored. Therefore, it is very
* important not to close over any variables inside the callbacks. Also,
* arrow functions must be avoided because they bind the outer `this`.
* Inside the callbacks, any contextual information can be accessed
* through `this`, which points to the `owner`.
*
* @param {!HTMLTemplateElement} template Template to templatize
* @param {Polymer_PropertyEffects=} owner Owner of the template instances;
* any optional callbacks will be bound to this owner.
* @param {Object=} options Options dictionary (see summary for details)
* @return {function(new:TemplateInstanceBase)} Generated class bound to the template
* provided
* @suppress {invalidCasts}
*/
export function templatize(template, owner, options) {

@@ -399,2 +527,22 @@ options = /** @type {!TemplatizeOptions} */(options || {});

/**
* Returns the template "model" associated with a given element, which
* serves as the binding scope for the template instance the element is
* contained in. A template model is an instance of
* `TemplateInstanceBase`, and should be used to manipulate data
* associated with this template instance.
*
* Example:
*
* let model = modelForElement(el);
* if (model.index < 10) {
* model.set('item.checked', true);
* }
*
* @param {HTMLTemplateElement} template The model will be returned for
* elements stamped from this template
* @param {Node=} node Node for which to return a template model.
* @return {TemplateInstanceBase} Template instance representing the
* binding scope for the element
*/
export function modelForElement(template, node) {

@@ -401,0 +549,0 @@ let model;

@@ -0,1 +1,11 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
function resolve() {

@@ -2,0 +12,0 @@ document.body.removeAttribute('unresolved');

{
"name": "@polymer/polymer",
"version": "3.0.0-pre.13",
"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",
"repository": {
"type": "git",
"url": "https://github.com/Polymer/polymer.git"
},
"homepage": "https://github.com/Polymer/polymer",
"name": "@polymer/polymer",
"version": "3.0.0-pre.12",
"main": "polymer.js",
"main": "polymer-element.js",
"directories": {

@@ -18,4 +13,5 @@ "doc": "docs",

"@polymer/gen-typescript-declarations": "^1.2.0",
"@webcomponents/shadycss": "^1.1.0",
"@webcomponents/webcomponentsjs": "^1.1.0",
"@polymer/iron-component-page": "3.0.0-pre.12",
"@polymer/test-fixture": "3.0.0-pre.12",
"@webcomponents/webcomponentsjs": "^2.0.0-0",
"babel-preset-minify": "^0.2.0",

@@ -40,6 +36,4 @@ "del": "^3.0.0",

"through2": "^2.0.0",
"web-component-tester": "^6.5.0",
"wct-browser-legacy": "0.0.1-pre.11",
"@polymer/test-fixture": "3.0.0-pre.12",
"@polymer/iron-component-page": "3.0.0-pre.12"
"web-component-tester": "^6.6.0-pre.5"
},

@@ -50,5 +44,8 @@ "scripts": {

"lint": "gulp lint",
"version": "gulp update-version && git add lib/utils/boot.html",
"update-types": "gulp update-types"
},
"repository": {
"type": "git",
"url": "https://github.com/Polymer/polymer.git"
},
"author": "The Polymer Project Authors",

@@ -59,2 +56,3 @@ "license": "BSD-3-Clause",

},
"homepage": "https://github.com/Polymer/polymer",
"publishConfig": {

@@ -70,5 +68,4 @@ "access": "public"

"dependencies": {
"@webcomponents/shadycss": "^1.0.0",
"@webcomponents/webcomponentsjs": "^1.0.0"
"@webcomponents/shadycss": "^1.2.0-0"
}
}

@@ -0,3 +1,13 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { ElementMixin } from './lib/mixins/element-mixin.js';
import { html as html$0 } from './lib/utils/html-tag.js';
export { html } from './lib/utils/html-tag.js';

@@ -11,7 +21,6 @@ /**

* @polymer
* @memberof Polymer
* @constructor
* @implements {Polymer_ElementMixin}
* @extends HTMLElement
* @appliesMixin Polymer.ElementMixin
* @appliesMixin ElementMixin
* @summary Custom element base class that provides the core API for Polymer's

@@ -21,4 +30,3 @@ * key meta-programming features including template stamping, data-binding,

*/
const Element = ElementMixin(HTMLElement);
export { Element as PolymerElement };
export { html$0 as html };
export const PolymerElement = ElementMixin(HTMLElement);

@@ -0,3 +1,14 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { LegacyElementMixin } from './lib/legacy/legacy-element-mixin.js';
import './lib/legacy/polymer-fn.js';
export { Polymer } from './lib/legacy/polymer-fn.js';
/* template elements */
import './lib/legacy/templatizer-behavior.js';

@@ -8,6 +19,10 @@ import './lib/elements/dom-bind.js';

import './lib/elements/array-selector.js';
/* custom-style */
import './lib/elements/custom-style.js';
/* bc behaviors */
import './lib/legacy/mutable-data-behavior.js';
import { html as html$0 } from './lib/utils/html-tag.js';
/* import html-tag to export html */
export { html } from './lib/utils/html-tag.js';
// bc
export const Base = LegacyElementMixin(HTMLElement).prototype;
export { html$0 as html };

@@ -1,2 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
/**

@@ -11,2 +10,4 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
Polymer({

@@ -13,0 +14,0 @@ is: 'observe-el',

@@ -1,3 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -12,2 +10,5 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
let PropertyTypeBehavior = {

@@ -14,0 +15,0 @@ properties: {

@@ -0,3 +1,13 @@

/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import './sub/style-import.js';
const $_documentContainer = document.createElement('div');
const $_documentContainer = document.createElement('template');
$_documentContainer.setAttribute('style', 'display: none;');

@@ -35,13 +45,2 @@

document.head.appendChild($_documentContainer);
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
;
document.head.appendChild($_documentContainer.content);

@@ -1,3 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -12,2 +10,5 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
Polymer({

@@ -14,0 +15,0 @@ is: 'x-basic',

@@ -1,2 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
/**

@@ -11,2 +10,4 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
Polymer({

@@ -13,0 +14,0 @@ is: 'x-needs-host',

@@ -1,3 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -12,2 +10,5 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
Polymer({

@@ -14,0 +15,0 @@ _template: html`

@@ -1,4 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { MutableData } from '../../lib/mixins/mutable-data.js';
/**

@@ -13,2 +10,6 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { MutableData } from '../../lib/mixins/mutable-data.js';
window.getData = () => [

@@ -15,0 +16,0 @@ {

@@ -1,5 +0,1 @@

import '../../../polymer-legacy.js';
import { Polymer } from '../../../lib/legacy/polymer-fn.js';
import { html } from '../../../lib/utils/html-tag.js';
import { dom } from '../../../lib/legacy/polymer.dom.js';
/**

@@ -14,2 +10,7 @@ @license

*/
import '../../../polymer-legacy.js';
import { Polymer } from '../../../lib/legacy/polymer-fn.js';
import { html } from '../../../lib/utils/html-tag.js';
import { dom } from '../../../lib/legacy/polymer.dom.js';
Polymer({

@@ -16,0 +17,0 @@ _template: html`

@@ -1,4 +0,1 @@

import '../../../polymer-legacy.js';
import { Polymer } from '../../../lib/legacy/polymer-fn.js';
import { html } from '../../../lib/utils/html-tag.js';
/**

@@ -13,2 +10,6 @@ @license

*/
import '../../../polymer-legacy.js';
import { Polymer } from '../../../lib/legacy/polymer-fn.js';
import { html } from '../../../lib/utils/html-tag.js';
Polymer({

@@ -15,0 +16,0 @@ _template: html`

@@ -1,4 +0,1 @@

import { Base } from '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -13,2 +10,6 @@ @license

*/
import { Base } from '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
var EventLoggerImpl = {

@@ -15,0 +16,0 @@ created: function() {

@@ -1,6 +0,1 @@

import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { PolymerElement } from '../../polymer-element.js';
import { GestureEventListeners } from '../../lib/mixins/gesture-event-listeners.js';
/**

@@ -15,2 +10,7 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { PolymerElement } from '../../polymer-element.js';
import { GestureEventListeners } from '../../lib/mixins/gesture-event-listeners.js';
Polymer({

@@ -17,0 +17,0 @@ _template: html`

@@ -1,4 +0,1 @@

import { PropertiesMixin } from '../../lib/mixins/properties-mixin.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -13,2 +10,6 @@ @license

*/
import { PropertiesMixin } from '../../lib/mixins/properties-mixin.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
class XPropertiesElement extends PropertiesMixin(HTMLElement) {

@@ -15,0 +16,0 @@ static get properties() {

@@ -1,5 +0,1 @@

import { PolymerElement } from '../../polymer-element.js';
import '@webcomponents/shadycss/entrypoints/apply-shim.js';
import '../../lib/elements/custom-style.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -14,2 +10,7 @@ @license

*/
import { PolymerElement } from '../../polymer-element.js';
import '@webcomponents/shadycss/entrypoints/apply-shim.js';
import '../../lib/elements/custom-style.js';
import { html } from '../../lib/utils/html-tag.js';
class ApplyElement extends PolymerElement {

@@ -16,0 +17,0 @@ static get template() {

@@ -1,7 +0,1 @@

import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { PolymerElement } from '../../polymer-element.js';
import { MutableDataBehavior } from '../../lib/legacy/mutable-data-behavior.js';
import { MutableData } from '../../lib/mixins/mutable-data.js';
/**

@@ -16,2 +10,9 @@ @license

*/
import { StrictBindingParser } from '../../lib/mixins/strict-binding-parser.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { html } from '../../lib/utils/html-tag.js';
import { PolymerElement } from '../../polymer-element.js';
import { MutableDataBehavior } from '../../lib/legacy/mutable-data-behavior.js';
import { MutableData } from '../../lib/mixins/mutable-data.js';
let ComputingBehavior = {

@@ -30,3 +31,3 @@ properties: {

value, add, divide)}}" neg-computed-inline="{{!computeInline(value,add,divide)}}" computed-negative-number="{{computeNegativeNumber(-1)}}" computed-negative-literal="{{computeNegativeNumber(-A)}}" computed-wildcard="{{computeWildcard(a, b.*)}}" style\$="{{boundStyle}}" data-id\$="{{dataSetId}}" custom-event-value="{{customEventValue::custom}}" custom-event-object-value="{{customEventObject.value::change}}" computed-from-mixed-literals="{{computeFromLiterals(3, &quot;foo&quot;, bool)}}" computed-from-pure-literals="{{computeFromLiterals( 3, &quot;foo&quot;)}}" computed-from-tricky-function="{{\$computeTrickyFunctionFromLiterals( 3, &quot;foo&quot;)}}" computed-from-tricky-literals="{{computeFromTrickyLiterals(3, 'tricky\\,\\'zot\\'')}}" computed-from-tricky-literals2="{{computeFromTrickyLiterals(3,&quot;tricky\\,'zot'&quot; )}}" computed-from-tricky-literals3="{{computeFromTrickyLiterals(3,
&quot;tricky\\,'zot'&quot; )}}" computed-from-no-args="{{computeFromNoArgs( )}}" no-computed="{{foobared(noInlineComputed)}}" compoundattr1\$="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literalComputed')}}" compoundattr2\$="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literalComputed')}} literal4" compoundattr3\$="[yes/no]: {{cpnd1}}, {{computeCompound('world', 'username ', 'Hello {0} ')}}" computed-from-behavior="{{computeFromBehavior(value)}}">
&quot;tricky\\,'zot'&quot; )}}" computed-from-no-args="{{computeFromNoArgs( )}}" no-computed="{{foobared(noInlineComputed)}}" compoundattr1\$="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literalComputed')}}" compoundattr2\$="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literalComputed')}} literal4" compoundattr3\$="[yes/no]: {{cpnd1}}, {{computeCompound('world', 'username ', 'Hello {0} ')}}" computed-from-behavior="{{computeFromBehavior(value)}}" computed-dynamic-fn="{{dynamicFn('hello', 'username')}}">
Test

@@ -58,3 +59,3 @@ <!-- Malformed bindings to be ignored -->

/* eslint-enable no-unused-vars */
&lt;/script>
</script>
<style id="styleWithBinding">

@@ -65,2 +66,7 @@ :host {

</style>
<span id="boundWithSlash">[[objectWithSlash.binding/with/slash]]</span>
<span id="jsonContent">[["Jan", 31],["Feb", 28],["Mar", 31]]</span>
<span id="nonEnglishUnicode">{{objectWithNonEnglishUnicode.商品名}}</span>
<span id="booleanTrue">foo(field, true): {{computeWithBoolean(otherValue, true)}}</span>
<span id="booleanFalse">foo(field, false): {{computeWithBoolean(otherValue, false)}}</span>
`,

@@ -152,2 +158,5 @@

observer: 'titleChanged'
},
dynamicFn: {
type: Function
}

@@ -176,2 +185,3 @@ },

this.titleChanged = sinon.spy();
this._dynamicFnCalled = false;
},

@@ -320,2 +330,6 @@

computeWithBoolean: function(value, bool) {
return bool ? value : value * 2;
},
fireCustomNotifyingEvent: function() {

@@ -325,4 +339,11 @@ this.customNotifyingValue = 'changed!';

{value: this.customNotifyingValue});
}
},
dynamicFn: function() {}
});
class XBasicWithStrictBindingParser extends StrictBindingParser(customElements.get('x-basic')) {
static get is() { return 'x-basic-strict-binding-parser'; }
}
customElements.define(XBasicWithStrictBindingParser.is, XBasicWithStrictBindingParser);
Polymer({

@@ -670,2 +691,10 @@ _template: html`

});
var TranslateBehavior = {
properties: {
translateMessage: {
type: Function,
computed: '_computeTranslateFn(translator)'
}
}
};
Polymer({

@@ -696,10 +725,2 @@ _template: html`

});
var TranslateBehavior = {
properties: {
translateMessage: {
type: Function,
computed: '_computeTranslateFn(translator)'
}
}
};
Polymer({

@@ -979,2 +1000,24 @@ _template: html`

});
class SuperObserverElement extends PolymerElement {
static get is() { return 'super-observer-element'; }
static get properties() {
return {
prop: {
value: 'String',
observer() {
this.__observerCalled++;
}
}
};
}
}
SuperObserverElement.prototype.__observerCalled = 0;
customElements.define(SuperObserverElement.is, SuperObserverElement);
class SubObserverElement extends SuperObserverElement {
static get is() { return 'sub-observer-element'; }
}
customElements.define(SubObserverElement.is, SubObserverElement);
class SVGElement extends PolymerElement {

@@ -981,0 +1024,0 @@ static get template() {

@@ -1,6 +0,15 @@

const $_documentContainer = document.createElement('div');
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
const $_documentContainer = document.createElement('template');
$_documentContainer.setAttribute('style', 'display: none;');
$_documentContainer.innerHTML = `<dom-module id="global-shared1">
<template>

@@ -25,16 +34,4 @@ <style shady-unscoped="">

</dom-module><dom-module id="global-shared2">
</dom-module>`;
document.head.appendChild($_documentContainer);
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
;
document.head.appendChild($_documentContainer.content);

@@ -1,2 +0,12 @@

const $_documentContainer = document.createElement('div');
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
const $_documentContainer = document.createElement('template');
$_documentContainer.setAttribute('style', 'display: none;');

@@ -10,4 +20,4 @@

</style>
<template>

@@ -22,13 +32,2 @@ <style>

document.head.appendChild($_documentContainer);
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
;
document.head.appendChild($_documentContainer.content);

@@ -1,7 +0,1 @@

import { html } from '../../../lib/utils/html-tag.js';
import { PolymerElement } from '../../../polymer-element.js';
const $_documentContainer = document.createElement('div');
$_documentContainer.setAttribute('style', 'display: none;');
$_documentContainer.innerHTML = `<dom-module id="p-r-ap" assetpath="../../assets/"></dom-module>`;
document.head.appendChild($_documentContainer);
/**

@@ -16,2 +10,15 @@ @license

*/
import { html } from '../../../lib/utils/html-tag.js';
import { PolymerElement } from '../../../polymer-element.js';
import { DomModule } from '../../../lib/elements/dom-module.js';
import { Polymer } from '../../../lib/legacy/polymer-fn.js';
import { pathFromUrl } from '../../../lib/utils/resolve-url.js';
const $_documentContainer = document.createElement('template');
$_documentContainer.setAttribute('style', 'display: none;');
const baseAssetPath = pathFromUrl(import.meta.url);
$_documentContainer.innerHTML = `<dom-module id="p-r-ap" assetpath="${baseAssetPath}../../assets/"></dom-module>`;
document.head.appendChild($_documentContainer.content);
class PR extends PolymerElement {

@@ -43,6 +50,15 @@ static get template() {

}
static get is() { return 'p-r'; }
static get importMeta() {
return import.meta;
}
}
customElements.define(PR.is, PR);
const PRHybrid = Polymer({
is: 'p-r-hybrid',
_template: PR.template,
importMeta: import.meta
});
class PRAp extends PolymerElement {

@@ -49,0 +65,0 @@ static get is() { return 'p-r-ap'; }

@@ -1,5 +0,7 @@

const $_documentContainer = document.createElement('div');
import { pathFromUrl } from '../../../lib/utils/resolve-url.js';
const $_documentContainer = document.createElement('template');
$_documentContainer.setAttribute('style', 'display: none;');
$_documentContainer.innerHTML = `<dom-module id="style-import">
const baseAssetPath = pathFromUrl(import.meta.url);
$_documentContainer.innerHTML = `<dom-module id="style-import" assetpath="${baseAssetPath}">
<template>

@@ -14,3 +16,3 @@ <style>

</template>
</dom-module><dom-module id="style-import2">
</dom-module><dom-module id="style-import2" assetpath="${baseAssetPath}">
<template>

@@ -25,2 +27,2 @@ <style>

document.head.appendChild($_documentContainer);
document.head.appendChild($_documentContainer.content);

@@ -1,6 +0,1 @@

import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { templatize as templatize$0 } from '../../lib/utils/templatize.js';
import { Templatizer } from '../../lib/legacy/templatizer-behavior.js';
import { html } from '../../lib/utils/html-tag.js';
/**

@@ -15,2 +10,8 @@ @license

*/
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { templatize as templatize$0 } from '../../lib/utils/templatize.js';
import { Templatizer } from '../../lib/legacy/templatizer-behavior.js';
import { html } from '../../lib/utils/html-tag.js';
Polymer({

@@ -177,4 +178,4 @@ is: 'x-child',

</template>
</x-templatize-behavior>

@@ -181,0 +182,0 @@ `,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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 too big to display

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc