lit-element
Advanced tools
+10
-4
@@ -20,2 +20,8 @@ # Change Log | ||
| ## [2.5.0] - 2021-05-05 | ||
| ### Fixed | ||
| * Fixed an issue that was causing VS Code to mark `@state()` as deprecated ([#1192](https://github.com/lit/lit-element/pull/1192)). | ||
| ## [2.5.0] - 2021-04-29 | ||
@@ -25,11 +31,11 @@ | ||
| * Added the `@state()` decorator as an alias for `@internalProperty()`, and deprecated `@internalProperty()` which will be renamed to `@state` in lit-element 3.0. [#1162](https://github.com/Polymer/lit-element/issues/1162). | ||
| * Added the `@state()` decorator as an alias for `@internalProperty()`, and deprecated `@internalProperty()` which will be renamed to `@state` in lit-element 3.0 ([#1162](https://github.com/Polymer/lit-element/issues/1162)). | ||
| * Added `UpdatingElement.prototype.getUpdateComplete()` and deprecated `_getUpdateComplete()` for forward compibility with lit-element 3.0. | ||
| ### Added | ||
| * Adds a `static shadowRootOptions` property for specifying shadow root options. This is a slightly simpler alternative to implementing a custom `createRenderRoot` method [#1147](https://github.com/Polymer/lit-element/issues/1147). | ||
| * Adds an export of `UpdatingElement` as `ReactiveElement` for forward-compatibility with lit-element 3.0 [#1177](https://github.com/Polymer/lit-element/issues/1177). | ||
| * Adds a `static shadowRootOptions` property for specifying shadow root options. This is a slightly simpler alternative to implementing a custom `createRenderRoot` method ([#1147](https://github.com/Polymer/lit-element/issues/1147)). | ||
| * Adds an export of `UpdatingElement` as `ReactiveElement` for forward-compatibility with lit-element 3.0 ([#1177](https://github.com/Polymer/lit-element/issues/1177)). | ||
| ### Fixed | ||
| * Fixes an issue with `queryAssignedNodes` when applying a selector on a slot that included text nodes on older browsers not supporting Element.matches [#1088](https://github.com/Polymer/lit-element/issues/1088). | ||
| * Fixes an issue with `queryAssignedNodes` when applying a selector on a slot that included text nodes on older browsers not supporting Element.matches ([#1088](https://github.com/Polymer/lit-element/issues/1088)). | ||
@@ -36,0 +42,0 @@ ## [2.4.0] - 2020-08-19 |
@@ -80,6 +80,6 @@ /** | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| * @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0. | ||
| * Please update to `state` now to be compatible with 3.0. | ||
| * @deprecated `internalProperty` has been renamed to `state` in lit-element | ||
| * 3.0. Please update to `state` now to be compatible with 3.0. | ||
| */ | ||
@@ -93,6 +93,6 @@ export declare function internalProperty(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any; | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| */ | ||
| export declare const state: typeof internalProperty; | ||
| export declare const state: (options?: InternalPropertyDeclaration<unknown> | undefined) => (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any; | ||
| /** | ||
@@ -99,0 +99,0 @@ * A property decorator that converts a class property into a getter that |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/lib/decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH,OAAO,EAAC,mBAAmB,EAAkB,MAAM,uBAAuB,CAAC;AAE3E,oBAAY,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;CACxB,CAAC;AAGF,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;CACrE;AAGD,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,GAAC,QAAQ,CAAC;IACvB,GAAG,EAAE,WAAW,CAAC;IACjB,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M,GAAC,YAAY,qCAEjB,GAAG,CAwBjC"} |
@@ -125,6 +125,6 @@ /** | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| * @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0. | ||
| * Please update to `state` now to be compatible with 3.0. | ||
| * @deprecated `internalProperty` has been renamed to `state` in lit-element | ||
| * 3.0. Please update to `state` now to be compatible with 3.0. | ||
| */ | ||
@@ -140,6 +140,6 @@ export function internalProperty(options) { | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| */ | ||
| export const state = internalProperty; | ||
| export const state = (options) => internalProperty(options); | ||
| /** | ||
@@ -146,0 +146,0 @@ * A property decorator that converts a class property into a getter that |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/lib/decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoCH,MAAM,mBAAmB,GACrB,CAAC,OAAe,EAAE,KAA+B,EAAE,EAAE;IACnD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,sEAAsE;IACtE,wDAAwD;IACxD,8CAA8C;IAC9C,sEAAsE;IACtE,+BAA+B;IAC/B,kCAAkC;IAClC,OAAO,KAAY,CAAC;AACtB,CAAC,CAAC;AAEN,MAAM,qBAAqB,GACvB,CAAC,OAAe,EAAE,UAA2B,EAAE,EAAE;IAC/C,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,UAAU,CAAC;IACpC,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,oEAAoE;QACpE,QAAQ,CAAC,KAA+B;YACtC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAA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AC,aAAa,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;gBACvE,IAAI,KAAK,IAAI,QAAQ,EAAE;oBACrB,KAAK,GAAG,KAAK,CAAC,MAAM,CAChB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;wBACzC,sEAAsE;wBACtE,CAAE,IAAY,CAAC,OAAO,CAAC,CAAC;4BAClB,IAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;4BACrC,aAAa,CAAC,IAAI,CAAC,IAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;iBAC9D;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC;QACF,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;YACzB,WAAW,CAAC,UAAU,EAAE,iBAA2B,EAAE,IAAI,CAAC,CAAC,CAAC;YAC5D,aAAa,CAAC,UAAU,EAAE,iBAAiC,CAAC,CAAC;IACnE,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {LitElement} from '../lit-element.js';\n\nimport {PropertyDeclaration, UpdatingElement} from './updating-element.js';\n\nexport type Constructor<T> = {\n // tslint:disable-next-line:no-any\n new (...args: any[]): T\n};\n\n// From the TC39 Decorators proposal\ninterface ClassDescriptor {\n kind: 'class';\n elements: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;\n}\n\n// From the TC39 Decorators proposal\ninterface ClassElement {\n kind: 'field'|'method';\n key: PropertyKey;\n placement: 'static'|'prototype'|'own';\n initializer?: Function;\n extras?: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;\n descriptor?: PropertyDescriptor;\n}\n\nconst legacyCustomElement =\n (tagName: string, clazz: Constructor<HTMLElement>) => {\n window.customElements.define(tagName, clazz);\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // tslint:disable-next-line:no-any\n return clazz as any;\n };\n\nconst standardCustomElement =\n (tagName: string, descriptor: ClassDescriptor) => {\n const {kind, elements} = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n window.customElements.define(tagName, clazz);\n }\n };\n };\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```\n * @customElement('my-element')\n * class MyElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The name of the custom element to define.\n */\nexport const customElement = (tagName: string) =>\n (classOrDescriptor: Constructor<HTMLElement>|ClassDescriptor) =>\n (typeof classOrDescriptor === 'function') ?\n legacyCustomElement(tagName, classOrDescriptor) :\n standardCustomElement(tagName, classOrDescriptor);\n\nconst standardProperty =\n (options: PropertyDeclaration, element: ClassElement) => {\n // When decorating an accessor, pass it through and add property metadata.\n // Note, the `hasOwnProperty` check in `createProperty` ensures we don't\n // stomp over the user's accessor.\n if (element.kind === 'method' && element.descriptor &&\n !('value' in element.descriptor)) {\n return {\n ...element,\n finisher(clazz: typeof UpdatingElement) {\n clazz.createProperty(element.key, options);\n }\n };\n } else {\n // createProperty() takes care of defining the property, but we still\n // must return some kind of descriptor, so return a descriptor for an\n // unused prototype field. The finisher calls createProperty().\n return {\n kind: 'field',\n key: Symbol(),\n placement: 'own',\n descriptor: {},\n // When @babel/plugin-proposal-decorators implements initializers,\n // do this instead of the initializer below. See:\n // https://github.com/babel/babel/issues/9260 extras: [\n // {\n // kind: 'initializer',\n // placement: 'own',\n // initializer: descriptor.initializer,\n // }\n // ],\n initializer(this: {[key: string]: unknown}) {\n if (typeof element.initializer === 'function') {\n this[element.key as string] = element.initializer.call(this);\n }\n },\n finisher(clazz: typeof UpdatingElement) {\n clazz.createProperty(element.key, options);\n }\n };\n }\n };\n\nconst legacyProperty =\n (options: PropertyDeclaration, proto: Object, name: PropertyKey) => {\n (proto.constructor as typeof UpdatingElement)\n .createProperty(name, options);\n };\n\n/**\n * A property decorator which creates a LitElement property which reflects a\n * corresponding attribute value. A [[`PropertyDeclaration`]] may optionally be\n * supplied to configure property features.\n *\n * This decorator should only be used for public fields. Private or protected\n * fields should use the [[`internalProperty`]] decorator.\n *\n * @example\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration) {\n // tslint:disable-next-line:no-any decorator\n return (protoOrDescriptor: Object|ClassElement, name?: PropertyKey): any =>\n (name !== undefined) ?\n legacyProperty(options!, protoOrDescriptor as Object, name) :\n standardProperty(options!, protoOrDescriptor as ClassElement);\n}\n\nexport interface InternalPropertyDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * Declares a private or protected property that still triggers updates to the\n * element when it changes.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n * @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.\n * Please update to `state` now to be compatible with 3.0.\n */\nexport function internalProperty(options?: InternalPropertyDeclaration) {\n return property({attribute: false, hasChanged: options?.hasChanged});\n}\n\n/**\n * Declares a private or protected property that still triggers updates to the\n * element when it changes.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport const state = internalProperty;\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n if (cache) {\n const prop =\n name !== undefined ? name : (protoOrDescriptor as ClassElement).key;\n const key = typeof prop === 'symbol' ? Symbol() : `__${prop}`;\n descriptor.get = function(this: LitElement) {\n if ((this as unknown as\n {[key: string]: Element | null})[key as string] === undefined) {\n ((this as unknown as {[key: string]: Element | null})[key as string] =\n this.renderRoot.querySelector(selector));\n }\n return (\n this as unknown as {[key: string]: Element | null})[key as string];\n };\n }\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector: string) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n async get(this: LitElement) {\n await this.updateComplete;\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector: string) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n return this.renderRoot.querySelectorAll(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\nconst legacyQuery =\n (descriptor: PropertyDescriptor, proto: Object, name: PropertyKey) => {\n Object.defineProperty(proto, name, descriptor);\n };\n\nconst standardQuery = (descriptor: PropertyDescriptor, element: ClassElement) =>\n ({\n kind: 'method',\n placement: 'prototype',\n key: element.key,\n descriptor,\n });\n\nconst standardEventOptions =\n (options: AddEventListenerOptions, element: ClassElement) => {\n return {\n ...element,\n finisher(clazz: typeof UpdatingElement) {\n Object.assign(\n clazz.prototype[element.key as keyof UpdatingElement], options);\n }\n };\n };\n\nconst legacyEventOptions =\n // tslint:disable-next-line:no-any legacy decorator\n (options: AddEventListenerOptions, proto: any, name: PropertyKey) => {\n Object.assign(proto[name], options);\n };\n\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * @example\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}`>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options: AddEventListenerOptions) {\n // Return value typed as any to prevent TypeScript from complaining that\n // standard decorator function signature does not match TypeScript decorator\n // signature\n // TODO(kschaaf): unclear why it was only failing on this decorator and not\n // the others\n return ((protoOrDescriptor: Object|ClassElement, name?: string) =>\n (name !== undefined) ?\n legacyEventOptions(options, protoOrDescriptor as Object, name) :\n standardEventOptions(\n options, protoOrDescriptor as ClassElement)) as\n // tslint:disable-next-line:no-any decorator\n any;\n}\n\n// x-browser support for matches\n// tslint:disable-next-line:no-any\nconst ElementProto = Element.prototype as any;\nconst legacyMatches =\n ElementProto.msMatchesSelector || ElementProto.webkitMatchesSelector;\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given named `slot`. Note, the type of\n * this property should be annotated as `NodeListOf<HTMLElement>`.\n *\n * @param slotName A string name of the slot.\n * @param flatten A boolean which when true flattens the assigned nodes,\n * meaning any assigned nodes that are slot elements are replaced with their\n * assigned nodes.\n * @param selector A string which filters the results to elements that match\n * the given css selector.\n *\n * * @example\n * ```ts\n * class MyElement {\n * @queryAssignedNodes('list', true, '.item')\n * listItems;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAssignedNodes(\n slotName = '', flatten = false, selector = '') {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n const slotSelector =\n `slot${slotName ? `[name=${slotName}]` : ':not([name])'}`;\n const slot = this.renderRoot.querySelector(slotSelector);\n let nodes = slot && (slot as HTMLSlotElement).assignedNodes({flatten});\n if (nodes && selector) {\n nodes = nodes.filter(\n (node) => node.nodeType === Node.ELEMENT_NODE &&\n // tslint:disable-next-line:no-any testing existence on older browsers\n ((node as any).matches ?\n (node as Element).matches(selector) :\n legacyMatches.call(node as Element, selector)));\n }\n return nodes;\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n"]} | ||
| {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/lib/decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoCH,MAAM,mBAAmB,GACrB,CAAC,OAAe,EAAE,KAA+B,EAAE,EAAE;IACnD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,sEAAsE;IACtE,wDAAwD;IACxD,8CAA8C;IAC9C,sEAAsE;IACtE,+BAA+B;IAC/B,kCAAkC;IACl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,GAAG,EAAE;IAC/C,OAAO,CAAC,iBAAsC;IACtC,4CAA4C;IAC5C,IAAkB,EAAO,EAAE;QACjC,MAAM,UAAU,GAAG;YACjB,GAAG;gBACD,MAAM,YAAY,GACd,OAAO,QAAQ,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;gBACzD,IAAI,KAAK,GAAG,IAAI,IAAK,IAAwB,CAAC,aAAa,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;gBACvE,IAAI,KAAK,IAAI,QAAQ,EAAE;oBACrB,KAAK,GAAG,KAAK,CAAC,MAAM,CAChB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;wBACzC,sEAAsE;wBACtE,CAAE,IAAY,CAAC,OAAO,CAAC,CAAC;4BAClB,IAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;4BACrC,aAAa,CAAC,IAAI,CAAC,IAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;iBAC9D;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC;QACF,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;YACzB,WAAW,CAAC,UAAU,EAAE,iBAA2B,EAAE,IAAI,CAAC,CAAC,CAAC;YAC5D,aAAa,CAAC,UAAU,EAAE,iBAAiC,CAAC,CAAC;IACnE,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure Compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {LitElement} from '../lit-element.js';\n\nimport {PropertyDeclaration, UpdatingElement} from './updating-element.js';\n\nexport type Constructor<T> = {\n // tslint:disable-next-line:no-any\n new (...args: any[]): T\n};\n\n// From the TC39 Decorators proposal\ninterface ClassDescriptor {\n kind: 'class';\n elements: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;\n}\n\n// From the TC39 Decorators proposal\ninterface ClassElement {\n kind: 'field'|'method';\n key: PropertyKey;\n placement: 'static'|'prototype'|'own';\n initializer?: Function;\n extras?: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;\n descriptor?: PropertyDescriptor;\n}\n\nconst legacyCustomElement =\n (tagName: string, clazz: Constructor<HTMLElement>) => {\n window.customElements.define(tagName, clazz);\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // tslint:disable-next-line:no-any\n return clazz as any;\n };\n\nconst standardCustomElement =\n (tagName: string, descriptor: ClassDescriptor) => {\n const {kind, elements} = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n window.customElements.define(tagName, clazz);\n }\n };\n };\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```\n * @customElement('my-element')\n * class MyElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The name of the custom element to define.\n */\nexport const customElement = (tagName: string) =>\n (classOrDescriptor: Constructor<HTMLElement>|ClassDescriptor) =>\n (typeof classOrDescriptor === 'function') ?\n legacyCustomElement(tagName, classOrDescriptor) :\n standardCustomElement(tagName, classOrDescriptor);\n\nconst standardProperty =\n (options: PropertyDeclaration, element: ClassElement) => {\n // When decorating an accessor, pass it through and add property metadata.\n // Note, the `hasOwnProperty` check in `createProperty` ensures we don't\n // stomp over the user's accessor.\n if (element.kind === 'method' && element.descriptor &&\n !('value' in element.descriptor)) {\n return {\n ...element,\n finisher(clazz: typeof UpdatingElement) {\n clazz.createProperty(element.key, options);\n }\n };\n } else {\n // createProperty() takes care of defining the property, but we still\n // must return some kind of descriptor, so return a descriptor for an\n // unused prototype field. The finisher calls createProperty().\n return {\n kind: 'field',\n key: Symbol(),\n placement: 'own',\n descriptor: {},\n // When @babel/plugin-proposal-decorators implements initializers,\n // do this instead of the initializer below. See:\n // https://github.com/babel/babel/issues/9260 extras: [\n // {\n // kind: 'initializer',\n // placement: 'own',\n // initializer: descriptor.initializer,\n // }\n // ],\n initializer(this: {[key: string]: unknown}) {\n if (typeof element.initializer === 'function') {\n this[element.key as string] = element.initializer.call(this);\n }\n },\n finisher(clazz: typeof UpdatingElement) {\n clazz.createProperty(element.key, options);\n }\n };\n }\n };\n\nconst legacyProperty =\n (options: PropertyDeclaration, proto: Object, name: PropertyKey) => {\n (proto.constructor as typeof UpdatingElement)\n .createProperty(name, options);\n };\n\n/**\n * A property decorator which creates a LitElement property which reflects a\n * corresponding attribute value. A [[`PropertyDeclaration`]] may optionally be\n * supplied to configure property features.\n *\n * This decorator should only be used for public fields. Private or protected\n * fields should use the [[`internalProperty`]] decorator.\n *\n * @example\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration) {\n // tslint:disable-next-line:no-any decorator\n return (protoOrDescriptor: Object|ClassElement, name?: PropertyKey): any =>\n (name !== undefined) ?\n legacyProperty(options!, protoOrDescriptor as Object, name) :\n standardProperty(options!, protoOrDescriptor as ClassElement);\n}\n\nexport interface InternalPropertyDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * Declares a private or protected property that still triggers updates to the\n * element when it changes.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like the Closure Compiler.\n * @category Decorator\n * @deprecated `internalProperty` has been renamed to `state` in lit-element\n * 3.0. Please update to `state` now to be compatible with 3.0.\n */\nexport function internalProperty(options?: InternalPropertyDeclaration) {\n return property({attribute: false, hasChanged: options?.hasChanged});\n}\n\n/**\n * Declares a private or protected property that still triggers updates to the\n * element when it changes.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like the Closure Compiler.\n * @category Decorator\n */\nexport const state = (options?: InternalPropertyDeclaration) =>\n internalProperty(options);\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n if (cache) {\n const prop =\n name !== undefined ? name : (protoOrDescriptor as ClassElement).key;\n const key = typeof prop === 'symbol' ? Symbol() : `__${prop}`;\n descriptor.get = function(this: LitElement) {\n if ((this as unknown as\n {[key: string]: Element | null})[key as string] === undefined) {\n ((this as unknown as {[key: string]: Element | null})[key as string] =\n this.renderRoot.querySelector(selector));\n }\n return (\n this as unknown as {[key: string]: Element | null})[key as string];\n };\n }\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector: string) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n async get(this: LitElement) {\n await this.updateComplete;\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector: string) {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n return this.renderRoot.querySelectorAll(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n\nconst legacyQuery =\n (descriptor: PropertyDescriptor, proto: Object, name: PropertyKey) => {\n Object.defineProperty(proto, name, descriptor);\n };\n\nconst standardQuery = (descriptor: PropertyDescriptor, element: ClassElement) =>\n ({\n kind: 'method',\n placement: 'prototype',\n key: element.key,\n descriptor,\n });\n\nconst standardEventOptions =\n (options: AddEventListenerOptions, element: ClassElement) => {\n return {\n ...element,\n finisher(clazz: typeof UpdatingElement) {\n Object.assign(\n clazz.prototype[element.key as keyof UpdatingElement], options);\n }\n };\n };\n\nconst legacyEventOptions =\n // tslint:disable-next-line:no-any legacy decorator\n (options: AddEventListenerOptions, proto: any, name: PropertyKey) => {\n Object.assign(proto[name], options);\n };\n\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * @example\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}`>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options: AddEventListenerOptions) {\n // Return value typed as any to prevent TypeScript from complaining that\n // standard decorator function signature does not match TypeScript decorator\n // signature\n // TODO(kschaaf): unclear why it was only failing on this decorator and not\n // the others\n return ((protoOrDescriptor: Object|ClassElement, name?: string) =>\n (name !== undefined) ?\n legacyEventOptions(options, protoOrDescriptor as Object, name) :\n standardEventOptions(\n options, protoOrDescriptor as ClassElement)) as\n // tslint:disable-next-line:no-any decorator\n any;\n}\n\n// x-browser support for matches\n// tslint:disable-next-line:no-any\nconst ElementProto = Element.prototype as any;\nconst legacyMatches =\n ElementProto.msMatchesSelector || ElementProto.webkitMatchesSelector;\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given named `slot`. Note, the type of\n * this property should be annotated as `NodeListOf<HTMLElement>`.\n *\n * @param slotName A string name of the slot.\n * @param flatten A boolean which when true flattens the assigned nodes,\n * meaning any assigned nodes that are slot elements are replaced with their\n * assigned nodes.\n * @param selector A string which filters the results to elements that match\n * the given css selector.\n *\n * * @example\n * ```ts\n * class MyElement {\n * @queryAssignedNodes('list', true, '.item')\n * listItems;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAssignedNodes(\n slotName = '', flatten = false, selector = '') {\n return (protoOrDescriptor: Object|ClassElement,\n // tslint:disable-next-line:no-any decorator\n name?: PropertyKey): any => {\n const descriptor = {\n get(this: LitElement) {\n const slotSelector =\n `slot${slotName ? `[name=${slotName}]` : ':not([name])'}`;\n const slot = this.renderRoot.querySelector(slotSelector);\n let nodes = slot && (slot as HTMLSlotElement).assignedNodes({flatten});\n if (nodes && selector) {\n nodes = nodes.filter(\n (node) => node.nodeType === Node.ELEMENT_NODE &&\n // tslint:disable-next-line:no-any testing existence on older browsers\n ((node as any).matches ?\n (node as Element).matches(selector) :\n legacyMatches.call(node as Element, selector)));\n }\n return nodes;\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor as Object, name) :\n standardQuery(descriptor, protoOrDescriptor as ClassElement);\n };\n}\n"]} |
+1
-1
@@ -68,3 +68,3 @@ /** | ||
| (window['litElementVersions'] || (window['litElementVersions'] = [])) | ||
| .push('2.5.0'); | ||
| .push('2.5.1'); | ||
| /** | ||
@@ -71,0 +71,0 @@ * Sentinal value used to avoid calling lit-html's render function when |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"lit-element.js","sourceRoot":"","sources":["src/lit-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAC,MAAM,EAAqB,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAiB,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1E,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAC,eAAe,IAAI,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC7E,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAC,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAC,2BAA2B,EAAa,SAAS,EAAC,MAAM,kBAAkB,CAAC;AACnF,cAAc,kBAAkB,CAAC;AAQjC,2EAA2E;AAC3E,oEAAoE;AACpE,2DAA2D;AAC3D,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,CAAC;KAChE,IAAI,CAAC,OAAO,CAAC,CAAC;AASnB;;;GAGG;AACH,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,eAAe;IA0C7C;;;;;OAKG;IACH,MAAM,CAAC,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,kBAAkB;IACV,MAAM,CAAC,gBAAgB;QAC7B,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EAAC,CAAC,CAAC;SAC1D;QACD,sEAAsE;QACtE,sEAAsE;QACtE,YAAY;QACZ,IAAI,IAAI,CAAC,4BAA4B,EAAE;YACrC,IAAI,CAAC,4BAA4B,GAAG,KAAK,CAAC;YACzC,IAAI,CAAC,WAAiC,CAAC,OAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC7D,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBAC9C,KAAK,CAAC,WAAW,GAAI,CAAe,CAAC,OAAO,CAAC;gBAC7C,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAED;;;;;OAKG;IACO,MAAM;QACd,OAAO,oBAAoB,CAAC;IAC9B,CAAC;;AArOD;;;;;;GAMG;AACa,WAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AAErC;;;;;;;;;;;;;;;;GAgBG;AACI,iBAAM,GAE+B,MAAM,CAAC;AAQnD,kBAAkB;AACX,4BAAiB,GAAmB,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * The main LitElement module, which defines the [[`LitElement`]] base class and\n * related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import [[`LitElement`]] and [[`html`]] from this module to create a\n * component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends [[`UpdatingElement`]] and adds lit-html templating.\n * The `UpdatingElement` class is provided for users that want to build\n * their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport {render, ShadyRenderOptions} from 'lit-html/lib/shady-render.js';\n\nimport {PropertyValues, UpdatingElement} from './lib/updating-element.js';\n\nexport * from './lib/updating-element.js';\nexport {UpdatingElement as ReactiveElement} from './lib/updating-element.js';\nexport * from './lib/decorators.js';\nexport {html, svg, TemplateResult, SVGTemplateResult} from 'lit-html/lit-html.js';\nimport {supportsAdoptingStyleSheets, CSSResult, unsafeCSS} from './lib/css-tag.js';\nexport * from './lib/css-tag.js';\n\ndeclare global {\n interface Window {\n litElementVersions: string[];\n }\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n// TODO(justinfagnani): inject version number at build time\n(window['litElementVersions'] || (window['litElementVersions'] = []))\n .push('2.5.0');\n\nexport type CSSResultOrNative = CSSResult|CSSStyleSheet;\n\nexport interface CSSResultArray extends\n Array<CSSResultOrNative|CSSResultArray> {}\n\nexport type CSSResultGroup = CSSResultOrNative|CSSResultArray;\n\n/**\n * Sentinal value used to avoid calling lit-html's render function when\n * subclasses do not implement `render`\n */\nconst renderNotImplemented = {};\n\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the [[`properties`]] property or the [[`property`]] decorator.\n */\nexport class LitElement extends UpdatingElement {\n /**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See updating-element.ts for more information.\n */\n protected static['finalized'] = true;\n\n /**\n * Reference to the underlying library method used to render the element's\n * DOM. By default, points to the `render` method from lit-html's shady-render\n * module.\n *\n * **Most users will never need to touch this property.**\n *\n * This property should not be confused with the `render` instance method,\n * which should be overridden to define a template for the element.\n *\n * Advanced users creating a new base class based on LitElement can override\n * this property to point to a custom render method with a signature that\n * matches [shady-render's `render`\n * method](https://lit-html.polymer-project.org/api/modules/shady_render.html#render).\n *\n * @nocollapse\n */\n static render:\n (result: unknown, container: Element|DocumentFragment,\n options: ShadyRenderOptions) => void = render;\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the [[`css`]] tag function or via constructible stylesheets.\n */\n static styles?: CSSResultGroup;\n\n /** @nocollapse */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n private static _styles: Array<CSSResultOrNative|CSSResult>|undefined;\n\n /**\n * Return the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * @nocollapse\n */\n static getStyles(): CSSResultGroup|undefined {\n return this.styles;\n }\n\n /** @nocollapse */\n private static _getUniqueStyles() {\n // Only gather styles once per class\n if (this.hasOwnProperty(JSCompiler_renameProperty('_styles', this))) {\n return;\n }\n // Take care not to call `this.getStyles()` multiple times since this\n // generates new CSSResults each time.\n // TODO(sorvell): Since we do not cache CSSResults by input, any\n // shared styles will generate new stylesheet objects, which is wasteful.\n // This should be addressed when a browser ships constructable\n // stylesheets.\n const userStyles = this.getStyles();\n\n if (Array.isArray(userStyles)) {\n // De-duplicate styles preserving the _last_ instance in the set.\n // This is a performance optimization to avoid duplicated styles that can\n // occur especially when composing via subclassing.\n // The last item is kept to try to preserve the cascade order with the\n // assumption that it's most important that last added styles override\n // previous styles.\n const addStyles = (styles: CSSResultArray, set: Set<CSSResultOrNative>):\n Set<CSSResultOrNative> => styles.reduceRight(\n (set: Set<CSSResultOrNative>, s) =>\n // Note: On IE set.add() does not return the set\n Array.isArray(s) ? addStyles(s, set) : (set.add(s), set),\n set);\n // Array.from does not work on Set in IE, otherwise return\n // Array.from(addStyles(userStyles, new Set<CSSResult>())).reverse()\n const set = addStyles(userStyles, new Set<CSSResultOrNative>());\n const styles: CSSResultOrNative[] = [];\n set.forEach((v) => styles.unshift(v));\n this._styles = styles;\n } else {\n this._styles = userStyles === undefined ? [] : [userStyles];\n }\n\n // Ensure that there are no invalid CSSStyleSheet instances here. They are\n // invalid in two conditions.\n // (1) the sheet is non-constructible (`sheet` of a HTMLStyleElement), but\n // this is impossible to check except via .replaceSync or use\n // (2) the ShadyCSS polyfill is enabled (:. supportsAdoptingStyleSheets is\n // false)\n this._styles = this._styles.map((s) => {\n if (s instanceof CSSStyleSheet && !supportsAdoptingStyleSheets) {\n // Flatten the cssText from the passed constructible stylesheet (or\n // undetectable non-constructible stylesheet). The user might have\n // expected to update their stylesheets over time, but the alternative\n // is a crash.\n const cssText = Array.prototype.slice.call(s.cssRules)\n .reduce((css, rule) => css + rule.cssText, '');\n return unsafeCSS(cssText);\n }\n return s;\n });\n }\n\n private _needsShimAdoptedStyleSheets?: boolean;\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n */\n readonly renderRoot!: Element|DocumentFragment;\n\n /**\n * Performs element initialization. By default this calls\n * [[`createRenderRoot`]] to create the element [[`renderRoot`]] node and\n * captures any pre-set values for registered properties.\n */\n protected initialize() {\n super.initialize();\n (this.constructor as typeof LitElement)._getUniqueStyles();\n (this as {\n renderRoot: Element|DocumentFragment;\n }).renderRoot = this.createRenderRoot();\n // Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n // element's getRootNode(). While this could be done, we're choosing not to\n // support this now since it would require different logic around de-duping.\n if (window.ShadowRoot && this.renderRoot instanceof window.ShadowRoot) {\n this.adoptStyles();\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n * @returns {Element|DocumentFragment} Returns a node into which to render.\n */\n protected createRenderRoot(): Element|ShadowRoot {\n return this.attachShadow(\n (this.constructor as typeof LitElement).shadowRootOptions);\n }\n\n /**\n * Applies styling to the element shadowRoot using the [[`styles`]]\n * property. Styling will apply using `shadowRoot.adoptedStyleSheets` where\n * available and will fallback otherwise. When Shadow DOM is polyfilled,\n * ShadyCSS scopes styles and adds them to the document. When Shadow DOM\n * is available but `adoptedStyleSheets` is not, styles are appended to the\n * end of the `shadowRoot` to [mimic spec\n * behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n */\n protected adoptStyles() {\n const styles = (this.constructor as typeof LitElement)._styles!;\n if (styles.length === 0) {\n return;\n }\n // There are three separate cases here based on Shadow DOM support.\n // (1) shadowRoot polyfilled: use ShadyCSS\n // (2) shadowRoot.adoptedStyleSheets available: use it\n // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after\n // rendering\n if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) {\n window.ShadyCSS.ScopingShim!.prepareAdoptedCssText(\n styles.map((s) => (s as CSSResult).cssText), this.localName);\n } else if (supportsAdoptingStyleSheets) {\n (this.renderRoot as ShadowRoot).adoptedStyleSheets =\n styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet!);\n } else {\n // This must be done after rendering so the actual style insertion is done\n // in `update`.\n this._needsShimAdoptedStyleSheets = true;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n // Note, first update/render handles styleElement so we only call this if\n // connected after first update.\n if (this.hasUpdated && window.ShadyCSS !== undefined) {\n window.ShadyCSS.styleElement(this);\n }\n }\n\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param _changedProperties Map of changed properties with old values\n */\n protected update(changedProperties: PropertyValues) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const templateResult = this.render();\n super.update(changedProperties);\n // If render is not implemented by the component, don't call lit-html render\n if (templateResult !== renderNotImplemented) {\n (this.constructor as typeof LitElement)\n .render(\n templateResult,\n this.renderRoot,\n {scopeName: this.localName, eventContext: this});\n }\n // When native Shadow DOM is used but adoptedStyles are not supported,\n // insert styling after rendering to ensure adoptedStyles have highest\n // priority.\n if (this._needsShimAdoptedStyleSheets) {\n this._needsShimAdoptedStyleSheets = false;\n (this.constructor as typeof LitElement)._styles!.forEach((s) => {\n const style = document.createElement('style');\n style.textContent = (s as CSSResult).cssText;\n this.renderRoot.appendChild(style);\n });\n }\n }\n\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `NodePart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n */\n protected render(): unknown {\n return renderNotImplemented;\n }\n}\n"]} | ||
| {"version":3,"file":"lit-element.js","sourceRoot":"","sources":["src/lit-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAC,MAAM,EAAqB,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAiB,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1E,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAC,eAAe,IAAI,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC7E,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAC,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAC,2BAA2B,EAAa,SAAS,EAAC,MAAM,kBAAkB,CAAC;AACnF,cAAc,kBAAkB,CAAC;AAQjC,2EAA2E;AAC3E,oEAAoE;AACpE,2DAA2D;AAC3D,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,CAAC;KAChE,IAAI,CAAC,OAAO,CAAC,CAAC;AASnB;;;GAGG;AACH,MAAM,oBAAoB,GAAG,EAAE,CA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C;QAChC,4EAA4E;QAC5E,IAAI,cAAc,KAAK,oBAAoB,EAAE;YAC1C,IAAI,CAAC,WAAiC;iBAClC,MAAM,CACH,cAAc,EACd,IAAI,CAAC,UAAU,EACf,EAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC,CAAC;SAC1D;QACD,sEAAsE;QACtE,sEAAsE;QACtE,YAAY;QACZ,IAAI,IAAI,CAAC,4BAA4B,EAAE;YACrC,IAAI,CAAC,4BAA4B,GAAG,KAAK,CAAC;YACzC,IAAI,CAAC,WAAiC,CAAC,OAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC7D,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBAC9C,KAAK,CAAC,WAAW,GAAI,CAAe,CAAC,OAAO,CAAC;gBAC7C,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAED;;;;;OAKG;IACO,MAAM;QACd,OAAO,oBAAoB,CAAC;IAC9B,CAAC;;AArOD;;;;;;GAMG;AACa,WAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AAErC;;;;;;;;;;;;;;;;GAgBG;AACI,iBAAM,GAE+B,MAAM,CAAC;AAQnD,kBAAkB;AACX,4BAAiB,GAAmB,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * The main LitElement module, which defines the [[`LitElement`]] base class and\n * related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import [[`LitElement`]] and [[`html`]] from this module to create a\n * component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends [[`UpdatingElement`]] and adds lit-html templating.\n * The `UpdatingElement` class is provided for users that want to build\n * their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport {render, ShadyRenderOptions} from 'lit-html/lib/shady-render.js';\n\nimport {PropertyValues, UpdatingElement} from './lib/updating-element.js';\n\nexport * from './lib/updating-element.js';\nexport {UpdatingElement as ReactiveElement} from './lib/updating-element.js';\nexport * from './lib/decorators.js';\nexport {html, svg, TemplateResult, SVGTemplateResult} from 'lit-html/lit-html.js';\nimport {supportsAdoptingStyleSheets, CSSResult, unsafeCSS} from './lib/css-tag.js';\nexport * from './lib/css-tag.js';\n\ndeclare global {\n interface Window {\n litElementVersions: string[];\n }\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n// TODO(justinfagnani): inject version number at build time\n(window['litElementVersions'] || (window['litElementVersions'] = []))\n .push('2.5.1');\n\nexport type CSSResultOrNative = CSSResult|CSSStyleSheet;\n\nexport interface CSSResultArray extends\n Array<CSSResultOrNative|CSSResultArray> {}\n\nexport type CSSResultGroup = CSSResultOrNative|CSSResultArray;\n\n/**\n * Sentinal value used to avoid calling lit-html's render function when\n * subclasses do not implement `render`\n */\nconst renderNotImplemented = {};\n\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the [[`properties`]] property or the [[`property`]] decorator.\n */\nexport class LitElement extends UpdatingElement {\n /**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See updating-element.ts for more information.\n */\n protected static['finalized'] = true;\n\n /**\n * Reference to the underlying library method used to render the element's\n * DOM. By default, points to the `render` method from lit-html's shady-render\n * module.\n *\n * **Most users will never need to touch this property.**\n *\n * This property should not be confused with the `render` instance method,\n * which should be overridden to define a template for the element.\n *\n * Advanced users creating a new base class based on LitElement can override\n * this property to point to a custom render method with a signature that\n * matches [shady-render's `render`\n * method](https://lit-html.polymer-project.org/api/modules/shady_render.html#render).\n *\n * @nocollapse\n */\n static render:\n (result: unknown, container: Element|DocumentFragment,\n options: ShadyRenderOptions) => void = render;\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the [[`css`]] tag function or via constructible stylesheets.\n */\n static styles?: CSSResultGroup;\n\n /** @nocollapse */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n private static _styles: Array<CSSResultOrNative|CSSResult>|undefined;\n\n /**\n * Return the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * @nocollapse\n */\n static getStyles(): CSSResultGroup|undefined {\n return this.styles;\n }\n\n /** @nocollapse */\n private static _getUniqueStyles() {\n // Only gather styles once per class\n if (this.hasOwnProperty(JSCompiler_renameProperty('_styles', this))) {\n return;\n }\n // Take care not to call `this.getStyles()` multiple times since this\n // generates new CSSResults each time.\n // TODO(sorvell): Since we do not cache CSSResults by input, any\n // shared styles will generate new stylesheet objects, which is wasteful.\n // This should be addressed when a browser ships constructable\n // stylesheets.\n const userStyles = this.getStyles();\n\n if (Array.isArray(userStyles)) {\n // De-duplicate styles preserving the _last_ instance in the set.\n // This is a performance optimization to avoid duplicated styles that can\n // occur especially when composing via subclassing.\n // The last item is kept to try to preserve the cascade order with the\n // assumption that it's most important that last added styles override\n // previous styles.\n const addStyles = (styles: CSSResultArray, set: Set<CSSResultOrNative>):\n Set<CSSResultOrNative> => styles.reduceRight(\n (set: Set<CSSResultOrNative>, s) =>\n // Note: On IE set.add() does not return the set\n Array.isArray(s) ? addStyles(s, set) : (set.add(s), set),\n set);\n // Array.from does not work on Set in IE, otherwise return\n // Array.from(addStyles(userStyles, new Set<CSSResult>())).reverse()\n const set = addStyles(userStyles, new Set<CSSResultOrNative>());\n const styles: CSSResultOrNative[] = [];\n set.forEach((v) => styles.unshift(v));\n this._styles = styles;\n } else {\n this._styles = userStyles === undefined ? [] : [userStyles];\n }\n\n // Ensure that there are no invalid CSSStyleSheet instances here. They are\n // invalid in two conditions.\n // (1) the sheet is non-constructible (`sheet` of a HTMLStyleElement), but\n // this is impossible to check except via .replaceSync or use\n // (2) the ShadyCSS polyfill is enabled (:. supportsAdoptingStyleSheets is\n // false)\n this._styles = this._styles.map((s) => {\n if (s instanceof CSSStyleSheet && !supportsAdoptingStyleSheets) {\n // Flatten the cssText from the passed constructible stylesheet (or\n // undetectable non-constructible stylesheet). The user might have\n // expected to update their stylesheets over time, but the alternative\n // is a crash.\n const cssText = Array.prototype.slice.call(s.cssRules)\n .reduce((css, rule) => css + rule.cssText, '');\n return unsafeCSS(cssText);\n }\n return s;\n });\n }\n\n private _needsShimAdoptedStyleSheets?: boolean;\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n */\n readonly renderRoot!: Element|DocumentFragment;\n\n /**\n * Performs element initialization. By default this calls\n * [[`createRenderRoot`]] to create the element [[`renderRoot`]] node and\n * captures any pre-set values for registered properties.\n */\n protected initialize() {\n super.initialize();\n (this.constructor as typeof LitElement)._getUniqueStyles();\n (this as {\n renderRoot: Element|DocumentFragment;\n }).renderRoot = this.createRenderRoot();\n // Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n // element's getRootNode(). While this could be done, we're choosing not to\n // support this now since it would require different logic around de-duping.\n if (window.ShadowRoot && this.renderRoot instanceof window.ShadowRoot) {\n this.adoptStyles();\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n * @returns {Element|DocumentFragment} Returns a node into which to render.\n */\n protected createRenderRoot(): Element|ShadowRoot {\n return this.attachShadow(\n (this.constructor as typeof LitElement).shadowRootOptions);\n }\n\n /**\n * Applies styling to the element shadowRoot using the [[`styles`]]\n * property. Styling will apply using `shadowRoot.adoptedStyleSheets` where\n * available and will fallback otherwise. When Shadow DOM is polyfilled,\n * ShadyCSS scopes styles and adds them to the document. When Shadow DOM\n * is available but `adoptedStyleSheets` is not, styles are appended to the\n * end of the `shadowRoot` to [mimic spec\n * behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n */\n protected adoptStyles() {\n const styles = (this.constructor as typeof LitElement)._styles!;\n if (styles.length === 0) {\n return;\n }\n // There are three separate cases here based on Shadow DOM support.\n // (1) shadowRoot polyfilled: use ShadyCSS\n // (2) shadowRoot.adoptedStyleSheets available: use it\n // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after\n // rendering\n if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) {\n window.ShadyCSS.ScopingShim!.prepareAdoptedCssText(\n styles.map((s) => (s as CSSResult).cssText), this.localName);\n } else if (supportsAdoptingStyleSheets) {\n (this.renderRoot as ShadowRoot).adoptedStyleSheets =\n styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet!);\n } else {\n // This must be done after rendering so the actual style insertion is done\n // in `update`.\n this._needsShimAdoptedStyleSheets = true;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n // Note, first update/render handles styleElement so we only call this if\n // connected after first update.\n if (this.hasUpdated && window.ShadyCSS !== undefined) {\n window.ShadyCSS.styleElement(this);\n }\n }\n\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param _changedProperties Map of changed properties with old values\n */\n protected update(changedProperties: PropertyValues) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const templateResult = this.render();\n super.update(changedProperties);\n // If render is not implemented by the component, don't call lit-html render\n if (templateResult !== renderNotImplemented) {\n (this.constructor as typeof LitElement)\n .render(\n templateResult,\n this.renderRoot,\n {scopeName: this.localName, eventContext: this});\n }\n // When native Shadow DOM is used but adoptedStyles are not supported,\n // insert styling after rendering to ensure adoptedStyles have highest\n // priority.\n if (this._needsShimAdoptedStyleSheets) {\n this._needsShimAdoptedStyleSheets = false;\n (this.constructor as typeof LitElement)._styles!.forEach((s) => {\n const style = document.createElement('style');\n style.textContent = (s as CSSResult).cssText;\n this.renderRoot.appendChild(style);\n });\n }\n }\n\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `NodePart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n */\n protected render(): unknown {\n return renderNotImplemented;\n }\n}\n"]} |
+1
-1
| { | ||
| "name": "lit-element", | ||
| "version": "2.5.0", | ||
| "version": "2.5.1", | ||
| "description": "A simple base class for creating fast, lightweight web components", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
+18
-18
@@ -31,28 +31,28 @@ # LitElement | ||
| ```ts | ||
| import {LitElement, html, css, customElement, property} from 'lit-element'; | ||
| import {LitElement, html, css, customElement, property} from 'lit-element'; | ||
| // This decorator defines the element. | ||
| @customElement('my-element') | ||
| export class MyElement extends LitElement { | ||
| // This decorator defines the element. | ||
| @customElement('my-element') | ||
| export class MyElement extends LitElement { | ||
| // This decorator creates a property accessor that triggers rendering and | ||
| // an observed attribute. | ||
| @property() | ||
| mood = 'great'; | ||
| // This decorator creates a property accessor that triggers rendering and | ||
| // an observed attribute. | ||
| @property() | ||
| mood = 'great'; | ||
| static styles = css` | ||
| span { | ||
| color: green; | ||
| }`; | ||
| static styles = css` | ||
| span { | ||
| color: green; | ||
| }`; | ||
| // Render element DOM by returning a `lit-html` template. | ||
| render() { | ||
| return html`Web Components are <span>${this.mood}</span>!`; | ||
| } | ||
| // Render element DOM by returning a `lit-html` template. | ||
| render() { | ||
| return html`Web Components are <span>${this.mood}</span>!`; | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| ```html | ||
| <my-element mood="awesome"></my-element> | ||
| <my-element mood="awesome"></my-element> | ||
| ``` | ||
@@ -59,0 +59,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
| /* | ||
| * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all | ||
| * IMPORTANT: For compatibility with tsickle and the Closure Compiler, all | ||
| * property decorators (but not class decorators) in this file that have | ||
@@ -185,6 +185,6 @@ * an @ExportDecoratedItems annotation must be defined as a regular function, | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| * @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0. | ||
| * Please update to `state` now to be compatible with 3.0. | ||
| * @deprecated `internalProperty` has been renamed to `state` in lit-element | ||
| * 3.0. Please update to `state` now to be compatible with 3.0. | ||
| */ | ||
@@ -201,6 +201,7 @@ export function internalProperty(options?: InternalPropertyDeclaration) { | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| */ | ||
| export const state = internalProperty; | ||
| export const state = (options?: InternalPropertyDeclaration) => | ||
| internalProperty(options); | ||
@@ -207,0 +208,0 @@ /** |
@@ -78,3 +78,3 @@ /** | ||
| (window['litElementVersions'] || (window['litElementVersions'] = [])) | ||
| .push('2.5.0'); | ||
| .push('2.5.1'); | ||
@@ -81,0 +81,0 @@ export type CSSResultOrNative = CSSResult|CSSStyleSheet; |
@@ -80,6 +80,6 @@ /** | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| * @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0. | ||
| * Please update to `state` now to be compatible with 3.0. | ||
| * @deprecated `internalProperty` has been renamed to `state` in lit-element | ||
| * 3.0. Please update to `state` now to be compatible with 3.0. | ||
| */ | ||
@@ -93,6 +93,6 @@ export declare function internalProperty(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any; | ||
| * systems, they're solely for properties internal to the element. These | ||
| * properties may be renamed by optimization tools like closure compiler. | ||
| * properties may be renamed by optimization tools like the Closure Compiler. | ||
| * @category Decorator | ||
| */ | ||
| export declare const state: typeof internalProperty; | ||
| export declare const state: (options?: InternalPropertyDeclaration<unknown> | undefined) => (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any; | ||
| /** | ||
@@ -99,0 +99,0 @@ * A property decorator that converts a class property into a getter that |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
331410
0.18%5192
0.02%