@dile/ui 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,6 +25,7 @@ export const DileSelectable = (SuperClass) =>
|
|
|
25
25
|
this.hashSelection = false;
|
|
26
26
|
this.itemSelectedChangedHandler = this._itemSelectedChanged.bind(this);
|
|
27
27
|
this.onHashChangeHandler = this._onHashChange.bind(this);
|
|
28
|
+
this.someItemChangedHandler = this.someItemChanged.bind(this);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
_onHashChange() {
|
|
@@ -64,12 +65,14 @@ export const DileSelectable = (SuperClass) =>
|
|
|
64
65
|
super.connectedCallback();
|
|
65
66
|
this.addEventListener('dile-item-selected', this.itemSelectedChangedHandler);
|
|
66
67
|
window.addEventListener("hashchange", this.onHashChangeHandler);
|
|
68
|
+
window.addEventListener("dile-selected-changed", this.someItemChangedHandler);
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
disconnectedCallback() {
|
|
70
72
|
super.disconnectedCallback();
|
|
71
73
|
this.removeEventListener('dile-item-selected', this.itemSelectedChangedHandler);
|
|
72
74
|
window.removeEventListener("hashchange", this.onHashChangeHandler);
|
|
75
|
+
window.removeEventListener("dile-selected-changed", this.someItemChangedHandler);
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
firstUpdated() {
|
|
@@ -151,4 +154,12 @@ export const DileSelectable = (SuperClass) =>
|
|
|
151
154
|
getItems() {
|
|
152
155
|
return this.shadowRoot.querySelector('slot').assignedElements({flatten: true});
|
|
153
156
|
}
|
|
157
|
+
|
|
158
|
+
someItemChanged(e) {
|
|
159
|
+
if(this.selectorId && e.detail.selectorId === this.selectorId) {
|
|
160
|
+
if(this.selected != e.detail.selected) {
|
|
161
|
+
this.selected = e.detail.selected;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
154
165
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "2cce4548dfe05e5ef9f72228ff1cb7d3eeb5e285"
|
|
30
30
|
}
|