mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
dbf135beac
commit
2a2b9b7fe5
32 changed files with 322 additions and 172 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
@ -35,11 +35,11 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-overlay-behavior",
|
||||
"_release": "1.0.4",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.4",
|
||||
"commit": "7939cabf4f23467a0d02b572094ef05d35ad0dcc"
|
||||
"tag": "v1.0.5",
|
||||
"commit": "f03cea265587c724cf3a85aef76b2ab7ccfd2b94"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-overlay-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
|
|
@ -145,8 +145,8 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
|
||||
/**
|
||||
* Fired after the `iron-overlay` closes.
|
||||
* @event iron-overlay-closed {{canceled: boolean}} detail -
|
||||
* canceled: True if the overlay was canceled.
|
||||
* @event iron-overlay-closed
|
||||
* @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute
|
||||
*/
|
||||
|
||||
listeners: {
|
||||
|
@ -250,7 +250,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
// overlay becomes visible here
|
||||
this.style.display = '';
|
||||
// force layout to ensure transitions will go
|
||||
this.offsetWidth;
|
||||
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||
if (this.opened) {
|
||||
this._renderOpened();
|
||||
} else {
|
||||
|
@ -374,7 +374,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
this.style.display = 'none';
|
||||
this.style.transform = this.style.webkitTransform = '';
|
||||
// force layout to avoid application of transform
|
||||
this.offsetWidth;
|
||||
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||
this.style.transition = this.style.webkitTransition = '';
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "polymer",
|
||||
"version": "1.0.9",
|
||||
"version": "1.1.0",
|
||||
"main": [
|
||||
"polymer.html"
|
||||
],
|
||||
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"private": true,
|
||||
"homepage": "https://github.com/Polymer/polymer",
|
||||
"_release": "1.0.9",
|
||||
"_release": "1.1.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.9",
|
||||
"commit": "8e894841ae36be85bade4b42f858ccb99b770e5d"
|
||||
"tag": "v1.1.0",
|
||||
"commit": "67fb2f85fd66d8556fc07cf1dec41ff5273fa68a"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "polymer",
|
||||
"version": "1.0.9",
|
||||
"version": "1.1.0",
|
||||
"main": [
|
||||
"polymer.html"
|
||||
],
|
||||
|
|
|
@ -247,19 +247,14 @@ return m;
|
|||
}
|
||||
});
|
||||
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
||||
if (cePolyfill) {
|
||||
var ready = CustomElements.ready;
|
||||
CustomElements.ready = true;
|
||||
}
|
||||
document.registerElement('dom-module', DomModule);
|
||||
if (cePolyfill) {
|
||||
CustomElements.ready = ready;
|
||||
}
|
||||
function forceDocumentUpgrade() {
|
||||
if (cePolyfill) {
|
||||
var script = document._currentScript || document.currentScript;
|
||||
if (script) {
|
||||
CustomElements.upgradeAll(script.ownerDocument);
|
||||
var doc = script && script.ownerDocument;
|
||||
if (doc && !doc.__customElementsForceUpgraded) {
|
||||
doc.__customElementsForceUpgraded = true;
|
||||
CustomElements.upgradeAll(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -563,7 +558,7 @@ debouncer.stop();
|
|||
}
|
||||
}
|
||||
});
|
||||
Polymer.version = '1.0.9';
|
||||
Polymer.version = '1.1.0';
|
||||
Polymer.Base._addFeature({
|
||||
_registerFeatures: function () {
|
||||
this._prepIs();
|
||||
|
|
|
@ -458,11 +458,14 @@ Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
|
|||
},
|
||||
appendChild: function (node) {
|
||||
var handled;
|
||||
this._ensureContentLogicalInfo(node);
|
||||
this._removeNodeFromHost(node, true);
|
||||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
this._addLogicalInfo(node, this.node);
|
||||
this._addNodeToHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._addNodeToHost(node);
|
||||
}
|
||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||
|
@ -476,9 +479,9 @@ if (!ref_node) {
|
|||
return this.appendChild(node);
|
||||
}
|
||||
var handled;
|
||||
this._ensureContentLogicalInfo(node);
|
||||
this._removeNodeFromHost(node, true);
|
||||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
var children = this.childNodes;
|
||||
var index = children.indexOf(ref_node);
|
||||
if (index < 0) {
|
||||
|
@ -487,6 +490,8 @@ throw Error('The ref_node to be inserted before is not a child ' + 'of this node
|
|||
this._addLogicalInfo(node, this.node, index);
|
||||
this._addNodeToHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._addNodeToHost(node);
|
||||
}
|
||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
||||
|
@ -504,6 +509,8 @@ var handled;
|
|||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
this._removeNodeFromHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._removeNodeFromHost(node);
|
||||
}
|
||||
if (!handled) {
|
||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||
|
@ -572,10 +579,27 @@ return true;
|
|||
}
|
||||
},
|
||||
_updateInsertionPoints: function (host) {
|
||||
host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||
var i$ = host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||
for (var i = 0, c; i < i$.length; i++) {
|
||||
c = i$[i];
|
||||
saveLightChildrenIfNeeded(c);
|
||||
saveLightChildrenIfNeeded(factory(c).parentNode);
|
||||
}
|
||||
},
|
||||
_nodeIsInLogicalTree: function (node) {
|
||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || this._ownerShadyRootForNode(node) || node.shadyRoot);
|
||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || node.shadyRoot);
|
||||
},
|
||||
_ensureContentLogicalInfo: function (node) {
|
||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
var c$ = Array.prototype.slice.call(node.childNodes);
|
||||
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
|
||||
this._ensureContentLogicalInfo(n);
|
||||
}
|
||||
} else if (node.localName === CONTENT) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
saveLightChildrenIfNeeded(node);
|
||||
}
|
||||
},
|
||||
_parentNeedsDistribution: function (parent) {
|
||||
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
||||
|
@ -629,14 +653,12 @@ node = factory(node).parentNode;
|
|||
}
|
||||
},
|
||||
_addNodeToHost: function (node) {
|
||||
var checkNode = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.firstChild : node;
|
||||
var root = this._ownerShadyRootForNode(checkNode);
|
||||
var root = this.getOwnerRoot();
|
||||
if (root) {
|
||||
root.host._elementAdd(node);
|
||||
}
|
||||
},
|
||||
_addLogicalInfo: function (node, container, index) {
|
||||
saveLightChildrenIfNeeded(container);
|
||||
var children = factory(container).childNodes;
|
||||
index = index === undefined ? children.length : index;
|
||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
|
@ -1163,8 +1185,13 @@ this.shadyRoot = this.root;
|
|||
this.shadyRoot._distributionClean = false;
|
||||
this.shadyRoot._isShadyRoot = true;
|
||||
this.shadyRoot._dirtyRoots = [];
|
||||
this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||
saveLightChildrenIfNeeded(this.shadyRoot);
|
||||
for (var i = 0, c; i < i$.length; i++) {
|
||||
c = i$[i];
|
||||
saveLightChildrenIfNeeded(c);
|
||||
saveLightChildrenIfNeeded(c.parentNode);
|
||||
}
|
||||
this.shadyRoot.host = this;
|
||||
},
|
||||
get domHost() {
|
||||
|
@ -1399,14 +1426,12 @@ if (newChildParent !== parentNode) {
|
|||
removeFromComposedParent(newChildParent, newChild);
|
||||
}
|
||||
remove(newChild);
|
||||
saveLightChildrenIfNeeded(parentNode);
|
||||
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
||||
newChild._composedParent = parentNode;
|
||||
}
|
||||
function remove(node) {
|
||||
var parentNode = getComposedParent(node);
|
||||
if (parentNode) {
|
||||
saveLightChildrenIfNeeded(parentNode);
|
||||
node._composedParent = null;
|
||||
nativeRemoveChild.call(parentNode, node);
|
||||
}
|
||||
|
|
115
dashboard-ui/bower_components/polymer/polymer.html
vendored
115
dashboard-ui/bower_components/polymer/polymer.html
vendored
|
@ -637,8 +637,7 @@ prevent = dy > dx;
|
|||
prevent = dx > dy;
|
||||
}
|
||||
if (prevent) {
|
||||
// This prevents horizontal scrolling in safari
|
||||
//ev.preventDefault();
|
||||
ev.preventDefault();
|
||||
} else {
|
||||
Gestures.prevent('track');
|
||||
}
|
||||
|
@ -2187,7 +2186,7 @@ MIXIN_RULE: 1000
|
|||
OPEN_BRACE: '{',
|
||||
CLOSE_BRACE: '}',
|
||||
_rx: {
|
||||
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
|
||||
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
|
||||
port: /@import[^;]*;/gim,
|
||||
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
||||
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
||||
|
@ -2203,7 +2202,8 @@ return api;
|
|||
}();
|
||||
Polymer.StyleUtil = function () {
|
||||
return {
|
||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css]',
|
||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
|
||||
INCLUDE_ATTR: 'include',
|
||||
toCssText: function (rules, callback, preserveProperties) {
|
||||
if (typeof rules === 'string') {
|
||||
rules = this.parser.parse(rules);
|
||||
|
@ -2258,27 +2258,52 @@ afterNode = n$[n$.length - 1];
|
|||
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
||||
return style;
|
||||
},
|
||||
cssFromModules: function (moduleIds) {
|
||||
var modules = moduleIds.trim().split(' ');
|
||||
var cssText = '';
|
||||
for (var i = 0; i < modules.length; i++) {
|
||||
cssText += this.cssFromModule(modules[i]);
|
||||
}
|
||||
return cssText;
|
||||
},
|
||||
cssFromModule: function (moduleId) {
|
||||
var m = Polymer.DomModule.import(moduleId);
|
||||
if (m && !m._cssText) {
|
||||
m._cssText = this._cssFromElement(m);
|
||||
}
|
||||
return m && m._cssText || '';
|
||||
},
|
||||
_cssFromElement: function (element) {
|
||||
var cssText = '';
|
||||
var e$ = Array.prototype.slice.call(m.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||
for (var i = 0, e; i < e$.length; i++) {
|
||||
var content = element.content || element;
|
||||
var sourceDoc = element.ownerDocument;
|
||||
var e$ = Array.prototype.slice.call(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||
for (var i = 0, e, resolveDoc, addModule; i < e$.length; i++) {
|
||||
e = e$[i];
|
||||
resolveDoc = sourceDoc;
|
||||
addModule = null;
|
||||
if (e.localName === 'template') {
|
||||
cssText += this._cssFromElement(e);
|
||||
} else {
|
||||
if (e.localName === 'style') {
|
||||
addModule = e.getAttribute(this.INCLUDE_ATTR);
|
||||
e = e.__appliedElement || e;
|
||||
e.parentNode.removeChild(e);
|
||||
} else {
|
||||
e = e.import && e.import.body;
|
||||
resolveDoc = e.ownerDocument;
|
||||
}
|
||||
if (e) {
|
||||
cssText += Polymer.ResolveUrl.resolveCss(e.textContent, e.ownerDocument);
|
||||
cssText += this.resolveCss(e.textContent, resolveDoc);
|
||||
}
|
||||
}
|
||||
m._cssText = cssText;
|
||||
if (addModule) {
|
||||
cssText += this.cssFromModules(addModule);
|
||||
}
|
||||
return m && m._cssText || '';
|
||||
}
|
||||
return cssText;
|
||||
},
|
||||
resolveCss: Polymer.ResolveUrl.resolveCss,
|
||||
parser: Polymer.CssParse,
|
||||
ruleTypes: Polymer.CssParse.types
|
||||
};
|
||||
|
@ -3179,7 +3204,8 @@ var styleTransformer = Polymer.StyleTransformer;
|
|||
Polymer({
|
||||
is: 'custom-style',
|
||||
extends: 'style',
|
||||
created: function () {
|
||||
properties: { include: String },
|
||||
ready: function () {
|
||||
this._tryApply();
|
||||
},
|
||||
attached: function () {
|
||||
|
@ -3191,7 +3217,7 @@ if (this.parentNode && this.parentNode.localName !== 'dom-module') {
|
|||
this._appliesToDocument = true;
|
||||
var e = this.__appliedElement || this;
|
||||
styleDefaults.addStyle(e);
|
||||
if (e.textContent) {
|
||||
if (e.textContent || this.include) {
|
||||
this._apply();
|
||||
} else {
|
||||
var observer = new MutationObserver(function () {
|
||||
|
@ -3205,6 +3231,9 @@ observer.observe(e, { childList: true });
|
|||
},
|
||||
_apply: function () {
|
||||
var e = this.__appliedElement || this;
|
||||
if (this.include) {
|
||||
e.textContent += styleUtil.cssFromModules(this.include);
|
||||
}
|
||||
this._computeStyleProperties();
|
||||
var props = this._styleProperties;
|
||||
var self = this;
|
||||
|
@ -3542,29 +3571,36 @@ items.push(store[key]);
|
|||
return items;
|
||||
},
|
||||
_applySplices: function (splices) {
|
||||
var keySplices = [];
|
||||
for (var i = 0; i < splices.length; i++) {
|
||||
var j, o, key, s = splices[i];
|
||||
var keyMap = {}, key, i;
|
||||
splices.forEach(function (s) {
|
||||
s.addedKeys = [];
|
||||
for (i = 0; i < s.removed.length; i++) {
|
||||
key = this.getKey(s.removed[i]);
|
||||
keyMap[key] = keyMap[key] ? null : -1;
|
||||
}
|
||||
for (i = 0; i < s.addedCount; i++) {
|
||||
var item = this.userArray[s.index + i];
|
||||
key = this.getKey(item);
|
||||
key = key === undefined ? this.add(item) : key;
|
||||
keyMap[key] = keyMap[key] ? null : 1;
|
||||
s.addedKeys.push(key);
|
||||
}
|
||||
}, this);
|
||||
var removed = [];
|
||||
for (j = 0; j < s.removed.length; j++) {
|
||||
o = s.removed[j];
|
||||
key = this.remove(o);
|
||||
var added = [];
|
||||
for (var key in keyMap) {
|
||||
if (keyMap[key] < 0) {
|
||||
this.removeKey(key);
|
||||
removed.push(key);
|
||||
}
|
||||
var added = [];
|
||||
for (j = 0; j < s.addedCount; j++) {
|
||||
o = this.userArray[s.index + j];
|
||||
key = this.add(o);
|
||||
if (keyMap[key] > 0) {
|
||||
added.push(key);
|
||||
}
|
||||
keySplices.push({
|
||||
index: s.index,
|
||||
removed: removed,
|
||||
removedItems: s.removed,
|
||||
added: added
|
||||
});
|
||||
}
|
||||
return keySplices;
|
||||
return [{
|
||||
removed: removed,
|
||||
added: added
|
||||
}];
|
||||
}
|
||||
};
|
||||
Polymer.Collection.get = function (userArray) {
|
||||
|
@ -3659,11 +3695,13 @@ this.collection = null;
|
|||
} else {
|
||||
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
||||
}
|
||||
this._splices = [];
|
||||
this._keySplices = [];
|
||||
this._indexSplices = [];
|
||||
this._needFullRefresh = true;
|
||||
this._debounceTemplate(this._render);
|
||||
} else if (change.path == 'items.splices') {
|
||||
this._splices = this._splices.concat(change.value.keySplices);
|
||||
this._keySplices = this._keySplices.concat(change.value.keySplices);
|
||||
this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
|
||||
this._debounceTemplate(this._render);
|
||||
} else {
|
||||
var subpath = change.path.slice(6);
|
||||
|
@ -3700,16 +3738,17 @@ this._applyFullRefresh();
|
|||
this._needFullRefresh = false;
|
||||
} else {
|
||||
if (this._sortFn) {
|
||||
this._applySplicesUserSort(this._splices);
|
||||
this._applySplicesUserSort(this._keySplices);
|
||||
} else {
|
||||
if (this._filterFn) {
|
||||
this._applyFullRefresh();
|
||||
} else {
|
||||
this._applySplicesArrayOrder(this._splices);
|
||||
this._applySplicesArrayOrder(this._indexSplices);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._splices = [];
|
||||
this._keySplices = [];
|
||||
this._indexSplices = [];
|
||||
var keyToIdx = this._keyToInstIdx = {};
|
||||
for (var i = 0; i < this._instances.length; i++) {
|
||||
var inst = this._instances[i];
|
||||
|
@ -3847,10 +3886,10 @@ pool.push(inst);
|
|||
}
|
||||
}
|
||||
this._instances.splice(s.index, s.removed.length);
|
||||
for (var i = 0; i < s.added.length; i++) {
|
||||
for (var i = 0; i < s.addedKeys.length; i++) {
|
||||
var inst = {
|
||||
isPlaceholder: true,
|
||||
key: s.added[i]
|
||||
key: s.addedKeys[i]
|
||||
};
|
||||
this._instances.splice(s.index + i, 0, inst);
|
||||
}
|
||||
|
@ -3959,12 +3998,12 @@ is: 'array-selector',
|
|||
properties: {
|
||||
items: {
|
||||
type: Array,
|
||||
observer: '_resetSelection'
|
||||
observer: 'clearSelection'
|
||||
},
|
||||
multi: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
observer: '_resetSelection'
|
||||
observer: 'clearSelection'
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
|
@ -3975,7 +4014,7 @@ type: Boolean,
|
|||
value: false
|
||||
}
|
||||
},
|
||||
_resetSelection: function () {
|
||||
clearSelection: function () {
|
||||
if (Array.isArray(this.selected)) {
|
||||
for (var i = 0; i < this.selected.length; i++) {
|
||||
this.unlinkPaths('selected.' + i);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.10",
|
||||
"version": "0.7.11",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -15,11 +15,11 @@
|
|||
],
|
||||
"license": "BSD",
|
||||
"ignore": [],
|
||||
"_release": "0.7.10",
|
||||
"_release": "0.7.11",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.7.10",
|
||||
"commit": "de2ee76eb2cb5a48b10e37db9e7e4c6f7fea71ee"
|
||||
"tag": "v0.7.11",
|
||||
"commit": "ce6321507de6161ec52b43f82a6c36eda614d750"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/webcomponentsjs.git",
|
||||
"_target": "^0.7.2",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.10",
|
||||
"version": "0.7.11",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webcomponents.js",
|
||||
"version": "0.7.10",
|
||||
"version": "0.7.11",
|
||||
"description": "webcomponents.js",
|
||||
"main": "webcomponents.js",
|
||||
"directories": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
|
@ -2292,7 +2292,7 @@ if (typeof HTMLTemplateElement === "undefined") {
|
|||
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
||||
HTMLTemplateElement.decorate = function(template) {
|
||||
if (!template.content) {
|
||||
template.content = template.ownerDocument.createDocumentFragment();
|
||||
template.content = contentDoc.createDocumentFragment();
|
||||
}
|
||||
var child;
|
||||
while (child = template.firstChild) {
|
||||
|
@ -2310,6 +2310,7 @@ if (typeof HTMLTemplateElement === "undefined") {
|
|||
},
|
||||
set: function(text) {
|
||||
contentDoc.body.innerHTML = text;
|
||||
HTMLTemplateElement.bootstrap(contentDoc);
|
||||
while (this.content.firstChild) {
|
||||
this.content.removeChild(this.content.firstChild);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* 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
|
||||
*/
|
||||
// @version 0.7.10
|
||||
// @version 0.7.11
|
||||
window.WebComponents = window.WebComponents || {};
|
||||
|
||||
(function(scope) {
|
||||
|
@ -4694,7 +4694,7 @@ if (WebComponents.flags.shadow) {
|
|||
}
|
||||
}
|
||||
};
|
||||
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
||||
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
||||
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
|
||||
function stylesToCssText(styles, preserveComments) {
|
||||
var cssText = "";
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -939,8 +939,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 24px;
|
||||
height: 19px;
|
||||
padding-top: 3px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background: rgba(82, 181, 75, .8);
|
||||
|
@ -971,11 +970,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
z-index: 1;
|
||||
}
|
||||
|
||||
.pieIndicator .fa {
|
||||
color: #fff;
|
||||
z-index: 4;
|
||||
.pieIndicator iron-icon {
|
||||
position: absolute;
|
||||
margin: 4px 0 0 6px;
|
||||
z-index: 4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pie {
|
||||
|
@ -987,7 +985,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
-o-border-radius: 50px;
|
||||
border-radius: 50px;
|
||||
clip: rect(0px, 12px, 24px, 0px);
|
||||
background-color: rgba(10, 10, 10, .9);
|
||||
background-color: rgba(10, 10, 10, 1);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
<div>
|
||||
<paper-checkbox id="chkWifi">${OptionSyncOnlyOnWifi}</paper-checkbox>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div>
|
||||
<paper-checkbox id="chkSyncLosslessAudio">${OptionSyncLosslessAudioOriginal}</paper-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
|
|
@ -64,6 +64,14 @@
|
|||
|
||||
return appStorage.getItem('syncOnlyOnWifi') != 'false';
|
||||
},
|
||||
syncLosslessAudio: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
update('syncLosslessAudio', val.toString());
|
||||
}
|
||||
|
||||
return appStorage.getItem('syncLosslessAudio') != 'false';
|
||||
},
|
||||
syncPath: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
|
|
|
@ -2159,18 +2159,18 @@
|
|||
}
|
||||
|
||||
var degree = (item.SyncPercent / 100) * 360;
|
||||
return '<div class="pieIndicator"><i class="fa fa-refresh"></i><div class="pieBackground"></div><div class="hold"><div class="pie" style="-webkit-transform: rotate(' + degree + 'deg);-moz-transform: rotate(' + degree + 'deg);-o-transform: rotate(' + degree + 'deg);transform: rotate(' + degree + 'deg);"></div></div></div>';
|
||||
return '<div class="pieIndicator"><iron-icon icon="refresh"></iron-icon><div class="pieBackground"></div><div class="hold"><div class="pie" style="-webkit-transform: rotate(' + degree + 'deg);-moz-transform: rotate(' + degree + 'deg);-o-transform: rotate(' + degree + 'deg);transform: rotate(' + degree + 'deg);"></div></div></div>';
|
||||
}
|
||||
|
||||
if (item.SyncStatus) {
|
||||
if (item.SyncStatus == 'Queued' || item.SyncStatus == 'Converting' || item.SyncStatus == 'ReadyToTransfer' || item.SyncStatus == 'Transferring') {
|
||||
|
||||
return '<div class="syncIndicator syncWorkingIndicator"><i class="fa fa-refresh"></i></div>';
|
||||
return '<div class="syncIndicator syncWorkingIndicator"><iron-icon icon="refresh"></iron-icon></div>';
|
||||
}
|
||||
|
||||
if (item.SyncStatus == 'Synced') {
|
||||
|
||||
return '<div class="syncIndicator"><i class="fa fa-refresh"></i></div>';
|
||||
return '<div class="syncIndicator"><iron-icon icon="refresh"></iron-icon></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
||||
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
||||
page.querySelector('#chkSyncLosslessAudio').checked = AppSettings.syncLosslessAudio();
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
@ -12,6 +13,7 @@
|
|||
|
||||
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
||||
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||
AppSettings.syncLosslessAudio(page.querySelector('#chkSyncLosslessAudio').checked);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
|
|
|
@ -1731,13 +1731,8 @@ var AppInfo = {};
|
|||
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
|
||||
AppInfo.supportsUserDisplayLanguageSetting = Dashboard.isConnectMode() && !isCordova;
|
||||
|
||||
if (isCordova && isAndroid) {
|
||||
AppInfo.directPlayAudioContainers = "flac,aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
||||
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
||||
} else {
|
||||
AppInfo.directPlayAudioContainers = [];
|
||||
AppInfo.directPlayVideoContainers = [];
|
||||
}
|
||||
AppInfo.directPlayAudioContainers = [];
|
||||
AppInfo.directPlayVideoContainers = [];
|
||||
|
||||
if (isCordova && isIOS) {
|
||||
AppInfo.moreIcon = 'more-horiz';
|
||||
|
@ -2079,6 +2074,17 @@ var AppInfo = {};
|
|||
|
||||
require(deps, function () {
|
||||
|
||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
||||
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
||||
|
||||
// TODO: This is going to exclude it from both playback and sync, so improve on this
|
||||
if (AppSettings.syncLosslessAudio()) {
|
||||
AppInfo.directPlayAudioContainers.push('flac');
|
||||
}
|
||||
|
||||
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
||||
}
|
||||
|
||||
capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width));
|
||||
createConnectionManager(capabilities).done(function () { onConnectionManagerCreated(deferred); });
|
||||
});
|
||||
|
|
|
@ -1519,5 +1519,6 @@
|
|||
"OptionMax": "Max",
|
||||
"HeaderEmbyGuide": "Emby Guide",
|
||||
"LabelSyncPath": "Sync path:",
|
||||
"OptionSyncOnlyOnWifi": "Sync only on Wifi"
|
||||
"OptionSyncOnlyOnWifi": "Sync only on Wifi",
|
||||
"OptionSyncLosslessAudioOriginal": "Sync lossless audio at original quality (when supported)"
|
||||
}
|
||||
|
|
11
dashboard-ui/thirdparty/paper-button-style.css
vendored
11
dashboard-ui/thirdparty/paper-button-style.css
vendored
|
@ -408,3 +408,14 @@ paper-textarea.mono textarea {
|
|||
margin: 12px auto;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
paper-dropdown-menu {
|
||||
text-align: left;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
paper-dropdown-menu paper-item {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -271,19 +271,14 @@ return m;
|
|||
}
|
||||
});
|
||||
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
||||
if (cePolyfill) {
|
||||
var ready = CustomElements.ready;
|
||||
CustomElements.ready = true;
|
||||
}
|
||||
document.registerElement('dom-module', DomModule);
|
||||
if (cePolyfill) {
|
||||
CustomElements.ready = ready;
|
||||
}
|
||||
function forceDocumentUpgrade() {
|
||||
if (cePolyfill) {
|
||||
var script = document._currentScript || document.currentScript;
|
||||
if (script) {
|
||||
CustomElements.upgradeAll(script.ownerDocument);
|
||||
var doc = script && script.ownerDocument;
|
||||
if (doc && !doc.__customElementsForceUpgraded) {
|
||||
doc.__customElementsForceUpgraded = true;
|
||||
CustomElements.upgradeAll(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -587,7 +582,7 @@ debouncer.stop();
|
|||
}
|
||||
}
|
||||
});
|
||||
Polymer.version = '1.0.9';
|
||||
Polymer.version = '1.1.0';
|
||||
Polymer.Base._addFeature({
|
||||
_registerFeatures: function () {
|
||||
this._prepIs();
|
||||
|
@ -1057,11 +1052,14 @@ Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
|
|||
},
|
||||
appendChild: function (node) {
|
||||
var handled;
|
||||
this._ensureContentLogicalInfo(node);
|
||||
this._removeNodeFromHost(node, true);
|
||||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
this._addLogicalInfo(node, this.node);
|
||||
this._addNodeToHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._addNodeToHost(node);
|
||||
}
|
||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||
|
@ -1075,9 +1073,9 @@ if (!ref_node) {
|
|||
return this.appendChild(node);
|
||||
}
|
||||
var handled;
|
||||
this._ensureContentLogicalInfo(node);
|
||||
this._removeNodeFromHost(node, true);
|
||||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
var children = this.childNodes;
|
||||
var index = children.indexOf(ref_node);
|
||||
if (index < 0) {
|
||||
|
@ -1086,6 +1084,8 @@ throw Error('The ref_node to be inserted before is not a child ' + 'of this node
|
|||
this._addLogicalInfo(node, this.node, index);
|
||||
this._addNodeToHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._addNodeToHost(node);
|
||||
}
|
||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
||||
|
@ -1103,6 +1103,8 @@ var handled;
|
|||
if (this._nodeIsInLogicalTree(this.node)) {
|
||||
this._removeNodeFromHost(node);
|
||||
handled = this._maybeDistribute(node, this.node);
|
||||
} else {
|
||||
this._removeNodeFromHost(node);
|
||||
}
|
||||
if (!handled) {
|
||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||
|
@ -1171,10 +1173,27 @@ return true;
|
|||
}
|
||||
},
|
||||
_updateInsertionPoints: function (host) {
|
||||
host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||
var i$ = host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||
for (var i = 0, c; i < i$.length; i++) {
|
||||
c = i$[i];
|
||||
saveLightChildrenIfNeeded(c);
|
||||
saveLightChildrenIfNeeded(factory(c).parentNode);
|
||||
}
|
||||
},
|
||||
_nodeIsInLogicalTree: function (node) {
|
||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || this._ownerShadyRootForNode(node) || node.shadyRoot);
|
||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || node.shadyRoot);
|
||||
},
|
||||
_ensureContentLogicalInfo: function (node) {
|
||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
var c$ = Array.prototype.slice.call(node.childNodes);
|
||||
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
|
||||
this._ensureContentLogicalInfo(n);
|
||||
}
|
||||
} else if (node.localName === CONTENT) {
|
||||
saveLightChildrenIfNeeded(this.node);
|
||||
saveLightChildrenIfNeeded(node);
|
||||
}
|
||||
},
|
||||
_parentNeedsDistribution: function (parent) {
|
||||
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
||||
|
@ -1228,14 +1247,12 @@ node = factory(node).parentNode;
|
|||
}
|
||||
},
|
||||
_addNodeToHost: function (node) {
|
||||
var checkNode = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.firstChild : node;
|
||||
var root = this._ownerShadyRootForNode(checkNode);
|
||||
var root = this.getOwnerRoot();
|
||||
if (root) {
|
||||
root.host._elementAdd(node);
|
||||
}
|
||||
},
|
||||
_addLogicalInfo: function (node, container, index) {
|
||||
saveLightChildrenIfNeeded(container);
|
||||
var children = factory(container).childNodes;
|
||||
index = index === undefined ? children.length : index;
|
||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
|
@ -1762,8 +1779,13 @@ this.shadyRoot = this.root;
|
|||
this.shadyRoot._distributionClean = false;
|
||||
this.shadyRoot._isShadyRoot = true;
|
||||
this.shadyRoot._dirtyRoots = [];
|
||||
this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||
saveLightChildrenIfNeeded(this.shadyRoot);
|
||||
for (var i = 0, c; i < i$.length; i++) {
|
||||
c = i$[i];
|
||||
saveLightChildrenIfNeeded(c);
|
||||
saveLightChildrenIfNeeded(c.parentNode);
|
||||
}
|
||||
this.shadyRoot.host = this;
|
||||
},
|
||||
get domHost() {
|
||||
|
@ -1998,14 +2020,12 @@ if (newChildParent !== parentNode) {
|
|||
removeFromComposedParent(newChildParent, newChild);
|
||||
}
|
||||
remove(newChild);
|
||||
saveLightChildrenIfNeeded(parentNode);
|
||||
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
||||
newChild._composedParent = parentNode;
|
||||
}
|
||||
function remove(node) {
|
||||
var parentNode = getComposedParent(node);
|
||||
if (parentNode) {
|
||||
saveLightChildrenIfNeeded(parentNode);
|
||||
node._composedParent = null;
|
||||
nativeRemoveChild.call(parentNode, node);
|
||||
}
|
||||
|
@ -2704,8 +2724,7 @@ prevent = dy > dx;
|
|||
prevent = dx > dy;
|
||||
}
|
||||
if (prevent) {
|
||||
// This prevents horizontal scrolling in safari
|
||||
//ev.preventDefault();
|
||||
ev.preventDefault();
|
||||
} else {
|
||||
Gestures.prevent('track');
|
||||
}
|
||||
|
@ -4254,7 +4273,7 @@ MIXIN_RULE: 1000
|
|||
OPEN_BRACE: '{',
|
||||
CLOSE_BRACE: '}',
|
||||
_rx: {
|
||||
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
|
||||
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
|
||||
port: /@import[^;]*;/gim,
|
||||
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
||||
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
||||
|
@ -4270,7 +4289,8 @@ return api;
|
|||
}();
|
||||
Polymer.StyleUtil = function () {
|
||||
return {
|
||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css]',
|
||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
|
||||
INCLUDE_ATTR: 'include',
|
||||
toCssText: function (rules, callback, preserveProperties) {
|
||||
if (typeof rules === 'string') {
|
||||
rules = this.parser.parse(rules);
|
||||
|
@ -4325,27 +4345,52 @@ afterNode = n$[n$.length - 1];
|
|||
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
||||
return style;
|
||||
},
|
||||
cssFromModules: function (moduleIds) {
|
||||
var modules = moduleIds.trim().split(' ');
|
||||
var cssText = '';
|
||||
for (var i = 0; i < modules.length; i++) {
|
||||
cssText += this.cssFromModule(modules[i]);
|
||||
}
|
||||
return cssText;
|
||||
},
|
||||
cssFromModule: function (moduleId) {
|
||||
var m = Polymer.DomModule.import(moduleId);
|
||||
if (m && !m._cssText) {
|
||||
m._cssText = this._cssFromElement(m);
|
||||
}
|
||||
return m && m._cssText || '';
|
||||
},
|
||||
_cssFromElement: function (element) {
|
||||
var cssText = '';
|
||||
var e$ = Array.prototype.slice.call(m.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||
for (var i = 0, e; i < e$.length; i++) {
|
||||
var content = element.content || element;
|
||||
var sourceDoc = element.ownerDocument;
|
||||
var e$ = Array.prototype.slice.call(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||
for (var i = 0, e, resolveDoc, addModule; i < e$.length; i++) {
|
||||
e = e$[i];
|
||||
resolveDoc = sourceDoc;
|
||||
addModule = null;
|
||||
if (e.localName === 'template') {
|
||||
cssText += this._cssFromElement(e);
|
||||
} else {
|
||||
if (e.localName === 'style') {
|
||||
addModule = e.getAttribute(this.INCLUDE_ATTR);
|
||||
e = e.__appliedElement || e;
|
||||
e.parentNode.removeChild(e);
|
||||
} else {
|
||||
e = e.import && e.import.body;
|
||||
resolveDoc = e.ownerDocument;
|
||||
}
|
||||
if (e) {
|
||||
cssText += Polymer.ResolveUrl.resolveCss(e.textContent, e.ownerDocument);
|
||||
cssText += this.resolveCss(e.textContent, resolveDoc);
|
||||
}
|
||||
}
|
||||
m._cssText = cssText;
|
||||
if (addModule) {
|
||||
cssText += this.cssFromModules(addModule);
|
||||
}
|
||||
return m && m._cssText || '';
|
||||
}
|
||||
return cssText;
|
||||
},
|
||||
resolveCss: Polymer.ResolveUrl.resolveCss,
|
||||
parser: Polymer.CssParse,
|
||||
ruleTypes: Polymer.CssParse.types
|
||||
};
|
||||
|
@ -5246,7 +5291,8 @@ var styleTransformer = Polymer.StyleTransformer;
|
|||
Polymer({
|
||||
is: 'custom-style',
|
||||
extends: 'style',
|
||||
created: function () {
|
||||
properties: { include: String },
|
||||
ready: function () {
|
||||
this._tryApply();
|
||||
},
|
||||
attached: function () {
|
||||
|
@ -5258,7 +5304,7 @@ if (this.parentNode && this.parentNode.localName !== 'dom-module') {
|
|||
this._appliesToDocument = true;
|
||||
var e = this.__appliedElement || this;
|
||||
styleDefaults.addStyle(e);
|
||||
if (e.textContent) {
|
||||
if (e.textContent || this.include) {
|
||||
this._apply();
|
||||
} else {
|
||||
var observer = new MutationObserver(function () {
|
||||
|
@ -5272,6 +5318,9 @@ observer.observe(e, { childList: true });
|
|||
},
|
||||
_apply: function () {
|
||||
var e = this.__appliedElement || this;
|
||||
if (this.include) {
|
||||
e.textContent += styleUtil.cssFromModules(this.include);
|
||||
}
|
||||
this._computeStyleProperties();
|
||||
var props = this._styleProperties;
|
||||
var self = this;
|
||||
|
@ -5609,29 +5658,36 @@ items.push(store[key]);
|
|||
return items;
|
||||
},
|
||||
_applySplices: function (splices) {
|
||||
var keySplices = [];
|
||||
for (var i = 0; i < splices.length; i++) {
|
||||
var j, o, key, s = splices[i];
|
||||
var keyMap = {}, key, i;
|
||||
splices.forEach(function (s) {
|
||||
s.addedKeys = [];
|
||||
for (i = 0; i < s.removed.length; i++) {
|
||||
key = this.getKey(s.removed[i]);
|
||||
keyMap[key] = keyMap[key] ? null : -1;
|
||||
}
|
||||
for (i = 0; i < s.addedCount; i++) {
|
||||
var item = this.userArray[s.index + i];
|
||||
key = this.getKey(item);
|
||||
key = key === undefined ? this.add(item) : key;
|
||||
keyMap[key] = keyMap[key] ? null : 1;
|
||||
s.addedKeys.push(key);
|
||||
}
|
||||
}, this);
|
||||
var removed = [];
|
||||
for (j = 0; j < s.removed.length; j++) {
|
||||
o = s.removed[j];
|
||||
key = this.remove(o);
|
||||
var added = [];
|
||||
for (var key in keyMap) {
|
||||
if (keyMap[key] < 0) {
|
||||
this.removeKey(key);
|
||||
removed.push(key);
|
||||
}
|
||||
var added = [];
|
||||
for (j = 0; j < s.addedCount; j++) {
|
||||
o = this.userArray[s.index + j];
|
||||
key = this.add(o);
|
||||
if (keyMap[key] > 0) {
|
||||
added.push(key);
|
||||
}
|
||||
keySplices.push({
|
||||
index: s.index,
|
||||
removed: removed,
|
||||
removedItems: s.removed,
|
||||
added: added
|
||||
});
|
||||
}
|
||||
return keySplices;
|
||||
return [{
|
||||
removed: removed,
|
||||
added: added
|
||||
}];
|
||||
}
|
||||
};
|
||||
Polymer.Collection.get = function (userArray) {
|
||||
|
@ -5726,11 +5782,13 @@ this.collection = null;
|
|||
} else {
|
||||
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
||||
}
|
||||
this._splices = [];
|
||||
this._keySplices = [];
|
||||
this._indexSplices = [];
|
||||
this._needFullRefresh = true;
|
||||
this._debounceTemplate(this._render);
|
||||
} else if (change.path == 'items.splices') {
|
||||
this._splices = this._splices.concat(change.value.keySplices);
|
||||
this._keySplices = this._keySplices.concat(change.value.keySplices);
|
||||
this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
|
||||
this._debounceTemplate(this._render);
|
||||
} else {
|
||||
var subpath = change.path.slice(6);
|
||||
|
@ -5767,16 +5825,17 @@ this._applyFullRefresh();
|
|||
this._needFullRefresh = false;
|
||||
} else {
|
||||
if (this._sortFn) {
|
||||
this._applySplicesUserSort(this._splices);
|
||||
this._applySplicesUserSort(this._keySplices);
|
||||
} else {
|
||||
if (this._filterFn) {
|
||||
this._applyFullRefresh();
|
||||
} else {
|
||||
this._applySplicesArrayOrder(this._splices);
|
||||
this._applySplicesArrayOrder(this._indexSplices);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._splices = [];
|
||||
this._keySplices = [];
|
||||
this._indexSplices = [];
|
||||
var keyToIdx = this._keyToInstIdx = {};
|
||||
for (var i = 0; i < this._instances.length; i++) {
|
||||
var inst = this._instances[i];
|
||||
|
@ -5914,10 +5973,10 @@ pool.push(inst);
|
|||
}
|
||||
}
|
||||
this._instances.splice(s.index, s.removed.length);
|
||||
for (var i = 0; i < s.added.length; i++) {
|
||||
for (var i = 0; i < s.addedKeys.length; i++) {
|
||||
var inst = {
|
||||
isPlaceholder: true,
|
||||
key: s.added[i]
|
||||
key: s.addedKeys[i]
|
||||
};
|
||||
this._instances.splice(s.index + i, 0, inst);
|
||||
}
|
||||
|
@ -6026,12 +6085,12 @@ is: 'array-selector',
|
|||
properties: {
|
||||
items: {
|
||||
type: Array,
|
||||
observer: '_resetSelection'
|
||||
observer: 'clearSelection'
|
||||
},
|
||||
multi: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
observer: '_resetSelection'
|
||||
observer: 'clearSelection'
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
|
@ -6042,7 +6101,7 @@ type: Boolean,
|
|||
value: false
|
||||
}
|
||||
},
|
||||
_resetSelection: function () {
|
||||
clearSelection: function () {
|
||||
if (Array.isArray(this.selected)) {
|
||||
for (var i = 0; i < this.selected.length; i++) {
|
||||
this.unlinkPaths('selected.' + i);
|
||||
|
@ -9838,8 +9897,8 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
|
||||
/**
|
||||
* Fired after the `iron-overlay` closes.
|
||||
* @event iron-overlay-closed {{canceled: boolean}} detail -
|
||||
* canceled: True if the overlay was canceled.
|
||||
* @event iron-overlay-closed
|
||||
* @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute
|
||||
*/
|
||||
|
||||
listeners: {
|
||||
|
@ -9943,7 +10002,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
// overlay becomes visible here
|
||||
this.style.display = '';
|
||||
// force layout to ensure transitions will go
|
||||
this.offsetWidth;
|
||||
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||
if (this.opened) {
|
||||
this._renderOpened();
|
||||
} else {
|
||||
|
@ -10067,7 +10126,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
this.style.display = 'none';
|
||||
this.style.transform = this.style.webkitTransform = '';
|
||||
// force layout to avoid application of transform
|
||||
this.offsetWidth;
|
||||
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||
this.style.transition = this.style.webkitTransition = '';
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue