@arcgis/core 5.1.0-next.111 → 5.1.0-next.112
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/analysis/ElevationProfile/ElevationProfileGroup.d.ts +3 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -0
- package/analysis/ElevationProfileAnalysis.d.ts +5 -0
- package/analysis/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +13 -4
- package/analysis/ShadowCastAnalysis.d.ts +8 -5
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeEnvironment.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/debug.js +1 -1
- package/arcade/enum.js +1 -1
- package/arcade/executionError.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade.js +1 -1
- package/assets/components/assets/icon/returnToDefault16.json +1 -0
- package/assets/components/assets/icon/returnToDefault24.json +1 -0
- package/assets/components/assets/icon/returnToDefault32.json +1 -0
- package/assets/components/assets/icon/reviewMap16.json +1 -0
- package/assets/components/assets/icon/reviewMap24.json +1 -0
- package/assets/components/assets/icon/reviewMap32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03babc21d1781142a974.js +1 -0
- package/assets/esri/core/workers/chunks/08efd64acdfe46985293.js +1 -0
- package/assets/esri/core/workers/chunks/0b76534b60014d74ecb9.js +1 -0
- package/assets/esri/core/workers/chunks/{622bdd1b9d5d292ec12b.js → 0e6a388d51d9dbae46ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{34e026549ba2822b8ebd.js → 13d43a0683c42b94feb6.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f9ea7544b2d0e88a05c.js → 13f0e08de2dfab07d212.js} +1 -1
- package/assets/esri/core/workers/chunks/{35bbd63319d8aa9f31cc.js → 169c9eb6cd000e067c4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d4014213c476bf8099af.js → 18c4207b1cb0777560ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{58c15c42e6a618386a2f.js → 1c8c8050d60205cf2156.js} +1 -1
- package/assets/esri/core/workers/chunks/1f537c05c2f643acb5e7.js +1 -0
- package/assets/esri/core/workers/chunks/241aeff6afd074ce105b.js +1 -0
- package/assets/esri/core/workers/chunks/{ddebc1dc10a2d207389f.js → 282f3d364411efac7b80.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6d5ee9d0d998d730f81.js → 2bd334f9ab89334df713.js} +1 -1
- package/assets/esri/core/workers/chunks/340c68d09d2e8bef6727.js +2 -0
- package/assets/esri/core/workers/chunks/{17604cbd4d24158e2c16.js → 3835097520296b0517af.js} +1 -1
- package/assets/esri/core/workers/chunks/481dc7503587972a6bd2.js +2 -0
- package/assets/esri/core/workers/chunks/{9f4a9b193485f88d4461.js → 4afe76de6e82e86fe697.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac408c62565e2c8b5975.js → 4c5cdd2712c938fafc5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{ece30bfd5c49b8d99752.js → 5e5c7cc74ff1c9603aff.js} +1 -1
- package/assets/esri/core/workers/chunks/{502c3da8c49bf885f51d.js → 63ea9035dcf9ce45560c.js} +1 -1
- package/assets/esri/core/workers/chunks/{33ec193e6d7a0cb9d8dd.js → 6b66a6f69aa03338c346.js} +1 -1
- package/assets/esri/core/workers/chunks/{56b6b68d9459b1edea43.js → 6c97b5bc408f051606d2.js} +1 -1
- package/assets/esri/core/workers/chunks/{94eab215bab3e4e0e5b5.js → 711d1873c760313e287f.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e13d639419ac64f7563.js → 7c077e1a63ab97bf3e87.js} +1 -1
- package/assets/esri/core/workers/chunks/86f2de7dda7992ae706c.js +1 -0
- package/assets/esri/core/workers/chunks/{a29cd1f5c7bb4f6a5a4f.js → 8d4881c879c86b353e08.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e21675bbd7a44070771.js → 8ff83c59462dea6e3427.js} +1 -1
- package/assets/esri/core/workers/chunks/979bab62cad788180770.js +1 -0
- package/assets/esri/core/workers/chunks/9890c85a238879490926.js +1 -0
- package/assets/esri/core/workers/chunks/9ebc461529d5286fa2c2.js +2 -0
- package/assets/esri/core/workers/chunks/a95398214e530f896a2d.js +1 -0
- package/assets/esri/core/workers/chunks/{fc1fe1f58a65a1694c09.js → b02a68bbab07557cf02d.js} +1 -1
- package/assets/esri/core/workers/chunks/ba31616de9d73d83d867.js +1 -0
- package/assets/esri/core/workers/chunks/c7662455252b48531da1.js +1 -0
- package/assets/esri/core/workers/chunks/ca92176d5348e2c533d7.js +1 -0
- package/assets/esri/core/workers/chunks/cd5206e19d86c60e3cf0.js +1 -0
- package/assets/esri/core/workers/chunks/{bfb417d72d0c90e116fe.js → cedf3e316d6f89cf7005.js} +1 -1
- package/assets/esri/core/workers/chunks/d02aa7438f46c1c2167a.js +2 -0
- package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +1 -0
- package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +1 -0
- package/assets/esri/core/workers/chunks/e0036fa0324a96a88248.js +1 -0
- package/assets/esri/core/workers/chunks/{55334ad3618899cdbf78.js → e5854a3f69dffaf9464d.js} +2 -2
- package/assets/esri/core/workers/chunks/ed939fd5d3827a3f70e0.js +1 -0
- package/assets/esri/core/workers/chunks/fe8334352d256d691a95.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/package.json +2 -2
- package/renderers/ClassBreaksRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/support/TranslateContent.js +1 -1
- package/rest/support/TranslateParameters.js +1 -1
- package/rest/support/TranslateResult.js +1 -1
- package/rest/translate.js +1 -1
- package/rest/utils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +2 -0
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathFrame2D.js +2 -0
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertexInfo.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.d.ts +2 -0
- package/views/LinkChartView.d.ts +47 -0
- package/views/MapView.d.ts +1 -85
- package/views/VideoView.d.ts +8 -1
- package/views/View2D.d.ts +78 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/types.d.ts +2 -3
- package/views/ui/DefaultUI.d.ts +1 -0
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/FovOverlay.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +0 -2
- package/assets/esri/core/workers/chunks/286bf3be9f524bde9529.js +0 -1
- package/assets/esri/core/workers/chunks/36ecb0082b8804b10fbf.js +0 -1
- package/assets/esri/core/workers/chunks/41a95ad470ec42ecd5a2.js +0 -1
- package/assets/esri/core/workers/chunks/547dc6ccb989bd962661.js +0 -1
- package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +0 -2
- package/assets/esri/core/workers/chunks/56d9d3f108ff6e719dd4.js +0 -1
- package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +0 -1
- package/assets/esri/core/workers/chunks/63934843c9f4ef779a07.js +0 -1
- package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +0 -2
- package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +0 -1
- package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +0 -1
- package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +0 -1
- package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +0 -1
- package/assets/esri/core/workers/chunks/a913a1c83a667ed0e711.js +0 -1
- package/assets/esri/core/workers/chunks/b69d1d528e271568cbd8.js +0 -2
- package/assets/esri/core/workers/chunks/bc249bb667f0564ad093.js +0 -1
- package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +0 -1
- package/assets/esri/core/workers/chunks/cdb48d198145493f76f3.js +0 -1
- package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +0 -1
- package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +0 -1
- package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +0 -1
- /package/assets/esri/core/workers/chunks/{69c9eb93553b006b640d.js.LICENSE.txt → 340c68d09d2e8bef6727.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{549d348ca181d06aefb7.js.LICENSE.txt → 481dc7503587972a6bd2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{1d1929f98d941179be29.js.LICENSE.txt → 9ebc461529d5286fa2c2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b69d1d528e271568cbd8.js.LICENSE.txt → d02aa7438f46c1c2167a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{55334ad3618899cdbf78.js.LICENSE.txt → e5854a3f69dffaf9464d.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{JSONSupport as
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as t}from"../../core/lang.js";import o from"../../core/Warning.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{persistable as a}from"../../core/accessorSupport/decorators/persistable.js";import n from"../../geometry/Polygon.js";import{canProjectWithoutEngine as p,projectPolygon as c}from"../../geometry/projectionUtils.js";import l from"../../geometry/SpatialReference.js";import{equals as m}from"../../geometry/support/spatialReferenceUtils.js";import{isInitialized as f,switchMeshModificationPolygonVCSSync as y}from"../../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as d,fromWasmModification as u}from"../../views/3d/layers/SceneLayerWorkerHandle.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";var S;let h=S=class extends r{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,r,t,s){if(this._needWGS84Conversion(s))this._doWGS84Conversion(r,t,s);else if(s.layer?.spatialReference&&!s.layer.spatialReference.equals(this.geometry.spatialReference)){if(!p(e.spatialReference,s.layer.spatialReference))return void(s?.messages&&s.messages.push(new o("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:s.layer.spatialReference,context:s})));const i=new n;c(e,i,s.layer.spatialReference),r[t]=i.toJSON(s)}else r[t]=e.toJSON(s)}_needWGS84Conversion(e){if("integrated-mesh-3dtiles"===e.layer?.type){const r=e.layer;return!r.esriCrsSpatialReference||!m(r.esriCrsSpatialReference,this.geometry.spatialReference)}return!1}_doWGS84Conversion(e,r,t){let s=!0;if(f()){const o=d(null,[this],l.WGS84);if(o.length>1){const i=y({modifications:o,inVCS:5773});if(i.success&&i.modifications){const o=[this.clone()];u(i.modifications,o),1===o.length&&o[0].geometry&&(o[0].geometry.spatialReference=t.layer?.spatialReference,e[r]=o[0].geometry.toJSON(t),s=!1)}}}s&&t?.messages&&t.messages.push(new o("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:t.layer?.spatialReference,context:t}))}clone(){return new S({geometry:t(this.geometry),type:this.type})}};e([s({type:n}),a()],h.prototype,"geometry",void 0),e([g(["web-scene","portal-item"],"geometry")],h.prototype,"writeGeometry",null),e([s({type:["clip","mask","replace"],nonNullable:!0}),a()],h.prototype,"type",void 0),h=S=e([i("esri.layers.support.SceneModification")],h);export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as r}from"tslib";import
|
|
2
|
+
import{__decorate as r}from"tslib";import e from"../../request.js";import o from"../../core/Collection.js";import{JSONSupportMixin as t}from"../../core/JSONSupport.js";import{urlToObject as s}from"../../core/urlUtils.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import a from"./SceneModification.js";var c;let m=c=class extends(t(o.ofType(a))){constructor(r){super(r),this.url=null}clone(){return new c({url:this.url,items:this.items.map(r=>r.clone())})}toJSON(r){return this.toArray().map(e=>e.toJSON(r)).filter(r=>!!r.geometry)}static fromJSON(r,e){const o=new c;for(const t of r)o.add(a.fromJSON(t,e));return o}static async fromUrl(r,o,t,i=!1){const n={url:s(r),origin:"service"},m=await e(r,{responseType:"json",signal:t?.signal}),l=o.toJSON(),p=[];for(const e of m.data){let r=l;i&&e.geometry.spatialReference&&(r=e.geometry.spatialReference),p.push(a.fromJSON({...e,geometry:{spatialReference:r,...e.geometry}},n))}return new c({url:r,items:p})}};r([i({type:String})],m.prototype,"url",void 0),m=c=r([n("esri.layers.support.SceneModifications")],m);export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import
|
|
2
|
+
import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import r from"../../geometry/SpatialReference.js";import{createFileProvider as i}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as s}from"./fieldUtils.js";import a from"./GeometryEncodingLocation.js";import l from"./GeometryEncodingWkb.js";import{inferLocationInfo as p}from"./locationUtils.js";import c from"./ParquetFilesData.js";import{createParquetFile as u,readGeoMetadata as m,readGeodisplayMetadata as d}from"../../libs/parquet/parquet.js";const f=new o({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),y=new Set(["uncompressed","snappy","gzip"]);function g(e){return f.toJSON(e)}function w(e){return f.fromJSON(e)}async function h(t,o={}){const r=Array.isArray(t)?new c({urls:new e(t)}):t,n=await k(r,o);return q(i(n,()=>o.customParameters),{data:r})}async function q(e,o){if(o.geometryType&&o.spatialReference&&o.geometryEncoding&&o.fields)return o;const i=await e.getFileList();if(!i.length)throw new t("parquet:bad-input","At least one url must be specified");const a=await u(i[0],{provider:e});for(const r of a.compressionCodecs())if(!y.has(r))throw new t("parquet:unsupported",`Compression codec ${r} is unsupported. Must be of type ${Array.from(y).join(",")}`);const l=m(a),p={...o,file:a};if(null==p.fields&&(p.fields=a.fields(!1).map(e=>n.fromJSON({name:e.name,alias:e.name,type:e.type}))),null!=p.geometryEncoding){const e=p.geometryEncoding;switch(e.type){case"wkb":{const o=p.fields.find(t=>t.name===e.field);if(!o)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==o.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${o.type} but expected 'blob'`);break}case"location":for(const o of[e.xField,e.yField])if(null!=o){const e=p.fields.find(e=>e.name===o);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${o} which does not exist`);if(!s(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}null==p.geometryEncoding&&(p.geometryEncoding=b(l,p.fields));const c=d(a);if(c&&(p.displayOptimization=c),p.geometryEncoding)switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=r.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!l)return p;const e=l.primary_column,t=l.columns[e];if(p.geometryType||(p.geometryType=j(t)),p.spatialReference||(p.spatialReference=F(t)),p.fields)for(const o of Object.keys(l.columns))p.fields=p.fields.filter(e=>e.name!==o)}}if(p.displayOptimization){const e=p.displayOptimization.index;if(!p.spatialReference&&e.wkid&&(p.spatialReference=new r({wkid:e.wkid})),!p.geometryType)switch(e.type){case"z":p.geometryType="point";break;case"xz":p.geometryType=e.geometryType}}return p}function b(e,t){if(null!=e){const t=e.primary_column,o=e.columns[t];return new l({field:t,orientation:"counterclockwise"===o.orientation?"counter-clockwise":null})}const o=t.filter(e=>s(e)).map(e=>e.name),r=p(o);return r.latitudeFieldName&&r.longitudeFieldName?new a({xField:r.longitudeFieldName,yField:r.latitudeFieldName}):null}function P(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}function j(e){const{geometry_types:o}=e,r=new Set;for(const t of o){const e=P(t);e&&r.add(e)}if(r.size>1)throw new t("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:r});return 1===r.size?r.values().next().value:void 0}function F(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new r({wkid:t}):void 0}async function k(e,o){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const r=await e.portalItem.load(o);switch(r.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,modified:r.modified,size:r.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!r.url)throw new t("parquet:bad-item",`Item of type ${r.type} must have a url defined`,r);return{type:"portal-parquet-layer",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,itemMetadata:{modified:r.modified,url:r.url}};default:throw new t("parquet:bad-item",`Item of type ${r.type} is not supported`,r)}}}}export{q as completeParquetLayerInfo,k as createFileProviderSchema,w as fromParquetJSONGeometryType,h as getParquetLayerInfo,f as parquetGeometryTypeKebabDict,g as toParquetJSONGeometryType};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.112",
|
|
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": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@amcharts/amcharts5": "~5.17.2",
|
|
22
22
|
"@arcgis/toolkit": "^5.1.0-next.111",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
|
-
"@esri/calcite-components": "^5.1.0-next.
|
|
24
|
+
"@esri/calcite-components": "^5.1.0-next.60",
|
|
25
25
|
"@vaadin/grid": "~25.1.3",
|
|
26
26
|
"@zip.js/zip.js": "~2.8.26",
|
|
27
27
|
"luxon": "~3.7.2",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{JSONMap as s}from"../core/jsonMap.js";import{clone as t}from"../core/lang.js";import o from"../core/Logger.js";import{property as i,cast as l,subclass as r}from"../core/accessorSupport/decorators.js";import{ensureString as a,ensureType as n}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as u,collectField as p}from"../layers/support/fieldUtils.js";import c from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import d from"./support/ClassBreakInfo.js";import{rendererBackgroundFillSymbolProperty as f,rendererSymbolProperty as h}from"./support/commonProperties.js";import y from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as g}from"./support/scaleDependentSymbolUtils.js";import{loadArcade as x}from"../support/loadArcade.js";import{ensureType as k}from"../symbols/support/typeUtils.js";import{reader as I}from"../core/accessorSupport/decorators/reader.js";import{writer as b}from"../core/accessorSupport/decorators/writer.js";import{enumeration as v}from"../core/accessorSupport/decorators/enumeration.js";var B;const V="log",F="percent-of-total",S="field",E=new s({esriNormalizeByLog:V,esriNormalizeByPercentOfTotal:F,esriNormalizeByField:S}),w=n(d);let j=B=class extends(m(c)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,s,t){if(!Array.isArray(e))return;let o=s.minValue;return e.map(e=>{const s=new d;return s.read(e,t),null==s.minValue&&(s.minValue=o),null==s.maxValue&&(s.maxValue=s.minValue),o=s.maxValue,s})}writeClassBreakInfos(e,s,t,o){const i=e.map(e=>e.write({},o));this._areClassBreaksConsecutive()&&i.forEach(e=>delete e.classMinValue),s[t]=i}castField(e){return null==e?e:"function"==typeof e?(o.getLogger(this).error(".field: field must be a string value"),null):a(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const s=!!this.normalizationField,t=null!=this.normalizationTotal;return s||t?(e=s&&S||t&&F||null,s&&t&&o.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==S&&e!==F||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,s,o){let i=null;i="number"==typeof e?new d({minValue:e,maxValue:s,symbol:k(o)}):w(t(e)),this.classBreakInfos.push(i),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,s){const t=this.classBreakInfos.length;for(let o=0;o<t;o++){const t=[this.classBreakInfos[o].minValue,this.classBreakInfos[o].maxValue];if(t[0]===e&&t[1]===s){this.classBreakInfos.splice(o,1);break}}}getBreakIndex(e,s){return this.valueExpression&&null==s?.arcade&&o.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,s):this._getBreakIndexForField(e)}async getClassBreakInfo(e,s){let t=s;this.valueExpression&&null==s?.arcade&&(t={...t,arcade:await x()});const o=this.getBreakIndex(e,t);return-1!==o?this.classBreakInfos[o]:null}getSymbol(e,s){if(this.valueExpression&&null==s?.arcade)return void o.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const t=this.getBreakIndex(e,s);return-1===t?this.defaultSymbol:g(this.classBreakInfos[t],s?.scale)??this.defaultSymbol}async getSymbolAsync(e,s){let t=s;if(this.valueExpression&&null==s?.arcade){const e=await x(),{arcadeUtils:s}=e;s.hasGeometryOperations(this.valueExpression)&&await s.enableGeometryOperations(),t={...t,arcade:e}}const o=this.getBreakIndex(e,t);return-1===o?this.defaultSymbol:g(this.classBreakInfos[o],
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONMap as s}from"../core/jsonMap.js";import{clone as t}from"../core/lang.js";import o from"../core/Logger.js";import{property as i,cast as l,subclass as r}from"../core/accessorSupport/decorators.js";import{ensureString as a,ensureType as n}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as u,collectField as p}from"../layers/support/fieldUtils.js";import c from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import d from"./support/ClassBreakInfo.js";import{rendererBackgroundFillSymbolProperty as f,rendererSymbolProperty as h}from"./support/commonProperties.js";import y from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as g}from"./support/scaleDependentSymbolUtils.js";import{loadArcade as x}from"../support/loadArcade.js";import{ensureType as k}from"../symbols/support/typeUtils.js";import{reader as I}from"../core/accessorSupport/decorators/reader.js";import{writer as b}from"../core/accessorSupport/decorators/writer.js";import{enumeration as v}from"../core/accessorSupport/decorators/enumeration.js";var B;const V="log",F="percent-of-total",S="field",E=new s({esriNormalizeByLog:V,esriNormalizeByPercentOfTotal:F,esriNormalizeByField:S}),w=n(d);let j=B=class extends(m(c)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,s,t){if(!Array.isArray(e))return;let o=s.minValue;return e.map(e=>{const s=new d;return s.read(e,t),null==s.minValue&&(s.minValue=o),null==s.maxValue&&(s.maxValue=s.minValue),o=s.maxValue,s})}writeClassBreakInfos(e,s,t,o){const i=e.map(e=>e.write({},o));this._areClassBreaksConsecutive()&&i.forEach(e=>delete e.classMinValue),s[t]=i}castField(e){return null==e?e:"function"==typeof e?(o.getLogger(this).error(".field: field must be a string value"),null):a(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const s=!!this.normalizationField,t=null!=this.normalizationTotal;return s||t?(e=s&&S||t&&F||null,s&&t&&o.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==S&&e!==F||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,s,o){let i=null;i="number"==typeof e?new d({minValue:e,maxValue:s,symbol:k(o)}):w(t(e)),this.classBreakInfos.push(i),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,s){const t=this.classBreakInfos.length;for(let o=0;o<t;o++){const t=[this.classBreakInfos[o].minValue,this.classBreakInfos[o].maxValue];if(t[0]===e&&t[1]===s){this.classBreakInfos.splice(o,1);break}}}getBreakIndex(e,s){return this.valueExpression&&null==s?.arcade&&o.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,s):this._getBreakIndexForField(e)}async getClassBreakInfo(e,s){let t=s;this.valueExpression&&null==s?.arcade&&(t={...t,arcade:await x()});const o=this.getBreakIndex(e,t);return-1!==o?this.classBreakInfos[o]:null}getSymbol(e,s){if(this.valueExpression&&null==s?.arcade)return void o.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const t=this.getBreakIndex(e,s);return-1===t?this.defaultSymbol:g(this.classBreakInfos[t],s?.scale)??this.defaultSymbol}async getSymbolAsync(e,s){let t=s;if(this.valueExpression&&null==s?.arcade){const e=await x(),{arcadeUtils:s}=e;s.hasGeometryOperations(this.valueExpression)&&await s.enableGeometryOperations(),t={...t,arcade:e}}const o=this.getBreakIndex(e,t);return-1===o?this.defaultSymbol:g(this.classBreakInfos[o],t?.scale)??this.defaultSymbol}get symbols(){const e=[];return this.classBreakInfos.forEach(s=>{s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[])}),this.defaultSymbol&&e.push(this.defaultSymbol),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new B({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol?.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol?.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:t(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo)})}async collectRequiredFields(e,s){const t=[this.collectVVRequiredFields(e,s),this.collectSymbolFields(e,s)];await Promise.all(t)}async collectSymbolFields(e,s){const t=[...this.symbols.map(t=>t.collectRequiredFields(e,s)),u(e,s,null,this.valueExpression)];p(e,s,this.field),p(e,s,this.normalizationField),await Promise.all(t)}_getBreakIndexForExpression(e,s){const{viewingMode:t,scale:o,spatialReference:i,arcade:l,timeZone:r}=s??{},{valueExpression:a}=this;let n=this._compiledValueExpression.valueExpression===a?this._compiledValueExpression.compiledFunction:null;const u=l.arcadeUtils;if(!n){const e=u.createSyntaxTree(a);n=u.createFunction(e),this._compiledValueExpression.compiledFunction=n}this._compiledValueExpression.valueExpression=a;const p=u.executeFunction(n,u.createExecContext(e,u.getViewInfo({viewingMode:t,scale:o,spatialReference:i}),r));return this._getBreakIndexfromInfos(p)}_getBreakIndexForField(e){const s=this.field,t=e.attributes,o=this.normalizationType;let i=parseFloat(t[s]);if(o){const e=this.normalizationTotal,s=parseFloat(this.normalizationField?t[this.normalizationField]:void 0);if(o===V)i=Math.log(i)*Math.LOG10E;else if(o!==F||null==e||isNaN(e)){if(o===S&&!isNaN(s)){if(isNaN(i)||isNaN(s))return-1;i/=s}}else i=i/e*100}return this._getBreakIndexfromInfos(i)}_getBreakIndexfromInfos(e){const s=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let t=0;t<this.classBreakInfos.length;t++){const o=[this.classBreakInfos[t].minValue,this.classBreakInfos[t].maxValue];if(o[0]<=e&&(s?e<=o[1]:e<o[1]))return t}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,s=e.length;for(let t=1;t<s;t++)if(e[t-1].maxValue!==e[t].minValue)return!1;return!0}};e([i(f)],j.prototype,"backgroundFillSymbol",void 0),e([i({type:[d],json:{write:{isRequired:!0}}})],j.prototype,"classBreakInfos",void 0),e([I("classBreakInfos")],j.prototype,"readClassBreakInfos",null),e([b("classBreakInfos")],j.prototype,"writeClassBreakInfos",null),e([i({type:String,json:{write:!0}})],j.prototype,"defaultLabel",void 0),e([i(h)],j.prototype,"defaultSymbol",void 0),e([i({type:String,json:{write:!0}})],j.prototype,"field",void 0),e([l("field")],j.prototype,"castField",null),e([i({type:Boolean})],j.prototype,"isMaxInclusive",void 0),e([i({type:y,json:{write:!0}})],j.prototype,"legendOptions",void 0),e([i({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],j.prototype,"minValue",null),e([i({type:String,json:{write:!0}})],j.prototype,"normalizationField",void 0),e([i({type:Number,json:{write:!0}})],j.prototype,"normalizationTotal",void 0),e([i({type:E.apiValues,value:null,json:{type:E.jsonValues,read:E.read,write:E.write}})],j.prototype,"normalizationType",null),e([v({classBreaks:"class-breaks"})],j.prototype,"type",void 0),e([i({type:String,json:{write:!0}})],j.prototype,"valueExpression",void 0),e([i({type:String,json:{write:!0}})],j.prototype,"valueExpressionTitle",void 0),j=B=e([r("esri.renderers.ClassBreaksRenderer")],j);export{j as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{a as w,c as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let A=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[z(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[z(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[z(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[z(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[z(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[z(i)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],A.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],A.prototype,"type",void 0),e([o(y)],A.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],A.prototype,"field",null),e([r("field")],A.prototype,"castField",null),e([x("field")],A.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],A.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],A.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],A.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],A.prototype,"portal",void 0),e([E("portal",["styleName"])],A.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],A.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],A.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],A.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],A.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],A.prototype,"uniqueValueInfos",null),A=M=e([u("esri.renderers.UniqueValueRenderer")],A);export{A as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{a as w,c as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let A=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[z(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[z(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return _(i,s?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[z(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[z(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[z(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[z(i)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],A.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],A.prototype,"type",void 0),e([o(y)],A.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],A.prototype,"field",null),e([r("field")],A.prototype,"castField",null),e([x("field")],A.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],A.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],A.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],A.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],A.prototype,"portal",void 0),e([E("portal",["styleName"])],A.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],A.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],A.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],A.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],A.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],A.prototype,"uniqueValueInfos",null),A=M=e([u("esri.renderers.UniqueValueRenderer")],A);export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as r}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends o{constructor(r){super(r)}};r([t({type:String,json:{write:!0}})],s.prototype,"key",void 0),r([t({type:String,json:{write:!0}})],s.prototype,"text",void 0),s=r([e("esri.rest.support.TranslateContent")],s);export{s as
|
|
2
|
+
import{__decorate as r}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends o{constructor(r){super(r)}};r([t({type:String,json:{write:!0}})],s.prototype,"key",void 0),r([t({type:String,json:{write:!0}})],s.prototype,"text",void 0),s=r([e("esri.rest.support.TranslateContent")],s);export{s as TranslateContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{TranslateContent as p}from"./TranslateContent.js";let s=class extends r{constructor(t){super(t),this.outputCultures=null,this.input=null,this.portalUrl="https://www.arcgis.com",this.provider="default",this.inputCulture=null,this.requestSource=null}};t([o({type:[String],json:{write:!0}})],s.prototype,"outputCultures",void 0),t([o({type:[p],json:{write:!0}})],s.prototype,"input",void 0),t([o({type:String,json:{read:!1,write:!1}})],s.prototype,"portalUrl",void 0),t([o({type:String,json:{write:!0,default:"default"}})],s.prototype,"provider",void 0),t([o({type:String,json:{write:!0}})],s.prototype,"inputCulture",void 0),t([o({type:String,json:{read:!1,write:!1}})],s.prototype,"requestSource",void 0),s=t([e("esri.rest.support.TranslateParameters")],s);export{s as TranslateParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends t{
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends t{};e([r({type:String,json:{write:!0}})],s.prototype,"text",void 0),e([r({type:String,json:{write:!0}})],s.prototype,"to",void 0),s=e([o("esri.rest.support.TranslateResult.Translation")],s);let a=class extends t{constructor(e){super(e),this.detectedLanguage="en",this.detectedLanguageScore=-1}};e([r({type:String,json:{write:!0}})],a.prototype,"key",void 0),e([r({type:String,json:{read:{source:"detectedLanguage.language"},write:{target:"detectedLanguage.language"}}})],a.prototype,"detectedLanguage",void 0),e([r({type:Number,json:{read:{source:"detectedLanguage.score"},write:{target:"detectedLanguage.score"}}})],a.prototype,"detectedLanguageScore",void 0),e([r({type:[s],json:{write:!0}})],a.prototype,"translations",void 0),a=e([o("esri.rest.support.TranslateResult")],a);export{a as TranslateResult,s as Translation};
|
package/rest/translate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../request.js";import{getToken as
|
|
2
|
+
import t from"../request.js";import{getToken as r,parseUrl as o,asValidOptions as s}from"./utils.js";import{TranslateResult as e}from"./support/TranslateResult.js";async function a(a,u,p){const l=JSON.stringify(u.toJSON()),n={};"https://www.arcgis.com"!==u.portalUrl&&(n.portal=u.portalUrl),null!=u.requestSource&&(n.request_source=u.requestSource),n.token=await r(u.portalUrl,null,{signal:p?.signal,prompt:"no-prompt"!==p?.authMode});const m=o(a),i=s(m.query,{...p,query:n,body:l,method:"post",authMode:"anonymous"});return(await t(m.path,i)).data.results.map(t=>e.fromJSON(t))}export{a as translate};
|
package/rest/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{
|
|
2
|
+
import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{getApiKey as i,supportsApiKey as o}from"../support/apiKeyUtils.js";function s(t,n){return n?{...n,query:{...t,...n.query}}:{query:t}}function f(t){return"string"==typeof t?e(t):r(t)}function u(t,n,r){const e={};for(const i in t){if("declaredClass"===i)continue;const o=t[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))e[i]=o.map(t=>u(t));else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r?.[i]);e[i]=n?t:JSON.stringify(t)}else e[i]=n?o:JSON.stringify(o);else e[i]=o}return e}function c(t,r){return t?r&&o(t)?r:i(t)??n?.findCredential(t)?.token:null}async function a(r,e,i){const o=c(r,e);if(o)return o;!n&&t.request.useIdentity&&await import("../identity/IdentityManager.js");const s=await n.getCredential(r,i);return s?.token}export{s as asValidOptions,u as encode,c as findToken,a as getToken,f as parseUrl};
|
package/support/arcadeUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isPopupTemplate as e}from"../popupTemplateUtils.js";import{
|
|
2
|
+
import{isPopupTemplate as e}from"../popupTemplateUtils.js";import{b as r,v as n,x as t,f as o,h as i,j as l,l as u,s,n as c,D as f,z as p,B as m}from"../chunks/arcade.js";export{a as arcade}from"../chunks/arcade.js";import{ArcadeDate as d}from"../arcade/ArcadeDate.js";import{toSymbolId as y}from"../arcade/arcadeEnvironment.js";import v from"../arcade/Dictionary.js";import{Feature as g}from"../arcade/Feature.js";import{P as x,E as j,K as S,L as h,M as w}from"../chunks/languageUtils.js";import{Pixel as b}from"../arcade/Pixel.js";import{Voxel as A}from"../arcade/Voxel.js";import{clone as E}from"../core/lang.js";import{DateOnly as $}from"../core/sql/DateOnly.js";import{TimeOnly as F}from"../core/sql/TimeOnly.js";import I from"../geometry/Extent.js";import P from"../geometry/Multipoint.js";import M from"../geometry/Point.js";import D from"../geometry/Polygon.js";import _ from"../geometry/Polyline.js";import{isLabelClass as z}from"../layers/support/labelUtils.js";import{isSizeVariable as R}from"../renderers/visualVariables/support/sizeVariableUtils.js";import{isArray as T,isString as k,isBoolean as J,isNumber as C}from"./guards.js";const O={vars:{$feature:"any",$view:"any"}};function U(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function V(e){return null==e?null:T(e)||x(e)?"array":j(e)?"date":k(e)?"text":J(e)?"boolean":C(e)?"number":e instanceof v?"dictionary":S(e)?"feature":e instanceof M?"point":e instanceof D?"polygon":e instanceof _?"polyline":e instanceof P?"multipoint":e instanceof I?"extent":e instanceof $?"dateOnly":e instanceof F?"time":h(e)?"featureSet":w(e)?"featureSetCollection":null}function Z(e){if(!e)return null;try{return n(e)}catch(r){}return null}function q(e,n){const t="string"==typeof e?Z(e):e;if(!t)return null;try{return n=n||E(O),r(t,n)}catch(o){}return null}function G(e,r,n){return{vars:{$feature:null==e?new g:g.createFromGraphic(e,n),$view:r?.view},spatialReference:r?.sr,timeZone:n??null}}function L(e,r,n){return g.createFromGraphicLikeObject(r,e,n,null)}function B(e,r){null!=e.vars&&(e.vars.$feature=r)}function K(e,r){let n;try{n=l(e,r)}catch(t){n=null}return n}function N(e,r){let n;try{n=e?e(r):null}catch(t){n=null}return n}function H(e,r){try{return e?e(r):Promise.resolve(null)}catch(n){return Promise.resolve(null)}}const Q=["$feature","$aggregatedFeatures","$voxel"].map(e=>y(e));function W(e,r){if(!e)return[];const n="string"==typeof e?Z(e):e;if(!n)return[];const t=new Map;if(Array.isArray(r)||null==r)for(const i of Q)t.set(i,r);else for(const[i,a]of r)t.set(y(i),a);const o=u(n).flatMap(({varId:e,memberNamePattern:r})=>{if(!t.has(e))return[];if(r.includes("*")){const n=t.get(e);if(null==n)return[];const o=new RegExp(`^${r.split(/\*+/).map(U).join(".*")}$`,"i");return n.filter(e=>o.test(e))}return r.toLowerCase()});return[...new Set(o.sort())]}function X(e){return t(e,"$view")}function Y(e,r){return!!e&&t(e,r)}function ee(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let r,n;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:i}=t;null!=o?(r=null!=e?d.dateJSAndZoneToArcadeDate(e,o):null,n=null!=i?d.dateJSAndZoneToArcadeDate(i,o):null):(r=null!=e?d.dateJSToArcadeDate(e):null,n=null!=i?d.dateJSToArcadeDate(i):null)}return{view:e.viewingMode&&null!=e.scale?new v({__proto__:null,viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=r||null!=n?new v({__proto__:null,currentStart:r,currentEnd:n,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function re({url:e,spatialReference:r,lrucache:n,interceptor:t}){const o=c();return o?o.createFeatureSetCollectionFromService(e,r,n,t):null}function ne({layer:e,spatialReference:r,outFields:n,returnGeometry:t,lrucache:o,interceptor:i}){if(null===e)return null;const a=c();return a?a.constructFeatureSet(e,r,n,t??!0,o,i):null}function te(e){if(null===e?.map)return null;const r=c();return r?r.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function oe(e,r){return v.convertJsonToArcade(e,r)}function ie(e,r,n=[]){return s(e,r,n)}function ae(){return i()}function le(){return o()}function ue(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function se(r,n){if(!r)return!1;if("string"==typeof r)return n(r);const t=r;if(ue(t)){if("dot-density"===t.type){const e=t.attributes?.some(e=>n(e.valueExpression));if(e)return e}const e=t.visualVariables,r=!!e&&e.some(e=>{let r=n(e.valueExpression);return"size"===e.type&&(R(e.minSize)&&(r=r||n(e.minSize.valueExpression)),R(e.maxSize)&&(r=r||n(e.maxSize.valueExpression))),r});return!(!("valueExpression"in t)||!n(t.valueExpression))||r}if(z(t)){const e=t.labelExpressionInfo?.expression;return!(!e||!n(e))||!1}return!!e(t)&&(!!t.expressionInfos&&t.expressionInfos.some(e=>n(e.expression))||Array.isArray(t.content)&&t.content.some(e=>"expression"===e.type&&n(e.expressionInfo?.expression)))}function ce(e){const r=Z(e);return!!r&&p(r)}function fe(e){return se(e,ce)}function pe(e){if("renderer"in e&&e.renderer&&fe(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const r of e.labelingInfo)if(fe(r))return!0;return!1}function me(e){const r=Z(e);return!!r&&m(r)}function de(e){return se(e,me)}function ye(e){return se(e,e=>{const r=Z(e);return!!r&&f(r)})}export{v as Dictionary,b as Pixel,A as Voxel,g as arcadeFeature,ne as convertFeatureLayerToFeatureSet,oe as convertJsonToArcade,te as convertMapToFeatureSetCollection,re as convertServiceUrlToWorkspace,G as createExecContext,L as createFeature,q as createFunction,Z as createSyntaxTree,X as dependsOnView,le as enableFeatureSetOperations,ae as enableGeometryOperations,K as evalSyntaxTree,H as executeAsyncFunction,N as executeFunction,W as extractFieldNames,V as getArcadeType,ee as getViewInfo,fe as hasGeometryFunctions,de as hasGeometryOperations,Y as hasVariable,pe as layerHasGeometryFunctions,ie as loadScriptDependencies,ye as requiresTrack,B as updateExecContext};
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const b="20260527",c="df33b17f458ed5ace02440a4319878fb811d4cb0";export{b as buildDate,c as commitHash};
|