@honua/react 0.0.20-alpha.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/LICENSE +201 -0
- package/README.md +9 -0
- package/contract/analytics-sources.d.ts +149 -0
- package/contract/analytics-sources.d.ts.map +1 -0
- package/contract/analytics-sources.js +235 -0
- package/contract/edit-session.d.ts +203 -0
- package/contract/edit-session.d.ts.map +1 -0
- package/contract/edit-session.js +760 -0
- package/contract/edit-sketch.d.ts +91 -0
- package/contract/edit-sketch.d.ts.map +1 -0
- package/contract/edit-sketch.js +281 -0
- package/contract/index.d.ts +61 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +51 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/source.d.ts +423 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3802 -0
- package/contract/spatial-aggregation.d.ts +336 -0
- package/contract/spatial-aggregation.d.ts.map +1 -0
- package/contract/spatial-aggregation.js +298 -0
- package/contract/temporal.d.ts +455 -0
- package/contract/temporal.d.ts.map +1 -0
- package/contract/temporal.js +146 -0
- package/contract/tiles.d.ts +370 -0
- package/contract/tiles.d.ts.map +1 -0
- package/contract/tiles.js +519 -0
- package/contract/types.d.ts +665 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +175 -0
- package/contract/widget-source.d.ts +205 -0
- package/contract/widget-source.d.ts.map +1 -0
- package/contract/widget-source.js +1473 -0
- package/control-plane/client.d.ts +95 -0
- package/control-plane/client.d.ts.map +1 -0
- package/control-plane/client.js +374 -0
- package/control-plane/index.d.ts +18 -0
- package/control-plane/index.d.ts.map +1 -0
- package/control-plane/index.js +14 -0
- package/control-plane/types.d.ts +233 -0
- package/control-plane/types.d.ts.map +1 -0
- package/control-plane/types.js +7 -0
- package/core/batch.d.ts +37 -0
- package/core/batch.d.ts.map +1 -0
- package/core/batch.js +79 -0
- package/core/cache-state.d.ts +79 -0
- package/core/cache-state.d.ts.map +1 -0
- package/core/cache-state.js +87 -0
- package/core/client.d.ts +577 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1664 -0
- package/core/compatibility.d.ts +18 -0
- package/core/compatibility.d.ts.map +1 -0
- package/core/compatibility.js +245 -0
- package/core/errors.d.ts +107 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +156 -0
- package/core/esri-geojson.d.ts +66 -0
- package/core/esri-geojson.d.ts.map +1 -0
- package/core/esri-geojson.js +363 -0
- package/core/geoservices.d.ts +34 -0
- package/core/geoservices.d.ts.map +1 -0
- package/core/geoservices.js +434 -0
- package/core/grpc-adapter.d.ts +23 -0
- package/core/grpc-adapter.d.ts.map +1 -0
- package/core/grpc-adapter.js +688 -0
- package/core/odata.d.ts +347 -0
- package/core/odata.d.ts.map +1 -0
- package/core/odata.js +913 -0
- package/core/ogc-conformance.d.ts +35 -0
- package/core/ogc-conformance.d.ts.map +1 -0
- package/core/ogc-conformance.js +134 -0
- package/core/ogc-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +114 -0
- package/core/ogc-maps.d.ts +49 -0
- package/core/ogc-maps.d.ts.map +1 -0
- package/core/ogc-maps.js +126 -0
- package/core/ogc-processes.d.ts +118 -0
- package/core/ogc-processes.d.ts.map +1 -0
- package/core/ogc-processes.js +423 -0
- package/core/ogc-records.d.ts +75 -0
- package/core/ogc-records.d.ts.map +1 -0
- package/core/ogc-records.js +251 -0
- package/core/ogc-tiles.d.ts +125 -0
- package/core/ogc-tiles.d.ts.map +1 -0
- package/core/ogc-tiles.js +183 -0
- package/core/path-utils.d.ts +69 -0
- package/core/path-utils.d.ts.map +1 -0
- package/core/path-utils.js +123 -0
- package/core/pbf-decoder.d.ts +39 -0
- package/core/pbf-decoder.d.ts.map +1 -0
- package/core/pbf-decoder.js +702 -0
- package/core/process-runner.d.ts +104 -0
- package/core/process-runner.d.ts.map +1 -0
- package/core/process-runner.js +315 -0
- package/core/protocol-transport.d.ts +76 -0
- package/core/protocol-transport.d.ts.map +1 -0
- package/core/protocol-transport.js +15 -0
- package/core/query-builder.d.ts +261 -0
- package/core/query-builder.d.ts.map +1 -0
- package/core/query-builder.js +538 -0
- package/core/request-pipeline.d.ts +88 -0
- package/core/request-pipeline.d.ts.map +1 -0
- package/core/request-pipeline.js +273 -0
- package/core/spatial-filter.d.ts +93 -0
- package/core/spatial-filter.d.ts.map +1 -0
- package/core/spatial-filter.js +153 -0
- package/core/stac.d.ts +55 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +229 -0
- package/core/surfaces.d.ts +527 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1917 -0
- package/core/terrain-elevation.d.ts +114 -0
- package/core/terrain-elevation.d.ts.map +1 -0
- package/core/terrain-elevation.js +150 -0
- package/core/types.d.ts +1355 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +143 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +478 -0
- package/core/wfs-filter.d.ts +118 -0
- package/core/wfs-filter.d.ts.map +1 -0
- package/core/wfs-filter.js +634 -0
- package/core/wfs.d.ts +219 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +406 -0
- package/core/wire-shared.d.ts +32 -0
- package/core/wire-shared.d.ts.map +1 -0
- package/core/wire-shared.js +76 -0
- package/core/wms-axis.d.ts +36 -0
- package/core/wms-axis.d.ts.map +1 -0
- package/core/wms-axis.js +73 -0
- package/core/wms-capabilities.d.ts +110 -0
- package/core/wms-capabilities.d.ts.map +1 -0
- package/core/wms-capabilities.js +559 -0
- package/core/wms-types.d.ts +128 -0
- package/core/wms-types.d.ts.map +1 -0
- package/core/wms-types.js +32 -0
- package/core/wms.d.ts +144 -0
- package/core/wms.d.ts.map +1 -0
- package/core/wms.js +338 -0
- package/core/wmts-capabilities.d.ts +82 -0
- package/core/wmts-capabilities.d.ts.map +1 -0
- package/core/wmts-capabilities.js +402 -0
- package/core/wmts.d.ts +103 -0
- package/core/wmts.d.ts.map +1 -0
- package/core/wmts.js +332 -0
- package/core/xml-text.d.ts +20 -0
- package/core/xml-text.d.ts.map +1 -0
- package/core/xml-text.js +85 -0
- package/esri-compat/basemap-gallery.d.ts +38 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -0
- package/esri-compat/basemap-gallery.js +159 -0
- package/esri-compat/basemap-layer-list.d.ts +35 -0
- package/esri-compat/basemap-layer-list.d.ts.map +1 -0
- package/esri-compat/basemap-layer-list.js +139 -0
- package/esri-compat/basemap.d.ts +32 -0
- package/esri-compat/basemap.d.ts.map +1 -0
- package/esri-compat/basemap.js +84 -0
- package/esri-compat/bookmarks.d.ts +36 -0
- package/esri-compat/bookmarks.d.ts.map +1 -0
- package/esri-compat/bookmarks.js +108 -0
- package/esri-compat/class-breaks-renderer.d.ts +50 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
- package/esri-compat/class-breaks-renderer.js +164 -0
- package/esri-compat/color.d.ts +22 -0
- package/esri-compat/color.d.ts.map +1 -0
- package/esri-compat/color.js +106 -0
- package/esri-compat/controls.d.ts +174 -0
- package/esri-compat/controls.d.ts.map +1 -0
- package/esri-compat/controls.js +479 -0
- package/esri-compat/coordinate-conversion.d.ts +41 -0
- package/esri-compat/coordinate-conversion.d.ts.map +1 -0
- package/esri-compat/coordinate-conversion.js +125 -0
- package/esri-compat/directions.d.ts +45 -0
- package/esri-compat/directions.d.ts.map +1 -0
- package/esri-compat/directions.js +123 -0
- package/esri-compat/editor.d.ts +47 -0
- package/esri-compat/editor.d.ts.map +1 -0
- package/esri-compat/editor.js +170 -0
- package/esri-compat/esri-config.d.ts +16 -0
- package/esri-compat/esri-config.d.ts.map +1 -0
- package/esri-compat/esri-config.js +23 -0
- package/esri-compat/esri-request.d.ts +17 -0
- package/esri-compat/esri-request.d.ts.map +1 -0
- package/esri-compat/esri-request.js +127 -0
- package/esri-compat/event-bus.d.ts +106 -0
- package/esri-compat/event-bus.d.ts.map +1 -0
- package/esri-compat/event-bus.js +90 -0
- package/esri-compat/expand.d.ts +36 -0
- package/esri-compat/expand.d.ts.map +1 -0
- package/esri-compat/expand.js +97 -0
- package/esri-compat/extent.d.ts +43 -0
- package/esri-compat/extent.d.ts.map +1 -0
- package/esri-compat/extent.js +140 -0
- package/esri-compat/feature-filter.d.ts +55 -0
- package/esri-compat/feature-filter.d.ts.map +1 -0
- package/esri-compat/feature-filter.js +109 -0
- package/esri-compat/feature-form.d.ts +64 -0
- package/esri-compat/feature-form.d.ts.map +1 -0
- package/esri-compat/feature-form.js +137 -0
- package/esri-compat/feature-layer.d.ts +173 -0
- package/esri-compat/feature-layer.d.ts.map +1 -0
- package/esri-compat/feature-layer.js +661 -0
- package/esri-compat/feature-set.d.ts +32 -0
- package/esri-compat/feature-set.d.ts.map +1 -0
- package/esri-compat/feature-set.js +80 -0
- package/esri-compat/feature-table.d.ts +141 -0
- package/esri-compat/feature-table.d.ts.map +1 -0
- package/esri-compat/feature-table.js +500 -0
- package/esri-compat/feature-templates.d.ts +41 -0
- package/esri-compat/feature-templates.d.ts.map +1 -0
- package/esri-compat/feature-templates.js +97 -0
- package/esri-compat/feature.d.ts +33 -0
- package/esri-compat/feature.d.ts.map +1 -0
- package/esri-compat/feature.js +83 -0
- package/esri-compat/geojson-layer.d.ts +86 -0
- package/esri-compat/geojson-layer.d.ts.map +1 -0
- package/esri-compat/geojson-layer.js +191 -0
- package/esri-compat/geometry-engine.d.ts +107 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -0
- package/esri-compat/geometry-engine.js +266 -0
- package/esri-compat/graphic.d.ts +46 -0
- package/esri-compat/graphic.d.ts.map +1 -0
- package/esri-compat/graphic.js +103 -0
- package/esri-compat/graphics-layer.d.ts +49 -0
- package/esri-compat/graphics-layer.d.ts.map +1 -0
- package/esri-compat/graphics-layer.js +185 -0
- package/esri-compat/group-layer.d.ts +48 -0
- package/esri-compat/group-layer.d.ts.map +1 -0
- package/esri-compat/group-layer.js +212 -0
- package/esri-compat/identify.d.ts +71 -0
- package/esri-compat/identify.d.ts.map +1 -0
- package/esri-compat/identify.js +299 -0
- package/esri-compat/identity-manager.d.ts +31 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +115 -0
- package/esri-compat/imagery-layer.d.ts +78 -0
- package/esri-compat/imagery-layer.d.ts.map +1 -0
- package/esri-compat/imagery-layer.js +167 -0
- package/esri-compat/label-class.d.ts +31 -0
- package/esri-compat/label-class.d.ts.map +1 -0
- package/esri-compat/label-class.js +102 -0
- package/esri-compat/layer-list.d.ts +77 -0
- package/esri-compat/layer-list.d.ts.map +1 -0
- package/esri-compat/layer-list.js +342 -0
- package/esri-compat/legend.d.ts +53 -0
- package/esri-compat/legend.d.ts.map +1 -0
- package/esri-compat/legend.js +254 -0
- package/esri-compat/map-image-layer.d.ts +162 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -0
- package/esri-compat/map-image-layer.js +709 -0
- package/esri-compat/map-view.d.ts +323 -0
- package/esri-compat/map-view.d.ts.map +1 -0
- package/esri-compat/map-view.js +1175 -0
- package/esri-compat/map.d.ts +47 -0
- package/esri-compat/map.d.ts.map +1 -0
- package/esri-compat/map.js +209 -0
- package/esri-compat/measurement-2d.d.ts +61 -0
- package/esri-compat/measurement-2d.d.ts.map +1 -0
- package/esri-compat/measurement-2d.js +184 -0
- package/esri-compat/measurement.d.ts +45 -0
- package/esri-compat/measurement.d.ts.map +1 -0
- package/esri-compat/measurement.js +193 -0
- package/esri-compat/oauth-info.d.ts +35 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +115 -0
- package/esri-compat/picture-marker-symbol.d.ts +35 -0
- package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
- package/esri-compat/picture-marker-symbol.js +126 -0
- package/esri-compat/point.d.ts +31 -0
- package/esri-compat/point.d.ts.map +1 -0
- package/esri-compat/point.js +102 -0
- package/esri-compat/polygon.d.ts +31 -0
- package/esri-compat/polygon.d.ts.map +1 -0
- package/esri-compat/polygon.js +107 -0
- package/esri-compat/polyline.d.ts +31 -0
- package/esri-compat/polyline.d.ts.map +1 -0
- package/esri-compat/polyline.js +107 -0
- package/esri-compat/popup-template.d.ts +55 -0
- package/esri-compat/popup-template.d.ts.map +1 -0
- package/esri-compat/popup-template.js +128 -0
- package/esri-compat/popup.d.ts +54 -0
- package/esri-compat/popup.d.ts.map +1 -0
- package/esri-compat/popup.js +312 -0
- package/esri-compat/print.d.ts +47 -0
- package/esri-compat/print.d.ts.map +1 -0
- package/esri-compat/print.js +105 -0
- package/esri-compat/query.d.ts +58 -0
- package/esri-compat/query.d.ts.map +1 -0
- package/esri-compat/query.js +128 -0
- package/esri-compat/reactive-utils.d.ts +24 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -0
- package/esri-compat/reactive-utils.js +193 -0
- package/esri-compat/request.d.ts +41 -0
- package/esri-compat/request.d.ts.map +1 -0
- package/esri-compat/request.js +253 -0
- package/esri-compat/route-layer.d.ts +59 -0
- package/esri-compat/route-layer.d.ts.map +1 -0
- package/esri-compat/route-layer.js +223 -0
- package/esri-compat/route-task.d.ts +88 -0
- package/esri-compat/route-task.d.ts.map +1 -0
- package/esri-compat/route-task.js +225 -0
- package/esri-compat/scene-view.d.ts +41 -0
- package/esri-compat/scene-view.d.ts.map +1 -0
- package/esri-compat/scene-view.js +68 -0
- package/esri-compat/search.d.ts +112 -0
- package/esri-compat/search.d.ts.map +1 -0
- package/esri-compat/search.js +820 -0
- package/esri-compat/simple-fill-symbol.d.ts +27 -0
- package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
- package/esri-compat/simple-fill-symbol.js +85 -0
- package/esri-compat/simple-line-symbol.d.ts +27 -0
- package/esri-compat/simple-line-symbol.d.ts.map +1 -0
- package/esri-compat/simple-line-symbol.js +85 -0
- package/esri-compat/simple-marker-symbol.d.ts +29 -0
- package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
- package/esri-compat/simple-marker-symbol.js +92 -0
- package/esri-compat/simple-renderer.d.ts +29 -0
- package/esri-compat/simple-renderer.d.ts.map +1 -0
- package/esri-compat/simple-renderer.js +92 -0
- package/esri-compat/sketch.d.ts +64 -0
- package/esri-compat/sketch.d.ts.map +1 -0
- package/esri-compat/sketch.js +227 -0
- package/esri-compat/spatial-reference.d.ts +31 -0
- package/esri-compat/spatial-reference.d.ts.map +1 -0
- package/esri-compat/spatial-reference.js +102 -0
- package/esri-compat/swipe.d.ts +34 -0
- package/esri-compat/swipe.d.ts.map +1 -0
- package/esri-compat/swipe.js +93 -0
- package/esri-compat/table-list.d.ts +36 -0
- package/esri-compat/table-list.d.ts.map +1 -0
- package/esri-compat/table-list.js +126 -0
- package/esri-compat/text-symbol.d.ts +37 -0
- package/esri-compat/text-symbol.d.ts.map +1 -0
- package/esri-compat/text-symbol.js +123 -0
- package/esri-compat/tile-layer.d.ts +52 -0
- package/esri-compat/tile-layer.d.ts.map +1 -0
- package/esri-compat/tile-layer.js +168 -0
- package/esri-compat/time-slider.d.ts +70 -0
- package/esri-compat/time-slider.d.ts.map +1 -0
- package/esri-compat/time-slider.js +208 -0
- package/esri-compat/track.d.ts +51 -0
- package/esri-compat/track.d.ts.map +1 -0
- package/esri-compat/track.js +174 -0
- package/esri-compat/unique-value-renderer.d.ts +41 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -0
- package/esri-compat/unique-value-renderer.js +127 -0
- package/esri-compat/url.d.ts +13 -0
- package/esri-compat/url.d.ts.map +1 -0
- package/esri-compat/url.js +68 -0
- package/esri-compat/vector-tile-layer.d.ts +47 -0
- package/esri-compat/vector-tile-layer.d.ts.map +1 -0
- package/esri-compat/vector-tile-layer.js +130 -0
- package/esri-compat/web-map.d.ts +14 -0
- package/esri-compat/web-map.d.ts.map +1 -0
- package/esri-compat/web-map.js +24 -0
- package/esri-compat/wfs-layer.d.ts +64 -0
- package/esri-compat/wfs-layer.d.ts.map +1 -0
- package/esri-compat/wfs-layer.js +145 -0
- package/esri-compat/wms-layer.d.ts +76 -0
- package/esri-compat/wms-layer.d.ts.map +1 -0
- package/esri-compat/wms-layer.js +157 -0
- package/exploration/context.d.ts +25 -0
- package/exploration/context.d.ts.map +1 -0
- package/exploration/context.js +396 -0
- package/exploration/index.d.ts +27 -0
- package/exploration/index.d.ts.map +1 -0
- package/exploration/index.js +24 -0
- package/exploration/presets.d.ts +27 -0
- package/exploration/presets.d.ts.map +1 -0
- package/exploration/presets.js +114 -0
- package/exploration/reducer.d.ts +23 -0
- package/exploration/reducer.d.ts.map +1 -0
- package/exploration/reducer.js +332 -0
- package/exploration/selection.d.ts +25 -0
- package/exploration/selection.d.ts.map +1 -0
- package/exploration/selection.js +34 -0
- package/exploration/selectors.d.ts +56 -0
- package/exploration/selectors.d.ts.map +1 -0
- package/exploration/selectors.js +110 -0
- package/exploration/types.d.ts +294 -0
- package/exploration/types.d.ts.map +1 -0
- package/exploration/types.js +33 -0
- package/expr/expression.d.ts +457 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +663 -0
- package/expr/index.d.ts +32 -0
- package/expr/index.d.ts.map +1 -0
- package/expr/index.js +30 -0
- package/gen/honua/v1/feature_service_pb.d.ts +918 -0
- package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
- package/gen/honua/v1/feature_service_pb.js +375 -0
- package/generated-app/errors.d.ts +41 -0
- package/generated-app/errors.d.ts.map +1 -0
- package/generated-app/errors.js +41 -0
- package/generated-app/index.d.ts +17 -0
- package/generated-app/index.d.ts.map +1 -0
- package/generated-app/index.js +12 -0
- package/generated-app/manifest.d.ts +183 -0
- package/generated-app/manifest.d.ts.map +1 -0
- package/generated-app/manifest.js +14 -0
- package/generated-app/projection.d.ts +44 -0
- package/generated-app/projection.d.ts.map +1 -0
- package/generated-app/projection.js +234 -0
- package/generated-app/runtime.d.ts +215 -0
- package/generated-app/runtime.d.ts.map +1 -0
- package/generated-app/runtime.js +1196 -0
- package/interactions/detail-model.d.ts +54 -0
- package/interactions/detail-model.d.ts.map +1 -0
- package/interactions/detail-model.js +105 -0
- package/interactions/exploration-bindings.d.ts +120 -0
- package/interactions/exploration-bindings.d.ts.map +1 -0
- package/interactions/exploration-bindings.js +218 -0
- package/interactions/feature-state.d.ts +144 -0
- package/interactions/feature-state.d.ts.map +1 -0
- package/interactions/feature-state.js +169 -0
- package/interactions/hit-test.d.ts +112 -0
- package/interactions/hit-test.d.ts.map +1 -0
- package/interactions/hit-test.js +291 -0
- package/interactions/index.d.ts +31 -0
- package/interactions/index.d.ts.map +1 -0
- package/interactions/index.js +24 -0
- package/interactions/share-state.d.ts +36 -0
- package/interactions/share-state.d.ts.map +1 -0
- package/interactions/share-state.js +123 -0
- package/map/feature-service-adapter.d.ts +138 -0
- package/map/feature-service-adapter.d.ts.map +1 -0
- package/map/feature-service-adapter.js +279 -0
- package/map/honua-map.d.ts +203 -0
- package/map/honua-map.d.ts.map +1 -0
- package/map/honua-map.js +347 -0
- package/map/index.d.ts +27 -0
- package/map/index.d.ts.map +1 -0
- package/map/index.js +22 -0
- package/map/maplibre-target.d.ts +103 -0
- package/map/maplibre-target.d.ts.map +1 -0
- package/map/maplibre-target.js +164 -0
- package/map/webmap-maplibre.d.ts +60 -0
- package/map/webmap-maplibre.d.ts.map +1 -0
- package/map/webmap-maplibre.js +212 -0
- package/package.json +37 -0
- package/react/context.d.ts +32 -0
- package/react/context.d.ts.map +1 -0
- package/react/context.js +19 -0
- package/react/honua-layer.d.ts +35 -0
- package/react/honua-layer.d.ts.map +1 -0
- package/react/honua-layer.js +47 -0
- package/react/honua-map.d.ts +83 -0
- package/react/honua-map.d.ts.map +1 -0
- package/react/honua-map.js +109 -0
- package/react/honua-popup.d.ts +26 -0
- package/react/honua-popup.d.ts.map +1 -0
- package/react/honua-popup.js +34 -0
- package/react/hooks.d.ts +127 -0
- package/react/hooks.d.ts.map +1 -0
- package/react/hooks.js +206 -0
- package/react/index.d.ts +42 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +34 -0
- package/react/provider.d.ts +36 -0
- package/react/provider.d.ts.map +1 -0
- package/react/provider.js +35 -0
- package/react/query-cache.d.ts +76 -0
- package/react/query-cache.d.ts.map +1 -0
- package/react/query-cache.js +188 -0
- package/runtime/diff.d.ts +31 -0
- package/runtime/diff.d.ts.map +1 -0
- package/runtime/diff.js +143 -0
- package/runtime/errors.d.ts +40 -0
- package/runtime/errors.d.ts.map +1 -0
- package/runtime/errors.js +35 -0
- package/runtime/index.d.ts +59 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +43 -0
- package/runtime/legend.d.ts +23 -0
- package/runtime/legend.d.ts.map +1 -0
- package/runtime/legend.js +38 -0
- package/runtime/load-package.d.ts +125 -0
- package/runtime/load-package.d.ts.map +1 -0
- package/runtime/load-package.js +264 -0
- package/runtime/map-package-fetch.d.ts +107 -0
- package/runtime/map-package-fetch.d.ts.map +1 -0
- package/runtime/map-package-fetch.js +336 -0
- package/runtime/map-package-realtime.d.ts +169 -0
- package/runtime/map-package-realtime.d.ts.map +1 -0
- package/runtime/map-package-realtime.js +350 -0
- package/runtime/map-package-validation.d.ts +43 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +269 -0
- package/runtime/map-package-watch.d.ts +78 -0
- package/runtime/map-package-watch.d.ts.map +1 -0
- package/runtime/map-package-watch.js +695 -0
- package/runtime/map-package.d.ts +167 -0
- package/runtime/map-package.d.ts.map +1 -0
- package/runtime/map-package.js +15 -0
- package/runtime/ogc-styles.d.ts +110 -0
- package/runtime/ogc-styles.d.ts.map +1 -0
- package/runtime/ogc-styles.js +195 -0
- package/runtime/popups.d.ts +62 -0
- package/runtime/popups.d.ts.map +1 -0
- package/runtime/popups.js +95 -0
- package/runtime/query-tiles.d.ts +217 -0
- package/runtime/query-tiles.d.ts.map +1 -0
- package/runtime/query-tiles.js +801 -0
- package/runtime/runtime.d.ts +243 -0
- package/runtime/runtime.d.ts.map +1 -0
- package/runtime/runtime.js +1147 -0
- package/runtime/source-bridge.d.ts +99 -0
- package/runtime/source-bridge.d.ts.map +1 -0
- package/runtime/source-bridge.js +401 -0
- package/runtime/style-compose.d.ts +46 -0
- package/runtime/style-compose.d.ts.map +1 -0
- package/runtime/style-compose.js +144 -0
- package/runtime/style-interactions.d.ts +141 -0
- package/runtime/style-interactions.d.ts.map +1 -0
- package/runtime/style-interactions.js +574 -0
- package/runtime/style-spec-validation.d.ts +23 -0
- package/runtime/style-spec-validation.d.ts.map +1 -0
- package/runtime/style-spec-validation.js +357 -0
- package/studio/capability-manifest.d.ts +285 -0
- package/studio/capability-manifest.d.ts.map +1 -0
- package/studio/capability-manifest.js +59 -0
- package/studio/chart-spec.d.ts +85 -0
- package/studio/chart-spec.d.ts.map +1 -0
- package/studio/chart-spec.js +106 -0
- package/studio/index.d.ts +34 -0
- package/studio/index.d.ts.map +1 -0
- package/studio/index.js +27 -0
- package/studio/provenance.d.ts +131 -0
- package/studio/provenance.d.ts.map +1 -0
- package/studio/provenance.js +39 -0
- package/studio/publish.d.ts +64 -0
- package/studio/publish.d.ts.map +1 -0
- package/studio/publish.js +13 -0
- package/studio/types.d.ts +278 -0
- package/studio/types.d.ts.map +1 -0
- package/studio/types.js +71 -0
- package/studio/validate.d.ts +45 -0
- package/studio/validate.d.ts.map +1 -0
- package/studio/validate.js +255 -0
- package/studio/validation.d.ts +112 -0
- package/studio/validation.d.ts.map +1 -0
- package/studio/validation.js +42 -0
- package/style/factory.d.ts +30 -0
- package/style/factory.d.ts.map +1 -0
- package/style/factory.js +61 -0
- package/style/index.d.ts +25 -0
- package/style/index.d.ts.map +1 -0
- package/style/index.js +24 -0
- package/style/specification.d.ts +203 -0
- package/style/specification.d.ts.map +1 -0
- package/style/specification.js +178 -0
- package/style/wms-wmts-resolvers.d.ts +38 -0
- package/style/wms-wmts-resolvers.d.ts.map +1 -0
- package/style/wms-wmts-resolvers.js +92 -0
- package/webmap/contract.d.ts +28 -0
- package/webmap/contract.d.ts.map +1 -0
- package/webmap/contract.js +130 -0
- package/webmap/convert-basemap.d.ts +17 -0
- package/webmap/convert-basemap.d.ts.map +1 -0
- package/webmap/convert-basemap.js +78 -0
- package/webmap/convert-extent.d.ts +17 -0
- package/webmap/convert-extent.d.ts.map +1 -0
- package/webmap/convert-extent.js +114 -0
- package/webmap/convert-label.d.ts +13 -0
- package/webmap/convert-label.d.ts.map +1 -0
- package/webmap/convert-label.js +125 -0
- package/webmap/convert-layer.d.ts +22 -0
- package/webmap/convert-layer.d.ts.map +1 -0
- package/webmap/convert-layer.js +181 -0
- package/webmap/convert-popup.d.ts +34 -0
- package/webmap/convert-popup.d.ts.map +1 -0
- package/webmap/convert-popup.js +68 -0
- package/webmap/convert-renderer.d.ts +17 -0
- package/webmap/convert-renderer.d.ts.map +1 -0
- package/webmap/convert-renderer.js +161 -0
- package/webmap/convert-symbol.d.ts +17 -0
- package/webmap/convert-symbol.d.ts.map +1 -0
- package/webmap/convert-symbol.js +122 -0
- package/webmap/index.d.ts +44 -0
- package/webmap/index.d.ts.map +1 -0
- package/webmap/index.js +33 -0
- package/webmap/parse.d.ts +25 -0
- package/webmap/parse.d.ts.map +1 -0
- package/webmap/parse.js +83 -0
- package/webmap/types.d.ts +264 -0
- package/webmap/types.d.ts.map +1 -0
- package/webmap/types.js +13 -0
- package/webmap/warnings.d.ts +30 -0
- package/webmap/warnings.d.ts.map +1 -0
- package/webmap/warnings.js +37 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { CompatEventBus, resolveCompatEventBus, safeInvokeCompatListener, } from "./event-bus.js";
|
|
2
|
+
export class BasemapLayerListCompat {
|
|
3
|
+
view;
|
|
4
|
+
map;
|
|
5
|
+
container;
|
|
6
|
+
eventBus;
|
|
7
|
+
autoRefresh;
|
|
8
|
+
loaded;
|
|
9
|
+
loadStatus;
|
|
10
|
+
basemap;
|
|
11
|
+
baseLayers;
|
|
12
|
+
referenceLayers;
|
|
13
|
+
subscriptions;
|
|
14
|
+
watchListeners;
|
|
15
|
+
constructor(options = {}) {
|
|
16
|
+
this.view = options.view;
|
|
17
|
+
this.map = options.map ?? extractViewMap(options.view);
|
|
18
|
+
this.container = options.container;
|
|
19
|
+
this.eventBus = options.eventBus ?? resolveCompatEventBus(options.view, options.map) ?? new CompatEventBus();
|
|
20
|
+
this.autoRefresh = options.autoRefresh ?? true;
|
|
21
|
+
this.loaded = false;
|
|
22
|
+
this.loadStatus = "not-loaded";
|
|
23
|
+
this.basemap = undefined;
|
|
24
|
+
this.baseLayers = [];
|
|
25
|
+
this.referenceLayers = [];
|
|
26
|
+
this.subscriptions = [];
|
|
27
|
+
this.watchListeners = new Map();
|
|
28
|
+
this.refresh();
|
|
29
|
+
if (this.autoRefresh) {
|
|
30
|
+
this.subscriptions.push(this.eventBus.on("map.basemap-changed", () => this.refresh()));
|
|
31
|
+
this.subscriptions.push(this.eventBus.on("basemap.toggle", () => this.refresh()));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async load() {
|
|
35
|
+
if (this.loaded) {
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
this.loadStatus = "loading";
|
|
39
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
40
|
+
this.eventBus.emit("basemap-layer-list.loading", undefined, this);
|
|
41
|
+
this.refresh();
|
|
42
|
+
this.loaded = true;
|
|
43
|
+
this.notifyWatchers("loaded", this.loaded);
|
|
44
|
+
this.loadStatus = "loaded";
|
|
45
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
46
|
+
this.eventBus.emit("basemap-layer-list.loaded", undefined, this);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
async when(callback) {
|
|
50
|
+
const widget = await this.load();
|
|
51
|
+
if (callback) {
|
|
52
|
+
callback(widget);
|
|
53
|
+
}
|
|
54
|
+
return widget;
|
|
55
|
+
}
|
|
56
|
+
watch(propertyName, listener) {
|
|
57
|
+
let listeners = this.watchListeners.get(propertyName);
|
|
58
|
+
if (!listeners) {
|
|
59
|
+
listeners = new Set();
|
|
60
|
+
this.watchListeners.set(propertyName, listeners);
|
|
61
|
+
}
|
|
62
|
+
listeners.add(listener);
|
|
63
|
+
return {
|
|
64
|
+
remove: () => {
|
|
65
|
+
listeners?.delete(listener);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
refresh() {
|
|
70
|
+
const basemap = extractMapBasemap(this.map);
|
|
71
|
+
this.basemap = basemap;
|
|
72
|
+
this.notifyWatchers("basemap", this.basemap);
|
|
73
|
+
this.baseLayers = extractBasemapLayerCollection(basemap, "baseLayers");
|
|
74
|
+
this.notifyWatchers("baseLayers", this.baseLayers);
|
|
75
|
+
this.referenceLayers = extractBasemapLayerCollection(basemap, "referenceLayers");
|
|
76
|
+
this.notifyWatchers("referenceLayers", this.referenceLayers);
|
|
77
|
+
this.eventBus.emit("basemap-layer-list.refreshed", {
|
|
78
|
+
basemap: this.basemap,
|
|
79
|
+
baseLayerCount: this.baseLayers.length,
|
|
80
|
+
referenceLayerCount: this.referenceLayers.length,
|
|
81
|
+
}, this);
|
|
82
|
+
return [...this.baseLayers, ...this.referenceLayers];
|
|
83
|
+
}
|
|
84
|
+
setBasemap(basemap) {
|
|
85
|
+
setMapBasemap(this.map, basemap, this.eventBus, this);
|
|
86
|
+
this.refresh();
|
|
87
|
+
}
|
|
88
|
+
destroy() {
|
|
89
|
+
for (const subscription of this.subscriptions.splice(0)) {
|
|
90
|
+
subscription.remove();
|
|
91
|
+
}
|
|
92
|
+
this.watchListeners.clear();
|
|
93
|
+
}
|
|
94
|
+
notifyWatchers(propertyName, value) {
|
|
95
|
+
const listeners = this.watchListeners.get(propertyName);
|
|
96
|
+
if (!listeners) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
for (const listener of listeners) {
|
|
100
|
+
safeInvokeCompatListener(listener, value);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function setMapBasemap(map, basemap, eventBus, source) {
|
|
105
|
+
if (!isRecord(map)) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (isMapBasemapSetter(map)) {
|
|
109
|
+
map.setBasemap(basemap);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
map.basemap = basemap;
|
|
113
|
+
eventBus.emit("map.basemap-changed", { basemap }, source);
|
|
114
|
+
}
|
|
115
|
+
function extractMapBasemap(map) {
|
|
116
|
+
if (!isRecord(map)) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
return map.basemap;
|
|
120
|
+
}
|
|
121
|
+
function extractBasemapLayerCollection(basemap, key) {
|
|
122
|
+
if (!isRecord(basemap)) {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
const value = basemap[key];
|
|
126
|
+
return Array.isArray(value) ? [...value] : [];
|
|
127
|
+
}
|
|
128
|
+
function extractViewMap(view) {
|
|
129
|
+
if (!isRecord(view)) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
return view.map;
|
|
133
|
+
}
|
|
134
|
+
function isMapBasemapSetter(value) {
|
|
135
|
+
return isRecord(value) && typeof value.setBasemap === "function";
|
|
136
|
+
}
|
|
137
|
+
function isRecord(value) {
|
|
138
|
+
return typeof value === "object" && value !== null;
|
|
139
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CompatEventBus } from "./event-bus.js";
|
|
2
|
+
export interface BasemapCompatOptions {
|
|
3
|
+
id?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
baseLayers?: readonly unknown[];
|
|
6
|
+
referenceLayers?: readonly unknown[];
|
|
7
|
+
eventBus?: CompatEventBus;
|
|
8
|
+
}
|
|
9
|
+
export type BasemapLoadStatusCompat = "not-loaded" | "loading" | "loaded";
|
|
10
|
+
export interface BasemapHandleCompat {
|
|
11
|
+
remove(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare class BasemapCompat {
|
|
14
|
+
readonly eventBus: CompatEventBus;
|
|
15
|
+
id: string | undefined;
|
|
16
|
+
title: string | undefined;
|
|
17
|
+
baseLayers: unknown[];
|
|
18
|
+
referenceLayers: unknown[];
|
|
19
|
+
loaded: boolean;
|
|
20
|
+
loadStatus: BasemapLoadStatusCompat;
|
|
21
|
+
private readonly watchListeners;
|
|
22
|
+
constructor(options?: BasemapCompatOptions);
|
|
23
|
+
static fromId(id: string): BasemapCompat;
|
|
24
|
+
setBaseLayers(layers: readonly unknown[]): void;
|
|
25
|
+
setReferenceLayers(layers: readonly unknown[]): void;
|
|
26
|
+
load(): Promise<BasemapCompat>;
|
|
27
|
+
when(callback?: (basemap: BasemapCompat) => void): Promise<BasemapCompat>;
|
|
28
|
+
watch(propertyName: string, listener: (value: unknown) => void): BasemapHandleCompat;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
private notifyWatchers;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=basemap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basemap.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/basemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmD,MAAM,gBAAgB,CAAC;AAEjG,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACrC,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IAClC,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,qBAAa,aAAa;IACxB,SAAgB,QAAQ,EAAE,cAAc,CAAC;IAClC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,uBAAuB,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;gBAEzD,OAAO,GAAE,oBAAyB;WAYvC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa;IAOxC,aAAa,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAM/C,kBAAkB,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAM9C,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC;IAgB9B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC;IAQ/E,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,mBAAmB;IAepF,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CompatEventBus, resolveCompatEventBus, safeInvokeCompatListener } from "./event-bus.js";
|
|
2
|
+
export class BasemapCompat {
|
|
3
|
+
eventBus;
|
|
4
|
+
id;
|
|
5
|
+
title;
|
|
6
|
+
baseLayers;
|
|
7
|
+
referenceLayers;
|
|
8
|
+
loaded;
|
|
9
|
+
loadStatus;
|
|
10
|
+
watchListeners;
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.eventBus =
|
|
13
|
+
options.eventBus ?? resolveCompatEventBus(options.baseLayers, options.referenceLayers) ?? new CompatEventBus();
|
|
14
|
+
this.id = options.id;
|
|
15
|
+
this.title = options.title ?? options.id;
|
|
16
|
+
this.baseLayers = options.baseLayers ? [...options.baseLayers] : [];
|
|
17
|
+
this.referenceLayers = options.referenceLayers ? [...options.referenceLayers] : [];
|
|
18
|
+
this.loaded = false;
|
|
19
|
+
this.loadStatus = "not-loaded";
|
|
20
|
+
this.watchListeners = new Map();
|
|
21
|
+
}
|
|
22
|
+
static fromId(id) {
|
|
23
|
+
return new BasemapCompat({
|
|
24
|
+
id,
|
|
25
|
+
title: id,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
setBaseLayers(layers) {
|
|
29
|
+
this.baseLayers = [...layers];
|
|
30
|
+
this.notifyWatchers("baseLayers", this.baseLayers);
|
|
31
|
+
this.eventBus.emit("basemap.base-layers-changed", { count: this.baseLayers.length }, this);
|
|
32
|
+
}
|
|
33
|
+
setReferenceLayers(layers) {
|
|
34
|
+
this.referenceLayers = [...layers];
|
|
35
|
+
this.notifyWatchers("referenceLayers", this.referenceLayers);
|
|
36
|
+
this.eventBus.emit("basemap.reference-layers-changed", { count: this.referenceLayers.length }, this);
|
|
37
|
+
}
|
|
38
|
+
async load() {
|
|
39
|
+
if (this.loaded) {
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
this.loadStatus = "loading";
|
|
43
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
44
|
+
this.eventBus.emit("basemap.loading", { id: this.id }, this);
|
|
45
|
+
this.loaded = true;
|
|
46
|
+
this.notifyWatchers("loaded", this.loaded);
|
|
47
|
+
this.loadStatus = "loaded";
|
|
48
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
49
|
+
this.eventBus.emit("basemap.loaded", { id: this.id }, this);
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
async when(callback) {
|
|
53
|
+
const basemap = await this.load();
|
|
54
|
+
if (callback) {
|
|
55
|
+
callback(basemap);
|
|
56
|
+
}
|
|
57
|
+
return basemap;
|
|
58
|
+
}
|
|
59
|
+
watch(propertyName, listener) {
|
|
60
|
+
let listeners = this.watchListeners.get(propertyName);
|
|
61
|
+
if (!listeners) {
|
|
62
|
+
listeners = new Set();
|
|
63
|
+
this.watchListeners.set(propertyName, listeners);
|
|
64
|
+
}
|
|
65
|
+
listeners.add(listener);
|
|
66
|
+
return {
|
|
67
|
+
remove: () => {
|
|
68
|
+
listeners?.delete(listener);
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
destroy() {
|
|
73
|
+
this.watchListeners.clear();
|
|
74
|
+
}
|
|
75
|
+
notifyWatchers(propertyName, value) {
|
|
76
|
+
const listeners = this.watchListeners.get(propertyName);
|
|
77
|
+
if (!listeners) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
for (const listener of listeners) {
|
|
81
|
+
safeInvokeCompatListener(listener, value);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CompatEventBus } from "./event-bus.js";
|
|
2
|
+
export interface BookmarkCompatItem {
|
|
3
|
+
name: string;
|
|
4
|
+
viewpoint?: unknown;
|
|
5
|
+
target?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface BookmarksCompatOptions {
|
|
8
|
+
view?: unknown;
|
|
9
|
+
container?: unknown;
|
|
10
|
+
bookmarks?: readonly BookmarkCompatItem[];
|
|
11
|
+
eventBus?: CompatEventBus;
|
|
12
|
+
}
|
|
13
|
+
export type BookmarksLoadStatusCompat = "not-loaded" | "loading" | "loaded";
|
|
14
|
+
export interface BookmarksHandleCompat {
|
|
15
|
+
remove(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class BookmarksCompat {
|
|
18
|
+
readonly view: unknown;
|
|
19
|
+
readonly container: unknown;
|
|
20
|
+
readonly eventBus: CompatEventBus;
|
|
21
|
+
loaded: boolean;
|
|
22
|
+
loadStatus: BookmarksLoadStatusCompat;
|
|
23
|
+
bookmarks: BookmarkCompatItem[];
|
|
24
|
+
activeBookmark: BookmarkCompatItem | undefined;
|
|
25
|
+
private readonly watchListeners;
|
|
26
|
+
constructor(options?: BookmarksCompatOptions);
|
|
27
|
+
load(): Promise<BookmarksCompat>;
|
|
28
|
+
when(callback?: (widget: BookmarksCompat) => void): Promise<BookmarksCompat>;
|
|
29
|
+
watch(propertyName: string, listener: (value: unknown) => void): BookmarksHandleCompat;
|
|
30
|
+
add(bookmark: BookmarkCompatItem): void;
|
|
31
|
+
remove(nameOrBookmark: string | BookmarkCompatItem): boolean;
|
|
32
|
+
goTo(nameOrBookmark: string | BookmarkCompatItem): Promise<BookmarkCompatItem | undefined>;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
private notifyWatchers;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=bookmarks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/bookmarks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmD,MAAM,gBAAgB,CAAC;AAEjG,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,qBAAa,eAAe;IAC1B,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,SAAgB,QAAQ,EAAE,cAAc,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,yBAAyB,CAAC;IACtC,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,cAAc,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;gBAEzD,OAAO,GAAE,sBAA2B;IAW1C,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC;IAgBhC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC;IAQlF,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,qBAAqB;IAetF,GAAG,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;IAMvC,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,kBAAkB,GAAG,OAAO;IAmBtD,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAiBhG,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { CompatEventBus, resolveCompatEventBus, safeInvokeCompatListener } from "./event-bus.js";
|
|
2
|
+
export class BookmarksCompat {
|
|
3
|
+
view;
|
|
4
|
+
container;
|
|
5
|
+
eventBus;
|
|
6
|
+
loaded;
|
|
7
|
+
loadStatus;
|
|
8
|
+
bookmarks;
|
|
9
|
+
activeBookmark;
|
|
10
|
+
watchListeners;
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.view = options.view;
|
|
13
|
+
this.container = options.container;
|
|
14
|
+
this.eventBus = options.eventBus ?? resolveCompatEventBus(options.view) ?? new CompatEventBus();
|
|
15
|
+
this.loaded = false;
|
|
16
|
+
this.loadStatus = "not-loaded";
|
|
17
|
+
this.bookmarks = options.bookmarks ? [...options.bookmarks] : [];
|
|
18
|
+
this.activeBookmark = undefined;
|
|
19
|
+
this.watchListeners = new Map();
|
|
20
|
+
}
|
|
21
|
+
async load() {
|
|
22
|
+
if (this.loaded) {
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
this.loadStatus = "loading";
|
|
26
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
27
|
+
this.eventBus.emit("bookmarks.loading", undefined, this);
|
|
28
|
+
this.loaded = true;
|
|
29
|
+
this.notifyWatchers("loaded", this.loaded);
|
|
30
|
+
this.loadStatus = "loaded";
|
|
31
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
32
|
+
this.eventBus.emit("bookmarks.loaded", { bookmarkCount: this.bookmarks.length }, this);
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
async when(callback) {
|
|
36
|
+
const widget = await this.load();
|
|
37
|
+
if (callback) {
|
|
38
|
+
callback(widget);
|
|
39
|
+
}
|
|
40
|
+
return widget;
|
|
41
|
+
}
|
|
42
|
+
watch(propertyName, listener) {
|
|
43
|
+
let listeners = this.watchListeners.get(propertyName);
|
|
44
|
+
if (!listeners) {
|
|
45
|
+
listeners = new Set();
|
|
46
|
+
this.watchListeners.set(propertyName, listeners);
|
|
47
|
+
}
|
|
48
|
+
listeners.add(listener);
|
|
49
|
+
return {
|
|
50
|
+
remove: () => {
|
|
51
|
+
listeners?.delete(listener);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
add(bookmark) {
|
|
56
|
+
this.bookmarks.push(bookmark);
|
|
57
|
+
this.notifyWatchers("bookmarks", this.bookmarks);
|
|
58
|
+
this.eventBus.emit("bookmarks.updated", { bookmarkCount: this.bookmarks.length }, this);
|
|
59
|
+
}
|
|
60
|
+
remove(nameOrBookmark) {
|
|
61
|
+
const index = typeof nameOrBookmark === "string"
|
|
62
|
+
? this.bookmarks.findIndex((bookmark) => bookmark.name === nameOrBookmark)
|
|
63
|
+
: this.bookmarks.indexOf(nameOrBookmark);
|
|
64
|
+
if (index < 0) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const [removed] = this.bookmarks.splice(index, 1);
|
|
68
|
+
this.notifyWatchers("bookmarks", this.bookmarks);
|
|
69
|
+
if (this.activeBookmark === removed) {
|
|
70
|
+
this.activeBookmark = undefined;
|
|
71
|
+
this.notifyWatchers("activeBookmark", this.activeBookmark);
|
|
72
|
+
}
|
|
73
|
+
this.eventBus.emit("bookmarks.updated", { bookmarkCount: this.bookmarks.length }, this);
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
async goTo(nameOrBookmark) {
|
|
77
|
+
const bookmark = typeof nameOrBookmark === "string" ? this.bookmarks.find((item) => item.name === nameOrBookmark) : nameOrBookmark;
|
|
78
|
+
if (!bookmark) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
this.activeBookmark = bookmark;
|
|
82
|
+
this.notifyWatchers("activeBookmark", this.activeBookmark);
|
|
83
|
+
const target = bookmark.viewpoint ?? bookmark.target;
|
|
84
|
+
if (target !== undefined && isGoToProvider(this.view)) {
|
|
85
|
+
await this.view.goTo(target);
|
|
86
|
+
}
|
|
87
|
+
this.eventBus.emit("bookmarks.go-to", { bookmark }, this);
|
|
88
|
+
return bookmark;
|
|
89
|
+
}
|
|
90
|
+
destroy() {
|
|
91
|
+
this.watchListeners.clear();
|
|
92
|
+
}
|
|
93
|
+
notifyWatchers(propertyName, value) {
|
|
94
|
+
const listeners = this.watchListeners.get(propertyName);
|
|
95
|
+
if (!listeners) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
for (const listener of listeners) {
|
|
99
|
+
safeInvokeCompatListener(listener, value);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function isGoToProvider(value) {
|
|
104
|
+
return isRecord(value) && typeof value.goTo === "function";
|
|
105
|
+
}
|
|
106
|
+
function isRecord(value) {
|
|
107
|
+
return typeof value === "object" && value !== null;
|
|
108
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ClassBreakInfoCompat {
|
|
2
|
+
maxValue: number;
|
|
3
|
+
minValue?: number;
|
|
4
|
+
symbol?: unknown;
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ClassBreaksRendererCompatOptions {
|
|
9
|
+
field?: string;
|
|
10
|
+
normalizationField?: string;
|
|
11
|
+
normalizationTotal?: number;
|
|
12
|
+
minValue?: number;
|
|
13
|
+
defaultSymbol?: unknown;
|
|
14
|
+
defaultLabel?: string;
|
|
15
|
+
legendOptions?: unknown;
|
|
16
|
+
valueExpression?: string;
|
|
17
|
+
valueExpressionTitle?: string;
|
|
18
|
+
classBreakInfos?: ClassBreakInfoCompat[];
|
|
19
|
+
}
|
|
20
|
+
export type ClassBreaksRendererLoadStatusCompat = "not-loaded" | "loading" | "loaded";
|
|
21
|
+
export interface ClassBreaksRendererHandleCompat {
|
|
22
|
+
remove(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class ClassBreaksRendererCompat {
|
|
25
|
+
loaded: boolean;
|
|
26
|
+
loadStatus: ClassBreaksRendererLoadStatusCompat;
|
|
27
|
+
field: string | undefined;
|
|
28
|
+
normalizationField: string | undefined;
|
|
29
|
+
normalizationTotal: number | undefined;
|
|
30
|
+
minValue: number | undefined;
|
|
31
|
+
defaultSymbol: unknown;
|
|
32
|
+
defaultLabel: string | undefined;
|
|
33
|
+
legendOptions: unknown;
|
|
34
|
+
valueExpression: string | undefined;
|
|
35
|
+
valueExpressionTitle: string | undefined;
|
|
36
|
+
classBreakInfos: ClassBreakInfoCompat[];
|
|
37
|
+
private readonly watchListeners;
|
|
38
|
+
constructor(options?: ClassBreaksRendererCompatOptions);
|
|
39
|
+
load(): Promise<ClassBreaksRendererCompat>;
|
|
40
|
+
when(callback?: (renderer: ClassBreaksRendererCompat) => void): Promise<ClassBreaksRendererCompat>;
|
|
41
|
+
watch(propertyName: string, listener: (value: unknown) => void): ClassBreaksRendererHandleCompat;
|
|
42
|
+
update(options: ClassBreaksRendererCompatOptions): void;
|
|
43
|
+
addClassBreakInfo(info: ClassBreakInfoCompat): void;
|
|
44
|
+
removeClassBreakInfo(maxValue: number): boolean;
|
|
45
|
+
clone(): ClassBreaksRendererCompat;
|
|
46
|
+
toJSON(): ClassBreaksRendererCompatOptions;
|
|
47
|
+
destroy(): void;
|
|
48
|
+
private notifyWatchers;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=class-breaks-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-breaks-renderer.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/class-breaks-renderer.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC1C;AAED,MAAM,MAAM,mCAAmC,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtF,MAAM,WAAW,+BAA+B;IAC9C,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,qBAAa,yBAAyB;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,mCAAmC,CAAC;IAChD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,eAAe,EAAE,oBAAoB,EAAE,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;gBAEzD,OAAO,GAAE,gCAAqC;IAoBpD,IAAI,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAc1C,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAQxG,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,+BAA+B;IAehG,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,IAAI;IA+CvD,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAKnD,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAW/C,KAAK,IAAI,yBAAyB;IAIlC,MAAM,IAAI,gCAAgC;IAe1C,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { safeInvokeCompatListener } from "./event-bus.js";
|
|
2
|
+
export class ClassBreaksRendererCompat {
|
|
3
|
+
loaded;
|
|
4
|
+
loadStatus;
|
|
5
|
+
field;
|
|
6
|
+
normalizationField;
|
|
7
|
+
normalizationTotal;
|
|
8
|
+
minValue;
|
|
9
|
+
defaultSymbol;
|
|
10
|
+
defaultLabel;
|
|
11
|
+
legendOptions;
|
|
12
|
+
valueExpression;
|
|
13
|
+
valueExpressionTitle;
|
|
14
|
+
classBreakInfos;
|
|
15
|
+
watchListeners;
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
this.loaded = false;
|
|
18
|
+
this.loadStatus = "not-loaded";
|
|
19
|
+
this.field = options.field;
|
|
20
|
+
this.normalizationField = options.normalizationField;
|
|
21
|
+
this.normalizationTotal =
|
|
22
|
+
typeof options.normalizationTotal === "number" && Number.isFinite(options.normalizationTotal)
|
|
23
|
+
? options.normalizationTotal
|
|
24
|
+
: undefined;
|
|
25
|
+
this.minValue =
|
|
26
|
+
typeof options.minValue === "number" && Number.isFinite(options.minValue) ? options.minValue : undefined;
|
|
27
|
+
this.defaultSymbol = options.defaultSymbol;
|
|
28
|
+
this.defaultLabel = options.defaultLabel;
|
|
29
|
+
this.legendOptions = options.legendOptions;
|
|
30
|
+
this.valueExpression = options.valueExpression;
|
|
31
|
+
this.valueExpressionTitle = options.valueExpressionTitle;
|
|
32
|
+
this.classBreakInfos = options.classBreakInfos ? options.classBreakInfos.map(cloneClassBreakInfo) : [];
|
|
33
|
+
this.watchListeners = new Map();
|
|
34
|
+
}
|
|
35
|
+
async load() {
|
|
36
|
+
if (this.loaded) {
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
this.loadStatus = "loading";
|
|
40
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
41
|
+
this.loaded = true;
|
|
42
|
+
this.notifyWatchers("loaded", this.loaded);
|
|
43
|
+
this.loadStatus = "loaded";
|
|
44
|
+
this.notifyWatchers("loadStatus", this.loadStatus);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
async when(callback) {
|
|
48
|
+
const renderer = await this.load();
|
|
49
|
+
if (callback) {
|
|
50
|
+
callback(renderer);
|
|
51
|
+
}
|
|
52
|
+
return renderer;
|
|
53
|
+
}
|
|
54
|
+
watch(propertyName, listener) {
|
|
55
|
+
let listeners = this.watchListeners.get(propertyName);
|
|
56
|
+
if (!listeners) {
|
|
57
|
+
listeners = new Set();
|
|
58
|
+
this.watchListeners.set(propertyName, listeners);
|
|
59
|
+
}
|
|
60
|
+
listeners.add(listener);
|
|
61
|
+
return {
|
|
62
|
+
remove: () => {
|
|
63
|
+
listeners?.delete(listener);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
update(options) {
|
|
68
|
+
if (options.field !== undefined) {
|
|
69
|
+
this.field = options.field;
|
|
70
|
+
this.notifyWatchers("field", this.field);
|
|
71
|
+
}
|
|
72
|
+
if (options.normalizationField !== undefined) {
|
|
73
|
+
this.normalizationField = options.normalizationField;
|
|
74
|
+
this.notifyWatchers("normalizationField", this.normalizationField);
|
|
75
|
+
}
|
|
76
|
+
if (options.normalizationTotal !== undefined) {
|
|
77
|
+
this.normalizationTotal =
|
|
78
|
+
typeof options.normalizationTotal === "number" && Number.isFinite(options.normalizationTotal)
|
|
79
|
+
? options.normalizationTotal
|
|
80
|
+
: undefined;
|
|
81
|
+
this.notifyWatchers("normalizationTotal", this.normalizationTotal);
|
|
82
|
+
}
|
|
83
|
+
if (options.minValue !== undefined) {
|
|
84
|
+
this.minValue =
|
|
85
|
+
typeof options.minValue === "number" && Number.isFinite(options.minValue) ? options.minValue : undefined;
|
|
86
|
+
this.notifyWatchers("minValue", this.minValue);
|
|
87
|
+
}
|
|
88
|
+
if (options.defaultSymbol !== undefined) {
|
|
89
|
+
this.defaultSymbol = options.defaultSymbol;
|
|
90
|
+
this.notifyWatchers("defaultSymbol", this.defaultSymbol);
|
|
91
|
+
}
|
|
92
|
+
if (options.defaultLabel !== undefined) {
|
|
93
|
+
this.defaultLabel = options.defaultLabel;
|
|
94
|
+
this.notifyWatchers("defaultLabel", this.defaultLabel);
|
|
95
|
+
}
|
|
96
|
+
if (options.legendOptions !== undefined) {
|
|
97
|
+
this.legendOptions = options.legendOptions;
|
|
98
|
+
this.notifyWatchers("legendOptions", this.legendOptions);
|
|
99
|
+
}
|
|
100
|
+
if (options.valueExpression !== undefined) {
|
|
101
|
+
this.valueExpression = options.valueExpression;
|
|
102
|
+
this.notifyWatchers("valueExpression", this.valueExpression);
|
|
103
|
+
}
|
|
104
|
+
if (options.valueExpressionTitle !== undefined) {
|
|
105
|
+
this.valueExpressionTitle = options.valueExpressionTitle;
|
|
106
|
+
this.notifyWatchers("valueExpressionTitle", this.valueExpressionTitle);
|
|
107
|
+
}
|
|
108
|
+
if (options.classBreakInfos !== undefined) {
|
|
109
|
+
this.classBreakInfos = options.classBreakInfos.map(cloneClassBreakInfo);
|
|
110
|
+
this.notifyWatchers("classBreakInfos", this.classBreakInfos);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
addClassBreakInfo(info) {
|
|
114
|
+
this.classBreakInfos.push(cloneClassBreakInfo(info));
|
|
115
|
+
this.notifyWatchers("classBreakInfos", this.classBreakInfos);
|
|
116
|
+
}
|
|
117
|
+
removeClassBreakInfo(maxValue) {
|
|
118
|
+
const index = this.classBreakInfos.findIndex((item) => item.maxValue === maxValue);
|
|
119
|
+
if (index < 0) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
this.classBreakInfos.splice(index, 1);
|
|
123
|
+
this.notifyWatchers("classBreakInfos", this.classBreakInfos);
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
clone() {
|
|
127
|
+
return new ClassBreaksRendererCompat(this.toJSON());
|
|
128
|
+
}
|
|
129
|
+
toJSON() {
|
|
130
|
+
return {
|
|
131
|
+
field: this.field,
|
|
132
|
+
normalizationField: this.normalizationField,
|
|
133
|
+
normalizationTotal: this.normalizationTotal,
|
|
134
|
+
minValue: this.minValue,
|
|
135
|
+
defaultSymbol: this.defaultSymbol,
|
|
136
|
+
defaultLabel: this.defaultLabel,
|
|
137
|
+
legendOptions: this.legendOptions,
|
|
138
|
+
valueExpression: this.valueExpression,
|
|
139
|
+
valueExpressionTitle: this.valueExpressionTitle,
|
|
140
|
+
classBreakInfos: this.classBreakInfos.map(cloneClassBreakInfo),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
destroy() {
|
|
144
|
+
this.watchListeners.clear();
|
|
145
|
+
}
|
|
146
|
+
notifyWatchers(propertyName, value) {
|
|
147
|
+
const listeners = this.watchListeners.get(propertyName);
|
|
148
|
+
if (!listeners) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
for (const listener of listeners) {
|
|
152
|
+
safeInvokeCompatListener(listener, value);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function cloneClassBreakInfo(info) {
|
|
157
|
+
return {
|
|
158
|
+
maxValue: info.maxValue,
|
|
159
|
+
minValue: info.minValue,
|
|
160
|
+
symbol: info.symbol,
|
|
161
|
+
label: info.label,
|
|
162
|
+
description: info.description,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ColorCompatInput = string | number[] | Record<string, unknown>;
|
|
2
|
+
export type ColorLoadStatusCompat = "not-loaded" | "loading" | "loaded";
|
|
3
|
+
export interface ColorHandleCompat {
|
|
4
|
+
remove(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class ColorCompat {
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
loadStatus: ColorLoadStatusCompat;
|
|
9
|
+
private value;
|
|
10
|
+
private readonly watchListeners;
|
|
11
|
+
constructor(input?: ColorCompatInput);
|
|
12
|
+
load(): Promise<ColorCompat>;
|
|
13
|
+
when(callback?: (color: ColorCompat) => void): Promise<ColorCompat>;
|
|
14
|
+
watch(propertyName: string, listener: (value: unknown) => void): ColorHandleCompat;
|
|
15
|
+
set(input: ColorCompatInput): void;
|
|
16
|
+
clone(): ColorCompat;
|
|
17
|
+
toJSON(): ColorCompatInput;
|
|
18
|
+
toCss(includeAlpha?: boolean): string;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
private notifyWatchers;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/color.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,qBAAa,WAAW;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,qBAAqB,CAAC;IACzC,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6C;gBAEzD,KAAK,GAAE,gBAA+B;IAO5C,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;IAc5B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC;IAQzE,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,iBAAiB;IAelF,GAAG,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAKlC,KAAK,IAAI,WAAW;IAIpB,MAAM,IAAI,gBAAgB;IAU1B,KAAK,CAAC,YAAY,UAAO,GAAG,MAAM;IAwBlC,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc;CAUvB"}
|