Commit c717579f authored by Pascal Hartig's avatar Pascal Hartig

Merge pull request #1096 from tastejs/poly-updates

Update to Polymer.latest
parents 34726999 5eac92fe
......@@ -3,6 +3,7 @@
"version": "0.0.1",
"dependencies": {
"todomvc-common": "~0.3.0",
"polymer": "Polymer/polymer#~0.5.2",
"core-selector": "Polymer/core-selector",
"flatiron-director": "Polymer/flatiron-director",
"core-localstorage": "Polymer/core-localstorage"
......
......@@ -2,18 +2,18 @@
"name": "core-component-page",
"private": true,
"dependencies": {
"platform": "Polymer/platform#>=0.3.0 <1.0.0",
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0",
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.5.2",
"homepage": "https://github.com/Polymer/core-component-page",
"version": "0.3.4",
"_release": "0.3.4",
"_release": "0.5.2",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "4b85fc43eba7c112456044f3d4504cc0a14c7a08"
"tag": "0.5.2",
"commit": "443d8dcbcb1b203ed88c6af64c98f76e6434ba53"
},
"_source": "git://github.com/Polymer/core-component-page.git",
"_target": ">=0.3.0 <1.0.0",
"_target": "^0.5.0",
"_originalSource": "Polymer/core-component-page"
}
\ No newline at end of file
......@@ -2,7 +2,8 @@
"name": "core-component-page",
"private": true,
"dependencies": {
"platform": "Polymer/platform#>=0.3.0 <1.0.0",
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
}
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0",
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.5.2"
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="core-component-page.html">
......
......@@ -10,8 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer/polymer.html">
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
......
......@@ -2,15 +2,18 @@
"name": "core-localstorage",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
"polymer": "Polymer/polymer#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.1.0"
},
"version": "0.5.2",
"homepage": "https://github.com/Polymer/core-localstorage",
"version": "0.3.4",
"_release": "0.3.4",
"_release": "0.5.2",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "5493b3efd1ce122f01843e7fb1f7443d85f9f0de"
"tag": "0.5.2",
"commit": "5654dae8929b7fb04178bfc816e9d58c115a8bf2"
},
"_source": "git://github.com/Polymer/core-localstorage.git",
"_target": "*",
......
......@@ -2,6 +2,10 @@
"name": "core-localstorage",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
}
"polymer": "Polymer/polymer#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.1.0"
},
"version": "0.5.2"
}
\ No newline at end of file
......@@ -30,12 +30,12 @@ triggered only when value is a different instance.
<script>
Polymer('core-localstorage', {
/**
* Fired when a value is loaded from localStorage.
* @event core-localstorage-load
*/
/**
* The key to the data stored in localStorage.
*
......@@ -44,7 +44,7 @@ triggered only when value is a different instance.
* @default null
*/
name: '',
/**
* The data associated with the specified name.
*
......@@ -53,7 +53,7 @@ triggered only when value is a different instance.
* @default null
*/
value: null,
/**
* If true, the value is stored and retrieved without JSON processing.
*
......@@ -62,7 +62,7 @@ triggered only when value is a different instance.
* @default false
*/
useRaw: false,
/**
* If true, auto save is disabled.
*
......@@ -71,18 +71,17 @@ triggered only when value is a different instance.
* @default false
*/
autoSaveDisabled: false,
attached: function() {
// wait for bindings are all setup
this.async('load');
},
valueChanged: function() {
if (this.loaded && !this.autoSaveDisabled) {
this.save();
}
},
nameChanged: function() {
this.load();
},
load: function() {
var v = localStorage.getItem(this.name);
if (this.useRaw) {
......@@ -97,7 +96,7 @@ triggered only when value is a different instance.
// be escaped, i.e. "null")
// in this case we save any non-null current (default) value
if (v === null) {
if (this.value !== null) {
if (this.value != null) {
this.save();
}
} else {
......@@ -111,8 +110,8 @@ triggered only when value is a different instance.
this.loaded = true;
this.asyncFire('core-localstorage-load');
},
/**
/**
* Saves the value to localStorage.
*
* @method save
......@@ -121,7 +120,7 @@ triggered only when value is a different instance.
var v = this.useRaw ? this.value : JSON.stringify(this.value);
localStorage.setItem(this.name, v);
}
});
</script>
......
<!--
@license
Copyright (c) 2014 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
-->
<!doctype html>
<html>
<head>
<title>polymer-localstorage</title>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="core-localstorage.html">
......
......@@ -10,8 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer/polymer.html">
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
......
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-localstorage-basic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-localstorage.html">
</head>
<body>
<core-localstorage id="localstorage" name="core-localstorage-test"></core-localstorage>
<script>
window.localStorage.setItem('core-localstorage-test', '{"foo":"bar"}');
var storage = document.querySelector('#localstorage');
suite('basic', function() {
test('load', function() {
assert.isNotNull(storage.value);
assert.equal(storage.value.foo, 'bar');
});
test('save', function(done) {
var newValue = {'foo': 'zot'};
storage.value = newValue;
asyncPlatformFlush(function() {
var v = window.localStorage.getItem(storage.name);
v = JSON.parse(v);
assert.equal(v.foo, newValue.foo);
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'basic.html',
'raw.html',
'value-binding.html'
]);
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-localstorage-raw</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-localstorage.html">
</head>
<body>
<core-localstorage id="localstorage" useRaw name="core-localstorage-test"></core-localstorage>
<script>
window.localStorage.setItem('core-localstorage-test', 'hello world');
var storage = document.querySelector('#localstorage');
suite('basic', function() {
test('load', function() {
assert.equal(storage.value, 'hello world');
});
test('save', function(done) {
var m = 'goodbye';
storage.value = m;
asyncPlatformFlush(function() {
var v = window.localStorage.getItem(storage.name);
assert.equal(v, m);
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-localstorage-value-binding</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-localstorage.html">
</head>
<body>
<polymer-element name="x-foo" attributes="value" noscript>
<template>
<div>{{value.foo}}</div>
</template>
</polymer-element>
<polymer-element name="x-test" attributes="value" noscript>
<template>
<x-foo value="{{value}}"></x-foo>
<core-localstorage id="localstorage" name="core-localstorage-test" value="{{value}}"></core-localstorage>
</template>
</polymer-element>
<x-test></x-test>
<script>
window.localStorage.setItem('core-localstorage-test', '{"foo":"bar"}');
var xtest = document.querySelector('x-test');
suite('basic', function() {
test('initial value', function() {
assert.isNotNull(xtest.value);
assert.equal(xtest.value.foo, 'bar');
});
test('set value', function(done) {
var newValue = {'foo': 'zot'};
xtest.value = newValue;
asyncPlatformFlush(function() {
var v = window.localStorage.getItem(xtest.$.localstorage.name);
v = JSON.parse(v);
assert.equal(v.foo, newValue.foo);
done();
});
});
test('save', function(done) {
xtest.value.foo = 'quux';
xtest.$.localstorage.save();
asyncPlatformFlush(function() {
var v = window.localStorage.getItem(xtest.$.localstorage.name);
v = JSON.parse(v);
assert.equal(v.foo, 'quux');
done();
});
});
});
</script>
</body>
</html>
......@@ -2,17 +2,20 @@
"name": "core-selection",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
"polymer": "Polymer/polymer#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.1.0"
},
"version": "0.5.2",
"homepage": "https://github.com/Polymer/core-selection",
"version": "0.3.4",
"_release": "0.3.4",
"_release": "0.5.2",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "06d7f27c41ffaf31ab52805cffd640a8350940ab"
"tag": "0.5.2",
"commit": "26eeb0c0098cfcf4e57fbc10c6e4d0c9279d7510"
},
"_source": "git://github.com/Polymer/core-selection.git",
"_target": ">=0.3.0 <1.0.0",
"_target": "^0.5.0",
"_originalSource": "Polymer/core-selection"
}
\ No newline at end of file
......@@ -2,6 +2,10 @@
"name": "core-selection",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
}
"polymer": "Polymer/polymer#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.1.0"
},
"version": "0.5.2"
}
\ No newline at end of file
......@@ -12,18 +12,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
The `<core-selection>` element is used to manage selection state. It has no
visual appearance and is typically used in conjunction with another element.
For example, [core-selector](#core-selector)
use a `<core-selection>` to manage selection.
uses a `<core-selection>` to manage selection.
To mark an item as selected, call the `select(item)` method on
To mark an item as selected, call the `select(item)` method on
`<core-selection>`. The item itself is an argument to this method.
The `<core-selection>`element manages selection state for any given set of
items. When an item is selected, the `core-select` event is fired.
The attribute `multi` indicates if multiple items can be selected at once.
Example:
<polymer-element name="selection-example">
<template>
<style>
......@@ -56,7 +56,7 @@ Example:
<li>Green</li>
<li>Blue</li>
</selection-example>
@element core-selection
-->
......@@ -93,7 +93,7 @@ contains the selection state.
* Retrieves the selected item(s).
* @method getSelection
* @returns Returns the selected item(s). If the multi property is true,
* getSelection will return an array, otherwise it will return
* getSelection will return an array, otherwise it will return
* the selected item or undefined if there is no selection.
*/
getSelection: function() {
......
......@@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<title>Selection</title>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="core-selection.html">
</head>
<body unresolved>
......@@ -54,6 +54,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<li>Green</li>
<li>Blue</li>
</selection-example>
</body>
</html>
......@@ -10,8 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer/polymer.html">
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
......
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selection-basic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selection.html">
</head>
<body>
<core-selection></core-selection>
<script>
var s = document.querySelector('core-selection');
suite('basic', function() {
test('select item', function(done) {
var func = function(event) {
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item)');
assert.isTrue(s.isSelected(event.detail.item));
assert.isFalse(s.isSelected('(some_item_not_selected)'));
s.removeEventListener('core-select', func);
done();
}
s.addEventListener('core-select', func);
s.select('(item)');
});
test('select null', function(done) {
var func = function(event) {
assert.isFalse(event.detail.isSelected);
assert.equal(event.detail.item, '(item)');
assert.isFalse(s.isSelected(event.detail.item));
s.removeEventListener("core-select", func);
done();
}
s.addEventListener("core-select", func);
s.select(null);
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'basic.html',
'multi.html'
]);
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selection-multi</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selection.html">
</head>
<body>
<core-selection multi></core-selection>
<script>
var s = document.querySelector('core-selection');
suite('basic', function() {
test('select item', function(done) {
var func = function(event) {
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item1)');
assert.isTrue(s.isSelected(event.detail.item));
assert.equal(s.getSelection().length, 1);
s.removeEventListener('core-select', func);
done();
}
s.addEventListener('core-select', func);
s.select('(item1)');
});
test('select null', function(done) {
var func = function(event) {
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item2)');
assert.isTrue(s.isSelected(event.detail.item));
assert.equal(s.getSelection().length, 2);
s.removeEventListener("core-select", func);
done();
}
s.addEventListener("core-select", func);
s.select('(item2)');
});
});
</script>
</body>
</html>
......@@ -2,16 +2,19 @@
"name": "core-selector",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0",
"core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0"
"polymer": "Polymer/polymer#^0.5.0",
"core-selection": "Polymer/core-selection#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.2",
"homepage": "https://github.com/Polymer/core-selector",
"version": "0.3.4",
"_release": "0.3.4",
"_release": "0.5.2",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "28ab8c4503172b28f1c3abd2d561473b20e2af7b"
"tag": "0.5.2",
"commit": "abe95a14ffb805fcacbd2369c937a3b16cac734d"
},
"_source": "git://github.com/Polymer/core-selector.git",
"_target": "*",
......
......@@ -2,7 +2,11 @@
"name": "core-selector",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0",
"core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0"
}
"polymer": "Polymer/polymer#^0.5.0",
"core-selection": "Polymer/core-selection#^0.5.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.2"
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<title>Selector</title>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="core-selector.html">
</head>
<body unresolved>
......@@ -27,29 +27,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
margin: 0;
padding: 0;
}
.list > * {
height: 40px;
line-height: 40px;
padding: 0 20px;
border-bottom: 1px solid #ccc;
}
.list > *.core-selected {
background: #333;
}
li {
height: 30px;
}
li.core-selected:after {
content: "\2713";
position: absolute;
padding-left: 10px;
}
</style>
<h2>basic</h2>
<core-selector class="list" selected="0">
<div>Item 0</div>
......@@ -58,7 +58,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<div>Item 3</div>
<div>Item 4</div>
</core-selector>
<h2>multi-selection</h2>
<core-selector class="list" selected="{{multiSelected}}" multi>
<div>Item 0</div>
......@@ -67,7 +67,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<div>Item 3</div>
<div>Item 4</div>
</core-selector>
<h2>list</h2>
<core-selector target="{{$.list}}" selected="0"></core-selector>
<ul id="list">
......@@ -77,10 +77,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<li>Item 3</li>
<li>Item 4</li>
</ul>
<h2>binding of a group of radio buttons to a variable</h2>
<core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"
selected="{{color}}" valueattr="value" selectedProperty="checked"
<core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"
selected="{{color}}" valueattr="value" selectedProperty="checked"
activateEvent="change"></core-selector>
<form id="myForm">
<label><input type="radio" name="color" value="red"> Red</label> <br>
......@@ -88,7 +88,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<label><input type="radio" name="color" value="blue"> Blue</label> <br>
<p>color = {{color}}</p>
</form>
</template>
<script>
......@@ -100,7 +100,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
</script>
</polymer-element>
<selector-examples></selector-examples>
</body>
</html>
......@@ -10,8 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer/polymer.html">
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
......
<!--
@license
Copyright (c) 2014 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
-->
<x-meta id="core-selector" label="Selector" group="Core" isContainer>
<template>
......@@ -8,4 +17,4 @@
<link rel="import" href="core-selector.html">
</template>
</x-meta>
\ No newline at end of file
</x-meta>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-activate-event</title>
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body>
<core-selector id="selector" selected="0">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</core-selector>
<script>
var s = document.querySelector('#selector');
suite('activate event', function() {
test('activates on tap', function(done) {
assert.equal(s.selected, '0');
async.nextTick(function() {
// select Item 2
s.children[1].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
});
s.addEventListener("core-activate", function(event) {
assert.equal(event.detail.item, s.children[1]);
assert.equal(s.selected, 1);
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-basic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
.my-selected {
background: red;
}
</style>
</head>
<body>
<core-selector id="selector1">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</core-selector>
<br><br>
<core-selector id="selector2" selected="item3" selectedClass="my-selected" valueattr="id">
<div id="item1">Item 1</div>
<div id="item2">Item 2</div>
<div id="item3">Item 3</div>
<div id="item4">Item 4</div>
<div id="item5">Item 5</div>
</core-selector>
<script>
var s1 = document.querySelector('#selector1');
var s2 = document.querySelector('#selector2');
suite('basic', function() {
suite('defaults', function() {
test('to nothing selected', function() {
assert.equal(s1.selected, null);
});
test('to core-selected as selectedClass', function() {
assert.equal(s1.selectedClass, 'core-selected');
});
test('to a single-select', function() {
assert.isFalse(s1.multi);
});
test('to name as valueattr', function() {
assert.equal(s1.valueattr, 'name');
});
test('as many items as children', function() {
assert.equal(s1.items.length, 5);
});
});
test('honors the selected attribute', function() {
assert.equal(s2.selected, 'item3');
assert.equal(s2.selectedIndex, 2);
assert.equal(s2.selectedItem, document.querySelector('#item3'));
});
test('honors the selectedClass attribute', function() {
assert.equal(s2.selectedClass, 'my-selected');
assert.isTrue(document.querySelector('#item3').classList.contains('my-selected'));
});
test('allows assignment to selected', function(done) {
// setup listener for core-select event
var selectEventCounter = 0;
s2.addEventListener('core-select', function(e) {
if (e.detail.isSelected) {
selectEventCounter++;
// selectedItem and detail.item should be the same
assert.equal(e.detail.item, s2.selectedItem);
}
});
// set selected
s2.selected = 'item5';
asyncPlatformFlush(function() {
// check core-select event
assert.equal(selectEventCounter, 1);
// check selected class
assert.isTrue(s2.children[4].classList.contains('my-selected'));
// check selectedItem
assert.equal(s2.selectedItem, s2.children[4]);
// selecting the same value shouldn't fire core-select
selectEventCounter = 0;
s2.selected = 'item5';
flush(function() {
assert.equal(selectEventCounter, 0);
done();
});
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-content</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body>
<polymer-element name="test-core-selector" noscript attributes="selected">
<template>
<core-selector id="selector" selected="{{selected}}" valueattr="id">
<content></content>
</core-selector>
</template>
</polymer-element>
<test-core-selector selected="item0">
<div id="item0">item0</div>
<div id="item1">item1</div>
<div id="item2">item2</div>
<div id="item3">item3</div>
</test-core-selector>
<script>
var s = document.querySelector('test-core-selector');
suite('content', function() {
test('get selected', function(done) {
asyncPlatformFlush(function() {
// check selected class
assert.isTrue(s.children[0].classList.contains('core-selected'));
done();
});
});
test('set selected', function(done) {
// set selected
s.selected = 'item1';
asyncPlatformFlush(function() {
// check selected class
assert.isTrue(s.children[1].classList.contains('core-selected'));
done();
});
});
test('get items', function() {
assert.equal(s.$.selector.items.length, s.children.length);
});
test('activate event', function(done) {
s.children[2].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
asyncPlatformFlush(function() {
// check selected class
assert.isTrue(s.children[2].classList.contains('core-selected'));
done();
});
});
test('add item dynamically', function(done) {
var item = document.createElement('div');
item.id = 'item4';
item.textContent = 'item4';
s.appendChild(item);
// set selected
s.selected = 'item4';
asyncPlatformFlush(function() {
// check selected class
assert.isTrue(s.children[4].classList.contains('core-selected'));
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'activate-event.html',
'basic.html',
'multi.html',
'next-previous.html',
'selected-attr-prop.html',
'template-repeat.html',
'content.html'
]);
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-multi</title>
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body>
<core-selector id="selector" multi>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</core-selector>
<script>
var s = document.querySelector('#selector');
suite('multi', function() {
test('honors the multi attribute', function() {
assert.isTrue(s.multi);
});
test('has sane defaults', function() {
assert.equal(s.selected, null);
assert.equal(s.selectedClass, 'core-selected');
assert.equal(s.valueattr, 'name');
assert.equal(s.items.length, 5);
});
test('allows multi-selection', function(done) {
// setup listener for core-select event
var selectEventCounter = 0;
s.addEventListener('core-select', function(e) {
if (e.detail.isSelected) {
selectEventCounter++;
} else {
selectEventCounter--;
}
});
// set selected
s.selected = [0, 2];
asyncPlatformFlush(function() {
// check core-select event
assert.equal(selectEventCounter, 2);
// check selected class
assert.isTrue(s.children[0].classList.contains('core-selected'));
assert.isTrue(s.children[2].classList.contains('core-selected'));
// check selectedItem
assert.equal(s.selectedItem.length, 2);
assert.equal(s.selectedItem[0], s.children[0]);
assert.equal(s.selectedItem[1], s.children[2]);
// tap on already selected element should unselect it
s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
// check selected
assert.equal(s.selected.length, 1);
asyncPlatformFlush(function() {
assert.equal(selectEventCounter, 1);
assert.isFalse(s.children[0].classList.contains('core-selected'));
// add selected
s.selected.push(3);
s.selected.push(4);
// check core-select event
asyncPlatformFlush(function() {
assert.equal(selectEventCounter, 3);
done();
});
});
});
});
test('toggle multi to false', function(done) {
// set selected
s.selected = [0, 2];
var first = s.selected[0];
// set mutli to false, so to make it single-selection
s.multi = false;
asyncPlatformFlush(function() {
// selected should not be an array
assert.isNotArray(s.selected);
// selected should be the first value in the old array
assert.equal(s.selected, first);
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-next-previous-wrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body unresolved>
<core-selector id="selector" selected="0">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</core-selector>
<script>
var s = document.querySelector('#selector');
function assertAndSelect(method, expectedIndex, wrap) {
return function(done) {
assert.equal(s.selected, expectedIndex);
s[method](wrap);
flush(done);
}
}
suite('next/previous', function() {
test('selectNext(true) wraps', function(done) {
assert.equal(s.selected, 0);
async.series([
assertAndSelect('selectNext', 0, true),
assertAndSelect('selectNext', 1, true),
assertAndSelect('selectNext', 2, true),
function(done) {
assert.equal(s.selected, 0);
done();
}
], done);
});
test('selectPrevious(true) wraps', function(done) {
assert.equal(s.selected, 0);
async.series([
assertAndSelect('selectPrevious', 0, true),
assertAndSelect('selectPrevious', 2, true),
assertAndSelect('selectPrevious', 1, true),
function(done) {
assert.equal(s.selected, 0);
done();
}
], done);
});
test('selectNext() does not wrap', function(done) {
assert.equal(s.selected, 0);
async.series([
assertAndSelect('selectNext', 0),
assertAndSelect('selectNext', 1),
assertAndSelect('selectNext', 2),
assertAndSelect('selectNext', 2),
assertAndSelect('selectNext', 2),
function(done) {
s.selected = 0;
asyncPlatformFlush(done);
}
], done);
});
test('selectPrevious() does not wrap', function(done) {
assert.equal(s.selected, 0);
s.selected = 2;
async.series([
asyncPlatformFlush,
assertAndSelect('selectPrevious', 2),
assertAndSelect('selectPrevious', 1),
assertAndSelect('selectPrevious', 0),
assertAndSelect('selectPrevious', 0),
assertAndSelect('selectPrevious', 0),
], done);
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-selected-attr-prop</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body>
<core-selector id="selector" selected="2" selectedProperty="myprop">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</core-selector>
<script>
var s = document.querySelector('#selector');
suite('selected attributes', function() {
test('custom selectedProperty', function(done) {
s.selected = 4;
asyncPlatformFlush(function() {
// check Item2's attribute and property (should be unselect)
assert.isFalse(s.children[2].hasAttribute('active'));
assert.notEqual(s.children[2].myprop, true);
// check Item4's attribute and property
assert.isTrue(s.children[4].hasAttribute('active'));
assert.isTrue(s.children[4].myprop);
done();
});
});
});
</script>
</body>
</html>
<!doctype html>
<!--
Copyright (c) 2014 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">
<title>core-selector-template-repeat</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../webcomponentsjs/webcomponents.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../core-selector.html">
<style>
.core-selected {
background: #ccc;
}
</style>
</head>
<body>
<core-selector id="selector" selected="1">
<template id="itemsTemplate" repeat="{{items}}">
<div name="{{}}">{{}}</div>
</template>
</core-selector>
<script>
var s = document.querySelector('#selector');
var t = document.querySelector('#itemsTemplate');
suite('<template repeat...>', function() {
test('supports repeated children', function(done) {
t.model = {items: ['Item1', 'Item2', 'Item3', "Item4"]};
asyncPlatformFlush(function() {
// check items
assert.equal(s.items.length, 4);
assert.equal(s.selected, 1);
// check selectedItem
var item = s.selectedItem;
assert.equal(s.items[1], item);
// check selected class
assert.isTrue(item.classList.contains('core-selected'));
done();
});
});
});
</script>
</body>
</html>
......@@ -2,15 +2,15 @@
"name": "flatiron-director",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1"
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.2.1",
"version": "0.5.0",
"homepage": "https://github.com/Polymer/flatiron-director",
"_release": "0.2.1",
"_release": "0.5.0",
"_resolution": {
"type": "version",
"tag": "0.2.1",
"commit": "d01427ec016607908f939aad6b7ab4164b355a73"
"tag": "0.5.0",
"commit": "acddce5aebb2d22367e670aff8cbd902f18c6a50"
},
"_source": "git://github.com/Polymer/flatiron-director.git",
"_target": "*",
......
......@@ -2,7 +2,7 @@
"name": "flatiron-director",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1"
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.2.1"
"version": "0.5.0"
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ license that can be found in the LICENSE file.
<html>
<head>
<title>Director</title>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="flatiron-director.html">
</head>
<body>
......@@ -23,7 +23,7 @@ license that can be found in the LICENSE file.
});
</script>
</polymer-element>
<x-test></x-test>
</body>
</html>
......@@ -6,7 +6,7 @@ license that can be found in the LICENSE file.
<link rel="import" href="../polymer/polymer.html">
<script src="director/director.min.js"></script>
<polymer-element name="flatiron-director" attributes="route autoHash">
<polymer-element name="flatiron-director" attributes="route autoHash" hidden>
<script>
(function() {
var private_router;
......@@ -16,7 +16,8 @@ license that can be found in the LICENSE file.
this.router.on(/(.*)/, function(route) {
this.route = route;
}.bind(this));
this.route = this.router.getRoute(0) || '';
this.route = this.router.getRoute() ?
this.router.getRoute().join(this.router.delimiter): '';
},
routeChanged: function() {
if (this.autoHash) {
......
<!--
@license
Copyright (c) 2014 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
-->
<!doctype html>
<html>
<head>
......@@ -33,7 +42,7 @@
right: 0;
}
</style>
<script src="../platform/platform.js"></script>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
......@@ -61,4 +70,4 @@
}
</script>
</body>
</html>
\ No newline at end of file
</html>
{
"name": "platform",
"main": "platform.js",
"homepage": "https://github.com/Polymer/platform",
"authors": [
"The Polymer Authors"
],
"description": "Integrate platform polyfills: load, build, test",
"keywords": [
"polymer",
"web",
"components"
],
"license": "BSD",
"private": true,
"version": "0.3.4",
"_release": "0.3.4",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "4e59041d572d81d633d73868f261fb89a0327501"
},
"_source": "git://github.com/Polymer/platform.git",
"_target": ">=0.3.0 <1.0.0",
"_originalSource": "Polymer/platform"
}
\ No newline at end of file
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
# Contributing
Want to contribute to Polymer? Great!
We are more than happy to accept external contributions to the project in the form of [feedback](https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev), [bug reports](../../issues), and pull requests.
## Contributor License Agreement
Before we can accept patches, there's a quick web form you need to fill out.
- If you're contributing as an individual (e.g. you own the intellectual property), fill out [this form](http://code.google.com/legal/individual-cla-v1.0.html).
- If you're contributing under a company, fill out [this form](http://code.google.com/legal/corporate-cla-v1.0.html) instead.
This CLA asserts that contributions are owned by you and that we can license all work under our [license](LICENSE).
Other projects require a similar agreement: jQuery, Firefox, Apache, Node, and many more.
[More about CLAs](https://www.google.com/search?q=Contributor%20License%20Agreement)
## Initial setup
Here's an easy guide that should get you up and running:
1. Setup Grunt: `sudo npm install -g grunt-cli`
1. Fork the project on github and pull down your copy.
> replace the {{ username }} with your username and {{ repository }} with the repository name
git clone git@github.com:{{ username }}/{{ repository }}.git --recursive
Note the `--recursive`. This is necessary for submodules to initialize properly. If you don't do a recursive clone, you'll have to init them manually:
git submodule init
git submodule update
Download and run the `pull-all.sh` script to install the sibling dependencies.
git clone git://github.com/Polymer/tools.git && tools/bin/pull-all.sh
1. Test your change
> in the repo you've made changes to, run the tests:
cd $REPO
npm install
grunt test
1. Commit your code and make a pull request.
That's it for the one time setup. Now you're ready to make a change.
## Submitting a pull request
We iterate fast! To avoid potential merge conflicts, it's a good idea to pull from the main project before making a change and submitting a pull request. The easiest way to do this is setup a remote called `upstream` and do a pull before working on a change:
git remote add upstream git://github.com/Polymer/{{ repository }}.git
Then before making a change, do a pull from the upstream `master` branch:
git pull upstream master
To make life easier, add a "pull upstream" alias in your `.gitconfig`:
[alias]
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
That will pull in changes from your forked repo, the main (upstream) repo, and merge the two. Then it's just a matter of running `git pu` before a change and pushing to your repo:
git checkout master
git pu
# make change
git commit -a -m 'Awesome things.'
git push
Lastly, don't forget to submit the pull request.
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Polymer project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Polymer, where such license applies only to those
patent claims, both currently owned or controlled by Google and acquired
in the future, licensable by Google that are necessarily infringed by
this implementation of Polymer. This grant does not include claims
that would be infringed only as a consequence of further modification of
this implementation. If you or your agent or exclusive licensee
institute or order or agree to the institution of patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that this implementation of Polymer or any code
incorporated within this implementation of Polymer constitutes
direct or contributory patent infringement, or inducement of patent
infringement, then any patent rights granted to you under this License
for this implementation of Polymer shall terminate as of the date
such litigation is filed.
Platform
========
Aggregated polyfills the Polymer platform.
[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/platform/README)](https://github.com/igrigorik/ga-beacon)
{
"name": "platform",
"main": "platform.js",
"homepage": "https://github.com/Polymer/platform",
"authors": [
"The Polymer Authors"
],
"description": "Integrate platform polyfills: load, build, test",
"keywords": [
"polymer",
"web",
"components"
],
"license": "BSD",
"private": true
}
\ No newline at end of file
BUILD LOG
---------
Build Time: 2014-07-11T11:45:39
NODEJS INFORMATION
==================
nodejs: v0.10.28
chai: 1.9.1
grunt: 0.4.4
grunt-audit: 0.0.3
grunt-concat-sourcemap: 0.4.1
grunt-contrib-concat: 0.4.0
grunt-contrib-uglify: 0.5.0
grunt-contrib-yuidoc: 0.5.2
grunt-karma: 0.8.3
karma: 0.12.14
karma-crbot-reporter: 0.0.4
karma-firefox-launcher: 0.1.3
karma-ie-launcher: 0.1.5
karma-mocha: 0.1.4
karma-safari-launcher: 0.1.1
karma-script-launcher: 0.1.0
mocha: 1.20.1
Platform: 0.3.4
REPO REVISIONS
==============
CustomElements: eef2f8f7d71ba474d40d59c743db049dbf174c0f
HTMLImports: 5b24a18efe54b3e484ea95c2d28f46d6c4ef016b
NodeBind: c47bc1b40d1cf0123b29620820a7111471e83ff3
ShadowDOM: db04e2193a076120294dbcdc86da6c3680e92828
TemplateBinding: 2a006d1635241b6a0b8ba11a8250ec1d8dacad7a
WeakMap: a0947a9a0f58f5733f464755c3b86de624b00a5d
observe-js: 18d3996727819eef3f00f9c901b7296b9e8635d3
platform-dev: 35728d3e1951e77cbd484ed2b51d3da5b8119715
BUILD HASHES
============
build/platform.js: 27fa15cfecf3bb1e3ecd60345606adad9742bc25
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "polymer-localstorage",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1"
},
"version": "0.2.1",
"homepage": "https://github.com/Polymer/polymer-localstorage",
"_release": "0.2.1",
"_resolution": {
"type": "version",
"tag": "0.2.1",
"commit": "19e87468b2a977bf79db60db247e0b4e8672e920"
},
"_source": "git://github.com/Polymer/polymer-localstorage.git",
"_target": "*",
"_originalSource": "Polymer/polymer-localstorage"
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>polymer-localstorage</title>
<script src="../platform/platform.js"></script>
<link rel="import" href="polymer-localstorage.html">
<link rel="import" href="../polymer-ui-toggle-button/polymer-ui-toggle-button.html">
</head>
<body>
<polymer-element name="x-test1">
<template>
string entered below will be stored in localStorage and automatically retrived from localStorage when the page is reloaded<br>
<input value="{{value}}">
<polymer-localstorage name="polymer-localstorage-x-test1" value="{{value}}"></polymer-localstorage>
</template>
<script>
Polymer('x-test1');
</script>
</polymer-element>
<x-test1></x-test1>
<br><br>
<polymer-element name="x-test2">
<template>
<polymer-ui-toggle-button value="{{mode}}"></polymer-ui-toggle-button>
<polymer-localstorage name="polymer-localstorage-x-test2" value="{{mode}}"></polymer-localstorage>
</template>
<script>
Polymer('x-test2', {
mode: false
});
</script>
</polymer-element>
<x-test2></x-test2>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer api</title>
<style>
html, body {
font-family: Arial, sans-serif;
white-space: nowrap;
overflow: hidden;
}
[noviewer] [ifnoviewer] {
display: block;
}
[detector], [ifnoviewer], [noviewer] [ifviewer] {
display: none;
}
[ifviewer], [ifnoviewer] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
iframe {
border: none;
margin: 0;
width: 100%;
height: 100%;
}
#remote {
position: absolute;
top: 0;
right: 0;
}
</style>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
<polymer-home-page ifviewer></polymer-home-page>
<div ifnoviewer>
<span id="remote">[remote]</span>
<iframe></iframe>
</div>
<!-- -->
<script>
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
// if no local info viewer, load it remotely
function noviewer() {
document.body.setAttribute('noviewer', '');
var path = location.pathname.split('/');
var module = path.pop() || path.pop();
document.querySelector('iframe').src = remoteDocs + module;
document.querySelector('title').textContent = module;
}
// for testing only
var opts = window.location.search;
if (opts.indexOf('noviewer') >= 0) {
noviewer();
}
</script>
</body>
</html>
\ No newline at end of file
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
/**
* @module Polymer Elements
*/
/**
* Element access to localStorage. The "name" property
* is the key to the data ("value" property) stored in localStorage.
*
* polymer-localstorage automatically saves the value to localStorage when
* value is changed. Note that if value is an object auto-save will be
* triggered only when value is a different instance.
*
* Example:
*
* <polymer-localstorage name="my-app-storage" value="{{value}}"></polymer-localstorage>
*
* @class polymer-localstorage
* @blurb Element access to localStorage.
* @snap http://polymer.github.io/polymer-localstorage/snap.png
* @author The Polymer Authors
* @categories Data
*
*/
/**
* Fired after it is loaded from localStorage.
*
* @event polymer-localstorage-load
*/
-->
<link rel="import" href="../polymer/polymer.html">
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
/**
* @module Polymer Elements
*/
/**
* polymer-localstorage provides access to localStorage.
*
* Example:
*
* <polymer-localstorage name="my-app-storage" value="{{value}}"></polymer-localstorage>
*
* @class polymer-localstorage
*/
-->
<polymer-element name="polymer-localstorage" attributes="name value useRaw">
<template>
<style>
@host {
* {
display: none;
}
}
</style>
</template>
<script>
Polymer('polymer-localstorage', {
useRaw: false,
ready: function() {
this.load();
},
valueChanged: function() {
this.save();
},
load: function() {
var s = window.localStorage.getItem(this.name);
if (s && !this.useRaw) {
this.value = JSON.parse(s);
} else {
this.value = s;
}
},
save: function() {
window.localStorage.setItem(this.name,
this.useRaw ? this.value : JSON.stringify(this.value));
}
});
</script>
</polymer-element>
\ No newline at end of file
<!doctype html>
<html>
<head>
<title>polymer-localstorage</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-localstorage.html">
</head>
<body>
<polymer-localstorage id="localstorage" name="polymer-localstorage-test" useRaw></polymer-localstorage>
<script>
var assert = chai.assert;
document.addEventListener('polymer-ready', function() {
var s = document.querySelector('#localstorage');
var m = 'hello wold';
window.localStorage.setItem(s.name, m);
s.load();
assert.equal(s.value, m);
s.value = 'goodbye';
assert.equal(window.localStorage.getItem(s.name), m);
done();
});
</script>
</body>
</html>
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
htmlSuite('polymer-localstorage', function() {
htmlTest('html/polymer-localstorage.html');
});
\ No newline at end of file
<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>polymer-localstorage Test Runner (Mocha)</title>
<meta charset="UTF-8">
<!-- -->
<link rel="stylesheet" href="../../tools/test/mocha/mocha.css" />
<script src="../../tools/test/mocha/mocha.js"></script>
<script src="../../tools/test/chai/chai.js"></script>
<script src="../../tools/test/mocha-htmltest.js"></script>
<!-- -->
<script src="../../platform/platform.js"></script>
</head>
<body>
<div id="mocha"></div>
<script>
mocha.setup({ui: 'tdd', slow: 1000, htmlbase: ''});
</script>
<!-- -->
<script src="js/polymer-localstorage.js"></script>
<!-- -->
<script>
mocha.run();
</script>
</body>
</html>
{
"name": "polymer-selection",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1"
},
"version": "0.2.1",
"homepage": "https://github.com/Polymer/polymer-selection",
"_release": "0.2.1",
"_resolution": {
"type": "version",
"tag": "0.2.1",
"commit": "414b5314477367acb821fc515279f18bc66e4897"
},
"_source": "git://github.com/Polymer/polymer-selection.git",
"_target": "0.2.1",
"_originalSource": "Polymer/polymer-selection"
}
\ No newline at end of file
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
See https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Polymer project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Polymer, where such license applies only to those
patent claims, both currently owned or controlled by Google and acquired
in the future, licensable by Google that are necessarily infringed by
this implementation of Polymer. This grant does not include claims
that would be infringed only as a consequence of further modification of
this implementation. If you or your agent or exclusive licensee
institute or order or agree to the institution of patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that this implementation of Polymer or any code
incorporated within this implementation of Polymer constitutes
direct or contributory patent infringement, or inducement of patent
infringement, then any patent rights granted to you under this License
for this implementation of Polymer shall terminate as of the date
such litigation is filed.
{
"name": "polymer-selection",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1"
},
"version": "0.2.1"
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Selection</title>
<script src="../platform/platform.js"></script>
<link rel="import" href="polymer-selection.html">
</head>
<body>
<polymer-element name="selection-example">
<template>
<style>
/* @polyfill ul > * */
::-webkit-distributed(> *) {
cursor: pointer;
}
/* @polyfill ul > .selected */
::-webkit-distributed(> .selected) {
font-weight: bold;
font-style: italic;
}
</style>
<ul on-tap="{{itemTapAction}}">
<content></content>
</ul>
<polymer-selection id="selection" multi on-polymer-select="{{selectAction}}"></polymer-selection>
</template>
<script>
Polymer('selection-example', {
itemTapAction: function(e) {
this.$.selection.select(e.target);
},
selectAction: function(e, detail) {
detail.item.classList.toggle('selected', detail.isSelected);
}
});
</script>
</polymer-element>
<selection-example>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</selection-example>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer api</title>
<style>
html, body {
font-family: Arial, sans-serif;
white-space: nowrap;
overflow: hidden;
}
[noviewer] [ifnoviewer] {
display: block;
}
[detector], [ifnoviewer], [noviewer] [ifviewer] {
display: none;
}
[ifviewer], [ifnoviewer] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
iframe {
border: none;
margin: 0;
width: 100%;
height: 100%;
}
#remote {
position: absolute;
top: 0;
right: 0;
}
</style>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
<polymer-home-page ifviewer></polymer-home-page>
<div ifnoviewer>
<span id="remote">[remote]</span>
<iframe></iframe>
</div>
<!-- -->
<script>
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
// if no local info viewer, load it remotely
function noviewer() {
document.body.setAttribute('noviewer', '');
var path = location.pathname.split('/');
var module = path.pop() || path.pop();
document.querySelector('iframe').src = remoteDocs + module;
document.querySelector('title').textContent = module;
}
// for testing only
var opts = window.location.search;
if (opts.indexOf('noviewer') >= 0) {
noviewer();
}
</script>
</body>
</html>
\ No newline at end of file
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
/**
* @module Polymer Elements
*/
-->
<!--
/**
* The polymer-selection element is used to manage selection state. It has no
* visual appearance and is typically used in conjuneciton with another element.
* For example, <a href="polymer-selector.html">polymer-selector</a>
* use a polymer-selection to manage selection.
*
* To mark an item as selected, call the select(item) method on
* polymer-selection. Notice that the item itself is an argument to this method.
* The polymer-selection element manages selection state for any given set of
* items. When an item is selected, the `polymer-select` event is fired.
* The attribute "multi" indicates if multiple items can be selected at once.
*
* Example:
*
* <polymer-element name="selection-example">
* <template>
* <style>
* ::-webkit-distributed(> .selected) {
* font-weight: bold;
* font-style: italic;
* }
* </style>
* <ul on-tap="{{itemTapAction}}">
* <content></content>
* </ul>
* <polymer-selection id="selection" multi on-polymer-select="{{selectAction}}"></polymer-selection>
* </template>
* <script>
* Polymer('selection-example', {
* itemTapAction: function(e) {
* this.$.selection.select(e.target);
* },
* selectAction: function(e, detail) {
* detail.item.classList.toggle('selected', detail.isSelected);
* }
* });
* </script>
* </polymer-element>
*
* <selection-example>
* <li>Red</li>
* <li>Green</li>
* <li>Blue</li>
* </selection-example>
*
* @class polymer-selection
*/
/**
* Fired when an item's selection state is changed. This event is fired both
* when an item is selected or deselected. The `isSelected` detail property
* contains the selection state.
*
* @event polymer-select
* @param {Object} detail
* @param {boolean} detail.isSelected true for selection and false for deselection
* @param {Object} detail.item the item element
*/
-->
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="polymer-selection" attributes="multi">
<template>
<style>
:host {
display: none !important;
}
</style>
</template>
<script>
Polymer('polymer-selection', {
/**
* If true, multiple selections are allowed.
*
* @attribute multi
* @type boolean
* @default false
*/
multi: false,
ready: function() {
this.clear();
},
clear: function() {
this.selection = [];
},
/**
* Retrieves the selected item(s).
* @method getSelection
* @returns Returns the selected item(s). If the multi property is true,
* getSelection will return an array, otherwise it will return
* the selected item or undefined if there is no selection.
*/
getSelection: function() {
return this.multi ? this.selection : this.selection[0];
},
/**
* Indicates if a given item is selected.
* @method isSelected
* @param {any} item The item whose selection state should be checked.
* @returns Returns true if `item` is selected.
*/
isSelected: function(item) {
return this.selection.indexOf(item) >= 0;
},
setItemSelected: function(item, isSelected) {
if (item !== undefined && item !== null) {
if (isSelected) {
this.selection.push(item);
} else {
var i = this.selection.indexOf(item);
if (i >= 0) {
this.selection.splice(i, 1);
}
}
this.fire("polymer-select", {isSelected: isSelected, item: item});
}
},
/**
* Set the selection state for a given `item`. If the multi property
* is true, then the selected state of `item` will be toggled; otherwise
* the `item` will be selected.
* @method select
* @param {any} item: The item to select.
*/
select: function(item) {
if (this.multi) {
this.toggle(item);
} else if (this.getSelection() !== item) {
this.setItemSelected(this.getSelection(), false);
this.setItemSelected(item, true);
}
},
/**
* Toggles the selection state for `item`.
* @method toggle
* @param {any} item: The item to toggle.
*/
toggle: function(item) {
this.setItemSelected(item, !this.isSelected(item));
}
});
</script>
</polymer-element>
<!doctype html>
<html>
<head>
<title>polymer-selection-multi</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-selection.html">
</head>
<body>
<polymer-selection multi></polymer-selection>
<script>
var assert = chai.assert;
document.addEventListener('polymer-ready', function() {
var s = document.querySelector('polymer-selection');
s.addEventListener("polymer-select", function(event) {
if (test === 1) {
// check test1
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item1)');
assert.isTrue(s.isSelected(event.detail.item));
assert.equal(s.getSelection().length, 1);
// test2
test++;
s.select('(item2)');
} else if (test === 2) {
// check test2
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item2)');
assert.isTrue(s.isSelected(event.detail.item));
assert.equal(s.getSelection().length, 2);
done();
}
});
// test1
var test = 1;
s.select('(item1)');
});
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer-selection</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-selection.html">
</head>
<body>
<polymer-selection></polymer-selection>
<script>
var assert = chai.assert;
document.addEventListener('polymer-ready', function() {
var s = document.querySelector('polymer-selection');
s.addEventListener("polymer-select", function(event) {
if (test === 1) {
// check test1
assert.isTrue(event.detail.isSelected);
assert.equal(event.detail.item, '(item)');
assert.isTrue(s.isSelected(event.detail.item));
assert.isFalse(s.isSelected('(some_item_not_selected)'));
// test2
test++;
s.select(null);
} else if (test === 2) {
// check test2
assert.isFalse(event.detail.isSelected);
assert.equal(event.detail.item, '(item)');
assert.isFalse(s.isSelected(event.detail.item));
done();
}
});
// test1
var test = 1;
s.select('(item)');
});
</script>
</body>
</html>
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
htmlSuite('polymer-selection', function() {
htmlTest('html/polymer-selection.html');
htmlTest('html/polymer-selection-multi.html');
});
\ No newline at end of file
<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>polymer-selection Test Runner (Mocha)</title>
<meta charset="UTF-8">
<!-- -->
<link rel="stylesheet" href="../../tools/test/mocha/mocha.css" />
<script src="../../tools/test/mocha/mocha.js"></script>
<script src="../../tools/test/chai/chai.js"></script>
<script src="../../tools/test/mocha-htmltest.js"></script>
<!-- -->
<script src="../../platform/platform.js"></script>
</head>
<body>
<div id="mocha"></div>
<script>
mocha.setup({ui: 'tdd', slow: 1000, htmlbase: ''});
</script>
<!-- -->
<script src="js/polymer-selection.js"></script>
<!-- -->
<script>
mocha.run();
</script>
</body>
</html>
{
"name": "polymer-selector",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1",
"polymer-selection": "Polymer/polymer-selection#0.2.1"
},
"version": "0.2.1",
"homepage": "https://github.com/Polymer/polymer-selector",
"_release": "0.2.1",
"_resolution": {
"type": "version",
"tag": "0.2.1",
"commit": "cd84d37c050e2badb90fd621061866bcdde48515"
},
"_source": "git://github.com/Polymer/polymer-selector.git",
"_target": "*",
"_originalSource": "Polymer/polymer-selector"
}
\ No newline at end of file
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
See https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md
// Copyright (c) 2012 The Polymer Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Polymer project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Polymer, where such license applies only to those
patent claims, both currently owned or controlled by Google and acquired
in the future, licensable by Google that are necessarily infringed by
this implementation of Polymer. This grant does not include claims
that would be infringed only as a consequence of further modification of
this implementation. If you or your agent or exclusive licensee
institute or order or agree to the institution of patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that this implementation of Polymer or any code
incorporated within this implementation of Polymer constitutes
direct or contributory patent infringement, or inducement of patent
infringement, then any patent rights granted to you under this License
for this implementation of Polymer shall terminate as of the date
such litigation is filed.
polymer-selector
================
[LICENSE](https://raw.github.com/Polymer/polymer/master/LICENSE)
[PATENTS](https://raw.github.com/Polymer/polymer/master/PATENTS)
[CONTRIBUTING](https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md)
{
"name": "polymer-selector",
"private": true,
"dependencies": {
"polymer": "Polymer/polymer#0.2.1",
"polymer-selection": "Polymer/polymer-selection#0.2.1"
},
"version": "0.2.1"
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Selector</title>
<script src="../platform/platform.js"></script>
<link rel="import" href="polymer-selector.html">
</head>
<body unresolved>
<polymer-element name="selector-examples">
<template>
<style>
.list {
display: block;
border: 1px solid #ccc;
border-bottom: none;
background: #666;
color: white;
list-style: none;
margin: 0;
padding: 0;
}
.list > * {
height: 40px;
line-height: 40px;
padding: 0 20px;
border-bottom: 1px solid #ccc;
}
.list > *.polymer-selected {
background: #333;
}
li {
height: 30px;
}
li.polymer-selected:after {
content: "\2713";
position: absolute;
padding-left: 10px;
}
</style>
<h2>basic</h2>
<polymer-selector class="list" selected="0">
<div>Item 0</div>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
</polymer-selector>
<h2>multi-selection</h2>
<polymer-selector class="list" selected="{{multiSelected}}" multi>
<div>Item 0</div>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
</polymer-selector>
<h2>list</h2>
<polymer-selector target="{{$.list}}" selected="0"></polymer-selector>
<ul id="list">
<li>Item 0</li>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<h2>binding of a group of radio buttons to a variable</h2>
<polymer-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"
selected="{{color}}" valueattr="value" selectedProperty="checked"
activateEvent="change"></polymer-selector>
<form id="myForm">
<label><input type="radio" name="color" value="red"> Red</label> <br>
<label><input type="radio" name="color" value="green"> Green</label> <br>
<label><input type="radio" name="color" value="blue"> Blue</label> <br>
<p>color = {{color}}</p>
</form>
</template>
<script>
Polymer('selector-examples', {
ready: function() {
this.multiSelected = [1, 3];
this.color = 'green';
}
});
</script>
</polymer-element>
<selector-examples></selector-examples>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer api</title>
<style>
html, body {
font-family: Arial, sans-serif;
white-space: nowrap;
overflow: hidden;
}
[noviewer] [ifnoviewer] {
display: block;
}
[detector], [ifnoviewer], [noviewer] [ifviewer] {
display: none;
}
[ifviewer], [ifnoviewer] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
iframe {
border: none;
margin: 0;
width: 100%;
height: 100%;
}
#remote {
position: absolute;
top: 0;
right: 0;
}
</style>
<script src="../platform/platform.js"></script>
<link rel="import" href="../polymer-home-page/polymer-home-page.html">
</head>
<body>
<img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()">
<polymer-home-page ifviewer></polymer-home-page>
<div ifnoviewer>
<span id="remote">[remote]</span>
<iframe></iframe>
</div>
<!-- -->
<script>
var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/';
// if no local info viewer, load it remotely
function noviewer() {
document.body.setAttribute('noviewer', '');
var path = location.pathname.split('/');
var module = path.pop() || path.pop();
document.querySelector('iframe').src = remoteDocs + module;
document.querySelector('title').textContent = module;
}
// for testing only
var opts = window.location.search;
if (opts.indexOf('noviewer') >= 0) {
noviewer();
}
</script>
</body>
</html>
\ No newline at end of file
<!doctype html>
<html>
<head>
<title>polymer-selector-activate-event</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-selector.html">
<style>
.polymer-selected {
background: #ccc;
}
</style>
</head>
<body>
<polymer-selector id="selector" selected="0">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</polymer-selector>
<script>
var assert = chai.assert;
document.addEventListener('polymer-ready', function() {
var s = document.querySelector('#selector');
s.addEventListener("polymer-activate", function(event) {
assert.equal(event.detail.item, s.children[1]);
assert.equal(s.selected, 1);
done();
});
assert.equal(s.selected, '0');
requestAnimationFrame(function() {
s.children[1].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
});
});
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer-selector-basic</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-selector.html">
<style>
.polymer-selected {
background: #ccc;
}
.my-selected {
background: red;
}
</style>
</head>
<body>
<polymer-selector id="selector1">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</polymer-selector>
<br><br>
<polymer-selector id="selector2" selected="item3" selectedClass="my-selected" valueattr="id">
<div id="item1">Item 1</div>
<div id="item2">Item 2</div>
<div id="item3">Item 3</div>
<div id="item4">Item 4</div>
<div id="item5">Item 5</div>
</polymer-selector>
<script>
var assert = chai.assert;
var async = requestAnimationFrame;
function oneMutation(node, options, cb) {
var o = new MutationObserver(function() {
cb();
o.disconnect();
});
o.observe(node, options);
}
document.addEventListener('polymer-ready', function() {
// selector1
var s = document.querySelector('#selector1');
assert.equal(s.selected, null);
assert.equal(s.selectedClass, 'polymer-selected');
assert.isFalse(s.multi);
assert.equal(s.valueattr, 'name');
assert.equal(s.items.length, 5);
// selector2
s = document.querySelector('#selector2');
assert.equal(s.selected, "item3");
assert.equal(s.selectedClass, 'my-selected');
// setup listener for polymer-select event
var selectEventCounter = 0;
s.addEventListener('polymer-select', function(e) {
if (e.detail.isSelected) {
selectEventCounter++;
// selectedItem and detail.item should be the same
assert.equal(e.detail.item, s.selectedItem);
}
});
// set selected
s.selected = 'item5';
Platform.flush();
oneMutation(s, {attributes: true}, function() {
// check polymer-select event
assert.equal(selectEventCounter, 1);
// check selected class
assert.isTrue(s.children[4].classList.contains('my-selected'));
// check selectedItem
assert.equal(s.selectedItem, s.children[4]);
// selecting the same value shouldn't fire polymer-select
selectEventCounter = 0;
s.selected = 'item5';
Platform.flush();
// TODO(ffu): would be better to wait for something to happen
// instead of not to happen
setTimeout(function() {
assert.equal(selectEventCounter, 0);
done();
}, 50);
});
});
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<title>polymer-selector-multi</title>
<script src="../../../platform/platform.js"></script>
<script src="../../../tools/test/htmltest.js"></script>
<script src="../../../tools/test/chai/chai.js"></script>
<link rel="import" href="../../polymer-selector.html">
<style>
.polymer-selected {
background: #ccc;
}
</style>
</head>
<body>
<polymer-selector id="selector" multi>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
</polymer-selector>
<script>
var assert = chai.assert;
function oneMutation(node, options, cb) {
var o = new MutationObserver(function() {
cb();
o.disconnect();
});
o.observe(node, options);
}
document.addEventListener('polymer-ready', function() {
//
var s = document.querySelector('#selector');
assert.equal(s.selected, null);
assert.equal(s.selectedClass, 'polymer-selected');
assert.isTrue(s.multi);
assert.equal(s.valueattr, 'name');
assert.equal(s.items.length, 5);
// setup listener for polymer-select event
var selectEventCounter = 0;
s.addEventListener('polymer-select', function(e) {
if (e.detail.isSelected) {
selectEventCounter++;
} else {
selectEventCounter--;
}
// check selectedItem in polymer-select event
assert.equal(this.selectedItem.length, selectEventCounter);
});
// set selected
s.selected = [0, 2];
Platform.flush();
oneMutation(s, {attributes: true}, function() {
// check polymer-select event
assert.equal(selectEventCounter, 2);
// check selected class
assert.isTrue(s.children[0].classList.contains('polymer-selected'));
assert.isTrue(s.children[2].classList.contains('polymer-selected'));
// check selectedItem
assert.equal(s.selectedItem.length, 2);
assert.equal(s.selectedItem[0], s.children[0]);
assert.equal(s.selectedItem[1], s.children[2]);
// tap on already selected element should unselect it
s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
// check selected
assert.equal(s.selected.length, 1);
assert.isFalse(s.children[0].classList.contains('polymer-selected'));
done();
});
});
</script>
</body>
</html>
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
htmlSuite('polymer-selector', function() {
htmlTest('html/polymer-selector-basic.html');
htmlTest('html/polymer-selector-activate-event.html');
htmlTest('html/polymer-selector-multi.html');
});
\ No newline at end of file
<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>polymer-selector Test Runner (Mocha)</title>
<meta charset="UTF-8">
<!-- -->
<link rel="stylesheet" href="../../tools/test/mocha/mocha.css" />
<script src="../../tools/test/mocha/mocha.js"></script>
<script src="../../tools/test/chai/chai.js"></script>
<script src="../../tools/test/mocha-htmltest.js"></script>
<!-- -->
<script src="../../platform/platform.js"></script>
</head>
<body>
<div id="mocha"></div>
<script>
mocha.setup({ui: 'tdd', slow: 1000, htmlbase: ''});
</script>
<!-- -->
<script src="js/polymer-selector.js"></script>
<!-- -->
<script>
mocha.run();
</script>
</body>
</html>
{
"name": "polymer",
"description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
"homepage": "http://www.polymer-project.org/",
"keywords": [
"util",
"client",
"browser",
"web components",
"web-components"
],
"author": "Polymer Authors <polymer-dev@googlegroups.com>",
"private": true,
"dependencies": {
"platform": "Polymer/platform#>=0.3.0 <1.0.0",
"core-component-page": "Polymer/core-component-page#>=0.3.0 <1.0.0"
"core-component-page": "Polymer/core-component-page#^0.5.0",
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0"
},
"homepage": "https://github.com/Polymer/polymer",
"version": "0.3.4",
"_release": "0.3.4",
"devDependencies": {
"tools": "Polymer/tools#master",
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.2",
"_release": "0.5.2",
"_resolution": {
"type": "version",
"tag": "0.3.4",
"commit": "49a331373b78e37b415dca8e360223b2f63c4035"
"tag": "0.5.2",
"commit": "2a9ca53fa79ca09907e818f1adf806765409ec9c"
},
"_source": "git://github.com/Polymer/polymer.git",
"_target": ">=0.3.0 <1.0.0",
"_target": "~0.5.2",
"_originalSource": "Polymer/polymer"
}
\ No newline at end of file
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
# Contributing
Want to contribute to Polymer? Great!
We are more than happy to accept external contributions to the project in the form of [feedback](https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev), [bug reports](../../issues), and pull requests.
## Contributor License Agreement
Before we can accept patches, there's a quick web form you need to fill out.
- If you're contributing as an individual (e.g. you own the intellectual property), fill out [this form](http://code.google.com/legal/individual-cla-v1.0.html).
- If you're contributing under a company, fill out [this form](http://code.google.com/legal/corporate-cla-v1.0.html) instead.
This CLA asserts that contributions are owned by you and that we can license all work under our [license](LICENSE).
Other projects require a similar agreement: jQuery, Firefox, Apache, Node, and many more.
[More about CLAs](https://www.google.com/search?q=Contributor%20License%20Agreement)
## Initial setup
Here's an easy guide that should get you up and running:
1. Setup Grunt: `sudo npm install -g grunt-cli`
1. Fork the project on github and pull down your copy.
> replace the {{ username }} with your username and {{ repository }} with the repository name
git clone git@github.com:{{ username }}/{{ repository }}.git --recursive
Note the `--recursive`. This is necessary for submodules to initialize properly. If you don't do a recursive clone, you'll have to init them manually:
git submodule init
git submodule update
Download and run the `pull-all.sh` script to install the sibling dependencies.
git clone git://github.com/Polymer/tools.git && tools/bin/pull-all.sh
1. Test your change
> in the repo you've made changes to, run the tests:
cd $REPO
npm install
grunt test
1. Commit your code and make a pull request.
That's it for the one time setup. Now you're ready to make a change.
## Submitting a pull request
We iterate fast! To avoid potential merge conflicts, it's a good idea to pull from the main project before making a change and submitting a pull request. The easiest way to do this is setup a remote called `upstream` and do a pull before working on a change:
git remote add upstream git://github.com/Polymer/{{ repository }}.git
Then before making a change, do a pull from the upstream `master` branch:
git pull upstream master
To make life easier, add a "pull upstream" alias in your `.gitconfig`:
[alias]
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
That will pull in changes from your forked repo, the main (upstream) repo, and merge the two. Then it's just a matter of running `git pu` before a change and pushing to your repo:
git checkout master
git pu
# make change
git commit -a -m 'Awesome things.'
git push
Lastly, don't forget to submit the pull request.
// Copyright (c) 2014 The Polymer Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Polymer project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Polymer, where such license applies only to those
patent claims, both currently owned or controlled by Google and acquired
in the future, licensable by Google that are necessarily infringed by
this implementation of Polymer. This grant does not include claims
that would be infringed only as a consequence of further modification of
this implementation. If you or your agent or exclusive licensee
institute or order or agree to the institution of patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that this implementation of Polymer or any code
incorporated within this implementation of Polymer constitutes
direct or contributory patent infringement, or inducement of patent
infringement, then any patent rights granted to you under this License
for this implementation of Polymer shall terminate as of the date
such litigation is filed.
# Polymer
[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon)
Build Status: [http://build.chromium.org/p/client.polymer/waterfall](http://build.chromium.org/p/client.polymer/waterfall)
[![Polymer build status](http://www.polymer-project.org/build/polymer-dev/status.png "Polymer build status")](http://build.chromium.org/p/client.polymer/waterfall)
## Brief Overview
......@@ -10,8 +8,14 @@ For more detailed info goto [http://polymer-project.org/](http://polymer-project
Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries.
Polymer is based on a set of future technologies, including [Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html), [Custom Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
Polymer is based on a set of future technologies, including [Shadow DOM](http://w3c.github.io/webcomponents/spec/shadow/), [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
## Tools & Testing
For running tests or building minified files, consult the [tooling information](http://www.polymer-project.org/resources/tooling-strategy.html).
For running tests or building minified files, consult the [tooling information](https://www.polymer-project.org/resources/tooling-strategy.html).
## Releases
[Release (tagged) versions](https://github.com/Polymer/polymer/releases) of Polymer include concatenated and minified sources for your convenience.
[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon)
{
"name": "polymer",
"description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
"homepage": "http://www.polymer-project.org/",
"keywords": [
"util",
"client",
"browser",
"web components",
"web-components"
],
"author": "Polymer Authors <polymer-dev@googlegroups.com>",
"private": true,
"dependencies": {
"platform": "Polymer/platform#>=0.3.0 <1.0.0",
"core-component-page": "Polymer/core-component-page#>=0.3.0 <1.0.0"
}
"core-component-page": "Polymer/core-component-page#^0.5.0",
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0"
},
"devDependencies": {
"tools": "Polymer/tools#master",
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.2"
}
\ No newline at end of file
BUILD LOG
---------
Build Time: 2014-07-11T11:45:46
Build Time: 2014-12-11T12:46:30
NODEJS INFORMATION
==================
nodejs: v0.10.28
chai: 1.9.1
grunt: 0.4.4
grunt-audit: 0.0.3
grunt-contrib-uglify: 0.4.0
grunt-contrib-yuidoc: 0.5.2
grunt-karma: 0.8.3
grunt-string-replace: 0.2.7
karma: 0.12.14
karma-crbot-reporter: 0.0.4
karma-firefox-launcher: 0.1.3
karma-ie-launcher: 0.1.5
karma-mocha: 0.1.3
karma-safari-launcher: 0.1.1
karma-script-launcher: 0.1.0
mocha: 1.18.2
Polymer: 0.3.4
nodejs: v0.10.33
grunt: 0.4.5
grunt-audit: 1.0.0
grunt-contrib-concat: 0.5.0
grunt-contrib-copy: 0.7.0
grunt-contrib-uglify: 0.6.0
grunt-string-replace: 1.0.0
REPO REVISIONS
==============
polymer-expressions: 532e3a2be4a6deeb7e47dd1c4fa14c522cdc0576
polymer-gestures: 014f8e1e11ea0c09b4972d8e35c161becdd1c6ef
polymer-dev: 6ad2d610287352433baa407b04cc174631ccb5b5
polymer-expressions: 197c3a0150e7a13374cfcc72e7066113723a623d
polymer-gestures: 17a6304916521be39409af292e8adf899bae0ce7
polymer: a74e9f36526361dccb6df91be439ff9c3e043f41
BUILD HASHES
============
build/polymer.js: ffd85a8ef2d910b63aa17651fe956c22ff1ca8af
\ No newline at end of file
dist/polymer.js: b9ad4c86af79c748cf4ea722f6d56671079fadf7
dist/polymer.min.js: 2f2021ba9682b0bb702ee7fb68fb6fbfd288eac2
dist/layout.html: 348d358a91712ecc2f8811efa430fcd954b4590c
\ No newline at end of file
......@@ -60,15 +60,23 @@ html /deep/ [layout][wrap-reverse] {
}
html /deep/ [flex] {
-ms-flex: 1;
-ms-flex: 1 1 0.000000001px;
-webkit-flex: 1;
flex: 1;
-webkit-flex-basis: 0.000000001px;
flex-basis: 0.000000001px;
}
html /deep/ [vertical][layout] > [flex][auto-vertical], html /deep/ [vertical][layout]::shadow [flex][auto-vertical] {
-ms-flex: 1 1 auto;
-webkit-flex-basis: auto;
flex-basis: auto;
}
html /deep/ [flex][auto] {
-ms-flex: 1 1 auto;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
-webkit-flex-basis: auto;
flex-basis: auto;
}
html /deep/ [flex][none] {
......@@ -157,7 +165,7 @@ html /deep/ [layout][start] {
align-items: flex-start;
}
html /deep/ [layout][center] {
html /deep/ [layout][center], html /deep/ [layout][center-center] {
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
......@@ -177,7 +185,7 @@ html /deep/ [layout][start-justified] {
justify-content: flex-start;
}
html /deep/ [layout][center-justified] {
html /deep/ [layout][center-justified], html /deep/ [layout][center-center] {
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
......@@ -190,7 +198,7 @@ html /deep/ [layout][end-justified] {
}
html /deep/ [layout][around-justified] {
-ms-flex-pack: around;
-ms-flex-pack: distribute;
-webkit-justify-content: space-around;
justify-content: space-around;
}
......
<polymer-element name="polymer-body" extends="body">
<script>
// upgrade polymer-body last so that it can contain other imported elements
document.addEventListener('polymer-ready', function() {
Polymer('polymer-body', Platform.mixin({
created: function() {
this.template = document.createElement('template');
var body = wrap(document).body;
var c$ = body.childNodes.array();
for (var i=0, c; (c=c$[i]); i++) {
if (c.localName !== 'script') {
this.template.content.appendChild(c);
}
}
// snarf up user defined model
window.model = this;
},
parseDeclaration: function(elementElement) {
this.lightFromTemplate(this.template);
}
}, window.model));
});
</script>
</polymer-element>
\ No newline at end of file
......@@ -10,4 +10,3 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="layout.html">
<script src="polymer.js"></script>
<!--<link rel="import" href="../polymer-dev/polymer.html">-->
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment