@arcgis/core 4.28.0-next.20230819 → 4.28.0-next.20230821
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003744a45b07865f1be9.js +1 -0
- package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +1 -0
- package/assets/esri/core/workers/chunks/{a67e5b22adc91e850b4e.js → 05ab09713d599687afa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{3724f23b6f5ac8ec2568.js → 12b8fe0374fa9ab4ca09.js} +1 -1
- package/assets/esri/core/workers/chunks/16d1a72014074e87ecb9.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b6565c16430b28ad93.js → 19857e5420cdf23c5f2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a804dea42c0fb5e5c07.js → 1bab408eaffd2c18976d.js} +1 -1
- package/assets/esri/core/workers/chunks/201365f53509e3f78e17.js +1 -0
- package/assets/esri/core/workers/chunks/{2031451b82ff70fb201a.js → 2f48f4a9a0a056ac5e1c.js} +1 -1
- package/assets/esri/core/workers/chunks/318b51fdee09c1fd750f.js +1 -0
- package/assets/esri/core/workers/chunks/{5b799dc155adeb728c74.js → 3361e3e8385f8de8820c.js} +1 -1
- package/assets/esri/core/workers/chunks/3ce1870c28ab6ac3648e.js +1 -0
- package/assets/esri/core/workers/chunks/41929e4531787389804b.js +1 -0
- package/assets/esri/core/workers/chunks/{55ac725127c5ea9fb942.js → 4e39252f40bc57be9d12.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ed83426ef88a3eccecd.js → 4e496b03ce24b1206f86.js} +1 -1
- package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +1 -0
- package/assets/esri/core/workers/chunks/{d46f8ef92e79d12384c9.js → 587437526ea77f764986.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab720e2f0a35138564b2.js → 5ffabd1a90c5b08109aa.js} +1 -1
- package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +1 -0
- package/assets/esri/core/workers/chunks/6479439afae01f9bb5e6.js +1 -0
- package/assets/esri/core/workers/chunks/69306dfc89e877539223.js +1 -0
- package/assets/esri/core/workers/chunks/{ed499c328ae3a704791c.js → 6db4a6f9d25691830829.js} +1 -1
- package/assets/esri/core/workers/chunks/{61393fd3376ea599a447.js → 76e27cece1559ae815df.js} +1 -1
- package/assets/esri/core/workers/chunks/81526909c0fa11639038.js +1 -0
- package/assets/esri/core/workers/chunks/873111ddf4813cdd4903.js +1 -0
- package/assets/esri/core/workers/chunks/8d4f1170394a8be15da9.js +1 -0
- package/assets/esri/core/workers/chunks/8d8bdfda09c24e363f78.js +1 -0
- package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +1 -0
- package/assets/esri/core/workers/chunks/{88f0b5c0fe751bf35af2.js → b2752e038c5fa3c21e49.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd3b7cfc6f78552249a4.js → b78dc6cbe14e5817b4d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e31d0c7363cbceeb5ac9.js → c35b850fbfcb28133235.js} +1 -1
- package/assets/esri/core/workers/chunks/c83e1be4ee64320cf2fe.js +1 -0
- package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +1 -0
- package/assets/esri/core/workers/chunks/cb0a5bc6deaa98026bb5.js +1 -0
- package/assets/esri/core/workers/chunks/{767467738aeabec14abd.js → d0c4367a197b193e95d4.js} +1 -1
- package/assets/esri/core/workers/chunks/{f113141e254505116b82.js → d1cc2c050423595e54e0.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f34945036495ad7c3f8.js → d2a8bf2d090b94cb294b.js} +1 -1
- package/assets/esri/core/workers/chunks/{08af7f7f1950a59a8e47.js → d6c96a20e9640b433719.js} +4 -4
- package/assets/esri/core/workers/chunks/da5453e67d00ff546640.js +1 -0
- package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +1 -0
- package/assets/esri/core/workers/chunks/ef03b78659c72de93076.js +1 -0
- package/assets/esri/core/workers/chunks/{c3cace5b25b5170228ba.js → f2fe89b6ac6bf6817e71.js} +1 -1
- package/assets/esri/core/workers/chunks/f3554627664a419e00fa.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +65 -4
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +97 -39
- 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/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/butt.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/round.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/square.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dot.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/solid.png +0 -0
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_en.json +1 -1
- package/chunks/HighlightBlur.glsl.js +3 -3
- package/chunks/HighlightDownsample.glsl.js +24 -6
- package/chunks/SSAO.glsl.js +2 -2
- package/core/timeUtils.js +1 -1
- package/intl/date.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/sources/support/uploads.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/save/streamLayerUtils.js +1 -1
- package/package.json +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/IntersectionSnappingCandidate.js +1 -1
- package/views/interactive/tooltip/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/TooltipEditableFieldAngle.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +5 -0
- package/views/support/angularMeasurementUtils.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +5 -0
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations/VisibleElements.js +5 -0
- package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.js +5 -0
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/assets/esri/core/workers/chunks/11abbbf97093b55e2417.js +0 -1
- package/assets/esri/core/workers/chunks/1b2a081f2c3b97ba7e00.js +0 -1
- package/assets/esri/core/workers/chunks/235f333177ed7ea21e01.js +0 -1
- package/assets/esri/core/workers/chunks/3725dd14c2da0f47198f.js +0 -1
- package/assets/esri/core/workers/chunks/42595c4870c673ed451c.js +0 -1
- package/assets/esri/core/workers/chunks/481cdd2a4bc40c6fef66.js +0 -1
- package/assets/esri/core/workers/chunks/54893132e70c515ea7e3.js +0 -1
- package/assets/esri/core/workers/chunks/6509a4198972b323d9b6.js +0 -1
- package/assets/esri/core/workers/chunks/68598d2806d4aa3d8acc.js +0 -1
- package/assets/esri/core/workers/chunks/718d2e8ea61f3b7b70c5.js +0 -1
- package/assets/esri/core/workers/chunks/7bce4b5eec630ef57f1e.js +0 -1
- package/assets/esri/core/workers/chunks/8706dc9f852df9b2095d.js +0 -1
- package/assets/esri/core/workers/chunks/8ef26aac0fe7feb8c324.js +0 -1
- package/assets/esri/core/workers/chunks/91e61da22f258d9e86c5.js +0 -1
- package/assets/esri/core/workers/chunks/9f039bf79b34d8fd75ae.js +0 -1
- package/assets/esri/core/workers/chunks/a20fd9e7db37b3c3b041.js +0 -1
- package/assets/esri/core/workers/chunks/aa83dce42d64034a0a13.js +0 -1
- package/assets/esri/core/workers/chunks/cdcf0a5e05283d37b3ac.js +0 -1
- package/assets/esri/core/workers/chunks/d4f9106bf2ea5d66d96a.js +0 -1
- package/assets/esri/core/workers/chunks/e6bfbc4347fa13db4df2.js +0 -1
- package/assets/esri/core/workers/chunks/f1d5487f2d828fb142ba.js +0 -1
- package/assets/esri/core/workers/chunks/f97f165d05439e668e05.js +0 -1
- package/assets/esri/core/workers/chunks/fe973d8155c22d73a4f9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"add":"Add","addAttachment":"Add attachment","addFeature":"Add feature","attachments":"Attachments","attachmentsButtonLabel":"Attachments","cancelAddTitle":"Discard feature","cancelAddWarningMessage":"This feature will be lost.","cancelEditTitle":"Discard edits","cancelEditWarningMessage":"Updates to this feature will be lost.","cancelRequestTitle":"Cancel workflow","cancelRequestWarningMessage":"A request has been made to cancel this workflow.","cancelUploadTitle":"Cancel upload","cancelUploadWarningMessage":"The current upload will be canceled and the model will be lost.","clickToFinishTemplate":"Click {button} to finish.","continueAdding":"Continue adding","continueEditing":"Continue editing","continueUpload":"Continue upload","createFeature":"Create feature","createFeatures":"Create features","createFeaturesTemplate":"Create ({numFeatures})","deleteAttachmentWarningMessage":"This attachment will be permanently removed.","deleteAttachmentWarningTitle":"Delete attachment","deleteWarningMessage":"This feature will be permanently removed.","deleteWarningTitle":"Delete feature","discardEdits":"Discard edits","discardFeature":"Discard feature","discardUpload":"Cancel upload","edit":"Edit","editAttachment":"Manage attachment","editFeature":"Edit feature","editFeatures":"Edit features","editing":"Editing","errorWarningMessageTemplate":"Edits could not be saved: {errorMessage}","errorWarningTitle":"Something went wrong","featureAttachments":"Feature attachments","formFieldCreateError":"Features cannot be created. There is an issue with the form.","formFieldUpdateError":"Feature cannot be updated. There is an issue with the form.","formFieldUnsupportedCreateError":"Features cannot be created. Layer contains unsupported fields.","formFieldUnsupportedUpdateError":"Feature cannot be updated. Layer contains unsupported fields.","helpMessages2d":{"select":"Click on the map to select a feature.","mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing."},"helpMessages3d":{"select":"Click in the scene to select a feature.","mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing."},"ignore":"Ignore","keepAttachment":"Keep attachment","keepFeature":"Keep feature","multipleFeaturesTemplate":"Multiple features ({total})","noEditableLayers":"No editable layers found.","ownerAdminNotice":"Editing is disabled but you have privileges to edit this layer.","placeFeature":"Place feature","placeFeatureOnMap":"Place feature on map.","retry":"Retry","selectFeature":"Select feature","selectFeatureToEdit":"Select a feature to edit it.","selectTemplate":"Select feature type","snapping":"Snapping","snappingSettings":"Snapping Settings","untitledFeatureTemplate":"Untitled Feature {id}","uploadError":"There was an error uploading the model.","uploadPending":"Uploading...","warning":"Notice","widgetLabel":"Editor"}
|
|
1
|
+
{"add":"Add","addAttachment":"Add attachment","addFeature":"Add feature","attachments":"Attachments","attachmentsButtonLabel":"Attachments","cancelAddTitle":"Discard feature","cancelAddWarningMessage":"This feature will be lost.","cancelEditTitle":"Discard edits","cancelEditWarningMessage":"Updates to this feature will be lost.","cancelRequestTitle":"Cancel workflow","cancelRequestWarningMessage":"A request has been made to cancel this workflow.","cancelUploadTitle":"Cancel upload","cancelUploadWarningMessage":"The current upload will be canceled and the model will be lost.","clickToFinishTemplate":"Click {button} to finish.","continueAdding":"Continue adding","continueEditing":"Continue editing","continueUpload":"Continue upload","createFeature":"Create feature","createFeatures":"Create features","createFeaturesTemplate":"Create ({numFeatures})","deleteAttachmentWarningMessage":"This attachment will be permanently removed.","deleteAttachmentWarningTitle":"Delete attachment","deleteWarningMessage":"This feature will be permanently removed.","deleteWarningTitle":"Delete feature","discardEdits":"Discard edits","discardFeature":"Discard feature","discardUpload":"Cancel upload","edit":"Edit","editAttachment":"Manage attachment","editFeature":"Edit feature","editFeatures":"Edit features","editing":"Editing","errorWarningMessageTemplate":"Edits could not be saved: {errorMessage}","errorWarningTitle":"Something went wrong","featureAttachments":"Feature attachments","formFieldCreateError":"Features cannot be created. There is an issue with the form.","formFieldUpdateError":"Feature cannot be updated. There is an issue with the form.","formFieldUnsupportedCreateError":"Features cannot be created. Layer contains unsupported fields.","formFieldUnsupportedUpdateError":"Feature cannot be updated. Layer contains unsupported fields.","helpMessages2d":{"select":"Click on the map to select a feature.","mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing."},"helpMessages3d":{"select":"Click in the scene to select a feature.","mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing."},"ignore":"Ignore","keepAttachment":"Keep attachment","keepFeature":"Keep feature","multipleFeaturesTemplate":"Multiple features ({total})","noEditableLayers":"No editable layers found.","ownerAdminNotice":"Editing is disabled but you have privileges to edit this layer.","placeFeature":"Place feature","placeFeatureOnMap":"Place feature on map.","retry":"Retry","selectFeature":"Select feature","selectFeatureToEdit":"Select a feature to edit it.","selectTemplate":"Select feature type","snapping":"Snapping","snappingSettings":"Snapping Settings","untitledFeatureTemplate":"Untitled Feature {id}","uploadError":"Failed to upload","uploadErrorDescription":"There was an error uploading the model.","uploadPending":"Uploading...","uploadPendingDescription":"The model is being uploaded and prepared for display in the scene.","uploadSuccess":"Uploaded successfully","warning":"Notice","widgetLabel":"Editor"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"add":"Add","addAttachment":"Add attachment","addFeature":"Add feature","attachments":"Attachments","attachmentsButtonLabel":"Attachments","cancelAddTitle":"Discard feature","cancelAddWarningMessage":"This feature will be lost.","cancelEditTitle":"Discard edits","cancelEditWarningMessage":"Updates to this feature will be lost.","cancelRequestTitle":"Cancel workflow","cancelRequestWarningMessage":"A request has been made to cancel this workflow.","cancelUploadTitle":"Cancel upload","cancelUploadWarningMessage":"The current upload will be canceled and the model will be lost.","clickToFinishTemplate":"Click {button} to finish.","continueAdding":"Continue adding","continueEditing":"Continue editing","continueUpload":"Continue upload","createFeature":"Create feature","createFeatures":"Create features","createFeaturesTemplate":"Create ({numFeatures})","deleteAttachmentWarningMessage":"This attachment will be permanently removed.","deleteAttachmentWarningTitle":"Delete attachment","deleteWarningMessage":"This feature will be permanently removed.","deleteWarningTitle":"Delete feature","discardEdits":"Discard edits","discardFeature":"Discard feature","discardUpload":"Cancel upload","edit":"Edit","editAttachment":"Manage attachment","editFeature":"Edit feature","editFeatures":"Edit features","editing":"Editing","errorWarningMessageTemplate":"Edits could not be saved: {errorMessage}","errorWarningTitle":"Something went wrong","featureAttachments":"Feature attachments","formFieldCreateError":"Features cannot be created. There is an issue with the form.","formFieldUpdateError":"Feature cannot be updated. There is an issue with the form.","formFieldUnsupportedCreateError":"Features cannot be created. Layer contains unsupported fields.","formFieldUnsupportedUpdateError":"Feature cannot be updated. Layer contains unsupported fields.","helpMessages2d":{"select":"Click on the map to select a feature.","mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing."},"helpMessages3d":{"select":"Click in the scene to select a feature.","mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing."},"ignore":"Ignore","keepAttachment":"Keep attachment","keepFeature":"Keep feature","multipleFeaturesTemplate":"Multiple features ({total})","noEditableLayers":"No editable layers found.","ownerAdminNotice":"Editing is disabled but you have privileges to edit this layer.","placeFeature":"Place feature","placeFeatureOnMap":"Place feature on map.","retry":"Retry","selectFeature":"Select feature","selectFeatureToEdit":"Select a feature to edit it.","selectTemplate":"Select feature type","snapping":"Snapping","snappingSettings":"Snapping Settings","untitledFeatureTemplate":"Untitled Feature {id}","uploadError":"There was an error uploading the model.","uploadPending":"Uploading...","warning":"Notice","widgetLabel":"Editor"}
|
|
1
|
+
{"add":"Add","addAttachment":"Add attachment","addFeature":"Add feature","attachments":"Attachments","attachmentsButtonLabel":"Attachments","cancelAddTitle":"Discard feature","cancelAddWarningMessage":"This feature will be lost.","cancelEditTitle":"Discard edits","cancelEditWarningMessage":"Updates to this feature will be lost.","cancelRequestTitle":"Cancel workflow","cancelRequestWarningMessage":"A request has been made to cancel this workflow.","cancelUploadTitle":"Cancel upload","cancelUploadWarningMessage":"The current upload will be canceled and the model will be lost.","clickToFinishTemplate":"Click {button} to finish.","continueAdding":"Continue adding","continueEditing":"Continue editing","continueUpload":"Continue upload","createFeature":"Create feature","createFeatures":"Create features","createFeaturesTemplate":"Create ({numFeatures})","deleteAttachmentWarningMessage":"This attachment will be permanently removed.","deleteAttachmentWarningTitle":"Delete attachment","deleteWarningMessage":"This feature will be permanently removed.","deleteWarningTitle":"Delete feature","discardEdits":"Discard edits","discardFeature":"Discard feature","discardUpload":"Cancel upload","edit":"Edit","editAttachment":"Manage attachment","editFeature":"Edit feature","editFeatures":"Edit features","editing":"Editing","errorWarningMessageTemplate":"Edits could not be saved: {errorMessage}","errorWarningTitle":"Something went wrong","featureAttachments":"Feature attachments","formFieldCreateError":"Features cannot be created. There is an issue with the form.","formFieldUpdateError":"Feature cannot be updated. There is an issue with the form.","formFieldUnsupportedCreateError":"Features cannot be created. Layer contains unsupported fields.","formFieldUnsupportedUpdateError":"Feature cannot be updated. Layer contains unsupported fields.","helpMessages2d":{"select":"Click on the map to select a feature.","mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing."},"helpMessages3d":{"select":"Click in the scene to select a feature.","mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing."},"ignore":"Ignore","keepAttachment":"Keep attachment","keepFeature":"Keep feature","multipleFeaturesTemplate":"Multiple features ({total})","noEditableLayers":"No editable layers found.","ownerAdminNotice":"Editing is disabled but you have privileges to edit this layer.","placeFeature":"Place feature","placeFeatureOnMap":"Place feature on map.","retry":"Retry","selectFeature":"Select feature","selectFeatureToEdit":"Select a feature to edit it.","selectTemplate":"Select feature type","snapping":"Snapping","snappingSettings":"Snapping Settings","untitledFeatureTemplate":"Untitled Feature {id}","uploadError":"Failed to upload","uploadErrorDescription":"There was an error uploading the model.","uploadPending":"Uploading...","uploadPendingDescription":"The model is being uploaded and prepared for display in the scene.","uploadSuccess":"Uploaded successfully","warning":"Notice","widgetLabel":"Editor"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot.png
ADDED
|
Binary file
|
package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgetLabel":"Associations","input":{"enableAssociations":"View associations","enableConnectivity":"Connectivity associations","enableStructuralAttachment":"Structural attachment associations","maxAllowableAssociations":"Maximum allowable associations","refreshAssociations":"Refresh associations"},"info":{"maxAllowableAssociationsExceeded":"Zoom in to a smaller area or change the value of the 'Maximum allowable associations' option.","noAssociationsFound":"There are no associations in the current extent.","noUtilityNetwork":"A utility network was not provided. The widget must be initialized with a utility network.","noView":"A view was not provided. The widget must be initialized with a view."}}
|
|
1
|
+
{"widgetLabel":"Associations","input":{"enableAssociations":"View associations","enableConnectivity":"Connectivity associations","enableStructuralAttachment":"Structural attachment associations","lineCap":"Cap","lineColor":"Color","lineStyle":"Style","lineWidth":"Width","maxAllowableAssociations":"Maximum allowable associations","refreshAssociations":"Refresh associations","showArrows":"Show Arrows"},"info":{"maxAllowableAssociationsExceeded":"Zoom in to a smaller area or change the value of the 'Maximum allowable associations' option.","noAssociationsFound":"There are no associations in the current extent.","noUtilityNetwork":"A utility network was not provided. The widget must be initialized with a utility network.","noView":"A view was not provided. The widget must be initialized with a view."}}
|
package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_en.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgetLabel":"Associations","input":{"enableAssociations":"View associations","enableConnectivity":"Connectivity associations","enableStructuralAttachment":"Structural attachment associations","maxAllowableAssociations":"Maximum allowable associations","refreshAssociations":"Refresh associations"},"info":{"maxAllowableAssociationsExceeded":"Zoom in to a smaller area or change the value of the 'Maximum allowable associations' option.","noAssociationsFound":"There are no associations in the current extent.","noUtilityNetwork":"A utility network was not provided. The widget must be initialized with a utility network.","noView":"A view was not provided. The widget must be initialized with a view."}}
|
|
1
|
+
{"widgetLabel":"Associations","input":{"enableAssociations":"View associations","enableConnectivity":"Connectivity associations","enableStructuralAttachment":"Structural attachment associations","lineCap":"Cap","lineColor":"Color","lineStyle":"Style","lineWidth":"Width","maxAllowableAssociations":"Maximum allowable associations","refreshAssociations":"Refresh associations","showArrows":"Show Arrows"},"info":{"maxAllowableAssociationsExceeded":"Zoom in to a smaller area or change the value of the 'Maximum allowable associations' option.","noAssociationsFound":"There are no associations in the current extent.","noUtilityNetwork":"A utility network was not provided. The widget must be initialized with a utility network.","noView":"A view was not provided. The widget must be initialized with a view."}}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as e}from"./vec2f64.js";import{Float2DrawUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{NoParameters as o,glsl as t}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as i}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as n}from"../views/3d/webgl-engine/lib/VertexAttribute.js";class
|
|
5
|
+
import{a as e}from"./vec2f64.js";import{Float2DrawUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{NoParameters as o,glsl as t}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as i}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as n}from"../views/3d/webgl-engine/lib/VertexAttribute.js";class a extends o{constructor(){super(...arguments),this.blurSize=e()}}function d(){const e=new i,{attributes:o,varyings:a,vertex:d,fragment:l}=e;return o.add(n.POSITION,"vec2"),o.add(n.UV0,"vec2"),a.add("blurCoordinate","vec3"),d.uniforms.add(new s("coverageTex",(e=>e.coverageTexture))),d.code.add(t`void main() {
|
|
6
6
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
7
7
|
vec4 cov = texture(coverageTex, uv0);
|
|
8
8
|
if (cov.r == 0.0) {
|
|
9
9
|
gl_Position = vec4(0.0);
|
|
10
10
|
}
|
|
11
11
|
blurCoordinate = vec3(gl_Position.xy * 0.5 + vec2(0.5), cov.g);
|
|
12
|
-
}`),l.uniforms.add(new u("tex",(e=>e.blurInputTexture))),l.code.add(t`void main() {
|
|
12
|
+
}`),l.uniforms.add(new r("blurSize",(e=>e.blurSize)),new u("tex",(e=>e.blurInputTexture))),l.code.add(t`void main() {
|
|
13
13
|
vec2 uv = blurCoordinate.xy;
|
|
14
14
|
vec4 center = texture(tex, uv);
|
|
15
15
|
if (blurCoordinate.z == 1.0) {
|
|
@@ -23,4 +23,4 @@ sum += texture(tex, uv + blurSize * 3.294215) * 0.093913;
|
|
|
23
23
|
sum += texture(tex, uv - blurSize * 3.294215) * 0.093913;
|
|
24
24
|
fragColor = sum;
|
|
25
25
|
}
|
|
26
|
-
}`),e}const l=Object.freeze(Object.defineProperty({__proto__:null,HighlightBlurDrawParameters:
|
|
26
|
+
}`),e}const l=Object.freeze(Object.defineProperty({__proto__:null,HighlightBlurDrawParameters:a,build:d},Symbol.toStringTag,{value:"Module"}));export{a as H,l as a,d as b};
|
|
@@ -2,9 +2,27 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
float
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{NoParameters as r,glsl as t}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as o}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DDrawUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";class n extends r{}function i(){const r=new o,{outputs:n,fragment:i}=r;return r.include(e),i.uniforms.add(new a("textureInput",(e=>e.input))),n.add("fragGrid","vec2"),i.code.add(t`
|
|
6
|
+
void main() {
|
|
7
|
+
float red = 0.0;
|
|
8
|
+
float green = 1.0;
|
|
9
|
+
vec2 texelSize = 1.0 / vec2(textureSize(textureInput, 0));
|
|
10
|
+
vec2 offset = gl_FragCoord.xy * texelSize * vec2(${t.float(d)});
|
|
11
|
+
|
|
12
|
+
for(int x = 0; x < ${t.int(l)}; ++x) {
|
|
13
|
+
for(int y = 0; y < ${t.int(l)}; ++y) {
|
|
14
|
+
vec2 coord = offset +
|
|
15
|
+
2.0 * vec2(float(x) - ${t.float(s)}, float(y) - ${t.float(s)}) *
|
|
16
|
+
texelSize;
|
|
17
|
+
vec4 value = texture(textureInput, coord);
|
|
18
|
+
float mx = floor(max(value.g, value.b));
|
|
19
|
+
red = max(red, ceil(value.r));
|
|
20
|
+
green = min(green, mx);
|
|
21
|
+
if(red == 1.0 && green == 0.0) {
|
|
22
|
+
fragGrid = vec2(red, green);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
fragGrid = vec2(red, green);
|
|
28
|
+
}`),r}const d=32,l=d/2,s=(l-1)/2,f=Object.freeze(Object.defineProperty({__proto__:null,GRID_CELL_PIXEL_SIZE:d,HighlightDownsampleDrawParameters:n,build:i},Symbol.toStringTag,{value:"Module"}));export{d as G,n as H,f as a,i as b};
|
package/chunks/SSAO.glsl.js
CHANGED
|
@@ -40,7 +40,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy,currentPixelDepth);
|
|
43
|
+
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
44
44
|
|
|
45
45
|
// get the normal of current fragment
|
|
46
46
|
vec4 norm4 = texture(normalMap, uv);
|
|
@@ -76,7 +76,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
76
76
|
|
|
77
77
|
tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
|
|
78
78
|
|
|
79
|
-
sum+= aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
79
|
+
sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// output the result
|
package/core/timeUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{resolveTimeZone as e}from"../intl/date.js";import{
|
|
5
|
+
import{resolveTimeZone as e}from"../intl/date.js";import{IANAZone as t,DateTime as s}from"luxon";const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function r(n,r,o,c="system"){const i=new t(e(c)),u=s.fromJSDate(n,{zone:i}),a="decades"===o||"centuries"===o?"year":f(o);return"decades"===o&&(r*=10),"centuries"===o&&(r*=100),u.plus({[a]:r}).toJSDate()}function o(e,t,s="milliseconds"){const n=e.getTime(),r=d(t,s,"milliseconds");return new Date(n+r)}function c(n,r,o="system"){const c=new t(e(o)),i=s.fromJSDate(n,{zone:c});if("decades"===r||"centuries"===r){const e=i.startOf("year"),{year:t}=e,s=t-t%("decades"===r?10:100);return e.set({year:s}).toJSDate()}const u=f(r);return i.startOf(u).toJSDate()}function i(e,t,s="milliseconds"){const n=new Date(d(t,s,"milliseconds"));return n.setUTCFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n}function u(e,t="milliseconds"){const s=d(e.getUTCHours(),"hours","milliseconds"),n=d(e.getUTCMinutes(),"minutes","milliseconds"),r=d(e.getUTCSeconds(),"seconds","milliseconds");return d(s+n+r+e.getUTCMilliseconds(),"milliseconds",t)}function a(e,t){const s=new Date(e.getTime());return s.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),s}function l(e){const t=new Date(0);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t}function d(e,t,s){if(0===e)return 0;return e*n[t]/n[s]}function m(e){return e instanceof Date&&!isNaN(e.getTime())}function f(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}export{d as convertTime,m as isValidDate,i as makeUTCTime,r as offsetDate,o as offsetDateUTC,a as resetUTCDate,u as timeSinceUTCMidnight,c as truncateDate,l as truncateLocalTime};
|
package/intl/date.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as o,getLocale as e}from"./locale.js";import{DateTime as r}from"luxon";const n={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},h=
|
|
5
|
+
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as o,getLocale as e}from"./locale.js";import{DateTime as r}from"luxon";const n={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},h=Intl.DateTimeFormat().resolvedOptions().timeZone,m={timeZone:"UTC"},i={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},y={year:"numeric",month:"long",weekday:"long",day:"numeric"},d={hour:"numeric",minute:"numeric"},g={...d,second:"numeric"},u={"short-date":i,"short-date-short-time":{...i,...d},"short-date-short-time-24":{...i,...d,hour12:!1},"short-date-long-time":{...i,...g},"short-date-long-time-24":{...i,...g,hour12:!1},"short-date-le":i,"short-date-le-short-time":{...i,...d},"short-date-le-short-time-24":{...i,...d,hour12:!1},"short-date-le-long-time":{...i,...g},"short-date-le-long-time-24":{...i,...g,hour12:!1},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...d},"long-month-day-year-short-time-24":{...s,...d,hour12:!1},"long-month-day-year-long-time":{...s,...g},"long-month-day-year-long-time-24":{...s,...g,hour12:!1},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...d},"day-short-month-year-short-time-24":{...l,...d,hour12:!1},"day-short-month-year-long-time":{...l,...g},"day-short-month-year-long-time-24":{...l,...g,hour12:!1},"long-date":y,"long-date-short-time":{...y,...d},"long-date-short-time-24":{...y,...d,hour12:!1},"long-date-long-time":{...y,...g},"long-date-long-time-24":{...y,...g,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":d,"long-time":g},c=t()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),T={ar:"ar-u-nu-latn-ca-gregory"};let D=new WeakMap;const S=u["short-date-short-time"];function L(t){let o=D.get(t);if(!o){const r=e(),n=T[r]||r,a=v(t);o=new Intl.DateTimeFormat(n,a),D.set(t,o)}return o}function f(t){return u[t]}function M(t,o=S){return L(o).format(t)}function Y(t,o=S){return M(new Date(t),{...o,...m,...a})}function w(t,o=S){return M(new Date(`1970-01-01T${t}Z`),{...o,...m,...n})}function p(t,o=S){const n=r.fromISO(t,{setZone:!0}),a=e(),h=T[a]??a,m=v(o);return n.toLocaleString(m,{locale:h})}function v(t){const o=Z(t.timeZone??"system");return{...t,timeZone:o}}function Z(t){switch(t){case"system":return h;case"unknown":return"UTC";default:return t}}o((()=>{D=new WeakMap}));export{f as convertDateFormatToIntlOptions,c as dateFormatJSONMap,M as formatDate,Y as formatDateOnly,w as formatTimeOnly,p as formatTimestamp,L as getDateTimeFormatter,Z as resolveTimeZone,m as utcTimeZone};
|
package/layers/FeatureLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import{read as t}from"../renderers/support/jsonUtils.js";import{rendererTypes as i,webSceneRendererTypes as o}from"../renderers/support/types.js";import s from"../request.js";import{symbolTypes as a}from"../symbols.js";import{ClonableMixin as n}from"../core/Clonable.js";import l from"../core/Collection.js";import p from"../core/Error.js";import{clone as u}from"../core/lang.js";import d from"../core/Logger.js";import{MultiOriginJSONMixin as y}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../core/object.js";import{throwIfAbortError as m,whenOrAbort as f}from"../core/promiseUtils.js";import{sqlAnd as h}from"../core/sql.js";import{urlToObject as b,join as g}from"../core/urlUtils.js";import{property as w}from"../core/accessorSupport/decorators/property.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as F}from"../core/accessorSupport/decorators/subclass.js";import{writer as S}from"../core/accessorSupport/decorators/writer.js";import I from"../form/FormTemplate.js";import T from"../geometry/SpatialReference.js";import D from"./Layer.js";import{MemorySource as E}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as L}from"./mixins/APIKeyMixin.js";import{ArcGISService as x}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as P}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as M}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as q}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as C}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as O}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as R}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as U}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as V}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as G}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as J,parse as $,cleanTitle as W}from"./support/arcgisLayerUrl.js";import{id as B,labelsVisible as H,opacityDrawingInfo as Z,legendEnabled as k,listMode as z,popupEnabled as K,screenSizePerspectiveEnabled as X}from"./support/commonProperties.js";import{ensureLayerCredential as Y,computeEffectiveEditingEnabled as ee,readGlobalIdField as re,readObjectIdField as te,createDefaultRenderer as ie,addAttachment as oe,updateAttachment as se,applyEdits as ae,uploadAssets as ne,createQuery as le,deleteAttachments as pe,fetchRecomputedExtents as ue,queryAttachments as de,queryObjectIds as ye,queryFeatureCount as ce,queryExtent as me,queryRelatedFeatures as fe,queryRelatedFeaturesCount as he,hasDataChanged as be,geometryTypeKebabDict as ge}from"./support/featureLayerUtils.js";import we from"./support/FeatureTemplate.js";import je from"./support/FeatureType.js";import{defineFieldProperties as ve}from"./support/fieldProperties.js";import{fixRendererFields as Fe,fixTimeInfoFields as Se}from"./support/fieldUtils.js";import Ie from"./support/LabelClass.js";import{reader as Te}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as De}from"./support/serviceCapabilitiesUtils.js";import Ee from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as Le}from"./support/versionUtils.js";import{DataLayerSource as xe}from"./support/source/DataLayerSource.js";import{loadStyleRenderer as _e}from"../renderers/support/styleUtils.js";import Pe from"../rest/support/FeatureSet.js";import Me from"../rest/support/Query.js";import qe from"../rest/support/TopFeaturesQuery.js";import{createPopupTemplate as Ce}from"../support/popupUtils.js";import{opacityToTransparency as Oe}from"../webdoc/support/opacityUtils.js";const Re="FeatureLayer",Ae="esri.layers.FeatureLayer",Ue=d.getLogger(Ae);function Qe(e,r){return new p("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${r}`,{layer:e})}function Ve(e){return e&&e instanceof l}const Ne=ve();function Ge(e,r,t){const i=!!t?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Je=class extends(C(O(q(Q(M(_(A(G(N(V(x(R(U(y(P(L(n(D)))))))))))))))))){constructor(...e){super(...e),this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0}destroy(){this.source?.destroy()}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(r).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(m).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(r);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(r))})).then((()=>Y(this,"load",e)));return this.addResolvingPromise(t),Promise.resolve(this)}readCapabilities(e,r){return r=r.layerDefinition||r,De(r,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,r){return this._readEditingEnabled(r,!1)}readEditingEnabledFromWebMap(e,r,t){return this._readEditingEnabled(r,!0,t)}writeEditingEnabled(e,r){this._writeEditingEnabled(e,r,!1)}writeEditingEnabledToWebMap(e,r,t,i){this._writeEditingEnabled(e,r,!0,i)}get effectiveEditingEnabled(){return ee(this)}readIsTable(e,r){return"Table"===(r=r?.layerDefinition??r).type||!r.geometryType}writeIsTable(e,r,t,i){i?.writeLayerSchema&&c(t,e?"Table":"Feature Layer",r)}readGlobalIdField(e,r){return re(r.layerDefinition||r)}readObjectIdField(e,r){return te(r.layerDefinition||r)}get parsedUrl(){const e=b(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=g(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=g(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Fe(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,r,i){r=r.layerDefinition||r;const o=r.drawingInfo?.renderer;if(o){const e=t(o,r,i)??void 0;return e||Ue.error("Failed to create renderer",{rendererDefinition:r.drawingInfo.renderer,layer:this,context:i}),e}return ie(r,i)}set source(e){const r=this._get("source");r!==e&&(Ve(r)&&this._resetMemorySource(r),Ve(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof l?new E({layer:this,items:e}):e:null}readSource(e,r){const t=Pe.fromJSON(r.featureSet);return new E({layer:this,items:t?.features??[]})}readTemplates(e,r){const t=r.editFieldsInfo,i=t&&t.creatorField,o=t&&t.editorField;return e=e&&e.map((e=>we.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,r){const t=r.layerDefinition?.name??r.name,i=r.title||r.layerDefinition&&r.layerDefinition.title;if(t){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?J(this.url,t):t;let r=t;if(!r&&this.url){const e=$(this.url);null!=e&&(r=e.title)}if(!r)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==r&&(r=e+" - "+r),W(r)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,r){return r.title||r.layerDefinition&&r.layerDefinition.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find((e=>e.name.toLowerCase()===t));e&&(t=e.name)}return t}readTypes(e,r){e=(r=r.layerDefinition||r).types;const t=r.editFieldsInfo,i=t&&t.creatorField,o=t&&t.editorField;return e&&e.map((e=>(e=je.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e)))}readVisible(e,r){return r.layerDefinition&&null!=r.layerDefinition.defaultVisibility?!!r.layerDefinition.defaultVisibility:null!=r.visibility?!!r.visibility:void 0}async addAttachment(e,r){return oe(this,e,r,Re)}async updateAttachment(e,r,t){return se(this,e,r,t,Re)}async applyEdits(e,r){return ae(this,e,r)}async uploadAssets(e,r){return ne(this,e,r)}on(e,r){return super.on(e,r)}createPopupTemplate(e){return Ce(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:r}=await f(import("./graphics/sources/FeatureLayerSource.js"),e);return new r({layer:this}).load({signal:e})}createQuery(){const e=le(this);e.dynamicDataSource=this.dynamicDataSource;const r=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,t=h(this.definitionExpression,r);return e.where=t||"1=1",e}async deleteAttachments(e,r){return pe(this,e,r,Re)}async fetchRecomputedExtents(e){return ue(this,e,Re)}getFeatureType(e){const{typeIdField:r,types:t}=this;if(!r||!e)return null;const i=e.attributes?e.attributes[r]:void 0;if(null==i)return null;let o=null;return t?.some((e=>{const{id:r}=e;return null!=r&&(r.toString()===i.toString()&&(o=e),!!o)})),o}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,r){return de(this,e,r,Re)}async queryFeatures(e,r){const t=await this.load(),i=await t.source.queryFeatures(Me.from(e)??t.createQuery(),r);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=t;return i}async queryObjectIds(e,r){return ye(this,e,r,Re)}async queryFeatureCount(e,r){return ce(this,e,r,Re)}async queryExtent(e,r){return me(this,e,r,Re)}async queryRelatedFeatures(e,r){return fe(this,e,r,Re)}async queryRelatedFeaturesCount(e,r){return he(this,e,r,Re)}async queryTopFeatures(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p(Re,"Layer source does not support queryTopFeatures capability");const o=await t.queryTopFeatures(qe.from(e),r);if(o?.features)for(const s of o.features)s.layer=s.sourceLayer=this;return o}async queryTopObjectIds(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p(Re,"Layer source does not support queryTopObjectIds capability");return t.queryTopObjectIds(qe.from(e),r)}async queryTopFeaturesExtent(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p(Re,"Layer source does not support queryTopExtents capability");return t.queryTopExtents(qe.from(e),r)}async queryTopFeatureCount(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p(Re,"Layer source does not support queryFeatureCount capability");return t.queryTopCount(qe.from(e),r)}read(e,r){const t=e.featureCollection;if(t){const e=t.layers;e&&1===e.length&&(super.read(e[0],r),null!=t.showLegend&&super.read({showLegend:t.showLegend},r))}super.read(e,r),r&&"service"===r.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,r){r={...r,origin:r?.origin??void 0,writeLayerSchema:r?.writeLayerSchema??this._hasMemorySource()};const{origin:t,layerContainerType:i,messages:o}=r;if(this.dynamicDataSource)return o?.push(Qe(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===t||"web-map"===t&&"tables"!==i)return o?.push(Qe(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return o?.push(Qe(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===t&&"tables"===i)return o?.push(Qe(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,r)}clone(){if(this._hasMemorySource())throw new p(Re,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Le(this,e))}async save(e){const{save:r}=await import("./save/featureLayerUtils.js");return r(this,e)}async saveAs(e,r){const{saveAs:t}=await import("./save/featureLayerUtils.js");return t(this,e,r)}_readEditingEnabled(e,r,t){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,r&&"web-map"===t?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,r,t,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";c("layerDefinition.capabilities",e,r),t&&!i?.writeLayerSchema&&(r.capabilities=e)}}_getLayerDomain(e){const r=this.fieldsIndex.get(e);return r?r.domain:null}_fetchFirstLayerId(e){return s(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const r=e.data;if(r)return Array.isArray(r.layers)&&r.layers.length>0?r.layers[0].id:Array.isArray(r.tables)&&r.tables.length>0?r.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Fe(this.renderer,this.fieldsIndex),Se(this.timeInfo,this.fieldsIndex),_e(this,{origin:"service"})}async hasDataChanged(){return be(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,r){e&&e.forEach((e=>{const t=e.prototype&&e.prototype.attributes;t&&r&&delete t[r]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};e([v("service","capabilities")],Je.prototype,"readCapabilities",null),e([w({json:{origins:{"web-scene":{write:!1}},write:!0}})],Je.prototype,"charts",void 0),e([w({readOnly:!0})],Je.prototype,"createQueryVersion",null),e([w({json:{read:{source:"layerDefinition.copyrightText"}}})],Je.prototype,"copyright",void 0),e([w({json:{read:{source:"layerDefinition.displayField"}}})],Je.prototype,"displayField",void 0),e([w({types:a,readOnly:!0})],Je.prototype,"defaultSymbol",void 0),e([w({type:xe})],Je.prototype,"dynamicDataSource",void 0),e([w({type:Boolean})],Je.prototype,"editingEnabled",null),e([v(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Je.prototype,"readEditingEnabled",null),e([v("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Je.prototype,"readEditingEnabledFromWebMap",null),e([S(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Je.prototype,"writeEditingEnabled",null),e([S("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Je.prototype,"writeEditingEnabledToWebMap",null),e([w({readOnly:!0})],Je.prototype,"effectiveEditingEnabled",null),e([w({...Ne.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ge}}}}})],Je.prototype,"fields",void 0),e([w(Ne.fieldsIndex)],Je.prototype,"fieldsIndex",void 0),e([w({type:I,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Je.prototype,"formTemplate",void 0),e([w({json:{read:{source:"layerDefinition.extent"}}})],Je.prototype,"fullExtent",void 0),e([w({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ge,writer(e,r,t){const i=e?ge.toJSON(e):null;i&&c(t,i,r)}}}},read:{source:"layerDefinition.geometryType",reader:ge.read}}})],Je.prototype,"geometryType",void 0),e([w({json:{read:{source:"layerDefinition.hasM"}}})],Je.prototype,"hasM",void 0),e([w({json:{read:{source:"layerDefinition.hasZ"}}})],Je.prototype,"hasZ",void 0),e([w(B)],Je.prototype,"id",void 0),e([w({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Je.prototype,"infoFor3D",void 0),e([w({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Je.prototype,"isTable",void 0),e([v("service","isTable",["type","geometryType"]),v("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Je.prototype,"readIsTable",null),e([S("web-map","isTable")],Je.prototype,"writeIsTable",null),e([w(H)],Je.prototype,"labelsVisible",void 0),e([w({type:[Ie],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:Te},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:Te},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Je.prototype,"labelingInfo",void 0),e([w((()=>{const e=u(Z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,r,t){c(t,Oe(e),r)}}},e})())],Je.prototype,"opacity",void 0),e([w(k)],Je.prototype,"legendEnabled",void 0),e([w({type:["show","hide"],json:(()=>{const e=u(z.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Je.prototype,"listMode",void 0),e([v("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Je.prototype,"readGlobalIdField",null),e([w({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ge}}}}})],Je.prototype,"objectIdField",void 0),e([v("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Je.prototype,"readObjectIdField",null),e([w({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Je.prototype,"operationalLayerType",void 0),e([w(Ne.outFields)],Je.prototype,"outFields",void 0),e([w({readOnly:!0})],Je.prototype,"parsedUrl",null),e([w({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Je.prototype,"path",void 0),e([w(K)],Je.prototype,"popupEnabled",void 0),e([w({type:r,json:{name:"popupInfo",write:!0}})],Je.prototype,"popupTemplate",void 0),e([w({readOnly:!0})],Je.prototype,"defaultPopupTemplate",null),e([w({types:i,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,r,t)=>({ignoreOrigin:t?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,r,t)=>({ignoreOrigin:t?.writeLayerSchema})}}})],Je.prototype,"renderer",null),e([v("service","renderer",["drawingInfo.renderer","defaultSymbol"]),v("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Je.prototype,"readRenderer",null),e([w((()=>{const e=u(X);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Je.prototype,"screenSizePerspectiveEnabled",void 0),e([w({clonable:!1})],Je.prototype,"source",null),e([j("source")],Je.prototype,"castSource",null),e([v("portal-item","source",["featureSet"]),v("web-map","source",["featureSet"])],Je.prototype,"readSource",null),e([w({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Je.prototype,"spatialReference",void 0),e([w({type:Number})],Je.prototype,"subtypeCode",void 0),e([w({type:[we]})],Je.prototype,"templates",void 0),e([v("templates",["editFieldsInfo","creatorField","editorField","templates"])],Je.prototype,"readTemplates",null),e([w({type:Ee})],Je.prototype,"timeInfo",void 0),e([w()],Je.prototype,"title",void 0),e([v("service","title",["name"]),v("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Je.prototype,"readTitle",null),e([v("web-map","title",["layerDefinition.name","title"])],Je.prototype,"readTitleFromWebMap",null),e([w({type:String})],Je.prototype,"sublayerTitleMode",void 0),e([w({json:{read:!1}})],Je.prototype,"type",void 0),e([w({type:String})],Je.prototype,"typeIdField",void 0),e([v("service","typeIdField"),v("typeIdField",["layerDefinition.typeIdField"])],Je.prototype,"readTypeIdField",null),e([w({type:[je]})],Je.prototype,"types",void 0),e([v("service","types",["types"]),v("types",["layerDefinition.types"])],Je.prototype,"readTypes",null),e([w({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Je.prototype,"visible",void 0),e([v("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Je.prototype,"readVisible",null),Je=e([F(Ae)],Je);const $e=Je;export{$e as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import{read as t}from"../renderers/support/jsonUtils.js";import{rendererTypes as i,webSceneRendererTypes as o}from"../renderers/support/types.js";import s from"../request.js";import{symbolTypes as a}from"../symbols.js";import{ClonableMixin as n}from"../core/Clonable.js";import l from"../core/Collection.js";import p from"../core/Error.js";import{clone as u}from"../core/lang.js";import d from"../core/Logger.js";import{MultiOriginJSONMixin as y}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../core/object.js";import{debounce as m,throwIfAbortError as f,whenOrAbort as h}from"../core/promiseUtils.js";import{sqlAnd as b}from"../core/sql.js";import{urlToObject as g,join as w}from"../core/urlUtils.js";import{property as v}from"../core/accessorSupport/decorators/property.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{reader as S}from"../core/accessorSupport/decorators/reader.js";import{subclass as F}from"../core/accessorSupport/decorators/subclass.js";import{writer as I}from"../core/accessorSupport/decorators/writer.js";import T from"../form/FormTemplate.js";import E from"../geometry/SpatialReference.js";import D from"./Layer.js";import{MemorySource as L}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as x}from"./mixins/ArcGISService.js";import{BlendLayer as P}from"./mixins/BlendLayer.js";import{CustomParametersMixin as M}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as q}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as O}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as C}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as R}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{OrderedLayer as U}from"./mixins/OrderedLayer.js";import{PortalLayer as V}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as N}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as G}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as J}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as $,parse as W,cleanTitle as B}from"./support/arcgisLayerUrl.js";import{id as H,labelsVisible as Z,opacityDrawingInfo as k,legendEnabled as z,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as re,readGlobalIdField as te,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,queryAttachments as ye,queryObjectIds as ce,queryFeatureCount as me,queryExtent as fe,queryRelatedFeatures as he,queryRelatedFeaturesCount as be,hasDataChanged as ge,geometryTypeKebabDict as we}from"./support/featureLayerUtils.js";import ve from"./support/FeatureTemplate.js";import je from"./support/FeatureType.js";import{defineFieldProperties as Se}from"./support/fieldProperties.js";import{fixRendererFields as Fe,fixTimeInfoFields as Ie}from"./support/fieldUtils.js";import Te from"./support/LabelClass.js";import{reader as Ee}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as De}from"./support/serviceCapabilitiesUtils.js";import Le from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as _e}from"./support/versionUtils.js";import{DataLayerSource as xe}from"./support/source/DataLayerSource.js";import{loadStyleRenderer as Pe}from"../renderers/support/styleUtils.js";import Me from"../rest/support/FeatureSet.js";import qe from"../rest/support/Query.js";import Oe from"../rest/support/TopFeaturesQuery.js";import{createPopupTemplate as Ce}from"../support/popupUtils.js";import{SaveOperationType as Re}from"../webdoc/interfaces.js";import{opacityToTransparency as Ae}from"../webdoc/support/opacityUtils.js";const Ue="FeatureLayer",Ve="esri.layers.FeatureLayer",Qe=d.getLogger(Ve);function Ne(e,r){return new p("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${r}`,{layer:e})}function Ge(e){return e&&e instanceof l}const Je=Se();function $e(e,r,t){const i=!!t?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let We=class extends(C(R(O(Q(q(P(U(J(G(N(x(A(V(y(M(_(n(D)))))))))))))))))){constructor(...e){super(...e),this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=E.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=m((async(e,r,t)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case Re.SAVE:return i(this,r);case Re.SAVE_AS:return o(this,t,r)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(r).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(f).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(r);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(r))})).then((()=>ee(this,"load",e)));return this.addResolvingPromise(t),Promise.resolve(this)}readCapabilities(e,r){return r=r.layerDefinition||r,De(r,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,r){return this._readEditingEnabled(r,!1)}readEditingEnabledFromWebMap(e,r,t){return this._readEditingEnabled(r,!0,t)}writeEditingEnabled(e,r){this._writeEditingEnabled(e,r,!1)}writeEditingEnabledToWebMap(e,r,t,i){this._writeEditingEnabled(e,r,!0,i)}get effectiveEditingEnabled(){return re(this)}readIsTable(e,r){return"Table"===(r=r?.layerDefinition??r).type||!r.geometryType}writeIsTable(e,r,t,i){i?.writeLayerSchema&&c(t,e?"Table":"Feature Layer",r)}readGlobalIdField(e,r){return te(r.layerDefinition||r)}readObjectIdField(e,r){return ie(r.layerDefinition||r)}get parsedUrl(){const e=g(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=w(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=w(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Fe(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,r,i){r=r.layerDefinition||r;const o=r.drawingInfo?.renderer;if(o){const e=t(o,r,i)??void 0;return e||Qe.error("Failed to create renderer",{rendererDefinition:r.drawingInfo.renderer,layer:this,context:i}),e}return oe(r,i)}set source(e){const r=this._get("source");r!==e&&(Ge(r)&&this._resetMemorySource(r),Ge(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof l?new L({layer:this,items:e}):e:null}readSource(e,r){const t=Me.fromJSON(r.featureSet);return new L({layer:this,items:t?.features??[]})}readTemplates(e,r){const t=r.editFieldsInfo,i=t&&t.creatorField,o=t&&t.editorField;return e=e&&e.map((e=>ve.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,r){const t=r.layerDefinition?.name??r.name,i=r.title||r.layerDefinition&&r.layerDefinition.title;if(t){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?$(this.url,t):t;let r=t;if(!r&&this.url){const e=W(this.url);null!=e&&(r=e.title)}if(!r)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==r&&(r=e+" - "+r),B(r)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,r){return r.title||r.layerDefinition&&r.layerDefinition.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find((e=>e.name.toLowerCase()===t));e&&(t=e.name)}return t}readTypes(e,r){e=(r=r.layerDefinition||r).types;const t=r.editFieldsInfo,i=t&&t.creatorField,o=t&&t.editorField;return e&&e.map((e=>(e=je.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e)))}readVisible(e,r){return r.layerDefinition&&null!=r.layerDefinition.defaultVisibility?!!r.layerDefinition.defaultVisibility:null!=r.visibility?!!r.visibility:void 0}async addAttachment(e,r){return se(this,e,r,Ue)}async updateAttachment(e,r,t){return ae(this,e,r,t,Ue)}async applyEdits(e,r){return ne(this,e,r)}async uploadAssets(e,r){return le(this,e,r)}on(e,r){return super.on(e,r)}createPopupTemplate(e){return Ce(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:r}=await h(import("./graphics/sources/FeatureLayerSource.js"),e);return new r({layer:this}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const r=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,t=b(this.definitionExpression,r);return e.where=t||"1=1",e}async deleteAttachments(e,r){return ue(this,e,r,Ue)}async fetchRecomputedExtents(e){return de(this,e,Ue)}getFeatureType(e){const{typeIdField:r,types:t}=this;if(!r||!e)return null;const i=e.attributes?e.attributes[r]:void 0;if(null==i)return null;let o=null;return t?.some((e=>{const{id:r}=e;return null!=r&&(r.toString()===i.toString()&&(o=e),!!o)})),o}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,r){return ye(this,e,r,Ue)}async queryFeatures(e,r){const t=await this.load(),i=await t.source.queryFeatures(qe.from(e)??t.createQuery(),r);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=t;return i}async queryObjectIds(e,r){return ce(this,e,r,Ue)}async queryFeatureCount(e,r){return me(this,e,r,Ue)}async queryExtent(e,r){return fe(this,e,r,Ue)}async queryRelatedFeatures(e,r){return he(this,e,r,Ue)}async queryRelatedFeaturesCount(e,r){return be(this,e,r,Ue)}async queryTopFeatures(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p(Ue,"Layer source does not support queryTopFeatures capability");const o=await t.queryTopFeatures(Oe.from(e),r);if(o?.features)for(const s of o.features)s.layer=s.sourceLayer=this;return o}async queryTopObjectIds(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p(Ue,"Layer source does not support queryTopObjectIds capability");return t.queryTopObjectIds(Oe.from(e),r)}async queryTopFeaturesExtent(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p(Ue,"Layer source does not support queryTopExtents capability");return t.queryTopExtents(Oe.from(e),r)}async queryTopFeatureCount(e,r){const{source:t,capabilities:i}=await this.load();if(!t.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p(Ue,"Layer source does not support queryFeatureCount capability");return t.queryTopCount(Oe.from(e),r)}read(e,r){const t=e.featureCollection;if(t){const e=t.layers;e&&1===e.length&&(super.read(e[0],r),null!=t.showLegend&&super.read({showLegend:t.showLegend},r))}super.read(e,r),r&&"service"===r.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,r){r={...r,origin:r?.origin??void 0,writeLayerSchema:r?.writeLayerSchema??this._hasMemorySource()};const{origin:t,layerContainerType:i,messages:o}=r;if(this.dynamicDataSource)return o?.push(Ne(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===t||"web-map"===t&&"tables"!==i)return o?.push(Ne(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return o?.push(Ne(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===t&&"tables"===i)return o?.push(Ne(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,r)}clone(){if(this._hasMemorySource())throw new p(Ue,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||_e(this,e))}async save(e){return this._debouncedSaveOperations(Re.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(Re.SAVE_AS,r,e)}_readEditingEnabled(e,r,t){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,r&&"web-map"===t?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,r,t,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";c("layerDefinition.capabilities",e,r),t&&!i?.writeLayerSchema&&(r.capabilities=e)}}_getLayerDomain(e){const r=this.fieldsIndex.get(e);return r?r.domain:null}_fetchFirstLayerId(e){return s(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const r=e.data;if(r)return Array.isArray(r.layers)&&r.layers.length>0?r.layers[0].id:Array.isArray(r.tables)&&r.tables.length>0?r.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Fe(this.renderer,this.fieldsIndex),Ie(this.timeInfo,this.fieldsIndex),Pe(this,{origin:"service"})}async hasDataChanged(){return ge(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,r){e&&e.forEach((e=>{const t=e.prototype&&e.prototype.attributes;t&&r&&delete t[r]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};e([S("service","capabilities")],We.prototype,"readCapabilities",null),e([v({json:{origins:{"web-scene":{write:!1}},write:!0}})],We.prototype,"charts",void 0),e([v({readOnly:!0})],We.prototype,"createQueryVersion",null),e([v({json:{read:{source:"layerDefinition.copyrightText"}}})],We.prototype,"copyright",void 0),e([v({json:{read:{source:"layerDefinition.displayField"}}})],We.prototype,"displayField",void 0),e([v({types:a,readOnly:!0})],We.prototype,"defaultSymbol",void 0),e([v({type:xe})],We.prototype,"dynamicDataSource",void 0),e([v({type:Boolean})],We.prototype,"editingEnabled",null),e([S(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],We.prototype,"readEditingEnabled",null),e([S("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],We.prototype,"readEditingEnabledFromWebMap",null),e([I(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],We.prototype,"writeEditingEnabled",null),e([I("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],We.prototype,"writeEditingEnabledToWebMap",null),e([v({readOnly:!0})],We.prototype,"effectiveEditingEnabled",null),e([v({...Je.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:$e}}}}})],We.prototype,"fields",void 0),e([v(Je.fieldsIndex)],We.prototype,"fieldsIndex",void 0),e([v({type:T,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],We.prototype,"formTemplate",void 0),e([v({json:{read:{source:"layerDefinition.extent"}}})],We.prototype,"fullExtent",void 0),e([v({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:$e,writer(e,r,t){const i=e?we.toJSON(e):null;i&&c(t,i,r)}}}},read:{source:"layerDefinition.geometryType",reader:we.read}}})],We.prototype,"geometryType",void 0),e([v({json:{read:{source:"layerDefinition.hasM"}}})],We.prototype,"hasM",void 0),e([v({json:{read:{source:"layerDefinition.hasZ"}}})],We.prototype,"hasZ",void 0),e([v(H)],We.prototype,"id",void 0),e([v({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],We.prototype,"infoFor3D",void 0),e([v({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],We.prototype,"isTable",void 0),e([S("service","isTable",["type","geometryType"]),S("isTable",["layerDefinition.type","layerDefinition.geometryType"])],We.prototype,"readIsTable",null),e([I("web-map","isTable")],We.prototype,"writeIsTable",null),e([v(Z)],We.prototype,"labelsVisible",void 0),e([v({type:[Te],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:Ee},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:Ee},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],We.prototype,"labelingInfo",void 0),e([v((()=>{const e=u(k);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,r,t){c(t,Ae(e),r)}}},e})())],We.prototype,"opacity",void 0),e([v(z)],We.prototype,"legendEnabled",void 0),e([v({type:["show","hide"],json:(()=>{const e=u(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],We.prototype,"listMode",void 0),e([S("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],We.prototype,"readGlobalIdField",null),e([v({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:$e}}}}})],We.prototype,"objectIdField",void 0),e([S("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],We.prototype,"readObjectIdField",null),e([v({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],We.prototype,"operationalLayerType",void 0),e([v(Je.outFields)],We.prototype,"outFields",void 0),e([v({readOnly:!0})],We.prototype,"parsedUrl",null),e([v({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],We.prototype,"path",void 0),e([v(X)],We.prototype,"popupEnabled",void 0),e([v({type:r,json:{name:"popupInfo",write:!0}})],We.prototype,"popupTemplate",void 0),e([v({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),e([v({types:i,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,r,t)=>({ignoreOrigin:t?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,r,t)=>({ignoreOrigin:t?.writeLayerSchema})}}})],We.prototype,"renderer",null),e([S("service","renderer",["drawingInfo.renderer","defaultSymbol"]),S("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],We.prototype,"readRenderer",null),e([v((()=>{const e=u(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],We.prototype,"screenSizePerspectiveEnabled",void 0),e([v({clonable:!1})],We.prototype,"source",null),e([j("source")],We.prototype,"castSource",null),e([S("portal-item","source",["featureSet"]),S("web-map","source",["featureSet"])],We.prototype,"readSource",null),e([v({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],We.prototype,"spatialReference",void 0),e([v({type:Number})],We.prototype,"subtypeCode",void 0),e([v({type:[ve]})],We.prototype,"templates",void 0),e([S("templates",["editFieldsInfo","creatorField","editorField","templates"])],We.prototype,"readTemplates",null),e([v({type:Le})],We.prototype,"timeInfo",void 0),e([v()],We.prototype,"title",void 0),e([S("service","title",["name"]),S("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],We.prototype,"readTitle",null),e([S("web-map","title",["layerDefinition.name","title"])],We.prototype,"readTitleFromWebMap",null),e([v({type:String})],We.prototype,"sublayerTitleMode",void 0),e([v({json:{read:!1}})],We.prototype,"type",void 0),e([v({type:String})],We.prototype,"typeIdField",void 0),e([S("service","typeIdField"),S("typeIdField",["layerDefinition.typeIdField"])],We.prototype,"readTypeIdField",null),e([v({type:[je]})],We.prototype,"types",void 0),e([S("service","types",["types"]),S("types",["layerDefinition.types"])],We.prototype,"readTypes",null),e([v({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],We.prototype,"visible",void 0),e([S("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],We.prototype,"readVisible",null),We=e([F(Ve)],We);const Be=We;export{Be as default};
|
package/layers/ImageryLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as s,throwIfAbortError as i}from"../core/promiseUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../core/accessorSupport/decorators/writer.js";import m from"./Layer.js";import{ArcGISImageService as c}from"./mixins/ArcGISImageService.js";import{ArcGISService as l}from"./mixins/ArcGISService.js";import{BlendLayer as u}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as d}from"./mixins/OperationalLayer.js";import{PortalLayer as f}from"./mixins/PortalLayer.js";import{RefreshableLayer as h}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as v}from"./mixins/TemporalLayer.js";import{legendEnabled as g,popupEnabled as j}from"./support/commonProperties.js";import{serviceSupportsSpatialReference as I}from"./support/versionUtils.js";import{createPopupTemplate as L}from"../support/popupUtils.js";import{SaveOperationType as T}from"../webdoc/interfaces.js";let b=class extends(u(v(S(d(f(c(h(y(l(o(t(m)))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=s((async(e,r,t)=>{const{save:o,saveAs:s}=await import("./save/imageryUtils.js");switch(e){case T.SAVE:return o(this,r);case T.SAVE_AS:return s(this,t,r)}}))}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(i).then((()=>this._fetchService(r)))),Promise.resolve(this)}writeOperationalLayerType(e,r,t){const o="vector-field"===this.renderer?.type;r[t]=o?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const r=this.rasterFields,t=this.title,o=new Set;let s=!1,i=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,i="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const a=new Set;s&&a.add("raster.itempixelvalue");for(const p of r){const e=p.name.toLowerCase();a.has(e)||e.includes("raster.servicepixelvalue.")||o.add(p.name)}return i&&o.add("raster.magnitude").add("raster.direction"),L({fields:r,title:t},{...e,visibleFieldNames:o})}queryFeatures(e,r){return this.queryRasters(e,r).then((e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e}))}queryFeatureCount(e,r){return this.queryRasterCount(e,r)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(T.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(T.SAVE_AS,r,e)}serviceSupportsSpatialReference(e){return I(this,e)}};e([a(g)],b.prototype,"legendEnabled",void 0),e([a({type:["show","hide"]})],b.prototype,"listMode",void 0),e([a({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],b.prototype,"isReference",void 0),e([a({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],b.prototype,"operationalLayerType",void 0),e([n("web-map","operationalLayerType")],b.prototype,"writeOperationalLayerType",null),e([a(j)],b.prototype,"popupEnabled",void 0),e([a({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],b.prototype,"popupTemplate",void 0),e([a({readOnly:!0})],b.prototype,"defaultPopupTemplate",null),e([a({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),b=e([p("esri.layers.ImageryLayer")],b);const w=b;export{w 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/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as m,Integer as u}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{enumeration as c}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import h from"./Layer.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as v}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as j}from"./mixins/PortalLayer.js";import{RefreshableLayer as R}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{legendEnabled as O}from"./support/commonProperties.js";import I from"./support/Field.js";import{interpolationKebab as P}from"./support/rasterEnums.js";import T from"./support/RasterFunction.js";import _ from"./support/rasterDatasets/FunctionRaster.js";import x from"./support/rasterDatasets/RasterFactory.js";import{create as N,getPrimaryRasterUrls as F}from"./support/rasterFunctions/rasterFunctionHelper.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import{SaveOperationType as L}from"../webdoc/interfaces.js";let E=class extends(f(b(S(j(g(v(w(y(R(o(t(h)))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=a((async(e,r,t)=>{const{save:s,saveAs:i}=await import("./save/imageryUtils.js");switch(e){case L.SAVE:return s(this,r);case L.SAVE_AS:return i(this,t,r)}}))}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(n).then((()=>this._openRaster(r)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[new I({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new I({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],{rasterInfo:r}=this,t=r?.attributeTable,s=null!=t?t.fields:null,i="Raster.";if(s){const r=s.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const r=e.clone();return r.name=i+e.name,r}));e.push(...r)}const o=r?.dataType,a=r?.multidimensionalInfo;if(("vector-magdir"===o||"vector-uv"===o)&&null!=a){const r=a.variables[0].unit?.trim(),t="Magnitude"+(r?` (${r})`:"");e.push(new I({name:"Raster.Magnitude",alias:t,domain:null,editable:!1,type:"double"})),e.push(new I({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){const{rasterFields:r}=this,t=new Set(r.map((({name:e})=>e)).filter((e=>"raster.servicepixelvalue.raw"!==e.toLowerCase())));return J({fields:r,title:this.title},{...e,visibleFieldNames:t})}async generateRasterInfo(e,r){if(!(e=m(T,e)))return this.rasterInfo;try{const t={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>t[e.url]=e));const s=N(e.functionDefinition?.toJSON()??e.toJSON(),t),i=new _({rasterFunction:s});return await i.open(r),i.rasterInfo}catch(t){if(t instanceof s)throw t;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(L.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(L.SAVE_AS,r,e)}write(e,r){const t=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===t.datasetFormat&&("Raster"===t.tileType||"Map"===t.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,r);if(r&&r.messages){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`;r.messages.push(new s("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let r=!1;if(this.raster)this.raster.rasterInfo||await this.raster.open(),"Function"===this.raster.datasetFormat?(r=!0,this._primaryRasters=this.raster.primaryRasters.rasters):this._primaryRasters=[this.raster],this.url=this.raster.url;else{const{rasterFunction:r}=this,t=[this.url];r&&F(r.toJSON(),t);const a=await Promise.all(t.map((r=>x.open({url:r,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e})))),n=a.findIndex((e=>null==e));if(n>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${t[n]}`);if(this._primaryRasters=a,r){const e={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((r=>e[r.url]=r));const t=N(r.functionDefinition?.toJSON()??r.toJSON(),e),n=new _({rasterFunction:t});try{await n.open(),this.raster=n}catch(o){const e=i.getLogger(this);o instanceof s&&e.error("imagery-tile-layer:open",o.message),e.warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=a[0]}}else this.raster=a[0]}const t=this.raster.rasterInfo;if(!t)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("rasterInfo",r?t:this._primaryRasters[0].rasterInfo),this._set("spatialReference",t.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.rasterInfo.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(l((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};e([p({clonable:!1})],E.prototype,"_primaryRasters",void 0),e([p({type:[u],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],E.prototype,"bandIds",void 0),e([p({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),c(P)],E.prototype,"interpolation",void 0),e([p(O)],E.prototype,"legendEnabled",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],E.prototype,"isReference",void 0),e([p({type:["show","hide"]})],E.prototype,"listMode",void 0),e([p({json:{read:!0,write:!0}})],E.prototype,"blendMode",void 0),e([p()],E.prototype,"sourceJSON",void 0),e([p({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],E.prototype,"version",void 0),e([p({readOnly:!0,json:{read:!1}})],E.prototype,"type",void 0),e([p({type:["ArcGISTiledImageServiceLayer"]})],E.prototype,"operationalLayerType",void 0),e([p({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,r,t){r[t]=!e}}}})],E.prototype,"popupEnabled",void 0),e([p({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],E.prototype,"popupTemplate",void 0),e([p({readOnly:!0})],E.prototype,"defaultPopupTemplate",null),e([p({readOnly:!0,type:[I]})],E.prototype,"fields",void 0),e([p({readOnly:!0,type:[I]})],E.prototype,"rasterFields",null),E=e([d("esri.layers.ImageryTileLayer")],E);const A=E;export{A as default};
|
package/layers/StreamLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import{read as r}from"../renderers/support/jsonUtils.js";import{rendererTypes as i,webSceneRendererTypes as o}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as n}from"../core/Clonable.js";import a from"../core/Error.js";import{handlesGroup as p}from"../core/handleUtils.js";import{clone as l}from"../core/lang.js";import m from"../core/Logger.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as c}from"../core/promiseUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import{Integer as y}from"../core/accessorSupport/ensureType.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{featureGeometryTypeKebabDictionary as g}from"../geometry/support/typeUtils.js";import j from"./Layer.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as S}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as I}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{RefreshableLayer as T}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{labelsVisible as L,legendEnabled as U,maxScale as k,minScale as D,popupEnabled as E,screenSizePerspectiveEnabled as C,url as O}from"./support/commonProperties.js";import{createDefaultRenderer as A}from"./support/featureLayerUtils.js";import _ from"./support/Field.js";import{defineFieldProperties as N}from"./support/fieldProperties.js";import{fixRendererFields as G,fixTimeInfoFields as J}from"./support/fieldUtils.js";import M from"./support/LabelClass.js";import{reader as V}from"./support/labelingInfo.js";import q from"./support/PurgeOptions.js";import{loadStyleRenderer as z}from"../renderers/support/styleUtils.js";import $ from"../rest/support/Query.js";import{createPopupTemplate as W}from"../support/popupUtils.js";import B from"../symbols/support/ElevationInfo.js";import Q from"../geometry/SpatialReference.js";import H from"../geometry/Extent.js";const K=N();function X(e,t){return new a("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let Y=class extends(I(S(w(F(P(T(v(x(R(d(b(n(j))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new q,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=Q.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new a("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(c).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){G(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const o=t.drawingInfo?.renderer;if(o){const e=r(o,t,i)||void 0;return e||m.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return A(t,i)}async connect(e){const[{createConnection:t}]=await Promise.all([import("./graphics/sources/connections/createConnection.js"),this.load()]),r=this.geometryType?g.toJSON(this.geometryType):null,{customParameters:i=null,definitionExpression:o=null,geometryDefinition:s=null,maxReconnectionAttempts:n=0,maxReconnectionInterval:a=20,spatialReference:l=this.spatialReference}=e||this.createConnectionParameters(),m=t(this.parsedUrl,this.spatialReference,l,r,{geometry:s,where:o},n,a,i??void 0),d=p([this.on("send-message-to-socket",(e=>m.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>m.sendMessageToClient(e)))]);return m.once("destroy",d.remove),m}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return W(this,e)}createQuery(){const e=new $;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some((t=>(t.name===e&&(r=t.domain),!!r))),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){const{save:t}=await import("./save/streamLayerUtils.js");return t(this,e)}async saveAs(e,t){const{saveAs:r}=await import("./save/streamLayerUtils.js");return r(this,e,t)}write(e,t){const r=t?.messages;return this.webSocketUrl?(r?.push(X(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(r?.push(X(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!!!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await s(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new a("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new a("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new a("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new _({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new a("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),G(this.renderer,this.fieldsIndex),J(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),z(this,{origin:"service"})}};e([u({type:String})],Y.prototype,"copyright",void 0),e([u({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),e([u({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Y.prototype,"definitionExpression",void 0),e([u({type:String})],Y.prototype,"displayField",void 0),e([u({type:B})],Y.prototype,"elevationInfo",void 0),e([u({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Y.prototype,"featureReduction",null),e([u(K.fields)],Y.prototype,"fields",void 0),e([u(K.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),e([u({type:H,json:{name:"layerDefinition.definitionGeometry",write:!0}})],Y.prototype,"geometryDefinition",void 0),e([u({type:g.apiValues,json:{read:{reader:g.read}}})],Y.prototype,"geometryType",void 0),e([u(L)],Y.prototype,"labelsVisible",void 0),e([u({type:[M],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:V},write:!0}})],Y.prototype,"labelingInfo",void 0),e([u(U)],Y.prototype,"legendEnabled",void 0),e([u({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Y.prototype,"listMode",void 0),e([u({type:y})],Y.prototype,"maxReconnectionAttempts",void 0),e([u({type:y})],Y.prototype,"maxReconnectionInterval",void 0),e([u(k)],Y.prototype,"maxScale",void 0),e([u(D)],Y.prototype,"minScale",void 0),e([u({type:String})],Y.prototype,"objectIdField",void 0),e([u({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],Y.prototype,"operationalLayerType",void 0),e([u(E)],Y.prototype,"popupEnabled",void 0),e([u({type:t,json:{name:"popupInfo",write:!0}})],Y.prototype,"popupTemplate",void 0),e([u({type:q})],Y.prototype,"purgeOptions",void 0),e([u({json:{read:!1,write:!1}})],Y.prototype,"refreshInterval",void 0),e([u({types:i,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:o,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],Y.prototype,"renderer",null),e([f("service","renderer",["drawingInfo.renderer","defaultSymbol"]),f("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Y.prototype,"readRenderer",null),e([u((()=>{const e=l(C);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Y.prototype,"screenSizePerspectiveEnabled",void 0),e([u()],Y.prototype,"sourceJSON",void 0),e([u({type:Q,json:{origins:{service:{read:{source:"spatialReference"}}}}})],Y.prototype,"spatialReference",void 0),e([u({json:{read:!1}})],Y.prototype,"type",void 0),e([u(O)],Y.prototype,"url",void 0),e([u({type:Number})],Y.prototype,"updateInterval",void 0),e([u({json:{read:!1,write:!1}})],Y.prototype,"useViewTime",void 0),e([u({type:String})],Y.prototype,"webSocketUrl",void 0),Y=e([h("esri.layers.StreamLayer")],Y);const Z=Y;export{Z as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import{read as r}from"../renderers/support/jsonUtils.js";import{rendererTypes as i,webSceneRendererTypes as o}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as n}from"../core/Clonable.js";import a from"../core/Error.js";import{handlesGroup as p}from"../core/handleUtils.js";import{clone as l}from"../core/lang.js";import m from"../core/Logger.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{debounce as c,throwIfAbortError as u}from"../core/promiseUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import{Integer as f}from"../core/accessorSupport/ensureType.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{featureGeometryTypeKebabDictionary as j}from"../geometry/support/typeUtils.js";import v from"./Layer.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{BlendLayer as b}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as I}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as x}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as R}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as L}from"./mixins/TemporalLayer.js";import{labelsVisible as U,legendEnabled as E,maxScale as k,minScale as A,popupEnabled as D,screenSizePerspectiveEnabled as _,url as O}from"./support/commonProperties.js";import{createDefaultRenderer as C}from"./support/featureLayerUtils.js";import V from"./support/Field.js";import{defineFieldProperties as N}from"./support/fieldProperties.js";import{fixRendererFields as G,fixTimeInfoFields as J}from"./support/fieldUtils.js";import M from"./support/LabelClass.js";import{reader as q}from"./support/labelingInfo.js";import z from"./support/PurgeOptions.js";import{loadStyleRenderer as $}from"../renderers/support/styleUtils.js";import W from"../rest/support/Query.js";import{createPopupTemplate as B}from"../support/popupUtils.js";import Q from"../symbols/support/ElevationInfo.js";import{SaveOperationType as H}from"../webdoc/interfaces.js";import K from"../geometry/SpatialReference.js";import X from"../geometry/Extent.js";const Y=N();function Z(e,t){return new a("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let ee=class extends(x(I(b(L(F(P(w(R(T(d(S(n(v))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new z,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=K.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=c((async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/streamLayerUtils.js");switch(e){case H.SAVE:return i(this,t);case H.SAVE_AS:return o(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new a("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(u).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){G(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const o=t.drawingInfo?.renderer;if(o){const e=r(o,t,i)||void 0;return e||m.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return C(t,i)}async connect(e){const[{createConnection:t}]=await Promise.all([import("./graphics/sources/connections/createConnection.js"),this.load()]),r=this.geometryType?j.toJSON(this.geometryType):null,{customParameters:i=null,definitionExpression:o=null,geometryDefinition:s=null,maxReconnectionAttempts:n=0,maxReconnectionInterval:a=20,spatialReference:l=this.spatialReference}=e||this.createConnectionParameters(),m=t(this.parsedUrl,this.spatialReference,l,r,{geometry:s,where:o},n,a,i??void 0),d=p([this.on("send-message-to-socket",(e=>m.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>m.sendMessageToClient(e)))]);return m.once("destroy",d.remove),m}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return B(this,e)}createQuery(){const e=new W;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some((t=>(t.name===e&&(r=t.domain),!!r))),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(H.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(H.SAVE_AS,t,e)}write(e,t){const r=t?.messages;return this.webSocketUrl?(r?.push(Z(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(r?.push(Z(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!!!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await s(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new a("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new a("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new a("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new V({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new a("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),G(this.renderer,this.fieldsIndex),J(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),$(this,{origin:"service"})}};e([y({type:String})],ee.prototype,"copyright",void 0),e([y({readOnly:!0})],ee.prototype,"defaultPopupTemplate",null),e([y({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ee.prototype,"definitionExpression",void 0),e([y({type:String})],ee.prototype,"displayField",void 0),e([y({type:Q})],ee.prototype,"elevationInfo",void 0),e([y({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],ee.prototype,"featureReduction",null),e([y(Y.fields)],ee.prototype,"fields",void 0),e([y(Y.fieldsIndex)],ee.prototype,"fieldsIndex",void 0),e([y({type:X,json:{name:"layerDefinition.definitionGeometry",write:!0}})],ee.prototype,"geometryDefinition",void 0),e([y({type:j.apiValues,json:{read:{reader:j.read}}})],ee.prototype,"geometryType",void 0),e([y(U)],ee.prototype,"labelsVisible",void 0),e([y({type:[M],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q},write:!0}})],ee.prototype,"labelingInfo",void 0),e([y(E)],ee.prototype,"legendEnabled",void 0),e([y({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ee.prototype,"listMode",void 0),e([y({type:f})],ee.prototype,"maxReconnectionAttempts",void 0),e([y({type:f})],ee.prototype,"maxReconnectionInterval",void 0),e([y(k)],ee.prototype,"maxScale",void 0),e([y(A)],ee.prototype,"minScale",void 0),e([y({type:String})],ee.prototype,"objectIdField",void 0),e([y({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],ee.prototype,"operationalLayerType",void 0),e([y(D)],ee.prototype,"popupEnabled",void 0),e([y({type:t,json:{name:"popupInfo",write:!0}})],ee.prototype,"popupTemplate",void 0),e([y({type:z})],ee.prototype,"purgeOptions",void 0),e([y({json:{read:!1,write:!1}})],ee.prototype,"refreshInterval",void 0),e([y({types:i,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:o,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],ee.prototype,"renderer",null),e([h("service","renderer",["drawingInfo.renderer","defaultSymbol"]),h("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ee.prototype,"readRenderer",null),e([y((()=>{const e=l(_);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ee.prototype,"screenSizePerspectiveEnabled",void 0),e([y()],ee.prototype,"sourceJSON",void 0),e([y({type:K,json:{origins:{service:{read:{source:"spatialReference"}}}}})],ee.prototype,"spatialReference",void 0),e([y({json:{read:!1}})],ee.prototype,"type",void 0),e([y(O)],ee.prototype,"url",void 0),e([y({type:Number})],ee.prototype,"updateInterval",void 0),e([y({json:{read:!1,write:!1}})],ee.prototype,"useViewTime",void 0),e([y({type:String})],ee.prototype,"webSocketUrl",void 0),ee=e([g("esri.layers.StreamLayer")],ee);const te=ee;export{te as default};
|