@arcgis/coding-components 5.2.0-next.129 → 5.2.0-next.130
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/EDJMOEXG.js +2 -0
- package/dist/cdn/VHXEN75D.js +2 -0
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +66 -58
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +3 -0
- package/dist/components/arcgis-arcade-editor/customElement.js +178 -146
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/package.json +7 -7
- package/dist/cdn/NMPI64MB.js +0 -2
- package/dist/cdn/XAW3GFF3.js +0 -2
|
@@ -4,25 +4,25 @@ import { css as u, html as r } from "lit";
|
|
|
4
4
|
import { repeat as g } from "lit/directives/repeat.js";
|
|
5
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
|
|
9
|
-
import { t as
|
|
7
|
+
import { load as $ } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { i as S } from "../../chunks/monaco-importer.js";
|
|
9
|
+
import { t as n } from "../../chunks/functional.js";
|
|
10
10
|
import { d as k, g as y, c as h } from "../../chunks/debugger-value-styles.js";
|
|
11
|
-
import { i as m, a as P, p as T, b as E, c as L, d as
|
|
12
|
-
import { observeAncestorsMutation as
|
|
13
|
-
import { generateGuid as
|
|
11
|
+
import { i as m, a as P, p as T, b as E, c as L, d as z, S as B, D as C, e as M } from "../../chunks/debugger-value-components.js";
|
|
12
|
+
import { observeAncestorsMutation as V, unsafeGetCalciteModeName as D } from "@arcgis/toolkit/dom";
|
|
13
|
+
import { generateGuid as I } from "@arcgis/toolkit/string";
|
|
14
14
|
import { d as p } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
|
|
15
|
-
import { Uri as
|
|
16
|
-
const
|
|
17
|
-
class
|
|
15
|
+
import { Uri as A } from "monaco-editor";
|
|
16
|
+
const N = 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;height:100%;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);overflow-y:auto}.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-width:0;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);background-color:var(--calcite-color-foreground-1)}.table-scroll{overflow:auto;flex:1 1 auto;min-width:0;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{box-sizing:border-box;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)}}`, F = 100;
|
|
17
|
+
class R extends f {
|
|
18
18
|
constructor() {
|
|
19
|
-
super(...arguments), this.messages = x(), this._monacoEditor = S
|
|
19
|
+
super(...arguments), this.messages = x(), this._monacoEditor = $(S), this._breakpointPopoverId = `arcade-debugger-console-breakpoints-${I()}`, 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 = [N, k, y()];
|
|
26
26
|
}
|
|
27
27
|
get breakpoints() {
|
|
28
28
|
return this.debuggerStore?.debuggerBreakpoints ?? [];
|
|
@@ -38,18 +38,20 @@ class N extends f {
|
|
|
38
38
|
}
|
|
39
39
|
load() {
|
|
40
40
|
this.manager.onLifecycle(() => {
|
|
41
|
-
const e =
|
|
42
|
-
return this.updateTheme(), () =>
|
|
41
|
+
const e = this.el.closest("arcgis-code-editor-shell") ?? this.el.getRootNode(), t = V(this.el, ["class"], this.updateTheme.bind(this)), i = (a) => this.dismissBreakpointPopoverOnResize(a);
|
|
42
|
+
return e?.addEventListener("pointerdown", i, !0), this.updateTheme(), () => {
|
|
43
|
+
t(), e?.removeEventListener("pointerdown", i, !0);
|
|
44
|
+
};
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
getContentAtLine(e) {
|
|
46
48
|
if (!this.modelId)
|
|
47
49
|
return "";
|
|
48
|
-
const t = this._monacoEditor.getModel(
|
|
50
|
+
const t = this._monacoEditor.getModel(A.parse(this.modelId));
|
|
49
51
|
return t ? t.getLineContent(e) : "";
|
|
50
52
|
}
|
|
51
53
|
updateTheme() {
|
|
52
|
-
|
|
54
|
+
D(this.el) === "dark" ? this.elementInternals.states.add(h) : this.elementInternals.states.delete(h);
|
|
53
55
|
}
|
|
54
56
|
getBreakpointCode(e) {
|
|
55
57
|
return e == null ? this.messages.nocontent ?? "No content" : this.getContentAtLine(e) || (this.messages.nocontent ?? "No content");
|
|
@@ -62,12 +64,12 @@ class N extends f {
|
|
|
62
64
|
}
|
|
63
65
|
findCollectionItemByPreviewSegment(e, t) {
|
|
64
66
|
if (t.startsWith("name:")) {
|
|
65
|
-
const
|
|
66
|
-
return e.find((
|
|
67
|
+
const i = t.slice(5);
|
|
68
|
+
return e.find((a) => a.name === i)?.featureSet;
|
|
67
69
|
}
|
|
68
70
|
if (t.startsWith("id:")) {
|
|
69
|
-
const
|
|
70
|
-
return e.find((
|
|
71
|
+
const i = t.slice(3);
|
|
72
|
+
return e.find((a) => String(a.id) === i)?.featureSet;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
getExpandedDebuggerMap(e) {
|
|
@@ -78,33 +80,39 @@ class N extends f {
|
|
|
78
80
|
}
|
|
79
81
|
getPreviewRows(e) {
|
|
80
82
|
return e.map((t) => {
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
+
const i = this.getExpandedDebuggerMap(t);
|
|
84
|
+
return i || /* @__PURE__ */ new Map();
|
|
83
85
|
});
|
|
84
86
|
}
|
|
87
|
+
dismissBreakpointPopoverOnResize(e) {
|
|
88
|
+
if (!e.composedPath().some((a) => a instanceof HTMLElement && a.classList.contains("bottom-drawer-resize-handle")))
|
|
89
|
+
return;
|
|
90
|
+
const i = this.el.shadowRoot?.querySelector(".breakpoints-popover");
|
|
91
|
+
i?.open && (i.open = !1);
|
|
92
|
+
}
|
|
85
93
|
getExpandedDebuggerChild(e, t) {
|
|
86
94
|
if (!e || !m(e))
|
|
87
95
|
return;
|
|
88
|
-
const
|
|
89
|
-
if (Array.isArray(
|
|
90
|
-
const
|
|
91
|
-
return !Number.isInteger(
|
|
96
|
+
const i = e.expand();
|
|
97
|
+
if (Array.isArray(i)) {
|
|
98
|
+
const a = Number(t);
|
|
99
|
+
return !Number.isInteger(a) || String(a) !== t ? void 0 : i[a];
|
|
92
100
|
}
|
|
93
|
-
return
|
|
101
|
+
return i.get(t);
|
|
94
102
|
}
|
|
95
103
|
async resolvePreviewValueFromSegments(e, t) {
|
|
96
104
|
if (!t.length)
|
|
97
105
|
return e;
|
|
98
106
|
if (!e)
|
|
99
107
|
return;
|
|
100
|
-
const [
|
|
108
|
+
const [i, ...a] = t;
|
|
101
109
|
let o;
|
|
102
110
|
if (P(e)) {
|
|
103
111
|
const s = await e.load();
|
|
104
|
-
o = this.findCollectionItemByPreviewSegment(s,
|
|
112
|
+
o = this.findCollectionItemByPreviewSegment(s, i);
|
|
105
113
|
} else
|
|
106
|
-
o = this.getExpandedDebuggerChild(e,
|
|
107
|
-
return await this.resolvePreviewValueFromSegments(o,
|
|
114
|
+
o = this.getExpandedDebuggerChild(e, i);
|
|
115
|
+
return await this.resolvePreviewValueFromSegments(o, a);
|
|
108
116
|
}
|
|
109
117
|
getScope(e, t) {
|
|
110
118
|
switch (t) {
|
|
@@ -120,32 +128,32 @@ class N extends f {
|
|
|
120
128
|
const t = this.executionProgramState;
|
|
121
129
|
if (!t)
|
|
122
130
|
return;
|
|
123
|
-
const
|
|
124
|
-
if (!
|
|
131
|
+
const i = T(e);
|
|
132
|
+
if (!i)
|
|
125
133
|
return;
|
|
126
|
-
const { scopeName:
|
|
127
|
-
if (
|
|
128
|
-
return await this.resolvePreviewValueFromSegments(
|
|
134
|
+
const { scopeName: a, rootName: o, pathSegments: s } = i, l = this.getScope(t, a);
|
|
135
|
+
if (l)
|
|
136
|
+
return await this.resolvePreviewValueFromSegments(l.get(o), s);
|
|
129
137
|
}
|
|
130
|
-
async loadPreview({ label: e, sourcePath: t, value:
|
|
131
|
-
const
|
|
132
|
-
let s =
|
|
138
|
+
async loadPreview({ label: e, sourcePath: t, value: i }) {
|
|
139
|
+
const a = this.previewTabsState, { snapshot: o } = a.startLoad(e, t);
|
|
140
|
+
let s = i;
|
|
133
141
|
if (s == null)
|
|
134
142
|
try {
|
|
135
143
|
s = await this.resolvePreviewValue(t);
|
|
136
144
|
} catch {
|
|
137
|
-
|
|
145
|
+
a.setError(o, this.getPreviewLoadErrorMessage());
|
|
138
146
|
return;
|
|
139
147
|
}
|
|
140
148
|
if (s == null || !E(s) || typeof s.querySample != "function" || typeof s.schema != "function") {
|
|
141
|
-
|
|
149
|
+
a.setUnavailable(o, this.messages.previewunavailable ?? "This preview is no longer available in the current paused state.");
|
|
142
150
|
return;
|
|
143
151
|
}
|
|
144
152
|
try {
|
|
145
|
-
const { fields:
|
|
146
|
-
|
|
153
|
+
const { fields: l, features: d } = await s.querySample(), c = this.getPreviewRows(d);
|
|
154
|
+
a.setLoaded(o, l, c);
|
|
147
155
|
} catch {
|
|
148
|
-
|
|
156
|
+
a.setError(o, this.getPreviewLoadErrorMessage());
|
|
149
157
|
}
|
|
150
158
|
}
|
|
151
159
|
activateTab(e) {
|
|
@@ -167,26 +175,26 @@ class N extends f {
|
|
|
167
175
|
});
|
|
168
176
|
}
|
|
169
177
|
sortScopeEntries(e) {
|
|
170
|
-
return e.sort(([t], [
|
|
178
|
+
return e.sort(([t], [i]) => t.localeCompare(i));
|
|
171
179
|
}
|
|
172
180
|
renderPreviewLabel(e) {
|
|
173
181
|
return r`<bdi>${e}</bdi>`;
|
|
174
182
|
}
|
|
175
183
|
renderPreviewCell(e) {
|
|
176
|
-
return e ? L(e) ||
|
|
184
|
+
return e ? L(e) || z(e) ? B({ value: e }) : r`<span class="xs"></span>` : r`<span class="xs"></span>`;
|
|
177
185
|
}
|
|
178
|
-
renderScopeEntryForScope(e, t,
|
|
179
|
-
const [
|
|
180
|
-
return
|
|
186
|
+
renderScopeEntryForScope(e, t, i) {
|
|
187
|
+
const [a, o] = i, s = `${t}.${a}`, l = this.lazyTreeState;
|
|
188
|
+
return l ? C({ name: a, value: o, messages: this.messages, path: `${e}.${a}`, lazyTreeState: l, previewLabel: s, previewSourcePath: M(e, a), previewLoading: this.previewTabsState.isTabLoading(s), onLoadPreview: (d) => {
|
|
181
189
|
this.loadPreview(d);
|
|
182
190
|
} }) : null;
|
|
183
191
|
}
|
|
184
192
|
renderBreakpointPopover(e) {
|
|
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,
|
|
193
|
+
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=${w(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;
|
|
186
194
|
}
|
|
187
195
|
renderScopePanel() {
|
|
188
|
-
const e = this.executionProgramState, t = this.sortScopeEntries(Array.from(e?.profile ?? [])),
|
|
189
|
-
return e ? r`<calcite-tree .scale=${
|
|
196
|
+
const 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, l = t.length > 0, d = i.length > 0;
|
|
197
|
+
return e ? r`<calcite-tree .scale=${n.scale} @calciteTreeSelect=${n.oncalciteTreeSelect} .lines=${n.lines} .selectionMode=${n.selectionMode}><calcite-tree-item expanded .disabled=${!s}>${this.messages.local ?? "Local"}<calcite-tree slot=children .lines=${n.lines} .selectionMode=${n.selectionMode} .scale=${n.scale} @calciteTreeSelect=${n.oncalciteTreeSelect}>${o ? s ? a.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=${n.lines} .selectionMode=${n.selectionMode} .scale=${n.scale} @calciteTreeSelect=${n.oncalciteTreeSelect}>${d ? i.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=${!l}>${this.messages.profile ?? "Profile"}<calcite-tree slot=children .lines=${n.lines} .selectionMode=${n.selectionMode} .scale=${n.scale} @calciteTreeSelect=${n.oncalciteTreeSelect}>${l ? 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>`;
|
|
190
198
|
}
|
|
191
199
|
renderPreviewPanel(e) {
|
|
192
200
|
switch (e.status) {
|
|
@@ -196,22 +204,22 @@ class N extends f {
|
|
|
196
204
|
case "error":
|
|
197
205
|
return r`<span class="disabled-state-text">${e.message}</span>`;
|
|
198
206
|
case "loaded":
|
|
199
|
-
const { fields: t, label:
|
|
200
|
-
return !
|
|
207
|
+
const { fields: t, label: i, rows: a } = e;
|
|
208
|
+
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}${a.length === F ? ` ${this.messages.previewlimit ?? "(showing first 100 items)"}` : ""}`)}</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>`;
|
|
201
209
|
default:
|
|
202
210
|
return r`<span class="disabled-state-text">${this.messages.nopreviewloaded ?? "Select a FeatureSet variable and load a preview."}</span>`;
|
|
203
211
|
}
|
|
204
212
|
}
|
|
205
213
|
renderTabs() {
|
|
206
214
|
const e = this.previewTabsState.activeTabId;
|
|
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=${(
|
|
215
|
+
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=${(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>${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>`;
|
|
208
216
|
}
|
|
209
217
|
render() {
|
|
210
|
-
const { line: e } = this.debuggerStore?.executionState ?? {}, t = e ? this.breakpoints.find((
|
|
211
|
-
return r`<div class="console-shell">${this.breakpoints.length && r`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(
|
|
218
|
+
const { line: e } = this.debuggerStore?.executionState ?? {}, t = e ? this.breakpoints.find((a) => a.line === e) : this.breakpoints[0], i = e ? this.breakpoints.findIndex((a) => a.line === e) : 0;
|
|
219
|
+
return r`<div class="console-shell">${this.breakpoints.length && r`<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 ?? b} 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>`;
|
|
212
220
|
}
|
|
213
221
|
}
|
|
214
|
-
v("arcgis-arcade-debugger-console",
|
|
222
|
+
v("arcgis-arcade-debugger-console", R);
|
|
215
223
|
export {
|
|
216
|
-
|
|
224
|
+
R as ArcgisArcadeDebuggerConsole
|
|
217
225
|
};
|
|
@@ -161,6 +161,7 @@ export abstract class ArcgisArcadeEditor extends LitElement {
|
|
|
161
161
|
askarcadeassistant?: string | undefined;
|
|
162
162
|
askarcadeassistantprompt?: string | undefined;
|
|
163
163
|
profileempty?: string | undefined;
|
|
164
|
+
collapse?: string | undefined;
|
|
164
165
|
};
|
|
165
166
|
/** @internal */
|
|
166
167
|
protected messages: Partial<{
|
|
@@ -183,6 +184,7 @@ export abstract class ArcgisArcadeEditor extends LitElement {
|
|
|
183
184
|
askarcadeassistant: string;
|
|
184
185
|
askarcadeassistantprompt: string;
|
|
185
186
|
profileempty: string;
|
|
187
|
+
collapse: string;
|
|
186
188
|
}> & T9nMeta<{
|
|
187
189
|
help: string;
|
|
188
190
|
profilevariables: string;
|
|
@@ -203,6 +205,7 @@ export abstract class ArcgisArcadeEditor extends LitElement {
|
|
|
203
205
|
askarcadeassistant: string;
|
|
204
206
|
askarcadeassistantprompt: string;
|
|
205
207
|
profileempty: string;
|
|
208
|
+
collapse: string;
|
|
206
209
|
}>;
|
|
207
210
|
/**
|
|
208
211
|
* The name of the opened side panel. 'none' means 'no panel opened'.
|