@eox/itemfilter 0.12.1 → 0.14.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 +1528 -1475
- package/dist/eox-itemfilter.umd.cjs +132 -104
- package/package.json +3 -3
- package/test/general.cy.ts +30 -26
- package/test/state.cy.ts +19 -16
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/itemfilter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@eox/eslint-config": "^1.0.0",
|
|
7
7
|
"@types/lodash.debounce": "^4.0.7",
|
|
8
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
9
|
-
"@typescript-eslint/parser": "^
|
|
8
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
9
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
10
10
|
"eslint-plugin-typescript": "^0.14.0",
|
|
11
11
|
"typescript": "^5.2.2",
|
|
12
12
|
"vite": "^5.0.2"
|
package/test/general.cy.ts
CHANGED
|
@@ -13,21 +13,23 @@ describe("Item Filter Config", () => {
|
|
|
13
13
|
.as("eox-itemfilter")
|
|
14
14
|
.then(($el) => {
|
|
15
15
|
const eoxItemFilter = <EOxItemFilter>$el[0];
|
|
16
|
-
eoxItemFilter
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
Object.assign(eoxItemFilter, {
|
|
17
|
+
config: {
|
|
18
|
+
titleProperty: "title",
|
|
19
|
+
filterProperties: [
|
|
20
|
+
{
|
|
21
|
+
keys: ["title", "themes"],
|
|
22
|
+
title: "Search",
|
|
23
|
+
type: "text",
|
|
24
|
+
expanded: true,
|
|
25
|
+
},
|
|
26
|
+
{ key: "themes", expanded: true },
|
|
27
|
+
],
|
|
28
|
+
aggregateResults: "themes",
|
|
29
|
+
enableHighlighting: true,
|
|
30
|
+
},
|
|
31
|
+
items: testItems,
|
|
32
|
+
});
|
|
31
33
|
});
|
|
32
34
|
});
|
|
33
35
|
|
|
@@ -195,17 +197,19 @@ describe("Item Filter Config", () => {
|
|
|
195
197
|
it("should show the map when spatial filter is enabled", () => {
|
|
196
198
|
cy.get("eox-itemfilter").and(($el) => {
|
|
197
199
|
const eoxItemFilter = <EOxItemFilter>$el[0];
|
|
198
|
-
eoxItemFilter
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
200
|
+
Object.assign(eoxItemFilter, {
|
|
201
|
+
config: {
|
|
202
|
+
titleProperty: "title",
|
|
203
|
+
filterProperties: [
|
|
204
|
+
{
|
|
205
|
+
key: "geometry",
|
|
206
|
+
type: "spatial",
|
|
207
|
+
expanded: true,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
items: testItems,
|
|
212
|
+
});
|
|
209
213
|
});
|
|
210
214
|
cy.get("eox-itemfilter")
|
|
211
215
|
.shadow()
|
package/test/state.cy.ts
CHANGED
|
@@ -19,22 +19,25 @@ describe("Item Filter Config", () => {
|
|
|
19
19
|
.as("eox-itemfilter")
|
|
20
20
|
.then(($el) => {
|
|
21
21
|
const eoxItemFilter = <EOxItemFilter>$el[0];
|
|
22
|
-
eoxItemFilter
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
Object.assign(eoxItemFilter, {
|
|
23
|
+
config: {
|
|
24
|
+
titleProperty: "title",
|
|
25
|
+
filterProperties: [
|
|
26
|
+
{
|
|
27
|
+
key: "themes",
|
|
28
|
+
type: "multiselect",
|
|
29
|
+
expanded: true,
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
sort: (a, b) => customOrder[a] - customOrder[b],
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
state,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
aggregateResults: "themes",
|
|
37
|
+
},
|
|
38
|
+
items: testItems,
|
|
39
|
+
selectedResult: testItems[selectedResultIndex],
|
|
40
|
+
});
|
|
38
41
|
});
|
|
39
42
|
});
|
|
40
43
|
|