@arcgis/core 4.31.0-next.20240607 → 4.31.0-next.20240608

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.
Files changed (79) hide show
  1. package/README.md +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{fa5e171c8ce844363b6c.js → 465c718f0b9f7ba0f1ea.js} +1 -1
  4. package/assets/esri/core/workers/chunks/4e2943968517e385bd12.js +1 -0
  5. package/assets/esri/core/workers/chunks/5f3600a6d7159228731d.js +1 -0
  6. package/assets/esri/core/workers/chunks/ace3297f0f314c3724da.js +1 -0
  7. package/assets/esri/core/workers/chunks/{342426c8a8c9f5f84811.js → b62e942e675d5770ea24.js} +1 -1
  8. package/assets/esri/core/workers/chunks/c660649465058ef82045.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4faf7055457c04dc9fc1.js → cd03ad7dc45fbbeb1a2f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{6a943f384fcd0af5888b.js → e66ebcfffd081f847efe.js} +1 -1
  11. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  12. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  13. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  14. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  15. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +8 -0
  16. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +8 -0
  17. package/assets/esri/themes/base/widgets/_LayerList.scss +8 -0
  18. package/assets/esri/themes/base/widgets/_Print.scss +12 -0
  19. package/assets/esri/themes/base/widgets/_TableList.scss +8 -0
  20. package/assets/esri/themes/dark/main.css +1 -1
  21. package/assets/esri/themes/light/main.css +1 -1
  22. package/assets/esri/themes/light/view.css +1 -1
  23. package/chunks/Terrain.glsl.js +3 -1
  24. package/chunks/lyr3DWorker.js +1 -1
  25. package/interfaces.d.ts +152 -32
  26. package/layers/CatalogLayer.js +1 -1
  27. package/layers/MapImageLayer.js +1 -1
  28. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  29. package/layers/support/Sublayer.js +1 -1
  30. package/layers/support/arcgisLayers.js +1 -1
  31. package/package.json +1 -1
  32. package/smartMapping/renderers/size.js +1 -1
  33. package/support/elevationInfoUtils.js +1 -1
  34. package/support/revision.js +1 -1
  35. package/symbols/support/styleUtils.js +1 -1
  36. package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
  37. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
  38. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  39. package/views/3d/interactive/editingTools/manipulatorUtils.js +1 -1
  40. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  41. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  42. package/views/3d/layers/TiledLayerView3D.js +1 -1
  43. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  44. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  45. package/views/3d/state/NearFarHeuristic.js +1 -1
  46. package/views/3d/terrain/OverlayRenderer.js +1 -1
  47. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  48. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  49. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  50. package/webdoc/support/webdocSaveUtils.js +1 -1
  51. package/widgets/BasemapLayerList/css.js +1 -1
  52. package/widgets/BasemapLayerList.js +1 -1
  53. package/widgets/CatalogLayerList/css.js +1 -1
  54. package/widgets/CatalogLayerList.js +1 -1
  55. package/widgets/Feature/support/featureUtils.js +1 -1
  56. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  57. package/widgets/FeatureTable/FieldColumn.js +1 -1
  58. package/widgets/FeatureTable/Grid/Column.js +1 -1
  59. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  60. package/widgets/FeatureTable/RelationshipColumn.js +1 -1
  61. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  62. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  63. package/widgets/FeatureTable.js +1 -1
  64. package/widgets/Features/FeaturesViewModel.js +1 -1
  65. package/widgets/Fullscreen.js +1 -1
  66. package/widgets/LayerList/css.js +1 -1
  67. package/widgets/LayerList.js +1 -1
  68. package/widgets/Locate.js +1 -1
  69. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  70. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  71. package/widgets/Print/PrintViewModel.js +1 -1
  72. package/widgets/Print.js +1 -1
  73. package/widgets/TableList/css.js +1 -1
  74. package/widgets/TableList.js +1 -1
  75. package/widgets/Track.js +1 -1
  76. package/assets/esri/core/workers/chunks/441f3eaef3b703dd1026.js +0 -1
  77. package/assets/esri/core/workers/chunks/ba988cd3a49987a0fb83.js +0 -1
  78. package/assets/esri/core/workers/chunks/c70683b7183458b338f8.js +0 -1
  79. package/assets/esri/core/workers/chunks/d03ada1212b13e76bff4.js +0 -1
package/interfaces.d.ts CHANGED
@@ -260,6 +260,7 @@ declare namespace __esri {
260
260
  export type LocateLocateErrorEventHandler = (event: LocateLocateErrorEvent) => void;
261
261
  export type LocateLocateEventHandler = (event: LocateLocateEvent) => void;
262
262
  export type LocateViewModelLocateErrorEventHandler = (event: LocateViewModelLocateErrorEvent) => void;
263
+ export type LocateViewModelLocateEventHandler = (event: LocateViewModelLocateEvent) => void;
263
264
  export type MapImageLayerLayerviewCreateErrorEventHandler = (event: MapImageLayerLayerviewCreateErrorEvent) => void;
264
265
  export type MapImageLayerLayerviewCreateEventHandler = (event: MapImageLayerLayerviewCreateEvent) => void;
265
266
  export type MapImageLayerLayerviewDestroyEventHandler = (event: MapImageLayerLayerviewDestroyEvent) => void;
@@ -6538,7 +6539,7 @@ declare namespace __esri {
6538
6539
  *
6539
6540
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromFiles)
6540
6541
  */
6541
- static createFromFiles(location: Point, files: any[], parameters?: MeshCreateFromFilesParameters): Promise<Mesh>;
6542
+ static createFromFiles(location: Point, files: File[], parameters?: MeshCreateFromFilesParameters): Promise<Mesh>;
6542
6543
  /**
6543
6544
  * Creates a new mesh geometry from a glTF model referenced by the `url` parameter.
6544
6545
  *
@@ -13337,7 +13338,7 @@ declare namespace __esri {
13337
13338
  *
13338
13339
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentEdit)
13339
13340
  */
13340
- data?: Blob | any | string;
13341
+ data?: Blob | File | string;
13341
13342
  }
13342
13343
 
13343
13344
  export interface CapabilitiesAnalytics {
@@ -17468,7 +17469,7 @@ declare namespace __esri {
17468
17469
  */
17469
17470
  fetchImage(extent: Extent, width: number, height: number, options?: MapImageLayerFetchImageOptions): Promise<HTMLImageElement>;
17470
17471
  /**
17471
- * Loads all of the sublayers.
17472
+ * Loads all of the sublayers and subtables.
17472
17473
  *
17473
17474
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#loadAll)
17474
17475
  */
@@ -21179,12 +21180,24 @@ declare namespace __esri {
21179
21180
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#createQuery)
21180
21181
  */
21181
21182
  createQuery(): Query;
21183
+ /**
21184
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns the number of features that satisfy the query.
21185
+ *
21186
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryFeatureCount)
21187
+ */
21188
+ queryFeatureCount(query?: Query | QueryProperties, options?: OrientedImageryLayerQueryFeatureCountOptions): Promise<number>;
21182
21189
  /**
21183
21190
  * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the Oriented Imagery features and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves.
21184
21191
  *
21185
21192
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryFeatures)
21186
21193
  */
21187
21194
  queryFeatures(query?: Query | QueryProperties, options?: OrientedImageryLayerQueryFeaturesOptions): Promise<FeatureSet>;
21195
+ /**
21196
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns an array of Object IDs for features that satisfy the input query.
21197
+ *
21198
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryObjectIds)
21199
+ */
21200
+ queryObjectIds(query?: Query | QueryProperties, options?: OrientedImageryLayerQueryObjectIdsOptions): Promise<number[]>;
21188
21201
  static fromJSON(json: any): OrientedImageryLayer;
21189
21202
  }
21190
21203
 
@@ -21477,6 +21490,15 @@ declare namespace __esri {
21477
21490
  lod: number;
21478
21491
  }
21479
21492
 
21493
+ export interface OrientedImageryLayerQueryFeatureCountOptions {
21494
+ /**
21495
+ * Signal object that can be used to abort the asynchronous task.
21496
+ *
21497
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryFeatureCount)
21498
+ */
21499
+ signal?: AbortSignal;
21500
+ }
21501
+
21480
21502
  export interface OrientedImageryLayerQueryFeaturesOptions {
21481
21503
  /**
21482
21504
  * Signal object that can be used to abort the asynchronous task.
@@ -21486,6 +21508,15 @@ declare namespace __esri {
21486
21508
  signal?: AbortSignal;
21487
21509
  }
21488
21510
 
21511
+ export interface OrientedImageryLayerQueryObjectIdsOptions {
21512
+ /**
21513
+ * Signal object that can be used to abort the asynchronous task.
21514
+ *
21515
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#queryObjectIds)
21516
+ */
21517
+ signal?: AbortSignal;
21518
+ }
21519
+
21489
21520
  export class PointCloudBitfieldFilter extends PointCloudFilter {
21490
21521
  /**
21491
21522
  * An array of bit positions where the bit value must be `0`, otherwise the point will not be displayed.
@@ -22227,7 +22258,7 @@ declare namespace __esri {
22227
22258
  *
22228
22259
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#convertMesh)
22229
22260
  */
22230
- convertMesh(files: any[], options?: ConvertMeshOptions): Promise<Mesh>;
22261
+ convertMesh(files: File[], options?: ConvertMeshOptions): Promise<Mesh>;
22231
22262
  /**
22232
22263
  * Creates a default popup template for the layer, populated with all the fields of the layer.
22233
22264
  *
@@ -32500,6 +32531,14 @@ declare namespace __esri {
32500
32531
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#id)
32501
32532
  */
32502
32533
  id: number;
32534
+ /**
32535
+ * Returns `true` if the sublayer is a non-spatial table in a map service.
32536
+ *
32537
+ * @default false
32538
+ *
32539
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#isTable)
32540
+ */
32541
+ readonly isTable: boolean;
32503
32542
  /**
32504
32543
  * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects.
32505
32544
  *
@@ -101656,7 +101695,6 @@ declare namespace __esri {
101656
101695
  export interface EditorSketchUpdateEvent {
101657
101696
  detail: EditorSketchUpdateEventDetail;
101658
101697
  layer: FeatureLayer | SceneLayer | SubtypeSublayer;
101659
- toolEventInfo: UpdateToolEventInfo;
101660
101698
  type: "sketch-update";
101661
101699
  }
101662
101700
 
@@ -101755,6 +101793,7 @@ declare namespace __esri {
101755
101793
  graphics: Graphic[];
101756
101794
  state: "start" | "active" | "complete";
101757
101795
  tool: "move" | "transform" | "reshape";
101796
+ toolEventInfo: UpdateToolEventInfo;
101758
101797
  type: "update";
101759
101798
  }
101760
101799
 
@@ -105190,6 +105229,22 @@ declare namespace __esri {
105190
105229
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnGeometryEnabled)
105191
105230
  */
105192
105231
  returnGeometryEnabled: boolean;
105232
+ /**
105233
+ * Indicates whether geometries fetched for the corresponding features contain M values, if supported.
105234
+ *
105235
+ * @default false
105236
+ *
105237
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnMEnabled)
105238
+ */
105239
+ returnMEnabled: boolean;
105240
+ /**
105241
+ * Indicates whether geometries fetched for the corresponding features contain Z values, if supported.
105242
+ *
105243
+ * @default false
105244
+ *
105245
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnZEnabled)
105246
+ */
105247
+ returnZEnabled: boolean;
105193
105248
  /**
105194
105249
  * This property accepts and returns a collection of feature object id's and is used to access and control which rows are currently highlighted in the table.
105195
105250
  *
@@ -105504,6 +105559,22 @@ declare namespace __esri {
105504
105559
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnGeometryEnabled)
105505
105560
  */
105506
105561
  returnGeometryEnabled?: boolean;
105562
+ /**
105563
+ * Indicates whether geometries fetched for the corresponding features contain M values, if supported.
105564
+ *
105565
+ * @default false
105566
+ *
105567
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnMEnabled)
105568
+ */
105569
+ returnMEnabled?: boolean;
105570
+ /**
105571
+ * Indicates whether geometries fetched for the corresponding features contain Z values, if supported.
105572
+ *
105573
+ * @default false
105574
+ *
105575
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#returnZEnabled)
105576
+ */
105577
+ returnZEnabled?: boolean;
105507
105578
  /**
105508
105579
  * This property accepts and returns a collection of feature object id's and is used to access and control which rows are currently highlighted in the table.
105509
105580
  *
@@ -105813,6 +105884,22 @@ declare namespace __esri {
105813
105884
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnGeometryEnabled)
105814
105885
  */
105815
105886
  returnGeometryEnabled: boolean;
105887
+ /**
105888
+ * Indicates whether geometries fetched for the corresponding features contain M values, if supported.
105889
+ *
105890
+ * @default false
105891
+ *
105892
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnMEnabled)
105893
+ */
105894
+ returnMEnabled: boolean;
105895
+ /**
105896
+ * Indicates whether geometries fetched for the corresponding features contain Z values, if supported.
105897
+ *
105898
+ * @default false
105899
+ *
105900
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnZEnabled)
105901
+ */
105902
+ returnZEnabled: boolean;
105816
105903
  /**
105817
105904
  * A collection of feature ObjectIds.
105818
105905
  *
@@ -106055,6 +106142,22 @@ declare namespace __esri {
106055
106142
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnGeometryEnabled)
106056
106143
  */
106057
106144
  returnGeometryEnabled?: boolean;
106145
+ /**
106146
+ * Indicates whether geometries fetched for the corresponding features contain M values, if supported.
106147
+ *
106148
+ * @default false
106149
+ *
106150
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnMEnabled)
106151
+ */
106152
+ returnMEnabled?: boolean;
106153
+ /**
106154
+ * Indicates whether geometries fetched for the corresponding features contain Z values, if supported.
106155
+ *
106156
+ * @default false
106157
+ *
106158
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#returnZEnabled)
106159
+ */
106160
+ returnZEnabled?: boolean;
106058
106161
  /**
106059
106162
  * A collection of feature ObjectIds.
106060
106163
  *
@@ -106440,6 +106543,12 @@ declare namespace __esri {
106440
106543
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#label)
106441
106544
  */
106442
106545
  label: string;
106546
+ /**
106547
+ * The element representing the field column's menu.
106548
+ *
106549
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#menu)
106550
+ */
106551
+ readonly menu: HTMLElement;
106443
106552
  /**
106444
106553
  * Configuration options for the column menu.
106445
106554
  *
@@ -106447,11 +106556,17 @@ declare namespace __esri {
106447
106556
  */
106448
106557
  readonly menuConfig: ColumnTableMenuConfig;
106449
106558
  /**
106450
- * Indicates whether the FeatureTable's menu is currently visible.
106559
+ * Indicates whether the Column's menu is currently open.
106560
+ *
106561
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#menuIsOpen)
106562
+ */
106563
+ readonly menuIsOpen: boolean;
106564
+ /**
106565
+ * Indicates whether the Column's menu will be displayed.
106451
106566
  *
106452
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#menuVisible)
106567
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#menuIsVisible)
106453
106568
  */
106454
- readonly menuVisible: boolean;
106569
+ readonly menuIsVisible: boolean;
106455
106570
  /**
106456
106571
  * Indicates whether the column is resizable.
106457
106572
  *
@@ -109340,14 +109455,6 @@ declare namespace __esri {
109340
109455
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#knowledgeGraphOptions)
109341
109456
  */
109342
109457
  knowledgeGraphOptions: LayerListKnowledgeGraphOptions;
109343
- /**
109344
- * The [TableList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TableList.html) widget instance that displays the tables associated with a [KnowledgeGraphLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KnowledgeGraphLayer.html).
109345
- *
109346
- * @default null
109347
- *
109348
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#knowledgeGraphTableList)
109349
- */
109350
- readonly knowledgeGraphTableList: TableList;
109351
109458
  /**
109352
109459
  * A function that executes each time a [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) is created.
109353
109460
  *
@@ -109410,6 +109517,14 @@ declare namespace __esri {
109410
109517
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#selectionMode)
109411
109518
  */
109412
109519
  selectionMode: "multiple" | "none" | "single" | "single-persist";
109520
+ /**
109521
+ * The [TableList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TableList.html) widget instance that displays the tables associated with a [KnowledgeGraphLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KnowledgeGraphLayer.html).
109522
+ *
109523
+ * @default null
109524
+ *
109525
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#tableList)
109526
+ */
109527
+ readonly tableList: TableList;
109413
109528
  /**
109414
109529
  * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
109415
109530
  *
@@ -111751,6 +111866,7 @@ declare namespace __esri {
111751
111866
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
111752
111867
  */
111753
111868
  locate(): Promise<any>;
111869
+ on(name: "locate", eventHandler: LocateViewModelLocateEventHandler): IHandle;
111754
111870
  on(name: "locate-error", eventHandler: LocateViewModelLocateErrorEventHandler): IHandle;
111755
111871
  }
111756
111872
 
@@ -111777,6 +111893,10 @@ declare namespace __esri {
111777
111893
  error: any | Error;
111778
111894
  }
111779
111895
 
111896
+ export interface LocateViewModelLocateEvent {
111897
+ position: any;
111898
+ }
111899
+
111780
111900
  export interface LocateLocateErrorEvent {
111781
111901
  error: Error;
111782
111902
  }
@@ -113378,14 +113498,6 @@ declare namespace __esri {
113378
113498
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#portal)
113379
113499
  */
113380
113500
  portal: Portal;
113381
- /**
113382
- * The initial state of the print area toggle in the [Print widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html) UI.
113383
- *
113384
- * @default false
113385
- *
113386
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#printPreviewEnabled)
113387
- */
113388
- printPreviewEnabled: boolean;
113389
113501
  /**
113390
113502
  * The URL of the REST endpoint of the Export Web Map Task.
113391
113503
  *
@@ -113400,6 +113512,14 @@ declare namespace __esri {
113400
113512
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#printTimeout)
113401
113513
  */
113402
113514
  printTimeout: number;
113515
+ /**
113516
+ * The initial state of the print area toggle in the [Print widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html) UI.
113517
+ *
113518
+ * @default false
113519
+ *
113520
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#showPrintAreaEnabled)
113521
+ */
113522
+ showPrintAreaEnabled: boolean;
113403
113523
  /**
113404
113524
  * The view model's state.
113405
113525
  *
@@ -113492,14 +113612,6 @@ declare namespace __esri {
113492
113612
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#portal)
113493
113613
  */
113494
113614
  portal?: PortalProperties;
113495
- /**
113496
- * The initial state of the print area toggle in the [Print widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html) UI.
113497
- *
113498
- * @default false
113499
- *
113500
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#printPreviewEnabled)
113501
- */
113502
- printPreviewEnabled?: boolean;
113503
113615
  /**
113504
113616
  * The URL of the REST endpoint of the Export Web Map Task.
113505
113617
  *
@@ -113514,6 +113626,14 @@ declare namespace __esri {
113514
113626
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#printTimeout)
113515
113627
  */
113516
113628
  printTimeout?: number;
113629
+ /**
113630
+ * The initial state of the print area toggle in the [Print widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html) UI.
113631
+ *
113632
+ * @default false
113633
+ *
113634
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#showPrintAreaEnabled)
113635
+ */
113636
+ showPrintAreaEnabled?: boolean;
113517
113637
  /**
113518
113638
  * An object containing an array of `customTextElements` name-value pair objects for each print template in a custom print service.
113519
113639
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Collection.js";import i from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{urlToObject as n,join as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"./Layer.js";import u from"./catalog/CatalogDynamicGroupLayer.js";import m from"./catalog/CatalogFootprintLayer.js";import c from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as F}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as L}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{id as b}from"./support/commonProperties.js";import{ensureLayerCredential as _,applyEdits as E,getFeatureType as T,hasDataChanged as P}from"./support/featureLayerUtils.js";import C from"./support/FeatureType.js";import{defineFieldProperties as G}from"./support/fieldProperties.js";import{layerLookupMap as U}from"./support/lazyLayerLoader.js";import{serviceSupportsSpatialReference as q}from"./support/versionUtils.js";import A from"../portal/Portal.js";import Q from"../portal/PortalItem.js";import D from"../rest/support/Query.js";const M=G();function N(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}function R(e){return"object"==typeof e&&null!=e&&"url"in e}function B(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]}function V(e,t,r,i){const o=e.write({},i);B(o)||(t[r]=o)}let k=class extends(L(F(g(v(O(I(x(f(w(S(s(j(h(d)))))))))))))){constructor(e){super(e),this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new u({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new m({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new r([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new c({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(a).then((async()=>{const{url:e,source:r,portalItem:o}=this;if(!e)throw new i("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new i("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:s}=r;s&&(this.sourceJSON=s,this.read(s,{origin:"service",portalItem:o,portal:o?.portal,url:this.parsedUrl}))})).then((()=>_(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=n(this.url);return null!=e&&null!=this.layerId&&(e.path=l(e.path,this.layerId.toString())),e}async applyEdits(e,t){return E(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new D,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return T(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return P(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(D.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(D.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(D.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(D.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&q(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:r}=await t(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(r?.layers))return r.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new i("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(N(r)){const{itemId:e,portalUrl:t}=r,i=o(this._portals,t,(()=>new A({url:t})));return d.fromPortalItem(new Q({id:e,portal:i}))}if(R(r))return d.fromArcGISServerUrl({url:r.url});return new(await U.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const o=t.getAttribute(this.minScaleField);null!=o&&"minScale"in e&&(e.minScale=o)}};e([p({readOnly:!0})],k.prototype,"createQueryVersion",null),e([p({readOnly:!0})],k.prototype,"drawOrderField",void 0),e([p({type:u,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"dynamicGroupLayer",void 0),e([p({readOnly:!0})],k.prototype,"editingEnabled",null),e([p({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),e([p({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],k.prototype,"elevationInfo",void 0),e([p({...M.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],k.prototype,"fields",void 0),e([p(M.fieldsIndex)],k.prototype,"fieldsIndex",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],k.prototype,"floorInfo",void 0),e([p({type:m,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"footprintLayer",void 0),e([p(b)],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"itemNameField",void 0),e([p({readOnly:!0})],k.prototype,"itemSourceField",void 0),e([p({readOnly:!0})],k.prototype,"itemTypeField",void 0),e([p({readOnly:!0})],k.prototype,"layers",void 0),e([p({type:["show","hide","hide-children"]})],k.prototype,"listMode",void 0),e([p({readOnly:!0})],k.prototype,"maxScaleField",void 0),e([p({readOnly:!0})],k.prototype,"minScaleField",void 0),e([p({value:"CatalogLayer",type:["CatalogLayer"]})],k.prototype,"operationalLayerType",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],k.prototype,"orderBy",void 0),e([p(M.outFields)],k.prototype,"outFields",void 0),e([p({readOnly:!0})],k.prototype,"parsedUrl",null),e([p({readOnly:!0})],k.prototype,"source",void 0),e([p({json:{read:!1}})],k.prototype,"type",void 0),e([p({type:String})],k.prototype,"typeIdField",void 0),e([p({type:[C]})],k.prototype,"types",void 0),k=e([y("esri.layers.CatalogLayer")],k);const J=k;export{J as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Collection.js";import i from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{urlToObject as n,join as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import y from"./Layer.js";import m from"./catalog/CatalogDynamicGroupLayer.js";import u from"./catalog/CatalogFootprintLayer.js";import c from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as F}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as j}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as L}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{id as b}from"./support/commonProperties.js";import{ensureLayerCredential as T,applyEdits as _,getFeatureType as E,hasDataChanged as P}from"./support/featureLayerUtils.js";import C from"./support/FeatureType.js";import{defineFieldProperties as G}from"./support/fieldProperties.js";import{layerLookupMap as q}from"./support/lazyLayerLoader.js";import{serviceSupportsSpatialReference as U}from"./support/versionUtils.js";import A from"../portal/Portal.js";import Q from"../portal/PortalItem.js";import N from"../rest/support/Query.js";const D=G();function M(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}function R(e){return"object"==typeof e&&null!=e&&"url"in e}function B(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]}function V(e,t,r,i){const o=e.write({},i);B(o)||(t[r]=o)}let k=class extends(L(j(g(v(O(I(x(f(w(S(s(F(h(y)))))))))))))){constructor(e){super(e),this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new m({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new u({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new r([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new c({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(a).then((async()=>{const{url:e,source:r,portalItem:o}=this;if(!e)throw new i("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new i("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:s}=r;s&&(this.sourceJSON=s,this.read(s,{origin:"service",portalItem:o,portal:o?.portal,url:this.parsedUrl}))})).then((()=>{const e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter((e=>!this.fieldsIndex.has(e)));if(t.length)throw new i("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})})).then((()=>T(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=n(this.url);return null!=e&&null!=this.layerId&&(e.path=l(e.path,this.layerId.toString())),e}async applyEdits(e,t){return _(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new N,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return E(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return P(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(N.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(N.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(N.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(N.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&U(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:r}=await t(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(r?.layers))return r.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new i("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(M(r)){const{itemId:e,portalUrl:t}=r,i=o(this._portals,t,(()=>new A({url:t})));return y.fromPortalItem(new Q({id:e,portal:i}))}if(R(r))return y.fromArcGISServerUrl({url:r.url});return new(await q.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const o=t.getAttribute(this.minScaleField);null!=o&&"minScale"in e&&(e.minScale=o)}};e([p({readOnly:!0})],k.prototype,"createQueryVersion",null),e([p({readOnly:!0})],k.prototype,"drawOrderField",void 0),e([p({type:m,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"dynamicGroupLayer",void 0),e([p({readOnly:!0})],k.prototype,"editingEnabled",null),e([p({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),e([p({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],k.prototype,"elevationInfo",void 0),e([p({...D.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],k.prototype,"fields",void 0),e([p(D.fieldsIndex)],k.prototype,"fieldsIndex",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],k.prototype,"floorInfo",void 0),e([p({type:u,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:V}}})],k.prototype,"footprintLayer",void 0),e([p(b)],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"itemNameField",void 0),e([p({readOnly:!0})],k.prototype,"itemSourceField",void 0),e([p({readOnly:!0})],k.prototype,"itemTypeField",void 0),e([p({readOnly:!0})],k.prototype,"layers",void 0),e([p({type:["show","hide","hide-children"]})],k.prototype,"listMode",void 0),e([p({readOnly:!0})],k.prototype,"maxScaleField",void 0),e([p({readOnly:!0})],k.prototype,"minScaleField",void 0),e([p({value:"CatalogLayer",type:["CatalogLayer"]})],k.prototype,"operationalLayerType",void 0),e([p({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],k.prototype,"orderBy",void 0),e([p(D.outFields)],k.prototype,"outFields",void 0),e([p({readOnly:!0})],k.prototype,"parsedUrl",null),e([p({readOnly:!0})],k.prototype,"source",void 0),e([p({json:{read:!1}})],k.prototype,"type",void 0),e([p({type:String})],k.prototype,"typeIdField",void 0),e([p({type:[C]})],k.prototype,"types",void 0),k=e([d("esri.layers.CatalogLayer")],k);const J=k;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.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../TimeExtent.js";import i from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,isAbortError as p}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{Integer as m}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../core/accessorSupport/decorators/writer.js";import{nameToId as y,OriginId as h}from"../core/accessorSupport/PropertyOrigin.js";import d from"../geometry/Extent.js";import{getScale as f}from"../geometry/support/scaleUtils.js";import{srToRESTValue as g}from"../geometry/support/spatialReferenceUtils.js";import x from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as v}from"./mixins/ArcGISMapService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as L}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as T}from"./mixins/SublayersOwner.js";import{TemporalLayer as E}from"./mixins/TemporalLayer.js";import{url as M}from"./support/commonProperties.js";import{ExportImageParameters as R}from"./support/ExportImageParameters.js";import{createBitmap as U}from"./support/imageBitmapUtils.js";import F from"./support/Sublayer.js";import{shouldWriteSublayerStructure as _}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as A}from"./support/versionUtils.js";import{timeZoneProperty as N}from"../time/timeZoneUtils.js";let J=class extends(S(E(P(T(v(j(w(O(o(L(b(I(x))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new R({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(a).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;const a=y(i.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===h.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=_(s,e,h.SERVICE)}else if(a>h.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=_(s,e.sublayers,y(e.origin))}const p=[],n={writeSublayerStructure:o,...i};let m=o||this.hasVisibleLayersForOrigin(a);s.forEach((e=>{const r=e.write({},n);p.push(r),m=m||"user"===e.originOf("visible")}));p.some((e=>Object.keys(e).length>1))&&(r.layers=p),m&&(r.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=f({extent:e,width:r})*s;const o=this._exportImageParameters.toJSON(),a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},p=e?.spatialReference,n=g(p);o.dpi*=s;const m={};if(i?.timeExtent){const{start:e,end:r}=i.timeExtent.toJSON();m.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(m.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:r+","+t,...o,...a,...m}}async fetchImage(e,r,t,i){const{data:s}=await this._fetchImage("image",e,r,t,i);return s}async fetchImageBitmap(e,r,t,i){const{data:s,url:o}=await this._fetchImage("blob",e,r,t,i);return U(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const i={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:s}=await r(this.url,i),{extent:o,fullExtent:a,timeExtent:p}=s,n=o||a;return{fullExtent:n&&d.fromJSON(n),timeExtent:p&&t.fromJSON({start:p[0],end:p[1]})}}loadAll(){return s(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return A(this,e)}async _fetchImage(e,t,s,o,a){const n={responseType:e,signal:a?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,s,o,a),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},m=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new i("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await r(m,n);return{data:e,url:m}}catch(l){if(p(l))throw l;throw new i("mapimagelayer:image-fetch-error",`Unable to load image: ${m}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:i}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});i&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([n(N("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],J.prototype,"datesInUnknownTimezone",void 0),e([n()],J.prototype,"dpi",void 0),e([n()],J.prototype,"gdbVersion",void 0),e([n()],J.prototype,"imageFormat",void 0),e([l("imageFormat",["supportedImageFormatTypes"])],J.prototype,"readImageFormat",null),e([n({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],J.prototype,"imageMaxHeight",void 0),e([n({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],J.prototype,"imageMaxWidth",void 0),e([n()],J.prototype,"imageTransparency",void 0),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],J.prototype,"isReference",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"labelsVisible",void 0),e([n({type:["ArcGISMapServiceLayer"]})],J.prototype,"operationalLayerType",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"popupEnabled",void 0),e([n(N("preferredTimeReference"))],J.prototype,"preferredTimeZone",void 0),e([n()],J.prototype,"sourceJSON",void 0),e([n({json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),e([u("sublayers",{layers:{type:[F]},visibleLayers:{type:[m]}})],J.prototype,"writeSublayers",null),e([n({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),e([n({json:{read:!1},readOnly:!0,value:"map-image"})],J.prototype,"type",void 0),e([n(M)],J.prototype,"url",void 0),J=e([c("esri.layers.MapImageLayer")],J);const q=J;export{q as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../TimeExtent.js";import s from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,isAbortError as p}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{Integer as m}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{reader as l}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../core/accessorSupport/decorators/writer.js";import{nameToId as y,OriginId as h}from"../core/accessorSupport/PropertyOrigin.js";import d from"../geometry/Extent.js";import{getScale as f}from"../geometry/support/scaleUtils.js";import{srToRESTValue as g}from"../geometry/support/spatialReferenceUtils.js";import b from"./Layer.js";import{APIKeyMixin as x}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as v}from"./mixins/ArcGISMapService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as L}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as T}from"./mixins/SublayersOwner.js";import{TemporalLayer as E}from"./mixins/TemporalLayer.js";import{url as M}from"./support/commonProperties.js";import{ExportImageParameters as R}from"./support/ExportImageParameters.js";import{createBitmap as U}from"./support/imageBitmapUtils.js";import F from"./support/Sublayer.js";import{shouldWriteSublayerStructure as _}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as A}from"./support/versionUtils.js";import{timeZoneProperty as N}from"../time/timeZoneUtils.js";let J=class extends(S(E(P(T(v(j(w(O(o(L(x(I(b))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new R({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(a).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,s){if(!this.loaded||!e)return;const i=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;const a=y(s.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===h.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=_(i,e,h.SERVICE)}else if(a>h.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=_(i,e.sublayers,y(e.origin))}const p=[],n={writeSublayerStructure:o,...s};let m=o||this.hasVisibleLayersForOrigin(a);i.forEach((e=>{const r=e.write({},n);p.push(r),m=m||"user"===e.originOf("visible")}));p.some((e=>Object.keys(e).length>1))&&(r.layers=p),m&&(r.visibleLayers=i.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,s){const i=s?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=s?.floors??null,this._exportImageParameters.scale=f({extent:e,width:r})*i;const o=this._exportImageParameters.toJSON(),a=!s?.rotation||this.version<10.3?{}:{rotation:-s.rotation},p=e?.spatialReference,n=g(p);o.dpi*=i;const m={};if(s?.timeExtent){const{start:e,end:r}=s.timeExtent.toJSON();m.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(m.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:r+","+t,...o,...a,...m}}async fetchImage(e,r,t,s){const{data:i}=await this._fetchImage("image",e,r,t,s);return i}async fetchImageBitmap(e,r,t,s){const{data:i,url:o}=await this._fetchImage("blob",e,r,t,s);return U(i,o,s?.signal)}async fetchRecomputedExtents(e={}){const s={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:i}=await r(this.url,s),{extent:o,fullExtent:a,timeExtent:p}=i,n=o||a;return{fullExtent:n&&d.fromJSON(n),timeExtent:p&&t.fromJSON({start:p[0],end:p[1]})}}loadAll(){return i(this,(e=>{e(this.allSublayers),e(this.subtables)}))}serviceSupportsSpatialReference(e){return A(this,e)}async _fetchImage(e,t,i,o,a){const n={responseType:e,signal:a?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,i,o,a),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},m=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new s("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await r(m,n);return{data:e,url:m}}catch(l){if(p(l))throw l;throw new s("mapimagelayer:image-fetch-error",`Unable to load image: ${m}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});s&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([n(N("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],J.prototype,"datesInUnknownTimezone",void 0),e([n()],J.prototype,"dpi",void 0),e([n()],J.prototype,"gdbVersion",void 0),e([n()],J.prototype,"imageFormat",void 0),e([l("imageFormat",["supportedImageFormatTypes"])],J.prototype,"readImageFormat",null),e([n({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],J.prototype,"imageMaxHeight",void 0),e([n({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],J.prototype,"imageMaxWidth",void 0),e([n()],J.prototype,"imageTransparency",void 0),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],J.prototype,"isReference",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"labelsVisible",void 0),e([n({type:["ArcGISMapServiceLayer"]})],J.prototype,"operationalLayerType",void 0),e([n({json:{read:!1,write:!1}})],J.prototype,"popupEnabled",void 0),e([n(N("preferredTimeReference"))],J.prototype,"preferredTimeZone",void 0),e([n()],J.prototype,"sourceJSON",void 0),e([n({json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),e([u("sublayers",{layers:{type:[F]},visibleLayers:{type:[m]}})],J.prototype,"writeSublayers",null),e([n({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),e([n({json:{read:!1},readOnly:!0,value:"map-image"})],J.prototype,"type",void 0),e([n(M)],J.prototype,"url",void 0),J=e([c("esri.layers.MapImageLayer")],J);const q=J;export{q 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.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import{fromJSON as r}from"../../renderers/support/jsonUtils.js";import{rendererTypes as o}from"../../renderers/support/types.js";import{clone as i}from"../../core/lang.js";import{MultiOriginJSONMixin as n}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{OriginId as l}from"../../core/accessorSupport/PropertyOrigin.js";import{initializeProjection as u,project as y}from"../../geometry/projection.js";import d from"../../geometry/SpatialReference.js";import{wgs84 as m}from"../../geometry/support/spatialReferenceUtils.js";import c from"../Layer.js";import h from"../graphics/data/FeatureStore.js";import{QueryEngine as g}from"../graphics/data/QueryEngine.js";import{createCapabilities as f,createDrawingInfo as j}from"../graphics/sources/support/clientSideDefaults.js";import{mockOidFieldName as b,mockAggregationCountFieldName as w,mockLayoutGeometryFieldName as S}from"./KnowledgeGraphLayerDataManager.js";import{KnowledgeGraphSublayerBase as T}from"./KnowledgeGraphSublayerBase.js";import{BlendLayer as v,blendModeProperty as O,effectProperty as x}from"../mixins/BlendLayer.js";import{FeatureEffectLayer as E,featureEffectProperty as L}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as F}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as N,orderByProperty as R}from"../mixins/OrderedLayer.js";import{RefreshableLayer as Q}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as C,useViewTimeProperty as M}from"../mixins/TemporalLayer.js";import{labelsVisible as J,legendEnabled as k,maxScale as q,minScale as _,opacity as P,popupEnabled as D}from"../support/commonProperties.js";import{featureReductionProperty as G}from"../support/featureReductionUtils.js";import U from"../support/Field.js";import{fixRendererFields as V}from"../support/fieldUtils.js";import Z from"../support/LabelClass.js";import{reader as B}from"../support/labelingInfo.js";import K from"../../rest/support/FeatureSet.js";import W from"../../rest/support/Query.js";import{createPopupTemplate as z}from"../../support/popupUtils.js";import A from"../../core/workers/RemoteClient.js";import H from"../../geometry/Extent.js";import X from"../../geometry/Polygon.js";import Y from"../../geometry/Polyline.js";import{featureGeometryTypeKebabDictionary as $}from"../../geometry/support/typeUtils.js";function ee(e){if(!e.json)return e;e.json.write=te(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=te(e.write))}return e}function te(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=re(e)),e):!0===e?oe():e}function re(e){const{target:t,writer:r,overridePolicy:o,...i}=e;return function(e,t){const r=ie.call(this,e,t);return r.enabled?{...i,...r}:r}}function oe(){return{overridePolicy:ie}}function ie(e,t){const r=!!this.geometryType;let o={enabled:r};return r&&(o={...o,...ne.call(this,e,t)}),o}function ne(e,t){return{ignoreOrigin:this.originIdOf(t)>l.DEFAULTS}}let se=class extends(T(F(E(v(N(C(I(Q(n(c)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=f(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=b,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new A(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=W.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.title=null,this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(U.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(U.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),U.fromJSON({name:w,type:"esriFieldTypeInteger",alias:w,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?$.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return S;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){V(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?r(j($.toJSON("polyline")).renderer):r(j($.toJSON("point")).renderer):r(j($.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??d.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return z(this,e)}createQuery(){return new W({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e),i=K.fromJSON(await o.executeQuery(r.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e);return await o.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e);return o.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:o,queryEngine:i}=await this._setupQueryObjects(r),n=await i.executeQueryForExtent(o.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new H(n.extent):new H,{count:n.count,extent:s}}async queryObjectIds(e,t){const r=W.from(e);let o;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)o=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);o=this.loadQueryEngine(e)}return o.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new h({geometryType:$.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new g({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new W({where:"1=1",outFields:[b]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=W.from(e),o=r.geometry;let i;if(o&&!o.spatialReference?.isWGS84&&(await u(o.spatialReference,m),r.geometry=y(o instanceof X||o instanceof Y?o:o.extent,m)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:i}}};e([s(ee(i(O)))],se.prototype,"blendMode",void 0),e([s()],se.prototype,"capabilities",void 0),e([s({json:{origins:{"web-scene":{write:!1}},write:oe()}})],se.prototype,"charts",void 0),e([s({readOnly:!0})],se.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],se.prototype,"definitionExpression",void 0),e([s()],se.prototype,"displayField",void 0),e([s(ee(i(x)))],se.prototype,"effect",void 0),e([s()],se.prototype,"elevationInfo",void 0),e([s(ee(i(L)))],se.prototype,"featureEffect",void 0),e([s(ee(i(G)))],se.prototype,"featureReduction",null),e([s()],se.prototype,"fields",null),e([s()],se.prototype,"geometryType",null),e([s()],se.prototype,"geometryFieldName",null),e([s({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],se.prototype,"graphType",void 0),e([s({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],se.prototype,"graphTypeName",null),e([s()],se.prototype,"hasM",null),e([s()],se.prototype,"hasZ",null),e([s({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],se.prototype,"id",void 0),e([s(ee(i(J)))],se.prototype,"labelsVisible",void 0),e([s({type:[Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B,write:oe()}})],se.prototype,"labelingInfo",void 0),e([s({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],se.prototype,"layerType",void 0),e([s(ee(i(k)))],se.prototype,"legendEnabled",void 0),e([s(ee(i(q)))],se.prototype,"maxScale",void 0),e([s(ee(i(_)))],se.prototype,"minScale",void 0),e([s()],se.prototype,"objectIdField",void 0),e([s()],se.prototype,"objectType",void 0),e([s(ee(i(P)))],se.prototype,"opacity",void 0),e([s(ee(i(R)))],se.prototype,"orderBy",void 0),e([s()],se.prototype,"parentCompositeLayer",void 0),e([s(ee(i(D)))],se.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],se.prototype,"popupTemplate",void 0),e([s({type:Number,json:{write:{overridePolicy:ne}}})],se.prototype,"refreshInterval",void 0),e([s({types:o,json:{name:"layerDefinition.drawingInfo.renderer",write:oe()}})],se.prototype,"renderer",null),e([s()],se.prototype,"source",void 0),e([s()],se.prototype,"spatialReference",null),e([s({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],se.prototype,"title",void 0),e([p("title")],se.prototype,"writeTitle",null),e([s({json:{read:!1}})],se.prototype,"type",void 0),e([s(ee(i(M)))],se.prototype,"useViewTime",void 0),e([s({type:Boolean,json:{name:"visibility",write:oe()}})],se.prototype,"visible",void 0),se=e([a("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],se);const ae=se;export{ae as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import{fromJSON as r}from"../../renderers/support/jsonUtils.js";import{rendererTypes as o}from"../../renderers/support/types.js";import{clone as i}from"../../core/lang.js";import{MultiOriginJSONMixin as n}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{OriginId as l}from"../../core/accessorSupport/PropertyOrigin.js";import{initializeProjection as u,project as y}from"../../geometry/projection.js";import d from"../../geometry/SpatialReference.js";import{wgs84 as m}from"../../geometry/support/spatialReferenceUtils.js";import c from"../Layer.js";import h from"../graphics/data/FeatureStore.js";import{QueryEngine as g}from"../graphics/data/QueryEngine.js";import{createCapabilities as f,createDrawingInfo as j}from"../graphics/sources/support/clientSideDefaults.js";import{mockOidFieldName as b,mockAggregationCountFieldName as w,mockLayoutGeometryFieldName as S}from"./KnowledgeGraphLayerDataManager.js";import{KnowledgeGraphSublayerBase as T}from"./KnowledgeGraphSublayerBase.js";import{BlendLayer as v,blendModeProperty as O,effectProperty as x}from"../mixins/BlendLayer.js";import{FeatureEffectLayer as E,featureEffectProperty as L}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as F}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as N,orderByProperty as R}from"../mixins/OrderedLayer.js";import{RefreshableLayer as Q}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as C,useViewTimeProperty as M}from"../mixins/TemporalLayer.js";import{labelsVisible as J,legendEnabled as k,maxScale as q,minScale as _,opacity as P,popupEnabled as D}from"../support/commonProperties.js";import{featureReductionProperty as G}from"../support/featureReductionUtils.js";import U from"../support/Field.js";import{fixRendererFields as V}from"../support/fieldUtils.js";import Z from"../support/LabelClass.js";import{reader as B}from"../support/labelingInfo.js";import K from"../../rest/support/FeatureSet.js";import W from"../../rest/support/Query.js";import{createPopupTemplate as z}from"../../support/popupUtils.js";import A from"../../core/workers/RemoteClient.js";import H from"../../geometry/Extent.js";import X from"../../geometry/Polygon.js";import Y from"../../geometry/Polyline.js";import{featureGeometryTypeKebabDictionary as $}from"../../geometry/support/typeUtils.js";function ee(e){if(!e.json)return e;e.json.write=te(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=te(e.write))}return e}function te(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=re(e)),e):!0===e?oe():e}function re(e){const{target:t,writer:r,overridePolicy:o,...i}=e;return function(e,t){const r=ie.call(this,e,t);return r.enabled?{...i,...r}:r}}function oe(){return{overridePolicy:ie}}function ie(e,t){const r=!!this.geometryType;let o={enabled:r};return r&&(o={...o,...ne.call(this,e,t)}),o}function ne(e,t){return{ignoreOrigin:this.originIdOf(t)>l.DEFAULTS}}let se=class extends(T(F(E(v(N(C(I(Q(n(c)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=f(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=b,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new A(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=W.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.title=null,this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(U.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(U.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),U.fromJSON({name:w,type:"esriFieldTypeInteger",alias:w,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?$.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return S;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){V(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?r(j($.toJSON("polyline")).renderer):r(j($.toJSON("point")).renderer):r(j($.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??d.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return z(this,e)}createQuery(){return new W({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e),i=K.fromJSON(await o.executeQuery(r.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e);return await o.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:o}=await this._setupQueryObjects(e);return o.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:o,queryEngine:i}=await this._setupQueryObjects(r),n=await i.executeQueryForExtent(o.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new H(n.extent):new H,{count:n.count,extent:s}}async queryObjectIds(e,t){const r=W.from(e);let o;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)o=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);o=this.loadQueryEngine(e)}return o.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new h({geometryType:$.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new g({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new W({where:"1=1",outFields:[b]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=W.from(e),o=r.geometry;let i;if(o&&!o.spatialReference?.isWGS84&&(await u(o.spatialReference,m),r.geometry=y(o instanceof X||o instanceof Y?o:o.extent,m)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:i}}};e([s(ee(i(O)))],se.prototype,"blendMode",void 0),e([s()],se.prototype,"capabilities",void 0),e([s({json:{origins:{"web-scene":{write:!1}},write:oe()}})],se.prototype,"charts",void 0),e([s({readOnly:!0})],se.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],se.prototype,"definitionExpression",void 0),e([s()],se.prototype,"displayField",void 0),e([s(ee(i(x)))],se.prototype,"effect",void 0),e([s()],se.prototype,"elevationInfo",void 0),e([s(ee(i(L)))],se.prototype,"featureEffect",void 0),e([s(ee(i(G)))],se.prototype,"featureReduction",null),e([s()],se.prototype,"fields",null),e([s()],se.prototype,"geometryType",null),e([s()],se.prototype,"geometryFieldName",null),e([s({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],se.prototype,"graphType",void 0),e([s({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],se.prototype,"graphTypeName",null),e([s()],se.prototype,"hasM",null),e([s()],se.prototype,"hasZ",null),e([s({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],se.prototype,"id",void 0),e([s(ee(i(J)))],se.prototype,"labelsVisible",void 0),e([s({type:[Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B,write:oe()}})],se.prototype,"labelingInfo",void 0),e([s({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],se.prototype,"layerType",void 0),e([s(ee(i(k)))],se.prototype,"legendEnabled",void 0),e([s(ee(i(q)))],se.prototype,"maxScale",void 0),e([s(ee(i(_)))],se.prototype,"minScale",void 0),e([s()],se.prototype,"objectIdField",void 0),e([s()],se.prototype,"objectType",void 0),e([s(ee(i(P)))],se.prototype,"opacity",void 0),e([s(ee(i(R)))],se.prototype,"orderBy",void 0),e([s()],se.prototype,"parentCompositeLayer",void 0),e([s(ee(i(D)))],se.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],se.prototype,"popupTemplate",void 0),e([s({type:Number,json:{write:{overridePolicy:ne}}})],se.prototype,"refreshInterval",void 0),e([s({types:o,json:{name:"layerDefinition.drawingInfo.renderer",write:oe()}})],se.prototype,"renderer",null),e([s()],se.prototype,"source",void 0),e([s()],se.prototype,"spatialReference",null),e([s({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],se.prototype,"title",void 0),e([p("title")],se.prototype,"writeTitle",null),e([s({json:{read:!1}})],se.prototype,"type",void 0),e([s(ee(i(M)))],se.prototype,"useViewTime",void 0),e([s({type:Boolean,json:{name:"visibility",write:oe()}})],se.prototype,"visible",void 0),se=e([a("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],se);const ae=se;export{ae as default};