@eox/itemfilter 0.5.4 → 0.6.1
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 +3704 -2056
- package/dist/eox-itemfilter.umd.cjs +183 -57
- package/package.json +3 -1
- package/test/general.cy.ts +2 -0
- package/test/testItems.json +41 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/itemfilter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@eox/eslint-config": "^1.0.0",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"lint:fix": "eslint --ext .js,.ts . --fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@turf/boolean-intersects": "^6.5.0",
|
|
32
|
+
"@turf/boolean-within": "^6.5.0",
|
|
31
33
|
"fuse.js": "^6.6.2",
|
|
32
34
|
"lit": "^2.7.4",
|
|
33
35
|
"lodash.debounce": "^4.0.8",
|
package/test/general.cy.ts
CHANGED
|
@@ -16,8 +16,10 @@ describe("Item Filter", () => {
|
|
|
16
16
|
// { key: "code" },
|
|
17
17
|
// { key: "likes", type: "range" },
|
|
18
18
|
// { key: "year", type: "range" },
|
|
19
|
+
// { key: "years", type: "range" },
|
|
19
20
|
{ key: "years", type: "range" },
|
|
20
21
|
{ key: "datetime", type: "range", format: "date" },
|
|
22
|
+
{ key: "bbox", type: "spatial" },
|
|
21
23
|
],
|
|
22
24
|
aggregateResults: "themes",
|
|
23
25
|
enableSearch: true,
|
package/test/testItems.json
CHANGED
|
@@ -11,7 +11,19 @@
|
|
|
11
11
|
"likes": 4,
|
|
12
12
|
"years": [2000, 2000],
|
|
13
13
|
"timestamp": "2023-06-14T13:56:38+00:00",
|
|
14
|
-
"datetime": ["2023-06-14T10:56:38+00:00", "2023-06-14T22:56:38+00:00"]
|
|
14
|
+
"datetime": ["2023-06-14T10:56:38+00:00", "2023-06-14T22:56:38+00:00"],
|
|
15
|
+
"bbox": [-90.0, 60.0, -20.0, 82.0],
|
|
16
|
+
"geometry": {
|
|
17
|
+
"type": "Polygon",
|
|
18
|
+
"coordinates": [
|
|
19
|
+
[
|
|
20
|
+
[-90.0, 60.0],
|
|
21
|
+
[-20.0, 60.0],
|
|
22
|
+
[-20.0, 82.0],
|
|
23
|
+
[-90.0, 82.0]
|
|
24
|
+
]
|
|
25
|
+
]
|
|
26
|
+
}
|
|
15
27
|
},
|
|
16
28
|
{
|
|
17
29
|
"archived": false,
|
|
@@ -25,7 +37,19 @@
|
|
|
25
37
|
"likes": 46,
|
|
26
38
|
"years": [2007, 2020],
|
|
27
39
|
"timestamp": "2023-06-13T13:56:38+00:00",
|
|
28
|
-
"datetime": ["2023-06-13T10:56:38+00:00", "2023-06-13T22:56:38+00:00"]
|
|
40
|
+
"datetime": ["2023-06-13T10:56:38+00:00", "2023-06-13T22:56:38+00:00"],
|
|
41
|
+
"bbox": [0, 0, 10, 10],
|
|
42
|
+
"geometry": {
|
|
43
|
+
"type": "Polygon",
|
|
44
|
+
"coordinates": [
|
|
45
|
+
[
|
|
46
|
+
[0, 0],
|
|
47
|
+
[10, 0],
|
|
48
|
+
[10, 10],
|
|
49
|
+
[0, 10]
|
|
50
|
+
]
|
|
51
|
+
]
|
|
52
|
+
}
|
|
29
53
|
},
|
|
30
54
|
{
|
|
31
55
|
"archived": false,
|
|
@@ -33,13 +57,25 @@
|
|
|
33
57
|
"description": "Air Quality",
|
|
34
58
|
"indicator": "Air Quality",
|
|
35
59
|
"themes": ["air"],
|
|
36
|
-
"title": "
|
|
37
|
-
"name": "
|
|
60
|
+
"title": "Sea ice freeboard",
|
|
61
|
+
"name": "Sea ice freeboard",
|
|
38
62
|
"year": 2023,
|
|
39
63
|
"likes": 34,
|
|
40
64
|
"years": [2008, 2023],
|
|
41
65
|
"timestamp": "2023-06-12T13:56:38+00:00",
|
|
42
|
-
"datetime": ["2023-06-12T10:56:38+00:00", "2023-06-12T22:56:38+00:00"]
|
|
66
|
+
"datetime": ["2023-06-12T10:56:38+00:00", "2023-06-12T22:56:38+00:00"],
|
|
67
|
+
"bbox": [-180.0, -80.0, 180.0, -61.0],
|
|
68
|
+
"geometry": {
|
|
69
|
+
"type": "Polygon",
|
|
70
|
+
"coordinates": [
|
|
71
|
+
[
|
|
72
|
+
[-180.0, -80.0],
|
|
73
|
+
[180.0, -80.0],
|
|
74
|
+
[180.0, -61.0],
|
|
75
|
+
[-180.0, -61.0]
|
|
76
|
+
]
|
|
77
|
+
]
|
|
78
|
+
}
|
|
43
79
|
},
|
|
44
80
|
{
|
|
45
81
|
"archived": false,
|