mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add new slider
This commit is contained in:
parent
e33e5875cf
commit
09d4af3357
133 changed files with 9418 additions and 256 deletions
44
dashboard-ui/bower_components/iron-validatable-behavior/.bower.json
vendored
Normal file
44
dashboard-ui/bower_components/iron-validatable-behavior/.bower.json
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "iron-validatable-behavior",
|
||||
"version": "1.0.2",
|
||||
"description": "Provides a behavior for an element that validates user input",
|
||||
"authors": "The Polymer Authors",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"iron",
|
||||
"behavior"
|
||||
],
|
||||
"main": [
|
||||
"iron-validatable-behavior.html"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-validatable-behavior.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-validatable-behavior",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"iron-meta": "PolymerElements/iron-meta#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.4",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.0.2",
|
||||
"commit": "a4fc340fdb268e274f312dadedd0633b025ac3a4"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-validatable-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-validatable-behavior"
|
||||
}
|
1
dashboard-ui/bower_components/iron-validatable-behavior/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/iron-validatable-behavior/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bower_components
|
35
dashboard-ui/bower_components/iron-validatable-behavior/bower.json
vendored
Normal file
35
dashboard-ui/bower_components/iron-validatable-behavior/bower.json
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "iron-validatable-behavior",
|
||||
"version": "1.0.2",
|
||||
"description": "Provides a behavior for an element that validates user input",
|
||||
"authors": "The Polymer Authors",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"iron",
|
||||
"behavior"
|
||||
],
|
||||
"main": [
|
||||
"iron-validatable-behavior.html"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-validatable-behavior.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-validatable-behavior",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"iron-meta": "PolymerElements/iron-meta#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.4",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
46
dashboard-ui/bower_components/iron-validatable-behavior/demo/cats-only.html
vendored
Normal file
46
dashboard-ui/bower_components/iron-validatable-behavior/demo/cats-only.html
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../iron-validator-behavior/iron-validator-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'cats-only',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronValidatorBehavior
|
||||
],
|
||||
|
||||
validateObject: function(obj) {
|
||||
var valid = true;
|
||||
for (key in obj) {
|
||||
if (obj[key] !== 'cats') {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
},
|
||||
|
||||
validate: function(values) {
|
||||
if (typeof values === 'object') {
|
||||
return this.validateObject(values);
|
||||
} else {
|
||||
var value = Array.isArray(values) ? values.join('') : values;
|
||||
return value.match(/^(c|ca|cat|cats)?$/) !== null;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
71
dashboard-ui/bower_components/iron-validatable-behavior/demo/index.html
vendored
Normal file
71
dashboard-ui/bower_components/iron-validatable-behavior/demo/index.html
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<title>iron-validatable-behavior demo</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="cats-only.html">
|
||||
<link rel="import" href="validatable-input.html">
|
||||
|
||||
<style is="custom-style">
|
||||
|
||||
.valid {
|
||||
color: var(--google-green-500);
|
||||
}
|
||||
|
||||
.invalid {
|
||||
color: var(--google-red-500);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="vertical-section vertical-section-container centered">
|
||||
<h1><iron-validatable-behavior></h1>
|
||||
|
||||
<template is="dom-bind">
|
||||
|
||||
<cats-only></cats-only>
|
||||
|
||||
<section>
|
||||
|
||||
<p>
|
||||
only type <code>cats</code>:
|
||||
|
||||
<input is="validatable-input" invalid="{{invalid}}" validator="cats-only">
|
||||
|
||||
<span class="valid" hidden$="[[invalid]]">valid</span>
|
||||
<span class="invalid" hidden$="[[!invalid]]">invalid</span>
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
document.querySelector('template[is="dom-bind"]').invalid = false;
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
46
dashboard-ui/bower_components/iron-validatable-behavior/demo/validatable-input.html
vendored
Normal file
46
dashboard-ui/bower_components/iron-validatable-behavior/demo/validatable-input.html
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-validatable-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'validatable-input',
|
||||
|
||||
extends: 'input',
|
||||
|
||||
properties: {
|
||||
|
||||
invalid: {
|
||||
notify: true,
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronValidatableBehavior
|
||||
],
|
||||
|
||||
listeners: {
|
||||
'input': '_onInput'
|
||||
},
|
||||
|
||||
_onInput: function(event) {
|
||||
this.invalid = !this.validate(event.target.value);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
30
dashboard-ui/bower_components/iron-validatable-behavior/index.html
vendored
Normal file
30
dashboard-ui/bower_components/iron-validatable-behavior/index.html
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
<title>iron-validatable-behavior</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
101
dashboard-ui/bower_components/iron-validatable-behavior/iron-validatable-behavior.html
vendored
Normal file
101
dashboard-ui/bower_components/iron-validatable-behavior/iron-validatable-behavior.html
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-meta/iron-meta.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* Use `Polymer.IronValidatableBehavior` to implement an element that validates user input.
|
||||
*
|
||||
* ### Accessiblity
|
||||
*
|
||||
* Changing the `invalid` property, either manually or by calling `validate()` will update the
|
||||
* `aria-invalid` attribute.
|
||||
*
|
||||
* @demo demo/index.html
|
||||
* @polymerBehavior
|
||||
*/
|
||||
Polymer.IronValidatableBehavior = {
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* Namespace for this validator.
|
||||
*/
|
||||
validatorType: {
|
||||
type: String,
|
||||
value: 'validator'
|
||||
},
|
||||
|
||||
/**
|
||||
* Name of the validator to use.
|
||||
*/
|
||||
validator: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* True if the last call to `validate` is invalid.
|
||||
*/
|
||||
invalid: {
|
||||
notify: true,
|
||||
reflectToAttribute: true,
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
_validatorMeta: {
|
||||
type: Object
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_invalidChanged(invalid)'
|
||||
],
|
||||
|
||||
get _validator() {
|
||||
return this._validatorMeta && this._validatorMeta.byKey(this.validator);
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this._validatorMeta = new Polymer.IronMeta({type: this.validatorType});
|
||||
},
|
||||
|
||||
_invalidChanged: function() {
|
||||
if (this.invalid) {
|
||||
this.setAttribute('aria-invalid', 'true');
|
||||
} else {
|
||||
this.removeAttribute('aria-invalid');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {boolean} True if the validator `validator` exists.
|
||||
*/
|
||||
hasValidator: function() {
|
||||
return this._validator != null;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} values Passed to the validator's `validate()` function.
|
||||
* @return {boolean} True if `values` is valid.
|
||||
*/
|
||||
validate: function(values) {
|
||||
var valid = this._validator && this._validator.validate(values);
|
||||
this.invalid = !valid;
|
||||
return valid;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
35
dashboard-ui/bower_components/iron-validatable-behavior/test/index.html
vendored
Normal file
35
dashboard-ui/bower_components/iron-validatable-behavior/test/index.html
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>paper-validatable-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
/* no tests */
|
||||
WCT.loadSuites([
|
||||
'iron-validatable-behavior.html'
|
||||
]);
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
52
dashboard-ui/bower_components/iron-validatable-behavior/test/iron-validatable-behavior.html
vendored
Normal file
52
dashboard-ui/bower_components/iron-validatable-behavior/test/iron-validatable-behavior.html
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-validatable-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="test-validatable.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="basic">
|
||||
<template>
|
||||
<test-validatable></test-validatable>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
|
||||
suite('basic', function() {
|
||||
|
||||
test('setting `invalid` sets `aria-invalid=true`', function() {
|
||||
var node = fixture('basic');
|
||||
node.invalid = true;
|
||||
assert.equal(node.getAttribute('aria-invalid'), 'true', 'aria-invalid is set');
|
||||
node.invalid = false;
|
||||
assert.isFalse(node.hasAttribute('aria-invalid'), 'aria-invalid is unset');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
28
dashboard-ui/bower_components/iron-validatable-behavior/test/test-validatable.html
vendored
Normal file
28
dashboard-ui/bower_components/iron-validatable-behavior/test/test-validatable.html
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
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
|
||||
-->
|
||||
<link rel="import" href="../iron-validatable-behavior.html">
|
||||
|
||||
<dom-module id="test-validatable">
|
||||
<template>
|
||||
<content></content>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-validatable',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronValidatableBehavior
|
||||
]
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue