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 2015-11-18 21:35:08 -05:00
parent 8c9287d505
commit aa272fb404
106 changed files with 1733 additions and 554 deletions

View file

@ -1,6 +1,6 @@
{
"name": "iron-input",
"version": "1.0.6",
"version": "1.0.7",
"description": "An input element with data binding",
"authors": [
"The Polymer Authors"
@ -10,9 +10,7 @@
"polymer",
"input"
],
"main": [
"iron-input.html"
],
"main": "iron-input.html",
"private": true,
"repository": {
"type": "git",
@ -30,14 +28,14 @@
"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": "*",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.6",
"_release": "1.0.7",
"_resolution": {
"type": "version",
"tag": "v1.0.6",
"commit": "a206c6140aad96d5355074676713f9e0a1b1581d"
"tag": "v1.0.7",
"commit": "7ba38f9121694d72b7390567cb91b6ac18141d2b"
},
"_source": "git://github.com/PolymerElements/iron-input.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,22 @@
language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
env:
global:
- secure: AnFRDBxxASn2RP4u+CHJS04g2klVTM+YL1fgNfkNIiECChymGRkeBiF7zvWPfodqPGKWhBZPAMxVuFKbztawQ95kWlbPSTNJtWhHhPcRarV5AYvjhyUV372E3REZ4CGt+T8nghD9bdJiMX5x0pXAz+wfBPPpiHwbiSPPjFLFvTs=
- secure: SvsE+VQL35CZ967ZVy0+7o5xclnBM8egjhsjNRG7WxVPZQboCQ3Xwm8tIDQSWeagM3ZQRkTGca4ta91F1ZEhm4Jdt5CwKhhSNC6JgS3CX819r9UKgUnSS3nvWdqcZq4GXcMoOZm4qE9ttd3xdoKCfkLRQlEGAvM2TEw69mBhj24=
node_js: 4
addons:
firefox: '42.0'
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"

View file

@ -0,0 +1,72 @@
<!--
This file is autogenerated based on
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
-->
# Polymer Elements
## Guide for Contributors
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
### Filing Issues
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
1. **Who will use the feature?** _“As someone filling out a form…”_
2. **When will they use the feature?** _“When I enter an invalid value…”_
3. **What is the users goal?** _“I want to be visually notified that the value needs to be corrected…”_
**If you are filing an issue to report a bug**, please provide:
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
```markdown
The `paper-foo` element causes the page to turn pink when clicked.
## Expected outcome
The page stays the same color.
## Actual outcome
The page turns pink.
## Steps to reproduce
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
```
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
### Submitting Pull Requests
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
When submitting pull requests, please provide:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, #40
```
2. **A succinct description of the design** used to fix any related issues. For example:
```markdown
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
```
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so dont be afraid to ask us if you need help with that!

View file

@ -1,6 +1,6 @@
{
"name": "iron-input",
"version": "1.0.6",
"version": "1.0.7",
"description": "An input element with data binding",
"authors": [
"The Polymer Authors"
@ -10,9 +10,7 @@
"polymer",
"input"
],
"main": [
"iron-input.html"
],
"main": "iron-input.html",
"private": true,
"repository": {
"type": "git",
@ -30,7 +28,7 @@
"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": "*",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}

View file

@ -20,10 +20,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../iron-input.html">
<link href="../../paper-styles/paper-styles.html" rel="import">
<link href="../../paper-styles/demo-pages.html" rel="import">
<link rel="import" href="../../paper-styles/color.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../../paper-styles/typography.html">
<style is="custom-style">
.vertical-section {

View file

@ -80,7 +80,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
* Regular expression to match valid input characters.
*/
allowedPattern: {
type: String
type: String,
observer: "_allowedPatternChanged"
},
_previousValidInput: {
@ -131,6 +132,11 @@ is separate from validation, and `allowed-pattern` does not affect how the input
this.fire('bind-value-changed', {value: this.bindValue});
},
_allowedPatternChanged: function() {
// Force to prevent invalid input when an `allowed-pattern` is set
this.preventInvalidInput = this.allowedPattern ? true : false;
},
_onInput: function() {
// Need to validate each of the characters pasted if they haven't
// been validated inside `_onKeypress` already.

View file

@ -14,14 +14,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<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">
<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="../iron-input.html">
<link rel="import" href="letters-only.html">
@ -64,6 +60,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="automatically-prevent-invalid-input-if-allowed-pattern">
<template>
<input is="iron-input" allowed-pattern="[0-9]">
</template>
</test-fixture>
<test-fixture id="has-validator">
<template>
<letters-only></letters-only>
@ -131,6 +133,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
input._onInput();
assert.equal(input.bindValue, '123');
});
test('prevent invalid input works automatically when allowed pattern is set', function() {
var input = fixture('automatically-prevent-invalid-input-if-allowed-pattern');
input.value = '123';
input._onInput();
assert.equal(input.bindValue, '123');
input.value = '123foo';
input._onInput();
assert.equal(input.bindValue, '123');
input.allowedPattern = '';
input.value = '#123foo BAR!';
input._onInput();
assert.equal(input.bindValue, '#123foo BAR!');
input.allowedPattern = '[a-zA-Z]';
input.value = 'foo';
input._onInput();
input.value = 'bar123';
input._onInput();
assert.equal(input.bindValue, 'foo');
});
});
</script>