@arcgis/core 5.0.0-next.87 → 5.0.0-next.89
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/Map.d.ts +4 -0
- package/WebLinkChart.d.ts +6 -3
- package/analysis/ShadowCastAnalysis.d.ts +1 -0
- package/assets/esri/core/t9n/Units_ar.json +1 -1
- package/assets/esri/core/t9n/Units_bg.json +1 -1
- package/assets/esri/core/t9n/Units_bs.json +1 -1
- package/assets/esri/core/t9n/Units_ca.json +1 -1
- package/assets/esri/core/t9n/Units_cs.json +1 -1
- package/assets/esri/core/t9n/Units_da.json +1 -1
- package/assets/esri/core/t9n/Units_de.json +1 -1
- package/assets/esri/core/t9n/Units_el.json +1 -1
- package/assets/esri/core/t9n/Units_en.json +1 -1
- package/assets/esri/core/t9n/Units_es.json +1 -1
- package/assets/esri/core/t9n/Units_et.json +1 -1
- package/assets/esri/core/t9n/Units_fi.json +1 -1
- package/assets/esri/core/t9n/Units_fr.json +1 -1
- package/assets/esri/core/t9n/Units_he.json +1 -1
- package/assets/esri/core/t9n/Units_hr.json +1 -1
- package/assets/esri/core/t9n/Units_hu.json +1 -1
- package/assets/esri/core/t9n/Units_id.json +1 -1
- package/assets/esri/core/t9n/Units_it.json +1 -1
- package/assets/esri/core/t9n/Units_ja.json +1 -1
- package/assets/esri/core/t9n/Units_ko.json +1 -1
- package/assets/esri/core/t9n/Units_lt.json +1 -1
- package/assets/esri/core/t9n/Units_lv.json +1 -1
- package/assets/esri/core/t9n/Units_nl.json +1 -1
- package/assets/esri/core/t9n/Units_no.json +1 -1
- package/assets/esri/core/t9n/Units_pl.json +1 -1
- package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
- package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
- package/assets/esri/core/t9n/Units_ro.json +1 -1
- package/assets/esri/core/t9n/Units_ru.json +1 -1
- package/assets/esri/core/t9n/Units_sk.json +1 -1
- package/assets/esri/core/t9n/Units_sl.json +1 -1
- package/assets/esri/core/t9n/Units_sr.json +1 -1
- package/assets/esri/core/t9n/Units_sv.json +1 -1
- package/assets/esri/core/t9n/Units_th.json +1 -1
- package/assets/esri/core/t9n/Units_tr.json +1 -1
- package/assets/esri/core/t9n/Units_uk.json +1 -1
- package/assets/esri/core/t9n/Units_vi.json +1 -1
- package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
- package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
- package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{1facc1b45345a095b9a7.js → 149c4181eaea32e9ac15.js} +1 -1
- package/assets/esri/core/workers/chunks/{5734aefbce8b6425630c.js → 63b46983155b1672e07a.js} +1 -1
- package/assets/esri/core/workers/chunks/731cab5887c05f221279.js +1 -0
- package/assets/esri/core/workers/chunks/779fe8ccc4041f0b65a0.js +1 -0
- package/assets/esri/core/workers/chunks/{746190bb70aa78ba0bfc.js → 8936f9398414be26b83f.js} +4 -4
- package/assets/esri/core/workers/chunks/{8cb13b3776f07536c79f.js → a0d459bdb91ee892d4b6.js} +1 -1
- package/assets/esri/core/workers/chunks/c267e57eb7f779115aba.js +1 -0
- package/assets/esri/core/workers/chunks/cb6083f7294c8de297e1.js +1 -0
- package/assets/esri/core/workers/chunks/{f9bc4edfdb1590be2d92.js → cb6c9469d7c16727cd12.js} +1 -1
- package/assets/esri/core/workers/chunks/{3b5f24bb824c95996308.js → feba6c9ae162a0a8ea3a.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/{TextureOnly.glsl.js → Texture.glsl.js} +2 -2
- package/chunks/{WaterSurface.glsl.js → Water.glsl.js} +6 -6
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/effects/FocusAreas.d.ts +1 -0
- package/form/FormTemplate.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +1 -0
- package/geometry/operators/geodesicProximityOperator.d.ts +1 -0
- package/geometry/operators/geodeticAreaOperator.d.ts +1 -0
- package/geometry/operators/geodeticDensifyOperator.d.ts +1 -0
- package/geometry/operators/geodeticDistanceOperator.d.ts +1 -0
- package/geometry/operators/geodeticLengthOperator.d.ts +1 -0
- package/geometry/operators/geodeticUtilsOperator.d.ts +1 -0
- package/geometry/operators/shapePreservingProjectOperator.d.ts +1 -0
- package/geometry/operators/support/geographicTransformationUtils.d.ts +1 -0
- package/interfaces.d.ts +2 -2
- package/kernel.js +1 -1
- package/layers/CatalogLayer.d.ts +1 -0
- package/layers/FeatureLayer.d.ts +6 -0
- package/layers/GeoJSONLayer.d.ts +1 -0
- package/layers/Layer.d.ts +1 -0
- package/layers/LinkChartLayer.d.ts +2 -2
- package/layers/MediaLayer.d.ts +1 -0
- package/layers/OGCFeatureLayer.d.ts +1 -0
- package/layers/ParquetLayer.d.ts +6 -0
- package/layers/SubtypeGroupLayer.d.ts +1 -0
- package/layers/WFSLayer.d.ts +1 -0
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -0
- package/layers/mixins/BlendLayer.d.ts +1 -0
- package/layers/mixins/FeatureEffectLayer.d.ts +2 -0
- package/layers/mixins/ScaleRangeLayer.d.ts +0 -42
- package/layers/raster/datasets/RawBlockCache.js +1 -1
- package/layers/raster/functions/SpectralConversionFunction.js +1 -1
- package/layers/support/FeatureFilter.d.ts +4 -0
- package/layers/support/parquetUtils.d.ts +44 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/networks/CircuitManager.d.ts +6 -5
- package/networks/CircuitManager.js +1 -1
- package/networks/Network.d.ts +1 -0
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/Circuit.d.ts +2 -4
- package/networks/support/CircuitLocation.d.ts +1 -7
- package/networks/support/CircuitLocation.js +1 -1
- package/networks/support/CircuitPathConnectivityElement.js +1 -1
- package/networks/support/CircuitSection.d.ts +2 -4
- package/networks/support/Subcircuit.d.ts +2 -2
- package/package.json +4 -4
- package/renderers/FlowRenderer.d.ts +1 -0
- package/renderers/support/colorRampUtils.js +1 -1
- package/rest/featureService/types.d.ts +2 -2
- package/rest/knowledgeGraph/GraphSearch.d.ts +0 -1
- package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +0 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +30 -0
- package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
- package/rest/networks/circuits/verifyCircuits.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/rest/networks/support/NetworkElement.d.ts +2 -1
- package/rest/networks/support/TelecomNetworkElement.js +1 -1
- package/rest/networks/support/TraceLocation.d.ts +1 -1
- package/rest/query.d.ts +4 -0
- package/rest/support/BinParametersBase.d.ts +9 -28
- package/rest/support/DateBinParameters.d.ts +0 -17
- package/rest/support/TopFeaturesQuery.d.ts +1 -0
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +1 -0
- package/symbols/LineSymbolMarker.d.ts +2 -2
- package/symbols/SimpleFillSymbol.d.ts +2 -1
- package/symbols/SimpleLineSymbol.d.ts +4 -4
- package/symbols/support/cimSymbolUtils.d.ts +2 -0
- package/symbols/types.d.ts +140 -28
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SpectralConversionTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SpectralConversionShader.js +5 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/types.d.ts +6 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/terrain/BlendLayers.glsl.js +5 -0
- package/views/3d/terrain/BlendLayersTechnique.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +5 -0
- package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/{Water.glsl.js → WaterColor.glsl.js} +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApply.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightToSingle.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/Laserline.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/BlendWeights.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/smaa/Blur.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/smaa/EdgeDetect.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOBlur.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.glsl.js +5 -0
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +5 -0
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/{shaders → materials}/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/{shaders/WaterSurface.glsl.js → materials/Water.glsl.js} +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.d.ts +1 -0
- package/views/interactive/snapping/FeatureSnappingLayerSource.d.ts +1 -0
- package/views/layers/FeatureLayerViewMixin.d.ts +1 -0
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/Attachments.d.ts +1 -0
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +43 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Swipe.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -0
- package/widgets/UtilityNetworkAssociations.d.ts +1 -0
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/UtilityNetworkTrace.d.ts +1 -0
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -0
- package/widgets/support/SnappingControls.d.ts +1 -0
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
- package/assets/esri/core/workers/chunks/165cf8031af160c99d70.js +0 -1
- package/assets/esri/core/workers/chunks/4f4bdf9f5323fa702e6c.js +0 -1
- package/assets/esri/core/workers/chunks/641450da2680ae09b8e7.js +0 -1
- package/assets/esri/core/workers/chunks/cb66a74448a6c0c20d5d.js +0 -1
- package/layers/graphics/sources/ParquetSource.d.ts +0 -45
- package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/TextureOnly.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/BlendWeights.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/Blur.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/EdgeDetect.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightBlur.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/Laserlines.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/SSAO.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +0 -5
- /package/chunks/{Laserlines.glsl.js → Laserline.glsl.js} +0 -0
|
@@ -4,9 +4,52 @@
|
|
|
4
4
|
* @since 4.33
|
|
5
5
|
* @see [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html)
|
|
6
6
|
*/
|
|
7
|
+
import type Collection from "../../core/Collection.js";
|
|
8
|
+
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
9
|
+
import type Field from "./Field.js";
|
|
7
10
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
8
|
-
import type { ParquetLayerInfo } from "../graphics/sources/ParquetSource.js";
|
|
9
11
|
import type { CustomParameters } from "../mixins/CustomParametersMixin.js";
|
|
12
|
+
import type { ParquetGeometryEncodingUnion } from "./types.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Contains an information inferred from the parquet files.
|
|
16
|
+
*
|
|
17
|
+
* @since 5.0
|
|
18
|
+
* @see [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-parquetUtils.html#getParquetLayerInfo)
|
|
19
|
+
*/
|
|
20
|
+
export interface ParquetLayerInfo {
|
|
21
|
+
/**
|
|
22
|
+
* The fields derived from the parquet files.
|
|
23
|
+
*
|
|
24
|
+
* @since 5.0
|
|
25
|
+
*/
|
|
26
|
+
fields?: Field[];
|
|
27
|
+
/**
|
|
28
|
+
* The encoding format used to store geometries in the parquet files.
|
|
29
|
+
* See [ParquetLayer#geometryEncoding](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html#geometryEncoding) for more information.
|
|
30
|
+
*
|
|
31
|
+
* @since 5.0
|
|
32
|
+
*/
|
|
33
|
+
geometryEncoding?: ParquetGeometryEncodingUnion | null;
|
|
34
|
+
/**
|
|
35
|
+
* The geometry type of the features in the layer.
|
|
36
|
+
*
|
|
37
|
+
* @since 5.0
|
|
38
|
+
*/
|
|
39
|
+
geometryType?: ParquetGeometryType | null;
|
|
40
|
+
/**
|
|
41
|
+
* The spatial reference of the layer.
|
|
42
|
+
*
|
|
43
|
+
* @since 5.0
|
|
44
|
+
*/
|
|
45
|
+
spatialReference?: SpatialReference;
|
|
46
|
+
/**
|
|
47
|
+
* A collection of URLs pointing to the parquet files.
|
|
48
|
+
*
|
|
49
|
+
* @since 5.0
|
|
50
|
+
*/
|
|
51
|
+
urls: Collection<string>;
|
|
52
|
+
}
|
|
10
53
|
|
|
11
54
|
export type ParquetGeometryType = "point" | "polygon" | "polyline" | "multipoint";
|
|
12
55
|
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as l,removeFile as r,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as
|
|
5
|
+
import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as l,removeFile as r,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as y,webMercator as f}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as p}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[l,r]="string"==typeof e?[e,null]:[null,e.jsonUrl];await S(o,"esri",e,r,t);return{layerDefinition:o.validatedSource,url:l,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style&&o.style.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style&&o.style.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function S(t,r,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=l(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const y=a?.data;if(g(y))return t.styleUrl=u||null,j(t,y,c,i);if(w(y))return t.sourceUrl?U(t,y,c,!1,r,i):(t.sourceUrl=u||null,x(y)&&null==t.style&&(r="tilejson"),U(t,y,c,!0,r,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function x(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function w(e){return!g(e)}async function j(e,t,o,l){const n=o?r(o):s();e.styleBase=n,e.style=t,"webp"===t["sprite-format"]?.toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await S(e,"esri",h(n,o.url),void 0,l):i.push(S(e,"esri",o,n,l))}for(const r of Object.keys(t.sources))"esri"!==r&&"tilejson"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?i.push(S(e,r,h(n,t.sources[r].url),void 0,l)):t.sources[r].tiles&&i.push(S(e,r,t.sources[r],n,l)));await Promise.all(i)}async function U(e,t,o,l,r,u){const c=o?n(o)+"/":s(),a=v(t,e),y=new m(r,i(c,u?.query??{}),a);if(!l&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(y))return;null!=y.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(y.fullExtent):t.fullExtent=y.fullExtent.clone()),t.tileInfo&&y.tileInfo&&t.tileInfo.lods.length<y.tileInfo.lods.length&&(t.tileInfo=y.tileInfo)}if(l&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=r),e.sourceNameToSource[r]=y,!x(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?S(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):S(e,"",t.defaultStyles,h(c,"root.json"),u)}if(x(t)&&null==e.style&&a.defaultStyles)return S(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e,o){const l=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=l),null==t.cols&&(t.cols=l)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s,n=null;if(x(e)){const{bounds:l,vector_layers:r}=e;if(l){const e=p({x:l[0],y:l[1],spatialReference:t(y)}),o=p({x:l[2],y:l[3],spatialReference:t(y)});n={xmin:e.x,ymin:e.y,xmax:o.x,ymax:o.y,spatialReference:t(f)}}if(r&&r.length>0)s={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:T(r)};else if(null==o.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===n&&(n=r);let i=78271.51696400007,u=295828763.7957775;const c=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,m=0,d=0;for(let t=0;t<=a;t++)c.push({level:t,scale:u,resolution:i}),i/=2,u/=2;return{capabilities:"TilesOnly",initialExtent:n,fullExtent:r,minScale:m,maxScale:d,tiles:e.tiles,tileInfo:{rows:l,cols:l,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:c,spatialReference:t(f)},defaultStyles:s}}function N(e){return e.hasOwnProperty("tileInfo")}function T(e){const t=[];for(const o of e)o.geometry_type?t.push(b(o.geometry_type.toLowerCase(),o,!1)):(t.push(b("polygon",o,!0)),t.push(b("line",o,!0)),t.push(b("circle",o,!0)));return t}function b(e,t,o){const{id:l,minzoom:r,maxzoom:s}=t,n={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:l,source:"tilejson","source-layer":l,minzoom:r,maxzoom:s};switch(e){case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../core/arrayUtils.js";import t from"../../core/Error.js";import{urlToObject as n}from"../../core/urlUtils.js";import{isAxesOrderReversedForWkid as r}from"../ogc/crsUtils.js";import{DateTime as i,FixedOffsetZone as s}from"luxon";const o={84:4326,83:4269,27:4267};function a(n){if(!n)return null;const r={idCounter:-1};if("string"==typeof n){n=(new DOMParser).parseFromString(n,"text/xml")}const i=n.documentElement;if("ServiceExceptionReport"===i.nodeName){const e=Array.prototype.slice.call(i.childNodes).map(e=>e.textContent).join("\r\n");throw new t("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const s=d("Capability",i),o=d("Service",i),a=s&&d("Request",s);if(!s||!o||!a)return null;const l=d("Layer",s);if(!l)return null;const m="WMS_Capabilities"===i.nodeName||"WMT_MS_Capabilities"===i.nodeName?i.getAttribute("version"):"1.3.0",f=x("Title",o,"")||x("Name",o,""),p=x("AccessConstraints",o,""),h=/^none$/i.test(p)?"":p,y=x("Abstract",o,""),S=parseInt(x("MaxWidth",o,"5000"),10),E=parseInt(x("MaxHeight",o,"5000"),10),L=g(a,"GetMap"),C=N(a,"GetMap"),M=b(l,m,r);if(!M)return null;let T,R=0;const I=Array.prototype.slice.call(s.childNodes),v=M.sublayers??[],w=e=>{null!=e&&v.push(e)};I.forEach(e=>{"Layer"===e.nodeName&&(0===R?T=e:1===R?(M.name&&(M.name="",w(b(T,m,r))),w(b(e,m,r))):w(b(e,m,r)),R++)});const U=M.sublayers??[],V=M.fullExtents??[];0===U.length&&U.push(M),M.extent??=U[0].extent;const _=M.spatialReferences.length>0?M.spatialReferences:u(M),O=N(a,"GetFeatureInfo"),B=O?g(a,"GetFeatureInfo"):null,k=c(U),q=M.minScale||0,X=M.maxScale||0,D=M.dimensions??[],$=k.reduce((e,t)=>e.concat(t.dimensions??[]),[]),j=D.concat($).filter(F);let G=null;if(j.length){const t=j.map(e=>{const{extent:t}=e;return A(t)?t.map(e=>e.getTime()):t?.map(e=>[e.min.getTime(),e.max.getTime()])}).flat(2).filter(e),{start:n,end:r}=t.reduce((e,t)=>({start:Math.min(e.start,t),end:Math.max(e.end,t)}),{start:1/0,end:-1/0});G={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[n,r]}}return{copyright:h,description:y,dimensions:D,extent:M.extent,fullExtents:V,featureInfoFormats:B,featureInfoUrl:O,mapUrl:C,maxWidth:S,maxHeight:E,maxScale:X,minScale:q,layers:k,spatialReferences:_,supportedImageFormatTypes:L,timeInfo:G,title:f,version:m}}function l(e){const t=e.filter(e=>e.popupEnabled&&e.name&&e.queryable);return t.length?t.map(({name:e})=>e).join():null}function u(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=u(t);if(e.length>0)return e}return[]}function c(e){let t=[];for(const n of e)t.push(n),n.sublayers?.length&&(t=t.concat(c(n.sublayers)),delete n.sublayers);return t}function m(e,t,n){return t.getAttribute(e)??n}function f(e,t,n,r){const i=d(e,n);return i?m(t,i,r):r}function d(e,t){for(let n=0;n<t.childNodes.length;n++){const r=t.childNodes[n];if(S(r)&&r.nodeName===e)return r}return null}function p(e,t){if(null==t)return[];const n=[];for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];S(i)&&i.nodeName===e&&n.push(i)}return n}function x(e,t,n){return d(e,t)?.textContent??n}function h(e,t,n){const r=parseFloat(e.getAttribute("minx")??"0"),i=parseFloat(e.getAttribute("miny")??"0"),s=parseFloat(e.getAttribute("maxx")??"0"),o=parseFloat(e.getAttribute("maxy")??"0");return{xmin:n?isNaN(i)?-Number.MAX_VALUE:i:isNaN(r)?-Number.MAX_VALUE:r,ymin:n?isNaN(r)?-Number.MAX_VALUE:r:isNaN(i)?-Number.MAX_VALUE:i,xmax:n?isNaN(o)?Number.MAX_VALUE:o:isNaN(s)?Number.MAX_VALUE:s,ymax:n?isNaN(s)?Number.MAX_VALUE:s:isNaN(o)?Number.MAX_VALUE:o,spatialReference:{wkid:t}}}function N(e,t){const n=d(t,e);if(n){const e=d("DCPType",n);if(e){const t=d("HTTP",e);if(t){const e=d("Get",t);if(e){let t=f("OnlineResource","xlink:href",e,null);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),M(t,["service","request"])}}}}}return null}function g(t,n){const r=p("Operation",t);if(!r.length){return p("Format",d(n,t)).map(({textContent:e})=>e).filter(e)}const i=[];for(const e of r)if(e.getAttribute("name")===n){const t=p("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function y(e,t,n){const r=d(t,e);if(!r)return n;const{textContent:i}=r;if(null==i||""===i)return n;const s=Number(i);return isNaN(s)?n:s}function b(e,t,n){if(!e)return null;const i=e.getAttribute("queryable")?.toLowerCase(),s="1"===i||"true"===i,a={id:n.idCounter++,fullExtents:[],parentLayerId:null,queryable:s,spatialReferences:[],sublayers:null},l=d("LatLonBoundingBox",e),u=d("EX_GeographicBoundingBox",e),c=l?h(l,4326):u?{xmin:parseFloat(x("westBoundLongitude",u,"0")),ymin:parseFloat(x("southBoundLatitude",u,"0")),xmax:parseFloat(x("eastBoundLongitude",u,"0")),ymax:parseFloat(x("northBoundLatitude",u,"0")),spatialReference:{wkid:4326}}:{xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};a.minScale=y(e,"MaxScaleDenominator",0),a.maxScale=y(e,"MinScaleDenominator",0);const f=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach(e=>{if("Name"===e.nodeName)a.name=e.textContent||"";else if("Title"===e.nodeName)a.title=e.textContent||"";else if("Abstract"===e.nodeName)a.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const n=e.getAttribute(f),i=n?.indexOf(":");if(i&&i>-1){let s=parseInt(n.slice(i+1),10);0===s||isNaN(s)||(s=o[s]??s);const l="1.3.0"===t?h(e,s,r(s)):h(e,s);l&&a.fullExtents&&a.fullExtents.push(l)}}else if(e.nodeName===f){(e.textContent?.split(" ")??[]).forEach(e=>{let t=NaN;if(e.includes(":")){const[n,r]=e.toUpperCase().split(":");"CRS"!==n&&"EPSG"!==n||(t=parseInt(r,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=o[t]??t;a.spatialReferences.includes(e)||a.spatialReferences.push(e)}})}else if("Style"!==e.nodeName||a.legendUrl){if("Layer"===e.nodeName){const r=b(e,t,n);r&&(r.parentLayerId=a.id,a.sublayers||(a.sublayers=[]),a.sublayers.push(r))}}else{const t=d("LegendURL",e);if(t){const e=d("OnlineResource",t);e&&(a.legendUrl=e.getAttribute("xlink:href"))}}}),a.extent=c,a.dimensions=p("Dimension",e).filter(e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent).map(e=>{const t=e.getAttribute("name"),n=e.getAttribute("units"),r=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,o="0"!==m("default",e,"0"),a="0"!==m("nearestValue",e,"0"),l="0"!==m("current",e,"0");if(F({name:t,units:n})){return{name:"time",units:"ISO8601",extent:I(r),default:I(s),multipleValues:o,nearestValue:a,current:l}}if(L({name:t,units:n})){return{name:"elevation",units:n,extent:T(r),unitSymbol:i,default:T(s),multipleValues:o,nearestValue:a}}return{name:t,units:n,extent:R(r),unitSymbol:i,default:R(s),multipleValues:o,nearestValue:a}}),a}function A(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}function S(e){return e.nodeType===Node.ELEMENT_NODE}function E(e){return void 0!==e.min&&void 0!==e.max}function L(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}function C(e){return!F(e)&&!L(e)}function F(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function M(e,t){const r=[],i=n(e);for(const n in i.query)i.query.hasOwnProperty(n)&&(t.includes(n.toLowerCase())||r.push(n+"="+i.query[n]));return i.path+(r.length?"?"+r.join("&"):"")}function T(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}}).filter(e):r.map(e=>parseFloat(e))}function R(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}}).filter(e):r}function I(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:v(t[0]),max:v(t[1]),resolution:t.length>=3&&"0"!==t[2]?w(t[2]):void 0}}).filter(e):r.map(e=>v(e))}function v(e){return i.fromISO(e,{zone:s.utcInstance}).toJSDate()}function w(e){const t=/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i,n=e.match(t);if(!n)return null;return{years:U(n[1]),months:U(n[2]),days:U(n[3]),hours:U(n[4]),minutes:U(n[5]),seconds:U(n[6])}}function U(e){if(!e)return 0;const t=/(?:\d+(?:\.|,)\d+|\d+)/,n=e.match(t);if(!n)return 0;const r=n[0].replace(",",".");return Number(r)}function V(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const _="0000-01-01T00:00:00Z",O="9999-12-31T23:59:59Z";function B(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:n}=e;if(t&&
|
|
5
|
+
import{isSome as e}from"../../core/arrayUtils.js";import t from"../../core/Error.js";import{urlToObject as n}from"../../core/urlUtils.js";import{isAxesOrderReversedForWkid as r}from"../ogc/crsUtils.js";import{DateTime as i,FixedOffsetZone as s}from"luxon";const o={84:4326,83:4269,27:4267};function a(n){if(!n)return null;const r={idCounter:-1};if("string"==typeof n){n=(new DOMParser).parseFromString(n,"text/xml")}const i=n.documentElement;if("ServiceExceptionReport"===i.nodeName){const e=Array.prototype.slice.call(i.childNodes).map(e=>e.textContent).join("\r\n");throw new t("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const s=d("Capability",i),o=d("Service",i),a=s&&d("Request",s);if(!s||!o||!a)return null;const l=d("Layer",s);if(!l)return null;const m="WMS_Capabilities"===i.nodeName||"WMT_MS_Capabilities"===i.nodeName?i.getAttribute("version"):"1.3.0",f=x("Title",o,"")||x("Name",o,""),p=x("AccessConstraints",o,""),h=/^none$/i.test(p)?"":p,y=x("Abstract",o,""),S=parseInt(x("MaxWidth",o,"5000"),10),E=parseInt(x("MaxHeight",o,"5000"),10),L=g(a,"GetMap"),C=N(a,"GetMap"),M=b(l,m,r);if(!M)return null;let T,R=0;const I=Array.prototype.slice.call(s.childNodes),v=M.sublayers??[],w=e=>{null!=e&&v.push(e)};I.forEach(e=>{"Layer"===e.nodeName&&(0===R?T=e:1===R?(M.name&&(M.name="",w(b(T,m,r))),w(b(e,m,r))):w(b(e,m,r)),R++)});const U=M.sublayers??[],V=M.fullExtents??[];0===U.length&&U.push(M),M.extent??=U[0].extent;const _=M.spatialReferences.length>0?M.spatialReferences:u(M),O=N(a,"GetFeatureInfo"),B=O?g(a,"GetFeatureInfo"):null,k=c(U),q=M.minScale||0,X=M.maxScale||0,D=M.dimensions??[],$=k.reduce((e,t)=>e.concat(t.dimensions??[]),[]),j=D.concat($).filter(F);let G=null;if(j.length){const t=j.map(e=>{const{extent:t}=e;return A(t)?t.map(e=>e.getTime()):t?.map(e=>[e.min.getTime(),e.max.getTime()])}).flat(2).filter(e),{start:n,end:r}=t.reduce((e,t)=>({start:Math.min(e.start,t),end:Math.max(e.end,t)}),{start:1/0,end:-1/0});G={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[n,r]}}return{copyright:h,description:y,dimensions:D,extent:M.extent,fullExtents:V,featureInfoFormats:B,featureInfoUrl:O,mapUrl:C,maxWidth:S,maxHeight:E,maxScale:X,minScale:q,layers:k,spatialReferences:_,supportedImageFormatTypes:L,timeInfo:G,title:f,version:m}}function l(e){const t=e.filter(e=>e.popupEnabled&&e.name&&e.queryable);return t.length?t.map(({name:e})=>e).join():null}function u(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=u(t);if(e.length>0)return e}return[]}function c(e){let t=[];for(const n of e)t.push(n),n.sublayers?.length&&(t=t.concat(c(n.sublayers)),delete n.sublayers);return t}function m(e,t,n){return t.getAttribute(e)??n}function f(e,t,n,r){const i=d(e,n);return i?m(t,i,r):r}function d(e,t){for(let n=0;n<t.childNodes.length;n++){const r=t.childNodes[n];if(S(r)&&r.nodeName===e)return r}return null}function p(e,t){if(null==t)return[];const n=[];for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];S(i)&&i.nodeName===e&&n.push(i)}return n}function x(e,t,n){return d(e,t)?.textContent??n}function h(e,t,n){const r=parseFloat(e.getAttribute("minx")??"0"),i=parseFloat(e.getAttribute("miny")??"0"),s=parseFloat(e.getAttribute("maxx")??"0"),o=parseFloat(e.getAttribute("maxy")??"0");return{xmin:n?isNaN(i)?-Number.MAX_VALUE:i:isNaN(r)?-Number.MAX_VALUE:r,ymin:n?isNaN(r)?-Number.MAX_VALUE:r:isNaN(i)?-Number.MAX_VALUE:i,xmax:n?isNaN(o)?Number.MAX_VALUE:o:isNaN(s)?Number.MAX_VALUE:s,ymax:n?isNaN(s)?Number.MAX_VALUE:s:isNaN(o)?Number.MAX_VALUE:o,spatialReference:{wkid:t}}}function N(e,t){const n=d(t,e);if(n){const e=d("DCPType",n);if(e){const t=d("HTTP",e);if(t){const e=d("Get",t);if(e){let t=f("OnlineResource","xlink:href",e,null);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),M(t,["service","request"])}}}}}return null}function g(t,n){const r=p("Operation",t);if(!r.length){return p("Format",d(n,t)).map(({textContent:e})=>e).filter(e)}const i=[];for(const e of r)if(e.getAttribute("name")===n){const t=p("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function y(e,t,n){const r=d(t,e);if(!r)return n;const{textContent:i}=r;if(null==i||""===i)return n;const s=Number(i);return isNaN(s)?n:s}function b(e,t,n){if(!e)return null;const i=e.getAttribute("queryable")?.toLowerCase(),s="1"===i||"true"===i,a={id:n.idCounter++,fullExtents:[],parentLayerId:null,queryable:s,spatialReferences:[],sublayers:null},l=d("LatLonBoundingBox",e),u=d("EX_GeographicBoundingBox",e),c=l?h(l,4326):u?{xmin:parseFloat(x("westBoundLongitude",u,"0")),ymin:parseFloat(x("southBoundLatitude",u,"0")),xmax:parseFloat(x("eastBoundLongitude",u,"0")),ymax:parseFloat(x("northBoundLatitude",u,"0")),spatialReference:{wkid:4326}}:{xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};a.minScale=y(e,"MaxScaleDenominator",0),a.maxScale=y(e,"MinScaleDenominator",0);const f=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach(e=>{if("Name"===e.nodeName)a.name=e.textContent||"";else if("Title"===e.nodeName)a.title=e.textContent||"";else if("Abstract"===e.nodeName)a.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const n=e.getAttribute(f),i=n?.indexOf(":");if(i&&i>-1){let s=parseInt(n.slice(i+1),10);0===s||isNaN(s)||(s=o[s]??s);const l="1.3.0"===t?h(e,s,r(s)):h(e,s);l&&a.fullExtents&&a.fullExtents.push(l)}}else if(e.nodeName===f){(e.textContent?.split(" ")??[]).forEach(e=>{let t=NaN;if(e.includes(":")){const[n,r]=e.toUpperCase().split(":");"CRS"!==n&&"EPSG"!==n||(t=parseInt(r,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=o[t]??t;a.spatialReferences.includes(e)||a.spatialReferences.push(e)}})}else if("Style"!==e.nodeName||a.legendUrl){if("Layer"===e.nodeName){const r=b(e,t,n);r&&(r.parentLayerId=a.id,a.sublayers||(a.sublayers=[]),a.sublayers.push(r))}}else{const t=d("LegendURL",e);if(t){const e=d("OnlineResource",t);e&&(a.legendUrl=e.getAttribute("xlink:href"))}}}),a.extent=c,a.dimensions=p("Dimension",e).filter(e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent).map(e=>{const t=e.getAttribute("name"),n=e.getAttribute("units"),r=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,o="0"!==m("default",e,"0"),a="0"!==m("nearestValue",e,"0"),l="0"!==m("current",e,"0");if(F({name:t,units:n})){return{name:"time",units:"ISO8601",extent:I(r),default:I(s),multipleValues:o,nearestValue:a,current:l}}if(L({name:t,units:n})){return{name:"elevation",units:n,extent:T(r),unitSymbol:i,default:T(s),multipleValues:o,nearestValue:a}}return{name:t,units:n,extent:R(r),unitSymbol:i,default:R(s),multipleValues:o,nearestValue:a}}),a}function A(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}function S(e){return e.nodeType===Node.ELEMENT_NODE}function E(e){return void 0!==e.min&&void 0!==e.max}function L(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}function C(e){return!F(e)&&!L(e)}function F(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function M(e,t){const r=[],i=n(e);for(const n in i.query)i.query.hasOwnProperty(n)&&(t.includes(n.toLowerCase())||r.push(n+"="+i.query[n]));return i.path+(r.length?"?"+r.join("&"):"")}function T(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}}).filter(e):r.map(e=>parseFloat(e))}function R(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}}).filter(e):r}function I(t){if(!t)return;const n=t.includes("/"),r=t.split(",");return n?r.map(e=>{const t=e.split("/");if(t.length<2)return null;return{min:v(t[0]),max:v(t[1]),resolution:t.length>=3&&"0"!==t[2]?w(t[2]):void 0}}).filter(e):r.map(e=>v(e))}function v(e){return i.fromISO(e,{zone:s.utcInstance}).toJSDate()}function w(e){const t=/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i,n=e.match(t);if(!n)return null;return{years:U(n[1]),months:U(n[2]),days:U(n[3]),hours:U(n[4]),minutes:U(n[5]),seconds:U(n[6])}}function U(e){if(!e)return 0;const t=/(?:\d+(?:\.|,)\d+|\d+)/,n=e.match(t);if(!n)return 0;const r=n[0].replace(",",".");return Number(r)}function V(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const _="0000-01-01T00:00:00Z",O="9999-12-31T23:59:59Z";function B(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:n}=e;if(t&&t.getTime()===n?.getTime())return`${V(t)}`;return`${t?V(t):_}/${n?V(n):O}`}const k=new Set([102100,3857,102113,900913]),q=new Set([3395,54004]);function X(e,t){let n=e.wkid;return null==t?n:(null!=n&&t.includes(n)||!e.latestWkid||(n=e.latestWkid),null!=n&&k.has(n)?t.find(e=>k.has(e))||t.find(e=>q.has(e))||102100:n)}export{w as fromISODuration,l as getPopupLayers,E as isDimensionInterval,L as isElevationDimension,C as isGenericDimension,F as isTimeDimension,X as normalizeWKID,a as parseCapabilities,B as toTimeQueryParameter};
|
|
@@ -6,6 +6,7 @@ import type { JSONSupport } from "../core/JSONSupport.js";
|
|
|
6
6
|
import type { CircuitExportResult, DomainNetworkJSON } from "./support/jsonTypes.js";
|
|
7
7
|
import type { ExportCircuitsParametersProperties } from "../rest/networks/circuits/support/ExportCircuitsParameters.js";
|
|
8
8
|
import type { QueryCircuitsParametersProperties } from "../rest/networks/circuits/support/QueryCircuitsParameters.js";
|
|
9
|
+
import type { VerifyCircuitsParametersProperties } from "../rest/networks/circuits/support/VerifyCircuitsParameters.js";
|
|
9
10
|
import type { UtilityNetworkProperties } from "./UtilityNetwork.js";
|
|
10
11
|
|
|
11
12
|
export interface CircuitManagerProperties {
|
|
@@ -27,6 +28,8 @@ export type QueryCircuitProperties = Pick<QueryCircuitsParametersProperties, "lo
|
|
|
27
28
|
|
|
28
29
|
export type ExportCircuitsProperties = Pick<ExportCircuitsParametersProperties, "circuitNames" | "exportAcknowledgement" | "resultTypes">;
|
|
29
30
|
|
|
31
|
+
export type VerifyCircuitsProperties = Pick<VerifyCircuitsParametersProperties, "circuitNames" | "continueOnFailure" | "forceVerify" | "synthesizeGeometries">;
|
|
32
|
+
|
|
30
33
|
/**
|
|
31
34
|
* A CircuitManager provides access to circuit management capabilities for a telecom domain network
|
|
32
35
|
* in a utility network.
|
|
@@ -174,10 +177,8 @@ export default class CircuitManager extends JSONSupport {
|
|
|
174
177
|
* The operation confirms that a circuit can be traced from the starting location to the stopping location
|
|
175
178
|
* and ensures that circuit sections and subcircuits are properly configured.
|
|
176
179
|
*
|
|
177
|
-
* @param
|
|
178
|
-
* @
|
|
179
|
-
* @returns Resolves to an array of objects
|
|
180
|
-
* specifying the verification status for each circuit.
|
|
180
|
+
* @param props - An object specifying configuration settings for the verify operation.
|
|
181
|
+
* @returns Resolves to an array of objects specifying the verification status for each circuit.
|
|
181
182
|
*/
|
|
182
|
-
verify(
|
|
183
|
+
verify(props: VerifyCircuitsProperties): Promise<CircuitVerifyResult[]>;
|
|
183
184
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{watch as r}from"../core/reactiveUtils.js";import{property as s,subclass as o}from"../core/accessorSupport/decorators.js";import c from"../layers/FeatureLayer.js";import{emitApplyEditsEvent as n}from"../layers/mixins/EditBusLayer.js";import a from"./UtilityNetwork.js";import l from"./support/Circuit.js";import{isVersionInEditSession as u,currentSessionId as d,isSafeToEditVersion as m}from"../versionManagement/support/versionManagementUtils.js";let h=class extends i{constructor(e){super(e),this._circuitTable=null,this._circuitSectionTable=null,this._subcircuitTable=null,this.telecomDomainNetwork=null,this.utilityNetwork=null}initialize(){this.addHandles([r(()=>[this.gdbVersion,this.historicMoment],()=>{this._setLayerVersionAndMoment(this._circuitTable),this._setLayerVersionAndMoment(this._circuitSectionTable),this._setLayerVersionAndMoment(this._subcircuitTable)})])}get _circuitTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTCircuit"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get _circuitSectionTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTCircuitSection"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get _subcircuitTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTSubcircuit"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}get telecomDomainNetworkName(){return this.telecomDomainNetwork?.domainNetworkName??null}get circuitTable(){if(null!=this._circuitTable)return this._circuitTable;if(null==this._circuitTableUrl)throw new t("circuit-manager:missing-circuit-table-url","Unable to load the circuit table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._circuitTable=new c({url:this._circuitTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._circuitTable}get circuitSectionTable(){if(null!=this._circuitSectionTable)return this._circuitSectionTable;if(null==this._circuitSectionTableUrl)throw new t("circuit-manager:missing-circuit-section-table-url","Unable to load the circuit section table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._circuitSectionTable=new c({url:this._circuitSectionTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._circuitSectionTable}get subcircuitTable(){if(null!=this._subcircuitTable)return this._subcircuitTable;if(null==this._subcircuitTableUrl)throw new t("circuit-manager:missing-subcircuit-table-url","Unable to load the subcircuit table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._subcircuitTable=new c({url:this._subcircuitTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._subcircuitTable}async loadCircuitTable(){return this.circuitTable.load()}async loadCircuitSectionTable(){return this.circuitSectionTable.load()}async loadSubcircuitTable(){return this.subcircuitTable.load()}getCircuit(e,t=!1){return new l({circuitManager:this,name:e,sections:t?new Map:null})}async create(e){const[{createCircuit:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/createCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),r=i.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.gdbVersion=this.gdbVersion;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);e.circuitManager=this,s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0})}async alter(e){if(null==e.globalId)throw new t("circuit-manager:alter-without-globalid","A circuit being altered must have a globalId","To ensure the circuit has a globalId, query the circuit first");const[{alterCircuit:i},{default:r}]=await Promise.all([import("../rest/networks/circuits/alterCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),s=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const o=n(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,s);e.circuitManager=this,o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async delete(e){const[{deleteCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/deleteCircuits.js"),import("../rest/networks/circuits/support/DeleteCircuitsParameters.js")]),r=i.from({circuits:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.gdbVersion=this.gdbVersion;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0})}async export(e){const[{exportCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/exportCircuits.js"),import("../rest/networks/circuits/support/ExportCircuitsParameters.js")]),r=i.from(e);u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.domainNetworkName=this.telecomDomainNetworkName,r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);return s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0}),o.circuits}async verify(e,t=!1){const[{verifyCircuits:i},{default:r}]=await Promise.all([import("../rest/networks/circuits/verifyCircuits.js"),import("../rest/networks/circuits/support/VerifyCircuitsParameters.js")]),s=r.from({circuits:e,synthesizeGeometries:t,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const o=n(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,s);return o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0}),c.circuits}async queryCircuits(e){const[{queryCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),r=Array.isArray(e)?{circuits:e}:e,s=i.from(r);u(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=d:s.sessionId=null,s.domainNetworkName=this.telecomDomainNetworkName,s.resultTypes=["circuit"],s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return o.circuits?.forEach(e=>e.circuitManager=this),o.circuits||[]}async queryCircuitNames(e){const[{queryCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),r=i.from(e);u(this.featureServiceUrl,this.gdbVersion||null)?r.sessionId=d:r.sessionId=null,r.domainNetworkName=this.telecomDomainNetworkName,r.resultTypes=["name"],r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;return(await t(this.networkServiceUrl,r)).circuitNames||[]}_setLayerVersionAndMoment(e){null!=e&&(e.gdbVersion!==this.gdbVersion&&(e.gdbVersion=this.gdbVersion),e.historicMoment!==this.historicMoment&&(e.historicMoment=this.historicMoment))}};e([s()],h.prototype,"_circuitTable",void 0),e([s()],h.prototype,"_circuitSectionTable",void 0),e([s()],h.prototype,"_subcircuitTable",void 0),e([s({constructOnly:!0})],h.prototype,"telecomDomainNetwork",void 0),e([s({type:a,constructOnly:!0})],h.prototype,"utilityNetwork",void 0),e([s()],h.prototype,"networkServiceUrl",null),e([s()],h.prototype,"featureServiceUrl",null),e([s()],h.prototype,"gdbVersion",null),e([s()],h.prototype,"historicMoment",null),e([s()],h.prototype,"telecomDomainNetworkName",null),e([s()],h.prototype,"circuitTable",null),e([s()],h.prototype,"circuitSectionTable",null),e([s()],h.prototype,"subcircuitTable",null),h=e([o("esri.networks.CircuitManager")],h);const b=h;export{b as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{watch as r}from"../core/reactiveUtils.js";import{property as s,subclass as o}from"../core/accessorSupport/decorators.js";import c from"../layers/FeatureLayer.js";import{emitApplyEditsEvent as n}from"../layers/mixins/EditBusLayer.js";import a from"./UtilityNetwork.js";import l from"./support/Circuit.js";import{isVersionInEditSession as u,currentSessionId as d,isSafeToEditVersion as m}from"../versionManagement/support/versionManagementUtils.js";let h=class extends i{constructor(e){super(e),this._circuitTable=null,this._circuitSectionTable=null,this._subcircuitTable=null,this.telecomDomainNetwork=null,this.utilityNetwork=null}initialize(){this.addHandles([r(()=>[this.gdbVersion,this.historicMoment],()=>{this._setLayerVersionAndMoment(this._circuitTable),this._setLayerVersionAndMoment(this._circuitSectionTable),this._setLayerVersionAndMoment(this._subcircuitTable)})])}get _circuitTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTCircuit"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get _circuitSectionTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTCircuitSection"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get _subcircuitTableUrl(){if(null==this.telecomDomainNetwork)return null;const e=this.telecomDomainNetwork.circuitSources?.find(e=>"esriUNFCUTSubcircuit"===e.utilityNetworkFeatureClassUsageType)?.layerId??null;return null==e?null:`${this.featureServiceUrl}/${e}`}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}get telecomDomainNetworkName(){return this.telecomDomainNetwork?.domainNetworkName??null}get circuitTable(){if(null!=this._circuitTable)return this._circuitTable;if(null==this._circuitTableUrl)throw new t("circuit-manager:missing-circuit-table-url","Unable to load the circuit table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._circuitTable=new c({url:this._circuitTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._circuitTable}get circuitSectionTable(){if(null!=this._circuitSectionTable)return this._circuitSectionTable;if(null==this._circuitSectionTableUrl)throw new t("circuit-manager:missing-circuit-section-table-url","Unable to load the circuit section table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._circuitSectionTable=new c({url:this._circuitSectionTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._circuitSectionTable}get subcircuitTable(){if(null!=this._subcircuitTable)return this._subcircuitTable;if(null==this._subcircuitTableUrl)throw new t("circuit-manager:missing-subcircuit-table-url","Unable to load the subcircuit table; cannot get layer url from `telecomDomainNetwork.","Ensure `telecomDomainNetwork` was provided to the circuit manager.");return this._subcircuitTable=new c({url:this._subcircuitTableUrl,gdbVersion:this.gdbVersion,historicMoment:this.historicMoment}),this._subcircuitTable}async loadCircuitTable(){return this.circuitTable.load()}async loadCircuitSectionTable(){return this.circuitSectionTable.load()}async loadSubcircuitTable(){return this.subcircuitTable.load()}getCircuit(e,t=!1){return new l({circuitManager:this,name:e,sections:t?new Map:null})}async create(e){const[{createCircuit:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/createCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),r=i.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.gdbVersion=this.gdbVersion;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);e.circuitManager=this,s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0})}async alter(e){if(null==e.globalId)throw new t("circuit-manager:alter-without-globalid","A circuit being altered must have a globalId","To ensure the circuit has a globalId, query the circuit first");const[{alterCircuit:i},{default:r}]=await Promise.all([import("../rest/networks/circuits/alterCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),s=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const o=n(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,s);e.circuitManager=this,o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async delete(e){const[{deleteCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/deleteCircuits.js"),import("../rest/networks/circuits/support/DeleteCircuitsParameters.js")]),r=i.from({circuits:e,domainNetworkName:this.telecomDomainNetworkName});u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.gdbVersion=this.gdbVersion;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0})}async export(e){const[{exportCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/exportCircuits.js"),import("../rest/networks/circuits/support/ExportCircuitsParameters.js")]),r=i.from(e);u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.domainNetworkName=this.telecomDomainNetworkName,r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);return s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0}),o.circuits}async verify(e){const[{verifyCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/verifyCircuits.js"),import("../rest/networks/circuits/support/VerifyCircuitsParameters.js")]),r=i.from(e);u(this.featureServiceUrl,this.gdbVersion||null)?(r.sessionId=d,await m(this.featureServiceUrl,this.gdbVersion,!0)):r.sessionId=null,r.domainNetworkName=this.telecomDomainNetworkName,r.gdbVersion=this.gdbVersion;const s=n(this.featureServiceUrl,null,this.gdbVersion,!1),o=await t(this.networkServiceUrl,r);return s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:o.exceededTransferLimit,historicMoment:o.moment,editedFeatures:o.serviceEdits||void 0}),o.circuits}async queryCircuits(e){const[{queryCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),r=Array.isArray(e)?{circuits:e}:e,s=i.from(r);u(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=d:s.sessionId=null,s.domainNetworkName=this.telecomDomainNetworkName,s.resultTypes=["circuit"],s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return o.circuits?.forEach(e=>e.circuitManager=this),o.circuits||[]}async queryCircuitNames(e){const[{queryCircuits:t},{default:i}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),r=i.from(e);u(this.featureServiceUrl,this.gdbVersion||null)?r.sessionId=d:r.sessionId=null,r.domainNetworkName=this.telecomDomainNetworkName,r.resultTypes=["name"],r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;return(await t(this.networkServiceUrl,r)).circuitNames||[]}_setLayerVersionAndMoment(e){null!=e&&(e.gdbVersion!==this.gdbVersion&&(e.gdbVersion=this.gdbVersion),e.historicMoment!==this.historicMoment&&(e.historicMoment=this.historicMoment))}};e([s()],h.prototype,"_circuitTable",void 0),e([s()],h.prototype,"_circuitSectionTable",void 0),e([s()],h.prototype,"_subcircuitTable",void 0),e([s({constructOnly:!0})],h.prototype,"telecomDomainNetwork",void 0),e([s({type:a,constructOnly:!0})],h.prototype,"utilityNetwork",void 0),e([s()],h.prototype,"networkServiceUrl",null),e([s()],h.prototype,"featureServiceUrl",null),e([s()],h.prototype,"gdbVersion",null),e([s()],h.prototype,"historicMoment",null),e([s()],h.prototype,"telecomDomainNetworkName",null),e([s()],h.prototype,"circuitTable",null),e([s()],h.prototype,"circuitSectionTable",null),e([s()],h.prototype,"subcircuitTable",null),h=e([o("esri.networks.CircuitManager")],h);const b=h;export{b as default};
|
package/networks/Network.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export default abstract class Network extends NetworkSuperclass {
|
|
|
64
64
|
* > [!WARNING]
|
|
65
65
|
* >
|
|
66
66
|
* > **Known Limitations**
|
|
67
|
+
* >
|
|
67
68
|
* > This method does not populate the [UtilityNetwork#sharedNamedTraceConfigurations](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#sharedNamedTraceConfigurations) for a [UtilityNetwork](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html) instance.
|
|
68
69
|
*
|
|
69
70
|
* @param params - The parameters for loading the portal item.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../Graphic.js";import{unique as r}from"../core/arrayUtils.js";import s from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{watch as i}from"../core/reactiveUtils.js";import{property as a,subclass as n}from"../core/accessorSupport/decorators.js";import l from"../layers/FeatureLayer.js";import{queryAllJSON as d}from"../layers/support/featureQueryAll.js";import u from"./Network.js";import m from"./RulesTable.js";import c from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as y}from"./support/networkFieldUtils.js";import h from"./support/NetworkSystemLayers.js";import p from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as w,associationTypeKebabDict as I,nullGuid as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as g}from"./support/utils.js";import k from"../rest/networks/support/TelecomNetworkElement.js";import T from"../rest/support/Query.js";let S=class extends u{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(i(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new l({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new h({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>p.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?p.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new m({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:r}=await import("./CircuitManager.js");return o(this._circuitManagerMap,e,()=>new r({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>g(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:d,toTerminalId:u,toFirstUnit:m,toLastUnit:c,associationType:h,isContentVisible:p,percentAlong:f,globalId:I}=y(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[d]:e.toNetworkElement?.globalId,[u]:e.toNetworkElement?.terminalId,[h]:w[e.associationType],[p]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[f]:e.percentAlong,[I]:e.globalId}});return e.fromNetworkElement instanceof k&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit),e.toNetworkElement instanceof k&&(r.attributes[m]=e.toNetworkElement?.firstUnit,r.attributes[c]=e.toNetworkElement?.lastUnit),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),d=s.get("FROMTERMINALID"),u=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),h=s.get("VIANETWORKSOURCEID"),p=s.get("VIAASSETGROUP"),f=s.get("VIAASSETTYPE"),w=s.get("VIATERMINALID"),I=r.attributes[o.name],b=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[d.name]},{networkSourceId:r.attributes[u.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[h.name],assetGroupId:r.attributes[p.name],assetTypeId:r.attributes[f.name],terminalId:r.attributes[w.name]}],k={ruleType:I,creationDate:b};for(const T of[0,1,2]){if(5!==I&&2===T)continue;const e=g[T],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(T){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}k[`${a}NetworkSource`]=r,k[`${a}AssetGroup`]=s,k[`${a}AssetType`]=o,k[`${a}Terminal`]=i?.toJSON()}return k}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new T({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await d(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??b,associationType:I.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}_ensureSingleSourceIdAsValidLayerId(e){const t=r(e.map(e=>e.networkSourceId));if(t.length>1)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const o=t[0],i=this.getLayerIdBySourceId(o);if(null==i)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return i}};e([a({readOnly:!0})],S.prototype,"_rulesLayer",null),e([a({type:[c],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],S.prototype,"sharedNamedTraceConfigurations",void 0),e([a({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"type",void 0),e([a({readOnly:!0})],S.prototype,"serviceTerritoryFeatureLayerId",null),e([a({readOnly:!0})],S.prototype,"networkSystemLayers",null),e([a({readOnly:!0})],S.prototype,"terminalConfigurations",null),e([a({readOnly:!0})],S.prototype,"domainNetworkNames",null),e([a({readOnly:!0})],S.prototype,"hasTelecomNetwork",null),e([a({readOnly:!0,json:{read:!1}})],S.prototype,"associationsTable",null),S=e([n("esri.networks.UtilityNetwork")],S);const N=S;export{N as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../Graphic.js";import{unique as r}from"../core/arrayUtils.js";import s from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{watch as i}from"../core/reactiveUtils.js";import{property as a,subclass as n}from"../core/accessorSupport/decorators.js";import l from"../layers/FeatureLayer.js";import{queryAllJSON as u}from"../layers/support/featureQueryAll.js";import d from"./Network.js";import m from"./RulesTable.js";import c from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as y}from"./support/networkFieldUtils.js";import h from"./support/NetworkSystemLayers.js";import p from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as w,associationTypeKebabDict as I,nullGuid as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as g}from"./support/utils.js";import T from"../rest/networks/support/TelecomNetworkElement.js";import k from"../rest/support/Query.js";let S=class extends d{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(i(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new l({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new h({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>p.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?p.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new m({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:r}=await import("./CircuitManager.js");return o(this._circuitManagerMap,e,()=>new r({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>g(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:d,toFirstUnit:m,toLastUnit:c,associationType:h,isContentVisible:p,percentAlong:f,globalId:I}=y(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[d]:e.toNetworkElement?.terminalId,[h]:w[e.associationType],[p]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[f]:e.percentAlong,[I]:e.globalId}}),y=e.associationType.includes("connectivity");return e.fromNetworkElement instanceof T&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit,y&&(r.attributes[i]=1)),e.toNetworkElement instanceof T&&(r.attributes[m]=e.toNetworkElement?.firstUnit,r.attributes[c]=e.toNetworkElement?.lastUnit,y&&(r.attributes[d]=1)),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),h=s.get("VIANETWORKSOURCEID"),p=s.get("VIAASSETGROUP"),f=s.get("VIAASSETTYPE"),w=s.get("VIATERMINALID"),I=r.attributes[o.name],b=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[h.name],assetGroupId:r.attributes[p.name],assetTypeId:r.attributes[f.name],terminalId:r.attributes[w.name]}],T={ruleType:I,creationDate:b};for(const k of[0,1,2]){if(5!==I&&2===k)continue;const e=g[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new k({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await u(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??b,associationType:I.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}_ensureSingleSourceIdAsValidLayerId(e){const t=r(e.map(e=>e.networkSourceId));if(t.length>1)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const o=t[0],i=this.getLayerIdBySourceId(o);if(null==i)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return i}};e([a({readOnly:!0})],S.prototype,"_rulesLayer",null),e([a({type:[c],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],S.prototype,"sharedNamedTraceConfigurations",void 0),e([a({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"type",void 0),e([a({readOnly:!0})],S.prototype,"serviceTerritoryFeatureLayerId",null),e([a({readOnly:!0})],S.prototype,"networkSystemLayers",null),e([a({readOnly:!0})],S.prototype,"terminalConfigurations",null),e([a({readOnly:!0})],S.prototype,"domainNetworkNames",null),e([a({readOnly:!0})],S.prototype,"hasTelecomNetwork",null),e([a({readOnly:!0,json:{read:!1}})],S.prototype,"associationsTable",null),S=e([n("esri.networks.UtilityNetwork")],S);const N=S;export{N as default};
|
|
@@ -45,7 +45,6 @@ export interface CircuitProperties extends Partial<Pick<Circuit, "attributes" |
|
|
|
45
45
|
* const startLocation = new CircuitLocation({
|
|
46
46
|
* sourceId: 20,
|
|
47
47
|
* globalId: "{665803BB-258E-4BAE-A5B2-27DBD8A83C30}",
|
|
48
|
-
* terminalId: 1,
|
|
49
48
|
* firstUnit: 1,
|
|
50
49
|
* lastUnit: 1,
|
|
51
50
|
* });
|
|
@@ -53,7 +52,6 @@ export interface CircuitProperties extends Partial<Pick<Circuit, "attributes" |
|
|
|
53
52
|
* const stopLocation = new CircuitLocation({
|
|
54
53
|
* sourceId: 20,
|
|
55
54
|
* globalId: "{58CB492A-1992-4518-A60F-6119B1317E89}",
|
|
56
|
-
* terminalId: 1,
|
|
57
55
|
* firstUnit: 1,
|
|
58
56
|
* lastUnit: 1,
|
|
59
57
|
* });
|
|
@@ -252,7 +250,7 @@ export default class Circuit extends JSONSupport {
|
|
|
252
250
|
get subcircuits(): Subcircuit[];
|
|
253
251
|
set subcircuits(value: SubcircuitProperties[]);
|
|
254
252
|
/**
|
|
255
|
-
* Returns the value of the specified attribute.
|
|
253
|
+
* Returns the value of the specified user-defined attribute.
|
|
256
254
|
*
|
|
257
255
|
* @param name - The name of the attribute.
|
|
258
256
|
* @returns Returns the value of the attribute specified by `name`.
|
|
@@ -267,7 +265,7 @@ export default class Circuit extends JSONSupport {
|
|
|
267
265
|
*/
|
|
268
266
|
getSectionById(sectionId: number): CircuitSection | null;
|
|
269
267
|
/**
|
|
270
|
-
* Sets a new value for the specified attribute.
|
|
268
|
+
* Sets a new value for the specified user-defined attribute.
|
|
271
269
|
*
|
|
272
270
|
* @param name - The name of the attribute to set.
|
|
273
271
|
* @param newValue - The new value to set on the named attribute.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
2
2
|
|
|
3
|
-
export interface CircuitLocationProperties extends Partial<Pick<CircuitLocation, "firstUnit" | "globalId" | "lastUnit" | "sourceId"
|
|
3
|
+
export interface CircuitLocationProperties extends Partial<Pick<CircuitLocation, "firstUnit" | "globalId" | "lastUnit" | "sourceId">> {}
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a circuit start or stop location in a telecom domain network.
|
|
@@ -32,10 +32,4 @@ export default class CircuitLocation extends JSONSupport {
|
|
|
32
32
|
accessor lastUnit: number;
|
|
33
33
|
/** The source ID of the feature or object associated with the circuit location. */
|
|
34
34
|
accessor sourceId: number;
|
|
35
|
-
/**
|
|
36
|
-
* The terminal ID of the feature or object associated with the circuit location.
|
|
37
|
-
*
|
|
38
|
-
* @default 1
|
|
39
|
-
*/
|
|
40
|
-
accessor terminalId: number;
|
|
41
35
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r,subclass as
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r,subclass as s}from"../../core/accessorSupport/decorators.js";let e=class extends o{constructor(t){super(t),this.sourceId=null,this.globalId=null,this.firstUnit=1,this.lastUnit=1}};t([r({type:Number,json:{write:!0}})],e.prototype,"sourceId",void 0),t([r({type:String,json:{write:!0}})],e.prototype,"globalId",void 0),t([r({type:Number,json:{write:!0}})],e.prototype,"firstUnit",void 0),t([r({type:Number,json:{write:!0}})],e.prototype,"lastUnit",void 0),e=t([s("esri.networks.support.CircuitLocation")],e);const i=e;export{i as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as o,subclass as n}from"../../core/accessorSupport/decorators.js";import r from"../../rest/networks/support/TelecomNetworkElement.js";import{reader as i}from"../../core/accessorSupport/decorators/reader.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";let c=class extends t{constructor(e){super(e),this.edgeElement=null,this.junctionElement=null}readEdgeElement(e,t){return new r({networkSourceId:t.edgeNetworkSourceId,globalId:t.edgeGlobalId,objectId:t.edgeObjectId,positionFrom:t.edgePositionFrom,positionTo:t.edgePositionTo,firstUnit:t.edgeFirstUnit,lastUnit:t.edgeLastUnit})}writeEdgeElement(e,t){t.edgeNetworkSourceId=e.networkSourceId,t.edgeGlobalId=e.globalId,t.edgeObjectId=e.objectId,t.edgePositionFrom=e.positionFrom,t.edgePositionTo=e.positionTo,t.edgeFirstUnit=e.firstUnit,t.edgeLastUnit=e.lastUnit}readJunctionElement(e,t){return new r({networkSourceId:t.junctionNetworkSourceId,globalId:t.junctionGlobalId,objectId:t.junctionObjectId,
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as o,subclass as n}from"../../core/accessorSupport/decorators.js";import r from"../../rest/networks/support/TelecomNetworkElement.js";import{reader as i}from"../../core/accessorSupport/decorators/reader.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";let c=class extends t{constructor(e){super(e),this.edgeElement=null,this.junctionElement=null}readEdgeElement(e,t){return new r({networkSourceId:t.edgeNetworkSourceId,globalId:t.edgeGlobalId,objectId:t.edgeObjectId,positionFrom:t.edgePositionFrom,positionTo:t.edgePositionTo,firstUnit:t.edgeFirstUnit,lastUnit:t.edgeLastUnit})}writeEdgeElement(e,t){t.edgeNetworkSourceId=e.networkSourceId,t.edgeGlobalId=e.globalId,t.edgeObjectId=e.objectId,t.edgePositionFrom=e.positionFrom,t.edgePositionTo=e.positionTo,t.edgeFirstUnit=e.firstUnit,t.edgeLastUnit=e.lastUnit}readJunctionElement(e,t){return new r({networkSourceId:t.junctionNetworkSourceId,globalId:t.junctionGlobalId,objectId:t.junctionObjectId,firstUnit:t.junctionFirstUnit,lastUnit:t.junctionLastUnit})}writeJunctionElement(e,t){t.junctionNetworkSourceId=e.networkSourceId,t.junctionGlobalId=e.globalId,t.junctionObjectId=e.objectId,t.junctionFirstUnit=e.firstUnit,t.junctionLastUnit=e.lastUnit}};e([o({type:r,json:{read:{source:["edgeNetworkSourceId","edgeGlobalId","edgeObjectId","edgePositionFrom","edgePositionTo","edgeFirstUnit","edgeLastUnit"]},write:!0}})],c.prototype,"edgeElement",void 0),e([i("edgeElement")],c.prototype,"readEdgeElement",null),e([d("edgeElement")],c.prototype,"writeEdgeElement",null),e([o({type:r,json:{read:{source:["junctionNetworkSourceId","junctionGlobalId","junctionObjectId","junctionFirstUnit","junctionLastUnit"]},write:!0}})],c.prototype,"junctionElement",void 0),e([i("junctionElement")],c.prototype,"readJunctionElement",null),e([d("junctionElement")],c.prototype,"writeJunctionElement",null),c=e([n("esri.networks.support.CircuitPathConnectivityElement")],c);const s=c;export{s as default};
|
|
@@ -44,7 +44,6 @@ export interface CircuitSectionProperties extends Partial<Pick<CircuitSection, "
|
|
|
44
44
|
* const startLocation = new CircuitLocation({
|
|
45
45
|
* sourceId: 20,
|
|
46
46
|
* globalId: "{728C3E4A-DA4B-4766-9CA5-AF19B9E3F89C}",
|
|
47
|
-
* terminalId: 1,
|
|
48
47
|
* firstUnit: 1,
|
|
49
48
|
* lastUnit: 1,
|
|
50
49
|
* });
|
|
@@ -52,7 +51,6 @@ export interface CircuitSectionProperties extends Partial<Pick<CircuitSection, "
|
|
|
52
51
|
* const stopLocation = new CircuitLocation({
|
|
53
52
|
* sourceId: 20,
|
|
54
53
|
* globalId: "{0E3D7C20-E74D-482F-AE40-4319BCF0EA74}",
|
|
55
|
-
* terminalId: 1,
|
|
56
54
|
* firstUnit: 1,
|
|
57
55
|
* lastUnit: 1,
|
|
58
56
|
* });
|
|
@@ -145,14 +143,14 @@ export default class CircuitSection extends JSONSupport {
|
|
|
145
143
|
get subcircuit(): Subcircuit | null | undefined;
|
|
146
144
|
set subcircuit(value: SubcircuitProperties | null | undefined);
|
|
147
145
|
/**
|
|
148
|
-
* Returns the value of the specified attribute.
|
|
146
|
+
* Returns the value of the specified user-defined attribute.
|
|
149
147
|
*
|
|
150
148
|
* @param name - The name of the attribute.
|
|
151
149
|
* @returns Returns the value of the attribute specified by `name`.
|
|
152
150
|
*/
|
|
153
151
|
getAttribute<T = any>(name: string): T;
|
|
154
152
|
/**
|
|
155
|
-
* Sets a new value for the specified attribute.
|
|
153
|
+
* Sets a new value for the specified user-defined attribute.
|
|
156
154
|
*
|
|
157
155
|
* @param name - The name of the attribute to set.
|
|
158
156
|
* @param newValue - The new value to set on the named attribute.
|
|
@@ -41,14 +41,14 @@ export default class Subcircuit extends JSONSupport {
|
|
|
41
41
|
*/
|
|
42
42
|
accessor state: SubcircuitState;
|
|
43
43
|
/**
|
|
44
|
-
* Returns the value of the specified attribute.
|
|
44
|
+
* Returns the value of the specified user-defined attribute.
|
|
45
45
|
*
|
|
46
46
|
* @param name - The name of the attribute.
|
|
47
47
|
* @returns Returns the value of the attribute specified by `name`.
|
|
48
48
|
*/
|
|
49
49
|
getAttribute<T = any>(name: string): T;
|
|
50
50
|
/**
|
|
51
|
-
* Sets a new value for the specified attribute.
|
|
51
|
+
* Sets a new value for the specified user-defined attribute.
|
|
52
52
|
*
|
|
53
53
|
* @param name - The name of the attribute to set.
|
|
54
54
|
* @param newValue - The new value to set on the named attribute.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.89",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN copyright.txt",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@amcharts/amcharts5": "~5.15.
|
|
22
|
-
"@arcgis/toolkit": "^5.0.0-next.
|
|
21
|
+
"@amcharts/amcharts5": "~5.15.1",
|
|
22
|
+
"@arcgis/toolkit": "^5.0.0-next.117",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.0.0-next.28",
|
|
25
25
|
"@vaadin/grid": "~24.9.6",
|
|
26
|
-
"@zip.js/zip.js": "~2.8.
|
|
26
|
+
"@zip.js/zip.js": "~2.8.14",
|
|
27
27
|
"luxon": "~3.7.2",
|
|
28
28
|
"marked": "~17.0.1",
|
|
29
29
|
"tslib": "^2.8.1"
|
|
@@ -182,6 +182,7 @@ export default class FlowRenderer extends FlowRendererSuperclass {
|
|
|
182
182
|
* > [!WARNING]
|
|
183
183
|
* >
|
|
184
184
|
* > **Notes**
|
|
185
|
+
* >
|
|
185
186
|
* > While density can exceed 1, the effective maximum number of streamlines is constrained by factors such as screen size and [trailLength](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailLength) property. At high densities, new streamlines may be discarded to avoid cluttered visualizations and excessive computation time.
|
|
186
187
|
*
|
|
187
188
|
* |`density = 0.1` | `density = 1` | `density = 1.5` |
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{toHSV as o,toLAB as r,toLCH as t,toRGB as l}from"../../core/colorUtils.js";import{JSONMap as e}from"../../core/jsonMap.js";import{isSerializable as i}from"../../core/support/jsonUtils.js";const n=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],C=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],m=new e({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function a(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function g(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r}function p(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map(o=>g(o)),r):r}return g(o)}function u(o,r){const t=r??C;if("algorithmic"===o.type){const r=o.fromColor.toRgb(),l=o.toColor.toRgb();return t.find(o=>a(r,o.fromColor)&&a(l,o.toColor))?.id}if(o.weights?.length)return;const l=o.colorRamps?.map(o=>({fromColor:o.fromColor.toRgb(),toColor:o.toColor.toRgb()}));return t.find(o=>{const r=o.colorRamps;return!(!l||!r||l.length!==r.length)&&r.every((o,r)=>a(l[r].fromColor,o.fromColor)&&a(l[r].toColor,o.toColor))})?.id}function f(o,r,t=!1){if(!o)return;let l=!1,e=u(o,r);return null!=e||t||(l=!0,e=u(o=p(o),r)),e?{id:e,inverted:l}:void 0}function s(o,r=!1){const t="string"==typeof o?o:f(o,void 0,r)?.id;return t?m.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=C.find(({id:r})=>r===o);return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map(o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]}))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function c(o){o??={};const r=o.numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function h(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,m=0===r.s;let a=o.h,g=r.h;C&&!m?a=g:m&&!C&&(r={...r,h:a},g=a);let p=Math.abs(g-a),u=0;const f=360;p<f/2?u=(g-a)*i:(p=f-p,u=a>g?p*i:-p*i);const s=(r.s-o.s)*i,d=(r.v-o.v)*i;let{s:c,v:h}=o,b=a;if(e){const o=e/i;b=(b+o*u+f)%f,c+=o*s,h+=o*d}const v=[];for(let y=0;y<l-1;y++)v.push({h:b,s:c,v:h}),b=(b+u+f)%f,c+=s,h+=d;return v.push(n?{h:b,s:c,v:h}:r),v}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a:m,b:a}=o;const g=(r.l-C)*i,p=(r.a-m)*i,u=(r.b-a)*i,f=[];if(e){const o=e/i;C+=o*g,m+=o*p,a+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a:m,b:a}),C+=g,m+=p,a+=u;return f.push(n?{l:C,a:m,b:a}:r),f}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,m=r.h,a=2*Math.PI;let g=0;if(C<=m){const o=m-C,r=m-C-a;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=m+a-C,r=m-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c:d,h:c}=o;if(e){const o=e/i;s+=o*u,d+=o*f,c=(c+o*p+a)%a}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c:d,h:c}),s+=u,d+=f,c=(c+p+a)%a;return h.push(n?{l:s,c:d,h:c}:r),h}function y(e,i){const{fromColor:n,toColor:C}=e,m=3===n.length?[...n,255]:[...n],a=3===C.length?[...C,255]:[...C],g=e.algorithm||"esriCIELabAlgorithm",p=c(i),{numColors:u,distanceOffset:f,isCustomInterval:s,interpolateAlpha:d}=p;if(1===u&&0===f)return[m];if(2===u&&0===f&&!s)return[m,a];const y={r:m[0],g:m[1],b:m[2]},k={r:a[0],g:a[1],b:a[2]},R="esriCIELabAlgorithm"===g?b(r(y),r(k),p):"esriHSVAlgorithm"===g?h(o(y),o(k),p):v(t(y),t(k),p),w=[],B=m[3]??255,D=((a[3]??255)-B)/(u-1);for(let o=0;o<u;o++){const{r,g:t,b:e}=l(R[o]),i=d?Math.round(B+D*o):255;w.push([r,t,e,i])}return w}function k(o,r){const{colorRamps:t}=o;if(r??=t.map(({start:o,stop:r})=>null==o||null==r?-1:r-o),r.length!==t.length||r.some(o=>o<0))return Array.from({length:t.length},()=>1/t.length);const l=r.reduce((o,r)=>o+r);return r.map(o=>o/l)}function R(o,r){const{numColors:t,interpolateAlpha:l}=c(r),e=k(o,r?.weights),{colorRamps:i}=o,n=[],C=1/(t-1);let m=0,a=!1;for(let p=0;p<i.length;p++){const o=n.length,r=a?0:o*C-m;m+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(a=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=i(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach((o,r)=>{o.unshift(r),l||o.pop()}),t}function D(r){const t=[];for(let l=0;l<r.length;l+=4){const e=o({r:r[l],g:r[l+1],b:r[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(r){const t=o(r);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function A(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function G(o){const r=s(o);if(!r)return null;if("algorithmic"===o.type)return{...A(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(A);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function P(o){const r=[...o].reverse().map(o=>{const r=o.toString(16);return r.length<2?"0"+r:r});return 4294967295&Number.parseInt(r.join(""),16)}export{m as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,P as convertRGBATo32Bit,D as createHsvMap,f as getColorRampId,d as getColorRampJSON,s as getColorRampName,G as getRFxArgColorRampValue,C as predefinedJsonColorRamps,n as rasterColormapNames};
|
|
5
|
+
import{toHSV as o,toLAB as r,toLCH as t,toRGB as l}from"../../core/colorUtils.js";import{JSONMap as e}from"../../core/jsonMap.js";import{isSerializable as i}from"../../core/support/jsonUtils.js";const n=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],C=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],m=new e({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function a(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function g(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r}function p(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map(o=>g(o)),r):r}return g(o)}function u(o,r){const t=r??C;if("algorithmic"===o.type){const r=o.fromColor.toRgb(),l=o.toColor.toRgb();return t.find(o=>a(r,o.fromColor)&&a(l,o.toColor))?.id}if(o.weights?.length)return;const l=o.colorRamps?.map(o=>({fromColor:o.fromColor.toRgb(),toColor:o.toColor.toRgb()}));return t.find(o=>{const r=o.colorRamps;return!(!l||l.length!==r?.length)&&r.every((o,r)=>a(l[r].fromColor,o.fromColor)&&a(l[r].toColor,o.toColor))})?.id}function f(o,r,t=!1){if(!o)return;let l=!1,e=u(o,r);return null!=e||t||(l=!0,e=u(o=p(o),r)),e?{id:e,inverted:l}:void 0}function s(o,r=!1){const t="string"==typeof o?o:f(o,void 0,r)?.id;return t?m.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=C.find(({id:r})=>r===o);return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map(o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]}))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function c(o){o??={};const r=o.numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function h(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,m=0===r.s;let a=o.h,g=r.h;C&&!m?a=g:m&&!C&&(r={...r,h:a},g=a);let p=Math.abs(g-a),u=0;const f=360;p<f/2?u=(g-a)*i:(p=f-p,u=a>g?p*i:-p*i);const s=(r.s-o.s)*i,d=(r.v-o.v)*i;let{s:c,v:h}=o,b=a;if(e){const o=e/i;b=(b+o*u+f)%f,c+=o*s,h+=o*d}const v=[];for(let y=0;y<l-1;y++)v.push({h:b,s:c,v:h}),b=(b+u+f)%f,c+=s,h+=d;return v.push(n?{h:b,s:c,v:h}:r),v}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a:m,b:a}=o;const g=(r.l-C)*i,p=(r.a-m)*i,u=(r.b-a)*i,f=[];if(e){const o=e/i;C+=o*g,m+=o*p,a+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a:m,b:a}),C+=g,m+=p,a+=u;return f.push(n?{l:C,a:m,b:a}:r),f}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,m=r.h,a=2*Math.PI;let g=0;if(C<=m){const o=m-C,r=m-C-a;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=m+a-C,r=m-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c:d,h:c}=o;if(e){const o=e/i;s+=o*u,d+=o*f,c=(c+o*p+a)%a}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c:d,h:c}),s+=u,d+=f,c=(c+p+a)%a;return h.push(n?{l:s,c:d,h:c}:r),h}function y(e,i){const{fromColor:n,toColor:C}=e,m=3===n.length?[...n,255]:[...n],a=3===C.length?[...C,255]:[...C],g=e.algorithm||"esriCIELabAlgorithm",p=c(i),{numColors:u,distanceOffset:f,isCustomInterval:s,interpolateAlpha:d}=p;if(1===u&&0===f)return[m];if(2===u&&0===f&&!s)return[m,a];const y={r:m[0],g:m[1],b:m[2]},k={r:a[0],g:a[1],b:a[2]},R="esriCIELabAlgorithm"===g?b(r(y),r(k),p):"esriHSVAlgorithm"===g?h(o(y),o(k),p):v(t(y),t(k),p),w=[],B=m[3]??255,D=((a[3]??255)-B)/(u-1);for(let o=0;o<u;o++){const{r,g:t,b:e}=l(R[o]),i=d?Math.round(B+D*o):255;w.push([r,t,e,i])}return w}function k(o,r){const{colorRamps:t}=o;if(r??=t.map(({start:o,stop:r})=>null==o||null==r?-1:r-o),r.length!==t.length||r.some(o=>o<0))return Array.from({length:t.length},()=>1/t.length);const l=r.reduce((o,r)=>o+r);return r.map(o=>o/l)}function R(o,r){const{numColors:t,interpolateAlpha:l}=c(r),e=k(o,r?.weights),{colorRamps:i}=o,n=[],C=1/(t-1);let m=0,a=!1;for(let p=0;p<i.length;p++){const o=n.length,r=a?0:o*C-m;m+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(a=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=i(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach((o,r)=>{o.unshift(r),l||o.pop()}),t}function D(r){const t=[];for(let l=0;l<r.length;l+=4){const e=o({r:r[l],g:r[l+1],b:r[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(r){const t=o(r);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function A(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function G(o){const r=s(o);if(!r)return null;if("algorithmic"===o.type)return{...A(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(A);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function P(o){const r=[...o].reverse().map(o=>{const r=o.toString(16);return r.length<2?"0"+r:r});return 4294967295&Number.parseInt(r.join(""),16)}export{m as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,P as convertRGBATo32Bit,D as createHsvMap,f as getColorRampId,d as getColorRampJSON,s as getColorRampName,G as getRFxArgColorRampValue,C as predefinedJsonColorRamps,n as rasterColormapNames};
|
|
@@ -433,7 +433,7 @@ export interface DeleteAssociationEditAllFields {
|
|
|
433
433
|
*
|
|
434
434
|
* @since 5.0
|
|
435
435
|
*/
|
|
436
|
-
fromTerminalId
|
|
436
|
+
fromTerminalId?: number | null;
|
|
437
437
|
/**
|
|
438
438
|
* The global ID of the association to delete.
|
|
439
439
|
*
|
|
@@ -457,7 +457,7 @@ export interface DeleteAssociationEditAllFields {
|
|
|
457
457
|
*
|
|
458
458
|
* @since 5.0
|
|
459
459
|
*/
|
|
460
|
-
toTerminalId
|
|
460
|
+
toTerminalId?: number | null;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
/**
|
|
@@ -8,7 +8,6 @@ export interface GraphSearchProperties extends Partial<Pick<GraphSearch, "search
|
|
|
8
8
|
* This operation allows you to search the properties of both [entities](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Entity.html) and
|
|
9
9
|
* [relationships](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Relationship.html) in the graph.
|
|
10
10
|
* Any field with the Text data type or the [Globally Unique Identifier (GUID)](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/arcgis-field-data-types.htm#GUID-97064FAE-B42E-4DC3-A5C9-9A6F12D053A8) data type with the
|
|
11
|
-
* Any field defined by [GraphProperty](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html) with the `searchable` property set to `true` is included in the search.
|
|
12
11
|
* A search index is built and maintained automatically on the values for all searchable fields.
|
|
13
12
|
*
|
|
14
13
|
* @since 4.25
|