@brightspace-ui/core 3.28.4 → 3.28.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -113,7 +113,7 @@ class ButtonMove extends ThemeMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
113
113
|
flex-direction: column;
|
114
114
|
gap: 2px;
|
115
115
|
margin: 0;
|
116
|
-
min-height:
|
116
|
+
min-height: auto;
|
117
117
|
padding: 0;
|
118
118
|
position: relative;
|
119
119
|
width: 0.9rem;
|
@@ -144,16 +144,16 @@ class ButtonMove extends ThemeMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
144
144
|
|
145
145
|
.up-layer,
|
146
146
|
.down-layer {
|
147
|
-
height: 1.
|
147
|
+
height: 1.2rem;
|
148
148
|
left: -0.2rem;
|
149
149
|
position: absolute;
|
150
150
|
width: 1.3rem;
|
151
151
|
}
|
152
152
|
.up-layer {
|
153
|
-
top: -0.
|
153
|
+
top: -0.35rem;
|
154
154
|
}
|
155
155
|
.down-layer {
|
156
|
-
bottom: -0.
|
156
|
+
bottom: -0.35rem;
|
157
157
|
}
|
158
158
|
:host([dir="rtl"]) .up-layer,
|
159
159
|
:host([dir="rtl"]) .down-layer {
|
@@ -12,13 +12,19 @@ const keyCodes = {
|
|
12
12
|
|
13
13
|
export class SelectionInfo {
|
14
14
|
|
15
|
-
constructor(keys, state) {
|
15
|
+
constructor(keys, state, allEnabledSelected) {
|
16
|
+
if (!allEnabledSelected) allEnabledSelected = false;
|
16
17
|
if (!keys) keys = [];
|
17
18
|
if (!state) state = SelectionInfo.states.none;
|
19
|
+
this._allEnabledSelected = allEnabledSelected;
|
18
20
|
this._keys = keys;
|
19
21
|
this._state = state;
|
20
22
|
}
|
21
23
|
|
24
|
+
get allEnabledSelected() {
|
25
|
+
return this._allEnabledSelected;
|
26
|
+
}
|
27
|
+
|
22
28
|
get keys() {
|
23
29
|
return this._keys;
|
24
30
|
}
|
@@ -87,6 +93,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
87
93
|
}
|
88
94
|
|
89
95
|
getSelectionInfo() {
|
96
|
+
let allEnabledSelected = true;
|
90
97
|
let state = SelectionInfo.states.none;
|
91
98
|
const keys = [];
|
92
99
|
|
@@ -95,6 +102,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
95
102
|
} else {
|
96
103
|
this._selectionSelectables.forEach(selectable => {
|
97
104
|
if (selectable.selected) keys.push(selectable.key);
|
105
|
+
if (!selectable.disabled && !selectable.selected) allEnabledSelected = false;
|
98
106
|
if (selectable._indeterminate) state = SelectionInfo.states.some;
|
99
107
|
});
|
100
108
|
|
@@ -104,19 +112,23 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
104
112
|
}
|
105
113
|
}
|
106
114
|
|
107
|
-
return new SelectionInfo(keys, state);
|
115
|
+
return new SelectionInfo(keys, state, allEnabledSelected);
|
108
116
|
}
|
109
117
|
|
110
118
|
setSelectionForAll(selected, selectAllPages) {
|
111
119
|
if (this.selectionSingle && selected) return;
|
112
|
-
|
113
120
|
this._selectAllPages = (selected && selectAllPages);
|
114
121
|
|
122
|
+
const { allEnabledSelected } = this.getSelectionInfo();
|
123
|
+
|
115
124
|
this._selectionSelectables.forEach(selectable => {
|
116
|
-
if (
|
117
|
-
selectable.selected = selected;
|
125
|
+
if (this.selectionSingle || this._selectAllPages) {
|
126
|
+
if (selectable.selected !== selected) selectable.selected = selected;
|
127
|
+
} else if (!selectable.disabled && selectable.selected !== !allEnabledSelected) {
|
128
|
+
selectable.selected = !allEnabledSelected;
|
118
129
|
}
|
119
130
|
});
|
131
|
+
|
120
132
|
this._updateSelectionObservers();
|
121
133
|
}
|
122
134
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.28.
|
3
|
+
"version": "3.28.6",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|