@arcgis/core 4.30.0-next.20240213 → 4.30.0-next.20240215

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 (193) hide show
  1. package/TimeExtent.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/08ba549f9c4afc42a21c.js +1 -0
  4. package/assets/esri/core/workers/chunks/114afcee6a66415cd123.js +1 -0
  5. package/assets/esri/core/workers/chunks/1320562881294ce93806.js +1 -0
  6. package/assets/esri/core/workers/chunks/13451fa3e4b02ca2beb0.js +1 -0
  7. package/assets/esri/core/workers/chunks/{a384f29cb3256401962a.js → 1629a8c2085dce59cd1b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/18512caeeb03b9759ab1.js +1 -0
  9. package/assets/esri/core/workers/chunks/{cc1c958aad790a44048b.js → 1ca28af7c516d8283bb0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1f8a0fb32b96e50f5909.js +1 -0
  11. package/assets/esri/core/workers/chunks/{abab3abb8ea7610d9fb8.js → 21e7a88478f5d15e0e71.js} +1 -1
  12. package/assets/esri/core/workers/chunks/24452a26b0c5322c7d2b.js +1 -0
  13. package/assets/esri/core/workers/chunks/25b88787ead0cc44cda4.js +1 -0
  14. package/assets/esri/core/workers/chunks/2649166d1a462c7f8338.js +1 -0
  15. package/assets/esri/core/workers/chunks/2c96771a365f8f70e996.js +1 -0
  16. package/assets/esri/core/workers/chunks/352e7f8d694f3f217a2d.js +1 -0
  17. package/assets/esri/core/workers/chunks/392214a3a1d712eda155.js +1 -0
  18. package/assets/esri/core/workers/chunks/397f15b5bce6838db084.js +1 -0
  19. package/assets/esri/core/workers/chunks/3bf281e979408b9363ed.js +1 -0
  20. package/assets/esri/core/workers/chunks/4edc667148d023b5b5af.js +1 -0
  21. package/assets/esri/core/workers/chunks/51e4f771bfe352967c97.js +1 -0
  22. package/assets/esri/core/workers/chunks/55cd747e06bb59d1a328.js +1 -0
  23. package/assets/esri/core/workers/chunks/5638d95e600ff271c5b1.js +1 -0
  24. package/assets/esri/core/workers/chunks/563d172caa15ea1b510d.js +1108 -0
  25. package/assets/esri/core/workers/chunks/58f088b08e12c5435dbc.js +1 -0
  26. package/assets/esri/core/workers/chunks/5aef1e898618f8dda2c9.js +1 -0
  27. package/assets/esri/core/workers/chunks/608be8ebf772aefc36a5.js +1 -0
  28. package/assets/esri/core/workers/chunks/64df2521b2814d2fb918.js +1 -0
  29. package/assets/esri/core/workers/chunks/65070fb591f6ef8313c3.js +1 -0
  30. package/assets/esri/core/workers/chunks/656ec8a14df0e4b68433.js +1 -0
  31. package/assets/esri/core/workers/chunks/6601fe99d587b9dff3c7.js +1 -0
  32. package/assets/esri/core/workers/chunks/{274e623323e24250ca46.js → 6ac424af4f2825fabceb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{eb2d6f1ee63b40ae0736.js → 774b655498289b1b36bb.js} +1 -1
  34. package/assets/esri/core/workers/chunks/781bb63af571568358e3.js +1 -0
  35. package/assets/esri/core/workers/chunks/9e54d2cbe42f5552aaca.js +1 -0
  36. package/assets/esri/core/workers/chunks/{f03d62ab7806b68d0b62.js → 9fbf61675e2a5374f754.js} +1 -1
  37. package/assets/esri/core/workers/chunks/a5253543eae1708d11b9.js +1 -0
  38. package/assets/esri/core/workers/chunks/aa9b46bcb75c96731de3.js +1 -0
  39. package/assets/esri/core/workers/chunks/cfb8b6b5e9c21d582cf4.js +1 -0
  40. package/assets/esri/core/workers/chunks/d1b2372084c1e8c60f79.js +1 -0
  41. package/assets/esri/core/workers/chunks/{1c6914ded7db720f7bf7.js → daf6eab5dd198ca9a67b.js} +1 -1
  42. package/assets/esri/core/workers/chunks/e03edeaf3af46495449e.js +1 -0
  43. package/assets/esri/core/workers/chunks/e685214698fbc84276dd.js +1 -0
  44. package/assets/esri/core/workers/chunks/ebb294c82207f3ff9f04.js +1 -0
  45. package/assets/esri/core/workers/chunks/ec20e23aec9370df8a55.js +1 -0
  46. package/assets/esri/core/workers/chunks/{e4da908079417cc2f495.js → ee0c77889059815a31b2.js} +1 -1
  47. package/assets/esri/core/workers/chunks/f68b7bb88c444a7cbbd2.js +1 -0
  48. package/assets/esri/core/workers/chunks/f90bbebd2dc07a77ce09.js +1 -0
  49. package/assets/esri/core/workers/chunks/fa388680ff976a6b30f6.js +1 -0
  50. package/chunks/vec32.js +1 -1
  51. package/interfaces.d.ts +135 -68
  52. package/layers/WFSLayer.js +1 -1
  53. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  54. package/layers/graphics/applyEditsUtils.js +1 -1
  55. package/layers/graphics/editingSupport.js +1 -1
  56. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  57. package/layers/mixins/ArcGISImageService.js +1 -1
  58. package/layers/save/featureLayerUtils.js +1 -1
  59. package/layers/support/arcgisLayers.js +1 -1
  60. package/layers/support/fetchService.js +1 -1
  61. package/layers/support/fromPortalItem.js +1 -1
  62. package/networks/Network.js +1 -1
  63. package/package.json +1 -1
  64. package/portal/Portal.js +1 -1
  65. package/portal/PortalGroup.js +1 -1
  66. package/portal/PortalUser.js +1 -1
  67. package/portal/support/geometryServiceUtils.js +1 -1
  68. package/portal/support/layersLoader.js +1 -1
  69. package/portal/support/loadUtils.js +1 -1
  70. package/portal/support/portalLayers.js +1 -1
  71. package/renderers/visualVariables/SizeVariable.js +1 -1
  72. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  73. package/rest/networks/support/Association.js +1 -1
  74. package/rest/places.js +1 -1
  75. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  76. package/rest/support/ImageSampleParameters.js +1 -1
  77. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  78. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  79. package/support/elevationInfoUtils.js +1 -1
  80. package/support/revision.js +1 -1
  81. package/symbols/cim/cimAnalyzer.js +1 -1
  82. package/symbols/cim/defaultCIMValues.js +1 -1
  83. package/symbols/cim/utils.js +1 -1
  84. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  85. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  86. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  87. package/views/2d/engine/webgl/definitions.js +1 -1
  88. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  90. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  91. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  92. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  93. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  94. package/views/2d/layers/features/Processor.js +1 -1
  95. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  96. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  97. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  98. package/views/2d/layers/features/schema/processor/VisualVariablesSchema.js +1 -1
  99. package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
  100. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  101. package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
  102. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  103. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  104. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  105. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  106. package/views/3d/layers/SceneLayerView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  108. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  109. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  110. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  111. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  112. package/views/3d/support/orientedBoundingBox.js +1 -1
  113. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  114. package/views/3d/terrain/OverlayRenderer.js +1 -1
  115. package/views/3d/webgl/RenderNode.js +1 -1
  116. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  117. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  118. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +9 -7
  119. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceConstants.js +5 -0
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  121. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  122. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  125. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  126. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  127. package/views/draw/DrawGraphicTool.js +1 -1
  128. package/views/draw/DrawOperation.js +1 -1
  129. package/views/draw/drawSurfaces.js +1 -1
  130. package/views/interactive/snapping/SnappingManager.js +1 -1
  131. package/views/interactive/snapping/SnappingOptions.js +1 -1
  132. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  133. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  134. package/views/layers/ImageryTileLayerView.js +1 -1
  135. package/webdoc/support/webdocLoadUtils.js +1 -1
  136. package/webdoc/support/webdocSaveUtils.js +1 -1
  137. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  138. package/widgets/Editor/EditorViewModel.js +1 -1
  139. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  140. package/widgets/Editor/UpdateWorkflow.js +1 -1
  141. package/widgets/Editor/components/FooterActions.js +1 -1
  142. package/widgets/Editor/support/EditorItem.js +1 -1
  143. package/widgets/Editor.js +1 -1
  144. package/widgets/FeatureForm.js +1 -1
  145. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  146. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  147. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  148. package/widgets/FeatureTable.js +1 -1
  149. package/widgets/Features/FeaturesViewModel.js +1 -1
  150. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  151. package/widgets/Print/PrintViewModel.js +1 -1
  152. package/widgets/Print.js +1 -1
  153. package/widgets/Search/support/locatorUtils.js +1 -1
  154. package/widgets/Sketch/SketchViewModel.js +1 -1
  155. package/assets/esri/core/workers/chunks/00b9e92f8df245a83921.js +0 -1
  156. package/assets/esri/core/workers/chunks/02a6c43ec17e7223fac5.js +0 -1
  157. package/assets/esri/core/workers/chunks/02ee044597c89c86b934.js +0 -1
  158. package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +0 -1
  159. package/assets/esri/core/workers/chunks/143ccb14c9e915dd1412.js +0 -1
  160. package/assets/esri/core/workers/chunks/24649b410b757599a549.js +0 -1
  161. package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +0 -1
  162. package/assets/esri/core/workers/chunks/2519b207894132d5ea91.js +0 -1
  163. package/assets/esri/core/workers/chunks/30f9b2a3417cbcfeecca.js +0 -1
  164. package/assets/esri/core/workers/chunks/42ab9c282bb267c3db03.js +0 -1
  165. package/assets/esri/core/workers/chunks/478815fc19b452d8317d.js +0 -1
  166. package/assets/esri/core/workers/chunks/49afeac45250b15b5f36.js +0 -1
  167. package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +0 -1
  168. package/assets/esri/core/workers/chunks/50cdc59426ba859027e2.js +0 -1
  169. package/assets/esri/core/workers/chunks/5401ec9c9fd62dcac6ec.js +0 -1
  170. package/assets/esri/core/workers/chunks/554d86df71821d671d2c.js +0 -1
  171. package/assets/esri/core/workers/chunks/58c5861d060c808813a1.js +0 -1
  172. package/assets/esri/core/workers/chunks/5dbb3ef6fdd25ac632ad.js +0 -1
  173. package/assets/esri/core/workers/chunks/61c4bb58ef9f2d99c75e.js +0 -1
  174. package/assets/esri/core/workers/chunks/6e50220f8e2d392e2855.js +0 -1
  175. package/assets/esri/core/workers/chunks/6fd8047741a0df006ddd.js +0 -1
  176. package/assets/esri/core/workers/chunks/7709248f59520aee6f51.js +0 -1
  177. package/assets/esri/core/workers/chunks/8852a64918caf80fc414.js +0 -1
  178. package/assets/esri/core/workers/chunks/8d119dc0a92ad3612daa.js +0 -1
  179. package/assets/esri/core/workers/chunks/94dfb80ab23dda92918b.js +0 -1
  180. package/assets/esri/core/workers/chunks/9ebbc75ba5c623a322aa.js +0 -1
  181. package/assets/esri/core/workers/chunks/a5babc10f47c24651d15.js +0 -1
  182. package/assets/esri/core/workers/chunks/a74c59cf5d1c4e63a4e1.js +0 -1
  183. package/assets/esri/core/workers/chunks/ada5d6fd70bd3e403442.js +0 -1
  184. package/assets/esri/core/workers/chunks/b95d69d84d60ac9828b9.js +0 -1
  185. package/assets/esri/core/workers/chunks/be562536212360943388.js +0 -1
  186. package/assets/esri/core/workers/chunks/ce823fc2d0e0095f398c.js +0 -1
  187. package/assets/esri/core/workers/chunks/d06d36815c2121484a13.js +0 -1
  188. package/assets/esri/core/workers/chunks/d5f06a7b0ea7951c8dd0.js +0 -1
  189. package/assets/esri/core/workers/chunks/ddc71fe66c7a49082920.js +0 -1
  190. package/assets/esri/core/workers/chunks/de6d54df7ae32694fd70.js +0 -1
  191. package/assets/esri/core/workers/chunks/f13c4b9692dad5802a32.js +0 -1106
  192. package/assets/esri/core/workers/chunks/f1e8f7d1a98b9e207b1b.js +0 -1
  193. package/assets/esri/core/workers/chunks/f9e9675f1c2287231653.js +0 -1
package/interfaces.d.ts CHANGED
@@ -38036,6 +38036,24 @@ declare namespace __esri {
38036
38036
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html)
38037
38037
  */
38038
38038
  constructor(properties?: UtilityNetworkProperties);
38039
+ /**
38040
+ * Returns `true` if the given [Association](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-networks-support-Association.html) is valid.
38041
+ *
38042
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#canAddAssociation)
38043
+ */
38044
+ canAddAssociation(association: Association): Promise<boolean>;
38045
+ /**
38046
+ * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits) which are used to add an [Association](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-networks-support-Association.html) via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-FeatureService.html) class.
38047
+ *
38048
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateAddAssociations)
38049
+ */
38050
+ generateAddAssociations(association: Association[]): Promise<ServiceEdits>;
38051
+ /**
38052
+ * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits) which are used to delete an [Association](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-networks-support-Association.html) via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-FeatureService.html) class.
38053
+ *
38054
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateDeleteAssociations)
38055
+ */
38056
+ generateDeleteAssociations(association: Association[]): Promise<ServiceEdits>;
38039
38057
  /**
38040
38058
  * All devices features have terminal configurations (default single terminal).
38041
38059
  *
@@ -38084,6 +38102,38 @@ declare namespace __esri {
38084
38102
  sharedNamedTraceConfigurations?: NamedTraceConfiguration[];
38085
38103
  }
38086
38104
 
38105
+ /**
38106
+ * Results returned from the [generateAddAssocations](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateAddAssociations) method and [generateDeleteAssocations](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateDeleteAssociations).
38107
+ *
38108
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38109
+ */
38110
+ export interface ServiceEdits {
38111
+ /**
38112
+ * The layerId of the feature layer.
38113
+ *
38114
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38115
+ */
38116
+ id: number;
38117
+ /**
38118
+ * Identifier for globalId and objectId.
38119
+ *
38120
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38121
+ */
38122
+ identifierFields: ServiceEditsIdentifierFields[];
38123
+ /**
38124
+ * Object of generated add features.
38125
+ *
38126
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38127
+ */
38128
+ addFeatures: any[];
38129
+ /**
38130
+ * Object of generated delete features.
38131
+ *
38132
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38133
+ */
38134
+ deleteFeatures: any[];
38135
+ }
38136
+
38087
38137
  export interface UtilityNetworkSubmitTraceJobProps {
38088
38138
  /**
38089
38139
  * The globalId (UUID) of the named trace configuration persisted in the network.
@@ -38174,6 +38224,21 @@ declare namespace __esri {
38174
38224
  traceTypes?: string;
38175
38225
  }
38176
38226
 
38227
+ export interface ServiceEditsIdentifierFields {
38228
+ /**
38229
+ * The globalId identifier.
38230
+ *
38231
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38232
+ */
38233
+ globalIdField: string;
38234
+ /**
38235
+ * The objectId identifier.
38236
+ *
38237
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits)
38238
+ */
38239
+ objectIdField: string;
38240
+ }
38241
+
38177
38242
  /**
38178
38243
  * A convenience module for importing [PointCloudRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudRenderer.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/typescript-setup/).
38179
38244
  *
@@ -48010,7 +48075,7 @@ declare namespace __esri {
48010
48075
  *
48011
48076
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#simplify)
48012
48077
  */
48013
- simplify(geometries: Geometry[], requestOptions?: any): Promise<Geometry[]>;
48078
+ simplify(url: string, geometries: Geometry[], requestOptions?: any): Promise<Geometry[]>;
48014
48079
  /**
48015
48080
  * Converts an array of XY-coordinates into well-known strings based on the conversion type and spatial reference supplied by the user.
48016
48081
  *
@@ -82236,19 +82301,19 @@ declare namespace __esri {
82236
82301
  *
82237
82302
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#fromRenderCoordinates)
82238
82303
  */
82239
- fromRenderCoordinates(view: SceneView, srcCoordinates: number[] | Float32Array, srcStart: number, destCoordinates: number[] | Float32Array, destStart: number, destSpatialReference: SpatialReference, count: number): number[] | Float32Array;
82304
+ fromRenderCoordinates(view: SceneView, srcCoordinates: number[] | Float32Array | Float64Array, srcStart: number, destCoordinates: number[] | Float32Array | Float64Array, destStart: number, destSpatialReference: SpatialReference, count: number): number[] | Float32Array | Float64Array;
82240
82305
  /**
82241
82306
  * Computes a 4x4 affine transformation matrix that constitutes a linear coordinate transformation from a local Cartesian coordinate system to the virtual world coordinate system.
82242
82307
  *
82243
82308
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#renderCoordinateTransformAt)
82244
82309
  */
82245
- renderCoordinateTransformAt(view: SceneView, origin: number[] | Float32Array, srcSpatialReference?: SpatialReference, dest?: number[] | Float32Array): number[] | Float32Array;
82310
+ renderCoordinateTransformAt(view: SceneView, origin: number[] | Float32Array | Float64Array, srcSpatialReference?: SpatialReference, dest?: number[] | Float32Array): number[] | Float32Array;
82246
82311
  /**
82247
82312
  * Transforms positions from the given spatial reference to the internal rendering coordinate system.
82248
82313
  *
82249
82314
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#toRenderCoordinates)
82250
82315
  */
82251
- toRenderCoordinates(view: SceneView, srcCoordinates: number[] | Float32Array, srcStart: number, srcSpatialReference: SpatialReference, destCoordinates: number[] | Float32Array, destStart: number, count: number): number[] | Float32Array;
82316
+ toRenderCoordinates(view: SceneView, srcCoordinates: number[] | Float32Array | Float64Array, srcStart: number, srcSpatialReference: SpatialReference, destCoordinates: number[] | Float32Array | Float64Array, destStart: number, count: number): number[] | Float32Array | Float64Array;
82252
82317
  }
82253
82318
 
82254
82319
  export const webgl: webgl;
@@ -82521,132 +82586,132 @@ declare namespace __esri {
82521
82586
  intensity: number;
82522
82587
  }
82523
82588
 
82589
+ /**
82590
+ * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model.
82591
+ *
82592
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82593
+ */
82594
+ export interface SunLight {
82595
+ /**
82596
+ * The incident light direction in render coordinates.
82597
+ *
82598
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82599
+ */
82600
+ direction: ArrayLike<number>;
82601
+ /**
82602
+ * The diffuse light color and intensity.
82603
+ *
82604
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82605
+ */
82606
+ diffuse: ColorAndIntensity;
82607
+ /**
82608
+ * The ambient light color and intensity.
82609
+ *
82610
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82611
+ */
82612
+ ambient: ColorAndIntensity;
82613
+ }
82614
+
82615
+ /**
82616
+ * Describes the input framebuffer objects of a custom RenderNode.
82617
+ *
82618
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82619
+ */
82620
+ export interface ConsumedNodes {
82621
+ /**
82622
+ * One or more required inputs.
82623
+ *
82624
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82625
+ */
82626
+ required: RenderNodeInput[];
82627
+ /**
82628
+ * One or more optional inputs.
82629
+ *
82630
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82631
+ */
82632
+ optional?: RenderNodeInput[];
82633
+ }
82634
+
82524
82635
  /**
82525
82636
  * The camera object passed to render function.
82526
82637
  *
82527
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82638
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82528
82639
  */
82529
82640
  export interface RenderCamera {
82530
82641
  /**
82531
82642
  * A 4x4 matrix that transforms coordinates from world space to camera space.
82532
82643
  *
82533
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82644
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82534
82645
  */
82535
82646
  viewMatrix: ArrayLike<number>;
82536
82647
  /**
82537
82648
  * The inverse transpose of `viewMatrix`, used to transform normals from world space to camera space.
82538
82649
  *
82539
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82650
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82540
82651
  */
82541
82652
  viewInverseTransposeMatrix: ArrayLike<number>;
82542
82653
  /**
82543
82654
  * A 4x4 matrix that defines the perspective projection transformation.
82544
82655
  *
82545
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82656
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82546
82657
  */
82547
82658
  projectionMatrix: ArrayLike<number>;
82548
82659
  /**
82549
82660
  * The position of the camera in the internal Cartesian rendering coordinate system.
82550
82661
  *
82551
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82662
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82552
82663
  */
82553
82664
  eye: ArrayLike<number>;
82554
82665
  /**
82555
82666
  * The camera target ("look at") position in the internal Cartesian rendering coordinate system.
82556
82667
  *
82557
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82668
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82558
82669
  */
82559
82670
  center: ArrayLike<number>;
82560
82671
  /**
82561
82672
  * The camera up vector.
82562
82673
  *
82563
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82674
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82564
82675
  */
82565
82676
  up: ArrayLike<number>;
82566
82677
  /**
82567
82678
  * The distance to the near plane.
82568
82679
  *
82569
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82680
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82570
82681
  */
82571
82682
  near: number;
82572
82683
  /**
82573
82684
  * The distance to the far plane.
82574
82685
  *
82575
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82686
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82576
82687
  */
82577
82688
  far: number;
82578
82689
  /**
82579
82690
  * The horizontal field of view.
82580
82691
  *
82581
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82692
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82582
82693
  */
82583
82694
  fovX: number;
82584
82695
  /**
82585
82696
  * The vertical field of view.
82586
82697
  *
82587
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82698
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82588
82699
  */
82589
82700
  fovY: number;
82590
82701
  /**
82591
82702
  * The render pixel ratio.
82592
82703
  *
82593
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82704
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82594
82705
  */
82595
82706
  pixelRatio: number;
82596
82707
  /**
82597
82708
  * The viewport (x, y, width, height).
82598
82709
  *
82599
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#RenderCamera)
82710
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#RenderCamera)
82600
82711
  */
82601
82712
  viewport: any;
82602
82713
  }
82603
82714
 
82604
- /**
82605
- * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model.
82606
- *
82607
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82608
- */
82609
- export interface SunLight {
82610
- /**
82611
- * The incident light direction in render coordinates.
82612
- *
82613
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82614
- */
82615
- direction: ArrayLike<number>;
82616
- /**
82617
- * The diffuse light color and intensity.
82618
- *
82619
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82620
- */
82621
- diffuse: ColorAndIntensity;
82622
- /**
82623
- * The ambient light color and intensity.
82624
- *
82625
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl-RenderNode.html#SunLight)
82626
- */
82627
- ambient: ColorAndIntensity;
82628
- }
82629
-
82630
- /**
82631
- * Describes the input framebuffer objects of a custom RenderNode.
82632
- *
82633
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82634
- */
82635
- export interface ConsumedNodes {
82636
- /**
82637
- * One or more required inputs.
82638
- *
82639
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82640
- */
82641
- required: RenderNodeInput[];
82642
- /**
82643
- * One or more optional inputs.
82644
- *
82645
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-webgl.html#ConsumedNodes)
82646
- */
82647
- optional?: RenderNodeInput[];
82648
- }
82649
-
82650
82715
  /**
82651
82716
  * Describes a specific RenderNodeInput.
82652
82717
  *
@@ -83824,6 +83889,7 @@ declare namespace __esri {
83824
83889
  | GraphicsLayer
83825
83890
  | MapNotesLayer
83826
83891
  | SceneLayer
83892
+ | SubtypeSublayer
83827
83893
  | WFSLayer;
83828
83894
  /**
83829
83895
  * The FeatureSnappingLayerSource specifies which layers will be utilized for snapping in the [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html).
@@ -83854,6 +83920,7 @@ declare namespace __esri {
83854
83920
  | (GraphicsLayerProperties & { type: "graphics" })
83855
83921
  | (MapNotesLayerProperties & { type: "map-notes" })
83856
83922
  | (SceneLayerProperties & { type: "scene" })
83923
+ | (SubtypeSublayerProperties & { type: "subtype-sublayer" })
83857
83924
  | (WFSLayerProperties & { type: "wfs" });
83858
83925
  }
83859
83926
 
@@ -84224,19 +84291,19 @@ declare namespace __esri {
84224
84291
  */
84225
84292
  filter: FeatureFilter;
84226
84293
  /**
84227
- * Indicates if the layer view has all the features from the service available.
84294
+ * Indicates whether the layer view contains all available features from the service.
84228
84295
  *
84229
84296
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#hasAllFeatures)
84230
84297
  */
84231
84298
  readonly hasAllFeatures: boolean;
84232
84299
  /**
84233
- * Indicates if the layer view has all the features available in the current view.
84300
+ * Indicates whether the layer view has all the features available in the current view.
84234
84301
  *
84235
84302
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#hasAllFeaturesInView)
84236
84303
  */
84237
84304
  readonly hasAllFeaturesInView: boolean;
84238
84305
  /**
84239
- * Indicates if the layer view has geometries at full resolution.
84306
+ * Indicates whether the layer view has geometries at full resolution.
84240
84307
  *
84241
84308
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#hasFullGeometries)
84242
84309
  */
@@ -96239,13 +96306,13 @@ declare namespace __esri {
96239
96306
  */
96240
96307
  attachmentsViewModel: AttachmentsViewModel;
96241
96308
  /**
96242
- * Convenience property that reads whether there are any editable layers that support the `create-features` workflow.
96309
+ * Convenience property that indicates at least one layer supports a `create-features` workflow.
96243
96310
  *
96244
96311
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canCreate)
96245
96312
  */
96246
96313
  readonly canCreate: boolean;
96247
96314
  /**
96248
- * Convenience property that reads whether there are any conditions that allow starting an `update` workflow.
96315
+ * Convenience property that indicates at least one layer supports a `update` workflow.
96249
96316
  *
96250
96317
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canUpdate)
96251
96318
  */
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{rendererTypes as t,webSceneRendererTypes as i}from"../renderers/support/types.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as s}from"../core/object.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{Integer as a}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import{featureGeometryTypeKebabDictionary as m}from"../geometry/support/typeUtils.js";import u from"./Layer.js";import{WFSSource as y}from"./graphics/sources/WFSSource.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as g}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{wfsOidFieldName as R}from"./ogc/wfsUtils.js";import{elevationInfo as I,labelsVisible as O,legendEnabled as S,opacityDrawingInfo as P,popupEnabled as T,screenSizePerspectiveEnabled as C,url as q}from"./support/commonProperties.js";import E from"./support/Field.js";import{defineFieldProperties as U}from"./support/fieldProperties.js";import{fixRendererFields as L,fixTimeInfoFields as D}from"./support/fieldUtils.js";import Q from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import V from"../rest/support/Query.js";import{createPopupTemplate as N}from"../support/popupUtils.js";import{timeZoneProperty as X}from"../time/timeZoneUtils.js";import Y from"../geometry/SpatialReference.js";import k from"../geometry/Extent.js";var B;const G=U();let J=B=class extends(v(c(g(h(f(F(b(x(j(w(o(u)))))))))))){static fromWFSLayerInfo(e){const{customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:d,wfsCapabilities:m}=e;return new B({customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:d,wfsCapabilities:m})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new y({layer:this}),this.spatialReference=Y.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),L(this.renderer,this.fieldsIndex),D(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t){const i=e.filter((e=>e.name!==R));this.geometryField&&i.unshift(new E({name:this.geometryField,alias:this.geometryField,type:"geometry"})),s(t,i.map((e=>e.toJSON())),r)}get parsedUrl(){return n(this.url)}set renderer(e){L(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return N(this,e)}createQuery(){const e=new V;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:t}=this;return e.timeExtent=null!=r&&null!=t?t.offset(-r.value,r.unit):t||null,e}getFieldDomain(e,r){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,r){return this.load().then((()=>this.source.queryFeatures(V.from(e)||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this.load().then((()=>this.source.queryObjectIds(V.from(e)||this.createQuery(),r)))}queryFeatureCount(e,r){return this.load().then((()=>this.source.queryFeatureCount(V.from(e)||this.createQuery(),r)))}queryExtent(e,r){return this.load().then((()=>this.source.queryExtent(V.from(e)||this.createQuery(),r)))}async hasDataChanged(){try{const{dataChanged:e,updates:r}=await this.source.refresh();return null!=r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([p({readOnly:!0})],J.prototype,"capabilities",null),e([p({type:String})],J.prototype,"copyright",void 0),e([p({readOnly:!0})],J.prototype,"createQueryVersion",null),e([p({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],J.prototype,"customParameters",void 0),e([p(X("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([p({readOnly:!0})],J.prototype,"defaultPopupTemplate",null),e([p({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],J.prototype,"definitionExpression",void 0),e([p({type:String})],J.prototype,"displayField",void 0),e([p(I)],J.prototype,"elevationInfo",void 0),e([p({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"featureUrl",void 0),e([p({type:[E],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],J.prototype,"fields",void 0),e([d("fields")],J.prototype,"writeFields",null),e([p(G.fieldsIndex)],J.prototype,"fieldsIndex",void 0),e([p({type:k,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),e([p()],J.prototype,"geometryField",void 0),e([p({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.read},write:{target:"layerDefinition.geometryType",writer:m.write,ignoreOrigin:!0},origins:{service:{read:m.read}}}})],J.prototype,"geometryType",void 0),e([p({type:String})],J.prototype,"id",void 0),e([p(O)],J.prototype,"labelsVisible",void 0),e([p({type:[Q],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],J.prototype,"labelingInfo",void 0),e([p(S)],J.prototype,"legendEnabled",void 0),e([p({type:["show","hide"]})],J.prototype,"listMode",void 0),e([p({type:String})],J.prototype,"objectIdField",void 0),e([p({type:["WFS"]})],J.prototype,"operationalLayerType",void 0),e([p({type:a,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"maxRecordCount",void 0),e([p({type:a})],J.prototype,"maxPageCount",void 0),e([p({type:a})],J.prototype,"maxTotalRecordCount",void 0),e([p({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],J.prototype,"mode",void 0),e([p({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"name",void 0),e([p({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"namespaceUri",void 0),e([p(P)],J.prototype,"opacity",void 0),e([p(G.outFields)],J.prototype,"outFields",void 0),e([p({readOnly:!0})],J.prototype,"parsedUrl",null),e([p(T)],J.prototype,"popupEnabled",void 0),e([p({type:r,json:{name:"popupInfo",write:!0}})],J.prototype,"popupTemplate",void 0),e([p({types:t,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:i,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],J.prototype,"renderer",null),e([p(C)],J.prototype,"screenSizePerspectiveEnabled",void 0),e([p({readOnly:!0})],J.prototype,"source",void 0),e([p({type:Y,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],J.prototype,"spatialReference",void 0),e([p({readOnly:!0,type:[a],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"spatialReferences",void 0),e([p({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"swapXY",void 0),e([p({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],J.prototype,"title",void 0),e([p({json:{read:!1},readOnly:!0})],J.prototype,"type",void 0),e([p(q)],J.prototype,"url",void 0),e([p({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"version",void 0),e([p()],J.prototype,"wfsCapabilities",null),J=B=e([l("esri.layers.WFSLayer")],J);const M=J;export{M as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{rendererTypes as t,webSceneRendererTypes as i}from"../renderers/support/types.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as s}from"../core/object.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{Integer as a}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import"../core/has.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import{featureGeometryTypeKebabDictionary as m}from"../geometry/support/typeUtils.js";import u from"./Layer.js";import{WFSSource as y}from"./graphics/sources/WFSSource.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as h}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as g}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{OrderedLayer as v}from"./mixins/OrderedLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{wfsOidFieldName as R}from"./ogc/wfsUtils.js";import{elevationInfo as I,labelsVisible as O,legendEnabled as S,opacityDrawingInfo as P,popupEnabled as T,screenSizePerspectiveEnabled as C,url as q}from"./support/commonProperties.js";import E from"./support/Field.js";import{defineFieldProperties as U}from"./support/fieldProperties.js";import{fixRendererFields as L,fixTimeInfoFields as D}from"./support/fieldUtils.js";import Q from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import V from"../rest/support/Query.js";import{createPopupTemplate as N}from"../support/popupUtils.js";import{timeZoneProperty as X}from"../time/timeZoneUtils.js";import Y from"../geometry/SpatialReference.js";import k from"../geometry/Extent.js";var B;const G=U();let J=B=class extends(v(c(g(h(f(F(b(x(j(w(o(u)))))))))))){static fromWFSLayerInfo(e){const{customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:d,wfsCapabilities:m}=e;return new B({customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:d,wfsCapabilities:m})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new y({layer:this}),this.spatialReference=Y.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),L(this.renderer,this.fieldsIndex),D(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t){const i=e.filter((e=>e.name!==R));this.geometryField&&i.unshift(new E({name:this.geometryField,alias:this.geometryField,type:"geometry"})),s(t,i.map((e=>e.toJSON())),r)}get parsedUrl(){return n(this.url)}set renderer(e){L(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return N(this,e)}createQuery(){const e=new V({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:r,timeExtent:t}=this;return e.timeExtent=null!=r&&null!=t?t.offset(-r.value,r.unit):t||null,e}getFieldDomain(e,r){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,r){return this.load().then((()=>this.source.queryFeatures(V.from(e)||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this.load().then((()=>this.source.queryObjectIds(V.from(e)||this.createQuery(),r)))}queryFeatureCount(e,r){return this.load().then((()=>this.source.queryFeatureCount(V.from(e)||this.createQuery(),r)))}queryExtent(e,r){return this.load().then((()=>this.source.queryExtent(V.from(e)||this.createQuery(),r)))}async hasDataChanged(){try{const{dataChanged:e,updates:r}=await this.source.refresh();return null!=r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([p({readOnly:!0})],J.prototype,"capabilities",null),e([p({type:String})],J.prototype,"copyright",void 0),e([p({readOnly:!0})],J.prototype,"createQueryVersion",null),e([p({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],J.prototype,"customParameters",void 0),e([p(X("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([p({readOnly:!0})],J.prototype,"defaultPopupTemplate",null),e([p({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],J.prototype,"definitionExpression",void 0),e([p({type:String})],J.prototype,"displayField",void 0),e([p(I)],J.prototype,"elevationInfo",void 0),e([p({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"featureUrl",void 0),e([p({type:[E],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],J.prototype,"fields",void 0),e([d("fields")],J.prototype,"writeFields",null),e([p(G.fieldsIndex)],J.prototype,"fieldsIndex",void 0),e([p({type:k,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),e([p()],J.prototype,"geometryField",void 0),e([p({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.read},write:{target:"layerDefinition.geometryType",writer:m.write,ignoreOrigin:!0},origins:{service:{read:m.read}}}})],J.prototype,"geometryType",void 0),e([p({type:String})],J.prototype,"id",void 0),e([p(O)],J.prototype,"labelsVisible",void 0),e([p({type:[Q],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],J.prototype,"labelingInfo",void 0),e([p(S)],J.prototype,"legendEnabled",void 0),e([p({type:["show","hide"]})],J.prototype,"listMode",void 0),e([p({type:String})],J.prototype,"objectIdField",void 0),e([p({type:["WFS"]})],J.prototype,"operationalLayerType",void 0),e([p({type:a,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"maxRecordCount",void 0),e([p({type:a})],J.prototype,"maxPageCount",void 0),e([p({type:a})],J.prototype,"maxTotalRecordCount",void 0),e([p({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],J.prototype,"mode",void 0),e([p({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"name",void 0),e([p({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"namespaceUri",void 0),e([p(P)],J.prototype,"opacity",void 0),e([p(G.outFields)],J.prototype,"outFields",void 0),e([p({readOnly:!0})],J.prototype,"parsedUrl",null),e([p(T)],J.prototype,"popupEnabled",void 0),e([p({type:r,json:{name:"popupInfo",write:!0}})],J.prototype,"popupTemplate",void 0),e([p({types:t,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:i,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],J.prototype,"renderer",null),e([p(C)],J.prototype,"screenSizePerspectiveEnabled",void 0),e([p({readOnly:!0})],J.prototype,"source",void 0),e([p({type:Y,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],J.prototype,"spatialReference",void 0),e([p({readOnly:!0,type:[a],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"spatialReferences",void 0),e([p({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"swapXY",void 0),e([p({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],J.prototype,"title",void 0),e([p({json:{read:!1},readOnly:!0})],J.prototype,"type",void 0),e([p(q)],J.prototype,"url",void 0),e([p({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],J.prototype,"version",void 0),e([p()],J.prototype,"wfsCapabilities",null),J=B=e([l("esri.layers.WFSLayer")],J);const M=J;export{M 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.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../Graphic.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"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as o}from"../../renderers/support/types.js";import s from"../../request.js";import i from"../../core/Error.js";import{JSONMap as a}from"../../core/jsonMap.js";import n from"../../core/Loadable.js";import p from"../../core/Logger.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Extent.js";import h from"../../geometry/SpatialReference.js";import f from"../FeatureLayer.js";import g from"./BuildingSublayer.js";import{TemporalSceneLayer as j}from"../mixins/TemporalSceneLayer.js";import{zeroCapabilities as v}from"../support/capabilities.js";import{popupEnabled as b}from"../support/commonProperties.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import S from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as F}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as w,I3SMaterialDefinition as x,I3STextureSetDefinition as O,I3SGeometryDefinition as P}from"../support/I3SLayerDefinitions.js";import T from"../../rest/support/Query.js";import{createPopupTemplate as q}from"../../support/popupUtils.js";import R from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as U}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as D,getFetchPopupTemplate as Q}from"../../views/layers/support/popupUtils.js";const E=L();let A=class extends(j(n.LoadableMixin(l(g)))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new S(this.fields)}readAssociatedLayer(e,r){const t=this.layer.associatedFeatureServiceItem,o=r.associatedLayerID;return null!=t&&"number"==typeof o?new f({portalItem:t,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const r=null!=e?e.signal:null,t=this._fetchService(r).then((()=>{this.indexInfo=F(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.getLogger(this),r)}));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){return q(this,e)}async _fetchService(e){const r=(await s(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,r){const t=this.getFeatureType(r?.feature)?.domains?.[e];return t&&"inherited"!==t.type?t:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:v,{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}=e;return{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}}createQuery(){const e=new T;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryExtent(e||this.createQuery(),r)))}queryFeatureCount(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatureCount(e||this.createQuery(),r)))}queryFeatures(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatures(e||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=this.layer,r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryObjectIds(e||this.createQuery(),r)))}async queryCachedAttributes(e,r){const t=I(this.fieldsIndex,await D(this,Q(this)));return U(this.parsedUrl.path,this.attributeStorageInfo,e,r,t,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const o=await this.queryCachedAttributes(e,[t]);if(!o||0===o.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new r;return s.attributes=o[0],s.layer=this,s.sourceLayer=this,s}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([d({readOnly:!0})],A.prototype,"parsedUrl",null),e([d({type:w,readOnly:!0})],A.prototype,"nodePages",void 0),e([d({type:[x],readOnly:!0})],A.prototype,"materialDefinitions",void 0),e([d({type:[O],readOnly:!0})],A.prototype,"textureSetDefinitions",void 0),e([d({type:[P],readOnly:!0})],A.prototype,"geometryDefinitions",void 0),e([d({readOnly:!0})],A.prototype,"serviceUpdateTimeStamp",void 0),e([d({readOnly:!0})],A.prototype,"store",void 0),e([d({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],A.prototype,"rootNode",void 0),e([d({readOnly:!0})],A.prototype,"attributeStorageInfo",void 0),e([d(E.fields)],A.prototype,"fields",void 0),e([d({readOnly:!0})],A.prototype,"fieldsIndex",null),e([d({readOnly:!0,type:f})],A.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],A.prototype,"readAssociatedLayer",null),e([d(E.outFields)],A.prototype,"outFields",void 0),e([d({type:String,readOnly:!0})],A.prototype,"objectIdField",null),e([d({readOnly:!0,type:String,json:{read:!1}})],A.prototype,"displayField",null),e([d({readOnly:!0,type:String})],A.prototype,"apiKey",null),e([d({readOnly:!0,type:String})],A.prototype,"customParameters",null),e([d({readOnly:!0,type:m})],A.prototype,"fullExtent",null),e([d({readOnly:!0,type:h})],A.prototype,"spatialReference",null),e([d({readOnly:!0})],A.prototype,"version",null),e([d({readOnly:!0,type:R})],A.prototype,"elevationInfo",null),e([d({readOnly:!0,type:Number})],A.prototype,"minScale",null),e([d({readOnly:!0,type:Number})],A.prototype,"maxScale",null),e([d({readOnly:!0,type:Number})],A.prototype,"effectiveScaleRange",null),e([d({type:["hide","show"],json:{write:!0}})],A.prototype,"listMode",void 0),e([d({types:o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],A.prototype,"renderer",void 0),e([d({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],A.prototype,"definitionExpression",void 0),e([d(b)],A.prototype,"popupEnabled",void 0),e([d({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],A.prototype,"popupTemplate",void 0),e([d({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],A.prototype,"normalReferenceFrame",void 0),e([d({readOnly:!0,json:{read:!1}})],A.prototype,"defaultPopupTemplate",null),e([d()],A.prototype,"types",null),e([d()],A.prototype,"typeIdField",null),e([d({json:{write:!1}}),u(new a({"3DObject":"3d-object",Point:"point"}))],A.prototype,"layerType",void 0),e([d()],A.prototype,"geometryType",null),e([d()],A.prototype,"profile",null),e([d({readOnly:!0,json:{read:!1}})],A.prototype,"capabilities",null),A=e([c("esri.layers.buildingSublayers.BuildingComponentSublayer")],A);const _=A;export{_ as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../Graphic.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"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as o}from"../../renderers/support/types.js";import s from"../../request.js";import i from"../../core/Error.js";import{JSONMap as a}from"../../core/jsonMap.js";import n from"../../core/Loadable.js";import p from"../../core/Logger.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Extent.js";import h from"../../geometry/SpatialReference.js";import f from"../FeatureLayer.js";import g from"./BuildingSublayer.js";import{TemporalSceneLayer as j}from"../mixins/TemporalSceneLayer.js";import{zeroCapabilities as v}from"../support/capabilities.js";import{popupEnabled as b}from"../support/commonProperties.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import S from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as F}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as w,I3SMaterialDefinition as x,I3STextureSetDefinition as O,I3SGeometryDefinition as P}from"../support/I3SLayerDefinitions.js";import T from"../../rest/support/Query.js";import{createPopupTemplate as q}from"../../support/popupUtils.js";import R from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as U}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as D,getFetchPopupTemplate as Q}from"../../views/layers/support/popupUtils.js";const E=L();let A=class extends(j(n.LoadableMixin(l(g)))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new S(this.fields)}readAssociatedLayer(e,r){const t=this.layer.associatedFeatureServiceItem,o=r.associatedLayerID;return null!=t&&"number"==typeof o?new f({portalItem:t,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const r=null!=e?e.signal:null,t=this._fetchService(r).then((()=>{this.indexInfo=F(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.getLogger(this),r)}));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){return q(this,e)}async _fetchService(e){const r=(await s(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,r){const t=this.getFeatureType(r?.feature)?.domains?.[e];return t&&"inherited"!==t.type?t:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:v,{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}=e;return{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}}createQuery(){const e=new T;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryExtent(e||this.createQuery(),r)))}queryFeatureCount(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatureCount(e||this.createQuery(),r)))}queryFeatures(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatures(e||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=this.layer,r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryObjectIds(e||this.createQuery(),r)))}async queryCachedAttributes(e,r){const t=I(this.fieldsIndex,await D(this,Q(this)));return U(this.parsedUrl.path,this.attributeStorageInfo,e,r,t,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const o=await this.queryCachedAttributes(e,[t]);if(!o||0===o.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new r({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([d({readOnly:!0})],A.prototype,"parsedUrl",null),e([d({type:w,readOnly:!0})],A.prototype,"nodePages",void 0),e([d({type:[x],readOnly:!0})],A.prototype,"materialDefinitions",void 0),e([d({type:[O],readOnly:!0})],A.prototype,"textureSetDefinitions",void 0),e([d({type:[P],readOnly:!0})],A.prototype,"geometryDefinitions",void 0),e([d({readOnly:!0})],A.prototype,"serviceUpdateTimeStamp",void 0),e([d({readOnly:!0})],A.prototype,"store",void 0),e([d({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],A.prototype,"rootNode",void 0),e([d({readOnly:!0})],A.prototype,"attributeStorageInfo",void 0),e([d(E.fields)],A.prototype,"fields",void 0),e([d({readOnly:!0})],A.prototype,"fieldsIndex",null),e([d({readOnly:!0,type:f})],A.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],A.prototype,"readAssociatedLayer",null),e([d(E.outFields)],A.prototype,"outFields",void 0),e([d({type:String,readOnly:!0})],A.prototype,"objectIdField",null),e([d({readOnly:!0,type:String,json:{read:!1}})],A.prototype,"displayField",null),e([d({readOnly:!0,type:String})],A.prototype,"apiKey",null),e([d({readOnly:!0,type:String})],A.prototype,"customParameters",null),e([d({readOnly:!0,type:m})],A.prototype,"fullExtent",null),e([d({readOnly:!0,type:h})],A.prototype,"spatialReference",null),e([d({readOnly:!0})],A.prototype,"version",null),e([d({readOnly:!0,type:R})],A.prototype,"elevationInfo",null),e([d({readOnly:!0,type:Number})],A.prototype,"minScale",null),e([d({readOnly:!0,type:Number})],A.prototype,"maxScale",null),e([d({readOnly:!0,type:Number})],A.prototype,"effectiveScaleRange",null),e([d({type:["hide","show"],json:{write:!0}})],A.prototype,"listMode",void 0),e([d({types:o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],A.prototype,"renderer",void 0),e([d({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],A.prototype,"definitionExpression",void 0),e([d(b)],A.prototype,"popupEnabled",void 0),e([d({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],A.prototype,"popupTemplate",void 0),e([d({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],A.prototype,"normalReferenceFrame",void 0),e([d({readOnly:!0,json:{read:!1}})],A.prototype,"defaultPopupTemplate",null),e([d()],A.prototype,"types",null),e([d()],A.prototype,"typeIdField",null),e([d({json:{write:!1}}),u(new a({"3DObject":"3d-object",Point:"point"}))],A.prototype,"layerType",void 0),e([d()],A.prototype,"geometryType",null),e([d()],A.prototype,"profile",null),e([d({readOnly:!0,json:{read:!1}})],A.prototype,"capabilities",null),A=e([c("esri.layers.buildingSublayers.BuildingComponentSublayer")],A);const _=A;export{_ 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.30/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Graphic.js";import t from"../../core/Error.js";import a from"../../core/Logger.js";import{getMetersPerCartesianUnitForSR as r}from"../../core/unitUtils.js";import{parseData as s}from"../../core/urlUtils.js";import{initializeProjection as o,project as n}from"../../geometry/projection.js";import{fromJSON as l}from"../../geometry/support/jsonUtils.js";import{isFeatureIdentifierArrayWithGlobalId as i,isFeatureIdentifierArrayWithObjectId as d}from"./editingSupport.js";async function u(e,t,a){const{geometry:s}=t,l={...t.attributes};if(null!=a&&"mesh"===s?.type){const{transformFieldRoles:t}=a,{origin:i,spatialReference:d,transform:u}=s,c=e.spatialReference;await o(d,c);const p=n(i,c);if(l[t.originX]=p.x,l[t.originY]=p.y,l[t.originZ]=p.z??0,null!=u){const{translation:e,scale:a,rotation:o}=u,{vertexSpace:n}=s,i="georeferenced"===n.type?1:r(d)/r(c);l[t.translationX]=e[0]*i,l[t.translationY]=e[2]*i,l[t.translationZ]=-e[1]*i,l[t.scaleX]=a[0],l[t.scaleY]=a[2],l[t.scaleZ]=a[1],l[t.rotationX]=o[0],l[t.rotationY]=o[2],l[t.rotationZ]=-o[1],l[t.rotationDeg]=o[3]}return{attributes:l}}return null==s?{attributes:l}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:l}}async function c(e,t){const a=await Promise.all((t.addAttachments??[]).map((t=>p(e,t)))),r=await Promise.all((t.updateAttachments??[]).map((t=>p(e,t)))),s=t.deleteAttachments??[];return a.length||r.length||s.length?{adds:a,updates:r,deletes:[...s]}:null}async function p(e,t){const{feature:a,attachment:r}=t,{globalId:o,name:n,contentType:l,data:i,uploadId:d}=r,u={globalId:o};if(a&&("attributes"in a?u.parentGlobalId=a.attributes?.[e.globalIdField]:a.globalId&&(u.parentGlobalId=a.globalId)),d)u.uploadId=d;else if(i){const e=await s(i);e&&(u.contentType=e.mediaType,u.data=e.data),i instanceof File&&(u.name=i.name)}return n&&(u.name=n),l&&(u.contentType=l),u}function m(e,t,a){if(!t||0===t.length)return[];if(a&&i(t))return t.map((e=>e.globalId));if(d(t))return t.map((e=>e.objectId));const r=a?e.globalIdField:e.objectIdField;return r?t.map((e=>e.getAttribute(r))):[]}function f(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,s={addFeatureResults:e?.addResults?.map(g)??[],updateFeatureResults:e?.updateResults?.map(g)??[],deleteFeatureResults:e?.deleteResults?.map(g)??[],addAttachmentResults:r?.addResults?r.addResults.map(g):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(g):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(g):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}function g(e){const a=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:a?new t("feature-layer-source:edit-failure",a.description,{code:a.code}):null}}function b(t,a){return new e({attributes:t.attributes,geometry:l({...t.geometry,spatialReference:a})})}function R(e,t){return{adds:e?.adds?.map((e=>b(e,t)))||[],updates:e?.updates?.map((e=>({original:b(e[0],t),current:b(e[1],t)})))||[],deletes:e?.deletes?.map((e=>b(e,t)))||[],spatialReference:t}}function y(e){const t=e.details.raw,a=+t.code,r=+t.extendedCode;return 500===a&&(-2147217144===r||-2147467261===r)}export{R as createEditedFeatures,g as createFeatureEditResult,c as getAttachmentEditsJSON,m as getFeatureIds,u as getFeatureJSON,y as isProtectedOrPrivateVersionError,f as unpackEditResultData};
5
+ import t from"../../Graphic.js";import e from"../../core/Error.js";import a from"../../core/Logger.js";import{getMetersPerCartesianUnitForSR as r}from"../../core/unitUtils.js";import{parseData as s}from"../../core/urlUtils.js";import{initializeProjection as o,project as n}from"../../geometry/projection.js";import{fromJSON as l}from"../../geometry/support/jsonUtils.js";import{equals as i}from"../../geometry/support/spatialReferenceUtils.js";import{isFeatureIdentifierArrayWithGlobalId as u,isFeatureIdentifierArrayWithObjectId as d}from"./editingSupport.js";async function c(t,e,a){const{geometry:s}=e,l={...e.attributes};if(null!=a&&"mesh"===s?.type){const{transformFieldRoles:e}=a,{origin:u,spatialReference:d,transform:c,vertexSpace:p}=s,m="local"===p.type,f=t.spatialReference,g=d.isGeographic,b=d.isWebMercator,R=(g||b)&&m,y=!g&&!m,I=i(f,d);if(!(R||y&&I))return null;await o(d,f);const h=n(u,f);if(l[e.originX]=h.x,l[e.originY]=h.y,l[e.originZ]=h.z??0,null!=c){const{translation:t,scale:a,rotation:s}=c,o=m?1:r(d)/r(f);l[e.translationX]=t[0]*o,l[e.translationY]=t[2]*o,l[e.translationZ]=-t[1]*o,l[e.scaleX]=a[0],l[e.scaleY]=a[2],l[e.scaleZ]=a[1],l[e.rotationX]=s[0],l[e.rotationY]=s[2],l[e.rotationZ]=-s[1],l[e.rotationDeg]=s[3]}return{attributes:l}}return null==s?{attributes:l}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:l}}async function p(t,e){const a=await Promise.all((e.addAttachments??[]).map((e=>m(t,e)))),r=await Promise.all((e.updateAttachments??[]).map((e=>m(t,e)))),s=e.deleteAttachments??[];return a.length||r.length||s.length?{adds:a,updates:r,deletes:[...s]}:null}async function m(t,e){const{feature:a,attachment:r}=e,{globalId:o,name:n,contentType:l,data:i,uploadId:u}=r,d={globalId:o};if(a&&("attributes"in a?d.parentGlobalId=a.attributes?.[t.globalIdField]:a.globalId&&(d.parentGlobalId=a.globalId)),u)d.uploadId=u;else if(i){const t=await s(i);t&&(d.contentType=t.mediaType,d.data=t.data),i instanceof File&&(d.name=i.name)}return n&&(d.name=n),l&&(d.contentType=l),d}function f(t,e,a){if(!e||0===e.length)return[];if(a&&u(e))return e.map((t=>t.globalId));if(d(e))return e.map((t=>t.objectId));const r=a?t.globalIdField:t.objectIdField;return r?e.map((t=>t.getAttribute(r))):[]}function g(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(b)??[],updateFeatureResults:t?.updateResults?.map(b)??[],deleteFeatureResults:t?.deleteResults?.map(b)??[],addAttachmentResults:r?.addResults?r.addResults.map(b):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(b):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(b):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}function b(t){const a=!0===t.success?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:a?new e("feature-layer-source:edit-failure",a.description,{code:a.code}):null}}function R(e,a){return new t({attributes:e.attributes,geometry:l({...e.geometry,spatialReference:a})})}function y(t,e){return{adds:t?.adds?.map((t=>R(t,e)))||[],updates:t?.updates?.map((t=>({original:R(t[0],e),current:R(t[1],e)})))||[],deletes:t?.deletes?.map((t=>R(t,e)))||[],spatialReference:e}}function I(t){const e=t.details.raw,a=+e.code,r=+e.extendedCode;return 500===a&&(-2147217144===r||-2147467261===r)}export{y as createEditedFeatures,b as createFeatureEditResult,p as getAttachmentEditsJSON,f as getFeatureIds,c as getFeatureJSON,I as isProtectedOrPrivateVersionError,g as unpackEditResultData};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Graphic.js";import t from"../../core/Collection.js";import a from"../../core/Error.js";import{clone as r}from"../../core/lang.js";import s from"../../core/Logger.js";import{createResolver as o}from"../../core/promiseUtils.js";import{dataComponents as i}from"../../core/urlUtils.js";import{generateBracedUUID as n}from"../../core/uuid.js";import{normalizeCentralMeridian as d}from"../../geometry/support/normalizeUtils.js";import{isEditBusLayer as l,emitApplyEditsEvent as u}from"../mixins/EditBusLayer.js";import{isValidFieldValue as p}from"../support/fieldUtils.js";import{getMimeTypeFormatId as c,getFilenameFormatId as h}from"../support/infoFor3D.js";import{getEffectiveEditingEnabled as m,getEffectiveLayerCapabilities as f}from"../support/layerUtils.js";function y(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function A(e,t,a,s={}){let i;const n="gdbVersion"in e?e.gdbVersion:null,d=s.gdbVersion??n;if(l(e)&&e.url)i=u(e.url,e.layerId,d,"original-and-current-features"===s.returnServiceEditsOption);else{i=o(),i.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:i.promise};e.emit("apply-edits",t)}try{const{results:o,edits:n}=await v(e,t,a,s),d=e=>e.filter((e=>!e.error)).map(r),l={edits:n,addedFeatures:d(o.addFeatureResults),updatedFeatures:d(o.updateFeatureResults),deletedFeatures:d(o.deleteFeatureResults),addedAttachments:d(o.addAttachmentResults),updatedAttachments:d(o.updateAttachmentResults),deletedAttachments:d(o.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:o.editMoment?new Date(o.editMoment):null,globalIdToObjectId:s.globalIdToObjectId};return o.editedFeatureResults?.length&&(l.editedFeatures=o.editedFeatureResults),i.resolve(l),o}catch(p){throw i.reject(p),p}}async function v(e,t,r,s){if(await e.load(),!y(t))throw new a(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!m(e))throw new a(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:o,options:i}=await I(e,r,s);return o.addFeatures?.length||o.updateFeatures?.length||o.deleteFeatures?.length||o.addAttachments?.length||o.updateAttachments?.length||o.deleteAttachments?.length?{edits:o,results:await t.applyEdits(o,i)}:{edits:o,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}async function I(e,t,r){const o=f(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(T(t,o,r,!!i,!!n,`${e.type}-layer`),!o.data.isVersioned&&r?.gdbVersion)throw new a(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!o.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new a(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const l={...r};if(null!=l.rollbackOnFailureEnabled||o.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),l.rollbackOnFailureEnabled||"original-and-current-features"!==l.returnServiceEditsOption||(!1===l.rollbackOnFailureEnabled&&s.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),l.rollbackOnFailureEnabled=!0),!o.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new a(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(l.returnServiceEditsInSourceSR&&"original-and-current-features"!==l.returnServiceEditsOption)throw new a(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const u=B(t,o,`${e.type}-layer`),p=r?.globalIdUsed||d,c=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(p){const{globalIdField:t}=e;if(null==t)throw new a(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");u.addFeatures.forEach((e=>U(e,t)))}u.addFeatures.forEach((t=>S(t,e,p,c))),u.updateFeatures.forEach((t=>j(t,e,p,c))),u.deleteFeatures.forEach((t=>R(t,e,p,c))),u.addAttachments.forEach((t=>O(t,e))),u.updateAttachments.forEach((t=>O(t,e))),d&&await G(u,e);return{edits:await L(u),options:l}}function $(e,t,r,s){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(s.length&&"attributes"in e)for(const o of s){const r=e.attributes[o.name];if(void 0!==r&&!p(o,r))throw new a(`${t.type}-layer:invalid-parameter`,`Big-integer field '${o.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new a(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new a(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function E(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if("georeferenced"===r.vertexSpace.type)throw new a(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function S(e,t,a,r){$(e,t,a,r),E(e,t)}function R(e,t,a,r){$(e,t,a,r)}function j(e,t,r,s){$(e,t,r,s),E(e,t);const o=f(t);if("geometry"in e&&null!=e.geometry&&!o?.editing.supportsGeometryUpdate)throw new a(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}function O(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&!!s.data.name)&&!s.name)throw new a(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=i(s.data);if(e&&!e.isBase64)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}function U(e,t){const{attributes:a}=e;null==a[t]&&(a[t]=n())}async function L(e){const t=e.addFeatures??[],a=e.updateFeatures??[],r=t.concat(a).map((e=>e.geometry)),s=await d(r),o=t.length,i=a.length;return s.slice(0,o).forEach(((e,a)=>t[a].geometry=e)),s.slice(o,o+i).forEach(((e,t)=>a[t].geometry=e)),e}function k(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&t.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}function B(e,t,r){const s=k(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new a(`${r}:unsupported-operation`,"Layer does not support adding features.");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new a(`${r}:unsupported-operation`,"Layer does not support updating features.");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new a(`${r}:unsupported-operation`,"Layer does not support deleting features.");return s.addFeatures=s.addFeatures.map(D),s.updateFeatures=s.updateFeatures.map(D),s.addAssetFeatures=[],s}function T(e,t,r,s,o,i){if(!e||!s&&!o)throw new a(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new a(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&o)throw new a(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&o)throw new a(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}function D(t){const a=new e;return t.attributes||(t.attributes={}),a.geometry=t.geometry,a.attributes=t.attributes,a}async function G(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=c("model/gltf-binary",r.supportedFormats)??h("glb",r.supportedFormats);if(!(!!s&&r.editFormats.includes(s)))throw new a(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:o}=e;for(const a of e.addFeatures??[])V(a)&&o.push(a);for(const a of e.updateFeatures??[])V(a)&&o.push(a)}function V(e){return"mesh"===e?.geometry?.type}function M(e,t,r,s){if(!y(t))throw new a(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new a(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}export{A as applyEdits,T as checkEditingCapabilities,F as isFeatureIdentifierArrayWithGlobalId,b as isFeatureIdentifierArrayWithObjectId,w as isFeatureIdentifierWithGlobalId,g as isFeatureIdentifierWithObjectId,k as normalizeCollections,B as normalizeEdits,L as normalizeGeometries,D as shallowCloneFeature,M as uploadAssets};
5
+ import e from"../../Graphic.js";import t from"../../core/Collection.js";import a from"../../core/Error.js";import{clone as r}from"../../core/lang.js";import s from"../../core/Logger.js";import{createResolver as i}from"../../core/promiseUtils.js";import{dataComponents as o}from"../../core/urlUtils.js";import{generateBracedUUID as n}from"../../core/uuid.js";import{normalizeCentralMeridian as d}from"../../geometry/support/normalizeUtils.js";import{equals as l}from"../../geometry/support/spatialReferenceUtils.js";import{isEditBusLayer as u,emitApplyEditsEvent as p}from"../mixins/EditBusLayer.js";import{isValidFieldValue as c}from"../support/fieldUtils.js";import{getMimeTypeFormatId as h,getFilenameFormatId as m}from"../support/infoFor3D.js";import{getEffectiveEditingEnabled as f,getEffectiveLayerCapabilities as y}from"../support/layerUtils.js";function g(e){return null!=e?.applyEdits}function b(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function w(e){return e.every(b)}function F(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function A(e){return e.every(F)}async function v(e,t,a,s={}){let o;const n="gdbVersion"in e?e.gdbVersion:null,d=s.gdbVersion??n;if(u(e)&&e.url)o=p(e.url,e.layerId,d,"original-and-current-features"===s.returnServiceEditsOption);else{o=i(),o.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:o.promise};e.emit("apply-edits",t)}try{const{results:i,edits:n}=await I(e,t,a,s),d=e=>e.filter((e=>!e.error)).map(r),l={edits:n,addedFeatures:d(i.addFeatureResults),updatedFeatures:d(i.updateFeatureResults),deletedFeatures:d(i.deleteFeatureResults),addedAttachments:d(i.addAttachmentResults),updatedAttachments:d(i.updateAttachmentResults),deletedAttachments:d(i.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:i.editMoment?new Date(i.editMoment):null,globalIdToObjectId:s.globalIdToObjectId};return i.editedFeatureResults?.length&&(l.editedFeatures=i.editedFeatureResults),o.resolve(l),i}catch(l){throw o.reject(l),l}}async function I(e,t,r,s){if(await e.load(),!g(t))throw new a(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!f(e))throw new a(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:o}=await $(e,r,s);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,o)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}async function $(e,t,r){const i=y(e),o=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(D(t,i,r,!!o,!!n,`${e.type}-layer`),!i.data.isVersioned&&r?.gdbVersion)throw new a(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!i.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new a(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const l={...r};if(null!=l.rollbackOnFailureEnabled||i.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),l.rollbackOnFailureEnabled||"original-and-current-features"!==l.returnServiceEditsOption||(!1===l.rollbackOnFailureEnabled&&s.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),l.rollbackOnFailureEnabled=!0),!i.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new a(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(l.returnServiceEditsInSourceSR&&"original-and-current-features"!==l.returnServiceEditsOption)throw new a(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const u=T(t,i,`${e.type}-layer`),p=r?.globalIdUsed||d,c=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(p){const{globalIdField:t}=e;if(null==t)throw new a(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");u.addFeatures.forEach((e=>U(e,t)))}u.addFeatures.forEach((t=>R(t,e,p,c))),u.updateFeatures.forEach((t=>O(t,e,p,c))),u.deleteFeatures.forEach((t=>j(t,e,p,c))),u.addAttachments.forEach((t=>k(t,e))),u.updateAttachments.forEach((t=>k(t,e))),d&&await M(u,e);return{edits:await L(u),options:l}}function E(e,t,r,s){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(s.length&&"attributes"in e)for(const i of s){const r=e.attributes[i.name];if(void 0!==r&&!c(i,r))throw new a(`${t.type}-layer:invalid-parameter`,`Big-integer field '${i.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new a(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new a(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function S(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e,{spatialReference:s,vertexSpace:i}=r,o="local"===i.type,n=s.isGeographic,d=s.isWebMercator,u=t.spatialReference,p=l(u,s);if(!(o&&(n||d)||!o&&!n&&p))throw new a(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${i.type} vertex space and a spatial reference wkid:${s.wkid} to a layer with spatial reference wkid:${u?.wkid??"unknown"} is not supported`)}}function R(e,t,a,r){E(e,t,a,r),S(e,t)}function j(e,t,a,r){E(e,t,a,r)}function O(e,t,r,s){E(e,t,r,s),S(e,t);const i=y(t);if("geometry"in e&&null!=e.geometry&&!i?.editing.supportsGeometryUpdate)throw new a(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}function k(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&!!s.data.name)&&!s.name)throw new a(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new a(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=o(s.data);if(e&&!e.isBase64)throw new a(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}function U(e,t){const{attributes:a}=e;null==a[t]&&(a[t]=n())}async function L(e){const t=e.addFeatures??[],a=e.updateFeatures??[],r=t.concat(a).map((e=>e.geometry)),s=await d(r),i=t.length,o=a.length;return s.slice(0,i).forEach(((e,a)=>t[a].geometry=e)),s.slice(i,i+o).forEach(((e,t)=>a[t].geometry=e)),e}function B(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&t.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}function T(e,t,r){const s=B(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new a(`${r}:unsupported-operation`,"Layer does not support adding features.");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new a(`${r}:unsupported-operation`,"Layer does not support updating features.");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new a(`${r}:unsupported-operation`,"Layer does not support deleting features.");return s.addFeatures=s.addFeatures.map(G),s.updateFeatures=s.updateFeatures.map(G),s.addAssetFeatures=[],s}function D(e,t,r,s,i,o){if(!e||!s&&!i)throw new a(`${o}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new a(`${o}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&i)throw new a(`${o}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new a(`${o}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}function G(t){const a=new e;return t.attributes||(t.attributes={}),a.geometry=t.geometry,a.attributes=t.attributes,a}async function M(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=h("model/gltf-binary",r.supportedFormats)??m("glb",r.supportedFormats);if(!(!!s&&r.editFormats.includes(s)))throw new a(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:i}=e;for(const a of e.addFeatures??[])V(a)&&i.push(a);for(const a of e.updateFeatures??[])V(a)&&i.push(a)}function V(e){return"mesh"===e?.geometry?.type}function x(e,t,r,s){if(!g(t))throw new a(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new a(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}export{v as applyEdits,D as checkEditingCapabilities,A as isFeatureIdentifierArrayWithGlobalId,w as isFeatureIdentifierArrayWithObjectId,F as isFeatureIdentifierWithGlobalId,b as isFeatureIdentifierWithObjectId,B as normalizeCollections,T as normalizeEdits,L as normalizeGeometries,G as shallowCloneFeature,x as uploadAssets};