@arcgis/coding-components 5.2.0-next.24 → 5.2.0-next.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cdn/{NR4MWHO2.js → 35PM76LN.js} +1 -1
  2. package/dist/cdn/{KTDJ3N4O.js → 46DUY6LF.js} +1 -1
  3. package/dist/cdn/{H2YYYWPE.js → 5RWI53UM.js} +1 -1
  4. package/dist/cdn/6R2FXATY.js +2 -0
  5. package/dist/cdn/{Q2EZ6DGG.js → 7RQSIZ7E.js} +1 -1
  6. package/dist/cdn/{ZXEQOR2Y.js → BCXSPP2P.js} +1 -1
  7. package/dist/cdn/{HXJFZ2Y5.js → BGTP5CFY.js} +1 -1
  8. package/dist/cdn/{OLNYBWUC.js → BZWB7A55.js} +1 -1
  9. package/dist/cdn/{3QN6NREQ.js → DD277QPZ.js} +1 -1
  10. package/dist/cdn/{O5XRLNCX.js → DTRK3XAL.js} +1 -1
  11. package/dist/cdn/{RFQXYDLI.js → EYE5UNR2.js} +1 -1
  12. package/dist/cdn/{PXKBNRBR.js → H46YVJ4O.js} +1 -1
  13. package/dist/cdn/JF5ISPMG.js +2 -0
  14. package/dist/cdn/{3O35TTKM.js → L7T34NYP.js} +1 -1
  15. package/dist/cdn/P22DALGG.js +2 -0
  16. package/dist/cdn/{VPVLZ5QO.js → S4UOB65K.js} +1 -1
  17. package/dist/cdn/{A6IGYBAZ.js → TUQ7FMSM.js} +1 -1
  18. package/dist/cdn/{LEFFI3FB.js → VEOKKZ5A.js} +1 -1
  19. package/dist/cdn/{SCLCF2SG.js → XSXVHUIH.js} +1 -1
  20. package/dist/cdn/{CPITVSFM.js → YTISJUMJ.js} +1 -1
  21. package/dist/cdn/{XMX75LZF.js → YYX73IRV.js} +1 -1
  22. package/dist/cdn/{UTTEHEMP.js → ZJADYRM6.js} +1 -1
  23. package/dist/cdn/assets/code-editor/arcade.worker.js +1 -1
  24. package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
  25. package/dist/cdn/index.js +1 -1
  26. package/dist/components/arcgis-arcade-editor/customElement.js +126 -119
  27. package/dist/components/arcgis-arcade-results/customElement.js +1 -0
  28. package/dist/components/arcgis-editor-variables/customElement.js +2 -2
  29. package/dist/components/arcgis-language-api-panel/customElement.js +9 -9
  30. package/dist/docs/api.json +1 -1
  31. package/dist/docs/docs.json +1 -1
  32. package/dist/docs/web-types.json +1 -1
  33. package/package.json +5 -5
  34. package/dist/cdn/ORXFI7LE.js +0 -2
  35. package/dist/cdn/WBZ7CJ77.js +0 -2
  36. package/dist/cdn/WRVJHPML.js +0 -2
@@ -2,11 +2,11 @@
2
2
  import { g as Z, c as ee } from "../../chunks/runtime.js";
3
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 P } from "@arcgis/lumina";
5
+ import { LitElement as ie, createEvent as N, safeClassMap as v } from "@arcgis/lumina";
6
6
  import { generateGuid as ae } from "@arcgis/toolkit/string";
7
7
  import { i as y, D as ne, e as K } from "../../chunks/arcade-executor.js";
8
8
  import { s as oe, a as re } from "../../chunks/arcade-service-accessors.js";
9
- import { b as v } from "../../chunks/arcade-defaults.js";
9
+ import { b as $ } from "../../chunks/arcade-defaults.js";
10
10
  import { setArcadeAskAiBinding as B, arcadeAskAiCommandId as ce, arcadeQuickFixKind as le } from "../../chunks/arcade-mode.js";
11
11
  import { u as de } from "../../chunks/useT9n.js";
12
12
  import { createRef as H, ref as j } from "lit/directives/ref.js";
@@ -15,8 +15,8 @@ import he from "@arcgis/core/config.js";
15
15
  import Q from "@arcgis/core/identity/IdentityManager.js";
16
16
  import { log as ge, rethrowError as u } from "@arcgis/toolkit/log";
17
17
  import { watch as L } from "@arcgis/core/core/reactiveUtils.js";
18
- import m from "@arcgis/core/core/Accessor.js";
19
- import { property as c, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
18
+ import f from "@arcgis/core/core/Accessor.js";
19
+ import { property as c, subclass as x } from "@arcgis/core/core/accessorSupport/decorators.js";
20
20
  import { A as W } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
21
21
  import { r as pe } from "../../chunks/utilities.js";
22
22
  import { Range as V, KeyCode as be, Uri as _e } from "monaco-editor";
@@ -50,27 +50,27 @@ async function Pe({
50
50
  const s = e.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, "");
51
51
  if (!await Ae(s))
52
52
  return { shouldRender: !1 };
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}`, w = 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, R, I] = w, S = x.status === "fulfilled" ? x.value : (h("warn", `Failed to fetch selfUrl. Reason: ${x.reason}.`), {}), T = R.status === "fulfilled" ? R.value : (h("warn", `Failed to fetch settingsUrl. Reason: ${R.reason}.`), {}), J = I.status === "fulfilled" ? I.value : (h("warn", `Failed to fetch signinSettingsUrl. Reason: ${I.reason}.`), {});
58
- if (S.isPortal)
53
+ const a = await Se(e), r = `${s}/sharing/rest/portals/self?f=json&token=${a}`, n = `${s}/sharing/rest/portals/self/settings?f=json&token=${a}`, o = `${s}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`, b = await Promise.allSettled([
54
+ fetch(r, { credentials: "include" }).then((P) => P.json()),
55
+ fetch(n, { credentials: "include" }).then((P) => P.json()),
56
+ fetch(o, { credentials: "include" }).then((P) => P.json())
57
+ ]), [S, R, I] = b, A = S.status === "fulfilled" ? S.value : (h("warn", `Failed to fetch selfUrl. Reason: ${S.reason}.`), {}), T = R.status === "fulfilled" ? R.value : (h("warn", `Failed to fetch settingsUrl. Reason: ${R.reason}.`), {}), J = I.status === "fulfilled" ? I.value : (h("warn", `Failed to fetch signinSettingsUrl. Reason: ${I.reason}.`), {});
58
+ if (A.isPortal)
59
59
  return { shouldRender: !1 };
60
- const M = S.helpBase || "";
60
+ const M = A.helpBase || "";
61
61
  if (!T)
62
62
  return h("warn", "Settings response is not available."), { shouldRender: !1 };
63
63
  const k = {
64
64
  orgAiAssistantsEnabled: xe(T),
65
65
  betaAppsAllowed: J.blockBetaApps !== !0,
66
- serviceUrlAvailable: !!S?.helperServices?.aiAssistantServices?.url,
67
- userHasUseAiAssistantsPrivilege: S?.user?.privileges?.includes("portal:user:useAIAssistants") === !0
66
+ serviceUrlAvailable: !!A?.helperServices?.aiAssistantServices?.url,
67
+ userHasUseAiAssistantsPrivilege: A?.user?.privileges?.includes("portal:user:useAIAssistants") === !0
68
68
  };
69
69
  k.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
72
  ), k.userHasUseAiAssistantsPrivilege || h("warn", "User does not have the required privileges to use AI Assistants.");
73
- const F = q(k, fe), U = q(k, X), O = S?.helperServices?.aiAssistantServices?.url;
73
+ const F = q(k, fe), U = q(k, X), O = A?.helperServices?.aiAssistantServices?.url;
74
74
  return O ? {
75
75
  shouldRender: !0,
76
76
  portalUrl: e,
@@ -92,42 +92,42 @@ async function Pe({
92
92
  feedbackServiceUrl: G
93
93
  };
94
94
  }
95
- var ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, _ = (t, e, s, i) => {
96
- for (var a = i > 1 ? void 0 : i ? ye(e, s) : e, o = t.length - 1, n; o >= 0; o--)
97
- (n = t[o]) && (a = (i ? n(e, s, a) : n(a)) || a);
95
+ var ve = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, m = (t, e, s, i) => {
96
+ for (var a = i > 1 ? void 0 : i ? $e(e, s) : e, r = t.length - 1, n; r >= 0; r--)
97
+ (n = t[r]) && (a = (i ? n(e, s, a) : n(a)) || a);
98
98
  return i && a && ve(e, s, a), a;
99
99
  };
100
100
  const Y = 100;
101
- let g = class extends m {
101
+ let g = class extends f {
102
102
  constructor(t) {
103
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
+ m([
107
107
  c()
108
108
  ], g.prototype, "collectionItems", 2);
109
- _([
109
+ m([
110
110
  c()
111
111
  ], g.prototype, "errorMessage", 2);
112
- _([
112
+ m([
113
113
  c()
114
114
  ], g.prototype, "expanded", 2);
115
- _([
115
+ m([
116
116
  c()
117
117
  ], g.prototype, "requestId", 2);
118
- _([
118
+ m([
119
119
  c()
120
120
  ], g.prototype, "schemaValue", 2);
121
- _([
121
+ m([
122
122
  c()
123
123
  ], g.prototype, "status", 2);
124
- _([
124
+ m([
125
125
  c()
126
126
  ], g.prototype, "visibleChildCount", 2);
127
- g = _([
128
- f("ArcadeDebuggerLazyTreeNodeState")
127
+ g = m([
128
+ x("ArcadeDebuggerLazyTreeNodeState")
129
129
  ], g);
130
- let C = class extends m {
130
+ let C = class extends f {
131
131
  constructor(t) {
132
132
  super(t), this.generation = 0, this.nodes = /* @__PURE__ */ new Map();
133
133
  }
@@ -171,13 +171,13 @@ let C = 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, 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");
174
+ const a = this.generation, r = i.requestId + 1;
175
+ i.requestId = r, i.status = "loading", i.errorMessage = "", i.schemaValue = void 0, i.collectionItems = [], e().then((n) => {
176
+ const o = this.nodes.get(t);
177
+ !o || this.generation !== a || o.requestId !== r || (s(o, n), o.status = "loaded");
178
178
  }).catch(() => {
179
179
  const n = this.nodes.get(t);
180
- !n || this.generation !== a || n.requestId !== o || (n.status = "error");
180
+ !n || this.generation !== a || n.requestId !== r || (n.status = "error");
181
181
  });
182
182
  }
183
183
  destroyNodes() {
@@ -186,15 +186,15 @@ let C = class extends m {
186
186
  this.nodes.clear();
187
187
  }
188
188
  };
189
- C = _([
190
- f("ArcadeDebuggerLazyTreeState")
189
+ C = m([
190
+ x("ArcadeDebuggerLazyTreeState")
191
191
  ], C);
192
- var $e = 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 && $e(e, s, a), a;
192
+ var ye = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
193
+ for (var a = i > 1 ? void 0 : i ? Ee(e, s) : e, r = t.length - 1, n; r >= 0; r--)
194
+ (n = t[r]) && (a = (i ? n(e, s, a) : n(a)) || a);
195
+ return i && a && ye(e, s, a), a;
196
196
  };
197
- let b = class extends m {
197
+ let _ = class extends f {
198
198
  constructor(t) {
199
199
  super(t), this.phase = "idle", this.sessionId = 0, this.consoleLogs = [], this.hasExecuted = !1;
200
200
  }
@@ -219,26 +219,26 @@ let b = class extends m {
219
219
  };
220
220
  l([
221
221
  c()
222
- ], b.prototype, "phase", 2);
222
+ ], _.prototype, "phase", 2);
223
223
  l([
224
224
  c()
225
- ], b.prototype, "mode", 2);
225
+ ], _.prototype, "mode", 2);
226
226
  l([
227
227
  c()
228
- ], b.prototype, "sessionId", 2);
228
+ ], _.prototype, "sessionId", 2);
229
229
  l([
230
230
  c()
231
- ], b.prototype, "result", 2);
231
+ ], _.prototype, "result", 2);
232
232
  l([
233
233
  c()
234
- ], b.prototype, "consoleLogs", 2);
234
+ ], _.prototype, "consoleLogs", 2);
235
235
  l([
236
236
  c()
237
- ], b.prototype, "hasExecuted", 2);
238
- b = l([
239
- f("ArcadeDebuggerExecutionModel")
240
- ], b);
241
- let $ = class extends m {
237
+ ], _.prototype, "hasExecuted", 2);
238
+ _ = l([
239
+ x("ArcadeDebuggerExecutionModel")
240
+ ], _);
241
+ let E = class extends f {
242
242
  constructor(t) {
243
243
  super(t), this.editorBreakpoints = [], this.executionBreakpoints = [];
244
244
  }
@@ -258,14 +258,14 @@ let $ = class extends m {
258
258
  };
259
259
  l([
260
260
  c()
261
- ], $.prototype, "editorBreakpoints", 2);
261
+ ], E.prototype, "editorBreakpoints", 2);
262
262
  l([
263
263
  c()
264
- ], $.prototype, "executionBreakpoints", 2);
265
- $ = l([
266
- f("ArcadeDebuggerSessionModel")
267
- ], $);
268
- let D = class extends m {
264
+ ], E.prototype, "executionBreakpoints", 2);
265
+ E = l([
266
+ x("ArcadeDebuggerSessionModel")
267
+ ], E);
268
+ let D = class extends f {
269
269
  constructor(t) {
270
270
  super(t), this.openedPanel = "output", this.showPanel = !1;
271
271
  }
@@ -277,9 +277,9 @@ l([
277
277
  c()
278
278
  ], D.prototype, "showPanel", 2);
279
279
  D = l([
280
- f("ArcadeDebuggerUiModel")
280
+ x("ArcadeDebuggerUiModel")
281
281
  ], D);
282
- let E = class extends m {
282
+ let w = class extends f {
283
283
  constructor(t) {
284
284
  super(t);
285
285
  }
@@ -298,16 +298,16 @@ let E = class extends m {
298
298
  };
299
299
  l([
300
300
  c()
301
- ], E.prototype, "pausedState", 2);
301
+ ], w.prototype, "pausedState", 2);
302
302
  l([
303
303
  c()
304
- ], E.prototype, "lastPausedState", 2);
305
- E = l([
306
- f("ArcadeDebuggerPausedFrameModel")
307
- ], E);
308
- let p = class extends m {
304
+ ], w.prototype, "lastPausedState", 2);
305
+ w = l([
306
+ x("ArcadeDebuggerPausedFrameModel")
307
+ ], w);
308
+ let p = class extends f {
309
309
  constructor(t) {
310
- super(t), this.execution = new b(), this.lazyTreeState = new C(), this.pausedFrame = new E(), this.previewTabsState = new W(), this.session = new $(), this.ui = new D();
310
+ super(t), this.execution = new _(), this.lazyTreeState = new C(), this.pausedFrame = new w(), this.previewTabsState = new W(), this.session = new E(), this.ui = new D();
311
311
  }
312
312
  get editorBreakpoints() {
313
313
  return this.session.editorBreakpoints;
@@ -484,9 +484,9 @@ l([
484
484
  c()
485
485
  ], p.prototype, "ui", 2);
486
486
  p = l([
487
- f("ArcadeDebuggerStore")
487
+ x("ArcadeDebuggerStore")
488
488
  ], p);
489
- const Ee = {
489
+ const De = {
490
490
  glyphMargin: !0,
491
491
  lineNumbersMinChars: 1
492
492
  };
@@ -522,15 +522,18 @@ class we extends ie {
522
522
  static {
523
523
  this.styles = [me];
524
524
  }
525
+ get _canExecute() {
526
+ return !!(this.testData || this.externalExecutor);
527
+ }
525
528
  get _usesBottomExecutionDrawer() {
526
- return this.enableDebugger && !!this.testData;
529
+ return this._canExecute && (this.enableDebugger || !!this.externalExecutor);
527
530
  }
528
531
  get editorInstance() {
529
532
  return this._codeEditorElt.value?.editorInstance;
530
533
  }
531
534
  get editorOptions() {
532
535
  return {
533
- ...Ee,
536
+ ...De,
534
537
  ...this._editorOptions
535
538
  };
536
539
  }
@@ -567,7 +570,7 @@ class we extends ie {
567
570
  }));
568
571
  }
569
572
  willUpdate(e) {
570
- (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, {
573
+ (e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), (e.has("testData") || e.has("externalExecutor")) && this._executionContextChanged(), e.has("enableDebugger") && !this.enableDebugger && this._debuggerState.disableDebugger(), e.has("snippets") && $.updateApiContextForModel(this._modelId, {
571
574
  snippets: this.snippets
572
575
  }), (e.has("arcadeAssistant") || e.has("disableAssistant")) && this._updateArcadeAssistantRemoteState();
573
576
  }
@@ -584,14 +587,14 @@ class we extends ie {
584
587
  if (!this.isConnected)
585
588
  return;
586
589
  const e = await re();
587
- this._disposables.push(e.onDiagnosticsChange((r) => {
588
- this._preparingArcade || (this._diagnostics = r.diagnostics, this.arcgisDiagnosticsChange.emit(r.diagnostics));
589
- })), this.testData && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
590
+ this._disposables.push(e.onDiagnosticsChange((o) => {
591
+ this._preparingArcade || (this._diagnostics = o.diagnostics, this.arcgisDiagnosticsChange.emit(o.diagnostics));
592
+ })), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
590
593
  const s = L(() => this._debuggerState.editorBreakpoints, () => this._updateBreakpointsDecorations(), { sync: !0 }), i = L(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = L(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
591
594
  this._disposables.push({ dispose: () => s.remove() }, { dispose: () => i.remove() }, { dispose: () => a.remove() });
592
- const o = this.editorInstance?.onMouseDown((r) => this._onEditorMouseDown(r));
593
- o && this._disposables.push(o);
594
- const n = this.editorInstance?.onDidChangeModelContent((r) => this._onEditorModelContentChange(r));
595
+ const r = this.editorInstance?.onMouseDown((o) => this._onEditorMouseDown(o));
596
+ r && this._disposables.push(r);
597
+ const n = this.editorInstance?.onDidChangeModelContent((o) => this._onEditorModelContentChange(o));
595
598
  n && this._disposables.push(n), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
596
599
  })();
597
600
  try {
@@ -663,26 +666,26 @@ class we extends ie {
663
666
  return { type: "error", value: "Missing external executor", error: null };
664
667
  const a = new AbortController();
665
668
  this._abortExternalExecution(), this._externalExecutionAbortController = a;
666
- const o = i.console ?? (() => {
669
+ const r = i.console ?? (() => {
667
670
  });
668
671
  try {
669
672
  if (e === "debug") {
670
- const { breakpoints: n, onDebugPause: r } = i;
671
- if (!n || !r)
673
+ const { breakpoints: n, onDebugPause: o } = i;
674
+ if (!n || !o)
672
675
  throw new Error("Missing debug execution options");
673
676
  return await this.externalExecutor.execute({
674
677
  mode: "debug",
675
678
  script: s,
676
- console: o,
679
+ console: r,
677
680
  signal: a.signal,
678
681
  breakpoints: n,
679
- onDebugPause: r
682
+ onDebugPause: o
680
683
  });
681
684
  }
682
685
  return await this.externalExecutor.execute({
683
686
  mode: "run",
684
687
  script: s,
685
- console: o,
688
+ console: r,
686
689
  signal: a.signal
687
690
  });
688
691
  } catch (n) {
@@ -695,16 +698,16 @@ class we extends ie {
695
698
  this._externalExecutionAbortController === a && (this._externalExecutionAbortController = void 0);
696
699
  }
697
700
  }
698
- _testDataChanged() {
699
- !this.testData && this._executeScriptAction && (this._disposeSafely(this._executeScriptAction), this._executeScriptAction = void 0), this.testData && !this._executeScriptAction && this._addExecuteScriptAction(), !this.testData && this.enableDebugger && this._debuggerState.clearForMissingTestData(), this._debuggerState.showPanel && this._executeScript("run").catch(u(this));
701
+ _executionContextChanged() {
702
+ !this._canExecute && this._executeScriptAction && (this._disposeSafely(this._executeScriptAction), this._executeScriptAction = 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._debuggerState.showPanel && this._executeScript("run").catch(u(this));
700
703
  }
701
704
  async _updateEditorProfile() {
702
705
  this._preparingArcade = !0;
703
706
  try {
704
- await v.setProfileForModel(this._modelId, this.profile, {
707
+ await $.setProfileForModel(this._modelId, this.profile, {
705
708
  locale: this.messages._t9nLocale,
706
709
  snippets: this.snippets
707
- }), this._editorProfile = v.getEditorProfileForModel(this._modelId);
710
+ }), this._editorProfile = $.getEditorProfileForModel(this._modelId);
708
711
  } catch {
709
712
  this._editorProfile = void 0;
710
713
  } finally {
@@ -712,45 +715,46 @@ class we extends ie {
712
715
  }
713
716
  }
714
717
  async _updateApiLibrary() {
715
- this._apiLibrary = await v.getApiLibraryForModel(this._modelId);
718
+ this._apiLibrary = await $.getApiLibraryForModel(this._modelId);
716
719
  }
717
720
  _setExecutionPanel(e) {
718
721
  this._debuggerState.setPanel(e);
719
722
  }
720
723
  async _executeScript(e) {
721
- const s = this.testData;
722
- if (!this._codeEditorElt.value || !s)
724
+ const s = this.testData, i = this.externalExecutor;
725
+ if (!this._codeEditorElt.value || !s && !i)
723
726
  return;
724
- const i = e === "debug" ? this._debuggerState.startDebug() : this._debuggerState.startRun();
727
+ const a = e === "debug" ? this._debuggerState.startDebug() : this._debuggerState.startRun();
725
728
  setTimeout(() => {
726
729
  (async () => {
727
- const a = this._codeEditorElt.value?.value ?? this.script, o = {
730
+ const r = this._codeEditorElt.value?.value ?? this.script, n = {
728
731
  mode: e,
729
- console: (r) => this._debuggerState.addConsoleLog(r),
732
+ console: (b) => this._debuggerState.addConsoleLog(b),
730
733
  breakpoints: e === "debug" ? this._debuggerState.debuggerBreakpoints : void 0
731
734
  };
732
- e === "debug" && (o.onDebugPause = this._handleDebugPause.bind(this, i));
733
- let n;
734
- if (this.externalExecutor)
735
- n = await this._executeWithExternalExecutor(e, a, o);
736
- else {
737
- const r = await this._editorProfilePromise;
738
- if (!r) {
735
+ e === "debug" && (n.onDebugPause = this._handleDebugPause.bind(this, a));
736
+ let o;
737
+ if (i)
738
+ o = await this._executeWithExternalExecutor(e, r, n);
739
+ else if (s) {
740
+ const b = await this._editorProfilePromise;
741
+ if (!b) {
739
742
  this._debuggerState.fail({ type: "error", value: "Missing editor profile", error: null });
740
743
  return;
741
744
  }
742
- n = await K(r.definition, a, s, o);
743
- }
744
- if (i === this._debuggerState.sessionId) {
745
+ o = await K(b.definition, r, s, n);
746
+ } else
747
+ return;
748
+ if (a === this._debuggerState.sessionId) {
745
749
  if (e === "debug") {
746
- if (y(n)) {
747
- this._debuggerState.fail(n);
750
+ if (y(o)) {
751
+ this._debuggerState.fail(o);
748
752
  return;
749
753
  }
750
- this._debuggerState.completeDebug(n);
754
+ this._debuggerState.completeDebug(o);
751
755
  return;
752
756
  }
753
- y(n) ? this._debuggerState.completeRun(n) : this.externalExecutor ? this._debuggerState.completeRun(n, { useDebugRenderer: !0 }) : this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
757
+ y(o) ? this._debuggerState.completeRun(o) : i ? this._debuggerState.completeRun(o, { useDebugRenderer: !0 }) : this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
754
758
  }
755
759
  })();
756
760
  }, 0);
@@ -789,7 +793,7 @@ class we extends ie {
789
793
  contextMenuGroupId: "code",
790
794
  contextMenuOrder: 1,
791
795
  run: () => {
792
- this.testData && this._executeScript("run").catch(u(this));
796
+ this._canExecute && this._executeScript("run").catch(u(this));
793
797
  }
794
798
  });
795
799
  e && (this._executeScriptAction = e, this._disposables.push(e));
@@ -855,15 +859,15 @@ class we extends ie {
855
859
  this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await Pe(e ?? {}), this._syncAskAiAction();
856
860
  }
857
861
  renderMainActionBar() {
858
- return this.enableDebugger || !this.testData ? null : d`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-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=${() => {
862
+ return this._usesBottomExecutionDrawer || !this._canExecute ? null : d`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-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=${() => {
859
863
  this._executeScript("run").catch(u(this));
860
864
  }}></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>`;
861
865
  }
862
866
  renderMainPanel() {
863
- 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>`;
867
+ return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${$.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${j(this._codeEditorElt)}></arcgis-code-editor>`;
864
868
  }
865
- renderAction({ id: e, label: s, icon: i, active: a, panelName: o, iconFlipRtl: n = !1, onClick: r = this._toggleSidePanel }) {
866
- 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>` || ""}`;
869
+ renderAction({ id: e, label: s, icon: i, active: a, panelName: r, iconFlipRtl: n = !1, onClick: o = this._toggleSidePanel }) {
870
+ return d`<calcite-action id=${e ?? z} .text=${s} .textEnabled=${this.sideActionBarExpanded} .icon=${i} .active=${a} @click=${o} data-panel-name=${r ?? z} .iconFlipRtl=${n}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${s}</span></calcite-tooltip>` || ""}`;
867
871
  }
868
872
  renderSideActionBar() {
869
873
  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({
@@ -910,10 +914,10 @@ class we extends ie {
910
914
  if (this.hideSideBar)
911
915
  return null;
912
916
  const { openedSidePanel: e, _arcadeAssistantRemoteState: s } = this;
913
- 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=${{
917
+ return d`<arcgis-language-api-panel slot=side-panel class=${v(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=${v(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=${{
914
918
  profileempty: this.messages.profileempty,
915
919
  profilevariables: this.messages.profilevariables
916
- }}></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?.({
920
+ }}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${v(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=${v(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=${v(e === i.id ? "" : "hidden")}>${i?.useFlows ? i.renderer?.({
917
921
  closePanel: this._toggleSidePanel,
918
922
  insertText: this._insertText.bind(this),
919
923
  closed: e !== i.id,
@@ -936,18 +940,21 @@ class we extends ie {
936
940
  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>`;
937
941
  }
938
942
  renderBottomExecutionBody() {
939
- const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode: o } = this._debuggerState;
940
- 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 .outputTitle=${this.messages.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;
943
+ const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode: r } = this._debuggerState;
944
+ if (!e)
945
+ return null;
946
+ const n = s === "debug-console" ? "output" : s;
947
+ return this.enableDebugger && s === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : s === "output" && (r === "debug" || i) ? d`<arcgis-arcade-debugger-output .outputTitle=${this.messages.output} slot=results-panel .debuggerStore=${this._debuggerState} .result=${i}></arcgis-arcade-debugger-output>` : d`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${n} .loading=${s === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>`;
941
948
  }
942
949
  renderBottomActionBar() {
943
950
  if (!this._usesBottomExecutionDrawer)
944
951
  return null;
945
- const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused: o, isExecuting: n } = this._debuggerState, r = this.messages.continue ?? "Continue", w = this.messages.reset ?? "Reset", x = this.messages.stop ?? "Stop";
946
- 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 expanded><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=${w} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${w}</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=${() => {
952
+ const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused: r, isExecuting: n } = this._debuggerState, o = this.messages.continue ?? "Continue", b = this.messages.reset ?? "Reset", S = this.messages.stop ?? "Stop";
953
+ 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 expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${o} icon=forward scale=s .disabled=${!r} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${o}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${b} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${b}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${S} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${S}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || n} @click=${() => {
947
954
  this._executeScript("run").catch(u(this));
948
- }}></calcite-action><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 || n} @click=${() => {
955
+ }}></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 || n} @click=${() => {
949
956
  this._executeScript("debug").catch(u(this));
950
- }}></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 .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>`;
957
+ }}></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>${this.enableDebugger && d`<calcite-action .active=${i === "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>`;
951
958
  }
952
959
  render() {
953
960
  return d`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
@@ -106,6 +106,7 @@ class F extends f {
106
106
  case "feature":
107
107
  case "dictionary":
108
108
  case "portal":
109
+ case "pixel":
109
110
  return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${y({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
110
111
  case "featureSet":
111
112
  return e`<div class="result-value-table">${$({ arcadeResult: this.result, t9nStrings: this.messages })}${x({ arcadeResult: this.result })}</div>`;
@@ -8,7 +8,7 @@ import { createFilterExpression as g } from "@arcgis/toolkit/string";
8
8
  import { u as b } from "../../chunks/useT9n.js";
9
9
  import { log as p } from "@arcgis/toolkit/log";
10
10
  import { g as o, h as n, j as _, k as v } from "../../chunks/utils.js";
11
- const w = h`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
11
+ const w = h`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}.container{block-size:100%;display:grid;grid-template-rows:auto 1fr;overflow:hidden}.scrollable{min-block-size:0;overflow:auto}}`;
12
12
  function $(a) {
13
13
  a.key === "Enter" && a.stopPropagation();
14
14
  }
@@ -111,7 +111,7 @@ class I extends f {
111
111
  this._mutationCounter += 1;
112
112
  })).catch(() => {
113
113
  p("error", this, "Error loading collection"), r = !1;
114
- }), r = !0), i`<calcite-flow-item heading-level=2 .heading=${this._getHeadingForCollection(e, t)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop ?? ""} scale=m .hidden=${t || this._isRootPresentation("featureSetRoot")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m .label=${this.messages.filterthevariablesbyname ?? ""} name=variable-filter></calcite-input>${r ? i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader>` : i`<calcite-list .label=${this.messages.profilevariables ?? "Profile variables"}>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`;
114
+ }), r = !0), i`<calcite-flow-item heading-level=2 .heading=${this._getHeadingForCollection(e, t)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop ?? ""} scale=m .hidden=${t || this._isRootPresentation("featureSetRoot")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><div class="container"><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m .label=${this.messages.filterthevariablesbyname ?? ""} name=variable-filter></calcite-input><div class="scrollable">${r ? i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader>` : i`<calcite-list .label=${this.messages.profilevariables ?? "Profile variables"}>${this.renderEditorVariables(e)}</calcite-list>`}</div></div></calcite-flow-item>`;
115
115
  }
116
116
  renderEditorVariables(e) {
117
117
  const t = g(this._filterValue), s = e.variables.filter((r) => r.passFilter(t));
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as r } from "../../chunks/runtime.js";
3
- import { ref as c } from "lit/directives/ref.js";
4
- import { css as m, html as s } from "lit";
5
- import { setFocusOnElement as d, focusElement as u } from "@arcgis/toolkit/dom";
6
- import { addLtrMark as a } from "@arcgis/toolkit/string";
3
+ import { ref as a } from "lit/directives/ref.js";
4
+ import { css as d, html as l } from "lit";
5
+ import { setFocusOnElement as m, focusElement as u } from "@arcgis/toolkit/dom";
6
+ import { addLtrMark as c } from "@arcgis/toolkit/string";
7
7
  import { LitElement as h, createEvent as o } from "@arcgis/lumina";
8
8
  import { f } from "../../chunks/utilities.js";
9
9
  import { c as n } from "../../chunks/markdown.js";
10
10
  import { u as p } from "../../chunks/useT9n.js";
11
- const g = m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`;
11
+ const g = d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}.container{block-size:100%;display:grid;grid-template-rows:auto 1fr;overflow:hidden}.scrollable{min-block-size:0;overflow:auto}}`;
12
12
  class b extends h {
13
13
  constructor() {
14
14
  super(...arguments), this.messages = p(), this._unselectItem = async () => {
@@ -43,7 +43,7 @@ class b extends h {
43
43
  return;
44
44
  }
45
45
  this._flowObserver || (this._flowObserver = new MutationObserver(() => {
46
- d(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
46
+ m(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
47
47
  }), this._flowObserver.observe(e, { attributes: !0, attributeFilter: ["id"], childList: !0 }));
48
48
  }
49
49
  _emitItemSelected(e, i) {
@@ -70,17 +70,17 @@ class b extends h {
70
70
  }
71
71
  renderApiCategory(e) {
72
72
  const i = f(e.items, "name", this._filterValue);
73
- return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${a(t.completion.detail)} @calciteListItemSelect=${(l) => this._emitItemSelected(l, t)} @keydown=${(l) => this._emitItemSelected(l, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(l) => this._selectItem(l, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
73
+ return i.length ? l`<calcite-list-item-group .heading=${e.title}>${i.map((t) => l`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${(s) => this._emitItemSelected(s, t)} @keydown=${(s) => this._emitItemSelected(s, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(s) => this._selectItem(s, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
74
74
  }
75
75
  renderApiItemFlowItem() {
76
76
  const e = this._selectedApiItem;
77
- return e ? s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${c(u)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? s`<div ${c(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
77
+ return e ? l`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : l`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${a(u)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${c(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? l`<div ${a(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
78
78
  }
79
79
  render() {
80
80
  if (this.closed)
81
81
  return null;
82
82
  const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
83
- return s`<calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : s`<calcite-list .label=${this.messages.api ?? "API"}>${i ? s`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
83
+ return l`<calcite-flow ${a(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><div class="container"><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} scale=m></calcite-input><div class="scrollable">${this.loading ? l`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : l`<calcite-list .label=${this.messages.api ?? "API"}>${i ? l`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</div></div></calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
84
84
  }
85
85
  }
86
86
  r("arcgis-language-api-panel", b);