@arcgis/coding-components 5.0.0-next.149 → 5.0.0-next.150

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 (41) hide show
  1. package/README.md +2 -4
  2. package/dist/cdn/2U3UUVRF.js +4 -0
  3. package/dist/cdn/2ZFTV536.js +2 -0
  4. package/dist/cdn/{4EAONLKN.js → 3IYCM3T5.js} +1 -1
  5. package/dist/cdn/{G3HPFTUI.js → 55JG5GGC.js} +1 -1
  6. package/dist/cdn/{2XS25MHS.js → CRFEM3QK.js} +1 -1
  7. package/dist/cdn/{6KH4ZJW7.js → DUDPRVQB.js} +1 -1
  8. package/dist/cdn/{5GJXU26T.js → EVSXXHQ5.js} +1 -1
  9. package/dist/cdn/{MGMAMY5S.js → HDPC4QT2.js} +1 -1
  10. package/dist/cdn/HUEGOCW7.js +2 -0
  11. package/dist/cdn/IAMP2URN.js +11 -0
  12. package/dist/cdn/{LLWOE2G5.js → JQCRR5L6.js} +1 -1
  13. package/dist/cdn/{S5ZW4OSD.js → K6IFHJHH.js} +1 -1
  14. package/dist/cdn/{CVGNKT6A.js → LSN2L6MF.js} +1 -1
  15. package/dist/cdn/{H25NK6KP.js → M5R2ARCR.js} +1 -1
  16. package/dist/cdn/{CDKPJGE2.js → NBNHNFDE.js} +1 -1
  17. package/dist/cdn/{WWB7CXZN.js → QDE2LLCP.js} +1 -1
  18. package/dist/cdn/{47B6HD75.js → RHWX2DDB.js} +1 -1
  19. package/dist/cdn/{HFY5V4YQ.js → YK255XEU.js} +1 -1
  20. package/dist/cdn/{GPCAV243.js → YPRQHETI.js} +1 -1
  21. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.en.json +1 -1
  22. package/dist/cdn/assets/arcade-results/t9n/messages.en.json +1 -1
  23. package/dist/cdn/assets/language-api-panel/t9n/messages.en.json +1 -1
  24. package/dist/cdn/index.js +1 -1
  25. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +207 -210
  26. package/dist/components/arcgis-arcade-coding-assistant/index.js +0 -2
  27. package/dist/components/arcgis-arcade-editor/customElement.js +18 -18
  28. package/dist/components/arcgis-arcade-results/customElement.js +17 -17
  29. package/dist/components/arcgis-arcade-suggestions/customElement.js +4 -4
  30. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  31. package/dist/components/arcgis-language-api-panel/customElement.js +4 -4
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/vscode.html-custom-data.json +1 -1
  35. package/dist/docs/web-types.json +1 -1
  36. package/package.json +5 -5
  37. package/dist/cdn/LDDFFER6.js +0 -11
  38. package/dist/cdn/TJHFVCKN.js +0 -2
  39. package/dist/cdn/V2FCS4O5.js +0 -4
  40. package/dist/cdn/XKNRIGBN.js +0 -2
  41. /package/dist/cdn/{VZCGFCMK.js → DDFKURLO.js} +0 -0
@@ -11,8 +11,6 @@ import "@esri/calcite-components/components/calcite-tooltip";
11
11
  import "@esri/calcite-components/components/calcite-sheet";
12
12
  import "@esri/calcite-components/components/calcite-panel";
13
13
  import "@esri/calcite-components/components/calcite-label";
14
- import "@esri/calcite-components/components/calcite-segmented-control";
15
- import "@esri/calcite-components/components/calcite-segmented-control-item";
16
14
  import "@esri/calcite-components/components/calcite-checkbox";
17
15
  import "@esri/calcite-components/components/calcite-block";
18
16
  import "@esri/calcite-components/components/calcite-dialog";
@@ -15,42 +15,42 @@ import { D as B, e as v } from "../../chunks/arcade-executor.js";
15
15
  import { s as M, g as k } from "../../chunks/arcade-service-accessors.js";
16
16
  import { b as d } from "../../chunks/arcade-defaults.js";
17
17
  import { u as T } from "../../chunks/useT9n.js";
18
- import { createRef as L, ref as F } from "lit/directives/ref.js";
19
- import U from "@arcgis/core/identity/IdentityManager.js";
18
+ import { createRef as L, ref as U } from "lit/directives/ref.js";
19
+ import F from "@arcgis/core/identity/IdentityManager.js";
20
20
  import { log as N, rethrowError as o } from "@arcgis/toolkit/log";
21
- const O = y`: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)}}`, j = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (s, e) => N(s, "Arcade Assistant", e), z = (s) => {
21
+ const H = y`: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)}}`, O = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (s, e) => N(s, "Arcade Assistant", e), j = (s) => {
22
22
  const { aiAssistantsEnabled: e } = s;
23
23
  return e === void 0 ? (a("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
24
- }, H = (s) => !(!s || !("id" in s)), V = async (s) => (await U.getCredential(s)).token;
24
+ }, z = (s) => !(!s || !("id" in s)), V = async (s) => (await F.getCredential(s)).token;
25
25
  async function G({
26
26
  portalUrl: s,
27
27
  profile: e
28
28
  }) {
29
- if (!H(e))
29
+ if (!z(e))
30
30
  return a("warn", "Addon initialization failed. Reason: unsupported profile."), { shouldRender: !1 };
31
31
  const t = s.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, ""), n = await V(s), r = `${t}/sharing/rest/portals/self?f=json&token=${n}`, h = `${t}/sharing/rest/portals/self/settings?f=json&token=${n}`, p = `${t}/sharing/rest/portals/self/signinSettings?f=json&token=${n}`, u = await Promise.allSettled([
32
32
  fetch(r, { credentials: "include" }).then((l) => l.json()),
33
33
  fetch(h, { credentials: "include" }).then((l) => l.json()),
34
34
  fetch(p, { credentials: "include" }).then((l) => l.json())
35
- ]), [g, f, _] = u, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), A = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), x = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), $ = m?.helperServices?.aiAssistantServices?.url;
36
- if (!$)
35
+ ]), [g, f, _] = u, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), $ = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), x = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), S = m?.helperServices?.aiAssistantServices?.url;
36
+ if (!S)
37
37
  return a("warn", "Service URL is not available in the portal self response."), { shouldRender: !1 };
38
38
  const E = m.helpBase || "";
39
- if (!A)
39
+ if (!$)
40
40
  return a("warn", "Settings response is not available."), { shouldRender: !1 };
41
- let S = z(A);
41
+ let A = j($);
42
42
  return x.blockBetaApps === !0 && (a(
43
43
  "warn",
44
44
  "Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
45
- ), S = !1), {
45
+ ), A = !1), m?.user?.privileges?.includes("portal:user:useAIAssistants") || (a("warn", "User does not have the required privileges to use AI Assistants."), A = !1), {
46
46
  shouldRender: !0,
47
- serviceUrl: $,
47
+ serviceUrl: S,
48
48
  helpBase: E,
49
- assistantsEnabled: S,
50
- feedbackServiceUrl: j
49
+ assistantsEnabled: A,
50
+ feedbackServiceUrl: O
51
51
  };
52
52
  }
53
- class X extends C {
53
+ class q extends C {
54
54
  constructor() {
55
55
  super(...arguments), this._codeEditorElt = L(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = T(), this._modelId = I(), this._openArcadeHelp = () => void window.open(B, "Arcade Help"), this._toggleSidePanel = (e) => {
56
56
  if (!e.target)
@@ -63,7 +63,7 @@ class X extends C {
63
63
  this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, _arcadeAssistantRemoteState: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, arcadeAssistant: 0 };
64
64
  }
65
65
  static {
66
- this.styles = [O];
66
+ this.styles = [H];
67
67
  }
68
68
  get editorInstance() {
69
69
  return this._codeEditorElt.value?.editorInstance;
@@ -188,7 +188,7 @@ class X extends C {
188
188
  return this.testData ? i`<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=${() => void this._executeScript().catch(o(this))}></calcite-action>${this._executionResult ? i`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
189
189
  }
190
190
  renderMainPanel() {
191
- return i`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${d.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${F(this._codeEditorElt)}></arcgis-code-editor>`;
191
+ return i`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${d.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${U(this._codeEditorElt)}></arcgis-code-editor>`;
192
192
  }
193
193
  renderAction({ id: e, label: t, icon: n, active: r, panelName: h, iconFlipRtl: p = !1, onClick: u = this._toggleSidePanel }) {
194
194
  return i`<calcite-action id=${e ?? P} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${n} .active=${r} @click=${u} data-panel-name=${h ?? P} .iconFlipRtl=${p}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
@@ -259,7 +259,7 @@ class X extends C {
259
259
  return i`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
260
260
  }
261
261
  }
262
- w("arcgis-arcade-editor", X);
262
+ w("arcgis-arcade-editor", q);
263
263
  export {
264
- X as ArcgisArcadeEditor
264
+ q as ArcgisArcadeEditor
265
265
  };
@@ -2,12 +2,12 @@
2
2
  import { c as I } from "../../chunks/runtime.js";
3
3
  import { css as T, html as t, unsafeCSS as D } from "lit";
4
4
  import { nothing as w, LitElement as O, createEvent as y, safeClassMap as h } from "@arcgis/lumina";
5
- import { setValuesInString as o, quoteString as v } from "@arcgis/toolkit/string";
6
- import { B as x, v as b, M as m, f as A, a as F, b as L } from "../../chunks/arcade-executor.js";
5
+ import { setValuesInString as o, quoteString as g } from "@arcgis/toolkit/string";
6
+ import { B as x, v as b, M as m, f as L, a as A, b as F } from "../../chunks/arcade-executor.js";
7
7
  import { u as _ } from "../../chunks/useT9n.js";
8
8
  import { s as j } from "../../chunks/fields.js";
9
9
  import "@arcgis/toolkit/function";
10
- import { createRef as g, ref as f } from "lit/directives/ref.js";
10
+ import { createRef as v, ref as $ } from "lit/directives/ref.js";
11
11
  import { t as k } from "../../chunks/monaco-theme.js";
12
12
  import { observeAncestorsMutation as z, unsafeGetCalciteModeName as N } from "@arcgis/toolkit/dom";
13
13
  const E = T`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}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)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, l = {
@@ -26,17 +26,17 @@ const E = T`:host{display:flex;flex-direction:column;width:100%;background-color
26
26
  case "null":
27
27
  return t`<span class="constant-value">${e.type}</span>`;
28
28
  case "text":
29
- return t`<span class="string-value">${v(e.value)}</span>`;
29
+ return t`<span class="string-value">${g(e.value)}</span>`;
30
30
  case "number":
31
31
  return t`<span class="number-value">${e.value.toString()}</span>`;
32
32
  case "boolean":
33
33
  return t`<span class="constant-value">${e.value.toString()}</span>`;
34
34
  case "date":
35
- return t`<span class="date-value">${L(e)}</span>`;
35
+ return t`<span class="date-value">${F(e)}</span>`;
36
36
  case "dateOnly":
37
- return t`<span class="string-value">${v(F(e))}</span>`;
37
+ return t`<span class="string-value">${g(A(e))}</span>`;
38
38
  case "time":
39
- return t`<span class="string-value">${v(A(e))}</span>`;
39
+ return t`<span class="string-value">${g(L(e))}</span>`;
40
40
  default:
41
41
  return null;
42
42
  }
@@ -49,14 +49,14 @@ const E = T`:host{display:flex;flex-direction:column;width:100%;background-color
49
49
  const i = e.geometry?.();
50
50
  return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map((c) => {
51
51
  const n = b(e.field(c));
52
- return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null : $({ arcadeResult: n, name: c, t9nStrings: s });
53
- })}${i ? $({ arcadeResult: { type: "geometry", value: i }, name: "geometry", t9nStrings: s }) : null}</calcite-tree>`;
52
+ return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null : f({ arcadeResult: n, name: c, t9nStrings: s });
53
+ })}${i ? f({ arcadeResult: { type: "geometry", value: i }, name: "geometry", t9nStrings: s }) : null}</calcite-tree>`;
54
54
  }, V = ({ arcadeResult: e, t9nStrings: a }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= x ? t`<span>&nbsp;${o(a.showingfirstitemsformat, {
55
55
  count: x.toString()
56
56
  })}</span>` : null}</div>`, M = ({ items: e, subtree: a, t9nStrings: s }) => t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((i, c) => {
57
57
  const n = b(i);
58
- return $({ arcadeResult: n, name: c, expanded: !a, t9nStrings: s });
59
- })}</calcite-tree>`, $ = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: i }) => {
58
+ return f({ arcadeResult: n, name: c, expanded: !a, t9nStrings: s });
59
+ })}</calcite-tree>`, f = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: i }) => {
60
60
  switch (e.type) {
61
61
  case "null":
62
62
  case "unknown":
@@ -121,7 +121,7 @@ const d = {
121
121
  };
122
122
  class B extends O {
123
123
  constructor() {
124
- super(...arguments), this.messages = _(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.calciteModeDark = !1, this.arcgisInternalClosePanel = y({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = y({ bubbles: !1, composed: !1 });
124
+ super(...arguments), this.messages = _(), this.outputRef = v(), this.consoleRef = v(), this.logRef = v(), this.openedResultPanel = "output", this.calciteModeDark = !1, this.arcgisInternalClosePanel = y({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = y({ bubbles: !1, composed: !1 });
125
125
  }
126
126
  static {
127
127
  this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, calciteModeDark: 7 };
@@ -152,15 +152,15 @@ class B extends O {
152
152
  this.calciteModeDark = N(this.el) === "dark";
153
153
  }
154
154
  renderConsolePanel() {
155
- return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((a) => t`<p>${a}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
155
+ return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((a) => t`<p>${a}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
156
156
  }
157
157
  renderLogPanel() {
158
158
  if (this.openedResultPanel !== "log")
159
159
  return null;
160
160
  if (this.loading)
161
- return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
161
+ return t`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>`;
162
162
  const a = this.result?.type === "error" ? "color-error" : "color-success";
163
- return t`<calcite-list label=results>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
163
+ return t`<calcite-list .label=${this.messages.results ?? "Results"}>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
164
164
  timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
165
165
  dateStyle: "medium",
166
166
  timeStyle: "medium"
@@ -183,7 +183,7 @@ class B extends O {
183
183
  if (this.openedResultPanel !== "output")
184
184
  return null;
185
185
  if (this.loading)
186
- return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
186
+ return t`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>`;
187
187
  switch (this.result?.type) {
188
188
  case "error":
189
189
  return t`<div class="result-value-simple flex-adjustable">${o(this.messages.executionerrorformat ?? "", { message: this.result.value })}</div>`;
@@ -219,7 +219,7 @@ class B extends O {
219
219
  }
220
220
  }
221
221
  render() {
222
- return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${f(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${f(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${f(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
222
+ return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${$(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${$(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${$(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading ? t`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
223
223
  }
224
224
  }
225
225
  I("arcgis-arcade-results", B);
@@ -12,7 +12,7 @@ function v(o) {
12
12
  return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
13
13
  }
14
14
  const S = 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)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`;
15
- class w extends h {
15
+ class $ extends h {
16
16
  constructor() {
17
17
  super(...arguments), this._beforeBack = async () => {
18
18
  this._selectedSuggestion = void 0;
@@ -72,10 +72,10 @@ class w extends h {
72
72
  return e ? s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(t) => this._emitItemSelected(t, e)} data-item=${e ?? r} ${l(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${b(e.documentation) ?? ""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>` : null;
73
73
  }
74
74
  render() {
75
- return this.closed ? null : s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
75
+ return this.closed ? null : s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions ?? "Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
76
76
  }
77
77
  }
78
- n("arcgis-arcade-suggestions", w);
78
+ n("arcgis-arcade-suggestions", $);
79
79
  export {
80
- w as ArcgisArcadeSuggestions
80
+ $ as ArcgisArcadeSuggestions
81
81
  };
@@ -102,7 +102,7 @@ class b extends d {
102
102
  this._mutationCounter += 1;
103
103
  })).catch(() => {
104
104
  u("error", this, "Error loading collection"), r = !1;
105
- }), r = !0), s`<calcite-flow-item heading-level=2 .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${i}><calcite-action slot=header-actions-end .text=${this.messages.backtotop ?? ""} scale=m .hidden=${t || this._isMode("featureSet")} 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 ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader>` : s`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`;
105
+ }), r = !0), s`<calcite-flow-item heading-level=2 .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${i}><calcite-action slot=header-actions-end .text=${this.messages.backtotop ?? ""} scale=m .hidden=${t || this._isMode("featureSet")} 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 ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader>` : s`<calcite-list .label=${this.messages.profilevariables ?? "Profile variables"}>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`;
106
106
  }
107
107
  renderEditorVariables(e) {
108
108
  const t = f(this._filterValue), i = e.variables.filter((r) => r.passFilter(t));
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
2
  import { c as r } from "../../chunks/runtime.js";
3
3
  import { ref as c } from "lit/directives/ref.js";
4
- import { css as m, html as l } from "lit";
4
+ import { css as m, html as s } from "lit";
5
5
  import { setFocusOnElement as d, focusElement as u } from "@arcgis/toolkit/dom";
6
6
  import { addLtrMark as a } from "@arcgis/toolkit/string";
7
7
  import { LitElement as h, createEvent as o } from "@arcgis/lumina";
@@ -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 ? l`<calcite-list-item-group .heading=${e.title}>${i.map((t) => l`<calcite-list-item .label=${a(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;
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;
74
74
  }
75
75
  renderApiItemFlowItem() {
76
76
  const e = this._selectedApiItem;
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)} ${c(u)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? l`<div ${c(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
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;
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 l`<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 ? l`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : l`<calcite-list label="arcade api">${i ? l`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
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>`;
84
84
  }
85
85
  }
86
86
  r("arcgis-language-api-panel", b);