@open-pioneer/search 0.9.0 → 0.10.0-dev.20250324141112
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/CHANGELOG.md +24 -0
- package/README.md +9 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @open-pioneer/search
|
|
2
2
|
|
|
3
|
+
## 0.10.0-dev.20250324141112
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 193068a: Deprecate the `mapId` property on React components.
|
|
8
|
+
Use the `MapModel` directly instead to pass a reference to the map.
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
// Default map for entire component tree
|
|
14
|
+
<DefaultMapProvider map={mapModel}>
|
|
15
|
+
<Toc />
|
|
16
|
+
</DefaultMapProvider>
|
|
17
|
+
|
|
18
|
+
// Map for specific component
|
|
19
|
+
<Toc map={mapModel} />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [193068a]
|
|
25
|
+
- @open-pioneer/map@0.10.0-dev.20250324141112
|
|
26
|
+
|
|
3
27
|
## 0.9.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -8,24 +8,27 @@ defined by the implementation of the search source.
|
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
-
To use the search in your app, insert the following snippet and reference a map
|
|
11
|
+
To use the search in your app, insert the following snippet (and reference a map) and `sources` (sources to be searched on):
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
|
-
<Search
|
|
14
|
+
<Search
|
|
15
|
+
map={map}
|
|
16
|
+
sources={searchsources}
|
|
17
|
+
/> /* instead of passing the map, the `DefaultMapProvider` can alternatively be used */
|
|
15
18
|
```
|
|
16
19
|
|
|
17
20
|
To change the typing delay, add the optional property `searchTypingDelay` (in ms).
|
|
18
21
|
The default value is 200ms.
|
|
19
22
|
|
|
20
23
|
```tsx
|
|
21
|
-
<Search
|
|
24
|
+
<Search map={map} sources={searchsources} searchTypingDelay={500} />
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
To limit the maximum number of search results to be displayed per search source (group), configure the optional property `maxResultsPerGroup`.
|
|
25
28
|
The default value is 5.
|
|
26
29
|
|
|
27
30
|
```tsx
|
|
28
|
-
<Search
|
|
31
|
+
<Search map={map} sources={searchsources} maxResultsPerGroup={10} />
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
To change the placeholder text of the search field, use the optional property `placeholder`:
|
|
@@ -44,7 +47,7 @@ from the parameter `SelectSearchEvent`.
|
|
|
44
47
|
import { Search, SearchSelectEvent } from "@open-pioneer/search";
|
|
45
48
|
// ...
|
|
46
49
|
<Search
|
|
47
|
-
|
|
50
|
+
map={map}
|
|
48
51
|
sources={datasources}
|
|
49
52
|
onSelect={(event: SearchSelectEvent) => {
|
|
50
53
|
// do something
|
|
@@ -104,7 +107,7 @@ class MySearchSource implements SearchSource {
|
|
|
104
107
|
const searchsources: SearchSource[] = [new MySearchSource()];
|
|
105
108
|
|
|
106
109
|
// In your JSX template:
|
|
107
|
-
<Search
|
|
110
|
+
<Search map={map} sources={searchsources} />;
|
|
108
111
|
```
|
|
109
112
|
|
|
110
113
|
The configured maximum number of `maxResultsPerGroup` is passed as `maxResults` inside the option parameter
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/search",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0-dev.20250324141112",
|
|
5
5
|
"description": "This package provides a UI component to perform a search on given search sources.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"classnames": "^2.3.2",
|
|
24
24
|
"ol": "^10.4.0",
|
|
25
25
|
"react": "^19.0.0",
|
|
26
|
-
"@open-pioneer/map": "^0.
|
|
26
|
+
"@open-pioneer/map": "^0.10.0-dev.20250324141112"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
"./package.json": "./package.json",
|