diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..e6fcf9f9 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,26 @@ +{ + "extends": "airbnb", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "semi": 2, + "no-unused-vars" : "off", + "comma-dangle" : "off", + "no-plusplus" : "off", + "no-restricted-properties" : "off", + "prefer-template" : "off", + "import/no-extraneous-dependencies" : "off", + "import/prefer-default-export" : "off", + "max-len": ["off", 100, 2, { + "ignoreUrls": true, + "ignoreComments": false, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + }] + } +} diff --git a/.gitignore b/.gitignore index ccba850e..cf60a901 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ bower_components +node_modules +!build/docs/node_modules *~ *# *.idea /escrow/ /.bowerrc -/docs diff --git a/CHANGELOG.md b/CHANGELOG.md index dd2077df..221b7040 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,105 @@ -# Change Log +# [v5.1.0](https://github.com/MyScript/myscript-text-web/tree/v5.1.0) -## [v1.2.1](https://github.com/MyScript/myscript-text-web/tree/v1.2.1) +## Features -### Bugs +- Addition of a new Recognition Assets Builder API to dynamically build text lexicons and math grammars +- Style and decoration support in the JIIX exports +- New configuration options for a finer tuning of JIIX exports +- Always connected is now the default mode for better end user experience + +# [v5.0.0](https://github.com/MyScript/myscript-text-web/tree/v5.0.0) + +## Features + +`myscript-text-web` now supports all the features introduced by the version [4.2.0 of MyScriptJS](https://github.com/MyScript/myscriptjs/tree/v4.2.0). + +## Breaking changes + +- We are now using Polymer 3. For more details, please refer to the [Polymer documentation](https://www.polymer-project.org/3.0/docs/about_30). + +# [v4.1.1](https://github.com/MyScript/myscript-text-web/tree/v4.1.1) + +## Bugs fixed +- Documentation and paper buttons colors were not taken into account in Edge. + +## Breaking changes + +In order to be consistent with the native API : +- `disableguidelines` renamed to `disableguides` in the configuration. + +# [v4.1.0](https://github.com/MyScript/myscript-text-web/tree/v4.1.0) + +## Features +- Modifications to include smart guide from MyScriptJS + - New `disablesmartguide` property to disable smart guide. + - New `disablesmartguidefadeout` and `smartguidefadeoutduration` to disable smart guide fadeout or modify the duration. +- New `usepointerlisteners` property used to force the pointer events use. +- New guides for text using a svg DOM element behind the model layer and `disableguidelines` to disable the guides. +- No more css background if api is set to `V4`. +- Google fonts supports (see the [example](./examples/v4/change_fonts.html)). +- Custom resources support, upload your custom resources to modify the recognition behaviour (see the [example](./examples/v4/custom_resources.html)). +- New `penStyleClasses` property. Used to change the theme using classes passed using the `theme` property (see the [example](./examples/non-version-specific/customize_style.html)). + +## Breaking changes +- `importContent()` and `exportContent()` respectively renamed to `import_()` and `export_()`. +- `importInk(strokes)` changed to `pointerEvents(events)`. + +# [v4.0.1](https://github.com/MyScript/myscript-text-web/tree/v4.0.1) + +## Bug fixed +- Editor on iOS wasn't working properly due to touch-action: none in CSS not supported in Safari. + +# [v4.0.0](https://github.com/MyScript/myscript-text-web/tree/v4.0.0) + +## Features +- New events to be notified of editor changes. +- New `unloaded` flag to control component state. `load` event will be trigger once the editor will be fully loaded. +- New **not mutable** `configuration` attribute. Changing the configuration will clear the underlying editor, all currents strokes and results will be lost. To do it, set `unloaded=true` after changing configuration, and wait for a `load` event. +- New **read-only** `editor` property that allow you to access to the underlying editor object (see [MyScriptJS documentation]() for more details). +- New CSS variables to customize the web-component. See [examples/styling.html](examples/styling.html) as an example. + +## Breaking changes +- Complete rewrite of the underlying javascript library with ES6 syntax +- Internal design improved to allow extensibility and support of upcoming recognition types. Documentation and illustrating samples to come in next release. +- Removal of all deprecated attributes and methods +- All events has been renamed. See the [documentation](docs/index.html) to discover new behavior. +- `resulttypes`, `language`, `typeset`, `textparameters`, `mathparameters`, `shapeparameters`, `musicparameters`, `analyzerparameters` are replaced by the unique `configuration` attribute (see [MyScriptJS documentation]() for a complete spec). +- Renamed `timeout` attribute to `recognitiontriggerdelay` +- Renamed `delete()` property to `clear()` +- Changed `ssl` attribute to a `scheme` attribute (i.e. `ssl=true` will be replaced by `scheme=https`) +- `getAvailableLanguages()` have been replaced by a new web-component. You can use it to retrieve the list of available languages for your configuration. + +## Bugs +- User can no longer write when an unrecoverable error is detected forcing him to reload the page. See [examples/handle_error.html](examples/handle_error.html) to see how it works. + +For more details about attributes, look at the [documentation](docs/index.html). + +## Limits +- `myscript-text-web` does not support pure shadow DOM. Still some issues to use underlying css. + +# [v1.2.3](https://github.com/MyScript/myscript-text-web/tree/v1.2.3) + +## Features +- Change colors to fit the new MyScript Developer theme + +# [v1.2.2](https://github.com/MyScript/myscript-text-web/tree/v1.2.2) + +## Features +- New `strokecolor` attribute to setup/change stroke color settings +- New `strokewidth` attribute to setup/change stroke width settings + +## Bugs +- See [MyScriptJS v1.2.2](https://github.com/MyScript/MyScriptJS/tree/v1.2.2) for fixes + +# [v1.2.1](https://github.com/MyScript/myscript-text-web/tree/v1.2.1) + +## Bugs - Improve documentation of superimposed options - See [MyScriptJS v1.2.1](https://github.com/MyScript/MyScriptJS/tree/v1.2.1) for fixes -## [v1.2.0](https://github.com/MyScript/myscript-text-web/tree/v1.2.0) +# [v1.2.0](https://github.com/MyScript/myscript-text-web/tree/v1.2.0) -### Features +## Features - Mutable `host` attribute - Mutable `protocol` attribute - New `resultdetail` attribute @@ -26,7 +117,6 @@ - Add docs/demo buttons on component page - Add getStats method to get various stats relative to ink in order to help evaluate the myscript cdk usage - -### Bugs +## Bugs - Fixes issue on resize due to CSS - Explicit default values on documentation diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca16a969..ee506093 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,48 +1,9 @@ -# Contributing to MyScript Web +# Contributing -We gladly welcome pull requests to MyScript Web. If you would like to add or modify new or larger features, see the **Adding features** section below. -If you have any questions, or need help solving a problem, feel free to stop by the [#MyScript forum](https://dev.myscript.com/support/forum/). - -## Code format - -* Filename in smallcaps, -* 4 spaces for indentation, -* 120 character-line length. - -In general, try to make your code blend in with the surrounding code. - -## Adding features - -Components are distributed as sets of HTML and CSS files. If the feature you want to add belongs to an existing component, add your contribution to the corresponding file. - -If you want to create a component, first create a new set of files (HTML and CSS) associated to this component. Filename should be the component name in smallcaps. - -## Testing - -Local testing can be done using the `web-component-tester` engine through a web server. First, install all dependencies `bower install` from the root folder of the project, then open the test page in a web browser. - -MyScript Web supports all major browsers. However, as it is hard to test all versions of all browsers, please test your changes in as many browsers as possible. - -Simply navigate to the `/test` directory of your element to run tests and launch your web server. If you are using [Polyserve](https://github.com/PolymerLabs/polyserve), open `http://localhost:8080/components/myscript-renderer/test/`. - -### web-component-tester - -Install [web-component-tester](https://github.com/Polymer/web-component-tester): `npm install -g web-component-tester`. You can then run your tests on all your local browsers: `wct` - -#### WCT Tips - -`wct -l chrome` will only run tests in Google Chrome. - -`wct -p` will keep the browsers alive after test runs (refresh to re-run). - -`wct test/some-file.html` will test only the files you specify. +We gladly welcome pull requests to MyScript Web. If you have any questions, or need help to solve a problem, feel free to stop by the [#MyScript forum](https://dev.myscript.com/support/forum/). ## Contributor License Agreement In order to contribute, you must first agree to the **Contributor License Agreement** available [here](http://goo.gl/forms/YyzZ9VSvYG). Make sure you read the article **[Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)** to understand the contributing process. - -## License - -This library is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0). \ No newline at end of file diff --git a/LICENSE b/LICENSE index 17bde2e1..18453c66 100644 --- a/LICENSE +++ b/LICENSE @@ -1,176 +1,10 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS \ No newline at end of file +Copyright MyScript. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile deleted file mode 100644 index 5212f601..00000000 --- a/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -include Makefile.inc - -ALL: clean prepare docker test - -.PHONY: ALL \ - purge clean prepare \ - watch dev docs - -purge: - @rm -rf bower_components/ - @bower cache clean - -clean: - -prepare: - @git fetch --tags - @bower install $(BOWER_PARAMETERS) - -build: - -test: - -docker: build - -watch: - -dev: - @polyserve - -docs: - @rm -rf docs/components/* && mkdir -p docs/components - @cd docs && bower install -q ../../myscript-text-web - @cp -r bower_components/* docs/components/ diff --git a/Makefile.inc b/Makefile.inc deleted file mode 100644 index 1792d2de..00000000 --- a/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -SHELL = /bin/bash -GIT_VERSION := $(shell git describe --tags --long --always) -VERSION = 1.2.1-beta - -OFFLINE = false -ifeq ($(OFFLINE),true) - BOWER_PARAMETERS := --offline -endif - -MAKE := $(MAKE) --no-print-directory - -NPM_CACHE = $(HOME)/.npm - -CURRENT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) - -GITHUB = https://github.com/MyScript/myscript-text-web.git diff --git a/README.md b/README.md index dff6c115..af8db1ba 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,177 @@ -myscript-text-web -================= +# MyScript Text Web -The easy way to integrate text handwriting recognition in your web app. +[![npm version](https://badge.fury.io/js/myscript-text-web.svg)](https://badge.fury.io/js/myscript-text-web) +[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/MyScriptmyscript-text-web) +[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/MyScriptmyscript-text-web.svg)](https://vaadin.com/directory/component/MyScriptmyscript-text-web) +[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/MyScript/myscript-text-web) +[![Examples](https://img.shields.io/badge/Link%20to-examples-blue.svg)](https://myscript.github.io/myscript-text-web/#/elements/myscript-text-web/demos/other-examples) +[![Documentation](https://img.shields.io/badge/Link%20to-documentation-green.svg)](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/) - +## :warning: This repository is archived :warning: +iinkJS grants you high integration flexibility by letting you choose your favorite framework or components. For this reason, we have decided to focus on iinkJS and to discontinue our ready-to-use Web components. -```html - - - - - - - - - - -``` +For more information, please see [documentation](https://developer.myscript.com/). + +We also provide an example to integrate [iinkJS](https://github.com/MyScript/iinkJS) as webcomponent: [link](https://github.com/MyScript/web-integration-samples). + +
+ +:construction: + +> The easy way to integrate text handwriting recognition in your web app. + +

+ +

+ +`myscript-text-web` is a Web component that can be used in every web application to bring text handwriting recognition and conversion. + +It integrates all you need: +* Signal capture for all devices, +* Digital ink rendering, +* Link to MyScript Cloud to bring handwriting recognition. -[Test it live](https://myscript.github.io/myscript-text-web/components/myscript-text-web/demo/)! +## Table of contents -## What is it about? +* [Examples](https://github.com/MyScript/myscript-text-web#examples) +* [Features](https://github.com/MyScript/myscript-text-web#features) +* [Requirements](https://github.com/MyScript/myscript-text-web#requirements) +* [Installation](https://github.com/MyScript/myscript-text-web#installation) +* [Usage](https://github.com/MyScript/myscript-text-web#usage) +* [Documentation](https://github.com/MyScript/myscript-text-web#documentation) +* [Support](https://github.com/MyScript/myscript-text-web#support) +* [Feedback](https://github.com/MyScript/myscript-text-web#sharing-your-feedback) +* [Contributing](https://github.com/MyScript/myscript-text-web#contributing) -myscript-text-web is a web component that can be used in every web application (whatever the JavaScript library you are using) to bring handwriting recognition. It integrates all you need: -* Signal capture, -* Nice digital ink rendering, -* Plug with MyScript CDK to bring handwriting recognition. +## Examples + +If you're not familiar with MyScript and Interactive Ink, consider discovering its major features with our [text demo and tutorial](http://webdemo.myscript.com/views/text.html). + +[Simple example](https://myscript.github.io/myscript-text-web/#/elements/myscript-text-web/demos/get-started-[v4]) of `myscript-text-web`. + +[All our examples](https://myscript.github.io/myscript-text-web/#/elements/myscript-text-web/demos/other-examples) with the [source codes](https://github.com/MyScript/myscript-text-web/tree/master/src/demo-app/examples). + +## Features + +* Easy to integrate, +* Digital ink capture and rendering, +* Rich editing gestures, +* Import and export content, +* Styling, +* Typeset support, +* 65 supported languages. + +You can discover all the text features on our [Developer website](https://developer.myscript.com/text). + +## Requirements + +1. Have [npm](https://www.npmjs.com/get-npm) or [yarn](https://yarnpkg.com/en/docs/install) installed. +2. Have a MyScript developer account. You can create one [here](https://dev.myscript.com/). +2. Get your keys and the free monthly quota to access MyScript Cloud at [developer.myscript.com](https://developer.myscript.com) + ## Installation -**Bower**: `bower install myscript-text-web` +Use an existing project or start a fresh one. + +```shell +npm init +``` + +Install `myscript-text-web` and use it as showed in the [Usage]() section. + +```shell +npm install myscript-text-web +``` + +## Usage + +1. Create an `index.html` file in the same directory. + +2. Add the following lines in the `head` section to import the library and the webcomponents polyfill. + +```html + + +``` + +3. Still in the `head` section, add the following style: + +```html + +``` + +4. Use the component in the `body` section with the keys you received by mail. + +```html + + +``` + +5. Your `index.html` file should look like this: + +```html + + + + + + + + + + + +``` -## Start using myscript-text-web +6. Launch a local Web server to start using it! We recommend to use the polymer one, you can find more information on the [Polymer website](https://www.polymer-project.org/3.0/start/install-3-0). -1. Create an account on the [Developer portal](https://dev.myscript.com/), which will allow you to generate an application key and HMAC key. +``` +polymer serve +``` -2. Import Web Components' polyfill +You can find this guide and a more complete example on the [MyScript Developer website](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/get-started/). - `` +## Documentation -3. Import Custom Element +You can find a complete documentation with the following sections on our Developer website: - `` +* **Get Started**: [how to use myscript-text-web with a full example](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/get-started/), +* **Editing**: [how to interact with content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/editing/), +* **Conversion**: [how to convert your handwritten content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/conversion/), +* **Import and Export**: [how to import and export your content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/import-and-export/), +* **Styling**: [how to style content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/styling/). -3. Use it +We also provide a complete [API Reference](https://myscript.github.io/myscript-text-web/#/elements/myscript-text-web). - `` - -## Documentation -The API Reference is available here: [https://myscript.github.io/myscript-text-web/](https://myscript.github.io/myscript-text-web/) +## Getting support -## Contribute +You can get support and ask your questions on the [dedicated section](https://developer-support.myscript.com/support/discussions/forums/16000096021) of MyScript Developer website. -If you wish to contribute to myscript-text-web, feel free to fork it, fire `bower install` and use [polyserve](https://github.com/PolymerLabs/polyserve) as an HTTP server. The demo page (in `demo` directory) can help you make your first experimentation. +## Sharing your feedback -Please sign our [Contributor License Agreement](CONTRIBUTING.md) before submitting your pull request. +Made a cool app with `myscript-text-web`? We would love to hear about you! +We’re planning to showcase apps using it so let us know by sending a quick mail to [myapp@myscript.com](mailto://myapp@myscript.com) -## Share your feedback +## Contributing -Made a cool app with myscript-text-web? We would love to hear about it! +We welcome your contributions: if you wish to contribute to `myscript-text-web`, feel free to fork it! -We plan to showcase apps, so let us know by writing to [myapp@myscript.com](mailto://myapp@myscript.com) +Please take a look at our [contributing](CONTRIBUTING.md) guidelines before submitting your pull request. ## License -[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) +This library is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0). diff --git a/analysis.json b/analysis.json new file mode 100644 index 00000000..76247500 --- /dev/null +++ b/analysis.json @@ -0,0 +1,10977 @@ +{ + "schema_version": "1.0.0", + "elements": [ + { + "description": "", + "summary": "", + "path": "myscript-text-exports.js", + "properties": [ + { + "name": "__dataClientsReady", + "type": "boolean", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1090, + "column": 6 + }, + "end": { + "line": 1090, + "column": 30 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataPendingClients", + "type": "Array", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1092, + "column": 6 + }, + "end": { + "line": 1092, + "column": 32 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataToNotify", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1094, + "column": 6 + }, + "end": { + "line": 1094, + "column": 26 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataLinkedPaths", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1096, + "column": 6 + }, + "end": { + "line": 1096, + "column": 29 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataHasPaths", + "type": "boolean", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1098, + "column": 6 + }, + "end": { + "line": 1098, + "column": 26 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataCompoundStorage", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1100, + "column": 6 + }, + "end": { + "line": 1100, + "column": 33 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataHost", + "type": "Polymer_PropertyEffects", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1102, + "column": 6 + }, + "end": { + "line": 1102, + "column": 22 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataTemp", + "type": "!Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1104, + "column": 6 + }, + "end": { + "line": 1104, + "column": 22 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataClientsInitialized", + "type": "boolean", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1106, + "column": 6 + }, + "end": { + "line": 1106, + "column": 36 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__data", + "type": "!Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1108, + "column": 6 + }, + "end": { + "line": 1108, + "column": 18 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataPending", + "type": "!Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1110, + "column": 6 + }, + "end": { + "line": 1110, + "column": 25 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__dataOld", + "type": "!Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1112, + "column": 6 + }, + "end": { + "line": 1112, + "column": 21 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__computeEffects", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1114, + "column": 6 + }, + "end": { + "line": 1114, + "column": 28 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__reflectEffects", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1116, + "column": 6 + }, + "end": { + "line": 1116, + "column": 28 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__notifyEffects", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1118, + "column": 6 + }, + "end": { + "line": 1118, + "column": 27 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__propagateEffects", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1120, + "column": 6 + }, + "end": { + "line": 1120, + "column": 30 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__observeEffects", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1122, + "column": 6 + }, + "end": { + "line": 1122, + "column": 28 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__readOnly", + "type": "Object", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1124, + "column": 6 + }, + "end": { + "line": 1124, + "column": 22 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__templateInfo", + "type": "!TemplateInfo", + "description": "", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1126, + "column": 6 + }, + "end": { + "line": 1126, + "column": 26 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "PROPERTY_EFFECT_TYPES", + "type": "?", + "description": "", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1129, + "column": 4 + }, + "end": { + "line": 1131, + "column": 5 + } + }, + "metadata": { + "polymer": { + "readOnly": true + } + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_template", + "type": "HTMLTemplateElement", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 490, + "column": 6 + }, + "end": { + "line": 490, + "column": 21 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "_importPath", + "type": "string", + "description": "", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 492, + "column": 6 + }, + "end": { + "line": 492, + "column": 23 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "rootPath", + "type": "string", + "description": "", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 494, + "column": 6 + }, + "end": { + "line": 494, + "column": 20 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "importPath", + "type": "string", + "description": "", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 496, + "column": 6 + }, + "end": { + "line": 496, + "column": 22 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "root", + "type": "(StampedTemplate | HTMLElement | ShadowRoot)", + "description": "", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 498, + "column": 6 + }, + "end": { + "line": 498, + "column": 16 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "$", + "type": "!Object.", + "description": "", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 500, + "column": 6 + }, + "end": { + "line": 500, + "column": 13 + } + }, + "metadata": { + "polymer": { + "readOnly": false + } + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "exports", + "type": "Object.", + "description": "Exports result.", + "privacy": "public", + "sourceRange": { + "start": { + "line": 125, + "column": 6 + }, + "end": { + "line": 128, + "column": 7 + } + }, + "metadata": { + "polymer": { + "notify": true, + "attributeType": "Object" + } + } + } + ], + "methods": [ + { + "name": "_stampTemplate", + "description": "Stamps the provided template and performs instance-time setup for\nPolymer template features, including data bindings, declarative event\nlisteners, and the `this.$` map of `id`'s to nodes. A document fragment\nis returned containing the stamped DOM, ready for insertion into the\nDOM.\n\nThis method may be called more than once; however note that due to\n`shadycss` polyfill limitations, only styles from templates prepared\nusing `ShadyCSS.prepareTemplate` will be correctly polyfilled (scoped\nto the shadow root and support CSS custom properties), and note that\n`ShadyCSS.prepareTemplate` may only be called once per element. As such,\nany styles required by in runtime-stamped templates must be included\nin the main element template.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2416, + "column": 4 + }, + "end": { + "line": 2441, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "template", + "type": "!HTMLTemplateElement", + "description": "Template to stamp" + } + ], + "return": { + "type": "!StampedTemplate", + "desc": "Cloned template content" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_addMethodEventListenerToNode", + "description": "Adds an event listener by method name for the event provided.\n\nThis method generates a handler function that looks up the method\nname at handling time.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/template-stamp.js", + "start": { + "line": 454, + "column": 4 + }, + "end": { + "line": 459, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "node", + "type": "!EventTarget", + "description": "Node to add listener on" + }, + { + "name": "eventName", + "type": "string", + "description": "Name of event" + }, + { + "name": "methodName", + "type": "string", + "description": "Name of method" + }, + { + "name": "context", + "type": "*=", + "description": "Context the method will be called on (defaults\n to `node`)" + } + ], + "return": { + "type": "Function", + "desc": "Generated handler function" + }, + "inheritedFrom": "TemplateStamp" + }, + { + "name": "_addEventListenerToNode", + "description": "Override point for adding custom or simulated event handling.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/template-stamp.js", + "start": { + "line": 470, + "column": 4 + }, + "end": { + "line": 472, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "node", + "type": "!EventTarget", + "description": "Node to add event listener to" + }, + { + "name": "eventName", + "type": "string", + "description": "Name of event" + }, + { + "name": "handler", + "type": "function (!Event): void", + "description": "Listener function to add" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "TemplateStamp" + }, + { + "name": "_removeEventListenerFromNode", + "description": "Override point for adding custom or simulated event handling.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/template-stamp.js", + "start": { + "line": 483, + "column": 4 + }, + "end": { + "line": 485, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "node", + "type": "!EventTarget", + "description": "Node to remove event listener from" + }, + { + "name": "eventName", + "type": "string", + "description": "Name of event" + }, + { + "name": "handler", + "type": "function (!Event): void", + "description": "Listener function to remove" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "TemplateStamp" + }, + { + "name": "_createPropertyAccessor", + "description": "Creates a setter/getter pair for the named property with its own\nlocal storage. The getter returns the value in the local storage,\nand the setter calls `_setProperty`, which updates the local storage\nfor the property and enqueues a `_propertiesChanged` callback.\n\nThis method may be called on a prototype or an instance. Calling\nthis method may overwrite a property value that already exists on\nthe prototype/instance by creating the accessor.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 106, + "column": 4 + }, + "end": { + "line": 115, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of the property" + }, + { + "name": "readOnly", + "type": "boolean=", + "description": "When true, no setter is created; the\n protected `_setProperty` function must be used to set the property" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_addPropertyToAttributeMap", + "description": "Adds the given `property` to a map matching attribute names\nto property names, using `attributeNameForProperty`. This map is\nused when deserializing attribute values to properties.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 125, + "column": 4 + }, + "end": { + "line": 133, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of the property" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_definePropertyAccessor", + "description": "Defines a property accessor for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 142, + "column": 5 + }, + "end": { + "line": 155, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of the property" + }, + { + "name": "readOnly", + "type": "boolean=", + "description": "When true, no setter is created" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "ready", + "description": "Stamps the element template.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 608, + "column": 4 + }, + "end": { + "line": 614, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "_initializeProperties", + "description": "Overrides the default `PropertyAccessors` to ensure class\nmetaprogramming related to property accessors and effects has\ncompleted (calls `finalize`).\n\nIt also initializes any property defaults provided via `value` in\n`properties` metadata.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 515, + "column": 4 + }, + "end": { + "line": 548, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "_initializeInstanceProperties", + "description": "Called at ready time with bag of instance properties that overwrote\naccessors when the element upgraded.\n\nThe default implementation sets these properties back into the\nsetter at ready time. This method is provided as an override\npoint for customizing or providing more efficient initialization.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 229, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "props", + "type": "Object", + "description": "Bag of property values that were overwritten\n when creating property accessors." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_setProperty", + "description": "Updates the local storage for a property (via `_setPendingProperty`)\nand enqueues a `_proeprtiesChanged` callback.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 241, + "column": 4 + }, + "end": { + "line": 245, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of the property" + }, + { + "name": "value", + "type": "*", + "description": "Value to set" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_getProperty", + "description": "Returns the value for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 254, + "column": 4 + }, + "end": { + "line": 256, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of property" + } + ], + "return": { + "type": "*", + "desc": "Value for the given property" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_setPendingProperty", + "description": "Updates the local storage for a property, records the previous value,\nand adds it to the set of \"pending changes\" that will be passed to the\n`_propertiesChanged` callback. This method does not enqueue the\n`_propertiesChanged` callback.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 272, + "column": 4 + }, + "end": { + "line": 288, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of the property" + }, + { + "name": "value", + "type": "*", + "description": "Value to set" + }, + { + "name": "ext", + "type": "boolean=", + "description": "Not used here; affordance for closure" + } + ], + "return": { + "type": "boolean", + "desc": "Returns true if the property changed" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_invalidateProperties", + "description": "Marks the properties as invalid, and enqueues an async\n`_propertiesChanged` callback.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 299, + "column": 4 + }, + "end": { + "line": 309, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_enableProperties", + "description": "Call to enable property accessor processing. Before this method is\ncalled accessor values will be set but side effects are\nqueued. When called, any pending side effects occur immediately.\nFor elements, generally `connectedCallback` is a normal spot to do so.\nIt is safe to call this method multiple times as it only turns on\nproperty accessors once.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 323, + "column": 4 + }, + "end": { + "line": 332, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_flushProperties", + "description": "Calls the `_propertiesChanged` callback with the current set of\npending changes (and old values recorded when pending changes were\nset), and resets the pending set of changes. Generally, this method\nshould not be called in user code.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 344, + "column": 4 + }, + "end": { + "line": 353, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_shouldPropertiesChange", + "description": "Called in `_flushProperties` to determine if `_propertiesChanged`\nshould be called. The default implementation returns true if\nproperties are pending. Override to customize when\n`_propertiesChanged` is called.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 368, + "column": 4 + }, + "end": { + "line": 370, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "currentProps", + "type": "!Object", + "description": "Bag of all current accessor values" + }, + { + "name": "changedProps", + "type": "?Object", + "description": "Bag of properties changed since the last\n call to `_propertiesChanged`" + }, + { + "name": "oldProps", + "type": "?Object", + "description": "Bag of previous values for each property\n in `changedProps`" + } + ], + "return": { + "type": "boolean", + "desc": "true if changedProps is truthy" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_propertiesChanged", + "description": "Callback called when any properties with accessors created via\n`_createPropertyAccessor` have been set.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 385, + "column": 4 + }, + "end": { + "line": 386, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "currentProps", + "type": "!Object", + "description": "Bag of all current accessor values" + }, + { + "name": "changedProps", + "type": "?Object", + "description": "Bag of properties changed since the last\n call to `_propertiesChanged`" + }, + { + "name": "oldProps", + "type": "?Object", + "description": "Bag of previous values for each property\n in `changedProps`" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_shouldPropertyChange", + "description": "Method called to determine whether a property value should be\nconsidered as a change and cause the `_propertiesChanged` callback\nto be enqueued.\n\nThe default implementation returns `true` if a strict equality\ncheck fails. The method always returns false for `NaN`.\n\nOverride this method to e.g. provide stricter checking for\nObjects/Arrays when using immutable patterns.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 407, + "column": 4 + }, + "end": { + "line": 414, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + }, + { + "name": "value", + "type": "*", + "description": "New property value" + }, + { + "name": "old", + "type": "*", + "description": "Previous property value" + } + ], + "return": { + "type": "boolean", + "desc": "Whether the property should be considered a change\n and enqueue a `_proeprtiesChanged` callback" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "attributeChangedCallback", + "description": "Implements native Custom Elements `attributeChangedCallback` to\nset an attribute value to a property via `_attributeToProperty`.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 428, + "column": 4 + }, + "end": { + "line": 435, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "name", + "type": "string", + "description": "Name of attribute that changed" + }, + { + "name": "old", + "type": "?string", + "description": "Old attribute value" + }, + { + "name": "value", + "type": "?string", + "description": "New attribute value" + }, + { + "name": "namespace", + "type": "?string", + "description": "Attribute namespace." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_attributeToProperty", + "description": "Deserializes an attribute to its associated property.\n\nThis method calls the `_deserializeValue` method to convert the string to\na typed value.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 450, + "column": 4 + }, + "end": { + "line": 457, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "attribute", + "type": "string", + "description": "Name of attribute to deserialize." + }, + { + "name": "value", + "type": "?string", + "description": "of the attribute." + }, + { + "name": "type", + "type": "*=", + "description": "type to deserialize to, defaults to the value\nreturned from `typeForProperty`" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_propertyToAttribute", + "description": "Serializes a property to its associated attribute.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 470, + "column": 4 + }, + "end": { + "line": 476, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name to reflect." + }, + { + "name": "attribute", + "type": "string=", + "description": "Attribute name to reflect to." + }, + { + "name": "value", + "type": "*=", + "description": "Property value to refect." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_valueToNodeAttribute", + "description": "Sets a typed value to an HTML attribute on a node.\n\nThis method calls the `_serializeValue` method to convert the typed\nvalue to a string. If the `_serializeValue` method returns `undefined`,\nthe attribute will be removed (this is the default for boolean\ntype `false`).", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 492, + "column": 4 + }, + "end": { + "line": 499, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "node", + "type": "Element", + "description": "Element to set attribute to." + }, + { + "name": "value", + "type": "*", + "description": "Value to serialize." + }, + { + "name": "attribute", + "type": "string", + "description": "Attribute name to serialize to." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_serializeValue", + "description": "Converts a typed JavaScript value to a string.\n\nThis method is called when setting JS property values to\nHTML attributes. Users may override this method to provide\nserialization for custom types.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 513, + "column": 4 + }, + "end": { + "line": 520, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "value", + "type": "*", + "description": "Property value to serialize." + } + ], + "return": { + "type": "(string | undefined)", + "desc": "String serialized from the provided\nproperty value." + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_deserializeValue", + "description": "Converts a string to a typed JavaScript value.\n\nThis method is called when reading HTML attribute values to\nJS properties. Users may override this method to provide\ndeserialization for custom `type`s. Types for `Boolean`, `String`,\nand `Number` convert attributes to the expected types.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-changed.js", + "start": { + "line": 535, + "column": 4 + }, + "end": { + "line": 544, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "value", + "type": "?string", + "description": "Value to deserialize." + }, + { + "name": "type", + "type": "*=", + "description": "Type to deserialize the string to." + } + ], + "return": { + "type": "*", + "desc": "Typed value deserialized from the provided string." + }, + "inheritedFrom": "PropertiesChanged" + }, + { + "name": "_initializeProtoProperties", + "description": "Overrides `PropertyAccessors` implementation to provide a\nmore efficient implementation of initializing properties from\nthe prototype on the instance.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1160, + "column": 4 + }, + "end": { + "line": 1164, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "props", + "type": "Object", + "description": "Properties to initialize on the prototype" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_ensureAttribute", + "description": "Ensures the element has the given attribute. If it does not,\nassigns the given value to the attribute.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-accessors.js", + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 190, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "attribute", + "type": "string", + "description": "Name of attribute to ensure is set." + }, + { + "name": "value", + "type": "string", + "description": "of the attribute." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyAccessors" + }, + { + "name": "_hasAccessor", + "description": "Returns true if this library created an accessor for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-accessors.js", + "start": { + "line": 292, + "column": 4 + }, + "end": { + "line": 294, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if an accessor was created" + }, + "inheritedFrom": "PropertyAccessors" + }, + { + "name": "_isPropertyPending", + "description": "Returns true if the specified property has a pending change.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-accessors.js", + "start": { + "line": 303, + "column": 4 + }, + "end": { + "line": 305, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "prop", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if property has a pending change" + }, + "inheritedFrom": "PropertyAccessors" + }, + { + "name": "_addPropertyEffect", + "description": "Equivalent to static `addPropertyEffect` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1198, + "column": 4 + }, + "end": { + "line": 1206, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property that should trigger the effect" + }, + { + "name": "type", + "type": "string", + "description": "Effect type, from this.PROPERTY_EFFECT_TYPES" + }, + { + "name": "effect", + "type": "Object=", + "description": "Effect metadata object" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_removePropertyEffect", + "description": "Removes the given property effect.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1216, + "column": 4 + }, + "end": { + "line": 1222, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property the effect was associated with" + }, + { + "name": "type", + "type": "string", + "description": "Effect type, from this.PROPERTY_EFFECT_TYPES" + }, + { + "name": "effect", + "type": "Object=", + "description": "Effect metadata object to remove" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_hasPropertyEffect", + "description": "Returns whether the current prototype/instance has a property effect\nof a certain type.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1233, + "column": 4 + }, + "end": { + "line": 1236, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + }, + { + "name": "type", + "type": "string=", + "description": "Effect type, from this.PROPERTY_EFFECT_TYPES" + } + ], + "return": { + "type": "boolean", + "desc": "True if the prototype/instance has an effect of this type" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_hasReadOnlyEffect", + "description": "Returns whether the current prototype/instance has a \"read only\"\naccessor for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1246, + "column": 4 + }, + "end": { + "line": 1248, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if the prototype/instance has an effect of this type" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_hasNotifyEffect", + "description": "Returns whether the current prototype/instance has a \"notify\"\nproperty effect for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1258, + "column": 4 + }, + "end": { + "line": 1260, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if the prototype/instance has an effect of this type" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_hasReflectEffect", + "description": "Returns whether the current prototype/instance has a \"reflect to attribute\"\nproperty effect for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1270, + "column": 4 + }, + "end": { + "line": 1272, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if the prototype/instance has an effect of this type" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_hasComputedEffect", + "description": "Returns whether the current prototype/instance has a \"computed\"\nproperty effect for the given property.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1282, + "column": 4 + }, + "end": { + "line": 1284, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "boolean", + "desc": "True if the prototype/instance has an effect of this type" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_setPendingPropertyOrPath", + "description": "Sets a pending property or path. If the root property of the path in\nquestion had no accessor, the path is set, otherwise it is enqueued\nvia `_setPendingProperty`.\n\nThis function isolates relatively expensive functionality necessary\nfor the public API (`set`, `setProperties`, `notifyPath`, and property\nchange listeners via {{...}} bindings), such that it is only done\nwhen paths enter the system, and not at every propagation step. It\nalso sets a `__dataHasPaths` flag on the instance which is used to\nfast-path slower path-matching code in the property effects host paths.\n\n`path` can be a path string or array of path parts as accepted by the\npublic API.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1316, + "column": 4 + }, + "end": { + "line": 1348, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(number | string)>)", + "description": "Path to set" + }, + { + "name": "value", + "type": "*", + "description": "Value to set" + }, + { + "name": "shouldNotify", + "type": "boolean=", + "description": "Set to true if this change should\n cause a property notification event dispatch" + }, + { + "name": "isPathNotification", + "type": "boolean=", + "description": "If the path being set is a path\n notification of an already changed value, as opposed to a request\n to set and notify the change. In the latter `false` case, a dirty\n check is performed and then the value is set to the path before\n enqueuing the pending property change." + } + ], + "return": { + "type": "boolean", + "desc": "Returns true if the property/path was enqueued in\n the pending changes bag." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_setUnmanagedPropertyToNode", + "description": "Applies a value to a non-Polymer element/node's property.\n\nThe implementation makes a best-effort at binding interop:\nSome native element properties have side-effects when\nre-setting the same value (e.g. setting `.value` resets the\ncursor position), so we do a dirty-check before setting the value.\nHowever, for better interop with non-Polymer custom elements that\naccept objects, we explicitly re-set object changes coming from the\nPolymer world (which may include deep object changes without the\ntop reference changing), erring on the side of providing more\ninformation.\n\nUsers may override this method to provide alternate approaches.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1371, + "column": 4 + }, + "end": { + "line": 1379, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "node", + "type": "!Node", + "description": "The node to set a property on" + }, + { + "name": "prop", + "type": "string", + "description": "The property to set" + }, + { + "name": "value", + "type": "*", + "description": "The value to set" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_enqueueClient", + "description": "Enqueues the given client on a list of pending clients, whose\npending property changes can later be flushed via a call to\n`_flushClients`.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1486, + "column": 4 + }, + "end": { + "line": 1491, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "client", + "type": "Object", + "description": "PropertyEffects client to enqueue" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_flushClients", + "description": "Flushes any clients previously enqueued via `_enqueueClient`, causing\ntheir `_flushProperties` method to run.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1512, + "column": 4 + }, + "end": { + "line": 1523, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "__enableOrFlushClients", + "description": "(c) the stamped dom enables.", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1537, + "column": 4 + }, + "end": { + "line": 1550, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_readyClients", + "description": "Implements `PropertyEffects`'s `_readyClients` call. Attaches\nelement dom by calling `_attachDom` with the dom stamped from the\nelement's template via `_stampTemplate`. Note that this allows\nclient dom to be attached to the element prior to any observers\nrunning.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 626, + "column": 4 + }, + "end": { + "line": 635, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "setProperties", + "description": "Sets a bag of property changes to this instance, and\nsynchronously processes all effects of the properties as a batch.\n\nProperty names must be simple properties, not paths. Batched\npath propagation is not supported.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1579, + "column": 4 + }, + "end": { + "line": 1590, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "props", + "type": "Object", + "description": "Bag of one or more key-value pairs whose key is\n a property and value is the new value to set for that property." + }, + { + "name": "setReadOnly", + "type": "boolean=", + "description": "When true, any private values set in\n `props` will be set. By default, `setProperties` will not set\n `readOnly: true` root properties." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_propagatePropertyChanges", + "description": "Called to propagate any property changes to stamped template nodes\nmanaged by this element.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1677, + "column": 4 + }, + "end": { + "line": 1687, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "changedProps", + "type": "Object", + "description": "Bag of changed properties" + }, + { + "name": "oldProps", + "type": "Object", + "description": "Bag of previous values for changed properties" + }, + { + "name": "hasPaths", + "type": "boolean", + "description": "True with `props` contains one or more paths" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "linkPaths", + "description": "Aliases one data path as another, such that path notifications from one\nare routed to the other.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1698, + "column": 4 + }, + "end": { + "line": 1703, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "to", + "type": "(string | !Array.<(string | number)>)", + "description": "Target path to link." + }, + { + "name": "from", + "type": "(string | !Array.<(string | number)>)", + "description": "Source path to link." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "unlinkPaths", + "description": "Removes a data path alias previously established with `_linkPaths`.\n\nNote, the path to unlink should be the target (`to`) used when\nlinking the paths.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1715, + "column": 4 + }, + "end": { + "line": 1720, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Target path to unlink." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "notifySplices", + "description": "Notify that an array has changed.\n\nExample:\n\n this.items = [ {name: 'Jim'}, {name: 'Todd'}, {name: 'Bill'} ];\n ...\n this.items.splice(1, 1, {name: 'Sam'});\n this.items.push({name: 'Bob'});\n this.notifySplices('items', [\n { index: 1, removed: [{name: 'Todd'}], addedCount: 1, object: this.items, type: 'splice' },\n { index: 3, removed: [], addedCount: 1, object: this.items, type: 'splice'}\n ]);", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1752, + "column": 4 + }, + "end": { + "line": 1756, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "string", + "description": "Path that should be notified." + }, + { + "name": "splices", + "type": "Array", + "description": "Array of splice records indicating ordered\n changes that occurred to the array. Each record should have the\n following fields:\n * index: index at which the change occurred\n * removed: array of items that were removed from this index\n * addedCount: number of new items added at this index\n * object: a reference to the array in question\n * type: the string literal 'splice'\n\n Note that splice records _must_ be normalized such that they are\n reported in index order (raw results from `Object.observe` are not\n ordered and must be normalized/merged before notifying)." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "get", + "description": "Convenience method for reading a value from a path.\n\nNote, if any part in the path is undefined, this method returns\n`undefined` (this method does not throw when dereferencing undefined\npaths).", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1777, + "column": 4 + }, + "end": { + "line": 1779, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to the value\n to read. The path may be specified as a string (e.g. `foo.bar.baz`)\n or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n bracketed expressions are not supported; string-based path parts\n *must* be separated by dots. Note that when dereferencing array\n indices, the index may be used as a dotted part directly\n (e.g. `users.12.name` or `['users', 12, 'name']`)." + }, + { + "name": "root", + "type": "Object=", + "description": "Root object from which the path is evaluated." + } + ], + "return": { + "type": "*", + "desc": "Value at the path, or `undefined` if any part of the path\n is undefined." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "set", + "description": "Convenience method for setting a value to a path and notifying any\nelements bound to the same path.\n\nNote, if any part in the path except for the last is undefined,\nthis method does nothing (this method does not throw when\ndereferencing undefined paths).", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1802, + "column": 4 + }, + "end": { + "line": 1812, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to the value\n to write. The path may be specified as a string (e.g. `'foo.bar.baz'`)\n or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n bracketed expressions are not supported; string-based path parts\n *must* be separated by dots. Note that when dereferencing array\n indices, the index may be used as a dotted part directly\n (e.g. `'users.12.name'` or `['users', 12, 'name']`)." + }, + { + "name": "value", + "type": "*", + "description": "Value to set at the specified path." + }, + { + "name": "root", + "type": "Object=", + "description": "Root object from which the path is evaluated.\n When specified, no notification will occur." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "push", + "description": "Adds items onto the end of the array at the path specified.\n\nThe arguments after `path` and return value match that of\n`Array.prototype.push`.\n\nThis method notifies other paths to the same array that a\nsplice occurred to the array.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1828, + "column": 4 + }, + "end": { + "line": 1837, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to array." + }, + { + "name": "items", + "type": "...*", + "rest": true, + "description": "Items to push onto array" + } + ], + "return": { + "type": "number", + "desc": "New length of the array." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "pop", + "description": "Removes an item from the end of array at the path specified.\n\nThe arguments after `path` and return value match that of\n`Array.prototype.pop`.\n\nThis method notifies other paths to the same array that a\nsplice occurred to the array.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1852, + "column": 4 + }, + "end": { + "line": 1861, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to array." + } + ], + "return": { + "type": "*", + "desc": "Item that was removed." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "splice", + "description": "Starting from the start index specified, removes 0 or more items\nfrom the array and inserts 0 or more new items in their place.\n\nThe arguments after `path` and return value match that of\n`Array.prototype.splice`.\n\nThis method notifies other paths to the same array that a\nsplice occurred to the array.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1880, + "column": 4 + }, + "end": { + "line": 1917, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to array." + }, + { + "name": "start", + "type": "number", + "description": "Index from which to start removing/inserting." + }, + { + "name": "deleteCount", + "type": "number=", + "description": "Number of items to remove." + }, + { + "name": "items", + "type": "...*", + "rest": true, + "description": "Items to insert into array." + } + ], + "return": { + "type": "Array", + "desc": "Array of removed items." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "shift", + "description": "Removes an item from the beginning of array at the path specified.\n\nThe arguments after `path` and return value match that of\n`Array.prototype.pop`.\n\nThis method notifies other paths to the same array that a\nsplice occurred to the array.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1932, + "column": 4 + }, + "end": { + "line": 1941, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to array." + } + ], + "return": { + "type": "*", + "desc": "Item that was removed." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "unshift", + "description": "Adds items onto the beginning of the array at the path specified.\n\nThe arguments after `path` and return value match that of\n`Array.prototype.push`.\n\nThis method notifies other paths to the same array that a\nsplice occurred to the array.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1957, + "column": 4 + }, + "end": { + "line": 1965, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "(string | !Array.<(string | number)>)", + "description": "Path to array." + }, + { + "name": "items", + "type": "...*", + "rest": true, + "description": "Items to insert info array" + } + ], + "return": { + "type": "number", + "desc": "New length of the array." + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "notifyPath", + "description": "Notify that a path has changed.\n\nExample:\n\n this.item.user.name = 'Bob';\n this.notifyPath('item.user.name');", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 1980, + "column": 4 + }, + "end": { + "line": 1997, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "path", + "type": "string", + "description": "Path that should be notified." + }, + { + "name": "value", + "type": "*=", + "description": "Value at the path (optional)." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createReadOnlyProperty", + "description": "Equivalent to static `createReadOnlyProperty` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2010, + "column": 4 + }, + "end": { + "line": 2017, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + }, + { + "name": "protectedSetter", + "type": "boolean=", + "description": "Creates a custom protected setter\n when `true`." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createPropertyObserver", + "description": "Equivalent to static `createPropertyObserver` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2031, + "column": 4 + }, + "end": { + "line": 2041, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + }, + { + "name": "method", + "type": "(string | function (*, *))", + "description": "Function or name of observer method to call" + }, + { + "name": "dynamicFn", + "type": "boolean=", + "description": "Whether the method name should be included as\n a dependency to the effect." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createMethodObserver", + "description": "Equivalent to static `createMethodObserver` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2054, + "column": 4 + }, + "end": { + "line": 2060, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "expression", + "type": "string", + "description": "Method expression" + }, + { + "name": "dynamicFn", + "type": "(boolean | Object)=", + "description": "Boolean or object map indicating\n whether method names should be included as a dependency to the effect." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createNotifyingProperty", + "description": "Equivalent to static `createNotifyingProperty` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2071, + "column": 4 + }, + "end": { + "line": 2079, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createReflectedProperty", + "description": "Equivalent to static `createReflectedProperty` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2090, + "column": 4 + }, + "end": { + "line": 2103, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Property name" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_createComputedProperty", + "description": "Equivalent to static `createComputedProperty` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2117, + "column": 4 + }, + "end": { + "line": 2123, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "property", + "type": "string", + "description": "Name of computed property to set" + }, + { + "name": "expression", + "type": "string", + "description": "Method expression" + }, + { + "name": "dynamicFn", + "type": "(boolean | Object)=", + "description": "Boolean or object map indicating\n whether method names should be included as a dependency to the effect." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_marshalArgs", + "description": "Gather the argument values for a method specified in the provided array\nof argument metadata.\n\nThe `path` and `value` arguments are used to fill in wildcard descriptor\nwhen the method is being called as a result of a path notification.", + "privacy": "private", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2138, + "column": 4 + }, + "end": { + "line": 2173, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "args", + "type": "!Array.", + "description": "Array of argument metadata" + }, + { + "name": "path", + "type": "string", + "description": "Property/path name that triggered the method effect" + }, + { + "name": "props", + "type": "Object", + "description": "Bag of current property changes" + } + ], + "return": { + "type": "Array.<*>", + "desc": "Array of argument values" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_bindTemplate", + "description": "Equivalent to static `bindTemplate` API but can be called on\nan instance to add effects at runtime. See that method for\nfull API docs.\n\nThis method may be called on the prototype (for prototypical template\nbinding, to avoid creating accessors every instance) once per prototype,\nand will be called with `runtimeBinding: true` by `_stampTemplate` to\ncreate and link an instance of the template metadata associated with a\nparticular stamping.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2350, + "column": 4 + }, + "end": { + "line": 2373, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "template", + "type": "!HTMLTemplateElement", + "description": "Template containing binding\n bindings" + }, + { + "name": "instanceBinding", + "type": "boolean=", + "description": "When false (default), performs\n \"prototypical\" binding of the template and overwrites any previously\n bound template for the class. When true (as passed from\n `_stampTemplate`), the template info is instanced and linked into\n the list of bound templates." + } + ], + "return": { + "type": "!TemplateInfo", + "desc": "Template metadata object; for `runtimeBinding`,\n this is an instance of the prototypical template info" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "_removeBoundDom", + "description": "Removes and unbinds the nodes previously contained in the provided\nDocumentFragment returned from `_stampTemplate`.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/property-effects.js", + "start": { + "line": 2452, + "column": 4 + }, + "end": { + "line": 2473, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "dom", + "type": "!StampedTemplate", + "description": "DocumentFragment previously returned\n from `_stampTemplate` associated with the nodes to be removed" + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertyEffects" + }, + { + "name": "connectedCallback", + "description": "Provides a default implementation of the standard Custom Elements\n`connectedCallback`.\n\nThe default implementation enables the property effects system and\nflushes any pending properties, and updates shimmed CSS properties\nwhen using the ShadyCSS scoping/custom properties polyfill.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 595, + "column": 4 + }, + "end": { + "line": 600, + "column": 5 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "disconnectedCallback", + "description": "Called when the element is removed from a document", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/properties-mixin.js", + "start": { + "line": 216, + "column": 3 + }, + "end": { + "line": 220, + "column": 4 + } + }, + "metadata": {}, + "params": [], + "return": { + "type": "void" + }, + "inheritedFrom": "PropertiesMixin" + }, + { + "name": "_attachDom", + "description": "Attaches an element's stamped dom to itself. By default,\nthis method creates a `shadowRoot` and adds the dom to it.\nHowever, this method may be overridden to allow an element\nto put its dom in another location.", + "privacy": "protected", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 649, + "column": 4 + }, + "end": { + "line": 665, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "dom", + "type": "StampedTemplate", + "description": "to attach to the element." + } + ], + "return": { + "type": "ShadowRoot", + "desc": "node to which the dom has been attached." + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "updateStyles", + "description": "When using the ShadyCSS scoping and custom property shim, causes all\nshimmed styles in this element (and its subtree) to be updated\nbased on current custom property values.\n\nThe optional parameter overrides inline custom property styles with an\nobject of properties where the keys are CSS properties, and the values\nare strings.\n\nExample: `this.updateStyles({'--color': 'blue'})`\n\nThese properties are retained unless a value of `null` is set.\n\nNote: This function does not support updating CSS mixins.\nYou can not dynamically change the value of an `@apply`.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 688, + "column": 4 + }, + "end": { + "line": 692, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "properties", + "type": "Object=", + "description": "Bag of custom property key/values to\n apply to this element." + } + ], + "return": { + "type": "void" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "resolveUrl", + "description": "Rewrites a given URL relative to a base URL. The base URL defaults to\nthe original location of the document containing the `dom-module` for\nthis element. This method will return the same URL before and after\nbundling.\n\nNote that this function performs no resolution for URLs that start\nwith `/` (absolute URLs) or `#` (hash identifiers). For general purpose\nURL resolution, use `window.URL`.", + "privacy": "public", + "sourceRange": { + "file": "../@polymer/polymer/lib/mixins/element-mixin.js", + "start": { + "line": 709, + "column": 4 + }, + "end": { + "line": 714, + "column": 5 + } + }, + "metadata": {}, + "params": [ + { + "name": "url", + "type": "string", + "description": "URL to resolve." + }, + { + "name": "base", + "type": "string=", + "description": "Optional base URL to resolve against, defaults\nto the element's `importPath`" + } + ], + "return": { + "type": "string", + "desc": "Rewritten URL relative to base" + }, + "inheritedFrom": "ElementMixin" + }, + { + "name": "_getPlainText", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 132, + "column": 2 + }, + "end": { + "line": 140, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "exports" + } + ] + }, + { + "name": "_select", + "description": "Select a new candidate", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 146, + "column": 2 + }, + "end": { + "line": 159, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "e" + } + ], + "return": { + "type": "void" + } + }, + { + "name": "_isSelected", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 161, + "column": 2 + }, + "end": { + "line": 163, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "index" + }, + { + "name": "selectedIndex" + } + ] + }, + { + "name": "_getChildSegments", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 165, + "column": 2 + }, + "end": { + "line": 203, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "candidate" + }, + { + "name": "exports" + }, + { + "name": "type" + } + ] + }, + { + "name": "_getChildCandidates", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 205, + "column": 2 + }, + "end": { + "line": 208, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "candidate" + }, + { + "name": "exports" + }, + { + "name": "type" + } + ] + }, + { + "name": "_getCandidateFlags", + "description": "", + "privacy": "protected", + "sourceRange": { + "start": { + "line": 210, + "column": 2 + }, + "end": { + "line": 215, + "column": 3 + } + }, + "metadata": {}, + "params": [ + { + "name": "candidate" + } + ] + } + ], + "staticMethods": [ + { + "name": "_parseTemplate", + "description": "Scans a template to produce template metadata.\n\nTemplate-specific metadata are stored in the object returned, and node-\nspecific metadata are stored in objects in its flattened `nodeInfoList`\narray. Only nodes in the template that were parsed as nodes of\ninterest contain an object in `nodeInfoList`. Each `nodeInfo` object\ncontains an `index` (`childNodes` index in parent) and optionally\n`parent`, which points to node info of its parent (including its index).\n\nThe template metadata object returned from this method has the following\nstructure (many fields optional):\n\n```js\n {\n // Flattened list of node metadata (for nodes that generated metadata)\n nodeInfoList: [\n {\n // `id` attribute for any nodes with id's for generating `$` map\n id: {string},\n // `on-event=\"handler\"` metadata\n events: [\n {\n name: {string}, // event name\n value: {string}, // handler method name\n }, ...\n ],\n // Notes when the template contained a `` for shady DOM\n // optimization purposes\n hasInsertionPoint: {boolean},\n // For nested `