mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
f86dabe945
commit
ccf6b48bdc
9 changed files with 55 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.2.5",
|
||||
"version": "1.3.0",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
@ -30,11 +30,11 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.2.5",
|
||||
"_release": "1.3.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.2.5",
|
||||
"commit": "06bd256eacfd70f959c4aed8c03c221f01074c0f"
|
||||
"tag": "v1.3.0",
|
||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.2.5",
|
||||
"version": "1.3.0",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
|
|
@ -46,7 +46,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
observers: [
|
||||
'_updateSelected(selectedValues)'
|
||||
'_updateSelected(selectedValues.splices)'
|
||||
],
|
||||
|
||||
/**
|
||||
|
|
|
@ -119,7 +119,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
// programatically select values 0 and 1 (both fire select)
|
||||
s.selectedValues = [0, 1];
|
||||
|
||||
|
||||
// programatically select values 1 and 2 (2 fires select, 0 fires deselect)
|
||||
s.selectedValues = [1, 2];
|
||||
|
||||
|
@ -135,6 +135,41 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.equal(deselectEventCounters[2], 1);
|
||||
});
|
||||
|
||||
test('fire iron-select/deselect events when selectedValues is modified', function() {
|
||||
// setup listener for iron-select/deselect events
|
||||
var items = [s.children[0], s.children[1], s.children[2]],
|
||||
selectEventCounters = [0, 0, 0],
|
||||
deselectEventCounters = [0, 0, 0];
|
||||
|
||||
s.addEventListener('iron-select', function(e) {
|
||||
selectEventCounters[items.indexOf(e.detail.item)]++;
|
||||
});
|
||||
s.addEventListener('iron-deselect', function(e) {
|
||||
deselectEventCounters[items.indexOf(e.detail.item)]++;
|
||||
});
|
||||
|
||||
s.selectedValues = []
|
||||
|
||||
// programatically select value 0
|
||||
s.push('selectedValues', 0, 1);
|
||||
|
||||
// programatically deselect value 0
|
||||
s.shift('selectedValues');
|
||||
|
||||
// programatically select value 2
|
||||
s.push('selectedValues', 2);
|
||||
|
||||
// programatically deselect value 1
|
||||
s.shift('selectedValues');
|
||||
|
||||
assert.equal(selectEventCounters[0], 1);
|
||||
assert.equal(deselectEventCounters[0], 1);
|
||||
assert.equal(selectEventCounters[1], 1);
|
||||
assert.equal(deselectEventCounters[1], 1);
|
||||
assert.equal(selectEventCounters[2], 1);
|
||||
assert.equal(deselectEventCounters[2], 0);
|
||||
});
|
||||
|
||||
test('fire iron-select/deselect events when toggling items', function() {
|
||||
// setup listener for iron-select/deselect events
|
||||
var items = [s.children[0], s.children[1], s.children[2]],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue