@fluid-topics/ft-filter 1.3.29 → 1.3.31
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/build/ft-filter-level.d.ts +1 -0
- package/build/ft-filter-level.js +14 -11
- package/build/ft-filter.js +1 -1
- package/build/ft-filter.light.js +101 -101
- package/build/ft-filter.min.js +103 -103
- package/package.json +10 -10
|
@@ -32,6 +32,7 @@ export declare class FtFilterLevel extends FtFilterLevel_base {
|
|
|
32
32
|
focusOnExpandButton(value: string): void;
|
|
33
33
|
focusOnFirstOption(): void;
|
|
34
34
|
protected willUpdate(props: PropertyValues): void;
|
|
35
|
+
updateFilteredOptions(): void;
|
|
35
36
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
36
37
|
private goBackOnKeyPress;
|
|
37
38
|
private goBackOnClick;
|
package/build/ft-filter-level.js
CHANGED
|
@@ -63,16 +63,19 @@ class FtFilterLevel extends withI18n(withAriaNotification(FtLitElement)) {
|
|
|
63
63
|
willUpdate(props) {
|
|
64
64
|
super.willUpdate(props);
|
|
65
65
|
if (props.has("options") || props.has("hideSelectedOptions") || props.has("filter")) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
this.updateFilteredOptions();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
updateFilteredOptions() {
|
|
70
|
+
let options = [...this.options];
|
|
71
|
+
if (this.hideSelectedOptions) {
|
|
72
|
+
options = options.filter((o) => !o.selected);
|
|
73
|
+
}
|
|
74
|
+
if (this.filter) {
|
|
75
|
+
options = options.filter((o) => o.label.toLowerCase().includes(this.filter.toLowerCase()));
|
|
76
|
+
}
|
|
77
|
+
if (options != this.filteredOptions) {
|
|
78
|
+
this.filteredOptions = options;
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
render() {
|
|
@@ -269,6 +272,6 @@ __decorate([
|
|
|
269
272
|
state()
|
|
270
273
|
], FtFilterLevel.prototype, "displayedPages", void 0);
|
|
271
274
|
__decorate([
|
|
272
|
-
state()
|
|
275
|
+
state({ hasChanged })
|
|
273
276
|
], FtFilterLevel.prototype, "filteredOptions", void 0);
|
|
274
277
|
export { FtFilterLevel };
|
package/build/ft-filter.js
CHANGED
|
@@ -266,7 +266,7 @@ class FtFilter extends FtLitElement {
|
|
|
266
266
|
var _a;
|
|
267
267
|
this.sendEventIfValuesChanged();
|
|
268
268
|
this.requestUpdate();
|
|
269
|
-
(_a = this.levels) === null || _a === void 0 ? void 0 : _a.forEach((l) => l.
|
|
269
|
+
(_a = this.levels) === null || _a === void 0 ? void 0 : _a.forEach((l) => l.updateFilteredOptions());
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
sendEventIfValuesChanged() {
|