@arcgis/core 5.2.0-next.123 → 5.2.0-next.125
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.
- package/arcade/functions/string.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{83c7c4218bc6ba2f16ee.js → 0a4a5ed831a4e4d8e0fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4e1db4e9e5f13167401.js → 0f8ff964461cf8e0673b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9e5b30b907102bc0c201.js → 0fba5c0e89b057da548d.js} +1 -1
- package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js → 12b5a645c0987a0efe54.js} +2 -2
- package/assets/esri/core/workers/chunks/168b45c5d8233f23793e.js +2 -0
- package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js → 1dbb3e25e005a8220779.js} +2 -2
- package/assets/esri/core/workers/chunks/{eb7f45736c852725b0bb.js → 1f55701d23a5e5a0c70c.js} +1 -1
- package/assets/esri/core/workers/chunks/{c39ebd8d469f1e8bb61e.js → 25e212fe9a2ea37c9e81.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3ab53b534e2872131be.js → 2a34760b3f0c134898ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{216d8cb86548e92a8196.js → 2e3fd81653dc0d86456c.js} +1 -1
- package/assets/esri/core/workers/chunks/378bdb4e5cd1ebada1f4.js +1 -0
- package/assets/esri/core/workers/chunks/3a40146568e6dd0b1828.js +1 -0
- package/assets/esri/core/workers/chunks/{23279303cd7698314c56.js → 3b4ceaf21be540cb3499.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3d48401462ef3bf0ad9.js → 3f082329a544c2c1d62d.js} +1 -1
- package/assets/esri/core/workers/chunks/{45d87af48a21644590c2.js → 4716693eca44e8f89f5c.js} +1 -1
- package/assets/esri/core/workers/chunks/{39985c51465b79ff0910.js → 4f7e8e4ddf52b5245ea4.js} +1 -1
- package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +1 -0
- package/assets/esri/core/workers/chunks/{78c1b75b1a8937eaa3cd.js → 5b9b76e180cf206a8a0c.js} +1 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +1 -0
- package/assets/esri/core/workers/chunks/{2f829321bfbd3bacd64f.js → 6c4def0faaef861a09c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c38ce72160d5a4e4b3d.js → 6cf34cfdd063a1b6fe3e.js} +1 -1
- package/assets/esri/core/workers/chunks/6e8187a77846239ed112.js +2 -0
- package/assets/esri/core/workers/chunks/{52744dfd430cd0c0edfb.js → 78abd6c42f39e6f6ffbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{5993db944b9e7825e0bc.js → 7926faab76a721a2e1c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc0816f064be576a2fa6.js → 7fcee3a1b900ddc9a5e3.js} +1 -1
- package/assets/esri/core/workers/chunks/8190fcb1dd10ad20feed.js +1 -0
- package/assets/esri/core/workers/chunks/84db05e872dbf35c80a2.js +1 -0
- package/assets/esri/core/workers/chunks/85739ed6af0f0a3cb302.js +1 -0
- package/assets/esri/core/workers/chunks/{c3008b20cb5fd38bd900.js → 8a8e94b5d7d153361b0b.js} +1 -1
- package/assets/esri/core/workers/chunks/923c45ebcf45d9ce8ae0.js +1 -0
- package/assets/esri/core/workers/chunks/{8984d02c0ce828fd223a.js → a7ce5b958dfeb240c4a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{770ca70d363184e39d60.js → ab8a1140bf31f46f8ebf.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc923e50958b68a50014.js → b96358d475dc98034aa4.js} +1 -1
- package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +1 -0
- package/assets/esri/core/workers/chunks/{b22de8bf4a4a739bc36d.js → bbaaebe1774a22dba39b.js} +1 -1
- package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js → cfaba0470619786e1ef8.js} +2 -2
- package/assets/esri/core/workers/chunks/{97cd4145c016cf379120.js → cfd56e0a716baf95e17b.js} +1 -1
- package/assets/esri/core/workers/chunks/e35eb93c0fb1f6de8db0.js +1 -0
- package/assets/esri/core/workers/chunks/{20e4277a4a6c57957202.js → f05becec0952a61bc654.js} +1 -1
- package/assets/esri/core/workers/chunks/{59cd139712d919e6a738.js → f0901f9c7135b708434f.js} +1 -1
- package/assets/esri/core/workers/chunks/f4572ad25712d204f258.js +1 -0
- package/assets/esri/core/workers/chunks/{eb780f2dafa14f776166.js → f71ec8a260405ed07958.js} +1 -1
- package/assets/esri/core/workers/chunks/{781fa83e8063b8f685dc.js → fe9582bc2244667e40ab.js} +1 -1
- package/assets/esri/themes/base/_FocusRegionOverlayItem.scss +18 -0
- package/assets/esri/themes/base/_View.scss +4 -0
- package/assets/esri/themes/base/_core.scss +1 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-TW.json +1 -1
- package/chunks/GaussianSplatColorComposition.glsl.js +2 -0
- package/chunks/GaussianSplatEmissionComposition.glsl.js +11 -0
- package/chunks/earcut.js +1 -1
- package/chunks/portal.js +1 -1
- package/config.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/interfaces.d.ts +5 -0
- package/kernel.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/support/TimeInfo.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +2 -2
- package/popup/FeatureContentCollection.d.ts +8 -1
- package/popup/FeatureContentCollection.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/gfxUtils.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/time/timeZoneUtils.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +2 -0
- package/views/3d/navigation/Navigation3D.d.ts +7 -0
- package/views/3d/navigation/Navigation3D.js +1 -1
- package/views/3d/navigation/modes/navigationModeUtils.d.ts +32 -0
- package/views/3d/navigation/modes/navigationModeUtils.js +2 -0
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatColorComposition.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatColorCompositionTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +1 -1
- package/views/3d/webgl-engine/shaders/{GaussianSplatComposition.glsl.js → GaussianSplatEmissionComposition.glsl.js} +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatEmissionCompositionTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/DOMContainer.d.ts +27 -0
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/View.d.ts +10 -1
- package/views/View.js +1 -1
- package/views/input/types.d.ts +46 -0
- package/views/overlay/FocusRegionOverlayItem.js +2 -0
- package/views/webgl/renderState.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -0
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +23 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.d.ts +12 -2
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +11 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/components/Alert.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup/types.d.ts +7 -0
- package/widgets/support/SelectionList/FeatureItem.d.ts +22 -12
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +9 -8
- package/widgets/support/SelectionList/LayerItem.d.ts +18 -24
- package/widgets/support/SelectionList/types.d.ts +1 -1
- package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +0 -2
- package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +0 -1
- package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +0 -2
- package/assets/esri/core/workers/chunks/475906b079f4f1ddacf2.js +0 -1
- package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +0 -1
- package/assets/esri/core/workers/chunks/4f58e0322707f63f5bf2.js +0 -1
- package/assets/esri/core/workers/chunks/724ea2e2843e6dac0a90.js +0 -1
- package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +0 -1
- package/assets/esri/core/workers/chunks/8e102a2e134ce6ce0724.js +0 -1
- package/assets/esri/core/workers/chunks/92c852700ad1006f1e76.js +0 -1
- package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +0 -1
- package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +0 -1
- package/assets/esri/core/workers/chunks/d25210574168ead2f813.js +0 -1
- package/chunks/GaussianSplatComposition.glsl.js +0 -22
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js.LICENSE.txt → 12b5a645c0987a0efe54.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{033debcbf6b3683dc4fe.js.LICENSE.txt → 168b45c5d8233f23793e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{463d69f596d1d34ef275.js.LICENSE.txt → 1dbb3e25e005a8220779.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js.LICENSE.txt → 6e8187a77846239ed112.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js.LICENSE.txt → cfaba0470619786e1ef8.js.LICENSE.txt} +0 -0
package/views/DOMContainer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as e}from"tslib";import{byId as t,reparent as i}from"../core/domUtils.js";import{on as s}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as r,removeMaybe as a}from"../core/maybe.js";import{watch as l,initial as h,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as c,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as g}from"./Attribution.js";import m from"./overlay/FocusRegionOverlayItem.js";import f from"./overlay/ViewOverlay.js";const y=[0,0];function v(e){const t=(e.ownerDocument||window.document).defaultView,i=e.getBoundingClientRect();return y[0]=i.left+(t?.pageXOffset??0),y[1]=i.top+(t?.pageYOffset??0),y}function _(e){e&&(e.textContent="",e.parentNode&&e.parentNode.removeChild(e))}const b="test"===process.env.NODE_ENV,R=b?0:16,w=b?0:750,O=b?0:512,E=2,I=50,C={toggle:"KeyO",resizeLarger:"ArrowUp",resizeSmaller:"ArrowDown",select:new Set(["Enter","Space"])},H=y=>{const b=y;let H=class extends b{constructor(...e){super(...e),this._freqInfo={freq:R,time:w},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new m,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([l(()=>[this.focusRegionEnabled,this.overlay],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled),{initial:!0}),l(()=>this.cursor,e=>{const{surface:t}=this;t&&t.setAttribute("data-cursor",e)}),l(()=>this.navigating,e=>{const{surface:t}=this;t&&t.setAttribute("data-navigating",e.toString())}),l(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),l(()=>[this.width,this.height],([e,t])=>{const{_focusRegionOverlayItem:i}=this;i.backgroundHeight=t,i.backgroundWidth=e,i.updateBoxSize()})])}initialize(){const e=this;this.addHandles([l(()=>this.ui,(e,t)=>this._handleUIChange(e,t),h),e.on("focus",()=>this.notifyChange("focused")),e.on("blur",()=>this.notifyChange("focused")),e.on("key-down",t=>{const{shiftKey:i,altKey:s,code:o,defaultPrevented:n}=t.native,{toggle:r,resizeLarger:a,resizeSmaller:l,select:h}=C,u=this.focusRegionEnabled&&i&&s&&(o===a||o===l);if(!t.repeat||u){if(!n&&i&&s&&o===r)return this._toggleFocusRegion(),void t.preventDefault();if(!n&&u){const{_focusRegionOverlayItem:e}=this;return e.resizeBoxSize(o===a?I:-I),t.preventDefault(),t.native.stopPropagation(),void t.stopPropagation()}!n&&this.focusRegionEnabled&&h.has(o)&&this._selectFocusRegion(t,e)}})])}destroy(){this.destroyed||(this.focusRegionEnabled=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get("container")??null}set container(e){const s=this._get("container"),o=t(e);if(o||"string"!=typeof e||n.getLogger(this).error("#container",`element with id '${e}' not found`),s===o)return;if(this._stopMeasuring(),this.removeHandles("container"),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this._attribution=r(this._attribution),this.root&&(_(this.root),this._set("root",null)),this.userContent&&(i(this.userContent,s),_(this.userContent),this._set("userContent",null))),!o)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);o.classList.add("esri-view");const c=document.createElement("div");c.className="esri-view-user-storage",i(o,c),o.appendChild(c),this._set("userContent",c);const p=document.createElement("div");p.className="esri-view-root",o.insertBefore(p,o.firstChild),this._set("root",p);const m=document.createElement("div");m.className="esri-view-surface",m.setAttribute("role","application"),m.tabIndex=0,p.appendChild(m),this._set("surface",m);const y=new f;p.appendChild(y.surface),this._set("overlay",y),this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled),this.addHandles(l(()=>y.needsRender,e=>{e&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=d({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=a(this._overlayRenderTaskHandle)},h),"container"),this.addHandles([l(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:i})=>{e?(this._attribution||(this._attribution=new g({attributionItems:this.attributionItems,mode:this.attributionMode})),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=i):this._attribution=r(this._attribution)},u)],"container"),this.forceDOMReadyCycle(),this._set("container",o),this._startMeasuring()}get focused(){const e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionEnabled?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get("ui")}set ui(e){const t=this._get("ui");t!==e&&t?.destroy(),this._set("ui",e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,i){const s=this.position;return e-=s?s[0]:0,t-=s?s[1]:0,i?(i[0]=e,i[1]=t):i=[e,t],i}containerToPage(e,t,i){const s=this.position;return e+=s?s[0]:0,t+=s?s[1]:0,i?(i[0]=e,i[1]=t):i=[e,t],i}_updateAria(){const{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){const i=this._makeFocusRegionSelectEvent(e);t.emit("focus-region-select",i),e.preventDefault()}_makeFocusRegionSelectEvent(e){const t={type:"focus-region-select",native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionEnabled=!this.focusRegionEnabled}_updateFocusRegionOverlayItem(){const{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){const{_focusRegionOverlayItem:t,overlay:i}=this,s=e;t.visible=s,i&&(i.removeItem(t),s&&(this._updateFocusRegionOverlayItem(),i.addItem(t)))}_handleUIChange(e,t){this.removeHandles("ui"),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(l(()=>this.root,t=>{if(t){const i=document.createElement("div");t.insertBefore(i,this._attribution?.surface??null),e.container=i}else e.container=null},h),"ui")),this._set("ui",e)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const e=this._freqInfo;e.freq=R,e.time=w;const t=d({prepare:e=>{const i=this._measure(),s=this._freqInfo;if(s.time+=e.deltaTime,i&&(s.freq=R,this._get("resizing")||this._set("resizing",!0)),s.time<s.freq)return;s.time=0;const o=this._position();s.freq=o||i?R:Math.min(w,s.freq*E),!i&&s.freq>=O&&(t.pause(),this._get("resizing")&&this._set("resizing",!1))}}),i=new ResizeObserver(i=>{e.freq=R,e.time=w,t.resume()});null!=this.container&&i.observe(this.container);const n=o(()=>i.disconnect());this.addHandles([s(window,"resize",()=>{e.freq=R,e.time=w,t.resume()}),n,t],"measuring"),this._measure(),this._position()}_measure(){const e=this.container,t=e?e.clientWidth:0,i=e?e.clientHeight:0;if(0===t||0===i)return this.suspended||this._set("suspended",!0),!1;const s=this.width,o=this.height;if(t===s&&i===o)return this.suspended&&this._set("suspended",!1),!1;this._set("width",t),this._set("height",i),this.suspended&&this._set("suspended",!1);return this.emit("resize",{oldWidth:s,oldHeight:o,width:t,height:i}),!0}_position(){const e=this.container,t=this.position,i=e&&v(e);return!!i&&((!t||i[0]!==t[0]||i[1]!==t[1])&&(this._set("position",[i[0],i[1]]),!0))}forceDOMReadyCycle(){}};return e([c()],H.prototype,"_attribution",void 0),e([c()],H.prototype,"aria",void 0),e([c()],H.prototype,"attributionHeight",null),e([c()],H.prototype,"attributionMode",void 0),e([c()],H.prototype,"container",null),e([c({readOnly:!0})],H.prototype,"focused",null),e([c({readOnly:!0})],H.prototype,"height",void 0),e([c()],H.prototype,"focusRegionEnabled",void 0),e([c()],H.prototype,"focusRegion",null),e([c()],H.prototype,"messagesCommon",void 0),e([c({type:f})],H.prototype,"overlay",void 0),e([c({readOnly:!0})],H.prototype,"position",void 0),e([c({readOnly:!0})],H.prototype,"resizing",void 0),e([c({readOnly:!0})],H.prototype,"root",void 0),e([c({value:null,readOnly:!0})],H.prototype,"size",null),e([c({readOnly:!0})],H.prototype,"surface",void 0),e([c({readOnly:!0})],H.prototype,"suspended",void 0),e([c({nonNullable:!0})],H.prototype,"ui",null),e([c({readOnly:!0})],H.prototype,"userContent",void 0),e([c({readOnly:!0})],H.prototype,"width",void 0),e([c()],H.prototype,"widthBreakpoint",void 0),H=e([p("esri.views.DOMContainer")],H),H};export{H as DOMContainer};
|
package/views/PopupView.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export abstract class PopupView {
|
|
|
245
245
|
openPopup(options?: ViewPopupOpenOptions): Promise<void>;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled">;
|
|
248
|
+
export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "diagnostics" | "features" | "featureStream" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled" | "shouldFocus">;
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
251
|
* Options for the [fetchPopupFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#fetchPopupFeatures) method. See properties below for object specifications.
|
package/views/View.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import type { TimeExtentProperties } from "../time/TimeExtent.js";
|
|
|
30
30
|
import type { NavigationProperties } from "./navigation/Navigation.js";
|
|
31
31
|
import type { ThemeProperties } from "./Theme.js";
|
|
32
32
|
|
|
33
|
-
export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "padding">> {
|
|
33
|
+
export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "focusRegionEnabled" | "padding">> {
|
|
34
34
|
/**
|
|
35
35
|
* Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
|
|
36
36
|
*
|
|
@@ -407,6 +407,15 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
|
|
|
407
407
|
* );
|
|
408
408
|
*/
|
|
409
409
|
accessor fatalError: EsriError | null | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* Indicates whether the focus region is currently enabled.
|
|
412
|
+
*
|
|
413
|
+
* Set this property to `true` to show the centered focus region, or `false` to hide it.
|
|
414
|
+
*
|
|
415
|
+
* @default false
|
|
416
|
+
* @since 5.2
|
|
417
|
+
*/
|
|
418
|
+
accessor focusRegionEnabled: boolean;
|
|
410
419
|
/**
|
|
411
420
|
* Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
|
|
412
421
|
*
|
package/views/View.js
CHANGED
|
@@ -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"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{watch as f,sync as w,whenOnce as v,when as _,syncAndInitial as M}from"../core/reactiveUtils.js";import{property as V,subclass as b}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import T from"../geometry/Extent.js";import j from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as L}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as F}from"../support/AnalysesCollection.js";import{GraphicsCollection as x}from"../support/GraphicsCollection.js";import{system as C}from"../time/constants.js";import O from"../time/TimeExtent.js";import{isTimeZoneValid as k}from"../time/timeZoneUtils.js";import H from"./BasemapView.js";import I from"./Magnifier.js";import Z from"./SelectionManager.js";import q from"./Theme.js";import{ToolViewManager as W}from"./ToolViewManager.js";import{GlyphMosaic as A}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as P}from"./3d/support/DefaultHighlights.js";import D from"./input/Input.js";import{ViewEvents as U}from"./input/ViewEvents.js";import z from"./interactive/options/ViewOptions.js";import N from"./navigation/Navigation.js";import{deduplicateAttributionItems as G}from"./support/attributionUtils.js";import{DefaultsFromMap as $}from"./support/DefaultsFromMap.js";import{defaultHighlightName as B}from"./support/HighlightDefaults.js";import J from"./support/HighlightOptions.js";import K from"./support/LayerViewManager.js";import Q from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as X}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as Y}from"./support/WebGLRequirements.js";var ee;let te=class extends(n(m)){static{ee=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new s({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new x,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new I,this.options=new z,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new D,this.navigation=new N,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new U(this),this.requiredFieldsOptions=new Q,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new g,this.handles.add(f(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,ee.views.add(this)):(this._lockedSpatialReference=null,ee.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this._glyphMosaic=new A(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},w)),this.analyses=new F}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,v(()=>this.ready)))),this.basemapView=new H({view:this}),this.layerViewManager=new K({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new W({view:this}),this.selectionManager=new Z({view:this}),this.addHandles([_(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),f(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},M),f(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},w),f(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},M),f(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},M)])}get _layerToLayerviewMapping(){return ee._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||(ee.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get("analyses")}set analyses(e){this._set("analyses",e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get attributionItems(){return this.suspended?[]:G(this._get("attributionItems"),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new $({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get("highlights")??P()}set highlights(e){this._set("highlights",a(e,this._get("highlights"),r.ofType(J)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===B)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;const{map:e,spatialReference:t}=this;return!(this.fatalError||!this._isValid||this._readyCycleForced||!e||h(e)&&!e.loaded||0===this.width||0===this.height||!t||!this._validateSpatialReference(t)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const{_userSpatialReference:e}=this;if(e&&null!==e.vcsWkid)return e;const t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,i=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return i?.equals(t)?i:t}set spatialReference(e){const t=!L(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??C}set timeZone(e){this._userTimeZone=e,k(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},s=p(()=>i.remove(r));return i.add(r),this.addHandles(s),s}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new q}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){const e=Y(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn("#validate()",e.message),e;const t=await X();if(t)throw d.getLogger(this).warn("#validate()",t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(_(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const t=document.createElement("div");t.innerHTML="Unable to display map. WebGL2 support is required.",t.setAttribute("style","font-size: 24px; font-weight: bold;");const i=document.createElement("div");i.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",i.setAttribute("style","font-size: 18px;");const r=document.createElement("a");r.innerHTML="https://esriurl.com/webgl-faq",r.target="_blank",r.setAttribute("style","font-size: 18px;"),r.href="https://esriurl.com/webgl-faq",e.appendChild(t),e.appendChild(i),e.appendChild(r);const s=this.getSurface();s&&s.appendChild(e)}};e([V()],te.prototype,"_userSpatialReference",void 0),e([V()],te.prototype,"activeTool",null),e([V({readOnly:!0})],te.prototype,"allLayerViews",void 0),e([V({readOnly:!0})],te.prototype,"layerviewCollections",null),e([V(R(F,"analyses"))],te.prototype,"analyses",null),e([V()],te.prototype,"animation",null),e([V()],te.prototype,"animationsEnabled",void 0),e([V({readOnly:!0})],te.prototype,"attributionItems",null),e([V()],te.prototype,"attributionVisible",void 0),e([V()],te.prototype,"basemapView",void 0),e([V()],te.prototype,"center",null),e([V()],te.prototype,"defaultsFromMapSettings",null),e([V()],te.prototype,"defaultsFromMap",null),e([V()],te.prototype,"dependencies",void 0),e([V()],te.prototype,"displayFilterEnabled",void 0),e([V({type:T})],te.prototype,"extent",null),e([V()],te.prototype,"fatalError",void 0),e([V(R(x,"graphics"))],te.prototype,"graphics",void 0),e([V({readOnly:!0,type:j})],te.prototype,"heightModelInfo",null),e([V({type:r.ofType(J)})],te.prototype,"highlights",null),e([V({readOnly:!0})],te.prototype,"interacting",null),e([V({constructOnly:!0})],te.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],te.prototype,"navigating",null),e([V({readOnly:!0})],te.prototype,"preconditionsReady",null),e([V({readOnly:!0})],te.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],te.prototype,"layerViews",void 0),e([V()],te.prototype,"resolution",null),e([V({type:I})],te.prototype,"magnifier",void 0),e([V({nonNullable:!0,type:z})],te.prototype,"options",void 0),e([V({value:null,type:t})],te.prototype,"map",null),e([V()],te.prototype,"padding",void 0),e([V({readOnly:!0})],te.prototype,"ready",void 0),e([V({readOnly:!0})],te.prototype,"canZoomIn",null),e([V({readOnly:!0})],te.prototype,"canZoomOut",null),e([V()],te.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],te.prototype,"readyState",null),e([V({type:E})],te.prototype,"spatialReference",null),e([V()],te.prototype,"stationary",null),e([V({type:O})],te.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],te.prototype,"timeZone",null),e([V()],te.prototype,"tools",null),e([V()],te.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],te.prototype,"type",void 0),e([V({type:Number})],te.prototype,"scale",void 0),e([V({readOnly:!0})],te.prototype,"updating",void 0),e([V({readOnly:!0})],te.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],te.prototype,"initialExtent",null),e([V()],te.prototype,"cursor",null),e([V({readOnly:!0})],te.prototype,"input",void 0),e([V({type:N,nonNullable:!0})],te.prototype,"navigation",void 0),e([V()],te.prototype,"layerViewManager",void 0),e([V()],te.prototype,"analysisViewManager",void 0),e([V()],te.prototype,"selectionManager",void 0),e([V()],te.prototype,"width",void 0),e([V()],te.prototype,"height",void 0),e([V({readOnly:!0})],te.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],te.prototype,"size",null),e([V({readOnly:!0})],te.prototype,"suspended",void 0),e([V({readOnly:!0})],te.prototype,"viewEvents",void 0),e([V()],te.prototype,"_isValid",void 0),e([V()],te.prototype,"_readyCycleForced",void 0),e([V()],te.prototype,"_lockedSpatialReference",void 0),e([V()],te.prototype,"_userTimeZone",void 0),e([V()],te.prototype,"_lockedTimeZone",void 0),e([V()],te.prototype,"_userTimeExtent",void 0),e([V()],te.prototype,"_lockedTimeExtent",void 0),e([V({type:q})],te.prototype,"theme",void 0),e([V({readOnly:!0,type:q})],te.prototype,"effectiveTheme",null),e([V({readOnly:!0})],te.prototype,"registeredComponents",void 0),te=ee=e([b("esri.views.View")],te);const ie=globalThis.$arcgis;function re(e){return e.layerViews}ie&&!ie.views&&Object.defineProperty(ie,"views",{configurable:!1,enumerable:!0,writable:!1,value:te.views});export{te as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as u,abortMaybe as y}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{watch as f,sync as w,whenOnce as v,when as _,syncAndInitial as M}from"../core/reactiveUtils.js";import{property as V,subclass as b}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import T from"../geometry/Extent.js";import j from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as L}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as F}from"../support/AnalysesCollection.js";import{GraphicsCollection as x}from"../support/GraphicsCollection.js";import{system as C}from"../time/constants.js";import O from"../time/TimeExtent.js";import{isTimeZoneValid as k}from"../time/timeZoneUtils.js";import H from"./BasemapView.js";import I from"./Magnifier.js";import Z from"./SelectionManager.js";import q from"./Theme.js";import{ToolViewManager as W}from"./ToolViewManager.js";import{GlyphMosaic as A}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as P}from"./3d/support/DefaultHighlights.js";import D from"./input/Input.js";import{ViewEvents as U}from"./input/ViewEvents.js";import z from"./interactive/options/ViewOptions.js";import N from"./navigation/Navigation.js";import{deduplicateAttributionItems as G}from"./support/attributionUtils.js";import{DefaultsFromMap as $}from"./support/DefaultsFromMap.js";import{defaultHighlightName as B}from"./support/HighlightDefaults.js";import J from"./support/HighlightOptions.js";import K from"./support/LayerViewManager.js";import Q from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as X}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as Y}from"./support/WebGLRequirements.js";var ee;let te=class extends(n(m)){static{ee=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new s({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new x,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new I,this.options=new z,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new D,this.navigation=new N,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new U(this),this.requiredFieldsOptions=new Q,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new g,this.handles.add(f(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,ee.views.add(this)):(this._lockedSpatialReference=null,ee.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this._glyphMosaic=new A(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},w)),this.analyses=new F}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,v(()=>this.ready)))),this.basemapView=new H({view:this}),this.layerViewManager=new K({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new W({view:this}),this.selectionManager=new Z({view:this}),this.addHandles([_(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),f(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},M),f(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},w),f(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},M),f(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},M)])}get _layerToLayerviewMapping(){return ee._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||(ee.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=u(this.graphics),this.analyses=u(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=u(this.analysisViewManager),this.toolViewManager=u(this.toolViewManager),this.layerViewManager=u(this.layerViewManager),this.selectionManager=u(this.selectionManager),this.basemapView=u(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=u(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get("analyses")}set analyses(e){this._set("analyses",e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get attributionItems(){return this.suspended?[]:G(this._get("attributionItems"),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new $({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get("highlights")??P()}set highlights(e){this._set("highlights",a(e,this._get("highlights"),r.ofType(J)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===B)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;const{map:e,spatialReference:t}=this;return!(this.fatalError||!this._isValid||this._readyCycleForced||!e||h(e)&&!e.loaded||0===this.width||0===this.height||!t||!this._validateSpatialReference(t)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=y(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const{_userSpatialReference:e}=this;if(e&&null!==e.vcsWkid)return e;const t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,i=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return i?.equals(t)?i:t}set spatialReference(e){const t=!L(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??C}set timeZone(e){this._userTimeZone=e,k(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},s=p(()=>i.remove(r));return i.add(r),this.addHandles(s),s}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new q}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){const e=Y(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn("#validate()",e.message),e;const t=await X();if(t)throw d.getLogger(this).warn("#validate()",t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(_(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const t=document.createElement("div");t.innerHTML="Unable to display map. WebGL2 support is required.",t.setAttribute("style","font-size: 24px; font-weight: bold;");const i=document.createElement("div");i.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",i.setAttribute("style","font-size: 18px;");const r=document.createElement("a");r.innerHTML="https://esriurl.com/webgl-faq",r.target="_blank",r.setAttribute("style","font-size: 18px;"),r.href="https://esriurl.com/webgl-faq",e.appendChild(t),e.appendChild(i),e.appendChild(r);const s=this.getSurface();s&&s.appendChild(e)}};e([V()],te.prototype,"_userSpatialReference",void 0),e([V()],te.prototype,"activeTool",null),e([V({readOnly:!0})],te.prototype,"allLayerViews",void 0),e([V({readOnly:!0})],te.prototype,"layerviewCollections",null),e([V(R(F,"analyses"))],te.prototype,"analyses",null),e([V()],te.prototype,"animation",null),e([V()],te.prototype,"animationsEnabled",void 0),e([V()],te.prototype,"focusRegionEnabled",void 0),e([V({readOnly:!0})],te.prototype,"attributionItems",null),e([V()],te.prototype,"attributionVisible",void 0),e([V()],te.prototype,"basemapView",void 0),e([V()],te.prototype,"center",null),e([V()],te.prototype,"defaultsFromMapSettings",null),e([V()],te.prototype,"defaultsFromMap",null),e([V()],te.prototype,"dependencies",void 0),e([V()],te.prototype,"displayFilterEnabled",void 0),e([V({type:T})],te.prototype,"extent",null),e([V()],te.prototype,"fatalError",void 0),e([V(R(x,"graphics"))],te.prototype,"graphics",void 0),e([V({readOnly:!0,type:j})],te.prototype,"heightModelInfo",null),e([V({type:r.ofType(J)})],te.prototype,"highlights",null),e([V({readOnly:!0})],te.prototype,"interacting",null),e([V({constructOnly:!0})],te.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],te.prototype,"navigating",null),e([V({readOnly:!0})],te.prototype,"preconditionsReady",null),e([V({readOnly:!0})],te.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],te.prototype,"layerViews",void 0),e([V()],te.prototype,"resolution",null),e([V({type:I})],te.prototype,"magnifier",void 0),e([V({nonNullable:!0,type:z})],te.prototype,"options",void 0),e([V({value:null,type:t})],te.prototype,"map",null),e([V()],te.prototype,"padding",void 0),e([V({readOnly:!0})],te.prototype,"ready",void 0),e([V({readOnly:!0})],te.prototype,"canZoomIn",null),e([V({readOnly:!0})],te.prototype,"canZoomOut",null),e([V()],te.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],te.prototype,"readyState",null),e([V({type:E})],te.prototype,"spatialReference",null),e([V()],te.prototype,"stationary",null),e([V({type:O})],te.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],te.prototype,"timeZone",null),e([V()],te.prototype,"tools",null),e([V()],te.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],te.prototype,"type",void 0),e([V({type:Number})],te.prototype,"scale",void 0),e([V({readOnly:!0})],te.prototype,"updating",void 0),e([V({readOnly:!0})],te.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],te.prototype,"initialExtent",null),e([V()],te.prototype,"cursor",null),e([V({readOnly:!0})],te.prototype,"input",void 0),e([V({type:N,nonNullable:!0})],te.prototype,"navigation",void 0),e([V()],te.prototype,"layerViewManager",void 0),e([V()],te.prototype,"analysisViewManager",void 0),e([V()],te.prototype,"selectionManager",void 0),e([V()],te.prototype,"width",void 0),e([V()],te.prototype,"height",void 0),e([V({readOnly:!0})],te.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],te.prototype,"size",null),e([V({readOnly:!0})],te.prototype,"suspended",void 0),e([V({readOnly:!0})],te.prototype,"viewEvents",void 0),e([V()],te.prototype,"_isValid",void 0),e([V()],te.prototype,"_readyCycleForced",void 0),e([V()],te.prototype,"_lockedSpatialReference",void 0),e([V()],te.prototype,"_userTimeZone",void 0),e([V()],te.prototype,"_lockedTimeZone",void 0),e([V()],te.prototype,"_userTimeExtent",void 0),e([V()],te.prototype,"_lockedTimeExtent",void 0),e([V({type:q})],te.prototype,"theme",void 0),e([V({readOnly:!0,type:q})],te.prototype,"effectiveTheme",null),e([V({readOnly:!0})],te.prototype,"registeredComponents",void 0),te=ee=e([b("esri.views.View")],te);const ie=globalThis.$arcgis;function re(e){return e.layerViews}ie&&!ie.views&&Object.defineProperty(ie,"views",{configurable:!1,enumerable:!0,writable:!1,value:te.views});export{te as default};
|
package/views/input/types.d.ts
CHANGED
|
@@ -486,6 +486,44 @@ export interface KeyUpEvent extends ViewEvent<KeyboardEvent> {
|
|
|
486
486
|
key: string;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Event payload for the view's [View.@focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
|
|
491
|
+
*
|
|
492
|
+
* @since 5.2
|
|
493
|
+
*/
|
|
494
|
+
export interface FocusRegionSelectEvent {
|
|
495
|
+
/**
|
|
496
|
+
* The event type.
|
|
497
|
+
*
|
|
498
|
+
* @since 5.2
|
|
499
|
+
*/
|
|
500
|
+
type: "focus-region-select";
|
|
501
|
+
/**
|
|
502
|
+
* The keyboard event that triggered the focus-region popup flow.
|
|
503
|
+
*
|
|
504
|
+
* @since 5.2
|
|
505
|
+
*/
|
|
506
|
+
native: KeyboardEvent;
|
|
507
|
+
/**
|
|
508
|
+
* Indicates whether the default popup behavior has been prevented.
|
|
509
|
+
*
|
|
510
|
+
* @since 5.2
|
|
511
|
+
*/
|
|
512
|
+
defaultPrevented: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Prevents the default focus-region popup behavior.
|
|
515
|
+
*
|
|
516
|
+
* @since 5.2
|
|
517
|
+
*/
|
|
518
|
+
preventDefault(): void;
|
|
519
|
+
/**
|
|
520
|
+
* Prevents the event bubbling up the event chain.
|
|
521
|
+
*
|
|
522
|
+
* @since 5.2
|
|
523
|
+
*/
|
|
524
|
+
stopPropagation(): void;
|
|
525
|
+
}
|
|
526
|
+
|
|
489
527
|
/**
|
|
490
528
|
* Base interface for pointer events emitted by the view.
|
|
491
529
|
*
|
|
@@ -1009,6 +1047,14 @@ export interface ViewEventTypes extends ViewBaseEventTypes {
|
|
|
1009
1047
|
* });
|
|
1010
1048
|
*/
|
|
1011
1049
|
"key-down": KeyDownEvent;
|
|
1050
|
+
/**
|
|
1051
|
+
* Fires before default focus-region popup behavior is executed.
|
|
1052
|
+
*
|
|
1053
|
+
* Call `event.preventDefault()` to cancel default popup behavior and run custom logic.
|
|
1054
|
+
*
|
|
1055
|
+
* @since 5.2
|
|
1056
|
+
*/
|
|
1057
|
+
"focus-region-select": FocusRegionSelectEvent;
|
|
1012
1058
|
/**
|
|
1013
1059
|
* Fires after a keyboard key is released.
|
|
1014
1060
|
*
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import{tsx as o}from"../../widgets/support/widget.js";const r=250,h=50,n=32;function c(t,e){const i=Math.min(t,e);return i-Math.min(2*n,Math.max(0,i-h))}function d(t,e,i=r){const s=c(t,e),o=Math.min(h,s);return Math.min(s,Math.max(o,i))}let a=class extends e{constructor(t){super(t),this.backgroundHeight=0,this.backgroundWidth=0,this.boxSize=0,this.isDecoration=!0,this.visible=!1,this._screenRect={x:0,y:0,width:0,height:0},this._screenRectInputs=null}updateBoxSize(t){this.boxSize=this.getBoxSize(t),this._updateScreenRect()}_updateScreenRect(){const{backgroundWidth:t,backgroundHeight:e}=this,i=this.getBoxSize();this._screenRect={x:t/2-i/2,y:e/2-i/2,width:i,height:i},this._screenRectInputs=[t,e,this.boxSize]}resizeBoxSize(t){this.updateBoxSize(this.getBoxSize()+t)}getBoxSize(t=this.boxSize||r){return d(this.backgroundWidth,this.backgroundHeight,t)}getScreenRect(){const t=this.backgroundWidth,e=this.backgroundHeight,i=this.boxSize,s=this._screenRectInputs,o=s?.[0]===t&&s[1]===e&&s[2]===i?this._screenRect.width:this.getBoxSize();return{x:t/2-o/2,y:e/2-o/2,width:o,height:o}}render(){const{x:t,y:e,width:i}=this.getScreenRect();return o("div",{classes:{"esri-box-overlay-item":!0},styles:{left:"0px",top:"0px",width:"100%",height:"100%",visibility:this.visible?"visible":"hidden"}},o("svg",{styles:{width:"100%",height:"100%"}},o("rect",{classes:{"esri-focus-region-outer-stroke":!0},fill:"none",height:i,width:i,x:t,y:e}),o("rect",{classes:{"esri-focus-region-inner-stroke":!0},fill:"none",height:i,width:i,x:t,y:e})))}renderCanvas(){}};t([i()],a.prototype,"backgroundHeight",void 0),t([i()],a.prototype,"backgroundWidth",void 0),t([i()],a.prototype,"boxSize",void 0),t([i()],a.prototype,"isDecoration",void 0),t([i()],a.prototype,"visible",void 0),a=t([s("esri.views.overlay.FocusRegionOverlayItem")],a);const g=a;export{g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as t}from"../../core/lang.js";function e(t,e,i=32774,n=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:n[0],g:n[1],b:n[2],a:n[3]}}}function i(t,e,i,n,s=32774,l=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:n,opRgb:s,opAlpha:l,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}const n=e(0,771),s=e(1,0),l=e(1,1),r=e(1,771),a=i(770,1,771,771),
|
|
2
|
+
import{clone as t}from"../../core/lang.js";function e(t,e,i=32774,n=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:n[0],g:n[1],b:n[2],a:n[3]}}}function i(t,e,i,n,s=32774,l=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:n,opRgb:s,opAlpha:l,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}const n=e(0,771),s=e(1,0),l=e(1,1),r=e(1,771),a=e(773,1),h=i(770,1,771,771),o=i(0,0,768,0),c=i(0,0,768,1),_={face:1029,mode:2305},d={face:1028,mode:2305},p=t=>2===t?_:1===t?d:null;function u(t,e,i){return{ref:t,readMask:e,stencilFront:i,stencilBack:i}}function g(t,e,i,n){return{ref:t,readMask:e,stencilFront:i,stencilBack:n}}const f={zNear:0,zFar:1},v={r:!0,g:!0,b:!0,a:!0};function I(t){return w.intern(t)}function W(t){return D.intern(t)}function S(t){return A.intern(t)}function b(t){return z.intern(t)}function T(t){return j.intern(t)}function y(t){return N.intern(t)}function O(t){return q.intern(t)}function k(t){return G.intern(t)}function m(t){return J.intern(t)}class B{constructor(t,e){this._makeKey=t,this._makeRef=e,this._interns=new Map}intern(t){if(!t)return null;const e=this._makeKey(t),i=this._interns;return i.has(e)||i.set(e,this._makeRef(t)),i.get(e)??null}}function R(t){return"["+t.join(",")+"]"}const w=new B(C,t=>({__tag:"Blending",...t}));function C(t){return t?R([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const D=new B(F,t=>({__tag:"Culling",...t}));function F(t){return t?R([t.face,t.mode]):null}const A=new B(P,t=>({__tag:"PolygonOffset",...t}));function P(t){return t?R([t.factor,t.units]):null}const z=new B(M,t=>({__tag:"DepthTest",...t}));function M(t){return t?R([t.func]):null}const j=new B(K,t=>({__tag:"StencilTest",...t}));function K(t){return t?R([t.ref,t.readMask,t.stencilFront.compare,t.stencilFront.fail,t.stencilFront.zFail,t.stencilFront.zPass,t.stencilBack.compare,t.stencilBack.fail,t.stencilBack.zFail,t.stencilBack.zPass]):null}const N=new B(x,t=>({__tag:"DepthWrite",...t}));function x(t){return t?R([t.zNear,t.zFar]):null}const q=new B(E,t=>({__tag:"ColorWrite",...t}));function E(t){return t?R([t.r,t.g,t.b,t.a]):null}const G=new B(H,t=>({__tag:"StencilWrite",...t}));function H(t){return t?R([t.mask]):null}const J=new B(L,t=>({blending:I(t.blending),culling:W(t.culling),polygonOffset:S(t.polygonOffset),depthTest:b(t.depthTest),stencilTest:T(t.stencilTest),depthWrite:y(t.depthWrite),colorWrite:O(t.colorWrite),stencilWrite:k(t.stencilWrite)}));function L(t){return t?R([C(t.blending),F(t.culling),P(t.polygonOffset),M(t.depthTest),K(t.stencilTest),x(t.depthWrite),E(t.colorWrite),H(t.stencilWrite)]):null}class Q{constructor(t){this._pipelineInvalid=!0,this._blendingInvalid=!0,this._cullingInvalid=!0,this._polygonOffsetInvalid=!0,this._depthTestInvalid=!0,this._stencilTestInvalid=!0,this._depthWriteInvalid=!0,this._colorWriteInvalid=!0,this._stencilWriteInvalid=!0,this._stateSetters=t}setPipeline(t){(this._pipelineInvalid||t!==this._pipeline)&&(this._setBlending(t.blending),this._setCulling(t.culling),this._setPolygonOffset(t.polygonOffset),this._setDepthTest(t.depthTest),this._setStencilTest(t.stencilTest),this._setDepthWrite(t.depthWrite),this._setColorWrite(t.colorWrite),this._setStencilWrite(t.stencilWrite),this._pipeline=t),this._pipelineInvalid=!1}getPipelineState(){return t(this._pipeline)}invalidateBlending(){this._blendingInvalid=!0,this._pipelineInvalid=!0}invalidateCulling(){this._cullingInvalid=!0,this._pipelineInvalid=!0}invalidatePolygonOffset(){this._polygonOffsetInvalid=!0,this._pipelineInvalid=!0}invalidateDepthTest(){this._depthTestInvalid=!0,this._pipelineInvalid=!0}invalidateStencilTest(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}invalidateDepthWrite(){this._depthWriteInvalid=!0,this._pipelineInvalid=!0}invalidateColorWrite(){this._colorWriteInvalid=!0,this._pipelineInvalid=!0}invalidateStencilWrite(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}_setBlending(t){this._blending=this._setSubState(t,this._blending,this._blendingInvalid,this._stateSetters.setBlending),this._blendingInvalid=!1}_setCulling(t){this._culling=this._setSubState(t,this._culling,this._cullingInvalid,this._stateSetters.setCulling),this._cullingInvalid=!1}_setPolygonOffset(t){this._polygonOffset=this._setSubState(t,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset),this._polygonOffsetInvalid=!1}_setDepthTest(t){this._depthTest=this._setSubState(t,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest),this._depthTestInvalid=!1}_setStencilTest(t){this._stencilTest=this._setSubState(t,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest),this._stencilTestInvalid=!1}_setDepthWrite(t){this._depthWrite=this._setSubState(t,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite),this._depthWriteInvalid=!1}_setColorWrite(t){this._colorWrite=this._setSubState(t,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite),this._colorWriteInvalid=!1}_setStencilWrite(t){this._stencilWrite=this._setSubState(t,this._stencilWrite,this._stencilWriteInvalid,this._stateSetters.setStencilWrite),this._stencilTestInvalid=!1}_setSubState(t,e,i,n){return(i||t!==e)&&(n(t),this._pipelineInvalid=!0),t}}export{Q as StateTracker,l as add,_ as backFaceCullingParams,s as copySource,p as cullingParams,v as defaultColorWrite,f as defaultDepthWrite,n as destinationTimesOneMinusSourceAlpha,d as frontFaceCullingParams,I as makeBlending,O as makeColorWrite,W as makeCulling,b as makeDepthTest,y as makeDepthWrite,m as makePipelineState,S as makePolygonOffset,T as makeStencilTest,k as makeStencilWrite,o as modulateDestination,c as modulateDestinationPreserveAlpha,r as premultipliedAlpha,a as premultipliedAlphaFrontToBack,i as separateBlendingParams,g as separateStencilTestParams,e as simpleBlendingParams,u as simpleStencilTestParams,h as unpremultipliedAlphaToPremultipliedAlpha};
|
|
@@ -124,6 +124,8 @@ export default class FieldInput extends EditableInput<any> {
|
|
|
124
124
|
* @see [@link widgets/BatchAttributeForm/inputs/FieldInput#userInvalid]
|
|
125
125
|
*/
|
|
126
126
|
get touched(): boolean;
|
|
127
|
+
/** The type of input. */
|
|
128
|
+
get type(): "field";
|
|
127
129
|
/**
|
|
128
130
|
* Indicates whether the user has changed the value of this field.
|
|
129
131
|
*
|
package/widgets/Editor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i,deprecatedFunction as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{destroyMaybe as a,abortMaybe as r,mappedFind as n}from"../core/maybe.js";import{watch as l,initial as c,on as d,when as h,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../core/support/UpdatingHandles.js";import w from"../views/interactive/sketch/SketchLabelOptions.js";import v from"../views/interactive/sketch/SketchTooltipOptions.js";import _ from"../views/interactive/sketch/SketchValueOptions.js";import f from"../views/interactive/snapping/SnappingOptions.js";import y from"./Attachments.js";import b from"./BatchAttributeForm.js";import k from"./FeatureForm.js";import M from"./FeatureTemplates.js";import F from"./Spinner.js";import A from"./Widget.js";import S from"./BatchAttributeForm/VisibleElements.js";import{isNextOrLegacyUpdateWorkflow as T,isNextOrLegacyUpdateFeaturesWorkflow as C,isNextOrLegacyUpdateFeatureWorkflow as L}from"./Editor/compatibilityAdapters.js";import{css as E}from"./Editor/css.js";import W from"./Editor/EditorViewModel.js";import{isModelUpload as P}from"./Editor/modelUploadUtils.js";import I from"./Editor/VisibleElements.js";import{findEditorItemForLayer as U,isBatchAttributeFormViewModel as j}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as D,CreateFeaturesPanelContent as V}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as x,FeatureList as O}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as B,FooterActions as N}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as H,Notice as G}from"./Editor/components/Notices.js";import{loadPanelContentComponents as R,PanelContent as z,PanelContentSection as q,PanelContentMessage as K}from"./Editor/components/PanelContent.js";import{PanelToolbar as Z,loadPanelToolbarComponents as $}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as J,Prompt as Q}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as X,UpdateFeaturePanelContent as Y}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as ee,UploadDetails as te}from"./Editor/components/UploadDetails.js";import ie from"./Sketch/CreateToolVisibilityMap.js";import se from"./Sketch/SelectionToolVisibilityMap.js";import oe from"./Sketch/VisibleElements.js";import{loadCalciteComponents as ae}from"./support/componentsUtils.js";import{globalCss as re}from"./support/globalCss.js";import{incrementHeadingLevel as ne,Heading as le}from"./support/Heading.js";import{renderItem as ce}from"./support/ItemList.js";import{connectDelayedLoading as de}from"./support/loaderUtils.js";import he from"./support/SelectionList.js";import me from"./support/SelectionToolbar.js";import{messageBundle as pe,vmEvent as ue,tsx as ge}from"./support/widget.js";import{isLayerItem as we}from"./support/SelectionList/selectionListUtils.js";import ve from"./support/SelectionList/VisibleElements.js";import _e from"./support/SelectionToolbar/VisibleElements.js";const fe=Symbol("sketch-setup-handles");let ye=class extends A{constructor(e,s){super(e,s),this._batchAttributeForm=new b({suppressDeprecationWarning:!0,visibleElements:new S({loadingIndicator:!1})}),this._featureForm=new k({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new y({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new M({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?ge("calcite-icon",{class:E.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new F,this._loading=!1,this._disallowSave=!1,this._selectionList=new he({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!U(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ve({header:!1})}),this._selectionToolbar=new me({visibleElements:new _e({chip:!1})}),this._updatingHandles=new g,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new I,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?ge("div",{class:E.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>ge("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:i},...s)=>{const{visibleElements:o}=this;return ge("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:i,onCalciteFlowItemBack:this._onBack},o.settingsMenu?ge(Z,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showConfirmationPrompt=e=>this._showPromptAndWait(this.messages[e]),this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,i={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&P(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&t.formViewModel?.activeAssociationsInput?this._showPromptAndWait({...i,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(i)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{const{activeWorkflow:e}=this.viewModel;if(T(e)){const t=e.activeWorkflow;C(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{const{activeWorkflow:e}=this.viewModel;if(T(e)){const t=e.activeWorkflow;if(L(t)){const i=t.viewGraphic;i&&e.startSplittingFeature(i,{initialFeature:t.data.edits.initialFeature??i})}}},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,i=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:i.deleteWarningTitle,message:i.deleteWarningMessage,context:"danger",actions:{primary:{label:t(i.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:i.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new W({useLegacyCreateTools:e?.useLegacyCreateTools??"3d"===e?.view?.type,formSystem:e?.formSystem??"legacy"}),this.announceDeprecation=()=>{i(o.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this._batchAttributeForm.showPrompt=this._showPrompt,this._batchAttributeForm.clearPrompt=this._clearPrompt,this.addHandles([l(()=>ne(this.headingLevel),e=>{this._batchAttributeForm.headingLevel=e,this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},c),d(()=>this.viewModel.activeWorkflow,"cancel-request",({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),h(()=>this.viewModel.formViewModel,e=>{j(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},m),h(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},c),h(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),l(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,i,s,o,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=i,this._spinner.viewModel=s,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt,e.showConfirmationPrompt=this._showConfirmationPrompt},c),l(()=>this.view,(e,t)=>{const i=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,i),e?.ui.add(this._spinner,{key:i,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)},c),l(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.batchAttributeForm&&this._batchAttributeForm.set(e.batchAttributeForm),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},c),h(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),h(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),h(()=>this.viewModel?.failures,e=>{const{messages:i}=this,[{error:s,retry:o,cancel:a}]=e;this._showPrompt({title:i.errorWarningTitle,message:t(i.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:i.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:i.ignore,action:()=>{a(),this._clearPrompt()}}}})}),l(()=>this.viewModel?.state,e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}}),l(()=>this.viewModel.formDisabled,e=>{this._batchAttributeForm.readOnly=e,this._featureForm.disabled=e}),l(()=>this.visibleElements.sketch,()=>this._setupSketch(),c),l(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,c),de({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}}),de({getLoading:()=>!this.viewModel.activeLeafWorkflow?.allowSave,setEffectiveLoading:e=>{this._disallowSave=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=a(this._sketchToolbar),this._sketchImportAbortController=r(this._sketchImportAbortController)}loadDependencies(){return Promise.all([ae({flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),D(),x(),B(),H(),R(),$(),J(),X(),ee()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||0===this._selectionList.visibleFeatureCount}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){const e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!U(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionCountExceedsMaximum(){const e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:i,filterText:s,visibleFeatureCount:o}=this._selectionList;return null!=s&&""!==s?o>e:t?t.total>e:i>e}get _selectionListItemActionConfigs(){const{messages:e,visibleElements:t}=this,i=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",hidden:({item:e})=>!U(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.editTheseFeatures,icon:"edit-attributes",type:"layer",hidden:({item:e})=>!U(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.mergeTheseFeatures,icon:"merge",type:"layer",hidden:!i||(({item:e})=>{if(!we(e))return!0;const t=U(this.editorItems,e.layer);return!t||(!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2)}),callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"merge")}]}get _visibleSelectionCount(){const{activeLayerItem:e,effectiveCount:t,filterText:i,visibleFeatureCount:s}=this._selectionList;return null!=i&&""!==i?s:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.viewModel.useLegacyCreateTools=e}get formSystem(){return this.viewModel.formSystem}set formSystem(e){this.viewModel.formSystem=e}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection(e)}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return s(o.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,i=this.classes(E.base,re.widget,re.panel);if(!t)return ge("div",{class:i,key:"empty"});const{pageStack:s}=t,o=s.length-1,a=s.map((e,t)=>this._renderPage(e,t===o));return ge("div",{class:i,key:"base",ondragover:this._handleDragAndDrop,ondrop:this._handleDragAndDrop},e.flow?ge("calcite-flow",{inert:!!this._prompt,key:"flow"},a):a,this._prompt?ge(Q,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const i={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(i);case"viewing-selection-list":return this._renderSelectionListPage(i);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(i);case"creating-features-upload-details":return this._renderUploadDetails(i);case"creating-features":return this._renderCreatingFeatures(i);case"editing-existing-feature":case"editing-features":case"editing-attributes":case"choosing-key-feature":return this._renderUpdateFeature(i);case"awaiting-update-feature-candidate":return this._renderFeatureList(i);case"adding-attachment":return this._renderAttachmentAdding(i);case"editing-attachment":return this._renderAttachmentEditing(i);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(i);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(i);case"add-association-create-association":return this._renderAddAssociation(i);case"drawing-splitter-geometry":return this._renderDrawingSplitGeometry(i);case"reviewing-features":return this._renderReviewingSplitFeatures(i)}return ge("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:i}=this;return ge(t,{heading:i.selectTemplate,key:"templates-panel",...e},ge(z,{key:"feature-templates"},ge(q,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:i,messages:s}=this;if("create-features"!==i?.type)return null;const o=i.data.upload;return o?ge(t,{heading:s.createFeatures,key:"upload-details-panel",...e},ge(te,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:i,messages:s,messagesCommon:o,headingLevel:a,viewModel:r}=this;if(!i)return null;const n="create-features"===i.type&&i.numPendingFeatures>0||"update"===i.type&&"create-features"===i?.activeWorkflow?.type&&i.activeWorkflow?.numPendingFeatures>0;return ge(t,{heading:s.createFeatures,key:"create-features-panel",...e},n?ge(Y,{disallowSave:this._disallowSave,editorViewModel:r,formWidget:this._batchAttributeForm,headingLevel:a,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):ge(V,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this,r=a.activeFeatureCount>1?i.multiFeature.editPanelTitle:i.singleFeature.editPanelTitle;return ge(t,{heading:r,key:"update-feature-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){const{EditorPanel:t}=this;return ge(t,{heading:this.messages.splitFeature,key:"draw-split-geometry-panel",...e},ge(V,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this;return ge(t,{heading:i.splitFeature,key:"review-split-features-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:i}=this;switch(e.type){case"attachment":return i.associationsAttachments;case"connectivity":return i.associationsConnectivity;case"structure":return i.associationsStructure;case"content":return i.associationsContents;case"container":return i.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const i=t.associations;switch(e.type){case"attachment":return i.addAttachment;case"connectivity":return i.addConnectivity;case"structure":return i.addStructure;case"content":return i.addContent;case"container":return i.addContainer}}async _initializeAssociationItemList(e){const t=(await(import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js"))).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await(import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js"))).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this,r=a.formViewModel?.activeAssociationType,n=this._getAssociationTypeTitle(r);return ge(t,{heading:n,key:"viewing-associated-layers-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this,a=s.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state||this.viewModel.formDisabled;return t?ge(i,{heading:r,key:"add-association-select-feature",...e},ge(z,{key:"select-feature"},ge(q,null,t.render())),ge(N,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&(a?.reset(),s.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):ge(i,{heading:r,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),i=e.utilityNetworkAssociationAddAssociationViewModel,s="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=s?s.activeWorkflow:null,a="add-association"===o?.type?o.sourceFeatureItem:null,r=i?.selectedFeature,n=i?.association,l=i?.utilityNetwork;a&&r&&n&&l&&(t.sourceFeature=a,t.targetFeature=r,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this;if(!t)return null;const a=s.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state;return ge(i,{heading:r,key:"add-association",...e},ge(z,{key:"add-association-content"},ge(q,null,t.render())),ge(N,{buttons:[{label:o.add,disabled:n||!a.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&s.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:i}=this,s=n(e.group.items,e=>i.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return s?ge(G,{kind:"warning",message:s}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:i,messages:s,messagesCommon:o}=this;return ge(t,{heading:s.addAttachment,key:"attachment-adding-panel",...e},ge(z,{key:"attachments"},this._renderAttachments()),ge(N,{buttons:[{label:i.submitting?o.cancel:o.add,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_hasSelectionFromMultipleLayers:i,_hasInvalidBatchSelection:s,_selectionCountExceedsMaximum:o,_selectionList:a,_visibleSelectionCount:r,messages:n,EditorPanel:l}=this,{batchUpdateActions:c}=this.visibleElements,{maxVisibleFeatureCountPerLayer:d}=a;return ge(l,{heading:n.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar?ge("div",{class:E.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,ge(z,{key:"selection-list"},ge(q,null,this._renderSelectionList())),ge(N,{buttons:[c?{label:t(n.batchEditing.editCount,{count:r}),disabled:s,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:c&&i?{text:n.batchEditing.selectOneLayer,icon:"information"}:c&&o?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:d}),icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:i,activeWorkflow:s,messages:o,messagesCommon:a}=this;return s?ge(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},ge(z,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?ge(N,{buttons:[{label:a.update,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:i.submitting,label:a.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:i,visibleElements:s}=this,o=this._helpMessage;return ge(t,{heading:i.widgetLabel,key:"landing-panel",...e},ge(z,{key:"landing-content"},this.editorItems.length?[s.editFeaturesSection?ge(q,{key:"edit-actions"},this._renderUpdateActions()):null,s.createFeaturesSection&&this.viewModel.canCreateVisible?ge(q,{key:"create-actions"},this._renderCreateActions()):null]:ge(K,{key:"no-content"},i.noEditableLayers)),o?ge("div",{class:E.helpMessage,key:"footer-actions",slot:"footer"},o):void 0)}_handleDragAndDrop(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none")}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:i}=this,s={id:"select",label:t.select};return ge("div",{class:E.updateActions,key:"update-actions"},ge(le,{level:ne(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar?ge("div",{class:E.selectionToolbarContainer},this._renderSelectionToolbar()):ge("calcite-list",{class:E.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},ce({disabled:!i.canUpdateVisible,grouped:!1,item:s,selectedItem:"awaiting-feature-to-update"===i.activeWorkflow?.stepId?s:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return ge("div",{key:"create-actions"},ge(le,{level:ne(this.headingLevel)},this.messages.createFeatures),ge("div",{class:E.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:i,viewModel:s}=this,{activeWorkflow:o}=s;if("update"!==o?.type)return null;const a=o.data.candidates,r=t(this.messages.multipleFeaturesTemplate,{total:a.length});return ge(i,{heading:r,key:"feature-list",...e},ge(O,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:o,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:i,noLabel:s}){const o=Promise.withResolvers(),{view:a}=this,r=a?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:i,action:()=>o.resolve(!0)},secondary:{label:s,action:()=>o.resolve(!1)}}}),o.promise.finally(()=>{this._clearPrompt(),r&&a?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=r(this._sketchImportAbortController),this._sketchToolbar=a(this._sketchToolbar),void this.removeHandles(fe);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await(import("./Sketch.js"));if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",suppressDeprecationWarning:!0,visibleElements:new oe({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,singlePluginBackButton:!1,createTools:new ie({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new se({"lasso-selection":!1,"rectangle-selection":!1}),geometrySimplificationActivityIndicator:!1})}),this.addHandles([l(()=>{const e=this.viewModel.activeLeafWorkflow;return e&&"availableCreateTools"in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},c),l(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},c),h(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},c),h(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},c)],fe)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){const{messages:t,view:i}=this;if("curveToolDensifyWarning"===e)return t.curveToolDensifyWarning;return e?t["3d"===i?.type?"helpMessages3d":"helpMessages2d"]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([p()],ye.prototype,"_batchAttributeForm",void 0),e([p()],ye.prototype,"_featureForm",void 0),e([p()],ye.prototype,"_sketchToolbar",void 0),e([p()],ye.prototype,"_attachments",void 0),e([p()],ye.prototype,"_associationItemList",void 0),e([p()],ye.prototype,"_associationSettings",void 0),e([p()],ye.prototype,"_featureTemplates",void 0),e([p()],ye.prototype,"_filterText",void 0),e([p()],ye.prototype,"_hasInvalidBatchSelection",null),e([p()],ye.prototype,"_hasSelectionFromMultipleLayers",null),e([p()],ye.prototype,"_hasSelectionWithUneditableFeatures",null),e([p()],ye.prototype,"_prompt",void 0),e([p()],ye.prototype,"_spinner",void 0),e([p()],ye.prototype,"_deleteButtonCommonInfo",null),e([p()],ye.prototype,"_loading",void 0),e([p()],ye.prototype,"_disallowSave",void 0),e([p()],ye.prototype,"_selectionCountExceedsMaximum",null),e([p()],ye.prototype,"_selectionList",void 0),e([p()],ye.prototype,"_selectionListItemActionConfigs",null),e([p()],ye.prototype,"_selectionToolbar",void 0),e([p()],ye.prototype,"_visibleSelectionCount",null),e([p({readOnly:!0})],ye.prototype,"activeWorkflow",null),e([p()],ye.prototype,"editorItems",null),e([p()],ye.prototype,"effectiveSelectionManager",null),e([p()],ye.prototype,"headingLevel",void 0),e([p()],ye.prototype,"hideTemplatesForInactiveLayers",null),e([p()],ye.prototype,"icon",null),e([p()],ye.prototype,"label",null),e([p({type:w})],ye.prototype,"labelOptions",null),e([p()],ye.prototype,"layerInfos",null),e([p(),pe("esri/widgets/Editor/t9n/Editor")],ye.prototype,"messages",void 0),e([p(),pe("esri/t9n/common")],ye.prototype,"messagesCommon",void 0),e([p(),pe("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],ye.prototype,"messagesTemplates",void 0),e([p(),pe("esri/widgets/Feature/t9n/Feature")],ye.prototype,"messagesFeature",void 0),e([p()],ye.prototype,"selectionManager",null),e([p({type:f})],ye.prototype,"snappingOptions",null),e([p()],ye.prototype,"syncWithViewSelectionManager",null),e([p()],ye.prototype,"syncViewSelection",null),e([p({type:v})],ye.prototype,"tooltipOptions",null),e([p()],ye.prototype,"supportingWidgetDefaults",void 0),e([p({type:_,nonNullable:!0})],ye.prototype,"valueOptions",null),e([p({value:!1})],ye.prototype,"useLegacyCreateTools",null),e([p()],ye.prototype,"formSystem",null),e([p()],ye.prototype,"isUsingLegacyCreateTools",null),e([p()],ye.prototype,"view",null),e([p({type:W}),ue(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],ye.prototype,"viewModel",void 0),e([p({type:I,nonNullable:!0})],ye.prototype,"visibleElements",void 0),e([p()],ye.prototype,"_helpMessage",null),e([p()],ye.prototype,"_noticeMessage",null),ye=e([u("esri.widgets.Editor")],ye);const be=ye;export{be as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i,deprecatedFunction as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{destroyMaybe as a,abortMaybe as r,mappedFind as n}from"../core/maybe.js";import{watch as l,initial as c,on as d,when as h,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../core/support/UpdatingHandles.js";import w from"../views/interactive/sketch/SketchLabelOptions.js";import v from"../views/interactive/sketch/SketchTooltipOptions.js";import _ from"../views/interactive/sketch/SketchValueOptions.js";import f from"../views/interactive/snapping/SnappingOptions.js";import y from"./Attachments.js";import b from"./BatchAttributeForm.js";import k from"./FeatureForm.js";import M from"./FeatureTemplates.js";import F from"./Spinner.js";import A from"./Widget.js";import S from"./BatchAttributeForm/VisibleElements.js";import{isNextOrLegacyUpdateWorkflow as T,isNextOrLegacyUpdateFeaturesWorkflow as C,isNextOrLegacyUpdateFeatureWorkflow as L}from"./Editor/compatibilityAdapters.js";import{css as E}from"./Editor/css.js";import W from"./Editor/EditorViewModel.js";import{isModelUpload as P}from"./Editor/modelUploadUtils.js";import I from"./Editor/VisibleElements.js";import{findEditorItemForLayer as U,isBatchAttributeFormViewModel as j}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as V,CreateFeaturesPanelContent as D}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as x,FeatureList as O}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as B,FooterActions as N}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as H,Notice as G}from"./Editor/components/Notices.js";import{loadPanelContentComponents as R,PanelContent as z,PanelContentSection as q,PanelContentMessage as K}from"./Editor/components/PanelContent.js";import{PanelToolbar as Z,loadPanelToolbarComponents as $}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as J,Prompt as Q}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as X,UpdateFeaturePanelContent as Y}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as ee,UploadDetails as te}from"./Editor/components/UploadDetails.js";import ie from"./Sketch/CreateToolVisibilityMap.js";import se from"./Sketch/SelectionToolVisibilityMap.js";import oe from"./Sketch/VisibleElements.js";import{loadCalciteComponents as ae}from"./support/componentsUtils.js";import{globalCss as re}from"./support/globalCss.js";import{incrementHeadingLevel as ne,Heading as le}from"./support/Heading.js";import{renderItem as ce}from"./support/ItemList.js";import{connectDelayedLoading as de}from"./support/loaderUtils.js";import he from"./support/SelectionList.js";import me from"./support/SelectionToolbar.js";import{messageBundle as pe,vmEvent as ue,tsx as ge}from"./support/widget.js";import{isLayerItem as we}from"./support/SelectionList/selectionListUtils.js";import ve from"./support/SelectionList/VisibleElements.js";import _e from"./support/SelectionToolbar/VisibleElements.js";const fe=Symbol("sketch-setup-handles");let ye=class extends A{constructor(e,s){super(e,s),this._batchAttributeForm=new b({suppressDeprecationWarning:!0,visibleElements:new S({loadingIndicator:!1})}),this._featureForm=new k({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new y({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new M({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?ge("calcite-icon",{class:E.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new F,this._loading=!1,this._disallowSave=!1,this._selectionList=new he({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!U(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ve({header:!1})}),this._selectionToolbar=new me({visibleElements:new _e({chip:!1})}),this._updatingHandles=new g,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new I,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?ge("div",{class:E.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>ge("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:i},...s)=>{const{visibleElements:o}=this;return ge("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:i,onCalciteFlowItemBack:this._onBack},o.settingsMenu?ge(Z,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showConfirmationPrompt=e=>this._showPromptAndWait(this.messages[e]),this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,i={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&P(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&t.formViewModel?.activeAssociationsInput?this._showPromptAndWait({...i,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(i)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{const{activeWorkflow:e}=this.viewModel;if(T(e)){const t=e.activeWorkflow;C(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{const{activeWorkflow:e}=this.viewModel;if(T(e)){const t=e.activeWorkflow;if(L(t)){const i=t.viewGraphic;i&&e.startSplittingFeature(i,{initialFeature:t.data.edits.initialFeature??i})}}},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,i=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:i.deleteWarningTitle,message:i.deleteWarningMessage,context:"danger",actions:{primary:{label:t(i.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:i.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new W({useLegacyCreateTools:e?.useLegacyCreateTools??"3d"===e?.view?.type,formSystem:e?.formSystem??"legacy"}),this.announceDeprecation=()=>{i(o.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this._batchAttributeForm.showPrompt=this._showPrompt,this._batchAttributeForm.clearPrompt=this._clearPrompt,this.addHandles([l(()=>ne(this.headingLevel),e=>{this._batchAttributeForm.headingLevel=e,this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},c),d(()=>this.viewModel.activeWorkflow,"cancel-request",({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),h(()=>this.viewModel.formViewModel,e=>{j(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},m),h(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},c),h(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),l(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,i,s,o,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=i,this._spinner.viewModel=s,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt,e.showConfirmationPrompt=this._showConfirmationPrompt},c),l(()=>this.view,(e,t)=>{const i=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,i),e?.ui.add(this._spinner,{key:i,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)},c),l(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.batchAttributeForm&&this._batchAttributeForm.set(e.batchAttributeForm),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},c),h(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),h(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),h(()=>this.viewModel?.failures,e=>{const{messages:i}=this,[{error:s,retry:o,cancel:a}]=e;this._showPrompt({title:i.errorWarningTitle,message:t(i.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:i.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:i.ignore,action:()=>{a(),this._clearPrompt()}}}})}),l(()=>this.viewModel?.state,e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}}),l(()=>this.viewModel.formDisabled,e=>{this._batchAttributeForm.readOnly=e,this._featureForm.disabled=e}),l(()=>this.visibleElements.sketch,()=>this._setupSketch(),c),l(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,c),de({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}}),de({getLoading:()=>!this.viewModel.activeLeafWorkflow?.allowSave,setEffectiveLoading:e=>{this._disallowSave=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=a(this._sketchToolbar),this._sketchImportAbortController=r(this._sketchImportAbortController)}loadDependencies(){return Promise.all([ae({flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),V(),x(),B(),H(),R(),$(),J(),X(),ee()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||0===this._selectionList.visibleFeatureCount}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){const e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!U(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionCountExceedsMaximum(){const e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:i,filterText:s,visibleFeatureCount:o}=this._selectionList;return null!=s&&""!==s?o>e:t?t.total>e:i>e}get _selectionListItemActionConfigs(){const{messages:e,visibleElements:t}=this,i=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",hidden:({item:e})=>!U(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.editTheseFeatures,icon:"edit-attributes",type:"layer",hidden:({item:e})=>!U(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.mergeTheseFeatures,icon:"merge",type:"layer",hidden:!i||(({item:e})=>{if(!we(e))return!0;const t=U(this.editorItems,e.layer);return!t||(!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2)}),callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"merge")}]}get _visibleSelectionCount(){const{activeLayerItem:e,effectiveCount:t,filterText:i,visibleFeatureCount:s}=this._selectionList;return null!=i&&""!==i?s:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.viewModel.useLegacyCreateTools=e}get formSystem(){return this.viewModel.formSystem}set formSystem(e){this.viewModel.formSystem=e}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection(e)}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return s(o.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,i=this.classes(E.base,re.widget,re.panel);if(!t)return ge("div",{class:i,key:"empty"});const{pageStack:s}=t,o=s.length-1,a=s.map((e,t)=>this._renderPage(e,t===o));return ge("div",{class:i,key:"base",ondragover:this._handleDragAndDrop,ondrop:this._handleDragAndDrop},e.flow?ge("calcite-flow",{inert:!!this._prompt,key:"flow"},a):a,this._prompt?ge(Q,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const i={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(i);case"viewing-selection-list":return this._renderSelectionListPage(i);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(i);case"creating-features-upload-details":return this._renderUploadDetails(i);case"creating-features":return this._renderCreatingFeatures(i);case"editing-existing-feature":case"editing-features":case"editing-attributes":case"choosing-key-feature":return this._renderUpdateFeature(i);case"awaiting-update-feature-candidate":return this._renderFeatureList(i);case"adding-attachment":return this._renderAttachmentAdding(i);case"editing-attachment":return this._renderAttachmentEditing(i);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(i);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(i);case"add-association-create-association":return this._renderAddAssociation(i);case"drawing-splitter-geometry":return this._renderDrawingSplitGeometry(i);case"reviewing-features":return this._renderReviewingSplitFeatures(i)}return ge("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:i}=this;return ge(t,{heading:i.selectTemplate,key:"templates-panel",...e},ge(z,{key:"feature-templates"},ge(q,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:i,messages:s}=this;if("create-features"!==i?.type)return null;const o=i.data.upload;return o?ge(t,{heading:s.createFeatures,key:"upload-details-panel",...e},ge(te,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:i,messages:s,messagesCommon:o,headingLevel:a,viewModel:r}=this;if(!i)return null;const n="create-features"===i.type&&i.numPendingFeatures>0||"update"===i.type&&"create-features"===i?.activeWorkflow?.type&&i.activeWorkflow?.numPendingFeatures>0;return ge(t,{heading:s.createFeatures,key:"create-features-panel",...e},n?ge(Y,{disallowSave:this._disallowSave,editorViewModel:r,formWidget:this._batchAttributeForm,headingLevel:a,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):ge(D,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this,r=a.activeFeatureCount>1?i.multiFeature.editPanelTitle:i.singleFeature.editPanelTitle;return ge(t,{heading:r,key:"update-feature-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){const{EditorPanel:t}=this;return ge(t,{heading:this.messages.splitFeature,key:"draw-split-geometry-panel",...e},ge(D,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this;return ge(t,{heading:i.splitFeature,key:"review-split-features-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:i}=this;switch(e.type){case"attachment":return i.associationsAttachments;case"connectivity":return i.associationsConnectivity;case"structure":return i.associationsStructure;case"content":return i.associationsContents;case"container":return i.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const i=t.associations;switch(e.type){case"attachment":return i.addAttachment;case"connectivity":return i.addConnectivity;case"structure":return i.addStructure;case"content":return i.addContent;case"container":return i.addContainer}}async _initializeAssociationItemList(e){const t=(await(import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js"))).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await(import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js"))).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:a}=this,r=a.formViewModel?.activeAssociationType,n=this._getAssociationTypeTitle(r);return ge(t,{heading:n,key:"viewing-associated-layers-panel",...e},ge(Y,{disallowSave:this._disallowSave,editorViewModel:a,formWidget:this._batchAttributeForm,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._featureForm?.render,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this,a=s.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state||this.viewModel.formDisabled;return t?ge(i,{heading:r,key:"add-association-select-feature",...e},ge(z,{key:"select-feature"},ge(q,null,t.render())),ge(N,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&(a?.reset(),s.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):ge(i,{heading:r,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),i=e.utilityNetworkAssociationAddAssociationViewModel,s="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=s?s.activeWorkflow:null,a="add-association"===o?.type?o.sourceFeatureItem:null,r=i?.selectedFeature,n=i?.association,l=i?.utilityNetwork;a&&r&&n&&l&&(t.sourceFeature=a,t.targetFeature=r,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this;if(!t)return null;const a=s.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state;return ge(i,{heading:r,key:"add-association",...e},ge(z,{key:"add-association-content"},ge(q,null,t.render())),ge(N,{buttons:[{label:o.add,disabled:n||!a.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&s.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:i}=this,s=n(e.group.items,e=>i.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return s?ge(G,{kind:"warning",message:s}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:i,messages:s,messagesCommon:o}=this;return ge(t,{heading:s.addAttachment,key:"attachment-adding-panel",...e},ge(z,{key:"attachments"},this._renderAttachments()),ge(N,{buttons:[{label:i.submitting?o.cancel:o.add,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_hasSelectionFromMultipleLayers:i,_hasInvalidBatchSelection:s,_selectionCountExceedsMaximum:o,_selectionList:a,_visibleSelectionCount:r,messages:n,EditorPanel:l}=this,{batchUpdateActions:c}=this.visibleElements,{maxVisibleFeatureCountPerLayer:d}=a;return ge(l,{heading:n.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar?ge("div",{class:E.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,ge(z,{key:"selection-list"},ge(q,null,this._renderSelectionList())),ge(N,{buttons:[c?{label:t(n.batchEditing.editCount,{count:r}),disabled:s,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:c&&i?{text:n.batchEditing.selectOneLayer,icon:"information"}:c&&o?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:d}),icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:i,activeWorkflow:s,messages:o,messagesCommon:a}=this;return s?ge(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},ge(z,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?ge(N,{buttons:[{label:a.update,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:i.submitting,label:a.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:i,visibleElements:s}=this,o=this._helpMessage;return ge(t,{heading:i.widgetLabel,key:"landing-panel",...e},ge(z,{key:"landing-content"},this.editorItems.length?[s.editFeaturesSection?ge(q,{key:"edit-actions"},this._renderUpdateActions()):null,s.createFeaturesSection&&this.viewModel.canCreateVisible?ge(q,{key:"create-actions"},this._renderCreateActions()):null]:ge(K,{key:"no-content"},i.noEditableLayers)),o?ge("div",{class:E.helpMessage,key:"footer-actions",slot:"footer"},o):void 0)}_handleDragAndDrop(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none")}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:i}=this,s={id:"select",label:t.select};return ge("div",{class:E.updateActions,key:"update-actions"},ge(le,{level:ne(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar?ge("div",{class:E.selectionToolbarContainer},this._renderSelectionToolbar()):ge("calcite-list",{class:E.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},ce({disabled:!i.canUpdateVisible,grouped:!1,item:s,selectedItem:"awaiting-feature-to-update"===i.activeWorkflow?.stepId?s:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return ge("div",{key:"create-actions"},ge(le,{level:ne(this.headingLevel)},this.messages.createFeatures),ge("div",{class:E.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:i,viewModel:s}=this,{activeWorkflow:o}=s;if("update"!==o?.type)return null;const a=o.data.candidates,r=t(this.messages.multipleFeaturesTemplate,{total:a.length});return ge(i,{heading:r,key:"feature-list",...e},ge(O,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:o,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:i,noLabel:s}){const o=Promise.withResolvers(),{view:a}=this,r=a?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:i,action:()=>o.resolve(!0)},secondary:{label:s,action:()=>o.resolve(!1)}}}),o.promise.finally(()=>{this._clearPrompt(),r&&a?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=r(this._sketchImportAbortController),this._sketchToolbar=a(this._sketchToolbar),void this.removeHandles(fe);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await(import("./Sketch.js"));if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",suppressDeprecationWarning:!0,visibleElements:new oe({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,singlePluginBackButton:!1,createTools:new ie({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new se({"lasso-selection":!1,"rectangle-selection":!1}),geometrySimplificationActivityIndicator:!1})}),this.addHandles([l(()=>{const e=this.viewModel.activeLeafWorkflow;return e&&"availableCreateTools"in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},c),l(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},c),h(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},c),h(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},c)],fe)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){const{messages:t,view:i}=this;return e?t["3d"===i?.type?"helpMessages3d":"helpMessages2d"]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([p()],ye.prototype,"_batchAttributeForm",void 0),e([p()],ye.prototype,"_featureForm",void 0),e([p()],ye.prototype,"_sketchToolbar",void 0),e([p()],ye.prototype,"_attachments",void 0),e([p()],ye.prototype,"_associationItemList",void 0),e([p()],ye.prototype,"_associationSettings",void 0),e([p()],ye.prototype,"_featureTemplates",void 0),e([p()],ye.prototype,"_filterText",void 0),e([p()],ye.prototype,"_hasInvalidBatchSelection",null),e([p()],ye.prototype,"_hasSelectionFromMultipleLayers",null),e([p()],ye.prototype,"_hasSelectionWithUneditableFeatures",null),e([p()],ye.prototype,"_prompt",void 0),e([p()],ye.prototype,"_spinner",void 0),e([p()],ye.prototype,"_deleteButtonCommonInfo",null),e([p()],ye.prototype,"_loading",void 0),e([p()],ye.prototype,"_disallowSave",void 0),e([p()],ye.prototype,"_selectionCountExceedsMaximum",null),e([p()],ye.prototype,"_selectionList",void 0),e([p()],ye.prototype,"_selectionListItemActionConfigs",null),e([p()],ye.prototype,"_selectionToolbar",void 0),e([p()],ye.prototype,"_visibleSelectionCount",null),e([p({readOnly:!0})],ye.prototype,"activeWorkflow",null),e([p()],ye.prototype,"editorItems",null),e([p()],ye.prototype,"effectiveSelectionManager",null),e([p()],ye.prototype,"headingLevel",void 0),e([p()],ye.prototype,"hideTemplatesForInactiveLayers",null),e([p()],ye.prototype,"icon",null),e([p()],ye.prototype,"label",null),e([p({type:w})],ye.prototype,"labelOptions",null),e([p()],ye.prototype,"layerInfos",null),e([p(),pe("esri/widgets/Editor/t9n/Editor")],ye.prototype,"messages",void 0),e([p(),pe("esri/t9n/common")],ye.prototype,"messagesCommon",void 0),e([p(),pe("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],ye.prototype,"messagesTemplates",void 0),e([p(),pe("esri/widgets/Feature/t9n/Feature")],ye.prototype,"messagesFeature",void 0),e([p()],ye.prototype,"selectionManager",null),e([p({type:f})],ye.prototype,"snappingOptions",null),e([p()],ye.prototype,"syncWithViewSelectionManager",null),e([p()],ye.prototype,"syncViewSelection",null),e([p({type:v})],ye.prototype,"tooltipOptions",null),e([p()],ye.prototype,"supportingWidgetDefaults",void 0),e([p({type:_,nonNullable:!0})],ye.prototype,"valueOptions",null),e([p({value:!1})],ye.prototype,"useLegacyCreateTools",null),e([p()],ye.prototype,"formSystem",null),e([p()],ye.prototype,"isUsingLegacyCreateTools",null),e([p()],ye.prototype,"view",null),e([p({type:W}),ue(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],ye.prototype,"viewModel",void 0),e([p({type:I,nonNullable:!0})],ye.prototype,"visibleElements",void 0),e([p()],ye.prototype,"_helpMessage",null),e([p()],ye.prototype,"_noticeMessage",null),ye=e([u("esri.widgets.Editor")],ye);const be=ye;export{be as default};
|
|
@@ -33,7 +33,7 @@ import type { ExtentProperties } from "../../geometry/Extent.js";
|
|
|
33
33
|
import type { TableTemplateProperties } from "./support/TableTemplate.js";
|
|
34
34
|
import type { TimeExtentProperties } from "../../time/TimeExtent.js";
|
|
35
35
|
|
|
36
|
-
export interface FeatureTableViewModelProperties extends GridViewModelProperties, Partial<Pick<FeatureTableViewModel, "actionColumnConfig" | "attachmentsEnabled" | "autoRefreshEnabled" | "autoSaveEnabled" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "editingEnabled" | "filterByLayerScaleRange" | "filterBySelectionEnabled" | "filterByViewExtent" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "outFields" | "pageIndex" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "tableController" | "tableParent" | "timeZone" | "view">> {
|
|
36
|
+
export interface FeatureTableViewModelProperties extends GridViewModelProperties, Partial<Pick<FeatureTableViewModel, "actionColumnConfig" | "attachmentsEnabled" | "autoRefreshEnabled" | "autoSaveEnabled" | "columnPerformanceModeEnabled" | "columnReorderingEnabled" | "definitionExpression" | "editingEnabled" | "filterByLayerScaleRange" | "filterBySelectionEnabled" | "filterByViewExtent" | "highlightEnabled" | "initialSize" | "layer" | "layers" | "maxSize" | "menuConfig" | "multipleSelectionEnabled" | "multipleSortPriority" | "multiSortEnabled" | "outFields" | "pageIndex" | "pageSize" | "paginationEnabled" | "relatedRecordsEnabled" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "selectionManager" | "syncTemplateOnChangesEnabled" | "syncViewSelection" | "tableController" | "tableParent" | "timeZone" | "view" | "viewTimeEnabled">> {
|
|
37
37
|
/**
|
|
38
38
|
* Use this property to configure how columns display within the table in regard to visibility, column order, and sorting.
|
|
39
39
|
*
|
|
@@ -489,6 +489,18 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
489
489
|
* @since 4.31
|
|
490
490
|
*/
|
|
491
491
|
get effectiveSize(): number;
|
|
492
|
+
/**
|
|
493
|
+
* The 'effective' [TimeExtent](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/) used to filter and display data.
|
|
494
|
+
*
|
|
495
|
+
* @internal
|
|
496
|
+
*/
|
|
497
|
+
get effectiveTimeExtent(): TimeExtent | null | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* The 'effective' where clause used by data queries.
|
|
500
|
+
*
|
|
501
|
+
* @internal
|
|
502
|
+
*/
|
|
503
|
+
get effectiveWhere(): string | null | undefined;
|
|
492
504
|
/**
|
|
493
505
|
* A flattened array of all [field columns](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FieldColumn/) within the table, including nested columns.
|
|
494
506
|
*
|
|
@@ -1076,6 +1088,16 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
1076
1088
|
* the select/highlight in the map to work.
|
|
1077
1089
|
*/
|
|
1078
1090
|
accessor view: MapViewOrSceneView | LinkChartView | null | undefined;
|
|
1091
|
+
/**
|
|
1092
|
+
* Controls time extent filtering behavior for the table. When `true`, the table's time extent will be derived from the intersection of the
|
|
1093
|
+
* view and layer's time extent. When `false`, only the layer's time extent will be considered.
|
|
1094
|
+
*
|
|
1095
|
+
* When [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#timeExtent) is defined, only that time extent will be used and this property will be ignored.
|
|
1096
|
+
*
|
|
1097
|
+
* @default false
|
|
1098
|
+
* @since 5.2
|
|
1099
|
+
*/
|
|
1100
|
+
accessor viewTimeEnabled: boolean;
|
|
1079
1101
|
/**
|
|
1080
1102
|
* A flattened array of all top-level visible columns. Take note that this does not include nested columns.
|
|
1081
1103
|
*
|