@open-pioneer/selection 1.2.0-dev.20260121105545 → 1.3.0-dev-map-loading.20260202141334

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,16 +1,28 @@
1
1
  # @open-pioneer/selection
2
2
 
3
- ## 1.2.0-dev.20260121105545
3
+ ## 1.3.0-dev-map-loading.20260202141334
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Updated dependencies [f5030cc]
8
+ - Updated dependencies [f5030cc]
9
+ - @open-pioneer/map@1.3.0-dev-map-loading.20260202141334
10
+
11
+ ## 1.2.0
12
+
13
+ ### Patch Changes
14
+
15
+ - 9c29256: Update to core packages 4.4.0
7
16
  - 279ca67: Use `workspace:*` instead of `workspace:^` for local package references as default. This ensures that trails packages from this repository are always referenced with their exact version to avoid potential issues with version mismatches. If a project specifically wants to use other versions for some trails packages, a pnpm override can be used to force other versions.
8
17
  - 9580bb4: Update various dependencies.
9
18
  - 9580bb4: Update to Chakra 3.31.0
19
+ - Updated dependencies [597584b]
20
+ - Updated dependencies [9c29256]
10
21
  - Updated dependencies [279ca67]
22
+ - Updated dependencies [597584b]
11
23
  - Updated dependencies [9580bb4]
12
24
  - Updated dependencies [9580bb4]
13
- - @open-pioneer/map@1.2.0-dev.20260121105545
25
+ - @open-pioneer/map@1.2.0
14
26
 
15
27
  ## 1.1.0
16
28
 
@@ -1,6 +1,6 @@
1
- import type { SelectionSource, SelectionResult } from "./api";
2
1
  import { MapModel } from "@open-pioneer/map";
3
2
  import { Extent } from "ol/extent";
3
+ import type { SelectionResult, SelectionSource } from "./api";
4
4
  /**
5
5
  * All results returned from one source.
6
6
  */
@@ -1,6 +1,7 @@
1
1
  import { createLogger } from '@open-pioneer/core';
2
+ import { sourceId } from './_virtual/source-info.js';
2
3
 
3
- const LOG = createLogger("selection:SelectionController");
4
+ const LOG = createLogger(sourceId);
4
5
  const DEFAULT_MAX_RESULTS = 1e4;
5
6
  class SelectionController {
6
7
  #mapModel;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionController.js","sources":["SelectionController.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { createLogger } from \"@open-pioneer/core\";\nimport type { SelectionSource, SelectionResult } from \"./api\";\nimport { MapModel } from \"@open-pioneer/map\";\nimport { Extent } from \"ol/extent\";\n\nconst LOG = createLogger(\"selection:SelectionController\");\n\n/**\n * All results returned from one source.\n */\nexport interface SelectionSourceResults {\n source: SelectionSource;\n results: SelectionResult[];\n}\n\nconst DEFAULT_MAX_RESULTS = 10000;\n\nexport class SelectionController {\n #mapModel: MapModel;\n\n /**\n * Limits the number of results.\n */\n readonly #maxResults: number;\n\n /**\n * Called whenever an error happens.\n */\n readonly #onError: () => void;\n\n constructor(options: { mapModel: MapModel; onError: () => void; maxResults?: number }) {\n const { mapModel, onError, maxResults = DEFAULT_MAX_RESULTS } = options;\n this.#mapModel = mapModel;\n this.#maxResults = maxResults;\n this.#onError = onError;\n }\n\n destroy() {}\n\n async select(\n source: SelectionSource,\n extent: Extent\n ): Promise<SelectionSourceResults | undefined> {\n if (!extent) {\n return undefined;\n }\n\n return await this.#selectFromSource(source, extent);\n }\n\n async #selectFromSource(\n source: SelectionSource,\n extent: Extent\n ): Promise<SelectionSourceResults | undefined> {\n const projection = this.#mapModel.olMap.getView().getProjection();\n try {\n LOG.debug(`Starting selection on source '${source.label}'`);\n\n const maxResults = this.#maxResults;\n let results = await source.select(\n { type: \"extent\", extent },\n {\n maxResults,\n mapProjection: projection,\n signal: new AbortController().signal // currently not used\n }\n );\n if (results.length > maxResults) {\n results = results.slice(0, maxResults);\n }\n\n LOG.debug(`Found ${results.length} results on source '${source.label}'`);\n return { source: source, results: results };\n } catch (e) {\n LOG.error(`selection from source ${source.label} failed`, e);\n this.#onError();\n return undefined;\n }\n }\n}\n"],"names":[],"mappings":";;A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ACA,MAAA,IAAI,OAAA,CAAQ,SAAS,UAAA,EAAY;AAC7B,QAAA,OAAA,GAAU,OAAA,CAAQ,KAAA,CAAM,CAAA,EAAG,UAAU,CAAA;AAAA,MACzC;AAEA,MAAA,GAAA,CAAI,MAAM,CAAA,MAAA,EAAS,OAAA,CAAQ,MAAM,CAAA,oBAAA,EAAuB,MAAA,CAAO,KAAK,CAAA,CAAA,CAAG,CAAA;AACvE,MAAA,OAAO,EAAE,QAAgB,OAAA,EAAiB;AAAA,IAC9C,SAAS,CAAA,EAAG;AACR,MAAA,GAAA,CAAI,KAAA,CAAM,CAAA,sBAAA,EAAyB,MAAA,CAAO,KAAK,WAAW,CAAC,CAAA;AAC3D,MAAA,IAAA,CAAK,QAAA,EAAS;AACd,MAAA,OAAO,MAAA;AAAA,IACX;AAAA,EACJ;AACJ;;;;"}
1
+ {"version":3,"file":"SelectionController.js","sources":["SelectionController.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { createLogger } from \"@open-pioneer/core\";\nimport { MapModel } from \"@open-pioneer/map\";\nimport { Extent } from \"ol/extent\";\nimport { sourceId } from \"open-pioneer:source-info\";\nimport type { SelectionResult, SelectionSource } from \"./api\";\n\nconst LOG = createLogger(sourceId);\n\n/**\n * All results returned from one source.\n */\nexport interface SelectionSourceResults {\n source: SelectionSource;\n results: SelectionResult[];\n}\n\nconst DEFAULT_MAX_RESULTS = 10000;\n\nexport class SelectionController {\n #mapModel: MapModel;\n\n /**\n * Limits the number of results.\n */\n readonly #maxResults: number;\n\n /**\n * Called whenever an error happens.\n */\n readonly #onError: () => void;\n\n constructor(options: { mapModel: MapModel; onError: () => void; maxResults?: number }) {\n const { mapModel, onError, maxResults = DEFAULT_MAX_RESULTS } = options;\n this.#mapModel = mapModel;\n this.#maxResults = maxResults;\n this.#onError = onError;\n }\n\n destroy() {}\n\n async select(\n source: SelectionSource,\n extent: Extent\n ): Promise<SelectionSourceResults | undefined> {\n if (!extent) {\n return undefined;\n }\n\n return await this.#selectFromSource(source, extent);\n }\n\n async #selectFromSource(\n source: SelectionSource,\n extent: Extent\n ): Promise<SelectionSourceResults | undefined> {\n const projection = this.#mapModel.olMap.getView().getProjection();\n try {\n LOG.debug(`Starting selection on source '${source.label}'`);\n\n const maxResults = this.#maxResults;\n let results = await source.select(\n { type: \"extent\", extent },\n {\n maxResults,\n mapProjection: projection,\n signal: new AbortController().signal // currently not used\n }\n );\n if (results.length > maxResults) {\n results = results.slice(0, maxResults);\n }\n\n LOG.debug(`Found ${results.length} results on source '${source.label}'`);\n return { source: source, results: results };\n } catch (e) {\n LOG.error(`selection from source ${source.label} failed`, e);\n this.#onError();\n return undefined;\n }\n }\n}\n"],"names":[],"mappings":";;;AAQA,MAAM,GAAA,GAAM,aAAa,QAAQ,CAAA;AAUjC,MAAM,mBAAA,GAAsB,GAAA;AAErB,MAAM,mBAAA,CAAoB;AAAA,EAC7B,SAAA;AAAA;AAAA;AAAA;AAAA,EAKS,WAAA;AAAA;AAAA;AAAA;AAAA,EAKA,QAAA;AAAA,EAET,YAAY,OAAA,EAA2E;AACnF,IAAA,MAAM,EAAE,QAAA,EAAU,OAAA,EAAS,UAAA,GAAa,qBAAoB,GAAI,OAAA;AAChE,IAAA,IAAA,CAAK,SAAA,GAAY,QAAA;AACjB,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AACnB,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA;AAAA,EACpB;AAAA,EAEA,OAAA,GAAU;AAAA,EAAC;AAAA,EAEX,MAAM,MAAA,CACF,MAAA,EACA,MAAA,EAC2C;AAC3C,IAAA,IAAI,CAAC,MAAA,EAAQ;AACT,MAAA,OAAO,MAAA;AAAA,IACX;AAEA,IAAA,OAAO,MAAM,IAAA,CAAK,iBAAA,CAAkB,MAAA,EAAQ,MAAM,CAAA;AAAA,EACtD;AAAA,EAEA,MAAM,iBAAA,CACF,MAAA,EACA,MAAA,EAC2C;AAC3C,IAAA,MAAM,aAAa,IAAA,CAAK,SAAA,CAAU,KAAA,CAAM,OAAA,GAAU,aAAA,EAAc;AAChE,IAAA,IAAI;AACA,MAAA,GAAA,CAAI,KAAA,CAAM,CAAA,8BAAA,EAAiC,MAAA,CAAO,KAAK,CAAA,CAAA,CAAG,CAAA;AAE1D,MAAA,MAAM,aAAa,IAAA,CAAK,WAAA;AACxB,MAAA,IAAI,OAAA,GAAU,MAAM,MAAA,CAAO,MAAA;AAAA,QACvB,EAAE,IAAA,EAAM,QAAA,EAAU,MAAA,EAAO;AAAA,QACzB;AAAA,UACI,UAAA;AAAA,UACA,aAAA,EAAe,UAAA;AAAA,UACf,MAAA,EAAQ,IAAI,eAAA,EAAgB,CAAE;AAAA;AAAA;AAClC,OACJ;AACA,MAAA,IAAI,OAAA,CAAQ,SAAS,UAAA,EAAY;AAC7B,QAAA,OAAA,GAAU,OAAA,CAAQ,KAAA,CAAM,CAAA,EAAG,UAAU,CAAA;AAAA,MACzC;AAEA,MAAA,GAAA,CAAI,MAAM,CAAA,MAAA,EAAS,OAAA,CAAQ,MAAM,CAAA,oBAAA,EAAuB,MAAA,CAAO,KAAK,CAAA,CAAA,CAAG,CAAA;AACvE,MAAA,OAAO,EAAE,QAAgB,OAAA,EAAiB;AAAA,IAC9C,SAAS,CAAA,EAAG;AACR,MAAA,GAAA,CAAI,KAAA,CAAM,CAAA,sBAAA,EAAyB,MAAA,CAAO,KAAK,WAAW,CAAC,CAAA;AAC3D,MAAA,IAAA,CAAK,QAAA,EAAS;AACd,MAAA,OAAO,MAAA;AAAA,IACX;AAAA,EACJ;AACJ;;;;"}
@@ -0,0 +1,4 @@
1
+ const sourceId = "@open-pioneer/selection/SelectionController";
2
+
3
+ export { sourceId };
4
+ //# sourceMappingURL=source-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-info.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/selection",
4
- "version": "1.2.0-dev.20260121105545",
4
+ "version": "1.3.0-dev-map-loading.20260202141334",
5
5
  "description": "This package provides a UI component to perform a selection on given selection sources from the map.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -15,19 +15,19 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@chakra-ui/react": "^3.31.0",
18
- "@open-pioneer/core": "4.4.0-dev.20260121102820",
19
- "@open-pioneer/notifier": "4.4.0-dev.20260121102820",
20
- "@open-pioneer/react-utils": "4.4.0-dev.20260121102820",
21
- "@open-pioneer/runtime": "4.4.0-dev.20260121102820",
18
+ "@open-pioneer/core": "^4.4.0",
19
+ "@open-pioneer/notifier": "^4.4.0",
20
+ "@open-pioneer/react-utils": "^4.4.0",
21
+ "@open-pioneer/runtime": "^4.4.0",
22
22
  "classnames": "^2.5.1",
23
23
  "ol": "^10.7.0",
24
24
  "react": "^19.2.3",
25
25
  "react-icons": "^5.5.0",
26
26
  "uuid": "^13.0.0",
27
27
  "@conterra/reactivity-core": "^0.8.1",
28
- "@open-pioneer/reactivity": "4.4.0-dev.20260121102820",
29
- "@open-pioneer/chakra-snippets": "4.4.0-dev.20260121102820",
30
- "@open-pioneer/map": "1.2.0-dev.20260121105545"
28
+ "@open-pioneer/reactivity": "^4.4.0",
29
+ "@open-pioneer/chakra-snippets": "^4.4.0",
30
+ "@open-pioneer/map": "1.3.0-dev-map-loading.20260202141334"
31
31
  },
32
32
  "exports": {
33
33
  "./package.json": "./package.json",