@arcgis/coding-components 5.2.0-next.10 → 5.2.0-next.12

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.
Files changed (45) hide show
  1. package/dist/cdn/{QRQEHI3E.js → 3QN6NREQ.js} +1 -1
  2. package/dist/cdn/{PE22Q7FG.js → 76VHPECE.js} +1 -1
  3. package/dist/cdn/{3LFA3ZUC.js → 7UTCJERR.js} +1 -1
  4. package/dist/cdn/{3RKKHGVW.js → A6IGYBAZ.js} +2 -2
  5. package/dist/cdn/{GRY2G3ZM.js → B3RGPCZC.js} +1 -1
  6. package/dist/cdn/{EHMFQPTC.js → B73HLERI.js} +1 -1
  7. package/dist/cdn/{UCJZGGBB.js → BXC4G3AT.js} +1 -1
  8. package/dist/cdn/{MFMTJO3G.js → GMEKFEH7.js} +2 -2
  9. package/dist/cdn/GTE3KXNK.js +2 -0
  10. package/dist/cdn/{R4PIOB2F.js → H2YYYWPE.js} +1 -1
  11. package/dist/cdn/{3PBQ47BB.js → HXJFZ2Y5.js} +1 -1
  12. package/dist/cdn/{LZ2JU5WD.js → JLYAOSQM.js} +1 -1
  13. package/dist/cdn/{PNDN33UV.js → LEFFI3FB.js} +1 -1
  14. package/dist/cdn/{VVAIS3PR.js → MCVII2KK.js} +1 -1
  15. package/dist/cdn/{DBVA54U6.js → MFDNJU3K.js} +1 -1
  16. package/dist/cdn/{EIW62O7S.js → NCMXRX7O.js} +1 -1
  17. package/dist/cdn/NVWQE3SF.js +2 -0
  18. package/dist/cdn/{CRXBAVHA.js → O6L3YJ7J.js} +1 -1
  19. package/dist/cdn/{XU7YAUUX.js → PJBI5XFD.js} +1 -1
  20. package/dist/cdn/{BEDXEPMS.js → PXKBNRBR.js} +1 -1
  21. package/dist/cdn/{4XEVYDUI.js → Q5RDW24Y.js} +1 -1
  22. package/dist/cdn/{IMMQXUUH.js → RFQXYDLI.js} +1 -1
  23. package/dist/cdn/{6IE7GBIZ.js → TIZLT4V3.js} +1 -1
  24. package/dist/cdn/{4XMC5J5W.js → UTTEHEMP.js} +1 -1
  25. package/dist/cdn/VPVLZ5QO.js +2 -0
  26. package/dist/cdn/{FJWYAXOE.js → WRVJHPML.js} +1 -1
  27. package/dist/cdn/XJRNIBLO.js +2 -0
  28. package/dist/cdn/{MQ6ZAZZK.js → ZXEQOR2Y.js} +1 -1
  29. package/dist/cdn/assets/code-editor/sql-expr.worker.js +2611 -2586
  30. package/dist/cdn/index.js +1 -1
  31. package/dist/chunks/debugger-value-components.js +51 -47
  32. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +4 -5
  33. package/dist/components/arcgis-arcade-debugger-output/customElement.js +21 -18
  34. package/dist/components/arcgis-arcade-editor/customElement.js +5 -5
  35. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  36. package/dist/components/arcgis-sql-layer-editor/customElement.js +10 -10
  37. package/dist/docs/api.json +1 -1
  38. package/dist/docs/docs.json +1 -1
  39. package/dist/docs/web-types.json +1 -1
  40. package/dist/loader.js +1 -1
  41. package/package.json +5 -5
  42. package/dist/cdn/4KFBAAVC.js +0 -2
  43. package/dist/cdn/GBBSV4NV.js +0 -2
  44. package/dist/cdn/IQR7XS6J.js +0 -2
  45. package/dist/cdn/SYSBF5A6.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import j from"./IMMQXUUH.js";import i from"./MQ6ZAZZK.js";import f from"./4XMC5J5W.js";import b from"./STN3LSQR.js";import"./3PBQ47BB.js";import"./OLNYBWUC.js";import"./P37AQWGL.js";import"./MZMKV7FA.js";import{a as _}from"./DBVA54U6.js";import"./EHMFQPTC.js";import"./NP37C536.js";import"./XSKI5PRU.js";import"./ECNI2A4K.js";import"./XRUKVCVF.js";import{E as l,F as h,G as p,H as r,K as g,h as c,j as e,n as o,t as d}from"./XU7YAUUX.js";import{b as a}from"./VGOFAQ7A.js";import"./257WOXQH.js";import"./R2XZZWNP.js";import"./QTLHVR4Y.js";import"./TEXAGKBD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,{a:s},{b:m}])=>{var f=c`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`,n=class extends p{constructor(){super(...arguments),this._codeEditorElt=l(),this._disposables=[],this.messages=_(),this._modelId=d(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.hideDescriptionsInFieldsPanel=!1,this.arcgisDiagnosticsChange=o({bubbles:!1}),this.arcgisScriptChange=o({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5,messageOverrides:0,hideDescriptionsInFieldsPanel:5}}static{this.styles=[f]}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateEditorProfile().catch(a(this))}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async loaded(){let i=await m();this._disposables.push(i.onDiagnosticsChange(t=>!this._preparing&&this.arcgisDiagnosticsChange.emit(t.diagnostics)))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let t=i.target;this._setActiveAction(t.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(a(this))}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(a(this))}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,t=s.getEditorProfileForModel(this._modelId);return t?.variables?.length&&t?.variables?.[0]?.type!=="featureSet"?a(this)("Encountered unexpected editor profile"):i=t?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<arcgis-code-editor-shell><arcgis-code-editor slot=editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${h(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar&&i&&e`<arcgis-editor-variables slot=side-panel .variable=${i} .hideDescriptions=${this.hideDescriptionsInFieldsPanel} .closed=${this._activeAction!=="fields"} class=${r(this._activeAction==="fields"?"":"hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${()=>this._setActiveAction(void 0)} data-panel-name=none .messageOverrides=${{profileempty:this.messages.profileempty}}></arcgis-editor-variables>`||""}${!this.hideSideBar&&e`<arcgis-language-api-panel slot=side-panel class=${r(this._activeAction==="functions"?"":"hidden")} .closed=${this._activeAction!=="functions"} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${s.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}>${i&&e`<calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>`||""}${i&&!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</arcgis-code-editor-shell>`}};g("arcgis-sql-expression-editor",n);return n},b,f,i,j)
2
+ import j from"./RFQXYDLI.js";import i from"./ZXEQOR2Y.js";import f from"./UTTEHEMP.js";import b from"./STN3LSQR.js";import"./HXJFZ2Y5.js";import"./OLNYBWUC.js";import"./P37AQWGL.js";import"./MZMKV7FA.js";import{a as _}from"./MFDNJU3K.js";import"./B73HLERI.js";import"./NP37C536.js";import"./XSKI5PRU.js";import"./ECNI2A4K.js";import"./XRUKVCVF.js";import{E as l,F as h,G as p,H as r,K as g,h as c,j as e,n as o,t as d}from"./PJBI5XFD.js";import{b as a}from"./VGOFAQ7A.js";import"./257WOXQH.js";import"./R2XZZWNP.js";import"./QTLHVR4Y.js";import"./TEXAGKBD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,{a:s},{b:m}])=>{var f=c`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`,n=class extends p{constructor(){super(...arguments),this._codeEditorElt=l(),this._disposables=[],this.messages=_(),this._modelId=d(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.hideDescriptionsInFieldsPanel=!1,this.arcgisDiagnosticsChange=o({bubbles:!1}),this.arcgisScriptChange=o({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5,messageOverrides:0,hideDescriptionsInFieldsPanel:5}}static{this.styles=[f]}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateEditorProfile().catch(a(this))}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async loaded(){let i=await m();this._disposables.push(i.onDiagnosticsChange(t=>!this._preparing&&this.arcgisDiagnosticsChange.emit(t.diagnostics)))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let t=i.target;this._setActiveAction(t.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(a(this))}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(a(this))}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,t=s.getEditorProfileForModel(this._modelId);return t?.variables?.length&&t?.variables?.[0]?.type!=="featureSet"?a(this)("Encountered unexpected editor profile"):i=t?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<arcgis-code-editor-shell><arcgis-code-editor slot=editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${h(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar&&i&&e`<arcgis-editor-variables slot=side-panel .variable=${i} .hideDescriptions=${this.hideDescriptionsInFieldsPanel} .closed=${this._activeAction!=="fields"} class=${r(this._activeAction==="fields"?"":"hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${()=>this._setActiveAction(void 0)} data-panel-name=none .messageOverrides=${{profileempty:this.messages.profileempty}}></arcgis-editor-variables>`||""}${!this.hideSideBar&&e`<arcgis-language-api-panel slot=side-panel class=${r(this._activeAction==="functions"?"":"hidden")} .closed=${this._activeAction!=="functions"} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${s.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}>${i&&e`<calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>`||""}${i&&!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</arcgis-code-editor-shell>`}};g("arcgis-sql-expression-editor",n);return n},b,f,i,j)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./XSKI5PRU.js";import{E as n,F as l,G as b,K as p,h as u,j as m}from"./XU7YAUUX.js";import"./VGOFAQ7A.js";import"./H6RQVSYM.js";var z=u`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:0;align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-sm-plus);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`,P=10,k=25,v=100,x="results-has-content",f="is-resizing",C="--arcgis-coding-components-code-editor-results-panel-max-h",s="--internal-code-editor-results-panel-h",a="--internal-code-editor-results-panel-max-h",i="--internal-code-editor-results-panel-bottom-drawer-controls-h",c=class extends b{static{this.styles=[z]}#e=void 0;#t=!1;#a=!1;#n=n();#h=n();#l=n();#r;#u(e){this.#e===e.pointerId&&this.#o()}#v=e=>{this.#e===e.pointerId&&this.#o()};load(){this.manager.onLifecycle(()=>(this.#r=new ResizeObserver(()=>{this.#t&&this.#i()}),this.updateComplete.then(()=>this.#g()),()=>{this.#o(),this.#r?.disconnect(),this.#r=void 0}))}#x(){this.#t&&this.#i(),this.#g()}#f(e){e.button!==0||!this.#t||(e.preventDefault(),e.currentTarget instanceof HTMLElement&&(e.currentTarget.focus(),e.currentTarget.setPointerCapture(e.pointerId)),this.#e=e.pointerId,this.#a=!0,this.elementInternals.states.add(f),this.#m(e))}#y(e){if(!this.#t)return;this.#i();let t=this.#k(e);t!=null&&(e.preventDefault(),e.stopPropagation(),this.#a=!0,this.#c(t))}#w(e){if(!e.target)return;let t=g(e);if(this.#t=t,t){this.elementInternals.states.add(x),this.#i();return}this.#o(),this.#a||this.#$(),this.elementInternals.states.delete(x)}#o(){let e=this.#e;if(!e)return;this.#e=void 0;let t=this.#h.value;t?.hasPointerCapture(e)&&t.releasePointerCapture(e),this.elementInternals.states.delete(f)}#m(e){if(this.#e!==e.pointerId)return;let t=this.#s(),r=this.el.getBoundingClientRect().bottom-e.clientY-t;this.#c(r,t)}#z(){let e=Number.parseFloat(this.el.style.getPropertyValue(s));if(Number.isFinite(e))return e;let t=Number.parseFloat(getComputedStyle(this.#n.value??this.el).height);return Number.isFinite(t)?Math.max(0,t-this.#s()):v}#b(){return this.el.querySelector(':scope > [slot="bottom-action-bar"]')}#s(){let e=this.#b()?.getBoundingClientRect().height??0,t=this.#l.value?.getBoundingClientRect().height??0;return e+t}#p(){return getComputedStyle(this.el).getPropertyValue(C).trim()||null}#d(e,t){t?this.el.style.setProperty(e,t):this.el.style.removeProperty(e)}#P(e){let t=this.#p();if(!t)return null;let r=Number.parseFloat(t);if(t.endsWith("px")&&Number.isFinite(r))return r;if(t.endsWith("%")&&Number.isFinite(r))return this.el.getBoundingClientRect().height*r/100;let o=this.#n.value;if(!o)return null;let d=this.el.style.getPropertyValue(i),y=this.el.style.getPropertyValue(s),w=this.el.style.getPropertyValue(a);this.el.style.setProperty(i,`${e}px`),this.el.style.setProperty(s,`${this.el.getBoundingClientRect().height}px`),this.el.style.setProperty(a,t);let h=Number.parseFloat(getComputedStyle(o).height);return this.#d(i,d),this.#d(s,y),this.#d(a,w),Number.isFinite(h)?Math.max(0,h-e):null}#g(){let e=this.#r;if(!e)return;e.disconnect(),e.observe(this.el);let t=this.#l.value;t&&e.observe(t);let r=this.#b();r&&e.observe(r)}#k(e){let t=e.shiftKey?k:P,r=this.#z();switch(e.key){case"ArrowUp":return r+t;case"ArrowDown":return r-t;default:return}}#C(e,t){let r=Math.max(0,this.el.getBoundingClientRect().height-t),o=this.#P(t),d=o==null?r:Math.min(r,o);return Math.min(Math.max(e,v),d)}#c(e,t=this.#s()){let r=this.#C(e,t),o=this.#p();this.el.style.setProperty(i,`${t}px`),this.el.style.setProperty(s,`${r}px`),this.el.style.setProperty(a,o??`calc(100% - ${t}px)`)}#$(){this.el.style.removeProperty(i),this.el.style.removeProperty(s),this.el.style.removeProperty(a)}#i(){let e=this.#s(),t=Number.parseFloat(this.el.style.getPropertyValue(s));return Number.isFinite(t)?this.#c(t,e):this.el.style.setProperty(i,`${e}px`),e}render(){return m`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${l(this.#n)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#u} @pointerdown=${this.#f} @pointermove=${this.#m} @pointerup=${this.#u} @lostpointercapture=${this.#v} @keydown=${this.#y} ${l(this.#h)}><div class="bottom-drawer-resize-handle-bar" ${l(this.#l)}><calcite-icon icon=drag-resize-vertical scale=s></calcite-icon></div></div><slot name=bottom-action-bar @slotchange=${this.#x}></slot><slot name=results-panel @slotchange=${this.#w}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`}};p("arcgis-code-editor-shell",c);export{c as CodeEditorShell};
2
+ import{a as g}from"./XSKI5PRU.js";import{E as n,F as l,G as b,K as p,h as u,j as m}from"./PJBI5XFD.js";import"./VGOFAQ7A.js";import"./H6RQVSYM.js";var z=u`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:0;align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-sm-plus);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`,P=10,k=25,v=100,x="results-has-content",f="is-resizing",C="--arcgis-coding-components-code-editor-results-panel-max-h",s="--internal-code-editor-results-panel-h",a="--internal-code-editor-results-panel-max-h",i="--internal-code-editor-results-panel-bottom-drawer-controls-h",c=class extends b{static{this.styles=[z]}#e=void 0;#t=!1;#a=!1;#n=n();#h=n();#l=n();#r;#u(e){this.#e===e.pointerId&&this.#o()}#v=e=>{this.#e===e.pointerId&&this.#o()};load(){this.manager.onLifecycle(()=>(this.#r=new ResizeObserver(()=>{this.#t&&this.#i()}),this.updateComplete.then(()=>this.#g()),()=>{this.#o(),this.#r?.disconnect(),this.#r=void 0}))}#x(){this.#t&&this.#i(),this.#g()}#f(e){e.button!==0||!this.#t||(e.preventDefault(),e.currentTarget instanceof HTMLElement&&(e.currentTarget.focus(),e.currentTarget.setPointerCapture(e.pointerId)),this.#e=e.pointerId,this.#a=!0,this.elementInternals.states.add(f),this.#m(e))}#y(e){if(!this.#t)return;this.#i();let t=this.#k(e);t!=null&&(e.preventDefault(),e.stopPropagation(),this.#a=!0,this.#c(t))}#w(e){if(!e.target)return;let t=g(e);if(this.#t=t,t){this.elementInternals.states.add(x),this.#i();return}this.#o(),this.#a||this.#$(),this.elementInternals.states.delete(x)}#o(){let e=this.#e;if(!e)return;this.#e=void 0;let t=this.#h.value;t?.hasPointerCapture(e)&&t.releasePointerCapture(e),this.elementInternals.states.delete(f)}#m(e){if(this.#e!==e.pointerId)return;let t=this.#s(),r=this.el.getBoundingClientRect().bottom-e.clientY-t;this.#c(r,t)}#z(){let e=Number.parseFloat(this.el.style.getPropertyValue(s));if(Number.isFinite(e))return e;let t=Number.parseFloat(getComputedStyle(this.#n.value??this.el).height);return Number.isFinite(t)?Math.max(0,t-this.#s()):v}#b(){return this.el.querySelector(':scope > [slot="bottom-action-bar"]')}#s(){let e=this.#b()?.getBoundingClientRect().height??0,t=this.#l.value?.getBoundingClientRect().height??0;return e+t}#p(){return getComputedStyle(this.el).getPropertyValue(C).trim()||null}#d(e,t){t?this.el.style.setProperty(e,t):this.el.style.removeProperty(e)}#P(e){let t=this.#p();if(!t)return null;let r=Number.parseFloat(t);if(t.endsWith("px")&&Number.isFinite(r))return r;if(t.endsWith("%")&&Number.isFinite(r))return this.el.getBoundingClientRect().height*r/100;let o=this.#n.value;if(!o)return null;let d=this.el.style.getPropertyValue(i),y=this.el.style.getPropertyValue(s),w=this.el.style.getPropertyValue(a);this.el.style.setProperty(i,`${e}px`),this.el.style.setProperty(s,`${this.el.getBoundingClientRect().height}px`),this.el.style.setProperty(a,t);let h=Number.parseFloat(getComputedStyle(o).height);return this.#d(i,d),this.#d(s,y),this.#d(a,w),Number.isFinite(h)?Math.max(0,h-e):null}#g(){let e=this.#r;if(!e)return;e.disconnect(),e.observe(this.el);let t=this.#l.value;t&&e.observe(t);let r=this.#b();r&&e.observe(r)}#k(e){let t=e.shiftKey?k:P,r=this.#z();switch(e.key){case"ArrowUp":return r+t;case"ArrowDown":return r-t;default:return}}#C(e,t){let r=Math.max(0,this.el.getBoundingClientRect().height-t),o=this.#P(t),d=o==null?r:Math.min(r,o);return Math.min(Math.max(e,v),d)}#c(e,t=this.#s()){let r=this.#C(e,t),o=this.#p();this.el.style.setProperty(i,`${t}px`),this.el.style.setProperty(s,`${r}px`),this.el.style.setProperty(a,o??`calc(100% - ${t}px)`)}#$(){this.el.style.removeProperty(i),this.el.style.removeProperty(s),this.el.style.removeProperty(a)}#i(){let e=this.#s(),t=Number.parseFloat(this.el.style.getPropertyValue(s));return Number.isFinite(t)?this.#c(t,e):this.el.style.setProperty(i,`${e}px`),e}render(){return m`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${l(this.#n)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#u} @pointerdown=${this.#f} @pointermove=${this.#m} @pointerup=${this.#u} @lostpointercapture=${this.#v} @keydown=${this.#y} ${l(this.#h)}><div class="bottom-drawer-resize-handle-bar" ${l(this.#l)}><calcite-icon icon=drag-resize-vertical scale=s></calcite-icon></div></div><slot name=bottom-action-bar @slotchange=${this.#x}></slot><slot name=results-panel @slotchange=${this.#w}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`}};p("arcgis-code-editor-shell",c);export{c as CodeEditorShell};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./CRXBAVHA.js";import{d as S}from"./MZMKV7FA.js";import d from"./2WB7S5TQ.js";import{j as a,p as c,u as b}from"./XU7YAUUX.js";export default $arcgis.t(([{b:u,c:g,d:m},{b:d,c:f,d:M,e:v,f:k,g:y}])=>{var l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(t=>t.selected=!1)},$={onClick:e=>{let t=e.currentTarget;t.expanded=!t.expanded}},R=({arcadeResult:e,t9nStrings:t})=>{let s=e.value??[],n=Math.max(s.length-u,0);return a`<bdi>${`${c(e.type)}(${s.length??0})`}</bdi>${n>0?a`<span>&nbsp;${b(t.showingfirstitemsformat,{count:u.toString()})}</span>`:null}`},T=({value:e,subtree:t,t9nStrings:s})=>{let n=e.geometry?.();return a`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(r=>{let i=m(e.field(r));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&i.type==="geometry"?null:p({arcadeResult:i,name:r,t9nStrings:s})})}${n?p({arcadeResult:{type:"geometry",value:n},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:t})=>a`<div class="value-type"><bdi>${c(e.type)}:</bdi>${e.features.length>=g?a`<span>&nbsp;${b(t.showingfirstitemsformat,{count:g.toString()})}</span>`:null}</div>`,C=({items:e,subtree:t,arrayLength:s=e.length,t9nStrings:n})=>a`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((r,i)=>{let o=m(r);return p({arcadeResult:o,name:i,expanded:!t,t9nStrings:n})})}${p({arcadeResult:{type:"number",value:s},name:"length",isMetadata:!0,t9nStrings:n})}</calcite-tree>`,p=({arcadeResult:e,name:t,isMetadata:s=!1,expanded:n,t9nStrings:r})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":let{type:i,value:o}=y(e);return a`<calcite-tree-item><div class="tree-item-label">${d({name:t,isMetadata:s})}${v({type:i,value:o})}</div></calcite-tree-item>`;case"array":{let h=e.value??[],x=h.slice(0,u);return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}${R({arcadeResult:e,t9nStrings:r})}</div>${C({items:x,arrayLength:h.length,subtree:!0,t9nStrings:r})}</calcite-tree-item>`}case"geometry":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${M({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${f({obj:e.value.castAsJson(),subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${T({value:e.value,subtree:!0,t9nStrings:r})}</calcite-tree-item>`;default:return null}},I=({arcadeResult:e})=>{let t=S(e.value.fields);return a`<div class="table-scroll"><table><thead><tr>${t.map(s=>a`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>a`<tr>${t.map(n=>{let r=m(s.field(n.name));if(!k(r))return a`<td></td>`;try{let{type:i,value:o}=y(r);return a`<td>${v({type:i,value:o})}</td>`}catch{return a`<td></td>`}})}</tr>`)}</tbody></table></div>`};return{a:l,b:R,c:T,d:G,e:C,f:I}},d,e)
2
+ import e from"./O6L3YJ7J.js";import{d as S}from"./MZMKV7FA.js";import d from"./2WB7S5TQ.js";import{j as a,p as c,u as b}from"./PJBI5XFD.js";export default $arcgis.t(([{b:u,c:g,d:m},{b:d,c:f,d:M,e:v,f:k,g:y}])=>{var l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(t=>t.selected=!1)},$={onClick:e=>{let t=e.currentTarget;t.expanded=!t.expanded}},R=({arcadeResult:e,t9nStrings:t})=>{let s=e.value??[],n=Math.max(s.length-u,0);return a`<bdi>${`${c(e.type)}(${s.length??0})`}</bdi>${n>0?a`<span>&nbsp;${b(t.showingfirstitemsformat,{count:u.toString()})}</span>`:null}`},T=({value:e,subtree:t,t9nStrings:s})=>{let n=e.geometry?.();return a`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(r=>{let i=m(e.field(r));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&i.type==="geometry"?null:p({arcadeResult:i,name:r,t9nStrings:s})})}${n?p({arcadeResult:{type:"geometry",value:n},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:t})=>a`<div class="value-type"><bdi>${c(e.type)}:</bdi>${e.features.length>=g?a`<span>&nbsp;${b(t.showingfirstitemsformat,{count:g.toString()})}</span>`:null}</div>`,C=({items:e,subtree:t,arrayLength:s=e.length,t9nStrings:n})=>a`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((r,i)=>{let o=m(r);return p({arcadeResult:o,name:i,expanded:!t,t9nStrings:n})})}${p({arcadeResult:{type:"number",value:s},name:"length",isMetadata:!0,t9nStrings:n})}</calcite-tree>`,p=({arcadeResult:e,name:t,isMetadata:s=!1,expanded:n,t9nStrings:r})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":let{type:i,value:o}=y(e);return a`<calcite-tree-item><div class="tree-item-label">${d({name:t,isMetadata:s})}${v({type:i,value:o})}</div></calcite-tree-item>`;case"array":{let h=e.value??[],x=h.slice(0,u);return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}${R({arcadeResult:e,t9nStrings:r})}</div>${C({items:x,arrayLength:h.length,subtree:!0,t9nStrings:r})}</calcite-tree-item>`}case"geometry":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${M({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${f({obj:e.value.castAsJson(),subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return a`<calcite-tree-item .expanded=${n} @click=${$.onClick}><div class="tree-item-label">${d({name:t,isMetadata:s})}<bdi>${c(e.type)}</bdi></div>${T({value:e.value,subtree:!0,t9nStrings:r})}</calcite-tree-item>`;default:return null}},I=({arcadeResult:e})=>{let t=S(e.value.fields);return a`<div class="table-scroll"><table><thead><tr>${t.map(s=>a`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>a`<tr>${t.map(n=>{let r=m(s.field(n.name));if(!k(r))return a`<td></td>`;try{let{type:i,value:o}=y(r);return a`<td>${v({type:i,value:o})}</td>`}catch{return a`<td></td>`}})}</tr>`)}</tbody></table></div>`};return{a:l,b:R,c:T,d:G,e:C,f:I}},d,e)
@@ -1,3 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as I}from"./T5PTHYE5.js";import e from"./BEDXEPMS.js";import d from"./4XMC5J5W.js";import c from"./STN3LSQR.js";import{c as E}from"./3PBQ47BB.js";import"./OLNYBWUC.js";import"./P37AQWGL.js";import"./MZMKV7FA.js";import{a as u}from"./DBVA54U6.js";import"./EHMFQPTC.js";import"./NP37C536.js";import"./XSKI5PRU.js";import"./ECNI2A4K.js";import"./XRUKVCVF.js";import{E as g,F as m,G as _,H as b,K as f,h as p,j as o,n as r,t as h}from"./XU7YAUUX.js";import{b as a}from"./VGOFAQ7A.js";import"./257WOXQH.js";import"./R2XZZWNP.js";import"./QTLHVR4Y.js";import"./TEXAGKBD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,,,,,,{E:l},{c:d},{a:S,b:v,c:$,d:y}])=>{var x=p`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`,n=class extends _{constructor(){super(...arguments),this._codeEditorElt=g(),this._disposables=[],this._modelId=h(),this.messages=u(),this._preparing=!1,this._resolvedLanguage=d,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.openedSidePanel="none",this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_editorProfile:16,_preparing:16,_resolvedLanguage:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5,messageOverrides:0,openedSidePanel:3,editorOptions:0,editorInstance:32}}static{this.styles=[x]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateDataModelDeps().catch(a(this))}willUpdate(e){e.has("profile")&&this._updateDataModelDeps().catch(a(this))}async loaded(){let e=I();this._disposables.push(e.onDiagnosticsChange(t=>{t.uri.toString()===this._modelId&&!this._preparing&&this.arcgisDiagnosticsChange.emit(t.diagnostics)}))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose();y().forEach(e=>e.disposeForModel(this._modelId))}async _updateDataModelDeps(){this._preparing=!0;try{let e=await S(this.profile);e!==this._resolvedLanguage&&($(this._resolvedLanguage)?.disposeForModel(this._modelId),this._resolvedLanguage=e);let t=v(this._resolvedLanguage);await t.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=t.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0,this._resolvedLanguage=d}finally{this._preparing=!1}}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_toggleSidePanel(e){this.openedSidePanel=this.openedSidePanel===e?"none":e,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(a(this))}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}async _onItemSelected(e){e.stopPropagation();let t=this._getSelectedTableVariable(e.detail);if(!t){this._codeEditorElt.value?.insertText(e.detail).catch(a(this));return}await t.loadSource();let i,c=t.fieldInfos.filter(s=>s.type==="geometry"&&!i?(i=s.name,!0):s.type!=="geometry").map(s=>s.name).filter(Boolean),P=`select ${c.length?c.join(", "):"*"} from ${t.snippet}`;E(this._codeEditorElt.value?.editorInstance,P,"replace","")}_getTablesVariable(){return this._editorProfile?.variables.find(l)}_getSelectedTableVariable(e){let t=this._getTablesVariable();if(l(t))return t.tableVariables.find(i=>i.snippet===e)}render(){let e=this._getTablesVariable(),t=String(this.messages.placeholderexample??"Example: {sqlQueryExample}").replace("{sqlQueryExample}","select field1, field2 from db.dataset"),i=`${this.messages.placeholder??"Start filtering data using SQL query syntax"}
3
- ${t}`;return o`<arcgis-code-editor-shell><arcgis-code-editor slot=editor .language=${this._resolvedLanguage} .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} .editorOptions=${{placeholder:i,...this.editorOptions}} ${m(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar&&o`<arcgis-editor-variables slot=side-panel .variable=${e} .heading=${this.messages.tables??"Tables"} .messageOverrides=${{profileempty:this.messages.profileempty}} .closed=${this.openedSidePanel!=="variables"} class=${b(this.openedSidePanel==="variables"?"":"hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._onItemSelected} @arcgisInternalClosePanel=${()=>{this.openedSidePanel="none"}} data-panel-name=none></arcgis-editor-variables><calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=tables-action .text=${this.messages.tables??"Tables"} icon=table .active=${this.openedSidePanel==="variables"} data-panel-name=variables @click=${()=>this._toggleSidePanel("variables")}></calcite-action>${!this.sideActionBarExpanded&&o`<calcite-tooltip reference-element=tables-action><span>${this.messages.tables??"Tables"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</arcgis-code-editor-shell>`}};f("arcgis-sql-layer-editor",n);return n},"portal/PortalItem","WebMap","WebScene","layers/FeatureLayer","applications/Components/arcadeEditorUtils","core/Error","portal/Portal",c,d,e)
2
+ import{b as I}from"./T5PTHYE5.js";import d from"./PXKBNRBR.js";import c from"./UTTEHEMP.js";import a from"./STN3LSQR.js";import{c as E}from"./HXJFZ2Y5.js";import"./OLNYBWUC.js";import"./P37AQWGL.js";import"./MZMKV7FA.js";import{a as u}from"./MFDNJU3K.js";import"./B73HLERI.js";import"./NP37C536.js";import"./XSKI5PRU.js";import"./ECNI2A4K.js";import"./XRUKVCVF.js";import{E as g,F as m,G as _,H as b,K as f,h as p,j as s,n as r,t as h}from"./PJBI5XFD.js";import{b as o}from"./VGOFAQ7A.js";import"./257WOXQH.js";import"./R2XZZWNP.js";import"./QTLHVR4Y.js";import"./TEXAGKBD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,,,,,,,{E:l},{c:d},{a:S,b:v,c:$,d:y}])=>{var P=p`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`,n=class extends _{constructor(){super(...arguments),this._codeEditorElt=g(),this._disposables=[],this._modelId=h(),this.messages=u(),this._preparing=!1,this._resolvedLanguage=d,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.openedSidePanel="none",this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_editorProfile:16,_preparing:16,_resolvedLanguage:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5,messageOverrides:0,openedSidePanel:3,editorOptions:0,editorInstance:32}}static{this.styles=[P]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateDataModelDeps().catch(o(this))}willUpdate(e){e.has("profile")&&this._updateDataModelDeps().catch(o(this))}async loaded(){let e=I();this._disposables.push(e.onDiagnosticsChange(t=>{t.uri.toString()===this._modelId&&!this._preparing&&this.arcgisDiagnosticsChange.emit(t.diagnostics)}))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose();y().forEach(e=>e.disposeForModel(this._modelId))}async _updateDataModelDeps(){this._preparing=!0;try{let e=await S(this.profile);e!==this._resolvedLanguage&&($(this._resolvedLanguage)?.disposeForModel(this._modelId),this._resolvedLanguage=e);let t=v(this._resolvedLanguage);await t.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=t.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0,this._resolvedLanguage=d}finally{this._preparing=!1}}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_toggleSidePanel(e){this.openedSidePanel=this.openedSidePanel===e?"none":e}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}async _onItemSelected(e){e.stopPropagation();let t=this._getSelectedTableVariable(e.detail);if(!t){this._codeEditorElt.value?.insertText(e.detail).catch(o(this));return}await t.loadSource();let i,c=t.fieldInfos.filter(a=>a.type==="geometry"&&!i?(i=a.name,!0):a.type!=="geometry").map(a=>a.name).filter(Boolean),x=`select ${c.length?c.join(", "):"*"} from ${t.snippet}`;E(this._codeEditorElt.value?.editorInstance,x,"replace","")}_getTablesVariable(){return this._editorProfile?.variables.find(l)}_getSelectedTableVariable(e){let t=this._getTablesVariable();if(l(t))return t.tableVariables.find(i=>i.snippet===e)}render(){let e=this._getTablesVariable(),t=String(this.messages.placeholderexample??"Example: {sqlQueryExample}").replace("{sqlQueryExample}","select field1, field2 from db.dataset"),i=`${this.messages.placeholder??"Start filtering data using SQL query syntax"}
3
+ ${t}`;return s`<arcgis-code-editor-shell><arcgis-code-editor slot=editor .language=${this._resolvedLanguage} .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} .editorOptions=${{placeholder:i,...this.editorOptions}} ${m(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar&&s`<arcgis-editor-variables slot=side-panel .variable=${e} .heading=${this.messages.tables??"Tables"} .messageOverrides=${{profileempty:this.messages.profileempty}} .closed=${this.openedSidePanel!=="variables"} class=${b(this.openedSidePanel==="variables"?"":"hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._onItemSelected} @arcgisInternalClosePanel=${()=>{this.openedSidePanel="none"}} data-panel-name=none></arcgis-editor-variables><calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=tables-action .text=${this.messages.tables??"Tables"} icon=table .active=${this.openedSidePanel==="variables"} data-panel-name=variables @click=${()=>this._toggleSidePanel("variables")}></calcite-action>${!this.sideActionBarExpanded&&s`<calcite-tooltip reference-element=tables-action><span>${this.messages.tables??"Tables"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</arcgis-code-editor-shell>`}};f("arcgis-sql-layer-editor",n);return n},"portal/PortalItem","WebMap","WebScene","layers/FeatureLayer","applications/Components/arcadeEditorUtils","core/Error","portal/Portal",a,c,d)