@eox/itemfilter 1.4.1 → 1.5.0
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/dist/eox-itemfilter.js +963 -956
- package/dist/eox-itemfilter.umd.cjs +43 -43
- package/package.json +15 -2
- package/types/components/chips.d.ts +43 -0
- package/types/components/chips.d.ts.map +1 -0
- package/types/components/expand-container.d.ts +35 -0
- package/types/components/expand-container.d.ts.map +1 -0
- package/types/components/filters/range.d.ts +51 -0
- package/types/components/filters/range.d.ts.map +1 -0
- package/types/components/filters/selector.d.ts +135 -0
- package/types/components/filters/selector.d.ts.map +1 -0
- package/types/components/filters/spatial.d.ts +82 -0
- package/types/components/filters/spatial.d.ts.map +1 -0
- package/types/components/filters/text.d.ts +54 -0
- package/types/components/filters/text.d.ts.map +1 -0
- package/types/components/itemfilter-container.d.ts +77 -0
- package/types/components/itemfilter-container.d.ts.map +1 -0
- package/types/components/results.d.ts +80 -0
- package/types/components/results.d.ts.map +1 -0
- package/types/enums/config.d.ts +73 -0
- package/types/enums/config.d.ts.map +1 -0
- package/types/enums/index.d.ts +2 -0
- package/types/enums/index.d.ts.map +1 -0
- package/types/helpers/chip-items.d.ts +9 -0
- package/types/helpers/chip-items.d.ts.map +1 -0
- package/types/helpers/filter-client.d.ts +3 -0
- package/types/helpers/filter-client.d.ts.map +1 -0
- package/types/helpers/filter-external.d.ts +11 -0
- package/types/helpers/filter-external.d.ts.map +1 -0
- package/types/helpers/get-value.d.ts +9 -0
- package/types/helpers/get-value.d.ts.map +1 -0
- package/types/helpers/highlighting.d.ts +11 -0
- package/types/helpers/highlighting.d.ts.map +1 -0
- package/types/helpers/index.d.ts +12 -0
- package/types/helpers/index.d.ts.map +1 -0
- package/types/helpers/is-filters-dirty.d.ts +8 -0
- package/types/helpers/is-filters-dirty.d.ts.map +1 -0
- package/types/helpers/map-layers.d.ts +9 -0
- package/types/helpers/map-layers.d.ts.map +1 -0
- package/types/helpers/reset-filter.d.ts +8 -0
- package/types/helpers/reset-filter.d.ts.map +1 -0
- package/types/helpers/spatial.d.ts +3 -0
- package/types/helpers/spatial.d.ts.map +1 -0
- package/types/helpers/tab-index.d.ts +9 -0
- package/types/helpers/tab-index.d.ts.map +1 -0
- package/types/helpers/toggle-accordion.d.ts +10 -0
- package/types/helpers/toggle-accordion.d.ts.map +1 -0
- package/types/main.d.ts +270 -0
- package/types/main.d.ts.map +1 -0
- package/types/methods/chips/handler.d.ts +23 -0
- package/types/methods/chips/handler.d.ts.map +1 -0
- package/types/methods/chips/index.d.ts +2 -0
- package/types/methods/chips/index.d.ts.map +1 -0
- package/types/methods/container/handler.d.ts +35 -0
- package/types/methods/container/handler.d.ts.map +1 -0
- package/types/methods/container/index.d.ts +5 -0
- package/types/methods/container/index.d.ts.map +1 -0
- package/types/methods/container/init-popver.d.ts +9 -0
- package/types/methods/container/init-popver.d.ts.map +1 -0
- package/types/methods/container/reset-filter.d.ts +9 -0
- package/types/methods/container/reset-filter.d.ts.map +1 -0
- package/types/methods/container/reset-search.d.ts +8 -0
- package/types/methods/container/reset-search.d.ts.map +1 -0
- package/types/methods/container/search-filter.d.ts +9 -0
- package/types/methods/container/search-filter.d.ts.map +1 -0
- package/types/methods/filters/index.d.ts +5 -0
- package/types/methods/filters/index.d.ts.map +1 -0
- package/types/methods/filters/range.d.ts +23 -0
- package/types/methods/filters/range.d.ts.map +1 -0
- package/types/methods/filters/selector.d.ts +42 -0
- package/types/methods/filters/selector.d.ts.map +1 -0
- package/types/methods/filters/spatial.d.ts +26 -0
- package/types/methods/filters/spatial.d.ts.map +1 -0
- package/types/methods/filters/text.d.ts +13 -0
- package/types/methods/filters/text.d.ts.map +1 -0
- package/types/methods/itemfilter/create-filter.d.ts +11 -0
- package/types/methods/itemfilter/create-filter.d.ts.map +1 -0
- package/types/methods/itemfilter/create-reset.d.ts +11 -0
- package/types/methods/itemfilter/create-reset.d.ts.map +1 -0
- package/types/methods/itemfilter/filter-apply.d.ts +11 -0
- package/types/methods/itemfilter/filter-apply.d.ts.map +1 -0
- package/types/methods/itemfilter/index.d.ts +7 -0
- package/types/methods/itemfilter/index.d.ts.map +1 -0
- package/types/methods/itemfilter/reset-filter.d.ts +7 -0
- package/types/methods/itemfilter/reset-filter.d.ts.map +1 -0
- package/types/methods/itemfilter/search.d.ts +11 -0
- package/types/methods/itemfilter/search.d.ts.map +1 -0
- package/types/methods/itemfilter/sort-results.d.ts +10 -0
- package/types/methods/itemfilter/sort-results.d.ts.map +1 -0
- package/types/methods/results/aggregate-results.d.ts +11 -0
- package/types/methods/results/aggregate-results.d.ts.map +1 -0
- package/types/methods/results/create.d.ts +17 -0
- package/types/methods/results/create.d.ts.map +1 -0
- package/types/methods/results/index.d.ts +3 -0
- package/types/methods/results/index.d.ts.map +1 -0
- package/types/style.d.ts +2 -0
- package/types/style.d.ts.map +1 -0
- package/types/style.eox.d.ts +2 -0
- package/types/style.eox.d.ts.map +1 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const ELEMENT_CONFIG: Readonly<{
|
|
2
|
+
/**
|
|
3
|
+
* Aggregate results by a property key
|
|
4
|
+
*/
|
|
5
|
+
aggregateResults: any;
|
|
6
|
+
/**
|
|
7
|
+
* Automatically spread single item summaries
|
|
8
|
+
* removing the summary header
|
|
9
|
+
*/
|
|
10
|
+
autoSpreadSingle: false;
|
|
11
|
+
/**
|
|
12
|
+
* Highlighting of search result character matches
|
|
13
|
+
*/
|
|
14
|
+
enableHighlighting: false;
|
|
15
|
+
/**
|
|
16
|
+
* Use an external search endpoint instead of fuse search.
|
|
17
|
+
* Passed properties: input string, filters object
|
|
18
|
+
*
|
|
19
|
+
* (input, filters) => {}
|
|
20
|
+
*/
|
|
21
|
+
externalFilter: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* The filter properties.
|
|
24
|
+
*/
|
|
25
|
+
filterProperties: any[];
|
|
26
|
+
/**
|
|
27
|
+
* Native fuse.js config override
|
|
28
|
+
*/
|
|
29
|
+
fuseConfig: {};
|
|
30
|
+
/**
|
|
31
|
+
* Inline mode, for rendering the itemfilter in a very condensed space.
|
|
32
|
+
* Expects showResults to be false
|
|
33
|
+
*/
|
|
34
|
+
inlineMode: false;
|
|
35
|
+
/**
|
|
36
|
+
* Show all result items if nothing is input by the user
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
matchAllWhenEmpty: true;
|
|
40
|
+
/**
|
|
41
|
+
* Display results list
|
|
42
|
+
*/
|
|
43
|
+
showResults: true;
|
|
44
|
+
/**
|
|
45
|
+
* Unique id property of items
|
|
46
|
+
*/
|
|
47
|
+
idProperty: "id";
|
|
48
|
+
/**
|
|
49
|
+
* The property of the result items used for display
|
|
50
|
+
*/
|
|
51
|
+
titleProperty: "title";
|
|
52
|
+
/**
|
|
53
|
+
* The property of the result items used for a subtitle
|
|
54
|
+
*/
|
|
55
|
+
subTitleProperty: any;
|
|
56
|
+
/**
|
|
57
|
+
* Allow opening multiple filter accordions in parallel
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
expandMultipleFilters: true;
|
|
61
|
+
/**
|
|
62
|
+
* Initialize result accordions expanded
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
expandResults: true;
|
|
66
|
+
/**
|
|
67
|
+
* Allow opening multiple result accordions in parallel
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
expandMultipleResults: true;
|
|
71
|
+
}>;
|
|
72
|
+
export const ELEMENT_PROPERTIES: string[];
|
|
73
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/enums/config.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;GAEF;AAEH,0CAiBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default getChipItems;
|
|
2
|
+
/**
|
|
3
|
+
* Generates an array of chip items from the given filters.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} filters - An object containing filter data.
|
|
6
|
+
* @returns {Array<Object>} An array of chip item objects.
|
|
7
|
+
*/
|
|
8
|
+
declare function getChipItems(filters: any): Array<any>;
|
|
9
|
+
//# sourceMappingURL=chip-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-items.d.ts","sourceRoot":"","sources":["../../src/helpers/chip-items.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,6CAFa,UAAa,CAUzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-client.d.ts","sourceRoot":"","sources":["../../src/helpers/filter-client.js"],"names":[],"mappings":"AAYO,kCAHI,UAAa,yBAWvB;AAUM,8BALI,UAAa,8BAGX,QAAQ,UAAa,CAAC,CAsJlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default filterExternal;
|
|
2
|
+
/**
|
|
3
|
+
* Fetches and filters items based on the provided filters and configuration using an external API.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<Object>} items - The items to be filtered.
|
|
6
|
+
* @param {Object} filters - The filters to be applied.
|
|
7
|
+
* @param {Object} config - Configuration for filtering behavior.
|
|
8
|
+
* @returns {Promise<Array<Object>>} The filtered items from the external API.
|
|
9
|
+
*/
|
|
10
|
+
declare function filterExternal(items: Array<any>, filters: any, config: any): Promise<Array<any>>;
|
|
11
|
+
//# sourceMappingURL=filter-external.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-external.d.ts","sourceRoot":"","sources":["../../src/helpers/filter-external.js"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AACH,uCALW,UAAa,8BAGX,QAAQ,UAAa,CAAC,CASlC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get value based on nested key or individual key
|
|
3
|
+
*
|
|
4
|
+
* @param {string} key - Key to identify the value
|
|
5
|
+
* @param {Object} items - Items contain list of key & it's value
|
|
6
|
+
* @returns {any}
|
|
7
|
+
*/
|
|
8
|
+
export default function getValue(key: string, items: any): any;
|
|
9
|
+
//# sourceMappingURL=get-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-value.d.ts","sourceRoot":"","sources":["../../src/helpers/get-value.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,sCAJW,MAAM,eAEJ,GAAG,CAMf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default highlight;
|
|
2
|
+
/**
|
|
3
|
+
* Highlights matched text in the Fuse.js search results.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<Object>} fuseSearchResult - The search results from Fuse.js.
|
|
6
|
+
* @param {string} [highlightClassName="highlight"] - The CSS class name to be used for highlighting.
|
|
7
|
+
* @param {string} [matchKey="title"] - The key of the object where matches should be highlighted.
|
|
8
|
+
* @returns {Array<Object>} The search results with highlighted matches.
|
|
9
|
+
*/
|
|
10
|
+
declare function highlight(fuseSearchResult: Array<any>, highlightClassName?: string, matchKey?: string): Array<any>;
|
|
11
|
+
//# sourceMappingURL=highlighting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlighting.d.ts","sourceRoot":"","sources":["../../src/helpers/highlighting.js"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AACH,6CALW,UAAa,uBACb,MAAM,aACN,MAAM,GACJ,UAAa,CAsEzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as highlight } from "./highlighting";
|
|
2
|
+
export { default as getMapLayers } from "./map-layers";
|
|
3
|
+
export { default as resetFilter } from "./reset-filter";
|
|
4
|
+
export { default as getTabIndex } from "./tab-index";
|
|
5
|
+
export { default as getChipItems } from "./chip-items";
|
|
6
|
+
export { default as isFiltersDirty } from "./is-filters-dirty";
|
|
7
|
+
export { default as filterExternal } from "./filter-external";
|
|
8
|
+
export { default as toggleAccordion } from "./toggle-accordion";
|
|
9
|
+
export { default as getValue } from "./get-value";
|
|
10
|
+
export { intersects, within } from "./spatial";
|
|
11
|
+
export { indexItems, filter } from "./filter-client";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if any of the filters are dirty.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} filters - An object containing filter data.
|
|
5
|
+
* @returns {boolean} True if any filter is dirty, otherwise false.
|
|
6
|
+
*/
|
|
7
|
+
export default function isFiltersDirty(filters: any): boolean;
|
|
8
|
+
//# sourceMappingURL=is-filters-dirty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-filters-dirty.d.ts","sourceRoot":"","sources":["../../src/helpers/is-filters-dirty.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,sDAFa,OAAO,CAQnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an array of map layer configurations.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} [geometry] - Optional geometry data to include in the Vector source.
|
|
5
|
+
* @param {string} [url] - Optional URL for the GeoJSON data source.
|
|
6
|
+
* @returns {Array<Object>} An array of map layer configurations.
|
|
7
|
+
*/
|
|
8
|
+
export default function getMapLayers(geometry?: any, url?: string): Array<any>;
|
|
9
|
+
//# sourceMappingURL=map-layers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-layers.d.ts","sourceRoot":"","sources":["../../src/helpers/map-layers.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,2DAHW,MAAM,GACJ,UAAa,CAoCzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resets the given filter object to its default state.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} filterObject - The filter object to reset.
|
|
5
|
+
* @returns {Object|null} The reset filter object or null if the filter was not dirty.
|
|
6
|
+
*/
|
|
7
|
+
export default function resetFilter(filterObject: any): any | null;
|
|
8
|
+
//# sourceMappingURL=reset-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-filter.d.ts","sourceRoot":"","sources":["../../src/helpers/reset-filter.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wDAFa,MAAO,IAAI,CAuDvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../../src/helpers/spatial.js"],"names":[],"mappings":"AAUO,oEAFM,OAAO,CASnB;AASM,gEAFM,OAAO,CAUnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the tab index based on the main index and sub-index.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} index - The main index.
|
|
5
|
+
* @param {number} subIndex - The sub-index.
|
|
6
|
+
* @returns {number} The calculated tab index.
|
|
7
|
+
*/
|
|
8
|
+
export default function getTabIndex(index: number, subIndex: number): number;
|
|
9
|
+
//# sourceMappingURL=tab-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-index.d.ts","sourceRoot":"","sources":["../../src/helpers/tab-index.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,2CAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAOlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default toggleAccordion;
|
|
2
|
+
/**
|
|
3
|
+
* Handles the toggle event for the accordion.
|
|
4
|
+
*
|
|
5
|
+
* @param {Event} event - The toggle event.
|
|
6
|
+
* @param {Object} config - The configuration object for item-filter.
|
|
7
|
+
* @param {Element} that
|
|
8
|
+
*/
|
|
9
|
+
declare function toggleAccordion(event: Event, config: any, that: Element): void;
|
|
10
|
+
//# sourceMappingURL=toggle-accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-accordion.d.ts","sourceRoot":"","sources":["../../src/helpers/toggle-accordion.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,wCAJW,KAAK,qBAEL,OAAO,QA+BjB"}
|
package/types/main.d.ts
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EOxItemFilter is a custom web component that provides a comprehensive item filtering system.
|
|
3
|
+
* It includes methods for applying filters, searching, sorting results, and resetting filters.
|
|
4
|
+
* The component supports both inline and dropdown modes for filter display.
|
|
5
|
+
*
|
|
6
|
+
* @module EOxItemFilter
|
|
7
|
+
* @extends {LitElement}
|
|
8
|
+
*/
|
|
9
|
+
export class EOxItemFilter extends LitElement {
|
|
10
|
+
static get properties(): {
|
|
11
|
+
items: {
|
|
12
|
+
attribute: boolean;
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
};
|
|
15
|
+
results: {
|
|
16
|
+
state: boolean;
|
|
17
|
+
attribute: boolean;
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
};
|
|
20
|
+
filters: {
|
|
21
|
+
state: boolean;
|
|
22
|
+
attribute: boolean;
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
selectedResult: {
|
|
26
|
+
attribute: boolean;
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
};
|
|
29
|
+
aggregateResults: {
|
|
30
|
+
attribute: string;
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
autoSpreadSingle: {
|
|
34
|
+
attribute: string;
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
};
|
|
37
|
+
enableHighlighting: {
|
|
38
|
+
attribute: string;
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
};
|
|
41
|
+
filterProperties: {
|
|
42
|
+
attribute: boolean;
|
|
43
|
+
type: ArrayConstructor;
|
|
44
|
+
};
|
|
45
|
+
fuseConfig: {
|
|
46
|
+
attribute: boolean;
|
|
47
|
+
type: ObjectConstructor;
|
|
48
|
+
};
|
|
49
|
+
inlineMode: {
|
|
50
|
+
attribute: string;
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
};
|
|
53
|
+
matchAllWhenEmpty: {
|
|
54
|
+
attribute: string;
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
};
|
|
57
|
+
showResults: {
|
|
58
|
+
attribute: string;
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
};
|
|
61
|
+
idProperty: {
|
|
62
|
+
attribute: string;
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
};
|
|
65
|
+
titleProperty: {
|
|
66
|
+
attribute: string;
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
};
|
|
69
|
+
subTitleProperty: {
|
|
70
|
+
attribute: string;
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
};
|
|
73
|
+
expandMultipleFilters: {
|
|
74
|
+
attribute: string;
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
};
|
|
77
|
+
expandResults: {
|
|
78
|
+
attribute: string;
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
};
|
|
81
|
+
expandMultipleResults: {
|
|
82
|
+
attribute: string;
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
};
|
|
85
|
+
externalFilter: {
|
|
86
|
+
attribute: boolean;
|
|
87
|
+
type: FunctionConstructor;
|
|
88
|
+
};
|
|
89
|
+
unstyled: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/** The items to be filtered
|
|
94
|
+
* @type Array<Object>
|
|
95
|
+
*/
|
|
96
|
+
items: Array<any>;
|
|
97
|
+
/**
|
|
98
|
+
* The state object containing the applied filters.
|
|
99
|
+
* @type Object
|
|
100
|
+
*/
|
|
101
|
+
filters: any;
|
|
102
|
+
/**
|
|
103
|
+
* The state object containing the filtered results.
|
|
104
|
+
* @type Array<Object>
|
|
105
|
+
*/
|
|
106
|
+
results: Array<any>;
|
|
107
|
+
/**
|
|
108
|
+
* The currently selected result
|
|
109
|
+
* @type Object
|
|
110
|
+
*/
|
|
111
|
+
selectedResult: any;
|
|
112
|
+
/**
|
|
113
|
+
* @type Function
|
|
114
|
+
* @private
|
|
115
|
+
*/
|
|
116
|
+
private search;
|
|
117
|
+
/**
|
|
118
|
+
* Aggregate results by a property key
|
|
119
|
+
*
|
|
120
|
+
* @type String
|
|
121
|
+
*/
|
|
122
|
+
aggregateResults: string;
|
|
123
|
+
/**
|
|
124
|
+
* Automatically spread single item summaries
|
|
125
|
+
* removing the summary header
|
|
126
|
+
*
|
|
127
|
+
* @type Boolean
|
|
128
|
+
*/
|
|
129
|
+
autoSpreadSingle: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Highlighting of search result character matches
|
|
132
|
+
*
|
|
133
|
+
* @type Boolean
|
|
134
|
+
*/
|
|
135
|
+
enableHighlighting: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Use an external search endpoint instead of fuse search.
|
|
138
|
+
* Passed properties: input string, filters object
|
|
139
|
+
*
|
|
140
|
+
* @type Function
|
|
141
|
+
*/
|
|
142
|
+
externalFilter: Function;
|
|
143
|
+
/**
|
|
144
|
+
* The filter properties.
|
|
145
|
+
* @type Array<{key?: String, keys?: Array<String>, title: String, type: String, placeholder?: String, format?: String, state?: Object}>
|
|
146
|
+
*/
|
|
147
|
+
filterProperties: Array<{
|
|
148
|
+
key?: string;
|
|
149
|
+
keys?: Array<string>;
|
|
150
|
+
title: string;
|
|
151
|
+
type: string;
|
|
152
|
+
placeholder?: string;
|
|
153
|
+
format?: string;
|
|
154
|
+
state?: any;
|
|
155
|
+
}>;
|
|
156
|
+
/**
|
|
157
|
+
* Native fuse.js config override
|
|
158
|
+
*
|
|
159
|
+
* @type Object
|
|
160
|
+
*/
|
|
161
|
+
fuseConfig: any;
|
|
162
|
+
/**
|
|
163
|
+
* Inline mode, for rendering the itemfilter in a very condensed space.
|
|
164
|
+
* Expects showResults to be false
|
|
165
|
+
*
|
|
166
|
+
* @type Boolean
|
|
167
|
+
*/
|
|
168
|
+
inlineMode: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Show all result items if nothing is input by the user
|
|
171
|
+
*
|
|
172
|
+
* @type Boolean
|
|
173
|
+
*/
|
|
174
|
+
matchAllWhenEmpty: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Display results list
|
|
177
|
+
*
|
|
178
|
+
* @type Boolean
|
|
179
|
+
*/
|
|
180
|
+
showResults: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* The property of the result items used for display
|
|
183
|
+
*
|
|
184
|
+
* @type String
|
|
185
|
+
*/
|
|
186
|
+
titleProperty: string;
|
|
187
|
+
/**
|
|
188
|
+
* The property of the result items used for a subtitle
|
|
189
|
+
*
|
|
190
|
+
* @type String
|
|
191
|
+
*/
|
|
192
|
+
subTitleProperty: string;
|
|
193
|
+
/**
|
|
194
|
+
* Unique id property of items
|
|
195
|
+
*
|
|
196
|
+
* @type String
|
|
197
|
+
*/
|
|
198
|
+
idProperty: string;
|
|
199
|
+
/**
|
|
200
|
+
* Allow opening multiple filter accordions in parallel
|
|
201
|
+
*
|
|
202
|
+
* @type Boolean
|
|
203
|
+
*/
|
|
204
|
+
expandMultipleFilters: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Initialize result accordions expanded
|
|
207
|
+
*
|
|
208
|
+
* @type Boolean
|
|
209
|
+
*/
|
|
210
|
+
expandResults: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Allow opening multiple result accordions in parallel
|
|
213
|
+
*
|
|
214
|
+
* @type Boolean
|
|
215
|
+
*/
|
|
216
|
+
expandMultipleResults: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Render the element without additional styles
|
|
219
|
+
*/
|
|
220
|
+
unstyled: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Applies the filters to the items and updates the result aggregation.
|
|
223
|
+
*/
|
|
224
|
+
apply(): void;
|
|
225
|
+
/**
|
|
226
|
+
* Performs a search based on the current configuration and items.
|
|
227
|
+
* Requests an update after the search completes.
|
|
228
|
+
*/
|
|
229
|
+
searchHandler(): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Sorts the given items based on the current configuration.
|
|
232
|
+
*
|
|
233
|
+
* @param {Array<object>} items - The items to be sorted.
|
|
234
|
+
* @returns {Array<object>} - The sorted items.
|
|
235
|
+
*/
|
|
236
|
+
sortResults(items: Array<object>): Array<object>;
|
|
237
|
+
/**
|
|
238
|
+
* Resets all applied filters.
|
|
239
|
+
*/
|
|
240
|
+
resetFilters(): void;
|
|
241
|
+
/**
|
|
242
|
+
* Lifecycle method called after the first update.
|
|
243
|
+
* Initializes the configuration and items, and applies the filters.
|
|
244
|
+
*
|
|
245
|
+
* @param {Map} _changedProperties - The changed properties.
|
|
246
|
+
*/
|
|
247
|
+
firstUpdated(_changedProperties: Map<any, any>): void;
|
|
248
|
+
/**
|
|
249
|
+
* Called when the element is updated.
|
|
250
|
+
* Re-Initialize itemfilter when `config` and `items` changes.
|
|
251
|
+
*
|
|
252
|
+
* @param {Map} changedProperties - The properties that have changed.
|
|
253
|
+
*/
|
|
254
|
+
updated(changedProperties: Map<any, any>): void;
|
|
255
|
+
/**
|
|
256
|
+
* Updates selected result when result component triggers the "result" event.
|
|
257
|
+
*
|
|
258
|
+
* @param {{detail: Object}} evt - "result" event triggered by result component
|
|
259
|
+
*/
|
|
260
|
+
updateResult(evt: {
|
|
261
|
+
detail: any;
|
|
262
|
+
}): void;
|
|
263
|
+
/**
|
|
264
|
+
* Renders the HTML template for the component.
|
|
265
|
+
*/
|
|
266
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
267
|
+
#private;
|
|
268
|
+
}
|
|
269
|
+
import { LitElement } from "lit";
|
|
270
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6BC;IAoBC;;OAEG;IACH,OAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,aAAiB;IAEjB;;;OAGG;IACH,SAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,oBAA0B;IAE1B;;;OAGG;IACH,eAEE;IAEF;;;;OAIG;IACH,yBAAiC;IAEjC;;;;;OAKG;IACH,0BAA6B;IAE7B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;;OAKG;IACH,yBAA0B;IAE1B;;;OAGG;IACH,kBAFS,MAAM;QAAC,GAAG,CAAC,SAAS;QAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAC,KAAK,SAAS;QAAC,IAAI,SAAS;QAAC,WAAW,CAAC,SAAS;QAAC,MAAM,CAAC,SAAS;QAAC,KAAK,CAAC,MAAQ;KAAC,CAAC,CAE9G;IAE1B;;;;OAIG;IACH,gBAAoB;IAEpB;;;;;OAKG;IACH,oBAAuB;IAEvB;;;;OAIG;IACH,2BAA6B;IAE7B;;;;OAIG;IACH,qBAAuB;IAEvB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,yBAAiC;IAEjC;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,+BAAiC;IAEjC;;;;OAIG;IACH,uBAAyB;IACzB;;;;OAIG;IACH,+BAAiC;IAEjC;;OAEG;IACH,kBAAqB;IAGvB;;OAEG;IACH,cAOC;IAED;;;OAGG;IACH,+BAkBC;IAED;;;;;OAKG;IACH,mBAHW,MAAM,MAAM,CAAC,GACX,MAAM,MAAM,CAAC,CAIzB;IA0BD;;OAEG;IACH,qBAEC;IAED;;;;;OAKG;IACH,sDAcC;IAED;;;;;OAKG;IACH,gDAOC;IAED;;;;OAIG;IACH,kBAFW;QAAC,MAAM,MAAQ;KAAC,QAe1B;IAED;;OAEG;IACH,+CA4FC;;CACF;2BA/cyC,KAAK"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles the click event on a chip, highlighting the clicked chip and updating the component.
|
|
3
|
+
*
|
|
4
|
+
* @param {Event} evt - The click event.
|
|
5
|
+
* @param {Object} EOxItemFilterChips - The EOxItemFilterChips component instance.
|
|
6
|
+
*/
|
|
7
|
+
export function handleChipClickMethod(evt: Event, EOxItemFilterChips: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* Handles the close event on a chip, removing the chip from the controller.
|
|
10
|
+
*
|
|
11
|
+
* @param {Event} event - The close event.
|
|
12
|
+
* @param {number} index - The index of the chip to be removed.
|
|
13
|
+
* @param {Object} EOxItemFilterChips - The EOxItemFilterChips component instance.
|
|
14
|
+
*/
|
|
15
|
+
export function handleCloseMethod(event: Event, index: number, EOxItemFilterChips: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* Handles keyboard events for the EOxItemFilterChips component.
|
|
18
|
+
*
|
|
19
|
+
* @param {Event} event - The keyboard event.
|
|
20
|
+
* @param {Object} EOxItemFilterChips - The EOxItemFilterChips component instance.
|
|
21
|
+
*/
|
|
22
|
+
export function keyboardEventListenerMethod(event: Event, EOxItemFilterChips: any): void;
|
|
23
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/methods/chips/handler.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,2CAHW,KAAK,iCAWf;AAED;;;;;;GAMG;AACH,yCAJW,KAAK,SACL,MAAM,iCAMhB;AAED;;;;;GAKG;AACH,mDAHW,KAAK,iCAyBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/chips/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles the click event on the form, stopping propagation if in inline mode.
|
|
3
|
+
*
|
|
4
|
+
* @param {Event} event - The click event.
|
|
5
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
6
|
+
*/
|
|
7
|
+
export function handleFormClickMethod(event: Event, EOxItemFilterContainer: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* Shows the dropdown when the component is focused, if in inline mode.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
12
|
+
*/
|
|
13
|
+
export function handleShowDropdownOnFocusMethod(EOxItemFilterContainer: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Toggles the dropdown visibility when an event occurs, stopping propagation if in inline mode.
|
|
16
|
+
*
|
|
17
|
+
* @param {Event} event - The event that triggers the toggle.
|
|
18
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
19
|
+
*/
|
|
20
|
+
export function handleToggleDropdownMethod(event: Event, EOxItemFilterContainer: any): void;
|
|
21
|
+
/**
|
|
22
|
+
* Handles the keydown event, resetting the search and hiding the dropdown if Escape is pressed in inline mode.
|
|
23
|
+
*
|
|
24
|
+
* @param {Event} event - The keydown event.
|
|
25
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
26
|
+
*/
|
|
27
|
+
export function handleKeyDownMethod(event: Event, EOxItemFilterContainer: any): void;
|
|
28
|
+
/**
|
|
29
|
+
* Handles clicks outside the component, resetting the search and hiding the dropdown if in inline mode.
|
|
30
|
+
*
|
|
31
|
+
* @param {Event} event - The click event.
|
|
32
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
33
|
+
*/
|
|
34
|
+
export function handleClickOutsideMethod(event: Event, EOxItemFilterContainer: any): void;
|
|
35
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/methods/container/handler.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,6CAHW,KAAK,qCAKf;AAED;;;;GAIG;AACH,mFAIC;AAED;;;;;GAKG;AACH,kDAHW,KAAK,qCAQf;AAED;;;;;GAKG;AACH,2CAHW,KAAK,qCAYf;AAED;;;;;GAKG;AACH,gDAHW,KAAK,qCAaf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as searchFilterMethod } from "./search-filter";
|
|
2
|
+
export { default as resetFilterMethod } from "./reset-filter";
|
|
3
|
+
export { default as initPopoverMethod } from "./init-popver";
|
|
4
|
+
export { handleFormClickMethod, handleShowDropdownOnFocusMethod, handleToggleDropdownMethod, handleKeyDownMethod, handleClickOutsideMethod } from "./handler";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/container/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default initPopover;
|
|
2
|
+
/**
|
|
3
|
+
* Init popover autoUpdate and position
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
6
|
+
* @return {Function}
|
|
7
|
+
*/
|
|
8
|
+
declare function initPopover(EOxItemFilterContainer: any): Function;
|
|
9
|
+
//# sourceMappingURL=init-popver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-popver.d.ts","sourceRoot":"","sources":["../../../src/methods/container/init-popver.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,oEAuBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default resetFilterMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Resets a specific filter in the EOxItemFilterContainer based on the event target.
|
|
4
|
+
*
|
|
5
|
+
* @param {Event} event - The event that triggers the filter reset.
|
|
6
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
7
|
+
*/
|
|
8
|
+
declare function resetFilterMethod(event: Event, EOxItemFilterContainer: any): void;
|
|
9
|
+
//# sourceMappingURL=reset-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-filter.d.ts","sourceRoot":"","sources":["../../../src/methods/container/reset-filter.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,0CAHW,KAAK,qCAQf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default resetSearchMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Resets the search input in the EOxItemFilterContainer and triggers a search filter update.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} EOxItemFilterContainer - The EOxItemFilterContainer component instance.
|
|
6
|
+
*/
|
|
7
|
+
declare function resetSearchMethod(EOxItemFilterContainer: any): void;
|
|
8
|
+
//# sourceMappingURL=reset-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-search.d.ts","sourceRoot":"","sources":["../../../src/methods/container/reset-search.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,sEAMC"}
|