mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
41
react-app/bower_components/iron-form-element-behavior/.bower.json
vendored
Normal file
41
react-app/bower_components/iron-form-element-behavior/.bower.json
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "iron-form-element-behavior",
|
||||
"version": "1.0.6",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"private": true,
|
||||
"main": "iron-form-element-behavior.html",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"description": "Enables a custom element to be included in an iron-form",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"form"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-form-element-behavior.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/iron-form-element-behavior",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "cf9e09ded62daf3363852ce98260aaad1ed0fae1"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-form-element-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-form-element-behavior"
|
||||
}
|
1
react-app/bower_components/iron-form-element-behavior/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-form-element-behavior/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
22
react-app/bower_components/iron-form-element-behavior/.travis.yml
vendored
Normal file
22
react-app/bower_components/iron-form-element-behavior/.travis.yml
vendored
Normal 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: EN5HtbAeaCE1IzGk5JlSq7GWcANh/zYgbpZn1y0VocfkZfzOv8cIh8Zmr4Q6shII6K07Fyx1LQuAjsURqX9mc3AmfMHgPIbpZGpOKrjvt1Vf0bPN+uIC9vIFj3sLQj12gcfJg48EXk6HWsHscCZ3+am1xvRflhNEY3TjHPrUTgkF+KLbBEfb4mCZwVc4dln76ffvTQ/cPI9eYczNp1q9wWpYvn794qRLtAkKuQ5Z1b6hunOAx/hzCjGNbJDO3gkxO68dzzSp9YDIhKEFAUlMDalwLRr7sNgB4sNeDCg4mmie5fe6xk831HvBYFxZxmXD1uS6/Hvd8MiBDiols3lwz8uEUnPyrwDlxUkjn2sl5S+gO8CcHU2mShUCl73JfBtyWDKPSfQLR5QHEk4eqNzNn2HinAE/aezi4/TVCY7P3ujeK8sFlTsb9vlywnlJO3fqyZ+lBwZ4CbNjOTs1L2W+guT1Oq30PJ5TVxU2mvmIMtdpPveZB0iM/PM9FECsb303KeV5Zomk4dp2MxirK1O/4mPAHIz9UUpGopGOtpuODnRV4Lq7V9HaDxYOZzAHZDK4mJ1y6tSRH/yMUTEidhG2j5F6MXmhbKXj3I0oR95xx1RH+b8myErvUBlto4jR21Pd+mOVlkU78CBSN9XGhtBQjklF5+aC8YeH1DEv6mTn2o8=
|
||||
- secure: q3AjjaoaTZcdAdjIvzSf8Q1SdEg1mY6lBkeoDTMKJcftJ8zz1qIfjGzEuycSVVnOJhZ6WmvMMBxdThQCymF1wzT++SV+u34DYSFoZ5EhjM0TFhP63PRuhbE3DquPaISpM5aCH7epV4nMFD7PFE1BP4u/qiETAgPeAoY9LMT/JPclOfcQ3euwks3TSM6O8g7Ro1h1ElywCQ1souzkcjvJ3FxsqysJb7Mg/n9bmtwnkol/mrBaP6JzQMURUyswx7ZPj3qiFoA9ZLiNirzf+O781A4msKursjYrKr6TZtB6xcMlEg89YhFBXrLE9IEEM/fNp+vPNhaIA5VjYRy8iIK402RXpbh7/AlPD7yMFITeMSfT+Bqldur+pi0oN1N9SeWrmk6P+bdfdkdyGl1CVKP4S35z8cyFRgmvxO4/UG65cb66AdMeNVBEQsi2flCWgPyaTmOQ53YryCs7cFRu3zSMnU3F/gWqlmletgxGhFOBHTtEmr2A9QBLgg+EvB/83wj2dEEfMlIpoeq83/2PaE8hKAWyqPga7t532vU5AIFNOUk9vGzRCxsqGKF2j0/zFBdgHSLYCsWVrbjxmxdu6Fzi8ZATeqjDoc0eaIPhBkekOvDrUtUSHA9sSSG8j69GGUL4+WkoCMB74dz+GXz85fMJlMZWBXPtazDlNXYfU60T/1E=
|
||||
node_js: 4
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
72
react-app/bower_components/iron-form-element-behavior/CONTRIBUTING.md
vendored
Normal file
72
react-app/bower_components/iron-form-element-behavior/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!
|
23
react-app/bower_components/iron-form-element-behavior/README.md
vendored
Normal file
23
react-app/bower_components/iron-form-element-behavior/README.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-form-element-behavior.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-form-element-behavior)
|
||||
|
||||
_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-form-element-behavior)_
|
||||
|
||||
|
||||
##Polymer.IronFormElementBehavior
|
||||
|
||||
|
||||
Polymer.IronFormElementBehavior enables a custom element to be included
|
||||
in an `iron-form`.
|
||||
|
||||
|
31
react-app/bower_components/iron-form-element-behavior/bower.json
vendored
Normal file
31
react-app/bower_components/iron-form-element-behavior/bower.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "iron-form-element-behavior",
|
||||
"version": "1.0.6",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"private": true,
|
||||
"main": "iron-form-element-behavior.html",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"description": "Enables a custom element to be included in an iron-form",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"form"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-form-element-behavior.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
67
react-app/bower_components/iron-form-element-behavior/demo/index.html
vendored
Normal file
67
react-app/bower_components/iron-form-element-behavior/demo/index.html
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<!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>iron-form-element-behavior demo</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>
|
||||
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="simple-form.html">
|
||||
<link rel="import" href="simple-element.html">
|
||||
</head>
|
||||
<style>
|
||||
input {
|
||||
margin-bottom: 24px;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<div class="vertical-section-container centered">
|
||||
<div class="vertical-section">
|
||||
<form is="simple-form" id="form">
|
||||
Element with iron-form-element-behavior <input is="simple-element" type="text" name="one" value="one">
|
||||
<br>
|
||||
Element without iron-form-element-behavior <input type="text" name="two" value="two">
|
||||
<br>
|
||||
Element with iron-form-element-behavior <input is="simple-element" type="text" name="three" value="three">
|
||||
</form>
|
||||
|
||||
<h4>Elements tracked by the form: <button onclick="update()">Update</button> </h4>
|
||||
|
||||
<ul id="output">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function update() {
|
||||
var output = document.getElementById('output');
|
||||
var elements = document.getElementById('form').formElements;
|
||||
document.getElementById('output').innerHTML = '';
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
var li = document.createElement('li');
|
||||
var text = document.createTextNode(elements[i].value);
|
||||
li.appendChild(text);
|
||||
output.appendChild(li);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
27
react-app/bower_components/iron-form-element-behavior/demo/simple-element.html
vendored
Normal file
27
react-app/bower_components/iron-form-element-behavior/demo/simple-element.html
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
@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-form-element-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'simple-element',
|
||||
|
||||
extends: 'input',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronFormElementBehavior
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
53
react-app/bower_components/iron-form-element-behavior/demo/simple-form.html
vendored
Normal file
53
react-app/bower_components/iron-form-element-behavior/demo/simple-form.html
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
@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">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'simple-form',
|
||||
|
||||
extends: 'form',
|
||||
|
||||
properties: {
|
||||
formElements: {
|
||||
type: Object,
|
||||
notify: true
|
||||
}
|
||||
},
|
||||
|
||||
listeners: {
|
||||
'iron-form-element-register': '_elementRegistered',
|
||||
'iron-form-element-unregister': '_elementUnregistered'
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this.formElements = [];
|
||||
},
|
||||
|
||||
_elementRegistered: function(e) {
|
||||
this.formElements.push(e.target);
|
||||
e.target._parentForm = this;
|
||||
},
|
||||
|
||||
_elementUnregistered: function(e) {
|
||||
var target = e.detail.target;
|
||||
if (target) {
|
||||
var index = this.formElements.indexOf(target);
|
||||
if (index > -1) {
|
||||
this.formElements.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
30
react-app/bower_components/iron-form-element-behavior/index.html
vendored
Normal file
30
react-app/bower_components/iron-form-element-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-form-element-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>
|
86
react-app/bower_components/iron-form-element-behavior/iron-form-element-behavior.html
vendored
Normal file
86
react-app/bower_components/iron-form-element-behavior/iron-form-element-behavior.html
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<!--
|
||||
@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">
|
||||
|
||||
<script>
|
||||
/**
|
||||
Polymer.IronFormElementBehavior enables a custom element to be included
|
||||
in an `iron-form`.
|
||||
|
||||
@demo demo/index.html
|
||||
@polymerBehavior
|
||||
*/
|
||||
Polymer.IronFormElementBehavior = {
|
||||
|
||||
properties: {
|
||||
/**
|
||||
* Fired when the element is added to an `iron-form`.
|
||||
*
|
||||
* @event iron-form-element-register
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the element is removed from an `iron-form`.
|
||||
*
|
||||
* @event iron-form-element-unregister
|
||||
*/
|
||||
|
||||
/**
|
||||
* The name of this element.
|
||||
*/
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* The value for this element.
|
||||
*/
|
||||
value: {
|
||||
notify: true,
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* Set to true to mark the input as required. If used in a form, a
|
||||
* custom element that uses this behavior should also use
|
||||
* Polymer.IronValidatableBehavior and define a custom validation method.
|
||||
* Otherwise, a `required` element will always be considered valid.
|
||||
* It's also strongly recommended to provide a visual style for the element
|
||||
* when its value is invalid.
|
||||
*/
|
||||
required: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* The form that the element is registered to.
|
||||
*/
|
||||
_parentForm: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
// Note: the iron-form that this element belongs to will set this
|
||||
// element's _parentForm property when handling this event.
|
||||
this.fire('iron-form-element-register');
|
||||
},
|
||||
|
||||
detached: function() {
|
||||
if (this._parentForm) {
|
||||
this._parentForm.fire('iron-form-element-unregister', {target: this});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
71
react-app/bower_components/iron-form-element-behavior/test/basic.html
vendored
Normal file
71
react-app/bower_components/iron-form-element-behavior/test/basic.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>
|
||||
<title>iron-form-element-behavior</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-form-element-behavior.html">
|
||||
<link rel="import" href="simple-element.html">
|
||||
<link rel="import" href="simple-form.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="basic">
|
||||
<template>
|
||||
<form is="simple-form"></form>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('basic', function() {
|
||||
var form;
|
||||
|
||||
setup(function() {
|
||||
form = fixture('basic');
|
||||
});
|
||||
|
||||
test('elements fire an event when attached', function(done) {
|
||||
var element = document.createElement('input', 'simple-element');
|
||||
|
||||
var handler = sinon.spy();
|
||||
form.addEventListener('iron-form-element-register', handler);
|
||||
|
||||
form.appendChild(element);
|
||||
Polymer.Base.async(function() {
|
||||
expect(handler.callCount).to.be.equal(1);
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('elements fire an event when detached', function(done) {
|
||||
var element = document.createElement('input', 'simple-element');
|
||||
form.appendChild(element);
|
||||
element._parentForm = form;
|
||||
|
||||
var handler = sinon.spy();
|
||||
form.addEventListener('iron-form-element-unregister', handler);
|
||||
|
||||
form.removeChild(element);
|
||||
Polymer.Base.async(function() {
|
||||
expect(handler.callCount).to.be.equal(1);
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
24
react-app/bower_components/iron-form-element-behavior/test/index.html
vendored
Normal file
24
react-app/bower_components/iron-form-element-behavior/test/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!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">
|
||||
<script src="../../webcomponentsjs/webcomponents.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
23
react-app/bower_components/iron-form-element-behavior/test/simple-element.html
vendored
Normal file
23
react-app/bower_components/iron-form-element-behavior/test/simple-element.html
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<!--
|
||||
@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-form-element-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
is: 'simple-element',
|
||||
extends: 'input',
|
||||
behaviors: [
|
||||
Polymer.IronFormElementBehavior
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
19
react-app/bower_components/iron-form-element-behavior/test/simple-form.html
vendored
Normal file
19
react-app/bower_components/iron-form-element-behavior/test/simple-form.html
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
@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">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
is: 'simple-form',
|
||||
extends: 'form'
|
||||
});
|
||||
|
||||
</script>
|
Reference in New Issue
Block a user