make sure ._ osx files are properly ignored
This commit is contained in:
parent
cb8119840a
commit
67524136ed
48 changed files with 1239 additions and 387 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
@ -28,11 +28,11 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||
"_release": "1.0.9",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.9",
|
||||
"commit": "4b8cab62a4916cc4b1dbd262cbb7eb1eec624b6f"
|
||||
"tag": "v1.0.10",
|
||||
"commit": "da937a6c5841fc9dba57f3087083445c9ad709a8"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
30
dashboard-ui/bower_components/iron-behaviors/.travis.yml
vendored
Normal file
30
dashboard-ui/bower_components/iron-behaviors/.travis.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
matrix:
|
||||
include:
|
||||
- node_js: stable
|
||||
script: xvfb-run -a wct --simpleOutput -l firefox -l chrome
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- node_js: node
|
||||
script:
|
||||
- |
|
||||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
||||
wct --simpleOutput -s 'Windows 10/microsoftedge' -s 'Windows 8.1/internet explorer@11' -s 'Windows 7/internet explorer@10' -s 'OS X 10.10/safari@8' -s 'OS X 10.9/safari@7'
|
||||
fi
|
||||
before_script:
|
||||
- npm install bower web-component-tester
|
||||
- export PATH=$PWD/node_modules/.bin:$PATH
|
||||
- bower install
|
||||
env:
|
||||
global:
|
||||
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
||||
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
72
dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md
vendored
Normal file
72
dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md
vendored
Normal 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 user’s 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 don’t be afraid to ask us if you need help with that!
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
|
|
@ -21,7 +21,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link href="simple-button.html" rel="import">
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
.vertical-section {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -136,14 +136,43 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
this._setPressed(false);
|
||||
},
|
||||
|
||||
__isFocusedLightDescendant: function(target) {
|
||||
var root = Polymer.dom(this).getOwnerRoot() || document;
|
||||
var focusedElement = root.activeElement;
|
||||
|
||||
// TODO(noms): remove the `this !== target` check once polymer#2610 is fixed.
|
||||
return this !== target && this.isLightDescendant(target) && target == focusedElement;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {!KeyboardEvent} event .
|
||||
*/
|
||||
_spaceKeyDownHandler: function(event) {
|
||||
var keyboardEvent = event.detail.keyboardEvent;
|
||||
var target = Polymer.dom(keyboardEvent).localTarget;
|
||||
|
||||
// Ignore the event if this is coming from a focused light child, since that
|
||||
// element will deal with it.
|
||||
if (this.__isFocusedLightDescendant(target))
|
||||
return;
|
||||
|
||||
keyboardEvent.preventDefault();
|
||||
keyboardEvent.stopImmediatePropagation();
|
||||
this._setPressed(true);
|
||||
},
|
||||
|
||||
_spaceKeyUpHandler: function() {
|
||||
/**
|
||||
* @param {!KeyboardEvent} event .
|
||||
*/
|
||||
_spaceKeyUpHandler: function(event) {
|
||||
var keyboardEvent = event.detail.keyboardEvent;
|
||||
var target = Polymer.dom(keyboardEvent).localTarget;
|
||||
|
||||
// Ignore the event if this is coming from a focused light child, since that
|
||||
// element will deal with it.
|
||||
if (this.__isFocusedLightDescendant(target))
|
||||
return;
|
||||
|
||||
if (this.pressed) {
|
||||
this._asyncClick();
|
||||
}
|
||||
|
|
|
@ -72,9 +72,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
// handled). In either case, we can disregard `event.path`.
|
||||
|
||||
if (event.target === this) {
|
||||
var focused = event.type === 'focus';
|
||||
this._setFocused(focused);
|
||||
} else if (!this.shadowRoot) {
|
||||
this._setFocused(event.type === 'focus');
|
||||
} else if (!this.shadowRoot && !this.isLightDescendant(event.target)) {
|
||||
this.fire(event.type, {sourceEvent: event}, {
|
||||
node: this,
|
||||
bubbles: event.bubbles,
|
||||
|
|
|
@ -33,6 +33,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ButtonWithInput">
|
||||
<template>
|
||||
<test-light-dom><input id="input"></test-light-dom>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('active-state', function() {
|
||||
var activeTarget;
|
||||
|
@ -192,6 +198,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
MockInteractions.pressEnter(activeTarget);
|
||||
});
|
||||
});
|
||||
|
||||
suite('nested input inside button', function() {
|
||||
test('space in light child input does not trigger a button click event', function(done) {
|
||||
var item = fixture('ButtonWithInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
input.focus();
|
||||
MockInteractions.pressSpace(input);
|
||||
setTimeout(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(0);
|
||||
done();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
test('space in button triggers a button click event', function(done) {
|
||||
var item = fixture('ButtonWithInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
MockInteractions.pressSpace(item);
|
||||
|
||||
setTimeout(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(1);
|
||||
done();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -34,6 +34,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="LightDOM">
|
||||
<template>
|
||||
<test-light-dom>
|
||||
<input id="input">
|
||||
</test-light-dom>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('focused-state', function() {
|
||||
var focusTarget;
|
||||
|
@ -112,6 +120,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
});
|
||||
|
||||
|
||||
suite('elements in the light dom', function() {
|
||||
var lightDOM, input;
|
||||
|
||||
setup(function() {
|
||||
lightDOM = fixture('LightDOM');
|
||||
input = document.querySelector('#input');
|
||||
});
|
||||
|
||||
test('should not fire the focus event', function() {
|
||||
var nFocusEvents = 0;
|
||||
|
||||
lightDOM.addEventListener('focus', function() {
|
||||
nFocusEvents += 1;
|
||||
});
|
||||
|
||||
MockInteractions.focus(input);
|
||||
|
||||
expect(nFocusEvents).to.be.equal(0);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -64,3 +64,26 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
|
||||
</script>
|
||||
|
||||
<dom-module id="test-light-dom">
|
||||
|
||||
<template>
|
||||
<content select="*"></content>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-light-dom',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState,
|
||||
Polymer.IronButtonState
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue