@arcgis/core 4.29.0-next.20240112 → 4.29.0-next.20240115

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 (139) hide show
  1. package/Graphic.js +1 -1
  2. package/Map.js +1 -1
  3. package/UndoRedo.js +5 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0d008558effc8d64328e.js +1 -0
  6. package/assets/esri/core/workers/chunks/{4fcd94fbf7c68996ad31.js → 0fa3965c79e56ee2f8d3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0fdceb1c9538e2bb4413.js +1 -0
  8. package/assets/esri/core/workers/chunks/1c8cb357271e11bfc5ce.js +1 -0
  9. package/assets/esri/core/workers/chunks/1f94ed960f3a9c5654f5.js +1 -0
  10. package/assets/esri/core/workers/chunks/230282d53b48f0d0a483.js +1 -0
  11. package/assets/esri/core/workers/chunks/319c76de771be355b8c9.js +1 -0
  12. package/assets/esri/core/workers/chunks/32ca8e140a0923f4817d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{96750d73c5c078845826.js → 3ea748231b60e6a32d32.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d50bbf3e8565488665be.js → 4945d56f31669e1d0d2c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/52f19a0b4636abb9c787.js +1 -0
  16. package/assets/esri/core/workers/chunks/{1187ba315883ff27e2d9.js → 579e2d4ba2f65dab87c0.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5f88d06f8bd0f8d98471.js +1 -0
  18. package/assets/esri/core/workers/chunks/630e42309fad5f2bd97e.js +1 -0
  19. package/assets/esri/core/workers/chunks/63c14c2087dd8e85bef8.js +1 -0
  20. package/assets/esri/core/workers/chunks/6799472ddd7ab1e40227.js +1 -0
  21. package/assets/esri/core/workers/chunks/69c4dcda9aa06e5812e6.js +1 -0
  22. package/assets/esri/core/workers/chunks/78552ee06c4417d27a66.js +1 -0
  23. package/assets/esri/core/workers/chunks/{7ed62b2563ef76774bcd.js → 823b6aaddcec3a1a20db.js} +1 -1
  24. package/assets/esri/core/workers/chunks/8f85edf7e7b7e58fe435.js +1 -0
  25. package/assets/esri/core/workers/chunks/{bc6ea23ce4c3bb0d63fb.js → 966b157451e9b6bcfc6f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/99ffd8e8d2b812fc4315.js +1 -0
  27. package/assets/esri/core/workers/chunks/a1086ebe1a19bc199e31.js +1 -0
  28. package/assets/esri/core/workers/chunks/{dcfc48bf5c27774fa05c.js → a57fbd677e7147429527.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b66c1067295da709b3f5.js +1 -0
  30. package/assets/esri/core/workers/chunks/b816d5c848a999d38f7d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{955647d1032d047a8112.js → bc07516b9038d04b433b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{06e764b311ef6280f5ef.js → cbb7192429ee1d4b00a6.js} +1 -1
  33. package/assets/esri/core/workers/chunks/ccb75ccf1ea40e428bcd.js +1 -0
  34. package/assets/esri/core/workers/chunks/cd915f44d22053e9f414.js +1 -0
  35. package/assets/esri/core/workers/chunks/cfcd69e67eb0c96192c1.js +1 -0
  36. package/assets/esri/core/workers/chunks/d0182f765f1ec0c86ac3.js +1 -0
  37. package/assets/esri/core/workers/chunks/{0f034f90e18dee1358f1.js → d3b155fbbbb06334248c.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{307bf149961b50f71923.js → eccab484fb7211d765d2.js} +1 -1
  39. package/assets/esri/core/workers/chunks/f420b24b1986ea15dc55.js +1 -0
  40. package/assets/esri/core/workers/chunks/{16060120af544bf3d7df.js → fbf359935ac5e33352eb.js} +1 -1
  41. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  42. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  43. package/chunks/lyr3DWorker.js +1 -1
  44. package/core/MemCache.js +1 -1
  45. package/core/PooledArray.js +1 -1
  46. package/core/accessorSupport/Properties.js +1 -1
  47. package/geometry/support/heightModelInfoUtils.js +1 -1
  48. package/layers/CatalogLayer.js +5 -0
  49. package/layers/WFSLayer.js +1 -1
  50. package/layers/catalog/CatalogDynamicGroupLayer.js +5 -0
  51. package/layers/catalog/CatalogFootprintLayer.js +5 -0
  52. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  53. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  54. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  55. package/layers/mixins/operationalLayers.js +1 -1
  56. package/layers/save/featureLayerUtils.js +1 -1
  57. package/layers/support/layerUtils.js +1 -1
  58. package/layers/support/layersCreator.js +1 -1
  59. package/layers/support/lazyLayerLoader.js +1 -1
  60. package/package.json +2 -2
  61. package/portal/support/layersLoader.js +1 -1
  62. package/portal/support/loadUtils.js +1 -1
  63. package/portal/support/portalLayers.js +1 -1
  64. package/renderers/support/HeatmapColorStop.js +1 -1
  65. package/request.js +1 -1
  66. package/support/revision.js +1 -1
  67. package/undoredo/OperationStatus.js +5 -0
  68. package/undoredo/UndoRedoError.js +5 -0
  69. package/undoredo/UndoableOperation.js +5 -0
  70. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  71. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  72. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  73. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  76. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  78. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  79. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  80. package/views/2d/layerViewModuleImportUtils.js +1 -1
  81. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +5 -0
  82. package/views/2d/layers/CatalogFootprintLayerView2D.js +5 -0
  83. package/views/2d/layers/CatalogLayerView2D.js +5 -0
  84. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  85. package/views/2d/layers/LayerView2D.js +1 -1
  86. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  87. package/views/2d/layers/features/FeatureContainer.js +1 -1
  88. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +5 -0
  89. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  90. package/views/3d/effects/RenderNode.js +1 -1
  91. package/views/3d/externalRenderers/ExternalRenderNode.js +1 -1
  92. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  93. package/views/3d/layerViewModuleImportUtils.js +1 -1
  94. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  95. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  96. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  97. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  98. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  99. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  100. package/views/3d/webgl-engine/materials/renderers/BufferRange.js +1 -1
  101. package/views/SelectionManager.js +5 -0
  102. package/views/View.js +1 -1
  103. package/views/draw/DrawGraphicTool.js +1 -1
  104. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  105. package/views/layers/FeatureLayerView.js +1 -1
  106. package/views/layers/RefreshableLayerView.js +1 -1
  107. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  108. package/widgets/Editor/EditorViewModel.js +1 -1
  109. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  110. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  111. package/widgets/Editor/UpdateWorkflow.js +1 -1
  112. package/widgets/Editor/components/PanelToolbar.js +1 -1
  113. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  114. package/widgets/Editor/workflowUtils.js +1 -1
  115. package/widgets/Editor.js +1 -1
  116. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  117. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  118. package/assets/esri/core/workers/chunks/0e62882297519fe58e94.js +0 -1
  119. package/assets/esri/core/workers/chunks/14976138bec995faffa9.js +0 -1
  120. package/assets/esri/core/workers/chunks/303880e6f6cda8bf482b.js +0 -1
  121. package/assets/esri/core/workers/chunks/312a66e928e8badad2be.js +0 -1
  122. package/assets/esri/core/workers/chunks/337ea84b56854a058190.js +0 -1
  123. package/assets/esri/core/workers/chunks/4238a1bfb0fe285a9893.js +0 -1
  124. package/assets/esri/core/workers/chunks/46226afc5887bfc779ca.js +0 -1
  125. package/assets/esri/core/workers/chunks/4a1c1b1b28ff6de42036.js +0 -1
  126. package/assets/esri/core/workers/chunks/52c4f5b855890dce9a71.js +0 -1
  127. package/assets/esri/core/workers/chunks/5bac88bbda7f0be30625.js +0 -1
  128. package/assets/esri/core/workers/chunks/607b61026ec6b6f23adf.js +0 -1
  129. package/assets/esri/core/workers/chunks/7788fe7b664595a75189.js +0 -1
  130. package/assets/esri/core/workers/chunks/77e0629e930f2142b0c8.js +0 -1
  131. package/assets/esri/core/workers/chunks/791800b89a210e07bfd2.js +0 -1
  132. package/assets/esri/core/workers/chunks/8c366309e7e51120953c.js +0 -1
  133. package/assets/esri/core/workers/chunks/9154e282f38ccbfdb7fc.js +0 -1
  134. package/assets/esri/core/workers/chunks/9e297d5c803c9f51bebb.js +0 -1
  135. package/assets/esri/core/workers/chunks/ac104a7b349df335ae32.js +0 -1
  136. package/assets/esri/core/workers/chunks/d65160cc11b774fcee28.js +0 -1
  137. package/assets/esri/core/workers/chunks/de16e93e8944c1e5e530.js +0 -1
  138. package/assets/esri/core/workers/chunks/df95245111ea4f40d630.js +0 -1
  139. package/assets/esri/core/workers/chunks/eb0091db3888963ecacb.js +0 -1
package/Graphic.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"./chunks/tslib.es6.js";import{geometryTypes as e}from"./geometry.js";import r from"./PopupTemplate.js";import{symbolTypes as o}from"./symbols.js";import{ClonableMixin as s}from"./core/Clonable.js";import{isSerializable as i,JSONSupport as l}from"./core/JSONSupport.js";import{generateUID as a}from"./core/uid.js";import{property as n}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import"./core/Logger.js";import"./core/RandomLCG.js";import{subclass as p}from"./core/accessorSupport/decorators/subclass.js";import{fromJSON as u}from"./geometry/support/jsonUtils.js";var y;function g(t){if(!t)return null;const e={};for(const r in t){const o=u(t[r]);o&&(e[r]=o)}return 0!==Object.keys(e).length?e:null}function m(t){if(null==t)return null;const e={};for(const r in t){const o=t[r];o&&(e[r]=o.toJSON())}return 0!==Object.keys(e).length?e:null}let h=y=class extends(s(l)){constructor(...t){super(...t),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:a(),configurable:!0})}normalizeCtorArgs(t,e,r,o){return t&&!t.declaredClass?t:{geometry:t,symbol:e,attributes:r,popupTemplate:o}}set aggregateGeometries(t){const e=this._get("aggregateGeometries");JSON.stringify(e)!==JSON.stringify(t)&&this._set("aggregateGeometries",t)}set attributes(t){const e=this._get("attributes");e!==t&&(this._set("attributes",t),this._notifyLayer("attributes",e,t))}set geometry(t){const e=this._get("geometry");e!==t&&(this._set("geometry",t),this._notifyLayer("geometry",e,t))}set symbol(t){const e=this._get("symbol");e!==t&&(this._set("symbol",t),this._notifyLayer("symbol",e,t))}set visible(t){const e=this._get("visible");e!==t&&(this._set("visible",t),this._notifyLayer("visible",e,t))}cloneShallow(){return new y({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(t=!1){if(this.popupTemplate)return this.popupTemplate;for(const e of[this.sourceLayer,this.layer])if(e){if("popupTemplate"in e&&e.popupTemplate)return e.popupTemplate;if(t&&"defaultPopupTemplate"in e&&null!=e.defaultPopupTemplate)return e.defaultPopupTemplate}return null}getAttribute(t){return this.attributes?.[t]}setAttribute(t,e){if(this.attributes){const r=this.getAttribute(t);this.attributes[t]=e,this._notifyLayer("attributes",r,e,t)}else this.attributes={[t]:e},this._notifyLayer("attributes",void 0,e,t)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:m(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:i(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(t={}){const{geometry:e}=this;if("mesh"===e?.type){const r={origin:e.origin,transform:e.transform};this._notifyLayer("origin-transform",r,r,t.action)}}_notifyLayer(t,e,r,o){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:t,oldValue:e,newValue:r};"origin-transform"===t&&(s.action=o),"attributes"===t&&(s.attributeName=o),this.layer.graphicChanged(s)}};t([n({value:null,json:{read:g}})],h.prototype,"aggregateGeometries",null),t([n({value:null})],h.prototype,"attributes",null),t([n({value:null,types:e,json:{read:u}})],h.prototype,"geometry",null),t([n({type:Boolean})],h.prototype,"isAggregate",void 0),t([n({clonable:"reference"})],h.prototype,"layer",void 0),t([n({clonable:"reference"})],h.prototype,"origin",void 0),t([n({type:r})],h.prototype,"popupTemplate",void 0),t([n({clonable:"reference"})],h.prototype,"sourceLayer",void 0),t([n({value:null,types:o})],h.prototype,"symbol",null),t([n({type:Boolean,value:!0})],h.prototype,"visible",null),h=y=t([p("esri.Graphic")],h),function(t){t.generateUID=a}(h||(h={}));const c=h;export{c as default};
5
+ import{_ as t}from"./chunks/tslib.es6.js";import{geometryTypes as e}from"./geometry.js";import r from"./PopupTemplate.js";import{symbolTypes as o}from"./symbols.js";import{ClonableMixin as s}from"./core/Clonable.js";import{isSerializable as i,JSONSupport as l}from"./core/JSONSupport.js";import{generateUID as a}from"./core/uid.js";import{property as n}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import"./core/Logger.js";import"./core/RandomLCG.js";import{subclass as p}from"./core/accessorSupport/decorators/subclass.js";import{fromJSON as u}from"./geometry/support/jsonUtils.js";var y;function g(t){if(!t)return null;const e={};for(const r in t){const o=u(t[r]);o&&(e[r]=o)}return 0!==Object.keys(e).length?e:null}function m(t){if(null==t)return null;const e={};for(const r in t){const o=t[r];o&&(e[r]=o.toJSON())}return 0!==Object.keys(e).length?e:null}let h=y=class extends(s(l)){constructor(...t){super(...t),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:a(),configurable:!0})}normalizeCtorArgs(t,e,r,o){return t&&!t.declaredClass?t:{geometry:t,symbol:e,attributes:r,popupTemplate:o}}set aggregateGeometries(t){const e=this._get("aggregateGeometries");JSON.stringify(e)!==JSON.stringify(t)&&this._set("aggregateGeometries",t)}set attributes(t){const e=this._get("attributes");e!==t&&(this._set("attributes",t),this._notifyLayer("attributes",e,t))}set geometry(t){const e=this._get("geometry");e!==t&&(this._set("geometry",t),this._notifyLayer("geometry",e,t))}set symbol(t){const e=this._get("symbol");e!==t&&(this._set("symbol",t),this._notifyLayer("symbol",e,t))}set visible(t){const e=this._get("visible");e!==t&&(this._set("visible",t),this._notifyLayer("visible",e,t))}cloneShallow(){return new y({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(t=!1){if(this.popupTemplate)return this.popupTemplate;const e=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[e,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(t&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(t){return this.attributes?.[t]}setAttribute(t,e){if(this.attributes){const r=this.getAttribute(t);this.attributes[t]=e,this._notifyLayer("attributes",r,e,t)}else this.attributes={[t]:e},this._notifyLayer("attributes",void 0,e,t)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:m(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:i(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(t={}){const{geometry:e}=this;if("mesh"===e?.type){const r={origin:e.origin,transform:e.transform};this._notifyLayer("origin-transform",r,r,t.action)}}_notifyLayer(t,e,r,o){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:t,oldValue:e,newValue:r};"origin-transform"===t&&(s.action=o),"attributes"===t&&(s.attributeName=o),this.layer.graphicChanged(s)}};t([n({value:null,json:{read:g}})],h.prototype,"aggregateGeometries",null),t([n({value:null})],h.prototype,"attributes",null),t([n({value:null,types:e,json:{read:u}})],h.prototype,"geometry",null),t([n({type:Boolean})],h.prototype,"isAggregate",void 0),t([n({clonable:"reference"})],h.prototype,"layer",void 0),t([n({clonable:"reference"})],h.prototype,"origin",void 0),t([n({type:r})],h.prototype,"popupTemplate",void 0),t([n({clonable:"reference"})],h.prototype,"sourceLayer",void 0),t([n({value:null,types:o})],h.prototype,"symbol",null),t([n({type:Boolean,value:!0})],h.prototype,"visible",null),h=y=t([p("esri.Graphic")],h),function(t){t.generateUID=a}(h||(h={}));const c=h;export{c as default};
package/Map.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"./chunks/tslib.es6.js";import e from"./Basemap.js";import r from"./Ground.js";import t from"./core/Accessor.js";import o from"./core/CollectionFlattener.js";import a from"./core/Evented.js";import{destroyMaybe as i}from"./core/maybe.js";import{property as p}from"./core/accessorSupport/decorators/property.js";import{cast as l}from"./core/accessorSupport/decorators/cast.js";import"./core/RandomLCG.js";import"./core/has.js";import{subclass as n}from"./core/accessorSupport/decorators/subclass.js";import{isEditableLayer as m}from"./layers/support/editableLayers.js";import{createCache as d,destroyCache as c,ensureType as u}from"./support/basemapUtils.js";import{createFlattenedTablesCollection as y}from"./support/collectionUtils.js";import{ensureType as h}from"./support/groundUtils.js";import{LayersMixin as b}from"./support/LayersMixin.js";import{TablesMixin as f}from"./support/TablesMixin.js";let j=class extends(f(b(a.EventedMixin(t)))){constructor(s){super(s),this.allLayers=new o({getCollections:()=>[this.basemap?.baseLayers,this.ground?.layers,this.layers,this.basemap?.referenceLayers],getChildrenFunction:s=>"layers"in s?s.layers:null}),this.allTables=y(this),this.basemap=null,this.editableLayers=new o({getCollections:()=>[this.allLayers],itemFilterFunction:m}),this.ground=new r,this._basemapCache=d()}destroy(){c(this._basemapCache),this._basemapCache=null,this.allLayers.destroy(),this.allTables.destroy(),this.editableLayers.destroy(),this.basemap=i(this.basemap),i(this.ground),this._set("ground",null)}castBasemap(s){return u(s,this._basemapCache)}castGround(s){const e=h(s);return e??this._get("ground")}findLayerById(s){return this.allLayers.find((e=>e.id===s))}findTableById(s){return this.allTables.find((e=>e.id===s))}};s([p({readOnly:!0,dependsOn:[]})],j.prototype,"allLayers",void 0),s([p({readOnly:!0})],j.prototype,"allTables",void 0),s([p({type:e,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],j.prototype,"basemap",void 0),s([l("basemap")],j.prototype,"castBasemap",null),s([p({readOnly:!0})],j.prototype,"editableLayers",void 0),s([p({type:r,nonNullable:!0})],j.prototype,"ground",void 0),s([l("ground")],j.prototype,"castGround",null),j=s([n("esri.Map")],j);const L=j;export{L as default};
5
+ import{_ as e}from"./chunks/tslib.es6.js";import s from"./Basemap.js";import r from"./Ground.js";import t from"./core/Accessor.js";import o from"./core/CollectionFlattener.js";import a from"./core/Evented.js";import{destroyMaybe as i}from"./core/maybe.js";import{property as p}from"./core/accessorSupport/decorators/property.js";import{cast as l}from"./core/accessorSupport/decorators/cast.js";import"./core/RandomLCG.js";import"./core/has.js";import{subclass as n}from"./core/accessorSupport/decorators/subclass.js";import{isEditableLayer as m}from"./layers/support/editableLayers.js";import{createCache as d,destroyCache as c,ensureType as u}from"./support/basemapUtils.js";import{createFlattenedTablesCollection as y}from"./support/collectionUtils.js";import{ensureType as h}from"./support/groundUtils.js";import{LayersMixin as b}from"./support/LayersMixin.js";import{TablesMixin as f}from"./support/TablesMixin.js";let j=class extends(f(b(a.EventedMixin(t)))){constructor(e){super(e),this.allLayers=new o({getCollections:()=>[this.basemap?.baseLayers,this.ground?.layers,this.layers,this.basemap?.referenceLayers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=y(this),this.basemap=null,this.editableLayers=new o({getCollections:()=>[this.allLayers],itemFilterFunction:m}),this.ground=new r,this._basemapCache=d()}destroy(){c(this._basemapCache),this._basemapCache=null,this.allLayers.destroy(),this.allTables.destroy(),this.editableLayers.destroy(),this.basemap=i(this.basemap),i(this.ground),this._set("ground",null)}castBasemap(e){return u(e,this._basemapCache)}castGround(e){const s=h(e);return s??this._get("ground")}findLayerById(e){return this.allLayers.find((s=>s.id===e))}findTableById(e){return this.allTables.find((s=>s.id===e))}};e([p({readOnly:!0,dependsOn:[]})],j.prototype,"allLayers",void 0),e([p({readOnly:!0})],j.prototype,"allTables",void 0),e([p({type:s,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],j.prototype,"basemap",void 0),e([l("basemap")],j.prototype,"castBasemap",null),e([p({readOnly:!0})],j.prototype,"editableLayers",void 0),e([p({type:r,nonNullable:!0})],j.prototype,"ground",void 0),e([l("ground")],j.prototype,"castGround",null),e([p()],j.prototype,"undoRedo",void 0),j=e([n("esri.Map")],j);const L=j;export{L as default};
package/UndoRedo.js ADDED
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
+ */
5
+ import{_ as t}from"./chunks/tslib.es6.js";import s from"./core/Accessor.js";import i from"./core/Collection.js";import{whenOnce as o}from"./core/reactiveUtils.js";import{property as a}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import"./core/Logger.js";import"./core/RandomLCG.js";import{subclass as e}from"./core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"./core/support/UpdatingHandles.js";import{OperationStatus as r}from"./undoredo/OperationStatus.js";import{UndoRedoExecutionMethod as c}from"./undoredo/UndoableOperation.js";import{UndoInvalidError as d,UndoRedoUpdatingError as h,RedoInvalidError as p}from"./undoredo/UndoRedoError.js";let u=class extends s{constructor(){super(...arguments),this._stack=new i,this._stackPosition=-1,this._updatingHandles=new n}get updating(){return this._updatingHandles.updating}get canUndo(){return this.hasUndo&&!this.updating}get hasUndo(){return this._stackPosition>=0}get canRedo(){return this.hasRedo&&!this.updating}get hasRedo(){return this._stackPosition<this._stack.length-1}_truncateForwardStack(){this._stack.splice(this._stackPosition+1,this._stack.length-this._stackPosition).forEach((t=>t.destroy()))}_drainStack(){this._stack.drain((t=>t.destroy())),this._stackPosition=-1}async undo(){if(!this.hasUndo)throw new d;if(this.updating)throw new h;const t=this._stack.getItemAt(this._stackPosition);await this._updatingHandles.addPromise((async()=>{await t.executeUndoRedoOperation(c.Undo),--this._stackPosition,t.canRedo||this._truncateForwardStack()})())}async redo(){if(!this.hasRedo)throw new p;if(this.updating)throw new h;const t=this._stack.getItemAt(this._stackPosition+1);await this._updatingHandles.addPromise((async()=>{await t.executeUndoRedoOperation(c.Redo),++this._stackPosition})())}async inject(t){if(this.updating)throw new h;await this._updatingHandles.addPromise((async()=>{t.status===r.NeverApplied&&await t.executeUndoRedoOperation(c.Apply),t.canUndo?(this._stack.splice(this._stackPosition+1,0,t),this._stackPosition++):this._stackPosition>-1&&(this._stack.splice(0,this._stackPosition+1).forEach((t=>t.destroy())),this._stackPosition=-1)})())}async add(t){if(this.updating)throw new h;await this._updatingHandles.addPromise((async()=>{t.status===r.NeverApplied&&await t.executeUndoRedoOperation(c.Apply),this._stackPosition>-1&&this._truncateForwardStack(),t.canUndo?(this._stack.push(t),this._stackPosition=this._stack.length-1):this._drainStack()})())}async removeTagged(t,s=!1){if(this.updating&&!s)return;await o((()=>!this.updating));const a=new i;for(let i=0;i<this._stack.length;i++){const s=this._stack.getItemAt(i);s.tag===t?(s.destroy(),i===this._stackPosition&&(this._stackPosition=a.length-1)):a.push(s)}this._stack=a,this._stackPosition>a.length-1&&(this._stackPosition=a.length-1)}async clear(t=!1){if(this.updating&&!t)throw new h;await o((()=>!this.updating)),this._drainStack()}};t([a()],u.prototype,"_stack",void 0),t([a()],u.prototype,"_stackPosition",void 0),t([a()],u.prototype,"updating",null),t([a({readOnly:!0})],u.prototype,"canUndo",null),t([a({readOnly:!0})],u.prototype,"hasUndo",null),t([a({readOnly:!0})],u.prototype,"canRedo",null),t([a({readOnly:!0})],u.prototype,"hasRedo",null),u=t([e("esri.UndoRedo")],u);export{u as UndoRedo};