@brightspace-ui-labs/facet-filter-sort 5.6.0 → 5.6.2
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.
|
@@ -20,6 +20,16 @@ class LabsSortByDropdownOption extends RtlMixin(MenuItemRadioMixin(LitElement))
|
|
|
20
20
|
`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
updated(changedProperties) {
|
|
24
|
+
super.updated(changedProperties);
|
|
25
|
+
if (changedProperties.has('text') && this.selected) {
|
|
26
|
+
this.dispatchEvent(new CustomEvent('d2l-labs-sort-by-dropdown-option-selected-text-change', {
|
|
27
|
+
detail: { text: this.text },
|
|
28
|
+
bubbles: true
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
customElements.define('d2l-labs-sort-by-dropdown-option', LabsSortByDropdownOption);
|
|
@@ -131,12 +131,17 @@ class LabsSortByDropdown extends mixinBehaviors(
|
|
|
131
131
|
this._text = initialOption.text;
|
|
132
132
|
this.value = initialOption.value;
|
|
133
133
|
});
|
|
134
|
+
|
|
135
|
+
this._selectedTextChangeHandler = e => this._text = e.detail.text;
|
|
136
|
+
this.addEventListener('d2l-labs-sort-by-dropdown-option-selected-text-change', this._selectedTextChangeHandler);
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
disconnectedCallback() {
|
|
137
140
|
super.disconnectedCallback();
|
|
138
141
|
this.$['d2l-labs-sort-by-menu'].removeEventListener('d2l-menu-item-change',
|
|
139
|
-
this._boundListeners._onItemSelect
|
|
142
|
+
this._boundListeners._onItemSelect
|
|
143
|
+
);
|
|
144
|
+
this.removeEventListener('d2l-labs-sort-by-dropdown-option-selected-text-change', this._selectedTextChangeHandler);
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
_computeSelectedOptionText(selection, localize, resources) {
|
package/custom-elements.json
CHANGED
package/lang/en-gb.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint quotes: 0 */
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
"appliedFilters": "Applied Filters:",
|
|
5
|
+
"noActiveFilters": "No active filters",
|
|
6
|
+
"filterRemoved": "Filter {filterText} removed",
|
|
7
|
+
"clearFilters": "Clear filters",
|
|
8
|
+
"allFiltersRemoved": "All filters removed",
|
|
9
|
+
"categoryTitleMultiple": "{title} ({numSelected})",
|
|
10
|
+
"searchBy": "Search by {category}",
|
|
11
|
+
"clear": "Clear",
|
|
12
|
+
"filter": "Filter",
|
|
13
|
+
"filterBy": "Filter By",
|
|
14
|
+
"filterMultiple": "Filter: {numOptions} Filters",
|
|
15
|
+
"filterSingle": "Filter: 1 Filter",
|
|
16
|
+
"sort": "Sort",
|
|
17
|
+
"sortWithOption": "Sort: {option}"
|
|
18
|
+
};
|