@polymer/iron-selector
Advanced tools
Comparing version 3.0.0-pre.6 to 3.0.0-pre.7
import '../polymer/polymer.js'; | ||
import './iron-selectable.js'; | ||
/** | ||
* @polymerBehavior Polymer.IronMultiSelectableBehavior | ||
*/ | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
Polymer.IronMultiSelectableBehaviorImpl = { | ||
import { IronSelectableBehavior } from './iron-selectable.js'; | ||
export const IronMultiSelectableBehaviorImpl = { | ||
properties: { | ||
@@ -85,3 +74,3 @@ | ||
if (!this.multi) { | ||
Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this); | ||
IronSelectableBehavior._updateAttrForSelected.apply(this); | ||
} else if (this.selectedItems && this.selectedItems.length > 0) { | ||
@@ -161,6 +150,5 @@ this.selectedValues = this.selectedItems.map(function(selectedItem) { | ||
/** @polymerBehavior */ | ||
Polymer.IronMultiSelectableBehavior = [ | ||
Polymer.IronSelectableBehavior, | ||
Polymer.IronMultiSelectableBehaviorImpl | ||
export const IronMultiSelectableBehavior = [ | ||
IronSelectableBehavior, | ||
IronMultiSelectableBehaviorImpl | ||
]; |
import '../polymer/polymer.js'; | ||
import './iron-selection.js'; | ||
/** | ||
* @polymerBehavior Polymer.IronSelectableBehavior | ||
*/ | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
Polymer.IronSelectableBehavior = { | ||
import { IronSelection } from './iron-selection.js'; | ||
import { dom } from '../polymer/lib/legacy/polymer.dom.js'; | ||
import { dashToCamelCase } from '../polymer/lib/utils/case-map.js'; | ||
export const IronSelectableBehavior = { | ||
/** | ||
@@ -163,3 +154,3 @@ * Fired when iron-selector is activated (selected or deselected). | ||
this._bindFilterItem = this._filterItem.bind(this); | ||
this._selection = new Polymer.IronSelection(this._applySelection.bind(this)); | ||
this._selection = new IronSelection(this._applySelection.bind(this)); | ||
}, | ||
@@ -174,3 +165,3 @@ | ||
if (this._observer) { | ||
Polymer.dom(this).unobserveNodes(this._observer); | ||
dom(this).unobserveNodes(this._observer); | ||
} | ||
@@ -280,3 +271,3 @@ this._removeListener(this.activateEvent); | ||
_updateItems: function() { | ||
var nodes = Polymer.dom(this).queryDistributedElements(this.selectable || '*'); | ||
var nodes = dom(this).queryDistributedElements(this.selectable || '*'); | ||
nodes = Array.prototype.filter.call(nodes, this._bindFilterItem); | ||
@@ -353,3 +344,3 @@ this._setItems(nodes); | ||
} | ||
var propValue = item[Polymer.CaseMap.dashToCamelCase(this.attrForSelected)]; | ||
var propValue = item[dashToCamelCase(this.attrForSelected)]; | ||
return propValue != undefined ? propValue : item.getAttribute(this.attrForSelected); | ||
@@ -375,3 +366,3 @@ }, | ||
_observeItems: function(node) { | ||
return Polymer.dom(node).observeNodes(function(mutation) { | ||
return dom(node).observeNodes(function(mutation) { | ||
this._updateItems(); | ||
@@ -378,0 +369,0 @@ this._updateSelected(); |
import '../polymer/polymer.js'; | ||
/** | ||
* @param {!Function} selectCallback | ||
* @constructor | ||
* @suppress {missingProvide} | ||
*/ | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
Polymer.IronSelection = function(selectCallback) { | ||
export const IronSelection = function(selectCallback) { | ||
this.selection = []; | ||
@@ -22,3 +8,3 @@ this.selectCallback = selectCallback; | ||
Polymer.IronSelection.prototype = { | ||
IronSelection.prototype = { | ||
@@ -25,0 +11,0 @@ /** |
import '../polymer/polymer.js'; | ||
import './iron-multi-selectable.js'; | ||
import { IronMultiSelectableBehavior } from './iron-multi-selectable.js'; | ||
import { Polymer } from '../polymer/lib/legacy/polymer-fn.js'; | ||
/** | ||
@@ -78,5 +79,5 @@ `iron-selector` is an element which can be used to manage a list of elements | ||
behaviors: [ | ||
Polymer.IronMultiSelectableBehavior | ||
IronMultiSelectableBehavior | ||
] | ||
}); |
{ | ||
"name": "@polymer/iron-selector", | ||
"flat": true, | ||
"version": "3.0.0-pre.6", | ||
"version": "3.0.0-pre.7", | ||
"description": "Manages a set of elements that can be selected", | ||
@@ -21,9 +21,9 @@ "contributors": [ | ||
"dependencies": { | ||
"@polymer/polymer": "^3.0.0-pre.6" | ||
"@polymer/polymer": "^3.0.0-pre.7" | ||
}, | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^3.0.0-pre.6", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.6", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.6", | ||
"@polymer/paper-styles": "^3.0.0-pre.6", | ||
"@polymer/iron-component-page": "^3.0.0-pre.7", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.7", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.7", | ||
"@polymer/paper-styles": "^3.0.0-pre.7", | ||
"wct-browser-legacy": "0.0.1-pre.11", | ||
@@ -30,0 +30,0 @@ "@webcomponents/webcomponentsjs": "^1.0.0" |
@@ -1,2 +0,3 @@ | ||
import '../../polymer/polymer.js'; | ||
import { html } from '../../polymer/polymer.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
/** | ||
@@ -12,3 +13,3 @@ @license | ||
Polymer({ | ||
_template: Polymer.html` | ||
_template: html` | ||
<div>{{someAttr}}</div> | ||
@@ -15,0 +16,0 @@ `, |
import '../iron-selector.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../../polymer/polymer.js'; | ||
@@ -13,3 +15,3 @@ /** | ||
Polymer({ | ||
_template: Polymer.html` | ||
_template: html` | ||
<iron-selector id="selector" selected="{{selected}}" selectable="[[selectable]]" attr-for-selected="id"> | ||
@@ -16,0 +18,0 @@ <slot></slot> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26
98300
747