@arcgis/core 5.1.0-next.20 → 5.1.0-next.21
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/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +45 -15
- package/applications/Components/QuantityFormatter.d.ts +11 -11
- package/applications/Components/SelectionOperation.d.ts +11 -11
- package/applications/Components/SketchTooltipControls.d.ts +9 -9
- package/applications/Components/actionUtils.d.ts +2 -1
- package/applications/Components/analysisUtils.d.ts +27 -26
- package/applications/Components/applySetUtils.d.ts +40 -40
- package/applications/Components/arcadeEditorUtils.d.ts +3 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +12 -12
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -2
- package/applications/Components/clipboard.d.ts +14 -14
- package/applications/Components/drawUtils.d.ts +3 -3
- package/applications/Components/editUtils.d.ts +14 -14
- package/applications/Components/featureUtils.d.ts +10 -10
- package/applications/Components/fieldFormatUtils.d.ts +2 -2
- package/applications/Components/fontUtils.d.ts +2 -2
- package/applications/Components/formatUtils.d.ts +2 -2
- package/applications/Components/getDefaultUnits.d.ts +2 -2
- package/applications/Components/gfxUtils.d.ts +5 -1
- package/applications/Components/imageryUtils.d.ts +35 -35
- package/applications/Components/layerOriginUtils.d.ts +5 -5
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -2
- package/applications/Components/previewSymbol2D.d.ts +2 -2
- package/applications/Components/rasterFunctionEditorUtils.d.ts +40 -40
- package/applications/Components/reactiveUtils.d.ts +14 -13
- package/applications/Components/sanitizerUtils.d.ts +2 -2
- package/applications/Components/stringUtils.d.ts +5 -5
- package/applications/Components/styleUtils.d.ts +2 -2
- package/applications/Components/svgUtils.d.ts +4 -4
- package/applications/Components/symbolUtils.d.ts +47 -11
- package/applications/Components/templateUtils.d.ts +73 -17
- package/applications/Components/templateUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +3 -3
- package/applications/Components/unitUtils.d.ts +1 -1
- package/applications/Components/viewUtils.d.ts +2 -2
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -2
- package/applications/Excalibur/imageryLayerUtils.d.ts +3 -3
- package/applications/Excalibur/videoViewUtils.d.ts +8 -8
- package/applications/Excalibur/widgetUtils.d.ts +2 -2
- package/applications/ExperienceBuilder/sketchUtils.d.ts +7 -7
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +20 -8
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +21 -21
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +35 -35
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +9 -9
- package/applications/KnowledgeStudio/reshape.d.ts +40 -40
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +11 -11
- package/applications/MapViewer/layerUtils.d.ts +2 -2
- package/applications/MapViewer/mediaUtils.d.ts +13 -13
- package/applications/MapViewer/templateUtils.d.ts +20 -20
- package/applications/PortalApp/layerUtils.d.ts +2 -2
- package/applications/SceneViewer/colorUtils.d.ts +2 -2
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +4 -3
- package/applications/SceneViewer/layerUtils.d.ts +3 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +34 -34
- package/applications/SceneViewer/symbolUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +3 -2
- package/applications/Urban/imagePatternUtils.d.ts +4 -4
- package/applications/Urban/meshUtils.d.ts +2 -2
- package/applications/WebEditor/sketchUtils.d.ts +8 -8
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{df321c37b61099f6e4c2.js → 11058e660139c427c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/1dcd057695f8db79eca2.js +1 -0
- package/assets/esri/core/workers/chunks/568d32ceee1409809e5a.js +1 -0
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +1 -0
- package/assets/esri/core/workers/chunks/7b59ddad3c73f5f44b4d.js +1 -0
- package/assets/esri/core/workers/chunks/a4919dd9963f853a0077.js +1 -0
- package/assets/esri/core/workers/chunks/a7dbd38bc216713044fc.js +1 -0
- package/assets/esri/core/workers/chunks/{b8b2f160518e3a225d99.js → b364ec104dd59faa41b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bb3beedae1b73beb1fc.js → b96dce64bdd7487e862a.js} +1 -1
- package/assets/esri/core/workers/chunks/{23c856265dd24ce54fdb.js → bfeab15d7ac9a2559fe5.js} +1 -1
- package/assets/esri/core/workers/chunks/c3e4f8664988e50bda55.js +1 -0
- package/assets/esri/core/workers/chunks/cf100c80b75ba74b479c.js +1 -0
- package/chunks/Clouds.glsl.js +1 -1
- package/config.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/support/Sublayer.d.ts +3 -0
- package/package.json +1 -1
- package/renderers/support/DictionaryControlString.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/cim/types.d.ts +220 -117
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexBufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/View.d.ts +13 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/draw/support/types.d.ts +8 -1
- package/views/interactive/support/utils.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/widgets/Attribution/AttributionViewModel.d.ts +3 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -22
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +10 -15
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +0 -15
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -1
- package/widgets/FeatureTable.d.ts +1 -19
- package/widgets/FeatureTable.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +4 -22
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch.d.ts +10 -17
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +0 -1
- package/assets/esri/core/workers/chunks/5a8b3e5977c233d5c9d0.js +0 -1
- package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +0 -1
- package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +0 -1
- package/assets/esri/core/workers/chunks/bf2bfc0d78be8c185d58.js +0 -1
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +0 -1
- package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +0 -1
- package/assets/esri/core/workers/chunks/e081d6f21a2c01ccaf61.js +0 -1
package/widgets/FeatureTable.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{createResolver as o}from"../core/promiseUtils.js";import{watch as l,sync as a,syncAndInitial as r,initial as c,on as d}from"../core/reactiveUtils.js";import{renderingSanitizer as h}from"../core/sanitizerUtils.js";import{formatFileSize as m}from"../core/unitFormatUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{geometryTypes as g}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as w}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as b,isMapImageLayer as v,isSubtypeGroupLayer as y}from"../layers/support/layerUtils.js";import f from"../tables/AttributeTableTemplate.js";import _ from"../time/TimeExtent.js";import M from"./Widget.js";import{isSupportedImage as C,getCalciteIconForAttachment as V}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as A,Prompt as E}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import I from"./FeatureTable/VisibleElements.js";import{isGroupColumn as D}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as R,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as x,getRelationshipIdsToShow as L}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{globalCss as O}from"./support/globalCss.js";import{getIconForLayer as j}from"./support/iconUtils.js";import{messageBundle as z,vmEvent as $,tsx as U,tsxFragment as N}from"./support/widget.js";import{storeNode as H,discardNode as B}from"./support/widgetUtils.js";var Z;const G="esri-feature-table",W=`${G}__dialog`,Q=`${G}__attachments-view`,K={base:G,content:`${G}__content`,menuPopover:`${G}__menu-popover`,layerDropdownMenu:`${G}__layer-switcher-menu`,tableContainer:`${G}__table-container`,tableContainerWithAttachments:`${G}__table-container--attachments`,tableNavigation:`${G}__table-navigation`,attachmentsView:Q,attachmentsViewContent:`${Q}__content`,attachmentsViewDetails:`${Q}__details`,attachmentsViewDropArea:`${Q}__drop-area`,attachmentsViewDropAreaLabel:`${Q}__drop-area__label`,attachmentsViewDropAreaMessage:`${Q}__drop-area__message`,attachmentsViewIcon:`${Q}__icon`,attachmentsViewInformation:`${Q}__information`,attachmentsViewInformationData:`${Q}__information__data`,attachmentsViewInformationLabel:`${Q}__information__label`,attachmentsViewList:`${Q}__list`,attachmentsViewListFileSize:`${Q}__list__filesize`,attachmentsViewListThumbnail:`${Q}__list__thumbnail`,expanded:`${G}__expanded`,collapsed:`${G}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${G}__footer__message`,footerIconDanger:`${G}__footer__icon--danger`,footerIconSuccess:`${G}__footer__icon--success`},q={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let J=Z=class extends M{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new I,this.announceDeprecation=()=>{s(n.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},a),l(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),r),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},c),d(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),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"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),A(),R()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?h.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:n,title:o,size:l}=this;if(o)return h.sanitize("function"==typeof o?o():o);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:h.sanitize(e.title),count:l,selected:n.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!k(e)||y(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{w(e)||"catalog-footprint"===e.type||(b(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):v(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):y(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return q.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}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 layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:n,columnMenus:o,tooltips:l}=s,a=null!=e.objectId;if(t)return new I({columnDescriptions:n,columnMenus:o,tooltips:l,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new I({columnDescriptions:n,columnMenus:o,tooltips:l,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new I({columnDescriptions:n,columnMenus:o,tooltips:l,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}filterBySelection(){this.viewModel.filterBySelection()}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}zoomToSelection(){this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return U("div",{bind:this,class:this.classes(K.base,O.widget)},U("calcite-panel",{bind:this,class:K.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?U("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(K.tableContainer);if(t.length){const s=this.classes(K.base,this.allRelatedTablesVisible?K.expanded:K.collapsed,this._attachmentsViewIsVisible?K.tableContainerWithAttachments:void 0);return U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[this._shouldShowGrid?U("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return U("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[U("div",{class:this.classes(K.base,K.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[U("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return U("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return U("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},U("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,n=e||t,o=this.hasContingentValues,l=[U("calcite-button",{appearance:"outline",disabled:t,iconStart:q.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),U("calcite-button",{disabled:n,iconStart:q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(o){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?q.exclamationMarkTriangle:q.checkCircle,n=e?K.footerIconDanger:K.footerIconSuccess;l.push(U("div",{class:K.footerMessage,key:"footer-message",slot:"footer-start"},U("calcite-icon",{class:n,icon:s,scale:"s",slot:"footer-start"}),t))}return l}_renderPrompt(){return this.prompt?U(E,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:n}=this,o=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:o,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:n.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:n.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=o(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return U("calcite-dialog",{class:K.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,n=s.indexOf(e);return U(N,null,U("div",{class:K.dialogHeader,key:"header",slot:"content-top"},U("span",null,e.name),U("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),U("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),U("div",{class:K.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),U("calcite-pagination",{pageSize:1,slot:"footer",startItem:n+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,n=s[i]?.id;t.dialogId=n}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:n,clickFunction:o}=e;if(!i)return U("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:n,onclick:()=>o(),slot:"header-menu-actions",text:n,textEnabled:!0,title:n})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:q.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:n})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>n(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,s=this.messages.toggleColumns;return U("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),bind:this,disabled:t.menuConfig?.disabled,icon:q.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:s},this._effectiveVisibleElements.tooltips?U("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip",topLayerDisabled:this.topLayerDisabled},s):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return U("calcite-popover",{autoClose:!0,class:K.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},U("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map(t=>{const i=D(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})})))}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:n}=e,{effectiveLabel:o,fieldName:l,hidden:a}=t;return U("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${l}`,label:o,selected:!a,value:l,onCalciteListItemSelect:e=>{n&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return U("div",{class:K.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},U("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},U("calcite-action",{icon:q.layers,slot:"trigger",text:e,title:e}),U("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return U("calcite-dropdown-item",{iconStart:i?j(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>{this.layer=e}},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:n,paginationEnabled:o,pageSize:l,view:a,viewModel:r}=this,{layer:c,objectId:d,relatedLayer:h,relationshipId:m}=e;await c.load();const p=this.attachmentsEnabled&&x(c),u=new Z({layer:c,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:p,editingEnabled:s,paginationEnabled:o,pageSize:l,relatedRecordsEnabled:!0,relationshipConfig:{objectId:d,relatedLayer:h,relationshipId:m},relationshipColumnConfigs:L(c,m),tableController:this,tableParent:n,view:a,showRelatedTableCallback:e=>r.emit("show-related-table",e)});this.relatedTables.add(u),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{bind:this,class:K.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},U("calcite-icon",{class:K.attachmentsViewIcon,icon:q.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),U("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},U("fieldset",null,this._renderAttachmentsViewFileNameNode(),U("input",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return U("span",{class:K.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return U("span",{class:K.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return U("span",{class:K.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return U("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:q.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return U("calcite-button",{appearance:"solid",disabled:e,iconStart:q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return U("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{class:K.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(C(e.contentType)){const i=this.messages.maximize;t.push(U("calcite-action",{icon:q.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:n}=e,{messages:o}=this;return C(t)?U("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${n}${n?.includes("?")?"&":"?"}s=${s}`,title:i}):[U("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),o.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:n}=e;if(s&&null!=n)return U("div",{class:K.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,n),U("span",{class:K.attachmentsViewInformationLabel,key:"file-label"},t.fileName),U("span",{class:K.attachmentsViewInformationData,key:"file-value"},s.name),U("span",{class:K.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),U("span",{class:K.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),U("span",{class:K.attachmentsViewInformationLabel,key:"size-label"},t.size),U("span",{class:K.attachmentsViewInformationData,key:"size-span"},m(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:n}=this,o="details"!==i.effectiveMode,l=e.id,a=[U("calcite-button",{appearance:"outline",disabled:o,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,l)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:o,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=l},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:o,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[l],!0)},width:"full"},n.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[U("span",{class:K.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),U("span",{class:K.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:n,objectId:o}=e;return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,class:K.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${o}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...n?.map(t=>{const{id:n,name:l,size:a}=t,r=m(s,a??0);return U("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${n}`,label:l,value:n},this._renderAttachmentsViewListPreview(t),U("span",{class:K.attachmentsViewListFileSize,slot:"actions-end",title:r},r),U("calcite-action",{icon:q.downloadTo,key:"download",label:l,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(o??-1,n)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"details",label:l,onclick:()=>{e.mode="details",e.attachmentId=n},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return U("div",{class:K.attachmentsViewListThumbnail,slot:"content-start"},U("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:n,url:o}=e,l=`${o}${o?.includes("?")?"&":"?"}w=${t}&s=${n}`;return this.supportsResizeAttachments&&C(i)?U("img",{alt:s,key:`thumbnail-image-${s}`,src:l,title:s}):U("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:n,relatedTable:o,relatedTables:l}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?U("calcite-action",{bind:this,icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:n,text:b,textEnabled:!0,title:b}):void 0,_=u?U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:n,text:y,textEnabled:!0,title:y}):void 0,M=u?U("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,C=o?U("calcite-label",{layout:"inline",scale:n},i.showAllTables,U("calcite-switch",{checked:this.allRelatedTablesVisible,scale:n,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,V=u&&"list"===r.effectiveMode&&null!=p&&w&&h?U("calcite-action",{icon:q.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:n,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?U("calcite-action",{bind:this,icon:q.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:n,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return U("div",{class:K.tableNavigation,key:"table-nav"},U("calcite-action",{icon:q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{this.hasPendingEdits?this._showDiscardEditsPrompt().then(e=>e&&this._resetNestedViews()):this._resetNestedViews()},scale:n,text:this.layer?.title??"",textEnabled:!1,title:o?i.exitRelatedRecords:i.exitAttachments}),l.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,U("div",null,M,C,V,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&(this.hasPendingEdits?this._showDiscardEditsPrompt().then(e=>e&&this._onRelatedNavigationItemClick(t)):this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([p()],J.prototype,"_attachmentsDialogPreviewLoading",void 0),e([p()],J.prototype,"_attachmentsInput",void 0),e([p()],J.prototype,"_attachmentsViewIsVisible",null),e([p()],J.prototype,"_columnVisibilityActions",void 0),e([p()],J.prototype,"_dialogIsOpen",null),e([p()],J.prototype,"_effectiveDescription",null),e([p()],J.prototype,"_effectiveLayers",null),e([p()],J.prototype,"_effectiveTitle",null),e([p()],J.prototype,"_effectiveVisibleElements",null),e([p()],J.prototype,"_filteredTables",null),e([p()],J.prototype,"_hasAttachmentsViewError",null),e([p()],J.prototype,"_hasCustomMenuItems",null),e([p()],J.prototype,"_hasDefaultMenuItems",null),e([p()],J.prototype,"_shouldShowGrid",null),e([p()],J.prototype,"_shouldShowMenu",null),e([p()],J.prototype,"_showClearSelectionAction",null),e([p()],J.prototype,"_showColumnsVisibilityAction",null),e([p()],J.prototype,"_showDeleteSelectionAction",null),e([p()],J.prototype,"_showExportSelectionToCSVAction",null),e([p()],J.prototype,"_showLayerDropdown",null),e([p()],J.prototype,"_shouldShowNavigationBar",null),e([p()],J.prototype,"_showRefreshDataAction",null),e([p()],J.prototype,"_showSelectedRecordsShowSelectedAction",null),e([p()],J.prototype,"_showSelectedRecordsShowAllAction",null),e([p()],J.prototype,"_showZoomToSelectionAction",null),e([p()],J.prototype,"_viewLayers",null),e([p()],J.prototype,"attachmentsList",void 0),e([p({readOnly:!0})],J.prototype,"grid",null),e([p()],J.prototype,"actionColumn",null),e([p()],J.prototype,"actionColumnConfig",null),e([p({readOnly:!0})],J.prototype,"activeFilters",null),e([p({readOnly:!0})],J.prototype,"activeSortOrders",null),e([p()],J.prototype,"allColumns",null),e([p({readOnly:!0})],J.prototype,"allRelatedTablesVisible",null),e([p()],J.prototype,"allVisibleColumns",null),e([p()],J.prototype,"attachmentsColumns",null),e([p()],J.prototype,"attachmentsEnabled",null),e([p()],J.prototype,"attachmentsViewOptions",null),e([p({type:f})],J.prototype,"attributeTableTemplate",null),e([p()],J.prototype,"autoRefreshEnabled",null),e([p()],J.prototype,"autoSaveEnabled",null),e([p()],J.prototype,"canAddRelatedFeature",null),e([p()],J.prototype,"clearPrompt",null),e([p()],J.prototype,"columnPerformanceModeEnabled",null),e([p()],J.prototype,"columnReorderingEnabled",null),e([p({readOnly:!0})],J.prototype,"columns",null),e([p()],J.prototype,"definitionExpression",null),e([p()],J.prototype,"description",void 0),e([p()],J.prototype,"disabled",void 0),e([p()],J.prototype,"editingEnabled",null),e([p()],J.prototype,"effectiveSelectionManager",null),e([p()],J.prototype,"effectiveSize",null),e([p()],J.prototype,"effectiveTable",null),e([p()],J.prototype,"fieldColumns",null),e([p({types:g})],J.prototype,"filterGeometry",null),e([p()],J.prototype,"filterBySelectionEnabled",null),e([p()],J.prototype,"groupColumns",null),e([p()],J.prototype,"hasContingentValues",null),e([p()],J.prototype,"hasInvalidPendingEdits",null),e([p()],J.prototype,"hasPendingEdits",null),e([p()],J.prototype,"hiddenFields",null),e([p()],J.prototype,"highlightEnabled",null),e([p()],J.prototype,"highlightIds",null),e([p()],J.prototype,"icon",null),e([p()],J.prototype,"initialSize",null),e([p()],J.prototype,"isQueryingOrSyncing",null),e([p()],J.prototype,"isSyncing",null),e([p()],J.prototype,"isSyncingAttachments",null),e([p()],J.prototype,"label",null),e([p()],J.prototype,"layer",null),e([p()],J.prototype,"layers",null),e([p()],J.prototype,"layerView",null),e([p()],J.prototype,"maxSize",null),e([p(),z("esri/widgets/FeatureTable/t9n/FeatureTable")],J.prototype,"messages",null),e([p(),z("esri/t9n/common")],J.prototype,"messagesCommon",null),e([p(),z("esri/widgets/Editor/t9n/Editor")],J.prototype,"messagesEditor",void 0),e([p(),z("esri/core/t9n/Units")],J.prototype,"messagesUnits",null),e([p(),z("esri/widgets/support/t9n/uriUtils")],J.prototype,"messagesURIUtils",null),e([p()],J.prototype,"menuConfig",null),e([p()],J.prototype,"multipleSelectionEnabled",null),e([p()],J.prototype,"multiSortEnabled",null),e([p()],J.prototype,"multipleSortPriority",null),e([p()],J.prototype,"navigationScale",void 0),e([p()],J.prototype,"noDataMessage",null),e([p()],J.prototype,"objectIds",null),e([p()],J.prototype,"outFields",null),e([p()],J.prototype,"pageCount",null),e([p()],J.prototype,"pageIndex",null),e([p()],J.prototype,"pageSize",null),e([p()],J.prototype,"paginationEnabled",null),e([p()],J.prototype,"pendingEditsCount",null),e([p()],J.prototype,"prompt",null),e([p()],J.prototype,"relatedRecordsEnabled",null),e([p()],J.prototype,"relatedTable",null),e([p()],J.prototype,"relatedTableHasContingentValues",null),e([p()],J.prototype,"relatedTableHasInvalidPendingEdits",null),e([p()],J.prototype,"relatedTableHasPendingEdits",null),e([p()],J.prototype,"relatedTables",null),e([p()],J.prototype,"relationship",null),e([p()],J.prototype,"relationshipColumnConfigs",null),e([p()],J.prototype,"relationshipColumns",null),e([p()],J.prototype,"relationshipConfig",null),e([p()],J.prototype,"relationshipInfos",null),e([p()],J.prototype,"returnGeometryEnabled",null),e([p()],J.prototype,"returnMEnabled",null),e([p()],J.prototype,"returnZEnabled",null),e([p()],J.prototype,"rowHighlightIds",null),e([p()],J.prototype,"selectionManager",null),e([p()],J.prototype,"selectionSource",null),e([p()],J.prototype,"showAllRelatedTables",null),e([p()],J.prototype,"showPrompt",null),e([p()],J.prototype,"showRelatedTableCallback",null),e([p()],J.prototype,"size",null),e([p({readOnly:!0})],J.prototype,"state",null),e([p()],J.prototype,"supportsAddAttachments",null),e([p()],J.prototype,"supportsAttachments",null),e([p()],J.prototype,"supportsDeleteAttachments",null),e([p()],J.prototype,"supportsResizeAttachments",null),e([p()],J.prototype,"supportsUpdateAttachments",null),e([p()],J.prototype,"syncTemplateOnChangesEnabled",null),e([p()],J.prototype,"syncViewSelection",null),e([p()],J.prototype,"syncWithViewSelectionManager",null),e([p({constructOnly:!0})],J.prototype,"tableController",null),e([p({constructOnly:!0})],J.prototype,"tableParent",null),e([p({type:P})],J.prototype,"tableTemplate",null),e([p()],J.prototype,"tableTemplateOverride",null),e([p()],J.prototype,"title",void 0),e([p({type:_})],J.prototype,"timeExtent",null),e([p()],J.prototype,"timeZone",null),e([p()],J.prototype,"view",null),e([p({type:T}),$(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],J.prototype,"viewModel",void 0),e([p()],J.prototype,"visibleColumns",null),e([p({type:I,nonNullable:!0})],J.prototype,"visibleElements",void 0),e([p({type:I})],J.prototype,"visibleElementsOverride",null),J=Z=e([u("esri.widgets.FeatureTable")],J);const X=J;export{X as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{createResolver as o}from"../core/promiseUtils.js";import{watch as l,sync as a,syncAndInitial as r,initial as c,on as d}from"../core/reactiveUtils.js";import{renderingSanitizer as h}from"../core/sanitizerUtils.js";import{formatFileSize as m}from"../core/unitFormatUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{geometryTypes as g}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as w}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as b,isMapImageLayer as v,isSubtypeGroupLayer as y}from"../layers/support/layerUtils.js";import f from"../tables/AttributeTableTemplate.js";import _ from"../time/TimeExtent.js";import M from"./Widget.js";import{isSupportedImage as C,getCalciteIconForAttachment as V}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as A,Prompt as E}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import I from"./FeatureTable/VisibleElements.js";import{isGroupColumn as D}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as R,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as x,getRelationshipIdsToShow as L}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{globalCss as O}from"./support/globalCss.js";import{getIconForLayer as j}from"./support/iconUtils.js";import{messageBundle as z,vmEvent as $,tsx as U,tsxFragment as N}from"./support/widget.js";import{storeNode as H,discardNode as B}from"./support/widgetUtils.js";var Z;const G="esri-feature-table",W=`${G}__dialog`,Q=`${G}__attachments-view`,K={base:G,content:`${G}__content`,menuPopover:`${G}__menu-popover`,layerDropdownMenu:`${G}__layer-switcher-menu`,tableContainer:`${G}__table-container`,tableContainerWithAttachments:`${G}__table-container--attachments`,tableNavigation:`${G}__table-navigation`,attachmentsView:Q,attachmentsViewContent:`${Q}__content`,attachmentsViewDetails:`${Q}__details`,attachmentsViewDropArea:`${Q}__drop-area`,attachmentsViewDropAreaLabel:`${Q}__drop-area__label`,attachmentsViewDropAreaMessage:`${Q}__drop-area__message`,attachmentsViewIcon:`${Q}__icon`,attachmentsViewInformation:`${Q}__information`,attachmentsViewInformationData:`${Q}__information__data`,attachmentsViewInformationLabel:`${Q}__information__label`,attachmentsViewList:`${Q}__list`,attachmentsViewListFileSize:`${Q}__list__filesize`,attachmentsViewListThumbnail:`${Q}__list__thumbnail`,expanded:`${G}__expanded`,collapsed:`${G}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${G}__footer__message`,footerIconDanger:`${G}__footer__icon--danger`,footerIconSuccess:`${G}__footer__icon--success`},q={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let J=Z=class extends M{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new I,this.announceDeprecation=()=>{s(n.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},a),l(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),r),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},c),d(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),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"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),A(),R()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?h.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:n,title:o,size:l}=this;if(o)return h.sanitize("function"==typeof o?o():o);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:h.sanitize(e.title),count:l,selected:n.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!k(e)||y(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{w(e)||"catalog-footprint"===e.type||(b(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):v(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):y(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return q.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}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 layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:n,columnMenus:o,tooltips:l}=s,a=null!=e.objectId;if(t)return new I({columnDescriptions:n,columnMenus:o,tooltips:l,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new I({columnDescriptions:n,columnMenus:o,tooltips:l,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new I({columnDescriptions:n,columnMenus:o,tooltips:l,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return U("div",{bind:this,class:this.classes(K.base,O.widget)},U("calcite-panel",{bind:this,class:K.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?U("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(K.tableContainer);if(t.length){const s=this.classes(K.base,this.allRelatedTablesVisible?K.expanded:K.collapsed,this._attachmentsViewIsVisible?K.tableContainerWithAttachments:void 0);return U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[this._shouldShowGrid?U("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return U("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[U("div",{class:this.classes(K.base,K.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[U("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return U("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return U("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},U("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,n=e||t,o=this.hasContingentValues,l=[U("calcite-button",{appearance:"outline",disabled:t,iconStart:q.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),U("calcite-button",{disabled:n,iconStart:q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(o){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?q.exclamationMarkTriangle:q.checkCircle,n=e?K.footerIconDanger:K.footerIconSuccess;l.push(U("div",{class:K.footerMessage,key:"footer-message",slot:"footer-start"},U("calcite-icon",{class:n,icon:s,scale:"s",slot:"footer-start"}),t))}return l}_renderPrompt(){return this.prompt?U(E,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:n}=this,o=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:o,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:n.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:n.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=o(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return U("calcite-dialog",{class:K.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,n=s.indexOf(e);return U(N,null,U("div",{class:K.dialogHeader,key:"header",slot:"content-top"},U("span",null,e.name),U("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),U("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),U("div",{class:K.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),U("calcite-pagination",{pageSize:1,slot:"footer",startItem:n+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,n=s[i]?.id;t.dialogId=n}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:n,clickFunction:o}=e;if(!i)return U("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:n,onclick:()=>o(),slot:"header-menu-actions",text:n,textEnabled:!0,title:n})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:q.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:n})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>n(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,s=this.messages.toggleColumns;return U("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),bind:this,disabled:t.menuConfig?.disabled,icon:q.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:s},this._effectiveVisibleElements.tooltips?U("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip",topLayerDisabled:this.topLayerDisabled},s):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return U("calcite-popover",{autoClose:!0,class:K.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},U("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map(t=>{const i=D(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})})))}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:n}=e,{effectiveLabel:o,fieldName:l,hidden:a}=t;return U("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${l}`,label:o,selected:!a,value:l,onCalciteListItemSelect:e=>{n&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return U("div",{class:K.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},U("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},U("calcite-action",{icon:q.layers,slot:"trigger",text:e,title:e}),U("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return U("calcite-dropdown-item",{iconStart:i?j(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:n,paginationEnabled:o,pageSize:l,view:a,viewModel:r}=this,{layer:c,objectId:d,relatedLayer:h,relationshipId:m}=e;await c.load();const p=this.attachmentsEnabled&&x(c),u=new Z({layer:c,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:p,editingEnabled:s,paginationEnabled:o,pageSize:l,relatedRecordsEnabled:!0,relationshipConfig:{objectId:d,relatedLayer:h,relationshipId:m},relationshipColumnConfigs:L(c,m),tableController:this,tableParent:n,view:a,showRelatedTableCallback:e=>r.emit("show-related-table",e)});this.relatedTables.add(u),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{bind:this,class:K.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},U("calcite-icon",{class:K.attachmentsViewIcon,icon:q.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),U("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},U("fieldset",null,this._renderAttachmentsViewFileNameNode(),U("input",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return U("span",{class:K.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return U("span",{class:K.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return U("span",{class:K.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return U("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:q.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return U("calcite-button",{appearance:"solid",disabled:e,iconStart:q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return U("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{class:K.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(C(e.contentType)){const i=this.messages.maximize;t.push(U("calcite-action",{icon:q.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:n}=e,{messages:o}=this;return C(t)?U("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${n}${n?.includes("?")?"&":"?"}s=${s}`,title:i}):[U("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),o.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:n}=e;if(s&&null!=n)return U("div",{class:K.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,n),U("span",{class:K.attachmentsViewInformationLabel,key:"file-label"},t.fileName),U("span",{class:K.attachmentsViewInformationData,key:"file-value"},s.name),U("span",{class:K.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),U("span",{class:K.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),U("span",{class:K.attachmentsViewInformationLabel,key:"size-label"},t.size),U("span",{class:K.attachmentsViewInformationData,key:"size-span"},m(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:n}=this,o="details"!==i.effectiveMode,l=e.id,a=[U("calcite-button",{appearance:"outline",disabled:o,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,l)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:o,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=l},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:o,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[l],!0)},width:"full"},n.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[U("span",{class:K.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),U("span",{class:K.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:n,objectId:o}=e;return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,class:K.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${o}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...n?.map(t=>{const{id:n,name:l,size:a}=t,r=m(s,a??0);return U("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${n}`,label:l,value:n},this._renderAttachmentsViewListPreview(t),U("span",{class:K.attachmentsViewListFileSize,slot:"actions-end",title:r},r),U("calcite-action",{icon:q.downloadTo,key:"download",label:l,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(o??-1,n)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"details",label:l,onclick:()=>{e.mode="details",e.attachmentId=n},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return U("div",{class:K.attachmentsViewListThumbnail,slot:"content-start"},U("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:n,url:o}=e,l=`${o}${o?.includes("?")?"&":"?"}w=${t}&s=${n}`;return this.supportsResizeAttachments&&C(i)?U("img",{alt:s,key:`thumbnail-image-${s}`,src:l,title:s}):U("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:n,relatedTable:o,relatedTables:l}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?U("calcite-action",{bind:this,icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:n,text:b,textEnabled:!0,title:b}):void 0,_=u?U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:n,text:y,textEnabled:!0,title:y}):void 0,M=u?U("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,C=o?U("calcite-label",{layout:"inline",scale:n},i.showAllTables,U("calcite-switch",{checked:this.allRelatedTablesVisible,scale:n,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,V=u&&"list"===r.effectiveMode&&null!=p&&w&&h?U("calcite-action",{icon:q.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:n,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?U("calcite-action",{bind:this,icon:q.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:n,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return U("div",{class:K.tableNavigation,key:"table-nav"},U("calcite-action",{icon:q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:n,text:this.layer?.title??"",textEnabled:!1,title:o?i.exitRelatedRecords:i.exitAttachments}),l.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,U("div",null,M,C,V,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([p()],J.prototype,"_attachmentsDialogPreviewLoading",void 0),e([p()],J.prototype,"_attachmentsInput",void 0),e([p()],J.prototype,"_attachmentsViewIsVisible",null),e([p()],J.prototype,"_columnVisibilityActions",void 0),e([p()],J.prototype,"_dialogIsOpen",null),e([p()],J.prototype,"_effectiveDescription",null),e([p()],J.prototype,"_effectiveLayers",null),e([p()],J.prototype,"_effectiveTitle",null),e([p()],J.prototype,"_effectiveVisibleElements",null),e([p()],J.prototype,"_filteredTables",null),e([p()],J.prototype,"_hasAttachmentsViewError",null),e([p()],J.prototype,"_hasCustomMenuItems",null),e([p()],J.prototype,"_hasDefaultMenuItems",null),e([p()],J.prototype,"_shouldShowGrid",null),e([p()],J.prototype,"_shouldShowMenu",null),e([p()],J.prototype,"_showClearSelectionAction",null),e([p()],J.prototype,"_showColumnsVisibilityAction",null),e([p()],J.prototype,"_showDeleteSelectionAction",null),e([p()],J.prototype,"_showExportSelectionToCSVAction",null),e([p()],J.prototype,"_showLayerDropdown",null),e([p()],J.prototype,"_shouldShowNavigationBar",null),e([p()],J.prototype,"_showRefreshDataAction",null),e([p()],J.prototype,"_showSelectedRecordsShowSelectedAction",null),e([p()],J.prototype,"_showSelectedRecordsShowAllAction",null),e([p()],J.prototype,"_showZoomToSelectionAction",null),e([p()],J.prototype,"_viewLayers",null),e([p()],J.prototype,"attachmentsList",void 0),e([p({readOnly:!0})],J.prototype,"grid",null),e([p()],J.prototype,"actionColumn",null),e([p()],J.prototype,"actionColumnConfig",null),e([p({readOnly:!0})],J.prototype,"activeFilters",null),e([p({readOnly:!0})],J.prototype,"activeSortOrders",null),e([p()],J.prototype,"allColumns",null),e([p({readOnly:!0})],J.prototype,"allRelatedTablesVisible",null),e([p()],J.prototype,"allVisibleColumns",null),e([p()],J.prototype,"attachmentsColumns",null),e([p()],J.prototype,"attachmentsEnabled",null),e([p()],J.prototype,"attachmentsViewOptions",null),e([p({type:f})],J.prototype,"attributeTableTemplate",null),e([p()],J.prototype,"autoRefreshEnabled",null),e([p()],J.prototype,"autoSaveEnabled",null),e([p()],J.prototype,"canAddRelatedFeature",null),e([p()],J.prototype,"clearPrompt",null),e([p()],J.prototype,"columnPerformanceModeEnabled",null),e([p()],J.prototype,"columnReorderingEnabled",null),e([p({readOnly:!0})],J.prototype,"columns",null),e([p()],J.prototype,"definitionExpression",null),e([p()],J.prototype,"description",void 0),e([p()],J.prototype,"disabled",void 0),e([p()],J.prototype,"editingEnabled",null),e([p()],J.prototype,"effectiveSelectionManager",null),e([p()],J.prototype,"effectiveSize",null),e([p()],J.prototype,"effectiveTable",null),e([p()],J.prototype,"fieldColumns",null),e([p({types:g})],J.prototype,"filterGeometry",null),e([p()],J.prototype,"filterBySelectionEnabled",null),e([p()],J.prototype,"groupColumns",null),e([p()],J.prototype,"hasContingentValues",null),e([p()],J.prototype,"hasInvalidPendingEdits",null),e([p()],J.prototype,"hasPendingEdits",null),e([p()],J.prototype,"hiddenFields",null),e([p()],J.prototype,"highlightEnabled",null),e([p()],J.prototype,"highlightIds",null),e([p()],J.prototype,"icon",null),e([p()],J.prototype,"initialSize",null),e([p()],J.prototype,"isQueryingOrSyncing",null),e([p()],J.prototype,"isSyncing",null),e([p()],J.prototype,"isSyncingAttachments",null),e([p()],J.prototype,"label",null),e([p()],J.prototype,"layer",null),e([p()],J.prototype,"layers",null),e([p()],J.prototype,"layerView",null),e([p()],J.prototype,"maxSize",null),e([p(),z("esri/widgets/FeatureTable/t9n/FeatureTable")],J.prototype,"messages",null),e([p(),z("esri/t9n/common")],J.prototype,"messagesCommon",null),e([p(),z("esri/widgets/Editor/t9n/Editor")],J.prototype,"messagesEditor",void 0),e([p(),z("esri/core/t9n/Units")],J.prototype,"messagesUnits",null),e([p(),z("esri/widgets/support/t9n/uriUtils")],J.prototype,"messagesURIUtils",null),e([p()],J.prototype,"menuConfig",null),e([p()],J.prototype,"multipleSelectionEnabled",null),e([p()],J.prototype,"multiSortEnabled",null),e([p()],J.prototype,"multipleSortPriority",null),e([p()],J.prototype,"navigationScale",void 0),e([p()],J.prototype,"noDataMessage",null),e([p()],J.prototype,"objectIds",null),e([p()],J.prototype,"outFields",null),e([p()],J.prototype,"pageCount",null),e([p()],J.prototype,"pageIndex",null),e([p()],J.prototype,"pageSize",null),e([p()],J.prototype,"paginationEnabled",null),e([p()],J.prototype,"pendingEditsCount",null),e([p()],J.prototype,"prompt",null),e([p()],J.prototype,"relatedRecordsEnabled",null),e([p()],J.prototype,"relatedTable",null),e([p()],J.prototype,"relatedTableHasContingentValues",null),e([p()],J.prototype,"relatedTableHasInvalidPendingEdits",null),e([p()],J.prototype,"relatedTableHasPendingEdits",null),e([p()],J.prototype,"relatedTables",null),e([p()],J.prototype,"relationship",null),e([p()],J.prototype,"relationshipColumnConfigs",null),e([p()],J.prototype,"relationshipColumns",null),e([p()],J.prototype,"relationshipConfig",null),e([p()],J.prototype,"relationshipInfos",null),e([p()],J.prototype,"returnGeometryEnabled",null),e([p()],J.prototype,"returnMEnabled",null),e([p()],J.prototype,"returnZEnabled",null),e([p()],J.prototype,"rowHighlightIds",null),e([p()],J.prototype,"selectionManager",null),e([p()],J.prototype,"selectionSource",null),e([p()],J.prototype,"showAllRelatedTables",null),e([p()],J.prototype,"showPrompt",null),e([p()],J.prototype,"showRelatedTableCallback",null),e([p()],J.prototype,"size",null),e([p({readOnly:!0})],J.prototype,"state",null),e([p()],J.prototype,"supportsAddAttachments",null),e([p()],J.prototype,"supportsAttachments",null),e([p()],J.prototype,"supportsDeleteAttachments",null),e([p()],J.prototype,"supportsResizeAttachments",null),e([p()],J.prototype,"supportsUpdateAttachments",null),e([p()],J.prototype,"syncTemplateOnChangesEnabled",null),e([p()],J.prototype,"syncViewSelection",null),e([p()],J.prototype,"syncWithViewSelectionManager",null),e([p({constructOnly:!0})],J.prototype,"tableController",null),e([p({constructOnly:!0})],J.prototype,"tableParent",null),e([p({type:P})],J.prototype,"tableTemplate",null),e([p()],J.prototype,"tableTemplateOverride",null),e([p()],J.prototype,"title",void 0),e([p({type:_})],J.prototype,"timeExtent",null),e([p()],J.prototype,"timeZone",null),e([p()],J.prototype,"view",null),e([p({type:T}),$(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],J.prototype,"viewModel",void 0),e([p()],J.prototype,"visibleColumns",null),e([p({type:I,nonNullable:!0})],J.prototype,"visibleElements",void 0),e([p({type:I})],J.prototype,"visibleElementsOverride",null),J=Z=e([u("esri.widgets.FeatureTable")],J);const X=J;export{X as default};
|
|
@@ -83,7 +83,7 @@ export interface HistogramRangeSliderEvents extends CommonSliderEvents {}
|
|
|
83
83
|
*
|
|
84
84
|
* At a minimum, the slider's [container](https://developers.arcgis.com/javascript/latest/references/core/widgets/HistogramRangeSlider/#container) or parent container must have a `width` set in css for it to render.
|
|
85
85
|
*
|
|
86
|
-
* @deprecated since version 5.0. Use the [Histogram](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/) and[Slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/) components instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
86
|
+
* @deprecated since version 5.0. Use the [Histogram](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/) and [Slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/) components instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
87
87
|
* @since 4.12
|
|
88
88
|
* @see [Histogram](https://developers.arcgis.com/javascript/latest/references/core/widgets/Histogram/)
|
|
89
89
|
* @see [Slider](https://developers.arcgis.com/javascript/latest/references/core/widgets/Slider/)
|