1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-04-02 12:15:48 -04:00
parent cc555065f7
commit c3fd6c022f
54 changed files with 296 additions and 87 deletions

View file

@ -1,6 +1,6 @@
{
"name": "iron-a11y-keys-behavior",
"version": "1.1.1",
"version": "1.1.2",
"description": "A behavior that enables keybindings for greater a11y.",
"keywords": [
"web-components",
@ -23,19 +23,19 @@
},
"devDependencies": {
"paper-styles": "PolymerElements/paper-styles#^1.0.2",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
"_release": "1.1.1",
"_release": "1.1.2",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "12af7cb19b2c6b3887e37a5ea1501ffe676d1e8a"
"tag": "v1.1.2",
"commit": "0c2330c229a6fd3d200e2b84147ec6f94f17c22d"
},
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/iron-a11y-keys-behavior/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -1,22 +1,25 @@
language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: OZhLlPsjjnWU4FyZ+RKq5i/Nv/tElvcjr9+OT04ENGKfh9+fkuij/XdHJQe6EpOCjrNkwt23c+I6V5YWRrSatRX/AxEkViW8EXnF32rX3HV8fWnjD6Vfn+4Qz82y4huc9II8OV5I7jFDln6yzEGZn08zAtbmhj5dSpYtT1spSf/ZuUkqn4mMRJW2wCOnzbjueP56Ry40IwQm0enLXVQLPYB3LC4fBWfT+VFrsE9qH1ZgGKcSD/n2dOD3d6xjts4FSilNp2IZ8Km5RNAFUxYmkcwrY4O2ltNtKUngWwIpeplpz0bNj5k8kOpT5xA/FT630M5sFd1ODVp846kTr/EyYTq/VCiwTaA/vDfZL85DC3O+Zt0vTHAvkxKAaXkg9sMp8gJOJ6gt6cK8rV8z7npeAUVsK1gmuHYXne1Z76SRgWwbE0/z82vyFLNgitmZDLLM1fP3TpzsK1QQg1ikn6iYXdWpHcrzBi6lk8mCafnP7D7B/yFB/Z6Y9AFI6NQI/jWP2FMMJjMWbaJVG9DAU4PWlVTiFnhfVjPI7FUEmW46/QjH1ztSZWpDA9SBozJluIpKRA1qk1EgGX1RBFBHrbFtHG//x0AGyAV6gWOfdKjl/nqcM02xFUSrDb0tkNUnEAS6K7l+X1eDaBbiaAQiakPt9Je2WvvHyc+OiZviSc72Gmc=
- secure: vIs86+z7s1QwihkHtLBRQzlmJRSIWIadq3SlDdZHS4HOivH7fNV0d4hm8QnZYZ9X8yvSvxFCzEFdLuX1TpU0H3oy5wgYky7DnfJtsEhuOfW8dobHHZeCNi/t2FQAXpobqpRwojC3A+1b1lNrY1XNpYRz7aEialO4Yr8e1SQSLex5zw/pqm7g9Vz6PnQwobDQcGXKc6ZWc84+DqOo9qfkSlnEJC/1vQxHYpUa172UnnAnmHJ7gZKdhf9aLWJSZcSpPcoKEnvslRFmeDyRMNRDWVzcg2vHnV+tc1aYzp1wsrRW3P+oqwYlvGlxo+5U92QLXKIcKZhGblVWxe8BtXgiVzgS1sz5D11vKs61Xe46onbguG/XK3UxX9bPRK5uklkC5fwAY2hhvOTGXqimTb2YrlyEWO3BCKGBk6Is3KGyCe7c2nNEmXPUSun9X1JLGRPivJb9iBR4/WSEFvibYHl6/gIke9LdXPOCHuJ3+Iu14lCz+pwi8ADIWVuGpDIxFcorG8a3BCoxQo5VouUbSe0mcNttAvSzBNxhljaaBuFs56DLDpLRr0sGhqvfA1JzdCyzVyrk4WECfZw26pAnYCyTczVXmu5msVdKnjPJKtDqWazvIhHk2G1mk8CKb14lrN58u/Kh6PQ3miJ+61c1stBWhRDlp2QffOkBJiOATKHF+AA=
node_js: 4
- CXX=g++-4.8
node_js: stable
addons:
firefox: latest
apt:
sources:
- google-chrome
- ubuntu-toolchain-r-test
packages:
- google-chrome-stable
- g++-4.8
sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"

View file

@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
You can however override the jsbin link with one that's customized to this
specific element:
jsbin=https://jsbin.com/cagaye/edit?html,output
-->
# Polymer Elements
## Guide for Contributors
@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
3. Click the `paper-foo` element.
```
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
When submitting pull requests, please provide:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, #40
Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:

View file

@ -1,6 +1,6 @@
{
"name": "iron-a11y-keys-behavior",
"version": "1.1.1",
"version": "1.1.2",
"description": "A behavior that enables keybindings for greater a11y.",
"keywords": [
"web-components",
@ -23,10 +23,10 @@
},
"devDependencies": {
"paper-styles": "PolymerElements/paper-styles#^1.0.2",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": []

View file

@ -2,11 +2,11 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>

View file

@ -90,6 +90,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*/
var SPACE_KEY = /^space(bar)?/;
/**
* Matches ESC key.
*
* Value from: http://w3c.github.io/uievents-key/#key-Escape
*/
var ESC_KEY = /^escape$/;
/**
* Transforms the key.
* @param {string} key The KeyBoardEvent.key
@ -102,6 +109,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var lKey = key.toLowerCase();
if (lKey === ' ' || SPACE_KEY.test(lKey)) {
validKey = 'space';
} else if (ESC_KEY.test(lKey)) {
validKey = 'esc';
} else if (lKey.length == 1) {
if (!noSpecialChars || KEY_CHAR.test(lKey)) {
validKey = lKey;
@ -145,10 +154,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
validKey = 'f' + (keyCode - 112);
} else if (keyCode >= 48 && keyCode <= 57) {
// top 0-9 keys
validKey = String(48 - keyCode);
validKey = String(keyCode - 48);
} else if (keyCode >= 96 && keyCode <= 105) {
// num pad 0-9
validKey = String(96 - keyCode);
validKey = String(keyCode - 96);
} else {
validKey = KEY_CODE[keyCode];
}
@ -313,6 +322,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._resetKeyEventListeners();
},
/**
* Returns true if a keyboard event matches `eventString`.
*
* @param {KeyboardEvent} event
* @param {string} eventString
* @return {boolean}
*/
keyboardEventMatchesKeys: function(event, eventString) {
var keyCombos = parseEventString(eventString);
for (var i = 0; i < keyCombos.length; ++i) {

View file

@ -98,7 +98,8 @@ suite('Polymer.IronA11yKeysBehavior', function() {
keyBindings: {
'space': '_keyHandler',
'@': '_keyHandler'
'@': '_keyHandler',
'esc': '_keyHandler'
}
});
@ -170,6 +171,15 @@ suite('Polymer.IronA11yKeysBehavior', function() {
MockInteractions.pressSpace(keys);
expect(keys.keyCount).to.be.equal(1);
MockInteractions.pressAndReleaseKeyOn(keys, 27, [], 'Esc');
expect(keys.keyCount).to.be.equal(2);
MockInteractions.pressAndReleaseKeyOn(keys, 27, [], 'Escape');
expect(keys.keyCount).to.be.equal(3);
MockInteractions.pressAndReleaseKeyOn(keys, 27, []);
expect(keys.keyCount).to.be.equal(4);
});
test('trigger the handler when the specified key is pressed together with a modifier', function() {
@ -273,6 +283,20 @@ suite('Polymer.IronA11yKeysBehavior', function() {
expect(keys.keyboardEventMatchesKeys(event, 'up')).to.be.equal(true);
});
});
suite('matching keyboard events to top row and number pad digit keys', function() {
test('top row can be done imperatively', function() {
var event = new CustomEvent('keydown');
event.keyCode = 49;
expect(keys.keyboardEventMatchesKeys(event, '1')).to.be.equal(true);
});
test('number pad digits can be done imperatively', function() {
var event = new CustomEvent('keydown');
event.keyCode = 97;
expect(keys.keyboardEventMatchesKeys(event, '1')).to.be.equal(true);
});
});
});
suite('combo keys', function() {

View file

@ -29,14 +29,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-behaviors",
"homepage": "https://github.com/PolymerElements/iron-behaviors",
"_release": "1.0.13",
"_resolution": {
"type": "version",
"tag": "v1.0.13",
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
},
"_source": "git://github.com/polymerelements/iron-behaviors.git",
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/iron-behaviors"
"_originalSource": "PolymerElements/iron-behaviors"
}

View file

@ -36,6 +36,6 @@
"commit": "6d88f29f3a7181daa2a5c7f678de44f0a0e6a717"
},
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
"_target": "^1.3.1",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-flex-layout"
}

View file

@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
"version": "1.6.0",
"version": "1.6.1",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
@ -35,11 +35,11 @@
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
"_release": "1.6.0",
"_release": "1.6.1",
"_resolution": {
"type": "version",
"tag": "v1.6.0",
"commit": "5179ec9ad80a9c30b77486ffe9599828f944ab4a"
"tag": "v1.6.1",
"commit": "34f2ed86b2e46f2827dd09594ae99acff0f28029"
},
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
"_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
"version": "1.6.0",
"version": "1.6.1",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,

View file

@ -315,7 +315,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/**
* Returns the deepest overlay in the path.
* @param {?Array<Element>} path
* @param {Array<Element>=} path
* @return {Element|undefined}
* @private
*/

View file

@ -206,13 +206,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(callCount, 0, 'iron-resize should not be called');
});
test('open overlay triggers iron-resize when its content changes', function() {
test('open overlay triggers iron-resize when its content changes', function(done) {
runAfterOpen(overlay, function() {
var spy = sinon.stub();
overlay.addEventListener('iron-resize', spy);
Polymer.dom(overlay).appendChild(document.createElement('div'));
Polymer.dom.flush();
assert.equal(spy.callCount, 1, 'iron-resize should be called once');
done();
});
});

View file

@ -1,7 +1,7 @@
{
"name": "neon-animation",
"description": "A system for animating Polymer-based web components",
"version": "1.1.1",
"version": "1.2.0",
"authors": [
"The Polymer Authors"
],
@ -49,11 +49,11 @@
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
},
"_release": "1.1.1",
"_release": "1.2.0",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "e1fefa09ec01a51cbb809a85a72f74b9b6f60c22"
"tag": "v1.2.0",
"commit": "2d3416a01f865a25fe581ad0cfcda6ae4f9cf142"
},
"_source": "git://github.com/polymerelements/neon-animation.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/neon-animation/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -38,18 +38,6 @@ Configuration:
Polymer.NeonAnimationBehavior
],
properties: {
/** @type {!Polymer.IronMeta} */
_animationMeta: {
type: Object,
value: function() {
return new Polymer.IronMeta({type: 'animation'});
}
}
},
/**
* @param {{
* animation: string,
@ -59,13 +47,6 @@ Configuration:
* }} config
*/
configure: function(config) {
var animationConstructor = /** @type {Function} */ (
this._animationMeta.byKey(config.animation));
if (!animationConstructor) {
console.warn(this.is + ':', 'constructor for', config.animation, 'not found!');
return;
}
this._animations = [];
var nodes = config.nodes;
var effects = [];
@ -75,17 +56,29 @@ Configuration:
config.timing.delay = config.timing.delay || 0;
var oldDelay = config.timing.delay;
var abortedConfigure;
for (var node, index = 0; node = nodes[index]; index++) {
config.timing.delay += nodeDelay;
config.node = node;
var animation = new animationConstructor();
var effect = animation.configure(config);
var animation = document.createElement(config.animation);
if (animation.isNeonAnimation) {
var effect = animation.configure(config);
this._animations.push(animation);
effects.push(effect);
this._animations.push(animation);
effects.push(effect);
} else {
console.warn(this.is + ':', config.animation, 'not found!');
abortedConfigure = true;
break;
}
}
config.timing.delay = oldDelay;
config.node = null;
// if a bad animation was configured, abort config.
if (abortedConfigure) {
return;
}
this._effect = new GroupEffect(effects);
return this._effect;

View file

@ -1,7 +1,7 @@
{
"name": "neon-animation",
"description": "A system for animating Polymer-based web components",
"version": "1.1.1",
"version": "1.2.0",
"authors": [
"The Polymer Authors"
],

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -37,9 +37,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
registered: function() {
new Polymer.IronMeta({type: 'animation', key: this.is, value: this.constructor});
},
/**
* Can be used to determine that elements implement this behavior.
*/
isNeonAnimation: true,
/**
* Do any animation configuration here.

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@ -21,13 +22,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
properties: {
_animationMeta: {
type: Object,
value: function() {
return new Polymer.IronMeta({type: 'animation'});
}
},
/** @type {?Object} */
_player: {
type: Object
@ -39,9 +33,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var allAnimations = [];
if (allConfigs.length > 0) {
for (var config, index = 0; config = allConfigs[index]; index++) {
var animationConstructor = this._animationMeta.byKey(config.name);
if (animationConstructor) {
var animation = animationConstructor && new animationConstructor();
var animation = document.createElement(config.name);
// is this element actually a neon animation?
if (animation.isNeonAnimation) {
var effect = animation.configure(config);
if (effect) {
allAnimations.push({

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

View file

@ -1,4 +1,5 @@
<!DOCTYPE html><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@ -15,7 +16,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script>
WCT.loadSuites([
'neon-animated-pages.html',
'neon-animated-pages.html?dom=shadow'
'neon-animated-pages.html?dom=shadow',
'neon-animated-pages-lazy.html',
'neon-animated-pages-lazy.html?dom=shadow'
]);
</script>

View file

@ -0,0 +1,73 @@
<!doctype html>
<!--
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>neon-animated-pages tests</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script>Polymer = {lazyRegister: true}</script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../neon-animated-pages.html">
<link rel="import" href="../neon-animatable.html">
<link rel="import" href="../animations/slide-from-left-animation.html">
<link rel="import" href="../animations/slide-right-animation.html">
<link rel="import" href="test-resizable-pages.html">
</head>
<body>
<test-fixture id="animate-initial-selection">
<template>
<neon-animated-pages entry-animation="slide-from-left-animation" exit-animation="slide-right-animation" animate-initial-selection>
<neon-animatable></neon-animatable>
<neon-animatable></neon-animatable>
</neon-animated-pages>
</template>
</test-fixture>
<script>
suite('animations found when `lazRegister` setting is true', function() {
test('animations are registered', function(done) {
var animatedPages = fixture('animate-initial-selection');
animatedPages._completeAnimations = sinon.spy();
assert.isUndefined(animatedPages.selected);
var pages = Polymer.dom(animatedPages).children;
animatedPages.addEventListener('neon-animation-finish', function(event) {
if (animatedPages.selected === 0) {
animatedPages.selected = 1;
return;
}
assert.strictEqual(animatedPages.selected, 1);
assert.equal(event.detail.fromPage, pages[0]);
assert.equal(event.detail.toPage, pages[1]);
assert.isTrue(animatedPages._completeAnimations.calledTwice);
var a$ = animatedPages._completeAnimations.getCall(1).args[0];
assert.isTrue(a$[0].animation.isNeonAnimation, 'default animation is not a registered animation');
assert.isTrue(a$[1].animation.isNeonAnimation, 'entry animation is not a registered animation');
assert.isTrue(a$[2].animation.isNeonAnimation, 'exit animation is not a registered animation');
done();
});
animatedPages.selected = 0;
});
});
</script>
</body>
</html>

View file

@ -1,5 +1,6 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@ -24,8 +25,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../neon-animated-pages.html">
<link rel="import" href="../neon-animatable.html">
<link rel="import" href="../animations/slide-from-top-animation.html">
<link rel="import" href="../animations/slide-down-animation.html">
<link rel="import" href="../animations/slide-from-left-animation.html">
<link rel="import" href="../animations/slide-right-animation.html">
<link rel="import" href="test-resizable-pages.html">
</head>

View file

@ -45,7 +45,7 @@
"tag": "v1.0.11",
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
},
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
"_source": "git://github.com/polymerelements/paper-behaviors.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-behaviors"
"_originalSource": "polymerelements/paper-behaviors"
}

View file

@ -32,14 +32,14 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
},
"ignore": [],
"homepage": "https://github.com/PolymerElements/paper-ripple",
"homepage": "https://github.com/polymerelements/paper-ripple",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
},
"_source": "git://github.com/PolymerElements/paper-ripple.git",
"_source": "git://github.com/polymerelements/paper-ripple.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-ripple"
"_originalSource": "polymerelements/paper-ripple"
}