diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index 4072b4af76..f0a9c76d51 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -29,14 +29,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior", + "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "cf833eab5c55a26c5aa92e56d3fcb079120ce66a" }, - "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git", + "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-a11y-keys-behavior" + "_originalSource": "polymerelements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index e794c358f5..f499351883 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-behaviors", - "version": "1.0.7", + "version": "1.0.8", "description": "Provides a set of behaviors for the iron elements", "private": true, "authors": [ @@ -28,11 +28,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "homepage": "https://github.com/PolymerElements/iron-behaviors", - "_release": "1.0.7", + "_release": "1.0.8", "_resolution": { "type": "version", - "tag": "v1.0.7", - "commit": "033889b20c6b9ebb45a1ff153fbd667e153fe3f7" + "tag": "v1.0.8", + "commit": "663ad706b43989f4961d945b8116cf4db346532f" }, "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-behaviors/bower.json b/dashboard-ui/bower_components/iron-behaviors/bower.json index 0932f917f8..2f7f40e09f 100644 --- a/dashboard-ui/bower_components/iron-behaviors/bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/bower.json @@ -1,6 +1,6 @@ { "name": "iron-behaviors", - "version": "1.0.7", + "version": "1.0.8", "description": "Provides a set of behaviors for the iron elements", "private": true, "authors": [ diff --git a/dashboard-ui/bower_components/iron-behaviors/iron-control-state.html b/dashboard-ui/bower_components/iron-behaviors/iron-control-state.html index 5da455b26d..8362aa3ee2 100644 --- a/dashboard-ui/bower_components/iron-behaviors/iron-control-state.html +++ b/dashboard-ui/bower_components/iron-behaviors/iron-control-state.html @@ -65,8 +65,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, _focusBlurHandler: function(event) { - var target = event.path ? event.path[0] : event.target; - if (target === this) { + // NOTE(cdata): if we are in ShadowDOM land, `event.target` will + // eventually become `this` due to retargeting; if we are not in + // ShadowDOM land, `event.target` will eventually become `this` due + // to the second conditional which fires a synthetic event (that is also + // handled). In either case, we can disregard `event.path`. + + if (event.target === this) { var focused = event.type === 'focus'; this._setFocused(focused); } else if (!this.shadowRoot) { diff --git a/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html b/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html index ace7a113c5..6ee6792730 100644 --- a/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html +++ b/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html @@ -96,9 +96,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN focusable.addEventListener('focus', function() { nFocusEvents += 1; + expect(focusable.focused).to.be.equal(true); MockInteractions.blur(focusable.$.input); }); focusable.addEventListener('blur', function() { + expect(focusable.focused).to.be.equal(false); nBlurEvents += 1; }); diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index 5f4ff261de..ea16ce655c 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -34,14 +34,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-overlay-behavior", + "homepage": "https://github.com/polymerelements/iron-overlay-behavior", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "f03cea265587c724cf3a85aef76b2ab7ccfd2b94" }, - "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git", + "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-overlay-behavior" + "_originalSource": "polymerelements/iron-overlay-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json index 321be71437..26486f6c6d 100644 --- a/dashboard-ui/bower_components/paper-behaviors/.bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -42,7 +42,7 @@ "tag": "v1.0.3", "commit": "90b54de14264c19693601b9fc16af6b68a9d48e4" }, - "_source": "git://github.com/polymerelements/paper-behaviors.git", + "_source": "git://github.com/PolymerElements/paper-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-behaviors" + "_originalSource": "PolymerElements/paper-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index 451bd7599c..542936c37d 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.0.11", + "version": "1.0.12", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -44,11 +44,11 @@ "iron-icon": "PolymerElements/iron-icon#^1.0.0", "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" }, - "_release": "1.0.11", + "_release": "1.0.12", "_resolution": { "type": "version", - "tag": "v1.0.11", - "commit": "a7af749e55fff7599d2ad9da47c86b286e9e2d6f" + "tag": "v1.0.12", + "commit": "bcfc2998c1e83d0c2ad7206e84717ae98145c45a" }, "_source": "git://github.com/polymerelements/paper-input.git", "_target": "^1.0.9", diff --git a/dashboard-ui/bower_components/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index 352ba97bff..548af0f3ba 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.0.11", + "version": "1.0.12", "description": "Material design text fields", "authors": [ "The Polymer Authors" diff --git a/dashboard-ui/bower_components/paper-input/demo/index.html b/dashboard-ui/bower_components/paper-input/demo/index.html index 4a804cb889..c2eb7c37b3 100644 --- a/dashboard-ui/bower_components/paper-input/demo/index.html +++ b/dashboard-ui/bower_components/paper-input/demo/index.html @@ -73,6 +73,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

Validation

+ + diff --git a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html index 2c2b42bc59..2ad0870fe9 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html @@ -321,10 +321,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * Validates the input element and sets an error style if needed. + * + * @return {boolean} */ - validate: function() { - return this.inputElement.validate(); - }, + validate: function() { + return this.inputElement.validate(); + }, + + /** + * If `autoValidate` is true, then validates the element. + */ + _handleAutoValidate: function() { + if (this.autoValidate) + this.validate(); + }, /** * Restores the cursor to its original position after updating the value. diff --git a/dashboard-ui/bower_components/paper-input/paper-input-container.html b/dashboard-ui/bower_components/paper-input/paper-input-container.html index 28fcc341fe..dc4e55ba7f 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-container.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-container.html @@ -350,7 +350,8 @@ This element is `display:block` by default, but you can set the `inline` attribu focused: { readOnly: true, type: Boolean, - value: false + value: false, + notify: true }, _addons: { @@ -417,6 +418,10 @@ This element is `display:block` by default, but you can set the `inline` attribu return Polymer.dom(this).querySelector(this._inputSelector); }, + get _inputElementValue() { + return this._inputElement[this._propertyForValue] || this._inputElement.value; + }, + ready: function() { if (!this._addons) { this._addons = []; @@ -431,7 +436,12 @@ This element is `display:block` by default, but you can set the `inline` attribu }, attached: function() { - this._handleValue(this._inputElement); + // Only validate when attached if the input already has a value. + if (this._inputElementValue != '') { + this._handleValueAndAutoValidate(this._inputElement); + } else { + this._handleValue(this._inputElement); + } }, _onAddonAttached: function(event) { @@ -453,28 +463,19 @@ This element is `display:block` by default, but you can set the `inline` attribu _onBlur: function() { this._setFocused(false); + this._handleValueAndAutoValidate(this._inputElement); }, _onInput: function(event) { - this._handleValue(event.target); + this._handleValueAndAutoValidate(event.target); }, _onValueChanged: function(event) { - this._handleValue(event.target); + this._handleValueAndAutoValidate(event.target); }, _handleValue: function(inputElement) { - var value = inputElement[this._propertyForValue] || inputElement.value; - - if (this.autoValidate) { - var valid; - if (inputElement.validate) { - valid = inputElement.validate(value); - } else { - valid = inputElement.checkValidity(); - } - this.invalid = !valid; - } + var value = this._inputElementValue; // type="number" hack needed because this.value is empty until it's valid if (value || value === 0 || (inputElement.type === 'number' && !inputElement.checkValidity())) { @@ -490,6 +491,21 @@ This element is `display:block` by default, but you can set the `inline` attribu }); }, + _handleValueAndAutoValidate: function(inputElement) { + if (this.autoValidate) { + var valid; + if (inputElement.validate) { + valid = inputElement.validate(this._inputElementValue); + } else { + valid = inputElement.checkValidity(); + } + this.invalid = !valid; + } + + // Call this last to notify the add-ons. + this._handleValue(inputElement); + }, + _onIronInputValidate: function(event) { this.invalid = this._inputElement.invalid; }, diff --git a/dashboard-ui/bower_components/paper-input/paper-textarea.html b/dashboard-ui/bower_components/paper-input/paper-textarea.html index bc96eabe11..c908d25ac2 100644 --- a/dashboard-ui/bower_components/paper-input/paper-textarea.html +++ b/dashboard-ui/bower_components/paper-input/paper-textarea.html @@ -33,6 +33,11 @@ style this element.