diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 723168077..1b9186c6d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.73", - "_release": "1.1.73", + "version": "1.1.75", + "_release": "1.1.75", "_resolution": { "type": "version", - "tag": "1.1.73", - "commit": "f8be47bfe5f076e14224b9a61a5e08590df41c4d" + "tag": "1.1.75", + "commit": "bc766156397a317445676c829b9b5e9dc058ca8e" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.1.5", diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index 51dc772a5..27b8b9215 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -71,7 +71,7 @@ pos.left += options.positionTo.offsetWidth / 2; // Account for popup size - we can't predict this yet so just estimate - pos.top -= (55 * options.items.length) / 2; + pos.top -= (45 * options.items.length) / 2; pos.left -= 80; // Avoid showing too close to the bottom @@ -233,6 +233,7 @@ if (pos) { dlg.style.position = 'fixed'; + dlg.style.margin = 0; dlg.style.left = pos.left + 'px'; dlg.style.top = pos.top + 'px'; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/confirm/confirm.js b/dashboard-ui/bower_components/emby-webcomponents/confirm/confirm.js index e1feb0340..5f343ed14 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/confirm/confirm.js +++ b/dashboard-ui/bower_components/emby-webcomponents/confirm/confirm.js @@ -55,7 +55,7 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) { dialogOptions.modal = false; dialogOptions.entryAnimationDuration = 160; - dialogOptions.exitAnimationDuration = 200; + dialogOptions.exitAnimationDuration = 160; dialogOptions.autoFocus = false; } @@ -72,18 +72,26 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) { html += '
'; dlg.innerHTML = html; document.body.appendChild(dlg); - paperdialoghelper.open(dlg).then(function () { + var confirmed = false; + dlg.querySelector('.btnConfirm').addEventListener('click', function () { + confirmed = true; + paperdialoghelper.close(dlg); + }); + dlg.querySelector('.btnCancel').addEventListener('click', function () { + confirmed = false; + paperdialoghelper.close(dlg); + }); - var confirmed = dlg.closingReason.confirmed; + paperdialoghelper.open(dlg).then(function () { if (confirmed) { resolve(); diff --git a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js index 0d39eb710..08f3e894f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js @@ -25,7 +25,7 @@ define([], function () { } var focusableTagNames = ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A', 'PAPER-BUTTON', 'PAPER-INPUT', 'PAPER-TEXTAREA', 'PAPER-ICON-BUTTON', 'PAPER-FAB', 'PAPER-CHECKBOX', 'PAPER-ICON-ITEM', 'PAPER-MENU-ITEM', 'PAPER-DROPDOWN-MENU', 'EMBY-DROPDOWN-MENU']; - var focusableContainerTagNames = ['BODY', 'PAPER-DIALOG']; + var focusableContainerTagNames = ['BODY', 'PAPER-DIALOG', 'DIALOG']; var focusableQuery = focusableTagNames.join(',') + ',.focusable'; function isFocusable(elem) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.css b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.css index 1cb020007..40e07e9e3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.css +++ b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.css @@ -1,5 +1,19 @@ .paperDialog { margin: 0; + border-radius: 4px; + z-index: 999999 !important; + background-color: #fff; + position: fixed; + display: block; + margin: 24px 40px; + -webkit-overflow-scrolling: touch; + background: #ffffff; + color: #212121; + -webkit-font-smoothing: antialiased; + box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4); + height: auto; + border: 0; + padding: 0; } .paperDialog.fixedSize { @@ -12,6 +26,7 @@ border-radius: 0 !important; max-height: none !important; max-width: none !important; + width: auto; } .paperDialog.scrollY { @@ -59,4 +74,56 @@ .noScroll { overflow-x: hidden !important; overflow-y: hidden !important; -} \ No newline at end of file +} + +.paperDialog > * { + margin-top: 20px; + padding: 0 24px; +} + + .paperDialog > *:first-child { + margin-top: 24px; + } + +.paperDialog .buttons { + position: relative; + padding: 8px 8px 8px 24px; + margin: 0; + color: #3f51b5; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +.dialogBackdrop { + background-color: #000; + opacity: 0; + position: fixed !important; + top: 0 !important; + bottom: 0 !important; + left: 0 !important; + right: 0 !important; + margin: 0 !important; + z-index: 999998 !important; + transition: opacity ease-out 0.2s; +} + +.paperDialog.opened + .dialogBackdrop { + opacity: .6; +} + +.paperDialog::backdrop { + opacity: 0; + background-color: #000; + transition: opacity ease-out 0.2s; +} + +.paperDialog.opened::backdrop { + opacity: .6; +} diff --git a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js index b33d31eea..bcf81e7e0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js @@ -1,4 +1,4 @@ -define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'paper-dialog', 'scale-up-animation', 'fade-out-animation', 'fade-in-animation', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, browser, layoutManager, inputManager) { +define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, browser, layoutManager, inputManager) { function paperDialogHashHandler(dlg, hash, resolve) { @@ -11,13 +11,13 @@ var isBack = self.originalUrl == window.location.href; - if (isBack || !dlg.opened) { + if (isBack || !isOpened(dlg)) { window.removeEventListener('popstate', onHashChange); } if (isBack) { self.closedByBack = true; - dlg.close(); + closeDialog(dlg); } } @@ -27,13 +27,15 @@ inputManager.off(dlg, onBackCommand); self.closedByBack = true; - dlg.close(); + closeDialog(dlg); e.preventDefault(); } } function onDialogClosed() { + removeBackdrop(dlg); + if (removeScrollLockOnClose) { document.body.classList.remove('noScroll'); } @@ -64,8 +66,43 @@ }, 1); } - dlg.addEventListener('iron-overlay-closed', onDialogClosed); - dlg.open(); + dlg.addEventListener('close', onDialogClosed); + + var center = !dlg.classList.contains('fixedSize'); + if (center) { + dlg.style.left = '50%'; + dlg.style.top = '50%'; + } + + dlg.classList.remove('hide'); + + // Use native methods if available + var hasManualBackdrop = false; + if (dlg.showModal) { + if (dlg.getAttribute('modal')) { + dlg.showModal(); + } else { + addBackdropOverlay(dlg); + hasManualBackdrop = true; + dlg.show(); + } + } else { + addBackdropOverlay(dlg); + hasManualBackdrop = true; + } + + if (!hasManualBackdrop) { + dlg.classList.add('opened'); + } + + if (center) { + centerDialog(dlg); + } + animateDialogOpen(dlg); + + if (dlg.getAttribute('data-autofocus') == 'true') { + focusManager.autoFocus(dlg); + } if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) { document.body.classList.add('noScroll'); @@ -81,6 +118,23 @@ } } + function addBackdropOverlay(dlg) { + + var backdrop = document.createElement('div'); + backdrop.classList.add('dialogBackdrop'); + dlg.parentNode.insertBefore(backdrop, dlg.nextSibling); + dlg.backdrop = backdrop; + + // Doing this immediately causes the opacity to jump immediately without animating + setTimeout(function () { + dlg.classList.add('opened'); + }, 0); + + backdrop.addEventListener('click', function () { + close(dlg); + }); + } + function isHistoryEnabled(dlg) { return dlg.getAttribute('data-history') == 'true'; } @@ -93,20 +147,84 @@ }); } + function isOpened(dlg) { + + //return dlg.opened; + return !dlg.classList.contains('hide'); + } + function close(dlg) { - if (dlg.opened) { + if (isOpened(dlg)) { if (isHistoryEnabled(dlg)) { history.back(); } else { - dlg.close(); + closeDialog(dlg); } } } - function onDialogOpened(e) { + function scaleUp(elem) { - focusManager.autoFocus(e.target); + var keyframes = [ + { transform: 'scale(0)', offset: 0 }, + { transform: 'scale(1,1)', offset: 1 }]; + var timing = elem.animationConfig.entry.timing; + return elem.animate(keyframes, timing); + } + + function fadeIn(elem) { + + var keyframes = [ + { opacity: '0', offset: 0 }, + { opacity: '1', offset: 1 }]; + var timing = elem.animationConfig.entry.timing; + return elem.animate(keyframes, timing); + } + + function fadeOut(elem) { + + var keyframes = [ + { opacity: '1', offset: 0 }, + { opacity: '0', offset: 1 }]; + var timing = elem.animationConfig.exit.timing; + return elem.animate(keyframes, timing); + } + + function closeDialog(dlg) { + + if (!dlg.classList.contains('hide')) { + + var onAnimationFinish = function () { + dlg.classList.add('hide'); + if (dlg.close) { + dlg.close(); + } else { + dlg.dispatchEvent(new CustomEvent('close', { + bubbles: false, + cancelable: false + })); + } + }; + if (!dlg.animationConfig || !dlg.animate) { + onAnimationFinish(); + return; + } + + fadeOut(dlg).onfinish = onAnimationFinish; + } + } + + function animateDialogOpen(dlg) { + + if (!dlg.animationConfig || !dlg.animate) { + return; + } + if (dlg.animationConfig.entry.name == 'fade-in-animation') { + fadeIn(dlg); + } else if (dlg.animationConfig.entry.name == 'scale-up-animation') { + scaleUp(dlg); + } } function shouldLockDocumentScroll(options) { @@ -122,14 +240,34 @@ return browser.mobile; } + function centerDialog(dlg) { + + dlg.style.marginLeft = (-(dlg.offsetWidth / 2)) + 'px'; + dlg.style.marginTop = (-(dlg.offsetHeight / 2)) + 'px'; + } + + function removeBackdrop(dlg) { + + var backdrop = dlg.backdrop; + + if (backdrop) { + dlg.backdrop = null; + + backdrop.classList.remove('opened'); + + setTimeout(function () { + backdrop.parentNode.removeChild(backdrop); + }, 300); + } + } + function createDialog(options) { options = options || {}; - var dlg = document.createElement('paper-dialog'); + var dlg = document.createElement('dialog'); - dlg.setAttribute('with-backdrop', 'with-backdrop'); - dlg.setAttribute('role', 'alertdialog'); + dlg.classList.add('hide'); if (shouldLockDocumentScroll(options)) { dlg.setAttribute('data-lockscroll', 'true'); @@ -147,8 +285,9 @@ dlg.setAttribute('modal', 'modal'); } - // seeing max call stack size exceeded in the debugger with this - dlg.setAttribute('noAutoFocus', 'noAutoFocus'); + if (options.autoFocus !== false) { + dlg.setAttribute('data-autofocus', 'true'); + } var defaultEntryAnimation = browser.animate && !browser.mobile ? 'scale-up-animation' : 'fade-in-animation'; dlg.entryAnimation = options.entryAnimation || defaultEntryAnimation; @@ -168,15 +307,15 @@ 'exit': { name: dlg.exitAnimation, node: dlg, - timing: { duration: options.exitAnimationDuration || 400, easing: 'ease-in' } + timing: { duration: options.exitAnimationDuration || 300, easing: 'ease-in' } } }; // too buggy in IE, not even worth it if (!browser.animate) { - dlg.animationConfig = null; - dlg.entryAnimation = null; - dlg.exitAnimation = null; + //dlg.animationConfig = null; + //dlg.entryAnimation = null; + //dlg.exitAnimation = null; } dlg.classList.add('paperDialog'); @@ -197,10 +336,6 @@ dlg.classList.add(options.size); } - if (options.autoFocus !== false) { - dlg.addEventListener('iron-overlay-opened', onDialogOpened); - } - return dlg; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/slideshow/slideshow.js b/dashboard-ui/bower_components/emby-webcomponents/slideshow/slideshow.js index daf3d65b3..c6830a6d0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/slideshow/slideshow.js +++ b/dashboard-ui/bower_components/emby-webcomponents/slideshow/slideshow.js @@ -57,7 +57,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs inputmanager.on(window, onInputCommand); - dlg.addEventListener('iron-overlay-closed', onDialogClosed); + dlg.addEventListener('close', onDialogClosed); if (options.interactive) { loadSwiper(dlg); diff --git a/dashboard-ui/bower_components/iron-input/.bower.json b/dashboard-ui/bower_components/iron-input/.bower.json index cbafbec95..f6848bcf7 100644 --- a/dashboard-ui/bower_components/iron-input/.bower.json +++ b/dashboard-ui/bower_components/iron-input/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-input", - "version": "1.0.8", + "version": "1.0.9", "description": "An input element with data binding", "authors": [ "The Polymer Authors" @@ -20,6 +20,7 @@ "homepage": "https://github.com/PolymerElements/iron-input", "ignore": [], "dependencies": { + "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0", "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0", "polymer": "Polymer/polymer#^1.0.0" }, @@ -28,14 +29,14 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^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" }, - "_release": "1.0.8", + "_release": "1.0.9", "_resolution": { "type": "version", - "tag": "1.0.8", - "commit": "55d2b39ead32b8d90da538daa1a6681fd9ae89d9" + "tag": "v1.0.9", + "commit": "6565b5d1b5f7030eb05378718163def8e9c709b7" }, "_source": "git://github.com/PolymerElements/iron-input.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-input/.travis.yml b/dashboard-ui/bower_components/iron-input/.travis.yml index a4c2bd89a..fb3535f65 100644 --- a/dashboard-ui/bower_components/iron-input/.travis.yml +++ b/dashboard-ui/bower_components/iron-input/.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: AnFRDBxxASn2RP4u+CHJS04g2klVTM+YL1fgNfkNIiECChymGRkeBiF7zvWPfodqPGKWhBZPAMxVuFKbztawQ95kWlbPSTNJtWhHhPcRarV5AYvjhyUV372E3REZ4CGt+T8nghD9bdJiMX5x0pXAz+wfBPPpiHwbiSPPjFLFvTs= - secure: SvsE+VQL35CZ967ZVy0+7o5xclnBM8egjhsjNRG7WxVPZQboCQ3Xwm8tIDQSWeagM3ZQRkTGca4ta91F1ZEhm4Jdt5CwKhhSNC6JgS3CX819r9UKgUnSS3nvWdqcZq4GXcMoOZm4qE9ttd3xdoKCfkLRQlEGAvM2TEw69mBhj24= -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/iron-input/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-input/CONTRIBUTING.md index 7b1014156..f147978a3 100644 --- a/dashboard-ui/bower_components/iron-input/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/iron-input/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/iron-input/bower.json b/dashboard-ui/bower_components/iron-input/bower.json index 18152b267..9b92c3508 100644 --- a/dashboard-ui/bower_components/iron-input/bower.json +++ b/dashboard-ui/bower_components/iron-input/bower.json @@ -1,6 +1,6 @@ { "name": "iron-input", - "version": "1.0.8", + "version": "1.0.9", "description": "An input element with data binding", "authors": [ "The Polymer Authors" @@ -20,6 +20,7 @@ "homepage": "https://github.com/PolymerElements/iron-input", "ignore": [], "dependencies": { + "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0", "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0", "polymer": "Polymer/polymer#^1.0.0" }, @@ -28,7 +29,7 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^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" } } diff --git a/dashboard-ui/bower_components/iron-input/iron-input.html b/dashboard-ui/bower_components/iron-input/iron-input.html index e788ccdb0..4eee9f3c6 100644 --- a/dashboard-ui/bower_components/iron-input/iron-input.html +++ b/dashboard-ui/bower_components/iron-input/iron-input.html @@ -9,6 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> + diff --git a/dashboard-ui/bower_components/iron-input/test/index.html b/dashboard-ui/bower_components/iron-input/test/index.html index 01d129704..482b8debb 100644 --- a/dashboard-ui/bower_components/iron-input/test/index.html +++ b/dashboard-ui/bower_components/iron-input/test/index.html @@ -8,7 +8,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> -