@arcgis/map-components 6.0.0-next.22 → 6.0.0-next.23
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/dist/cdn/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
- package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
- package/dist/cdn/4N4XDCDQ.js +2 -0
- package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
- package/dist/cdn/{UFK7DHVC.js → 4WZ7Y57Q.js} +1 -1
- package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
- package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
- package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
- package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
- package/dist/cdn/6GGKA7MT.js +2 -0
- package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
- package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
- package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
- package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
- package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
- package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
- package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
- package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
- package/dist/cdn/EJVFK7JX.js +2 -0
- package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
- package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
- package/dist/cdn/GIQT67VT.js +2 -0
- package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
- package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
- package/dist/cdn/{GQQTIX2X.js → HQXC5XLE.js} +1 -1
- package/dist/cdn/HTONXZBP.js +2 -0
- package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
- package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
- package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
- package/dist/cdn/KXDLX4RE.js +2 -0
- package/dist/cdn/{4I6F64B2.js → LKKCTKMQ.js} +1 -1
- package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
- package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
- package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
- package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
- package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
- package/dist/cdn/{NHMHVWNB.js → QKNHYZYS.js} +1 -1
- package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
- package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
- package/dist/cdn/RFO3M46K.js +2 -0
- package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
- package/dist/cdn/SLWZHNVT.js +2 -0
- package/dist/cdn/{IQGL3AGV.js → TKIWKCDA.js} +1 -1
- package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
- package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
- package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
- package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
- package/dist/cdn/{FRX4ZT35.js → V3J5GQHD.js} +1 -1
- package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
- package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
- package/dist/cdn/{PFMWLSWQ.js → XWBR6FXI.js} +1 -1
- package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
- package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
- package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
- package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
- package/dist/cdn/{CNJSDHZI.js → ZF7NUFAT.js} +1 -1
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +155 -151
- package/dist/chunks/useViewModel.js +7 -7
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-sketch/customElement.js +1 -1
- package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
- package/dist/components/arcgis-swipe/customElement.js +45 -63
- package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-track/customElement.d.ts +12 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
- package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
- package/dist/components/arcgis-video-player/customElement.js +72 -72
- package/dist/components/arcgis-video-player/index.js +4 -4
- package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
- package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
- package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
- package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
- package/dist/components/arcgis-video-player-slider/index.js +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -20
- package/dist/loader.js +3 -4
- package/dist/types/lumina.d.ts +2 -23
- package/dist/types/preact.d.ts +2 -25
- package/dist/types/react.d.ts +2 -27
- package/dist/types/stencil.d.ts +2 -23
- package/package.json +6 -6
- package/dist/cdn/COSETVX4.js +0 -2
- package/dist/cdn/F74YQZ2X.js +0 -2
- package/dist/cdn/KXD4VEKE.js +0 -2
- package/dist/cdn/OJJSIN3V.js +0 -2
- package/dist/cdn/P3565WG3.js +0 -2
- package/dist/cdn/QAOT2TJ6.js +0 -2
- package/dist/cdn/QVJ2FUNW.js +0 -2
- package/dist/cdn/UI4IEVSV.js +0 -2
- package/dist/cdn/VEV3AAVP.js +0 -2
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
- package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
- package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
- package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
- package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
- package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
- /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as oe}from"./JB6WQEFJ.js";import g from"./DSIYRWN2.js";import{a as w}from"./LTFGTX7S.js";import"./FH3WFF5O.js";import{a as _}from"./6J3KSMFG.js";import f from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./QVJ2FUNW.js";import{a as ee}from"./REB4CHAK.js";import d from"./7ILT5PDJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{d as X,h as Y}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{b as Q}from"./LXME6MU5.js";import{E as N,F as H,O as q,P as k,Q as E,R as j,X as A,_ as J,a as K,b as v,e as O,x as U,z}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:de},pe,ge,{watch:y,on:ue,whenOnce:me},ve,{getOrCreateMapValue:ae,createReactiveMap:ye},be,{property:p,subclass:fe},{ignoreAbortErrors:T},Ce,we,,,,C,te,{f:Z},ie])=>{var Te=["bottom-end","bottom-start","bottom-left","bottom-right","top-end","top-start","top-left","top-right"],Se=new Set(Te);function se(i,e){let t=e;for(let o of i.split(".")){if(typeof t!="object"||t===null)return;t=Reflect.get(t,o)}return typeof t=="string"?t:void 0}var Ee=K`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px;-webkit-user-select:none;user-select:none;pointer-events:initial;padding:var(--calcite-space-sm);arcgis-sketch-tooltip-controls+arcgis-snapping-controls{border-block-start:1px solid var(--calcite-color-border-3)}}:host{pointer-events:none}.toolbar-container{block-size:100%;min-block-size:0;min-inline-size:0}arcgis-toolbar-stack[layout=vertical]{block-size:100cqh;min-block-size:100%;max-block-size:100%}`,_e={point:"pin",polyline:"line",polygon:"polygon",rectangle:"rectangle",circle:"circle",multipoint:"pins",mesh:"i3d-building",freehandPolygon:"freehand-area",freehandPolyline:"freehand",text:"text"},Me={selectionTools:{defaultPriority:w.Default,groupKind:"split-button",overflowLabel:"selection"},selectionSet:{defaultPriority:w.High,groupKind:"actions"},createTools:{defaultPriority:w.High,groupKind:"more-button",overflowLabel:"drawing"},undoRedo:{defaultPriority:w.Medium,groupKind:"split-button",overflowLabel:"action",preferEndSlot:!0},settings:{defaultPriority:w.Max,groupKind:"more-button",overflowLabel:"action",preferEndSlot:!0},geometrySimplification:{defaultPriority:w.Default,groupKind:"actions",preferEndSlot:!0}},ke=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,h=(i,e,t,o)=>{for(var s=o>1?void 0:o?Pe(e,t):e,r=i.length-1,d;r>=0;r--)(d=i[r])&&(s=(o?d(e,t,s):d(s))||s);return o&&s&&ke(e,t,s),s},c=class extends be{constructor(i){super(i),this._effectiveRenderStateCache=new Map,this._effectiveGeometrySimplificationInProgress=!1,this.visibleElements=new Ce,this.settingsPopoverOpen=!1,this.availableCreateTools=["point","polyline","freehandPolyline","polygon","freehandPolygon","rectangle","circle"]}initialize(){this.selectionViewModel??=new we({persistSelection:!1}),this.addHandles([y(()=>this.sketchViewModel,(i,e)=>{i!==e&&this._effectiveRenderStateCache.clear()},{sync:!0}),ie({getLoading:()=>this.sketchViewModel?.geometrySimplificationInProgress??!1,setEffectiveLoading:i=>{this._effectiveGeometrySimplificationInProgress=i}}),y(()=>this.view,i=>{this.selectionViewModel.view=i},{initial:!0,sync:!0}),y(()=>this.sketchViewModel?.layer,i=>this.selectionViewModel.sources=i?[i]:[],{initial:!0,sync:!0}),this.selectionViewModel.on("complete",({selection:i})=>{i.length&&this.update(i)}),y(()=>this.selectionViewModel.activeOperation,i=>{i&&(this.sketchViewModel?.cancel(),this._activeCustomToolOptions=void 0)},{sync:!0}),ue(()=>this.sketchViewModel,"create",i=>{i.state==="complete"&&this.sketchViewModel?.creationMode!=="continuous"&&(this._activeCustomToolOptions=void 0)}),y(()=>this.visibleElements.settingsMenu,i=>{i||(this.settingsPopoverOpen=!1)},{sync:!0})])}destroy(){this._pendingCommandAbortController?.abort(),this.selectionViewModel.destroy(),this.sketchViewModel=void 0}get _isEffectiveRenderStateFrozen(){let{sketchViewModel:i}=this;return!!(i?.toolTransitionInProgress||i?.geometrySimplificationInProgress)}_getEffectiveValue(i,e){if(!this._isEffectiveRenderStateFrozen||!this._effectiveRenderStateCache.has(i)){let t=e();return this._effectiveRenderStateCache.set(i,t),t}return this._effectiveRenderStateCache.get(i)}get _state(){return this.sketchViewModel?.state??"disabled"}get test(){return{activeCustomToolOptions:this._activeCustomToolOptions,activeSelectionTool:this._activeSelectionTool,selectionViewModel:this.selectionViewModel}}get _activeSelectionTool(){switch(this.selectionViewModel.activeOperation?.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";default:return}}get _activePluginUniqueIds(){let i=this.sketchViewModel?.activePluginConfigurations.filter(e=>!e.hidden).map(e=>e.uniqueId);return new Set(i??[])}get _createToolActions(){let{sketchViewModel:i}=this;if(!i)return[];let e=i.effectiveAvailablePlugins,t=this.state==="disabled",o=this.visibleElements.createTools,s=this.activeTool,r=this._activeCustomToolOptions,d=r||!i.firstPluginWithSwappableLeaf?this._customToolOptions:[],a=i.rootPlugins,l=d?.map(n=>({active:n===r,disabled:t,icon:n.icon,labelKey:n.label,onClick:n===r?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n.toolName,n.createOptions,n)}))??[];if(r&&a)return[...this._pluginsToActions(a),...l];if(e?.length&&this.view?.type!=="3d")return[...this._pluginsToActions(e),...l];let g=this.view?.type==="3d";return[...this.availableCreateTools?.filter(n=>g&&n==="multipoint"?!1:n==="mesh"?!0:o[n])?.map(n=>({active:n===s,disabled:t,icon:_e[n],labelKey:`draw.${n}`,onClick:n===s?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n)}))??[],...l]}get _shouldShowBackButton(){let i=this.sketchViewModel?.firstPluginWithSwappableLeaf,e=this.sketchViewModel?.rootPlugins,t=this._activeCustomToolOptions;return!!(this.sketchViewModel?.multiplePluginsActive&&i&&e&&!(e.length<2&&e.includes(i)&&!this.visibleElements.singlePluginBackButton)&&!t)}get _selectionToolActions(){return this._shouldShowBackButton?[{active:!1,disabled:this.state==="disabled",icon:"chevron-left",iconFlipRTL:!0,labelKey:"back",onClick:()=>this._cancelActiveOperation()}]:this._selectionCommands}get _settingsActions(){let i=this._customActions?.get("settings-before"),e=this._customActions?.get("settings-after"),t=this.visibleElements.settingsMenu,o=[];return!i?.length&&!e?.length&&!t||(i&&o.push(...this._customActionsToSketchActions(i)),t&&o.push({icon:"gear",active:this.settingsPopoverOpen,disabled:this.state==="disabled",labelKey:"settings.heading",tooltipKey:"settings.heading",refKey:"settings",onClick:()=>this.toggleSettingsPopover()}),e&&o.push(...this._customActionsToSketchActions(e))),o}get _activeTool(){let i=this.selectionViewModel.activeOperation;if(i)switch(i.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";case"default":return"custom-selection"}if(!this.sketchViewModel)return;let{availableCreateTools:e}=this,{activeTool:t,activeCreateToolDrawMode:o}=this.sketchViewModel;return t==="polygon"&&o==="freehand"&&e?.includes("freehandPolygon")?"freehandPolygon":t==="polyline"&&o==="freehand"&&e?.includes("freehandPolyline")?"freehandPolyline":t??void 0}get _selectionCommands(){let{state:i,visibleElements:e,_activeSelectionTool:t,_customActions:o}=this,s=this.state==="disabled",r=[];this.sketchViewModel?.updateOnGraphicClick!==!1&&r.push({active:i==="ready"&&this._activeSelectionTool==null,disabled:s,icon:"cursor",labelKey:"selectFeature",onClick:()=>this._activateDefaultSelectionTool()});let d=e.selectionTools;d["rectangle-selection"]&&r.push({active:t==="rectangle-selection",disabled:s,icon:"cursor-marquee",labelKey:"rectangleSelection",onClick:()=>this._activateSelectionTool("rectangle-selection")}),d["lasso-selection"]&&r.push({active:t==="lasso-selection",disabled:s,icon:"lasso-select",labelKey:"lassoSelection",onClick:()=>this._activateSelectionTool("lasso-selection")});let a=o?.get("selection-toolbar");return a&&r.push(...this._customActionsToSketchActions(a)),r}get _selectionSetActions(){let i=this.sketchViewModel?.updateGraphics.length??0;if(!i)return[];let e=this.state==="disabled",t=[],o=this._customActions?.get("before-selection-set"),s=this._customActions?.get("after-selection-set");return this.visibleElements.selectionCountLabel&&t.push({active:!1,appearance:"outline",disabled:e,icon:"selection-x",kind:"brand",labelKey:"deselectCount",labelParameters:{count:i},textEnabled:!0,renderAsAction:!0,onClick:()=>this._cancelSketchOperation()}),o&&t.push(...this._customActionsToSketchActions(o)),this.visibleElements.duplicateButton&&t.push({active:!1,disabled:e,icon:"copy",renderAsAction:!0,labelKey:i>1?"duplicateFeatures":"duplicateFeature",onClick:()=>this._duplicate()}),this.visibleElements.deleteButton&&t.push({active:!1,disabled:e,icon:"trash",kind:"danger",renderAsAction:!0,labelKey:i>1?"deleteFeatures":"deleteFeature",onClick:()=>this._delete()}),s&&t.push(...this._customActionsToSketchActions(s)),t}get _undoRedoActions(){return this.visibleElements.undoRedoMenu?[{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canUndo(),icon:"undo",labelKey:"undo",iconFlipRTL:!0,onClick:()=>this._undo()},{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canRedo(),icon:"redo",labelKey:"redo",iconFlipRTL:!0,onClick:()=>this._redo()}]:[]}get state(){return this._getEffectiveValue("state",()=>this._state)}get activeTool(){return this._getEffectiveValue("activeTool",()=>this._activeTool)}get activePluginIds(){return this._getEffectiveValue("activePluginId",()=>this._activePluginUniqueIds)}get groupedActions(){let i=this._getEffectiveValue("availableCommandGroups",()=>[["selectionTools",this._selectionToolActions],["createTools",this._createToolActions],["undoRedo",this._undoRedoActions],["settings",this._settingsActions],["selectionSet",this._selectionSetActions]].map(([t,o])=>({name:t,commands:o,visible:o.length>0}))),e=this._effectiveGeometrySimplificationInProgress?i.map(t=>({...t,commands:t.commands.map(o=>({...o,disabled:!0}))})):i;return!this.visibleElements.geometrySimplificationActivityIndicator||!this._effectiveGeometrySimplificationInProgress?e:[...e,{name:"geometrySimplification",commands:[{active:!1,appearance:"transparent",disabled:!0,kind:"warning",labelKey:"processing",loading:!0,onClick:()=>{},renderAsAction:!0}],visible:!0}]}async create(i,e){await this._executeWhenReady(async()=>{this.cancelAll();let t=this.sketchViewModel;t&&await T(t.create(i,e))})}async _executeWhenReady(i){this._pendingCommandAbortController?.abort();let e=new AbortController;this._pendingCommandAbortController=e;try{await T((async()=>{this.sketchViewModel?.geometrySimplificationInProgress&&await me(()=>!this.sketchViewModel?.geometrySimplificationInProgress,e.signal),e.signal.aborted||await i()})())}finally{this._pendingCommandAbortController===e&&(this._pendingCommandAbortController=void 0)}}toggleSettingsPopover(){this.settingsPopoverOpen=!this.settingsPopoverOpen}setCustomTools(i,e){this._customToolOptions=i??void 0;let t=this._activeCustomToolOptions;if(t){let o=this._customToolOptions?.find(s=>s.toolKey===t.toolKey);o?this._activeCustomToolOptions=o:this.cancelAll()}if(e?.length){let o=new Map;for(let s of e)ae(o,s.position,()=>[]).push(s);this._customActions=o}else this._customActions=void 0}cancelAll(){this._pendingCommandAbortController?.abort(),this._cancelSupportingOperations(),this.sketchViewModel?.cancel()}async update(i,e){await this._executeWhenReady(async()=>{let t=this.sketchViewModel;t&&await T(t.update(i,e))})}_activateDefaultSelectionTool(){this._executeWhenReady(()=>{this.cancelAll(),this.view?.focus()})}_cancelActiveOperation(){this._executeWhenReady(()=>this.cancelAll())}_cancelSketchOperation(){this._executeWhenReady(()=>this.sketchViewModel?.cancel())}_cancelSupportingOperations(){this.selectionViewModel.cancel(),this._activeCustomToolOptions=void 0}_activatePlugin(i){this._executeWhenReady(()=>{let e=this._activeCustomToolOptions!=null;this._cancelSupportingOperations();let t=this.sketchViewModel;if(t){if(e){t.cancel(),T(t.create(i));return}t.firstPluginWithSwappableLeaf?(t.replaceLeaf(i),this.view?.focus()):T(t.create(i))}})}_activateLegacyDrawTool(i,e,t){this._executeWhenReady(()=>{this._cancelSupportingOperations();let o=this.sketchViewModel;o&&(this._activeCustomToolOptions=t,T(o.create(i,e)))})}_activateSelectionTool(i){this._executeWhenReady(()=>{if(this._activeSelectionTool===i){this.selectionViewModel.cancel();return}this.cancelAll();let e={createTool:i==="lasso-selection"?"polygon":"rectangle",...i==="lasso-selection"?{mode:"hybrid",toolName:"lasso"}:{toolName:"rectangle"},type:"replace",selectOnComplete:!0};this.selectionViewModel.activate(e)&&this.view?.focus()})}_delete(){this._executeWhenReady(()=>this.sketchViewModel?.delete())}_duplicate(){this._executeWhenReady(()=>{this.sketchViewModel?.duplicate()})}_executeCustomAction(i){this._executeWhenReady(()=>i.onclick?.())}_redo(){this._executeWhenReady(()=>{this.sketchViewModel?.redo()})}_undo(){this._executeWhenReady(()=>{this.sketchViewModel?.undo()})}_customActionsToSketchActions(i){let e=this.state==="disabled";return i.map(t=>({active:t.active??!1,afterCreate:t.afterCreate,afterRemoved:t.afterRemoved,afterUpdate:t.afterUpdate,disabled:e||(t.disabled??!1),icon:t.icon,iconFlipRTL:t.flipRTL,id:t.id,labelKey:t.text,onClick:()=>this._executeCustomAction(t)}))}_pluginsToActions(i){let e=this.activePluginIds,t=this._activeCustomToolOptions,o=this.state==="disabled";return i.map(s=>({active:(e?.has(s.uniqueId)??!1)&&!t,icon:s.icon,disabled:o,labelKey:`digitizers.${s.localizationKey}`,onClick:()=>this._activatePlugin([s])}))}};h([p()],c.prototype,"_isEffectiveRenderStateFrozen",1);h([p()],c.prototype,"_effectiveGeometrySimplificationInProgress",2);h([p()],c.prototype,"_state",1);h([p()],c.prototype,"_customToolOptions",2);h([p()],c.prototype,"_activeCustomToolOptions",2);h([p()],c.prototype,"_customActions",2);h([p()],c.prototype,"selectionViewModel",2);h([p()],c.prototype,"_activeSelectionTool",1);h([p()],c.prototype,"_activePluginUniqueIds",1);h([p()],c.prototype,"_createToolActions",1);h([p()],c.prototype,"_shouldShowBackButton",1);h([p()],c.prototype,"_selectionToolActions",1);h([p()],c.prototype,"_settingsActions",1);h([p()],c.prototype,"_activeTool",1);h([p()],c.prototype,"_selectionCommands",1);h([p()],c.prototype,"_selectionSetActions",1);h([p()],c.prototype,"_undoRedoActions",1);h([p()],c.prototype,"sketchViewModel",2);h([p()],c.prototype,"visibleElements",2);h([p()],c.prototype,"view",2);h([p()],c.prototype,"settingsPopoverOpen",2);h([p()],c.prototype,"availableCreateTools",2);h([p()],c.prototype,"state",1);h([p()],c.prototype,"activeTool",1);h([p()],c.prototype,"activePluginIds",1);h([p()],c.prototype,"groupedActions",1);c=h([fe("components.sketch.SketchComponentViewModel")],c);var $=class extends q{#t;#e=!1;#i;constructor(e){if(super(e),e.type!==N.ELEMENT)throw new Error("nodeHooks() can only be used on elements")}render(e){return O}update(e,[t]){let o=e.element;if(!(o instanceof HTMLElement))throw new TypeError("nodeHooks() can only be used on HTMLElements");let s=this.#e?t.afterUpdate:t.afterCreate;return this.#t=o,this.#e=!0,this.#i=t,queueMicrotask(()=>{o.isConnected&&s?.(o)}),O}disconnected(){let e=this.#t,t=this.#i?.afterRemoved;!e||!t||queueMicrotask(()=>{e.isConnected||Z(()=>t(e),{timeout:16})})}},ne=H($),Le=new Set(["arcgis-map","arcgis-scene"]),Oe=8,R=class extends z{constructor(e){super(e),this.#t=new MutationObserver(()=>this.#c()),this.#e=new ResizeObserver(()=>this.#v()),this.#i=new ResizeObserver(([t])=>{if(!t)return;let o=this.component.layout==="horizontal"?t.contentRect.height:t.contentRect.width;o!==this.#s&&(this.#s=o,this.#v())}),this.#h=[],this.ref=t=>{this.#o!==t&&(this.#o=t,this.#a=void 0,this.#r=void 0,this.#c())},this.#g=()=>this.#c(),this.exports=void 0,this.onConnected(()=>this.#m()),this.onUpdated(()=>{this.#d!==this.component.layout&&this.#c()}),this.onDisconnected(()=>this.#f()),this.onLifecycle(()=>y(()=>this.component.view?.attributionHeight,()=>{this.#m()},{initial:!0}))}#t;#e;#i;#l;#s;#n;#h;#u;#o;#a;#r;#d;#p;#m(){queueMicrotask(()=>{this.component.el.isConnected&&this.#c()})}#c(){let e=this.#y();if(!e){this.#b(),this.#f();return}this.#C(e.toolbar),this.#w(e),this.#T(e),this.#v(e)}#y(){let e=this.component.el,t=e.parentElement,o=this.#o,s=e.assignedSlot;if(!t||!Le.has(t.localName)||!o||!s?.parentElement)return;let r=getComputedStyle(t).direction==="rtl"?"rtl":"ltr",d=re(e.slot,r);if(!d)return;let a=Array.from(t.children).filter(l=>l instanceof HTMLElement&&l.localName!=="arcgis-sketch");return{assignedSlot:s,content:a,direction:r,parent:t,position:d,toolbar:o}}#g;#C(e){this.#d!==this.component.layout&&(this.#s=void 0,this.#d=this.component.layout),this.#l!==e&&(this.#i.disconnect(),this.#l=e,this.#s=void 0,this.#i.observe(e))}#w(e){let t=e.assignedSlot;this.#n!==t&&(this.#n?.removeEventListener("slotchange",this.#g),this.#n=t,t.addEventListener("slotchange",this.#g)),this.#u!==e.parent&&(this.#t.disconnect(),this.#p?.(),this.#u=e.parent,this.#p=Q(e.parent,["dir"],()=>{this.#m()}),this.#t.observe(e.parent,{childList:!0,subtree:!1}))}#T(e){let t=[e.parent,...e.content];$e(this.#h,t)||(this.#e.disconnect(),t.forEach(o=>this.#e.observe(o)),this.#h=t)}#v(e=this.#y()){if(!e){this.#b();return}let t=this.component.layout,o=Ae({content:Ge(e),gap:Oe,layout:t,position:e.position,sameSlotReserve:Re(e.assignedSlot,this.component.el,t,e.assignedSlot.parentElement),toolbarBounds:e.toolbar.getBoundingClientRect(),viewBounds:e.parent.getBoundingClientRect()});this.#S(e.toolbar,t,o)}#S(e,t,o){o===this.#a&&t===this.#r||(this.#a=o,this.#r=t,e.style.setProperty("--arcgis-internal-toolbar-available-length",`${o}px`),t==="horizontal"?(e.style.height="",e.style.maxHeight="",e.style.maxWidth=`${o}px`,e.style.width="fit-content"):(e.style.height="fit-content",e.style.maxHeight=`${o}px`,e.style.maxWidth="",e.style.width=""))}#b(){this.#o&&(this.#o.style.maxHeight="",this.#o.style.maxWidth="",this.#o.style.height="",this.#o.style.width="",this.#o.style.removeProperty("--arcgis-internal-toolbar-available-length"),this.#a=void 0,this.#r=void 0)}#f(){this.#t.disconnect(),this.#p?.(),this.#p=void 0,this.#e.disconnect(),this.#i.disconnect(),this.#l=void 0,this.#s=void 0,this.#h=[],this.#n?.removeEventListener("slotchange",this.#g),this.#n=void 0,this.#a=void 0,this.#r=void 0,this.#d=void 0,this.#u=void 0}};function Ae({content:i,gap:e,layout:t,position:o,sameSlotReserve:s,toolbarBounds:r,viewBounds:d}){let a=G(d,t),l=G(r,t),g=le(o,t),n=g?l.start-a.start:a.end-l.end,u=0,m=!1;for(let S of i){if(le(S.position,t)===g)continue;let f=G(S.bounds,t);if(!(f.crossStart<l.crossEnd&&f.crossEnd>l.crossStart))continue;let M=g?a.end-f.start:f.end-a.start;u=Math.max(u,M),m=!0}let b=m?e:0;return Math.max(0,a.length-Math.max(0,n)-s-u-b)}function G(i,e){return e==="horizontal"?{start:i.left,end:i.right,length:i.width,crossStart:i.top,crossEnd:i.bottom}:{start:i.top,end:i.bottom,length:i.height,crossStart:i.left,crossEnd:i.right}}function le(i,e){return e==="horizontal"?i.endsWith("left"):i.startsWith("top")}function Ge(i){return i.content.flatMap(e=>{if(e.assignedSlot===i.assignedSlot)return[];let t=re(e.slot,i.direction);return t?[{bounds:e.getBoundingClientRect(),position:t}]:[]})}function $e(i,e){return i.length===e.length&&i.every((t,o)=>t===e[o])}function Re(i,e,t,o){let s=getComputedStyle(o).flexDirection;if(!(t==="horizontal"?s.startsWith("row"):s.startsWith("column")))return 0;let r=i.assignedElements().filter(g=>g instanceof HTMLElement),d=r.indexOf(e);if(d<0)return 0;let a=getComputedStyle(e),l=s==="row"?Number.parseFloat(a.marginRight):s==="row-reverse"?Number.parseFloat(a.marginLeft):s==="column"?Number.parseFloat(a.marginBottom):Number.parseFloat(a.marginTop);return r.slice(d+1).reduce((g,n)=>{let u=n.getBoundingClientRect(),m=getComputedStyle(n),b=t==="horizontal"?u.width+Number.parseFloat(m.marginLeft)+Number.parseFloat(m.marginRight):u.height+Number.parseFloat(m.marginTop)+Number.parseFloat(m.marginBottom);return g+b},l)}function re(i,e){let[t,o]=i.split("-");if(t!=="bottom"&&t!=="top")return;let s=o==="start"?e==="ltr"?"left":"right":o==="end"?e==="ltr"?"right":"left":o;return s==="left"||s==="right"?`${t}-${s}`:void 0}var xe=te(i=>new ve({...i,cancelUpdateOnClickAway:!0,creationMode:"continuous",textSymbol:new ge({text:"hello world"}),useLegacyCreateTools:!1})),x=class extends j{constructor(){super(),this.#t=new c,this.#l=k(),this.#s=new R(this),this.#n=k(),this._defaultGraphicsLayer=null,this._messages=ee(),this.test={componentViewModel:this.#t},this._groupLayoutPriorityOverrides=new Map,this._contextualToolLocation="separate",this._refMap=ye(),this.viewModel=xe(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.createGraphic=this.viewModel.createGraphic,this.creationMode=this.viewModel.creationMode,this.defaultCreateOptions=this.viewModel.defaultCreateOptions,this.defaultGraphicsLayerDisabled=!1,this.defaultUpdateOptions=this.viewModel.defaultUpdateOptions,this.geometrySimplificationInProgress=this.viewModel.geometrySimplificationInProgress,this.icon="pencil",this.label=this._messages?.componentLabel,this.labelOptions=this.viewModel.labelOptions,this.layer=this.viewModel.layer,this.layout="horizontal",this.pointSymbol=this.viewModel.pointSymbol,this.polygonSymbol=this.viewModel.polygonSymbol,this.polylineSymbol=this.viewModel.polylineSymbol,this.activeFillSymbol=this.viewModel.activeFillSymbol,this.activeLineSymbol=this.viewModel.activeLineSymbol,this.activeVertexSymbol=this.viewModel.activeVertexSymbol,this.activeCreateToolDrawMode=this.viewModel.activeCreateToolDrawMode,this.visualScale="m",this.snappingOptions=this.viewModel.snappingOptions,this.textSymbol=this.viewModel.textSymbol,this.toolbarKind="floating",this.tooltipOptions=this.viewModel.tooltipOptions,this.useViewOptions=this.viewModel.useViewOptions,this.valueOptions=this.viewModel.valueOptions,this.useLegacyCreateTools=this.viewModel.useLegacyCreateTools,this.updateOnGraphicClickDisabled=this.viewModel.updateOnGraphicClick,this.updateGraphics=this.viewModel.updateGraphics,this.activeTooltip=this.viewModel.activeTooltip,this.arcgisCreate=C(()=>this.viewModel,"create"),this.arcgisDelete=C(()=>this.viewModel,"delete"),this.arcgisDuplicate=C(()=>this.viewModel,"duplicate"),this.arcgisPropertyChange=Y()("activeTool","geometrySimplificationInProgress","state"),this.arcgisReady=U(),this.arcgisRedo=C(()=>this.viewModel,"redo"),this.arcgisUndo=C(()=>this.viewModel,"undo"),this.arcgisUpdate=C(()=>this.viewModel,"update"),X(["slot"],()=>{this.requestUpdate()}),this.manager.onLifecycle(()=>[y(()=>this.el.view?.map,(e,t)=>{let o=this._defaultGraphicsLayer;o&&(t?.allLayers.includes(o)&&t.remove(o),o&&!e?.allLayers.includes(o)&&e?.add(o))}),y(()=>this.el.view,e=>{this.viewModel.view=e,this.#t.view=e??void 0},{initial:!0}),y(()=>this.viewModel,e=>{this.#t.sketchViewModel=e,this.viewModel.pluginManager.sketch=this},{initial:!0}),y(()=>this.#t.state,(e,t)=>{this.requestUpdate("state",t)},{initial:!0}),y(()=>this.#t.activeTool,()=>this.arcgisPropertyChange.emit({name:"activeTool"}),{sync:!0})]),this.manager.onDestroy(()=>{this._defaultGraphicsLayer&&this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.el.view?.map?.remove(this._defaultGraphicsLayer),this._defaultGraphicsLayer?.destroy(),this._defaultGraphicsLayer=null,this.#t.destroy()})}static{this.properties={_groupLayoutPriorityOverrides:16,_contextualToolLocation:16,_refMap:16,viewModel:0,view:0,activeTool:32,autoDestroyDisabled:5,visibleElements:0,availableCreateTools:0,createGraphic:32,creationMode:1,defaultCreateOptions:0,defaultGraphicsLayerDisabled:5,defaultUpdateOptions:0,geometrySimplificationInProgress:36,hideCreateToolsCircle:5,hideCreateToolsMultipoint:5,hideCreateToolsPoint:5,hideCreateToolsPolygon:5,hideCreateToolsPolyline:5,hideCreateToolsRectangle:5,hideDuplicateButton:5,hideDeleteButton:5,hideSelectionCountLabel:5,hideLabelsToggle:5,hideSelectionToolsLassoSelection:5,hideSelectionToolsRectangleSelection:5,hideSettingsMenu:5,hideSinglePluginBackButton:5,hideSnappingControls:5,hideSnappingControlsElementsEnabledToggle:5,hideSnappingControlsElementsFeatureEnabledToggle:5,hideSnappingControlsElementsLayerList:5,hideSnappingControlsElementsSelfEnabledToggle:5,hideSnappingControlsElementsGridEnabledToggle:5,hideSnappingControlsElementsGridControls:5,hideSnappingControlsElementsGridControlsElementsColorSelection:5,hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle:5,hideSnappingControlsElementsGridControlsElementsLineIntervalInput:5,hideSnappingControlsElementsGridControlsElementsNumericInputs:5,hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning:5,hideSnappingControlsElementsGridControlsElementsPlacementButtons:5,hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle:5,hideTooltipsToggle:5,hideUndoRedoMenu:5,icon:1,label:1,labelOptions:0,layer:0,layout:1,pointSymbol:0,polygonSymbol:0,polylineSymbol:0,activeFillSymbol:0,activeLineSymbol:0,activeVertexSymbol:0,activeCreateToolDrawMode:1,referenceElement:1,relativePosition:1,scale:1,visualScale:1,showSnappingControlsElementsHeader:5,showCreateToolsFreehandPolygon:5,showCreateToolsFreehandPolyline:5,showCreateToolsText:5,hideGeometrySimplificationActivityIndicator:5,snappingOptions:0,state:32,textSymbol:0,toolbarKind:1,tooltipOptions:0,useViewOptions:5,valueOptions:0,useLegacyCreateTools:5,updateOnGraphicClickDisabled:5,cancelUpdateOnClickAwayDisabled:5,updateGraphics:32,activeTooltip:0}}static{this.styles=Ee}#t;get#e(){return this.#t.visibleElements}#i;#l;#s;#n;get activeTool(){return this.#t.activeTool}get visibleElements(){return this.#t.visibleElements}set visibleElements(e){this.#t.visibleElements=e}get availableCreateTools(){return this.#t.availableCreateTools}set availableCreateTools(e){this.#t.availableCreateTools=e}get hideCreateToolsCircle(){return!this.#e.createTools.circle}set hideCreateToolsCircle(e){this.#e.createTools.circle=!e}get hideCreateToolsMultipoint(){return!this.#e.createTools.multipoint}set hideCreateToolsMultipoint(e){this.#e.createTools.multipoint=!e}get hideCreateToolsPoint(){return!this.#e.createTools.point}set hideCreateToolsPoint(e){this.#e.createTools.point=!e}get hideCreateToolsPolygon(){return!this.#e.createTools.polygon}set hideCreateToolsPolygon(e){this.#e.createTools.polygon=!e}get hideCreateToolsPolyline(){return!this.#e.createTools.polyline}set hideCreateToolsPolyline(e){this.#e.createTools.polyline=!e}get hideCreateToolsRectangle(){return!this.#e.createTools.rectangle}set hideCreateToolsRectangle(e){this.#e.createTools.rectangle=!e}get hideDuplicateButton(){return!this.#e.duplicateButton}set hideDuplicateButton(e){this.#e.duplicateButton=!e}get hideDeleteButton(){return!this.#e.deleteButton}set hideDeleteButton(e){this.#e.deleteButton=!e}get hideSelectionCountLabel(){return!this.#e.selectionCountLabel}set hideSelectionCountLabel(e){this.#e.selectionCountLabel=!e}get hideLabelsToggle(){return!this.#e.labelsToggle}set hideLabelsToggle(e){this.#e.labelsToggle=!e}get hideSelectionToolsLassoSelection(){return!this.#e.selectionTools["lasso-selection"]}set hideSelectionToolsLassoSelection(e){this.#e.selectionTools["lasso-selection"]=!e}get hideSelectionToolsRectangleSelection(){return!this.#e.selectionTools["rectangle-selection"]}set hideSelectionToolsRectangleSelection(e){this.#e.selectionTools["rectangle-selection"]=!e}get hideSettingsMenu(){return!this.#e.settingsMenu}set hideSettingsMenu(e){this.#e.settingsMenu=!e}get hideSinglePluginBackButton(){return!this.#e.singlePluginBackButton}set hideSinglePluginBackButton(e){this.#e.singlePluginBackButton=!e}get hideSnappingControls(){return!this.#e.snappingControls}set hideSnappingControls(e){this.#e.snappingControls=!e}get hideSnappingControlsElementsEnabledToggle(){return!this.#e.snappingControlsElements.enabledToggle}set hideSnappingControlsElementsEnabledToggle(e){this.#e.snappingControlsElements.enabledToggle=!e}get hideSnappingControlsElementsFeatureEnabledToggle(){return!this.#e.snappingControlsElements.featureEnabledToggle}set hideSnappingControlsElementsFeatureEnabledToggle(e){this.#e.snappingControlsElements.featureEnabledToggle=!e}get hideSnappingControlsElementsLayerList(){return!this.#e.snappingControlsElements.layerList}set hideSnappingControlsElementsLayerList(e){this.#e.snappingControlsElements.layerList=!e}get hideSnappingControlsElementsSelfEnabledToggle(){return!this.#e.snappingControlsElements.selfEnabledToggle}set hideSnappingControlsElementsSelfEnabledToggle(e){this.#e.snappingControlsElements.selfEnabledToggle=!e}get hideSnappingControlsElementsGridEnabledToggle(){return!this.#e.snappingControlsElements.gridEnabledToggle}set hideSnappingControlsElementsGridEnabledToggle(e){this.#e.snappingControlsElements.gridEnabledToggle=!e}get hideSnappingControlsElementsGridControls(){return!this.#e.snappingControlsElements.gridControls}set hideSnappingControlsElementsGridControls(e){this.#e.snappingControlsElements.gridControls=!e}get hideSnappingControlsElementsGridControlsElementsColorSelection(){return!this.#e.snappingControlsElements.gridControlsElements.colorSelection}set hideSnappingControlsElementsGridControlsElementsColorSelection(e){this.#e.snappingControlsElements.gridControlsElements.colorSelection=!e}get hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(){return!this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle}set hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(e){this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle=!e}get hideSnappingControlsElementsGridControlsElementsLineIntervalInput(){return!this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput}set hideSnappingControlsElementsGridControlsElementsLineIntervalInput(e){this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput=!e}get hideSnappingControlsElementsGridControlsElementsNumericInputs(){return!this.#e.snappingControlsElements.gridControlsElements.numericInputs}set hideSnappingControlsElementsGridControlsElementsNumericInputs(e){this.#e.snappingControlsElements.gridControlsElements.numericInputs=!e}get hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(){return!this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning}set hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(e){this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning=!e}get hideSnappingControlsElementsGridControlsElementsPlacementButtons(){return!this.#e.snappingControlsElements.gridControlsElements.placementButtons}set hideSnappingControlsElementsGridControlsElementsPlacementButtons(e){this.#e.snappingControlsElements.gridControlsElements.placementButtons=!e}get hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(){return!this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle}set hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(e){this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle=!e}get hideTooltipsToggle(){return!this.#e.tooltipsToggle}set hideTooltipsToggle(e){this.#e.tooltipsToggle=!e}get hideUndoRedoMenu(){return!this.#e.undoRedoMenu}set hideUndoRedoMenu(e){this.#e.undoRedoMenu=!e}get relativePosition(){let e=this.el.slot;return this.#i??(Se.has(e)?e:oe.topRight)}set relativePosition(e){this.#i=e}get scale(){return this.visualScale}set scale(e){this.visualScale=e}get showSnappingControlsElementsHeader(){return this.#e.snappingControlsElements.header}set showSnappingControlsElementsHeader(e){this.#e.snappingControlsElements.header=e}get showCreateToolsFreehandPolygon(){return this.#e.createTools.freehandPolygon}set showCreateToolsFreehandPolygon(e){this.#e.createTools.freehandPolygon=e}get showCreateToolsFreehandPolyline(){return this.#e.createTools.freehandPolyline}set showCreateToolsFreehandPolyline(e){this.#e.createTools.freehandPolyline=e}get showCreateToolsText(){return this.#e.createTools.text}set showCreateToolsText(e){this.#e.createTools.text=e}get hideGeometrySimplificationActivityIndicator(){return!this.#e.geometrySimplificationActivityIndicator}set hideGeometrySimplificationActivityIndicator(e){this.#e.geometrySimplificationActivityIndicator=!e}get state(){return this.#t.state}get cancelUpdateOnClickAwayDisabled(){return!this.viewModel.cancelUpdateOnClickAway}set cancelUpdateOnClickAwayDisabled(e){this.viewModel.cancelUpdateOnClickAway=!e}async addGraphic(e){this.viewModel.addGraphic(e)}async addGraphics(e){this.viewModel.addGraphics(e)}async cancel(){this.#t.cancelAll()}async complete(){this.viewModel.complete()}async create(e,t){await this.#t.create(e,t)}async delete(){this.viewModel.delete()}async destroy(){await this.manager.destroy()}async dismissFloatingElements(){this.#t.settingsPopoverOpen=!1}async duplicate(){this.viewModel.duplicate()}async hasGraphic(e){return this.viewModel.hasGraphic(e)}async removeAllGraphics(){this.viewModel.removeAllGraphics()}async removeGraphic(e){this.viewModel.removeGraphic(e)}async removeGraphics(e){this.viewModel.removeGraphics(e)}async redo(){this.viewModel.redo()}async canRedo(){return this.viewModel.canRedo()}async setContextualToolLocation(e){this._contextualToolLocation=e}async setCustomTools(e,t){this.#t.setCustomTools(e,t)}async setGroupCollapsePriorities(e){this._groupLayoutPriorityOverrides=e||new Map}async triggerUpdate(e,t){await this.#t.update(e,t)}async place(e){this.viewModel.place(e)}async undo(){this.#t.sketchViewModel?.undo()}async canUndo(){return this.viewModel.canUndo()}connectedCallback(){super.connectedCallback(),this.defaultGraphicsLayerDisabled||(this._defaultGraphicsLayer?.destroyed&&(this._defaultGraphicsLayer=null),this._defaultGraphicsLayer??=new pe({title:"Sketch Layer"}),this.layer=this._defaultGraphicsLayer,this.view?.map?.add(this.layer),this.viewModel.layer=this._defaultGraphicsLayer)}disconnectedCallback(){this._defaultGraphicsLayer&&this.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.view?.map?.remove(this._defaultGraphicsLayer),super.disconnectedCallback()}render(){let e=this._refMap.get("settings")?.value?.actionElement,t=this.#t.groupedActions,{visualScale:o,layout:s,toolbarKind:r,relativePosition:d,_contextualToolLocation:a}=this,l=t.find(({name:n})=>n==="selectionSet"),g=t.filter(({name:n})=>n!=="selectionSet");return v`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${r} .relativePosition=${d} .scale=${o} tooltip-appearance=calcite ${E(this.#s.ref)}><arcgis-toolbar ${E(this.#l)}>${_({hidden:!l?.visible||a!=="inline",children:this._renderActionGroup(l)})}${g.map(n=>this._renderActionGroup(n))}${_({hidden:!l?.visible||a!=="inline-end",children:this._renderActionGroup(l)})}</arcgis-toolbar>${_({hidden:!l?.visible||a!=="separate",children:v`<arcgis-toolbar>${this._renderActionGroup(l)}</arcgis-toolbar>`})}</arcgis-toolbar-stack></div>${_({hidden:this.hideSettingsMenu,children:v`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} closable .heading=${this._messages.settings?.heading} .label=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#l.value?.barElement} @arcgisPropertyChange=${n=>this.#t.settingsPopoverOpen=n.target.open??!1} .view=${this.view??void 0}>${this._renderSettings()}</arcgis-view-popover>`})}`}_renderSettings(){let{autoDestroyDisabled:e,hideLabelsToggle:t,hideSnappingControls:o,hideTooltipsToggle:s,showSnappingControlsElementsHeader:r,useViewOptions:d,view:a,viewModel:l}=this;return v`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${d||s} .directionMode=${l.valueOptions.directionMode} .labelsEnabled=${l.labelOptions.enabled} .tooltipsEnabled=${l.tooltipOptions.enabled} @arcgisPropertyChange=${g=>{g.stopPropagation();let{labelsEnabled:n,tooltipsEnabled:u,directionMode:m}=g.currentTarget,b=this.viewModel;switch(g.detail.name){case"labelsEnabled":b.labelOptions.enabled=n;break;case"directionMode":b.valueOptions.directionMode=m;break;case"tooltipsEnabled":b.tooltipOptions.enabled=u;break}}}></arcgis-sketch-tooltip-controls>${!d&&!o?v`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${a} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${l.snappingOptions} .showHeader=${r} @arcgisPropertyChange=${g=>g.stopPropagation()}></arcgis-snapping-controls>`:void 0}</div>`}_renderActionGroup({visible:e,commands:t,name:o}){if(!e||!t.length)return;let{defaultPriority:s,groupKind:r,overflowLabel:d,preferEndSlot:a}=Me[o],l=(o==="geometrySimplification"?void 0:this._groupLayoutPriorityOverrides.get(o))??s,g=t.map(u=>this._renderCommand(u)),n=se(`more.${d}`,this._messages);switch(r){case"more-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-more-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;case"split-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-split-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;case"actions":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}>${g}</arcgis-toolbar-group>`}}_renderCommand({active:e,afterCreate:t,afterRemoved:o,afterUpdate:s,appearance:r,icon:d,disabled:a,id:l,kind:g,labelKey:n,labelParameters:u,loading:m,tooltipKey:b,iconFlipRTL:S,onClick:f,refKey:M,textEnabled:V,renderAsAction:ce}){let{_messages:B,_refMap:he,layout:I}=this,P=se(n,B),L=P===void 0?n:u?de(P,u):P,D=B?.[b]??L,F=M?ae(he,M,k):this.#n,W={afterCreate:t,afterRemoved:o,afterUpdate:s};return ce?v`<arcgis-toolbar-action .active=${e} .appearance=${r} .disabled=${a} .icon=${d} .iconFlipRtl=${S} id=${l??A} .kind=${g} .loading=${m} .labelText=${I==="horizontal"?L:""} .textEnabled=${V} .tooltipText=${I==="horizontal"&&V?"":D} @arcgisToolbarItemSelected=${f} ${ne(W)} ${E(F)}></arcgis-toolbar-action>`:v`<arcgis-toolbar-item .active=${e} .disabled=${a} .icon=${d} id=${l??A} .iconFlipRtl=${S} .labelText=${L} .tooltipText=${D} @arcgisItemSelected=${f} ${ne(W)} ${E(F)}></arcgis-toolbar-item>`}};J("arcgis-sketch",x);return x},"intl","layers/GraphicsLayer","symbols/TextSymbol","core/reactiveUtils","widgets/Sketch/SketchViewModel","applications/Components/featureUtils","core/Accessor","core/accessorSupport/decorators","core/promiseUtils","widgets/Sketch/VisibleElements","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,b,c,d,e,f,g)
|
|
2
|
+
import{b as oe}from"./JB6WQEFJ.js";import g from"./DSIYRWN2.js";import{a as w}from"./LTFGTX7S.js";import"./FH3WFF5O.js";import{a as _}from"./6J3KSMFG.js";import f from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./EJVFK7JX.js";import{a as ee}from"./REB4CHAK.js";import d from"./7ILT5PDJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{d as X,h as Y}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{b as Q}from"./LXME6MU5.js";import{E as N,F as H,O as q,P as k,Q as E,R as j,X as A,_ as J,a as K,b as v,e as O,x as U,z}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:de},pe,ge,{watch:y,on:ue,whenOnce:me},ve,{getOrCreateMapValue:ae,createReactiveMap:ye},be,{property:p,subclass:fe},{ignoreAbortErrors:T},Ce,we,,,,C,te,{f:Z},ie])=>{var Te=["bottom-end","bottom-start","bottom-left","bottom-right","top-end","top-start","top-left","top-right"],Se=new Set(Te);function se(i,e){let t=e;for(let o of i.split(".")){if(typeof t!="object"||t===null)return;t=Reflect.get(t,o)}return typeof t=="string"?t:void 0}var Ee=K`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px;-webkit-user-select:none;user-select:none;pointer-events:initial;padding:var(--calcite-space-sm);arcgis-sketch-tooltip-controls+arcgis-snapping-controls{border-block-start:1px solid var(--calcite-color-border-3)}}:host{pointer-events:none}.toolbar-container{block-size:100%;min-block-size:0;min-inline-size:0}arcgis-toolbar-stack[layout=vertical]{block-size:100cqh;min-block-size:100%;max-block-size:100%}`,_e={point:"pin",polyline:"line",polygon:"polygon",rectangle:"rectangle",circle:"circle",multipoint:"pins",mesh:"i3d-building",freehandPolygon:"freehand-area",freehandPolyline:"freehand",text:"text"},Me={selectionTools:{defaultPriority:w.Default,groupKind:"split-button",overflowLabel:"selection"},selectionSet:{defaultPriority:w.High,groupKind:"actions"},createTools:{defaultPriority:w.High,groupKind:"more-button",overflowLabel:"drawing"},undoRedo:{defaultPriority:w.Medium,groupKind:"split-button",overflowLabel:"action",preferEndSlot:!0},settings:{defaultPriority:w.Max,groupKind:"more-button",overflowLabel:"action",preferEndSlot:!0},geometrySimplification:{defaultPriority:w.Default,groupKind:"actions",preferEndSlot:!0}},ke=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,h=(i,e,t,o)=>{for(var s=o>1?void 0:o?Pe(e,t):e,r=i.length-1,d;r>=0;r--)(d=i[r])&&(s=(o?d(e,t,s):d(s))||s);return o&&s&&ke(e,t,s),s},c=class extends be{constructor(i){super(i),this._effectiveRenderStateCache=new Map,this._effectiveGeometrySimplificationInProgress=!1,this.visibleElements=new Ce,this.settingsPopoverOpen=!1,this.availableCreateTools=["point","polyline","freehandPolyline","polygon","freehandPolygon","rectangle","circle"]}initialize(){this.selectionViewModel??=new we({persistSelection:!1}),this.addHandles([y(()=>this.sketchViewModel,(i,e)=>{i!==e&&this._effectiveRenderStateCache.clear()},{sync:!0}),ie({getLoading:()=>this.sketchViewModel?.geometrySimplificationInProgress??!1,setEffectiveLoading:i=>{this._effectiveGeometrySimplificationInProgress=i}}),y(()=>this.view,i=>{this.selectionViewModel.view=i},{initial:!0,sync:!0}),y(()=>this.sketchViewModel?.layer,i=>this.selectionViewModel.sources=i?[i]:[],{initial:!0,sync:!0}),this.selectionViewModel.on("complete",({selection:i})=>{i.length&&this.update(i)}),y(()=>this.selectionViewModel.activeOperation,i=>{i&&(this.sketchViewModel?.cancel(),this._activeCustomToolOptions=void 0)},{sync:!0}),ue(()=>this.sketchViewModel,"create",i=>{i.state==="complete"&&this.sketchViewModel?.creationMode!=="continuous"&&(this._activeCustomToolOptions=void 0)}),y(()=>this.visibleElements.settingsMenu,i=>{i||(this.settingsPopoverOpen=!1)},{sync:!0})])}destroy(){this._pendingCommandAbortController?.abort(),this.selectionViewModel.destroy(),this.sketchViewModel=void 0}get _isEffectiveRenderStateFrozen(){let{sketchViewModel:i}=this;return!!(i?.toolTransitionInProgress||i?.geometrySimplificationInProgress)}_getEffectiveValue(i,e){if(!this._isEffectiveRenderStateFrozen||!this._effectiveRenderStateCache.has(i)){let t=e();return this._effectiveRenderStateCache.set(i,t),t}return this._effectiveRenderStateCache.get(i)}get _state(){return this.sketchViewModel?.state??"disabled"}get test(){return{activeCustomToolOptions:this._activeCustomToolOptions,activeSelectionTool:this._activeSelectionTool,selectionViewModel:this.selectionViewModel}}get _activeSelectionTool(){switch(this.selectionViewModel.activeOperation?.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";default:return}}get _activePluginUniqueIds(){let i=this.sketchViewModel?.activePluginConfigurations.filter(e=>!e.hidden).map(e=>e.uniqueId);return new Set(i??[])}get _createToolActions(){let{sketchViewModel:i}=this;if(!i)return[];let e=i.effectiveAvailablePlugins,t=this.state==="disabled",o=this.visibleElements.createTools,s=this.activeTool,r=this._activeCustomToolOptions,d=r||!i.firstPluginWithSwappableLeaf?this._customToolOptions:[],a=i.rootPlugins,l=d?.map(n=>({active:n===r,disabled:t,icon:n.icon,labelKey:n.label,onClick:n===r?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n.toolName,n.createOptions,n)}))??[];if(r&&a)return[...this._pluginsToActions(a),...l];if(e?.length&&this.view?.type!=="3d")return[...this._pluginsToActions(e),...l];let g=this.view?.type==="3d";return[...this.availableCreateTools?.filter(n=>g&&n==="multipoint"?!1:n==="mesh"?!0:o[n])?.map(n=>({active:n===s,disabled:t,icon:_e[n],labelKey:`draw.${n}`,onClick:n===s?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n)}))??[],...l]}get _shouldShowBackButton(){let i=this.sketchViewModel?.firstPluginWithSwappableLeaf,e=this.sketchViewModel?.rootPlugins,t=this._activeCustomToolOptions;return!!(this.sketchViewModel?.multiplePluginsActive&&i&&e&&!(e.length<2&&e.includes(i)&&!this.visibleElements.singlePluginBackButton)&&!t)}get _selectionToolActions(){return this._shouldShowBackButton?[{active:!1,disabled:this.state==="disabled",icon:"chevron-left",iconFlipRTL:!0,labelKey:"back",onClick:()=>this._cancelActiveOperation()}]:this._selectionCommands}get _settingsActions(){let i=this._customActions?.get("settings-before"),e=this._customActions?.get("settings-after"),t=this.visibleElements.settingsMenu,o=[];return!i?.length&&!e?.length&&!t||(i&&o.push(...this._customActionsToSketchActions(i)),t&&o.push({icon:"gear",active:this.settingsPopoverOpen,disabled:this.state==="disabled",labelKey:"settings.heading",tooltipKey:"settings.heading",refKey:"settings",onClick:()=>this.toggleSettingsPopover()}),e&&o.push(...this._customActionsToSketchActions(e))),o}get _activeTool(){let i=this.selectionViewModel.activeOperation;if(i)switch(i.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";case"default":return"custom-selection"}if(!this.sketchViewModel)return;let{availableCreateTools:e}=this,{activeTool:t,activeCreateToolDrawMode:o}=this.sketchViewModel;return t==="polygon"&&o==="freehand"&&e?.includes("freehandPolygon")?"freehandPolygon":t==="polyline"&&o==="freehand"&&e?.includes("freehandPolyline")?"freehandPolyline":t??void 0}get _selectionCommands(){let{state:i,visibleElements:e,_activeSelectionTool:t,_customActions:o}=this,s=this.state==="disabled",r=[];this.sketchViewModel?.updateOnGraphicClick!==!1&&r.push({active:i==="ready"&&this._activeSelectionTool==null,disabled:s,icon:"cursor",labelKey:"selectFeature",onClick:()=>this._activateDefaultSelectionTool()});let d=e.selectionTools;d["rectangle-selection"]&&r.push({active:t==="rectangle-selection",disabled:s,icon:"cursor-marquee",labelKey:"rectangleSelection",onClick:()=>this._activateSelectionTool("rectangle-selection")}),d["lasso-selection"]&&r.push({active:t==="lasso-selection",disabled:s,icon:"lasso-select",labelKey:"lassoSelection",onClick:()=>this._activateSelectionTool("lasso-selection")});let a=o?.get("selection-toolbar");return a&&r.push(...this._customActionsToSketchActions(a)),r}get _selectionSetActions(){let i=this.sketchViewModel?.updateGraphics.length??0;if(!i)return[];let e=this.state==="disabled",t=[],o=this._customActions?.get("before-selection-set"),s=this._customActions?.get("after-selection-set");return this.visibleElements.selectionCountLabel&&t.push({active:!1,appearance:"outline",disabled:e,icon:"selection-x",kind:"brand",labelKey:"deselectCount",labelParameters:{count:i},textEnabled:!0,renderAsAction:!0,onClick:()=>this._cancelSketchOperation()}),o&&t.push(...this._customActionsToSketchActions(o)),this.visibleElements.duplicateButton&&t.push({active:!1,disabled:e,icon:"copy",renderAsAction:!0,labelKey:i>1?"duplicateFeatures":"duplicateFeature",onClick:()=>this._duplicate()}),this.visibleElements.deleteButton&&t.push({active:!1,disabled:e,icon:"trash",kind:"danger",renderAsAction:!0,labelKey:i>1?"deleteFeatures":"deleteFeature",onClick:()=>this._delete()}),s&&t.push(...this._customActionsToSketchActions(s)),t}get _undoRedoActions(){return this.visibleElements.undoRedoMenu?[{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canUndo(),icon:"undo",labelKey:"undo",iconFlipRTL:!0,onClick:()=>this._undo()},{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canRedo(),icon:"redo",labelKey:"redo",iconFlipRTL:!0,onClick:()=>this._redo()}]:[]}get state(){return this._getEffectiveValue("state",()=>this._state)}get activeTool(){return this._getEffectiveValue("activeTool",()=>this._activeTool)}get activePluginIds(){return this._getEffectiveValue("activePluginId",()=>this._activePluginUniqueIds)}get groupedActions(){let i=this._getEffectiveValue("availableCommandGroups",()=>[["selectionTools",this._selectionToolActions],["createTools",this._createToolActions],["undoRedo",this._undoRedoActions],["settings",this._settingsActions],["selectionSet",this._selectionSetActions]].map(([t,o])=>({name:t,commands:o,visible:o.length>0}))),e=this._effectiveGeometrySimplificationInProgress?i.map(t=>({...t,commands:t.commands.map(o=>({...o,disabled:!0}))})):i;return!this.visibleElements.geometrySimplificationActivityIndicator||!this._effectiveGeometrySimplificationInProgress?e:[...e,{name:"geometrySimplification",commands:[{active:!1,appearance:"transparent",disabled:!0,kind:"warning",labelKey:"processing",loading:!0,onClick:()=>{},renderAsAction:!0}],visible:!0}]}async create(i,e){await this._executeWhenReady(async()=>{this.cancelAll();let t=this.sketchViewModel;t&&await T(t.create(i,e))})}async _executeWhenReady(i){this._pendingCommandAbortController?.abort();let e=new AbortController;this._pendingCommandAbortController=e;try{await T((async()=>{this.sketchViewModel?.geometrySimplificationInProgress&&await me(()=>!this.sketchViewModel?.geometrySimplificationInProgress,e.signal),e.signal.aborted||await i()})())}finally{this._pendingCommandAbortController===e&&(this._pendingCommandAbortController=void 0)}}toggleSettingsPopover(){this.settingsPopoverOpen=!this.settingsPopoverOpen}setCustomTools(i,e){this._customToolOptions=i??void 0;let t=this._activeCustomToolOptions;if(t){let o=this._customToolOptions?.find(s=>s.toolKey===t.toolKey);o?this._activeCustomToolOptions=o:this.cancelAll()}if(e?.length){let o=new Map;for(let s of e)ae(o,s.position,()=>[]).push(s);this._customActions=o}else this._customActions=void 0}cancelAll(){this._pendingCommandAbortController?.abort(),this._cancelSupportingOperations(),this.sketchViewModel?.cancel()}async update(i,e){await this._executeWhenReady(async()=>{let t=this.sketchViewModel;t&&await T(t.update(i,e))})}_activateDefaultSelectionTool(){this._executeWhenReady(()=>{this.cancelAll(),this.view?.focus()})}_cancelActiveOperation(){this._executeWhenReady(()=>this.cancelAll())}_cancelSketchOperation(){this._executeWhenReady(()=>this.sketchViewModel?.cancel())}_cancelSupportingOperations(){this.selectionViewModel.cancel(),this._activeCustomToolOptions=void 0}_activatePlugin(i){this._executeWhenReady(()=>{let e=this._activeCustomToolOptions!=null;this._cancelSupportingOperations();let t=this.sketchViewModel;if(t){if(e){t.cancel(),T(t.create(i));return}t.firstPluginWithSwappableLeaf?(t.replaceLeaf(i),this.view?.focus()):T(t.create(i))}})}_activateLegacyDrawTool(i,e,t){this._executeWhenReady(()=>{this._cancelSupportingOperations();let o=this.sketchViewModel;o&&(this._activeCustomToolOptions=t,T(o.create(i,e)))})}_activateSelectionTool(i){this._executeWhenReady(()=>{if(this._activeSelectionTool===i){this.selectionViewModel.cancel();return}this.cancelAll();let e={createTool:i==="lasso-selection"?"polygon":"rectangle",...i==="lasso-selection"?{mode:"hybrid",toolName:"lasso"}:{toolName:"rectangle"},type:"replace",selectOnComplete:!0};this.selectionViewModel.activate(e)&&this.view?.focus()})}_delete(){this._executeWhenReady(()=>this.sketchViewModel?.delete())}_duplicate(){this._executeWhenReady(()=>{this.sketchViewModel?.duplicate()})}_executeCustomAction(i){this._executeWhenReady(()=>i.onclick?.())}_redo(){this._executeWhenReady(()=>{this.sketchViewModel?.redo()})}_undo(){this._executeWhenReady(()=>{this.sketchViewModel?.undo()})}_customActionsToSketchActions(i){let e=this.state==="disabled";return i.map(t=>({active:t.active??!1,afterCreate:t.afterCreate,afterRemoved:t.afterRemoved,afterUpdate:t.afterUpdate,disabled:e||(t.disabled??!1),icon:t.icon,iconFlipRTL:t.flipRTL,id:t.id,labelKey:t.text,onClick:()=>this._executeCustomAction(t)}))}_pluginsToActions(i){let e=this.activePluginIds,t=this._activeCustomToolOptions,o=this.state==="disabled";return i.map(s=>({active:(e?.has(s.uniqueId)??!1)&&!t,icon:s.icon,disabled:o,labelKey:`digitizers.${s.localizationKey}`,onClick:()=>this._activatePlugin([s])}))}};h([p()],c.prototype,"_isEffectiveRenderStateFrozen",1);h([p()],c.prototype,"_effectiveGeometrySimplificationInProgress",2);h([p()],c.prototype,"_state",1);h([p()],c.prototype,"_customToolOptions",2);h([p()],c.prototype,"_activeCustomToolOptions",2);h([p()],c.prototype,"_customActions",2);h([p()],c.prototype,"selectionViewModel",2);h([p()],c.prototype,"_activeSelectionTool",1);h([p()],c.prototype,"_activePluginUniqueIds",1);h([p()],c.prototype,"_createToolActions",1);h([p()],c.prototype,"_shouldShowBackButton",1);h([p()],c.prototype,"_selectionToolActions",1);h([p()],c.prototype,"_settingsActions",1);h([p()],c.prototype,"_activeTool",1);h([p()],c.prototype,"_selectionCommands",1);h([p()],c.prototype,"_selectionSetActions",1);h([p()],c.prototype,"_undoRedoActions",1);h([p()],c.prototype,"sketchViewModel",2);h([p()],c.prototype,"visibleElements",2);h([p()],c.prototype,"view",2);h([p()],c.prototype,"settingsPopoverOpen",2);h([p()],c.prototype,"availableCreateTools",2);h([p()],c.prototype,"state",1);h([p()],c.prototype,"activeTool",1);h([p()],c.prototype,"activePluginIds",1);h([p()],c.prototype,"groupedActions",1);c=h([fe("components.sketch.SketchComponentViewModel")],c);var $=class extends q{#t;#e=!1;#i;constructor(e){if(super(e),e.type!==N.ELEMENT)throw new Error("nodeHooks() can only be used on elements")}render(e){return O}update(e,[t]){let o=e.element;if(!(o instanceof HTMLElement))throw new TypeError("nodeHooks() can only be used on HTMLElements");let s=this.#e?t.afterUpdate:t.afterCreate;return this.#t=o,this.#e=!0,this.#i=t,queueMicrotask(()=>{o.isConnected&&s?.(o)}),O}disconnected(){let e=this.#t,t=this.#i?.afterRemoved;!e||!t||queueMicrotask(()=>{e.isConnected||Z(()=>t(e),{timeout:16})})}},ne=H($),Le=new Set(["arcgis-map","arcgis-scene"]),Oe=8,R=class extends z{constructor(e){super(e),this.#t=new MutationObserver(()=>this.#c()),this.#e=new ResizeObserver(()=>this.#v()),this.#i=new ResizeObserver(([t])=>{if(!t)return;let o=this.component.layout==="horizontal"?t.contentRect.height:t.contentRect.width;o!==this.#s&&(this.#s=o,this.#v())}),this.#h=[],this.ref=t=>{this.#o!==t&&(this.#o=t,this.#a=void 0,this.#r=void 0,this.#c())},this.#g=()=>this.#c(),this.exports=void 0,this.onConnected(()=>this.#m()),this.onUpdated(()=>{this.#d!==this.component.layout&&this.#c()}),this.onDisconnected(()=>this.#f()),this.onLifecycle(()=>y(()=>this.component.view?.attributionHeight,()=>{this.#m()},{initial:!0}))}#t;#e;#i;#l;#s;#n;#h;#u;#o;#a;#r;#d;#p;#m(){queueMicrotask(()=>{this.component.el.isConnected&&this.#c()})}#c(){let e=this.#y();if(!e){this.#b(),this.#f();return}this.#C(e.toolbar),this.#w(e),this.#T(e),this.#v(e)}#y(){let e=this.component.el,t=e.parentElement,o=this.#o,s=e.assignedSlot;if(!t||!Le.has(t.localName)||!o||!s?.parentElement)return;let r=getComputedStyle(t).direction==="rtl"?"rtl":"ltr",d=re(e.slot,r);if(!d)return;let a=Array.from(t.children).filter(l=>l instanceof HTMLElement&&l.localName!=="arcgis-sketch");return{assignedSlot:s,content:a,direction:r,parent:t,position:d,toolbar:o}}#g;#C(e){this.#d!==this.component.layout&&(this.#s=void 0,this.#d=this.component.layout),this.#l!==e&&(this.#i.disconnect(),this.#l=e,this.#s=void 0,this.#i.observe(e))}#w(e){let t=e.assignedSlot;this.#n!==t&&(this.#n?.removeEventListener("slotchange",this.#g),this.#n=t,t.addEventListener("slotchange",this.#g)),this.#u!==e.parent&&(this.#t.disconnect(),this.#p?.(),this.#u=e.parent,this.#p=Q(e.parent,["dir"],()=>{this.#m()}),this.#t.observe(e.parent,{childList:!0,subtree:!1}))}#T(e){let t=[e.parent,...e.content];$e(this.#h,t)||(this.#e.disconnect(),t.forEach(o=>this.#e.observe(o)),this.#h=t)}#v(e=this.#y()){if(!e){this.#b();return}let t=this.component.layout,o=Ae({content:Ge(e),gap:Oe,layout:t,position:e.position,sameSlotReserve:Re(e.assignedSlot,this.component.el,t,e.assignedSlot.parentElement),toolbarBounds:e.toolbar.getBoundingClientRect(),viewBounds:e.parent.getBoundingClientRect()});this.#S(e.toolbar,t,o)}#S(e,t,o){o===this.#a&&t===this.#r||(this.#a=o,this.#r=t,e.style.setProperty("--arcgis-internal-toolbar-available-length",`${o}px`),t==="horizontal"?(e.style.height="",e.style.maxHeight="",e.style.maxWidth=`${o}px`,e.style.width="fit-content"):(e.style.height="fit-content",e.style.maxHeight=`${o}px`,e.style.maxWidth="",e.style.width=""))}#b(){this.#o&&(this.#o.style.maxHeight="",this.#o.style.maxWidth="",this.#o.style.height="",this.#o.style.width="",this.#o.style.removeProperty("--arcgis-internal-toolbar-available-length"),this.#a=void 0,this.#r=void 0)}#f(){this.#t.disconnect(),this.#p?.(),this.#p=void 0,this.#e.disconnect(),this.#i.disconnect(),this.#l=void 0,this.#s=void 0,this.#h=[],this.#n?.removeEventListener("slotchange",this.#g),this.#n=void 0,this.#a=void 0,this.#r=void 0,this.#d=void 0,this.#u=void 0}};function Ae({content:i,gap:e,layout:t,position:o,sameSlotReserve:s,toolbarBounds:r,viewBounds:d}){let a=G(d,t),l=G(r,t),g=le(o,t),n=g?l.start-a.start:a.end-l.end,u=0,m=!1;for(let S of i){if(le(S.position,t)===g)continue;let f=G(S.bounds,t);if(!(f.crossStart<l.crossEnd&&f.crossEnd>l.crossStart))continue;let M=g?a.end-f.start:f.end-a.start;u=Math.max(u,M),m=!0}let b=m?e:0;return Math.max(0,a.length-Math.max(0,n)-s-u-b)}function G(i,e){return e==="horizontal"?{start:i.left,end:i.right,length:i.width,crossStart:i.top,crossEnd:i.bottom}:{start:i.top,end:i.bottom,length:i.height,crossStart:i.left,crossEnd:i.right}}function le(i,e){return e==="horizontal"?i.endsWith("left"):i.startsWith("top")}function Ge(i){return i.content.flatMap(e=>{if(e.assignedSlot===i.assignedSlot)return[];let t=re(e.slot,i.direction);return t?[{bounds:e.getBoundingClientRect(),position:t}]:[]})}function $e(i,e){return i.length===e.length&&i.every((t,o)=>t===e[o])}function Re(i,e,t,o){let s=getComputedStyle(o).flexDirection;if(!(t==="horizontal"?s.startsWith("row"):s.startsWith("column")))return 0;let r=i.assignedElements().filter(g=>g instanceof HTMLElement),d=r.indexOf(e);if(d<0)return 0;let a=getComputedStyle(e),l=s==="row"?Number.parseFloat(a.marginRight):s==="row-reverse"?Number.parseFloat(a.marginLeft):s==="column"?Number.parseFloat(a.marginBottom):Number.parseFloat(a.marginTop);return r.slice(d+1).reduce((g,n)=>{let u=n.getBoundingClientRect(),m=getComputedStyle(n),b=t==="horizontal"?u.width+Number.parseFloat(m.marginLeft)+Number.parseFloat(m.marginRight):u.height+Number.parseFloat(m.marginTop)+Number.parseFloat(m.marginBottom);return g+b},l)}function re(i,e){let[t,o]=i.split("-");if(t!=="bottom"&&t!=="top")return;let s=o==="start"?e==="ltr"?"left":"right":o==="end"?e==="ltr"?"right":"left":o;return s==="left"||s==="right"?`${t}-${s}`:void 0}var xe=te(i=>new ve({...i,cancelUpdateOnClickAway:!0,creationMode:"continuous",textSymbol:new ge({text:"hello world"}),useLegacyCreateTools:!1})),x=class extends j{constructor(){super(),this.#t=new c,this.#l=k(),this.#s=new R(this),this.#n=k(),this._defaultGraphicsLayer=null,this._messages=ee(),this.test={componentViewModel:this.#t},this._groupLayoutPriorityOverrides=new Map,this._contextualToolLocation="separate",this._refMap=ye(),this.viewModel=xe(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.createGraphic=this.viewModel.createGraphic,this.creationMode=this.viewModel.creationMode,this.defaultCreateOptions=this.viewModel.defaultCreateOptions,this.defaultGraphicsLayerDisabled=!1,this.defaultUpdateOptions=this.viewModel.defaultUpdateOptions,this.geometrySimplificationInProgress=this.viewModel.geometrySimplificationInProgress,this.icon="pencil",this.label=this._messages?.componentLabel,this.labelOptions=this.viewModel.labelOptions,this.layer=this.viewModel.layer,this.layout="horizontal",this.pointSymbol=this.viewModel.pointSymbol,this.polygonSymbol=this.viewModel.polygonSymbol,this.polylineSymbol=this.viewModel.polylineSymbol,this.activeFillSymbol=this.viewModel.activeFillSymbol,this.activeLineSymbol=this.viewModel.activeLineSymbol,this.activeVertexSymbol=this.viewModel.activeVertexSymbol,this.activeCreateToolDrawMode=this.viewModel.activeCreateToolDrawMode,this.visualScale="m",this.snappingOptions=this.viewModel.snappingOptions,this.textSymbol=this.viewModel.textSymbol,this.toolbarKind="floating",this.tooltipOptions=this.viewModel.tooltipOptions,this.useViewOptions=this.viewModel.useViewOptions,this.valueOptions=this.viewModel.valueOptions,this.useLegacyCreateTools=this.viewModel.useLegacyCreateTools,this.updateOnGraphicClickDisabled=this.viewModel.updateOnGraphicClick,this.updateGraphics=this.viewModel.updateGraphics,this.activeTooltip=this.viewModel.activeTooltip,this.arcgisCreate=C(()=>this.viewModel,"create"),this.arcgisDelete=C(()=>this.viewModel,"delete"),this.arcgisDuplicate=C(()=>this.viewModel,"duplicate"),this.arcgisPropertyChange=Y()("activeTool","geometrySimplificationInProgress","state"),this.arcgisReady=U(),this.arcgisRedo=C(()=>this.viewModel,"redo"),this.arcgisUndo=C(()=>this.viewModel,"undo"),this.arcgisUpdate=C(()=>this.viewModel,"update"),X(["slot"],()=>{this.requestUpdate()}),this.manager.onLifecycle(()=>[y(()=>this.el.view?.map,(e,t)=>{let o=this._defaultGraphicsLayer;o&&(t?.allLayers.includes(o)&&t.remove(o),o&&!e?.allLayers.includes(o)&&e?.add(o))}),y(()=>this.el.view,e=>{this.viewModel.view=e,this.#t.view=e??void 0},{initial:!0}),y(()=>this.viewModel,e=>{this.#t.sketchViewModel=e,this.viewModel.pluginManager.sketch=this},{initial:!0}),y(()=>this.#t.state,(e,t)=>{this.requestUpdate("state",t)},{initial:!0}),y(()=>this.#t.activeTool,()=>this.arcgisPropertyChange.emit({name:"activeTool"}),{sync:!0})]),this.manager.onDestroy(()=>{this._defaultGraphicsLayer&&this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.el.view?.map?.remove(this._defaultGraphicsLayer),this._defaultGraphicsLayer?.destroy(),this._defaultGraphicsLayer=null,this.#t.destroy()})}static{this.properties={_groupLayoutPriorityOverrides:16,_contextualToolLocation:16,_refMap:16,viewModel:0,view:0,activeTool:32,autoDestroyDisabled:5,visibleElements:0,availableCreateTools:0,createGraphic:32,creationMode:1,defaultCreateOptions:0,defaultGraphicsLayerDisabled:5,defaultUpdateOptions:0,geometrySimplificationInProgress:36,hideCreateToolsCircle:5,hideCreateToolsMultipoint:5,hideCreateToolsPoint:5,hideCreateToolsPolygon:5,hideCreateToolsPolyline:5,hideCreateToolsRectangle:5,hideDuplicateButton:5,hideDeleteButton:5,hideSelectionCountLabel:5,hideLabelsToggle:5,hideSelectionToolsLassoSelection:5,hideSelectionToolsRectangleSelection:5,hideSettingsMenu:5,hideSinglePluginBackButton:5,hideSnappingControls:5,hideSnappingControlsElementsEnabledToggle:5,hideSnappingControlsElementsFeatureEnabledToggle:5,hideSnappingControlsElementsLayerList:5,hideSnappingControlsElementsSelfEnabledToggle:5,hideSnappingControlsElementsGridEnabledToggle:5,hideSnappingControlsElementsGridControls:5,hideSnappingControlsElementsGridControlsElementsColorSelection:5,hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle:5,hideSnappingControlsElementsGridControlsElementsLineIntervalInput:5,hideSnappingControlsElementsGridControlsElementsNumericInputs:5,hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning:5,hideSnappingControlsElementsGridControlsElementsPlacementButtons:5,hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle:5,hideTooltipsToggle:5,hideUndoRedoMenu:5,icon:1,label:1,labelOptions:0,layer:0,layout:1,pointSymbol:0,polygonSymbol:0,polylineSymbol:0,activeFillSymbol:0,activeLineSymbol:0,activeVertexSymbol:0,activeCreateToolDrawMode:1,referenceElement:1,relativePosition:1,scale:1,visualScale:1,showSnappingControlsElementsHeader:5,showCreateToolsFreehandPolygon:5,showCreateToolsFreehandPolyline:5,showCreateToolsText:5,hideGeometrySimplificationActivityIndicator:5,snappingOptions:0,state:32,textSymbol:0,toolbarKind:1,tooltipOptions:0,useViewOptions:5,valueOptions:0,useLegacyCreateTools:5,updateOnGraphicClickDisabled:5,cancelUpdateOnClickAwayDisabled:5,updateGraphics:32,activeTooltip:0}}static{this.styles=Ee}#t;get#e(){return this.#t.visibleElements}#i;#l;#s;#n;get activeTool(){return this.#t.activeTool}get visibleElements(){return this.#t.visibleElements}set visibleElements(e){this.#t.visibleElements=e}get availableCreateTools(){return this.#t.availableCreateTools}set availableCreateTools(e){this.#t.availableCreateTools=e}get hideCreateToolsCircle(){return!this.#e.createTools.circle}set hideCreateToolsCircle(e){this.#e.createTools.circle=!e}get hideCreateToolsMultipoint(){return!this.#e.createTools.multipoint}set hideCreateToolsMultipoint(e){this.#e.createTools.multipoint=!e}get hideCreateToolsPoint(){return!this.#e.createTools.point}set hideCreateToolsPoint(e){this.#e.createTools.point=!e}get hideCreateToolsPolygon(){return!this.#e.createTools.polygon}set hideCreateToolsPolygon(e){this.#e.createTools.polygon=!e}get hideCreateToolsPolyline(){return!this.#e.createTools.polyline}set hideCreateToolsPolyline(e){this.#e.createTools.polyline=!e}get hideCreateToolsRectangle(){return!this.#e.createTools.rectangle}set hideCreateToolsRectangle(e){this.#e.createTools.rectangle=!e}get hideDuplicateButton(){return!this.#e.duplicateButton}set hideDuplicateButton(e){this.#e.duplicateButton=!e}get hideDeleteButton(){return!this.#e.deleteButton}set hideDeleteButton(e){this.#e.deleteButton=!e}get hideSelectionCountLabel(){return!this.#e.selectionCountLabel}set hideSelectionCountLabel(e){this.#e.selectionCountLabel=!e}get hideLabelsToggle(){return!this.#e.labelsToggle}set hideLabelsToggle(e){this.#e.labelsToggle=!e}get hideSelectionToolsLassoSelection(){return!this.#e.selectionTools["lasso-selection"]}set hideSelectionToolsLassoSelection(e){this.#e.selectionTools["lasso-selection"]=!e}get hideSelectionToolsRectangleSelection(){return!this.#e.selectionTools["rectangle-selection"]}set hideSelectionToolsRectangleSelection(e){this.#e.selectionTools["rectangle-selection"]=!e}get hideSettingsMenu(){return!this.#e.settingsMenu}set hideSettingsMenu(e){this.#e.settingsMenu=!e}get hideSinglePluginBackButton(){return!this.#e.singlePluginBackButton}set hideSinglePluginBackButton(e){this.#e.singlePluginBackButton=!e}get hideSnappingControls(){return!this.#e.snappingControls}set hideSnappingControls(e){this.#e.snappingControls=!e}get hideSnappingControlsElementsEnabledToggle(){return!this.#e.snappingControlsElements.enabledToggle}set hideSnappingControlsElementsEnabledToggle(e){this.#e.snappingControlsElements.enabledToggle=!e}get hideSnappingControlsElementsFeatureEnabledToggle(){return!this.#e.snappingControlsElements.featureEnabledToggle}set hideSnappingControlsElementsFeatureEnabledToggle(e){this.#e.snappingControlsElements.featureEnabledToggle=!e}get hideSnappingControlsElementsLayerList(){return!this.#e.snappingControlsElements.layerList}set hideSnappingControlsElementsLayerList(e){this.#e.snappingControlsElements.layerList=!e}get hideSnappingControlsElementsSelfEnabledToggle(){return!this.#e.snappingControlsElements.selfEnabledToggle}set hideSnappingControlsElementsSelfEnabledToggle(e){this.#e.snappingControlsElements.selfEnabledToggle=!e}get hideSnappingControlsElementsGridEnabledToggle(){return!this.#e.snappingControlsElements.gridEnabledToggle}set hideSnappingControlsElementsGridEnabledToggle(e){this.#e.snappingControlsElements.gridEnabledToggle=!e}get hideSnappingControlsElementsGridControls(){return!this.#e.snappingControlsElements.gridControls}set hideSnappingControlsElementsGridControls(e){this.#e.snappingControlsElements.gridControls=!e}get hideSnappingControlsElementsGridControlsElementsColorSelection(){return!this.#e.snappingControlsElements.gridControlsElements.colorSelection}set hideSnappingControlsElementsGridControlsElementsColorSelection(e){this.#e.snappingControlsElements.gridControlsElements.colorSelection=!e}get hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(){return!this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle}set hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(e){this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle=!e}get hideSnappingControlsElementsGridControlsElementsLineIntervalInput(){return!this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput}set hideSnappingControlsElementsGridControlsElementsLineIntervalInput(e){this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput=!e}get hideSnappingControlsElementsGridControlsElementsNumericInputs(){return!this.#e.snappingControlsElements.gridControlsElements.numericInputs}set hideSnappingControlsElementsGridControlsElementsNumericInputs(e){this.#e.snappingControlsElements.gridControlsElements.numericInputs=!e}get hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(){return!this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning}set hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(e){this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning=!e}get hideSnappingControlsElementsGridControlsElementsPlacementButtons(){return!this.#e.snappingControlsElements.gridControlsElements.placementButtons}set hideSnappingControlsElementsGridControlsElementsPlacementButtons(e){this.#e.snappingControlsElements.gridControlsElements.placementButtons=!e}get hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(){return!this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle}set hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(e){this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle=!e}get hideTooltipsToggle(){return!this.#e.tooltipsToggle}set hideTooltipsToggle(e){this.#e.tooltipsToggle=!e}get hideUndoRedoMenu(){return!this.#e.undoRedoMenu}set hideUndoRedoMenu(e){this.#e.undoRedoMenu=!e}get relativePosition(){let e=this.el.slot;return this.#i??(Se.has(e)?e:oe.topRight)}set relativePosition(e){this.#i=e}get scale(){return this.visualScale}set scale(e){this.visualScale=e}get showSnappingControlsElementsHeader(){return this.#e.snappingControlsElements.header}set showSnappingControlsElementsHeader(e){this.#e.snappingControlsElements.header=e}get showCreateToolsFreehandPolygon(){return this.#e.createTools.freehandPolygon}set showCreateToolsFreehandPolygon(e){this.#e.createTools.freehandPolygon=e}get showCreateToolsFreehandPolyline(){return this.#e.createTools.freehandPolyline}set showCreateToolsFreehandPolyline(e){this.#e.createTools.freehandPolyline=e}get showCreateToolsText(){return this.#e.createTools.text}set showCreateToolsText(e){this.#e.createTools.text=e}get hideGeometrySimplificationActivityIndicator(){return!this.#e.geometrySimplificationActivityIndicator}set hideGeometrySimplificationActivityIndicator(e){this.#e.geometrySimplificationActivityIndicator=!e}get state(){return this.#t.state}get cancelUpdateOnClickAwayDisabled(){return!this.viewModel.cancelUpdateOnClickAway}set cancelUpdateOnClickAwayDisabled(e){this.viewModel.cancelUpdateOnClickAway=!e}async addGraphic(e){this.viewModel.addGraphic(e)}async addGraphics(e){this.viewModel.addGraphics(e)}async cancel(){this.#t.cancelAll()}async complete(){this.viewModel.complete()}async create(e,t){await this.#t.create(e,t)}async delete(){this.viewModel.delete()}async destroy(){await this.manager.destroy()}async dismissFloatingElements(){this.#t.settingsPopoverOpen=!1}async duplicate(){this.viewModel.duplicate()}async hasGraphic(e){return this.viewModel.hasGraphic(e)}async removeAllGraphics(){this.viewModel.removeAllGraphics()}async removeGraphic(e){this.viewModel.removeGraphic(e)}async removeGraphics(e){this.viewModel.removeGraphics(e)}async redo(){this.viewModel.redo()}async canRedo(){return this.viewModel.canRedo()}async setContextualToolLocation(e){this._contextualToolLocation=e}async setCustomTools(e,t){this.#t.setCustomTools(e,t)}async setGroupCollapsePriorities(e){this._groupLayoutPriorityOverrides=e||new Map}async triggerUpdate(e,t){await this.#t.update(e,t)}async place(e){this.viewModel.place(e)}async undo(){this.#t.sketchViewModel?.undo()}async canUndo(){return this.viewModel.canUndo()}connectedCallback(){super.connectedCallback(),this.defaultGraphicsLayerDisabled||(this._defaultGraphicsLayer?.destroyed&&(this._defaultGraphicsLayer=null),this._defaultGraphicsLayer??=new pe({title:"Sketch Layer"}),this.layer=this._defaultGraphicsLayer,this.view?.map?.add(this.layer),this.viewModel.layer=this._defaultGraphicsLayer)}disconnectedCallback(){this._defaultGraphicsLayer&&this.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.view?.map?.remove(this._defaultGraphicsLayer),this.cancel(),super.disconnectedCallback()}render(){let e=this._refMap.get("settings")?.value?.actionElement,t=this.#t.groupedActions,{visualScale:o,layout:s,toolbarKind:r,relativePosition:d,_contextualToolLocation:a}=this,l=t.find(({name:n})=>n==="selectionSet"),g=t.filter(({name:n})=>n!=="selectionSet");return v`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${r} .relativePosition=${d} .scale=${o} tooltip-appearance=calcite ${E(this.#s.ref)}><arcgis-toolbar ${E(this.#l)}>${_({hidden:!l?.visible||a!=="inline",children:this._renderActionGroup(l)})}${g.map(n=>this._renderActionGroup(n))}${_({hidden:!l?.visible||a!=="inline-end",children:this._renderActionGroup(l)})}</arcgis-toolbar>${_({hidden:!l?.visible||a!=="separate",children:v`<arcgis-toolbar>${this._renderActionGroup(l)}</arcgis-toolbar>`})}</arcgis-toolbar-stack></div>${_({hidden:this.hideSettingsMenu,children:v`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} closable .heading=${this._messages.settings?.heading} .label=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#l.value?.barElement} @arcgisPropertyChange=${n=>this.#t.settingsPopoverOpen=n.target.open??!1} .view=${this.view??void 0}>${this._renderSettings()}</arcgis-view-popover>`})}`}_renderSettings(){let{autoDestroyDisabled:e,hideLabelsToggle:t,hideSnappingControls:o,hideTooltipsToggle:s,showSnappingControlsElementsHeader:r,useViewOptions:d,view:a,viewModel:l}=this;return v`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${d||s} .directionMode=${l.valueOptions.directionMode} .labelsEnabled=${l.labelOptions.enabled} .tooltipsEnabled=${l.tooltipOptions.enabled} @arcgisPropertyChange=${g=>{g.stopPropagation();let{labelsEnabled:n,tooltipsEnabled:u,directionMode:m}=g.currentTarget,b=this.viewModel;switch(g.detail.name){case"labelsEnabled":b.labelOptions.enabled=n;break;case"directionMode":b.valueOptions.directionMode=m;break;case"tooltipsEnabled":b.tooltipOptions.enabled=u;break}}}></arcgis-sketch-tooltip-controls>${!d&&!o?v`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${a} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${l.snappingOptions} .showHeader=${r} @arcgisPropertyChange=${g=>g.stopPropagation()}></arcgis-snapping-controls>`:void 0}</div>`}_renderActionGroup({visible:e,commands:t,name:o}){if(!e||!t.length)return;let{defaultPriority:s,groupKind:r,overflowLabel:d,preferEndSlot:a}=Me[o],l=(o==="geometrySimplification"?void 0:this._groupLayoutPriorityOverrides.get(o))??s,g=t.map(u=>this._renderCommand(u)),n=se(`more.${d}`,this._messages);switch(r){case"more-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-more-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;case"split-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-split-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;case"actions":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}>${g}</arcgis-toolbar-group>`}}_renderCommand({active:e,afterCreate:t,afterRemoved:o,afterUpdate:s,appearance:r,icon:d,disabled:a,id:l,kind:g,labelKey:n,labelParameters:u,loading:m,tooltipKey:b,iconFlipRTL:S,onClick:f,refKey:M,textEnabled:V,renderAsAction:ce}){let{_messages:B,_refMap:he,layout:I}=this,P=se(n,B),L=P===void 0?n:u?de(P,u):P,D=B?.[b]??L,F=M?ae(he,M,k):this.#n,W={afterCreate:t,afterRemoved:o,afterUpdate:s};return ce?v`<arcgis-toolbar-action .active=${e} .appearance=${r} .disabled=${a} .icon=${d} .iconFlipRtl=${S} id=${l??A} .kind=${g} .loading=${m} .labelText=${I==="horizontal"?L:""} .textEnabled=${V} .tooltipText=${I==="horizontal"&&V?"":D} @arcgisToolbarItemSelected=${f} ${ne(W)} ${E(F)}></arcgis-toolbar-action>`:v`<arcgis-toolbar-item .active=${e} .disabled=${a} .icon=${d} id=${l??A} .iconFlipRtl=${S} .labelText=${L} .tooltipText=${D} @arcgisItemSelected=${f} ${ne(W)} ${E(F)}></arcgis-toolbar-item>`}};J("arcgis-sketch",x);return x},"intl","layers/GraphicsLayer","symbols/TextSymbol","core/reactiveUtils","widgets/Sketch/SketchViewModel","applications/Components/featureUtils","core/Accessor","core/accessorSupport/decorators","core/promiseUtils","widgets/Sketch/VisibleElements","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,b,c,d,e,f,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import g from"./GEOME3IC.js";import f from"./HU57LQOA.js";import e from"./QVJ2FUNW.js";import{a as V}from"./REB4CHAK.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as F}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as x}from"./LXME6MU5.js";import{Q as y,R as I,T as M,X as b,_ as C,a as $,b as n,x as w}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:B},N,{watch:H},{stripHTML:Z},P,,,,R,,{a:_,b:L,c:T,d:E,f:A,j:D,q:c}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element[empty]{display:none}.content-element:not([empty]):only-child,.content-element:not([empty]):last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=V(),this._rootFlowNode=null,this.internalFlowItems=new N,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=F()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return T(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return E(this.graphic)}get fieldInfoMap(){return _(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=n`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return n`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return n`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:n`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:o,globalValues:s}=this,a=c({values:t,fieldInfoMap:i,globalValues:s,layer:o,text:e.title}),r=c({values:t,fieldInfoMap:i,globalValues:s,layer:o,text:e.description});return n`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${a} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return n`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:o,fieldInfoMap:s,sourceLayer:a,popupTemplate:r,globalValues:l,graphic:d}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(D(f)||A(f)||f in o)),u=r?.expressionInfos,m=c({values:o,fieldInfoMap:s,globalValues:l,layer:a,text:e.title}),g=c({values:o,fieldInfoMap:s,globalValues:l,layer:a,text:e.description});return n`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${d??void 0} .isContentFieldInfos=${h} .layer=${a} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:o,fieldInfoMap:s,sourceLayer:a,popupTemplate:r,globalValues:l}=this,{formattedAttributes:d,relatedInfos:h}=this.viewModel,p={...d?.global,...d?.content?.[t]},u=c({values:i,fieldInfoMap:s,globalValues:l,layer:a,text:e.title}),m=c({values:i,fieldInfoMap:s,globalValues:l,layer:a,text:e.description});return n`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${u} class="content-element" .description=${m} .values=${i} .layer=${a} .graphic=${o??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${h} .formattedValues=${p}></arcgis-feature-media>`}_renderText(e){return n`<arcgis-feature-content .creator=${e.text} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:o}=this;return n`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${o} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:o,fieldInfoMap:s,sourceLayer:a,globalValues:r}=this,{displayCount:l,orderByFields:d,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=c({values:i,fieldInfoMap:s,globalValues:r,layer:a,text:e.title}),f=c({values:i,fieldInfoMap:s,globalValues:r,layer:a,text:e.description});return n`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${a} .map=${this.map??void 0} .displayCount=${l} .graphic=${o??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${d??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:o,messages:s,sourceLayer:a,values:r}=this,l=c({values:r,fieldInfoMap:t,globalValues:i,layer:a,text:e.title}),d=c({values:r,fieldInfoMap:t,globalValues:i,layer:a,text:e.description});return n`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${d} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${o??void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${a} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?n`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:o,state:s,messages:a,heading:r,hideHeading:l}=this,d=t?null:n`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=a.returnToInitialFeature??"";return e?d:n`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${o} .heading=${l?void 0:Z(r)} .selected=${!i.length}>${!l&&r?n`<div slot=heading><div .innerHTML=${B.sanitize(r??"")??""}></div></div>`:null}${d}</calcite-flow-item>${i.toArray().map((p,u)=>n`<calcite-flow-item @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${o} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:o,user:s}=i,a=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,r=k(a??"",{date:o,user:s});return n`<div class=${M(x("last-edited-info","content-element"))}>${r}</div>`}};C("arcgis-feature",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","widgets/Feature/FeatureViewModel",a,c,d,e,f,g)
|
|
2
|
+
import g from"./GEOME3IC.js";import f from"./HU57LQOA.js";import e from"./EJVFK7JX.js";import{a as V}from"./REB4CHAK.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as F}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as x}from"./LXME6MU5.js";import{Q as y,R as I,T as M,X as b,_ as C,a as $,b as n,x as w}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:B},N,{watch:H},{stripHTML:Z},P,,,,R,,{a:_,b:L,c:T,d:E,f:A,j:D,q:c}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element[empty]{display:none}.content-element:not([empty]):only-child,.content-element:not([empty]):last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=V(),this._rootFlowNode=null,this.internalFlowItems=new N,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=F()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return T(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return E(this.graphic)}get fieldInfoMap(){return _(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=n`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return n`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return n`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:n`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:o,globalValues:s}=this,a=c({values:t,fieldInfoMap:i,globalValues:s,layer:o,text:e.title}),r=c({values:t,fieldInfoMap:i,globalValues:s,layer:o,text:e.description});return n`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${a} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return n`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:o,fieldInfoMap:s,sourceLayer:a,popupTemplate:r,globalValues:l,graphic:d}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(D(f)||A(f)||f in o)),u=r?.expressionInfos,m=c({values:o,fieldInfoMap:s,globalValues:l,layer:a,text:e.title}),g=c({values:o,fieldInfoMap:s,globalValues:l,layer:a,text:e.description});return n`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${d??void 0} .isContentFieldInfos=${h} .layer=${a} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:o,fieldInfoMap:s,sourceLayer:a,popupTemplate:r,globalValues:l}=this,{formattedAttributes:d,relatedInfos:h}=this.viewModel,p={...d?.global,...d?.content?.[t]},u=c({values:i,fieldInfoMap:s,globalValues:l,layer:a,text:e.title}),m=c({values:i,fieldInfoMap:s,globalValues:l,layer:a,text:e.description});return n`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${u} class="content-element" .description=${m} .values=${i} .layer=${a} .graphic=${o??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${h} .formattedValues=${p}></arcgis-feature-media>`}_renderText(e){return n`<arcgis-feature-content .creator=${e.text} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:o}=this;return n`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${o} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:o,fieldInfoMap:s,sourceLayer:a,globalValues:r}=this,{displayCount:l,orderByFields:d,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=c({values:i,fieldInfoMap:s,globalValues:r,layer:a,text:e.title}),f=c({values:i,fieldInfoMap:s,globalValues:r,layer:a,text:e.description});return n`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${a} .map=${this.map??void 0} .displayCount=${l} .graphic=${o??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${d??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:o,messages:s,sourceLayer:a,values:r}=this,l=c({values:r,fieldInfoMap:t,globalValues:i,layer:a,text:e.title}),d=c({values:r,fieldInfoMap:t,globalValues:i,layer:a,text:e.description});return n`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${d} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${o??void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${a} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?n`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:o,state:s,messages:a,heading:r,hideHeading:l}=this,d=t?null:n`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=a.returnToInitialFeature??"";return e?d:n`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${o} .heading=${l?void 0:Z(r)} .selected=${!i.length}>${!l&&r?n`<div slot=heading><div .innerHTML=${B.sanitize(r??"")??""}></div></div>`:null}${d}</calcite-flow-item>${i.toArray().map((p,u)=>n`<calcite-flow-item @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${o} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:o,user:s}=i,a=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,r=k(a??"",{date:o,user:s});return n`<div class=${M(x("last-edited-info","content-element"))}>${r}</div>`}};C("arcgis-feature",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","widgets/Feature/FeatureViewModel",a,c,d,e,f,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import h from"./
|
|
2
|
+
import h from"./RFO3M46K.js";import{a as b}from"./UKIVMO7H.js";import{a as w}from"./JB6WQEFJ.js";import{a as f}from"./KE2ER3F7.js";import"./Y6WTYXVP.js";import g from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./7ILT5PDJ.js";import d from"./7JPHMESH.js";import"./Q7GF26CL.js";import"./U77WHUC6.js";import c from"./SI2DEXWH.js";import"./LXME6MU5.js";import{P as l,Q as o,R as p,T as n,_ as v,b as a,x as r}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:s},_,A,D,{d:m,e:g,f:d,g:y},{c:h,e:u},e,,{a:V,b:R,c:C,d:E}])=>{var I=h(A,{}),M=h(_,{}),c=class extends p{constructor(){super(),this._attributionMode=null,this._mapRef=l(),this._uiController=new V(this),this.extraContent=new D,this.arcgisLoadError=C(this),this.arcgisViewReadyError=E(this),this._map=I(this),this.view=M(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=e(()=>this.view,"focus-region-select"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),R(this),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get center(){return this.view.center}set center(i){if(g(i,this._center))return;this._center=d(i);let t=y(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){u(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get focusRegion(){return this.view.focusRegion}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(i){m(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,t){return this.view.fetchPopupFeatures(i,t)}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){await this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${n(w.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${n(w.containerUI)} ${o(this._uiController.uiContainerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",c);return c},"core/reactiveUtils","views/MapView","WebMap","core/Collection",c,d,e,g,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import i from"./DSIYRWN2.js";import"./FH3WFF5O.js";import h from"./GEOME3IC.js";import g from"./HU57LQOA.js";import f from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./QVJ2FUNW.js";import{a as V}from"./REB4CHAK.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as _}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as x}from"./LXME6MU5.js";import{Q as w,R as I,T as M,X as b,_ as C,a as $,b as l,x as y}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:N},{renderingSanitizer:B},H,{watch:Z},{stripHTML:P},z,,,,R,,,{a:E,b:L,c:F,e:A,f:T,j:D,q:r},k])=>{var U=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element[empty]{display:none}.content-element:not([empty]):only-child,.content-element:not([empty]):last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,O=R(z),v=class extends I{constructor(){super(...arguments),this.messages=V(),this._rootFlowNode=null,this._loading=!1,this.internalFlowItems=new H,this.flowType="feature",this.viewModel=O(this),this.actions=this.viewModel.actions,this.includeDefaultActions=this.viewModel.includeDefaultActions,this.focusTrapEnabled=!1,this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=y()}static{this.properties={_loading:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,actions:0,includeDefaultActions:5,focusTrapEnabled:5,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,allActions:32,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=U}get popupTemplate(){return F(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return A(this.graphic)}get fieldInfoMap(){return E(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}get allActions(){return this.viewModel.allActions}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[k({getLoading:()=>!this.flowItems&&this.state==="loading",setEffectiveLoading:e=>{this._loading=e}}),Z(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=l`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return l`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return l`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:l`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return l`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return l`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(D(f)||T(f)||f in a)),u=o?.expressionInfos,m=r({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=r({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return l`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=r({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=r({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return l`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return l`<arcgis-feature-content .creator=${r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return l`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=r({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=r({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return l`<arcgis-feature-relationship .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .includeDefaultActions=${this.includeDefaultActions} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=r({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=r({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return l`<arcgis-feature-utility-network-associations .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .includeDefaultActions=${this.includeDefaultActions} .layer=${n} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return l`<arcgis-feature-content .creator=${r({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,_loading:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:l`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:l`<calcite-flow ${w(this._storeRootFlowNode)}><calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} .loading=${s} .headingLevel=${a} .heading=${d?void 0:P(o)} .selected=${!i.length}>${!d&&o?l`<div slot=heading><div .innerHTML=${B.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>l`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=N(n??"",{date:a,user:s});return l`<div class=${M(x("last-edited-info","content-element"))}>${o}</div>`}};C("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/FeatureModel",a,c,d,e,f,g,h,i)
|
|
2
|
+
import i from"./DSIYRWN2.js";import"./FH3WFF5O.js";import h from"./GEOME3IC.js";import g from"./HU57LQOA.js";import f from"./BOPNSNUT.js";import"./WJQUE4DR.js";import e from"./EJVFK7JX.js";import{a as V}from"./REB4CHAK.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as _}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as x}from"./LXME6MU5.js";import{Q as w,R as I,T as M,X as b,_ as C,a as $,b as l,x as y}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:N},{renderingSanitizer:B},H,{watch:Z},{stripHTML:P},z,,,,R,,,{a:E,b:L,c:F,e:A,f:T,j:D,q:r},k])=>{var U=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element[empty]{display:none}.content-element:not([empty]):only-child,.content-element:not([empty]):last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,O=R(z),v=class extends I{constructor(){super(...arguments),this.messages=V(),this._rootFlowNode=null,this._loading=!1,this.internalFlowItems=new H,this.flowType="feature",this.viewModel=O(this),this.actions=this.viewModel.actions,this.includeDefaultActions=this.viewModel.includeDefaultActions,this.focusTrapEnabled=!1,this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=y()}static{this.properties={_loading:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,actions:0,includeDefaultActions:5,focusTrapEnabled:5,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,allActions:32,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=U}get popupTemplate(){return F(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return A(this.graphic)}get fieldInfoMap(){return E(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}get allActions(){return this.viewModel.allActions}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[k({getLoading:()=>!this.flowItems&&this.state==="loading",setEffectiveLoading:e=>{this._loading=e}}),Z(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=l`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return l`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return l`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:l`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return l`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return l`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(D(f)||T(f)||f in a)),u=o?.expressionInfos,m=r({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=r({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return l`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=r({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=r({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return l`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return l`<arcgis-feature-content .creator=${r({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return l`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=r({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=r({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return l`<arcgis-feature-relationship .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .includeDefaultActions=${this.includeDefaultActions} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=r({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=r({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return l`<arcgis-feature-utility-network-associations .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .includeDefaultActions=${this.includeDefaultActions} .layer=${n} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return l`<arcgis-feature-content .creator=${r({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,_loading:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:l`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:l`<calcite-flow ${w(this._storeRootFlowNode)}><calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} .loading=${s} .headingLevel=${a} .heading=${d?void 0:P(o)} .selected=${!i.length}>${!d&&o?l`<div slot=heading><div .innerHTML=${B.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>l`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=N(n??"",{date:a,user:s});return l`<div class=${M(x("last-edited-info","content-element"))}>${o}</div>`}};C("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/FeatureModel",a,c,d,e,f,g,h,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as o}from"./5GFPOTOB.js";import i from"./QVJ2FUNW.js";import{a as x}from"./REB4CHAK.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as C}from"./Q7GF26CL.js";import"./U77WHUC6.js";import b from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as g}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton&&!e.isTable?o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`):void 0}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,i)
|
|
2
|
+
import{a as o}from"./5GFPOTOB.js";import i from"./EJVFK7JX.js";import{a as x}from"./REB4CHAK.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as C}from"./Q7GF26CL.js";import"./U77WHUC6.js";import b from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as g}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton&&!e.isTable?o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`):void 0}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import u from"./V7DMA5ZO.js";import"./EVWWTIEQ.js";import{a as Q}from"./4L43F7HU.js";import t from"./AIF4MCBB.js";import s from"./SIT5NBLS.js";import o from"./BFYJTV6Q.js";import{a as S,b as U,g as G,h as L,j as H,k as q,m as c,n as $}from"./ZCFWKPXL.js";import{a as N}from"./WVKMYNN7.js";import{a as m}from"./5GFPOTOB.js";import n from"./GEOME3IC.js";import l from"./HU57LQOA.js";import j from"./BOPNSNUT.js";import"./WJQUE4DR.js";import i from"./QVJ2FUNW.js";import{a as B}from"./REB4CHAK.js";import{a as _}from"./L5IRXOCJ.js";import{a as k}from"./7Y4SF2NT.js";import h from"./7ILT5PDJ.js";import f from"./7JPHMESH.js";import e from"./OLY5EME5.js";import{h as x}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as P}from"./LXME6MU5.js";import{B as R,P as d,Q as p,R as C,T as g,X as y,Y as v,_ as A,a as M,b as r,x as b}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([se,w,{on:ae,watch:le},,,,D,O,,,,,{k:j},,{a:z,b:J,c:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=M`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=O(se),F=class extends C{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this.#t=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${R()}`,this.#i=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=B(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new w,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new w(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new w,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new w,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=b(),this.arcgisOpenedLayersChange=b(),this.arcgisPropertyChange=x()("state"),this.arcgisReady=b(),this.arcgisReferenceFilterChange=b(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[K,re,J]}#t;#i;get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this.#L(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#n(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this.#o()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){L(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),L(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async#r(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this.#h(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async#o(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#i?.abort();let s=new AbortController,{signal:a}=s;this.#i=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this.#r(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#n(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#h(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return v(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#c(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this.#c(e);return v(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}#d(e){e.open=!1,this._focusRootFlowItem=!0}#m({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}#p(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let t=this.#t,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this.#t=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this.#m({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}#g(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}#e(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[_.hidden]:this.state==="loading",[_.disabled]:this.state==="disabled"};return r`<div class=${g(P(_.widget,_.panel,e))}>${this.#w()}${this.#f()}</div>`}#u(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}#s(e){if(e.incompatible)return this.#u(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#s(i));return t?.length?t:null}#f(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this.#s(e))}#a(e){return r`<div slot=message>${e}</div>`}#y(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this.#a(e)}</calcite-notice>`)}</div>`}#I(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??y} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}#b(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this.#I()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}#_(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??y}></calcite-action>`:null}#w(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this.#_()}${this.#F()}${this.#$()}</calcite-flow-item>`),this.#b(),this.#v(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this.#e(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this.#e(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}#v(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this.#d(i);return this._focusPanelFlowItem=this.#e(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#L(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this.#e(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??y} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#l(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${g(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this.#y(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??y} data-layer-type=${this._rootGroupUid??y} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this.#g} @calciteListDragEnd=${l=>this.#p(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this.#E(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#a(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}#$(){return this.hideBaseLayers?null:this.#l(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}#F(){return this.hideReferenceLayers?null:this.#l(this._visibleReferenceItems,"reference",!1)}#E(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layerList/BasemapLayerListModel","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,o,s,t,u)
|
|
2
|
+
import u from"./V7DMA5ZO.js";import"./EVWWTIEQ.js";import{a as Q}from"./4L43F7HU.js";import t from"./AIF4MCBB.js";import s from"./SIT5NBLS.js";import o from"./BFYJTV6Q.js";import{a as S,b as U,g as G,h as L,j as H,k as q,m as c,n as $}from"./ZCFWKPXL.js";import{a as N}from"./WVKMYNN7.js";import{a as m}from"./5GFPOTOB.js";import n from"./GEOME3IC.js";import l from"./HU57LQOA.js";import j from"./BOPNSNUT.js";import"./WJQUE4DR.js";import i from"./EJVFK7JX.js";import{a as B}from"./REB4CHAK.js";import{a as _}from"./L5IRXOCJ.js";import{a as k}from"./7Y4SF2NT.js";import h from"./7ILT5PDJ.js";import f from"./7JPHMESH.js";import e from"./OLY5EME5.js";import{h as x}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as P}from"./LXME6MU5.js";import{B as R,P as d,Q as p,R as C,T as g,X as y,Y as v,_ as A,a as M,b as r,x as b}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([se,w,{on:ae,watch:le},,,,D,O,,,,,{k:j},,{a:z,b:J,c:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=M`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=O(se),F=class extends C{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this.#t=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${R()}`,this.#i=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=B(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new w,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new w(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new w,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new w,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=b(),this.arcgisOpenedLayersChange=b(),this.arcgisPropertyChange=x()("state"),this.arcgisReady=b(),this.arcgisReferenceFilterChange=b(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[K,re,J]}#t;#i;get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this.#L(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#n(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this.#o()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){L(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),L(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async#r(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this.#h(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async#o(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#i?.abort();let s=new AbortController,{signal:a}=s;this.#i=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this.#r(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#n(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#h(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return v(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#c(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this.#c(e);return v(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}#d(e){e.open=!1,this._focusRootFlowItem=!0}#m({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}#p(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let t=this.#t,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this.#t=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this.#m({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}#g(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}#e(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[_.hidden]:this.state==="loading",[_.disabled]:this.state==="disabled"};return r`<div class=${g(P(_.widget,_.panel,e))}>${this.#w()}${this.#f()}</div>`}#u(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}#s(e){if(e.incompatible)return this.#u(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#s(i));return t?.length?t:null}#f(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this.#s(e))}#a(e){return r`<div slot=message>${e}</div>`}#y(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this.#a(e)}</calcite-notice>`)}</div>`}#I(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??y} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}#b(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this.#I()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}#_(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??y}></calcite-action>`:null}#w(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this.#_()}${this.#F()}${this.#$()}</calcite-flow-item>`),this.#b(),this.#v(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this.#e(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this.#e(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}#v(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this.#d(i);return this._focusPanelFlowItem=this.#e(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#L(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this.#e(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??y} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#l(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${g(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this.#y(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??y} data-layer-type=${this._rootGroupUid??y} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this.#g} @calciteListDragEnd=${l=>this.#p(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this.#E(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#a(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}#$(){return this.hideBaseLayers?null:this.#l(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}#F(){return this.hideReferenceLayers?null:this.#l(this._visibleReferenceItems,"reference",!1)}#E(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layerList/BasemapLayerListModel","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,o,s,t,u)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"beginning":"Beginning","color":"Color","end":"End","errorLoadingLayer":"Error loading the layer","follow":"Follow","forward":"Forward","frame":"Frame","frameCenter":"Frame Center","frameInfo":"Frame Information","frameOutline":"Frame Outline","graphics":"Graphics","layers":"Layers","loop":"Loop","loopPlayback":"Loop Playback","mapOverlay":"Map Overlay","metadata":"Metadata","metadataDescription":"Press the play button or adjust the slider handle to load metadata","metadataNotLoaded":"Metadata not available yet","missionInfo":"Mission Information","none":"None","operationalData":"Operational Data","pause":"Pause","platformInfo":"Platform Information","play":"Play","playbackProgress":"Playback Progress","playbackSpeed":"Playback Speed","quality":"Quality","reverse":"Reverse","sensor":"Sensor","sensorPath":"Sensor Path","sensorTrail":"Sensor Trail","settings":"Settings","sightLine":"Sight Line","speed":"Speed","video":"Video","videoPlayer":"Video Player"}
|
|
1
|
+
{"beginning":"Beginning","buffering":"Buffering video","color":"Color","end":"End","errorLoadingLayer":"Error loading the layer","follow":"Follow","forward":"Forward","frame":"Frame","frameCenter":"Frame Center","frameInfo":"Frame Information","frameOutline":"Frame Outline","graphics":"Graphics","layers":"Layers","live":"Live","loop":"Loop","loopDisabled":"Loop playback off","loopEnabled":"Loop playback on","loopPlayback":"Loop Playback","mapOverlay":"Map Overlay","maximize":"Maximize","metadata":"Metadata","metadataDescription":"Press the play button or adjust the slider handle to load metadata","metadataNotLoaded":"Metadata not available yet","minimize":"Minimize","missionInfo":"Mission Information","none":"None","operationalData":"Operational Data","pause":"Pause","platformInfo":"Platform Information","play":"Play","playbackProgress":"Playback Progress","playbackSpeed":"Playback Speed","quality":"Quality","reverse":"Reverse","sensor":"Sensor","sensorPath":"Sensor Path","sensorTrail":"Sensor Trail","settings":"Settings","sightLine":"Sight Line","speed":"Speed","video":"Video","videoPlayer":"Video Player"}
|