@arcgis/coding-components 5.2.0-next.5 → 5.2.0-next.6
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/{4G3EYLJY.js → 2YYB74Y3.js} +1 -1
- package/dist/cdn/{WWVPYM5B.js → 4HJRS4I7.js} +1 -1
- package/dist/cdn/DOCWTXKZ.js +12 -0
- package/dist/cdn/HBKQDGYR.js +2 -0
- package/dist/cdn/{QW7OA32G.js → HDEGIRFB.js} +1 -1
- package/dist/cdn/{HRM2JUGO.js → HQPGLNWP.js} +1 -1
- package/dist/cdn/I3XXIRZX.js +2 -0
- package/dist/cdn/ID5LCA7T.js +2 -0
- package/dist/cdn/{LUJKYDO7.js → IL7DUQH7.js} +1 -1
- package/dist/cdn/JEBRK3DP.js +2 -0
- package/dist/cdn/MZMKV7FA.js +2 -0
- package/dist/cdn/{IETP57KJ.js → NKDL6NEF.js} +1 -1
- package/dist/cdn/NL736YG3.js +6 -0
- package/dist/cdn/{3CHKFCKR.js → SFHJYB2X.js} +1 -1
- package/dist/cdn/{O3PQD5N5.js → SYW5WY2N.js} +1 -1
- package/dist/cdn/{CA3GVMWI.js → UDPKHTMC.js} +1 -1
- package/dist/cdn/UQRZDUGL.js +2 -0
- package/dist/cdn/{QGBZYXBS.js → XMXK333I.js} +1 -1
- package/dist/cdn/{QUR4WECO.js → XWUEYP6T.js} +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcade-defaults.js +56 -54
- package/dist/chunks/fields.js +18 -14
- package/dist/chunks/language-defaults-base.js +230 -221
- package/dist/chunks/sql-expr-defaults.js +63 -59
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +6 -6
- package/dist/components/arcgis-arcade-editor/customElement.js +147 -151
- package/dist/components/arcgis-code-editor-shell/customElement.js +5 -5
- package/dist/components/arcgis-editor-variables/customElement.js +12 -6
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/4N67XYKO.js +0 -2
- package/dist/cdn/B5A6XU2C.js +0 -2
- package/dist/cdn/CQTJWVFM.js +0 -6
- package/dist/cdn/G5IXPOCO.js +0 -2
- package/dist/cdn/RMVHO2AH.js +0 -12
- package/dist/cdn/RO6RHW6I.js +0 -2
- package/dist/cdn/TWEJITWD.js +0 -2
- package/dist/cdn/ZTCCL565.js +0 -2
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { g as Z, c as ee } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as te, html as d, nothing as
|
|
3
|
+
import { css as te, html as d, nothing as z } from "lit";
|
|
4
4
|
import { i as se } from "../../chunks/monaco-importer.js";
|
|
5
|
-
import { LitElement as ie, createEvent as N, safeClassMap as
|
|
5
|
+
import { LitElement as ie, createEvent as N, safeClassMap as P } from "@arcgis/lumina";
|
|
6
6
|
import { generateGuid as ae } from "@arcgis/toolkit/string";
|
|
7
|
-
import { i as
|
|
8
|
-
import { s as
|
|
9
|
-
import { b as
|
|
10
|
-
import { setArcadeAskAiBinding as
|
|
7
|
+
import { i as $, D as ne, e as K } from "../../chunks/arcade-executor.js";
|
|
8
|
+
import { s as oe, a as re } from "../../chunks/arcade-service-accessors.js";
|
|
9
|
+
import { b as v } from "../../chunks/arcade-defaults.js";
|
|
10
|
+
import { setArcadeAskAiBinding as k, arcadeAskAiCommandId as ce, arcadeQuickFixKind as le } from "../../chunks/arcade-mode.js";
|
|
11
11
|
import { u as de } from "../../chunks/useT9n.js";
|
|
12
|
-
import { createRef as
|
|
12
|
+
import { createRef as H, ref as j } from "lit/directives/ref.js";
|
|
13
13
|
import { load as ue } from "@arcgis/lumina/controllers";
|
|
14
14
|
import he from "@arcgis/core/config.js";
|
|
15
|
-
import
|
|
15
|
+
import Q from "@arcgis/core/identity/IdentityManager.js";
|
|
16
16
|
import { log as ge, rethrowError as u } from "@arcgis/toolkit/log";
|
|
17
|
-
import { watch as
|
|
17
|
+
import { watch as L } from "@arcgis/core/core/reactiveUtils.js";
|
|
18
18
|
import m from "@arcgis/core/core/Accessor.js";
|
|
19
|
-
import { property as
|
|
20
|
-
import { A as
|
|
19
|
+
import { property as c, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
20
|
+
import { A as V } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
|
|
21
21
|
import { r as pe } from "../../chunks/utilities.js";
|
|
22
|
-
import { Range as
|
|
23
|
-
const me = te`: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 calcite-action:not(:first-child){padding-inline-start: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}`,
|
|
22
|
+
import { Range as W, KeyCode as be, Uri as _e } from "monaco-editor";
|
|
23
|
+
const me = te`: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 calcite-action:not(:first-child){padding-inline-start: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;align-items:stretch;background-color:var(--calcite-color-foreground-1);.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}.bottom-action-bar__close{flex:0 0 auto}}`, q = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", h = (t, e) => {
|
|
24
24
|
ge(t, "Arcade Assistant", e);
|
|
25
|
-
},
|
|
25
|
+
}, X = [
|
|
26
26
|
"orgAiAssistantsEnabled",
|
|
27
27
|
"betaAppsAllowed",
|
|
28
28
|
"serviceUrlAvailable",
|
|
29
29
|
"userHasUseAiAssistantsPrivilege"
|
|
30
|
-
], fe =
|
|
30
|
+
], fe = X, G = (t, e) => e.every((s) => t[s] === !0), xe = (t) => {
|
|
31
31
|
const { aiAssistantsEnabled: e } = t;
|
|
32
32
|
return e === void 0 ? (h("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
|
|
33
|
-
}, Se = async (t) => (await
|
|
33
|
+
}, Se = async (t) => (await Q.getCredential(t, { oAuthPopupConfirmation: !1 })).token, Ae = async (t) => {
|
|
34
34
|
try {
|
|
35
|
-
return !!await
|
|
35
|
+
return !!await Q.checkSignInStatus(t);
|
|
36
36
|
} catch {
|
|
37
37
|
return h("warn", "User is not signed in."), !1;
|
|
38
38
|
}
|
|
@@ -48,86 +48,86 @@ async function Pe({
|
|
|
48
48
|
if (!e)
|
|
49
49
|
return h("warn", "Arcade Assistant initialization failed. Reason: missing portal url."), { shouldRender: !1 };
|
|
50
50
|
const s = e.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, "");
|
|
51
|
-
if (!await
|
|
51
|
+
if (!await Ae(s))
|
|
52
52
|
return { shouldRender: !1 };
|
|
53
|
-
const a = await Se(e),
|
|
54
|
-
fetch(
|
|
55
|
-
fetch(n, { credentials: "include" }).then((
|
|
56
|
-
fetch(
|
|
57
|
-
]), [
|
|
58
|
-
if (
|
|
53
|
+
const a = await Se(e), o = `${s}/sharing/rest/portals/self?f=json&token=${a}`, n = `${s}/sharing/rest/portals/self/settings?f=json&token=${a}`, r = `${s}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`, E = await Promise.allSettled([
|
|
54
|
+
fetch(o, { credentials: "include" }).then((A) => A.json()),
|
|
55
|
+
fetch(n, { credentials: "include" }).then((A) => A.json()),
|
|
56
|
+
fetch(r, { credentials: "include" }).then((A) => A.json())
|
|
57
|
+
]), [x, B, I] = E, S = x.status === "fulfilled" ? x.value : (h("warn", `Failed to fetch selfUrl. Reason: ${x.reason}.`), {}), M = B.status === "fulfilled" ? B.value : (h("warn", `Failed to fetch settingsUrl. Reason: ${B.reason}.`), {}), J = I.status === "fulfilled" ? I.value : (h("warn", `Failed to fetch signinSettingsUrl. Reason: ${I.reason}.`), {});
|
|
58
|
+
if (S.isPortal)
|
|
59
59
|
return { shouldRender: !1 };
|
|
60
|
-
const T =
|
|
61
|
-
if (!
|
|
60
|
+
const T = S.helpBase || "";
|
|
61
|
+
if (!M)
|
|
62
62
|
return h("warn", "Settings response is not available."), { shouldRender: !1 };
|
|
63
|
-
const
|
|
64
|
-
orgAiAssistantsEnabled:
|
|
63
|
+
const w = {
|
|
64
|
+
orgAiAssistantsEnabled: xe(M),
|
|
65
65
|
betaAppsAllowed: J.blockBetaApps !== !0,
|
|
66
|
-
serviceUrlAvailable: !!
|
|
67
|
-
userHasUseAiAssistantsPrivilege:
|
|
66
|
+
serviceUrlAvailable: !!S?.helperServices?.aiAssistantServices?.url,
|
|
67
|
+
userHasUseAiAssistantsPrivilege: S?.user?.privileges?.includes("portal:user:useAIAssistants") === !0
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
w.betaAppsAllowed || h(
|
|
70
70
|
"warn",
|
|
71
71
|
"Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
|
|
72
|
-
),
|
|
73
|
-
const
|
|
74
|
-
return
|
|
72
|
+
), w.userHasUseAiAssistantsPrivilege || h("warn", "User does not have the required privileges to use AI Assistants.");
|
|
73
|
+
const F = G(w, fe), U = G(w, X), O = S?.helperServices?.aiAssistantServices?.url;
|
|
74
|
+
return O ? {
|
|
75
75
|
shouldRender: !0,
|
|
76
76
|
portalUrl: e,
|
|
77
77
|
availableFeatures: {
|
|
78
|
-
codeActions:
|
|
79
|
-
prompting:
|
|
78
|
+
codeActions: F,
|
|
79
|
+
prompting: U
|
|
80
80
|
},
|
|
81
|
-
serviceUrl:
|
|
81
|
+
serviceUrl: O,
|
|
82
82
|
helpBase: T,
|
|
83
|
-
feedbackServiceUrl:
|
|
83
|
+
feedbackServiceUrl: q
|
|
84
84
|
} : {
|
|
85
85
|
shouldRender: !0,
|
|
86
86
|
portalUrl: e,
|
|
87
87
|
availableFeatures: {
|
|
88
|
-
codeActions:
|
|
89
|
-
prompting:
|
|
88
|
+
codeActions: F,
|
|
89
|
+
prompting: U
|
|
90
90
|
},
|
|
91
91
|
helpBase: T,
|
|
92
|
-
feedbackServiceUrl:
|
|
92
|
+
feedbackServiceUrl: q
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
var ve = Object.defineProperty,
|
|
96
|
-
for (var a = i > 1 ? void 0 : i ?
|
|
97
|
-
(n = t[
|
|
95
|
+
var ve = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, _ = (t, e, s, i) => {
|
|
96
|
+
for (var a = i > 1 ? void 0 : i ? $e(e, s) : e, o = t.length - 1, n; o >= 0; o--)
|
|
97
|
+
(n = t[o]) && (a = (i ? n(e, s, a) : n(a)) || a);
|
|
98
98
|
return i && a && ve(e, s, a), a;
|
|
99
99
|
};
|
|
100
|
-
const
|
|
100
|
+
const Y = 100;
|
|
101
101
|
let g = class extends m {
|
|
102
102
|
constructor(t) {
|
|
103
|
-
super(t), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount =
|
|
103
|
+
super(t), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount = Y;
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
_([
|
|
107
|
-
|
|
107
|
+
c()
|
|
108
108
|
], g.prototype, "collectionItems", 2);
|
|
109
109
|
_([
|
|
110
|
-
|
|
110
|
+
c()
|
|
111
111
|
], g.prototype, "errorMessage", 2);
|
|
112
112
|
_([
|
|
113
|
-
|
|
113
|
+
c()
|
|
114
114
|
], g.prototype, "expanded", 2);
|
|
115
115
|
_([
|
|
116
|
-
|
|
116
|
+
c()
|
|
117
117
|
], g.prototype, "requestId", 2);
|
|
118
118
|
_([
|
|
119
|
-
|
|
119
|
+
c()
|
|
120
120
|
], g.prototype, "schemaValue", 2);
|
|
121
121
|
_([
|
|
122
|
-
|
|
122
|
+
c()
|
|
123
123
|
], g.prototype, "status", 2);
|
|
124
124
|
_([
|
|
125
|
-
|
|
125
|
+
c()
|
|
126
126
|
], g.prototype, "visibleChildCount", 2);
|
|
127
127
|
g = _([
|
|
128
128
|
f("ArcadeDebuggerLazyTreeNodeState")
|
|
129
129
|
], g);
|
|
130
|
-
let
|
|
130
|
+
let C = class extends m {
|
|
131
131
|
constructor(t) {
|
|
132
132
|
super(t), this.generation = 0, this.nodes = /* @__PURE__ */ new Map();
|
|
133
133
|
}
|
|
@@ -151,7 +151,7 @@ let w = class extends m {
|
|
|
151
151
|
}
|
|
152
152
|
showMore(t, e) {
|
|
153
153
|
const s = this.ensureNode(t);
|
|
154
|
-
s.visibleChildCount >= e || (s.visibleChildCount = Math.min(e, s.visibleChildCount +
|
|
154
|
+
s.visibleChildCount >= e || (s.visibleChildCount = Math.min(e, s.visibleChildCount + Y));
|
|
155
155
|
}
|
|
156
156
|
loadNode(t, e) {
|
|
157
157
|
switch (e.kind) {
|
|
@@ -171,13 +171,13 @@ let w = class extends m {
|
|
|
171
171
|
const i = this.nodes.get(t);
|
|
172
172
|
if (!i || i.status === "loading" || i.status === "loaded")
|
|
173
173
|
return;
|
|
174
|
-
const a = this.generation,
|
|
175
|
-
i.requestId =
|
|
176
|
-
const
|
|
177
|
-
!
|
|
174
|
+
const a = this.generation, o = i.requestId + 1;
|
|
175
|
+
i.requestId = o, i.status = "loading", i.errorMessage = "", i.schemaValue = void 0, i.collectionItems = [], e().then((n) => {
|
|
176
|
+
const r = this.nodes.get(t);
|
|
177
|
+
!r || this.generation !== a || r.requestId !== o || (s(r, n), r.status = "loaded");
|
|
178
178
|
}).catch(() => {
|
|
179
179
|
const n = this.nodes.get(t);
|
|
180
|
-
!n || this.generation !== a || n.requestId !==
|
|
180
|
+
!n || this.generation !== a || n.requestId !== o || (n.status = "error");
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
destroyNodes() {
|
|
@@ -186,13 +186,13 @@ let w = class extends m {
|
|
|
186
186
|
this.nodes.clear();
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
|
-
|
|
189
|
+
C = _([
|
|
190
190
|
f("ArcadeDebuggerLazyTreeState")
|
|
191
|
-
],
|
|
192
|
-
var
|
|
193
|
-
for (var a = i > 1 ? void 0 : i ?
|
|
194
|
-
(n = t[
|
|
195
|
-
return i && a &&
|
|
191
|
+
], C);
|
|
192
|
+
var ye = Object.defineProperty, De = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
|
|
193
|
+
for (var a = i > 1 ? void 0 : i ? De(e, s) : e, o = t.length - 1, n; o >= 0; o--)
|
|
194
|
+
(n = t[o]) && (a = (i ? n(e, s, a) : n(a)) || a);
|
|
195
|
+
return i && a && ye(e, s, a), a;
|
|
196
196
|
};
|
|
197
197
|
let b = class extends m {
|
|
198
198
|
constructor(t) {
|
|
@@ -218,27 +218,27 @@ let b = class extends m {
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
l([
|
|
221
|
-
|
|
221
|
+
c()
|
|
222
222
|
], b.prototype, "phase", 2);
|
|
223
223
|
l([
|
|
224
|
-
|
|
224
|
+
c()
|
|
225
225
|
], b.prototype, "mode", 2);
|
|
226
226
|
l([
|
|
227
|
-
|
|
227
|
+
c()
|
|
228
228
|
], b.prototype, "sessionId", 2);
|
|
229
229
|
l([
|
|
230
|
-
|
|
230
|
+
c()
|
|
231
231
|
], b.prototype, "result", 2);
|
|
232
232
|
l([
|
|
233
|
-
|
|
233
|
+
c()
|
|
234
234
|
], b.prototype, "consoleLogs", 2);
|
|
235
235
|
l([
|
|
236
|
-
|
|
236
|
+
c()
|
|
237
237
|
], b.prototype, "hasExecuted", 2);
|
|
238
238
|
b = l([
|
|
239
239
|
f("ArcadeDebuggerExecutionModel")
|
|
240
240
|
], b);
|
|
241
|
-
let
|
|
241
|
+
let R = class extends m {
|
|
242
242
|
constructor(t) {
|
|
243
243
|
super(t), this.breakpoints = [];
|
|
244
244
|
}
|
|
@@ -254,26 +254,26 @@ let C = class extends m {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
l([
|
|
257
|
-
|
|
258
|
-
],
|
|
259
|
-
|
|
257
|
+
c()
|
|
258
|
+
], R.prototype, "breakpoints", 2);
|
|
259
|
+
R = l([
|
|
260
260
|
f("ArcadeDebuggerSessionModel")
|
|
261
|
-
],
|
|
261
|
+
], R);
|
|
262
262
|
let y = class extends m {
|
|
263
263
|
constructor(t) {
|
|
264
264
|
super(t), this.openedPanel = "output", this.showPanel = !1;
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
l([
|
|
268
|
-
|
|
268
|
+
c()
|
|
269
269
|
], y.prototype, "openedPanel", 2);
|
|
270
270
|
l([
|
|
271
|
-
|
|
271
|
+
c()
|
|
272
272
|
], y.prototype, "showPanel", 2);
|
|
273
273
|
y = l([
|
|
274
274
|
f("ArcadeDebuggerUiModel")
|
|
275
275
|
], y);
|
|
276
|
-
let
|
|
276
|
+
let D = class extends m {
|
|
277
277
|
constructor(t) {
|
|
278
278
|
super(t);
|
|
279
279
|
}
|
|
@@ -291,17 +291,17 @@ let $ = class extends m {
|
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
293
|
l([
|
|
294
|
-
|
|
295
|
-
],
|
|
294
|
+
c()
|
|
295
|
+
], D.prototype, "pausedState", 2);
|
|
296
296
|
l([
|
|
297
|
-
|
|
298
|
-
],
|
|
299
|
-
|
|
297
|
+
c()
|
|
298
|
+
], D.prototype, "lastPausedState", 2);
|
|
299
|
+
D = l([
|
|
300
300
|
f("ArcadeDebuggerPausedFrameModel")
|
|
301
|
-
],
|
|
301
|
+
], D);
|
|
302
302
|
let p = class extends m {
|
|
303
303
|
constructor(t) {
|
|
304
|
-
super(t), this.execution = new b(), this.lazyTreeState = new
|
|
304
|
+
super(t), this.execution = new b(), this.lazyTreeState = new C(), this.pausedFrame = new D(), this.previewTabsState = new V(), this.session = new R(), this.ui = new y();
|
|
305
305
|
}
|
|
306
306
|
get breakpoints() {
|
|
307
307
|
return this.session.breakpoints;
|
|
@@ -381,7 +381,7 @@ let p = class extends m {
|
|
|
381
381
|
this.execution.mode = "debug", this.execution.result = { resultType: "debug", result: t }, this.execution.phase = "completed", this.ui.openedPanel = "output", this.pausedFrame.reset(), this.resetTransientDebuggerState();
|
|
382
382
|
}
|
|
383
383
|
completeRun(t, e = {}) {
|
|
384
|
-
this.execution.mode = "run", !e.useDebugRenderer &&
|
|
384
|
+
this.execution.mode = "run", !e.useDebugRenderer && $(t) ? this.execution.result = { resultType: "run", result: t } : e.useDebugRenderer && !$(t) && (this.execution.result = { resultType: "debug", result: t }), this.execution.phase = "completed", this.pausedFrame.reset(), this.ui.openedPanel = "output", this.resetTransientDebuggerState();
|
|
385
385
|
}
|
|
386
386
|
continueDebug() {
|
|
387
387
|
const t = this.pausedFrame.pausedState?.continue;
|
|
@@ -449,40 +449,40 @@ let p = class extends m {
|
|
|
449
449
|
this.pausedLine = void 0, this.lazyTreeState.reset(), this.previewTabsState.clear();
|
|
450
450
|
}
|
|
451
451
|
replaceTransientDebuggerState() {
|
|
452
|
-
this.pausedLine = void 0, this.lazyTreeState = new
|
|
452
|
+
this.pausedLine = void 0, this.lazyTreeState = new C(), this.previewTabsState = new V();
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
l([
|
|
456
|
-
|
|
456
|
+
c()
|
|
457
457
|
], p.prototype, "execution", 2);
|
|
458
458
|
l([
|
|
459
|
-
|
|
459
|
+
c()
|
|
460
460
|
], p.prototype, "lazyTreeState", 2);
|
|
461
461
|
l([
|
|
462
|
-
|
|
462
|
+
c()
|
|
463
463
|
], p.prototype, "pausedLine", 2);
|
|
464
464
|
l([
|
|
465
|
-
|
|
465
|
+
c()
|
|
466
466
|
], p.prototype, "pausedFrame", 2);
|
|
467
467
|
l([
|
|
468
|
-
|
|
468
|
+
c()
|
|
469
469
|
], p.prototype, "previewTabsState", 2);
|
|
470
470
|
l([
|
|
471
|
-
|
|
471
|
+
c()
|
|
472
472
|
], p.prototype, "session", 2);
|
|
473
473
|
l([
|
|
474
|
-
|
|
474
|
+
c()
|
|
475
475
|
], p.prototype, "ui", 2);
|
|
476
476
|
p = l([
|
|
477
477
|
f("ArcadeDebuggerStore")
|
|
478
478
|
], p);
|
|
479
|
-
const
|
|
479
|
+
const Ee = {
|
|
480
480
|
glyphMargin: !0,
|
|
481
481
|
lineNumbersMinChars: 1
|
|
482
482
|
};
|
|
483
483
|
class we extends ie {
|
|
484
484
|
constructor() {
|
|
485
|
-
super(...arguments), this._codeEditorElt =
|
|
485
|
+
super(...arguments), this._codeEditorElt = H(), this._arcadeAssistantElt = H(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new p(), this.messages = de(), this._modelId = ae(), this._openArcadeHelp = () => {
|
|
486
486
|
window.open(ne, "Arcade Help");
|
|
487
487
|
}, this._decorations = void 0, this._monacoEditor = ue(se), this._editorOptions = {}, this._toggleSidePanel = (e) => {
|
|
488
488
|
e.currentTarget instanceof HTMLElement && this._setOpenedSidePanel(e.currentTarget.dataset.panelName ?? "none");
|
|
@@ -493,7 +493,7 @@ class we extends ie {
|
|
|
493
493
|
if (!e)
|
|
494
494
|
return;
|
|
495
495
|
const s = this._debuggerState.breakpoints.map((i) => ({
|
|
496
|
-
range: new
|
|
496
|
+
range: new W(i, 1, i, 1),
|
|
497
497
|
options: {
|
|
498
498
|
isWholeLine: !0,
|
|
499
499
|
glyphMarginClassName: "arcgis-code-editor__breakpoint-glyph"
|
|
@@ -518,7 +518,7 @@ class we extends ie {
|
|
|
518
518
|
}
|
|
519
519
|
get editorOptions() {
|
|
520
520
|
return {
|
|
521
|
-
...
|
|
521
|
+
...Ee,
|
|
522
522
|
...this._editorOptions
|
|
523
523
|
};
|
|
524
524
|
}
|
|
@@ -532,8 +532,8 @@ class we extends ie {
|
|
|
532
532
|
if (!e)
|
|
533
533
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
534
534
|
await this._componentReadyDefer.promise;
|
|
535
|
-
const s = this._codeEditorElt.value?.value, i = await
|
|
536
|
-
return
|
|
535
|
+
const s = this._codeEditorElt.value?.value, i = await K(e.definition, s, this.testData, { mode: "run" });
|
|
536
|
+
return $(i) ? i : { type: "error", value: "Unexpected debug result", error: null };
|
|
537
537
|
}
|
|
538
538
|
async setFocus() {
|
|
539
539
|
await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
|
|
@@ -548,14 +548,14 @@ class we extends ie {
|
|
|
548
548
|
}
|
|
549
549
|
async load() {
|
|
550
550
|
const e = Z("./assets");
|
|
551
|
-
|
|
552
|
-
for (this._askAiBindingKey && (
|
|
551
|
+
oe(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(u(this)), () => {
|
|
552
|
+
for (this._askAiBindingKey && (k(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0); this._disposables.length; )
|
|
553
553
|
this._disposables.pop()?.dispose();
|
|
554
554
|
this._abortExternalExecution(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
|
|
555
555
|
}));
|
|
556
556
|
}
|
|
557
557
|
willUpdate(e) {
|
|
558
|
-
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("enableDebugger") && !this.enableDebugger && this._debuggerState.disableDebugger(), e.has("snippets") &&
|
|
558
|
+
(e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("enableDebugger") && !this.enableDebugger && this._debuggerState.disableDebugger(), e.has("snippets") && v.updateApiContextForModel(this._modelId, {
|
|
559
559
|
snippets: this.snippets
|
|
560
560
|
}), (e.has("arcadeAssistant") || e.has("disableAssistant")) && this._updateArcadeAssistantRemoteState();
|
|
561
561
|
}
|
|
@@ -571,15 +571,15 @@ class we extends ie {
|
|
|
571
571
|
this._connectMonacoCustomizationsPromise = (async () => {
|
|
572
572
|
if (!this.isConnected)
|
|
573
573
|
return;
|
|
574
|
-
const e = await
|
|
575
|
-
this._disposables.push(e.onDiagnosticsChange((
|
|
576
|
-
this._preparingArcade || (this._diagnostics =
|
|
574
|
+
const e = await re();
|
|
575
|
+
this._disposables.push(e.onDiagnosticsChange((r) => {
|
|
576
|
+
this._preparingArcade || (this._diagnostics = r.diagnostics, this.arcgisDiagnosticsChange.emit(r.diagnostics));
|
|
577
577
|
})), this.testData && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
|
|
578
|
-
const s =
|
|
578
|
+
const s = L(() => this._debuggerState.breakpoints, () => this._updateBreakpointsDecorations(), { sync: !0 }), i = L(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = L(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
|
|
579
579
|
this._disposables.push({ dispose: () => s.remove() }, { dispose: () => i.remove() }, { dispose: () => a.remove() });
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
const n = this.editorInstance?.onDidChangeModelContent((
|
|
580
|
+
const o = this.editorInstance?.onMouseDown((r) => this._onEditorMouseDown(r));
|
|
581
|
+
o && this._disposables.push(o);
|
|
582
|
+
const n = this.editorInstance?.onDidChangeModelContent((r) => this._onEditorModelContentChange(r));
|
|
583
583
|
n && this._disposables.push(n), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
|
|
584
584
|
})();
|
|
585
585
|
try {
|
|
@@ -589,11 +589,7 @@ class we extends ie {
|
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
591
|
_onEditorMouseDown(e) {
|
|
592
|
-
if (!this.enableDebugger || ![
|
|
593
|
-
this._monacoEditor.MouseTargetType.GUTTER_GLYPH_MARGIN,
|
|
594
|
-
this._monacoEditor.MouseTargetType.GUTTER_LINE_NUMBERS,
|
|
595
|
-
this._monacoEditor.MouseTargetType.GUTTER_LINE_DECORATIONS
|
|
596
|
-
].includes(e.target.type))
|
|
592
|
+
if (!this.enableDebugger || ![this._monacoEditor.MouseTargetType.GUTTER_GLYPH_MARGIN].includes(e.target.type))
|
|
597
593
|
return;
|
|
598
594
|
const s = e.target.position?.lineNumber;
|
|
599
595
|
s && this._debuggerState.toggleBreakpoint(s);
|
|
@@ -612,7 +608,7 @@ class we extends ie {
|
|
|
612
608
|
const s = this._debuggerState.debuggerLine;
|
|
613
609
|
s != null ? this._debuggerPausedLineDecoration = e.createDecorationsCollection([
|
|
614
610
|
{
|
|
615
|
-
range: new
|
|
611
|
+
range: new W(s, 1, s, 1),
|
|
616
612
|
options: {
|
|
617
613
|
isWholeLine: !0,
|
|
618
614
|
className: "arcgis-code-editor__debugger-paused-line",
|
|
@@ -628,8 +624,8 @@ class we extends ie {
|
|
|
628
624
|
_abortExternalExecution() {
|
|
629
625
|
this._externalExecutionAbortController?.abort(), this._externalExecutionAbortController = void 0;
|
|
630
626
|
}
|
|
631
|
-
_stopDebugSession(
|
|
632
|
-
this._abortExternalExecution(), this._debuggerState.stopDebug({ hidePanel:
|
|
627
|
+
_stopDebugSession() {
|
|
628
|
+
this._abortExternalExecution(), this._debuggerState.stopDebug({ hidePanel: !1 });
|
|
633
629
|
}
|
|
634
630
|
_resetDebugSession() {
|
|
635
631
|
this._abortExternalExecution(), this._debuggerState.resetDebug(), this._executeScript("debug").catch(u(this));
|
|
@@ -652,26 +648,26 @@ class we extends ie {
|
|
|
652
648
|
return { type: "error", value: "Missing external executor", error: null };
|
|
653
649
|
const a = new AbortController();
|
|
654
650
|
this._abortExternalExecution(), this._externalExecutionAbortController = a;
|
|
655
|
-
const
|
|
651
|
+
const o = i.console ?? (() => {
|
|
656
652
|
});
|
|
657
653
|
try {
|
|
658
654
|
if (e === "debug") {
|
|
659
|
-
const { breakpoints: n, onDebugPause:
|
|
660
|
-
if (!n || !
|
|
655
|
+
const { breakpoints: n, onDebugPause: r } = i;
|
|
656
|
+
if (!n || !r)
|
|
661
657
|
throw new Error("Missing debug execution options");
|
|
662
658
|
return await this.externalExecutor.execute({
|
|
663
659
|
mode: "debug",
|
|
664
660
|
script: s,
|
|
665
|
-
console:
|
|
661
|
+
console: o,
|
|
666
662
|
signal: a.signal,
|
|
667
663
|
breakpoints: n,
|
|
668
|
-
onDebugPause:
|
|
664
|
+
onDebugPause: r
|
|
669
665
|
});
|
|
670
666
|
}
|
|
671
667
|
return await this.externalExecutor.execute({
|
|
672
668
|
mode: "run",
|
|
673
669
|
script: s,
|
|
674
|
-
console:
|
|
670
|
+
console: o,
|
|
675
671
|
signal: a.signal
|
|
676
672
|
});
|
|
677
673
|
} catch (n) {
|
|
@@ -690,10 +686,10 @@ class we extends ie {
|
|
|
690
686
|
async _updateEditorProfile() {
|
|
691
687
|
this._preparingArcade = !0;
|
|
692
688
|
try {
|
|
693
|
-
await
|
|
689
|
+
await v.setProfileForModel(this._modelId, this.profile, {
|
|
694
690
|
locale: this.messages._t9nLocale,
|
|
695
691
|
snippets: this.snippets
|
|
696
|
-
}), this._editorProfile =
|
|
692
|
+
}), this._editorProfile = v.getEditorProfileForModel(this._modelId);
|
|
697
693
|
} catch {
|
|
698
694
|
this._editorProfile = void 0;
|
|
699
695
|
} finally {
|
|
@@ -701,10 +697,10 @@ class we extends ie {
|
|
|
701
697
|
}
|
|
702
698
|
}
|
|
703
699
|
async _updateApiLibrary() {
|
|
704
|
-
this._apiLibrary = await
|
|
700
|
+
this._apiLibrary = await v.getApiLibraryForModel(this._modelId);
|
|
705
701
|
}
|
|
706
702
|
_setExecutionPanel(e) {
|
|
707
|
-
this._debuggerState.
|
|
703
|
+
this._debuggerState.setPanel(e);
|
|
708
704
|
}
|
|
709
705
|
async _executeScript(e) {
|
|
710
706
|
const s = this.testData;
|
|
@@ -713,33 +709,33 @@ class we extends ie {
|
|
|
713
709
|
const i = e === "debug" ? this._debuggerState.startDebug() : this._debuggerState.startRun();
|
|
714
710
|
setTimeout(() => {
|
|
715
711
|
(async () => {
|
|
716
|
-
const a = this._codeEditorElt.value?.value ?? this.script,
|
|
712
|
+
const a = this._codeEditorElt.value?.value ?? this.script, o = {
|
|
717
713
|
mode: e,
|
|
718
|
-
console: (
|
|
714
|
+
console: (r) => this._debuggerState.addConsoleLog(r),
|
|
719
715
|
breakpoints: e === "debug" ? this._debuggerState.debuggerBreakpoints : void 0
|
|
720
716
|
};
|
|
721
|
-
e === "debug" && (
|
|
717
|
+
e === "debug" && (o.onDebugPause = this._handleDebugPause.bind(this, i));
|
|
722
718
|
let n;
|
|
723
719
|
if (this.externalExecutor)
|
|
724
|
-
n = await this._executeWithExternalExecutor(e, a,
|
|
720
|
+
n = await this._executeWithExternalExecutor(e, a, o);
|
|
725
721
|
else {
|
|
726
|
-
const
|
|
727
|
-
if (!
|
|
722
|
+
const r = await this._editorProfilePromise;
|
|
723
|
+
if (!r) {
|
|
728
724
|
this._debuggerState.fail({ type: "error", value: "Missing editor profile", error: null });
|
|
729
725
|
return;
|
|
730
726
|
}
|
|
731
|
-
n = await
|
|
727
|
+
n = await K(r.definition, a, s, o);
|
|
732
728
|
}
|
|
733
729
|
if (i === this._debuggerState.sessionId) {
|
|
734
730
|
if (e === "debug") {
|
|
735
|
-
if (
|
|
731
|
+
if ($(n)) {
|
|
736
732
|
this._debuggerState.fail(n);
|
|
737
733
|
return;
|
|
738
734
|
}
|
|
739
735
|
this._debuggerState.completeDebug(n);
|
|
740
736
|
return;
|
|
741
737
|
}
|
|
742
|
-
|
|
738
|
+
$(n) ? this._debuggerState.completeRun(n) : this.externalExecutor ? this._debuggerState.completeRun(n, { useDebugRenderer: !0 }) : this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
|
|
743
739
|
}
|
|
744
740
|
})();
|
|
745
741
|
}, 0);
|
|
@@ -823,10 +819,10 @@ class we extends ie {
|
|
|
823
819
|
return;
|
|
824
820
|
const s = this._getAskAiBindingKey();
|
|
825
821
|
if (!this._arcadeAssistantRemoteState.shouldRender) {
|
|
826
|
-
this._askAiBindingKey && (
|
|
822
|
+
this._askAiBindingKey && (k(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0);
|
|
827
823
|
return;
|
|
828
824
|
}
|
|
829
|
-
this._askAiBindingKey && this._askAiBindingKey !== s &&
|
|
825
|
+
this._askAiBindingKey && this._askAiBindingKey !== s && k(this._askAiBindingKey, void 0), k(s, {
|
|
830
826
|
provideCodeActions: ({ context: i }) => this._getAskAiCodeActions(i),
|
|
831
827
|
run: (i) => {
|
|
832
828
|
this.openArcadeAssistant({
|
|
@@ -849,10 +845,10 @@ class we extends ie {
|
|
|
849
845
|
}}></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>`;
|
|
850
846
|
}
|
|
851
847
|
renderMainPanel() {
|
|
852
|
-
return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${
|
|
848
|
+
return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${v.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${j(this._codeEditorElt)}></arcgis-code-editor>`;
|
|
853
849
|
}
|
|
854
|
-
renderAction({ id: e, label: s, icon: i, active: a, panelName:
|
|
855
|
-
return d`<calcite-action id=${e ??
|
|
850
|
+
renderAction({ id: e, label: s, icon: i, active: a, panelName: o, iconFlipRtl: n = !1, onClick: r = this._toggleSidePanel }) {
|
|
851
|
+
return d`<calcite-action id=${e ?? z} .text=${s} .textEnabled=${this.sideActionBarExpanded} .icon=${i} .active=${a} @click=${r} data-panel-name=${o ?? z} .iconFlipRtl=${n}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${s}</span></calcite-tooltip>` || ""}`;
|
|
856
852
|
}
|
|
857
853
|
renderSideActionBar() {
|
|
858
854
|
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({
|
|
@@ -899,7 +895,7 @@ class we extends ie {
|
|
|
899
895
|
if (this.hideSideBar)
|
|
900
896
|
return null;
|
|
901
897
|
const { openedSidePanel: e, _arcadeAssistantRemoteState: s } = this;
|
|
902
|
-
return d`<arcgis-language-api-panel slot=side-panel class=${
|
|
898
|
+
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=${{ profileempty: this.messages.profileempty }}></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>` || ""}${s?.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=${s.portalUrl} .serviceUrl=${"serviceUrl" in s ? s.serviceUrl : void 0} .helpBase=${s.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${s.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} ${j(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((i) => d`<calcite-flow slot=side-panel class=${P(e === i.id ? "" : "hidden")}>${i?.useFlows ? i.renderer?.({
|
|
903
899
|
closePanel: this._toggleSidePanel,
|
|
904
900
|
insertText: this._insertText.bind(this),
|
|
905
901
|
closed: e !== i.id,
|
|
@@ -922,18 +918,18 @@ class we extends ie {
|
|
|
922
918
|
return d`<arcgis-arcade-results slot=results-panel .openedResultPanel=${e} .loading=${this._debuggerState.isExecuting} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange} @arcgisInternalClosePanel=${this._onExecutionPanelClose}></arcgis-arcade-results>`;
|
|
923
919
|
}
|
|
924
920
|
renderBottomExecutionBody() {
|
|
925
|
-
const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode:
|
|
926
|
-
return e ? s === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : s === "output" && (
|
|
921
|
+
const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode: o } = this._debuggerState;
|
|
922
|
+
return e ? s === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : s === "output" && (o === "debug" || i) ? d`<arcgis-arcade-debugger-output slot=results-panel .debuggerStore=${this._debuggerState} .result=${i}></arcgis-arcade-debugger-output>` : d`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${s} .loading=${s === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>` : null;
|
|
927
923
|
}
|
|
928
924
|
renderBottomActionBar() {
|
|
929
925
|
if (!this._usesBottomExecutionDrawer)
|
|
930
926
|
return null;
|
|
931
|
-
const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused:
|
|
932
|
-
return d`<
|
|
927
|
+
const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused: o, isExecuting: n } = this._debuggerState, r = this.messages.continue ?? "Continue", E = this.messages.reset ?? "Reset", x = this.messages.stop ?? "Stop";
|
|
928
|
+
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-disabled><calcite-action-group scale=s>${a ? d`<calcite-action id=debugger-continue-action .text=${r} icon=forward scale=s .disabled=${!o} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${r}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${E} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${E}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${x} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${x}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || n} @click=${() => {
|
|
933
929
|
this._executeScript("run").catch(u(this));
|
|
934
|
-
}}></calcite-action><calcite-action .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || n} @click=${() => {
|
|
930
|
+
}}></calcite-action><calcite-action .disabled=${this._debuggerState.breakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || n} @click=${() => {
|
|
935
931
|
this._executeScript("debug").catch(u(this));
|
|
936
|
-
}}></calcite-action>`}</calcite-action-group>${s ? d`<calcite-action-group scale=s><calcite-action .active=${i === "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=${i === "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=${i === "log" && e} .text=${this.messages.log ?? "Log"} text-enabled scale=s icon=list icon-flip-rtl @click=${() => this._setExecutionPanel("log")}></calcite-action><calcite-action .active=${i === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug Console"} text-enabled scale=s icon=debug-script icon-flip-rtl .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action></calcite-action-group>` : null}
|
|
932
|
+
}}></calcite-action>`}</calcite-action-group>${s ? d`<calcite-action-group scale=s><calcite-action .active=${i === "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=${i === "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=${i === "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><calcite-action .active=${i === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug Console"} text-enabled scale=s icon=debug-script icon-flip-rtl .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action></calcite-action-group>` : null}</calcite-action-bar>${e ? d`<calcite-action class="bottom-action-bar__close" .text=${this.messages.close ?? "Close"} scale=s icon=x icon-flip-rtl @click=${this._onExecutionPanelClose}></calcite-action>` : null}</div>`;
|
|
937
933
|
}
|
|
938
934
|
render() {
|
|
939
935
|
return d`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
|