@honua/react 0.1.1-beta.0 → 0.1.4-beta.0
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/contract/discovery.d.ts +34 -0
- package/contract/discovery.d.ts.map +1 -1
- package/contract/index.d.ts +7 -5
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +3 -2
- package/contract/pmtiles.d.ts +10 -1
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +10 -2
- package/contract/protocol-module.d.ts +84 -9
- package/contract/protocol-module.d.ts.map +1 -1
- package/contract/query-filter-fes.d.ts +18 -0
- package/contract/query-filter-fes.d.ts.map +1 -0
- package/contract/query-filter-fes.js +122 -0
- package/contract/query-filter.d.ts +300 -0
- package/contract/query-filter.d.ts.map +1 -0
- package/contract/query-filter.js +883 -0
- package/contract/schema.d.ts +12 -0
- package/contract/schema.d.ts.map +1 -1
- package/contract/schema.js +34 -0
- package/contract/source-capability-support.d.ts.map +1 -1
- package/contract/source-capability-support.js +15 -3
- package/contract/source.d.ts +45 -25
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +719 -479
- package/contract/types.d.ts +87 -18
- package/contract/types.d.ts.map +1 -1
- package/contract/widget-source.d.ts.map +1 -1
- package/core/client.d.ts +45 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +224 -46
- package/core/error-classifications.d.ts +6 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +6 -0
- package/core/error-code-registry.d.ts +6 -0
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +6 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +68 -4
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +325 -8
- package/core/odata-write-codec.d.ts.map +1 -1
- package/core/odata-write-codec.js +0 -1
- package/core/odata.d.ts +6 -0
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +6 -1
- package/core/ogc-processes.d.ts +182 -25
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +602 -30
- package/core/process-runner.d.ts +8 -1
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +1 -0
- package/core/protocol-transport.d.ts +2 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/stac.d.ts +31 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +136 -19
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +123 -9
- package/core/types.d.ts.map +1 -1
- package/core/wfs-axis-order.d.ts +18 -0
- package/core/wfs-axis-order.d.ts.map +1 -0
- package/core/wfs-axis-order.js +108 -0
- package/core/wfs-capabilities.d.ts +65 -24
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +237 -27
- package/core/wfs-filter.d.ts +26 -3
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +48 -53
- package/core/wfs-protocol-error.d.ts +12 -0
- package/core/wfs-protocol-error.d.ts.map +1 -0
- package/core/wfs-protocol-error.js +13 -0
- package/core/wfs.d.ts +53 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +251 -29
- package/core/wms-feature-info.d.ts +92 -0
- package/core/wms-feature-info.d.ts.map +1 -0
- package/core/wms-feature-info.js +285 -0
- package/core/wms.d.ts +9 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +17 -5
- package/esri-compat/event-bus.d.ts +20 -0
- package/esri-compat/event-bus.d.ts.map +1 -1
- package/esri-compat/feature-filter.d.ts +46 -1
- package/esri-compat/feature-filter.d.ts.map +1 -1
- package/esri-compat/feature-filter.js +49 -0
- package/esri-compat/geojson-layer.d.ts +4 -2
- package/esri-compat/geojson-layer.d.ts.map +1 -1
- package/esri-compat/geojson-layer.js +4 -2
- package/esri-compat/identity-manager.js +2 -2
- package/esri-compat/imagery-layer.d.ts +2 -1
- package/esri-compat/imagery-layer.d.ts.map +1 -1
- package/esri-compat/imagery-layer.js +2 -1
- package/esri-compat/layer-list.d.ts +8 -1
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +11 -4
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +1 -1
- package/esri-compat/locator.d.ts +297 -0
- package/esri-compat/locator.d.ts.map +1 -0
- package/esri-compat/locator.js +579 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +1 -1
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/time-slider.d.ts +29 -0
- package/esri-compat/time-slider.d.ts.map +1 -1
- package/esri-compat/time-slider.js +117 -0
- package/esri-compat/wfs-layer.d.ts +2 -1
- package/esri-compat/wfs-layer.d.ts.map +1 -1
- package/esri-compat/wfs-layer.js +2 -1
- package/esri-compat/widget-host.d.ts +42 -6
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +99 -10
- package/generated-app/projection.d.ts.map +1 -1
- package/generated-app/runtime.d.ts.map +1 -1
- package/map/data-to-map-bridge.d.ts +1 -1
- package/map/data-to-map-bridge.d.ts.map +1 -1
- package/map/data-to-map-bridge.js +1 -2
- package/map/honua-map.d.ts.map +1 -1
- package/map/honua-map.js +1 -1
- package/map/index.d.ts +2 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +2 -0
- package/map/realtime-reconciliation-adapter.d.ts +98 -0
- package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
- package/map/realtime-reconciliation-adapter.js +84 -0
- package/map/temporal-playback.d.ts +25 -0
- package/map/temporal-playback.d.ts.map +1 -1
- package/map/temporal-playback.js +29 -1
- package/package.json +4 -3
- package/query-planner/canonical-filter.d.ts +30 -0
- package/query-planner/canonical-filter.d.ts.map +1 -0
- package/query-planner/canonical-filter.js +30 -0
- package/query-planner/columnar-plan.d.ts +63 -0
- package/query-planner/columnar-plan.d.ts.map +1 -0
- package/query-planner/columnar-plan.js +94 -0
- package/query-planner/diagnostics.d.ts +3 -3
- package/query-planner/diagnostics.d.ts.map +1 -1
- package/query-planner/diagnostics.js +17 -4
- package/query-planner/duckdb.d.ts.map +1 -1
- package/query-planner/duckdb.js +16 -2
- package/query-planner/execution-context.d.ts.map +1 -1
- package/query-planner/execution-context.js +3 -1
- package/query-planner/executor.d.ts.map +1 -1
- package/query-planner/executor.js +7 -1
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +24 -5
- package/query-planner/grpc.d.ts.map +1 -1
- package/query-planner/grpc.js +29 -5
- package/query-planner/index.d.ts +20 -5
- package/query-planner/index.d.ts.map +1 -1
- package/query-planner/index.js +16 -3
- package/query-planner/ir.d.ts +6 -1
- package/query-planner/ir.d.ts.map +1 -1
- package/query-planner/ir.js +63 -1
- package/query-planner/odata-protocol-module.d.ts +54 -0
- package/query-planner/odata-protocol-module.d.ts.map +1 -0
- package/query-planner/odata-protocol-module.js +199 -0
- package/query-planner/odata-v1.d.ts +23 -0
- package/query-planner/odata-v1.d.ts.map +1 -0
- package/query-planner/odata-v1.js +202 -0
- package/query-planner/odata.d.ts +0 -3
- package/query-planner/odata.d.ts.map +1 -1
- package/query-planner/odata.js +0 -143
- package/query-planner/ogc-features.d.ts.map +1 -1
- package/query-planner/ogc-features.js +23 -1
- package/query-planner/planner.d.ts +2 -2
- package/query-planner/planner.d.ts.map +1 -1
- package/query-planner/planner.js +146 -27
- package/query-planner/representation.d.ts +59 -0
- package/query-planner/representation.d.ts.map +1 -0
- package/query-planner/representation.js +140 -0
- package/query-planner/types.d.ts +153 -3
- package/query-planner/types.d.ts.map +1 -1
- package/query-planner/wfs-protocol-module.d.ts +57 -0
- package/query-planner/wfs-protocol-module.d.ts.map +1 -0
- package/query-planner/wfs-protocol-module.js +731 -0
- package/query-planner/wfs-v1.d.ts +41 -0
- package/query-planner/wfs-v1.d.ts.map +1 -0
- package/query-planner/wfs-v1.js +366 -0
- package/query-planner/wfs.d.ts +1 -3
- package/query-planner/wfs.d.ts.map +1 -1
- package/query-planner/wfs.js +1 -70
- package/react/honua-map.d.ts +3 -1
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +11 -1
- package/react/hooks.d.ts +1 -1
- package/react/hooks.js +1 -1
- package/react/selection.d.ts.map +1 -1
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +1 -1
- package/react/use-mounted-source.js +1 -1
- package/realtime/checkpoint-store.d.ts +206 -0
- package/realtime/checkpoint-store.d.ts.map +1 -0
- package/realtime/checkpoint-store.js +504 -0
- package/realtime/contract.d.ts +142 -0
- package/realtime/contract.d.ts.map +1 -0
- package/realtime/contract.js +154 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +131 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +302 -0
- package/realtime/index.d.ts +39 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +26 -0
- package/realtime/odata-delta.d.ts +114 -0
- package/realtime/odata-delta.d.ts.map +1 -0
- package/realtime/odata-delta.js +483 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/resumable-transport.d.ts +111 -0
- package/realtime/resumable-transport.d.ts.map +1 -0
- package/realtime/resumable-transport.js +406 -0
- package/realtime/resumable.d.ts +104 -0
- package/realtime/resumable.d.ts.map +1 -0
- package/realtime/resumable.js +632 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +147 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/realtime/websocket.d.ts +60 -0
- package/realtime/websocket.d.ts.map +1 -0
- package/realtime/websocket.js +157 -0
- package/realtime/wire.d.ts +28 -0
- package/realtime/wire.d.ts.map +1 -0
- package/realtime/wire.js +73 -0
- package/runtime/index.d.ts +6 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -1
- package/runtime/load-package.d.ts +24 -0
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +45 -1
- package/runtime/maplibre-renderer.d.ts +11 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -1
- package/runtime/maplibre-renderer.js +32 -7
- package/runtime/offline-region-protocol.d.ts +73 -0
- package/runtime/offline-region-protocol.d.ts.map +1 -0
- package/runtime/offline-region-protocol.js +63 -0
- package/runtime/offline-region-style.d.ts +78 -0
- package/runtime/offline-region-style.d.ts.map +1 -0
- package/runtime/offline-region-style.js +147 -0
- package/runtime/pmtiles-protocol.d.ts +7 -8
- package/runtime/pmtiles-protocol.d.ts.map +1 -1
- package/runtime/pmtiles-protocol.js +19 -66
- package/runtime/protocol-registry.d.ts +55 -0
- package/runtime/protocol-registry.d.ts.map +1 -0
- package/runtime/protocol-registry.js +103 -0
- package/runtime/runtime.d.ts +2 -0
- package/runtime/runtime.d.ts.map +1 -1
- package/runtime/runtime.js +6 -1
- package/studio/index.d.ts +24 -7
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +21 -7
- package/studio/lifecycle-client.d.ts +164 -0
- package/studio/lifecycle-client.d.ts.map +1 -0
- package/studio/lifecycle-client.js +299 -0
- package/studio/lifecycle-errors.d.ts +91 -0
- package/studio/lifecycle-errors.d.ts.map +1 -0
- package/studio/lifecycle-errors.js +77 -0
- package/studio/lifecycle-types.d.ts +321 -0
- package/studio/lifecycle-types.d.ts.map +1 -0
- package/studio/lifecycle-types.js +22 -0
- package/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
|
@@ -12,6 +12,7 @@ export class ImageryLayerCompat {
|
|
|
12
12
|
listMode;
|
|
13
13
|
format;
|
|
14
14
|
pixelType;
|
|
15
|
+
/** Mutable to match the ArcGIS declaration (`number[]`); see #1013. */
|
|
15
16
|
bandIds;
|
|
16
17
|
renderingRule;
|
|
17
18
|
mosaicRule;
|
|
@@ -35,7 +36,7 @@ export class ImageryLayerCompat {
|
|
|
35
36
|
this.listMode = options.listMode ?? "show";
|
|
36
37
|
this.format = options.format ?? "png";
|
|
37
38
|
this.pixelType = options.pixelType;
|
|
38
|
-
this.bandIds = options.bandIds;
|
|
39
|
+
this.bandIds = options.bandIds === undefined ? undefined : [...options.bandIds];
|
|
39
40
|
this.renderingRule = options.renderingRule;
|
|
40
41
|
this.mosaicRule = options.mosaicRule;
|
|
41
42
|
this.loaded = false;
|
|
@@ -66,7 +66,14 @@ export declare class LayerListCompat {
|
|
|
66
66
|
* Headless usage keeps the state-model-only behavior.
|
|
67
67
|
*/
|
|
68
68
|
private readonly widgetHost;
|
|
69
|
-
|
|
69
|
+
/**
|
|
70
|
+
* The element the toggle listener is currently bound to. Tracked per element
|
|
71
|
+
* rather than as a "bound once" flag because the host legitimately mounts a
|
|
72
|
+
* *new* element after a teardown — an unregister/re-register cycle, or a
|
|
73
|
+
* container whose children were replaced — and a flag would leave that new
|
|
74
|
+
* element without a listener, silently breaking visibility toggles.
|
|
75
|
+
*/
|
|
76
|
+
private widgetHostBoundElement;
|
|
70
77
|
constructor(options?: LayerListCompatOptions);
|
|
71
78
|
load(): Promise<LayerListCompat>;
|
|
72
79
|
when(callback?: (widget: LayerListCompat) => void): Promise<LayerListCompat>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-list.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/layer-list.ts"],"names":[],"mappings":"AAA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D,qBAAqB;IAgBjB,OAAO,IAAI,IAAI;IAStB,gFAAgF;YAClE,gBAAgB;IAiB9B,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,IAAI;IAeZ,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -22,7 +22,14 @@ export class LayerListCompat {
|
|
|
22
22
|
* Headless usage keeps the state-model-only behavior.
|
|
23
23
|
*/
|
|
24
24
|
widgetHost;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The element the toggle listener is currently bound to. Tracked per element
|
|
27
|
+
* rather than as a "bound once" flag because the host legitimately mounts a
|
|
28
|
+
* *new* element after a teardown — an unregister/re-register cycle, or a
|
|
29
|
+
* container whose children were replaced — and a flag would leave that new
|
|
30
|
+
* element without a listener, silently breaking visibility toggles.
|
|
31
|
+
*/
|
|
32
|
+
widgetHostBoundElement;
|
|
26
33
|
constructor(options = {}) {
|
|
27
34
|
this.view = options.view;
|
|
28
35
|
this.map = options.map ?? extractMapFromView(options.view);
|
|
@@ -37,7 +44,7 @@ export class LayerListCompat {
|
|
|
37
44
|
this.listenersByType = new Map();
|
|
38
45
|
this.watchListeners = new Map();
|
|
39
46
|
this.subscriptions = [];
|
|
40
|
-
const widgetHost = options.container != null ? new HonuaWidgetHost("honua-layer-list", options.container) : undefined;
|
|
47
|
+
const widgetHost = options.container != null ? new HonuaWidgetHost("honua-layer-list", options.container, this.eventBus) : undefined;
|
|
41
48
|
this.widgetHost = widgetHost?.available ? widgetHost : undefined;
|
|
42
49
|
if (this.autoRefresh) {
|
|
43
50
|
this.subscriptions.push(this.eventBus.on("map.layer-added", () => this.refresh()));
|
|
@@ -180,8 +187,8 @@ export class LayerListCompat {
|
|
|
180
187
|
return;
|
|
181
188
|
const rows = flattenLayerListItems(this.items);
|
|
182
189
|
await host.update((element) => {
|
|
183
|
-
if (
|
|
184
|
-
this.
|
|
190
|
+
if (this.widgetHostBoundElement !== element) {
|
|
191
|
+
this.widgetHostBoundElement = element;
|
|
185
192
|
element.addEventListener("honua-layer-visibility-change", (event) => {
|
|
186
193
|
const detail = event.detail;
|
|
187
194
|
if (detail?.layerId === undefined || typeof detail.visible !== "boolean")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/legend.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAIf,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SA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D,OAAO,IAAI,IAAI;IAQtB,4EAA4E;YAC9D,gBAAgB;IAe9B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,cAAc;CAUvB"}
|
package/esri-compat/legend.js
CHANGED
|
@@ -37,7 +37,7 @@ export class LegendCompat {
|
|
|
37
37
|
this.watchListeners = new Map();
|
|
38
38
|
this.subscriptions = [];
|
|
39
39
|
this.refreshRevision = 0;
|
|
40
|
-
const widgetHost = options.container != null ? new HonuaWidgetHost("honua-legend", options.container) : undefined;
|
|
40
|
+
const widgetHost = options.container != null ? new HonuaWidgetHost("honua-legend", options.container, this.eventBus) : undefined;
|
|
41
41
|
this.widgetHost = widgetHost?.available ? widgetHost : undefined;
|
|
42
42
|
if (this.autoRefresh) {
|
|
43
43
|
this.subscriptions.push(this.eventBus.on("map.layer-added", () => void this.refresh()));
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArcGIS `Locator` / `@arcgis/core/rest/locator` compatibility, backed entirely
|
|
3
|
+
* by the provider-pluggable geocoding contract in `src/geocoding/`.
|
|
4
|
+
*
|
|
5
|
+
* There is no Honua server dependency: the caller supplies a
|
|
6
|
+
* {@link GeocodingProvider} (Nominatim / Photon / Pelias / Honua) once and the
|
|
7
|
+
* shim projects ArcGIS-shaped parameters onto it and ArcGIS-shaped candidates
|
|
8
|
+
* back out.
|
|
9
|
+
*
|
|
10
|
+
* Capability honesty is inherited from the geocoding layer rather than faked:
|
|
11
|
+
* a provider that does not declare `suggest` (Nominatim) makes
|
|
12
|
+
* {@link LocatorCompat.suggestLocations} throw `HonuaCapabilityNotSupportedError`
|
|
13
|
+
* under the default `"strict"` policy, and makes the derived search source omit
|
|
14
|
+
* its `suggest` hook entirely so the Search widget simply does not offer
|
|
15
|
+
* typeahead. ArcGIS locator parameters the provider contract cannot express
|
|
16
|
+
* (`searchExtent`, proximity `location`, `categories`, `magicKey`,
|
|
17
|
+
* `locationType`) are rejected the same way instead of being silently dropped.
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import type { CapabilityPolicy } from "../contract/types.js";
|
|
22
|
+
import { type GeocodingProvenance, type GeocodingProvider } from "../geocoding/provider.js";
|
|
23
|
+
import { CompatEventBus } from "./event-bus.js";
|
|
24
|
+
import type { SearchRequestCompat, SearchResultCompat, SearchSourceCompat, SearchSuggestionCompat } from "./search.js";
|
|
25
|
+
/** Structural `SpatialReference` accepted wherever ArcGIS takes one. */
|
|
26
|
+
export interface LocatorSpatialReferenceLike {
|
|
27
|
+
wkid?: number;
|
|
28
|
+
latestWkid?: number;
|
|
29
|
+
}
|
|
30
|
+
/** ArcGIS-shaped `Point` returned on every candidate. */
|
|
31
|
+
export interface LocatorPointCompat {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
longitude: number;
|
|
35
|
+
latitude: number;
|
|
36
|
+
spatialReference: {
|
|
37
|
+
wkid: number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** ArcGIS-shaped `Extent` returned on every candidate. */
|
|
41
|
+
export interface LocatorExtentCompat {
|
|
42
|
+
xmin: number;
|
|
43
|
+
ymin: number;
|
|
44
|
+
xmax: number;
|
|
45
|
+
ymax: number;
|
|
46
|
+
spatialReference: {
|
|
47
|
+
wkid: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* ArcGIS-shaped `AddressCandidate`, plus the geocoding provenance the host is
|
|
52
|
+
* obliged to display (Honua addition — ArcGIS has no equivalent field).
|
|
53
|
+
*/
|
|
54
|
+
export interface LocatorAddressCandidateCompat {
|
|
55
|
+
address: string;
|
|
56
|
+
attributes: Record<string, string | null>;
|
|
57
|
+
location: LocatorPointCompat;
|
|
58
|
+
extent: LocatorExtentCompat;
|
|
59
|
+
score: number;
|
|
60
|
+
provenance: GeocodingProvenance;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* ArcGIS-shaped `SuggestionResult`. `magicKey` is always `""`: the geocoding
|
|
64
|
+
* provider contract has no opaque re-resolution handle, so a suggestion is
|
|
65
|
+
* re-resolved by its `text`.
|
|
66
|
+
*/
|
|
67
|
+
export interface LocatorSuggestionCompat {
|
|
68
|
+
text: string;
|
|
69
|
+
magicKey: string;
|
|
70
|
+
isCollection: boolean;
|
|
71
|
+
provenance: GeocodingProvenance;
|
|
72
|
+
}
|
|
73
|
+
/** ArcGIS multi-field address input; `SingleLine` is the supported form. */
|
|
74
|
+
export interface LocatorAddressInputCompat {
|
|
75
|
+
SingleLine?: string;
|
|
76
|
+
singleLine?: string;
|
|
77
|
+
Address?: string;
|
|
78
|
+
address?: string;
|
|
79
|
+
City?: string;
|
|
80
|
+
Region?: string;
|
|
81
|
+
Postal?: string;
|
|
82
|
+
CountryCode?: string;
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
}
|
|
85
|
+
/** Parameters for {@link LocatorCompat.addressToLocations}. */
|
|
86
|
+
export interface AddressToLocationsParamsCompat {
|
|
87
|
+
address?: LocatorAddressInputCompat | string;
|
|
88
|
+
countryCode?: string;
|
|
89
|
+
maxLocations?: number;
|
|
90
|
+
outFields?: readonly string[] | string;
|
|
91
|
+
outSpatialReference?: LocatorSpatialReferenceLike | number;
|
|
92
|
+
/** Unsupported by the provider contract; rejected under `"strict"`. */
|
|
93
|
+
categories?: readonly string[] | string;
|
|
94
|
+
/** Proximity bias — unsupported by the provider contract. */
|
|
95
|
+
location?: unknown;
|
|
96
|
+
/** Result-window filter — unsupported by the provider contract. */
|
|
97
|
+
searchExtent?: unknown;
|
|
98
|
+
/** Opaque suggestion handle — unsupported by the provider contract. */
|
|
99
|
+
magicKey?: string;
|
|
100
|
+
}
|
|
101
|
+
/** One row of a {@link LocatorCompat.addressesToLocations} batch. */
|
|
102
|
+
export interface LocatorBatchAddressCompat extends LocatorAddressInputCompat {
|
|
103
|
+
OBJECTID?: number;
|
|
104
|
+
objectId?: number;
|
|
105
|
+
}
|
|
106
|
+
/** Parameters for {@link LocatorCompat.addressesToLocations}. */
|
|
107
|
+
export interface AddressesToLocationsParamsCompat {
|
|
108
|
+
addresses?: readonly LocatorBatchAddressCompat[];
|
|
109
|
+
countryCode?: string;
|
|
110
|
+
outFields?: readonly string[] | string;
|
|
111
|
+
outSpatialReference?: LocatorSpatialReferenceLike | number;
|
|
112
|
+
categories?: readonly string[] | string;
|
|
113
|
+
searchExtent?: unknown;
|
|
114
|
+
}
|
|
115
|
+
/** Parameters for {@link LocatorCompat.locationToAddress}. */
|
|
116
|
+
export interface LocationToAddressParamsCompat {
|
|
117
|
+
location?: unknown;
|
|
118
|
+
outSpatialReference?: LocatorSpatialReferenceLike | number;
|
|
119
|
+
outFields?: readonly string[] | string;
|
|
120
|
+
/** ArcGIS rooftop/street-side selector — unsupported by the provider contract. */
|
|
121
|
+
locationType?: string;
|
|
122
|
+
/** ArcGIS search radius in meters — unsupported by the provider contract. */
|
|
123
|
+
locationSearchRadius?: number;
|
|
124
|
+
}
|
|
125
|
+
/** Parameters for {@link LocatorCompat.suggestLocations}. */
|
|
126
|
+
export interface SuggestLocationsParamsCompat {
|
|
127
|
+
text?: string;
|
|
128
|
+
countryCode?: string;
|
|
129
|
+
maxSuggestions?: number;
|
|
130
|
+
categories?: readonly string[] | string;
|
|
131
|
+
location?: unknown;
|
|
132
|
+
searchExtent?: unknown;
|
|
133
|
+
}
|
|
134
|
+
export interface LocatorCompatOptions {
|
|
135
|
+
/**
|
|
136
|
+
* Original ArcGIS GeocodeServer URL. Retained for diagnostics only — it is
|
|
137
|
+
* never fetched. Geocoding always runs through {@link provider}.
|
|
138
|
+
*/
|
|
139
|
+
url?: string;
|
|
140
|
+
/** Geocoding provider every operation is executed against. */
|
|
141
|
+
provider?: GeocodingProvider;
|
|
142
|
+
/** Accepted for ArcGIS constructor parity; diagnostics only (never sent). */
|
|
143
|
+
apiKey?: string;
|
|
144
|
+
/** Accepted for ArcGIS constructor parity; diagnostics only (never sent). */
|
|
145
|
+
requestOptions?: Record<string, unknown>;
|
|
146
|
+
/** Capability policy for provider capability misses; defaults to `"strict"`. */
|
|
147
|
+
capabilityPolicy?: CapabilityPolicy;
|
|
148
|
+
eventBus?: CompatEventBus;
|
|
149
|
+
/** Default `maxLocations` when a call does not specify one. */
|
|
150
|
+
maxLocations?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Half-width, in degrees, of the square extent derived around a candidate
|
|
153
|
+
* point when the provider surfaces no `Xmin`/`Ymin`/`Xmax`/`Ymax` attributes.
|
|
154
|
+
* Defaults to `0.01` (roughly a 2 km box at the equator).
|
|
155
|
+
*/
|
|
156
|
+
extentPaddingDegrees?: number;
|
|
157
|
+
}
|
|
158
|
+
export type LocatorLoadStatusCompat = "not-loaded" | "loading" | "loaded";
|
|
159
|
+
export interface LocatorHandleCompat {
|
|
160
|
+
remove(): void;
|
|
161
|
+
}
|
|
162
|
+
/** Options for {@link LocatorCompat.toSearchSource} / {@link LocatorSearchSourceCompat}. */
|
|
163
|
+
export interface LocatorSearchSourceCompatOptions {
|
|
164
|
+
/** Pre-configured locator. When omitted, one is built from `url` / `provider`. */
|
|
165
|
+
locator?: LocatorCompat;
|
|
166
|
+
/** Geocoding provider, when constructing the locator inline. */
|
|
167
|
+
provider?: GeocodingProvider;
|
|
168
|
+
/** ArcGIS `LocatorSearchSource.url`; retained for diagnostics only. */
|
|
169
|
+
url?: string;
|
|
170
|
+
capabilityPolicy?: CapabilityPolicy;
|
|
171
|
+
name?: string;
|
|
172
|
+
placeholder?: string;
|
|
173
|
+
maxResults?: number;
|
|
174
|
+
maxSuggestions?: number;
|
|
175
|
+
countryCode?: string;
|
|
176
|
+
outFields?: readonly string[] | string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Drop-in replacement for ArcGIS `esri/tasks/Locator` /
|
|
180
|
+
* `@arcgis/core/rest/locator`, executed against a caller-configured
|
|
181
|
+
* {@link GeocodingProvider}.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* import { LocatorCompat } from "@honua/sdk-js/esri-compat";
|
|
186
|
+
* import { photonGeocodingProvider } from "@honua/sdk-js/geocoding";
|
|
187
|
+
*
|
|
188
|
+
* const locator = new LocatorCompat({
|
|
189
|
+
* provider: photonGeocodingProvider({ baseUrl: "https://photon.example.org" }),
|
|
190
|
+
* });
|
|
191
|
+
* const candidates = await locator.addressToLocations({
|
|
192
|
+
* address: { SingleLine: "1 Honolulu Pl, HI" },
|
|
193
|
+
* maxLocations: 5,
|
|
194
|
+
* });
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
export declare class LocatorCompat {
|
|
198
|
+
readonly url: string | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* Geocoding provider every operation runs against. Mutable so a migrated app
|
|
201
|
+
* can attach one after construction (`locator.provider = photonGeocodingProvider(...)`),
|
|
202
|
+
* which is the single assisted step the codemod cannot perform for you.
|
|
203
|
+
*/
|
|
204
|
+
provider: GeocodingProvider | undefined;
|
|
205
|
+
readonly apiKey: string | undefined;
|
|
206
|
+
readonly requestOptions: Readonly<Record<string, unknown>> | undefined;
|
|
207
|
+
readonly capabilityPolicy: CapabilityPolicy;
|
|
208
|
+
readonly eventBus: CompatEventBus;
|
|
209
|
+
readonly maxLocations: number;
|
|
210
|
+
readonly extentPaddingDegrees: number;
|
|
211
|
+
loaded: boolean;
|
|
212
|
+
loadStatus: LocatorLoadStatusCompat;
|
|
213
|
+
private readonly watchListeners;
|
|
214
|
+
constructor(options?: LocatorCompatOptions | string);
|
|
215
|
+
/** `true` when the configured provider declares the `suggest` capability. */
|
|
216
|
+
get supportsSuggest(): boolean;
|
|
217
|
+
load(): Promise<LocatorCompat>;
|
|
218
|
+
when(callback?: (locator: LocatorCompat) => void): Promise<LocatorCompat>;
|
|
219
|
+
watch(propertyName: string, listener: (value: unknown) => void): LocatorHandleCompat;
|
|
220
|
+
/** Forward-geocode a single address into ArcGIS-shaped candidates. */
|
|
221
|
+
addressToLocations(params?: AddressToLocationsParamsCompat): Promise<LocatorAddressCandidateCompat[]>;
|
|
222
|
+
/**
|
|
223
|
+
* Client-side batch geocode. ArcGIS `addressesToLocations` posts one batch to
|
|
224
|
+
* a locator; the provider contract has no batch endpoint, so each address is
|
|
225
|
+
* geocoded individually and the best candidate is returned with `ResultID`
|
|
226
|
+
* carried through from `OBJECTID`.
|
|
227
|
+
*/
|
|
228
|
+
addressesToLocations(params?: AddressesToLocationsParamsCompat): Promise<LocatorAddressCandidateCompat[]>;
|
|
229
|
+
/**
|
|
230
|
+
* Reverse-geocode a point. Mirrors ArcGIS by rejecting when the provider
|
|
231
|
+
* finds no address rather than resolving to `null`.
|
|
232
|
+
*/
|
|
233
|
+
locationToAddress(params?: LocationToAddressParamsCompat): Promise<LocatorAddressCandidateCompat>;
|
|
234
|
+
/**
|
|
235
|
+
* Typeahead suggestions. Providers without the `suggest` capability throw
|
|
236
|
+
* `HonuaCapabilityNotSupportedError` under `"strict"` and resolve to `[]`
|
|
237
|
+
* under `"degraded"` — the miss is never faked with a forward geocode.
|
|
238
|
+
*/
|
|
239
|
+
suggestLocations(params?: SuggestLocationsParamsCompat): Promise<LocatorSuggestionCompat[]>;
|
|
240
|
+
/**
|
|
241
|
+
* Project this locator as a `SearchCompat` source — the honua-maplibre
|
|
242
|
+
* replacement for the ArcGIS `LocatorSearchSource` Search backend.
|
|
243
|
+
*/
|
|
244
|
+
toSearchSource(options?: Omit<LocatorSearchSourceCompatOptions, "locator">): LocatorSearchSourceCompat;
|
|
245
|
+
destroy(): void;
|
|
246
|
+
private requireProvider;
|
|
247
|
+
private rejectUnsupportedParams;
|
|
248
|
+
private rejectUnsupportedCapability;
|
|
249
|
+
private toCandidate;
|
|
250
|
+
/**
|
|
251
|
+
* Prefer the ArcGIS locator display extent when the provider surfaces
|
|
252
|
+
* `Xmin`/`Ymin`/`Xmax`/`Ymax` attributes; otherwise derive a square box around
|
|
253
|
+
* the candidate point so `view.goTo(candidate.extent)` still behaves.
|
|
254
|
+
*/
|
|
255
|
+
private resolveExtent;
|
|
256
|
+
private notifyWatchers;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Drop-in replacement for the ArcGIS `LocatorSearchSource` Search-widget
|
|
260
|
+
* backend. `suggest` is only defined when the underlying provider declares the
|
|
261
|
+
* `suggest` capability, so `SearchCompat` skips typeahead for providers that
|
|
262
|
+
* do not have it rather than throwing on every keystroke.
|
|
263
|
+
*/
|
|
264
|
+
export declare class LocatorSearchSourceCompat implements SearchSourceCompat {
|
|
265
|
+
readonly locator: LocatorCompat;
|
|
266
|
+
readonly name: string;
|
|
267
|
+
readonly placeholder: string;
|
|
268
|
+
readonly maxResults: number;
|
|
269
|
+
readonly maxSuggestions: number;
|
|
270
|
+
readonly countryCode: string | undefined;
|
|
271
|
+
readonly outFields: readonly string[] | string | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* Present only while the configured provider declares the `suggest`
|
|
274
|
+
* capability. `SearchCompat` gates typeahead on `typeof source.suggest ===
|
|
275
|
+
* "function"`, so a provider without it (Nominatim) simply contributes no
|
|
276
|
+
* suggestions instead of throwing on every keystroke. Evaluated per access so
|
|
277
|
+
* a late-attached `locator.provider` is honored.
|
|
278
|
+
*/
|
|
279
|
+
get suggest(): ((request: SearchRequestCompat) => Promise<SearchSuggestionCompat[]>) | undefined;
|
|
280
|
+
private readonly suggestFromLocator;
|
|
281
|
+
constructor(options?: LocatorSearchSourceCompatOptions);
|
|
282
|
+
search({ searchTerm }: SearchRequestCompat): Promise<SearchResultCompat[]>;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* `@arcgis/core/rest/locator` module form of
|
|
286
|
+
* {@link LocatorCompat.addressToLocations}. The first argument is a configured
|
|
287
|
+
* {@link LocatorCompat} (or its options) rather than an ArcGIS locator URL,
|
|
288
|
+
* because the shim geocodes through a provider instead of a GeocodeServer.
|
|
289
|
+
*/
|
|
290
|
+
export declare function locatorAddressToLocations(locator: LocatorCompat | LocatorCompatOptions | string, params?: AddressToLocationsParamsCompat): Promise<LocatorAddressCandidateCompat[]>;
|
|
291
|
+
/** `@arcgis/core/rest/locator` module form of {@link LocatorCompat.addressesToLocations}. */
|
|
292
|
+
export declare function locatorAddressesToLocations(locator: LocatorCompat | LocatorCompatOptions | string, params?: AddressesToLocationsParamsCompat): Promise<LocatorAddressCandidateCompat[]>;
|
|
293
|
+
/** `@arcgis/core/rest/locator` module form of {@link LocatorCompat.locationToAddress}. */
|
|
294
|
+
export declare function locatorLocationToAddress(locator: LocatorCompat | LocatorCompatOptions | string, params?: LocationToAddressParamsCompat): Promise<LocatorAddressCandidateCompat>;
|
|
295
|
+
/** `@arcgis/core/rest/locator` module form of {@link LocatorCompat.suggestLocations}. */
|
|
296
|
+
export declare function locatorSuggestLocations(locator: LocatorCompat | LocatorCompatOptions | string, params?: SuggestLocationsParamsCompat): Promise<LocatorSuggestionCompat[]>;
|
|
297
|
+
//# sourceMappingURL=locator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locator.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/locator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAKvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAA4B,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEvH,wEAAwE;AACxE,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,yDAAyD;AACzD,MAAM,WAAW,kBAAkB;IAC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