@arcgis/core 4.34.0-next.114 → 4.34.0-next.116
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/2d834d33b73a55a98ba8.js +1 -0
- package/assets/esri/core/workers/chunks/{7e099070c03e8f95dd47.js → 37897186bfbfa1319ff5.js} +1 -1
- package/assets/esri/core/workers/chunks/4b7c99f9a716a929178d.js +1 -0
- package/assets/esri/core/workers/chunks/7010d1eb303a13c72f81.js +1 -0
- package/assets/esri/core/workers/chunks/{9bbf1ee424d480b62d48.js → 7748356f4d848254fc66.js} +1 -1
- package/assets/esri/core/workers/chunks/9786e854ae9f40975cee.js +1 -0
- package/assets/esri/core/workers/chunks/be1b8e5ff2b1be26845a.js +1 -0
- package/assets/esri/core/workers/chunks/ecd6f163c1bb039d9736.js +1 -0
- package/config.js +1 -1
- package/copyright.txt +0 -60
- package/core/workers/workerFactory.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/interfaces.d.ts +116 -28
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +1 -1
- package/portal/Portal.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/flow/constants.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/types.d.ts +5 -0
- package/views/analysis/ElevationProfile/types.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflowData.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/workflowAdapters/pendingFeatureList/SplitFeatureWorkflowPendingFeatureListAdapter.js +1 -1
- package/widgets/Editor/support/errors.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/selectionListUtils.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/374831c7e3d88bc473b8.js +0 -1
- package/assets/esri/core/workers/chunks/630efe10c871425b6a95.js +0 -1
- package/assets/esri/core/workers/chunks/78b35a19332e58c8c279.js +0 -1
- package/assets/esri/core/workers/chunks/9b8b5cb714a57f89df2c.js +0 -1
- package/assets/esri/core/workers/chunks/a33a0b6700a860153a67.js +0 -1
- package/assets/esri/core/workers/chunks/e7c9d9e1205a8e246bfa.js +0 -1
package/interfaces.d.ts
CHANGED
|
@@ -1163,11 +1163,6 @@ declare namespace __esri {
|
|
|
1163
1163
|
viewOptions?: ElevationProfileViewOptionsProperties;
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
-
export interface ElevationProfileEffectiveDisplayUnits {
|
|
1167
|
-
distance: LengthUnit;
|
|
1168
|
-
elevation: LengthUnit;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
1166
|
export interface LengthDimension extends Accessor, Clonable {
|
|
1172
1167
|
}
|
|
1173
1168
|
|
|
@@ -34057,7 +34052,7 @@ declare namespace __esri {
|
|
|
34057
34052
|
* Converts the given {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html mapPoint} to a
|
|
34058
34053
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ControlPointsGeoreference.html#SourcePoint sourcePoint}.
|
|
34059
34054
|
*
|
|
34060
|
-
* @param point A point geometry. In the case where the point is not in the same spatial reference as the one in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html mapPoint} of the first control point, it will be reprojected. {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-
|
|
34055
|
+
* @param point A point geometry. In the case where the point is not in the same spatial reference as the one in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html mapPoint} of the first control point, it will be reprojected. The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html projectOperator} would need to be loaded to perform the reprojection, otherwise `null` is returned.
|
|
34061
34056
|
*
|
|
34062
34057
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ControlPointsGeoreference.html#toSource Read more...}
|
|
34063
34058
|
*/
|
|
@@ -37832,13 +37827,13 @@ declare namespace __esri {
|
|
|
37832
37827
|
|
|
37833
37828
|
export class ParquetEncodingLocation {
|
|
37834
37829
|
/**
|
|
37835
|
-
* The name of the field in the Parquet file that contains the
|
|
37830
|
+
* The name of the field in the Parquet file that contains the y values.
|
|
37836
37831
|
*
|
|
37837
37832
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ParquetEncodingLocation.html#latitudeFieldName Read more...}
|
|
37838
37833
|
*/
|
|
37839
37834
|
latitudeFieldName: string;
|
|
37840
37835
|
/**
|
|
37841
|
-
* The name of the field in the Parquet file that contains the
|
|
37836
|
+
* The name of the field in the Parquet file that contains the x values.
|
|
37842
37837
|
*
|
|
37843
37838
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ParquetEncodingLocation.html#longitudeFieldName Read more...}
|
|
37844
37839
|
*/
|
|
@@ -37850,7 +37845,7 @@ declare namespace __esri {
|
|
|
37850
37845
|
*/
|
|
37851
37846
|
readonly type: "location";
|
|
37852
37847
|
/**
|
|
37853
|
-
* The location format used to store geometries in
|
|
37848
|
+
* The location format used to store geometries in Parquet files.
|
|
37854
37849
|
*
|
|
37855
37850
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ParquetEncodingLocation.html Read more...}
|
|
37856
37851
|
*/
|
|
@@ -37875,13 +37870,13 @@ declare namespace __esri {
|
|
|
37875
37870
|
|
|
37876
37871
|
interface ParquetEncodingLocationProperties {
|
|
37877
37872
|
/**
|
|
37878
|
-
* The name of the field in the Parquet file that contains the
|
|
37873
|
+
* The name of the field in the Parquet file that contains the y values.
|
|
37879
37874
|
*
|
|
37880
37875
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ParquetEncodingLocation.html#latitudeFieldName Read more...}
|
|
37881
37876
|
*/
|
|
37882
37877
|
latitudeFieldName?: string;
|
|
37883
37878
|
/**
|
|
37884
|
-
* The name of the field in the Parquet file that contains the
|
|
37879
|
+
* The name of the field in the Parquet file that contains the x values.
|
|
37885
37880
|
*
|
|
37886
37881
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ParquetEncodingLocation.html#longitudeFieldName Read more...}
|
|
37887
37882
|
*/
|
|
@@ -96944,13 +96939,6 @@ declare namespace __esri {
|
|
|
96944
96939
|
signal?: AbortSignal | nullish;
|
|
96945
96940
|
}
|
|
96946
96941
|
|
|
96947
|
-
export interface ElevationProfilePickResult {
|
|
96948
|
-
feature: Graphic;
|
|
96949
|
-
}
|
|
96950
|
-
|
|
96951
|
-
export interface ElevationProfilePlacementResult {
|
|
96952
|
-
}
|
|
96953
|
-
|
|
96954
96942
|
export class BaseLayerView2D extends LayerView {
|
|
96955
96943
|
/**
|
|
96956
96944
|
* The array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#Tile Tile} objects computed to cover the MapView's visible area.
|
|
@@ -98876,6 +98864,58 @@ declare namespace __esri {
|
|
|
98876
98864
|
avgNegativeSlope: number | nullish;
|
|
98877
98865
|
}
|
|
98878
98866
|
|
|
98867
|
+
/**
|
|
98868
|
+
* Types common to the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html ElevationProfileAnalysisView2D} and
|
|
98869
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html ElevationProfileAnalysisView3D}.
|
|
98870
|
+
*
|
|
98871
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-types.html Read more...}
|
|
98872
|
+
*/
|
|
98873
|
+
namespace ElevationProfileTypes {
|
|
98874
|
+
/**
|
|
98875
|
+
* Result of interactively placing an elevation profile line on the view.
|
|
98876
|
+
*
|
|
98877
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-types.html#ElevationProfilePlacementResult Read more...}
|
|
98878
|
+
*/
|
|
98879
|
+
export interface ElevationProfilePlacementResult {
|
|
98880
|
+
}
|
|
98881
|
+
|
|
98882
|
+
/**
|
|
98883
|
+
* Result of picking a feature from the view to perform an elevation profile analysis.
|
|
98884
|
+
*
|
|
98885
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-types.html#ElevationProfilePickResult Read more...}
|
|
98886
|
+
*/
|
|
98887
|
+
export interface ElevationProfilePickResult {
|
|
98888
|
+
feature: Graphic;
|
|
98889
|
+
}
|
|
98890
|
+
|
|
98891
|
+
export interface ElevationProfileEffectiveDisplayUnits {
|
|
98892
|
+
distance: LengthUnit;
|
|
98893
|
+
elevation: LengthUnit;
|
|
98894
|
+
}
|
|
98895
|
+
}
|
|
98896
|
+
|
|
98897
|
+
export interface ElevationProfileEffectiveDisplayUnits {
|
|
98898
|
+
distance: LengthUnit;
|
|
98899
|
+
elevation: LengthUnit;
|
|
98900
|
+
}
|
|
98901
|
+
|
|
98902
|
+
/**
|
|
98903
|
+
* Result of picking a feature from the view to perform an elevation profile analysis.
|
|
98904
|
+
*
|
|
98905
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-types.html#ElevationProfilePickResult Read more...}
|
|
98906
|
+
*/
|
|
98907
|
+
export interface ElevationProfilePickResult {
|
|
98908
|
+
feature: Graphic;
|
|
98909
|
+
}
|
|
98910
|
+
|
|
98911
|
+
/**
|
|
98912
|
+
* Result of interactively placing an elevation profile line on the view.
|
|
98913
|
+
*
|
|
98914
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-types.html#ElevationProfilePlacementResult Read more...}
|
|
98915
|
+
*/
|
|
98916
|
+
export interface ElevationProfilePlacementResult {
|
|
98917
|
+
}
|
|
98918
|
+
|
|
98879
98919
|
/**
|
|
98880
98920
|
* Represents the result of a LengthDimension.
|
|
98881
98921
|
*
|
|
@@ -100473,7 +100513,7 @@ declare namespace __esri {
|
|
|
100473
100513
|
*/
|
|
100474
100514
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
100475
100515
|
/**
|
|
100476
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
100516
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
100477
100517
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
100478
100518
|
*
|
|
100479
100519
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CatalogFootprintLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CatalogFootprintLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CatalogFootprintLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -100710,7 +100750,7 @@ declare namespace __esri {
|
|
|
100710
100750
|
*/
|
|
100711
100751
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
100712
100752
|
/**
|
|
100713
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
100753
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
100714
100754
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
100715
100755
|
*
|
|
100716
100756
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -100998,7 +101038,7 @@ declare namespace __esri {
|
|
|
100998
101038
|
*/
|
|
100999
101039
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
101000
101040
|
/**
|
|
101001
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
101041
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
101002
101042
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
101003
101043
|
*
|
|
101004
101044
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -101123,7 +101163,7 @@ declare namespace __esri {
|
|
|
101123
101163
|
*/
|
|
101124
101164
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
101125
101165
|
/**
|
|
101126
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
101166
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
101127
101167
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
101128
101168
|
*
|
|
101129
101169
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -101321,7 +101361,7 @@ declare namespace __esri {
|
|
|
101321
101361
|
*/
|
|
101322
101362
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
101323
101363
|
/**
|
|
101324
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
101364
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
101325
101365
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
101326
101366
|
*
|
|
101327
101367
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -102026,7 +102066,7 @@ declare namespace __esri {
|
|
|
102026
102066
|
*/
|
|
102027
102067
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
102028
102068
|
/**
|
|
102029
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
102069
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
102030
102070
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
102031
102071
|
*
|
|
102032
102072
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-OGCFeatureLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-OGCFeatureLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-OGCFeatureLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -102230,7 +102270,7 @@ declare namespace __esri {
|
|
|
102230
102270
|
*/
|
|
102231
102271
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
102232
102272
|
/**
|
|
102233
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
102273
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
102234
102274
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
102235
102275
|
*
|
|
102236
102276
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ParquetLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ParquetLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ParquetLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -102975,7 +103015,7 @@ declare namespace __esri {
|
|
|
102975
103015
|
*/
|
|
102976
103016
|
queryFeatureCount(query?: QueryProperties, options?: FeatureLayerViewMixinQueryFeatureCountOptions): Promise<number>;
|
|
102977
103017
|
/**
|
|
102978
|
-
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the
|
|
103018
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features available for drawing in the LayerView
|
|
102979
103019
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
102980
103020
|
*
|
|
102981
103021
|
* @param query Specifies the attributes and spatial filter of the query. When this parameter is not passed to `queryFeatures()` method, then a default query is created using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-WFSLayerView.html#createQuery createQuery()} method and all features that pass the layer view {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-WFSLayerView.html#filter filter} are returned along with their attributes that are {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-WFSLayerView.html#availableFields available on the client}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
|
|
@@ -112728,6 +112768,12 @@ declare namespace __esri {
|
|
|
112728
112768
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html#icon Read more...}
|
|
112729
112769
|
*/
|
|
112730
112770
|
icon: string;
|
|
112771
|
+
/**
|
|
112772
|
+
* An array of objects containing a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html FormTemplate} and its corresponding layer.
|
|
112773
|
+
*
|
|
112774
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html#layerInfos Read more...}
|
|
112775
|
+
*/
|
|
112776
|
+
layerInfos: BatchAttributeFormLayerInfo[] | nullish;
|
|
112731
112777
|
/**
|
|
112732
112778
|
* A reference to the associated {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map}.
|
|
112733
112779
|
*
|
|
@@ -112821,6 +112867,12 @@ declare namespace __esri {
|
|
|
112821
112867
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html#icon Read more...}
|
|
112822
112868
|
*/
|
|
112823
112869
|
icon?: string;
|
|
112870
|
+
/**
|
|
112871
|
+
* An array of objects containing a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html FormTemplate} and its corresponding layer.
|
|
112872
|
+
*
|
|
112873
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html#layerInfos Read more...}
|
|
112874
|
+
*/
|
|
112875
|
+
layerInfos?: BatchAttributeFormLayerInfo[] | nullish;
|
|
112824
112876
|
/**
|
|
112825
112877
|
* A reference to the associated {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map}.
|
|
112826
112878
|
*
|
|
@@ -112937,12 +112989,25 @@ declare namespace __esri {
|
|
|
112937
112989
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#invalidFeatures Read more...}
|
|
112938
112990
|
*/
|
|
112939
112991
|
readonly invalidFeatures: Graphic[];
|
|
112992
|
+
/**
|
|
112993
|
+
* An array of objects containing a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html FormTemplate} and its corresponding layer.
|
|
112994
|
+
*
|
|
112995
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#layerInfos Read more...}
|
|
112996
|
+
*/
|
|
112997
|
+
layerInfos: BatchAttributeFormLayerInfo[] | nullish;
|
|
112940
112998
|
/**
|
|
112941
112999
|
* An array of layers included in the batch attribute form.
|
|
112942
113000
|
*
|
|
112943
113001
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#layers Read more...}
|
|
112944
113002
|
*/
|
|
112945
|
-
readonly layers: (
|
|
113003
|
+
readonly layers: (
|
|
113004
|
+
| FeatureLayer
|
|
113005
|
+
| GeoJSONLayer
|
|
113006
|
+
| SceneLayer
|
|
113007
|
+
| SubtypeSublayer
|
|
113008
|
+
| OrientedImageryLayer
|
|
113009
|
+
| KnowledgeGraphSublayer
|
|
113010
|
+
)[];
|
|
112946
113011
|
/**
|
|
112947
113012
|
* A reference to the associated {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map}.
|
|
112948
113013
|
*
|
|
@@ -113082,6 +113147,12 @@ declare namespace __esri {
|
|
|
113082
113147
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#features Read more...}
|
|
113083
113148
|
*/
|
|
113084
113149
|
features?: Collection<Graphic>;
|
|
113150
|
+
/**
|
|
113151
|
+
* An array of objects containing a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html FormTemplate} and its corresponding layer.
|
|
113152
|
+
*
|
|
113153
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#layerInfos Read more...}
|
|
113154
|
+
*/
|
|
113155
|
+
layerInfos?: BatchAttributeFormLayerInfo[] | nullish;
|
|
113085
113156
|
/**
|
|
113086
113157
|
* A reference to the associated {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map}.
|
|
113087
113158
|
*
|
|
@@ -113464,7 +113535,14 @@ declare namespace __esri {
|
|
|
113464
113535
|
readonly description: string | nullish;
|
|
113465
113536
|
existsInAllLayers: boolean;
|
|
113466
113537
|
readonly label: string | nullish;
|
|
113467
|
-
readonly layers: (
|
|
113538
|
+
readonly layers: (
|
|
113539
|
+
| FeatureLayer
|
|
113540
|
+
| GeoJSONLayer
|
|
113541
|
+
| SceneLayer
|
|
113542
|
+
| SubtypeSublayer
|
|
113543
|
+
| OrientedImageryLayer
|
|
113544
|
+
| KnowledgeGraphSublayer
|
|
113545
|
+
)[];
|
|
113468
113546
|
readonly visible: boolean;
|
|
113469
113547
|
}
|
|
113470
113548
|
|
|
@@ -113472,6 +113550,16 @@ declare namespace __esri {
|
|
|
113472
113550
|
existsInAllLayers?: boolean;
|
|
113473
113551
|
}
|
|
113474
113552
|
|
|
113553
|
+
/**
|
|
113554
|
+
* Configurations used for setting the layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html FormTemplate} within `BatchAttributeForm`.
|
|
113555
|
+
*
|
|
113556
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html#LayerInfo Read more...}
|
|
113557
|
+
*/
|
|
113558
|
+
export interface BatchAttributeFormLayerInfo {
|
|
113559
|
+
layer: FeatureLayer | GeoJSONLayer | OrientedImageryLayer | SceneLayer | SubtypeSublayer | KnowledgeGraphSublayer;
|
|
113560
|
+
formTemplate?: FormTemplate;
|
|
113561
|
+
}
|
|
113562
|
+
|
|
113475
113563
|
export interface BatchAttributeFormSubmitEvent {
|
|
113476
113564
|
name: "submit";
|
|
113477
113565
|
results: SubmitResult[];
|
package/kernel.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.116",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import o from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as n,sync as a}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{persistable as d}from"../core/accessorSupport/decorators/persistable.js";import c from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import h from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as T,url as v}from"./support/commonProperties.js";import L from"./support/SceneModifications.js";import{initFullExtent as w}from"./support/tiles3DUtils.js";import x from"../portal/Portal.js";import{logInvalidElevationInfoWarning as b,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as I}from"../support/elevationInfoUtils.js";import{f as k}from"../chunks/persistableUrlUtils.js";import{isBasemap as R}from"../support/userTypeGuards/isBasemap.js";let D=class extends(y(_(S(j(i(g(f(h)))))))){readModifications(e,t,o){this._modificationsSource={url:k(e,o),context:o}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,a))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new u({wkid:4326,vcsWkid:115700}),this.fullExtent=new c(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[r,i]of Object.entries(e)){if("uri"===r)try{const e=new URL("https://tmp"+i).searchParams.get("session");if(e)return e}catch(o){}"object"==typeof i&&null!==i&&t.push(i)}}return null}async requestRootAndSession(e){const i=(e,t)=>new o("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((o,n)=>{this.url||n(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,o)=>{if(this.replacesTerrain&&!this._key){const r=this.portalItem?.portal||this.parent?.portalItem?.portal||x.getDefault();r.signIn().then(()=>{r.g3dTilesEnabled?t(r.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>o(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):o(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+r.url))},()=>o(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",authMode:"anonymous",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void n(i("root-parse-failed","Error parsing root tile, details: "+t))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=w(this._rootTilesetJSON),o(),this._rootRequestPromise=null):n(i("root-is-null","Root tile is null."))},e=>{s(e),n(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>n(e))})),this._rootRequestPromise}async _doLoad(e){const t=null!=e?e.signal:null;if(this._isUsedAsGroundLayer)throw new o("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new o("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(r){s(r)}if(null!=this._modificationsSource){const t=await L.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},e=>{r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})}get hasAttributionData(){return!1}async fetchAttributionData(){return{}}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";b(r.getLogger(this),P(t,"absolute-height",e)),b(r.getLogger(this),I(t,e))}get replacesTerrain(){return!1}get _isUsedAsGroundLayer(){return R(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};e([l({type:["IntegratedMesh3DTilesLayer"]})],D.prototype,"operationalLayerType",void 0),e([l({type:L,clonable:e=>e.clone()}),d({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],D.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],D.prototype,"readModifications",null),e([l({type:u})],D.prototype,"spatialReference",void 0),e([l({type:c})],D.prototype,"fullExtent",void 0),e([l(T)],D.prototype,"elevationInfo",null),e([l({type:["show","hide"]})],D.prototype,"listMode",void 0),e([l(v)],D.prototype,"url",void 0),e([l({readOnly:!0})],D.prototype,"type",void 0),e([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],D.prototype,"path",void 0),e([l({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],D.prototype,"minScale",void 0),e([l({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],D.prototype,"maxScale",void 0),e([l()],D.prototype,"replacesTerrain",null),e([l()],D.prototype,"_isUsedAsGroundLayer",null),e([l()],D.prototype,"hasGoogleUrl",null),D=e([m("esri.layers.IntegratedMesh3DTilesLayer")],D);const M=D;export{M as default};
|
package/layers/ParquetLayer.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{watch as s}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import a from"../geometry/Extent.js";import l from"../geometry/SpatialReference.js";import u from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as d}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as f}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import P from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as F,fixTimeInfoFields as L}from"./support/fieldUtils.js";import S from"./support/LabelClass.js";import{reader as T}from"./support/labelingInfo.js";import{ParquetEncodingBase as _}from"./support/ParquetEncodingBase.js";import E from"./support/ParquetEncodingLocation.js";import R from"./support/ParquetEncodingWkb.js";import{parquetGeometryTypeKebabDict as C}from"./support/parquetUtils.js";import{rendererTypes as Q}from"../renderers/support/typeUtils.js";import z from"../rest/support/Query.js";import{createPopupTemplate as D}from"../support/popupUtils.js";const U=q(),k="__OBJECTID",B={types:{key:"type",base:_,typeMap:{wkb:R,location:E}}};let G=class extends(f(j(h(y(v(w(b(g(x(o(c(t(m))))))))))))){constructor(e){super(e),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new u(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=k,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new i}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([s(()=>this.urls,e=>this.source?.updateFiles(e.items)),s(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.encoding}set renderer(e){F(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return D(this,e)}createQuery(){const e=new z;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const r=new d({layer:this});return await r.load(e),r}getFieldDomain(e,r){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,r){await this.load();const t=await this.source.queryFeatures(this._normalizeQuery(e),r),i=this.graphicOrigin;if(t?.features)for(const o of t.features)o.layer=o.sourceLayer=this,o.origin=i;return t}async queryObjectIds(e,r){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),r)}async queryFeatureCount(e,r){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),r)}async queryExtent(e,r){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),r)}_normalizeQuery(e){return z.from(e)??this.createQuery()}async _load(e){const r=await this.createSource(e);this._set("source",r),this.read(r.sourceJSON,{origin:"service"}),this.revert(["fields","timeInfo"],"service"),F(this.renderer,this.fieldsIndex),L(this.timeInfo,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=l.WGS84)}};e([p({readOnly:!0,json:{read:!1,write:!1}})],G.prototype,"capabilities",null),e([p({type:String})],G.prototype,"copyright",void 0),e([p({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),e([p()],G.prototype,"displayOptimization",void 0),e([p({type:[P],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],G.prototype,"fields",void 0),e([p(U.fieldsIndex)],G.prototype,"fieldsIndex",void 0),e([p(B)],G.prototype,"encoding",void 0),e([p({type:a,json:{name:"extent"}})],G.prototype,"fullExtent",void 0),e([p({json:{read:{reader:C.read}}})],G.prototype,"geometryType",void 0),e([p({readOnly:!0,clonable:!1})],G.prototype,"graphicOrigin",void 0),e([p(I)],G.prototype,"labelsVisible",void 0),e([p({type:[S],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:T},write:!0}})],G.prototype,"labelingInfo",void 0),e([p()],G.prototype,"file",void 0),e([p({type:String,readOnly:!0})],G.prototype,"objectIdField",void 0),e([p(U.outFields)],G.prototype,"outFields",void 0),e([p({type:r,json:{name:"popupInfo",write:!0}})],G.prototype,"popupTemplate",void 0),e([p({types:Q,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{write:!1}}}})],G.prototype,"renderer",null),e([p({json:{read:!1},cast:null,type:d,readOnly:!0})],G.prototype,"source",void 0),e([p({json:{read:{source:"extent.spatialReference"}}})],G.prototype,"spatialReference",void 0),e([p({type:[O]})],G.prototype,"templates",void 0),e([p()],G.prototype,"title",void 0),e([p({json:{read:!1},readOnly:!0})],G.prototype,"type",void 0),e([p({type:i.ofType(String)})],G.prototype,"urls",void 0),G=e([n("esri.layers.ParquetLayer")],G);const J=G;export{J as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import i from"../core/Collection.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{watch as s}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import a from"../geometry/Extent.js";import l from"../geometry/SpatialReference.js";import u from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as d}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as f}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import P from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as F,fixTimeInfoFields as L}from"./support/fieldUtils.js";import S from"./support/LabelClass.js";import{reader as T}from"./support/labelingInfo.js";import{ParquetEncodingBase as _}from"./support/ParquetEncodingBase.js";import E from"./support/ParquetEncodingLocation.js";import R from"./support/ParquetEncodingWkb.js";import{parquetGeometryTypeKebabDict as C}from"./support/parquetUtils.js";import{rendererTypes as Q}from"../renderers/support/typeUtils.js";import z from"../rest/support/Query.js";import{createPopupTemplate as D}from"../support/popupUtils.js";const U=q(),k="__OBJECTID",B={types:{key:"type",base:_,typeMap:{wkb:R,location:E}}};let G=class extends(f(j(h(y(v(w(b(g(x(o(c(t(m))))))))))))){constructor(e){super(e),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new u(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=k,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new i}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([s(()=>this.urls,e=>this.source?.updateFiles(e.items)),s(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.encoding}set renderer(e){F(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return D(this,e)}createQuery(){const e=new z;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const r=new d({layer:this});return await r.load(e),r}getFieldDomain(e,r){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,r){await this.load();const t=await this.source.queryFeatures(this._normalizeQuery(e),r),i=this.graphicOrigin;if(t?.features)for(const o of t.features)o.layer=o.sourceLayer=this,o.origin=i;return t}async queryObjectIds(e,r){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),r)}async queryFeatureCount(e,r){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),r)}async queryExtent(e,r){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),r)}_normalizeQuery(e){return z.from(e)??this.createQuery()}async _load(e){const r=await this.createSource(e);this._set("source",r),this.read(r.sourceJSON,{origin:"service"}),this.revert(["fields","timeInfo"],"service"),F(this.renderer,this.fieldsIndex),L(this.timeInfo,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=l.WGS84)}};e([p({readOnly:!0,json:{read:!1,write:!1}})],G.prototype,"capabilities",null),e([p({type:String})],G.prototype,"copyright",void 0),e([p({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),e([p()],G.prototype,"displayOptimization",void 0),e([p({type:[P],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],G.prototype,"fields",void 0),e([p(U.fieldsIndex)],G.prototype,"fieldsIndex",void 0),e([p(B)],G.prototype,"encoding",void 0),e([p({type:a,json:{name:"extent"}})],G.prototype,"fullExtent",void 0),e([p({json:{read:{reader:C.read}}})],G.prototype,"geometryType",void 0),e([p({readOnly:!0,clonable:!1})],G.prototype,"graphicOrigin",void 0),e([p(I)],G.prototype,"labelsVisible",void 0),e([p({type:[S],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:T},write:!0}})],G.prototype,"labelingInfo",void 0),e([p()],G.prototype,"file",void 0),e([p({type:String,readOnly:!0})],G.prototype,"objectIdField",void 0),e([p(U.outFields)],G.prototype,"outFields",void 0),e([p({type:r,json:{name:"popupInfo",write:!0}})],G.prototype,"popupTemplate",void 0),e([p({types:Q,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{write:!1}}}})],G.prototype,"renderer",null),e([p({json:{read:!1},cast:null,type:d,readOnly:!0})],G.prototype,"source",void 0),e([p({json:{read:{source:"extent.spatialReference"}}})],G.prototype,"spatialReference",void 0),e([p({type:[O]})],G.prototype,"templates",void 0),e([p()],G.prototype,"title",void 0),e([p({json:{read:!1},readOnly:!0})],G.prototype,"type",void 0),e([p({type:i.ofType(String)})],G.prototype,"urls",void 0),G=e([n("esri.layers.ParquetLayer")],G);const J=G;export{J 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{Loadable as e}from"../../../core/Loadable.js";import r from"../../../core/Logger.js";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import{Loadable as e}from"../../../core/Loadable.js";import r from"../../../core/Logger.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{open as o}from"../../../core/workers/workers.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../geometry/Extent.js";import{toParquetJSONGeometryType as u}from"../../support/parquetUtils.js";import l from"../../../rest/support/FeatureSet.js";let c=class extends e{constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),Promise.resolve(this)}destroy(){this._connection.destroy()}setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{r.getLogger(this).warn("Failed to update customParameters")})}async updateFiles(t){await this._proxy.updateFiles(t)}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return l.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.encoding)return r.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const s=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:s.count,extent:n.fromJSON(s.extent)}}async _initialize(t){this._connection=await o("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this}),s(t),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:e,capabilities:r}=await this._proxy.load({urls:this.layer.urls.items,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?u(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),encoding:this.layer.encoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});s(t),this.sourceJSON=e,this.capabilities=r}};t([i()],c.prototype,"type",void 0),t([i({constructOnly:!0})],c.prototype,"layer",void 0),t([i()],c.prototype,"sourceJSON",void 0),t([i()],c.prototype,"capabilities",void 0),c=t([a("esri.layers.graphics.sources.ParquetSource")],c);export{c as ParquetSource};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../request.js";import i from"../../core/Error.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{getInfo as p}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as w,isMultiSliceOrRangeDefinition as v,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as T}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as N,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as C,matchPresetRenderer as E,getDefaultBandCombination as B,getFunctionColorRamp as M,createDefaultRenderer as U,normalizeRendererJSON as q}from"../../renderers/support/rasterRendererHelper.js";import k from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as L,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await N();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new m({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:u,width:c,height:p}=D(r,n,l),d=await this.fetchPixels(u,c,p,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,u,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=w(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&I(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=p(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo,o=this.raster.getTileExtentFromTileInfo(e,i,r,t);if(o)return{extent:o,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const s=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(s.pixelBlock=s.pixelBlock?.extractBands(r.bandIds)),s}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!v(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=I(r)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return r.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new m({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new m({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,u=o.width/a,{xmin:c,ymax:p}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<u;e++){const r=new m({x:c+(e+.5)*a,y:p-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=C(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=w(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=E({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??B(t)),!this.renderer||"override"===e){const e=M(this.raster),i=n?.renderer??U(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=q({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new k({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=U(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=T(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:c,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:L,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([u("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../request.js";import i from"../../core/Error.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{getInfo as p}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as w,isMultiSliceOrRangeDefinition as v,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as T}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as N,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as C,matchPresetRenderer as E,getDefaultBandCombination as B,getFunctionColorRamp as M,createDefaultRenderer as U,normalizeRendererJSON as q}from"../../renderers/support/rasterRendererHelper.js";import k from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as L,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await N();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new m({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:u,width:c,height:p}=D(r,n,l),d=await this.fetchPixels(u,c,p,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,u,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=w(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&I(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=p(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo,o=this.raster.getTileExtentFromTileInfo(e,i,r,t);if(o)return{extent:o,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const s=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(s.pixelBlock=s.pixelBlock?.extractBands(r.bandIds)),s}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load(),e=o(m,e).clone().normalize();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!v(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let a;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=I(r)?this.getRawDisplayBandIds():this.bandIds;a=e?.length?e:void 0}return r.identify(e,{...t,bandIds:a})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new m({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new m({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,u=o.width/a,{xmin:c,ymax:p}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<u;e++){const r=new m({x:c+(e+.5)*a,y:p-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=C(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=w(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=E({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??B(t)),!this.renderer||"override"===e){const e=M(this.raster),i=n?.renderer??U(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=q({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new k({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=U(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=T(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:c,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:L,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([u("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as o}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as s,isString as a}from"../../support/guards.js";import{loadArcade as u}from"../../support/loadArcade.js";const f=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(f,"F$1")||null}const p=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(p,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(m,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function b(e,n){return e&&n?(I.clear(),w(I,e,n),Array.from(I).sort()):[]}function w(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function h(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=b(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i,t){if(!t)return;const r=o(t);if(r)x(e,n,r);else{const{arcadeUtils:r}=await u(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)x(e,i?.index??n,t)}}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});w(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?$(n,"name-or-title")||$(n,"unique-identifier")||$(n,"type-or-category")||A(n):null)}function A(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function $(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function _(e){if(!e)return[];const n=new Set;return await N(n,e),Array.from(n).sort()}async function N(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function L(e,n,i){i.onStatisticExpression?v(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function M(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>L(e,n.fieldsIndex,i))),await Promise.all(t)}async function j(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(D(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Y(e,i,n));await Promise.all(r)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>v(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&w(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&w(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function R(e,n,i){n&&i&&await Promise.all(i.map(i=>V(e,n,i)))}async function V(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,null,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?b(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?b(e.fieldsIndex,G(e)):[]}function U(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?b(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function q(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>S(e,t,n.where)))}const X=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function B(e){const n=new Set;J(e).forEach(e=>n.add(e)),U(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function G(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return G(e).map(e=>e.toLowerCase())}function W(e,n){return e.editable&&!X.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||z.has(e.type)||P.some(e=>e.test(i)))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Y(e,t,n)))}async function Y(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{x(e,n,i.slice(1,-1))})}await S(e,n,r)}function Z(e){const n=e.defaultValue;return void 0!==n&&le(e,n)?n:e.nullable?null:void 0}function ee(e){const n="string"==typeof e?{type:e}:e;return ge(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ie(e){return null===e||ne(e)}function te(e){return null===e||Number.isInteger(e)}function re(){return!0}function le(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?te:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ie:ne;break;case"string":case"esriFieldTypeString":i=e.nullable?s:a;break;default:i=re}return 1===arguments.length?i:i(n)}const oe=["integer","small-integer","big-integer","long"],se=["single","double"],ae=[...oe,...se],ue=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],fe=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...oe,...ue]),ce=new Set([...se,...fe]),pe=t(de,ce);function me(e){return null!=e&&de.has(e.type)}function ye(e){return null!=e&&pe.has(e.type)}function ge(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Fe(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Ie(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function be(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function we(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function Te(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function he(e,n){return null===Se(e,n)}function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:le(e,n)?ye(e)&&!Ee(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ee(e,n){const i="string"==typeof e?$e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ae(e,n){const i=l(e,n);return i||(ye(e)?$e(e.type):void 0)}function $e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Ne;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Le;case"esriFieldTypeBigInteger":case"big-integer":return Me;case"esriFieldTypeSingle":case"single":return De;case"esriFieldTypeDouble":case"double":return Oe}}function _e(e){if(!ne(e))return null;if(Number.isInteger(e)){if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeSmallInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeBigInteger"}return e>=De.min&&e<=De.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Ne={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Le={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Me={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},je=(2-2**-23)*2**127,De={min:-je,max:je,isInteger:!1,rawMin:-je,rawMax:je},Oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Re(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=$e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Ve(e,n){return!ke(e,n,null)}function ke(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function Ue(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}export{Me as bigIntegerRange,v as collectArcadeFieldNames,q as collectDisplayFilterFields,N as collectElevationFields,M as collectFeatureReductionFields,x as collectField,w as collectFields,O as collectFilterFields,Q as collectLabelingFields,R as collectOrderByInfos,D as collectPopupTemplateFields,S as collectSQLFieldNames,j as collectTrackInfoFields,Oe as doubleRange,Xe as extractSubstitutionTemplatesFromString,Ve as featureHasFields,b as fixFields,y as fixRendererFields,F as fixTimeInfoFields,fe as floatJSONTypes,se as floatTypes,E as getDisplayFieldName,G as getEditTrackingFields,_ as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,U as getFeatureGeometryFields,ee as getFieldDefaultLength,Z as getFieldDefaultValue,Ae as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,_e as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,ue as integerJSONTypes,Le as integerRange,oe as integerTypes,Fe as isDateField,Ie as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,Te as isGlobalIDField,me as isIntegerField,Ee as isNumberInRange,ye as isNumericField,xe as isObjectIDField,Ue as isRasterPixelValueField,ge as isStringField,we as isTimeOnlyField,be as isTimestampOffsetField,he as isValidFieldValue,le as isValueMatchingFieldType,c as normalizeFieldName,ae as numericTypes,h as packFields,ke as populateMissingFields,p as rendererFields,ve as sanitizeNullFieldValue,De as singleRange,Ne as smallIntegerRange,T as unpackFieldNames,Se as validateFieldValue,Re as validationErrorToString,m as visualVariableFields};
|
|
5
|
+
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as o}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as s,isString as a}from"../../support/guards.js";import{loadArcade as u}from"../../support/loadArcade.js";const f=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(f,"F$1")||null}const p=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(p,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(m,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function b(e,n){return e&&n?(I.clear(),w(I,e,n),Array.from(I).sort()):[]}function w(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function h(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=b(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i,t){if(!t)return;const r=o(t);if(r)x(e,n,r);else{const{arcadeUtils:r}=await u(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)x(e,i?.index??n,t)}}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});w(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?A(n):null)}function A(e){return _(e,"name-or-title")||_(e,"unique-identifier")||_(e,"type-or-category")||$(e)}function $(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function _(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function N(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function M(e,n,i){i.onStatisticExpression?v(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function j(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(O(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>M(e,n.fieldsIndex,i))),await Promise.all(t)}async function D(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(O(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function O(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>v(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&w(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&w(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function V(e,n,i){n&&i&&await Promise.all(i.map(i=>k(e,n,i)))}async function k(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,null,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function C(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?b(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function U(e){return e?b(e.fieldsIndex,J(e)):[]}function q(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?b(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function X(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>S(e,t,n.where)))}const z=new Set(["oid","global-id","guid"]),P=new Set(["oid","global-id"]),B=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function G(e){const n=new Set;W(e).forEach(e=>n.add(e)),q(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function J(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function W(e){return J(e).map(e=>e.toLowerCase())}function H(e,n){return e.editable&&!z.has(e.type)&&!W(n).includes(e.name?.toLowerCase()??"")}function K(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||G(n).includes(i)||P.has(e.type)||B.some(e=>e.test(i)))}async function Q(e){if(!e)return[];const n=new Set;return await Y(n,e),Array.from(n).sort()}async function Y(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Z(e,t,n)))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{x(e,n,i.slice(1,-1))})}await S(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?s:a;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer","long"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],de=["esriFieldTypeSingle","esriFieldTypeDouble"],ce=new Set([...se,...fe]),pe=new Set([...ae,...de]),me=t(ce,pe);function ye(e){return null!=e&&ce.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function xe(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function Te(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function ve(e,n){return null===Ee(e,n)}function Se(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Ee(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ae(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ae(e,n){const i="string"==typeof e?_e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=l(e,n);return i||(ge(e)?_e(e.type):void 0)}function _e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Le;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Me;case"esriFieldTypeBigInteger":case"big-integer":return je;case"esriFieldTypeSingle":case"single":return Oe;case"esriFieldTypeDouble":case"double":return Re}}function Ne(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=Le.min&&e<=Le.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=je.min&&e<=je.max)return"esriFieldTypeBigInteger"}return e>=Oe.min&&e<=Oe.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Le={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},je={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},De=(2-2**-23)*2**127,Oe={min:-De,max:De,isInteger:!1,rawMin:-De,rawMax:De},Re={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ve(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=_e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ue(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function qe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function Xe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function ze(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}export{je as bigIntegerRange,v as collectArcadeFieldNames,X as collectDisplayFilterFields,L as collectElevationFields,j as collectFeatureReductionFields,x as collectField,w as collectFields,R as collectFilterFields,Y as collectLabelingFields,V as collectOrderByInfos,O as collectPopupTemplateFields,S as collectSQLFieldNames,D as collectTrackInfoFields,Re as doubleRange,ze as extractSubstitutionTemplatesFromString,ke as featureHasFields,b as fixFields,y as fixRendererFields,F as fixTimeInfoFields,de as floatJSONTypes,ae as floatTypes,E as getDisplayFieldName,A as getDisplayFieldNameFromFields,J as getEditTrackingFields,N as getElevationFields,Ue as getExpressionFields,U as getFeatureEditFields,q as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,Q as getLabelingFields,G as getLowerCaseDefaultHiddenFields,W as getLowerCaseEditTrackingFields,Ne as getNumericTypeForValue,Xe as getRendererFields,C as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,H as isFieldEditable,K as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ae as isNumberInRange,ge as isNumericField,Te as isObjectIDField,qe as isRasterPixelValueField,Fe as isStringField,xe as isTimeOnlyField,we as isTimestampOffsetField,ve as isValidFieldValue,oe as isValueMatchingFieldType,c as normalizeFieldName,ue as numericTypes,h as packFields,Ce as populateMissingFields,p as rendererFields,Se as sanitizeNullFieldValue,Oe as singleRange,Le as smallIntegerRange,T as unpackFieldNames,Ee as validateFieldValue,Ve as validationErrorToString,m as visualVariableFields};
|