@fluid-topics/ft-search-selected-facets 2.2.17 → 2.2.19
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.
|
@@ -49,7 +49,8 @@ export class FtSearchSelectedFacets extends withAriaNotification(withDateFormat(
|
|
|
49
49
|
this.addI18nContext(periodFilterContext, periodFilterDefaultMessages);
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
var _a
|
|
52
|
+
var _a;
|
|
53
|
+
var _b;
|
|
53
54
|
if (!this.hasSomethingToDisplay) {
|
|
54
55
|
return nothing;
|
|
55
56
|
}
|
|
@@ -267,17 +268,18 @@ export class FtSearchSelectedFacets extends withAriaNotification(withDateFormat(
|
|
|
267
268
|
</ft-tooltip>`;
|
|
268
269
|
}
|
|
269
270
|
updated(props) {
|
|
270
|
-
var _a, _b
|
|
271
|
+
var _a, _b;
|
|
272
|
+
var _c, _d;
|
|
271
273
|
super.updated(props);
|
|
272
274
|
if (props.get("filters")) {
|
|
273
|
-
const visibleFiltersNumber = (
|
|
275
|
+
const visibleFiltersNumber = (_c = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.filter((f) => f.dateFilter || f.rangeFilter).length) !== null && _c !== void 0 ? _c : 0;
|
|
274
276
|
const oldFiltersNumber = props.get("filters").filter((f) => f.dateFilter || f.rangeFilter).length;
|
|
275
277
|
if ((visibleFiltersNumber - oldFiltersNumber == 1) || (oldFiltersNumber > 0 && !this.hasSomethingToDisplay)) {
|
|
276
278
|
this.announceFilters();
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
if (props.get("facets")) {
|
|
280
|
-
const visibleFacetsNumber = (_d = (
|
|
282
|
+
const visibleFacetsNumber = (_d = (_b = this.facets) === null || _b === void 0 ? void 0 : _b.filter((facet) => this.getSelectedValues(facet).length > 0).length) !== null && _d !== void 0 ? _d : 0;
|
|
281
283
|
const oldFacetsNumber = props.get("facets").filter((facet) => this.getSelectedValues(facet).length > 0).length;
|
|
282
284
|
if ((visibleFacetsNumber - oldFacetsNumber == 1) || (oldFacetsNumber > 0 && !this.hasSomethingToDisplay)) {
|
|
283
285
|
this.announceFilters();
|