@open-pioneer/toc 0.12.0-dev.20250905090001 → 1.0.0-dev.20251020091932
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 +17 -3
- package/package.json +10 -10
- package/ui/LayerList/hooks.js +10 -2
- package/ui/LayerList/hooks.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @open-pioneer/toc
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 1.0.0-dev.20251020091932
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -41,24 +41,38 @@
|
|
|
41
41
|
|
|
42
42
|
- cb5368f: Introduce Toc API for programmatic control of toc items, see [PR](https://github.com/open-pioneer/trails-openlayers-base-packages/pull/420).
|
|
43
43
|
- 2732052: Icons have been changed to unify the appearance of the components. Preferably, Lucide react-icons are used.
|
|
44
|
+
- 2abcaaf: Update to chakra-ui 3.27.1
|
|
44
45
|
|
|
45
46
|
### Patch Changes
|
|
46
47
|
|
|
47
48
|
- 10d2fe7: Update dependencies
|
|
49
|
+
- 9e9bc6e: Use new option `includeInternalLayers === true` for layer retrieval because internal layers are already handled by the Toc itself.
|
|
50
|
+
- 138d85b: Update core packages to 4.1.0
|
|
48
51
|
- da6a410: Update dependencies
|
|
52
|
+
- Updated dependencies [c6180c6]
|
|
49
53
|
- Updated dependencies [29a10df]
|
|
50
54
|
- Updated dependencies [10d2fe7]
|
|
51
55
|
- Updated dependencies [2702df4]
|
|
52
56
|
- Updated dependencies [12561fe]
|
|
53
57
|
- Updated dependencies [5df900f]
|
|
54
58
|
- Updated dependencies [8986b3b]
|
|
59
|
+
- Updated dependencies [b3709f1]
|
|
60
|
+
- Updated dependencies [dfd7c7e]
|
|
61
|
+
- Updated dependencies [14c484e]
|
|
62
|
+
- Updated dependencies [138d85b]
|
|
55
63
|
- Updated dependencies [aeb9000]
|
|
64
|
+
- Updated dependencies [9e9bc6e]
|
|
65
|
+
- Updated dependencies [b3709f1]
|
|
66
|
+
- Updated dependencies [2c8b617]
|
|
56
67
|
- Updated dependencies [2732052]
|
|
68
|
+
- Updated dependencies [b3709f1]
|
|
57
69
|
- Updated dependencies [5df900f]
|
|
58
70
|
- Updated dependencies [f1f69f2]
|
|
71
|
+
- Updated dependencies [773fa2d]
|
|
72
|
+
- Updated dependencies [2abcaaf]
|
|
59
73
|
- Updated dependencies [da6a410]
|
|
60
|
-
- @open-pioneer/map@0.
|
|
61
|
-
- @open-pioneer/basemap-switcher@0.
|
|
74
|
+
- @open-pioneer/map@1.0.0-dev.20251020091932
|
|
75
|
+
- @open-pioneer/basemap-switcher@1.0.0-dev.20251020091932
|
|
62
76
|
|
|
63
77
|
## 0.11.0
|
|
64
78
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/toc",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0-dev.20251020091932",
|
|
5
5
|
"description": "This package provides a UI component that displays the map content to the user and allows them to control it.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"directory": "src/packages/toc"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@chakra-ui/react": "^3.
|
|
18
|
-
"@open-pioneer/react-utils": "
|
|
19
|
-
"@open-pioneer/runtime": "
|
|
17
|
+
"@chakra-ui/react": "^3.27.1",
|
|
18
|
+
"@open-pioneer/react-utils": "4.2.0-dev.20251017113502",
|
|
19
|
+
"@open-pioneer/runtime": "4.2.0-dev.20251017113502",
|
|
20
20
|
"classnames": "^2.5.1",
|
|
21
21
|
"ol": "^10.6.1",
|
|
22
|
-
"react": "^19.
|
|
22
|
+
"react": "^19.2.0",
|
|
23
23
|
"react-icons": "^5.5.0",
|
|
24
|
-
"@open-pioneer/reactivity": "
|
|
25
|
-
"@conterra/reactivity-core": "^0.
|
|
26
|
-
"@open-pioneer/chakra-snippets": "
|
|
27
|
-
"@open-pioneer/
|
|
28
|
-
"@open-pioneer/
|
|
24
|
+
"@open-pioneer/reactivity": "4.2.0-dev.20251017113502",
|
|
25
|
+
"@conterra/reactivity-core": "^0.8.0",
|
|
26
|
+
"@open-pioneer/chakra-snippets": "4.2.0-dev.20251017113502",
|
|
27
|
+
"@open-pioneer/map": "1.0.0-dev.20251020091932",
|
|
28
|
+
"@open-pioneer/basemap-switcher": "1.0.0-dev.20251020091932"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": "./package.json",
|
package/ui/LayerList/hooks.js
CHANGED
|
@@ -3,14 +3,22 @@ import { useReactiveSnapshot } from '@open-pioneer/reactivity';
|
|
|
3
3
|
|
|
4
4
|
function useLayers(map) {
|
|
5
5
|
return useReactiveSnapshot(() => {
|
|
6
|
-
const layers = map.layers.getOperationalLayers({
|
|
6
|
+
const layers = map.layers.getOperationalLayers({
|
|
7
|
+
sortByDisplayOrder: true,
|
|
8
|
+
includeInternalLayers: true
|
|
9
|
+
//internal status is handled by LayerItems
|
|
10
|
+
}) ?? [];
|
|
7
11
|
layers.reverse();
|
|
8
12
|
return layers;
|
|
9
13
|
}, [map]);
|
|
10
14
|
}
|
|
11
15
|
function useChildLayers(layer) {
|
|
12
16
|
return useReactiveSnapshot(() => {
|
|
13
|
-
const children = layer.children?.getItems({
|
|
17
|
+
const children = layer.children?.getItems({
|
|
18
|
+
sortByDisplayOrder: true,
|
|
19
|
+
includeInternalLayers: true
|
|
20
|
+
//internal status is handled by LayerItems
|
|
21
|
+
});
|
|
14
22
|
children?.reverse();
|
|
15
23
|
return children;
|
|
16
24
|
}, [layer]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":["hooks.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { AnyLayer, isSublayer, Layer, MapModel } from \"@open-pioneer/map\";\nimport { useReactiveSnapshot } from \"@open-pioneer/reactivity\";\n\n/** Returns the top level operational layers in render order (topmost layer first). */\nexport function useLayers(map: MapModel): Layer[] {\n return useReactiveSnapshot(() => {\n const layers
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":["hooks.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { AnyLayer, isSublayer, Layer, MapModel } from \"@open-pioneer/map\";\nimport { useReactiveSnapshot } from \"@open-pioneer/reactivity\";\n\n/** Returns the top level operational layers in render order (topmost layer first). */\nexport function useLayers(map: MapModel): Layer[] {\n return useReactiveSnapshot(() => {\n const layers =\n map.layers.getOperationalLayers({\n sortByDisplayOrder: true,\n includeInternalLayers: true //internal status is handled by LayerItems\n }) ?? [];\n layers.reverse(); // render topmost layer first\n return layers;\n }, [map]);\n}\n\n/**\n * Returns the child layers (sublayers or layers contained in a group layer) of a layer.\n * Layers are returned in render order (topmost sublayer first).\n */\nexport function useChildLayers(layer: AnyLayer): AnyLayer[] | undefined {\n return useReactiveSnapshot(() => {\n const children = layer.children?.getItems({\n sortByDisplayOrder: true,\n includeInternalLayers: true //internal status is handled by LayerItems\n });\n children?.reverse(); // render topmost layer first\n return children;\n }, [layer]);\n}\n\n/** Returns the layers current state. */\nexport function useLoadState(layer: AnyLayer): string {\n return useReactiveSnapshot(() => {\n // for sublayers, use the state of the parent\n const target = isSublayer(layer) ? layer.parentLayer : layer;\n return target.loadState;\n }, [layer]);\n}\n"],"names":[],"mappings":";;;AAMO,SAAS,UAAU,GAAA,EAAwB;AAC9C,EAAA,OAAO,oBAAoB,MAAM;AAC7B,IAAA,MAAM,MAAA,GACF,GAAA,CAAI,MAAA,CAAO,oBAAA,CAAqB;AAAA,MAC5B,kBAAA,EAAoB,IAAA;AAAA,MACpB,qBAAA,EAAuB;AAAA;AAAA,KAC1B,KAAK,EAAC;AACX,IAAA,MAAA,CAAO,OAAA,EAAQ;AACf,IAAA,OAAO,MAAA;AAAA,EACX,CAAA,EAAG,CAAC,GAAG,CAAC,CAAA;AACZ;AAMO,SAAS,eAAe,KAAA,EAAyC;AACpE,EAAA,OAAO,oBAAoB,MAAM;AAC7B,IAAA,MAAM,QAAA,GAAW,KAAA,CAAM,QAAA,EAAU,QAAA,CAAS;AAAA,MACtC,kBAAA,EAAoB,IAAA;AAAA,MACpB,qBAAA,EAAuB;AAAA;AAAA,KAC1B,CAAA;AACD,IAAA,QAAA,EAAU,OAAA,EAAQ;AAClB,IAAA,OAAO,QAAA;AAAA,EACX,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AACd;AAGO,SAAS,aAAa,KAAA,EAAyB;AAClD,EAAA,OAAO,oBAAoB,MAAM;AAE7B,IAAA,MAAM,MAAA,GAAS,UAAA,CAAW,KAAK,CAAA,GAAI,MAAM,WAAA,GAAc,KAAA;AACvD,IAAA,OAAO,MAAA,CAAO,SAAA;AAAA,EAClB,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AACd;;;;"}
|