diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 4b817c697..7cb78650f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.17", - "_release": "1.1.17", + "version": "1.1.19", + "_release": "1.1.19", "_resolution": { "type": "version", - "tag": "1.1.17", - "commit": "63e912c84d018cb8b6adb6975898d1bde3961b16" + "tag": "1.1.19", + "commit": "703a21b89d8650d4520fb2f5f16d10161721c3e4" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.1.5", diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js b/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js index a981713a9..b63e71681 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js +++ b/dashboard-ui/bower_components/emby-webcomponents/images/basicimagefetcher.js @@ -4,18 +4,21 @@ define([], function () { if (elem.tagName !== "IMG") { - var tmp = new Image(); + return new Promise(function (resolve, reject) { - tmp.onload = function () { - elem.style.backgroundImage = "url('" + url + "')"; - }; - tmp.src = url; + var tmp = new Image(); + + tmp.onload = function () { + elem.style.backgroundImage = "url('" + url + "')"; + resolve(elem); + }; + tmp.src = url; + }); } else { elem.setAttribute("src", url); + return Promise.resolve(elem); } - - return Promise.resolve(elem); } return { diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js index 1cbcb640b..826a7b2cb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js +++ b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimagefetcher.js @@ -1,13 +1,23 @@ define(['cryptojs-md5'], function () { - function setImageIntoElement(elem, url) { + function loadImage(elem, url) { if (elem.tagName !== "IMG") { - elem.style.backgroundImage = "url('" + url + "')"; + return new Promise(function (resolve, reject) { + + var tmp = new Image(); + + tmp.onload = function () { + elem.style.backgroundImage = "url('" + url + "')"; + resolve(elem); + }; + tmp.src = url; + }); } else { elem.setAttribute("src", url); + return Promise.resolve(elem); } } @@ -151,12 +161,10 @@ define(['cryptojs-md5'], function () { return getImageUrl(url).then(function (localUrl) { - setImageIntoElement(elem, localUrl); - return elem; + return loadImage(elem, localUrl); }, function () { - setImageIntoElement(elem, url); - return elem; + return loadImage(elem, url); }); } }; diff --git a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js index e71510479..b66ea3c4d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js @@ -23,11 +23,13 @@ function onBackCommand(e) { - inputManager.off(dlg, onBackCommand); + if (e.detail.command == 'back') { + inputManager.off(dlg, onBackCommand); - self.closedByBack = true; - dlg.close(); - e.preventDefault(); + self.closedByBack = true; + dlg.close(); + e.preventDefault(); + } } function onDialogClosed() { diff --git a/dashboard-ui/bower_components/emby-webcomponents/usersettings.js b/dashboard-ui/bower_components/emby-webcomponents/usersettings.js index 87cfb3c5e..6cc6925cb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/usersettings.js +++ b/dashboard-ui/bower_components/emby-webcomponents/usersettings.js @@ -62,6 +62,15 @@ define(['appSettings', 'apiClientResolver', 'events'], function (appsettings, ap return self.get('language'); }; + self.skipLength = function (val) { + + if (val != null) { + self.set('skipLength', val.toString()); + } + + return parseInt(self.get('skipLength') || '15000'); + }; + self.serverConfig = function (config) { if (config) { diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index 1dd6bd32f..9784e3a3b 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -1,7 +1,7 @@ { "name": "iron-icon", "private": true, - "version": "1.0.7", + "version": "1.0.8", "license": "http://polymer.github.io/LICENSE.txt", "description": "An element that supports displaying an icon", "main": "iron-icon.html", @@ -17,6 +17,7 @@ "type": "git", "url": "git://github.com/PolymerElements/iron-icon.git" }, + "ignore": [], "dependencies": { "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", "iron-meta": "polymerelements/iron-meta#^1.0.0", @@ -28,17 +29,17 @@ "iron-iconset": "polymerelements/iron-iconset#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-icon", - "_release": "1.0.7", + "homepage": "https://github.com/PolymerElements/iron-icon", + "_release": "1.0.8", "_resolution": { "type": "version", - "tag": "v1.0.7", - "commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381" + "tag": "v1.0.8", + "commit": "f36b38928849ef3853db727faa8c9ef104d611eb" }, - "_source": "git://github.com/polymerelements/iron-icon.git", + "_source": "git://github.com/PolymerElements/iron-icon.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-icon" + "_originalSource": "PolymerElements/iron-icon" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icon/.travis.yml b/dashboard-ui/bower_components/iron-icon/.travis.yml new file mode 100644 index 000000000..982392253 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/.travis.yml @@ -0,0 +1,25 @@ +language: node_js +sudo: false +before_script: + - npm install -g bower polylint web-component-tester + - bower install + - polylint +env: + global: + - secure: Cyo7MV8FASyf2EZyrSmDbmoZmopQhuTbV79Ntl6eDq6JxEOAApULHn6W+ht0tvmaA+L2cRNq3Z4uvy3tbZCI5SCgQuEKLDJFoghzNp4Izc54bBlJzsxMjcgxEEMbw1jDIKp+PJ+1+8oyT5H1NogcGoNWcvMCjn+8Vl64/999mhw= + - secure: dI3wfjJoooFlq6Kb8V1fkbc9N5jrvw7dExN4tp4KlvJFiXIvgb823jEyLGnK/oeVLwP9yncvOYxiG/enNbjpk6fId3zjwptN2H1am3pIsPQASOZJ0Pwvwa1dX7EYGk2kxOwY1pyX4is/QRVDrlUkLm3YAPOFfYJEiVB7m6TNFIo= + - 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" diff --git a/dashboard-ui/bower_components/iron-icon/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-icon/CONTRIBUTING.md new file mode 100644 index 000000000..f147978a3 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 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: [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. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +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 in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-icon/bower.json b/dashboard-ui/bower_components/iron-icon/bower.json index 6693f9643..38e4ba45d 100644 --- a/dashboard-ui/bower_components/iron-icon/bower.json +++ b/dashboard-ui/bower_components/iron-icon/bower.json @@ -1,7 +1,7 @@ { "name": "iron-icon", "private": true, - "version": "1.0.7", + "version": "1.0.8", "license": "http://polymer.github.io/LICENSE.txt", "description": "An element that supports displaying an icon", "main": "iron-icon.html", @@ -17,6 +17,7 @@ "type": "git", "url": "git://github.com/PolymerElements/iron-icon.git" }, + "ignore": [], "dependencies": { "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", "iron-meta": "polymerelements/iron-meta#^1.0.0", @@ -28,7 +29,7 @@ "iron-iconset": "polymerelements/iron-iconset#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" } } diff --git a/dashboard-ui/bower_components/iron-icon/index.html b/dashboard-ui/bower_components/iron-icon/index.html index e871f17d9..487bb5c38 100644 --- a/dashboard-ui/bower_components/iron-icon/index.html +++ b/dashboard-ui/bower_components/iron-icon/index.html @@ -2,11 +2,11 @@ diff --git a/dashboard-ui/bower_components/iron-icon/iron-icon.html b/dashboard-ui/bower_components/iron-icon/iron-icon.html index ff4951d4d..3428062b9 100644 --- a/dashboard-ui/bower_components/iron-icon/iron-icon.html +++ b/dashboard-ui/bower_components/iron-icon/iron-icon.html @@ -58,6 +58,10 @@ how to create a custom iconset. See the [iron-icons demo](iron-icons?view=demo:demo/index.html) to see the icons available in the various iconsets. +To load a subset of icons from one of the default `iron-icons` sets, you can +use the [poly-icon](https://poly-icon.appspot.com/) tool. It allows you +to select individual icons, and creates an iconset from them that you can +use directly in your elements. ### Styling @@ -138,7 +142,8 @@ Custom property | Description | Default * @type {!Polymer.IronMeta} */ _meta: { - value: Polymer.Base.create('iron-meta', {type: 'iconset'}) + value: Polymer.Base.create('iron-meta', {type: 'iconset'}), + observer: '_updateIcon' } }, @@ -163,7 +168,14 @@ Custom property | Description | Default /** @suppress {visibility} */ _updateIcon: function() { if (this._usesIconset()) { - if (this._iconsetName) { + if (this._img && this._img.parentNode) { + Polymer.dom(this.root).removeChild(this._img); + } + if (this._iconName === "") { + if (this._iconset) { + this._iconset.removeIcon(this); + } + } else if (this._iconsetName && this._meta) { this._iconset = /** @type {?Polymer.Iconset} */ ( this._meta.byKey(this._iconsetName)); if (this._iconset) { @@ -174,6 +186,9 @@ Custom property | Description | Default } } } else { + if (this._iconset) { + this._iconset.removeIcon(this); + } if (!this._img) { this._img = document.createElement('img'); this._img.style.width = '100%'; diff --git a/dashboard-ui/bower_components/iron-icon/test/index.html b/dashboard-ui/bower_components/iron-icon/test/index.html index 0a56bb769..4414532e8 100644 --- a/dashboard-ui/bower_components/iron-icon/test/index.html +++ b/dashboard-ui/bower_components/iron-icon/test/index.html @@ -1,5 +1,4 @@ - - - - - +--> Tests @@ -20,12 +16,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/iron-icon/test/iron-icon.html b/dashboard-ui/bower_components/iron-icon/test/iron-icon.html index dcc45ee39..3a51dd391 100644 --- a/dashboard-ui/bower_components/iron-icon/test/iron-icon.html +++ b/dashboard-ui/bower_components/iron-icon/test/iron-icon.html @@ -24,6 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + @@ -61,6 +62,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json index eea36c3d9..67faff1dd 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.1.3", + "version": "1.1.4", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ @@ -34,11 +34,11 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.1.3", + "_release": "1.1.4", "_resolution": { "type": "version", - "tag": "v1.1.3", - "commit": "9372abaa7925669fd1a34e9e73c973ed70a05f2f" + "tag": "v1.1.4", + "commit": "637c4ae4654b53d4ca29ba97239c1ffba13cfc93" }, "_source": "git://github.com/polymerelements/iron-menu-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-menu-behavior/bower.json b/dashboard-ui/bower_components/iron-menu-behavior/bower.json index 00022a1d5..2e82f8958 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.1.3", + "version": "1.1.4", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ diff --git a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html index 315ab8cde..b39241cfa 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html @@ -241,7 +241,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN // Do not focus the selected tab if the deepest target is part of the // menu element's local DOM and is focusable. - var rootTarget = Polymer.dom(event).rootTarget; + var rootTarget = /** @type {?HTMLElement} */( + Polymer.dom(event).rootTarget); if (rootTarget !== this && typeof rootTarget.tabIndex !== "undefined" && !this.isLightDescendant(rootTarget)) { return; } diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index fedc85052..11e925ace 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.2.4", "commit": "1ee4e2e11a9e5118320987d93fc2c03ae9a489f4" }, - "_source": "git://github.com/PolymerElements/iron-selector.git", + "_source": "git://github.com/polymerelements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-selector" + "_originalSource": "polymerelements/iron-selector" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.bower.json b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json index 3a6f86a87..964bc9e15 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/.bower.json +++ b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-drawer-panel", - "version": "1.0.6", + "version": "1.0.7", "description": "A responsive drawer panel", "authors": [ "The Polymer Authors" @@ -28,17 +28,18 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "paper-button": "PolymerElements/paper-button#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^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", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "main": "paper-drawer-panel.html", "ignore": [], - "_release": "1.0.6", + "_release": "1.0.7", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "9dd19ef9153ed303a5f8b6d573179cde31b2f5e6" + "tag": "v1.0.7", + "commit": "1d791255c062c0c4c4fd9f6f2b2c1ef16b533721" }, "_source": "git://github.com/PolymerElements/paper-drawer-panel.git", "_target": "~1.0.2", diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml b/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml index 4b042acb7..2ab76e4e1 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml +++ b/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml @@ -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: PLe0gvvFLKijrgyroIeymIP14SikK6RobNUOqHyUiLDCh9S2/vSBJUp8U5TYkVmpxMr+rcKXpfIhYt/bne97bARTnMjRQUa+rlraek6EPXyFILDsyaTosYD7rmY2f8ViiW+CM3eUA+ym0P8tvYONdTx+CEdO7S6esotfq3LHrLw= - secure: U4i/ZSfd87xQ+0YZCKxk3knQQk23V/2IxtSrvY42OnaGi10uz04Cad5XMuBcB1kCyRkAP/e9flQyp4iLaDpG+edm2fxJNPqXepWjtMr0rVFr2LoQ7dPAQCFkzO25dSiO+Wj4ffDO//hwgF5Xl/BXnyRBfSEjURZXr4EP+NjoMWU= -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" diff --git a/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md index 7b1014156..f147978a3 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md @@ -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: diff --git a/dashboard-ui/bower_components/paper-drawer-panel/bower.json b/dashboard-ui/bower_components/paper-drawer-panel/bower.json index d5e05e68d..9ca91021c 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/bower.json +++ b/dashboard-ui/bower_components/paper-drawer-panel/bower.json @@ -1,6 +1,6 @@ { "name": "paper-drawer-panel", - "version": "1.0.6", + "version": "1.0.7", "description": "A responsive drawer panel", "authors": [ "The Polymer Authors" @@ -28,8 +28,9 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "paper-button": "PolymerElements/paper-button#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^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", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "main": "paper-drawer-panel.html", diff --git a/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html b/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html index 528129f7f..a453ae709 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html +++ b/dashboard-ui/bower_components/paper-drawer-panel/demo/index.html @@ -16,7 +16,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - + @@ -24,6 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - -
+ +
+ + + +
flip drawer diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html index 3b14d1463..dfa8d9471 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html +++ b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html @@ -230,6 +230,8 @@ Custom property | Description | Default } .left-drawer.narrow-layout > #drawer:not(.iron-selected) { + visibility: hidden; + -webkit-transform: translateX(-100%); transform: translateX(-100%); } @@ -242,8 +244,10 @@ Custom property | Description | Default transform: translateX(100%); } - .right-drawer.narrow-layout.dragging > #drawer:not(.iron-selected), - .right-drawer.narrow-layout.peeking > #drawer:not(.iron-selected) { + .left-drawer.dragging > #drawer:not(.iron-selected), + .left-drawer.peeking > #drawer:not(.iron-selected), + .right-drawer.dragging > #drawer:not(.iron-selected), + .right-drawer.peeking > #drawer:not(.iron-selected) { visibility: visible; } @@ -272,7 +276,7 @@ Custom property | Description | Default box-sizing: border-box; } - iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { + iron-selector:not(.narrow-layout) ::content [paper-drawer-toggle] { display: none; } @@ -289,13 +293,13 @@ Custom property | Description | Default activate-event="" selected="[[selected]]"> -
+
- +
@@ -492,6 +496,25 @@ Custom property | Description | Default value: 'paper-drawer-toggle' }, + /** + * The CSS selector for the element that should receive focus when the drawer is open. + * By default, when the drawer opens, it focuses the first tabbable element. That is, + * the first element that can receive focus. + */ + drawerFocusSelector: { + type: String, + value: + 'a[href]:not([tabindex="-1"]),'+ + 'area[href]:not([tabindex="-1"]),'+ + 'input:not([disabled]):not([tabindex="-1"]),'+ + 'select:not([disabled]):not([tabindex="-1"]),'+ + 'textarea:not([disabled]):not([tabindex="-1"]),'+ + 'button:not([disabled]):not([tabindex="-1"]),'+ + 'iframe:not([tabindex="-1"]),'+ + '[tabindex]:not([tabindex="-1"]),'+ + '[contentEditable=true]:not([tabindex="-1"])' + }, + /** * Whether the transition is enabled. */ @@ -506,13 +529,22 @@ Custom property | Description | Default tap: '_onTap', track: '_onTrack', down: '_downHandler', - up: '_upHandler' + up: '_upHandler', + transitionend: '_onTransitionEnd' }, observers: [ - '_forceNarrowChanged(forceNarrow, defaultSelected)' + '_forceNarrowChanged(forceNarrow, defaultSelected)', + '_toggleFocusListener(selected)' ], + ready: function() { + // Avoid transition at the beginning e.g. page loads and enable + // transitions only after the element is rendered and ready. + this._transition = true; + this._boundFocusListener = this._didFocus.bind(this); + }, + /** * Toggles the panel open and closed. * @@ -544,16 +576,19 @@ Custom property | Description | Default this.selected = 'main'; }, - ready: function() { - // Avoid transition at the beginning e.g. page loads and enable - // transitions only after the element is rendered and ready. - this._transition = true; - }, - - _onMainTransitionEnd: function (e) { - if (e.currentTarget === this.$.main && (e.propertyName === 'left' || e.propertyName === 'right')) { + _onTransitionEnd: function (e) { + var target = Polymer.dom(e).localTarget; + if (target !== this) { + // ignore events coming from the light dom + return; + } + if (e.propertyName === 'left' || e.propertyName === 'right') { this.notifyResize(); } + if (e.propertyName === 'transform' && this.selected === 'drawer') { + var focusedChild = this._getAutoFocusedNode(); + focusedChild && focusedChild.focus(); + } }, _computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer, peeking) { @@ -606,15 +641,12 @@ Custom property | Description | Default this._trackEnd(event); break; } - }, _responsiveChange: function(narrow) { this._setNarrow(narrow); - if (this.narrow) { - this.selected = this.defaultSelected; - } + this.selected = this.narrow ? this.defaultSelected : null; this.setScrollDirection(this._swipeAllowed() ? 'y' : 'all'); this.fire('paper-responsive-change', {narrow: this.narrow}); @@ -724,12 +756,6 @@ Custom property | Description | Default } this._setPeeking(false); } - var dy = event.detail.dy; - var absDy = Math.abs(dy); - if (absDy >= 70) { - // Ignore trackx until we move past the edge peek. - return; - } this._moveDrawer(this._translateXForDeltaX(dx)); } @@ -743,13 +769,11 @@ Custom property | Description | Default this._transition = true; sharedPanel = null; this._moveDrawer(null); - var dx = event.detail.dx; - var dy = event.detail.dy; - var absDy = Math.abs(dy); + if (this.rightDrawer) { - this[xDirection ? 'closeDrawer' : 'openDrawer'](); + this[xDirection ? 'closeDrawer' : 'openDrawer'](); } else { - this[xDirection || dx > -80 || absDy >= 70 ? 'openDrawer' : 'closeDrawer'](); + this[xDirection ? 'openDrawer' : 'closeDrawer'](); } } }, @@ -758,16 +782,51 @@ Custom property | Description | Default if (translateX === null) { return ''; } - return this.hasWillChange ? 'translateX(' + translateX + 'px)' : 'translate3d(' + translateX + 'px, 0, 0)'; }, _moveDrawer: function(translateX) { this.transform(this._transformForTranslateX(translateX), this.$.drawer); - } + }, + _getDrawerContent: function() { + return Polymer.dom(this.$.drawerContent).getDistributedNodes()[0]; + }, + + _getAutoFocusedNode: function() { + var drawerContent = this._getDrawerContent(); + return Polymer.dom(drawerContent).querySelector(this.drawerFocusSelector) || drawerContent; + }, + + _toggleFocusListener: function(selected) { + if (selected === 'drawer') { + document.addEventListener('focus', this._boundFocusListener, true); + } else { + document.removeEventListener('focus', this._boundFocusListener, true); + } + }, + + _didFocus: function(event) { + var path = Polymer.dom(event).path; + var focusedChild = path[0]; + var drawerContent = this._getDrawerContent(); + var focusedChildCameFromDrawer = false; + var autoFocusedNode = this._getAutoFocusedNode(); + + while (!focusedChildCameFromDrawer && path[0] && path[0].hasAttribute) { + focusedChildCameFromDrawer = path.shift() === drawerContent; + } + if (!focusedChildCameFromDrawer && autoFocusedNode) { + autoFocusedNode.focus(); + } + }, + + _isDrawerClosed: function(narrow, selected) { + return !narrow || selected !== 'drawer'; + } }); + }()); diff --git a/dashboard-ui/bower_components/paper-drawer-panel/test/focus.html b/dashboard-ui/bower_components/paper-drawer-panel/test/focus.html new file mode 100644 index 000000000..5246f0e0b --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/test/focus.html @@ -0,0 +1,78 @@ + + + + + + paper-drawer-panel tests + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/test/index.html b/dashboard-ui/bower_components/paper-drawer-panel/test/index.html index 1509baa0a..1cdc93f16 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/test/index.html +++ b/dashboard-ui/bower_components/paper-drawer-panel/test/index.html @@ -20,8 +20,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN WCT.loadSuites([ 'positioning.html', 'small-devices.html', + 'focus.html', 'positioning.html?dom=shadow', - 'small-devices.html?dom=shadow' + 'small-devices.html?dom=shadow', + 'focus.html?dom=shadow' ]); diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 954f23319..4ba14e0db 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -34,6 +34,6 @@ "commit": "61fac558012d9ef56ea78ed5435de0c418a4afbb" }, "_source": "git://github.com/Polymer/polymer.git", - "_target": "^1.0.0", + "_target": "^1.2.0", "_originalSource": "Polymer/polymer" } \ No newline at end of file