@arcgis/core 5.2.0-next.162 → 5.2.0-next.164

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 (170) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/analysis/LineOfSightAnalysis.d.ts +1 -1
  3. package/analysis/LineOfSightAnalysisObserver.d.ts +5 -4
  4. package/analysis/LineOfSightAnalysisTarget.d.ts +4 -4
  5. package/analysis/Viewshed.d.ts +4 -4
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/092e311cb7aea92a6a26.js +1 -0
  8. package/assets/esri/core/workers/chunks/{8e19629899a5becf8e19.js → 150e7a7bd5df25693da7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +1 -0
  10. package/assets/esri/core/workers/chunks/{8e4a7027d171fb60e51e.js → 1f7f4f821d422b46cae7.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +1 -0
  12. package/assets/esri/core/workers/chunks/226f862bbeb33fc7c597.js +1 -0
  13. package/assets/esri/core/workers/chunks/25a3bd8bede2d07d3a54.js +1 -0
  14. package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +1 -0
  15. package/assets/esri/core/workers/chunks/3f46acfda693c70abbdd.js +1 -0
  16. package/assets/esri/core/workers/chunks/434a8ba841a59e0deab9.js +1 -0
  17. package/assets/esri/core/workers/chunks/45fd2b456a6997584ca1.js +1 -0
  18. package/assets/esri/core/workers/chunks/{2e096537a3a5555a4a93.js → 4cb751dc8d00bdaeb04c.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{85bba551057366cd00ae.js → 4db829a0238024736fe6.js} +1 -1
  20. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +1 -0
  21. package/assets/esri/core/workers/chunks/542e5640ea1b80ef801a.js +1 -0
  22. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +1 -0
  23. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +1 -0
  24. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +1 -0
  25. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +1 -0
  26. package/assets/esri/core/workers/chunks/{5f4feca26102088ea565.js → 60737732ce495bbdd0fc.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{9ce8b9b80da146a5bbf5.js → 60c79934799927114074.js} +1 -1
  28. package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +1 -0
  29. package/assets/esri/core/workers/chunks/{8aa80b892fde552577e8.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{f528ac5c648ca6a98582.js → 711cfb84659cb4437679.js} +1 -1
  31. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +29 -0
  32. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +1 -0
  33. package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +1 -0
  34. package/assets/esri/core/workers/chunks/89c8b0f684c1f27d149e.js +1 -0
  35. package/assets/esri/core/workers/chunks/8ab57cb1bfd3dc8d3c2a.js +1 -0
  36. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +1 -0
  37. package/assets/esri/core/workers/chunks/97b5f4302fb867c829f4.js +1 -0
  38. package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +1 -0
  39. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +1 -0
  40. package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +1 -0
  41. package/assets/esri/core/workers/chunks/ad96132bc89671e595f3.js +1 -0
  42. package/assets/esri/core/workers/chunks/b1d989b72203113a06fe.js +1 -0
  43. package/assets/esri/core/workers/chunks/{fc73737b41e086f0ce0b.js → b59aaf30c7fe2c8d1aaa.js} +1 -1
  44. package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +1 -0
  45. package/assets/esri/core/workers/chunks/b704f489d0f072a0bfcd.js +1 -0
  46. package/assets/esri/core/workers/chunks/b736046c6b4ede73ea46.js +1 -0
  47. package/assets/esri/core/workers/chunks/c070d2ddf290b4f92916.js +1 -0
  48. package/assets/esri/core/workers/chunks/{d6cd0039d6e9c40961e3.js → d1f98c5249c487eb96f1.js} +1 -1
  49. package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +1 -0
  50. package/assets/esri/core/workers/chunks/e251921bc5367258c4d2.js +1 -0
  51. package/assets/esri/core/workers/chunks/ee08ae5b73439a1ff666.js +1 -0
  52. package/assets/esri/core/workers/chunks/{e0351753f6b4d1adf11e.js → fc0dbb588a4062615cb6.js} +1 -1
  53. package/assets/esri/core/workers/chunks/fcaf9450642fcef83286.js +1 -0
  54. package/assets/esri/core/workers/chunks/feb41abc03d677df6f73.js +1 -0
  55. package/chunks/GlobalIllumination.glsl.js +2 -17
  56. package/config.d.ts +11 -30
  57. package/config.js +1 -1
  58. package/core/workers/workerFactory.js +1 -1
  59. package/core/workers.d.ts +17 -0
  60. package/geometry/support/clipRay.js +1 -1
  61. package/geometry/support/plane.js +1 -1
  62. package/kernel.js +1 -1
  63. package/layers/FeatureLayer.d.ts +32 -14
  64. package/layers/GeoJSONLayer.d.ts +2 -107
  65. package/layers/MapImageLayer.d.ts +2 -1
  66. package/layers/SceneLayer.d.ts +40 -16
  67. package/layers/SubtypeGroupLayer.d.ts +63 -0
  68. package/layers/ViewshedLayer.d.ts +10 -4
  69. package/layers/WMSLayer.d.ts +2 -69
  70. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  71. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  72. package/layers/graphics/sources/support/QueryTask.js +1 -1
  73. package/layers/mixins/TemporalLayer.d.ts +70 -48
  74. package/layers/mixins/TiledImagery.d.ts +0 -11
  75. package/layers/support/LabelClass.d.ts +20 -2
  76. package/layers/support/Sublayer.d.ts +32 -2
  77. package/layers/support/TimeInformation.js +2 -0
  78. package/package.json +2 -2
  79. package/popup/content.d.ts +38 -1
  80. package/popup/content.js +1 -1
  81. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +10 -6
  82. package/rest/query/operations/queryUtils.js +1 -1
  83. package/rest/support/timeUtils.js +2 -0
  84. package/smartMapping/popup/support/clusterUtils.js +1 -1
  85. package/smartMapping/popup/support/utils.js +2 -2
  86. package/smartMapping/renderers/size.js +1 -1
  87. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  88. package/support/timeUtils.d.ts +11 -0
  89. package/symbols/TextSymbol.d.ts +27 -2
  90. package/symbols/cim/CIMCursor.js +1 -1
  91. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  92. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  93. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  94. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  95. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  96. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  97. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  98. package/views/3d/GroundView3D.js +1 -1
  99. package/views/3d/environment/SunLighting.d.ts +16 -1
  100. package/views/3d/environment/SunLighting.js +1 -1
  101. package/views/3d/environment/VirtualLighting.d.ts +16 -1
  102. package/views/3d/environment/VirtualLighting.js +1 -1
  103. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  104. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  105. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +9 -4
  106. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  107. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  108. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  109. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  110. package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +2 -0
  111. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  112. package/views/BasemapView.js +1 -1
  113. package/views/GroundView.d.ts +1 -1
  114. package/views/GroundView.js +1 -1
  115. package/views/SceneView.js +1 -1
  116. package/views/layers/LineOfSightLayerView.d.ts +2 -2
  117. package/views/layers/ViewshedLayerView.d.ts +2 -1
  118. package/views/support/ScheduledQueueProcessor.js +1 -1
  119. package/views/support/screenshotUtils.js +1 -1
  120. package/webscene/Slide.d.ts +1 -2
  121. package/widgets/Daylight/DaylightViewModel.js +1 -1
  122. package/widgets/DirectionalPad/VisibleElements.d.ts +5 -1
  123. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  124. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  125. package/widgets/OrientedImageryViewer.js +1 -1
  126. package/widgets/Search/SearchViewModel.js +1 -1
  127. package/widgets/Search/support/layerSearchUtils.js +1 -1
  128. package/widgets/Sketch/SketchViewModel.d.ts +61 -2
  129. package/widgets/Sketch/SketchViewModel.js +1 -1
  130. package/widgets/Sketch/support/PluginManager.js +1 -1
  131. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +3 -2
  132. package/widgets/TimeSlider.d.ts +5 -4
  133. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  134. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +3 -3
  135. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
  136. package/assets/esri/core/workers/chunks/0bd5012da287469b17d5.js +0 -1
  137. package/assets/esri/core/workers/chunks/0cb50bc2b2125c5fedf2.js +0 -1
  138. package/assets/esri/core/workers/chunks/112befb3b5b406f29298.js +0 -1
  139. package/assets/esri/core/workers/chunks/167b057ad50e6aef54de.js +0 -1
  140. package/assets/esri/core/workers/chunks/2d13a22f7b2427927fdc.js +0 -1
  141. package/assets/esri/core/workers/chunks/2f04b8679c9f15390517.js +0 -1
  142. package/assets/esri/core/workers/chunks/42045cf46497828cd3c0.js +0 -1
  143. package/assets/esri/core/workers/chunks/42fd2a7b22b03dacc6a7.js +0 -1
  144. package/assets/esri/core/workers/chunks/43cf862577bf37344ff4.js +0 -1
  145. package/assets/esri/core/workers/chunks/4be559c53fe5ac0d0d2e.js +0 -1
  146. package/assets/esri/core/workers/chunks/4e350d6c76957f5beb70.js +0 -1
  147. package/assets/esri/core/workers/chunks/4fe34da1c5d63e66ce98.js +0 -1
  148. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +0 -1
  149. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +0 -1
  150. package/assets/esri/core/workers/chunks/6da7229433105a69eb3f.js +0 -1
  151. package/assets/esri/core/workers/chunks/74c866e0b66e61751861.js +0 -1
  152. package/assets/esri/core/workers/chunks/830ab9b8d000169da675.js +0 -1
  153. package/assets/esri/core/workers/chunks/849879c8aed16315194c.js +0 -1
  154. package/assets/esri/core/workers/chunks/8ff23ac0abeea0073b47.js +0 -1
  155. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +0 -1
  156. package/assets/esri/core/workers/chunks/95dbbddac6581b9d671f.js +0 -1
  157. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +0 -1
  158. package/assets/esri/core/workers/chunks/aa1ac7954e4f0fefe15b.js +0 -1
  159. package/assets/esri/core/workers/chunks/b5df193c93e9c19f9700.js +0 -1
  160. package/assets/esri/core/workers/chunks/befa32b9e7b3fbdd431e.js +0 -1
  161. package/assets/esri/core/workers/chunks/c2c1f51a4668055c2838.js +0 -1
  162. package/assets/esri/core/workers/chunks/d0f5bee9db1ad51ae687.js +0 -1
  163. package/assets/esri/core/workers/chunks/d7429b58c90e015263ad.js +0 -1
  164. package/assets/esri/core/workers/chunks/d95d63e8d51244d71afb.js +0 -1
  165. package/assets/esri/core/workers/chunks/dfc81e66196c402f39b4.js +0 -29
  166. package/assets/esri/core/workers/chunks/dfd2dc5cdc97ffba8926.js +0 -1
  167. package/assets/esri/core/workers/chunks/e01fc1c31bc023dd0e33.js +0 -1
  168. package/assets/esri/core/workers/chunks/e1b7806ab3e1967b15f0.js +0 -1
  169. package/assets/esri/core/workers/chunks/e1f5d00878f27e1d413e.js +0 -1
  170. package/assets/esri/core/workers/chunks/ffbcb816b611049a6276.js +0 -1
@@ -57,28 +57,24 @@ export interface TemporalLayerProperties extends Partial<Pick<TemporalLayer, "us
57
57
  */
58
58
  timeExtent?: TimeExtentProperties | null;
59
59
  /**
60
- * TimeInfo provides information such as date fields that store
61
- * [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
62
- * and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
63
- * for each feature and the [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
64
- * for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
65
- * time of layer initialization if it is being set for a
66
- * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
67
- * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
68
- * [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/) or
69
- * [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
70
- * initialized from [client-side features](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#creating-a-featurelayer).
71
- * The [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
72
- * automatically calculated based on its `startField` and `endField` properties.
73
- * The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#load).
60
+ * Defines temporal information for a layer, such as [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField) and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField)
61
+ * date fields used to track when features remain visible, as well as the layer's [full time extent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent).
62
+ * If `timeInfo` is configured on the underlying service, it is automatically read and used by the layer.
74
63
  *
75
- * TimeInfo's [TimeInfo.startField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField) and [endField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
76
- * can be `date`, `date-only` or `timestamp-offset` [field type](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) for [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
77
- * and [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/).
64
+ * The `timeInfo` can be set or overridden on the following feature based layers in the layer constructor or at runtime: [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/),
65
+ * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [CatalogLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/), [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/), [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
66
+ * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
67
+ * [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), and [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/).
78
68
  *
79
- * @since 4.11
69
+ * When overriding a layer's `timeInfo`, ensure that `startField` and `endField` correspond to valid date fields in the layer's schema.
70
+ * To calculate a `fullTimeExtent` that covers all dates in the configured `startField` and `endField`, call
71
+ * [getTimeExtentFromLayers()](https://developers.arcgis.com/javascript/latest/references/core/support/timeUtils/#getTimeExtentFromLayers) method. Then assign the result to `layer.timeInfo.fullTimeExtent`.
72
+ *
73
+ * The `startField` and `endField` properties accept `date`, `date-only`, or `timestamp-offset` field types.
74
+ *
75
+ * @see [Samples using time-aware layers](https://developers.arcgis.com/javascript/latest/sample-code/?tagged=arcgis-time-bar)
80
76
  * @example
81
- * // create geojson layer from usgs earthquakes geojson feed
77
+ * // create geojson layer from USGS earthquakes GeoJSON feed
82
78
  * const geojsonLayer = new GeoJSONLayer({
83
79
  * url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
84
80
  * copyright: "USGS Earthquakes",
@@ -89,14 +85,28 @@ export interface TemporalLayerProperties extends Partial<Pick<TemporalLayer, "us
89
85
  * { "name": "depth", "type": "double" }
90
86
  * ],
91
87
  * // timeInfo can be used to do temporal queries
92
- * // set the startField and endField.
93
- * // timeExtent is automatically calculated from the
94
- * // the start and end date fields
95
- * // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
96
88
  * timeInfo: {
97
- * startField: "time"
89
+ * startField: "time",
90
+ * fullTimeExtent: {
91
+ * start: new Date(1970, 0, 1),
92
+ * end: new Date(2000, 11, 31)
93
+ * },
94
+ * timeZone: "UTC"
98
95
  * }
99
96
  * });
97
+ * @example
98
+ * // update layer's timeInfo at runtime after the feature layer is loaded
99
+ * featureLayer.timeInfo = {
100
+ * startField: "DateField",
101
+ * timeZone: "UTC"
102
+ * };
103
+ *
104
+ * // calculate the fullTimeExtent based on startField
105
+ * const fullTimeExtent = getTimeExtentFromLayers([featureLayer]);
106
+ * featureLayer.timeInfo.fullTimeExtent = fullTimeExtent;
107
+ * @example
108
+ * // set layer's timeInfo to null
109
+ * layer.timeInfo = null;
100
110
  */
101
111
  timeInfo?: TimeInfoProperties | null;
102
112
  /**
@@ -107,6 +117,7 @@ export interface TemporalLayerProperties extends Partial<Pick<TemporalLayer, "us
107
117
  * A time offset can be used for display purposes only. The query and selection are not affected by the offset.
108
118
  *
109
119
  * @since 4.14
120
+ * @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
110
121
  * @example
111
122
  * // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
112
123
  * let layer = new CSVLayer({
@@ -195,28 +206,24 @@ export abstract class TemporalLayer {
195
206
  get timeExtent(): TimeExtent | null | undefined;
196
207
  set timeExtent(value: TimeExtentProperties | null | undefined);
197
208
  /**
198
- * TimeInfo provides information such as date fields that store
199
- * [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
200
- * and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
201
- * for each feature and the [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
202
- * for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
203
- * time of layer initialization if it is being set for a
204
- * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
205
- * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
206
- * [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/) or
207
- * [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
208
- * initialized from [client-side features](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#creating-a-featurelayer).
209
- * The [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
210
- * automatically calculated based on its `startField` and `endField` properties.
211
- * The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#load).
209
+ * Defines temporal information for a layer, such as [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField) and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField)
210
+ * date fields used to track when features remain visible, as well as the layer's [full time extent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent).
211
+ * If `timeInfo` is configured on the underlying service, it is automatically read and used by the layer.
212
212
  *
213
- * TimeInfo's [TimeInfo.startField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField) and [endField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
214
- * can be `date`, `date-only` or `timestamp-offset` [field type](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) for [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
215
- * and [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/).
213
+ * The `timeInfo` can be set or overridden on the following feature based layers in the layer constructor or at runtime: [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/),
214
+ * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [CatalogLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/), [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/), [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
215
+ * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
216
+ * [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), and [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/).
216
217
  *
217
- * @since 4.11
218
+ * When overriding a layer's `timeInfo`, ensure that `startField` and `endField` correspond to valid date fields in the layer's schema.
219
+ * To calculate a `fullTimeExtent` that covers all dates in the configured `startField` and `endField`, call
220
+ * [getTimeExtentFromLayers()](https://developers.arcgis.com/javascript/latest/references/core/support/timeUtils/#getTimeExtentFromLayers) method. Then assign the result to `layer.timeInfo.fullTimeExtent`.
221
+ *
222
+ * The `startField` and `endField` properties accept `date`, `date-only`, or `timestamp-offset` field types.
223
+ *
224
+ * @see [Samples using time-aware layers](https://developers.arcgis.com/javascript/latest/sample-code/?tagged=arcgis-time-bar)
218
225
  * @example
219
- * // create geojson layer from usgs earthquakes geojson feed
226
+ * // create geojson layer from USGS earthquakes GeoJSON feed
220
227
  * const geojsonLayer = new GeoJSONLayer({
221
228
  * url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
222
229
  * copyright: "USGS Earthquakes",
@@ -227,14 +234,28 @@ export abstract class TemporalLayer {
227
234
  * { "name": "depth", "type": "double" }
228
235
  * ],
229
236
  * // timeInfo can be used to do temporal queries
230
- * // set the startField and endField.
231
- * // timeExtent is automatically calculated from the
232
- * // the start and end date fields
233
- * // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
234
237
  * timeInfo: {
235
- * startField: "time"
238
+ * startField: "time",
239
+ * fullTimeExtent: {
240
+ * start: new Date(1970, 0, 1),
241
+ * end: new Date(2000, 11, 31)
242
+ * },
243
+ * timeZone: "UTC"
236
244
  * }
237
245
  * });
246
+ * @example
247
+ * // update layer's timeInfo at runtime after the feature layer is loaded
248
+ * featureLayer.timeInfo = {
249
+ * startField: "DateField",
250
+ * timeZone: "UTC"
251
+ * };
252
+ *
253
+ * // calculate the fullTimeExtent based on startField
254
+ * const fullTimeExtent = getTimeExtentFromLayers([featureLayer]);
255
+ * featureLayer.timeInfo.fullTimeExtent = fullTimeExtent;
256
+ * @example
257
+ * // set layer's timeInfo to null
258
+ * layer.timeInfo = null;
238
259
  */
239
260
  get timeInfo(): TimeInfo | null | undefined;
240
261
  set timeInfo(value: TimeInfoProperties | null | undefined);
@@ -246,6 +267,7 @@ export abstract class TemporalLayer {
246
267
  * A time offset can be used for display purposes only. The query and selection are not affected by the offset.
247
268
  *
248
269
  * @since 4.14
270
+ * @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
249
271
  * @example
250
272
  * // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
251
273
  * let layer = new CSVLayer({
@@ -4,7 +4,6 @@ import type SpatialReference from "../../geometry/SpatialReference.js";
4
4
  import type DimensionalDefinition from "../support/DimensionalDefinition.js";
5
5
  import type MultidimensionalSubset from "../support/MultidimensionalSubset.js";
6
6
  import type RasterInfo from "../support/RasterInfo.js";
7
- import type TimeInfo from "../support/TimeInfo.js";
8
7
  import type ImageSampleParameters from "../../rest/support/ImageSampleParameters.js";
9
8
  import type ImageSampleResult from "../../rest/support/ImageSampleResult.js";
10
9
  import type TimeExtent from "../../time/TimeExtent.js";
@@ -273,16 +272,6 @@ export abstract class TiledImagery {
273
272
  * });
274
273
  */
275
274
  abstract accessor timeExtent: TimeExtent | null | undefined;
276
- /**
277
- * TimeInfo provides information such as date fields that store
278
- * [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
279
- * and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
280
- * for each feature and the [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
281
- * for the layer.
282
- *
283
- * @since 4.22
284
- */
285
- abstract accessor timeInfo: TimeInfo | null | undefined;
286
275
  /**
287
276
  * A temporary offset of the time data based on a certain [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/). This allows
288
277
  * users to overlay features from two or more time-aware layers with different time extents.
@@ -20,11 +20,20 @@ export interface LabelClassProperties extends Partial<Pick<LabelClass, "allowOve
20
20
  * property. If `true`, then [labelExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/support/LabelClass/#labelExpression) or labelExpressionInfo can be used.
21
21
  * If `false`, then only labelExpression can be used.
22
22
  *
23
+ * This property supports [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html) if
24
+ * the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it. See the [Labeling guide](https://developers.arcgis.com/javascript/latest/labeling/#formatting-tags)
25
+ * for more details.
26
+ *
23
27
  * @see [Arcade Labeling Profile](https://developers.arcgis.com/javascript/latest/arcade/#labeling)
24
28
  * @example
25
29
  * // For Spokane County, WA, label will display: "Spokane County, Washington"
26
30
  * labelClass.labelExpressionInfo = {
27
- * expression: "$feature.COUNTY_NAME + ' County, ' + $feature.STATE_NAME"
31
+ * expression: "$feature.COUNTY_NAME + ' County, ' + $feature.STATE_NAME",
32
+ * };
33
+ * @example
34
+ * // For Spokane County, WA, label will display: "Spokane County, Washington" where "Washington" is bold and underlined
35
+ * labelClass.labelExpressionInfo = {
36
+ * expression: "return `${$feature.COUNTY_NAME} County, <BOL><UND>${$feature.STATE_NAME}</UND></BOL>`",
28
37
  * };
29
38
  */
30
39
  labelExpressionInfo?: LabelExpressionInfoProperties | null;
@@ -230,11 +239,20 @@ export default class LabelClass extends JSONSupport {
230
239
  * property. If `true`, then [labelExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/support/LabelClass/#labelExpression) or labelExpressionInfo can be used.
231
240
  * If `false`, then only labelExpression can be used.
232
241
  *
242
+ * This property supports [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html) if
243
+ * the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it. See the [Labeling guide](https://developers.arcgis.com/javascript/latest/labeling/#formatting-tags)
244
+ * for more details.
245
+ *
233
246
  * @see [Arcade Labeling Profile](https://developers.arcgis.com/javascript/latest/arcade/#labeling)
234
247
  * @example
235
248
  * // For Spokane County, WA, label will display: "Spokane County, Washington"
236
249
  * labelClass.labelExpressionInfo = {
237
- * expression: "$feature.COUNTY_NAME + ' County, ' + $feature.STATE_NAME"
250
+ * expression: "$feature.COUNTY_NAME + ' County, ' + $feature.STATE_NAME",
251
+ * };
252
+ * @example
253
+ * // For Spokane County, WA, label will display: "Spokane County, Washington" where "Washington" is bold and underlined
254
+ * labelClass.labelExpressionInfo = {
255
+ * expression: "return `${$feature.COUNTY_NAME} County, <BOL><UND>${$feature.STATE_NAME}</UND></BOL>`",
238
256
  * };
239
257
  */
240
258
  get labelExpressionInfo(): LabelExpressionInfo | null | undefined;
@@ -245,6 +245,19 @@ export interface SublayerProperties extends LoadableMixinProperties, Identifiabl
245
245
  * }
246
246
  * }]
247
247
  * });
248
+ * @example
249
+ * ```js
250
+ * const layer = new MapImageLayer({
251
+ * url: "<your-map-service-url>",
252
+ * sublayers: [{
253
+ * source: {
254
+ * type: "workspace-layer",
255
+ * workspaceId: "lyrx_folder",
256
+ * layerId: "WorldCities.lyrx"
257
+ * }
258
+ * }]
259
+ * });
260
+ * ```
248
261
  */
249
262
  source?: (DynamicMapLayerProperties & { type: "map-layer" }) | (DynamicDataLayerProperties & { type: "data-layer" }) | (DynamicWorkspaceLayerProperties & { type: "workspace-layer" });
250
263
  /**
@@ -295,8 +308,9 @@ export interface SublayerProperties extends LoadableMixinProperties, Identifiabl
295
308
  * ## Dynamic layers
296
309
  *
297
310
  * Sublayers may be rendered on the fly as dynamic layers. Dynamic layers are created using
298
- * the [source](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#source) property of the sublayer. There are two types of dynamic layers:
299
- * [dynamic map layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicMapLayer/) and [dynamic data layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicDataLayer/).
311
+ * the [source](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#source) property of the sublayer. There are three types of dynamic layers:
312
+ * [dynamic map layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicMapLayer/), [dynamic data layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicDataLayer/), and
313
+ * [dynamic workspace layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicWorkspaceLayer/).
300
314
  *
301
315
  * [Dynamic map layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicMapLayer/) allow you to override sublayers in the map service with new renderers,
302
316
  * definition expressions, opacity, scale visibility, etc. Multiple dynamic map layers may exist
@@ -309,6 +323,9 @@ export interface SublayerProperties extends LoadableMixinProperties, Identifiabl
309
323
  * published and configured with the ArcGIS Server Manager. Data from tables may be joined to other
310
324
  * tables or dynamic map layers.
311
325
  *
326
+ * [Dynamic workspace layers](https://developers.arcgis.com/javascript/latest/references/core/rest/layerSources/DynamicWorkspaceLayer/) let you create sublayers from pre-authored
327
+ * ArcGIS Pro layer files (`.lyrx`) in registered workspaces.
328
+ *
312
329
  * @since 4.1
313
330
  * @see [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/)
314
331
  * @see [Sample - MapImageLayer: toggle sublayer visibility](https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-sublayers/)
@@ -888,6 +905,19 @@ export default class Sublayer extends SublayerSuperclass {
888
905
  * }
889
906
  * }]
890
907
  * });
908
+ * @example
909
+ * ```js
910
+ * const layer = new MapImageLayer({
911
+ * url: "<your-map-service-url>",
912
+ * sublayers: [{
913
+ * source: {
914
+ * type: "workspace-layer",
915
+ * workspaceId: "lyrx_folder",
916
+ * layerId: "WorldCities.lyrx"
917
+ * }
918
+ * }]
919
+ * });
920
+ * ```
891
921
  */
892
922
  get source(): DynamicMapLayer | DynamicDataLayer | DynamicWorkspaceLayer;
893
923
  set source(value: (DynamicMapLayerProperties & { type: "map-layer" }) | (DynamicDataLayerProperties & { type: "data-layer" }) | (DynamicWorkspaceLayerProperties & { type: "workspace-layer" }));
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{isMultiOriginJSONMixin as n}from"../../core/multiOriginJSONSupportUtils.js";import{sqlAnd as r,sqlName as i,sqlLiteral as a}from"../../core/sql.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{timeExtentToQueryParameter as c}from"../../rest/support/timeUtils.js";function l(e,t,n,r){let o=r.get(e)?.type,s=r.getTimeZone(e);return`${i(e)} ${t} ${a(n,{type:`date`},{type:o,timeZone:s})}`}let u=class extends t{constructor(e){super(e),this.fieldsIndex=null,this.layer=null}getExpression(e){let{layer:t}=this;if(!t)return;if(!n(t))return{type:`where`,value:this._getLayerCondition(e)};let r=t.timeInfo,i=t.getAtOrigin(`timeInfo`,`service`);if(i)return r?r===i||(r.startField===i.startField||!r.startField&&!i.startField)&&(r.endField===i.endField||!r.endField&&!i.endField)?{type:`time`,value:c(e)}:{type:`where`,value:this._getLayerCondition(e)}:void 0;if(r)return{type:`where`,value:this._getLayerCondition(e)}}_getLayerCondition(e){let{fieldsIndex:t,layer:n}=this;if(!t||!n)return;let{timeInfo:i}=n;if(!i)return;let{startField:a,endField:o}=i,{start:s,end:c}=e;if(!s&&!c||!a&&!o)return;let u=a??o,d=o??a;if(u&&d){if(s&&c){if(s.getTime()===c.getTime())return l(u,`==`,s,t);if(!a||!o){let e=l(u,`>=`,s,t),n=l(u,`<=`,c,t);return r(e,n)}let e=l(a,`>=`,s,t),n=l(o,`<=`,c,t);return r(e,n)}if(s)return l(u,`>=`,s,t);if(c)return l(d,`<=`,c,t)}}};e([o({constructOnly:!0})],u.prototype,`fieldsIndex`,void 0),e([o({constructOnly:!0})],u.prototype,`layer`,void 0),u=e([s(`esri.layers.support.TimeInformation`)],u);export{u as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.162",
3
+ "version": "5.2.0-next.164",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.162",
23
+ "@arcgis/toolkit": "5.2.0-next.164",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0",
26
26
  "@vaadin/grid": "~25.3.2",
@@ -36,6 +36,7 @@
36
36
  * }
37
37
  * ```
38
38
  *
39
+ * @deprecated at 5.2. Use individual content imports instead.
39
40
  * @since 4.11
40
41
  * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
41
42
  * @see [TextContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/)
@@ -58,98 +59,134 @@ import type UtilityNetworkAssociationsContentClass from "./content/UtilityNetwor
58
59
  /**
59
60
  * AttachmentsContent represents an attachment element associated with a
60
61
  * feature.
62
+ *
63
+ * @deprecated at 5.2. Import [AttachmentsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/AttachmentsContent/) directly instead.
61
64
  */
62
65
  export type AttachmentsContent = AttachmentsContentClass;
63
66
 
64
67
  /**
65
68
  * AttachmentsContent represents an attachment element associated with a
66
69
  * feature.
70
+ *
71
+ * @deprecated at 5.2. Import [AttachmentsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/AttachmentsContent/) directly instead.
67
72
  */
68
73
  export const AttachmentsContent: typeof AttachmentsContentClass;
69
74
 
70
75
  /**
71
76
  * CustomContent represents a custom content element associated with a
72
77
  * feature.
78
+ *
79
+ * @deprecated at 5.2. Import [CustomContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/CustomContent/) directly instead.
73
80
  */
74
81
  export type CustomContent = CustomContentClass;
75
82
 
76
83
  /**
77
84
  * CustomContent represents a custom content element associated with a
78
85
  * feature.
86
+ *
87
+ * @deprecated at 5.2. Import [CustomContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/CustomContent/) directly instead.
79
88
  */
80
89
  export const CustomContent: typeof CustomContentClass;
81
90
 
82
91
  /**
83
92
  * ExpressionContent represents an expression element associated with a
84
93
  * feature.
94
+ *
95
+ * @deprecated at 5.2. Import [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) directly instead.
85
96
  */
86
97
  export type ExpressionContent = ExpressionContentClass;
87
98
 
88
99
  /**
89
100
  * ExpressionContent represents an expression element associated with a
90
101
  * feature.
102
+ *
103
+ * @deprecated at 5.2. Import [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) directly instead.
91
104
  */
92
105
  export const ExpressionContent: typeof ExpressionContentClass;
93
106
 
94
107
  /**
95
108
  * FieldsContent represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) associated with a
96
109
  * feature.
110
+ *
111
+ * @deprecated at 5.2. Import [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/) directly instead.
97
112
  */
98
113
  export type FieldsContent = FieldsContentClass;
99
114
 
100
115
  /**
101
116
  * FieldsContent represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) associated with a
102
117
  * feature.
118
+ *
119
+ * @deprecated at 5.2. Import [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/) directly instead.
103
120
  */
104
121
  export const FieldsContent: typeof FieldsContentClass;
105
122
 
106
123
  /**
107
124
  * MediaContent contains an individual or array of chart and/or image media elements
108
125
  * to display within a popup's content.
126
+ *
127
+ * @deprecated at 5.2. Import [MediaContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/) directly instead.
109
128
  */
110
129
  export type MediaContent = MediaContentClass;
111
130
 
112
131
  /**
113
132
  * MediaContent contains an individual or array of chart and/or image media elements
114
133
  * to display within a popup's content.
134
+ *
135
+ * @deprecated at 5.2. Import [MediaContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/) directly instead.
115
136
  */
116
137
  export const MediaContent: typeof MediaContentClass;
117
138
 
118
139
  /**
119
140
  * RelationshipContent represents a relationship element associated with a
120
141
  * feature.
142
+ *
143
+ * @deprecated at 5.2. Import [RelationshipContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/RelationshipContent/) directly instead.
121
144
  */
122
145
  export type RelationshipContent = RelationshipContentClass;
123
146
 
124
147
  /**
125
148
  * RelationshipContent represents a relationship element associated with a
126
149
  * feature.
150
+ *
151
+ * @deprecated at 5.2. Import [RelationshipContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/RelationshipContent/) directly instead.
127
152
  */
128
153
  export const RelationshipContent: typeof RelationshipContentClass;
129
154
 
130
155
  /**
131
156
  * TextContent defines descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
132
157
  * content.
158
+ *
159
+ * @deprecated at 5.2. Import [TextContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/) directly instead.
133
160
  */
134
161
  export type TextContent = TextContentClass;
135
162
 
136
163
  /**
137
164
  * TextContent defines descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
138
165
  * content.
166
+ *
167
+ * @deprecated at 5.2. Import [TextContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/) directly instead.
139
168
  */
140
169
  export const TextContent: typeof TextContentClass;
141
170
 
142
171
  /**
143
172
  * UtilityNetworkAssociationsContent represents an utility network associations element associated with a
144
173
  * feature.
174
+ *
175
+ * @deprecated at 5.2. Import [UtilityNetworkAssociationsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/UtilityNetworkAssociationsContent/) directly instead.
145
176
  */
146
177
  export type UtilityNetworkAssociationsContent = UtilityNetworkAssociationsContentClass;
147
178
 
148
179
  /**
149
180
  * UtilityNetworkAssociationsContent represents an utility network associations element associated with a
150
181
  * feature.
182
+ *
183
+ * @deprecated at 5.2. Import [UtilityNetworkAssociationsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/UtilityNetworkAssociationsContent/) directly instead.
151
184
  */
152
185
  export const UtilityNetworkAssociationsContent: typeof UtilityNetworkAssociationsContentClass;
153
186
 
154
- /** Popup content element types. */
187
+ /**
188
+ * Popup content element types.
189
+ *
190
+ * @deprecated at 5.2. Use individual content imports instead.
191
+ */
155
192
  export type Content = AttachmentsContent | FieldsContent | MediaContent | TextContent | CustomContent | ExpressionContent | RelationshipContent | UtilityNetworkAssociationsContent;
package/popup/content.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./content/AttachmentsContent.js";import t from"./content/Content.js";import n from"./content/CustomContent.js";import r from"./content/ExpressionContent.js";import i from"./content/FieldsContent.js";import a from"./content/MediaContent.js";import o from"./content/RelationshipContent.js";import s from"./content/TextContent.js";import c from"./content/UtilityNetworkAssociationsContent.js";const l=e,u=t,d=n,f=r,p=i,m=a,h=o,g=s,_=c;function v(e){return e instanceof u}const y={base:null,key:`type`,typeMap:{attachment:l,media:m,text:g,expression:f,field:p,relationship:h,utilityNetworkAssociations:_}},b={base:null,key:`type`,typeMap:{attachment:l,media:m,text:g,expression:f,field:p,relationship:h}};export{l as AttachmentsContent,u as BaseContent,d as CustomContent,f as ExpressionContent,p as FieldsContent,m as MediaContent,h as RelationshipContent,g as TextContent,_ as UtilityNetworkAssociationsContent,v as isContent,y as persistableTypes,b as persistableWebSceneTypes};
2
+ import{deprecatedModule as e}from"../core/deprecate.js";import t from"../core/Logger.js";import n from"./content/AttachmentsContent.js";import r from"./content/Content.js";import i from"./content/CustomContent.js";import a from"./content/ExpressionContent.js";import o from"./content/FieldsContent.js";import s from"./content/MediaContent.js";import c from"./content/RelationshipContent.js";import l from"./content/TextContent.js";import u from"./content/UtilityNetworkAssociationsContent.js";e(t.getLogger(`esri.popup.content`),`esri.popup.content`,{replacement:`Individual content module imports`,version:`5.2`,warnOnce:!0});const d=n,f=r,p=i,m=a,h=o,g=s,_=c,v=l,y=u;function b(e){return e instanceof f}const x={base:null,key:`type`,typeMap:{attachment:d,media:g,text:v,expression:m,field:h,relationship:_,utilityNetworkAssociations:y}},S={base:null,key:`type`,typeMap:{attachment:d,media:g,text:v,expression:m,field:h,relationship:_}};export{d as AttachmentsContent,f as BaseContent,p as CustomContent,m as ExpressionContent,h as FieldsContent,g as MediaContent,_ as RelationshipContent,v as TextContent,y as UtilityNetworkAssociationsContent,b as isContent,x as persistableTypes,S as persistableWebSceneTypes};
@@ -4,21 +4,24 @@ import type { JSONSupport } from "../../core/JSONSupport.js";
4
4
  export interface DynamicWorkspaceLayerProperties extends Partial<Pick<DynamicWorkspaceLayer, "definitionExpression" | "layerId" | "workspaceId">> {}
5
5
 
6
6
  /**
7
- * A dynamic workspace layer refers to a pre-authored Layer File (.lyrx) created from ArcGIS Pro.
8
- * These files reside in a registered folder. It allows you to dynamically use a pre-authored layer,
9
- * with an advanced renderer and cartographically enriched symbols that are not supported by map service's REST API specifications,
10
- * to a map service operation on a per request basis.
7
+ * A dynamic workspace layer references a pre-authored ArcGIS Pro layer file (`.lyrx`) stored in a registered folder.
8
+ * It allows a map service to use the layer's advanced renderer and cartographically enriched symbols, including
9
+ * symbols that are not supported by the map service's REST API specifications.
10
+ *
11
+ * Use it as the [source](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#source) of a sublayer in a [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/), or as the
12
+ * [dynamic data source](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#dynamicDataSource) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/).
11
13
  *
12
14
  * > [!WARNING]
13
15
  * >
14
16
  * > **Known Limitations**
15
17
  * >
16
- * > [Sublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/) with a `DynamicWorkspaceLayer` source cannot be [saved](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#save) to web maps.
18
+ * > [Sublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/) and [FeatureLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) with a `DynamicWorkspaceLayer` source cannot be persisted to web maps, web scenes, link charts, or portal items.
17
19
  *
18
20
  * @since 5.2
19
21
  * @see [ArcGIS REST API - Layer source object](https://developers.arcgis.com/rest/services-reference/enterprise/layer-source-object/#dynamic-workspace-layer)
20
22
  * @see [ArcGIS Server - Enabling dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/windows/about-dynamic-layers.htm#GUID-C302852F-9E23-44C6-A71E-09E95EAF0E49)
21
23
  * @example
24
+ * ```js
22
25
  * const sublayer = new Sublayer({
23
26
  * source: new DynamicWorkspaceLayer({
24
27
  * workspaceId: "lyrx_folder",
@@ -27,9 +30,10 @@ export interface DynamicWorkspaceLayerProperties extends Partial<Pick<DynamicWor
27
30
  * });
28
31
  *
29
32
  * const layer = new MapImageLayer({
30
- * url: "<your-map-service-url>"
33
+ * url: "<your-map-service-url>",
31
34
  * sublayers: [sublayer]
32
35
  * });
36
+ * ```
33
37
  */
34
38
  export default class DynamicWorkspaceLayer extends DynamicWorkspaceLayerSuperclass {
35
39
  constructor(properties?: DynamicWorkspaceLayerProperties);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getJsonType as e}from"../../../geometry/support/jsonTypeUtils.js";import{srToRESTValue as t}from"../../../geometry/support/spatialReferenceUtils.js";function n(e,t){if(t&&e.type===`extent`)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&e.type===`point`)return`${e.x},${e.y}`;let n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}function r(r,i,a){let{geometry:o}=r,s=r.compactGeometryEnabled??!1,c=r.toJSON();delete c.compactGeometryEnabled,delete c.defaultSpatialReferenceEnabled;let l=c,u,d,f;if(o&&(d=o.spatialReference,f=t(d),l.geometryType=e(o),l.geometry=n(o,s),l.inSR=f),c.groupByFieldsForStatistics&&(l.groupByFieldsForStatistics=c.groupByFieldsForStatistics.join(`,`)),c.objectIds)switch(a?.uniqueIdFields?.length){case void 0:l.objectIds=c.objectIds.join(`,`);break;case 1:l.uniqueIds=JSON.stringify(c.objectIds),delete l.objectIds;break;default:l.uniqueIds=JSON.stringify(c.objectIds.map(e=>JSON.parse(e))),delete l.objectIds}if(c.orderByFields&&(l.orderByFields=c.orderByFields.join(`,`)),c.outFields&&(c.returnDistinctValues||!(i?.returnCountOnly||i?.returnExtentOnly||i?.returnIdsOnly))?l.outFields=c.outFields.includes(`*`)?`*`:c.outFields.join(`,`):delete l.outFields,c.outSR?(l.outSR=t(c.outSR),u=r.outSpatialReference):o&&(c.returnGeometry||c.returnCentroid)&&(l.outSR=l.inSR,u=d),c.returnGeometry&&delete c.returnGeometry,c.outStatistics&&(l.outStatistics=JSON.stringify(c.outStatistics)),c.outDistance&&(l.outDistance=JSON.stringify(c.outDistance)),c.fullText&&(l.fullText=JSON.stringify(c.fullText)),c.pixelSize&&(l.pixelSize=JSON.stringify(c.pixelSize)),c.quantizationParameters&&(r.defaultSpatialReferenceEnabled&&d!=null&&r.quantizationParameters?.extent!=null&&d.equals(r.quantizationParameters.extent.spatialReference)&&delete c.quantizationParameters.extent.spatialReference,l.quantizationParameters=JSON.stringify(c.quantizationParameters)),c.parameterValues&&(l.parameterValues=JSON.stringify(c.parameterValues)),c.rangeValues&&(l.rangeValues=JSON.stringify(c.rangeValues)),c.dynamicDataSource){if(`definitionExpression`in c.dynamicDataSource&&c.dynamicDataSource.definitionExpression){let{definitionExpression:e,...t}=c.dynamicDataSource;l.layer=JSON.stringify({query:e,source:t})}else l.layer=JSON.stringify({source:c.dynamicDataSource});delete c.dynamicDataSource}if(c.timeExtent){let{start:e,end:t}=c.timeExtent;(e!=null||t!=null)&&(l.time=e===t?e:`${e??`null`},${t??`null`}`),delete c.timeExtent}return r.defaultSpatialReferenceEnabled&&d!=null&&u!=null&&d.equals(u)&&(l.defaultSR=l.inSR,delete l.inSR,delete l.outSR),l}const i=`json`;export{n as encodeGeometry,r as queryLikeToQueryStringParameters,i as safeExtentResultFormat};
2
+ import{sqlAnd as e}from"../../../core/sql.js";import{getJsonType as t}from"../../../geometry/support/jsonTypeUtils.js";import{srToRESTValue as n}from"../../../geometry/support/spatialReferenceUtils.js";import{timeExtentToQueryParameter as r}from"../../support/timeUtils.js";function i(e,t){if(t&&e.type===`extent`)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&e.type===`point`)return`${e.x},${e.y}`;let n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}function a(a,o,s){let{geometry:c}=a,l=a.compactGeometryEnabled??!1,u=a.toJSON();delete u.compactGeometryEnabled,delete u.defaultSpatialReferenceEnabled;let d=u,f,p,m;if(c&&(p=c.spatialReference,m=n(p),d.geometryType=t(c),d.geometry=i(c,l),d.inSR=m),u.groupByFieldsForStatistics&&(d.groupByFieldsForStatistics=u.groupByFieldsForStatistics.join(`,`)),u.objectIds)switch(s?.uniqueIdFields?.length){case void 0:d.objectIds=u.objectIds.join(`,`);break;case 1:d.uniqueIds=JSON.stringify(u.objectIds),delete d.objectIds;break;default:d.uniqueIds=JSON.stringify(u.objectIds.map(e=>JSON.parse(e))),delete d.objectIds}if(u.orderByFields&&(d.orderByFields=u.orderByFields.join(`,`)),u.outFields&&(u.returnDistinctValues||!(o?.returnCountOnly||o?.returnExtentOnly||o?.returnIdsOnly))?d.outFields=u.outFields.includes(`*`)?`*`:u.outFields.join(`,`):delete d.outFields,u.outSR?(d.outSR=n(u.outSR),f=a.outSpatialReference):c&&(u.returnGeometry||u.returnCentroid)&&(d.outSR=d.inSR,f=p),u.returnGeometry&&delete u.returnGeometry,u.outStatistics&&(d.outStatistics=JSON.stringify(u.outStatistics)),u.outDistance&&(d.outDistance=JSON.stringify(u.outDistance)),u.fullText&&(d.fullText=JSON.stringify(u.fullText)),u.pixelSize&&(d.pixelSize=JSON.stringify(u.pixelSize)),u.quantizationParameters&&(a.defaultSpatialReferenceEnabled&&p!=null&&a.quantizationParameters?.extent!=null&&p.equals(a.quantizationParameters.extent.spatialReference)&&delete u.quantizationParameters.extent.spatialReference,d.quantizationParameters=JSON.stringify(u.quantizationParameters)),u.parameterValues&&(d.parameterValues=JSON.stringify(u.parameterValues)),u.rangeValues&&(d.rangeValues=JSON.stringify(u.rangeValues)),u.dynamicDataSource){if(`definitionExpression`in u.dynamicDataSource&&u.dynamicDataSource.definitionExpression){let{definitionExpression:e,...t}=u.dynamicDataSource;d.layer=JSON.stringify({query:e,source:t})}else d.layer=JSON.stringify({source:u.dynamicDataSource});delete u.dynamicDataSource}if(a.timeExtent){let t=s?.timeInformation;if(t){let n=t.getExpression(a.timeExtent);switch(n?.type){case`time`:d.time=n.value;break;case`where`:n.value&&(d.where=e(d.where,n.value))}}else d.time=r(a.timeExtent);delete u.timeExtent}return a.defaultSpatialReferenceEnabled&&p!=null&&f!=null&&p.equals(f)&&(d.defaultSR=d.inSR,delete d.inSR,delete d.outSR),d}const o=`json`;export{i as encodeGeometry,a as queryLikeToQueryStringParameters,o as safeExtentResultFormat};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ function e(e){let{start:t,end:n}=e;if(t||n){if(!t&&n)return`null,${n.getTime()}`;if(!n&&t)return`${t.getTime()},null`;if(n&&t)return t.getTime()===n.getTime()?`${t.getTime()}`:`${t.getTime()},${n.getTime()}`}}export{e as timeExtentToQueryParameter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{substitute as e}from"../../../intl/substitute.js";import{numericTypes as t}from"../../../layers/support/fieldUtils.js";import{TextContent as n}from"../../../popup/content.js";import r from"../../../popup/ExpressionInfo.js";import i from"../../../popup/FieldInfo.js";import a from"../../../popup/support/FieldInfoFormat.js";import{getFieldAndExpressionInfos as o,getContentFromFieldInfos as s}from"./utils.js";import{getStatisticInfos as c,getClusterField as l,getPredominantTypeExpression as u,clusterCountField as d}from"../../support/clusterUtils.js";import{isClusterCompatibleRenderer as f}from"../../../views/2d/layers/support/clusterUtils.js";function p(e){let{fieldName:n,label:r,type:o}=e,s=o!=null&&t.includes(o),c=new i({fieldName:n,label:r,visible:!0,format:s?new a({places:o===`integer`||o===`small-integer`?0:2,digitSeparator:!0}):void 0});return o===`date`&&(c.format=new a({dateFormat:`short-date-short-time`})),c}function m(e,t){let n=e?t.getField(e):null;return n==null?void 0:n.alias||n.name}function h(t,n,r){let{attributeInfo:i,statisticType:a}=n,{field:o,normalizationField:s}=i,c=``,l;if(a===`avg`?l=s?r.clusters.avgNormFieldLabel:r.clusters.avgFieldLabel:a===`type`&&(l=r.clusters.predominantFieldLabel),l){let n=i.valueExpression?i.valueExpressionTitle:m(o,t),r=s&&m(s,t);c=e(l,{fieldLabel:n||``,normFieldLabel:r||``})}return c}function g(t,n,r,i){let{attributeInfo:a,statisticType:o}=n,{field:s,normalizationField:c}=a,l=``,u;if(o===`avg`?u=c?i.clusters.avgNormFieldSummary:i.clusters.avgFieldSummary:o===`type`&&(u=i.clusters.predominantFieldSummary),u){let n=a.valueExpression?a.valueExpressionTitle:m(s,t),i=c&&m(c,t);l=e(u,{fieldLabel:n||``,normFieldLabel:i||``,fieldValue:`{`+r+`}`})}return l}function _(t){return{fieldInfo:p({fieldName:d,label:t.clusters.numFeatures,type:`integer`}),fieldSummary:new n({text:e(t.clusters.countSummary,{count:`{${d}}`})})}}async function v(e,t,i){if(!f(t))return null;let a=c(e,t),o=i.clusters.predominantNoneValue,s=t.type===`unique-value`?t.uniqueValueInfos??[]:[],{fieldInfo:d,fieldSummary:m}=_(i),v=[m],y=[d],b=[];for(let t of a){let{statisticType:a,attributeInfo:c}=t,d=l(c,a),f=h(e,t,i);if(a===`avg`)v.push(new n({text:g(e,t,d,i)})),y.push(p({fieldName:d,label:f,type:`double`}));else if(a===`type`){let a=`expression/${d}`;v.push(new n({text:g(e,t,a,i)})),b.push(new r({name:d,title:f,returnType:`string`,expression:u(s,d,o)})),y.push(p({fieldName:a}))}}return{fieldInfos:y,expressionInfos:b,content:v}}async function y(e,t,n){if(!f(t))return null;let{fieldInfo:r,fieldSummary:i}=_(n),a=[i],c=[r],l=[],{fieldInfos:u,expressionInfos:d}=await o({renderer:t,layer:e,isFeatureReduction:!0}),p=await s(e,{fieldInfos:u,expressionInfos:d},!0);return a.push(...p),c.push(...u),l.push(...d),{fieldInfos:c,expressionInfos:l,content:a}}export{v as getContentAndInfos,y as getContentAndInfosForPieChart};
2
+ import{substitute as e}from"../../../intl/substitute.js";import{numericTypes as t}from"../../../layers/support/fieldUtils.js";import n from"../../../popup/ExpressionInfo.js";import r from"../../../popup/FieldInfo.js";import i from"../../../popup/content/TextContent.js";import a from"../../../popup/support/FieldInfoFormat.js";import{getFieldAndExpressionInfos as o,getContentFromFieldInfos as s}from"./utils.js";import{getStatisticInfos as c,getClusterField as l,getPredominantTypeExpression as u,clusterCountField as d}from"../../support/clusterUtils.js";import{isClusterCompatibleRenderer as f}from"../../../views/2d/layers/support/clusterUtils.js";function p(e){let{fieldName:n,label:i,type:o}=e,s=o!=null&&t.includes(o),c=new r({fieldName:n,label:i,visible:!0,format:s?new a({places:o===`integer`||o===`small-integer`?0:2,digitSeparator:!0}):void 0});return o===`date`&&(c.format=new a({dateFormat:`short-date-short-time`})),c}function m(e,t){let n=e?t.getField(e):null;return n==null?void 0:n.alias||n.name}function h(t,n,r){let{attributeInfo:i,statisticType:a}=n,{field:o,normalizationField:s}=i,c=``,l;if(a===`avg`?l=s?r.clusters.avgNormFieldLabel:r.clusters.avgFieldLabel:a===`type`&&(l=r.clusters.predominantFieldLabel),l){let n=i.valueExpression?i.valueExpressionTitle:m(o,t),r=s&&m(s,t);c=e(l,{fieldLabel:n||``,normFieldLabel:r||``})}return c}function g(t,n,r,i){let{attributeInfo:a,statisticType:o}=n,{field:s,normalizationField:c}=a,l=``,u;if(o===`avg`?u=c?i.clusters.avgNormFieldSummary:i.clusters.avgFieldSummary:o===`type`&&(u=i.clusters.predominantFieldSummary),u){let n=a.valueExpression?a.valueExpressionTitle:m(s,t),i=c&&m(c,t);l=e(u,{fieldLabel:n||``,normFieldLabel:i||``,fieldValue:`{`+r+`}`})}return l}function _(t){return{fieldInfo:p({fieldName:d,label:t.clusters.numFeatures,type:`integer`}),fieldSummary:new i({text:e(t.clusters.countSummary,{count:`{${d}}`})})}}async function v(e,t,r){if(!f(t))return null;let a=c(e,t),o=r.clusters.predominantNoneValue,s=t.type===`unique-value`?t.uniqueValueInfos??[]:[],{fieldInfo:d,fieldSummary:m}=_(r),v=[m],y=[d],b=[];for(let t of a){let{statisticType:a,attributeInfo:c}=t,d=l(c,a),f=h(e,t,r);if(a===`avg`)v.push(new i({text:g(e,t,d,r)})),y.push(p({fieldName:d,label:f,type:`double`}));else if(a===`type`){let a=`expression/${d}`;v.push(new i({text:g(e,t,a,r)})),b.push(new n({name:d,title:f,returnType:`string`,expression:u(s,d,o)})),y.push(p({fieldName:a}))}}return{fieldInfos:y,expressionInfos:b,content:v}}async function y(e,t,n){if(!f(t))return null;let{fieldInfo:r,fieldSummary:i}=_(n),a=[i],c=[r],l=[],{fieldInfos:u,expressionInfos:d}=await o({renderer:t,layer:e,isFeatureReduction:!0}),p=await s(e,{fieldInfos:u,expressionInfos:d},!0);return a.push(...p),c.push(...u),l.push(...d),{fieldInfos:c,expressionInfos:l,content:a}}export{v as getContentAndInfos,y as getContentAndInfosForPieChart};
@@ -1,6 +1,6 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{unique as e}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{fetchMessageBundle as t}from"../../../intl/messages.js";import{substitute as n}from"../../../intl/substitute.js";import{numericTypes as r}from"../../../layers/support/fieldUtils.js";import{FieldsContent as i,TextContent as a}from"../../../popup/content.js";import o from"../../../popup/ExpressionInfo.js";import s from"../../../popup/FieldInfo.js";import c from"../../../popup/support/FieldInfoFormat.js";import{getAttributes as l}from"../../../renderers/support/utils.js";import{viewScaleRE as u}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{getFeatureReductionFields as d}from"../../support/adapters/support/utils.js";let f=0;function p(e=0){}const m=`expression/`;function h(e){return!(`hasVisualVariables`in e)||!e.hasVisualVariables()?[]:e.visualVariables.filter(e=>!(u.test(e.valueExpression)||`target`in e&&e.target===`outline`))}function g(e,t){return t?d(e)?.find(e=>e.name.toLowerCase()===t.toLowerCase()):null}function _(e,t,n){let i=null;if(n&&`featureReduction`in e){let t=e.featureReduction;t&&`popupTemplate`in t&&t.popupTemplate&&(i=t.popupTemplate.fieldInfos)}else`popupTemplate`in e&&e.popupTemplate&&(i=e.popupTemplate.fieldInfos);let a=n?g(e,t):e.getField(t),o=null;if(i&&i.some(e=>e&&e.fieldName?.toLowerCase()===a?.name.toLowerCase()?(o=e.clone(),!0):!1),!o){let e=r.includes(a.type),t=a.type===`integer`||a.type===`small-integer`;o=new s({fieldName:a.name,isEditable:a.editable,visible:!0,format:e?new c({places:t?0:2,digitSeparator:!0}):void 0})}return o.label||(o.label=a.alias),o}function v(e){let{expression:t,title:n,returnType:r}=e;return new o({name:`expr${f++}`,expression:t,title:n,returnType:r})}function y(e){let t=e.returnType===`number`?new c({places:2,digitSeparator:!0}):void 0;return new s({fieldName:`${m}${e.name}`,visible:!0,format:t})}async function b(r){let i=await t(`esri/smartMapping/t9n/smartMapping`),{renderer:a,layer:o,normFieldExpressionTemplate:s,isFeatureReduction:c}=r,u=[],d=[],f=l(a,h);for(let e of f)if(e.type===`field`)u.push(_(o,e.field,c));else if(e.type===`normalized-field`){let t=c?g(o,e.field):o.getField(e.field),r=c?g(o,e.normalizationField):o.getField(e.normalizationField),a=v({expression:`
2
+ import{unique as e}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{fetchMessageBundle as t}from"../../../intl/messages.js";import{substitute as n}from"../../../intl/substitute.js";import{numericTypes as r}from"../../../layers/support/fieldUtils.js";import i from"../../../popup/ExpressionInfo.js";import a from"../../../popup/FieldInfo.js";import o from"../../../popup/content/FieldsContent.js";import s from"../../../popup/content/TextContent.js";import c from"../../../popup/support/FieldInfoFormat.js";import{getAttributes as l}from"../../../renderers/support/utils.js";import{viewScaleRE as u}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{getFeatureReductionFields as d}from"../../support/adapters/support/utils.js";let f=0;function p(e=0){}const m=`expression/`;function h(e){return!(`hasVisualVariables`in e)||!e.hasVisualVariables()?[]:e.visualVariables.filter(e=>!(u.test(e.valueExpression)||`target`in e&&e.target===`outline`))}function g(e,t){return t?d(e)?.find(e=>e.name.toLowerCase()===t.toLowerCase()):null}function _(e,t,n){let i=null;if(n&&`featureReduction`in e){let t=e.featureReduction;t&&`popupTemplate`in t&&t.popupTemplate&&(i=t.popupTemplate.fieldInfos)}else`popupTemplate`in e&&e.popupTemplate&&(i=e.popupTemplate.fieldInfos);let o=n?g(e,t):e.getField(t),s=null;if(i&&i.some(e=>e&&e.fieldName?.toLowerCase()===o?.name.toLowerCase()?(s=e.clone(),!0):!1),!s){let e=r.includes(o.type),t=o.type===`integer`||o.type===`small-integer`;s=new a({fieldName:o.name,isEditable:o.editable,visible:!0,format:e?new c({places:t?0:2,digitSeparator:!0}):void 0})}return s.label||(s.label=o.alias),s}function v(e){let{expression:t,title:n,returnType:r}=e;return new i({name:`expr${f++}`,expression:t,title:n,returnType:r})}function y(e){let t=e.returnType===`number`?new c({places:2,digitSeparator:!0}):void 0;return new a({fieldName:`${m}${e.name}`,visible:!0,format:t})}async function b(r){let i=await t(`esri/smartMapping/t9n/smartMapping`),{renderer:a,layer:o,normFieldExpressionTemplate:s,isFeatureReduction:c}=r,u=[],d=[],f=l(a,h);for(let e of f)if(e.type===`field`)u.push(_(o,e.field,c));else if(e.type===`normalized-field`){let t=c?g(o,e.field):o.getField(e.field),r=c?g(o,e.normalizationField):o.getField(e.normalizationField),a=v({expression:`
3
3
  $feature["${t.name}"];
4
4
  $feature["${r.name}"];
5
5
  ${s===`percentage`?`($feature["${t.name}"] / $feature["${r.name}"]) * 100;`:`$feature["${t.name}"] / $feature["${r.name}"];`}
6
- `,title:n(s===`percentage`?i.normFieldLabelAsPercent:i.normFieldLabel,{expression1:t.alias,expression2:r.alias}),returnType:`number`});u.push(y(a),_(o,e.field,c),_(o,e.normalizationField,c)),d.push(a)}else if(e.type===`expression`){let t=v(e);u.push(y(t)),d.push(t)}return{fieldInfos:e(u,(e,t)=>e.fieldName===t.fieldName),expressionInfos:e(d,(e,t)=>e.expression===t.expression)}}async function x(e,r,o){let{fieldInfos:s,expressionInfos:c}=r,l=await t(`esri/smartMapping/t9n/smartMapping`);if(s.length>2)return[new i({fieldInfos:s})];let u=[];for(let t of s){let r=t.fieldName||``,i=t.label;if(!i){let t=o?g(e,r):e.getField(r);if(t)i=t.alias||r;else if(c){let e=r.split(m)[1],t=c[c.findIndex(t=>t.name===e)];t&&(i=t.title||t.name)}}u.push(new a({text:n(l.fieldInfo,{fieldLabel:i,fieldValue:`{${r}}`})}))}return u}function S(e){return`normalizationField`in e&&e.normalizationField?!0:`hasVisualVariables`in e&&e.hasVisualVariables()&&e.visualVariables.some(e=>!!(`normalizationField`in e&&e.normalizationField))}export{m as expressionFieldPrefix,x as getContentFromFieldInfos,v as getExpressionInfo,b as getFieldAndExpressionInfos,_ as getFieldInfo,y as getFieldInfoFromExpressionInfo,h as getPrimaryVisualVariables,S as hasNormalizedField,p as resetSuffixForTests};
6
+ `,title:n(s===`percentage`?i.normFieldLabelAsPercent:i.normFieldLabel,{expression1:t.alias,expression2:r.alias}),returnType:`number`});u.push(y(a),_(o,e.field,c),_(o,e.normalizationField,c)),d.push(a)}else if(e.type===`expression`){let t=v(e);u.push(y(t)),d.push(t)}return{fieldInfos:e(u,(e,t)=>e.fieldName===t.fieldName),expressionInfos:e(d,(e,t)=>e.expression===t.expression)}}async function x(e,r,i){let{fieldInfos:a,expressionInfos:c}=r,l=await t(`esri/smartMapping/t9n/smartMapping`);if(a.length>2)return[new o({fieldInfos:a})];let u=[];for(let t of a){let r=t.fieldName||``,a=t.label;if(!a){let t=i?g(e,r):e.getField(r);if(t)a=t.alias||r;else if(c){let e=r.split(m)[1],t=c[c.findIndex(t=>t.name===e)];t&&(a=t.title||t.name)}}u.push(new s({text:n(l.fieldInfo,{fieldLabel:a,fieldValue:`{${r}}`})}))}return u}function S(e){return`normalizationField`in e&&e.normalizationField?!0:`hasVisualVariables`in e&&e.hasVisualVariables()&&e.visualVariables.some(e=>!!(`normalizationField`in e&&e.normalizationField))}export{m as expressionFieldPrefix,x as getContentFromFieldInfos,v as getExpressionInfo,b as getFieldAndExpressionInfos,_ as getFieldInfo,y as getFieldInfoFromExpressionInfo,h as getPrimaryVisualVariables,S as hasNormalizedField,p as resetSuffixForTests};