mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update shared components
This commit is contained in:
parent
ee11212148
commit
6f21a963ea
52 changed files with 1405 additions and 1023 deletions
|
@ -6,7 +6,11 @@ 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
|
||||
--><script>(function () {
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<script>(function () {
|
||||
function resolve() {
|
||||
document.body.removeAttribute('unresolved');
|
||||
}
|
||||
|
@ -22,11 +26,13 @@ addEventListener('DOMContentLoaded', resolve);
|
|||
}());window.Polymer = {
|
||||
Settings: function () {
|
||||
var settings = window.Polymer || {};
|
||||
if (!settings.noUrlSettings) {
|
||||
var parts = location.search.slice(1).split('&');
|
||||
for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {
|
||||
o = o.split('=');
|
||||
o[0] && (settings[o[0]] = o[1] || true);
|
||||
}
|
||||
}
|
||||
settings.wantShadow = settings.dom === 'shadow';
|
||||
settings.hasShadow = Boolean(Element.prototype.createShadowRoot);
|
||||
settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;
|
||||
|
@ -173,8 +179,14 @@ _addFeature: function (feature) {
|
|||
this.extend(this, feature);
|
||||
},
|
||||
registerCallback: function () {
|
||||
if (settings.lazyRegister === 'max') {
|
||||
if (this.beforeRegister) {
|
||||
this.beforeRegister();
|
||||
}
|
||||
} else {
|
||||
this._desugarBehaviors();
|
||||
this._doBehavior('beforeRegister');
|
||||
}
|
||||
this._registerFeatures();
|
||||
if (!settings.lazyRegister) {
|
||||
this.ensureRegisterFinished();
|
||||
|
@ -193,7 +205,11 @@ ensureRegisterFinished: function () {
|
|||
this._ensureRegisterFinished(this);
|
||||
},
|
||||
_ensureRegisterFinished: function (proto) {
|
||||
if (proto.__hasRegisterFinished !== proto.is) {
|
||||
if (proto.__hasRegisterFinished !== proto.is || !proto.is) {
|
||||
if (settings.lazyRegister === 'max') {
|
||||
proto._desugarBehaviors();
|
||||
proto._doBehaviorOnly('beforeRegister');
|
||||
}
|
||||
proto.__hasRegisterFinished = proto.is;
|
||||
if (proto._finishRegisterFeatures) {
|
||||
proto._finishRegisterFeatures();
|
||||
|
@ -229,14 +245,14 @@ newValue
|
|||
_attributeChangedImpl: function (name) {
|
||||
this._setAttributeToProperty(this, name);
|
||||
},
|
||||
extend: function (prototype, api) {
|
||||
if (prototype && api) {
|
||||
var n$ = Object.getOwnPropertyNames(api);
|
||||
extend: function (target, source) {
|
||||
if (target && source) {
|
||||
var n$ = Object.getOwnPropertyNames(source);
|
||||
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
|
||||
this.copyOwnProperty(n, api, prototype);
|
||||
this.copyOwnProperty(n, source, target);
|
||||
}
|
||||
}
|
||||
return prototype || api;
|
||||
return target || source;
|
||||
},
|
||||
mixin: function (target, source) {
|
||||
for (var i in source) {
|
||||
|
@ -428,6 +444,11 @@ this._invokeBehavior(this.behaviors[i], name, args);
|
|||
}
|
||||
this._invokeBehavior(this, name, args);
|
||||
},
|
||||
_doBehaviorOnly: function (name, args) {
|
||||
for (var i = 0; i < this.behaviors.length; i++) {
|
||||
this._invokeBehavior(this.behaviors[i], name, args);
|
||||
}
|
||||
},
|
||||
_invokeBehavior: function (b, name, args) {
|
||||
var fn = b[name];
|
||||
if (fn) {
|
||||
|
@ -679,7 +700,7 @@ default:
|
|||
return value != null ? value : undefined;
|
||||
}
|
||||
}
|
||||
});Polymer.version = '1.6.0';Polymer.Base._addFeature({
|
||||
});Polymer.version = "1.6.1";Polymer.Base._addFeature({
|
||||
_registerFeatures: function () {
|
||||
this._prepIs();
|
||||
this._prepBehaviors();
|
||||
|
@ -709,7 +730,3 @@ this._marshalBehaviors();
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue