@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
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { g as
|
|
3
|
-
import { css as
|
|
4
|
-
import { i as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { generateGuid as
|
|
7
|
-
import { i as
|
|
8
|
-
import { s as
|
|
9
|
-
import { b as
|
|
10
|
-
import { setArcadeAskAiBinding as
|
|
11
|
-
import { u as
|
|
2
|
+
import { g as N, c as z } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as U, html as d, nothing as C } from "lit";
|
|
4
|
+
import { i as H } from "../../chunks/monaco-importer.js";
|
|
5
|
+
import { LitElement as V, createEvent as R, safeClassMap as P } from "@arcgis/lumina";
|
|
6
|
+
import { generateGuid as G } from "@arcgis/toolkit/string";
|
|
7
|
+
import { i as A, e as B, c as m, D as W } from "../../chunks/arcade-executor.js";
|
|
8
|
+
import { s as j, a as Q } from "../../chunks/arcade-service-accessors.js";
|
|
9
|
+
import { b as y } from "../../chunks/arcade-defaults.js";
|
|
10
|
+
import { setArcadeAskAiBinding as w, arcadeAskAiCommandId as Y, arcadeQuickFixKind as J } from "../../chunks/arcade-mode.js";
|
|
11
|
+
import { u as X } from "../../chunks/useT9n.js";
|
|
12
12
|
import { createRef as T, ref as L } from "lit/directives/ref.js";
|
|
13
|
-
import { load as
|
|
14
|
-
import { g as
|
|
15
|
-
import { rethrowError as
|
|
16
|
-
import { watch as
|
|
17
|
-
import
|
|
18
|
-
import { property as o, subclass as
|
|
13
|
+
import { load as Z } from "@arcgis/lumina/controllers";
|
|
14
|
+
import { g as q } from "../../chunks/utils.js";
|
|
15
|
+
import { rethrowError as l } from "@arcgis/toolkit/log";
|
|
16
|
+
import { watch as v } from "@arcgis/core/core/reactiveUtils.js";
|
|
17
|
+
import f from "@arcgis/core/core/Accessor.js";
|
|
18
|
+
import { property as o, subclass as S } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
19
19
|
import { A as M } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
|
|
20
|
-
import { r as
|
|
21
|
-
import { Range as I, KeyCode as
|
|
22
|
-
const
|
|
23
|
-
var
|
|
24
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
20
|
+
import { r as ee } from "../../chunks/utilities.js";
|
|
21
|
+
import { Range as I, KeyCode as F, KeyMod as O, Uri as te } from "monaco-editor";
|
|
22
|
+
const ie = U`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.bottom-action-bar.is-collapsed{border-bottom:0}.bottom-action-bar{display:flex;.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}}`;
|
|
23
|
+
var se = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, _ = (i, e, t, s) => {
|
|
24
|
+
for (var a = s > 1 ? void 0 : s ? ae(e, t) : e, n = i.length - 1, r; n >= 0; n--)
|
|
25
25
|
(r = i[n]) && (a = (s ? r(e, t, a) : r(a)) || a);
|
|
26
|
-
return s && a &&
|
|
26
|
+
return s && a && se(e, t, a), a;
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
let h = class extends
|
|
28
|
+
const K = 100;
|
|
29
|
+
let h = class extends f {
|
|
30
30
|
constructor(i) {
|
|
31
|
-
super(i), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount =
|
|
31
|
+
super(i), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount = K;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
_([
|
|
35
35
|
o()
|
|
36
36
|
], h.prototype, "collectionItems", 2);
|
|
37
|
-
|
|
37
|
+
_([
|
|
38
38
|
o()
|
|
39
39
|
], h.prototype, "errorMessage", 2);
|
|
40
|
-
|
|
40
|
+
_([
|
|
41
41
|
o()
|
|
42
42
|
], h.prototype, "expanded", 2);
|
|
43
|
-
|
|
43
|
+
_([
|
|
44
44
|
o()
|
|
45
45
|
], h.prototype, "requestId", 2);
|
|
46
|
-
|
|
46
|
+
_([
|
|
47
47
|
o()
|
|
48
48
|
], h.prototype, "schemaValue", 2);
|
|
49
|
-
|
|
49
|
+
_([
|
|
50
50
|
o()
|
|
51
51
|
], h.prototype, "status", 2);
|
|
52
|
-
|
|
52
|
+
_([
|
|
53
53
|
o()
|
|
54
54
|
], h.prototype, "visibleChildCount", 2);
|
|
55
|
-
h =
|
|
56
|
-
|
|
55
|
+
h = _([
|
|
56
|
+
S("ArcadeDebuggerLazyTreeNodeState")
|
|
57
57
|
], h);
|
|
58
|
-
let
|
|
58
|
+
let k = class extends f {
|
|
59
59
|
constructor(i) {
|
|
60
60
|
super(i), this.generation = 0, this.nodes = /* @__PURE__ */ new Map();
|
|
61
61
|
}
|
|
@@ -79,7 +79,7 @@ let D = class extends _ {
|
|
|
79
79
|
}
|
|
80
80
|
showMore(i, e) {
|
|
81
81
|
const t = this.ensureNode(i);
|
|
82
|
-
t.visibleChildCount >= e || (t.visibleChildCount = Math.min(e, t.visibleChildCount +
|
|
82
|
+
t.visibleChildCount >= e || (t.visibleChildCount = Math.min(e, t.visibleChildCount + K));
|
|
83
83
|
}
|
|
84
84
|
loadNode(i, e) {
|
|
85
85
|
switch (e.kind) {
|
|
@@ -101,8 +101,8 @@ let D = class extends _ {
|
|
|
101
101
|
return;
|
|
102
102
|
const a = this.generation, n = s.requestId + 1;
|
|
103
103
|
s.requestId = n, s.status = "loading", s.errorMessage = "", s.schemaValue = void 0, s.collectionItems = [], e().then((r) => {
|
|
104
|
-
const
|
|
105
|
-
!
|
|
104
|
+
const u = this.nodes.get(i);
|
|
105
|
+
!u || this.generation !== a || u.requestId !== n || (t(u, r), u.status = "loaded");
|
|
106
106
|
}).catch(() => {
|
|
107
107
|
const r = this.nodes.get(i);
|
|
108
108
|
!r || this.generation !== a || r.requestId !== n || (r.status = "error");
|
|
@@ -114,15 +114,15 @@ let D = class extends _ {
|
|
|
114
114
|
this.nodes.clear();
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
var
|
|
121
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
117
|
+
k = _([
|
|
118
|
+
S("ArcadeDebuggerLazyTreeState")
|
|
119
|
+
], k);
|
|
120
|
+
var ne = Object.defineProperty, re = Object.getOwnPropertyDescriptor, c = (i, e, t, s) => {
|
|
121
|
+
for (var a = s > 1 ? void 0 : s ? re(e, t) : e, n = i.length - 1, r; n >= 0; n--)
|
|
122
122
|
(r = i[n]) && (a = (s ? r(e, t, a) : r(a)) || a);
|
|
123
|
-
return s && a &&
|
|
123
|
+
return s && a && ne(e, t, a), a;
|
|
124
124
|
};
|
|
125
|
-
let
|
|
125
|
+
let b = class extends f {
|
|
126
126
|
constructor(i) {
|
|
127
127
|
super(i), this.phase = "idle", this.sessionId = 0, this.consoleLogs = [], this.hasExecuted = !1;
|
|
128
128
|
}
|
|
@@ -153,26 +153,26 @@ let p = class extends _ {
|
|
|
153
153
|
};
|
|
154
154
|
c([
|
|
155
155
|
o()
|
|
156
|
-
],
|
|
156
|
+
], b.prototype, "phase", 2);
|
|
157
157
|
c([
|
|
158
158
|
o()
|
|
159
|
-
],
|
|
159
|
+
], b.prototype, "mode", 2);
|
|
160
160
|
c([
|
|
161
161
|
o()
|
|
162
|
-
],
|
|
162
|
+
], b.prototype, "sessionId", 2);
|
|
163
163
|
c([
|
|
164
164
|
o()
|
|
165
|
-
],
|
|
165
|
+
], b.prototype, "result", 2);
|
|
166
166
|
c([
|
|
167
167
|
o()
|
|
168
|
-
],
|
|
168
|
+
], b.prototype, "consoleLogs", 2);
|
|
169
169
|
c([
|
|
170
170
|
o()
|
|
171
|
-
],
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
],
|
|
175
|
-
let
|
|
171
|
+
], b.prototype, "hasExecuted", 2);
|
|
172
|
+
b = c([
|
|
173
|
+
S("ArcadeDebuggerExecutionModel")
|
|
174
|
+
], b);
|
|
175
|
+
let D = class extends f {
|
|
176
176
|
constructor(i) {
|
|
177
177
|
super(i), this.editorBreakpoints = [], this.executionBreakpoints = [];
|
|
178
178
|
}
|
|
@@ -192,28 +192,28 @@ let A = class extends _ {
|
|
|
192
192
|
};
|
|
193
193
|
c([
|
|
194
194
|
o()
|
|
195
|
-
],
|
|
195
|
+
], D.prototype, "editorBreakpoints", 2);
|
|
196
196
|
c([
|
|
197
197
|
o()
|
|
198
|
-
],
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
],
|
|
202
|
-
let
|
|
198
|
+
], D.prototype, "executionBreakpoints", 2);
|
|
199
|
+
D = c([
|
|
200
|
+
S("ArcadeDebuggerSessionModel")
|
|
201
|
+
], D);
|
|
202
|
+
let E = class extends f {
|
|
203
203
|
constructor(i) {
|
|
204
204
|
super(i), this.openedPanel = "output", this.showPanel = !1;
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
c([
|
|
208
208
|
o()
|
|
209
|
-
],
|
|
209
|
+
], E.prototype, "openedPanel", 2);
|
|
210
210
|
c([
|
|
211
211
|
o()
|
|
212
|
-
],
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
],
|
|
216
|
-
let
|
|
212
|
+
], E.prototype, "showPanel", 2);
|
|
213
|
+
E = c([
|
|
214
|
+
S("ArcadeDebuggerUiModel")
|
|
215
|
+
], E);
|
|
216
|
+
let $ = class extends f {
|
|
217
217
|
constructor(i) {
|
|
218
218
|
super(i);
|
|
219
219
|
}
|
|
@@ -232,16 +232,16 @@ let v = class extends _ {
|
|
|
232
232
|
};
|
|
233
233
|
c([
|
|
234
234
|
o()
|
|
235
|
-
],
|
|
235
|
+
], $.prototype, "pausedState", 2);
|
|
236
236
|
c([
|
|
237
237
|
o()
|
|
238
|
-
],
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
],
|
|
242
|
-
let g = class extends
|
|
238
|
+
], $.prototype, "lastPausedState", 2);
|
|
239
|
+
$ = c([
|
|
240
|
+
S("ArcadeDebuggerPausedFrameModel")
|
|
241
|
+
], $);
|
|
242
|
+
let g = class extends f {
|
|
243
243
|
constructor(i) {
|
|
244
|
-
super(i), this.execution = new
|
|
244
|
+
super(i), this.execution = new b(), this.lazyTreeState = new k(), this.pausedFrame = new $(), this.previewTabsState = new M(), this.session = new D(), this.ui = new E();
|
|
245
245
|
}
|
|
246
246
|
get editorBreakpoints() {
|
|
247
247
|
return this.session.editorBreakpoints;
|
|
@@ -331,7 +331,7 @@ let g = class extends _ {
|
|
|
331
331
|
this.execution.mode = "debug", this.execution.result = { resultType: "debug", result: i, ...e ? { timing: e } : {} }, this.execution.phase = "completed", this.ui.openedPanel = "output", this.pausedFrame.reset(), this.resetTransientDebuggerState();
|
|
332
332
|
}
|
|
333
333
|
completeRun(i, e = {}) {
|
|
334
|
-
this.execution.mode = "run", !e.useDebugRenderer &&
|
|
334
|
+
this.execution.mode = "run", !e.useDebugRenderer && A(i) ? this.execution.result = { resultType: "run", result: i } : e.useDebugRenderer && !A(i) && (this.execution.result = {
|
|
335
335
|
resultType: "debug",
|
|
336
336
|
result: i,
|
|
337
337
|
...e.timing ? { timing: e.timing } : {}
|
|
@@ -403,7 +403,7 @@ let g = class extends _ {
|
|
|
403
403
|
this.pausedLine = void 0, this.lazyTreeState.reset(), this.previewTabsState.clear();
|
|
404
404
|
}
|
|
405
405
|
replaceTransientDebuggerState() {
|
|
406
|
-
this.pausedLine = void 0, this.lazyTreeState = new
|
|
406
|
+
this.pausedLine = void 0, this.lazyTreeState = new k(), this.previewTabsState = new M();
|
|
407
407
|
}
|
|
408
408
|
};
|
|
409
409
|
c([
|
|
@@ -428,13 +428,13 @@ c([
|
|
|
428
428
|
o()
|
|
429
429
|
], g.prototype, "ui", 2);
|
|
430
430
|
g = c([
|
|
431
|
-
|
|
431
|
+
S("ArcadeDebuggerStore")
|
|
432
432
|
], g);
|
|
433
|
-
class
|
|
433
|
+
class oe {
|
|
434
434
|
#e;
|
|
435
435
|
#a;
|
|
436
436
|
#t;
|
|
437
|
-
constructor(e, t =
|
|
437
|
+
constructor(e, t = B) {
|
|
438
438
|
this.#e = e, this.#a = t;
|
|
439
439
|
}
|
|
440
440
|
start(e) {
|
|
@@ -470,7 +470,7 @@ class re {
|
|
|
470
470
|
breakpoints: e.mode === "debug" ? e.breakpoints : void 0,
|
|
471
471
|
onDebugPause: e.mode === "debug" ? (n, r) => this.#n(t, n, r) : void 0
|
|
472
472
|
});
|
|
473
|
-
return e.mode === "debug" ?
|
|
473
|
+
return e.mode === "debug" ? A(a) ? { type: "failure", error: this.#u(a) } : { type: "debug", value: a } : A(a) ? { type: "legacy-run", result: a } : { type: "failure", error: m("Unexpected debug result") };
|
|
474
474
|
}
|
|
475
475
|
async #c(e, t) {
|
|
476
476
|
const { externalExecutor: s } = e, a = new AbortController();
|
|
@@ -480,10 +480,10 @@ class re {
|
|
|
480
480
|
const r = await s.execute({
|
|
481
481
|
mode: "debug",
|
|
482
482
|
script: e.script,
|
|
483
|
-
console: (
|
|
483
|
+
console: (u) => this.#s(t, u),
|
|
484
484
|
signal: a.signal,
|
|
485
485
|
breakpoints: e.breakpoints,
|
|
486
|
-
onDebugPause: (
|
|
486
|
+
onDebugPause: (u, x) => this.#n(t, u, x)
|
|
487
487
|
});
|
|
488
488
|
return { type: "debug", value: r.result, timing: r.timing };
|
|
489
489
|
}
|
|
@@ -533,22 +533,22 @@ class re {
|
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
#
|
|
536
|
+
#u(e) {
|
|
537
537
|
return e.type === "error" ? m(e.value, e.error) : m("Unexpected legacy result");
|
|
538
538
|
}
|
|
539
539
|
#i(e) {
|
|
540
540
|
return e === this.#e.sessionId;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const ce = {
|
|
544
544
|
glyphMargin: !0,
|
|
545
545
|
lineNumbersMinChars: 1
|
|
546
546
|
};
|
|
547
|
-
class
|
|
547
|
+
class de extends V {
|
|
548
548
|
constructor() {
|
|
549
|
-
super(...arguments), this._codeEditorElt = T(), this._arcadeAssistantElt = T(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new g(), this._executionCoordinator = new
|
|
550
|
-
window.open(
|
|
551
|
-
}, this._decorations = void 0, this._monacoEditor =
|
|
549
|
+
super(...arguments), this._codeEditorElt = T(), this._arcadeAssistantElt = T(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._focusContinueActionOnPause = !1, this._debuggerState = new g(), this._executionCoordinator = new oe(this._debuggerState), this.messages = X(), this._modelId = G(), this._openArcadeHelp = () => {
|
|
550
|
+
window.open(W, "Arcade Help");
|
|
551
|
+
}, this._decorations = void 0, this._monacoEditor = Z(H), this._editorOptions = {}, this._toggleSidePanel = (e) => {
|
|
552
552
|
e.currentTarget instanceof HTMLElement && this._setOpenedSidePanel(e.currentTarget.dataset.panelName ?? "none");
|
|
553
553
|
}, this._closeSidePanel = () => {
|
|
554
554
|
this._setOpenedSidePanel("none");
|
|
@@ -574,7 +574,7 @@ class ce extends K {
|
|
|
574
574
|
this.properties = { _apiLibrary: 16, _editorProfile: 16, _preparingArcade: 16, _arcadeAssistantRemoteState: 16, _diagnostics: 16, editorInstance: 32, editorOptions: 0, enableDebugger: 5, hideDocumentationActions: 5, hideSideBar: 5, messageOverrides: 0, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, disableAssistant: 5, arcadeAssistant: 0, externalExecutor: 0 };
|
|
575
575
|
}
|
|
576
576
|
static {
|
|
577
|
-
this.styles = [
|
|
577
|
+
this.styles = [ie];
|
|
578
578
|
}
|
|
579
579
|
get _canExecute() {
|
|
580
580
|
return !!(this.testData || this.externalExecutor);
|
|
@@ -587,7 +587,7 @@ class ce extends K {
|
|
|
587
587
|
}
|
|
588
588
|
get editorOptions() {
|
|
589
589
|
return {
|
|
590
|
-
...
|
|
590
|
+
...ce,
|
|
591
591
|
...this._editorOptions
|
|
592
592
|
};
|
|
593
593
|
}
|
|
@@ -601,8 +601,8 @@ class ce extends K {
|
|
|
601
601
|
if (!e)
|
|
602
602
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
603
603
|
await this._componentReadyDefer.promise;
|
|
604
|
-
const t = this._codeEditorElt.value?.value, s = await
|
|
605
|
-
return
|
|
604
|
+
const t = this._codeEditorElt.value?.value, s = await B(e.definition, t, this.testData, { mode: "run" });
|
|
605
|
+
return A(s) ? s : { type: "error", value: "Unexpected result", error: null };
|
|
606
606
|
}
|
|
607
607
|
async testRun() {
|
|
608
608
|
try {
|
|
@@ -624,8 +624,8 @@ class ce extends K {
|
|
|
624
624
|
const s = await this._editorProfilePromise;
|
|
625
625
|
if (!s)
|
|
626
626
|
throw new Error("Missing editor profile");
|
|
627
|
-
const a = await
|
|
628
|
-
if (
|
|
627
|
+
const a = await B(s.definition, e, t, { mode: "debug" });
|
|
628
|
+
if (A(a))
|
|
629
629
|
throw a.type === "error" && a.error instanceof Error ? a.error : new Error(a.type === "error" ? a.value : "Unexpected Arcade result");
|
|
630
630
|
return a;
|
|
631
631
|
} catch (e) {
|
|
@@ -645,15 +645,15 @@ class ce extends K {
|
|
|
645
645
|
return e?.prompt && await t?.openPrompt(e.prompt), !0;
|
|
646
646
|
}
|
|
647
647
|
async load() {
|
|
648
|
-
const e =
|
|
649
|
-
|
|
650
|
-
for (this._askAiBindingKey && (
|
|
648
|
+
const e = N("./assets");
|
|
649
|
+
j(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(l(this)), () => {
|
|
650
|
+
for (this._askAiBindingKey && (w(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0); this._disposables.length; )
|
|
651
651
|
this._disposables.pop()?.dispose();
|
|
652
|
-
this._executionCoordinator.cancel(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
|
|
652
|
+
this._executionCoordinator.cancel(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._executeDebugScriptAction = void 0, this._hasDebuggerBreakpointsContextKey = void 0, this._focusContinueActionOnPause = !1, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
|
|
653
653
|
}));
|
|
654
654
|
}
|
|
655
655
|
willUpdate(e) {
|
|
656
|
-
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), (e.has("testData") || e.has("externalExecutor")) && this._executionContextChanged(), e.has("enableDebugger") &&
|
|
656
|
+
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), (e.has("testData") || e.has("externalExecutor")) && this._executionContextChanged(), e.has("enableDebugger") && (this.enableDebugger || this._debuggerState.disableDebugger(), this._syncExecuteDebugScriptAction()), e.has("snippets") && y.updateApiContextForModel(this._modelId, {
|
|
657
657
|
snippets: this.snippets
|
|
658
658
|
}), (e.has("arcadeAssistant") || e.has("disableAssistant")) && this._updateArcadeAssistantRemoteState();
|
|
659
659
|
}
|
|
@@ -669,16 +669,26 @@ class ce extends K {
|
|
|
669
669
|
this._connectMonacoCustomizationsPromise = (async () => {
|
|
670
670
|
if (!this.isConnected)
|
|
671
671
|
return;
|
|
672
|
-
const e = await
|
|
673
|
-
this._disposables.push(e.onDiagnosticsChange((
|
|
674
|
-
this._preparingArcade || (this._diagnostics =
|
|
672
|
+
const e = await Q();
|
|
673
|
+
this._disposables.push(e.onDiagnosticsChange((p) => {
|
|
674
|
+
this._preparingArcade || (this._diagnostics = p.diagnostics, this.arcgisDiagnosticsChange.emit(p.diagnostics));
|
|
675
675
|
})), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
|
|
676
|
-
const t =
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
676
|
+
const t = v(() => this._debuggerState.editorBreakpoints, () => {
|
|
677
|
+
this._updateBreakpointsDecorations(), this._updateDebuggerBreakpointContextKey();
|
|
678
|
+
}, { sync: !0 }), s = v(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = v(() => this._debuggerState.isPaused, () => {
|
|
679
|
+
!this._debuggerState.isPaused || !this._focusContinueActionOnPause || (this._focusContinueActionOnPause = !1, this.updateComplete.then(() => {
|
|
680
|
+
requestAnimationFrame(() => {
|
|
681
|
+
this.isConnected && this._debuggerState.isPaused && this.el.shadowRoot?.querySelector("#debugger-continue-action")?.setFocus();
|
|
682
|
+
});
|
|
683
|
+
}));
|
|
684
|
+
}, { sync: !0 }), n = v(() => this._debuggerState.isDebugging, () => {
|
|
685
|
+
this._debuggerState.isDebugging || (this._focusContinueActionOnPause = !1);
|
|
686
|
+
}, { sync: !0 }), r = v(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
|
|
687
|
+
this._disposables.push({ dispose: () => t.remove() }, { dispose: () => s.remove() }, { dispose: () => a.remove() }, { dispose: () => n.remove() }, { dispose: () => r.remove() }), this._updateDebuggerBreakpointContextKey();
|
|
688
|
+
const u = this.editorInstance?.onMouseDown((p) => this._onEditorMouseDown(p));
|
|
689
|
+
u && this._disposables.push(u);
|
|
690
|
+
const x = this.editorInstance?.onDidChangeModelContent((p) => this._onEditorModelContentChange(p));
|
|
691
|
+
x && this._disposables.push(x), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
|
|
682
692
|
})();
|
|
683
693
|
try {
|
|
684
694
|
await this._connectMonacoCustomizationsPromise;
|
|
@@ -695,7 +705,7 @@ class ce extends K {
|
|
|
695
705
|
_onEditorModelContentChange(e) {
|
|
696
706
|
if (!this.enableDebugger || !this._debuggerState.editorBreakpoints.length || e.isFlush)
|
|
697
707
|
return;
|
|
698
|
-
const t =
|
|
708
|
+
const t = ee(this._debuggerState.editorBreakpoints, e.changes);
|
|
699
709
|
t.length === this._debuggerState.editorBreakpoints.length && t.every((s, a) => s === this._debuggerState.editorBreakpoints[a]) || this._debuggerState.setBreakpoints(t);
|
|
700
710
|
}
|
|
701
711
|
_updateDebuggerPausedLineDecoration() {
|
|
@@ -726,21 +736,21 @@ class ce extends K {
|
|
|
726
736
|
this._executionCoordinator.cancel({ hidePanel: !1 });
|
|
727
737
|
}
|
|
728
738
|
_resetDebugSession() {
|
|
729
|
-
this._debuggerState.resetDebug(), this._executeScript("debug").catch(
|
|
739
|
+
this._debuggerState.resetDebug(), this._executeScript("debug").catch(l(this));
|
|
730
740
|
}
|
|
731
741
|
async _updateDataModelDeps() {
|
|
732
742
|
await this._updateEditorProfile(), await this._updateApiLibrary();
|
|
733
743
|
}
|
|
734
744
|
_executionContextChanged() {
|
|
735
|
-
|
|
745
|
+
this._canExecute || (this._executeScriptAction && (this._disposeSafely(this._executeScriptAction), this._executeScriptAction = void 0), this._executeDebugScriptAction && (this._disposeSafely(this._executeDebugScriptAction), this._executeDebugScriptAction = void 0)), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), !this.testData && this.enableDebugger && this._debuggerState.clearForMissingTestData(), this._debuggerState.openedPanel === "debug-console" && !this.enableDebugger && this._debuggerState.closePanel(), this._executionCoordinator.cancel({ hidePanel: !1 }), this._debuggerState.showPanel && this._executeScript("run").catch(l(this));
|
|
736
746
|
}
|
|
737
747
|
async _updateEditorProfile() {
|
|
738
748
|
this._preparingArcade = !0;
|
|
739
749
|
try {
|
|
740
|
-
await
|
|
750
|
+
await y.setProfileForModel(this._modelId, this.profile, {
|
|
741
751
|
locale: this.messages._t9nLocale,
|
|
742
752
|
snippets: this.snippets
|
|
743
|
-
}), this._editorProfile =
|
|
753
|
+
}), this._editorProfile = y.getEditorProfileForModel(this._modelId);
|
|
744
754
|
} catch {
|
|
745
755
|
this._editorProfile = void 0;
|
|
746
756
|
} finally {
|
|
@@ -748,21 +758,21 @@ class ce extends K {
|
|
|
748
758
|
}
|
|
749
759
|
}
|
|
750
760
|
async _updateApiLibrary() {
|
|
751
|
-
this._apiLibrary = await
|
|
761
|
+
this._apiLibrary = await y.getApiLibraryForModel(this._modelId);
|
|
752
762
|
}
|
|
753
763
|
_setExecutionPanel(e) {
|
|
754
764
|
this._debuggerState.setPanel(e);
|
|
755
765
|
}
|
|
756
|
-
async _executeScript(e) {
|
|
757
|
-
const
|
|
758
|
-
!this._codeEditorElt.value || !
|
|
766
|
+
async _executeScript(e, t = !1) {
|
|
767
|
+
const s = this.testData, a = this.externalExecutor;
|
|
768
|
+
!this._codeEditorElt.value || !s && !a || (this._focusContinueActionOnPause = e === "debug" && t, this._executionCoordinator.start({
|
|
759
769
|
mode: e,
|
|
760
770
|
script: this._codeEditorElt.value?.value ?? this.script,
|
|
761
|
-
testData:
|
|
771
|
+
testData: s,
|
|
762
772
|
editorProfile: this._editorProfilePromise,
|
|
763
|
-
externalExecutor:
|
|
773
|
+
externalExecutor: a,
|
|
764
774
|
breakpoints: this._debuggerState.debuggerBreakpoints
|
|
765
|
-
});
|
|
775
|
+
}));
|
|
766
776
|
}
|
|
767
777
|
_toggleShowExecutionPanel() {
|
|
768
778
|
this._debuggerState.togglePanel();
|
|
@@ -774,13 +784,13 @@ class ce extends K {
|
|
|
774
784
|
e.stopPropagation(), this.script = e.detail, this.arcgisScriptChange.emit(e.detail);
|
|
775
785
|
}
|
|
776
786
|
_insertAsSnippet(e) {
|
|
777
|
-
this._codeEditorElt.value?.insertSnippet(e.detail).catch(
|
|
787
|
+
this._codeEditorElt.value?.insertSnippet(e.detail).catch(l(this));
|
|
778
788
|
}
|
|
779
789
|
_insertAsText(e) {
|
|
780
790
|
this._insertText(e.detail);
|
|
781
791
|
}
|
|
782
792
|
_insertText(e) {
|
|
783
|
-
this._codeEditorElt.value?.insertText(e).catch(
|
|
793
|
+
this._codeEditorElt.value?.insertText(e).catch(l(this));
|
|
784
794
|
}
|
|
785
795
|
_onResultPanelChange(e) {
|
|
786
796
|
const t = e.currentTarget;
|
|
@@ -794,17 +804,41 @@ class ce extends K {
|
|
|
794
804
|
// An unique identifier for the action.
|
|
795
805
|
id: "run-script",
|
|
796
806
|
label: "Run Arcade Expression",
|
|
797
|
-
keybindings: [
|
|
807
|
+
keybindings: [F.F5],
|
|
798
808
|
contextMenuGroupId: "code",
|
|
799
809
|
contextMenuOrder: 1,
|
|
800
810
|
run: () => {
|
|
801
|
-
this._canExecute && this._executeScript("run").catch(
|
|
811
|
+
this._canExecute && this._executeScript("run").catch(l(this));
|
|
802
812
|
}
|
|
803
813
|
});
|
|
804
|
-
e && (this._executeScriptAction = e, this._disposables.push(e));
|
|
814
|
+
e && (this._executeScriptAction = e, this._disposables.push(e)), this._syncExecuteDebugScriptAction();
|
|
815
|
+
}
|
|
816
|
+
_syncExecuteDebugScriptAction() {
|
|
817
|
+
if (!this._canExecute || !this.enableDebugger) {
|
|
818
|
+
this._executeDebugScriptAction && (this._disposeSafely(this._executeDebugScriptAction), this._executeDebugScriptAction = void 0);
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
if (this._executeDebugScriptAction)
|
|
822
|
+
return;
|
|
823
|
+
const e = this.editorInstance?.addAction({
|
|
824
|
+
id: "run-debug-script",
|
|
825
|
+
label: this.messages.runanddebug ?? "Run and debug",
|
|
826
|
+
precondition: "arcgisArcadeDebuggerHasBreakpoints",
|
|
827
|
+
keybindings: [O.CtrlCmd | O.Shift | F.F5],
|
|
828
|
+
contextMenuGroupId: "code",
|
|
829
|
+
contextMenuOrder: 2,
|
|
830
|
+
run: () => this._runAndDebug()
|
|
831
|
+
});
|
|
832
|
+
this._hasDebuggerBreakpointsContextKey ??= this.editorInstance?.createContextKey("arcgisArcadeDebuggerHasBreakpoints", this._debuggerState.editorBreakpoints.length > 0), this._updateDebuggerBreakpointContextKey(), e && (this._executeDebugScriptAction = e, this._disposables.push(e));
|
|
833
|
+
}
|
|
834
|
+
_updateDebuggerBreakpointContextKey() {
|
|
835
|
+
this._hasDebuggerBreakpointsContextKey?.set(this._debuggerState.editorBreakpoints.length > 0);
|
|
836
|
+
}
|
|
837
|
+
_runAndDebug() {
|
|
838
|
+
!this._canExecute || !this.enableDebugger || !this._debuggerState.editorBreakpoints.length || this._executeScript("debug", !0).catch(l(this));
|
|
805
839
|
}
|
|
806
840
|
_getAskAiBindingKey() {
|
|
807
|
-
return
|
|
841
|
+
return te.parse(this._modelId).toString();
|
|
808
842
|
}
|
|
809
843
|
_canRenderAskAiCodeActions() {
|
|
810
844
|
const e = this._arcadeAssistantRemoteState;
|
|
@@ -823,7 +857,7 @@ class ce extends K {
|
|
|
823
857
|
return [
|
|
824
858
|
{
|
|
825
859
|
title: t,
|
|
826
|
-
kind:
|
|
860
|
+
kind: J,
|
|
827
861
|
diagnostics: e.markers,
|
|
828
862
|
isPreferred: !1,
|
|
829
863
|
// isAI adds the sparkle and adds it to the hover menu, but it changes the
|
|
@@ -831,7 +865,7 @@ class ce extends K {
|
|
|
831
865
|
// The sparkle doesn't explain what it does, and imo will cause confusion, thus we are opting to not use it for now.
|
|
832
866
|
isAI: !1,
|
|
833
867
|
command: {
|
|
834
|
-
id:
|
|
868
|
+
id: Y,
|
|
835
869
|
title: t,
|
|
836
870
|
arguments: [s, this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"]
|
|
837
871
|
}
|
|
@@ -843,15 +877,15 @@ class ce extends K {
|
|
|
843
877
|
return;
|
|
844
878
|
const t = this._getAskAiBindingKey();
|
|
845
879
|
if (!this._arcadeAssistantRemoteState.shouldRender) {
|
|
846
|
-
this._askAiBindingKey && (
|
|
880
|
+
this._askAiBindingKey && (w(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0);
|
|
847
881
|
return;
|
|
848
882
|
}
|
|
849
|
-
this._askAiBindingKey && this._askAiBindingKey !== t &&
|
|
883
|
+
this._askAiBindingKey && this._askAiBindingKey !== t && w(this._askAiBindingKey, void 0), w(t, {
|
|
850
884
|
provideCodeActions: ({ context: s }) => this._getAskAiCodeActions(s),
|
|
851
885
|
run: (s) => {
|
|
852
886
|
this.openArcadeAssistant({
|
|
853
887
|
prompt: s ?? this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"
|
|
854
|
-
}).catch(
|
|
888
|
+
}).catch(l(this));
|
|
855
889
|
}
|
|
856
890
|
}), this._askAiBindingKey = t;
|
|
857
891
|
}
|
|
@@ -861,18 +895,18 @@ class ce extends K {
|
|
|
861
895
|
}
|
|
862
896
|
async _updateArcadeAssistantRemoteState() {
|
|
863
897
|
const e = this.arcadeAssistant;
|
|
864
|
-
this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await
|
|
898
|
+
this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await q(e ?? {}), this._syncAskAiAction();
|
|
865
899
|
}
|
|
866
900
|
renderMainActionBar() {
|
|
867
901
|
return this._usesBottomExecutionDrawer || !this._canExecute ? null : d`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-toggle-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => {
|
|
868
|
-
this._executeScript("run").catch(
|
|
902
|
+
this._executeScript("run").catch(l(this));
|
|
869
903
|
}}></calcite-action>${this._debuggerState.result ? d`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._debuggerState.showPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>`;
|
|
870
904
|
}
|
|
871
905
|
renderMainPanel() {
|
|
872
|
-
return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${
|
|
906
|
+
return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${y.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${L(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
873
907
|
}
|
|
874
|
-
renderAction({ id: e, label: t, icon: s, active: a, panelName: n, iconFlipRtl: r = !1, onClick:
|
|
875
|
-
return d`<calcite-action id=${e ?? C} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${s} .active=${a} @click=${
|
|
908
|
+
renderAction({ id: e, label: t, icon: s, active: a, panelName: n, iconFlipRtl: r = !1, onClick: u = this._toggleSidePanel }) {
|
|
909
|
+
return d`<calcite-action id=${e ?? C} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${s} .active=${a} @click=${u} data-panel-name=${n ?? C} .iconFlipRtl=${r}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
|
|
876
910
|
}
|
|
877
911
|
renderSideActionBar() {
|
|
878
912
|
return this.hideSideBar ? null : d`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
|
|
@@ -919,10 +953,10 @@ class ce extends K {
|
|
|
919
953
|
if (this.hideSideBar)
|
|
920
954
|
return null;
|
|
921
955
|
const { openedSidePanel: e, _arcadeAssistantRemoteState: t } = this;
|
|
922
|
-
return d`<arcgis-language-api-panel slot=side-panel class=${
|
|
956
|
+
return d`<arcgis-language-api-panel slot=side-panel class=${P(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${P(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"} .messageOverrides=${{
|
|
923
957
|
profileempty: this.messages.profileempty,
|
|
924
958
|
profilevariables: this.messages.profilevariables
|
|
925
|
-
}}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${
|
|
959
|
+
}}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${P(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${t?.shouldRender && d`<arcgis-arcade-coding-assistant slot=side-panel class=${P(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._closeSidePanel} .portalUrl=${t.portalUrl} .serviceUrl=${"serviceUrl" in t ? t.serviceUrl : void 0} .helpBase=${t.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${t.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} .isDevEnv=${"isDevEnv" in t ? t.isDevEnv : !1} ${L(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((s) => d`<calcite-flow slot=side-panel class=${P(e === s.id ? "" : "hidden")}>${s?.useFlows ? s.renderer?.({
|
|
926
960
|
closePanel: this._toggleSidePanel,
|
|
927
961
|
insertText: this._insertText.bind(this),
|
|
928
962
|
closed: e !== s.id,
|
|
@@ -954,18 +988,16 @@ class ce extends K {
|
|
|
954
988
|
renderBottomActionBar() {
|
|
955
989
|
if (!this._usesBottomExecutionDrawer)
|
|
956
990
|
return null;
|
|
957
|
-
const { showPanel: e, hasExecuted: t, openedPanel: s, isDebugging: a, isPaused: n, isExecuting: r } = this._debuggerState,
|
|
958
|
-
return d`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-toggle-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${
|
|
959
|
-
this._executeScript("run").catch(
|
|
960
|
-
}}></calcite-action>${this.enableDebugger && d`<calcite-action .disabled=${this._debuggerState.editorBreakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || r} @click=${() => {
|
|
961
|
-
this._executeScript("debug").catch(u(this));
|
|
962
|
-
}}></calcite-action>` || ""}`}</calcite-action-group>${t ? d`<calcite-action-group scale=s><calcite-action .active=${s === "output" && e} .text=${this.messages.output ?? "Output"} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${() => this._setExecutionPanel("output")}></calcite-action><calcite-action .active=${s === "console" && e} .text=${this.messages.console ?? "Console"} text-enabled scale=s icon=console icon-flip-rtl @click=${() => this._setExecutionPanel("console")}></calcite-action><calcite-action .active=${s === "log" && e} .text=${this.messages.log ?? "Log"} text-enabled scale=s icon=list icon-flip-rtl @click=${() => this._setExecutionPanel("log")} .disabled=${this.enableDebugger && this._debuggerState.mode === "debug"}></calcite-action>${this.enableDebugger && d`<calcite-action .active=${s === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug Console"} text-enabled scale=s icon=debug-script .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action>` || ""}</calcite-action-group>` : null}</calcite-action-bar>${e ? d`<calcite-action .text=${this.messages.close ?? "Close"} scale=s icon=x icon-flip-rtl @click=${this._onExecutionPanelClose} slot=actions-end></calcite-action>` : null}</div>`;
|
|
991
|
+
const { showPanel: e, hasExecuted: t, openedPanel: s, isDebugging: a, isPaused: n, isExecuting: r } = this._debuggerState, u = this.messages.continue ?? "Continue", x = this.messages.reset ?? "Reset", p = this.messages.stop ?? "Stop";
|
|
992
|
+
return d`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-toggle-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${u} icon=forward scale=s .disabled=${!n} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${u}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${x} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${x}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${p} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${p}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || r} @click=${() => {
|
|
993
|
+
this._executeScript("run").catch(l(this));
|
|
994
|
+
}}></calcite-action>${this.enableDebugger && d`<calcite-action .disabled=${this._debuggerState.editorBreakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || r} @click=${this._runAndDebug}></calcite-action>` || ""}`}</calcite-action-group>${t ? d`<calcite-action-group scale=s><calcite-action .active=${s === "output" && e} .text=${this.messages.output ?? "Output"} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${() => this._setExecutionPanel("output")}></calcite-action><calcite-action .active=${s === "console" && e} .text=${this.messages.console ?? "Console"} text-enabled scale=s icon=console icon-flip-rtl @click=${() => this._setExecutionPanel("console")}></calcite-action><calcite-action .active=${s === "log" && e} .text=${this.messages.log ?? "Log"} text-enabled scale=s icon=list icon-flip-rtl @click=${() => this._setExecutionPanel("log")} .disabled=${this.enableDebugger && this._debuggerState.mode === "debug"}></calcite-action>${this.enableDebugger && d`<calcite-action .active=${s === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug console"} text-enabled scale=s icon=debug .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action>` || ""}</calcite-action-group>` : null}</calcite-action-bar>${e ? d`<calcite-action .text=${this.messages.collapse ?? "Collapse"} scale=s icon=chevrons-down icon-flip-rtl @click=${this._onExecutionPanelClose} slot=actions-end></calcite-action>` : null}</div>`;
|
|
963
995
|
}
|
|
964
996
|
render() {
|
|
965
997
|
return d`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
|
|
966
998
|
}
|
|
967
999
|
}
|
|
968
|
-
|
|
1000
|
+
z("arcgis-arcade-editor", de);
|
|
969
1001
|
export {
|
|
970
|
-
|
|
1002
|
+
de as ArcgisArcadeEditor
|
|
971
1003
|
};
|