mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update components
This commit is contained in:
parent
55511e7c07
commit
638a360cb2
@ -16,12 +16,12 @@
|
||||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.1.93",
|
||||
"_release": "1.1.93",
|
||||
"version": "1.1.94",
|
||||
"_release": "1.1.94",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.1.93",
|
||||
"commit": "3d971009690236323becba5c24803780a345ea54"
|
||||
"tag": "1.1.94",
|
||||
"commit": "7e52c39c2c6a43b00b845509e8b227420042ce6f"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "~1.1.5",
|
||||
|
@ -36,6 +36,6 @@
|
||||
"commit": "6d88f29f3a7181daa2a5c7f678de44f0a0e6a717"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
|
||||
"_target": "^1.0.0",
|
||||
"_target": "^1.3.1",
|
||||
"_originalSource": "PolymerElements/iron-flex-layout"
|
||||
}
|
@ -32,14 +32,14 @@
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"_release": "1.0.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"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"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.5.4",
|
||||
"version": "1.6.0",
|
||||
"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.5.4",
|
||||
"_release": "1.6.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.4",
|
||||
"commit": "ee81b7ae2e63fea82e60df17669fb07a65046a8c"
|
||||
"tag": "v1.6.0",
|
||||
"commit": "5179ec9ad80a9c30b77486ffe9599828f944ab4a"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.5.4",
|
||||
"version": "1.6.0",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
@ -100,6 +100,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h3>Use <code>always-on-top</code> to keep the overlay on top of others.</h3>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<button onclick="onTop.open()">Open always-on-top</button>
|
||||
<simple-overlay id="onTop" always-on-top tabindex=-1>
|
||||
<h2>Always on top</h2>
|
||||
<button onclick="backdrop2.open()">Open with backdrop</button>
|
||||
<button onclick="onTop.close()">Close this</button>
|
||||
</simple-overlay>
|
||||
<simple-overlay id="backdrop2" with-backdrop tabindex=-1>
|
||||
<h2>With backdrop</h2>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
<button onclick="backdrop2.close()">Close</button>
|
||||
</simple-overlay>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h3>An element with <code>IronOverlayBehavior</code> can be scrollable or contain scrollable content.</h3>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
|
@ -126,6 +126,13 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* Set to true to keep overlay always on top.
|
||||
*/
|
||||
alwaysOnTop: {
|
||||
type: Boolean
|
||||
},
|
||||
|
||||
/**
|
||||
* Shortcut to access to the overlay manager.
|
||||
* @private
|
||||
|
@ -85,8 +85,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
_bringOverlayAtIndexToFront: function(i) {
|
||||
var overlay = this._overlays[i];
|
||||
var lastI = this._overlays.length - 1;
|
||||
// Ensure always-on-top overlay stays on top.
|
||||
if (!overlay.alwaysOnTop && this._overlays[lastI].alwaysOnTop) {
|
||||
lastI--;
|
||||
}
|
||||
// If already the top element, return.
|
||||
if (!overlay || i === lastI) {
|
||||
if (!overlay || i >= lastI) {
|
||||
return;
|
||||
}
|
||||
// Update z-index to be on top.
|
||||
@ -119,6 +123,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
/**
|
||||
* Tracks overlays for z-index and focus management.
|
||||
* Ensures the last added overlay with always-on-top remains on top.
|
||||
* @param {Element} overlay
|
||||
*/
|
||||
addOverlay: function(overlay) {
|
||||
@ -127,12 +132,28 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
this._bringOverlayAtIndexToFront(i);
|
||||
return;
|
||||
}
|
||||
var minimumZ = Math.max(this.currentOverlayZ(), this._minimumZ);
|
||||
this._overlays.push(overlay);
|
||||
var newZ = this.currentOverlayZ();
|
||||
var insertionIndex = this._overlays.length;
|
||||
var currentOverlay = this._overlays[insertionIndex - 1];
|
||||
var minimumZ = Math.max(this._getZ(currentOverlay), this._minimumZ);
|
||||
var newZ = this._getZ(overlay);
|
||||
|
||||
// Ensure always-on-top overlay stays on top.
|
||||
if (currentOverlay && currentOverlay.alwaysOnTop && !overlay.alwaysOnTop) {
|
||||
// This bumps the z-index of +2.
|
||||
this._applyOverlayZ(currentOverlay, minimumZ);
|
||||
insertionIndex--;
|
||||
// Update minimumZ to match previous overlay's z-index.
|
||||
var previousOverlay = this._overlays[insertionIndex - 1];
|
||||
minimumZ = Math.max(this._getZ(previousOverlay), this._minimumZ);
|
||||
}
|
||||
|
||||
// Update z-index and insert overlay.
|
||||
if (newZ <= minimumZ) {
|
||||
this._applyOverlayZ(overlay, minimumZ);
|
||||
}
|
||||
this._overlays.splice(insertionIndex, 0, overlay);
|
||||
|
||||
// Get focused node.
|
||||
var element = this.deepActiveElement;
|
||||
overlay.restoreFocusNode = this._overlayParent(element) ? null : element;
|
||||
},
|
||||
|
@ -949,6 +949,57 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('always-on-top', function() {
|
||||
var overlay1, overlay2;
|
||||
|
||||
setup(function() {
|
||||
var f = fixture('multiple');
|
||||
overlay1 = f[0];
|
||||
overlay2 = f[1];
|
||||
overlay1.alwaysOnTop = true;
|
||||
});
|
||||
|
||||
test('stays on top', function(done) {
|
||||
runAfterOpen(overlay1, function() {
|
||||
runAfterOpen(overlay2, function() {
|
||||
var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
|
||||
var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
|
||||
assert.isAbove(zIndex1, zIndex2, 'overlay1 on top');
|
||||
assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay1, 'currentOverlay ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('stays on top also if another overlay is with-backdrop', function(done) {
|
||||
overlay2.withBackdrop = true;
|
||||
runAfterOpen(overlay1, function() {
|
||||
runAfterOpen(overlay2, function() {
|
||||
var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
|
||||
var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
|
||||
assert.isAbove(zIndex1, zIndex2, 'overlay1 on top');
|
||||
assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay1, 'currentOverlay ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('last overlay with always-on-top wins', function(done) {
|
||||
overlay2.alwaysOnTop = true;
|
||||
runAfterOpen(overlay1, function() {
|
||||
runAfterOpen(overlay2, function() {
|
||||
var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
|
||||
var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
|
||||
assert.isAbove(zIndex2, zIndex1, 'overlay2 on top');
|
||||
assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay2, 'currentOverlay ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
@ -962,7 +1013,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
assert.equal(overlay.getAttribute('aria-hidden'), 'true', 'overlay has aria-hidden="true"');
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -1945,7 +1945,7 @@ var AppInfo = {};
|
||||
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
|
||||
|
||||
define('fetch', [bowerPath + '/fetch/fetch']);
|
||||
define('objectassign', ['legacy/objectassign']);
|
||||
define('objectassign', [embyWebComponentsBowerPath + '/objectassign']);
|
||||
define('webcomponentsjs', [bowerPath + '/webcomponentsjs/webcomponents-lite.min.js']);
|
||||
define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user