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

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 (112) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/092e311cb7aea92a6a26.js +1 -0
  3. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +1 -0
  4. package/assets/esri/core/workers/chunks/{8e4a7027d171fb60e51e.js → 1f7f4f821d422b46cae7.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +1 -0
  6. package/assets/esri/core/workers/chunks/25a3bd8bede2d07d3a54.js +1 -0
  7. package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +1 -0
  8. package/assets/esri/core/workers/chunks/3f46acfda693c70abbdd.js +1 -0
  9. package/assets/esri/core/workers/chunks/434a8ba841a59e0deab9.js +1 -0
  10. package/assets/esri/core/workers/chunks/45fd2b456a6997584ca1.js +1 -0
  11. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +1 -0
  12. package/assets/esri/core/workers/chunks/542e5640ea1b80ef801a.js +1 -0
  13. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +1 -0
  14. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +1 -0
  15. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +1 -0
  16. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +1 -0
  17. package/assets/esri/core/workers/chunks/{5f4feca26102088ea565.js → 60737732ce495bbdd0fc.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{9ce8b9b80da146a5bbf5.js → 60c79934799927114074.js} +1 -1
  19. package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +1 -0
  20. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +29 -0
  21. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +1 -0
  22. package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +1 -0
  23. package/assets/esri/core/workers/chunks/89c8b0f684c1f27d149e.js +1 -0
  24. package/assets/esri/core/workers/chunks/8ab57cb1bfd3dc8d3c2a.js +1 -0
  25. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +1 -0
  26. package/assets/esri/core/workers/chunks/97b5f4302fb867c829f4.js +1 -0
  27. package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +1 -0
  28. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +1 -0
  29. package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +1 -0
  30. package/assets/esri/core/workers/chunks/b1d989b72203113a06fe.js +1 -0
  31. package/assets/esri/core/workers/chunks/{fc73737b41e086f0ce0b.js → b59aaf30c7fe2c8d1aaa.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +1 -0
  33. package/assets/esri/core/workers/chunks/b704f489d0f072a0bfcd.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d6cd0039d6e9c40961e3.js → d1f98c5249c487eb96f1.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e077e321a3109c2fbbe2.js +1 -0
  36. package/assets/esri/core/workers/chunks/e251921bc5367258c4d2.js +1 -0
  37. package/assets/esri/core/workers/chunks/ee08ae5b73439a1ff666.js +1 -0
  38. package/assets/esri/core/workers/chunks/fcaf9450642fcef83286.js +1 -0
  39. package/assets/esri/core/workers/chunks/feb41abc03d677df6f73.js +1 -0
  40. package/config.d.ts +11 -30
  41. package/config.js +1 -1
  42. package/core/workers/workerFactory.js +1 -1
  43. package/core/workers.d.ts +17 -0
  44. package/kernel.js +1 -1
  45. package/layers/FeatureLayer.d.ts +32 -14
  46. package/layers/MapImageLayer.d.ts +2 -1
  47. package/layers/SubtypeGroupLayer.d.ts +63 -0
  48. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  49. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  50. package/layers/graphics/sources/support/QueryTask.js +1 -1
  51. package/layers/support/LabelClass.d.ts +20 -2
  52. package/layers/support/Sublayer.d.ts +32 -2
  53. package/layers/support/TimeInformation.js +2 -0
  54. package/package.json +2 -2
  55. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +10 -6
  56. package/rest/query/operations/queryUtils.js +1 -1
  57. package/rest/support/timeUtils.js +2 -0
  58. package/symbols/TextSymbol.d.ts +27 -2
  59. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  60. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  61. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  62. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  63. package/views/3d/GroundView3D.js +1 -1
  64. package/views/3d/environment/SunLighting.d.ts +17 -1
  65. package/views/3d/environment/SunLighting.js +1 -1
  66. package/views/3d/environment/VirtualLighting.d.ts +17 -1
  67. package/views/3d/environment/VirtualLighting.js +1 -1
  68. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  69. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  70. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  71. package/views/BasemapView.js +1 -1
  72. package/views/GroundView.d.ts +1 -1
  73. package/views/GroundView.js +1 -1
  74. package/views/SceneView.js +1 -1
  75. package/views/support/ScheduledQueueProcessor.js +1 -1
  76. package/widgets/Daylight/DaylightViewModel.js +1 -1
  77. package/widgets/OrientedImageryViewer.js +1 -1
  78. package/widgets/Sketch/SketchViewModel.d.ts +61 -2
  79. package/widgets/Sketch/SketchViewModel.js +1 -1
  80. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +3 -2
  81. package/widgets/TimeSlider.d.ts +5 -4
  82. package/assets/esri/core/workers/chunks/0bd5012da287469b17d5.js +0 -1
  83. package/assets/esri/core/workers/chunks/112befb3b5b406f29298.js +0 -1
  84. package/assets/esri/core/workers/chunks/167b057ad50e6aef54de.js +0 -1
  85. package/assets/esri/core/workers/chunks/2d13a22f7b2427927fdc.js +0 -1
  86. package/assets/esri/core/workers/chunks/42fd2a7b22b03dacc6a7.js +0 -1
  87. package/assets/esri/core/workers/chunks/43cf862577bf37344ff4.js +0 -1
  88. package/assets/esri/core/workers/chunks/4be559c53fe5ac0d0d2e.js +0 -1
  89. package/assets/esri/core/workers/chunks/4e350d6c76957f5beb70.js +0 -1
  90. package/assets/esri/core/workers/chunks/4fe34da1c5d63e66ce98.js +0 -1
  91. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +0 -1
  92. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +0 -1
  93. package/assets/esri/core/workers/chunks/6da7229433105a69eb3f.js +0 -1
  94. package/assets/esri/core/workers/chunks/74c866e0b66e61751861.js +0 -1
  95. package/assets/esri/core/workers/chunks/830ab9b8d000169da675.js +0 -1
  96. package/assets/esri/core/workers/chunks/849879c8aed16315194c.js +0 -1
  97. package/assets/esri/core/workers/chunks/8ff23ac0abeea0073b47.js +0 -1
  98. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +0 -1
  99. package/assets/esri/core/workers/chunks/95dbbddac6581b9d671f.js +0 -1
  100. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +0 -1
  101. package/assets/esri/core/workers/chunks/aa1ac7954e4f0fefe15b.js +0 -1
  102. package/assets/esri/core/workers/chunks/b5df193c93e9c19f9700.js +0 -1
  103. package/assets/esri/core/workers/chunks/befa32b9e7b3fbdd431e.js +0 -1
  104. package/assets/esri/core/workers/chunks/c2c1f51a4668055c2838.js +0 -1
  105. package/assets/esri/core/workers/chunks/d0f5bee9db1ad51ae687.js +0 -1
  106. package/assets/esri/core/workers/chunks/d7429b58c90e015263ad.js +0 -1
  107. package/assets/esri/core/workers/chunks/d95d63e8d51244d71afb.js +0 -1
  108. package/assets/esri/core/workers/chunks/dfc81e66196c402f39b4.js +0 -29
  109. package/assets/esri/core/workers/chunks/dfd2dc5cdc97ffba8926.js +0 -1
  110. package/assets/esri/core/workers/chunks/e1b7806ab3e1967b15f0.js +0 -1
  111. package/assets/esri/core/workers/chunks/e1f5d00878f27e1d413e.js +0 -1
  112. package/assets/esri/core/workers/chunks/ffbcb816b611049a6276.js +0 -1
@@ -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.163",
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.163",
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",
@@ -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};
@@ -38,6 +38,8 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
38
38
  /**
39
39
  * The [Font](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/) used to style the text.
40
40
  * This property allows the developer to set the font's family, decoration, size, style, and weight properties.
41
+ * The font can also be defined using [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html)
42
+ * in the [text](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#text) if the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it.
41
43
  *
42
44
  * See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
43
45
  *
@@ -48,7 +50,6 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
48
50
  * > The available [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) property values depend on whether you are
49
51
  * > working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
50
52
  *
51
- * @see [Labeling Guide](https://developers.arcgis.com/javascript/latest/labeling/)
52
53
  * @example
53
54
  * let textSymbol = {
54
55
  * type: "text", // autocasts as new TextSymbol()
@@ -60,6 +61,15 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
60
61
  * weight: "bold"
61
62
  * }
62
63
  * };
64
+ * @example
65
+ * ```js
66
+ * // same example but using formatting tags
67
+ *
68
+ * let textSymbol = {
69
+ * type: "text", // autocasts as new TextSymbol()
70
+ * text: "<BOL><ITA><FNT name='Merriweather' size='12'>Science of Where</FNT></ITA></BOL>",
71
+ * };
72
+ * ```
63
73
  */
64
74
  font?: FontProperties;
65
75
  /**
@@ -303,6 +313,8 @@ export default class TextSymbol extends Symbol {
303
313
  /**
304
314
  * The [Font](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/) used to style the text.
305
315
  * This property allows the developer to set the font's family, decoration, size, style, and weight properties.
316
+ * The font can also be defined using [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html)
317
+ * in the [text](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#text) if the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it.
306
318
  *
307
319
  * See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
308
320
  *
@@ -313,7 +325,6 @@ export default class TextSymbol extends Symbol {
313
325
  * > The available [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) property values depend on whether you are
314
326
  * > working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
315
327
  *
316
- * @see [Labeling Guide](https://developers.arcgis.com/javascript/latest/labeling/)
317
328
  * @example
318
329
  * let textSymbol = {
319
330
  * type: "text", // autocasts as new TextSymbol()
@@ -325,6 +336,15 @@ export default class TextSymbol extends Symbol {
325
336
  * weight: "bold"
326
337
  * }
327
338
  * };
339
+ * @example
340
+ * ```js
341
+ * // same example but using formatting tags
342
+ *
343
+ * let textSymbol = {
344
+ * type: "text", // autocasts as new TextSymbol()
345
+ * text: "<BOL><ITA><FNT name='Merriweather' size='12'>Science of Where</FNT></ITA></BOL>",
346
+ * };
347
+ * ```
328
348
  */
329
349
  get font(): Font;
330
350
  set font(value: FontProperties);
@@ -468,6 +488,10 @@ export default class TextSymbol extends Symbol {
468
488
  * The length of the line is controlled by the [lineWidth](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#lineWidth) property.
469
489
  * To manually create a new line, use the `\n` escape character.
470
490
  *
491
+ * This property supports [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html) if
492
+ * 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)
493
+ * for more details.
494
+ *
471
495
  * > [!WARNING]
472
496
  * >
473
497
  * > **Known Limitations**
@@ -478,6 +502,7 @@ export default class TextSymbol extends Symbol {
478
502
  * @see [lineWidth](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#lineWidth)
479
503
  * @example symbol.text = "You are here";
480
504
  * @example symbol.text = "Wish you were \n here";
505
+ * @example symbol.text = "Wish you were <BOL>Bold</BOL> and <UND>Underlined</UND>";
481
506
  */
482
507
  accessor text: string;
483
508
  /** The symbol type. */
@@ -1,2 +1,2 @@
1
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{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleFillSymbol.js";import f from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as p}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as m}from"../../../interactive/options/bindViewToolOptions.js";import h from"../../../../widgets/Sketch/SketchViewModel.js";function g(e){return e?.type===`polygon`}let _=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new d({color:null,outline:null}),this._invisibleLineSymbol=new f({color:null,width:0}),this._operationManager=new p,this._updatingHandles=new u}initialize(){this._sketchViewModel=new h({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,cancelUpdateOnClickAway:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),m(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{area:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new d({color:n(e,.3),outline:new f({color:e,width:2})})},s)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._invisibleLineSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{if(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;let n=this._analysis.clone(),o=this._sketchViewModel.on([`create`,`undo`,`redo`],e=>{let n=`state`in e?e.state:`active`,r=`graphic`in e?e.graphic:e.graphics?.at(0);switch(n){case`start`:case`active`:{let e=r?.geometry;e?.type===`polygon`&&(this._analysis.geometry=e);break}case`cancel`:case`complete`:t.stop(),a(this.reshape())}});t.handles.push(o,r(()=>{o.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(i(e)||n.equals(r))return t.reject();t.resolve({})})),this._sketchViewModel.activeLineSymbol=this._invisibleLineSymbol,this._sketchViewModel.polygonSymbol=this._invisibleAreaSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(a(this._sketchViewModel.create(`polygon`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._areaSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(a(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=g(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),i(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}};e([c()],_.prototype,`_sketchViewModel`,void 0),e([c()],_.prototype,`measurementViewData`,void 0),e([c()],_.prototype,`state`,null),e([c()],_.prototype,`updating`,null),e([c()],_.prototype,`view`,void 0),_=e([l(`esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool`)],_);export{_ as AreaMeasurementTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleFillSymbol.js";import f from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as p}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as m}from"../../../interactive/options/bindViewToolOptions.js";import h from"../../../../widgets/Sketch/SketchViewModel.js";function g(e){return e?.type===`polygon`}let _=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new d({color:null,outline:null}),this._invisibleLineSymbol=new f({color:null,width:0}),this._operationManager=new p,this._updatingHandles=new u}initialize(){this._sketchViewModel=new h({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,cancelUpdateOnClickAway:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),m(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{area:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new d({color:n(e,.3),outline:new f({color:e,width:2})})},s)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._invisibleLineSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{let n=this._sketchViewModel;if(!n||!this.measurementViewData.sketchGraphicsLayer)return;let o=this._analysis.clone(),s,c=n.on([`create`,`undo`,`redo`],e=>{let n=`state`in e?e.state:`active`,r=`graphic`in e?e.graphic:e.graphics?.at(0);r&&(s=r);let i=r?.geometry;switch(n){case`start`:case`active`:i?.type===`polygon`&&(this._analysis.geometry=i);break;case`cancel`:case`complete`:n===`complete`&&i?.type===`polygon`&&(this._analysis.geometry=i),t.stop(),a(this.reshape())}});t.handles.push(c,r(()=>{c.remove(),n.cancel(),s&&this._analysis.geometry&&(this._analysis.geometry=g(s.geometry)?s.geometry:null),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(i(e)||o.equals(r))return t.reject();t.resolve({})})),n.activeLineSymbol=this._invisibleLineSymbol,n.polygonSymbol=this._invisibleAreaSymbol,n.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(a(n.create(`polygon`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._areaSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(a(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=g(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),i(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}get test(){}};e([c()],_.prototype,`_sketchViewModel`,void 0),e([c()],_.prototype,`measurementViewData`,void 0),e([c()],_.prototype,`state`,null),e([c()],_.prototype,`updating`,null),e([c()],_.prototype,`view`,void 0),_=e([l(`esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool`)],_);export{_ as AreaMeasurementTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{toAdaptiveLengthUnitForArea as t,toAdaptiveAreaUnit as n}from"../../../core/quantity.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import o from"./AnalysisView2D.js";import{AreaMeasurementAreaVisualization as s}from"./AreaMeasurement/AreaMeasurementAreaVisualization.js";import{AreaMeasurementController as c}from"./AreaMeasurement/AreaMeasurementController.js";import{AreaMeasurementManipulatorVisualization as l}from"./AreaMeasurement/AreaMeasurementManipulatorVisualization.js";import{AreaMeasurementSketchVisualization as u}from"./AreaMeasurement/AreaMeasurementSketchVisualization.js";import{AreaMeasurementTool as d}from"./AreaMeasurement/AreaMeasurementTool.js";import f from"../../interactive/snapping/SnappingOptions.js";let p=class extends o{constructor(e){super(e),this.analysis=null,this.snappingOptions=new f,this.type=`area-measurement-view-2d`}initialize(){let{view:e}=this;this._areaVisualization=new s({view:e,measurementViewData:this}),this._controller=new c({view:e,measurementViewData:this}),this._manipulatorVisualization=new l({view:e,measurementViewData:this}),this._sketchVisualization=new u({view:e,measurementViewData:this}),this._tool=new d({view:e,measurementViewData:this})}destroy(){this._areaVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;if(!e)return e;let{unit:r}=this,{area:i,display:a,mode:o,perimeter:s}=e;return{area:i?n(i,r):null,display:a,mode:o,perimeter:s?t(s,r):null}}get unit(){return this.analysis.unit??this.view.options.displayUnits.area??a(this.view)}get updating(){return(this._areaVisualization?.updating??!0)||(this._controller?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}};e([r()],p.prototype,`_areaVisualization`,void 0),e([r()],p.prototype,`_controller`,void 0),e([r()],p.prototype,`_manipulatorVisualization`,void 0),e([r()],p.prototype,`_sketchVisualization`,void 0),e([r()],p.prototype,`_tool`,void 0),e([r({constructOnly:!0})],p.prototype,`analysis`,void 0),e([r()],p.prototype,`manipulatorGraphic`,null),e([r()],p.prototype,`manipulatorGraphicsLayer`,null),e([r()],p.prototype,`sketchGraphicsLayer`,null),e([r({readOnly:!0})],p.prototype,`result`,null),e([r({type:f,nonNullable:!0})],p.prototype,`snappingOptions`,void 0),e([r({readOnly:!0})],p.prototype,`type`,void 0),e([r({readOnly:!0})],p.prototype,`unit`,null),e([r({readOnly:!0})],p.prototype,`updating`,null),p=e([i(`esri.views.2d.analysis.AreaMeasurementAnalysisView2D`)],p);const m=p;export{m as default};
2
+ import{__decorate as e}from"tslib";import"../../../core/has.js";import{toAdaptiveLengthUnitForArea as t,toAdaptiveAreaUnit as n}from"../../../core/quantity.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import o from"./AnalysisView2D.js";import{AreaMeasurementAreaVisualization as s}from"./AreaMeasurement/AreaMeasurementAreaVisualization.js";import{AreaMeasurementController as c}from"./AreaMeasurement/AreaMeasurementController.js";import{AreaMeasurementManipulatorVisualization as l}from"./AreaMeasurement/AreaMeasurementManipulatorVisualization.js";import{AreaMeasurementSketchVisualization as u}from"./AreaMeasurement/AreaMeasurementSketchVisualization.js";import{AreaMeasurementTool as d}from"./AreaMeasurement/AreaMeasurementTool.js";import f from"../../interactive/snapping/SnappingOptions.js";let p=class extends o{constructor(e){super(e),this.analysis=null,this.snappingOptions=new f,this.type=`area-measurement-view-2d`}initialize(){let{view:e}=this;this._areaVisualization=new s({view:e,measurementViewData:this}),this._controller=new c({view:e,measurementViewData:this}),this._manipulatorVisualization=new l({view:e,measurementViewData:this}),this._sketchVisualization=new u({view:e,measurementViewData:this}),this._tool=new d({view:e,measurementViewData:this})}destroy(){this._areaVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;if(!e)return e;let{unit:r}=this,{area:i,display:a,mode:o,perimeter:s}=e;return{area:i?n(i,r):null,display:a,mode:o,perimeter:s?t(s,r):null}}get unit(){return this.analysis.unit??this.view.options.displayUnits.area??a(this.view)}get updating(){return(this._areaVisualization?.updating??!0)||(this._controller?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}get test(){}};e([r()],p.prototype,`_areaVisualization`,void 0),e([r()],p.prototype,`_controller`,void 0),e([r()],p.prototype,`_manipulatorVisualization`,void 0),e([r()],p.prototype,`_sketchVisualization`,void 0),e([r()],p.prototype,`_tool`,void 0),e([r({constructOnly:!0})],p.prototype,`analysis`,void 0),e([r()],p.prototype,`manipulatorGraphic`,null),e([r()],p.prototype,`manipulatorGraphicsLayer`,null),e([r()],p.prototype,`sketchGraphicsLayer`,null),e([r({readOnly:!0})],p.prototype,`result`,null),e([r({type:f,nonNullable:!0})],p.prototype,`snappingOptions`,void 0),e([r({readOnly:!0})],p.prototype,`type`,void 0),e([r({readOnly:!0})],p.prototype,`unit`,null),e([r({readOnly:!0})],p.prototype,`updating`,null),p=e([i(`esri.views.2d.analysis.AreaMeasurementAnalysisView2D`)],p);const m=p;export{m as default};
@@ -1,2 +1,2 @@
1
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{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as i,isAborted as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as f}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as p}from"../../../interactive/options/bindViewToolOptions.js";import m from"../../../../widgets/Sketch/SketchViewModel.js";function h(e){return e?.type===`polyline`}let g=class extends t{constructor(e){super(e),this._invisibleLineSymbol=new d({color:null,width:0}),this._operationManager=new f,this._updatingHandles=new u}initialize(){this._sketchViewModel=new m({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),p(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{length:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._lineSymbol=new d({color:n(e,.3),width:2})},s)])}destroy(){this._invisibleLineSymbol.destroy(),this._lineSymbol?.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{if(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;let n=this._analysis.clone(),o=this._sketchViewModel.on(`create`,e=>{switch(e.state){case`start`:case`active`:{let t=e.graphic?.geometry;t?.type===`polyline`&&(this._analysis.geometry=t);break}case`cancel`:case`complete`:t.stop(),i(this.reshape())}});t.handles.push(o,r(()=>{o.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(a(e)||n.equals(r))return t.reject();t.resolve({})})),this._sketchViewModel.activeLineSymbol=this._invisibleLineSymbol,this._sketchViewModel.polylineSymbol=this._invisibleLineSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(i(this._sketchViewModel.create(`polyline`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._lineSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polylineSymbol=this._lineSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(i(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=h(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),a(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}};e([c()],g.prototype,`_sketchViewModel`,void 0),e([c()],g.prototype,`measurementViewData`,void 0),e([c()],g.prototype,`state`,null),e([c()],g.prototype,`updating`,null),e([c()],g.prototype,`view`,void 0),g=e([l(`esri.views.2d.analysis.DistanceMeasurement.DistanceMeasurementTool`)],g);export{g as DistanceMeasurementTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as f}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as p}from"../../../interactive/options/bindViewToolOptions.js";import m from"../../../../widgets/Sketch/SketchViewModel.js";function h(e){return e?.type===`polyline`}let g=class extends t{constructor(e){super(e),this._invisibleLineSymbol=new d({color:null,width:0}),this._operationManager=new f,this._updatingHandles=new u}initialize(){this._sketchViewModel=new m({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),p(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{length:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._lineSymbol=new d({color:n(e,.3),width:2})},s)])}destroy(){this._invisibleLineSymbol.destroy(),this._lineSymbol?.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{let n=this._sketchViewModel;if(!n||!this.measurementViewData.sketchGraphicsLayer)return;let o=this._analysis.clone(),s,c=n.on([`create`,`undo`,`redo`],e=>{let n=`state`in e?e.state:`active`,r=`graphic`in e?e.graphic:e.graphics?.at(0);r&&(s=r);let i=r?.geometry;switch(n){case`start`:case`active`:i?.type===`polyline`&&(this._analysis.geometry=i);break;case`cancel`:case`complete`:n===`complete`&&i?.type===`polyline`&&(this._analysis.geometry=i),t.stop(),a(this.reshape())}});t.handles.push(c,r(()=>{c.remove(),n.cancel(),s&&this._analysis.geometry&&(this._analysis.geometry=h(s.geometry)?s.geometry:null),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(i(e)||o.equals(r))return t.reject();t.resolve({})})),n.activeLineSymbol=this._invisibleLineSymbol,n.polylineSymbol=this._invisibleLineSymbol,n.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(a(n.create(`polyline`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._lineSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polylineSymbol=this._lineSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(a(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=h(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),i(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}get test(){}};e([c()],g.prototype,`_sketchViewModel`,void 0),e([c()],g.prototype,`measurementViewData`,void 0),e([c()],g.prototype,`state`,null),e([c()],g.prototype,`updating`,null),e([c()],g.prototype,`view`,void 0),g=e([l(`esri.views.2d.analysis.DistanceMeasurement.DistanceMeasurementTool`)],g);export{g as DistanceMeasurementTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{toAdaptiveLengthUnit as t}from"../../../core/quantity.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as i}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView2D.js";import{DistanceMeasurementController as o}from"./DistanceMeasurement/DistanceMeasurementController.js";import{DistanceMeasurementLineVisualization as s}from"./DistanceMeasurement/DistanceMeasurementLineVisualization.js";import{DistanceMeasurementManipulatorVisualization as c}from"./DistanceMeasurement/DistanceMeasurementManipulatorVisualization.js";import{DistanceMeasurementSketchVisualization as l}from"./DistanceMeasurement/DistanceMeasurementSketchVisualization.js";import{DistanceMeasurementTool as u}from"./DistanceMeasurement/DistanceMeasurementTool.js";import d from"../../interactive/snapping/SnappingOptions.js";let f=class extends a{constructor(e){super(e),this.analysis=null,this.snappingOptions=new d,this.type=`distance-measurement-view-2d`}initialize(){let{view:e}=this;this._lineVisualization=new s({view:e,measurementViewData:this}),this._controller=new o({view:e,measurementViewData:this}),this._manipulatorVisualization=new c({view:e,measurementViewData:this}),this._sketchVisualization=new l({view:e,measurementViewData:this}),this._tool=new u({view:e,measurementViewData:this})}destroy(){this._lineVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;return e&&{...e,length:t(e.length,this.unit)}}get unit(){return this.analysis.unit??this.view.options.displayUnits.length??i(this.view)}get updating(){return(this._controller?.updating??!0)||(this._lineVisualization?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}};e([n()],f.prototype,`_lineVisualization`,void 0),e([n()],f.prototype,`_controller`,void 0),e([n()],f.prototype,`_manipulatorVisualization`,void 0),e([n()],f.prototype,`_sketchVisualization`,void 0),e([n()],f.prototype,`_tool`,void 0),e([n({constructOnly:!0})],f.prototype,`analysis`,void 0),e([n()],f.prototype,`manipulatorGraphic`,null),e([n()],f.prototype,`manipulatorGraphicsLayer`,null),e([n()],f.prototype,`sketchGraphicsLayer`,null),e([n({readOnly:!0})],f.prototype,`result`,null),e([n({type:d,nonNullable:!0})],f.prototype,`snappingOptions`,void 0),e([n({readOnly:!0})],f.prototype,`type`,void 0),e([n({readOnly:!0})],f.prototype,`unit`,null),e([n({readOnly:!0})],f.prototype,`updating`,null),f=e([r(`esri.views.2d.analysis.DistanceMeasurementAnalysisView2D`)],f);const p=f;export{p as default};
2
+ import{__decorate as e}from"tslib";import"../../../core/has.js";import{toAdaptiveLengthUnit as t}from"../../../core/quantity.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as i}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView2D.js";import{DistanceMeasurementController as o}from"./DistanceMeasurement/DistanceMeasurementController.js";import{DistanceMeasurementLineVisualization as s}from"./DistanceMeasurement/DistanceMeasurementLineVisualization.js";import{DistanceMeasurementManipulatorVisualization as c}from"./DistanceMeasurement/DistanceMeasurementManipulatorVisualization.js";import{DistanceMeasurementSketchVisualization as l}from"./DistanceMeasurement/DistanceMeasurementSketchVisualization.js";import{DistanceMeasurementTool as u}from"./DistanceMeasurement/DistanceMeasurementTool.js";import d from"../../interactive/snapping/SnappingOptions.js";let f=class extends a{constructor(e){super(e),this.analysis=null,this.snappingOptions=new d,this.type=`distance-measurement-view-2d`}initialize(){let{view:e}=this;this._lineVisualization=new s({view:e,measurementViewData:this}),this._controller=new o({view:e,measurementViewData:this}),this._manipulatorVisualization=new c({view:e,measurementViewData:this}),this._sketchVisualization=new l({view:e,measurementViewData:this}),this._tool=new u({view:e,measurementViewData:this})}destroy(){this._lineVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;return e&&{...e,length:t(e.length,this.unit)}}get unit(){return this.analysis.unit??this.view.options.displayUnits.length??i(this.view)}get updating(){return(this._controller?.updating??!0)||(this._lineVisualization?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}get test(){}};e([n()],f.prototype,`_lineVisualization`,void 0),e([n()],f.prototype,`_controller`,void 0),e([n()],f.prototype,`_manipulatorVisualization`,void 0),e([n()],f.prototype,`_sketchVisualization`,void 0),e([n()],f.prototype,`_tool`,void 0),e([n({constructOnly:!0})],f.prototype,`analysis`,void 0),e([n()],f.prototype,`manipulatorGraphic`,null),e([n()],f.prototype,`manipulatorGraphicsLayer`,null),e([n()],f.prototype,`sketchGraphicsLayer`,null),e([n({readOnly:!0})],f.prototype,`result`,null),e([n({type:d,nonNullable:!0})],f.prototype,`snappingOptions`,void 0),e([n({readOnly:!0})],f.prototype,`type`,void 0),e([n({readOnly:!0})],f.prototype,`unit`,null),e([n({readOnly:!0})],f.prototype,`updating`,null),f=e([r(`esri.views.2d.analysis.DistanceMeasurementAnalysisView2D`)],f);const p=f;export{p as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}get updating(){return!this.suspended&&(this._usingTerrain&&this._terrainSurface.updating||this.layerViews.some(({updating:e})=>e))}getElevation(e,t,n,r){let i=this._usingTerrain?this._terrainSurface?.getElevation(e,t,n,r):null;return this._integratedMeshGroundLayerViews.reduce((i,a)=>{let o=a.elevationProvider.getElevation(e,t,n,r);return o==null?i:Math.max(o,i??o)},i)}getElevations(e,t,n){let r=this.view.groundSpatialReference;if(r==null){for(let e=0;e<t;++e)n(e,null);return}for(let i=0;i<t;++i){let t=i*3;n(i,this.getElevation(e[t],e[t+1],e[t+2],r))}}intersect(e,t,n,r){this._usingTerrain&&this._terrainSurface.intersect(e,t,n,r),this._integratedMeshGroundLayerViews.forEach(i=>i.intersect(e,t,n,r))}getSphereElevationRange(e,t,n){let r=this._usingTerrain?this._terrainSurface?.getSphereElevationRange?.(e,t):null;return this._integratedMeshGroundLayerViews.reduce((n,r)=>{let i=r.elevationProvider.getSphereElevationRange?.(e,t);return i==null?n:(n??=new f,n.expandElevationRange(i),n)},r?new f(r.minElevation,r.maxElevation):null)}getRootElevationRange(){let e=this._usingTerrain?this._terrainSurface?.getRootElevationRange?.():null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>{let n=t.elevationProvider.getRootElevationRange?.();return n==null?e:(e??=new f,e.expandElevationRange(n),e)},e?new f(e.minElevation,e.maxElevation):null)}get elevationQueryCache(){let e=this.view?.basemapTerrain;return e?.enabled?e.elevationQueryCache:null}get elevationQueryReady(){for(let e of this.ground?.allLayers??[])if(e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain&&e.loadStatus!==`failed`&&e.queryElevationCallback==null)return!1;return!0}get groundExtent(){let{fullGroundExtent:e}=this;return e?this.userClippingExtent?l(e,this.userClippingExtent,s()):this.fullGroundExtent:null}get fullGroundExtent(){let e=this._usingTerrain?this._terrainSurface.fullGroundExtent:null;if(this._integratedMeshGroundLayerViews.length===0)return e;let t=this.view.spatialReference;if(!t.isWebMercator&&!t.isWGS84)return e;let n=b(t);return e?u(e,n,s()):n}get visibleElevationRange(){let e=this._usingTerrain?this._terrainSurface.visibleElevationRange:null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>e==null?new f(t.visibleElevationRange.minElevation,t.visibleElevationRange.maxElevation):(e.expandElevationRange(t.visibleElevationRange),e),e?new f(e.minElevation,e.maxElevation):null)??y}get opaque(){return this._usingTerrain&&this._terrainSurface.opaque||this._integratedMeshGroundLayerViews.some(({opaque:e})=>e)}get invisible(){return(!this._usingTerrain||this._terrainSurface.invisible)&&this._integratedMeshGroundLayerViews.every(({invisible:e})=>e)}get baseOpacity(){return this.ground?.opacity??1}get wireframe(){return this._usingTerrain?this._terrainSurface?.wireframe??!1:!1}get freeze(){return this._usingTerrain&&(this._terrainSurface?.freeze??!1)||this._integratedMeshGroundLayerViews.some(e=>e.type===`integrated-mesh-3dtiles`&&e.freeze)}set freeze(e){this._usingTerrain&&(this._terrainSurface.freeze=e),this._integratedMeshGroundLayerViews.forEach(t=>{t.type===`integrated-mesh-3dtiles`&&(t.freeze=e)})}get suspended(){return(!this._usingTerrain||super.suspended)&&this._integratedMeshGroundLayerViews.length>0&&this._integratedMeshGroundLayerViews.every(({suspended:e})=>e)}get ready(){return!this._usingTerrain&&this._integratedMeshGroundLayerViews.length===0?!1:(!this._usingTerrain||this._terrainSurface.ready)&&this._integratedMeshGroundLayerViews.every(({ready:e})=>e)}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([a()],v.prototype,`memoizedElevationQueryDependencies`,null),e([a({readOnly:!0})],v.prototype,`_integratedMeshGroundLayerViews`,null),e([a({readOnly:!0})],v.prototype,`_terrainSurface`,null),e([a({readOnly:!0})],v.prototype,`_usingTerrain`,null),e([a({readOnly:!0})],v.prototype,`spatialReference`,null),e([a({readOnly:!0})],v.prototype,`userClippingExtent`,null),e([a({type:Boolean,readOnly:!0})],v.prototype,`updating`,null),e([a({readOnly:!0})],v.prototype,`elevationQueryCache`,null),e([a()],v.prototype,`elevationQueryReady`,null),e([a({readOnly:!0})],v.prototype,`groundExtent`,null),e([a({readOnly:!0})],v.prototype,`fullGroundExtent`,null),e([a({readOnly:!0})],v.prototype,`visibleElevationRange`,null),e([a({readOnly:!0})],v.prototype,`opaque`,null),e([a({readOnly:!0})],v.prototype,`invisible`,null),e([a({readOnly:!0})],v.prototype,`baseOpacity`,null),e([a({readOnly:!0})],v.prototype,`wireframe`,null),e([a()],v.prototype,`freeze`,null),e([a({readOnly:!0})],v.prototype,`suspended`,null),e([a({readOnly:!0})],v.prototype,`ready`,null),v=e([o(`esri.views.3d.GroundView3D`)],v);const y=new f(0,0);function b(e){return e.isWebMercator?m:h}export{v as GroundView3D};
2
+ import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}isUpdating(){return this._usingTerrain&&this._terrainSurface.updating||super.isUpdating()}getElevation(e,t,n,r){let i=this._usingTerrain?this._terrainSurface?.getElevation(e,t,n,r):null;return this._integratedMeshGroundLayerViews.reduce((i,a)=>{let o=a.elevationProvider.getElevation(e,t,n,r);return o==null?i:Math.max(o,i??o)},i)}getElevations(e,t,n){let r=this.view.groundSpatialReference;if(r==null){for(let e=0;e<t;++e)n(e,null);return}for(let i=0;i<t;++i){let t=i*3;n(i,this.getElevation(e[t],e[t+1],e[t+2],r))}}intersect(e,t,n,r){this._usingTerrain&&this._terrainSurface.intersect(e,t,n,r),this._integratedMeshGroundLayerViews.forEach(i=>i.intersect(e,t,n,r))}getSphereElevationRange(e,t,n){let r=this._usingTerrain?this._terrainSurface?.getSphereElevationRange?.(e,t):null;return this._integratedMeshGroundLayerViews.reduce((n,r)=>{let i=r.elevationProvider.getSphereElevationRange?.(e,t);return i==null?n:(n??=new f,n.expandElevationRange(i),n)},r?new f(r.minElevation,r.maxElevation):null)}getRootElevationRange(){let e=this._usingTerrain?this._terrainSurface?.getRootElevationRange?.():null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>{let n=t.elevationProvider.getRootElevationRange?.();return n==null?e:(e??=new f,e.expandElevationRange(n),e)},e?new f(e.minElevation,e.maxElevation):null)}get elevationQueryCache(){let e=this.view?.basemapTerrain;return e?.enabled?e.elevationQueryCache:null}get elevationQueryReady(){for(let e of this.ground?.allLayers??[])if(e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain&&e.loadStatus!==`failed`&&e.queryElevationCallback==null)return!1;return!0}get groundExtent(){let{fullGroundExtent:e}=this;return e?this.userClippingExtent?l(e,this.userClippingExtent,s()):this.fullGroundExtent:null}get fullGroundExtent(){let e=this._usingTerrain?this._terrainSurface.fullGroundExtent:null;if(this._integratedMeshGroundLayerViews.length===0)return e;let t=this.view.spatialReference;if(!t.isWebMercator&&!t.isWGS84)return e;let n=b(t);return e?u(e,n,s()):n}get visibleElevationRange(){let e=this._usingTerrain?this._terrainSurface.visibleElevationRange:null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>e==null?new f(t.visibleElevationRange.minElevation,t.visibleElevationRange.maxElevation):(e.expandElevationRange(t.visibleElevationRange),e),e?new f(e.minElevation,e.maxElevation):null)??y}get opaque(){return this._usingTerrain&&this._terrainSurface.opaque||this._integratedMeshGroundLayerViews.some(({opaque:e})=>e)}get invisible(){return(!this._usingTerrain||this._terrainSurface.invisible)&&this._integratedMeshGroundLayerViews.every(({invisible:e})=>e)}get baseOpacity(){return this.ground?.opacity??1}get wireframe(){return this._usingTerrain?this._terrainSurface?.wireframe??!1:!1}get freeze(){return this._usingTerrain&&(this._terrainSurface?.freeze??!1)||this._integratedMeshGroundLayerViews.some(e=>e.type===`integrated-mesh-3dtiles`&&e.freeze)}set freeze(e){this._usingTerrain&&(this._terrainSurface.freeze=e),this._integratedMeshGroundLayerViews.forEach(t=>{t.type===`integrated-mesh-3dtiles`&&(t.freeze=e)})}get suspended(){return(!this._usingTerrain||super.suspended)&&this._integratedMeshGroundLayerViews.length>0&&this._integratedMeshGroundLayerViews.every(({suspended:e})=>e)}get ready(){return!this._usingTerrain&&this._integratedMeshGroundLayerViews.length===0?!1:(!this._usingTerrain||this._terrainSurface.ready)&&this._integratedMeshGroundLayerViews.every(({ready:e})=>e)}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([a()],v.prototype,`memoizedElevationQueryDependencies`,null),e([a({readOnly:!0})],v.prototype,`_integratedMeshGroundLayerViews`,null),e([a({readOnly:!0})],v.prototype,`_terrainSurface`,null),e([a({readOnly:!0})],v.prototype,`_usingTerrain`,null),e([a({readOnly:!0})],v.prototype,`spatialReference`,null),e([a({readOnly:!0})],v.prototype,`userClippingExtent`,null),e([a({readOnly:!0})],v.prototype,`elevationQueryCache`,null),e([a()],v.prototype,`elevationQueryReady`,null),e([a({readOnly:!0})],v.prototype,`groundExtent`,null),e([a({readOnly:!0})],v.prototype,`fullGroundExtent`,null),e([a({readOnly:!0})],v.prototype,`visibleElevationRange`,null),e([a({readOnly:!0})],v.prototype,`opaque`,null),e([a({readOnly:!0})],v.prototype,`invisible`,null),e([a({readOnly:!0})],v.prototype,`baseOpacity`,null),e([a({readOnly:!0})],v.prototype,`wireframe`,null),e([a()],v.prototype,`freeze`,null),e([a({readOnly:!0})],v.prototype,`suspended`,null),e([a({readOnly:!0})],v.prototype,`ready`,null),v=e([o(`esri.views.3d.GroundView3D`)],v);const y=new f(0,0);function b(e){return e.isWebMercator?m:h}export{v as GroundView3D};
@@ -2,7 +2,7 @@ import type WebSceneSunLighting from "../../../webscene/SunLighting.js";
2
2
  import type { EventedMixin } from "../../../core/Evented.js";
3
3
  import type { SunLightingProperties as WebSceneSunLightingProperties } from "../../../webscene/SunLighting.js";
4
4
 
5
- export interface SunLightingProperties extends WebSceneSunLightingProperties, Partial<Pick<SunLighting, "cameraTrackingEnabled">> {
5
+ export interface SunLightingProperties extends WebSceneSunLightingProperties, Partial<Pick<SunLighting, "cameraTrackingEnabled" | "globalIllumination">> {
6
6
  /**
7
7
  * The current date and time of the simulated sun. When setting the date, specifying the time zone is important,
8
8
  * otherwise the time zone of the browser will be used. This might lead to different lighting for users in different
@@ -63,6 +63,22 @@ export default class SunLighting extends SunLightingSuperclass {
63
63
  */
64
64
  get date(): Date;
65
65
  set date(value: (Date | number | string));
66
+ /**
67
+ * Enables global illumination for more realistic lighting in the scene. Emissive materials illuminate nearby
68
+ * surfaces, while areas where surrounding objects block ambient light receive more natural shading.
69
+ *
70
+ * **Known limitations**
71
+ *
72
+ * - Is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/).
73
+ * - Is disabled at high camera altitudes.
74
+ * - May produce temporarily noisy lighting after camera or scene changes.
75
+ * - May reduce rendering performance.
76
+ *
77
+ * @default false
78
+ * @beta
79
+ * @since 5.2
80
+ */
81
+ accessor globalIllumination: boolean;
66
82
  /** Indicates that the light source is simulated position of the sun. */
67
83
  get type(): "sun";
68
84
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../../core/Evented.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"../../../webscene/SunLighting.js";var a;let o=a=class extends t(i){static calculateTimezoneOffset({hours:e,minutes:t,seconds:n}){return Math.round(e+t/60+n/3600)}constructor(e){super(e),this.cameraTrackingEnabled=!0,this.positionTimezoneInfo={hours:0,minutes:0,seconds:0,autoUpdated:!0},this.type=`sun`;let t=new Date().getFullYear(),n=new Date(`March 15, `+t+` 12:00:00 UTC`);this._set(`defaultDate`,n),this._set(`date`,n)}get defaultDate(){return new Date(this._get(`defaultDate`))}static fromWebsceneLighting(e){return new a(e.cloneConstructProperties())}set defaultDate(e){let t=this._get(`date`)===this._get(`defaultDate`);e=new Date(e),this._set(`defaultDate`,e),t&&this._set(`date`,e)}set date(e){e!=null&&(this.positionTimezoneInfo.autoUpdated=!1,this._set(`date`,new Date(e)))}autoUpdate(e,t){let n=a.calculateTimezoneOffset(this.positionTimezoneInfo);this.positionTimezoneInfo.hours=t.hours,this.positionTimezoneInfo.minutes=t.minutes,this.positionTimezoneInfo.seconds=t.seconds;let r=null;e!=null&&(this.positionTimezoneInfo.autoUpdated=!0,isNaN(e.getTime())?(r=this.defaultDate.getTime(),this._set(`date`,this.defaultDate)):(r=this.date&&this.date.getTime(),this._set(`date`,new Date(e))));let i=a.calculateTimezoneOffset(this.positionTimezoneInfo);if(n!==i&&(s.target=this,s.timezoneOffset=i,this.emit(`timezone-will-change`,s),s.target=null),e!=null)return isNaN(e.getTime())||r!==e.getTime()}clone(){let e=this._get(`date`)===this._get(`defaultDate`),t=new a({...this.cloneConstructProperties(),defaultDate:this.defaultDate,cameraTrackingEnabled:this.cameraTrackingEnabled});return e&&t._set(`date`,t._get(`defaultDate`)),t.positionTimezoneInfo.autoUpdated=this.positionTimezoneInfo.autoUpdated,t.positionTimezoneInfo.hours=this.positionTimezoneInfo.hours,t.positionTimezoneInfo.minutes=this.positionTimezoneInfo.minutes,t.positionTimezoneInfo.seconds=this.positionTimezoneInfo.seconds,t}cloneWithWebsceneLighting(e){let t=this.clone();return e.date!=null&&(t.date=e.date),t.directShadowsEnabled=e.directShadowsEnabled,t.glow=e.glow?.clone(),t.displayUTCOffset=e.displayUTCOffset,t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};e([n({type:Boolean})],o.prototype,`cameraTrackingEnabled`,void 0),e([n({type:Date})],o.prototype,`defaultDate`,null),e([n({type:Date})],o.prototype,`date`,null),e([n({readOnly:!0,type:[`sun`],json:{write:!0}})],o.prototype,`type`,void 0),o=a=e([r(`esri.views.3d.environment.SunLighting`)],o);const s={target:null,timezoneOffset:0},c=o;export{c as default};
2
+ import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../../core/Evented.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"../../../webscene/SunLighting.js";var a;let o=a=class extends t(i){static calculateTimezoneOffset({hours:e,minutes:t,seconds:n}){return Math.round(e+t/60+n/3600)}constructor(e){super(e),this.cameraTrackingEnabled=!0,this.globalIllumination=!1,this.positionTimezoneInfo={hours:0,minutes:0,seconds:0,autoUpdated:!0},this.type=`sun`;let t=new Date().getFullYear(),n=new Date(`March 15, `+t+` 12:00:00 UTC`);this._set(`defaultDate`,n),this._set(`date`,n)}get defaultDate(){return new Date(this._get(`defaultDate`))}static fromWebsceneLighting(e){return new a(e.cloneConstructProperties())}set defaultDate(e){let t=this._get(`date`)===this._get(`defaultDate`);e=new Date(e),this._set(`defaultDate`,e),t&&this._set(`date`,e)}set date(e){e!=null&&(this.positionTimezoneInfo.autoUpdated=!1,this._set(`date`,new Date(e)))}autoUpdate(e,t){let n=a.calculateTimezoneOffset(this.positionTimezoneInfo);this.positionTimezoneInfo.hours=t.hours,this.positionTimezoneInfo.minutes=t.minutes,this.positionTimezoneInfo.seconds=t.seconds;let r=null;e!=null&&(this.positionTimezoneInfo.autoUpdated=!0,isNaN(e.getTime())?(r=this.defaultDate.getTime(),this._set(`date`,this.defaultDate)):(r=this.date&&this.date.getTime(),this._set(`date`,new Date(e))));let i=a.calculateTimezoneOffset(this.positionTimezoneInfo);if(n!==i&&(s.target=this,s.timezoneOffset=i,this.emit(`timezone-will-change`,s),s.target=null),e!=null)return isNaN(e.getTime())||r!==e.getTime()}clone(){let e=this._get(`date`)===this._get(`defaultDate`),t=new a({...this.cloneConstructProperties(),...this.cloneNonPersistentConstructProperties(),defaultDate:this.defaultDate});return e&&t._set(`date`,t._get(`defaultDate`)),t.positionTimezoneInfo.autoUpdated=this.positionTimezoneInfo.autoUpdated,t.positionTimezoneInfo.hours=this.positionTimezoneInfo.hours,t.positionTimezoneInfo.minutes=this.positionTimezoneInfo.minutes,t.positionTimezoneInfo.seconds=this.positionTimezoneInfo.seconds,t}cloneWithWebsceneLighting(e){let t=this.clone();return e.date!=null&&(t.date=e.date),t.directShadowsEnabled=e.directShadowsEnabled,t.glow=e.glow?.clone(),t.displayUTCOffset=e.displayUTCOffset,t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled,globalIllumination:this.globalIllumination}}};e([n({type:Boolean})],o.prototype,`cameraTrackingEnabled`,void 0),e([n({type:Boolean})],o.prototype,`globalIllumination`,void 0),e([n({type:Date})],o.prototype,`defaultDate`,null),e([n({type:Date})],o.prototype,`date`,null),e([n({readOnly:!0,type:[`sun`],json:{write:!0}})],o.prototype,`type`,void 0),o=a=e([r(`esri.views.3d.environment.SunLighting`)],o);const s={target:null,timezoneOffset:0},c=o;export{c as default};
@@ -2,7 +2,7 @@ import type WebSceneVirtualLighting from "../../../webscene/VirtualLighting.js";
2
2
  import type { EventedMixin } from "../../../core/Evented.js";
3
3
  import type { VirtualLightingProperties as WebSceneVirtualLightingProperties } from "../../../webscene/VirtualLighting.js";
4
4
 
5
- export interface VirtualLightingProperties extends WebSceneVirtualLightingProperties {}
5
+ export interface VirtualLightingProperties extends WebSceneVirtualLightingProperties, Partial<Pick<VirtualLighting, "globalIllumination">> {}
6
6
 
7
7
  /**
8
8
  * The VirtualLighting class allows you to change the lighting in the scene to virtual light. The position of the light
@@ -41,6 +41,22 @@ export interface VirtualLightingProperties extends WebSceneVirtualLightingProper
41
41
  */
42
42
  export default class VirtualLighting extends VirtualLightingSuperclass {
43
43
  constructor(properties?: VirtualLightingProperties);
44
+ /**
45
+ * Enables global illumination for more realistic lighting in the scene. Emissive materials illuminate nearby
46
+ * surfaces, while areas where surrounding objects block ambient light receive more natural shading.
47
+ *
48
+ * **Known limitations**
49
+ *
50
+ * - Is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/).
51
+ * - Is disabled at high camera altitudes.
52
+ * - May produce temporarily noisy lighting after camera or scene changes.
53
+ * - May reduce rendering performance.
54
+ *
55
+ * @default false
56
+ * @beta
57
+ * @since 5.2
58
+ */
59
+ accessor globalIllumination: boolean;
44
60
  /**
45
61
  * Indicates that the light source is virtual light. Virtual light is top - right position respect to the camera
46
62
  * enabling user to observe the scene independant to the possition of the sun.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../../core/Evented.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"../../../webscene/VirtualLighting.js";var a;let o=a=class extends t(i){constructor(e){super(e),this.cameraTrackingEnabled=!0,this.type=`virtual`}clone(){return new a({...this.cloneConstructProperties(),cameraTrackingEnabled:this.cameraTrackingEnabled})}static fromWebsceneLighting(e){return new a(e.cloneConstructProperties())}cloneWithWebsceneLighting(e){let t=this.clone();return t.directShadowsEnabled=e.directShadowsEnabled,t.glow=e.glow?.clone(),t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled}}};e([n({type:Boolean})],o.prototype,`cameraTrackingEnabled`,void 0),e([n({readOnly:!0,type:[`virtual`],json:{write:{isRequired:!0}}})],o.prototype,`type`,void 0),o=a=e([r(`esri.views.3d.environment.VirtualLighting`)],o);const s=o;export{s as default};
2
+ import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../../core/Evented.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"../../../webscene/VirtualLighting.js";var a;let o=a=class extends t(i){constructor(e){super(e),this.cameraTrackingEnabled=!0,this.globalIllumination=!1,this.type=`virtual`}clone(){return new a({...this.cloneConstructProperties(),...this.cloneNonPersistentConstructProperties()})}static fromWebsceneLighting(e){return new a(e.cloneConstructProperties())}cloneWithWebsceneLighting(e){let t=this.clone();return t.directShadowsEnabled=e.directShadowsEnabled,t.glow=e.glow?.clone(),t}cloneNonPersistentConstructProperties(){return{cameraTrackingEnabled:this.cameraTrackingEnabled,globalIllumination:this.globalIllumination}}};e([n({type:Boolean})],o.prototype,`cameraTrackingEnabled`,void 0),e([n({type:Boolean})],o.prototype,`globalIllumination`,void 0),e([n({readOnly:!0,type:[`virtual`],json:{write:{isRequired:!0}}})],o.prototype,`type`,void 0),o=a=e([r(`esri.views.3d.environment.VirtualLighting`)],o);const s=o;export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{NestedMap as e}from"../../../../core/NestedMap.js";function t(t){let i=new e;if(i.set(2,4,!0),i.set(2,0,!0),i.set(2,2,!0),i.set(2,1,!0),i.set(2,8,!0),i.set(2,12,!0),t===`high`){let e=has(`disable-feature:global-illumination`)?3:11;i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0),e===11&&i.set(2,10,!0)}else i.set(2,3,!0);if(t!==`low`&&(i.set(2,5,!0),i.set(2,6,!0)),t===`medium`)for(let e of n)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);else if(t===`high`)for(let e of r)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);return i}const n=[9,7],r=[...n,0,2,4];export{t as setupFeatureDefaults};
2
+ import{NestedMap as e}from"../../../../core/NestedMap.js";function t(t){let i=new e;if(i.set(2,0,!0),i.set(2,8,!0),i.set(2,12,!0),i.set(2,2,!0),i.set(2,1,!0),i.set(2,3,!0),i.set(2,4,!0),t!==`low`&&(i.set(2,5,!0),i.set(2,6,!0)),t===`medium`)for(let e of n)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);else if(t===`high`)for(let e of r)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);return i}const n=[9,7],r=[...n,0,2,3,4];export{t as setupFeatureDefaults};