1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-05-05 21:02:24 -04:00
parent e5a4b3813f
commit e65b47e772
19 changed files with 58 additions and 193 deletions

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.2.59",
"_release": "1.2.59",
"version": "1.2.61",
"_release": "1.2.61",
"_resolution": {
"type": "version",
"tag": "1.2.59",
"commit": "2089ec993031b303b5c2163fbc5aff5b37056d1f"
"tag": "1.2.61",
"commit": "d28f24510d524454f235f9f83979639e8b0913d6"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",

View file

@ -103,6 +103,15 @@
return false;
}();
function toLocaleDateString(date) {
var currentLocale = globalize.getCurrentLocale();
return currentLocale && toLocaleTimeStringSupportsLocales ?
date.toLocaleDateString(currentLocale) :
date.toLocaleDateString();
}
function getDisplayTime(date) {
var currentLocale = globalize.getCurrentLocale();
@ -144,6 +153,7 @@
return {
parseISO8601Date: parseISO8601Date,
getDisplayRunningTime: getDisplayRunningTime,
toLocaleDateString: toLocaleDateString,
getDisplayTime: getDisplayTime
};
});

View file

@ -449,7 +449,7 @@
weekday[6] = globalize.translate('core#OptionSaturdayShort');
var day = weekday[date.getDay()];
date = date.toLocaleDateString();
date = datetime.toLocaleDateString(date);
if (date.toLowerCase().indexOf(day.toLowerCase()) == -1) {
return day + " " + date;

View file

@ -1,6 +1,6 @@
{
"name": "iron-dropdown",
"version": "1.3.1",
"version": "1.4.0",
"description": "An unstyled element that works similarly to a native browser select",
"authors": [
"The Polymer Authors"
@ -36,11 +36,11 @@
"iron-image": "polymerelements/iron-image#^1.0.0"
},
"ignore": [],
"_release": "1.3.1",
"_release": "1.4.0",
"_resolution": {
"type": "version",
"tag": "v1.3.1",
"commit": "f7a47d4cd6c6cb87adba08703ec1588c1b649f4d"
"tag": "v1.4.0",
"commit": "8e14da0aaeb791983ee4b254890c7263644f7851"
},
"_source": "git://github.com/PolymerElements/iron-dropdown.git",
"_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "iron-dropdown",
"version": "1.3.1",
"version": "1.4.0",
"description": "An unstyled element that works similarly to a native browser select",
"authors": [
"The Polymer Authors"

View file

@ -81,6 +81,7 @@ method is called on the element.
/**
* The orientation against which to align the dropdown content
* horizontally relative to the dropdown trigger.
* Overridden from `Polymer.IronFitBehavior`.
*/
horizontalAlign: {
type: String,
@ -91,6 +92,7 @@ method is called on the element.
/**
* The orientation against which to align the dropdown content
* vertically relative to the dropdown trigger.
* Overridden from `Polymer.IronFitBehavior`.
*/
verticalAlign: {
type: String,
@ -98,54 +100,6 @@ method is called on the element.
reflectToAttribute: true
},
/**
* A pixel value that will be added to the position calculated for the
* given `horizontalAlign`, in the direction of alignment. You can think
* of it as increasing or decreasing the distance to the side of the
* screen given by `horizontalAlign`.
*
* If `horizontalAlign` is "left", this offset will increase or decrease
* the distance to the left side of the screen: a negative offset will
* move the dropdown to the left; a positive one, to the right.
*
* Conversely if `horizontalAlign` is "right", this offset will increase
* or decrease the distance to the right side of the screen: a negative
* offset will move the dropdown to the right; a positive one, to the left.
*/
horizontalOffset: {
type: Number,
value: 0,
notify: true
},
/**
* A pixel value that will be added to the position calculated for the
* given `verticalAlign`, in the direction of alignment. You can think
* of it as increasing or decreasing the distance to the side of the
* screen given by `verticalAlign`.
*
* If `verticalAlign` is "top", this offset will increase or decrease
* the distance to the top side of the screen: a negative offset will
* move the dropdown upwards; a positive one, downwards.
*
* Conversely if `verticalAlign` is "bottom", this offset will increase
* or decrease the distance to the bottom side of the screen: a negative
* offset will move the dropdown downwards; a positive one, upwards.
*/
verticalOffset: {
type: Number,
value: 0,
notify: true
},
/**
* The element that should be used to position the dropdown when
* it is opened.
*/
positionTarget: {
type: Object
},
/**
* An animation config. If provided, this will be used to animate the
* opening of the dropdown.
@ -199,12 +153,6 @@ method is called on the element.
'_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)'
],
attached: function() {
// Memoize this to avoid expensive calculations & relayouts.
this._isRTL = window.getComputedStyle(this).direction == 'rtl';
this.positionTarget = this.positionTarget || this._defaultPositionTarget;
},
/**
* The element that is contained by the dropdown, if any.
*/
@ -220,72 +168,6 @@ method is called on the element.
return this.focusTarget || this.containedElement;
},
/**
* The element that should be used to position the dropdown when
* it opens, if no position target is configured.
*/
get _defaultPositionTarget() {
var parent = Polymer.dom(this).parentNode;
if (parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
parent = parent.host;
}
return parent;
},
/**
* The horizontal align value, accounting for the RTL/LTR text direction.
*/
get _localeHorizontalAlign() {
// In RTL, "left" becomes "right".
if (this._isRTL) {
return this.horizontalAlign === 'right' ? 'left' : 'right';
} else {
return this.horizontalAlign;
}
},
/**
* The horizontal offset value used to position the dropdown.
* @param {ClientRect} dropdownRect
* @param {ClientRect} positionRect
* @param {boolean=} fromRight
* @return {number} pixels
* @private
*/
_horizontalAlignTargetValue: function(dropdownRect, positionRect, fromRight) {
var target;
if (fromRight) {
target = document.documentElement.clientWidth - positionRect.right - (this._fitWidth - dropdownRect.right);
} else {
target = positionRect.left - dropdownRect.left;
}
target += this.horizontalOffset;
return Math.max(target, 0);
},
/**
* The vertical offset value used to position the dropdown.
* @param {ClientRect} dropdownRect
* @param {ClientRect} positionRect
* @param {boolean=} fromBottom
* @return {number} pixels
* @private
*/
_verticalAlignTargetValue: function(dropdownRect, positionRect, fromBottom) {
var target;
if (fromBottom) {
target = document.documentElement.clientHeight - positionRect.bottom - (this._fitHeight - dropdownRect.bottom);
} else {
target = positionRect.top - dropdownRect.top;
}
target += this.verticalOffset;
return Math.max(target, 0);
},
/**
* Called when the value of `opened` changes.
* Overridden from `IronOverlayBehavior`
@ -417,41 +299,6 @@ method is called on the element.
}
},
/**
* Resets the target element's position and size constraints, and clear
* the memoized data.
*/
resetFit: function() {
Polymer.IronFitBehavior.resetFit.apply(this, arguments);
var hAlign = this._localeHorizontalAlign;
var vAlign = this.verticalAlign;
// Set to 0, 0 in order to discover any offset caused by parent stacking contexts.
this.style[hAlign] = this.style[vAlign] = '0px';
var dropdownRect = this.getBoundingClientRect();
var positionRect = this.positionTarget.getBoundingClientRect();
var horizontalValue = this._horizontalAlignTargetValue(dropdownRect, positionRect, hAlign === 'right');
var verticalValue = this._verticalAlignTargetValue(dropdownRect, positionRect, vAlign === 'bottom');
this.style[hAlign] = horizontalValue + 'px';
this.style[vAlign] = verticalValue + 'px';
},
/**
* Overridden from `IronFitBehavior`.
* Ensure positionedBy has correct values for horizontally & vertically.
*/
_discoverInfo: function() {
Polymer.IronFitBehavior._discoverInfo.apply(this, arguments);
// Note(valdrin): in Firefox, an element with style `position: fixed; bottom: 90vh; height: 20vh`
// would have `getComputedStyle(element).top < 0` (instead of being `auto`) http://jsbin.com/cofired/3/edit?html,output
// This would cause IronFitBehavior's `constrain` to wrongly calculate sizes
// (it would use `top` instead of `bottom`), so we ensure we give the correct values.
this._fitInfo.positionedBy.horizontally = this._localeHorizontalAlign;
this._fitInfo.positionedBy.vertically = this.verticalAlign;
},
/**
* Apply focus to focusTarget or containedElement
*/

View file

@ -26,14 +26,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html",
"homepage": "https://github.com/polymerelements/iron-meta",
"homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
},
"_source": "git://github.com/polymerelements/iron-meta.git",
"_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/iron-meta"
"_originalSource": "PolymerElements/iron-meta"
}

View file

@ -1,6 +1,6 @@
{
"name": "iron-selector",
"version": "1.5.0",
"version": "1.5.1",
"description": "Manages a set of elements that can be selected",
"private": true,
"license": "http://polymer.github.io/LICENSE.txt",
@ -30,11 +30,11 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.5.0",
"_release": "1.5.1",
"_resolution": {
"type": "version",
"tag": "v1.5.0",
"commit": "c7402274efa2e3b2a905ffa25d70c2ff3309dc59"
"tag": "v1.5.1",
"commit": "e3e34408fad8f7cde59c4255cf3fe90f7dcf91d8"
},
"_source": "git://github.com/polymerelements/iron-selector.git",
"_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "iron-selector",
"version": "1.5.0",
"version": "1.5.1",
"description": "Manages a set of elements that can be selected",
"private": true,
"license": "http://polymer.github.io/LICENSE.txt",

View file

@ -38,7 +38,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<div name="zot">Zot</div>
</iron-selector>
If no matching element is found using `attForSelected`, use `fallbackSelection` as fallback.
You can specify a default fallback with `fallbackSelection` in case the `selected` attribute does
not match the `attrForSelected` attribute of any elements.
Example:

View file

@ -1,6 +1,6 @@
{
"name": "iron-validatable-behavior",
"version": "1.1.0",
"version": "1.1.1",
"description": "Provides a behavior for an element that validates user input",
"authors": "The Polymer Authors",
"keywords": [
@ -30,11 +30,11 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.1.0",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.0",
"commit": "01ed585b28d8ab41367518f9aebd8442b9166bfe"
"tag": "v1.1.1",
"commit": "2ecd3f411e298733b29f1660f75cb9b03ea31d77"
},
"_source": "git://github.com/PolymerElements/iron-validatable-behavior.git",
"_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "iron-validatable-behavior",
"version": "1.1.0",
"version": "1.1.1",
"description": "Provides a behavior for an element that validates user input",
"authors": "The Polymer Authors",
"keywords": [

View file

@ -81,6 +81,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
_validator: {
type: Object,
computed: '__computeValidator(validator)'
}
},

View file

@ -45,7 +45,7 @@
"tag": "v1.0.11",
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
},
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
"_source": "git://github.com/polymerelements/paper-behaviors.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-behaviors"
"_originalSource": "polymerelements/paper-behaviors"
}

View file

@ -1,7 +1,7 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": [
@ -38,11 +38,11 @@
},
"ignore": [],
"homepage": "https://github.com/PolymerElements/paper-icon-button",
"_release": "1.1.0",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.0",
"commit": "1d57e0d3a76d001674cb0b86ed14244551577e7a"
"tag": "v1.1.1",
"commit": "f4a8a7a0666aa5a6e2049aa3672ee686bb60b5f3"
},
"_source": "git://github.com/PolymerElements/paper-icon-button.git",
"_target": "^1.0.0",

View file

@ -1,7 +1,7 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": [

View file

@ -72,10 +72,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this.getRipple().upAction();
},
ensureRipple: function() {
/**
* @param {...*} var_args
*/
ensureRipple: function(var_args) {
var lastRipple = this._ripple;
Polymer.PaperRippleBehavior.ensureRipple.apply(this, arguments);
this._ripple.center = true;
this._ripple.classList.add('circle');
if (this._ripple && this._ripple !== lastRipple) {
this._ripple.center = true;
this._ripple.classList.add('circle');
}
}
});
</script>

View file

@ -32,14 +32,14 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
},
"ignore": [],
"homepage": "https://github.com/PolymerElements/paper-ripple",
"homepage": "https://github.com/polymerelements/paper-ripple",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
},
"_source": "git://github.com/PolymerElements/paper-ripple.git",
"_source": "git://github.com/polymerelements/paper-ripple.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-ripple"
"_originalSource": "polymerelements/paper-ripple"
}

View file

@ -34,6 +34,6 @@
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
},
"_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.0.0",
"_target": "^1.1.0",
"_originalSource": "Polymer/polymer"
}