@open-pioneer/overview-map 0.4.4 → 0.8.0-dev.20241120115147

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 CHANGED
@@ -1,5 +1,57 @@
1
1
  # @open-pioneer/overview-map
2
2
 
3
+ ## 0.8.0-dev.20241120115147
4
+
5
+ ### Minor Changes
6
+
7
+ - 2fa8020: Update trails core package dependencies.
8
+
9
+ - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
10
+ - Removes any obsolete references to `@chakra-ui/system`.
11
+ This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [b717121]
16
+ - Updated dependencies [e7978a8]
17
+ - Updated dependencies [7ae9f90]
18
+ - Updated dependencies [d8337a6]
19
+ - Updated dependencies [b2127df]
20
+ - Updated dependencies [2fa8020]
21
+ - Updated dependencies [7ae9f90]
22
+ - Updated dependencies [d8337a6]
23
+ - @open-pioneer/map@0.8.0-dev.20241120115147
24
+
25
+ ## 0.7.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 310800c: Switch from `peerDependencies` to normal `dependencies`. Peer dependencies have some usability problems when used at scale.
30
+
31
+ ### Patch Changes
32
+
33
+ - 310800c: Update core packages version.
34
+ - 583f1d6: The `mapId` or `map` properties are now optional on individual components.
35
+ You can use the `DefaultMapProvider` to configure an implicit default value.
36
+
37
+ Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
38
+
39
+ - 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
40
+ - a8b3449: Switch to a new versioning strategy.
41
+ From now on, packages released by this repository share a common version number.
42
+ - 900eb11: Update dependencies.
43
+ - Updated dependencies [310800c]
44
+ - Updated dependencies [2502050]
45
+ - Updated dependencies [583f1d6]
46
+ - Updated dependencies [583f1d6]
47
+ - Updated dependencies [397d617]
48
+ - Updated dependencies [a8b3449]
49
+ - Updated dependencies [310800c]
50
+ - Updated dependencies [900eb11]
51
+ - Updated dependencies [583f1d6]
52
+ - Updated dependencies [397d617]
53
+ - @open-pioneer/map@0.7.0
54
+
3
55
  ## 0.4.4
4
56
 
5
57
  ### Patch Changes
package/OverviewMap.d.ts CHANGED
@@ -1,15 +1,12 @@
1
- import { FC } from "react";
2
1
  import { BoxProps } from "@open-pioneer/chakra-integration";
2
+ import { MapModelProps } from "@open-pioneer/map";
3
3
  import { CommonComponentProps } from "@open-pioneer/react-utils";
4
4
  import OlBaseLayer from "ol/layer/Base";
5
+ import { FC } from "react";
5
6
  /**
6
7
  * These are properties supported by the {@link OverviewMap}.
7
8
  */
8
- export interface OverviewMapProps extends CommonComponentProps {
9
- /**
10
- * The id of the map.
11
- */
12
- mapId: string;
9
+ export interface OverviewMapProps extends CommonComponentProps, MapModelProps {
13
10
  /**
14
11
  * The layer shown in the overview map.
15
12
  */
package/OverviewMap.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useRef, useEffect } from 'react';
3
- import { useMapModel } from '@open-pioneer/map';
4
2
  import { Box } from '@open-pioneer/chakra-integration';
5
- import { OverviewMap as OverviewMap$1 } from 'ol/control.js';
3
+ import { useMapModel } from '@open-pioneer/map';
6
4
  import { useCommonComponentProps } from '@open-pioneer/react-utils';
5
+ import { OverviewMap as OverviewMap$1 } from 'ol/control.js';
6
+ import { useRef, useEffect } from 'react';
7
7
 
8
8
  const DEFAULT_HEIGHT = "200px";
9
9
  const DEFAULT_WIDTH = "300px";
10
10
  const OverviewMap = (props) => {
11
- const { mapId, olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;
11
+ const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;
12
12
  const { containerProps } = useCommonComponentProps("overview-map", props);
13
13
  const overviewMapControlElem = useRef(null);
14
- const { map } = useMapModel(mapId);
14
+ const { map } = useMapModel(props);
15
15
  useEffect(() => {
16
16
  if (overviewMapControlElem.current && map && olLayer) {
17
17
  const olMap = map.olMap;
@@ -1 +1 @@
1
- {"version":3,"file":"OverviewMap.js","sources":["OverviewMap.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { FC, useEffect, useRef } from \"react\";\nimport { useMapModel } from \"@open-pioneer/map\";\nimport { Box, BoxProps } from \"@open-pioneer/chakra-integration\";\nimport { OverviewMap as OlOverviewMap } from \"ol/control\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport OlBaseLayer from \"ol/layer/Base\";\n\n/**\n * These are properties supported by the {@link OverviewMap}.\n */\nexport interface OverviewMapProps extends CommonComponentProps {\n /**\n * The id of the map.\n */\n mapId: string;\n\n /**\n * The layer shown in the overview map.\n */\n olLayer: OlBaseLayer;\n\n /**\n * The height of the map.\n * This defaults to a reasonable pixel size.\n */\n height?: BoxProps[\"height\"];\n\n /**\n * The width of the map.\n * This defaults to a reasonable pixel size.\n */\n width?: BoxProps[\"width\"];\n}\n\nconst DEFAULT_HEIGHT = \"200px\";\nconst DEFAULT_WIDTH = \"300px\";\n\n/**\n * The `OverviewMap` component can be used in an app to have a better overview of the current location in the map.\n */\nexport const OverviewMap: FC<OverviewMapProps> = (props) => {\n const { mapId, olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;\n const { containerProps } = useCommonComponentProps(\"overview-map\", props);\n const overviewMapControlElem = useRef(null);\n const { map } = useMapModel(mapId);\n\n useEffect(() => {\n if (overviewMapControlElem.current && map && olLayer) {\n const olMap = map.olMap;\n const overviewMapControl: OlOverviewMap = new OlOverviewMap({\n className: \"ol-overviewmap\",\n layers: [olLayer],\n collapsible: false,\n collapsed: false,\n target: overviewMapControlElem.current\n });\n olMap.addControl(overviewMapControl);\n return () => {\n olMap.removeControl(overviewMapControl);\n };\n }\n }, [map, olLayer]);\n\n return (\n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EAAA,CAAA,CAAA;AAE5F;;;;"}
1
+ {"version":3,"file":"OverviewMap.js","sources":["OverviewMap.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { Box, BoxProps } from \"@open-pioneer/chakra-integration\";\nimport { MapModelProps, useMapModel } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { OverviewMap as OlOverviewMap } from \"ol/control\";\nimport OlBaseLayer from \"ol/layer/Base\";\nimport { FC, useEffect, useRef } from \"react\";\n\n/**\n * These are properties supported by the {@link OverviewMap}.\n */\nexport interface OverviewMapProps extends CommonComponentProps, MapModelProps {\n /**\n * The layer shown in the overview map.\n */\n olLayer: OlBaseLayer;\n\n /**\n * The height of the map.\n * This defaults to a reasonable pixel size.\n */\n height?: BoxProps[\"height\"];\n\n /**\n * The width of the map.\n * This defaults to a reasonable pixel size.\n */\n width?: BoxProps[\"width\"];\n}\n\nconst DEFAULT_HEIGHT = \"200px\";\nconst DEFAULT_WIDTH = \"300px\";\n\n/**\n * The `OverviewMap` component can be used in an app to have a better overview of the current location in the map.\n */\nexport const OverviewMap: FC<OverviewMapProps> = (props) => {\n const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;\n const { containerProps } = useCommonComponentProps(\"overview-map\", props);\n const overviewMapControlElem = useRef(null);\n const { map } = useMapModel(props);\n\n useEffect(() => {\n if (overviewMapControlElem.current && map && olLayer) {\n const olMap = map.olMap;\n const overviewMapControl: OlOverviewMap = new OlOverviewMap({\n className: \"ol-overviewmap\",\n layers: [olLayer],\n collapsible: false,\n collapsed: false,\n target: overviewMapControlElem.current\n });\n olMap.addControl(overviewMapControl);\n return () => {\n olMap.removeControl(overviewMapControl);\n };\n }\n }, [map, olLayer]);\n\n return (\n <Box height={height} width={width} ref={overviewMapControlElem} {...containerProps}></Box>\n );\n};\n"],"names":["OlOver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{
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/overview-map",
4
- "version": "0.4.4",
4
+ "version": "0.8.0-dev.20241120115147",
5
5
  "description": "This package offers a UI component with which an overview map can be integrated.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -13,13 +13,13 @@
13
13
  "url": "https://github.com/open-pioneer/trails-openlayers-base-packages",
14
14
  "directory": "src/packages/overview-map"
15
15
  },
16
- "peerDependencies": {
17
- "@open-pioneer/chakra-integration": "^1.1.4",
18
- "@open-pioneer/react-utils": "^1.0.1",
19
- "@open-pioneer/runtime": "^2.1.7",
20
- "ol": "^9.2.4",
16
+ "dependencies": {
17
+ "@open-pioneer/chakra-integration": "^2.4.0-dev.20241120092632",
18
+ "@open-pioneer/react-utils": "^2.4.0-dev.20241120092632",
19
+ "@open-pioneer/runtime": "^2.4.0-dev.20241120092632",
20
+ "ol": "^10.2.1",
21
21
  "react": "^18.3.1",
22
- "@open-pioneer/map": "^0.6.1"
22
+ "@open-pioneer/map": "^0.8.0-dev.20241120115147"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",