@arcgis/core 6.0.0-next.6 → 6.0.0-next.7
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/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
- package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
- package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f46a0d7cf588ba1b4157.js → 518e8883b6ed613bf451.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
- package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
- package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
- package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
- package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
- package/assets/esri/core/workers/chunks/7038ead1fa1674416ab3.js +1 -0
- package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
- package/assets/esri/core/workers/chunks/{8ba32d3a0df4a206ef1c.js → 7165d6f6a5078768bebb.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbe6c0f32608cb504695.js → 776ae25a34352d3468bc.js} +1 -1
- package/assets/esri/core/workers/chunks/801e9e66edb4961461eb.js +1 -0
- package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
- package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
- package/assets/esri/core/workers/chunks/{250d3be6d3849d71fed8.js → c29c474c4b1049352d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
- package/assets/esri/core/workers/chunks/ecaac39dde7ec4213264.js +1 -0
- package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
- package/assets/esri/core/workers/chunks/{fccbb902fe08448f91de.js → fd0a5c243f3426f2a0b5.js} +1 -1
- package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +1 -1
- package/assets/esri/themes/base/widgets/_Features.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +5 -9
- package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -4
- package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
- 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/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +4 -2
- package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
- package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
- package/config.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/projectionUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/geometryUtils.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/package.json +2 -2
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/support/elevationUpdateUtils.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
- package/views/draw/Draw.d.ts +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +1 -0
- package/views/interactive/options/TooltipOptions.d.ts +1 -0
- package/views/interactive/options/ViewOptions.d.ts +1 -0
- package/views/interactive/support/Units.d.ts +1 -0
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Sketch.d.ts +1 -1
- package/widgets/Track/TrackViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/PluginSettingsControls.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/componentsUtils.js +1 -1
- package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
- package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
- package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
- package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
- package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
- package/assets/esri/core/workers/chunks/56851011276de0b3e318.js +0 -1
- package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
- package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
- package/assets/esri/core/workers/chunks/8b54589f173259c1ba55.js +0 -1
- package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
- package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
- package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
- package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
- package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import n from"../core/Logger.js";import{watch as r}from"../core/reactiveUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import o from"./Widget.js";import{canShowNorth as s}from"./Compass/utils.js";import{directionalPadAngles as c,directionalPadArrows as l}from"./DirectionalPad/constants.js";import{css as u}from"./DirectionalPad/css.js";import d from"./DirectionalPad/DirectionalPadViewModel.js";import{findElementCenter as f}from"./DirectionalPad/utils.js";import p from"./DirectionalPad/VisibleElements.js";import{loadCalciteComponents as m}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import{messageBundle as g,isActivationKey as _,tsx as v}from"./support/widget.js";import{setFocus as y}from"./support/widgetUtils.js";let b=class extends o{constructor(e,r){super(e,r),this._buttonsContainer=null,this._buttons={},this.messages=null,this.visibleElements=new p,this.viewModel=new d({suppressDeprecationWarning:!0}),this.visualScale=`s`,this._rotateIcon=e=>({"--rotation":`rotate(${e}deg)`}),this._afterButtonContainerCreate=e=>{this._buttonsContainer=e,this._buttonsContainer.addEventListener(`contextmenu`,this._onContextMenu,{capture:!0})},this._afterButtonContainerRemoved=()=>{this._buttonsContainer?.removeEventListener(`contextmenu`,this._onContextMenu,{capture:!0}),this._buttonsContainer=null},this._afterButtonCreate=(e,t)=>{this._buttons[e]=t},this._afterButtonRemoved=e=>{this._buttons[e]=void 0},this._onContextMenu=e=>e.preventDefault(),this._onButtonPointerDown=e=>{if(this._buttonsContainer===null)return;let t=e.target?.shadowRoot?.querySelector(`button`);t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId);let n=f(this._buttonsContainer);this.viewModel.beginFollowingPointer(e,n)},this._onKeyDown=(e,{key:t})=>{_(t)&&this.viewModel.moveOnce(e)},this._onSliderInput=({currentTarget:e})=>{typeof e.value==`number`&&(this.viewModel.rotation=e.value)},this._onRotationReset=()=>{this.viewModel.rotation=0},t(n.getLogger(this),`Directional Pad`,`arcgis-directional-pad`,{version:`4.32`})}loadDependencies(){return m({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),"action-group":()=>import(`@esri/calcite-components/dist/components/calcite-action-group`),"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),slider:()=>import(`@esri/calcite-components/dist/components/calcite-slider`)})}initialize(){this.addHandles(r(()=>this.viewModel.angle,()=>{this._buttonsContainer?.contains(document.activeElement)&&(this.viewModel.angle==null?this.container?.focus():y(this._buttons[this.viewModel.angle]))}))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get icon(){return`move`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get speed(){return this.viewModel.speed}set speed(e){this.viewModel.speed=e}get _rotationEnabled(){return!this.view?.ready||this.view.constraints.rotationEnabled}render(){let{label:e,disabled:t,viewModel:n}=this,r=this.classes(u.base,h.widget,t?h.disabled:null);return v(`div`,{"aria-label":e,class:r,tabIndex:-1},n.supported?this._renderContent():this._renderUnsupportedMessage())}_renderUnsupportedMessage(){return v(`section`,{class:u.error,key:`unsupported`},v(`p`,null,this.messages.unsupported))}_renderContent(){return[this.visibleElements.directionalButtons?this._renderDirectionalButtons():void 0,this.visibleElements.rotationSlider?this._renderRotation():void 0]}_renderDirectionalButtons(){return v(`calcite-action-bar`,{
|
|
2
|
+
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import n from"../core/Logger.js";import{watch as r}from"../core/reactiveUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import o from"./Widget.js";import{canShowNorth as s}from"./Compass/utils.js";import{directionalPadAngles as c,directionalPadArrows as l}from"./DirectionalPad/constants.js";import{css as u}from"./DirectionalPad/css.js";import d from"./DirectionalPad/DirectionalPadViewModel.js";import{findElementCenter as f}from"./DirectionalPad/utils.js";import p from"./DirectionalPad/VisibleElements.js";import{loadCalciteComponents as m}from"./support/componentsUtils.js";import{globalCss as h}from"./support/globalCss.js";import{messageBundle as g,isActivationKey as _,tsx as v}from"./support/widget.js";import{setFocus as y}from"./support/widgetUtils.js";let b=class extends o{constructor(e,r){super(e,r),this._buttonsContainer=null,this._buttons={},this.messages=null,this.visibleElements=new p,this.viewModel=new d({suppressDeprecationWarning:!0}),this.visualScale=`s`,this._rotateIcon=e=>({"--rotation":`rotate(${e}deg)`}),this._afterButtonContainerCreate=e=>{this._buttonsContainer=e,this._buttonsContainer.addEventListener(`contextmenu`,this._onContextMenu,{capture:!0})},this._afterButtonContainerRemoved=()=>{this._buttonsContainer?.removeEventListener(`contextmenu`,this._onContextMenu,{capture:!0}),this._buttonsContainer=null},this._afterButtonCreate=(e,t)=>{this._buttons[e]=t},this._afterButtonRemoved=e=>{this._buttons[e]=void 0},this._onContextMenu=e=>e.preventDefault(),this._onButtonPointerDown=e=>{if(this._buttonsContainer===null)return;let t=e.target?.shadowRoot?.querySelector(`button`);t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId);let n=f(this._buttonsContainer);this.viewModel.beginFollowingPointer(e,n)},this._onKeyDown=(e,{key:t})=>{_(t)&&this.viewModel.moveOnce(e)},this._onSliderInput=({currentTarget:e})=>{typeof e.value==`number`&&(this.viewModel.rotation=e.value)},this._onRotationReset=()=>{this.viewModel.rotation=0},t(n.getLogger(this),`Directional Pad`,`arcgis-directional-pad`,{version:`4.32`})}loadDependencies(){return m({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),"action-group":()=>import(`@esri/calcite-components/dist/components/calcite-action-group`),"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),slider:()=>import(`@esri/calcite-components/dist/components/calcite-slider`)})}initialize(){this.addHandles(r(()=>this.viewModel.angle,()=>{this._buttonsContainer?.contains(document.activeElement)&&(this.viewModel.angle==null?this.container?.focus():y(this._buttons[this.viewModel.angle]))}))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get icon(){return`move`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get speed(){return this.viewModel.speed}set speed(e){this.viewModel.speed=e}get _rotationEnabled(){return!this.view?.ready||this.view.constraints.rotationEnabled}render(){let{label:e,disabled:t,viewModel:n}=this,r=this.classes(u.base,h.widget,t?h.disabled:null);return v(`div`,{"aria-label":e,class:r,tabIndex:-1},n.supported?this._renderContent():this._renderUnsupportedMessage())}_renderUnsupportedMessage(){return v(`section`,{class:u.error,key:`unsupported`},v(`p`,null,this.messages.unsupported))}_renderContent(){return[this.visibleElements.directionalButtons?this._renderDirectionalButtons():void 0,this.visibleElements.rotationSlider?this._renderRotation():void 0]}_renderDirectionalButtons(){return v(`calcite-action-bar`,{expandToggleDisabled:!0,floating:!0,key:`directional-buttons-container`,layout:`grid`,overflowMode:`none`},v(`calcite-action-group`,{afterCreate:this._afterButtonContainerCreate,afterRemoved:this._afterButtonContainerRemoved,class:u.buttonsContainer,dir:`ltr`},c.slice(0,4).map(e=>this._renderButton(e)),this._renderCompass(),c.slice(4).map(e=>this._renderButton(e))))}_renderButton(e){let{label:t,iconName:n}=l[e],r=this.messages[t];return v(`calcite-action`,{active:this.viewModel.angle===e,afterCreate:t=>this._afterButtonCreate(e,t),afterRemoved:()=>this._afterButtonRemoved(e),alignment:`center`,class:u.button,"data-angle":e.toString(),disabled:this.disabled,key:e,scale:this.visualScale,text:r,title:r,onkeydown:this._onKeyDown.bind(void 0,e),onpointerdown:this._onButtonPointerDown},v(`calcite-icon`,{icon:n,scale:this.visualScale}))}_renderCompass(){let e=this.disabled||s(this.view)?`compass-needle`:`arrow-up`,t=this.viewModel.rotation===0,n=this.messages.resetHeading;return v(`calcite-action`,{alignment:`center`,class:u.compassButton,disabled:this.disabled||!this._rotationEnabled||t,key:`compass`,scale:this.visualScale,styles:this._rotateIcon(this.viewModel.rotation),text:n,title:n,onclick:this._onRotationReset},!t&&v(`calcite-icon`,{icon:e,scale:this.visualScale}))}_renderRotation(){return v(`calcite-action-bar`,{expandToggleDisabled:!0,floating:!0,key:`slider-container`,layout:`horizontal`},v(`calcite-action-group`,{class:u.rotationContainer},this.visibleElements.rotationResetButton?this._renderRotationResetButton():null,this._renderRotationSlider()))}_renderRotationResetButton(){let e=this.messages.resetHeading;return v(`calcite-action`,{alignment:`center`,class:u.rotationReset,disabled:this.disabled||!this._rotationEnabled,scale:this.visualScale,text:e,title:e,onclick:this._onRotationReset},v(`calcite-icon`,{flipRtl:!0,icon:`rotate`,scale:this.visualScale}))}_renderRotationSlider(){return v(`div`,{class:u.rotationSliderContainer},v(`calcite-slider`,{"aria-label":this.messages.heading,disabled:this.disabled||!this._rotationEnabled,labelHandles:!0,max:360,min:0,required:!0,scale:this.visualScale,value:Math.round(this.viewModel.rotation),onCalciteSliderInput:this._onSliderInput}))}};e([i()],b.prototype,`_buttonsContainer`,void 0),e([i()],b.prototype,`_buttons`,void 0),e([i()],b.prototype,`disabled`,null),e([i()],b.prototype,`icon`,null),e([i()],b.prototype,`label`,null),e([i(),g(`esri/widgets/DirectionalPad/t9n/DirectionalPad`)],b.prototype,`messages`,void 0),e([i({type:p,nonNullable:!0})],b.prototype,`visibleElements`,void 0),e([i()],b.prototype,`view`,null),e([i({type:d})],b.prototype,`viewModel`,void 0),e([i()],b.prototype,`visualScale`,void 0),e([i()],b.prototype,`speed`,null),e([i({readOnly:!0})],b.prototype,`_rotationEnabled`,null),b=e([a(`esri.widgets.DirectionalPad`)],b);const x=b;export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{substitute as e}from"../../../intl/substitute.js";import{isNextOrLegacyCreateFeaturesWorkflow as t,isNextOrLegacySplitFeatureWorkflow as n,isNextOrLegacyMergeFeaturesWorkflow as r,isLegacyFeatureFormViewModel as i,isNextOrLegacyUpdateFeatureWorkflow as a,isNextOrLegacyUpdateFeaturesWorkflow as o}from"../compatibilityAdapters.js";import{css as s}from"../css.js";import{isBatchAttributeFormViewModel as c}from"../workflowUtils.js";import{loadFooterActionsComponents as l,FooterActions as u}from"./FooterActions.js";import d from"./MergeFeaturesList.js";import{loadNoticesComponents as f,Notices as p}from"./Notices.js";import{loadPanelContentComponents as m,PanelContentSection as h,PanelContentSectionGroup as g,PanelContent as _}from"./PanelContent.js";import v from"./PendingFeatureList.js";import{loadCalciteComponents as y}from"../../support/componentsUtils.js";import{Heading as b,incrementHeadingLevel as x}from"../../support/Heading.js";import{tsx as S,tsxFragment as C}from"../../support/widget.js";import{classes as w}from"../../support/widgetUtils.js";const T=()=>Promise.all([y({"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),action:()=>import(`@esri/calcite-components/dist/components/calcite-action`)}),l(),f(),m()]);function E(e){let{editorViewModel:a,headingLevel:o,messages:l,renderAttachments:f,renderFeatureForm:m,formWidget:y,renderSketchToolbar:w}=e,{activeFeatureCount:T,activeLeafWorkflow:E,activeWorkflow:k,formViewModel:A}=a;if(!E||!k||!A)return null;let j=c(A),M=t(E)&&!E.data.selectedPendingFeature||n(E)&&!E.activeFeature,N=r(E),P=E.shouldShowAttachments&&!j&&!A.activeRelationshipInput&&!A.activeAssociationInput,F=j?A.activeForm.inputs:A.inputs,I=t(E)&&F.every(e=>!e.visible)&&!P,L=a.featureFormViewModel?.activeAssociationInput!=null,R=!M&&!I&&!L,z=I||t(E)&&!P&&!R&&!L,B=i(A)?m:y?.render.bind(y),V=I?S(h,null,S(v,{headingLevel:o,key:`pending-feature-list`,workflow:E})):S(C,null,S(p,{activeFeatureCount:T,messages:l,workflow:k}),N?S(h,{class:s.mergeFeaturesListSection,key:`panel-section-merge`},S(d,{headingLevel:o,key:`merge-features-list`,workflow:E})):void 0,S(h,{key:`panel-content-section-main`},S(g,null,M?S(v,{headingLevel:o,key:`pending-feature-list`,workflow:E}):B?.(),P?S(`div`,{key:`attachments`},S(b,{level:x(o)},l.attachments),f()):null)));return S(C,null,R?D(E,e):void 0,z?w?.():void 0,S(_,{key:`attribute-panel-content`},V),S(u,{buttons:O(e)}))}function D(e,t){let n=[],r=t.editorViewModel.view?.type===`3d`,{visibleElements:i}=t;if(i.zoomToButton&&t.editorViewModel.canZoomTo&&n.push(S(`calcite-action`,{alignment:`center`,icon:`zoom-to-object`,key:`zoom-to-button`,scale:`s`,text:t.messages.zoomTo,title:t.messages.zoomTo,onclick:()=>t.editorViewModel.zoomTo()})),i.splitButton&&a(e)&&e.supportsSplitFeatureWorkflow&&!r&&t.onSplit){let{onSplit:e,messages:r}=t;n.push(S(`calcite-action`,{icon:`split-geometry`,key:`split-button`,scale:`s`,text:r.split,title:r.split,onclick:e}))}if(i.mergeButton&&o(e)&&e.supportsMergeFeaturesWorkflow&&!r&&t.onMerge){let{onMerge:e,messages:r}=t;n.push(S(`calcite-action`,{icon:`merge`,key:`merge-button`,scale:`s`,text:r.mergeFeatures,title:r.mergeFeatures,onclick:e}))}return n.length>0?S(`calcite-action-bar`,{class:w(s.sketchContainer,s.updateActionBar),"data-testid":`update-feature-panel-action-bar`,
|
|
2
|
+
import{substitute as e}from"../../../intl/substitute.js";import{isNextOrLegacyCreateFeaturesWorkflow as t,isNextOrLegacySplitFeatureWorkflow as n,isNextOrLegacyMergeFeaturesWorkflow as r,isLegacyFeatureFormViewModel as i,isNextOrLegacyUpdateFeatureWorkflow as a,isNextOrLegacyUpdateFeaturesWorkflow as o}from"../compatibilityAdapters.js";import{css as s}from"../css.js";import{isBatchAttributeFormViewModel as c}from"../workflowUtils.js";import{loadFooterActionsComponents as l,FooterActions as u}from"./FooterActions.js";import d from"./MergeFeaturesList.js";import{loadNoticesComponents as f,Notices as p}from"./Notices.js";import{loadPanelContentComponents as m,PanelContentSection as h,PanelContentSectionGroup as g,PanelContent as _}from"./PanelContent.js";import v from"./PendingFeatureList.js";import{loadCalciteComponents as y}from"../../support/componentsUtils.js";import{Heading as b,incrementHeadingLevel as x}from"../../support/Heading.js";import{tsx as S,tsxFragment as C}from"../../support/widget.js";import{classes as w}from"../../support/widgetUtils.js";const T=()=>Promise.all([y({"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),action:()=>import(`@esri/calcite-components/dist/components/calcite-action`)}),l(),f(),m()]);function E(e){let{editorViewModel:a,headingLevel:o,messages:l,renderAttachments:f,renderFeatureForm:m,formWidget:y,renderSketchToolbar:w}=e,{activeFeatureCount:T,activeLeafWorkflow:E,activeWorkflow:k,formViewModel:A}=a;if(!E||!k||!A)return null;let j=c(A),M=t(E)&&!E.data.selectedPendingFeature||n(E)&&!E.activeFeature,N=r(E),P=E.shouldShowAttachments&&!j&&!A.activeRelationshipInput&&!A.activeAssociationInput,F=j?A.activeForm.inputs:A.inputs,I=t(E)&&F.every(e=>!e.visible)&&!P,L=a.featureFormViewModel?.activeAssociationInput!=null,R=!M&&!I&&!L,z=I||t(E)&&!P&&!R&&!L,B=i(A)?m:y?.render.bind(y),V=I?S(h,null,S(v,{headingLevel:o,key:`pending-feature-list`,workflow:E})):S(C,null,S(p,{activeFeatureCount:T,messages:l,workflow:k}),N?S(h,{class:s.mergeFeaturesListSection,key:`panel-section-merge`},S(d,{headingLevel:o,key:`merge-features-list`,workflow:E})):void 0,S(h,{key:`panel-content-section-main`},S(g,null,M?S(v,{headingLevel:o,key:`pending-feature-list`,workflow:E}):B?.(),P?S(`div`,{key:`attachments`},S(b,{level:x(o)},l.attachments),f()):null)));return S(C,null,R?D(E,e):void 0,z?w?.():void 0,S(_,{key:`attribute-panel-content`},V),S(u,{buttons:O(e)}))}function D(e,t){let n=[],r=t.editorViewModel.view?.type===`3d`,{visibleElements:i}=t;if(i.zoomToButton&&t.editorViewModel.canZoomTo&&n.push(S(`calcite-action`,{alignment:`center`,icon:`zoom-to-object`,key:`zoom-to-button`,scale:`s`,text:t.messages.zoomTo,title:t.messages.zoomTo,onclick:()=>t.editorViewModel.zoomTo()})),i.splitButton&&a(e)&&e.supportsSplitFeatureWorkflow&&!r&&t.onSplit){let{onSplit:e,messages:r}=t;n.push(S(`calcite-action`,{icon:`split-geometry`,key:`split-button`,scale:`s`,text:r.split,title:r.split,onclick:e}))}if(i.mergeButton&&o(e)&&e.supportsMergeFeaturesWorkflow&&!r&&t.onMerge){let{onMerge:e,messages:r}=t;n.push(S(`calcite-action`,{icon:`merge`,key:`merge-button`,scale:`s`,text:r.mergeFeatures,title:r.mergeFeatures,onclick:e}))}return n.length>0?S(`calcite-action-bar`,{class:w(s.sketchContainer,s.updateActionBar),"data-testid":`update-feature-panel-action-bar`,expandToggleDisabled:!0,layout:`horizontal`,scale:`s`},n):void 0}function O({editorViewModel:t,formWidget:n,messages:r,messagesCommon:a,disallowSave:o,onDelete:s,onDeleteAssociation:c,onSave:l}){let{activeFeatureCount:u,activeLeafWorkflow:d,syncing:f}=t;if(!d)return[];let{page:p}=t;if(p===`viewing-associated-features`||p===`viewing-associated-layers`)return[{appearance:`outline`,onClick:()=>{let e=d.formViewModel;i(e)?e.associationId!=null&&(e.associationId=null):e?.goBack()},disabled:f,label:a.cancel,type:`button`}];let m=t.formViewModel,h=n?.footerButtonInfos??[];if(m&&!i(m)&&m.page!=="default")return h.map(({appearance:e,disabled:t,form:n,icon:r,kind:i,label:a,onclick:o})=>({appearance:e,disabled:t,form:n,icon:r,kind:i,label:a,onClick:o,type:`button`}));let g=[],_=u>1?r.multiFeature:r.singleFeature,v=!d.allowSave||f,y=o||f,b=e(_[d.saveActionLabel],{count:u});g.push({appearance:`solid`,onClick:v?()=>{}:l,disabled:y,kind:`brand`,label:b,type:`button`});let x={appearance:`outline`,disabled:f,kind:`danger`,label:e(_.delete,{count:u}),type:`button`};return t.shouldShowDeleteButton&&!t.formHasAssociation&&s&&g.push({...x,onClick:s}),t.formHasAssociation&&!t.shouldShowDeleteButton&&c&&g.push({...x,onClick:c,label:r.deleteAssociationTitle}),t.formHasAssociation&&t.shouldShowDeleteButton&&c&&s&&g.push({...x,primaryLabel:a.delete,primaryText:a.delete,onClick:s,dropdownItems:[{onClick:c,label:r.deleteAssociationTitle}],type:`split-button`}),g}export{E as UpdateFeaturePanelContent,T as loadUpdateFeaturePanelContentComponents};
|
package/widgets/Expand.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import{makeHandle as n}from"../core/handleUtils.js";import r from"../core/Logger.js";import{watch as i,initial as a}from"../core/reactiveUtils.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import l from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import{messageBundle as f,tsx as p,isWidget as m,hasDomNode as h}from"./support/widget.js";const g=`esri-expand`,_={base:g,toggle:`${g}__toggle`,popoverContent:`${g}__popover-content`,panel:`${g}__panel`,panelContent:`${g}__panel-content`,sheet:`${g}__sheet`,contentContainer:`${g}__content-container`,icon:`esri-collapse__icon`,iconFlip:`esri-collapse__icon-flip`,iconNumber:`${g}__icon-number`},v=`chevrons-left`,y=`chevrons-right`,b=Symbol(`scheduleRender-override-handle`);let x=class extends c{constructor(e,n){super(e,n),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip=``,this.content=``,this.expandTooltip=``,this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode=`auto`,this.placement=null,this.viewModel=new l({suppressDeprecationWarning:!0}),this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&e.key===`Escape`&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(r.getLogger(this),`Expand`,`arcgis-expand`,{version:`4.34`})}initialize(){this.addHandles(i(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),a))}loadDependencies(){return u({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),panel:()=>import(`@esri/calcite-components/dist/components/calcite-panel`),popover:()=>import(`@esri/calcite-components/dist/components/calcite-popover`),sheet:()=>import(`@esri/calcite-components/dist/components/calcite-sheet`)})}get expandTitle(){let{expanded:e,messagesCommon:t,collapseTooltip:n,expandTooltip:r}=this;return(e?n||t?.collapse:r||t?.expand)??``}get _displaySheet(){switch(this.mode){case`drawer`:return!0;case`auto`:return this.viewModel.view?.widthBreakpoint===`xsmall`;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome(`collapseIcon`,e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return typeof this.content==`object`&&`icon`in this.content&&this.content.icon?this.content.icon:v}set expandIcon(e){this._overrideIfSome(`expandIcon`,e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return typeof this.content==`object`&&`label`in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){let{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:n},label:r,placement:i}=this;return p(`div`,{class:this.classes(_.base,d.widget)},this._renderToggle(),e?p(`calcite-sheet`,{class:_.sheet,
|
|
2
|
+
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import{makeHandle as n}from"../core/handleUtils.js";import r from"../core/Logger.js";import{watch as i,initial as a}from"../core/reactiveUtils.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import l from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as u}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import{messageBundle as f,tsx as p,isWidget as m,hasDomNode as h}from"./support/widget.js";const g=`esri-expand`,_={base:g,toggle:`${g}__toggle`,popoverContent:`${g}__popover-content`,panel:`${g}__panel`,panelContent:`${g}__panel-content`,sheet:`${g}__sheet`,contentContainer:`${g}__content-container`,icon:`esri-collapse__icon`,iconFlip:`esri-collapse__icon-flip`,iconNumber:`${g}__icon-number`},v=`chevrons-left`,y=`chevrons-right`,b=Symbol(`scheduleRender-override-handle`);let x=class extends c{constructor(e,n){super(e,n),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip=``,this.content=``,this.expandTooltip=``,this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode=`auto`,this.placement=null,this.viewModel=new l({suppressDeprecationWarning:!0}),this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&e.key===`Escape`&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(r.getLogger(this),`Expand`,`arcgis-expand`,{version:`4.34`})}initialize(){this.addHandles(i(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),a))}loadDependencies(){return u({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),panel:()=>import(`@esri/calcite-components/dist/components/calcite-panel`),popover:()=>import(`@esri/calcite-components/dist/components/calcite-popover`),sheet:()=>import(`@esri/calcite-components/dist/components/calcite-sheet`)})}get expandTitle(){let{expanded:e,messagesCommon:t,collapseTooltip:n,expandTooltip:r}=this;return(e?n||t?.collapse:r||t?.expand)??``}get _displaySheet(){switch(this.mode){case`drawer`:return!0;case`auto`:return this.viewModel.view?.widthBreakpoint===`xsmall`;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome(`collapseIcon`,e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return typeof this.content==`object`&&`icon`in this.content&&this.content.icon?this.content.icon:v}set expandIcon(e){this._overrideIfSome(`expandIcon`,e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return typeof this.content==`object`&&`label`in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){let{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:n},label:r,placement:i}=this;return p(`div`,{class:this.classes(_.base,d.widget)},this._renderToggle(),e?p(`calcite-sheet`,{class:_.sheet,height:`l`,label:r,open:n,position:`block-end`,topLayerDisabled:this.topLayerDisabled,onCalciteSheetClose:this._handleSheetClose,onkeydown:this._handleKeyDown},p(`calcite-panel`,{class:_.panel,closable:!0,closed:!n,heading:r,onCalcitePanelClose:this._handlePanelClose,onkeydown:this._handleKeyDown},p(`div`,{class:_.panelContent},this._renderContent()))):t?p(`calcite-popover`,{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:r,open:n,overlayPositioning:`fixed`,placement:i??this._getPlacement(),referenceElement:t,topLayerDisabled:this.topLayerDisabled,onCalcitePopoverClose:this._handlePopoverClose,onkeydown:this._handleKeyDown},p(`div`,{class:_.popoverContent},this._renderContent())):null)}_getPlacement(){let{container:e,view:t}=this,n=e&&t?t.ui.getPosition(e):null;if(!n||n===`manual`)return`auto`;let[r,i]=n.split(`-`);return`${i===`right`?`left`:`right`}-${r===`bottom`?`end`:`start`}`}_willCloseOnEsc(e){let{closeOnEsc:t}=this;return typeof t==`function`?t(e):t}_renderBadgeNumber(){let{expanded:e,iconNumber:t}=this;return t&&!e?p(`span`,{class:_.iconNumber,key:`expand__icon-number`},t):null}_renderToggleButton(){let{expanded:e,expandTitle:t,expandIcon:n,collapseIcon:r}=this,i=e?r:n,a=i===v||i===y;return p(`calcite-action`,{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:d.widgetButton,text:t,title:t,onclick:this.toggle},i?p(`calcite-icon`,{class:this.classes(_.icon,a&&_.iconFlip),icon:i,scale:`s`}):null)}_renderToggle(){return p(`div`,{class:_.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){let{content:e}=this;return typeof e==`string`?p(`div`,{class:_.contentContainer,innerHTML:e,key:`content__string`}):m(e)?p(`div`,{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(b),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(b),this._overwriteChildScheduleRender(e))},class:_.contentContainer,key:`content__widget`},e.render()):e instanceof HTMLElement?p(`div`,{afterCreate:this._attachToNode,bind:e,class:_.contentContainer,key:`content__html-element`}):h(e)?p(`div`,{afterCreate:this._attachToNode,bind:e.domNode,class:_.contentContainer,key:`content__node`}):null}_overwriteChildScheduleRender(e){let t=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(n(()=>e.scheduleRender=t),b)}_attachToNode(e){let t=this;e.appendChild(t)}};e([o({readOnly:!0})],x.prototype,`expandTitle`,null),e([o()],x.prototype,`_toggleActionEl`,void 0),e([o()],x.prototype,`_displaySheet`,null),e([o()],x.prototype,`autoCollapse`,null),e([o()],x.prototype,`closeOnEsc`,void 0),e([o()],x.prototype,`collapseIcon`,null),e([o()],x.prototype,`collapseTooltip`,void 0),e([o()],x.prototype,`content`,void 0),e([o()],x.prototype,`expanded`,null),e([o()],x.prototype,`expandIcon`,null),e([o()],x.prototype,`expandTooltip`,void 0),e([o()],x.prototype,`focusTrapDisabled`,void 0),e([o()],x.prototype,`group`,null),e([o()],x.prototype,`icon`,null),e([o()],x.prototype,`iconNumber`,void 0),e([o()],x.prototype,`label`,null),e([o(),f(`esri/widgets/Expand/t9n/Expand`)],x.prototype,`messages`,void 0),e([o(),f(`esri/t9n/common`)],x.prototype,`messagesCommon`,void 0),e([o()],x.prototype,`mode`,void 0),e([o()],x.prototype,`placement`,void 0),e([o()],x.prototype,`view`,null),e([o({type:l})],x.prototype,`viewModel`,void 0),x=e([s(`esri.widgets.Expand`)],x);const S=x;export{S as default};
|
package/widgets/FeatureForm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t,formatNumber as n}from"../intl.js";import{isSome as r}from"../core/arrayUtils.js";import{deprecateWidget as i}from"../core/deprecate.js";import a from"../core/Logger.js";import o from"../core/ReactiveMap.js";import{watch as s,whenOnce as c,initial as l}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import{isIntegerField as f}from"../layers/support/fieldUtils.js";import{isSubtypeGroupLayer as p,getSubtypesFromLayer as m}from"../layers/support/layerUtils.js";import{isRelatableFeatureSupportedLayer as h}from"../popup/support/featureUtils.js";import{isString as g}from"../support/guards.js";import _ from"./Widget.js";import{Prompt as v}from"./Editor/components/Prompt.js";import{css as y}from"./FeatureForm/css.js";import{isUtilityNetworkAssociationInput as b,isGroupInput as x,isFieldInput as S,isRelationshipInput as C,isTextElementInput as w,flattenInputs as T,isInputInGroupInput as E,isFieldElementWithInputType as D,getErrorMessageForFieldInput as O,getIconForFeature as k,isNumberFieldInput as A,isInputInThisGroupInput as j,subtypeChangeShouldPrompt as M}from"./FeatureForm/featureFormUtils.js";import N from"./FeatureForm/FeatureFormViewModel.js";import P from"./FeatureForm/VisibleElements.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as I,getIntlOptionsForField as L,numberingSystem as R,prepareISOFieldValueForDateComponents as z,prepareUnixFieldValueForDateComponents as B,normalizeTimeOnlyString as V,getISOFieldValueFromDateComponents as H,getUnixFieldValueFromDateComponents as U}from"./support/dateUtils.js";import{globalCss as W}from"./support/globalCss.js";import{Heading as G,incrementHeadingLevel as K}from"./support/Heading.js";import{messageBundle as q,vmEvent as J,tsx as Y}from"./support/widget.js";import{setFocus as X}from"./support/widgetUtils.js";const Z=`data-field-name`;let Q=class extends _{constructor(e,t){super(e,t),this._associationsWidgetsMap=new o,this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver(e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()},{root:window.document}),this._prompt=null,this._featureFormUNAssociationList=null,this.groupDisplay=`all`,this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new N,this.visibleElements=new P,this._onShowAllRelatedRecordsClick=e=>{let{feature:t,callbacks:n}=this;t&&n?.showAllRelatedRecords&&n.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t,n)=>{let{feature:r,callbacks:i}=this,a=n;if(r&&i?.addRelatedRecord){if(p(n)&&e.activeCategory){let t=e.activeCategory.value,r=n.findSublayerForSubtypeCode(t);r&&h(r)&&(a=r)}i.addRelatedRecord({parentFeature:r,relatedLayer:a,relationshipId:t})}},e?.suppressDeprecationWarning||(this.announceDeprecation=()=>{i(a.getLogger(this),`Feature Form`,`arcgis-feature-form`,{version:`5.0`})}),this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),this._afterGroupCreate=this._afterGroupCreate.bind(this)}normalizeCtorArgs(e={}){let{suppressDeprecationWarning:t,...n}=e;return n}initialize(){this.addHandles([s(()=>this.feature,()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),c(()=>!this.viewModel.updating).then(()=>{let e=this._getFocusableInput(`forward`);this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0})}),s(()=>[this._featureFormUNAssociationList,this.visibleElements.associationDetails],([e,t])=>{e&&(e.visibleElements.associationDetails=t)},l),s(()=>this.groupDisplay,()=>this._syncGroupInputStates()),this.on(`submit`,e=>{if(e.invalid.length>0){let[t]=e.invalid;e.invalid.forEach(e=>this._inputsWithChanges.add(e)),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}}),s(()=>[this.viewModel.activeRelationshipInput,this._listObserverNode],()=>this._onObserverChange()),s(()=>this.viewModel.activeAssociationInput,e=>{e&&this._featureFormUNAssociationList&&(this._featureFormUNAssociationList.associationInput=e,this._featureFormUNAssociationList.viewModel=e.viewModel)}),s(()=>this.viewModel.inputs.filter(b),async e=>{this._featureFormUNAssociationList||await this._setUpUtilityNetworkAssociationList();for(let t of e)this._associationsWidgetsMap.has(t)||this._associationsWidgetsMap.set(t,await this._makeAssociationsWidget(t))})])}loadDependencies(){return F({block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),chip:()=>import(`@esri/calcite-components/dist/components/calcite-chip`),combobox:()=>import(`@esri/calcite-components/dist/components/calcite-combobox`),"combobox-item":()=>import(`@esri/calcite-components/dist/components/calcite-combobox-item`),"combobox-item-group":()=>import(`@esri/calcite-components/dist/components/calcite-combobox-item-group`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),"input-date-picker":()=>import(`@esri/calcite-components/dist/components/calcite-input-date-picker`),"input-message":()=>import(`@esri/calcite-components/dist/components/calcite-input-message`),"input-number":()=>import(`@esri/calcite-components/dist/components/calcite-input-number`),"input-time-picker":()=>import(`@esri/calcite-components/dist/components/calcite-input-time-picker`),"input-time-zone":()=>import(`@esri/calcite-components/dist/components/calcite-input-time-zone`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),"list-item":()=>import(`@esri/calcite-components/dist/components/calcite-list-item`),loader:()=>import(`@esri/calcite-components/dist/components/calcite-loader`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),"radio-button":()=>import(`@esri/calcite-components/dist/components/calcite-radio-button`),"radio-button-group":()=>import(`@esri/calcite-components/dist/components/calcite-radio-button-group`),switch:()=>import(`@esri/calcite-components/dist/components/calcite-switch`),"text-area":()=>import(`@esri/calcite-components/dist/components/calcite-text-area`)})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){let{callbacks:e}=this;return!!(e&&(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get _utilityNetworkAssociationsEnabled(){let{callbacks:e}=this;return!!(e?.viewAssociatedLayers&&e.viewAssociatedFeatures)}get _subtypes(){return m(this.layer)}get associationId(){return this.viewModel.associationId}set associationId(e){this.viewModel.associationId=e}get associatedLayer(){return this.viewModel.associatedLayer}set associatedLayer(e){this.viewModel.associatedLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return`form-field`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get callbacks(){return this.viewModel.callbacks}set callbacks(e){this.viewModel.callbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome(`showPrompt`,e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome(`clearPrompt`,e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){let{state:e}=this.viewModel;return Y(`div`,{class:this.classes(y.base,W.widget,W.panel)},e===`ready`?this._renderForm():null)}_renderForm(){return Y(`div`,null,Y(`form`,{class:y.form,inert:!!this._prompt,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderReadOnlyNotice(),this._renderHeader(),this._renderContent()),this._prompt?Y(v,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderReadOnlyNotice(){let{disabled:e,messages:t}=this;if(e&&this.visibleElements.readOnlyNotice)return Y(`calcite-notice`,{class:y.disabledNotice,"data-testid":`read-only-notice`,icon:`read-only-non-editable`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},t.disabledForm))}_renderHeader(){let e=this.viewModel,{formTitle:t,formDescription:n}=e;if(!e.formHeaderVisible)return;let r=t!=null&&Y(G,{key:`title`,level:this.headingLevel},t),i=n!=null&&Y(`p`,{class:y.description,key:`description`},n);return Y(`div`,{class:y.formHeader},r,i)}_renderContent(){let{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.activeAssociationInput?this._renderFeatureFormUtilityNetworkAssociationList():e.inputs.filter(r).filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){if(x(e))return this._renderGroup(e);if(S(e))return this._renderLabeledField(e);if(C(e))return this._renderRelationshipInput(e);if(w(e))return this._renderTextElementInput(e);if(b(e))return this._renderUtilityNetworkAssociationsElementInput(e)}_renderFeatureFormUtilityNetworkAssociationList(){return this._featureFormUNAssociationList?.render()}_selectAssociatedLayer(e){let{feature:t,callbacks:n}=this;t&&n?.viewAssociatedFeatures&&n.viewAssociatedFeatures({associatedLayer:e.layer})}async _selectAssociatedFeature(e){let{feature:t,callbacks:n}=this;t&&n?.selectAssociatedFeature&&await n.selectAssociatedFeature({parentFeature:t,...e})}_onAddAssociation(e){let{feature:t,callbacks:n}=this;t&&n?.addAssociation&&n.addAssociation(e)}async _setUpUtilityNetworkAssociationList(){if(!this._featureFormUNAssociationList){let e=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js`)).default;this._featureFormUNAssociationList=new e({onSelectLayer:this._selectAssociatedLayer.bind(this),onSelectFeature:this._selectAssociatedFeature.bind(this),onAddAssociation:this._onAddAssociation.bind(this)})}}async _makeAssociationsWidget(e){let t=(await import(`./Feature/FeatureUtilityNetworkAssociations.js`)).default;return new t({onSelectAssociationType:({viewModel:t,listType:n})=>{t.activeAssociationType=n;let{feature:r,callbacks:i}=this;r&&i?.viewAssociatedLayers&&i.viewAssociatedLayers({associationId:e.uid})},viewModel:e.associationsViewModel})}_renderUtilityNetworkAssociationsElementInput(e){if(this._utilityNetworkAssociationsEnabled)return this._associationsWidgetsMap.get(e)?.render()}_renderDescriptionOrEmpty(e,t){return e==null?null:Y(`div`,{class:this.classes(y.description),id:t},e)}_renderGroup(e){let{formTemplate:t,headingLevel:n}=this,{description:r,id:i,inputs:a,label:o,open:s}=e,c=a.filter(e=>e.visible),l=this.viewModel.findField(this._focusedFieldName)?.group===e,u=this.groupDisplay===`sequential`;return Y(`calcite-block`,{afterCreate:this._afterGroupCreate,class:this.classes(y.group,u?y.groupSequential:null,l?y.groupActive:null),collapsible:!0,"data-group":e,description:r||void 0,expanded:s,heading:o??``,headingLevel:t?.title?K(n):n,id:i,key:i,onCalciteBlockToggle:({currentTarget:t})=>this._onGroupToggle(t,e)},c.map(e=>this._renderInput(e)))}_getFocusableInput(e,t){let n=T(this.viewModel.inputs);e===`backward`&&n.reverse();let r;if(!t)r=0;else if(x(t)){let e=t.inputs.find(e=>e.visible);r=e?n.indexOf(e):0}else{let i;if(E(t)&&!t.group.open){let n=t.group.inputs.filter(S);i=e===`forward`?n[n.length-1]:n[0]}else i=t;r=n.indexOf(i)+1}for(let e=r;e<n.length;e++){let t=n[e];if(t.visible&&S(t)){if(this.disabled&&t.inputType&&(t.inputType===`switch`||t.inputType===`radio-buttons`))continue;return t}}return null}_renderLabeledField(e){let{dataType:n,feature:r,label:i,layer:a,required:o}=e,s={"aria-label":o?t(this.messages.requiredFieldLabel,{name:i}):i,class:y.label,key:`${a.id}-${r.uid}-${e.name}`},c=[Y(`div`,{class:y.labelTextContent,key:`labelTextContainer`},i,o?Y(`span`,{"aria-hidden":`true`,title:this.messagesCommon.required},`*`):void 0),n===`unsupported`?this._renderReadOnlyComponent(e):this._renderFieldInput(e),this._renderAuxiliaryText(e)];return Y(`calcite-label`,{...s},c)}_renderFieldInput(e){let{dataType:t,domain:n,inputType:r,name:i}=e,a=this.getCommonInputProps(e);if(n?.type===`coded-value`){let t=this.viewModel.getFieldValueOptionsForField(i,this.messages.empty);return r===`switch`&&!e.hasInvalidSwitchValue?this._renderSwitchComponent(e,a):r===`radio-buttons`?this._renderRadioButtonComponents(e,t.flat(),a):this._renderComboBoxComponent(e,t,a)}return r===`datetime-picker`||t===`date`?this._renderDateComponents(e,a):t===`number`?this._renderNumberComponent(e,a):this._renderStringComponent(e,a)}_renderStringComponent(e,t){return e.inputType===`text-area`?t.readOnly?Y(`calcite-text-area`,{...t,onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):Y(`calcite-text-area`,{...t,resize:`vertical`,onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):Y(`calcite-input`,{...t,loading:e.updating,type:`text`,onCalciteInputInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderNumberComponent(e,t){let n=f(e.field),r=n&&t.value!==``?Math.round(parseFloat(t.value)).toString():t.value;return Y(`calcite-input-number`,{...t,integer:n,loading:e.updating,step:n?1:`any`,type:`number`,value:r,onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderDateComponents(e,t){let{field:n}=e;switch(n.type){case`date`:return this._renderDateFieldComponents(e,t);case`date-only`:return this._renderDateOnlyFieldComponent(e,t);case`time-only`:return this._renderTimeOnlyFieldComponent(e,t);case`timestamp-offset`:return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,I(n,t.value,{timeZone:this.timeZone,...L(n)}))}}_renderDateOnlyFieldComponent(e,t){let{range:n,valid:r,value:i}=e,{class:a,key:o,readOnly:s}=t,{rawMax:c,rawMin:l}=n;return Y(`calcite-input-date-picker`,{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!r,class:a,"data-date-part":`date`,"data-field-name":t[Z],key:`${o}-date-input`,max:g(c)?c:void 0,min:g(l)?l:void 0,numberingSystem:R,overlayPositioning:`fixed`,readOnly:s,topLayerDisabled:this.topLayerDisabled,value:i==null?void 0:`${i}`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget),onfocus:this._onComponentFocus})}_renderTimeOnlyFieldComponent(e,t){let{valid:n,value:r}=e,{class:i,key:a,readOnly:o}=t;return Y(`calcite-input-time-picker`,{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,class:i,"data-date-part":`time`,"data-field-name":t[Z],key:`${a}-time-input`,numberingSystem:R,overlayPositioning:`fixed`,readOnly:o,step:e.timeStep,value:r==null?void 0:`${r}`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget),onfocus:this._onComponentFocus})}_renderTimestampOffsetFieldComponents(e,t){let{name:n,range:r,timeZone:i,valid:a,value:o}=e,{class:s,key:c,readOnly:l}=t,{rawMax:u,rawMin:d}=r,f={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!a,numberingSystem:R,overlayPositioning:`fixed`,readOnly:l,[Z]:n,onfocus:this._onComponentFocus},p=z(u,i),m=z(d,i),h=z(o,i);return Y(`div`,{class:y.dateInputContainer,key:`${c}-date-time-container`},Y(`calcite-input-date-picker`,{...f,class:s,"data-date-part":`date`,key:`${c}-date-input`,max:p?.date??void 0,min:m?.date??void 0,topLayerDisabled:this.topLayerDisabled,value:h.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),Y(`calcite-input-time-picker`,{...f,class:s,"data-date-part":`time`,key:`${c}-time-input`,step:e.timeStep,value:h.time??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),e.includeTimeOffset?Y(`calcite-input-time-zone`,{...f,class:s,"data-date-part":`timeZone`,disabled:l,key:`${c}-timezone-input`,value:h.timeZoneOffset??`0`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderDateFieldComponents(e,t){let{includeTime:n,name:r,valid:i,value:a}=e,{class:o,key:s,max:c,min:l,readOnly:u}=t,{timeZone:d}=this,f={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,numberingSystem:R,overlayPositioning:`fixed`,readOnly:u,[Z]:r,onfocus:this._onComponentFocus},p=B(a,d),m=B(c,d),h=B(l,d);return Y(`div`,{class:y.dateInputContainer,key:`${s}-date-time-container`},Y(`calcite-input-date-picker`,{...f,class:o,"data-date-part":`date`,key:`${s}-date-input`,max:m?.date??void 0,min:h?.date??void 0,topLayerDisabled:this.topLayerDisabled,value:p.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),n?Y(`calcite-input-time-picker`,{...f,class:o,"data-date-part":`time`,key:`${s}-time-input`,step:1,value:p.time??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderReadOnlyComponent(e,t){let n=this.getCommonInputProps(e);return Y(`calcite-input`,{...n,class:this.classes(y.fieldInput,y.inputDisabled),readOnly:!0,type:`text`,value:t==null?n.value:`${t}`})}_renderComboBoxComponent(e,t,n){let{value:r,name:i}=e,{viewModel:a,_inputsWithChanges:o}=this,s=a.editType===`INSERT`,c=o.has(i),l=r==null&&(!s||c),u=s&&e.showNoValueOptionEnabled&&!c?()=>{}:n.onblur;return Y(`calcite-combobox`,{...n,allowCustomValues:!1,clearDisabled:!0,overlayPositioning:`fixed`,selectionMode:`single`,topLayerDisabled:this.topLayerDisabled,onblur:u,onCalciteComboboxChange:({currentTarget:t})=>{l&&t.selectedItems.length===0?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&t.selectedItems.length===0?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){let{value:n,name:r}=e,{messages:i,messagesTemplates:a,viewModel:o,_inputsWithChanges:s}=this,[c,l,u]=t.map(e=>e.map(({name:e,value:t})=>Y(`calcite-combobox-item`,{heading:e,key:`#${t}`,selected:n===t,value:`${t}`}))),d=[];l.length>0&&d.push(Y(`calcite-combobox-item-group`,{key:`other`,label:a.other},l)),u.length>0&&d.push(Y(`calcite-combobox-item-group`,{key:`unsupported`,label:i.subtypes.unsupportedDomainGroupTitle},u)),d.length>0?d.unshift(Y(`calcite-combobox-item-group`,{key:`recommended`,label:i.recommended},c)):d.push(...c);let f=o.editType===`INSERT`,p=s.has(r),m=n==null&&(!f||p);return e.showNoValueOptionEnabled&&d.unshift(Y(`calcite-combobox-item`,{heading:e.showNoValueLabel||i.empty,key:`empty-option`,selected:m,value:``})),d}_renderRadioButtonComponents(e,t,n){let{value:r}=e,i=t.map(({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,value:t,selected:t===r,props:n}));if(e.showNoValueOptionEnabled){let t=e.showNoValueLabel||this.messages.empty,a=r===``||r===null;i.unshift(this._renderRadioButtonComponent({key:`empty-option`,label:t,value:``,selected:a,props:n}))}return Y(`calcite-radio-button-group`,{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:y.inputRadioGroup,"data-field-name":n[Z],key:`${n.key}-radio-group`,layout:`vertical`,name:`${n.key}-${this.id}`,required:n.required},i)}_renderSwitchComponent(e,t){let{value:n}=e,r=D(e.element,`switch`)?n===e.element.input.onValue:!1;return Y(`calcite-switch`,{...t,checked:r,class:y.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.currentTarget)})}_renderRadioButtonComponent({key:e,value:t,selected:n,label:r,props:i}){return Y(`calcite-label`,{class:y.inputRadioLabel,key:e,layout:`inline`},Y(`calcite-radio-button`,{...i,afterCreate:void 0,afterUpdate:void 0,checked:n,class:y.inputRadio,disabled:i.readOnly,value:t,onblur:()=>{this._focusedFieldName=null},onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveValueFromComponent(e)}}),r)}_renderAuxiliaryText(e){let t=e.name,n=this._inputsWithChanges.has(t)&&!e.submittable?O(e,this.messages,this.timeZone):this.viewModel.contingencyConstraintViolations.get(t)==null?e.valueExpressionExecutor!=null&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null:this.messages.validationErrors.valuesIncompatible;return n==null?this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?Y(`calcite-input-message`,{icon:!0,status:`idle`},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description):Y(`calcite-input-message`,{icon:!0,status:`invalid`},n)}_renderShowAllRelatedRecordsListItem(e){if(!e.showAllActionVisible||!this.callbacks?.showAllRelatedRecords)return;let n=this.messages;return Y(`calcite-list-item`,{description:t(n.totalCount,{count:e.featureCount}),key:`show-all-related-features`,label:n.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(e.relationshipId)},Y(`calcite-icon`,{icon:`list`,scale:`s`,slot:`content-end`}))}_renderAddRelatedRecordButton(e){let{canAddRelatedFeature:t,relationshipId:n,relatedLayer:r,editable:i}=e,{messages:a,callbacks:o,disabled:s}=this,c=!i||s;if(t&&o?.addRelatedRecord&&r&&!c)return Y(`calcite-button`,{alignment:`center`,appearance:`outline-fill`,class:y.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:`plus`,key:`${n}-add-button`,round:!0,scale:`s`,width:`full`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(e,n,r)}},e.relatedLayerIsTable?a.addRecord:a.addFeature)}_renderRelatedRecordListItem(e,t,n){let{feature:r,description:i,title:a}=e,{feature:o,callbacks:s}=this,{highlightHelper:c}=this.viewModel,l=()=>{c?.removeAll(),s?.editRelatedRecord&&o&&s.editRelatedRecord({parentFeature:o,relationshipId:t,relatedFeature:r,readOnly:n})},u=c?()=>c.add(r):void 0,d=c?()=>c.remove(r):void 0;return Y(`calcite-list-item`,{bind:this,description:i,key:`${t}-${r.uid}`,label:a,value:a,onCalciteListItemSelect:l,onmouseenter:u,onmouseleave:d},Y(`calcite-icon`,{icon:k(r),slot:`content-start`}),Y(`calcite-icon`,{flipRtl:!0,icon:`chevron-right`,scale:`s`,slot:`content-end`}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled)return;let{relationshipId:t,activeCategory:n}=e,r=n?null:this._renderDescriptionOrEmpty(e.description);return Y(`calcite-label`,{class:this.classes(y.label,y.relatedRecordsLabel),key:`relationship-${t}-container`},Y(`div`,null,this._renderRelatedRecordsHeaderContainer(e),r,this._renderRelationshipInputContent(e)),this._renderAddRelatedRecordButton(e))}_renderRelationshipInputContent(e){if(e.featureCount>0)return this._renderRelatedRecordsList(e);if(e.activeCategory&&e.featureCount===0)return this._renderNoRelatedRecordsNotice();if(e.allCategories?.length)return this._renderCategoryList(e);if(e.loaded)return e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e)}_renderCategoryList(e){return Y(`calcite-list`,{displayMode:`flat`,label:this.messages.relatedRecordsList,loading:e.updating},e.categories?.map(t=>this._renderCategory(e,t)),this._renderShowAllCategoriesListItem(e))}_renderCategory(e,t){let{count:r,name:i,value:a}=t,o=n(r);return Y(`calcite-list-item`,{key:`${i}-${a}`,label:i,onCalciteListItemSelect:()=>this._selectCategory(e,t)},Y(`calcite-chip`,{label:o,scale:`s`,slot:`content-end`},o),Y(`calcite-icon`,{flipRtl:!0,icon:`chevron-right`,scale:`s`,slot:`content-end`}))}_selectCategory(e,t){this.relationshipId=e.relationshipId,e.activeCategory=t}_renderShowAllCategoriesListItem(e){if(!e.showAllCategoriesVisible)return;let n=this.messages;return Y(`calcite-list-item`,{description:t(n.totalCount,{count:e.allCategories?.length??0}),key:`show-all-categories`,label:n.showAll,value:!0,onCalciteListItemSelect:()=>e.showAllEnabled=!0},Y(`calcite-icon`,{icon:`list`,scale:`s`,slot:`content-end`}))}_renderRelatedRecordsHeaderContainer(e){let t=e.updating||!e.loaded;return Y(`div`,{class:y.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},Y(`span`,null,e.label),t?Y(`calcite-loader`,{inline:!0,key:`loader`,label:this.messagesCommon?.loading,scale:`s`,type:`indeterminate`}):void 0)}_renderRelatedRecordsList(e){let{relationshipId:t,editable:n}=e,{disabled:r}=this,i=!n||r;return Y(`calcite-list`,{class:y.relatedRecordsList,label:this.messages?.relatedRecordsList},e.relatedFeatureInfos.map(e=>this._renderRelatedRecordListItem(e,t,i)),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){let{messages:n}=this,r=e.relatedLayerIsTable?n.noOriginKeyRecord:n.noOriginKeyFeature,i=e.relationship?.keyField,a=this.viewModel.findField(i),o=e.layer?.fieldsIndex.get(i),s=a?.label||o?.alias||i,c=t(r,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return Y(`calcite-notice`,{icon:`information`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},c))}_renderNoRelatedRecordsNotice(){return Y(`calcite-notice`,{icon:`information`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return Y(`div`,{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:y.listObserver,key:`feature-observer`})}_renderTextElementInput(e){return Y(`div`,{class:y.textElement,"data-testid":`text-element-${e.label}`,innerHTML:e.text,key:e.id})}getCommonInputProps(e){let{disabled:t}=this,{editable:n,hint:r,label:i,maxLength:a,minLength:o,name:s,range:{max:c,min:l},required:u,valid:d,value:f}=e,p=this._inputsWithChanges.has(s),m=!n||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":d?`false`:`true`,class:this.classes(y.fieldInput,m?y.inputDisabled:null),status:p&&!d?`invalid`:`idle`,key:s,label:i,max:c??void 0,min:l??void 0,maxLength:a>-1?a:void 0,minLength:o>-1?o:void 0,placeholder:r??void 0,readOnly:m,required:u,value:f==null?``:`${f}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[Z]:s}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(Z))}_afterDateComponentCreate(e){let t=this._getFieldInputFromHTMLElement(e),n=e.dataset.datePart,r=this._dateComponentMap.get(t.name);if(`valueAsDate`in e&&e.value!=null&&t.value!=null){let n=new ResizeObserver(()=>{switch(e.value=void 0,t.field.type){case`date`:e.value=B(t.value,this.timeZone).date??``;break;case`timestamp-offset`:e.value=z(t.value,this.timeZone).date??``;break;default:e.value=`${t.value}`}n.unobserve(e)});n.observe(e)}if(r!=null)switch(n){case`date`:r.date=e;break;case`time`:r.time=e;break;case`timeZone`:r.timeZone=e}else this._dateComponentMap.set(t.name,{[n]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){let t=this._getFieldInputFromHTMLElement(e);A(t)&&e.value!=null&&`setNumberValue`in e&&e.setNumberValue({committing:!1,value:e.value,origin:`direct`}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){let t=e.selectedItem,n=e.querySelector(`calcite-radio-button`),r=t||n;r&&this._afterComponentCreateOrUpdate(r)}_afterComponentCreateOrUpdate(e){let{viewModel:t}=this,n=this._getFieldInputFromHTMLElement(e),r=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&r===n&&(this._attemptFocusOnNextRender=!1,E(n)&&(n.group.open=!0),X(e))}async _afterGroupCreate(e){let t=this.viewModel.findGroup(e.id),n=this.viewModel.findField(this._focusedFieldName);n&&t&&j(n,t)&&(!n.editable||this.disabled)&&(await e.componentOnReady(),this._attemptFocusOnNextRender=!0,this.scheduleRender())}_onComponentFocus(e){let t=e.target,n=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=n.name}_onComponentBlur(e){let t=e.target;this._focusedFieldName=null,`readOnly`in t&&t.readOnly||this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){let{timeZone:t}=this,n=this._getFieldInputFromHTMLElement(e),r=n.field.type,{name:i,range:a}=n,o=this._dateComponentMap.get(i);if(!o)return;let s=this.viewModel.getValue(i),c=null;r===`date-only`?c=Array.isArray(e.value)?e.value[0]:e.value:r===`time-only`?(s=V(s),c=V(e.value)):c=r===`timestamp-offset`?e.value==null?null:H({dateComponent:o.date,timeComponent:o.time,timeZoneComponent:o.timeZone,oldValue:s,defaultTimeZone:t}):e.value==null?null:U({oldValue:s,dateComponent:o.date,timeComponent:o.time,timeZone:t,max:a.max,min:a.min}),c===null||!e.value?this._updateFieldValue(i,null):s!==c&&this._updateFieldValue(i,c)}_saveValueFromComponent(e){let t=this._getFieldInputFromHTMLElement(e),n=this._parseValue(e),r=t.value;!t.isSubtypeField||!M(this.layer,r,n)?this._updateFieldValue(t.name,n):!this._pendingSubtypeChoice&&n!==r&&(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,n))}async _handleSubtypeChoice(e,n){let{value:r,name:i}=e,{messages:a,viewModel:o,messagesCommon:s,_subtypes:c}=this;if(this._updateFieldValue(i,n),!c?.length)return;let l=c.find(e=>e.code===n),u=c.find(e=>e.code===r)?.name??`${r}`;if(!l)return;let d=Promise.withResolvers();o.pendingSubtypeChoice=d;let f=`update-fields`,p=[{label:a.subtypes.useDefaultValuesOption,value:`update-fields`},{label:a.subtypes.keepCurrentValuesOption,value:`keep-existing`}],m={context:`info`,title:a.subtypes.changeWarningTitle,message:t(a.subtypes.changeWarning,{originalType:u,newType:l.name}),radios:p,defaultRadioSelection:`update-fields`,onRadioSelection:e=>f=e,actions:{primary:{label:s.apply,action:()=>d.resolve(f),type:`positive`},secondary:{label:s.cancel,type:`neutral`,action:()=>d.resolve(`undo`)}},cancel:()=>d.reject()};try{switch(this.showPrompt(m),await d.promise){case`update-fields`:o.applySubtypeDefaults(l),this._validateContingenciesForNonNullFields();break;case`keep-existing`:this._validateContingenciesForNonNullFields();break;case`undo`:this._updateFieldValue(e.name,r)}}finally{o.pendingSubtypeChoice=null,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){let n=this._getFieldInputFromHTMLElement(t);e===`Enter`&&E(n)&&!n.group.open&&(n.group.open=!0)}_updateFieldValue(e,t){let n=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e),n!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){let e=Object.fromEntries(Object.entries(this.getValues()).filter(([e,t])=>t!=null));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){let t=this._getFieldInputFromHTMLElement(e),n=e.value;return D(t.element,`switch`)?e.checked?t.element.input.onValue:t.element.input.offValue:n==null||n===``?null:t.dataType===`number`?n===`-0`||n===`-0.`||n===`-0,`?n:parseFloat(n):t.field.type===`date`?parseFloat(n):n}_ignoreDeselectionOfNoValueOption(e){let{firstChild:t,selectedItems:n}=e;n.length===0&&t&&`selected`in t?t.selected=!0:a.getLogger(this).warnOnce(`Failed to override user attempt to deselect 'No value' option.`)}_onGroupToggle(e,t){e.expanded?(t.open=!0,this._focusedFieldName=this._getFocusableInput(`forward`,t)?.name||null,this._attemptFocusOnNextRender=!0,this.groupDisplay===`sequential`&&this.viewModel.allGroupInputs.forEach(e=>{e!==t&&(e.open=!1)})):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){e.key===`Enter`&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);let e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){this.viewModel.activeRelationshipInput?.incrementPage()}_syncGroupInputStates(){if(this.groupDisplay!==`sequential`)return;let e=this.viewModel.allGroupInputs;if(!e.length)return;let t=e.filter(e=>e.open);t.length===0?e[0].open=!0:t.length>1&&t.slice(1).forEach(e=>e.open=!1)}get test(){return{inputsWithChanges:this._inputsWithChanges,updateValue:this._saveValueFromComponent.bind(this)}}};e([u()],Q.prototype,`_listObserverNode`,void 0),e([u()],Q.prototype,`_relatedRecordsEnabled`,null),e([u()],Q.prototype,`_utilityNetworkAssociationsEnabled`,null),e([u()],Q.prototype,`_prompt`,void 0),e([u()],Q.prototype,`_subtypes`,null),e([u()],Q.prototype,`associationId`,null),e([u()],Q.prototype,`associatedLayer`,null),e([u()],Q.prototype,`disabled`,null),e([u()],Q.prototype,`feature`,null),e([u()],Q.prototype,`_featureFormUNAssociationList`,void 0),e([u()],Q.prototype,`formTemplate`,null),e([u()],Q.prototype,`groupDisplay`,void 0),e([u()],Q.prototype,`headingLevel`,void 0),e([u()],Q.prototype,`icon`,null),e([u()],Q.prototype,`label`,null),e([u()],Q.prototype,`layer`,null),e([u()],Q.prototype,`map`,null),e([u(),q(`esri/widgets/FeatureForm/t9n/FeatureForm`)],Q.prototype,`messages`,void 0),e([u(),q(`esri/t9n/common`)],Q.prototype,`messagesCommon`,void 0),e([u(),q(`esri/widgets/Feature/t9n/Feature`)],Q.prototype,`messagesFeature`,void 0),e([u(),q(`esri/widgets/FeatureTemplates/t9n/FeatureTemplates`)],Q.prototype,`messagesTemplates`,void 0),e([u()],Q.prototype,`callbacks`,null),e([u()],Q.prototype,`relationshipId`,null),e([u()],Q.prototype,`spatialReference`,null),e([u()],Q.prototype,`strict`,null),e([u()],Q.prototype,`timeZone`,null),e([u()],Q.prototype,`showPrompt`,null),e([u()],Q.prototype,`clearPrompt`,null),e([u({type:N}),J([`value-change`,`submit`])],Q.prototype,`viewModel`,void 0),e([u({type:P,nonNullable:!0})],Q.prototype,`visibleElements`,void 0),e([u()],Q.prototype,`test`,null),Q=e([d(`esri.widgets.FeatureForm`)],Q);const $=Q;export{$ as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t,formatNumber as n}from"../intl.js";import{isSome as r}from"../core/arrayUtils.js";import{deprecateWidget as i}from"../core/deprecate.js";import a from"../core/Logger.js";import o from"../core/ReactiveMap.js";import{watch as s,whenOnce as c,initial as l}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import{isIntegerField as f}from"../layers/support/fieldUtils.js";import{isSubtypeGroupLayer as p,getSubtypesFromLayer as m}from"../layers/support/layerUtils.js";import{isRelatableFeatureSupportedLayer as h}from"../popup/support/featureUtils.js";import{isString as g}from"../support/guards.js";import _ from"./Widget.js";import{Prompt as v}from"./Editor/components/Prompt.js";import{css as y}from"./FeatureForm/css.js";import{isUtilityNetworkAssociationInput as b,isGroupInput as x,isFieldInput as S,isRelationshipInput as C,isTextElementInput as w,flattenInputs as T,isInputInGroupInput as E,isFieldElementWithInputType as D,getErrorMessageForFieldInput as O,getIconForFeature as k,isNumberFieldInput as A,isInputInThisGroupInput as j,subtypeChangeShouldPrompt as M}from"./FeatureForm/featureFormUtils.js";import N from"./FeatureForm/FeatureFormViewModel.js";import P from"./FeatureForm/VisibleElements.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as I,getIntlOptionsForField as L,numberingSystem as R,prepareISOFieldValueForDateComponents as z,prepareUnixFieldValueForDateComponents as B,normalizeTimeOnlyString as V,getISOFieldValueFromDateComponents as H,getUnixFieldValueFromDateComponents as U}from"./support/dateUtils.js";import{globalCss as W}from"./support/globalCss.js";import{Heading as G,incrementHeadingLevel as K}from"./support/Heading.js";import{messageBundle as q,vmEvent as J,tsx as Y}from"./support/widget.js";import{setFocus as X}from"./support/widgetUtils.js";const Z=`data-field-name`;let Q=class extends _{constructor(e,t){super(e,t),this._associationsWidgetsMap=new o,this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver(e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()},{root:window.document}),this._prompt=null,this._featureFormUNAssociationList=null,this.groupDisplay=`all`,this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new N,this.visibleElements=new P,this._onShowAllRelatedRecordsClick=e=>{let{feature:t,callbacks:n}=this;t&&n?.showAllRelatedRecords&&n.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t,n)=>{let{feature:r,callbacks:i}=this,a=n;if(r&&i?.addRelatedRecord){if(p(n)&&e.activeCategory){let t=e.activeCategory.value,r=n.findSublayerForSubtypeCode(t);r&&h(r)&&(a=r)}i.addRelatedRecord({parentFeature:r,relatedLayer:a,relationshipId:t})}},e?.suppressDeprecationWarning||(this.announceDeprecation=()=>{i(a.getLogger(this),`Feature Form`,`arcgis-feature-form`,{version:`5.0`})}),this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),this._afterGroupCreate=this._afterGroupCreate.bind(this)}normalizeCtorArgs(e={}){let{suppressDeprecationWarning:t,...n}=e;return n}initialize(){this.addHandles([s(()=>this.feature,()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),c(()=>!this.viewModel.updating).then(()=>{let e=this._getFocusableInput(`forward`);this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0})}),s(()=>[this._featureFormUNAssociationList,this.visibleElements.associationDetails],([e,t])=>{e&&(e.visibleElements.associationDetails=t)},l),s(()=>this.groupDisplay,()=>this._syncGroupInputStates()),this.on(`submit`,e=>{if(e.invalid.length>0){let[t]=e.invalid;e.invalid.forEach(e=>this._inputsWithChanges.add(e)),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}}),s(()=>[this.viewModel.activeRelationshipInput,this._listObserverNode],()=>this._onObserverChange()),s(()=>this.viewModel.activeAssociationInput,e=>{e&&this._featureFormUNAssociationList&&(this._featureFormUNAssociationList.associationInput=e,this._featureFormUNAssociationList.viewModel=e.viewModel)}),s(()=>this.viewModel.inputs.filter(b),async e=>{this._featureFormUNAssociationList||await this._setUpUtilityNetworkAssociationList();for(let t of e)this._associationsWidgetsMap.has(t)||this._associationsWidgetsMap.set(t,await this._makeAssociationsWidget(t))})])}loadDependencies(){return F({block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),chip:()=>import(`@esri/calcite-components/dist/components/calcite-chip`),combobox:()=>import(`@esri/calcite-components/dist/components/calcite-combobox`),"combobox-item":()=>import(`@esri/calcite-components/dist/components/calcite-combobox-item`),"combobox-item-group":()=>import(`@esri/calcite-components/dist/components/calcite-combobox-item-group`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),"input-date-picker":()=>import(`@esri/calcite-components/dist/components/calcite-input-date-picker`),"input-message":()=>import(`@esri/calcite-components/dist/components/calcite-input-message`),"input-number":()=>import(`@esri/calcite-components/dist/components/calcite-input-number`),"input-time-picker":()=>import(`@esri/calcite-components/dist/components/calcite-input-time-picker`),"input-time-zone":()=>import(`@esri/calcite-components/dist/components/calcite-input-time-zone`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),"list-item":()=>import(`@esri/calcite-components/dist/components/calcite-list-item`),loader:()=>import(`@esri/calcite-components/dist/components/calcite-loader`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),"radio-button":()=>import(`@esri/calcite-components/dist/components/calcite-radio-button`),"radio-button-group":()=>import(`@esri/calcite-components/dist/components/calcite-radio-button-group`),switch:()=>import(`@esri/calcite-components/dist/components/calcite-switch`),"text-area":()=>import(`@esri/calcite-components/dist/components/calcite-text-area`)})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){let{callbacks:e}=this;return!!(e&&(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get _utilityNetworkAssociationsEnabled(){let{callbacks:e}=this;return!!(e?.viewAssociatedLayers&&e.viewAssociatedFeatures)}get _subtypes(){return m(this.layer)}get associationId(){return this.viewModel.associationId}set associationId(e){this.viewModel.associationId=e}get associatedLayer(){return this.viewModel.associatedLayer}set associatedLayer(e){this.viewModel.associatedLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return`form-field`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get callbacks(){return this.viewModel.callbacks}set callbacks(e){this.viewModel.callbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome(`showPrompt`,e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome(`clearPrompt`,e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){let{state:e}=this.viewModel;return Y(`div`,{class:this.classes(y.base,W.widget,W.panel)},e===`ready`?this._renderForm():null)}_renderForm(){return Y(`div`,null,Y(`form`,{class:y.form,inert:!!this._prompt,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderReadOnlyNotice(),this._renderHeader(),this._renderContent()),this._prompt?Y(v,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderReadOnlyNotice(){let{disabled:e,messages:t}=this;if(e&&this.visibleElements.readOnlyNotice)return Y(`calcite-notice`,{class:y.disabledNotice,"data-testid":`read-only-notice`,icon:`read-only-non-editable`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},t.disabledForm))}_renderHeader(){let e=this.viewModel,{formTitle:t,formDescription:n}=e;if(!e.formHeaderVisible)return;let r=t!=null&&Y(G,{key:`title`,level:this.headingLevel},t),i=n!=null&&Y(`p`,{class:y.description,key:`description`},n);return Y(`div`,{class:y.formHeader},r,i)}_renderContent(){let{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.activeAssociationInput?this._renderFeatureFormUtilityNetworkAssociationList():e.inputs.filter(r).filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){if(x(e))return this._renderGroup(e);if(S(e))return this._renderLabeledField(e);if(C(e))return this._renderRelationshipInput(e);if(w(e))return this._renderTextElementInput(e);if(b(e))return this._renderUtilityNetworkAssociationsElementInput(e)}_renderFeatureFormUtilityNetworkAssociationList(){return this._featureFormUNAssociationList?.render()}_selectAssociatedLayer(e){let{feature:t,callbacks:n}=this;t&&n?.viewAssociatedFeatures&&n.viewAssociatedFeatures({associatedLayer:e.layer})}async _selectAssociatedFeature(e){let{feature:t,callbacks:n}=this;t&&n?.selectAssociatedFeature&&await n.selectAssociatedFeature({parentFeature:t,...e})}_onAddAssociation(e){let{feature:t,callbacks:n}=this;t&&n?.addAssociation&&n.addAssociation(e)}async _setUpUtilityNetworkAssociationList(){if(!this._featureFormUNAssociationList){let e=(await import(`./FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js`)).default;this._featureFormUNAssociationList=new e({onSelectLayer:this._selectAssociatedLayer.bind(this),onSelectFeature:this._selectAssociatedFeature.bind(this),onAddAssociation:this._onAddAssociation.bind(this)})}}async _makeAssociationsWidget(e){let t=(await import(`./Feature/FeatureUtilityNetworkAssociations.js`)).default;return new t({onSelectAssociationType:({viewModel:t,listType:n})=>{t.activeAssociationType=n;let{feature:r,callbacks:i}=this;r&&i?.viewAssociatedLayers&&i.viewAssociatedLayers({associationId:e.uid})},viewModel:e.associationsViewModel})}_renderUtilityNetworkAssociationsElementInput(e){if(this._utilityNetworkAssociationsEnabled)return this._associationsWidgetsMap.get(e)?.render()}_renderDescriptionOrEmpty(e,t){return e==null?null:Y(`div`,{class:this.classes(y.description),id:t},e)}_renderGroup(e){let{formTemplate:t,headingLevel:n}=this,{description:r,id:i,inputs:a,label:o,open:s}=e,c=a.filter(e=>e.visible),l=this.viewModel.findField(this._focusedFieldName)?.group===e,u=this.groupDisplay===`sequential`;return Y(`calcite-block`,{afterCreate:this._afterGroupCreate,class:this.classes(y.group,u?y.groupSequential:null,l?y.groupActive:null),"data-group":e,description:r||void 0,expandable:!0,expanded:s,heading:o??``,headingLevel:t?.title?K(n):n,id:i,key:i,onCalciteBlockToggle:({currentTarget:t})=>this._onGroupToggle(t,e)},c.map(e=>this._renderInput(e)))}_getFocusableInput(e,t){let n=T(this.viewModel.inputs);e===`backward`&&n.reverse();let r;if(!t)r=0;else if(x(t)){let e=t.inputs.find(e=>e.visible);r=e?n.indexOf(e):0}else{let i;if(E(t)&&!t.group.open){let n=t.group.inputs.filter(S);i=e===`forward`?n[n.length-1]:n[0]}else i=t;r=n.indexOf(i)+1}for(let e=r;e<n.length;e++){let t=n[e];if(t.visible&&S(t)){if(this.disabled&&t.inputType&&(t.inputType===`switch`||t.inputType===`radio-buttons`))continue;return t}}return null}_renderLabeledField(e){let{dataType:n,feature:r,label:i,layer:a,required:o}=e,s={"aria-label":o?t(this.messages.requiredFieldLabel,{name:i}):i,class:y.label,key:`${a.id}-${r.uid}-${e.name}`},c=[Y(`div`,{class:y.labelTextContent,key:`labelTextContainer`},i,o?Y(`span`,{"aria-hidden":`true`,title:this.messagesCommon.required},`*`):void 0),n===`unsupported`?this._renderReadOnlyComponent(e):this._renderFieldInput(e),this._renderAuxiliaryText(e)];return Y(`calcite-label`,{...s},c)}_renderFieldInput(e){let{dataType:t,domain:n,inputType:r,name:i}=e,a=this.getCommonInputProps(e);if(n?.type===`coded-value`){let t=this.viewModel.getFieldValueOptionsForField(i,this.messages.empty);return r===`switch`&&!e.hasInvalidSwitchValue?this._renderSwitchComponent(e,a):r===`radio-buttons`?this._renderRadioButtonComponents(e,t.flat(),a):this._renderComboBoxComponent(e,t,a)}return r===`datetime-picker`||t===`date`?this._renderDateComponents(e,a):t===`number`?this._renderNumberComponent(e,a):this._renderStringComponent(e,a)}_renderStringComponent(e,t){return e.inputType===`text-area`?t.readOnly?Y(`calcite-text-area`,{...t,onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):Y(`calcite-text-area`,{...t,resize:`vertical`,onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):Y(`calcite-input`,{...t,loading:e.updating,type:`text`,onCalciteInputInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderNumberComponent(e,t){let n=f(e.field),r=n&&t.value!==``?Math.round(parseFloat(t.value)).toString():t.value;return Y(`calcite-input-number`,{...t,integer:n,loading:e.updating,step:n?1:`any`,type:`number`,value:r,onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderDateComponents(e,t){let{field:n}=e;switch(n.type){case`date`:return this._renderDateFieldComponents(e,t);case`date-only`:return this._renderDateOnlyFieldComponent(e,t);case`time-only`:return this._renderTimeOnlyFieldComponent(e,t);case`timestamp-offset`:return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,I(n,t.value,{timeZone:this.timeZone,...L(n)}))}}_renderDateOnlyFieldComponent(e,t){let{range:n,valid:r,value:i}=e,{class:a,key:o,readOnly:s}=t,{rawMax:c,rawMin:l}=n;return Y(`calcite-input-date-picker`,{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!r,class:a,"data-date-part":`date`,"data-field-name":t[Z],key:`${o}-date-input`,max:g(c)?c:void 0,min:g(l)?l:void 0,numberingSystem:R,overlayPositioning:`fixed`,readOnly:s,topLayerDisabled:this.topLayerDisabled,value:i==null?void 0:`${i}`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget),onfocus:this._onComponentFocus})}_renderTimeOnlyFieldComponent(e,t){let{valid:n,value:r}=e,{class:i,key:a,readOnly:o}=t;return Y(`calcite-input-time-picker`,{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,class:i,"data-date-part":`time`,"data-field-name":t[Z],key:`${a}-time-input`,numberingSystem:R,overlayPositioning:`fixed`,readOnly:o,step:e.timeStep,value:r==null?void 0:`${r}`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget),onfocus:this._onComponentFocus})}_renderTimestampOffsetFieldComponents(e,t){let{name:n,range:r,timeZone:i,valid:a,value:o}=e,{class:s,key:c,readOnly:l}=t,{rawMax:u,rawMin:d}=r,f={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!a,numberingSystem:R,overlayPositioning:`fixed`,readOnly:l,[Z]:n,onfocus:this._onComponentFocus},p=z(u,i),m=z(d,i),h=z(o,i);return Y(`div`,{class:y.dateInputContainer,key:`${c}-date-time-container`},Y(`calcite-input-date-picker`,{...f,class:s,"data-date-part":`date`,key:`${c}-date-input`,max:p?.date??void 0,min:m?.date??void 0,topLayerDisabled:this.topLayerDisabled,value:h.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),Y(`calcite-input-time-picker`,{...f,class:s,"data-date-part":`time`,key:`${c}-time-input`,step:e.timeStep,value:h.time??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),e.includeTimeOffset?Y(`calcite-input-time-zone`,{...f,class:s,"data-date-part":`timeZone`,disabled:l,key:`${c}-timezone-input`,value:h.timeZoneOffset??`0`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderDateFieldComponents(e,t){let{includeTime:n,name:r,valid:i,value:a}=e,{class:o,key:s,max:c,min:l,readOnly:u}=t,{timeZone:d}=this,f={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,numberingSystem:R,overlayPositioning:`fixed`,readOnly:u,[Z]:r,onfocus:this._onComponentFocus},p=B(a,d),m=B(c,d),h=B(l,d);return Y(`div`,{class:y.dateInputContainer,key:`${s}-date-time-container`},Y(`calcite-input-date-picker`,{...f,class:o,"data-date-part":`date`,key:`${s}-date-input`,max:m?.date??void 0,min:h?.date??void 0,topLayerDisabled:this.topLayerDisabled,value:p.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),n?Y(`calcite-input-time-picker`,{...f,class:o,"data-date-part":`time`,key:`${s}-time-input`,step:1,value:p.time??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderReadOnlyComponent(e,t){let n=this.getCommonInputProps(e);return Y(`calcite-input`,{...n,class:this.classes(y.fieldInput,y.inputDisabled),readOnly:!0,type:`text`,value:t==null?n.value:`${t}`})}_renderComboBoxComponent(e,t,n){let{value:r,name:i}=e,{viewModel:a,_inputsWithChanges:o}=this,s=a.editType===`INSERT`,c=o.has(i),l=r==null&&(!s||c),u=s&&e.showNoValueOptionEnabled&&!c?()=>{}:n.onblur;return Y(`calcite-combobox`,{...n,allowCustomValues:!1,clearDisabled:!0,overlayPositioning:`fixed`,selectionMode:`single`,topLayerDisabled:this.topLayerDisabled,onblur:u,onCalciteComboboxChange:({currentTarget:t})=>{l&&t.selectedItems.length===0?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&t.selectedItems.length===0?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){let{value:n,name:r}=e,{messages:i,messagesTemplates:a,viewModel:o,_inputsWithChanges:s}=this,[c,l,u]=t.map(e=>e.map(({name:e,value:t})=>Y(`calcite-combobox-item`,{heading:e,key:`#${t}`,selected:n===t,value:`${t}`}))),d=[];l.length>0&&d.push(Y(`calcite-combobox-item-group`,{key:`other`,label:a.other},l)),u.length>0&&d.push(Y(`calcite-combobox-item-group`,{key:`unsupported`,label:i.subtypes.unsupportedDomainGroupTitle},u)),d.length>0?d.unshift(Y(`calcite-combobox-item-group`,{key:`recommended`,label:i.recommended},c)):d.push(...c);let f=o.editType===`INSERT`,p=s.has(r),m=n==null&&(!f||p);return e.showNoValueOptionEnabled&&d.unshift(Y(`calcite-combobox-item`,{heading:e.showNoValueLabel||i.empty,key:`empty-option`,selected:m,value:``})),d}_renderRadioButtonComponents(e,t,n){let{value:r}=e,i=t.map(({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,value:t,selected:t===r,props:n}));if(e.showNoValueOptionEnabled){let t=e.showNoValueLabel||this.messages.empty,a=r===``||r===null;i.unshift(this._renderRadioButtonComponent({key:`empty-option`,label:t,value:``,selected:a,props:n}))}return Y(`calcite-radio-button-group`,{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:y.inputRadioGroup,"data-field-name":n[Z],key:`${n.key}-radio-group`,layout:`vertical`,name:`${n.key}-${this.id}`,required:n.required},i)}_renderSwitchComponent(e,t){let{value:n}=e,r=D(e.element,`switch`)?n===e.element.input.onValue:!1;return Y(`calcite-switch`,{...t,checked:r,class:y.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.currentTarget)})}_renderRadioButtonComponent({key:e,value:t,selected:n,label:r,props:i}){return Y(`calcite-label`,{class:y.inputRadioLabel,key:e,layout:`inline`},Y(`calcite-radio-button`,{...i,afterCreate:void 0,afterUpdate:void 0,checked:n,class:y.inputRadio,disabled:i.readOnly,value:t,onblur:()=>{this._focusedFieldName=null},onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveValueFromComponent(e)}}),r)}_renderAuxiliaryText(e){let t=e.name,n=this._inputsWithChanges.has(t)&&!e.submittable?O(e,this.messages,this.timeZone):this.viewModel.contingencyConstraintViolations.get(t)==null?e.valueExpressionExecutor!=null&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null:this.messages.validationErrors.valuesIncompatible;return n==null?this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?Y(`calcite-input-message`,{icon:!0,status:`idle`},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description):Y(`calcite-input-message`,{icon:!0,status:`invalid`},n)}_renderShowAllRelatedRecordsListItem(e){if(!e.showAllActionVisible||!this.callbacks?.showAllRelatedRecords)return;let n=this.messages;return Y(`calcite-list-item`,{description:t(n.totalCount,{count:e.featureCount}),key:`show-all-related-features`,label:n.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(e.relationshipId)},Y(`calcite-icon`,{icon:`list`,scale:`s`,slot:`content-end`}))}_renderAddRelatedRecordButton(e){let{canAddRelatedFeature:t,relationshipId:n,relatedLayer:r,editable:i}=e,{messages:a,callbacks:o,disabled:s}=this,c=!i||s;if(t&&o?.addRelatedRecord&&r&&!c)return Y(`calcite-button`,{alignment:`center`,appearance:`outline-fill`,class:y.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:`plus`,key:`${n}-add-button`,round:!0,scale:`s`,width:`full`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(e,n,r)}},e.relatedLayerIsTable?a.addRecord:a.addFeature)}_renderRelatedRecordListItem(e,t,n){let{feature:r,description:i,title:a}=e,{feature:o,callbacks:s}=this,{highlightHelper:c}=this.viewModel,l=()=>{c?.removeAll(),s?.editRelatedRecord&&o&&s.editRelatedRecord({parentFeature:o,relationshipId:t,relatedFeature:r,readOnly:n})},u=c?()=>c.add(r):void 0,d=c?()=>c.remove(r):void 0;return Y(`calcite-list-item`,{bind:this,description:i,key:`${t}-${r.uid}`,label:a,value:a,onCalciteListItemSelect:l,onmouseenter:u,onmouseleave:d},Y(`calcite-icon`,{icon:k(r),slot:`content-start`}),Y(`calcite-icon`,{flipRtl:!0,icon:`chevron-right`,scale:`s`,slot:`content-end`}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled)return;let{relationshipId:t,activeCategory:n}=e,r=n?null:this._renderDescriptionOrEmpty(e.description);return Y(`calcite-label`,{class:this.classes(y.label,y.relatedRecordsLabel),key:`relationship-${t}-container`},Y(`div`,null,this._renderRelatedRecordsHeaderContainer(e),r,this._renderRelationshipInputContent(e)),this._renderAddRelatedRecordButton(e))}_renderRelationshipInputContent(e){if(e.featureCount>0)return this._renderRelatedRecordsList(e);if(e.activeCategory&&e.featureCount===0)return this._renderNoRelatedRecordsNotice();if(e.allCategories?.length)return this._renderCategoryList(e);if(e.loaded)return e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e)}_renderCategoryList(e){return Y(`calcite-list`,{displayMode:`flat`,label:this.messages.relatedRecordsList,loading:e.updating},e.categories?.map(t=>this._renderCategory(e,t)),this._renderShowAllCategoriesListItem(e))}_renderCategory(e,t){let{count:r,name:i,value:a}=t,o=n(r);return Y(`calcite-list-item`,{key:`${i}-${a}`,label:i,onCalciteListItemSelect:()=>this._selectCategory(e,t)},Y(`calcite-chip`,{label:o,scale:`s`,slot:`content-end`},o),Y(`calcite-icon`,{flipRtl:!0,icon:`chevron-right`,scale:`s`,slot:`content-end`}))}_selectCategory(e,t){this.relationshipId=e.relationshipId,e.activeCategory=t}_renderShowAllCategoriesListItem(e){if(!e.showAllCategoriesVisible)return;let n=this.messages;return Y(`calcite-list-item`,{description:t(n.totalCount,{count:e.allCategories?.length??0}),key:`show-all-categories`,label:n.showAll,value:!0,onCalciteListItemSelect:()=>e.showAllEnabled=!0},Y(`calcite-icon`,{icon:`list`,scale:`s`,slot:`content-end`}))}_renderRelatedRecordsHeaderContainer(e){let t=e.updating||!e.loaded;return Y(`div`,{class:y.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},Y(`span`,null,e.label),t?Y(`calcite-loader`,{inline:!0,key:`loader`,label:this.messagesCommon?.loading,scale:`s`,type:`indeterminate`}):void 0)}_renderRelatedRecordsList(e){let{relationshipId:t,editable:n}=e,{disabled:r}=this,i=!n||r;return Y(`calcite-list`,{class:y.relatedRecordsList,label:this.messages?.relatedRecordsList},e.relatedFeatureInfos.map(e=>this._renderRelatedRecordListItem(e,t,i)),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){let{messages:n}=this,r=e.relatedLayerIsTable?n.noOriginKeyRecord:n.noOriginKeyFeature,i=e.relationship?.keyField,a=this.viewModel.findField(i),o=e.layer?.fieldsIndex.get(i),s=a?.label||o?.alias||i,c=t(r,{relatedLayerName:e.relatedLayer?.title,originKeyField:s});return Y(`calcite-notice`,{icon:`information`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},c))}_renderNoRelatedRecordsNotice(){return Y(`calcite-notice`,{icon:`information`,kind:`brand`,open:!0,scale:`s`,width:`full`},Y(`div`,{slot:`message`},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return Y(`div`,{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:y.listObserver,key:`feature-observer`})}_renderTextElementInput(e){return Y(`div`,{class:y.textElement,"data-testid":`text-element-${e.label}`,innerHTML:e.text,key:e.id})}getCommonInputProps(e){let{disabled:t}=this,{editable:n,hint:r,label:i,maxLength:a,minLength:o,name:s,range:{max:c,min:l},required:u,valid:d,value:f}=e,p=this._inputsWithChanges.has(s),m=!n||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":d?`false`:`true`,class:this.classes(y.fieldInput,m?y.inputDisabled:null),status:p&&!d?`invalid`:`idle`,key:s,label:i,max:c??void 0,min:l??void 0,maxLength:a>-1?a:void 0,minLength:o>-1?o:void 0,placeholder:r??void 0,readOnly:m,required:u,value:f==null?``:`${f}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[Z]:s}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(Z))}_afterDateComponentCreate(e){let t=this._getFieldInputFromHTMLElement(e),n=e.dataset.datePart,r=this._dateComponentMap.get(t.name);if(`valueAsDate`in e&&e.value!=null&&t.value!=null){let n=new ResizeObserver(()=>{switch(e.value=void 0,t.field.type){case`date`:e.value=B(t.value,this.timeZone).date??``;break;case`timestamp-offset`:e.value=z(t.value,this.timeZone).date??``;break;default:e.value=`${t.value}`}n.unobserve(e)});n.observe(e)}if(r!=null)switch(n){case`date`:r.date=e;break;case`time`:r.time=e;break;case`timeZone`:r.timeZone=e}else this._dateComponentMap.set(t.name,{[n]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){let t=this._getFieldInputFromHTMLElement(e);A(t)&&e.value!=null&&`setNumberValue`in e&&e.setNumberValue({committing:!1,value:e.value,origin:`direct`}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){let t=e.selectedItem,n=e.querySelector(`calcite-radio-button`),r=t||n;r&&this._afterComponentCreateOrUpdate(r)}_afterComponentCreateOrUpdate(e){let{viewModel:t}=this,n=this._getFieldInputFromHTMLElement(e),r=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&r===n&&(this._attemptFocusOnNextRender=!1,E(n)&&(n.group.open=!0),X(e))}async _afterGroupCreate(e){let t=this.viewModel.findGroup(e.id),n=this.viewModel.findField(this._focusedFieldName);n&&t&&j(n,t)&&(!n.editable||this.disabled)&&(await e.componentOnReady(),this._attemptFocusOnNextRender=!0,this.scheduleRender())}_onComponentFocus(e){let t=e.target,n=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=n.name}_onComponentBlur(e){let t=e.target;this._focusedFieldName=null,`readOnly`in t&&t.readOnly||this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){let{timeZone:t}=this,n=this._getFieldInputFromHTMLElement(e),r=n.field.type,{name:i,range:a}=n,o=this._dateComponentMap.get(i);if(!o)return;let s=this.viewModel.getValue(i),c=null;r===`date-only`?c=Array.isArray(e.value)?e.value[0]:e.value:r===`time-only`?(s=V(s),c=V(e.value)):c=r===`timestamp-offset`?e.value==null?null:H({dateComponent:o.date,timeComponent:o.time,timeZoneComponent:o.timeZone,oldValue:s,defaultTimeZone:t}):e.value==null?null:U({oldValue:s,dateComponent:o.date,timeComponent:o.time,timeZone:t,max:a.max,min:a.min}),c===null||!e.value?this._updateFieldValue(i,null):s!==c&&this._updateFieldValue(i,c)}_saveValueFromComponent(e){let t=this._getFieldInputFromHTMLElement(e),n=this._parseValue(e),r=t.value;!t.isSubtypeField||!M(this.layer,r,n)?this._updateFieldValue(t.name,n):!this._pendingSubtypeChoice&&n!==r&&(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,n))}async _handleSubtypeChoice(e,n){let{value:r,name:i}=e,{messages:a,viewModel:o,messagesCommon:s,_subtypes:c}=this;if(this._updateFieldValue(i,n),!c?.length)return;let l=c.find(e=>e.code===n),u=c.find(e=>e.code===r)?.name??`${r}`;if(!l)return;let d=Promise.withResolvers();o.pendingSubtypeChoice=d;let f=`update-fields`,p=[{label:a.subtypes.useDefaultValuesOption,value:`update-fields`},{label:a.subtypes.keepCurrentValuesOption,value:`keep-existing`}],m={context:`info`,title:a.subtypes.changeWarningTitle,message:t(a.subtypes.changeWarning,{originalType:u,newType:l.name}),radios:p,defaultRadioSelection:`update-fields`,onRadioSelection:e=>f=e,actions:{primary:{label:s.apply,action:()=>d.resolve(f),type:`positive`},secondary:{label:s.cancel,type:`neutral`,action:()=>d.resolve(`undo`)}},cancel:()=>d.reject()};try{switch(this.showPrompt(m),await d.promise){case`update-fields`:o.applySubtypeDefaults(l),this._validateContingenciesForNonNullFields();break;case`keep-existing`:this._validateContingenciesForNonNullFields();break;case`undo`:this._updateFieldValue(e.name,r)}}finally{o.pendingSubtypeChoice=null,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){let n=this._getFieldInputFromHTMLElement(t);e===`Enter`&&E(n)&&!n.group.open&&(n.group.open=!0)}_updateFieldValue(e,t){let n=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e),n!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){let e=Object.fromEntries(Object.entries(this.getValues()).filter(([e,t])=>t!=null));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){let t=this._getFieldInputFromHTMLElement(e),n=e.value;return D(t.element,`switch`)?e.checked?t.element.input.onValue:t.element.input.offValue:n==null||n===``?null:t.dataType===`number`?n===`-0`||n===`-0.`||n===`-0,`?n:parseFloat(n):t.field.type===`date`?parseFloat(n):n}_ignoreDeselectionOfNoValueOption(e){let{firstChild:t,selectedItems:n}=e;n.length===0&&t&&`selected`in t?t.selected=!0:a.getLogger(this).warnOnce(`Failed to override user attempt to deselect 'No value' option.`)}_onGroupToggle(e,t){e.expanded?(t.open=!0,this._focusedFieldName=this._getFocusableInput(`forward`,t)?.name||null,this._attemptFocusOnNextRender=!0,this.groupDisplay===`sequential`&&this.viewModel.allGroupInputs.forEach(e=>{e!==t&&(e.open=!1)})):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){e.key===`Enter`&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);let e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){this.viewModel.activeRelationshipInput?.incrementPage()}_syncGroupInputStates(){if(this.groupDisplay!==`sequential`)return;let e=this.viewModel.allGroupInputs;if(!e.length)return;let t=e.filter(e=>e.open);t.length===0?e[0].open=!0:t.length>1&&t.slice(1).forEach(e=>e.open=!1)}get test(){return{inputsWithChanges:this._inputsWithChanges,updateValue:this._saveValueFromComponent.bind(this)}}};e([u()],Q.prototype,`_listObserverNode`,void 0),e([u()],Q.prototype,`_relatedRecordsEnabled`,null),e([u()],Q.prototype,`_utilityNetworkAssociationsEnabled`,null),e([u()],Q.prototype,`_prompt`,void 0),e([u()],Q.prototype,`_subtypes`,null),e([u()],Q.prototype,`associationId`,null),e([u()],Q.prototype,`associatedLayer`,null),e([u()],Q.prototype,`disabled`,null),e([u()],Q.prototype,`feature`,null),e([u()],Q.prototype,`_featureFormUNAssociationList`,void 0),e([u()],Q.prototype,`formTemplate`,null),e([u()],Q.prototype,`groupDisplay`,void 0),e([u()],Q.prototype,`headingLevel`,void 0),e([u()],Q.prototype,`icon`,null),e([u()],Q.prototype,`label`,null),e([u()],Q.prototype,`layer`,null),e([u()],Q.prototype,`map`,null),e([u(),q(`esri/widgets/FeatureForm/t9n/FeatureForm`)],Q.prototype,`messages`,void 0),e([u(),q(`esri/t9n/common`)],Q.prototype,`messagesCommon`,void 0),e([u(),q(`esri/widgets/Feature/t9n/Feature`)],Q.prototype,`messagesFeature`,void 0),e([u(),q(`esri/widgets/FeatureTemplates/t9n/FeatureTemplates`)],Q.prototype,`messagesTemplates`,void 0),e([u()],Q.prototype,`callbacks`,null),e([u()],Q.prototype,`relationshipId`,null),e([u()],Q.prototype,`spatialReference`,null),e([u()],Q.prototype,`strict`,null),e([u()],Q.prototype,`timeZone`,null),e([u()],Q.prototype,`showPrompt`,null),e([u()],Q.prototype,`clearPrompt`,null),e([u({type:N}),J([`value-change`,`submit`])],Q.prototype,`viewModel`,void 0),e([u({type:P,nonNullable:!0})],Q.prototype,`visibleElements`,void 0),e([u()],Q.prototype,`test`,null),Q=e([d(`esri.widgets.FeatureForm`)],Q);const $=Q;export{$ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as n,sync as r}from"../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as o}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as s,defaultFormatterOptionsNoTime as c,convertDateTimeFieldFormatToIntlOptions as l,defaultFormatterOptions as u}from"../../intl/date.js";import{formatNumber as d,convertNumberFormatToIntlOptions as f,convertNumberFieldFormatToIntlOptions as p}from"../../intl/number.js";import{isEditableLayer as m}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as h}from"../../layers/support/featureLayerUtils.js";import g from"../../layers/support/Field.js";import{defaultFieldFormat as _}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as v,isDateField as y,isTimeOnlyField as b,isIntegerField as x,isNumericField as S,isStringField as C,isDateOnlyField as w,isTimestampOffsetField as T}from"../../layers/support/fieldUtils.js";import{isAnyDateField as E}from"../../smartMapping/support/utils.js";import{system as D}from"../../time/constants.js";import{getTimeZoneFormattingOptions as O}from"../../time/timeZoneUtils.js";import k from"../FeatureForm/FieldInput.js";import A from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as j,isEmptyStringOrWhitespace as M}from"./support/tableUtils.js";import{valueIsInRange as N,dateTimeIsInRange as P,getUnixFieldValueFromDateComponents as F,getISOFieldValueFromDateComponents as I,normalizeTimeOnlyString as L,getLabelForDateFieldValue as R,prepareISOFieldValueForDateComponents as z,prepareUnixFieldValueForDateComponents as B}from"../support/dateUtils.js";import{setFocus as V,selectText as H}from"../support/widgetUtils.js";const U={cancelEdit:`Escape`},W=Symbol(),G=`esri-column`,K={input:`${G}__cell-input`,inputContainer:`${G}__cell__input-container`};let q=class extends A{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:n})=>{let{formatFunction:r}=this;if(r&&t){let{index:i,item:{attachments:a,feature:o,relatedRecords:s}}=t;return r({attachments:a,column:this,feature:o,field:this.field,index:i,relatedRecords:s,value:this.sanitizeContent(n),virtualIndex:this.getVirtualRowIndex(e)})}if(n===null)return` `;let i=this._getDomainForFeature(t?.item?.feature),a=this._getComputedDomain(n,i)||n;return this._isAnyDateOrTimeField&&i?.type!==`coded-value`?this._formatDateValueForDisplay(this.field,a):this._isNumericField&&i?.type!==`coded-value`?d(parseFloat(a),this._numberFormatOptions):this.sanitizeContent(a)},this.cellValueValidatorFunction=({oldValue:e,value:n})=>{let{_effectiveRange:r,field:i}=this,{max:a,min:o}=r;if(this.effectiveRequired&&(n==null||n===``))return!1;if(this._isNumericField&&(v(i,n)||!N({max:a,min:o,value:n})))return t.getLogger(this).warn(`value-exceeds-valid-range`,`Field value exceeds valid range. Attempted edit was rejected.`),!1;if(this._isAnyDateOrTimeField){let e=i.type;if(!P({type:e,range:r,value:n}))return!1}return e!==n},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:n,rowData:r})=>{if(this.editInfo||!this.effectiveEditable||!r)return;let i=r.item.feature,a=i.getObjectId();if(!i||a==null)return;if(this.tableHasInvalidPendingEdits&&!this.itemHasInvalidPendingEdits(a)){t.getLogger(this).warn(`editing-disabled:fix-invalid-pending-edits`,`Editing is disabled for this row. Table has existing invalid pending edits that must be addressed.`);return}let o=this.getCellValue(r),{field:s}=this;if(s.type===`big-integer`&&v(s,o)){t.getLogger(this).warn(`value-exceeds-valid-range`,`Field value is beyond supported limit. Editing is disabled for this field value.`);return}this._activeFieldInput=this._setUpFieldInput(i,o);let c=document.createElement(`div`);c.classList.add(K.inputContainer);let l=[],u=this._effectiveDomain?.type===`coded-value`;if(this._isAnyDateOrTimeField&&!u){let e=document.createElement(`div`),t=this._setUpDateComponents(o),n=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),c.appendChild(e),c.appendChild(n),l.push(...t)}else{let e=this.createInputElement({rowData:r,value:o});c.appendChild(e),l.push(e)}this._set(`editInfo`,{column:n,inputs:l,root:e,rowData:r,oldValue:o}),this.removeCellContent(e),e.appendChild(c),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();let d=l[0];await V(d),await H(d)},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{let{editInfo:t,field:n,includeTime:r}=this;if(!t||!e.length)return null;let i=e[0];if(this._isAnyDateOrTimeField){if(this._effectiveDomain?.type===`coded-value`){if(i.value==null||i.value===``)return null;let e=String(i.value);return y(n)?parseFloat(e):e}let{timeZone:a}=this.effectiveTimeZoneOptions,o=t.oldValue??void 0;switch(n.type){case`date-only`:{let e=i.value;return e===``?null:e}case`time-only`:{let e=L(i.value);return e===``?null:e}case`timestamp-offset`:{let t=r?e[1]:void 0,n=e.at(-1);return I({oldValue:o,dateComponent:i,timeComponent:t,timeZoneComponent:n,defaultTimeZone:a})}case`date`:{let{max:t,min:n}=this._effectiveRange;return F({oldValue:o,dateComponent:i,timeComponent:e[1],timeZone:a,max:t,min:n})}}return null}let a=i.value,{effectiveRequired:o}=this;return!o&&(a==null||a===``)?null:this._isNumericField?parseFloat(a):this._isStringField?a.trim():a},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){let e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){let{field:e}=this;return E(e)||b(e)}get _isIntegerField(){return x(this.field)}get _isNumericField(){return S(this.field)}get _isStringField(){return C(this.field)}get _isSubtypeField(){let{layer:e}=this;if(e?.subtypeField){let{subtypeField:t,fieldsIndex:n}=e;return(n.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){let{layer:e}=this;return j(e)?e:null}get _dateTimeFormatOptions(){let{layerFieldConfigurationFormat:e,template:t}=this;if(t?.format?.dateFormat)return s(t.format.dateFormat);if(t?.input&&`includeTime`in t.input&&t.input.includeTime===!1)return c;if(e?.type===`date-time`)return l(e);if(this._isAnyDateOrTimeField)return u}get _numberFormatOptions(){let{layerFieldConfigurationFormat:e,template:t}=this;if(t?.format)return f(t.format);if(e?.type===`number`)return p(e);if(this._isNumericField)return{useGrouping:!0,maximumFractionDigits:20}}get alias(){return o(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){let{description:e,field:t}=this,n=t.description,r=M(e)?M(n)?null:n:e;return r==null?null:this.sanitizeLabel(r)}get effectiveEditable(){let{editable:e,field:t,layer:n,tableEditingEnabled:r}=this;if(!t||!n)return!1;let i=m(n),a=(n.effectiveCapabilities??n.capabilities)?.operations?.supportsUpdate;return!t.editable||!i||!a||t.type===`oid`||!r?!1:e}get effectiveLabel(){return this.sanitizeLabel(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!!(this.layer?.capabilities?.query?.supportsOrderBy&&this.sortable)}get effectiveTimeZoneOptions(){let{layer:e,field:t}=this;if(!e||t?.type!==`date`&&t?.type!==`timestamp-offset`)return{timeZone:void 0,timeZoneName:void 0};let{tableTimeZone:n,timeZone:r,view:i}=this;return O(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,r??n??i?.timeZone??D,this._dateTimeFormatOptions??u,t.type)}get includeTime(){let{field:e,template:t}=this;return e.type===`time-only`?!0:e.type===`date-only`?!1:!t?.input||`includeTime`in t.input&&t.input.includeTime!==!1}get hasContingentValues(){return!!this.store.fieldsWithContingentValues.has(this.fieldName)}get layerFieldConfigurationFormat(){let{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??_(this.field)}get maxLength(){let{field:e,template:t}=this,n=e?.length??-1,r=t?.input&&`maxLength`in t.input?t.input.maxLength:null;return r!=null&&!isNaN(r)&&r>=-1&&(n===-1||r<=n)?r:n}get minLength(){let{template:e,maxLength:t}=this,n=e?.input&&`minLength`in e.input?e.input.minLength:null;return t&&n<=t?n:null}get name(){return this.field?.name}get nullable(){return this.field.nullable!==!1}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({rowData:e,value:t}){let{_effectiveDomain:i,maxLength:a,minLength:o,effectiveRequired:s}=this,c;if(i?.type===`coded-value`){let i=e.item.feature,a=this.getFieldValueOptions(i,this.fieldName);this.hasContingentValues?(c=this._setUpComboboxComponent(a,t),this.addHandles([n(()=>c,`calciteComboboxChange`,()=>this.onInputBlur(),r),n(()=>c,`pointerdown`,e=>e.preventDefault(),r)],W)):(c=this.createCalciteSelect(t,a.recommended),this.addHandles(n(()=>c,`calciteSelectChange`,()=>this.onInputBlur(),r),W))}else{if(this._isNumericField){let{_effectiveRange:{max:e,min:n}}=this;c=document.createElement(`calcite-input`),c.type=`number`,this._isIntegerField&&(c.step=1),e!=null&&(c.max=e),n!=null&&(c.min=n),c.status=N({max:e,min:n,value:t})?`idle`:`invalid`}else c=document.createElement(`calcite-input`),this.addHandles(n(()=>c,`calciteInputChange`,()=>this.onInputBlur(),r),W),a>-1&&(c.maxLength=a),o>0&&(c.minLength=o);c.value=t==null?``:t.toString()}return c.classList.add(K.input),c.required=s,this.addHandles([n(()=>c,`keydown`,e=>{e.key===U.cancelEdit&&this.onInputBlur(!0)},r),n(()=>c,`blur`,()=>this.onInputBlur(),r)],W),c}onInputBlur(e=!1){this.removeHandles(W),super.onInputBlur(e)}onEditComplete(){let e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value=``)}_setUpDateActionBar(){let{messagesCommon:e}=this,t=e?.cancel??``,n=e?.clear??``,r=e?.save??``,i=document.createElement(`calcite-action-bar`);return i.expandDisabled=!0,i.layout=`horizontal`,i.appendChild(this.createCalciteAction({text:r,icon:`save`,onclick:()=>this.submit()})),this.effectiveRequired||i.appendChild(this.createCalciteAction({text:n,icon:`trash`,onclick:()=>{this._clearActiveEditValues(),this.submit()}})),i.appendChild(this.createCalciteAction({text:t,icon:`x`,onclick:()=>this.cancel()})),i}_formatDateValueForDisplay(e,t){let{timeZone:n,timeZoneName:r}=this.effectiveTimeZoneOptions;return t==null?null:R(e,t,{...this._dateTimeFormatOptions,timeZone:n,timeZoneName:r})}_fieldValueOptionToComboboxItem({disabled:e,name:t,value:n},r){let i=r===n||r==null&&n===``;return this.createCalciteComboboxItem({disabled:e,heading:t,selected:i,value:n})}_setUpComboboxComponent(e,t){let{recommended:n,other:r,unsupported:i}=e,a=this.effectiveRequired,o=this.messages,s=this.createCalciteCombobox({label:this.effectiveLabel,required:a}),c=n.map(e=>this._fieldValueOptionToComboboxItem(e,t));if(!a||t==null||t===``){let e=this._fieldValueOptionToComboboxItem({disabled:a,name:o?.noValue,value:``},t);s.appendChild(e)}if(r.length===0&&i.length===0)return c.forEach(e=>s.appendChild(e)),s;let l=this.createCalciteComboboxItemGroup({label:o.contingentValues.recommended});if(c.forEach(e=>l.appendChild(e)),s.appendChild(l),r.length){let e=this.createCalciteComboboxItemGroup({label:o.contingentValues.other});r.forEach(n=>e.appendChild(this._fieldValueOptionToComboboxItem(n,t))),s.appendChild(e)}if(i.length){let e=this.createCalciteComboboxItemGroup({label:o.subtypes.unsupportedDomainGroupTitle});i.forEach(n=>e.appendChild(this._fieldValueOptionToComboboxItem(n,t))),s.appendChild(e)}return s}_setUpDateComponents(e){let{_effectiveRange:{max:t,min:r,rawMax:i,rawMin:a},field:o,effectiveRequired:s}=this,c=this._getDateFieldValuesForComponents(o,e),l=[];if(E(o)){let e=this.createDateComponent(),u=w(o)||T(o)?i:t,d=w(o)||T(o)?a:r,f=this._getDateFieldValuesForComponents(o,u??null),p=this._getDateFieldValuesForComponents(o,d??null);e.value=c.date??``,e.max=f.date??``,e.min=p.date??``,e.required=s,this.addHandles([n(()=>e,`calciteInputDatePickerOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}if(this.includeTime){let e=this.createTimeComponent();e.value=c.time??``,e.required=s,this.addHandles([n(()=>e,`calciteInputTimePickerOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}if(o.type===`timestamp-offset`){let e=this.createTimeZoneComponent();e.value=c.timeZoneOffset??`0`,this.addHandles([n(()=>e,`calciteInputTimeZoneOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}return l}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&`open`in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){let n=this.grid?.getRowContainingNode(e);n&&(t?n.setAttribute(`editing`,`true`):n.removeAttribute(`editing`))}_getDateFieldValuesForComponents(e,t){switch(e.type){case`date`:return B(t,this.effectiveTimeZoneOptions.timeZone);case`date-only`:return{date:t};case`time-only`:return{time:t};case`timestamp-offset`:return z(t);default:return{}}}_setUpFieldInput(e,t){let{field:n,layer:r,effectiveTimeZoneOptions:{timeZone:i}}=this,a=new k({feature:e,field:n,initialFeature:e.clone(),layer:r,timeZone:i});return a.set(`value`,t),a}_isDomainCompatible(e){if(!e)return!1;let{_isNumericField:t,_isStringField:n}=this,{type:r}=e;if(r===`coded-value`){let r=typeof e.codedValues[0].code;if(r===`string`&&n||r===`number`&&t)return!0}return!!(r===`range`&&t)}_getDomainForFeature(e){let{fieldName:t,layer:n,template:r}=this;if(!e||!n?.getFieldDomain||n.type===`wfs`||n.type===`geojson`||n.type===`csv`)return null;if(r?.domain&&this._isDomainCompatible(r.domain))return r.domain;if(n.type!==`feature`&&n.type!==`subtype-group`&&n.getField(t)?.domain==null){let e=h(n,t);if(e)return e}return n.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if(t.type===`range`)return e;if(t.type===`coded-value`){let n=t.codedValues.filter(t=>t.hasOwnProperty(`code`)&&t.code===e);return n&&n.length?n[0].name:e}return null}getFieldValueOptions(e,t){return this.store.getFieldValueOptions({feature:e,fieldName:t,layer:this.layer,emptyString:this.messages?.noValue})}};e([i()],q.prototype,`_effectiveDomain`,null),e([i()],q.prototype,`_activeFieldInput`,void 0),e([i()],q.prototype,`_effectiveRange`,null),e([i()],q.prototype,`_isAnyDateOrTimeField`,null),e([i()],q.prototype,`_isIntegerField`,null),e([i()],q.prototype,`_isNumericField`,null),e([i()],q.prototype,`_isStringField`,null),e([i()],q.prototype,`_isSubtypeField`,null),e([i()],q.prototype,`_layerWithFieldConfigurations`,null),e([i()],q.prototype,`_dateTimeFormatOptions`,null),e([i()],q.prototype,`_numberFormatOptions`,null),e([i({readOnly:!0})],q.prototype,`alias`,null),e([i()],q.prototype,`cellValueFormatFunction`,void 0),e([i()],q.prototype,`cellValueValidatorFunction`,void 0),e([i({readOnly:!0})],q.prototype,`defaultValue`,null),e([i()],q.prototype,`effectiveDescription`,null),e([i()],q.prototype,`effectiveEditable`,null),e([i()],q.prototype,`effectiveLabel`,null),e([i()],q.prototype,`effectiveRequired`,null),e([i()],q.prototype,`effectiveSortable`,null),e([i()],q.prototype,`effectiveTimeZoneOptions`,null),e([i({type:g})],q.prototype,`field`,void 0),e([i()],q.prototype,`formatFunction`,void 0),e([i()],q.prototype,`includeTime`,null),e([i()],q.prototype,`inputRenderFunction`,void 0),e([i()],q.prototype,`hasContingentValues`,null),e([i()],q.prototype,`layer`,void 0),e([i()],q.prototype,`layerFieldConfigurationFormat`,null),e([i()],q.prototype,`maxLength`,null),e([i()],q.prototype,`minLength`,null),e([i({readOnly:!0})],q.prototype,`name`,null),e([i({readOnly:!0})],q.prototype,`nullable`,null),e([i()],q.prototype,`parseInputValueFunction`,void 0),e([i()],q.prototype,`shouldShowPrompt`,null),e([i()],q.prototype,`sortable`,void 0),e([i()],q.prototype,`store`,void 0),e([i()],q.prototype,`template`,void 0),e([i()],q.prototype,`view`,void 0),q=e([a(`esri.widgets.FeatureTable.FieldColumn`)],q);const J=q;export{J as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as n,sync as r}from"../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as o}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as s,defaultFormatterOptionsNoTime as c,convertDateTimeFieldFormatToIntlOptions as l,defaultFormatterOptions as u}from"../../intl/date.js";import{formatNumber as d,convertNumberFormatToIntlOptions as f,convertNumberFieldFormatToIntlOptions as p}from"../../intl/number.js";import{isEditableLayer as m}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as h}from"../../layers/support/featureLayerUtils.js";import g from"../../layers/support/Field.js";import{defaultFieldFormat as _}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as v,isDateField as y,isTimeOnlyField as b,isIntegerField as x,isNumericField as S,isStringField as C,isDateOnlyField as w,isTimestampOffsetField as T}from"../../layers/support/fieldUtils.js";import{isAnyDateField as E}from"../../smartMapping/support/utils.js";import{system as D}from"../../time/constants.js";import{getTimeZoneFormattingOptions as O}from"../../time/timeZoneUtils.js";import k from"../FeatureForm/FieldInput.js";import A from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as j,isEmptyStringOrWhitespace as M}from"./support/tableUtils.js";import{valueIsInRange as N,dateTimeIsInRange as P,getUnixFieldValueFromDateComponents as F,getISOFieldValueFromDateComponents as I,normalizeTimeOnlyString as L,getLabelForDateFieldValue as R,prepareISOFieldValueForDateComponents as z,prepareUnixFieldValueForDateComponents as B}from"../support/dateUtils.js";import{setFocus as V,selectText as H}from"../support/widgetUtils.js";const U={cancelEdit:`Escape`},W=Symbol(),G=`esri-column`,K={input:`${G}__cell-input`,inputContainer:`${G}__cell__input-container`};let q=class extends A{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:n})=>{let{formatFunction:r}=this;if(r&&t){let{index:i,item:{attachments:a,feature:o,relatedRecords:s}}=t;return r({attachments:a,column:this,feature:o,field:this.field,index:i,relatedRecords:s,value:this.sanitizeContent(n),virtualIndex:this.getVirtualRowIndex(e)})}if(n===null)return` `;let i=this._getDomainForFeature(t?.item?.feature),a=this._getComputedDomain(n,i)||n;return this._isAnyDateOrTimeField&&i?.type!==`coded-value`?this._formatDateValueForDisplay(this.field,a):this._isNumericField&&i?.type!==`coded-value`?d(parseFloat(a),this._numberFormatOptions):this.sanitizeContent(a)},this.cellValueValidatorFunction=({oldValue:e,value:n})=>{let{_effectiveRange:r,field:i}=this,{max:a,min:o}=r;if(this.effectiveRequired&&(n==null||n===``))return!1;if(this._isNumericField&&(v(i,n)||!N({max:a,min:o,value:n})))return t.getLogger(this).warn(`value-exceeds-valid-range`,`Field value exceeds valid range. Attempted edit was rejected.`),!1;if(this._isAnyDateOrTimeField){let e=i.type;if(!P({type:e,range:r,value:n}))return!1}return e!==n},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:n,rowData:r})=>{if(this.editInfo||!this.effectiveEditable||!r)return;let i=r.item.feature,a=i.getObjectId();if(!i||a==null)return;if(this.tableHasInvalidPendingEdits&&!this.itemHasInvalidPendingEdits(a)){t.getLogger(this).warn(`editing-disabled:fix-invalid-pending-edits`,`Editing is disabled for this row. Table has existing invalid pending edits that must be addressed.`);return}let o=this.getCellValue(r),{field:s}=this;if(s.type===`big-integer`&&v(s,o)){t.getLogger(this).warn(`value-exceeds-valid-range`,`Field value is beyond supported limit. Editing is disabled for this field value.`);return}this._activeFieldInput=this._setUpFieldInput(i,o);let c=document.createElement(`div`);c.classList.add(K.inputContainer);let l=[],u=this._effectiveDomain?.type===`coded-value`;if(this._isAnyDateOrTimeField&&!u){let e=document.createElement(`div`),t=this._setUpDateComponents(o),n=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),c.appendChild(e),c.appendChild(n),l.push(...t)}else{let e=this.createInputElement({rowData:r,value:o});c.appendChild(e),l.push(e)}this._set(`editInfo`,{column:n,inputs:l,root:e,rowData:r,oldValue:o}),this.removeCellContent(e),e.appendChild(c),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();let d=l[0];await V(d),await H(d)},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{let{editInfo:t,field:n,includeTime:r}=this;if(!t||!e.length)return null;let i=e[0];if(this._isAnyDateOrTimeField){if(this._effectiveDomain?.type===`coded-value`){if(i.value==null||i.value===``)return null;let e=String(i.value);return y(n)?parseFloat(e):e}let{timeZone:a}=this.effectiveTimeZoneOptions,o=t.oldValue??void 0;switch(n.type){case`date-only`:{let e=i.value;return e===``?null:e}case`time-only`:{let e=L(i.value);return e===``?null:e}case`timestamp-offset`:{let t=r?e[1]:void 0,n=e.at(-1);return I({oldValue:o,dateComponent:i,timeComponent:t,timeZoneComponent:n,defaultTimeZone:a})}case`date`:{let{max:t,min:n}=this._effectiveRange;return F({oldValue:o,dateComponent:i,timeComponent:e[1],timeZone:a,max:t,min:n})}}return null}let a=i.value,{effectiveRequired:o}=this;return!o&&(a==null||a===``)?null:this._isNumericField?parseFloat(a):this._isStringField?a.trim():a},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){let e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){let{field:e}=this;return E(e)||b(e)}get _isIntegerField(){return x(this.field)}get _isNumericField(){return S(this.field)}get _isStringField(){return C(this.field)}get _isSubtypeField(){let{layer:e}=this;if(e?.subtypeField){let{subtypeField:t,fieldsIndex:n}=e;return(n.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){let{layer:e}=this;return j(e)?e:null}get _dateTimeFormatOptions(){let{layerFieldConfigurationFormat:e,template:t}=this;if(t?.format?.dateFormat)return s(t.format.dateFormat);if(t?.input&&`includeTime`in t.input&&t.input.includeTime===!1)return c;if(e?.type===`date-time`)return l(e);if(this._isAnyDateOrTimeField)return u}get _numberFormatOptions(){let{layerFieldConfigurationFormat:e,template:t}=this;if(t?.format)return f(t.format);if(e?.type===`number`)return p(e);if(this._isNumericField)return{useGrouping:!0,maximumFractionDigits:20}}get alias(){return o(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){let{description:e,field:t}=this,n=t.description,r=M(e)?M(n)?null:n:e;return r==null?null:this.sanitizeLabel(r)}get effectiveEditable(){let{editable:e,field:t,layer:n,tableEditingEnabled:r}=this;if(!t||!n)return!1;let i=m(n),a=(n.effectiveCapabilities??n.capabilities)?.operations?.supportsUpdate;return!t.editable||!i||!a||t.type===`oid`||!r?!1:e}get effectiveLabel(){return this.sanitizeLabel(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!!(this.layer?.capabilities?.query?.supportsOrderBy&&this.sortable)}get effectiveTimeZoneOptions(){let{layer:e,field:t}=this;if(!e||t?.type!==`date`&&t?.type!==`timestamp-offset`)return{timeZone:void 0,timeZoneName:void 0};let{tableTimeZone:n,timeZone:r,view:i}=this;return O(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,r??n??i?.timeZone??D,this._dateTimeFormatOptions??u,t.type)}get includeTime(){let{field:e,template:t}=this;return e.type===`time-only`?!0:e.type===`date-only`?!1:!t?.input||`includeTime`in t.input&&t.input.includeTime!==!1}get hasContingentValues(){return!!this.store.fieldsWithContingentValues.has(this.fieldName)}get layerFieldConfigurationFormat(){let{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??_(this.field)}get maxLength(){let{field:e,template:t}=this,n=e?.length??-1,r=t?.input&&`maxLength`in t.input?t.input.maxLength:null;return r!=null&&!isNaN(r)&&r>=-1&&(n===-1||r<=n)?r:n}get minLength(){let{template:e,maxLength:t}=this,n=e?.input&&`minLength`in e.input?e.input.minLength:null;return t&&n<=t?n:null}get name(){return this.field?.name}get nullable(){return this.field.nullable!==!1}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({rowData:e,value:t}){let{_effectiveDomain:i,maxLength:a,minLength:o,effectiveRequired:s}=this,c;if(i?.type===`coded-value`){let i=e.item.feature,a=this.getFieldValueOptions(i,this.fieldName);this.hasContingentValues?(c=this._setUpComboboxComponent(a,t),this.addHandles([n(()=>c,`calciteComboboxChange`,()=>this.onInputBlur(),r),n(()=>c,`pointerdown`,e=>e.preventDefault(),r)],W)):(c=this.createCalciteSelect(t,a.recommended),this.addHandles(n(()=>c,`calciteSelectChange`,()=>this.onInputBlur(),r),W))}else{if(this._isNumericField){let{_effectiveRange:{max:e,min:n}}=this;c=document.createElement(`calcite-input`),c.type=`number`,this._isIntegerField&&(c.step=1),e!=null&&(c.max=e),n!=null&&(c.min=n),c.status=N({max:e,min:n,value:t})?`idle`:`invalid`}else c=document.createElement(`calcite-input`),this.addHandles(n(()=>c,`calciteInputChange`,()=>this.onInputBlur(),r),W),a>-1&&(c.maxLength=a),o>0&&(c.minLength=o);c.value=t==null?``:t.toString()}return c.classList.add(K.input),c.required=s,this.addHandles([n(()=>c,`keydown`,e=>{e.key===U.cancelEdit&&this.onInputBlur(!0)},r),n(()=>c,`blur`,()=>this.onInputBlur(),r)],W),c}onInputBlur(e=!1){this.removeHandles(W),super.onInputBlur(e)}onEditComplete(){let e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value=``)}_setUpDateActionBar(){let{messagesCommon:e}=this,t=e?.cancel??``,n=e?.clear??``,r=e?.save??``,i=document.createElement(`calcite-action-bar`);return i.expandToggleDisabled=!0,i.layout=`horizontal`,i.appendChild(this.createCalciteAction({text:r,icon:`save`,onclick:()=>this.submit()})),this.effectiveRequired||i.appendChild(this.createCalciteAction({text:n,icon:`trash`,onclick:()=>{this._clearActiveEditValues(),this.submit()}})),i.appendChild(this.createCalciteAction({text:t,icon:`x`,onclick:()=>this.cancel()})),i}_formatDateValueForDisplay(e,t){let{timeZone:n,timeZoneName:r}=this.effectiveTimeZoneOptions;return t==null?null:R(e,t,{...this._dateTimeFormatOptions,timeZone:n,timeZoneName:r})}_fieldValueOptionToComboboxItem({disabled:e,name:t,value:n},r){let i=r===n||r==null&&n===``;return this.createCalciteComboboxItem({disabled:e,heading:t,selected:i,value:n})}_setUpComboboxComponent(e,t){let{recommended:n,other:r,unsupported:i}=e,a=this.effectiveRequired,o=this.messages,s=this.createCalciteCombobox({label:this.effectiveLabel,required:a}),c=n.map(e=>this._fieldValueOptionToComboboxItem(e,t));if(!a||t==null||t===``){let e=this._fieldValueOptionToComboboxItem({disabled:a,name:o?.noValue,value:``},t);s.appendChild(e)}if(r.length===0&&i.length===0)return c.forEach(e=>s.appendChild(e)),s;let l=this.createCalciteComboboxItemGroup({label:o.contingentValues.recommended});if(c.forEach(e=>l.appendChild(e)),s.appendChild(l),r.length){let e=this.createCalciteComboboxItemGroup({label:o.contingentValues.other});r.forEach(n=>e.appendChild(this._fieldValueOptionToComboboxItem(n,t))),s.appendChild(e)}if(i.length){let e=this.createCalciteComboboxItemGroup({label:o.subtypes.unsupportedDomainGroupTitle});i.forEach(n=>e.appendChild(this._fieldValueOptionToComboboxItem(n,t))),s.appendChild(e)}return s}_setUpDateComponents(e){let{_effectiveRange:{max:t,min:r,rawMax:i,rawMin:a},field:o,effectiveRequired:s}=this,c=this._getDateFieldValuesForComponents(o,e),l=[];if(E(o)){let e=this.createDateComponent(),u=w(o)||T(o)?i:t,d=w(o)||T(o)?a:r,f=this._getDateFieldValuesForComponents(o,u??null),p=this._getDateFieldValuesForComponents(o,d??null);e.value=c.date??``,e.max=f.date??``,e.min=p.date??``,e.required=s,this.addHandles([n(()=>e,`calciteInputDatePickerOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}if(this.includeTime){let e=this.createTimeComponent();e.value=c.time??``,e.required=s,this.addHandles([n(()=>e,`calciteInputTimePickerOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}if(o.type===`timestamp-offset`){let e=this.createTimeZoneComponent();e.value=c.timeZoneOffset??`0`,this.addHandles([n(()=>e,`calciteInputTimeZoneOpen`,()=>this._onDateComponentOpen(e))],W),l.push(e)}return l}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&`open`in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){let n=this.grid?.getRowContainingNode(e);n&&(t?n.setAttribute(`editing`,`true`):n.removeAttribute(`editing`))}_getDateFieldValuesForComponents(e,t){switch(e.type){case`date`:return B(t,this.effectiveTimeZoneOptions.timeZone);case`date-only`:return{date:t};case`time-only`:return{time:t};case`timestamp-offset`:return z(t);default:return{}}}_setUpFieldInput(e,t){let{field:n,layer:r,effectiveTimeZoneOptions:{timeZone:i}}=this,a=new k({feature:e,field:n,initialFeature:e.clone(),layer:r,timeZone:i});return a.set(`value`,t),a}_isDomainCompatible(e){if(!e)return!1;let{_isNumericField:t,_isStringField:n}=this,{type:r}=e;if(r===`coded-value`){let r=typeof e.codedValues[0].code;if(r===`string`&&n||r===`number`&&t)return!0}return!!(r===`range`&&t)}_getDomainForFeature(e){let{fieldName:t,layer:n,template:r}=this;if(!e||!n?.getFieldDomain||n.type===`wfs`||n.type===`geojson`||n.type===`csv`)return null;if(r?.domain&&this._isDomainCompatible(r.domain))return r.domain;if(n.type!==`feature`&&n.type!==`subtype-group`&&n.getField(t)?.domain==null){let e=h(n,t);if(e)return e}return n.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if(t.type===`range`)return e;if(t.type===`coded-value`){let n=t.codedValues.filter(t=>t.hasOwnProperty(`code`)&&t.code===e);return n&&n.length?n[0].name:e}return null}getFieldValueOptions(e,t){return this.store.getFieldValueOptions({feature:e,fieldName:t,layer:this.layer,emptyString:this.messages?.noValue})}};e([i()],q.prototype,`_effectiveDomain`,null),e([i()],q.prototype,`_activeFieldInput`,void 0),e([i()],q.prototype,`_effectiveRange`,null),e([i()],q.prototype,`_isAnyDateOrTimeField`,null),e([i()],q.prototype,`_isIntegerField`,null),e([i()],q.prototype,`_isNumericField`,null),e([i()],q.prototype,`_isStringField`,null),e([i()],q.prototype,`_isSubtypeField`,null),e([i()],q.prototype,`_layerWithFieldConfigurations`,null),e([i()],q.prototype,`_dateTimeFormatOptions`,null),e([i()],q.prototype,`_numberFormatOptions`,null),e([i({readOnly:!0})],q.prototype,`alias`,null),e([i()],q.prototype,`cellValueFormatFunction`,void 0),e([i()],q.prototype,`cellValueValidatorFunction`,void 0),e([i({readOnly:!0})],q.prototype,`defaultValue`,null),e([i()],q.prototype,`effectiveDescription`,null),e([i()],q.prototype,`effectiveEditable`,null),e([i()],q.prototype,`effectiveLabel`,null),e([i()],q.prototype,`effectiveRequired`,null),e([i()],q.prototype,`effectiveSortable`,null),e([i()],q.prototype,`effectiveTimeZoneOptions`,null),e([i({type:g})],q.prototype,`field`,void 0),e([i()],q.prototype,`formatFunction`,void 0),e([i()],q.prototype,`includeTime`,null),e([i()],q.prototype,`inputRenderFunction`,void 0),e([i()],q.prototype,`hasContingentValues`,null),e([i()],q.prototype,`layer`,void 0),e([i()],q.prototype,`layerFieldConfigurationFormat`,null),e([i()],q.prototype,`maxLength`,null),e([i()],q.prototype,`minLength`,null),e([i({readOnly:!0})],q.prototype,`name`,null),e([i({readOnly:!0})],q.prototype,`nullable`,null),e([i()],q.prototype,`parseInputValueFunction`,void 0),e([i()],q.prototype,`shouldShowPrompt`,null),e([i()],q.prototype,`sortable`,void 0),e([i()],q.prototype,`store`,void 0),e([i()],q.prototype,`template`,void 0),e([i()],q.prototype,`view`,void 0),q=e([a(`esri.widgets.FeatureTable.FieldColumn`)],q);const J=q;export{J as default};
|