@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 46.2 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as n}from"../../core/arrayUtils.js";import l from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import o from"../../core/Error.js";import a from"../../core/Logger.js";import{abortMaybe as d}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as m,after as c,throwIfAborted as p,createResolver as u}from"../../core/promiseUtils.js";import{watch as g,initial as b,on as f,syncAndInitial as y}from"../../core/reactiveUtils.js";import{throttle as T}from"../../core/throttle.js";import{property as w,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as _}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as E,isSubtypeGroupLayer as S}from"../../layers/support/layerUtils.js";import{createFieldInfos as A}from"../../support/popupUtils.js";import F from"../../tables/AttributeTableTemplate.js";import j from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import R from"../../views/SelectionManager.js";import{temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as U}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as P,isISelectableLayer as V}from"../../views/support/selectionUtils.js";import z from"./ActionColumn.js";import W from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import M from"./RelationshipColumn.js";import L from"./Grid/Column.js";import G from"./Grid/Grid.js";import B from"./Grid/GridViewModel.js";import k from"./Grid/GroupColumn.js";import N from"./support/AttachmentsColumnTemplate.js";import D from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as ne,uniqueColumnNames as le,hasColumnForField as re,findField as oe,isIFeatureTableSupportedLayerWithAttachments as ae,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as he}from"./support/templateUtils.js";import{goTo as me}from"../support/goToUtils.js";import{messageBundle as ce}from"../support/widget.js";const pe="80px";let ue=class extends B{constructor(e){super(e),this._currentTemporaryHighlight=null,this._refreshDebounced=h(()=>this._refresh()),this._syncTemplateThrottled=T(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new D,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new l,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:n}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===n.length&&-1===n.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const l=this.paginationEnabled?this.pageIndex:e.page,r=await s.fetchItems({...e,page:l});t&&t(r)},this.defaultSelectionManager=new R,this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new l,this.relationshipColumnConfigs=null,this.selectionManager=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.syncViewSelection=!1,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new J),this._set("grid",new G({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),g(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},b),g(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),g(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),g(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),g(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),g(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),g(()=>this.editingEnabled,()=>this.refreshCellContent()),g(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),g(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),g(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),f(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),f(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:n})=>{const l=t?.feature,r=l?.getObjectId(),o="cell-keydown"===n&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(n,{feature:l,index:e,native:i,type:n,fieldName:s??void 0,objectId:r}),(o||"cell-click"===n)&&this._onCellInteraction(r)}),g(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),g(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),g(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),g(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),g(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),g(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),g(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),f(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:n}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:n}}),f(()=>this.tableParent,"cell-click",async e=>{const{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),g(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),g(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),f(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this.defaultSelectionManager.clear()}),g(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,m(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),g(()=>this.effectiveSelectionManager,()=>this._syncSelection(),y),f(()=>this.effectiveSelectionManager,"selection-change",()=>this._syncSelection(),y),g(()=>[this.layer,this.view],()=>this.syncSelectionSources(),y),g(()=>this.highlightEnabled,e=>this.defaultSelectionManager.highlightEnabled=e,b)])}destroy(){this._drainColumns(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=d(this._temporaryHighlightAbortController),this.defaultSelectionManager.destroy(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return _(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return U(e)?e:null}get _subtypes(){return E(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,n=new l;return e&&n.push({type:"geometry",geometry:e}),i?n.push({type:"selection",objectIds:s.toArray()}):t.length&&n.push({type:"objectId",objectIds:t.toArray()}),n}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&P(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this.defaultSelectionManager}get effectiveMultipleSelectionEnabled(){return super.effectiveMultipleSelectionEnabled}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.relatedTableHasContingentValues||this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.relatedTableHasInvalidPendingEdits||this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.relatedTableHasPendingEdits||this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new l}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),l))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relatedTableHasContingentValues(){return!!this.relatedTable?.hasContingentValues}get relatedTableHasInvalidPendingEdits(){return!!this.relatedTable?.hasInvalidPendingEdits}get relatedTableHasPendingEdits(){return!!this.relatedTable?.hasPendingEdits}get relationship(){return this.store.relationship}get relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,n=this.store.relationshipInfos;if(n.length||!ie(e)||!i?.length)return n;const l=[],r=s?.layers||t||[];return i.forEach(t=>{const i=se(e,r,t);i&&(i.load(),l.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),l}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get selectionSource(){return"table"}set selectionSource(e){this.syncViewSelection="view"===e,this._overrideIfSome("selectionSource",e)}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.addAttachment(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:n}=t,{objectIdField:r}=i,o=ne(i,n),a=i.displayField||o?.keyField||r;e.set({highlightIds:new l([s]),multipleSelectionEnabledOverride:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,n)});const d=e.hiddenFields;d.includes(le.action)||d.add(le.action),d.includes(le.attachments)||d.add(le.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([le.action,le.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await K({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.getFeatureStoreItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabledOverride:null,tableTemplateOverride:null}),this.hiddenFields.remove(le.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),m(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){!this.relatedTableHasPendingEdits||this.relatedTableHasInvalidPendingEdits?this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh()):await(this.relatedTable?.savePendingEdits())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const n=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),o=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new l([e]),multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)}),i.includes(le.action)||i.add(le.action),null!=o&&this.scrollToIndex(o)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}syncSelectionSources(){const{defaultSelectionManager:e,layer:t,view:i}=this;e.view=i,e.sources.removeAll(),t&&V(t)&&(e.sources.items=[t])}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:n}=this,l=s.objectId===e;await n.updateAttachment(e,t,i).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),l&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await n.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const n=await e.queryFeatures(s);try{await me(t,n.features)}catch(l){"AbortError"!==l.name&&console.error(l)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:n}=this;if(!i||!t||!n&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:l,allColumns:r,columns:o}=this,a=[],d=he(o.toArray());l.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new j({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new j({field:e,order:t}))}),t.elements=d,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&S(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,n=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=n),this.grid?.set("pageSize",n),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:i}=this,s=e?.columnTemplates;if(!i)return;const n=this._generateColumnsFromColumnTemplates(i,s)??this._generateColumnsFromAttributeTableTemplate(i,t)??this._generateDefaultFieldColumns(i);n.length&&(this.attachmentsEnabled&&!n.some(e=>$(e))&&n.push(this._generateDefaultAttachmentsColumn(i)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!n.some(e=>q(e))&&n.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&n.push(this._generateActionColumn()),n.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(n))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;const{elements:i,orderByFields:s}=t,l=A(e),r=[];r.push(...this._generateColumnsFromAttributeTableElements(e,i,s));const o=l.map(t=>{if(!t.fieldName||re(t.fieldName,r))return null;const{fieldName:i}=t,n=oe(e,i);return n?this._generateDefaultFieldColumn(e,n,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(n);return r.push(...o),this.attachmentsEnabled&&ae(e)&&!r.some(e=>$(e))&&r.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&ie(e)&&e.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>q(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t,i){return t?.map((t,s)=>{switch(t.type){case"field":return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:i});case"group":return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:i});case"attachment":return this._createAttachmentColumnFromElement({layer:e,element:t,index:s});case"relationship":return this._createRelationshipColumnFromElement({element:t,index:s})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{fieldName:n}=i;if(null==n)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const l=oe(t,n);if(!l)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:o}=i,a=s?.findIndex(({field:e})=>e&&e===n)??-1,d=a>-1?s?.at(a)?.order:void 0,h=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:r,direction:d,field:l,fieldName:n,grid:m,initialSortPriority:h,label:o,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{description:n,label:l}=i;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!i.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new k({columns:this._generateColumnsFromAttributeTableElements(t,i.elements,s),description:n,grid:r,label:l,messages:o,messagesCommon:a,messagesURIUtils:d,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{layer:t,element:i,index:s}=e,{description:n,label:l}=i,{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new W({description:n,fieldName:`${le.attachments}-${s}`,grid:r,label:l,layer:t,messages:o,messagesCommon:a,messagesURIUtils:d,store:h,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:n,relationshipId:l}=t,r=this.relationshipInfos.find(e=>e.relationshipId===l);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:o,messages:a,messagesCommon:d,messagesURIUtils:h,store:m}=this;return new M({description:s,fieldName:`${le.relationship}-${l}-${i}`,grid:o,label:n,messages:a,messagesCommon:d,messagesURIUtils:h,relationshipId:l,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,view:o}=this;if(!t?.length)return null;const a=[];return t.forEach((t,d)=>{const{autoWidth:h,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,resizable:E,sortable:S,textAlign:A,textWrap:F,timeZone:j,type:x,width:R}=t;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const O=!1===t.visible;if("group"===x){if(!t.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!t.label)return void this._logTemplateWarning("Group columns require a label.");const r=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),o=O||this._isFieldHidden(t.label);a.push(new k({autoWidth:h,columns:r,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:i,hidden:o,icon:y,iconText:T,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,textAlign:A,textWrap:F,timeZone:j,width:R}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,t,d))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:e}=t;if(null==e)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(t=>t.relationshipId===e);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,t,d))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const U=O||this._isFieldHidden(u);if("column"===x)a.push(new L({autoWidth:h,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,menuConfig:_,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,sortable:S,store:r,textAlign:A,textWrap:F,timeZone:j,width:R}));else if("field"===x){const d=oe(e,t.fieldName);if(!d)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:x}=t;a.push(new H({autoWidth:h,description:m,direction:c,editable:u,field:d,fieldName:d.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:U,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:v,layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,menuConfig:_,required:x,resizable:E,sortable:S,store:r,template:t,textAlign:A,textWrap:F,timeZone:j,width:R,view:o,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(n)??[]}_generateDefaultFieldColumn(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a}=this;if(!t.visible||"geometry"===t.type)return null;const d=i?.orderByFields,h=t.name,m=d?.findIndex(({field:e})=>e&&e===h)??-1,c=m>-1?d?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:t,fieldName:h,grid:s,hidden:i?.hidden||this._isFieldHidden(h),initialSortPriority:p,layer:e,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{attachmentsViewEnabled:a,autoWidth:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,resizable:I,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x}=t;return new W({attachmentsViewEnabled:a,autoWidth:d,description:h,fieldName:`${le.attachments}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:e,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,resizable:I,store:o,textAlign:v,textWrap:_,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r}=this,o=le.attachments;return new W({fieldName:o,grid:i,hidden:t?.hidden||this._isFieldHidden(o),layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{autoWidth:a,collapsed:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,relationshipId:I,resizable:v,textAlign:_,textWrap:E,timeZone:S,width:A}=t;return new M({autoWidth:a,collapsed:d,description:h,fieldName:`${le.relationship}-${I}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,relationshipId:I,resizable:v,store:o,textAlign:_,textWrap:E,timeZone:S,width:A,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:n}=t,l=e.find(e=>e.relationshipId===n);l&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:l}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:n}=e,{grid:l,messages:r,messagesCommon:o,messagesURIUtils:a,store:d}=this,{relationshipId:h}=n;return new M({...t,fieldName:`${le.relationship}-${h}-${s}`,grid:l,hidden:i,messages:r,messagesCommon:o,messagesURIUtils:a,layer:n.relatedLayer,relatedLayer:n.layer,relationshipId:h,store:d,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new z({hidden:this._isFieldHidden(le.action),store:this.store,...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await c(25),p(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:n,highlightEnabled:l}=this;e&&s&&n&&l&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:O})})}_syncSelection(){const{layer:e}=this;P(e)&&(this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[])}_addToSelection(e){const t=this.layer;P(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){const t=this.layer;P(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._removeFromSelection(i),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){const{tableParent:t}=this;t&&null!=e&&t.highlightIds.add(e)}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(le.action)||s.add(le.action),s.includes(le.attachments)||s.add(le.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabledOverride:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabledOverride:null,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([le.action,le.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,n])=>({selected:s===t,label:n||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:pe})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new N({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:pe})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:n}=e,{_subtypes:l,layer:r}=this;if(!r||!l.length)return void t.cancel();const o=l.find(e=>e.code===n);if(!o)return void t.cancel();const a=u(),d=this._createSubtypeEditPrompt(s,o,a),h=!!r.parent&&this.autoSaveEnabled;try{this.showPrompt(d);const e=await a.promise,s=[{fieldName:t.fieldName,value:n}];switch(e){case"update-fields":for(const[e,t]of Object.entries(o.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:n,messages:l,messagesCommon:r}=this,o=n.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const d=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:i(l.subtypes.changeWarning,{originalType:o,newType:t.name}),radios:d,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new N({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:pe})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?a.getLogger(this).warnOnce(e):a.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([w()],ue.prototype,"_defaultHiddenFields",null),e([w()],ue.prototype,"_effectiveTableTemplate",null),e([w()],ue.prototype,"_effectiveAttributeTableTemplate",null),e([w()],ue.prototype,"_highlightableLayerView",null),e([w()],ue.prototype,"_subtypes",null),e([w()],ue.prototype,"activeFilters",null),e([w({readOnly:!0})],ue.prototype,"activeSortOrders",null),e([w()],ue.prototype,"allRelatedTablesVisible",null),e([w()],ue.prototype,"attachmentsColumns",null),e([w()],ue.prototype,"attachmentsEnabled",null),e([w()],ue.prototype,"attachmentsViewOptions",void 0),e([w({type:F})],ue.prototype,"attributeTableTemplate",void 0),e([w()],ue.prototype,"autoRefreshEnabled",void 0),e([w()],ue.prototype,"autoSaveEnabled",null),e([w()],ue.prototype,"canAddRelatedFeature",null),e([w()],ue.prototype,"clearPrompt",null),e([w({readOnly:!0})],ue.prototype,"columns",void 0),e([w()],ue.prototype,"dataProvider",void 0),e([w()],ue.prototype,"defaultSelectionManager",void 0),e([w()],ue.prototype,"definitionExpression",null),e([w()],ue.prototype,"effectiveSelectionManager",null),e([w()],ue.prototype,"fieldColumns",null),e([w({types:v})],ue.prototype,"filterGeometry",null),e([w()],ue.prototype,"filterBySelectionEnabled",null),e([w({readOnly:!0})],ue.prototype,"grid",void 0),e([w()],ue.prototype,"hasContingentValues",null),e([w()],ue.prototype,"hasInvalidPendingEdits",null),e([w()],ue.prototype,"hasPendingEdits",null),e([w()],ue.prototype,"hiddenFields",null),e([w()],ue.prototype,"highlightEnabled",void 0),e([w()],ue.prototype,"initialSize",null),e([w()],ue.prototype,"isQueryingOrSyncing",null),e([w()],ue.prototype,"isSyncingAttachments",null),e([w()],ue.prototype,"layer",null),e([w()],ue.prototype,"layers",void 0),e([w()],ue.prototype,"layerFieldConfigurations",null),e([w()],ue.prototype,"layerView",null),e([w()],ue.prototype,"menuConfig",void 0),e([w()],ue.prototype,"messages",void 0),e([w(),ce("esri/t9n/common")],ue.prototype,"messagesCommon",void 0),e([w(),ce("esri/core/t9n/Units")],ue.prototype,"messagesUnits",void 0),e([w(),ce("esri/widgets/support/t9n/uriUtils")],ue.prototype,"messagesURIUtils",void 0),e([w()],ue.prototype,"outFields",null),e([w()],ue.prototype,"pendingEditsCount",null),e([w()],ue.prototype,"prompt",void 0),e([w()],ue.prototype,"relatedRecordsEnabled",null),e([w()],ue.prototype,"relatedTable",null),e([w()],ue.prototype,"relatedTableHasContingentValues",null),e([w()],ue.prototype,"relatedTables",void 0),e([w()],ue.prototype,"relationship",null),e([w()],ue.prototype,"relationshipColumnConfigs",void 0),e([w()],ue.prototype,"relationshipColumns",null),e([w()],ue.prototype,"relationshipConfig",null),e([w()],ue.prototype,"relationshipInfos",null),e([w()],ue.prototype,"relationships",null),e([w()],ue.prototype,"returnGeometryEnabled",null),e([w()],ue.prototype,"returnMEnabled",null),e([w()],ue.prototype,"returnZEnabled",null),e([w()],ue.prototype,"selectionManager",void 0),e([w()],ue.prototype,"selectionSource",null),e([w()],ue.prototype,"showAllRelatedTables",null),e([w()],ue.prototype,"showPrompt",null),e([w()],ue.prototype,"showRelatedTableCallback",void 0),e([w({readOnly:!0,type:J})],ue.prototype,"store",void 0),e([w()],ue.prototype,"supportsAttachments",null),e([w()],ue.prototype,"supportsAddAttachments",null),e([w()],ue.prototype,"supportsDeleteAttachments",null),e([w()],ue.prototype,"supportsResizeAttachments",null),e([w()],ue.prototype,"supportsUpdateAttachments",null),e([w()],ue.prototype,"syncTemplateOnChangesEnabled",void 0),e([w()],ue.prototype,"syncViewSelection",void 0),e([w()],ue.prototype,"tableController",void 0),e([w()],ue.prototype,"tableParent",void 0),e([w({type:ee})],ue.prototype,"tableTemplate",void 0),e([w()],ue.prototype,"tableTemplateOverride",void 0),e([w({type:x})],ue.prototype,"timeExtent",null),e([w()],ue.prototype,"timeZone",null),e([w()],ue.prototype,"view",null),ue=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],ue);const ge=ue;export{ge as default};