mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
48d4b0c287
commit
c389d502e0
9 changed files with 95 additions and 41 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.60",
|
"version": "1.1.61",
|
||||||
"_release": "1.1.60",
|
"_release": "1.1.61",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.60",
|
"tag": "1.1.61",
|
||||||
"commit": "6b1287b7db17651fab4570e9c7c6cb8e8cdead53"
|
"commit": "8565fb2a1cb83dc5528e8e79f8f9bc9ef0b7cb7d"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -171,7 +171,7 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
}
|
}
|
||||||
|
|
||||||
var firstConnectionResult;
|
var firstConnectionResult;
|
||||||
function start() {
|
function start(options) {
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
|
@ -185,8 +185,10 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
page({
|
page({
|
||||||
click: true,
|
click: options.click || false,
|
||||||
hashbang: true,
|
hashbang: true,
|
||||||
enableHistory: enableHistory()
|
enableHistory: enableHistory()
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.3.0",
|
"tag": "v1.3.0",
|
||||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-selector"
|
"_originalSource": "polymerelements/iron-selector"
|
||||||
}
|
}
|
|
@ -45,7 +45,7 @@
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-behaviors"
|
"_originalSource": "polymerelements/paper-behaviors"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-drawer-panel",
|
"name": "paper-drawer-panel",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"description": "A responsive drawer panel",
|
"description": "A responsive drawer panel",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"main": "paper-drawer-panel.html",
|
"main": "paper-drawer-panel.html",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"_release": "1.0.8",
|
"_release": "1.0.9",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.9",
|
||||||
"commit": "673bc580a88a5cabbb612f29685cf21efac74c5b"
|
"commit": "d0f2c801380397e5d4334b273a2fef63099d4a2f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-drawer-panel.git",
|
"_source": "git://github.com/PolymerElements/paper-drawer-panel.git",
|
||||||
"_target": "~1.0.2",
|
"_target": "~1.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-drawer-panel",
|
"name": "paper-drawer-panel",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"description": "A responsive drawer panel",
|
"description": "A responsive drawer panel",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
|
|
@ -479,6 +479,8 @@ Custom property | Description | Default
|
||||||
/**
|
/**
|
||||||
* The panel that is being selected. `drawer` for the drawer panel and
|
* The panel that is being selected. `drawer` for the drawer panel and
|
||||||
* `main` for the main panel.
|
* `main` for the main panel.
|
||||||
|
*
|
||||||
|
* @type {string|null}
|
||||||
*/
|
*/
|
||||||
selected: {
|
selected: {
|
||||||
reflectToAttribute: true,
|
reflectToAttribute: true,
|
||||||
|
@ -500,6 +502,9 @@ Custom property | Description | Default
|
||||||
* The CSS selector for the element that should receive focus when the drawer is open.
|
* 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,
|
* By default, when the drawer opens, it focuses the first tabbable element. That is,
|
||||||
* the first element that can receive focus.
|
* the first element that can receive focus.
|
||||||
|
*
|
||||||
|
* To disable this behavior, you can set `drawerFocusSelector` to `null` or an empty string.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
drawerFocusSelector: {
|
drawerFocusSelector: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -586,8 +591,8 @@ Custom property | Description | Default
|
||||||
this.notifyResize();
|
this.notifyResize();
|
||||||
}
|
}
|
||||||
if (e.propertyName === 'transform' && this.selected === 'drawer') {
|
if (e.propertyName === 'transform' && this.selected === 'drawer') {
|
||||||
//var focusedChild = this._getAutoFocusedNode();
|
var focusedChild = this._getAutoFocusedNode();
|
||||||
//focusedChild && focusedChild.focus();
|
focusedChild && focusedChild.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -756,12 +761,6 @@ Custom property | Description | Default
|
||||||
}
|
}
|
||||||
this._setPeeking(false);
|
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));
|
this._moveDrawer(this._translateXForDeltaX(dx));
|
||||||
}
|
}
|
||||||
|
@ -776,13 +775,10 @@ Custom property | Description | Default
|
||||||
sharedPanel = null;
|
sharedPanel = null;
|
||||||
this._moveDrawer(null);
|
this._moveDrawer(null);
|
||||||
|
|
||||||
var dx = event.detail.dx;
|
|
||||||
var dy = event.detail.dy;
|
|
||||||
var absDy = Math.abs(dy);
|
|
||||||
if (this.rightDrawer) {
|
if (this.rightDrawer) {
|
||||||
this[xDirection ? 'closeDrawer' : 'openDrawer']();
|
this[xDirection ? 'closeDrawer' : 'openDrawer']();
|
||||||
} else {
|
} else {
|
||||||
this[xDirection || dx > -80 || absDy >= 70 ? 'openDrawer' : 'closeDrawer']();
|
this[xDirection ? 'openDrawer' : 'closeDrawer']();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -805,29 +801,33 @@ Custom property | Description | Default
|
||||||
|
|
||||||
_getAutoFocusedNode: function() {
|
_getAutoFocusedNode: function() {
|
||||||
var drawerContent = this._getDrawerContent();
|
var drawerContent = this._getDrawerContent();
|
||||||
return Polymer.dom(drawerContent).querySelector(this.drawerFocusSelector) || drawerContent;
|
|
||||||
|
return this.drawerFocusSelector ?
|
||||||
|
Polymer.dom(drawerContent).querySelector(this.drawerFocusSelector) || drawerContent : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleFocusListener: function(selected) {
|
_toggleFocusListener: function(selected) {
|
||||||
if (selected === 'drawer') {
|
if (selected === 'drawer') {
|
||||||
document.addEventListener('focus', this._boundFocusListener, true);
|
this.addEventListener('focus', this._boundFocusListener, true);
|
||||||
} else {
|
} else {
|
||||||
document.removeEventListener('focus', this._boundFocusListener, true);
|
this.removeEventListener('focus', this._boundFocusListener, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_didFocus: function(event) {
|
_didFocus: function(event) {
|
||||||
|
var autoFocusedNode = this._getAutoFocusedNode();
|
||||||
|
if (!autoFocusedNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var path = Polymer.dom(event).path;
|
var path = Polymer.dom(event).path;
|
||||||
var focusedChild = path[0];
|
var focusedChild = path[0];
|
||||||
var drawerContent = this._getDrawerContent();
|
var drawerContent = this._getDrawerContent();
|
||||||
var focusedChildCameFromDrawer = false;
|
var focusedChildCameFromDrawer = path.indexOf(drawerContent) !== -1;
|
||||||
var autoFocusedNode = this._getAutoFocusedNode();
|
|
||||||
|
|
||||||
while (!focusedChildCameFromDrawer && path[0] && path[0].hasAttribute) {
|
if (!focusedChildCameFromDrawer) {
|
||||||
focusedChildCameFromDrawer = path.shift() === drawerContent;
|
event.stopPropagation();
|
||||||
}
|
autoFocusedNode.focus();
|
||||||
if (!focusedChildCameFromDrawer && autoFocusedNode) {
|
|
||||||
//autoFocusedNode.focus();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="nestedDrawer">
|
||||||
|
<template>
|
||||||
|
<paper-drawer-panel force-narrow>
|
||||||
|
<div drawer>
|
||||||
|
<input id="innerLink1" tabindex="0" value="inside drawer 1">
|
||||||
|
</div>
|
||||||
|
<paper-drawer-panel id="drawer2" main force-narrow>
|
||||||
|
<div drawer>
|
||||||
|
<input id="innerLink2" tabindex="0" value="inside drawer 2">
|
||||||
|
</div>
|
||||||
|
<div main>
|
||||||
|
<input id="outerLink" tabindex="0" value="outside drawer">
|
||||||
|
</div>
|
||||||
|
</paper-drawer-panel>
|
||||||
|
</paper-drawer-panel>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function ensureDocumentHasFocus() {
|
function ensureDocumentHasFocus() {
|
||||||
window.top && window.top.focus();
|
window.top && window.top.focus();
|
||||||
|
@ -73,6 +92,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
suite('nested drawers', function() {
|
||||||
|
var drawer1, drawer2, innerLink1, innerLink2;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
drawer1 = fixture('nestedDrawer');
|
||||||
|
drawer2 = drawer1.querySelector('#drawer2');
|
||||||
|
innerLink1 = drawer1.querySelector('#innerLink1');
|
||||||
|
innerLink2 = drawer1.querySelector('#innerLink2');
|
||||||
|
ensureDocumentHasFocus();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should not cause stack overflow', function(done) {
|
||||||
|
var count = 0;
|
||||||
|
var spy = sinon.spy();
|
||||||
|
drawer1.openDrawer();
|
||||||
|
drawer2.openDrawer();
|
||||||
|
|
||||||
|
document.addEventListener('focus', spy, true);
|
||||||
|
|
||||||
|
MockInteractions.focus(innerLink1);
|
||||||
|
MockInteractions.focus(innerLink2);
|
||||||
|
|
||||||
|
Polymer.Base.async(function() {
|
||||||
|
if (spy.callCount > 10) {
|
||||||
|
throw new Error('stack overflow');
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.5",
|
||||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-ripple"
|
"_originalSource": "polymerelements/paper-ripple"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue