@arcgis/core 4.33.0-next.20250430 → 4.33.0-next.20250501
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02b38423276536596aba.js +1 -0
- package/assets/esri/core/workers/chunks/3cee3ff926f47aae476f.js +1 -0
- package/assets/esri/core/workers/chunks/{cb25b45a6b385e60c68d.js → 653ff3e631fea8ad393a.js} +122 -121
- package/assets/esri/core/workers/chunks/6d89d42bcba213be2d9d.js +1 -0
- package/assets/esri/core/workers/chunks/6ecc3a3737ae8622dfa4.js +1 -0
- package/assets/esri/core/workers/chunks/6fef5a07f75b2a5736ad.js +1 -0
- package/assets/esri/core/workers/chunks/6ff46126c82354e6c78e.js +1 -0
- package/assets/esri/core/workers/chunks/71dc9d78dec981078a1a.js +1 -0
- package/assets/esri/core/workers/chunks/{ab6ecd8eeec5ff761b34.js → 73bca519c93920bc8c9f.js} +1 -1
- package/assets/esri/core/workers/chunks/7a282674d77875c58acd.js +1 -0
- package/assets/esri/core/workers/chunks/9652cfd4668b95036c87.js +39 -0
- package/assets/esri/core/workers/chunks/9f07919ade6707b103da.js +1 -0
- package/assets/esri/core/workers/chunks/{d3174ff4dd5acd16485a.js → c041f4a1d18d42e27ad7.js} +1 -1
- package/assets/esri/core/workers/chunks/c9a2c4fd169b943db4b4.js +1 -0
- package/chunks/SSAO.glsl.js +43 -42
- package/core/NestedMap.js +1 -1
- package/core/deprecate.js +1 -1
- package/interfaces.d.ts +232 -39
- package/layers/MapImageLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/save/mapImageLayerUtils.js +5 -0
- package/package.json +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/glTF/LoaderResult.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/DeconflictAABR.js +5 -0
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/ContentObjectType.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -0
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/webgl/Sync.js +5 -0
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +4 -0
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/TableList/ListItemPanel.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +0 -1
- package/assets/esri/core/workers/chunks/2c92f6f268aa2de5432c.js +0 -1
- package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +0 -1
- package/assets/esri/core/workers/chunks/8c8d812a7f2d29c29676.js +0 -1
- package/assets/esri/core/workers/chunks/b780c7062b1b18a5ae19.js +0 -1
- package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +0 -1
- package/assets/esri/core/workers/chunks/baa9fd23414f03ef90bc.js +0 -1
- package/assets/esri/core/workers/chunks/c819535525e9a27bae1f.js +0 -39
- package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +0 -1
- package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +0 -1
package/widgets/FeatureTable.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{watch as i,sync as l,initial as o,on as n}from"../core/reactiveUtils.js";import{formatFileSize as s}from"../core/unitFormatUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as c}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as d,isMapImageLayer as h,isSubtypeGroupLayer as p}from"../layers/support/layerUtils.js";import m from"../tables/AttributeTableTemplate.js";import u from"./Widget.js";import{isSupportedImage as g,getCalciteIconForAttachment as w}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as b,Prompt as v}from"./Editor/components/Prompt.js";import y from"./FeatureTable/ColumnMenuVisibleElements.js";import f from"./FeatureTable/FeatureTableViewModel.js";import _ from"./FeatureTable/VisibleElements.js";import{isGroupColumn as M}from"./FeatureTable/support/columnUtils.js";import{loadFieldColumnComponents as A,isIFeatureTableSupportedLayer as C,isIFeatureTableSupportedLayerWithAttachments as S,getRelationshipIdsToShow as T}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as I}from"./support/globalCss.js";import{getIconForLayer as V}from"./support/iconUtils.js";import{renderingSanitizer as R,storeNode as x,discardNode as k}from"./support/widgetUtils.js";import{messageBundle as D}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as F}from"./support/jsxFactory.js";import{substitute as L}from"../intl/substitute.js";var j;const O="esri-feature-table",z=`${O}__prompt`,$=`${O}__attachments-view`,U={base:O,content:`${O}__content`,menuPopover:`${O}__menu-popover`,layerDropdownMenu:`${O}__layer-switcher-menu`,tableContainer:`${O}__table-container`,tableContainerWithAttachments:`${O}__table-container--attachments`,tableNavigation:`${O}__table-navigation`,attachmentsView:$,attachmentsViewContent:`${$}__content`,attachmentsViewDropArea:`${$}__drop-area`,attachmentsViewIcon:`${$}__icon`,attachmentsViewInformation:`${$}__information`,attachmentsViewList:`${$}__list`,attachmentsViewListFileSize:`${$}__list__filesize`,attachmentsViewListItemDelete:`${$}__list-item--delete`,attachmentsViewListThumbnail:`${$}__list__thumbnail`,expanded:`${O}__expanded`,collapsed:`${O}__collapsed`,promptContainer:z,promptHeader:`${z}__header`,promptHeading:`${z}__header__heading`,promptMessage:`${z}__message`,promptDivider:`${z}__divider`,promptActions:`${z}__actions`},B={attachment:"attachment",chevronDown:"chevron-down",chevronLeft:"chevron-left",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",launch:"launch",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",replaceImage:"replace-image",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",upload:"upload",zoomToSelection:"zoom-to-object"};let H=j=class extends u{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.menuConfig=null,this.title=null,this.viewModel=new f,this.visibleElements=new _,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([i((()=>[this.isQueryingOrSyncing,this.editingEnabled]),(()=>this.scheduleRender())),i((()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length]),(()=>{this.columns.forEach((e=>e.visibleElements=this._effectiveVisibleElements)),this.refreshCellContent()}),l),i((()=>this._effectiveVisibleElements.selectionColumn),(e=>{this.grid&&(this.grid.selectionColumnEnabled=e)}),o),n((()=>this.viewModel),"show-related-table",(e=>this._onShowRelatedTable(e))),i((()=>this.editingEnabled),(()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)}))])}loadDependencies(){return Promise.all([E({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"),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")}),b(),A()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _effectiveDescription(){const{description:e}=this;return null!=e?R.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(C):[],l=i.length?i:[...this._viewLayers];return e&&!l.includes(e)&&l.push(e),l}get _effectiveTitle(){const{layer:e,messages:t,state:i,highlightIds:l,title:o,size:n}=this;if(o)return R.sanitize("function"==typeof o?o():o);if(!e)return t.noLayer;switch(i){case"disabled":return t.errorLayer;case"ready":case"loading":return t.loading;case"error":return t.errorData}return L(t.header,{title:R.sanitize(e.title),count:n,selected:l.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._shouldShowAttachmentsView?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._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some((e=>null!=e.attachmentsViewOptions.objectId)))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length)}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._shouldShowAttachmentsView;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)}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=>{!C(e)||p(e)||t.has(e)||(e.load(),t.add(e))},l=e=>{c(e)||"catalog-footprint"===e.type||(d(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):h(e)?(e.loadAll(),e.sublayers?.forEach(i),e.subtables?.forEach(i)):p(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(l),e.allTables.forEach(l),[...t.values()]}get grid(){return this.viewModel.grid}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 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 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 editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}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 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"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 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 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 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 relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}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 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 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 visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:l}=this,{columnDescriptions:o,columnMenus:n,tooltips:s}=l,a=null!=e.objectId;if(t)return new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&l.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new _({columnDescriptions:o,columnMenus:n,tooltips:s,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new y({sortAscending:c,sortDescending:c})})}return a?new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})}):null}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}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)}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()}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:l}=this;return F("div",{bind:this,class:this.classes(U.base,I.widget)},F("calcite-panel",{bind:this,class:U.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===l&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,loading:"loading"===l,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?F("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError()),this._renderColumnVisibilityPopover(),this._renderPrompt())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(U.tableContainer);if(t.length){const l=this.classes(U.base,this.allRelatedTablesVisible?U.expanded:U.collapsed,this._shouldShowAttachmentsView?U.tableContainerWithAttachments:void 0);return F("div",{class:i},F("calcite-panel",{overlayPositioning:"fixed"},F("div",null,[this._shouldShowGrid?F("div",{class:l},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map((e=>{const i=t.indexOf(e);return F("div",{class:l,key:`related-${i}`},e.render())})),,])))}return null!=this.attachmentsViewOptions.objectId?F("div",{class:i},F("calcite-panel",{overlayPositioning:"fixed"},F("div",null,[F("div",{class:this.classes(U.base,U.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[F("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return F("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return F("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:B.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},F("span",{slot:"message"},e.errorOccured))}_renderPrompt(){return this.prompt?F(v,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:t}=this,i=L(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:i,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:t.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,t){const{messages:i,messagesCommon:l}=this,o=L(i.deleteAttachmentCount,{count:t.length});this.showPrompt({title:o,message:i.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,t,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:l,text:o,clickFunction:n}=e;if(!i)return F("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:l??void 0,key:o,onclick:()=>n(),slot:"header-menu-actions",text:o,textEnabled:!0,title:o})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:B.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:B.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:B.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:B.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:B.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:B.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:B.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(t).map((e=>e&&this._renderHeaderMenuAction(e)))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map((({disabled:e,hidden:t,icon:i,label:l,clickFunction:o})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:l,disabled:e,clickFunction:e=>o(e)})))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,l=this.messages.toggleColumns;return F("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),appearance:"transparent",bind:this,disabled:t.menuConfig?.disabled,icon:B.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:l},this._effectiveVisibleElements.tooltips?F("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},l):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return F("calcite-popover",{autoClose:!0,class:U.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},F("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map((t=>{const i=M(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:l,ignoreSelect:o}=e,{effectiveLabel:n,fieldName:s,hidden:a}=t;return F("calcite-list-item",{expanded:!(!l?.length||a)||void 0,key:`toggle-columns__item-${s}`,label:n,selected:!a,value:s,onCalciteListItemSelect:e=>{o&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},l)}_renderLayerDropdown(){const e=this.messages.selectALayer;return F("div",{class:U.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},F("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},F("calcite-action",{icon:B.layers,slot:"trigger",text:e,title:e}),F("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map(((e,t)=>this._renderLayerDropdownItem(e,t)))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return F("calcite-dropdown-item",{iconStart:i?V(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._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{editingEnabled:t,effectiveTable:i,paginationEnabled:l,pageSize:o,view:n,viewModel:s}=this,{layer:a,objectId:r,relatedLayer:c,relationshipId:d}=e;await a.load();const h=this.attachmentsEnabled&&S(a),p=new j({layer:a,attachmentsEnabled:h,editingEnabled:t,paginationEnabled:l,pageSize:o,relatedRecordsEnabled:!0,relationshipConfig:{objectId:r,relatedLayer:c,relationshipId:d},relationshipColumnConfigs:T(a,d),tableController:this,tableParent:i,view:n,showRelatedTableCallback:e=>s.emit("show-related-table",e)});this.relatedTables.add(p),this.scheduleRender()}_renderAttachmentsView(){const{attachmentInfos:e,mode:t,objectId:i}=this.attachmentsViewOptions;return"file"!==t&&e.length&&null!=i?this._renderAttachmentsViewList():this._renderAttachmentsViewFilePane()}_renderAttachmentsViewFilePane(){const{attachmentsViewOptions:e,isSyncingAttachments:t,supportsAddAttachments:i,messages:l,messagesUnits:o}=this,{attachmentId:n,attachmentInfos:a,candidates:r,objectId:c}=e,d=a.find((e=>e.id===n)),h=a.length,p=r?.length,m=d?F("calcite-label",{alignment:"center",key:"replace-file-node",scale:"l"},l.replaceFile):void 0,u=p?void 0:F("calcite-label",{alignment:"center",key:"message-node",scale:"m"},i?null==c?l.noFeature:l.dragAndDropToUpload:l.editingRestricted),g=Array.from(r??[]).pop(),w=g?F("calcite-label",{key:"filename-node"},g.name):void 0,b=i&&null!=c,v=b&&p,y=F("input",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,"data-node-ref":"_attachmentsInput",files:r,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),f=b?F("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:B.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value="",this._attachmentsInput.click())},width:"full"},l.selectFile):void 0,_=v?F("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:B.save,key:"save-node",loading:t,onclick:()=>{this.saveAttachmentsViewForm()},width:"full"},d?l.updateAttachment:l.addAttachment):void 0,M=h||p?F("calcite-button",{appearance:"transparent",bind:this,disabled:t,key:"cancel-node",onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value=""),e.reset(),e.attachmentInfos?.length&&(e.mode="list")},width:"full"},this.messagesCommon.cancel):void 0;return[F("div",{class:U.attachmentsView,key:"attachments-view"},F("div",{class:U.attachmentsViewContent,key:"attachments-view-content"},F("div",{bind:this,class:U.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},F("calcite-icon",{class:U.attachmentsViewIcon,icon:B.upload,scale:"l"}),m,u,F("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},F("fieldset",null,w,y,f,_,M)))),null!=c&&null!=d?F("div",{class:U.attachmentsViewInformation,key:"information"},this._renderAttachmentsViewThumbnail(d,200),F("label",{key:"file-label"},l.fileName),F("span",{key:"file-span"},d.name),F("label",{key:"size-label"},l.size),F("span",{key:"size-span"},s(o,d.size??0))):void 0)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:l,supportsDeleteAttachments:o,supportsUpdateAttachments:n}=this,{attachmentInfos:a,objectId:r}=e;return F("calcite-list",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,class:U.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${r}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:"multiple",onCalciteListChange:()=>this.scheduleRender()},...a?.map((t=>{const{id:a,name:c,size:d,url:h}=t,p=s(l,d??0);return F("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${a}`,label:c,value:a},this._renderAttachmentsViewListThumbnail(t),F("span",{class:U.attachmentsViewListFileSize,slot:"actions-end",title:p},p),F("calcite-action",{appearance:"transparent",icon:B.downloadTo,key:`download-attachment-${a}`,label:`${c}`,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(r??-1,a)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),n&&null!=r?F("calcite-action",{appearance:"transparent",disabled:!n,icon:B.replaceImage,key:`replace-attachment-${a}`,label:`${c}`,onclick:()=>{e.mode="file",e.attachmentId=a},slot:"actions-end",text:i.updateAttachment,title:i.updateAttachment}):void 0,F("calcite-action",{appearance:"transparent",icon:B.launch,key:`launch-attachment-${a}`,label:`${c}`,onclick:()=>{h&&window.open(h,"_blank")},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}),o&&null!=r?F("calcite-action",{appearance:"transparent",class:U.attachmentsViewListItemDelete,disabled:!o,icon:B.delete,key:`delete-attachment-${a}`,label:`${c}`,onclick:()=>{this.deleteAttachments(r,[a],!0)},slot:"actions-end",text:i.deleteAttachment,title:i.deleteAttachment}):void 0)})))}_renderAttachmentsViewListThumbnail(e){return F("div",{class:U.attachmentsViewListThumbnail,slot:"content-start"},F("a",{href:e.url??"",rel:"noreferrer",target:"_blank"},this._renderAttachmentsViewThumbnail(e)))}_renderAttachmentsViewThumbnail(e,t=64){const{contentType:i,name:l,size:o,url:n}=e,s=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${o}`;return this.supportsResizeAttachments&&g(i)?F("img",{alt:l,key:`thumbnail-image-${l}`,src:s,title:l}):F("calcite-icon",{icon:w(i),key:`thumbnail-icon-${l}`,scale:"l",textLabel:l,title:l})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&this.attachmentsViewOptions.set({mode:"file",candidates:e.dataTransfer?.files})}_renderNavigationBar(){const{effectiveTable:e,messages:t,messagesCommon:i,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:n,attachmentsViewOptions:s,layer:a,supportsAddAttachments:r,supportsDeleteAttachments:c}=e;if(!a)return;const{attachmentInfos:d,objectId:h}=s,p=null!=h,m=d.length,u=n?.selectedItems?.length??0,g=`${a.objectIdField}: ${h}`,w=L(t.selectedCount,{count:u}),b=L(t.attachmentsCount,{count:m}),v=p?F("calcite-action",{bind:this,icon:B.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(h),text:g,textEnabled:!0,title:g}):void 0,y=p?F("calcite-action",{icon:B.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:b,onclick:()=>{m>0&&(s.mode="list")},text:b,textEnabled:!0,title:b}):void 0,f=p?F("calcite-chip",{closable:!0,closed:0===u,key:"navigation-chip",kind:"inverse",label:w,selected:!0,title:w,value:"selected",onCalciteChipClose:()=>n?.selectedItems?.forEach((e=>e.selected=!1))},w):void 0,_=l?F("calcite-label",{layout:"inline"},t.showAllTables,F("calcite-switch",{checked:this.allRelatedTablesVisible,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,M=p&&"list"===s.mode&&null!=h&&u&&c?F("calcite-action",{icon:B.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(h,n?.selectedItems?.map((e=>e.value))??[],!0)},text:i.delete,textEnabled:!0,title:L(t.deleteAttachmentCount,{count:u})}):void 0,A=p&&"list"===s.mode&&r?F("calcite-action",{bind:this,icon:B.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{s.attachmentId=null,s.mode="file"},text:t.addAttachment,textEnabled:!0,title:t.addAttachment}):void 0;return F("div",{class:U.tableNavigation,key:"table-nav"},F("calcite-action",{icon:B.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{l&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},text:this.layer?.title??"",textEnabled:!1,title:l?t.exitRelatedRecords:t.exitAttachments}),o.toArray().map(((e,t)=>this._renderRelatedTableNavigationAction(e,t))),v,y,F("div",null,f,_,M,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return F("calcite-action",{icon:B.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),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([a()],H.prototype,"_attachmentsInput",void 0),e([a()],H.prototype,"_columnVisibilityActions",void 0),e([a()],H.prototype,"_effectiveDescription",null),e([a()],H.prototype,"_effectiveLayers",null),e([a()],H.prototype,"_effectiveTitle",null),e([a()],H.prototype,"_effectiveVisibleElements",null),e([a()],H.prototype,"_filteredTables",null),e([a()],H.prototype,"_hasAttachmentsViewError",null),e([a()],H.prototype,"_hasCustomMenuItems",null),e([a()],H.prototype,"_hasDefaultMenuItems",null),e([a()],H.prototype,"_shouldShowGrid",null),e([a()],H.prototype,"_shouldShowMenu",null),e([a()],H.prototype,"_shouldShowAttachmentsView",null),e([a()],H.prototype,"_showClearSelectionAction",null),e([a()],H.prototype,"_showColumnsVisibilityAction",null),e([a()],H.prototype,"_showDeleteSelectionAction",null),e([a()],H.prototype,"_showExportSelectionToCSVAction",null),e([a()],H.prototype,"_showLayerDropdown",null),e([a()],H.prototype,"_shouldShowNavigationBar",null),e([a()],H.prototype,"_showRefreshDataAction",null),e([a()],H.prototype,"_showSelectedRecordsShowSelectedAction",null),e([a()],H.prototype,"_showSelectedRecordsShowAllAction",null),e([a()],H.prototype,"_showZoomToSelectionAction",null),e([a()],H.prototype,"_viewLayers",null),e([a()],H.prototype,"attachmentsList",void 0),e([a({readOnly:!0})],H.prototype,"grid",null),e([a()],H.prototype,"actionColumnConfig",null),e([a({readOnly:!0})],H.prototype,"activeFilters",null),e([a({readOnly:!0})],H.prototype,"activeSortOrders",null),e([a()],H.prototype,"allColumns",null),e([a({readOnly:!0})],H.prototype,"allRelatedTablesVisible",null),e([a()],H.prototype,"attachmentsEnabled",null),e([a()],H.prototype,"attachmentsViewOptions",null),e([a({type:m})],H.prototype,"attributeTableTemplate",null),e([a()],H.prototype,"autoRefreshEnabled",null),e([a()],H.prototype,"clearPrompt",null),e([a()],H.prototype,"columnPerformanceModeEnabled",null),e([a()],H.prototype,"columnReorderingEnabled",null),e([a({readOnly:!0})],H.prototype,"columns",null),e([a()],H.prototype,"definitionExpression",null),e([a()],H.prototype,"description",void 0),e([a()],H.prototype,"disabled",void 0),e([a()],H.prototype,"editingEnabled",null),e([a()],H.prototype,"effectiveSize",null),e([a()],H.prototype,"effectiveTable",null),e([a()],H.prototype,"filterGeometry",null),e([a()],H.prototype,"filterBySelectionEnabled",null),e([a()],H.prototype,"hiddenFields",null),e([a()],H.prototype,"highlightEnabled",null),e([a()],H.prototype,"highlightIds",null),e([a()],H.prototype,"icon",null),e([a()],H.prototype,"initialSize",null),e([a()],H.prototype,"isQueryingOrSyncing",null),e([a()],H.prototype,"isSyncingAttachments",null),e([a()],H.prototype,"label",null),e([a()],H.prototype,"layer",null),e([a()],H.prototype,"layers",null),e([a()],H.prototype,"layerView",null),e([a()],H.prototype,"maxSize",null),e([a(),D("esri/widgets/FeatureTable/t9n/FeatureTable")],H.prototype,"messages",null),e([a(),D("esri/t9n/common")],H.prototype,"messagesCommon",null),e([a(),D("esri/core/t9n/Units")],H.prototype,"messagesUnits",null),e([a(),D("esri/widgets/support/t9n/uriUtils")],H.prototype,"messagesURIUtils",null),e([a()],H.prototype,"menuConfig",void 0),e([a()],H.prototype,"multipleSelectionEnabled",null),e([a()],H.prototype,"multiSortEnabled",null),e([a()],H.prototype,"multipleSortPriority",null),e([a()],H.prototype,"noDataMessage",null),e([a()],H.prototype,"objectIds",null),e([a()],H.prototype,"outFields",null),e([a()],H.prototype,"pageCount",null),e([a()],H.prototype,"pageIndex",null),e([a()],H.prototype,"pageSize",null),e([a()],H.prototype,"paginationEnabled",null),e([a()],H.prototype,"prompt",null),e([a()],H.prototype,"relatedRecordsEnabled",null),e([a()],H.prototype,"relatedTable",null),e([a()],H.prototype,"relatedTables",null),e([a()],H.prototype,"relationship",null),e([a()],H.prototype,"relationshipColumnConfigs",null),e([a()],H.prototype,"relationshipConfig",null),e([a()],H.prototype,"relationshipInfos",null),e([a()],H.prototype,"returnGeometryEnabled",null),e([a()],H.prototype,"returnMEnabled",null),e([a()],H.prototype,"returnZEnabled",null),e([a()],H.prototype,"rowHighlightIds",null),e([a()],H.prototype,"selectionSource",null),e([a()],H.prototype,"showAllRelatedTables",null),e([a()],H.prototype,"showPrompt",null),e([a()],H.prototype,"showRelatedTableCallback",null),e([a()],H.prototype,"size",null),e([a({readOnly:!0})],H.prototype,"state",null),e([a()],H.prototype,"supportsAddAttachments",null),e([a()],H.prototype,"supportsAttachments",null),e([a()],H.prototype,"supportsDeleteAttachments",null),e([a()],H.prototype,"supportsResizeAttachments",null),e([a()],H.prototype,"supportsUpdateAttachments",null),e([a({constructOnly:!0})],H.prototype,"tableController",null),e([a({constructOnly:!0})],H.prototype,"tableParent",null),e([a()],H.prototype,"tableTemplate",null),e([a()],H.prototype,"tableTemplateOverride",null),e([a()],H.prototype,"title",void 0),e([a()],H.prototype,"timeExtent",null),e([a()],H.prototype,"timeZone",null),e([a()],H.prototype,"view",null),e([a({type:f}),P(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],H.prototype,"viewModel",void 0),e([a({type:_,nonNullable:!0})],H.prototype,"visibleElements",void 0),e([a({type:_})],H.prototype,"visibleElementsOverride",null),H=j=e([r("esri.widgets.FeatureTable")],H);const N=H;export{N as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{watch as i,sync as l,initial as o,on as n}from"../core/reactiveUtils.js";import{formatFileSize as s}from"../core/unitFormatUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as c}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as d,isMapImageLayer as h,isSubtypeGroupLayer as p}from"../layers/support/layerUtils.js";import m from"../tables/AttributeTableTemplate.js";import u from"./Widget.js";import{isSupportedImage as g,getCalciteIconForAttachment as b}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as w,Prompt as v}from"./Editor/components/Prompt.js";import y from"./FeatureTable/ColumnMenuVisibleElements.js";import f from"./FeatureTable/FeatureTableViewModel.js";import _ from"./FeatureTable/VisibleElements.js";import{isGroupColumn as M}from"./FeatureTable/support/columnUtils.js";import{loadFieldColumnComponents as C,isIFeatureTableSupportedLayer as A,isIFeatureTableSupportedLayerWithAttachments as S,getRelationshipIdsToShow as T}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as I}from"./support/globalCss.js";import{getIconForLayer as V}from"./support/iconUtils.js";import{renderingSanitizer as R,storeNode as x,discardNode as k}from"./support/widgetUtils.js";import{messageBundle as D}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";import{substitute as F}from"../intl/substitute.js";var L;const j="esri-feature-table",z=`${j}__prompt`,$=`${j}__attachments-view`,U={base:j,content:`${j}__content`,menuPopover:`${j}__menu-popover`,layerDropdownMenu:`${j}__layer-switcher-menu`,tableContainer:`${j}__table-container`,tableContainerWithAttachments:`${j}__table-container--attachments`,tableNavigation:`${j}__table-navigation`,attachmentsView:$,attachmentsViewContent:`${$}__content`,attachmentsViewDropArea:`${$}__drop-area`,attachmentsViewIcon:`${$}__icon`,attachmentsViewInformation:`${$}__information`,attachmentsViewList:`${$}__list`,attachmentsViewListFileSize:`${$}__list__filesize`,attachmentsViewListItemDelete:`${$}__list-item--delete`,attachmentsViewListThumbnail:`${$}__list__thumbnail`,expanded:`${j}__expanded`,collapsed:`${j}__collapsed`,promptContainer:z,promptHeader:`${z}__header`,promptHeading:`${z}__header__heading`,promptMessage:`${z}__message`,promptDivider:`${z}__divider`,promptActions:`${z}__actions`},B={attachment:"attachment",chevronDown:"chevron-down",chevronLeft:"chevron-left",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",launch:"launch",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",replaceImage:"replace-image",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",upload:"upload",zoomToSelection:"zoom-to-object"};let H=L=class extends u{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.menuConfig=null,this.title=null,this.viewModel=new f,this.visibleElements=new _,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([i((()=>[this.isQueryingOrSyncing,this.editingEnabled]),(()=>this.scheduleRender())),i((()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length]),(()=>{this.columns.forEach((e=>e.visibleElements=this._effectiveVisibleElements)),this.refreshCellContent()}),l),i((()=>this._effectiveVisibleElements.selectionColumn),(e=>{this.grid&&(this.grid.selectionColumnEnabled=e)}),o),n((()=>this.viewModel),"show-related-table",(e=>this._onShowRelatedTable(e))),i((()=>this.editingEnabled),(()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)}))])}loadDependencies(){return Promise.all([E({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"),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")}),w(),C()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _effectiveDescription(){const{description:e}=this;return null!=e?R.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(A):[],l=i.length?i:[...this._viewLayers];return e&&!l.includes(e)&&l.push(e),l}get _effectiveTitle(){const{layer:e,messages:t,state:i,highlightIds:l,title:o,size:n}=this;if(o)return R.sanitize("function"==typeof o?o():o);if(!e)return t.noLayer;switch(i){case"disabled":return t.errorLayer;case"ready":case"loading":return t.loading;case"error":return t.errorData}return F(t.header,{title:R.sanitize(e.title),count:n,selected:l.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._shouldShowAttachmentsView?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._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some((e=>null!=e.attachmentsViewOptions.objectId)))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length)}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._shouldShowAttachmentsView;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)}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=>{!A(e)||p(e)||t.has(e)||(e.load(),t.add(e))},l=e=>{c(e)||"catalog-footprint"===e.type||(d(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):h(e)?(e.loadAll(),e.sublayers?.forEach(i),e.subtables?.forEach(i)):p(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(l),e.allTables.forEach(l),[...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 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 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 editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}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 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"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 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 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 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 relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}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 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 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:l}=this,{columnDescriptions:o,columnMenus:n,tooltips:s}=l,a=null!=e.objectId;if(t)return new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&l.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new _({columnDescriptions:o,columnMenus:n,tooltips:s,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new y({sortAscending:c,sortDescending:c})})}return a?new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})}):null}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}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)}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()}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:l}=this;return O("div",{bind:this,class:this.classes(U.base,I.widget)},O("calcite-panel",{bind:this,class:U.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===l&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,loading:"loading"===l,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?O("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError()),this._renderColumnVisibilityPopover(),this._renderPrompt())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(U.tableContainer);if(t.length){const l=this.classes(U.base,this.allRelatedTablesVisible?U.expanded:U.collapsed,this._shouldShowAttachmentsView?U.tableContainerWithAttachments:void 0);return O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[this._shouldShowGrid?O("div",{class:l},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map((e=>{const i=t.indexOf(e);return O("div",{class:l,key:`related-${i}`},e.render())})),,])))}return null!=this.attachmentsViewOptions.objectId?O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[O("div",{class:this.classes(U.base,U.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[O("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return O("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return O("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:B.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},O("span",{slot:"message"},e.errorOccured))}_renderPrompt(){return this.prompt?O(v,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:t}=this,i=F(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:i,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:t.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,t){const{messages:i,messagesCommon:l}=this,o=F(i.deleteAttachmentCount,{count:t.length});this.showPrompt({title:o,message:i.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,t,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:l,text:o,clickFunction:n}=e;if(!i)return O("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:l??void 0,key:o,onclick:()=>n(),slot:"header-menu-actions",text:o,textEnabled:!0,title:o})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:B.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:B.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:B.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:B.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:B.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:B.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:B.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(t).map((e=>e&&this._renderHeaderMenuAction(e)))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map((({disabled:e,hidden:t,icon:i,label:l,clickFunction:o})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:l,disabled:e,clickFunction:e=>o(e)})))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,l=this.messages.toggleColumns;return O("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),appearance:"transparent",bind:this,disabled:t.menuConfig?.disabled,icon:B.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:l},this._effectiveVisibleElements.tooltips?O("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},l):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return O("calcite-popover",{autoClose:!0,class:U.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},O("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map((t=>{const i=M(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:l,ignoreSelect:o}=e,{effectiveLabel:n,fieldName:s,hidden:a}=t;return O("calcite-list-item",{expanded:!(!l?.length||a)||void 0,key:`toggle-columns__item-${s}`,label:n,selected:!a,value:s,onCalciteListItemSelect:e=>{o&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},l)}_renderLayerDropdown(){const e=this.messages.selectALayer;return O("div",{class:U.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},O("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},O("calcite-action",{icon:B.layers,slot:"trigger",text:e,title:e}),O("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map(((e,t)=>this._renderLayerDropdownItem(e,t)))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return O("calcite-dropdown-item",{iconStart:i?V(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._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{editingEnabled:t,effectiveTable:i,paginationEnabled:l,pageSize:o,view:n,viewModel:s}=this,{layer:a,objectId:r,relatedLayer:c,relationshipId:d}=e;await a.load();const h=this.attachmentsEnabled&&S(a),p=new L({layer:a,attachmentsEnabled:h,editingEnabled:t,paginationEnabled:l,pageSize:o,relatedRecordsEnabled:!0,relationshipConfig:{objectId:r,relatedLayer:c,relationshipId:d},relationshipColumnConfigs:T(a,d),tableController:this,tableParent:i,view:n,showRelatedTableCallback:e=>s.emit("show-related-table",e)});this.relatedTables.add(p),this.scheduleRender()}_renderAttachmentsView(){const{attachmentInfos:e,mode:t,objectId:i}=this.attachmentsViewOptions;return"file"!==t&&e.length&&null!=i?this._renderAttachmentsViewList():this._renderAttachmentsViewFilePane()}_renderAttachmentsViewFilePane(){const{attachmentsViewOptions:e,isSyncingAttachments:t,supportsAddAttachments:i,messages:l,messagesUnits:o}=this,{attachmentId:n,attachmentInfos:a,candidates:r,objectId:c}=e,d=a.find((e=>e.id===n)),h=a.length,p=r?.length,m=d?O("calcite-label",{alignment:"center",key:"replace-file-node",scale:"l"},l.replaceFile):void 0,u=p?void 0:O("calcite-label",{alignment:"center",key:"message-node",scale:"m"},i?null==c?l.noFeature:l.dragAndDropToUpload:l.editingRestricted),g=Array.from(r??[]).pop(),b=g?O("calcite-label",{key:"filename-node"},g.name):void 0,w=i&&null!=c,v=w&&p,y=O("input",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,"data-node-ref":"_attachmentsInput",files:r,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),f=w?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:B.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value="",this._attachmentsInput.click())},width:"full"},l.selectFile):void 0,_=v?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:B.save,key:"save-node",loading:t,onclick:()=>{this.saveAttachmentsViewForm()},width:"full"},d?l.updateAttachment:l.addAttachment):void 0,M=h||p?O("calcite-button",{appearance:"transparent",bind:this,disabled:t,key:"cancel-node",onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value=""),e.reset(),e.attachmentInfos?.length&&(e.mode="list")},width:"full"},this.messagesCommon.cancel):void 0;return[O("div",{class:U.attachmentsView,key:"attachments-view"},O("div",{class:U.attachmentsViewContent,key:"attachments-view-content"},O("div",{bind:this,class:U.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},O("calcite-icon",{class:U.attachmentsViewIcon,icon:B.upload,scale:"l"}),m,u,O("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},O("fieldset",null,b,y,f,_,M)))),null!=c&&null!=d?O("div",{class:U.attachmentsViewInformation,key:"information"},this._renderAttachmentsViewThumbnail(d,200),O("label",{key:"file-label"},l.fileName),O("span",{key:"file-span"},d.name),O("label",{key:"size-label"},l.size),O("span",{key:"size-span"},s(o,d.size??0))):void 0)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:l,supportsDeleteAttachments:o,supportsUpdateAttachments:n}=this,{attachmentInfos:a,objectId:r}=e;return O("calcite-list",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,class:U.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${r}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:"multiple",onCalciteListChange:()=>this.scheduleRender()},...a?.map((t=>{const{id:a,name:c,size:d,url:h}=t,p=s(l,d??0);return O("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${a}`,label:c,value:a},this._renderAttachmentsViewListThumbnail(t),O("span",{class:U.attachmentsViewListFileSize,slot:"actions-end",title:p},p),O("calcite-action",{appearance:"transparent",icon:B.downloadTo,key:`download-attachment-${a}`,label:`${c}`,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(r??-1,a)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),n&&null!=r?O("calcite-action",{appearance:"transparent",disabled:!n,icon:B.replaceImage,key:`replace-attachment-${a}`,label:`${c}`,onclick:()=>{e.mode="file",e.attachmentId=a},slot:"actions-end",text:i.updateAttachment,title:i.updateAttachment}):void 0,O("calcite-action",{appearance:"transparent",icon:B.launch,key:`launch-attachment-${a}`,label:`${c}`,onclick:()=>{h&&window.open(h,"_blank")},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}),o&&null!=r?O("calcite-action",{appearance:"transparent",class:U.attachmentsViewListItemDelete,disabled:!o,icon:B.delete,key:`delete-attachment-${a}`,label:`${c}`,onclick:()=>{this.deleteAttachments(r,[a],!0)},slot:"actions-end",text:i.deleteAttachment,title:i.deleteAttachment}):void 0)})))}_renderAttachmentsViewListThumbnail(e){return O("div",{class:U.attachmentsViewListThumbnail,slot:"content-start"},O("a",{href:e.url??"",rel:"noreferrer",target:"_blank"},this._renderAttachmentsViewThumbnail(e)))}_renderAttachmentsViewThumbnail(e,t=64){const{contentType:i,name:l,size:o,url:n}=e,s=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${o}`;return this.supportsResizeAttachments&&g(i)?O("img",{alt:l,key:`thumbnail-image-${l}`,src:s,title:l}):O("calcite-icon",{icon:b(i),key:`thumbnail-icon-${l}`,scale:"l",textLabel:l,title:l})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&this.attachmentsViewOptions.set({mode:"file",candidates:e.dataTransfer?.files})}_renderNavigationBar(){const{effectiveTable:e,messages:t,messagesCommon:i,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:n,attachmentsViewOptions:s,layer:a,supportsAddAttachments:r,supportsDeleteAttachments:c}=e;if(!a)return;const{attachmentInfos:d,objectId:h}=s,p=null!=h,m=d.length,u=n?.selectedItems?.length??0,g=`${a.objectIdField}: ${h}`,b=F(t.selectedCount,{count:u}),w=F(t.attachmentsCount,{count:m}),v=p?O("calcite-action",{bind:this,icon:B.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(h),text:g,textEnabled:!0,title:g}):void 0,y=p?O("calcite-action",{icon:B.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:w,onclick:()=>{m>0&&(s.mode="list")},text:w,textEnabled:!0,title:w}):void 0,f=p?O("calcite-chip",{closable:!0,closed:0===u,key:"navigation-chip",kind:"inverse",label:b,selected:!0,title:b,value:"selected",onCalciteChipClose:()=>n?.selectedItems?.forEach((e=>e.selected=!1))},b):void 0,_=l?O("calcite-label",{layout:"inline"},t.showAllTables,O("calcite-switch",{checked:this.allRelatedTablesVisible,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,M=p&&"list"===s.mode&&null!=h&&u&&c?O("calcite-action",{icon:B.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(h,n?.selectedItems?.map((e=>e.value))??[],!0)},text:i.delete,textEnabled:!0,title:F(t.deleteAttachmentCount,{count:u})}):void 0,C=p&&"list"===s.mode&&r?O("calcite-action",{bind:this,icon:B.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{s.attachmentId=null,s.mode="file"},text:t.addAttachment,textEnabled:!0,title:t.addAttachment}):void 0;return O("div",{class:U.tableNavigation,key:"table-nav"},O("calcite-action",{icon:B.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{l&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},text:this.layer?.title??"",textEnabled:!1,title:l?t.exitRelatedRecords:t.exitAttachments}),o.toArray().map(((e,t)=>this._renderRelatedTableNavigationAction(e,t))),v,y,O("div",null,f,_,M,C))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return O("calcite-action",{icon:B.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),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([a()],H.prototype,"_attachmentsInput",void 0),e([a()],H.prototype,"_columnVisibilityActions",void 0),e([a()],H.prototype,"_effectiveDescription",null),e([a()],H.prototype,"_effectiveLayers",null),e([a()],H.prototype,"_effectiveTitle",null),e([a()],H.prototype,"_effectiveVisibleElements",null),e([a()],H.prototype,"_filteredTables",null),e([a()],H.prototype,"_hasAttachmentsViewError",null),e([a()],H.prototype,"_hasCustomMenuItems",null),e([a()],H.prototype,"_hasDefaultMenuItems",null),e([a()],H.prototype,"_shouldShowGrid",null),e([a()],H.prototype,"_shouldShowMenu",null),e([a()],H.prototype,"_shouldShowAttachmentsView",null),e([a()],H.prototype,"_showClearSelectionAction",null),e([a()],H.prototype,"_showColumnsVisibilityAction",null),e([a()],H.prototype,"_showDeleteSelectionAction",null),e([a()],H.prototype,"_showExportSelectionToCSVAction",null),e([a()],H.prototype,"_showLayerDropdown",null),e([a()],H.prototype,"_shouldShowNavigationBar",null),e([a()],H.prototype,"_showRefreshDataAction",null),e([a()],H.prototype,"_showSelectedRecordsShowSelectedAction",null),e([a()],H.prototype,"_showSelectedRecordsShowAllAction",null),e([a()],H.prototype,"_showZoomToSelectionAction",null),e([a()],H.prototype,"_viewLayers",null),e([a()],H.prototype,"attachmentsList",void 0),e([a({readOnly:!0})],H.prototype,"grid",null),e([a()],H.prototype,"actionColumn",null),e([a()],H.prototype,"actionColumnConfig",null),e([a({readOnly:!0})],H.prototype,"activeFilters",null),e([a({readOnly:!0})],H.prototype,"activeSortOrders",null),e([a()],H.prototype,"allColumns",null),e([a({readOnly:!0})],H.prototype,"allRelatedTablesVisible",null),e([a()],H.prototype,"allVisibleColumns",null),e([a()],H.prototype,"attachmentsEnabled",null),e([a()],H.prototype,"attachmentsViewOptions",null),e([a({type:m})],H.prototype,"attributeTableTemplate",null),e([a()],H.prototype,"autoRefreshEnabled",null),e([a()],H.prototype,"clearPrompt",null),e([a()],H.prototype,"columnPerformanceModeEnabled",null),e([a()],H.prototype,"columnReorderingEnabled",null),e([a({readOnly:!0})],H.prototype,"columns",null),e([a()],H.prototype,"definitionExpression",null),e([a()],H.prototype,"description",void 0),e([a()],H.prototype,"disabled",void 0),e([a()],H.prototype,"editingEnabled",null),e([a()],H.prototype,"effectiveSize",null),e([a()],H.prototype,"effectiveTable",null),e([a()],H.prototype,"filterGeometry",null),e([a()],H.prototype,"filterBySelectionEnabled",null),e([a()],H.prototype,"hiddenFields",null),e([a()],H.prototype,"highlightEnabled",null),e([a()],H.prototype,"highlightIds",null),e([a()],H.prototype,"icon",null),e([a()],H.prototype,"initialSize",null),e([a()],H.prototype,"isQueryingOrSyncing",null),e([a()],H.prototype,"isSyncingAttachments",null),e([a()],H.prototype,"label",null),e([a()],H.prototype,"layer",null),e([a()],H.prototype,"layers",null),e([a()],H.prototype,"layerView",null),e([a()],H.prototype,"maxSize",null),e([a(),D("esri/widgets/FeatureTable/t9n/FeatureTable")],H.prototype,"messages",null),e([a(),D("esri/t9n/common")],H.prototype,"messagesCommon",null),e([a(),D("esri/core/t9n/Units")],H.prototype,"messagesUnits",null),e([a(),D("esri/widgets/support/t9n/uriUtils")],H.prototype,"messagesURIUtils",null),e([a()],H.prototype,"menuConfig",void 0),e([a()],H.prototype,"multipleSelectionEnabled",null),e([a()],H.prototype,"multiSortEnabled",null),e([a()],H.prototype,"multipleSortPriority",null),e([a()],H.prototype,"noDataMessage",null),e([a()],H.prototype,"objectIds",null),e([a()],H.prototype,"outFields",null),e([a()],H.prototype,"pageCount",null),e([a()],H.prototype,"pageIndex",null),e([a()],H.prototype,"pageSize",null),e([a()],H.prototype,"paginationEnabled",null),e([a()],H.prototype,"prompt",null),e([a()],H.prototype,"relatedRecordsEnabled",null),e([a()],H.prototype,"relatedTable",null),e([a()],H.prototype,"relatedTables",null),e([a()],H.prototype,"relationship",null),e([a()],H.prototype,"relationshipColumnConfigs",null),e([a()],H.prototype,"relationshipConfig",null),e([a()],H.prototype,"relationshipInfos",null),e([a()],H.prototype,"returnGeometryEnabled",null),e([a()],H.prototype,"returnMEnabled",null),e([a()],H.prototype,"returnZEnabled",null),e([a()],H.prototype,"rowHighlightIds",null),e([a()],H.prototype,"selectionSource",null),e([a()],H.prototype,"showAllRelatedTables",null),e([a()],H.prototype,"showPrompt",null),e([a()],H.prototype,"showRelatedTableCallback",null),e([a()],H.prototype,"size",null),e([a({readOnly:!0})],H.prototype,"state",null),e([a()],H.prototype,"supportsAddAttachments",null),e([a()],H.prototype,"supportsAttachments",null),e([a()],H.prototype,"supportsDeleteAttachments",null),e([a()],H.prototype,"supportsResizeAttachments",null),e([a()],H.prototype,"supportsUpdateAttachments",null),e([a()],H.prototype,"syncTemplateOnChangesEnabled",null),e([a({constructOnly:!0})],H.prototype,"tableController",null),e([a({constructOnly:!0})],H.prototype,"tableParent",null),e([a()],H.prototype,"tableTemplate",null),e([a()],H.prototype,"tableTemplateOverride",null),e([a()],H.prototype,"title",void 0),e([a()],H.prototype,"timeExtent",null),e([a()],H.prototype,"timeZone",null),e([a()],H.prototype,"view",null),e([a({type:f}),P(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],H.prototype,"viewModel",void 0),e([a()],H.prototype,"visibleColumns",null),e([a({type:_,nonNullable:!0})],H.prototype,"visibleElements",void 0),e([a({type:_})],H.prototype,"visibleElementsOverride",null),H=L=e([r("esri.widgets.FeatureTable")],H);const N=H;export{N as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import r from"../../core/Logger.js";import{property as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{deprecatedModule as r}from"../../core/deprecate.js";import s from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";let o=class extends t{constructor(e){super(e),this._vendorInfo=null,this._fullscreenStyle="width: 100%; height: 100%;",this.view=null,this._errorHandler=this._errorHandler.bind(this),this._stateHandler=this._stateHandler.bind(this),e?.isDefaultViewModel||r(s.getLogger("esri.widgets.Fullscreen.FullscreenViewModel"),"esri.widgets.Fullscreen.FullscreenViewModel",{replacement:"Fullscreen API",version:"4.33",see:"https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API",warnOnce:!0})}normalizeCtorArgs(e={}){const{isDefaultViewModel:t,...r}=e;return r}destroy(){this._removeFullscreenListeners(),this.view=null}get element(){return this.view?.container??null}set element(e){this._override("element",e)}get state(){return this.element?this._isSupported()?this._isActive()?"active":"ready":"feature-unsupported":"disabled"}enter(){this._enterFullscreen()}exit(){this._exitFullscreen()}toggle(){this._isActive()?this._exitFullscreen():this._enterFullscreen()}_isSupported(){this._removeFullscreenListeners();const e=this._getVendorInfo(this.element);return this._addFullscreenListeners(e),this._vendorInfo=e,!!e}_isActive(){return!!this._vendorInfo&&!!document[this._vendorInfo.propertyName]}_stateHandler(){this.notifyChange("state"),"active"===this.state?this._addStyle():this._removeStyle()}_errorHandler(e){s.getLogger(this).error("fullscreen request failed",e)}_getVendorInfo(e){if(e)return e.requestFullscreen?{enterName:"requestFullscreen",exitName:"exitFullscreen",errorEventName:"fullscreenerror",changeEventName:"fullscreenchange",propertyName:"fullscreen"}:e.webkitRequestFullScreen?{enterName:"webkitRequestFullscreen",exitName:"webkitCancelFullScreen",errorEventName:"webkitfullscreenerror",changeEventName:"webkitfullscreenchange",propertyName:"webkitIsFullScreen"}:e.mozRequestFullScreen?{enterName:"mozRequestFullScreen",exitName:"mozCancelFullScreen",errorEventName:"mozfullscreenerror",changeEventName:"mozfullscreenchange",propertyName:"mozFullScreen"}:void 0}_enterFullscreen(){if("feature-unsupported"===this.state)return void s.getLogger(this).warn("The fullscreen API is not supported in this browser.");const{element:e}=this;e&&(this._vendorInfo&&e[this._vendorInfo.enterName].call(e),this.notifyChange("state"))}_addStyle(){const{element:e}=this;e&&e.setAttribute("style",this._fullscreenStyle)}_removeStyle(){const{element:e}=this;e&&e.removeAttribute("style")}_exitFullscreen(){if("feature-unsupported"===this.state)return;const{element:e}=this;e&&(this._vendorInfo&&document[this._vendorInfo.exitName].call(document),this.notifyChange("state"))}_addFullscreenListeners(e){e&&(document.addEventListener(e.changeEventName,this._stateHandler),document.addEventListener(e.errorEventName,this._errorHandler))}_removeFullscreenListeners(){const{_vendorInfo:e}=this;e&&(document.removeEventListener(e.changeEventName,this._stateHandler),document.removeEventListener(e.errorEventName,this._errorHandler))}};e([n()],o.prototype,"element",null),e([n({readOnly:!0})],o.prototype,"state",null),e([n()],o.prototype,"view",void 0),e([n()],o.prototype,"enter",null),e([n()],o.prototype,"exit",null),e([n()],o.prototype,"toggle",null),o=e([l("esri.widgets.Fullscreen.FullscreenViewModel")],o);const i=o;export{i as default};
|
package/widgets/Fullscreen.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import l from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as p}from"./support/decorators/messageBundle.js";import{tsx as a}from"./support/jsxFactory.js";const d={base:"esri-fullscreen"};let u=class extends i{constructor(e,o){super(e,o),this.messages=null,this.viewModel=new l,this._toggle=()=>{this.viewModel.toggle()},t(s.getLogger(this),"Fullscreen","arcgis-fullscreen",{version:"4.32"})}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get element(){return this.viewModel.element}set element(e){this.viewModel.element=e}get fullscreenTitle(){const e=this.viewModel?.state;return"active"===e?this.messages.exit:"ready"===e?this.messages.enter:""}get icon(){const e=this.viewModel?.state;return"ready"===e||"disabled"===e||"feature-unsupported"===e?"zoom-out-fixed":"zoom-in-fixed"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{fullscreenTitle:e,icon:t}=this,s=this.viewModel?.state,o="feature-unsupported"===s;return a("div",{class:this.classes(d.base,c.widget)},!o&&a("calcite-button",{class:c.widgetButton,disabled:"disabled"===s,iconStart:t,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([o()],u.prototype,"element",null),e([o({readOnly:!0})],u.prototype,"fullscreenTitle",null),e([o()],u.prototype,"icon",null),e([o()],u.prototype,"label",null),e([o(),p("esri/widgets/Fullscreen/t9n/Fullscreen")],u.prototype,"messages",void 0),e([o()],u.prototype,"view",null),e([o({type:l})],u.prototype,"viewModel",void 0),u=e([r("esri.widgets.Fullscreen")],u);const m=u;export{m as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import l from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as p}from"./support/decorators/messageBundle.js";import{tsx as a}from"./support/jsxFactory.js";const d={base:"esri-fullscreen"};let u=class extends i{constructor(e,o){super(e,o),this.messages=null,this.viewModel=new l({isDefaultViewModel:!0}),this._toggle=()=>{this.viewModel.toggle()},t(s.getLogger(this),"Fullscreen","arcgis-fullscreen",{version:"4.32"})}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get element(){return this.viewModel.element}set element(e){this.viewModel.element=e}get fullscreenTitle(){const e=this.viewModel?.state;return"active"===e?this.messages.exit:"ready"===e?this.messages.enter:""}get icon(){const e=this.viewModel?.state;return"ready"===e||"disabled"===e||"feature-unsupported"===e?"zoom-out-fixed":"zoom-in-fixed"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{fullscreenTitle:e,icon:t}=this,s=this.viewModel?.state,o="feature-unsupported"===s;return a("div",{class:this.classes(d.base,c.widget)},!o&&a("calcite-button",{class:c.widgetButton,disabled:"disabled"===s,iconStart:t,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([o()],u.prototype,"element",null),e([o({readOnly:!0})],u.prototype,"fullscreenTitle",null),e([o()],u.prototype,"icon",null),e([o()],u.prototype,"label",null),e([o(),p("esri/widgets/Fullscreen/t9n/Fullscreen")],u.prototype,"messages",void 0),e([o()],u.prototype,"view",null),e([o({type:l})],u.prototype,"viewModel",void 0),u=e([r("esri.widgets.Fullscreen")],u);const m=u;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as n,isCatalogSublayer as o}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as s,getActionStyles as a}from"../../support/actions/actionUtils.js";import l from"../Widget.js";import{getStatusIcon as r,listItemHasChildren as c,areChildrenHidden as d,canSortSublayers as p,getSingleAction as m,getItem as u,getVisibilityIcon as g}from"./support/layerListUtils.js";import{loadCalciteComponents as y}from"../support/componentsUtils.js";import{tsx as h}from"../support/jsxFactory.js";import{setFocus as b}from"../support/widgetUtils.js";import{substitute as v}from"../../intl/substitute.js";var _;let I=class extends l{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return y({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:a,parent:l,css:r}=this,c="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in a&&!i.visibleAtCurrentTimeExtent?`${t} (${a.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in a&&!i.visibleAtCurrentScale?`${t} (${a.layerInvisibleAtScale})`:t,d="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:p}=i,m="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return h("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":p?.id,dragDisabled:!i.sortable||d,expanded:"open"in i&&i.open,id:p?.uid,key:`list-item-${p?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:c,unavailable:m,value:p?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,l),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,a="connectionStatus"in e?e.connectionStatus:void 0,l=!!a;return h("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:l},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:l&&"connected"===a}),icon:r({connectionStatus:a,publishing:o}),key:"layer-item-status",scale:"s",slot:"content-end"})}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:o}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,a="temporaryTableIndicators"in t&&t.temporaryTableIndicators,l=o&&"persistenceEnabled"in o&&(n(o)||!o.persistenceEnabled);return(s||a)&&l?h("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:t,parent:i,messages:n,visibilityAppearance:o,css:s}=this;if(!("visible"in t&&"layerVisibility"in n&&"showLayer"in n&&"hideLayer"in n&&"visibleToggle"in s&&o))return null;const{visible:a}=t,l=this._getParentVisibilityMode(i);if("inherited"===l)return null;const r=g({visible:a,exclusive:"exclusive"===l,visibilityAppearance:o}),c="checkbox"===o,d=n.layerVisibility,p=v(a?n.hideLayer:n.showLayer,{layerName:e});return h("calcite-action",{appearance:"transparent",class:s.visibleToggle,icon:c?r:void 0,key:"visibility-toggle",label:p,onclick:()=>this._toggleVisibility(t,i),scale:"s",slot:c?"actions-start":"actions-end",text:d,title:p},c?null:h("calcite-icon",{class:this.classes({[s.visibleIcon]:"exclusive"!==l&&a}),icon:r,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:h("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return h("calcite-action",{active:t,appearance:"transparent",disabled:n,icon:s(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return h("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},h("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map((e=>h("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map((e=>this._renderAction({action:e,textEnabled:!0}))))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&o(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?h("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&o(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?h("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?h("calcite-action",{appearance:"transparent",disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>this._triggerOnCatalogOpen(t),scale:"s",slot:"actions-end",text:e}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const a=[...this.parentTitles??[],t.title],{children:l,layer:r}=t,m="catalog-dynamic-group"!==r?.type&&c(t),u=!n&&d(r),g="group"===r?.type,y=!u&&!m&&e&&g,b=!!e&&("childrenSortable"in t&&t.childrenSortable&&p(t));return m||y?h("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:b,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},l?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error))).toArray().map((e=>this._renderItem(e,t,a))),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?h("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},h("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),h("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?h("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},h("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},h("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?h("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},h("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},h("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:m(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map((e=>e.filter((e=>e.visible))))}get _actionsCount(){return this.item.actionsSections.reduce(((e,t)=>e+t.length),0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:a,title:l,type:r,indicator:c}=i;return h("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent","data-action-id":i.id,disabled:a,icon:s(i),indicator:c,key:`action-${i.uid}`,loading:o,onclick:()=>this._triggerAction(t,i),scale:"s",slot:n?void 0:"actions-end",text:l??"",textEnabled:n,title:l??void 0},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{className:i,icon:n}=e;if(n)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!i,[t.itemActionImage]:!!o};return i&&(s[i]=!0),o||i?h("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return h(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(b(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.open}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(u(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([t()],I.prototype,"activeItem",void 0),e([t()],I.prototype,"canMove",void 0),e([t()],I.prototype,"css",void 0),e([t()],I.prototype,"displayMode",void 0),e([t()],I.prototype,"dragEnabled",void 0),e([t()],I.prototype,"item",void 0),e([t()],I.prototype,"layerTablesEnabled",void 0),e([t()],I.prototype,"listModeDisabled",void 0),e([t()],I.prototype,"messages",void 0),e([t()],I.prototype,"messagesCommon",void 0),e([t()],I.prototype,"onAction",void 0),e([t()],I.prototype,"onPanelOpen",void 0),e([t()],I.prototype,"onCatalogOpen",void 0),e([t()],I.prototype,"onTablesOpen",void 0),e([t()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([t()],I.prototype,"onTooltipReferenceChange",void 0),e([t()],I.prototype,"parent",void 0),e([t()],I.prototype,"parentTitles",void 0),e([t()],I.prototype,"rootGroupUid",void 0),e([t()],I.prototype,"selectionMode",void 0),e([t()],I.prototype,"selectedItems",void 0),e([t()],I.prototype,"selectedDragItemLayerUid",void 0),e([t()],I.prototype,"visibleElements",void 0),e([t()],I.prototype,"visibilityAppearance",void 0),e([t()],I.prototype,"_title",null),e([t()],I.prototype,"_renderedItemStatus",null),e([t()],I.prototype,"_renderedItemTemporaryIcon",null),e([t()],I.prototype,"_renderedItemToggle",null),e([t()],I.prototype,"_renderedPanel",null),e([t()],I.prototype,"_renderedPanelAction",null),e([t()],I.prototype,"_renderedActions",null),e([t()],I.prototype,"_renderedActionMenu",null),e([t()],I.prototype,"_renderedActionMenuContent",null),e([t()],I.prototype,"_renderedCatalogFootprintIcon",null),e([t()],I.prototype,"_renderedCatalogDynamicIcon",null),e([t()],I.prototype,"_renderedCatalogSelectNode",null),e([t()],I.prototype,"_renderedChildList",null),e([t()],I.prototype,"_hasTables",null),e([t()],I.prototype,"_renderedTablesItem",null),e([t()],I.prototype,"_renderedItemMessage",null),e([t()],I.prototype,"_singleAction",null),e([t()],I.prototype,"_filteredSections",null),e([t()],I.prototype,"_actionsCount",null),I=_=e([i("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as n,isCatalogSublayer as o}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as s,getActionStyles as a}from"../../support/actions/actionUtils.js";import l from"../Widget.js";import{getStatusIcon as r,listItemHasChildren as c,areChildrenHidden as d,canSortSublayers as p,getSingleAction as m,getItem as u,getVisibilityIcon as g}from"./support/layerListUtils.js";import{loadCalciteComponents as y}from"../support/componentsUtils.js";import{tsx as h}from"../support/jsxFactory.js";import{setFocus as b}from"../support/widgetUtils.js";import{substitute as v}from"../../intl/substitute.js";var _;let I=class extends l{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return y({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:a,parent:l,css:r}=this,c="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in a&&!i.visibleAtCurrentTimeExtent?`${t} (${a.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in a&&!i.visibleAtCurrentScale?`${t} (${a.layerInvisibleAtScale})`:t,d="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:p}=i,m="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return h("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":p?.id,dragDisabled:!i.sortable||d,expanded:"open"in i&&i.open,id:p?.uid,key:`list-item-${p?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:c,unavailable:m,value:p?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,l),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,a="connectionStatus"in e?e.connectionStatus:void 0,l=!!a;return h("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:l},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:l&&"connected"===a}),icon:r({connectionStatus:a,publishing:o}),key:"layer-item-status",scale:"s",slot:"content-end"})}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:o}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,a="temporaryTableIndicators"in t&&t.temporaryTableIndicators,l=o&&"persistenceEnabled"in o&&(n(o)||!o.persistenceEnabled);return(s||a)&&l?h("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:t,parent:i,messages:n,visibilityAppearance:o,css:s}=this;if(!("visible"in t&&"layerVisibility"in n&&"showLayer"in n&&"hideLayer"in n&&"visibleToggle"in s&&o))return null;const{visible:a}=t,l=this._getParentVisibilityMode(i);if("inherited"===l)return null;const r=g({visible:a,exclusive:"exclusive"===l,visibilityAppearance:o}),c="checkbox"===o,d=n.layerVisibility,p=v(a?n.hideLayer:n.showLayer,{layerName:e});return h("calcite-action",{appearance:"transparent",class:s.visibleToggle,icon:c?r:void 0,key:"visibility-toggle",label:p,onclick:()=>this._toggleVisibility(t,i),scale:"s",slot:c?"actions-start":"actions-end",text:d,title:p},c?null:h("calcite-icon",{class:this.classes({[s.visibleIcon]:"exclusive"!==l&&a}),icon:r,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:h("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return h("calcite-action",{active:t,appearance:"transparent",disabled:n,icon:s(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),scale:"s",slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return h("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},h("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map((e=>h("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map((e=>this._renderAction({action:e,textEnabled:!0}))))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&o(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?h("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&o(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?h("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?h("calcite-action",{appearance:"transparent",disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>this._triggerOnCatalogOpen(t),scale:"s",slot:"actions-end",text:e}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const a=[...this.parentTitles??[],t.title],{children:l,layer:r}=t,m="catalog-dynamic-group"!==r?.type&&c(t),u=!n&&d(r),g="group"===r?.type,y=!u&&!m&&e&&g,b=!!e&&("childrenSortable"in t&&t.childrenSortable&&p(t));return m||y?h("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:b,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},l?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error))).toArray().map((e=>this._renderItem(e,t,a))),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?h("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},h("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),h("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?h("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},h("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},h("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?h("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},h("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},h("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:m(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map((e=>e.filter((e=>e.visible))))}get _actionsCount(){return this.item.actionsSections.reduce(((e,t)=>e+t.length),0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:a,title:l,type:r,indicator:c}=i;return h("calcite-action",{active:"toggle"===r&&i.value,appearance:"transparent","data-action-id":i.id,disabled:a,icon:s(i),indicator:c,key:`action-${i.uid}`,loading:o,onclick:()=>this._triggerAction(t,i),scale:"s",slot:n?void 0:"actions-end",text:l??"",textEnabled:n,title:l??void 0},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{icon:i}=e,n="className"in e?e.className:void 0;if(i)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!n,[t.itemActionImage]:!!o};return n&&(s[n]=!0),o||n?h("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return h(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(b(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.open}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(u(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([t()],I.prototype,"activeItem",void 0),e([t()],I.prototype,"canMove",void 0),e([t()],I.prototype,"css",void 0),e([t()],I.prototype,"displayMode",void 0),e([t()],I.prototype,"dragEnabled",void 0),e([t()],I.prototype,"item",void 0),e([t()],I.prototype,"layerTablesEnabled",void 0),e([t()],I.prototype,"listModeDisabled",void 0),e([t()],I.prototype,"messages",void 0),e([t()],I.prototype,"messagesCommon",void 0),e([t()],I.prototype,"onAction",void 0),e([t()],I.prototype,"onPanelOpen",void 0),e([t()],I.prototype,"onCatalogOpen",void 0),e([t()],I.prototype,"onTablesOpen",void 0),e([t()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([t()],I.prototype,"onTooltipReferenceChange",void 0),e([t()],I.prototype,"parent",void 0),e([t()],I.prototype,"parentTitles",void 0),e([t()],I.prototype,"rootGroupUid",void 0),e([t()],I.prototype,"selectionMode",void 0),e([t()],I.prototype,"selectedItems",void 0),e([t()],I.prototype,"selectedDragItemLayerUid",void 0),e([t()],I.prototype,"visibleElements",void 0),e([t()],I.prototype,"visibilityAppearance",void 0),e([t()],I.prototype,"_title",null),e([t()],I.prototype,"_renderedItemStatus",null),e([t()],I.prototype,"_renderedItemTemporaryIcon",null),e([t()],I.prototype,"_renderedItemToggle",null),e([t()],I.prototype,"_renderedPanel",null),e([t()],I.prototype,"_renderedPanelAction",null),e([t()],I.prototype,"_renderedActions",null),e([t()],I.prototype,"_renderedActionMenu",null),e([t()],I.prototype,"_renderedActionMenuContent",null),e([t()],I.prototype,"_renderedCatalogFootprintIcon",null),e([t()],I.prototype,"_renderedCatalogDynamicIcon",null),e([t()],I.prototype,"_renderedCatalogSelectNode",null),e([t()],I.prototype,"_renderedChildList",null),e([t()],I.prototype,"_hasTables",null),e([t()],I.prototype,"_renderedTablesItem",null),e([t()],I.prototype,"_renderedItemMessage",null),e([t()],I.prototype,"_singleAction",null),e([t()],I.prototype,"_filteredSections",null),e([t()],I.prototype,"_actionsCount",null),I=_=e([i("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Identifiable.js";import{destroyMaybe as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Identifiable.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as i,initial as r}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import l from"../Widget.js";import{isSublayer as d}from"./support/layerListUtils.js";import{isWidget as a}from"../support/widget.js";import{tsx as p}from"../support/jsxFactory.js";let g=class extends(t.IdentifiableMixin(l)){constructor(e,t){super(e,t),this._legend=null,this.content=null,this.flowEnabled=!1,this.image=null,this.listItem=null,this.open=!1,this.visible=!0}initialize(){this.addHandles([i((()=>this._canCreateLegend),(()=>this._createLegend()),r),i((()=>[this._legend,this._legendOptions]),(()=>this._updateLegend()),r)])}destroy(){this._legend=n(this._legend)}get _canCreateLegend(){const{content:e,listItem:t}=this;if(!t)return!1;const n="legend";return e===n||null!=e&&!!Array.isArray(e)&&e.includes(n)}get _legendOptions(){const{listItem:e,_legendLayerInfo:t}=this,n=e?.view;return t&&n?{view:n,layerInfos:[t]}:{}}get _legendLayerInfo(){const e=this.listItem?.layer;if(!e||"subtype-sublayer"===e.type)return null;const t=d(e)?e:null,n=e?.parent,i=null!=n&&"type"in n&&"map-image"===n.type?t?.source:null,r="";return i&&n?{layer:n,title:r,sublayerIds:[i.mapLayerId]}:{layer:e,title:r}}get disabled(){const{listItem:e,_legend:t,content:n}=this;return!e||!(Array.isArray(n)&&n.length>1)&&(!!t&&(!t.activeLayerInfos?.length||!e.visibleAtCurrentScale||!e.visible))}set disabled(e){this._overrideIfSome("disabled",e)}get icon(){const{image:e}=this,t=this._getFirstWidget();return this._get("icon")??(!e&&t?t.icon:null)}set icon(e){this._overrideIfSome("icon",e)}get title(){return this._get("title")||(this._getFirstWidget()?.label??"")}set title(e){this._override("title",e)}render(){return p("div",{class:"esri-list-item-panel"},this._renderContents())}_renderContent(e){const{_legend:t,disabled:n,open:i}=this;return e&&!n&&i?"legend"===e&&t?p("div",{key:"legend-widget"},t.render()):"string"==typeof e?p("div",{innerHTML:e,key:e}):a(e)?p("div",{key:"content-widget"},e.render()):e instanceof HTMLElement?p("div",{afterCreate:this._attachToNode,bind:e,key:"content-element"}):null:null}_renderContents(){const{content:e,open:t}=this;return t?Array.isArray(e)?e.map((e=>this._renderContent(e))):this._renderContent(e):null}async _createLegend(){if(n(this._legend),this._legend=null,!this._canCreateLegend)return;const{default:e}=await import("../Legend.js"),t=new e(this._legendOptions);this._legend=t}_attachToNode(e){e.appendChild(this)}_updateLegend(){const e=this._legend;e&&e.set(this._legendOptions)}_getWidget(e){return"legend"===e?this._legend:a(e)?e:null}_getFirstWidget(){const{content:e}=this;return Array.isArray(e)?e.map((e=>this._getWidget(e))).find((e=>e)):this._getWidget(e)}};e([s()],g.prototype,"_legend",void 0),e([s()],g.prototype,"_canCreateLegend",null),e([s()],g.prototype,"_legendOptions",null),e([s()],g.prototype,"_legendLayerInfo",null),e([s()],g.prototype,"content",void 0),e([s()],g.prototype,"disabled",null),e([s()],g.prototype,"flowEnabled",void 0),e([s()],g.prototype,"icon",null),e([s()],g.prototype,"image",void 0),e([s()],g.prototype,"listItem",void 0),e([s()],g.prototype,"open",void 0),e([s()],g.prototype,"title",null),e([s()],g.prototype,"visible",void 0),g=e([o("esri.widgets.LayerList.ListItemPanel")],g);const c=g;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import e from"../../core/Logger.js";import{when as a}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let n=class extends o{constructor(t){super(t),this._navigationMode="pan",this.view=null,t?.isDefaultViewModel||i(e.getLogger(this),"Navigation Toggle","navigation-toggle",{version:"4.33"})}normalizeCtorArgs(t={}){const{isDefaultViewModel:o,...i}=t;return i}initialize(){this.addHandles(a((()=>this.view?.navigation?.actionMap),(()=>this._updateNavigationActionMap())))}destroy(){this.view=null}get state(){return this.view?.ready&&"3d"===this.view?.type?"ready":"disabled"}get navigationMode(){return this._navigationMode}set navigationMode(t){this._navigationMode=t,this._updateNavigationActionMap()}toggle(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate")}_updateNavigationActionMap(){const t=this.view?.navigation?.actionMap;if(!t)return;const o="pan"===this._navigationMode;t.dragPrimary=o?"pan":"rotate",t.dragSecondary=o?"rotate":"pan"}};t([r({readOnly:!0})],n.prototype,"state",null),t([r()],n.prototype,"_navigationMode",void 0),t([r()],n.prototype,"view",void 0),n=t([s("esri.widgets.NavigationToggle.NavigationToggleViewModel")],n);const d=n;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import{
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{deprecateWidget as e}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import{css as a}from"./NavigationToggle/css.js";import l from"./NavigationToggle/NavigationToggleViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as g}from"./support/globalCss.js";import{setFocus as p}from"./support/widgetUtils.js";import{messageBundle as c}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";let u=class extends r{constructor(t,i){super(t,i),this.messages=null,this.viewModel=new l({isDefaultViewModel:!0}),this.toggle=()=>this.viewModel.toggle(),this._panButton=null,this._rotateButton=null,this._toggle=()=>{const t="pan"===this.viewModel?.navigationMode?this._rotateButton:this._panButton;p(t),this.toggle()},t?.isDefaultUI||e(o.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.32"})}normalizeCtorArgs(t={}){const{isDefaultUI:e,...o}=t;return o}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get icon(){return"move"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}set layout(t){"horizontal"!==t&&(t="vertical"),this._set("layout",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const t="disabled"===this.viewModel?.state,e="pan"===this.viewModel?.navigationMode,o=this.messages.toggle;return d("div",{class:this.classes(a.base,g.widget,{[a.isLayoutHorizontal]:"horizontal"===this.layout})},d("calcite-button",{afterCreate:t=>{this._panButton=t},appearance:e?"outline-fill":"solid",class:g.widgetButton,disabled:t,iconStart:"move",kind:"neutral",label:o,onclick:this._toggle,tabIndex:e?void 0:-1,title:o}),d("calcite-button",{afterCreate:t=>{this._rotateButton=t},appearance:e?"solid":"outline-fill",class:g.widgetButton,disabled:t,iconStart:"rotate",kind:"neutral",label:o,onclick:this._toggle,tabIndex:e?-1:void 0,title:o}))}};t([i()],u.prototype,"icon",null),t([i()],u.prototype,"label",null),t([i({value:"vertical"})],u.prototype,"layout",null),t([i(),c("esri/widgets/NavigationToggle/t9n/NavigationToggle")],u.prototype,"messages",void 0),t([i()],u.prototype,"view",null),t([i({type:l})],u.prototype,"viewModel",void 0),u=t([s("esri.widgets.NavigationToggle")],u);const m=u;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Identifiable.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"../Widget.js";import{isWidget as s}from"../support/widget.js";import{tsx as n}from"../support/jsxFactory.js";let l=class extends(e.IdentifiableMixin(r)){constructor(t,e){super(t,e),this.
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Identifiable.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"../Widget.js";import{isWidget as s}from"../support/widget.js";import{tsx as n}from"../support/jsxFactory.js";let l=class extends(e.IdentifiableMixin(r)){constructor(t,e){super(t,e),this.content=null,this.flowEnabled=!1,this.image=null,this.listItem=null,this.open=!1,this.visible=!0}get disabled(){return!(this.content&&this.listItem)}set disabled(t){this._overrideIfSome("disabled",t)}get icon(){const{image:t}=this,e=this._getFirstWidget();return this._get("icon")??(!t&&e?e.icon:null)}set icon(t){this._overrideIfSome("icon",t)}get title(){return this._get("title")||(this._getFirstWidget()?.label??"")}set title(t){this._override("title",t)}render(){return n("div",{class:"esri-list-item-panel"},this._renderContents())}_renderContent(t){const{disabled:e,open:i}=this;return t&&!e&&i?"string"==typeof t?n("div",{innerHTML:t,key:t}):s(t)?n("div",{key:"content-widget"},t.render()):t instanceof HTMLElement?n("div",{afterCreate:this._attachToNode,bind:t,key:"content-element"}):null:null}_renderContents(){const{content:t,open:e}=this;return e?Array.isArray(t)?t.map((t=>this._renderContent(t))):this._renderContent(t):null}_attachToNode(t){t.appendChild(this)}_getWidget(t){return s(t)?t:null}_getFirstWidget(){const{content:t}=this;return Array.isArray(t)?t.map((t=>this._getWidget(t))).find((t=>t)):this._getWidget(t)}};t([i()],l.prototype,"content",void 0),t([i()],l.prototype,"disabled",null),t([i()],l.prototype,"flowEnabled",void 0),t([i()],l.prototype,"icon",null),t([i()],l.prototype,"image",void 0),t([i()],l.prototype,"listItem",void 0),t([i()],l.prototype,"open",void 0),t([i()],l.prototype,"title",null),t([i()],l.prototype,"visible",void 0),l=t([o("esri.widgets.TableList.ListItemPanel")],l);const d=l;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import r from"../../core/Logger.js";import{watch as n,syncAndInitial as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as r}from"../../core/deprecate.js";import o from"../../core/Logger.js";import{watch as n,syncAndInitial as s}from"../../core/reactiveUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import l from"../../views/3d/environment/CloudyWeather.js";import h from"../../views/3d/environment/FoggyWeather.js";import p from"../../views/3d/environment/RainyWeather.js";import m from"../../views/3d/environment/SnowyWeather.js";import y from"../../views/3d/environment/SunnyWeather.js";import{validateWeatherType as u}from"../../views/3d/environment/weather.js";import{WeatherState as w,WeatherError as c}from"./enums.js";let d=class extends t{constructor(e){super(e),this.view=null,this._weatherByType={sunny:new y,cloudy:new l,rainy:new p,snowy:new m,foggy:new h},this._settingWeather=!1,e?.isDefaultViewModel||r(o.getLogger(this),"Weather","weather",{version:"4.33"})}normalizeCtorArgs(e={}){const{isDefaultViewModel:t,...r}=e;return r}initialize(){this.addHandles([n((()=>this.current),(e=>{this._settingWeather||null==e||(this._weatherByType={...this._weatherByType,[e.type]:e})}),s)])}get state(){const e=this.view;return null!=e&&e.ready?null!=this.error?this.error===c.NotVisible?w.Ready:w.Error:w.Ready:w.Disabled}get weatherByType(){return this._weatherByType}get error(){const e=this.view;return null!=e&&e.ready?"3d"!==e.type?c.UnsupportedView:"local"===e.viewingMode?c.LocalScene:e.environment.atmosphereEnabled?e.environment.weatherAvailable?null:c.NotVisible:c.NoAtmosphere:null}get current(){return this._environment?.weather??this._weatherByType.sunny}set current(e){const t=this._environment;t&&(t.weather=e)}get _environment(){const e=this.view;return null!=e&&"3d"===e.type?e.environment:null}setWeatherByType(e){if(!u(e,o.getLogger(this)))return;const t=this._environment;null!=t&&(this._settingWeather=!0,t.weather=this._weatherByType[e],this._settingWeather=!1)}setSnowCoverEnabled(e){const t=this.current;"snowCover"in t&&(t.snowCover=e?"enabled":"disabled")}};e([i()],d.prototype,"view",void 0),e([i()],d.prototype,"state",null),e([i()],d.prototype,"_weatherByType",void 0),e([i()],d.prototype,"weatherByType",null),e([i()],d.prototype,"error",null),e([i()],d.prototype,"current",null),e([i()],d.prototype,"_environment",null),d=e([a("esri.widgets.Weather.WeatherViewModel")],d);const v=d;export{v as default};
|
package/widgets/Weather.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as o}from"../core/deprecate.js";import t from"../core/Logger.js";import{memoize as r}from"../core/memoize.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{weatherTypesArray as i}from"../views/3d/environment/weather.js";import a from"./Widget.js";import{loadCalciteComponents as l}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{Heading as d}from"./support/Heading.js";import{classes as p}from"./support/widgetUtils.js";import{messageBundle as u}from"./support/decorators/messageBundle.js";import{tsx as h,tsxFragment as g}from"./support/jsxFactory.js";import{css as m}from"./Weather/css.js";import{WeatherState as v,WeatherError as y}from"./Weather/enums.js";import{LabeledSlider as b}from"./Weather/LabeledSlider.js";import w from"./Weather/VisibleElements.js";import C from"./Weather/WeatherViewModel.js";const f={sunny:"brightness",cloudy:"partly-cloudy",rainy:"rain",snowy:"snow",foggy:"fog"};let k=class extends a{constructor(e){super(e),this.viewModel=new C({isDefaultViewModel:!0}),this.headingLevel=4,this.visibleElements=new w,this._renderWeatherTypeButton=e=>{const o=this.viewModel,t=this.messages[e].label,r=o.state===v.Disabled,s=!r&&o.current.type===e;return h("calcite-button",{appearance:s?"solid":"outline","aria-checked":s?"true":"false",disabled:r,iconStart:f[e],key:`${e}-type-button`,kind:s?"brand":"neutral",label:t,onclick:()=>{s||o.setWeatherByType(e)},scale:"l",title:t})},this._memoizedCallbacks=r((e=>({onCloudCoverChange:o=>{"cloudCover"in e&&(e.cloudCover=o)},onPrecipitationChange:o=>{"precipitation"in e&&(e.precipitation=o)},onFogStrengthChange:o=>{"fogStrength"in e&&(e.fogStrength=o)},onSnowCoverChange:e=>{this.viewModel.setSnowCoverEnabled(e.currentTarget.checked)}}))),o(t.getLogger(this),"Weather","arcgis-weather",{version:"4.33"})}render(){const e=this.viewModel.state===v.Disabled;return h("div",{"aria-label":this.messages.widgetLabelAccessible,class:this.classes(m.base,c.widget,e&&c.widgetDisabled),role:"region"},this._renderContent())}loadDependencies(){return l({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}get view(){return this.viewModel?.view}set view(e){this.viewModel&&(this.viewModel.view=e)}get icon(){return"partly-cloudy"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get _errorMessage(){const e=this.messages.error;switch(this.viewModel.error){case y.LocalScene:return e.localScene;case y.NoAtmosphere:return e.noAtmosphere;case y.UnsupportedView:return e.unsupported;default:return null}}get _warningMessage(){if(this.viewModel.error===y.NotVisible){return null!=this.view&&"3d"===this.view?.type&&this.view.environment.atmosphereEnabled?this.messages.error.notVisible:null}return null}_renderContent(){const{headingLevel:e,messages:o,viewModel:t,visibleElements:r}=this,s=this._warningMessage,n=t.current,a=t.state===v.Error;return h(g,null,r.header?h(d,{level:e},o.widgetLabel):null,a?h("div",{class:m.error,key:"error"},this._errorMessage):null,h("div",{class:p({[m.content]:!0,[m.hasError]:a}),key:"content"},h("div",{"aria-label":o.weatherType,class:m.selector,key:"type-selector",role:"radiogroup"},i.map(this._renderWeatherTypeButton)),Object.values(t.weatherByType).map((e=>h("div",{class:p({[m.options]:!0,[m.optionsHidden]:e.type!==n?.type}),key:"options-container"},this._renderOptions(e)))),null!=s?this._renderWarning(s):null))}_renderOptions(e){const{viewModel:o,messages:t}=this,r=o.state===v.Disabled,s=this._memoizedCallbacks(e);switch(e.type){case"sunny":return h(b,{disabled:r,key:"sunny-cover",label:t.sunny.cloudCover,value:e.cloudCover,onChange:s.onCloudCoverChange});case"cloudy":return h(b,{disabled:r,key:"cloudy-cover",label:t.cloudy.cloudCover,value:e.cloudCover,onChange:s.onCloudCoverChange});case"rainy":return h(g,null,h(b,{disabled:r,key:"rainy-cover",label:t.rainy.cloudCover,value:e.cloudCover,onChange:s.onCloudCoverChange}),h(b,{disabled:r,key:"rainy-precipitation",label:t.rainy.precipitation,value:e.precipitation,onChange:s.onPrecipitationChange}));case"snowy":return h(g,null,h(b,{disabled:r,key:"snowy-cloud-cover",label:t.snowy.cloudCover,value:e.cloudCover,onChange:s.onCloudCoverChange}),h(b,{disabled:r,key:"snowy-precipitation",label:t.snowy.precipitation,value:e.precipitation,onChange:s.onPrecipitationChange}),h("calcite-label",{key:"snow-cover",layout:"inline",scale:"s",title:t.snowy.snowCoverTooltip},h("calcite-checkbox",{checked:"enabled"===e.snowCover,disabled:r,onCalciteCheckboxChange:s.onSnowCoverChange}),t.snowy.snowCover));case"foggy":return h(b,{disabled:r,key:"foggy-cover",label:t.foggy.fogStrength,value:e.fogStrength,onChange:s.onFogStrengthChange})}}_renderWarning(e){return h("div",{class:m.warning,key:"warning"},h("calcite-icon",{icon:"exclamation-mark-triangle",scale:"s"}),e)}};e([s()],k.prototype,"viewModel",void 0),e([s()],k.prototype,"view",null),e([s()],k.prototype,"headingLevel",void 0),e([s({type:w,nonNullable:!0})],k.prototype,"visibleElements",void 0),e([s()],k.prototype,"icon",null),e([s()],k.prototype,"label",null),e([s(),u("esri/widgets/Weather/t9n/Weather")],k.prototype,"messages",void 0),e([s()],k.prototype,"_errorMessage",null),e([s()],k.prototype,"_warningMessage",null),k=e([n("esri.widgets.Weather")],k);const j=k;export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,2470,3186],{10407:(e,t,r)=>{r.d(t,{It:()=>f,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>p,sQ:()=>d});var n=r(80586),i=r(16930),s=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,p.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?o(e,t):u(e,t)}async function d(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const p={CHARTS:"Charts",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function f(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},17311:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(69622),s=r(60999),o=r(5503),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let d=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new o.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:n}=t,i=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,i).global;return s({attributes:n,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,u.Kl)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const n=await e.queryFeatures(t);if(1===n?.features.length)return n.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,n._)([(0,a.MZ)()],d.prototype,"_featureUtils",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,n._)([(0,a.MZ)()],d.prototype,"displayField",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,a.MZ)()],d.prototype,"fieldsIndex",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"fieldInfoMap",null),(0,n._)([(0,a.MZ)()],d.prototype,"fields",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"objectIdField",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"requiredFields",null),d=(0,n._)([(0,l.$)("esri.layers.support.TitleCreator")],d);const p=d},32730:(e,t,r)=>{r.d(t,{BI:()=>y,D3:()=>h,XJ:()=>m,lc:()=>f,mX:()=>g,rU:()=>_,tH:()=>T});var n=r(799);const i="__begin__",s="__end__",o=new RegExp(i,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function y(e){const t=m(e);switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function _(e){const t=m(e);switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function g(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var n=r(90237),i=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const i=new a.A;return i.read(n,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,n){const s=e.find((e=>!!e.field));s&&(0,i.sM)(r,[s.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(90237),i=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),d=r(29005);let p=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,n._)([(0,a.w)("domains")],p.prototype,"readDomains",null),(0,n._)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,n._)([(0,o.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,n._)([(0,l.$)("esri.layers.support.FeatureType")],p);const f=p},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=r.e(4123).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function s(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var n=r(90237),i=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var n=r(34727),i=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(n));return t}(e);if(s&&((0,n.gg)(t,s[0])||(0,n.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=d(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>i});var n=r(49186);let i=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[i,s]=t.split("."),o=/^\s*\d+\s*$/;if(!i?.match||!o.test(i))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(i,10),l=parseInt(s,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>f,Gj:()=>y,QY:()=>p,lL:()=>_,xR:()=>h});var n=r(66131),i=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function f(e,t){return m.create(e,t,null,["$feature","$view"])}function h(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,n){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:n.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},d=s.compileScript(a,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const f=new o;return f.immutable=!1,f.setField("scale",0),new m(e,s,a,d,t,f,p,o)}constructor(e,t,r,n,i,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new y,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=s?null!=r?n.lY.epochToArcadeDate(s,r):n.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class y{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(_(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function _(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},60999:(e,t,r)=>{r.d(t,{DZ:()=>h,Ke:()=>f,Tj:()=>c,UT:()=>m,jJ:()=>u});var n=r(90237),i=r(69622),s=r(97768),o=r(74887),a=r(10107),l=r(40608);function u(e,t,r){return(0,o.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))}async function c(e,t,r){return(await(0,o.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return p(e)}}async function h(e){try{return d(await e)}catch(e){return(0,o.QP)(e),p(e)}}function m(e,t){return new y(e,t)}let y=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=p(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,n._)([(0,a.MZ)()],y.prototype,"value",null),(0,n._)([(0,a.MZ)()],y.prototype,"error",null),(0,n._)([(0,a.MZ)()],y.prototype,"finished",null),(0,n._)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n._)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y)},73681:(e,t,r)=>{r.d(t,{n:()=>l});var n=r(49186),i=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,h);return new l(h,c,f,m)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{tk:()=>d,BR:()=>c,wI:()=>u,Ov:()=>a,W_:()=>l,TU:()=>o,XX:()=>s});var n=r(70333),i=r(78888);r(5503),r(36563),r(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},91880:(e,t,r)=>{r.d(t,{A:()=>d});var n,i=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.A{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=n=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],c);const d=c},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))}}]);
|