@arcgis/coding-components 5.1.0-next.96 → 5.1.0-next.97
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/PPV6RAZ3.js +2 -0
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +85 -69
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/XN56YGFQ.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as b}from"./64X4ILDM.js";import h from"./YE7HDVYS.js";import e from"./4B64NBIM.js";import{a as E}from"./ER2MKLVA.js";import d from"./7Z4V2ZOD.js";import c from"./TNA5F36E.js";import"./HPZZVB4X.js";import"./MP6Z45SA.js";import"./IFNCCZ7O.js";import a from"./GLJQQLP2.js";import{a as T}from"./SB3MM5EM.js";import{a as y}from"./KCU2C44H.js";import"./GS2ISVXJ.js";import{c as S,e as k}from"./6G5URSC7.js";import"./6C52UOYL.js";import{G as w,H as x,I as g,K as $,h as u,j as r,t as f}from"./REL6OK2I.js";import"./Y3KOWWO5.js";import"./B3UMUBOI.js";import"./CF3TERM3.js";import"./Z5ZZ36DQ.js";import{Zk as P}from"./LLPQEURF.js";import"./3TTFCHAA.js";export default $arcgis.t(([,{h:m,i:L,j:M},{a:l},{a:p},{a:z,b:C,c:h,d:A,e:B,f:I,g:N,h:F,i:D}])=>{var V=u`:host{--calcite-block-padding: var(--calcite-spacing-sm);--breakpoints-popover-max-height: min(14rem, 20vh);display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);overflow:hidden;height:100%;.console-shell,.tabs-container,calcite-tabs{height:100%}.tabs-container{flex:1 1 auto;min-height:0;overflow:hidden}.console-shell,calcite-tabs{display:flex;flex-direction:column;min-height:0}.console-shell{container-type:size;container-name:debugger-console}calcite-tab-nav{--calcite-size-2xl: var(--calcite-space-md);justify-content:flex-start;padding-inline:var(--calcite-spacing-sm)}calcite-tab-title{font-size:var(--calcite-font-size-sm)}calcite-tab{--calcite-tab-content-block-padding: 0;--calcite-tab-content-space-y: 0;display:flex;flex-direction:column;min-height:0}calcite-tab:not([selected]){display:none}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;text-align:center;display:block;padding:var(--calcite-spacing-md)}.breakpoint-header{display:flex;align-items:flex-start;gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1)}.load-action{--calcite-action-background-color: var(--calcite-color-foreground-2);--calcite-internal-action-height: 1.25rem;--calcite-internal-action-padding-block: 0;--calcite-internal-action-padding-inline: var(--calcite-spacing-xs);margin-block:var(--calcite-spacing-xxs)}.breakpoint-code-viewer{margin-block:0;width:100%}.tab-panel{display:flex;flex:1 1 auto;min-height:0;overflow:hidden}.tab-panel>*{flex:1 1 auto;min-height:0}.tab-panel>calcite-tree{margin-inline-end:var(--calcite-space-sm)}.preview-panel{display:flex;flex:1 1 auto;min-height:0}.preview-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--calcite-spacing-md)}.preview-table-shell{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-height:0;overflow:hidden}.preview-table-summary{padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);color:var(--calcite-color-text-2);font-family:var(--calcite-code-family);background-color:var(--calcite-color-foreground-1)}.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-sm)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}.breakpoints-popover{--calcite-popover-max-size-x: min(22rem, 68vw)}.breakpoints-popover-content{max-block-size:var(--breakpoints-popover-max-height);overflow:hidden}.breakpoints-list{display:flex;flex-direction:column;gap:var(--calcite-spacing-xs);padding:var(--calcite-spacing-xs);min-width:min(18rem,58vw);max-block-size:var(--breakpoints-popover-max-height);overflow:auto}.breakpoints-popover .breakpoint-code-viewer{--calcite-font-size--2: var(--calcite-font-size--3);--calcite-spacing-md: var(--calcite-spacing-sm);--calcite-spacing-sm: var(--calcite-spacing-xs);--calcite-spacing-xs: var(--calcite-spacing-xxs)}.breakpoint-list-item{border:1px solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sharp);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.breakpoint-list-item--current{border-color:var(--calcite-color-brand)}.breakpoint-list-item-meta{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xs);margin-bottom:var(--calcite-spacing-xxs)}}`,v=class extends w{constructor(){super(...arguments),this.messages=T(),this._monacoEditor=y(E),this._breakpointPopoverId=`arcade-debugger-console-breakpoints-${f()}`,this.modelId=""}static{this.properties={debuggerStore:0,modelId:1}}static{this.styles=[V,M,L()]}get breakpoints(){return this.debuggerStore?.debuggerBreakpoints??[]}get previewTabsState(){return this.debuggerStore.previewTabsState}get lazyTreeState(){return this.debuggerStore?.lazyTreeState}get executionProgramState(){return this.debuggerStore?.executionState?.result}load(){this.manager.onLifecycle(()=>{let e=S(this.el,["class"],this.updateTheme.bind(this));return this.updateTheme(),()=>e()})}getContentAtLine(e){if(!this.modelId)return"";let t=this._monacoEditor.getModel(P.parse(this.modelId));return t?t.getLineContent(e):""}updateTheme(){k(this.el)==="dark"?this.elementInternals.states.add(m):this.elementInternals.states.delete(m)}getBreakpointCode(e){return e==null?this.messages.nocontent??"No content":this.getContentAtLine(e)||(this.messages.nocontent??"No content")}getPreviewLoadErrorMessage(){return this.messages.previewloaderror??"Unable to load preview."}getBreakpointPositionText(e){return(this.messages.breakpointposition??"{position} of {count}"??"{position} of {count}").replace("{position}",String(e)).replace("{count}",String(this.breakpoints.length))}findCollectionItemByPreviewSegment(e,t){if(t.startsWith("name:")){let i=t.slice(5);return e.find(a=>a.name===i)?.featureSet}if(t.startsWith("id:")){let i=t.slice(3);return e.find(a=>String(a.id)===i)?.featureSet}}getExpandedDebuggerMap(e){if(e==null||!h(e))return null;let t=e.expand();return Array.isArray(t)?null:t}getPreviewRows(e){return e.map(t=>this.getExpandedDebuggerMap(t)||new Map)}getExpandedDebuggerChild(e,t){if(!e||!h(e))return;let i=e.expand();if(Array.isArray(i)){let a=Number(t);return!Number.isInteger(a)||String(a)!==t?void 0:i[a]}return i.get(t)}async resolvePreviewValueFromSegments(e,t){if(!t.length)return e;if(!e)return;let[i,...a]=t,o;if(N(e)){let s=await e.load();o=this.findCollectionItemByPreviewSegment(s,i)}else o=this.getExpandedDebuggerChild(e,i);return await this.resolvePreviewValueFromSegments(o,a)}getScope(e,t){switch(t){case"profile":return e.profile;case"globals":return e.globals;case"locals":return e.locals}}async resolvePreviewValue(e){let t=this.executionProgramState;if(!t)return;let i=C(e);if(!i)return;let{scopeName:a,rootName:o,pathSegments:s}=i,c=this.getScope(t,a);if(c)return await this.resolvePreviewValueFromSegments(c.get(o),s)}async loadPreview({label:e,sourcePath:t,value:i}){let a=this.previewTabsState,{snapshot:o}=a.startLoad(e,t),s=i;if(s==null)try{s=await this.resolvePreviewValue(t)}catch{a.setError(o,this.getPreviewLoadErrorMessage());return}if(s==null||!I(s)||typeof s.querySample!="function"||typeof s.schema!="function"){a.setUnavailable(o,this.messages.previewunavailable??"This preview is no longer available in the current paused state.");return}try{let{fields:c,features:d}=await s.querySample(),n=this.getPreviewRows(d);a.setLoaded(o,c,n)}catch{a.setError(o,this.getPreviewLoadErrorMessage())}}activateTab(e){if(e===p){this.previewTabsState.selectScope();return}this.previewTabsState.selectTab(e);let t=this.previewTabsState.getTab(e);t?.invalidated&&this.loadPreview({label:t.label,sourcePath:t.sourcePath})}closePreviewTab(e){e.closed=!1,this.previewTabsState.closeTab(e.tab)}scrollToSelectedBreakpoint(e){let t=e.currentTarget;requestAnimationFrame(()=>{t?.querySelector(".breakpoint-list-item--current")?.scrollIntoView({block:"center"})})}sortScopeEntries(e){return e.sort(([t],[i])=>t.localeCompare(i))}renderPreviewLabel(e){return r`<bdi>${e}</bdi>`}renderPreviewCell(e){return e?B(e)||A(e)?D({value:e}):r`<span class="xs"></span>`:r`<span class="xs"></span>`}renderScopeEntryForScope(e,t,i){let[a,o]=i,s=`${t}.${a}`,c=this.lazyTreeState;return c?F({name:a,value:o,messages:this.messages,path:`${e}.${a}`,lazyTreeState:c,previewLabel:s,previewSourcePath:z(e,a),previewLoading:this.previewTabsState.isTabLoading(s),onLoadPreview:d=>{this.loadPreview(d)}}):null}renderBreakpointPopover(e){return this.breakpoints.length?r`<calcite-popover .referenceElement=${this._breakpointPopoverId} placement=bottom-end scale=s auto-close focus-trap-disabled @calcitePopoverOpen=${t=>this.scrollToSelectedBreakpoint(t)} .label=${this.messages.breakpoints??"Breakpoints"} class="breakpoints-popover" .heading=${this.messages.breakpoints??"Breakpoints"} heading-level=2><div class="breakpoints-popover-content"><div class="breakpoints-list">${this.breakpoints.map((t,i)=>r`<div class=${x(t.line===e?"breakpoint-list-item breakpoint-list-item--current":"breakpoint-list-item")}><div class="breakpoint-list-item-meta"><bdi>${this.getBreakpointPositionText(i+1)}</bdi></div><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${a=>String(a+t.line-1)}>${this.getBreakpointCode(t.line)}</arcgis-code-viewer></div>`)}</div></div></calcite-popover>`:null}renderScopePanel(){let e=this.executionProgramState,t=this.sortScopeEntries(Array.from(e?.profile??[])),i=this.sortScopeEntries(Array.from(e?.globals??[])),a=e?.locals?this.sortScopeEntries(Array.from(e?.locals??[])):void 0,o=!!e?.locals,s=a&&a.length>0,c=t.length>0,d=i.length>0;return e?r`<calcite-tree .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect} .lines=${l.lines} .selectionMode=${l.selectionMode}><calcite-tree-item expanded .disabled=${!s}>${this.messages.local??"Local"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${o?s?a.map(n=>this.renderScopeEntryForScope("locals",this.messages.local??"Local",n)):r`<span><i>${this.messages.empty??"Empty"}</i></span>`:r`<span><i>${this.messages.nolocalscope??"No local scope"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!d}>${this.messages.global??"Global"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${d?i.map(n=>this.renderScopeEntryForScope("globals",this.messages.global??"Global",n)):r`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!c}>${this.messages.profile??"Profile"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${c?t.map(n=>this.renderScopeEntryForScope("profile",this.messages.profile??"Profile",n)):r`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item></calcite-tree>`:this.debuggerStore?.isExecuting?r`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"} .text=${this.messages.loading??"Loading"}></calcite-loader></div>`:r`<span class="disabled-state-text">${this.messages.notpaused??"Not paused"}</span>`}renderPreviewPanel(e){switch(e.status){case"loading":return r`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loadingpreview??"Loading preview"} .text=${this.messages.loadingpreview??"Loading preview"}></calcite-loader></div>`;case"unavailable":case"error":return r`<span class="disabled-state-text">${e.message}</span>`;case"loaded":let{fields:t,label:i,rows:a}=e;return!a.length||!t.length?r`<span class="disabled-state-text">${this.messages.nopreviewrows??"No preview rows available."}</span>`:r`<div class="preview-table-shell"><div class="preview-table-summary">${this.renderPreviewLabel(i)}</div><div class="table-scroll"><table><thead><tr>${t.map(o=>r`<th><bdi>${o}</bdi></th>`)}</tr></thead><tbody>${a.map(o=>r`<tr>${t.map(s=>r`<td>${this.renderPreviewCell(o.get(s))}</td>`)}</tr>`)}</tbody></table></div></div>`;default:return r`<span class="disabled-state-text">${this.messages.nopreviewloaded??"Select a FeatureSet variable and load a preview."}</span>`}}renderTabs(){let e=this.previewTabsState.activeTabId;return r`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${p} .selected=${e===p} @calciteTabsActivate=${t=>this.activateTab(t.target.tab)}>${this.messages.scope??"Scope"}</calcite-tab-title>${b(this.previewTabsState.tabs,t=>`title-${t.id}`,t=>r`<calcite-tab-title .tab=${t.id} title=${t.label??g} closable .selected=${e===t.id} @calciteTabsActivate=${i=>this.activateTab(i.target.tab)} @calciteTabsClose=${i=>this.closePreviewTab(i.target)}><bdi>${t.title}</bdi></calcite-tab-title>`)}</calcite-tab-nav><calcite-tab .tab=${p} .selected=${e===p}><div class="tab-panel">${this.renderScopePanel()}</div></calcite-tab>${b(this.previewTabsState.tabs,t=>`panel-${t.id}`,t=>r`<calcite-tab .tab=${t.id} .selected=${e===t.id}><div class="tab-panel preview-panel">${this.renderPreviewPanel(t)}</div></calcite-tab>`)}</calcite-tabs>`}render(){let{line:e}=this.debuggerStore?.executionState??{},t=this.breakpoints.find(a=>a.line===e),i=this.breakpoints.findIndex(a=>a.line===e);return r`<div class="console-shell"><div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${a=>String(a+(t?.line??e??1)-1)}>${this.getBreakpointCode(t?.line??this.breakpoints[0]?.line??e??1)}</arcgis-code-viewer>${this.breakpoints.length?r`<calcite-action id=${this._breakpointPopoverId??g} scale=s .text=${this.getBreakpointPositionText(i>=0?i+1:1)} text-enabled icon=chevron-down></calcite-action>`:null}${this.renderBreakpointPopover(t?.line??e)}</div><div class="tabs-container">${this.renderTabs()}</div></div>`}};$("arcgis-arcade-debugger-console",v);return v},a,c,d,e,h)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"breakpoints":"Breakpoints","breakpointposition":"{position} of {count}","nocontent":"No content","scope":"Scope","notpaused":"Not paused","global":"Global","local":"Local","nolocalscope":"No local scope","loadpreview":"Load preview","loading":"Loading","loaderror":"Unable to load data.","nopreviewloaded":"Select a FeatureSet variable in the Scope tab and choose 'Load preview' to inspect sample rows.","loadingpreview":"Loading preview","nopreviewrows":"No preview rows available.","previewloaderror":"Unable to load preview.","previewunavailable":"This preview is no longer available in the current paused state.","showmore":"Show more","uninitialized":"uninitialized"}
|
|
1
|
+
{"breakpoints":"Breakpoints","breakpointposition":"{position} of {count}","nocontent":"No content","scope":"Scope","notpaused":"Not paused","profile":"Profile","global":"Global","local":"Local","nolocalscope":"No local scope","empty":"Empty","loadpreview":"Load preview","loading":"Loading","loaderror":"Unable to load data.","nopreviewloaded":"Select a FeatureSet variable in the Scope tab and choose 'Load preview' to inspect sample rows.","loadingpreview":"Loading preview","nopreviewrows":"No preview rows available.","previewloaderror":"Unable to load preview.","previewunavailable":"This preview is no longer available in the current paused state.","showmore":"Show more","uninitialized":"uninitialized"}
|
|
@@ -18248,7 +18248,7 @@ function se(t, e, r, n) {
|
|
|
18248
18248
|
const cr = { apiKey: void 0, apiKeys: { scopes: [] }, applicationName: "", applicationUrl: globalThis.location?.href, assetsPath: "", fontsUrl: "https://static.arcgis.com/fonts", geometryServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer", geoRSSServiceUrl: "https://utility.arcgis.com/sharing/rss", kmlServiceUrl: "https://utility.arcgis.com/sharing/kml", userPrivilegesApplied: !0, portalUrl: "https://www.arcgis.com", respectPrefersReducedMotion: !0, routeServiceUrl: "https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World", workers: { loaderConfig: { has: {}, paths: {}, map: {}, packages: [] } }, request: { crossOriginNoCorsDomains: null, httpsDomains: ["arcgis.com", "arcgisonline.com", "esrikr.com", "premiumservices.blackbridge.com", "esripremium.accuweather.com", "gbm.digitalglobe.com", "firstlook.digitalglobe.com", "msi.digitalglobe.com"], interceptors: [], internalInterceptors: [], maxUrlLength: 2e3, priority: "high", proxyRules: [], proxyUrl: null, timeout: 62e3, trustedServers: [], useIdentity: !0 }, log: { interceptors: [], level: null } };
|
|
18249
18249
|
if (globalThis.esriConfig && (H4(cr, globalThis.esriConfig, !0), delete cr.has), !cr.assetsPath) {
|
|
18250
18250
|
{
|
|
18251
|
-
const t = "5.1.0-next.
|
|
18251
|
+
const t = "5.1.0-next.94";
|
|
18252
18252
|
cr.assetsPath = `https://cdn.jsdelivr.net/npm/@arcgis/core@${t}/assets`;
|
|
18253
18253
|
}
|
|
18254
18254
|
cr.defaultAssetsPath = cr.assetsPath;
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{J as s,v as e}from"./REL6OK2I.js";import"./Y3KOWWO5.js";import"./3TTFCHAA.js";var r=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./YTQ4K7PQ.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-debugger-console":[()=>import("./
|
|
2
|
+
import{J as s,v as e}from"./REL6OK2I.js";import"./Y3KOWWO5.js";import"./3TTFCHAA.js";var r=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./YTQ4K7PQ.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-debugger-console":[()=>import("./PPV6RAZ3.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./7NI24N24.js"),"debuggerStore:,result:"],"arcgis-arcade-editor":[()=>import("./WP6BSOSW.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,enableDebugger,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./363GMMQ6.js"),"consoleLogs:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./WL2QW4SI.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./GHTOL7NB.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./WN4UL6U4.js")],"arcgis-code-viewer":[()=>import("./TSZHSRGH.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./UCX6WHKQ.js"),"closed,heading,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./NWLOXWV6.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./SATQDL5P.js"),"hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./GVMVHGSK.js"),"editorInstance:,editorOptions:,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});r({resourcesUrl:import.meta.url});var i=new CSSStyleSheet;i.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,i];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as v } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as u, html as r } from "lit";
|
|
4
|
-
import { repeat as
|
|
5
|
-
import { LitElement as f, safeClassMap as w, nothing as
|
|
4
|
+
import { repeat as g } from "lit/directives/repeat.js";
|
|
5
|
+
import { LitElement as f, safeClassMap as w, nothing as b } from "@arcgis/lumina";
|
|
6
6
|
import { u as x } from "../../chunks/useT9n.js";
|
|
7
|
-
import { load as
|
|
8
|
-
import { i as
|
|
7
|
+
import { load as S } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { i as $ } from "../../chunks/monaco-importer.js";
|
|
9
9
|
import { t as l } from "../../chunks/functional.js";
|
|
10
|
-
import { d as
|
|
11
|
-
import { i as
|
|
12
|
-
import { observeAncestorsMutation as
|
|
13
|
-
import { generateGuid as
|
|
14
|
-
import { d as
|
|
15
|
-
import { Uri as
|
|
16
|
-
const
|
|
17
|
-
class
|
|
10
|
+
import { d as k, g as y, c as m } from "../../chunks/debugger-value-styles.js";
|
|
11
|
+
import { i as h, a as P, p as T, b as E, c as L, d as C, S as M, D as B, e as V } from "../../chunks/debugger-value-components.js";
|
|
12
|
+
import { observeAncestorsMutation as z, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
|
|
13
|
+
import { generateGuid as A } from "@arcgis/toolkit/string";
|
|
14
|
+
import { d as p } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
|
|
15
|
+
import { Uri as D } from "monaco-editor";
|
|
16
|
+
const F = u`:host{--calcite-block-padding: var(--calcite-spacing-sm);--breakpoints-popover-max-height: min(14rem, 20vh);display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);overflow:hidden;height:100%;.console-shell,.tabs-container,calcite-tabs{height:100%}.tabs-container{flex:1 1 auto;min-height:0;overflow:hidden}.console-shell,calcite-tabs{display:flex;flex-direction:column;min-height:0}.console-shell{container-type:size;container-name:debugger-console}calcite-tab-nav{--calcite-size-2xl: var(--calcite-space-md);justify-content:flex-start;padding-inline:var(--calcite-spacing-sm)}calcite-tab-title{font-size:var(--calcite-font-size-sm)}calcite-tab{--calcite-tab-content-block-padding: 0;--calcite-tab-content-space-y: 0;display:flex;flex-direction:column;min-height:0}calcite-tab:not([selected]){display:none}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;text-align:center;display:block;padding:var(--calcite-spacing-md)}.breakpoint-header{display:flex;align-items:flex-start;gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1)}.load-action{--calcite-action-background-color: var(--calcite-color-foreground-2);--calcite-internal-action-height: 1.25rem;--calcite-internal-action-padding-block: 0;--calcite-internal-action-padding-inline: var(--calcite-spacing-xs);margin-block:var(--calcite-spacing-xxs)}.breakpoint-code-viewer{margin-block:0;width:100%}.tab-panel{display:flex;flex:1 1 auto;min-height:0;overflow:hidden}.tab-panel>*{flex:1 1 auto;min-height:0}.tab-panel>calcite-tree{margin-inline-end:var(--calcite-space-sm)}.preview-panel{display:flex;flex:1 1 auto;min-height:0}.preview-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--calcite-spacing-md)}.preview-table-shell{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-height:0;overflow:hidden}.preview-table-summary{padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);color:var(--calcite-color-text-2);font-family:var(--calcite-code-family);background-color:var(--calcite-color-foreground-1)}.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-sm)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}.breakpoints-popover{--calcite-popover-max-size-x: min(22rem, 68vw)}.breakpoints-popover-content{max-block-size:var(--breakpoints-popover-max-height);overflow:hidden}.breakpoints-list{display:flex;flex-direction:column;gap:var(--calcite-spacing-xs);padding:var(--calcite-spacing-xs);min-width:min(18rem,58vw);max-block-size:var(--breakpoints-popover-max-height);overflow:auto}.breakpoints-popover .breakpoint-code-viewer{--calcite-font-size--2: var(--calcite-font-size--3);--calcite-spacing-md: var(--calcite-spacing-sm);--calcite-spacing-sm: var(--calcite-spacing-xs);--calcite-spacing-xs: var(--calcite-spacing-xxs)}.breakpoint-list-item{border:1px solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sharp);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.breakpoint-list-item--current{border-color:var(--calcite-color-brand)}.breakpoint-list-item-meta{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xs);margin-bottom:var(--calcite-spacing-xxs)}}`;
|
|
17
|
+
class N extends f {
|
|
18
18
|
constructor() {
|
|
19
|
-
super(...arguments), this.messages = x(), this._monacoEditor =
|
|
19
|
+
super(...arguments), this.messages = x(), this._monacoEditor = S($), this._breakpointPopoverId = `arcade-debugger-console-breakpoints-${A()}`, this.modelId = "";
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
22
|
this.properties = { debuggerStore: 0, modelId: 1 };
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
|
-
this.styles = [
|
|
25
|
+
this.styles = [F, k, y()];
|
|
26
26
|
}
|
|
27
27
|
get breakpoints() {
|
|
28
28
|
return this.debuggerStore?.debuggerBreakpoints ?? [];
|
|
@@ -33,20 +33,23 @@ class F extends f {
|
|
|
33
33
|
get lazyTreeState() {
|
|
34
34
|
return this.debuggerStore?.lazyTreeState;
|
|
35
35
|
}
|
|
36
|
+
get executionProgramState() {
|
|
37
|
+
return this.debuggerStore?.executionState?.result;
|
|
38
|
+
}
|
|
36
39
|
load() {
|
|
37
40
|
this.manager.onLifecycle(() => {
|
|
38
|
-
const e =
|
|
41
|
+
const e = z(this.el, ["class"], this.updateTheme.bind(this));
|
|
39
42
|
return this.updateTheme(), () => e();
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
getContentAtLine(e) {
|
|
43
46
|
if (!this.modelId)
|
|
44
47
|
return "";
|
|
45
|
-
const t = this._monacoEditor.getModel(
|
|
48
|
+
const t = this._monacoEditor.getModel(D.parse(this.modelId));
|
|
46
49
|
return t ? t.getLineContent(e) : "";
|
|
47
50
|
}
|
|
48
51
|
updateTheme() {
|
|
49
|
-
|
|
52
|
+
I(this.el) === "dark" ? this.elementInternals.states.add(m) : this.elementInternals.states.delete(m);
|
|
50
53
|
}
|
|
51
54
|
getBreakpointCode(e) {
|
|
52
55
|
return e == null ? this.messages.nocontent ?? "No content" : this.getContentAtLine(e) || (this.messages.nocontent ?? "No content");
|
|
@@ -59,84 +62,94 @@ class F extends f {
|
|
|
59
62
|
}
|
|
60
63
|
findCollectionItemByPreviewSegment(e, t) {
|
|
61
64
|
if (t.startsWith("name:")) {
|
|
62
|
-
const
|
|
63
|
-
return e.find((
|
|
65
|
+
const a = t.slice(5);
|
|
66
|
+
return e.find((i) => i.name === a)?.featureSet;
|
|
64
67
|
}
|
|
65
68
|
if (t.startsWith("id:")) {
|
|
66
|
-
const
|
|
67
|
-
return e.find((
|
|
69
|
+
const a = t.slice(3);
|
|
70
|
+
return e.find((i) => String(i.id) === a)?.featureSet;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
getExpandedDebuggerMap(e) {
|
|
71
|
-
if (e == null || !
|
|
74
|
+
if (e == null || !h(e))
|
|
72
75
|
return null;
|
|
73
76
|
const t = e.expand();
|
|
74
77
|
return Array.isArray(t) ? null : t;
|
|
75
78
|
}
|
|
76
79
|
getPreviewRows(e) {
|
|
77
80
|
return e.map((t) => {
|
|
78
|
-
const
|
|
79
|
-
return
|
|
81
|
+
const a = this.getExpandedDebuggerMap(t);
|
|
82
|
+
return a || /* @__PURE__ */ new Map();
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
getExpandedDebuggerChild(e, t) {
|
|
83
|
-
if (!e || !
|
|
86
|
+
if (!e || !h(e))
|
|
84
87
|
return;
|
|
85
|
-
const
|
|
86
|
-
if (Array.isArray(
|
|
87
|
-
const
|
|
88
|
-
return !Number.isInteger(
|
|
88
|
+
const a = e.expand();
|
|
89
|
+
if (Array.isArray(a)) {
|
|
90
|
+
const i = Number(t);
|
|
91
|
+
return !Number.isInteger(i) || String(i) !== t ? void 0 : a[i];
|
|
89
92
|
}
|
|
90
|
-
return
|
|
93
|
+
return a.get(t);
|
|
91
94
|
}
|
|
92
95
|
async resolvePreviewValueFromSegments(e, t) {
|
|
93
96
|
if (!t.length)
|
|
94
97
|
return e;
|
|
95
98
|
if (!e)
|
|
96
99
|
return;
|
|
97
|
-
const [
|
|
98
|
-
let
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
101
|
-
|
|
100
|
+
const [a, ...i] = t;
|
|
101
|
+
let o;
|
|
102
|
+
if (P(e)) {
|
|
103
|
+
const s = await e.load();
|
|
104
|
+
o = this.findCollectionItemByPreviewSegment(s, a);
|
|
102
105
|
} else
|
|
103
|
-
|
|
104
|
-
return await this.resolvePreviewValueFromSegments(
|
|
106
|
+
o = this.getExpandedDebuggerChild(e, a);
|
|
107
|
+
return await this.resolvePreviewValueFromSegments(o, i);
|
|
108
|
+
}
|
|
109
|
+
getScope(e, t) {
|
|
110
|
+
switch (t) {
|
|
111
|
+
case "profile":
|
|
112
|
+
return e.profile;
|
|
113
|
+
case "globals":
|
|
114
|
+
return e.globals;
|
|
115
|
+
case "locals":
|
|
116
|
+
return e.locals;
|
|
117
|
+
}
|
|
105
118
|
}
|
|
106
119
|
async resolvePreviewValue(e) {
|
|
107
|
-
const t = this.
|
|
120
|
+
const t = this.executionProgramState;
|
|
108
121
|
if (!t)
|
|
109
122
|
return;
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
123
|
+
const a = T(e);
|
|
124
|
+
if (!a)
|
|
112
125
|
return;
|
|
113
|
-
const { scopeName:
|
|
126
|
+
const { scopeName: i, rootName: o, pathSegments: s } = a, n = this.getScope(t, i);
|
|
114
127
|
if (n)
|
|
115
|
-
return await this.resolvePreviewValueFromSegments(n.get(
|
|
128
|
+
return await this.resolvePreviewValueFromSegments(n.get(o), s);
|
|
116
129
|
}
|
|
117
|
-
async loadPreview({ label: e, sourcePath: t, value:
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
if (
|
|
130
|
+
async loadPreview({ label: e, sourcePath: t, value: a }) {
|
|
131
|
+
const i = this.previewTabsState, { snapshot: o } = i.startLoad(e, t);
|
|
132
|
+
let s = a;
|
|
133
|
+
if (s == null)
|
|
121
134
|
try {
|
|
122
|
-
|
|
135
|
+
s = await this.resolvePreviewValue(t);
|
|
123
136
|
} catch {
|
|
124
|
-
|
|
137
|
+
i.setError(o, this.getPreviewLoadErrorMessage());
|
|
125
138
|
return;
|
|
126
139
|
}
|
|
127
|
-
if (
|
|
128
|
-
|
|
140
|
+
if (s == null || !E(s) || typeof s.querySample != "function" || typeof s.schema != "function") {
|
|
141
|
+
i.setUnavailable(o, this.messages.previewunavailable ?? "This preview is no longer available in the current paused state.");
|
|
129
142
|
return;
|
|
130
143
|
}
|
|
131
144
|
try {
|
|
132
|
-
const { fields: n, features: d } = await
|
|
133
|
-
|
|
145
|
+
const { fields: n, features: d } = await s.querySample(), c = this.getPreviewRows(d);
|
|
146
|
+
i.setLoaded(o, n, c);
|
|
134
147
|
} catch {
|
|
135
|
-
|
|
148
|
+
i.setError(o, this.getPreviewLoadErrorMessage());
|
|
136
149
|
}
|
|
137
150
|
}
|
|
138
151
|
activateTab(e) {
|
|
139
|
-
if (e ===
|
|
152
|
+
if (e === p) {
|
|
140
153
|
this.previewTabsState.selectScope();
|
|
141
154
|
return;
|
|
142
155
|
}
|
|
@@ -153,24 +166,27 @@ class F extends f {
|
|
|
153
166
|
t?.querySelector(".breakpoint-list-item--current")?.scrollIntoView({ block: "center" });
|
|
154
167
|
});
|
|
155
168
|
}
|
|
169
|
+
sortScopeEntries(e) {
|
|
170
|
+
return e.sort(([t], [a]) => t.localeCompare(a));
|
|
171
|
+
}
|
|
156
172
|
renderPreviewLabel(e) {
|
|
157
173
|
return r`<bdi>${e}</bdi>`;
|
|
158
174
|
}
|
|
159
175
|
renderPreviewCell(e) {
|
|
160
|
-
return e ?
|
|
176
|
+
return e ? L(e) || C(e) ? M({ value: e }) : r`<span class="xs"></span>` : r`<span class="xs"></span>`;
|
|
161
177
|
}
|
|
162
|
-
renderScopeEntryForScope(e, t,
|
|
163
|
-
const [
|
|
164
|
-
return n ?
|
|
178
|
+
renderScopeEntryForScope(e, t, a) {
|
|
179
|
+
const [i, o] = a, s = `${t}.${i}`, n = this.lazyTreeState;
|
|
180
|
+
return n ? B({ name: i, value: o, messages: this.messages, path: `${e}.${i}`, lazyTreeState: n, previewLabel: s, previewSourcePath: V(e, i), previewLoading: this.previewTabsState.isTabLoading(s), onLoadPreview: (d) => {
|
|
165
181
|
this.loadPreview(d);
|
|
166
182
|
} }) : null;
|
|
167
183
|
}
|
|
168
184
|
renderBreakpointPopover(e) {
|
|
169
|
-
return this.breakpoints.length ? r`<calcite-popover .referenceElement=${this._breakpointPopoverId} placement=bottom-end scale=s auto-close focus-trap-disabled @calcitePopoverOpen=${(t) => this.scrollToSelectedBreakpoint(t)} .label=${this.messages.breakpoints ?? "Breakpoints"} class="breakpoints-popover" .heading=${this.messages.breakpoints ?? "Breakpoints"} heading-level=2><div class="breakpoints-popover-content"><div class="breakpoints-list">${this.breakpoints.map((t,
|
|
185
|
+
return this.breakpoints.length ? r`<calcite-popover .referenceElement=${this._breakpointPopoverId} placement=bottom-end scale=s auto-close focus-trap-disabled @calcitePopoverOpen=${(t) => this.scrollToSelectedBreakpoint(t)} .label=${this.messages.breakpoints ?? "Breakpoints"} class="breakpoints-popover" .heading=${this.messages.breakpoints ?? "Breakpoints"} heading-level=2><div class="breakpoints-popover-content"><div class="breakpoints-list">${this.breakpoints.map((t, a) => r`<div class=${w(t.line === e ? "breakpoint-list-item breakpoint-list-item--current" : "breakpoint-list-item")}><div class="breakpoint-list-item-meta"><bdi>${this.getBreakpointPositionText(a + 1)}</bdi></div><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + t.line - 1)}>${this.getBreakpointCode(t.line)}</arcgis-code-viewer></div>`)}</div></div></calcite-popover>` : null;
|
|
170
186
|
}
|
|
171
187
|
renderScopePanel() {
|
|
172
|
-
const e = this.
|
|
173
|
-
return e ? r`<calcite-tree .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect} .lines=${l.lines} .selectionMode=${l.selectionMode}><calcite-tree-item expanded>${this.messages.global ?? "Global"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${
|
|
188
|
+
const e = this.executionProgramState, t = this.sortScopeEntries(Array.from(e?.profile ?? [])), a = this.sortScopeEntries(Array.from(e?.globals ?? [])), i = e?.locals ? this.sortScopeEntries(Array.from(e?.locals ?? [])) : void 0, o = !!e?.locals, s = i && i.length > 0, n = t.length > 0, d = a.length > 0;
|
|
189
|
+
return e ? r`<calcite-tree .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect} .lines=${l.lines} .selectionMode=${l.selectionMode}><calcite-tree-item expanded .disabled=${!s}>${this.messages.local ?? "Local"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${o ? s ? i.map((c) => this.renderScopeEntryForScope("locals", this.messages.local ?? "Local", c)) : r`<span><i>${this.messages.empty ?? "Empty"}</i></span>` : r`<span><i>${this.messages.nolocalscope ?? "No local scope"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!d}>${this.messages.global ?? "Global"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${d ? a.map((c) => this.renderScopeEntryForScope("globals", this.messages.global ?? "Global", c)) : r`<span><i>${this.messages.empty ?? "Empty"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!n}>${this.messages.profile ?? "Profile"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${n ? t.map((c) => this.renderScopeEntryForScope("profile", this.messages.profile ?? "Profile", c)) : r`<span><i>${this.messages.empty ?? "Empty"}</i></span>`}</calcite-tree></calcite-tree-item></calcite-tree>` : this.debuggerStore?.isExecuting ? r`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"} .text=${this.messages.loading ?? "Loading"}></calcite-loader></div>` : r`<span class="disabled-state-text">${this.messages.notpaused ?? "Not paused"}</span>`;
|
|
174
190
|
}
|
|
175
191
|
renderPreviewPanel(e) {
|
|
176
192
|
switch (e.status) {
|
|
@@ -180,22 +196,22 @@ class F extends f {
|
|
|
180
196
|
case "error":
|
|
181
197
|
return r`<span class="disabled-state-text">${e.message}</span>`;
|
|
182
198
|
case "loaded":
|
|
183
|
-
const { fields: t, label:
|
|
184
|
-
return !
|
|
199
|
+
const { fields: t, label: a, rows: i } = e;
|
|
200
|
+
return !i.length || !t.length ? r`<span class="disabled-state-text">${this.messages.nopreviewrows ?? "No preview rows available."}</span>` : r`<div class="preview-table-shell"><div class="preview-table-summary">${this.renderPreviewLabel(a)}</div><div class="table-scroll"><table><thead><tr>${t.map((o) => r`<th><bdi>${o}</bdi></th>`)}</tr></thead><tbody>${i.map((o) => r`<tr>${t.map((s) => r`<td>${this.renderPreviewCell(o.get(s))}</td>`)}</tr>`)}</tbody></table></div></div>`;
|
|
185
201
|
default:
|
|
186
202
|
return r`<span class="disabled-state-text">${this.messages.nopreviewloaded ?? "Select a FeatureSet variable and load a preview."}</span>`;
|
|
187
203
|
}
|
|
188
204
|
}
|
|
189
205
|
renderTabs() {
|
|
190
206
|
const e = this.previewTabsState.activeTabId;
|
|
191
|
-
return r`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${
|
|
207
|
+
return r`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${p} .selected=${e === p} @calciteTabsActivate=${(t) => this.activateTab(t.target.tab)}>${this.messages.scope ?? "Scope"}</calcite-tab-title>${g(this.previewTabsState.tabs, (t) => `title-${t.id}`, (t) => r`<calcite-tab-title .tab=${t.id} title=${t.label ?? b} closable .selected=${e === t.id} @calciteTabsActivate=${(a) => this.activateTab(a.target.tab)} @calciteTabsClose=${(a) => this.closePreviewTab(a.target)}><bdi>${t.title}</bdi></calcite-tab-title>`)}</calcite-tab-nav><calcite-tab .tab=${p} .selected=${e === p}><div class="tab-panel">${this.renderScopePanel()}</div></calcite-tab>${g(this.previewTabsState.tabs, (t) => `panel-${t.id}`, (t) => r`<calcite-tab .tab=${t.id} .selected=${e === t.id}><div class="tab-panel preview-panel">${this.renderPreviewPanel(t)}</div></calcite-tab>`)}</calcite-tabs>`;
|
|
192
208
|
}
|
|
193
209
|
render() {
|
|
194
|
-
const { line: e } = this.debuggerStore?.executionState ?? {}, t = this.breakpoints.find((
|
|
195
|
-
return r`<div class="console-shell"><div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(
|
|
210
|
+
const { line: e } = this.debuggerStore?.executionState ?? {}, t = this.breakpoints.find((i) => i.line === e), a = this.breakpoints.findIndex((i) => i.line === e);
|
|
211
|
+
return r`<div class="console-shell"><div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + (t?.line ?? e ?? 1) - 1)}>${this.getBreakpointCode(t?.line ?? this.breakpoints[0]?.line ?? e ?? 1)}</arcgis-code-viewer>${this.breakpoints.length ? r`<calcite-action id=${this._breakpointPopoverId ?? b} scale=s .text=${this.getBreakpointPositionText(a >= 0 ? a + 1 : 1)} text-enabled icon=chevron-down></calcite-action>` : null}${this.renderBreakpointPopover(t?.line ?? e)}</div><div class="tabs-container">${this.renderTabs()}</div></div>`;
|
|
196
212
|
}
|
|
197
213
|
}
|
|
198
|
-
|
|
214
|
+
v("arcgis-arcade-debugger-console", N);
|
|
199
215
|
export {
|
|
200
|
-
|
|
216
|
+
N as ArcgisArcadeDebuggerConsole
|
|
201
217
|
};
|