@brightspace-ui/core 3.165.1 → 3.165.3
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.
- package/components/filter/filter.js +23 -19
- package/components/tabs/tabs.js +0 -3
- package/package.json +1 -1
@@ -353,7 +353,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
|
353
353
|
|
354
354
|
switch (dimension.type) {
|
355
355
|
case 'd2l-filter-dimension-set':
|
356
|
-
this._performChangeSetDimension(dimension, keyObject.value, false);
|
356
|
+
this._performChangeSetDimension(dimension, [{ key: keyObject.value, selected: false }]);
|
357
357
|
break;
|
358
358
|
}
|
359
359
|
}
|
@@ -593,7 +593,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
|
593
593
|
${searchResults}
|
594
594
|
<d2l-list
|
595
595
|
id="${SET_DIMENSION_ID_PREFIX}${dimension.key}"
|
596
|
-
@d2l-list-selection-
|
596
|
+
@d2l-list-selection-changes="${this._handleChangeSetDimension}"
|
597
597
|
extend-separators
|
598
598
|
grid
|
599
599
|
label="${ifDefined(listLabel)}"
|
@@ -715,10 +715,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
|
715
715
|
_handleChangeSetDimension(e) {
|
716
716
|
const dimensionKey = e.target.id.slice(SET_DIMENSION_ID_PREFIX.length);
|
717
717
|
const dimension = this._getDimensionByKey(dimensionKey);
|
718
|
-
const valueKey = e.detail.key;
|
719
|
-
const selected = e.detail.selected;
|
720
718
|
|
721
|
-
this._performChangeSetDimension(dimension,
|
719
|
+
this._performChangeSetDimension(dimension, e.detail);
|
722
720
|
}
|
723
721
|
|
724
722
|
_handleClear() {
|
@@ -971,24 +969,30 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
|
971
969
|
return false;
|
972
970
|
}
|
973
971
|
|
974
|
-
_performChangeSetDimension(dimension,
|
975
|
-
|
976
|
-
|
977
|
-
value.selected = selected;
|
972
|
+
_performChangeSetDimension(dimension, newValues) {
|
973
|
+
let countChange = 0;
|
974
|
+
const changeEventDetails = [];
|
978
975
|
|
979
|
-
|
980
|
-
dimension.
|
981
|
-
|
982
|
-
|
983
|
-
dimension.appliedCount--;
|
984
|
-
this._totalAppliedCount--;
|
985
|
-
}
|
976
|
+
newValues.forEach(newValue => {
|
977
|
+
const value = dimension.values.find(value => value.key === newValue.key);
|
978
|
+
if (value.selected === newValue.selected) return;
|
979
|
+
value.selected = newValue.selected;
|
986
980
|
|
987
|
-
|
981
|
+
if (newValue.selected) countChange++;
|
982
|
+
else countChange--;
|
988
983
|
|
989
|
-
|
984
|
+
const details = { valueKey: newValue.key, selected: newValue.selected };
|
990
985
|
|
991
|
-
|
986
|
+
if (value.getAdditionalEventDetails) Object.assign(details, value.getAdditionalEventDetails(newValue.selected));
|
987
|
+
changeEventDetails.push(details);
|
988
|
+
});
|
989
|
+
|
990
|
+
dimension.appliedCount += countChange;
|
991
|
+
this._totalAppliedCount += countChange;
|
992
|
+
|
993
|
+
this.requestUpdate();
|
994
|
+
|
995
|
+
changeEventDetails.forEach(det => this._dispatchChangeEvent(dimension, det));
|
992
996
|
}
|
993
997
|
|
994
998
|
_performDimensionClear(dimension) {
|
package/components/tabs/tabs.js
CHANGED
@@ -19,7 +19,6 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
19
19
|
|
20
20
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
21
21
|
const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping', true);
|
22
|
-
const newTabStructure = getFlag('GAUD-7146-tabs-new-structure', true);
|
23
22
|
|
24
23
|
const scrollButtonWidth = 56;
|
25
24
|
|
@@ -1198,8 +1197,6 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
|
|
1198
1197
|
}
|
1199
1198
|
|
1200
1199
|
#handleTabDeselected(e) {
|
1201
|
-
if (!newTabStructure) return;
|
1202
|
-
|
1203
1200
|
const panel = this._getPanel(e.target.id);
|
1204
1201
|
if (panel) panel.selected = false;
|
1205
1202
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.165.
|
3
|
+
"version": "3.165.3",
|
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",
|