@arcgis/coding-components 5.2.0-next.1 → 5.2.0-next.10

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 (114) hide show
  1. package/dist/cdn/3LFA3ZUC.js +2 -0
  2. package/dist/cdn/{O3PQD5N5.js → 3RKKHGVW.js} +1 -1
  3. package/dist/cdn/4KFBAAVC.js +2 -0
  4. package/dist/cdn/4XEVYDUI.js +2 -0
  5. package/dist/cdn/4XMC5J5W.js +12 -0
  6. package/dist/cdn/{WWVPYM5B.js → 6IE7GBIZ.js} +1 -1
  7. package/dist/cdn/7Z6G332Z.js +2 -0
  8. package/dist/cdn/{QUR4WECO.js → BEDXEPMS.js} +1 -1
  9. package/dist/cdn/{PUY5G6AF.js → CKBZZB5E.js} +1 -1
  10. package/dist/cdn/CRXBAVHA.js +68 -0
  11. package/dist/cdn/{2WVAYBDV.js → DBVA54U6.js} +1 -1
  12. package/dist/cdn/{CC4XBW6V.js → EHMFQPTC.js} +1 -1
  13. package/dist/cdn/{LUJKYDO7.js → EIW62O7S.js} +1 -1
  14. package/dist/cdn/{BXEZA6TW.js → FJWYAXOE.js} +1 -1
  15. package/dist/cdn/GBBSV4NV.js +2 -0
  16. package/dist/cdn/{QW7OA32G.js → GRY2G3ZM.js} +1 -1
  17. package/dist/cdn/{HRM2JUGO.js → IMMQXUUH.js} +1 -1
  18. package/dist/cdn/IQR7XS6J.js +2 -0
  19. package/dist/cdn/{QGBZYXBS.js → MFMTJO3G.js} +1 -1
  20. package/dist/cdn/MQ6ZAZZK.js +2 -0
  21. package/dist/cdn/MZMKV7FA.js +2 -0
  22. package/dist/cdn/NP37C536.js +2 -0
  23. package/dist/cdn/PE22Q7FG.js +2 -0
  24. package/dist/cdn/{2DNHMHBF.js → PNDN33UV.js} +1 -1
  25. package/dist/cdn/QRQEHI3E.js +2 -0
  26. package/dist/cdn/{CA3GVMWI.js → R4PIOB2F.js} +1 -1
  27. package/dist/cdn/SYSBF5A6.js +2 -0
  28. package/dist/cdn/UCJZGGBB.js +6 -0
  29. package/dist/cdn/{IETP57KJ.js → VVAIS3PR.js} +1 -1
  30. package/dist/cdn/assets/arcade-language/api/arcade-api.t9n.en.json +1 -1
  31. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +1 -1
  32. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +1 -1
  33. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +1 -1
  34. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +1 -1
  35. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +1 -1
  36. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +1 -1
  37. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +1 -1
  38. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +1 -1
  39. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +1 -1
  40. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +1 -1
  41. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +1 -1
  42. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +1 -1
  43. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +1 -1
  44. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +1 -1
  45. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +1 -1
  46. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +1 -1
  47. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +1 -1
  48. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +1 -1
  49. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +1 -1
  50. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +1 -1
  51. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +1 -1
  52. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +1 -1
  53. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.no.json +1 -1
  54. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +1 -1
  55. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +1 -1
  56. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +1 -1
  57. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +1 -1
  58. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +1 -1
  59. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +1 -1
  60. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +1 -1
  61. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +1 -1
  62. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +1 -1
  63. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +1 -1
  64. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +1 -1
  65. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +1 -1
  66. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +1 -1
  67. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +1 -1
  68. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +1 -1
  69. package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +1 -1
  70. package/dist/cdn/assets/code-editor/sql-expr.worker.js +3 -3
  71. package/dist/cdn/index.js +1 -1
  72. package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +1 -1
  73. package/dist/chunks/arcade-defaults.js +56 -54
  74. package/dist/chunks/debugger-value-components.js +1 -1
  75. package/dist/chunks/debugger-value-styles.js +8 -8
  76. package/dist/chunks/fields.js +18 -14
  77. package/dist/chunks/functional.js +34 -34
  78. package/dist/chunks/language-defaults-base.js +230 -221
  79. package/dist/chunks/sql-expr-defaults.js +63 -59
  80. package/dist/components/arcgis-arcade-debugger-console/customElement.js +7 -7
  81. package/dist/components/arcgis-arcade-debugger-output/customElement.js +1 -1
  82. package/dist/components/arcgis-arcade-editor/customElement.d.ts +38 -3
  83. package/dist/components/arcgis-arcade-editor/customElement.js +184 -178
  84. package/dist/components/arcgis-arcade-results/customElement.js +18 -18
  85. package/dist/components/arcgis-code-editor-shell/customElement.js +70 -65
  86. package/dist/components/arcgis-editor-variables/customElement.js +12 -6
  87. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
  88. package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
  89. package/dist/docs/api.json +1 -1
  90. package/dist/docs/docs.json +1 -1
  91. package/dist/docs/vscode.html-custom-data.json +1 -1
  92. package/dist/docs/web-types.json +1 -1
  93. package/dist/index.d.ts +3 -3
  94. package/dist/loader.js +2 -2
  95. package/dist/types/lumina.d.ts +1 -1
  96. package/dist/types/preact.d.ts +1 -1
  97. package/dist/types/react.d.ts +1 -1
  98. package/dist/types/stencil.d.ts +1 -1
  99. package/package.json +8 -8
  100. package/dist/cdn/3CHKFCKR.js +0 -2
  101. package/dist/cdn/3UD4JSPW.js +0 -2
  102. package/dist/cdn/4G3EYLJY.js +0 -2
  103. package/dist/cdn/4N67XYKO.js +0 -2
  104. package/dist/cdn/6QMGBWXM.js +0 -2
  105. package/dist/cdn/72E5GBWN.js +0 -68
  106. package/dist/cdn/B5A6XU2C.js +0 -2
  107. package/dist/cdn/CQTJWVFM.js +0 -6
  108. package/dist/cdn/G5IXPOCO.js +0 -2
  109. package/dist/cdn/P3LG4UGD.js +0 -2
  110. package/dist/cdn/RMVHO2AH.js +0 -12
  111. package/dist/cdn/RO6RHW6I.js +0 -2
  112. package/dist/cdn/TQDN6SR5.js +0 -2
  113. package/dist/cdn/TWEJITWD.js +0 -2
  114. package/dist/cdn/ZTCCL565.js +0 -2
@@ -1,23 +1,23 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as h } from "../../chunks/runtime.js";
2
+ import { c as p } from "../../chunks/runtime.js";
3
3
  import { css as g, html as e } from "lit";
4
- import { LitElement as f, createEvent as d, safeClassMap as r } from "@arcgis/lumina";
4
+ import { LitElement as f, createEvent as u, safeClassMap as r } from "@arcgis/lumina";
5
5
  import { setValuesInString as i, uncapitalize as a } from "@arcgis/toolkit/string";
6
6
  import { M as v } from "../../chunks/arcade-executor.js";
7
7
  import { u as b } from "../../chunks/useT9n.js";
8
8
  import { F as $, a as x, t as s, D as y, A as R, b as P } from "../../chunks/functional.js";
9
- import { d as w, g as k, c as m, b as S, G as T, a as C, S as p } from "../../chunks/debugger-value-styles.js";
9
+ import { d as w, g as k, c as m, b as S, G as T, a as C, S as h } from "../../chunks/debugger-value-styles.js";
10
10
  import { createRef as o, ref as n } from "lit/directives/ref.js";
11
11
  import { observeAncestorsMutation as M, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
12
- const L = g`: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;min-height:0}.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{display:flex;flex-direction:column;min-height:0;.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}}`, c = {
13
- onClick: (u) => {
14
- const t = u.currentTarget;
12
+ const L = g`: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;min-height:0}.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}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{display:flex;flex-direction:column;min-height:0;.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}}`, c = {
13
+ onClick: (d) => {
14
+ const t = d.currentTarget;
15
15
  t.expanded = !t.expanded;
16
16
  }
17
17
  };
18
18
  class F extends f {
19
19
  constructor() {
20
- super(...arguments), this.messages = b(), this.outputRef = o(), this.consoleRef = o(), this.logRef = o(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel = d({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = d({ bubbles: !1, composed: !1 });
20
+ super(...arguments), this.messages = b(), this.outputRef = o(), this.consoleRef = o(), this.logRef = o(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel = u({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = u({ bubbles: !1, composed: !1 });
21
21
  }
22
22
  static {
23
23
  this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, hideHeader: 5 };
@@ -48,7 +48,7 @@ class F extends f {
48
48
  I(this.el) === "dark" ? this.elementInternals.states.add(m) : this.elementInternals.states.delete(m);
49
49
  }
50
50
  renderConsolePanel() {
51
- return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : e`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((t) => e`<p>${t}</p>`) : e`<p>${this.messages.consolemessage}</p>`}</div>`;
51
+ return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : e`<div class="console-logs-container">${this.consoleLogs?.length ? this.consoleLogs.map((t) => e`<p>${t}</p>`) : e`<p>${this.messages.consolemessage}</p>`}</div>`;
52
52
  }
53
53
  renderLogPanel() {
54
54
  if (this.openedResultPanel !== "log")
@@ -85,7 +85,7 @@ class F extends f {
85
85
  return e`<div class="result-value-simple flex-adjustable">${i(this.messages.executionerrorformat ?? "", { message: this.result.value })}</div>`;
86
86
  case "null":
87
87
  case "unknown":
88
- return e`<div class="result-value-simple ltr-container">${p({ type: this.result.type, value: a(this.result.type) })}</div>`;
88
+ return e`<div class="result-value-simple">${h({ type: this.result.type, value: a(this.result.type) })}</div>`;
89
89
  case "text":
90
90
  case "number":
91
91
  case "date":
@@ -93,33 +93,33 @@ class F extends f {
93
93
  case "time":
94
94
  case "boolean": {
95
95
  const { type: t, value: l } = C(this.result);
96
- return e`<div class="result-value-simple ltr-container"><span class="value-type">${a(this.result.type)}:&nbsp;</span>${p({ type: t, value: l })}</div>`;
96
+ return e`<div class="result-value-simple"><bdi class="value-type">${a(this.result.type)}:&nbsp;</bdi>${h({ type: t, value: l })}</div>`;
97
97
  }
98
98
  case "array": {
99
99
  const l = (this.result.value ?? []).slice(0, v);
100
- return e`<div class="result-value-simple ltr-container"><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">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${P({ items: l, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
100
+ 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">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${P({ items: l, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
101
101
  }
102
102
  case "geometry":
103
- return e`<div class="result-value-simple ltr-container"><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">${a(this.result.type)}</div>${T({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
103
+ 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>${T({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
104
104
  case "attachment":
105
- return e`<div class="result-value-simple ltr-container"><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">${a(this.result.type)}</div>${S({ obj: this.result.value.castAsJson(), subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
105
+ 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>${S({ obj: this.result.value.castAsJson(), subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
106
106
  case "feature":
107
107
  case "dictionary":
108
108
  case "portal":
109
- return e`<div class="result-value-simple ltr-container"><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">${a(this.result.type)}</div>${y({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
109
+ 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
110
  case "featureSet":
111
- return e`<div class="result-value-table ltr-container">${$({ arcadeResult: this.result, t9nStrings: this.messages })}${x({ arcadeResult: this.result })}</div>`;
111
+ return e`<div class="result-value-table">${$({ arcadeResult: this.result, t9nStrings: this.messages })}${x({ arcadeResult: this.result })}</div>`;
112
112
  case "knowledgeGraph":
113
- return e`<div class="result-value-simple ltr-container"><span class="value-type">${a(this.result.type)}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;
113
+ return e`<div class="result-value-simple"><bdi class="value-type">${a(this.result.type)}:&nbsp;</bdi><bdi class="string-value">${this.result.value.url}</bdi></div>`;
114
114
  default:
115
- return e`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`;
115
+ return e`<div class="result-value-simple flex-adjustable">${this.messages.runscriptmessage}</div>`;
116
116
  }
117
117
  }
118
118
  render() {
119
119
  return e`${this.hideHeader ? null : e`<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 ${n(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 ${n(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 ${n(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 ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : e`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
120
120
  }
121
121
  }
122
- h("arcgis-arcade-results", F);
122
+ p("arcgis-arcade-results", F);
123
123
  export {
124
124
  F as ArcgisArcadeResults
125
125
  };
@@ -1,88 +1,93 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as g } from "../../chunks/runtime.js";
3
- import { css as x, html as f } from "lit";
3
+ import { css as f, html as x } from "lit";
4
4
  import { LitElement as v } from "@arcgis/lumina";
5
5
  import { slotChangeHasContent as y } from "@arcgis/toolkit/dom";
6
- import { createRef as c, ref as d } from "lit/directives/ref.js";
7
- const w = x`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.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}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:calc((var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1);align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-xxl);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`, z = 10, P = 25, u = 100, i = "results-has-content", m = "is-resizing", H = "--arcgis-coding-components-code-editor-results-panel-max-h", s = "--internal-code-editor-results-panel-h", a = "--internal-code-editor-results-panel-max-h", n = "--internal-code-editor-results-panel-bottom-drawer-controls-h";
6
+ import { createRef as l, ref as c } from "lit/directives/ref.js";
7
+ const w = f`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.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}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:0;align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-sm-plus);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`, z = 10, P = 25, h = 100, u = "results-has-content", m = "is-resizing", H = "--arcgis-coding-components-code-editor-results-panel-max-h", s = "--internal-code-editor-results-panel-h", n = "--internal-code-editor-results-panel-max-h", i = "--internal-code-editor-results-panel-bottom-drawer-controls-h";
8
8
  class R extends v {
9
9
  static {
10
10
  this.styles = [w];
11
11
  }
12
12
  #e = void 0;
13
- #i = !1;
14
- #n = c();
15
- #d = c();
16
- #a = c();
17
- #t;
18
- #h(e) {
19
- this.#e === e.pointerId && this.#r();
20
- }
21
- #g = (e) => {
22
- this.#e === e.pointerId && this.#r();
13
+ #t = !1;
14
+ #n = !1;
15
+ #a = l();
16
+ #h = l();
17
+ #l = l();
18
+ #r;
19
+ #u(e) {
20
+ this.#e === e.pointerId && this.#o();
21
+ }
22
+ #f = (e) => {
23
+ this.#e === e.pointerId && this.#o();
23
24
  };
24
25
  load() {
25
- this.manager.onLifecycle(() => (this.#t = new ResizeObserver(() => {
26
- this.elementInternals.states.has(i) && this.#s();
27
- }), this.updateComplete.then(() => this.#b()), () => {
28
- this.#r(), this.#t?.disconnect(), this.#t = void 0;
26
+ this.manager.onLifecycle(() => (this.#r = new ResizeObserver(() => {
27
+ this.#t && this.#i();
28
+ }), this.updateComplete.then(() => this.#g()), () => {
29
+ this.#o(), this.#r?.disconnect(), this.#r = void 0;
29
30
  }));
30
31
  }
31
32
  #x() {
32
- this.elementInternals.states.has(i) && this.#s(), this.#b();
33
- }
34
- #f(e) {
35
- e.button !== 0 || !this.elementInternals.states.has(i) || (e.preventDefault(), e.currentTarget instanceof HTMLElement && (e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId)), this.#e = e.pointerId, this.#i = !0, this.elementInternals.states.add(m), this.#u(e));
33
+ this.#t && this.#i(), this.#g();
36
34
  }
37
35
  #v(e) {
38
- if (!this.elementInternals.states.has(i))
39
- return;
40
- this.#s();
41
- const t = this.#P(e);
42
- t != null && (e.preventDefault(), e.stopPropagation(), this.#i = !0, this.#c(t));
36
+ e.button !== 0 || !this.#t || (e.preventDefault(), e.currentTarget instanceof HTMLElement && (e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId)), this.#e = e.pointerId, this.#n = !0, this.elementInternals.states.add(m), this.#m(e));
43
37
  }
44
38
  #y(e) {
39
+ if (!this.#t)
40
+ return;
41
+ this.#i();
42
+ const t = this.#H(e);
43
+ t != null && (e.preventDefault(), e.stopPropagation(), this.#n = !0, this.#d(t));
44
+ }
45
+ #w(e) {
45
46
  if (!e.target)
46
47
  return;
47
48
  const r = y(e);
48
- r || (this.#r(), this.#i || this.#R()), r ? (this.elementInternals.states.add(i), this.#s()) : this.elementInternals.states.delete(i);
49
+ if (this.#t = r, r) {
50
+ this.elementInternals.states.add(u), this.#i();
51
+ return;
52
+ }
53
+ this.#o(), this.#n || this.#C(), this.elementInternals.states.delete(u);
49
54
  }
50
- #r() {
55
+ #o() {
51
56
  const e = this.#e;
52
57
  if (!e)
53
58
  return;
54
59
  this.#e = void 0;
55
- const t = this.#d.value;
60
+ const t = this.#h.value;
56
61
  t?.hasPointerCapture(e) && t.releasePointerCapture(e), this.elementInternals.states.delete(m);
57
62
  }
58
- #u(e) {
63
+ #m(e) {
59
64
  if (this.#e !== e.pointerId)
60
65
  return;
61
- const t = this.#o(), r = this.el.getBoundingClientRect().bottom - e.clientY - t;
62
- this.#c(r, t);
66
+ const t = this.#s(), r = this.el.getBoundingClientRect().bottom - e.clientY - t;
67
+ this.#d(r, t);
63
68
  }
64
- #w() {
69
+ #z() {
65
70
  const e = Number.parseFloat(this.el.style.getPropertyValue(s));
66
71
  if (Number.isFinite(e))
67
72
  return e;
68
- const t = Number.parseFloat(getComputedStyle(this.#n.value ?? this.el).height);
69
- return Number.isFinite(t) ? Math.max(0, t - this.#o()) : u;
73
+ const t = Number.parseFloat(getComputedStyle(this.#a.value ?? this.el).height);
74
+ return Number.isFinite(t) ? Math.max(0, t - this.#s()) : h;
70
75
  }
71
- #m() {
76
+ #p() {
72
77
  return this.el.querySelector(':scope > [slot="bottom-action-bar"]');
73
78
  }
74
- #o() {
75
- const e = this.#m()?.getBoundingClientRect().height ?? 0, t = this.#a.value?.getBoundingClientRect().height ?? 0;
79
+ #s() {
80
+ const e = this.#p()?.getBoundingClientRect().height ?? 0, t = this.#l.value?.getBoundingClientRect().height ?? 0;
76
81
  return e + t;
77
82
  }
78
- #p() {
83
+ #b() {
79
84
  return getComputedStyle(this.el).getPropertyValue(H).trim() || null;
80
85
  }
81
- #l(e, t) {
86
+ #c(e, t) {
82
87
  t ? this.el.style.setProperty(e, t) : this.el.style.removeProperty(e);
83
88
  }
84
- #z(e) {
85
- const t = this.#p();
89
+ #P(e) {
90
+ const t = this.#b();
86
91
  if (!t)
87
92
  return null;
88
93
  const r = Number.parseFloat(t);
@@ -90,26 +95,26 @@ class R extends v {
90
95
  return r;
91
96
  if (t.endsWith("%") && Number.isFinite(r))
92
97
  return this.el.getBoundingClientRect().height * r / 100;
93
- const o = this.#n.value;
98
+ const o = this.#a.value;
94
99
  if (!o)
95
100
  return null;
96
- const l = this.el.style.getPropertyValue(n), p = this.el.style.getPropertyValue(s), b = this.el.style.getPropertyValue(a);
97
- this.el.style.setProperty(n, `${e}px`), this.el.style.setProperty(s, `${this.el.getBoundingClientRect().height}px`), this.el.style.setProperty(a, t);
98
- const h = Number.parseFloat(getComputedStyle(o).height);
99
- return this.#l(n, l), this.#l(s, p), this.#l(a, b), Number.isFinite(h) ? Math.max(0, h - e) : null;
101
+ const a = this.el.style.getPropertyValue(i), p = this.el.style.getPropertyValue(s), b = this.el.style.getPropertyValue(n);
102
+ this.el.style.setProperty(i, `${e}px`), this.el.style.setProperty(s, `${this.el.getBoundingClientRect().height}px`), this.el.style.setProperty(n, t);
103
+ const d = Number.parseFloat(getComputedStyle(o).height);
104
+ return this.#c(i, a), this.#c(s, p), this.#c(n, b), Number.isFinite(d) ? Math.max(0, d - e) : null;
100
105
  }
101
- #b() {
102
- const e = this.#t;
106
+ #g() {
107
+ const e = this.#r;
103
108
  if (!e)
104
109
  return;
105
110
  e.disconnect(), e.observe(this.el);
106
- const t = this.#a.value;
111
+ const t = this.#l.value;
107
112
  t && e.observe(t);
108
- const r = this.#m();
113
+ const r = this.#p();
109
114
  r && e.observe(r);
110
115
  }
111
- #P(e) {
112
- const t = e.shiftKey ? P : z, r = this.#w();
116
+ #H(e) {
117
+ const t = e.shiftKey ? P : z, r = this.#z();
113
118
  switch (e.key) {
114
119
  case "ArrowUp":
115
120
  return r + t;
@@ -119,23 +124,23 @@ class R extends v {
119
124
  return;
120
125
  }
121
126
  }
122
- #H(e, t) {
123
- const r = Math.max(0, this.el.getBoundingClientRect().height - t), o = this.#z(t), l = o == null ? r : Math.min(r, o);
124
- return Math.min(Math.max(e, u), l);
127
+ #R(e, t) {
128
+ const r = Math.max(0, this.el.getBoundingClientRect().height - t), o = this.#P(t), a = o == null ? r : Math.min(r, o);
129
+ return Math.min(Math.max(e, h), a);
125
130
  }
126
- #c(e, t = this.#o()) {
127
- const r = this.#H(e, t), o = this.#p();
128
- this.el.style.setProperty(n, `${t}px`), this.el.style.setProperty(s, `${r}px`), this.el.style.setProperty(a, o ?? `calc(100% - ${t}px)`);
131
+ #d(e, t = this.#s()) {
132
+ const r = this.#R(e, t), o = this.#b();
133
+ this.el.style.setProperty(i, `${t}px`), this.el.style.setProperty(s, `${r}px`), this.el.style.setProperty(n, o ?? `calc(100% - ${t}px)`);
129
134
  }
130
- #R() {
131
- this.el.style.removeProperty(n), this.el.style.removeProperty(s), this.el.style.removeProperty(a);
135
+ #C() {
136
+ this.el.style.removeProperty(i), this.el.style.removeProperty(s), this.el.style.removeProperty(n);
132
137
  }
133
- #s() {
134
- const e = this.#o(), t = Number.parseFloat(this.el.style.getPropertyValue(s));
135
- return Number.isFinite(t) ? this.#c(t, e) : this.el.style.setProperty(n, `${e}px`), e;
138
+ #i() {
139
+ const e = this.#s(), t = Number.parseFloat(this.el.style.getPropertyValue(s));
140
+ return Number.isFinite(t) ? this.#d(t, e) : this.el.style.setProperty(i, `${e}px`), e;
136
141
  }
137
142
  render() {
138
- return f`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${d(this.#n)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#h} @pointerdown=${this.#f} @pointermove=${this.#u} @pointerup=${this.#h} @lostpointercapture=${this.#g} @keydown=${this.#v} ${d(this.#d)}><div class="bottom-drawer-resize-handle-bar" ${d(this.#a)}><calcite-icon icon=drag-resize-vertical scale=s></calcite-icon></div></div><slot name=bottom-action-bar @slotchange=${this.#x}></slot><slot name=results-panel @slotchange=${this.#y}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`;
143
+ return x`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${c(this.#a)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#u} @pointerdown=${this.#v} @pointermove=${this.#m} @pointerup=${this.#u} @lostpointercapture=${this.#f} @keydown=${this.#y} ${c(this.#h)}><div class="bottom-drawer-resize-handle-bar" ${c(this.#l)}><calcite-icon icon=drag-resize-vertical scale=s></calcite-icon></div></div><slot name=bottom-action-bar @slotchange=${this.#x}></slot><slot name=results-panel @slotchange=${this.#w}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`;
139
144
  }
140
145
  }
141
146
  g("arcgis-code-editor-shell", R);
@@ -12,14 +12,14 @@ const w = h`:host{background-color:var(--calcite-color-foreground-1);.notice-con
12
12
  function $(a) {
13
13
  a.key === "Enter" && a.stopPropagation();
14
14
  }
15
- class C extends f {
15
+ class I extends f {
16
16
  constructor() {
17
17
  super(...arguments), this._beforeBack = async () => {
18
18
  this.removeLastPanelRenderer(), this._filterValue = "";
19
- }, this.messages = b(), this._filterValue = "", this._flowItemRenderers = [], this._rootPresentation = "profile", this._mutationCounter = 1, this.loading = !1, this.closed = !1, this.arcgisInternalClosePanel = l({ bubbles: !1, composed: !1 }), this.arcgisInternalItemSelected = l({ bubbles: !1 });
19
+ }, this.messages = b(), this._filterValue = "", this._flowItemRenderers = [], this._rootPresentation = "profile", this._mutationCounter = 1, this.loading = !1, this.closed = !1, this.hideDescriptions = !1, this.arcgisInternalClosePanel = l({ bubbles: !1, composed: !1 }), this.arcgisInternalItemSelected = l({ bubbles: !1 });
20
20
  }
21
21
  static {
22
- this.properties = { _filterValue: 16, _flowItemRenderers: 16, _rootPresentation: 16, _mutationCounter: 16, loading: 5, modelId: 1, closed: 5, variable: 0, heading: 1, messageOverrides: 0 };
22
+ this.properties = { _filterValue: 16, _flowItemRenderers: 16, _rootPresentation: 16, _mutationCounter: 16, loading: 5, modelId: 1, closed: 5, variable: 0, heading: 1, hideDescriptions: 5, messageOverrides: 0 };
23
23
  }
24
24
  static {
25
25
  this.styles = w;
@@ -97,6 +97,12 @@ class C extends f {
97
97
  _getDescriptionForCollection(e) {
98
98
  return e ? n(e) ? e.variables[0]?.getLabel() ?? "" : v(e) ? e.datastoreInfo?.name ?? e.getDescription() ?? "" : e.breadcrumb : "";
99
99
  }
100
+ _getItemLabel(e) {
101
+ return e.getLabel();
102
+ }
103
+ _getItemDescription(e) {
104
+ return this.hideDescriptions ? "" : e.getDescription();
105
+ }
100
106
  renderCollectionBasedVariable(e, t = !1, s = !1) {
101
107
  if (!e)
102
108
  return null;
@@ -112,7 +118,7 @@ class C extends f {
112
118
  return s.length ? s.map((r) => this.renderEditorVariable(r)) : i`<div class="notice-container">${this.messages.noitems}</div>`;
113
119
  }
114
120
  renderEditorVariable(e) {
115
- return e.type === "group" ? this._isRootPresentation("featureSetRoot") && e.isHeader ? i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>` : this._isRootPresentation("featureSetRoot") && e._label?.code === "fields" ? this.renderEditorVariables(e) : i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>` : i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${(t) => this._emitItemSelected(t, e)} @keydown=${(t) => this._emitItemSelected(t, e)}>${e.isCollection ? i`<calcite-action slot=actions-end .text=${this.messages.expand ?? ""} scale=s icon=chevron-right icon-flip-rtl @click=${(t) => this._showCollectionPanel(t, e)} @keydown=${$}></calcite-action>` : null}${e.icon ? i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>` : null}</calcite-list-item>`;
121
+ return e.type === "group" ? this._isRootPresentation("featureSetRoot") && e.isHeader ? i`<calcite-list-item-group .heading=${this._getItemLabel(e)}></calcite-list-item-group>` : this._isRootPresentation("featureSetRoot") && e._label?.code === "fields" ? this.renderEditorVariables(e) : i`<calcite-list-item-group .heading=${this._getItemLabel(e)}>${this.renderEditorVariables(e)}</calcite-list-item-group>` : i`<calcite-list-item .label=${this._getItemLabel(e)} .description=${this._getItemDescription(e)} @calciteListItemSelect=${(t) => this._emitItemSelected(t, e)} @keydown=${(t) => this._emitItemSelected(t, e)}>${e.isCollection ? i`<calcite-action slot=actions-end .text=${this.messages.expand ?? ""} scale=s icon=chevron-right icon-flip-rtl @click=${(t) => this._showCollectionPanel(t, e)} @keydown=${$}></calcite-action>` : null}${e.icon ? i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>` : null}</calcite-list-item>`;
116
122
  }
117
123
  render() {
118
124
  return this.closed ? null : this.loading && !this.variable ? i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.heading ?? this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? ""}></calcite-loader></calcite-flow-item></calcite-flow>` : !this.loading && (!this.variable || this.variable?.loaded && !this.variable?.variables.length) ? i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.heading ?? this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.profileempty}</div></calcite-flow-item></calcite-flow>` : i`<calcite-flow ${d(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable, !0, this._flowItemRenderers.length === 0)}${this._flowItemRenderers.map((e, t, s) => (
@@ -121,7 +127,7 @@ class C extends f {
121
127
  ))}</calcite-flow>`;
122
128
  }
123
129
  }
124
- c("arcgis-editor-variables", C);
130
+ c("arcgis-editor-variables", I);
125
131
  export {
126
- C as ArcgisEditorVariables
132
+ I as ArcgisEditorVariables
127
133
  };
@@ -12,6 +12,17 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
12
12
  * @internal
13
13
  */
14
14
  export abstract class ArcgisSqlExpressionEditor extends LitElement {
15
+ /**
16
+ * If true, field aliases are hidden in the fields panel so only field names are displayed.
17
+ * Validation, completion, and inserted field snippets are unchanged.
18
+ *
19
+ * @default false
20
+ * @example
21
+ * ```html
22
+ * <arcgis-sql-expression-editor hideDescriptionsInFieldsPanel></arcgis-sql-expression-editor>
23
+ * ```
24
+ */
25
+ accessor hideDescriptionsInFieldsPanel: boolean;
15
26
  /**
16
27
  * If true, it will hide the side actions bar. The editor will be in a minimalistic UX.
17
28
  *
@@ -4,17 +4,17 @@ import { css as c, html as t } from "lit";
4
4
  import { LitElement as l, createEvent as o, safeClassMap as r } from "@arcgis/lumina";
5
5
  import { generateGuid as d } from "@arcgis/toolkit/string";
6
6
  import { a as s } from "../../chunks/sql-expr-defaults.js";
7
- import { u as p } from "../../chunks/useT9n.js";
8
- import { createRef as h, ref as g } from "lit/directives/ref.js";
7
+ import { u as h } from "../../chunks/useT9n.js";
8
+ import { createRef as p, ref as g } from "lit/directives/ref.js";
9
9
  import { getSqlExprDiagnosticService as _ } from "../../chunks/sql-expr-mode.js";
10
10
  import { rethrowError as a } from "@arcgis/toolkit/log";
11
11
  const f = c`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}`;
12
12
  class m extends l {
13
13
  constructor() {
14
- super(...arguments), this._codeEditorElt = h(), this._disposables = [], this.messages = p(), this._modelId = d(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.arcgisDiagnosticsChange = o({ bubbles: !1 }), this.arcgisScriptChange = o({ bubbles: !1 });
14
+ super(...arguments), this._codeEditorElt = p(), this._disposables = [], this.messages = h(), this._modelId = d(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.hideDescriptionsInFieldsPanel = !1, this.arcgisDiagnosticsChange = o({ bubbles: !1 }), this.arcgisScriptChange = o({ bubbles: !1 });
15
15
  }
16
16
  static {
17
- this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5, messageOverrides: 0 };
17
+ this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5, messageOverrides: 0, hideDescriptionsInFieldsPanel: 5 };
18
18
  }
19
19
  static {
20
20
  this.styles = [f];
@@ -82,7 +82,7 @@ class m extends l {
82
82
  }
83
83
  render() {
84
84
  const i = this._getFeatureSetVariable();
85
- return t`<arcgis-code-editor-shell><arcgis-code-editor slot=editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar && i && t`<arcgis-editor-variables slot=side-panel .variable=${i} .closed=${this._activeAction !== "fields"} class=${r(this._activeAction === "fields" ? "" : "hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} data-panel-name=none .messageOverrides=${{ profileempty: this.messages.profileempty }}></arcgis-editor-variables>` || ""}${!this.hideSideBar && t`<arcgis-language-api-panel slot=side-panel class=${r(this._activeAction === "functions" ? "" : "hidden")} .closed=${this._activeAction !== "functions"} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${s.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && t`<calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}>${i && t`<calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>` || ""}${i && !this.sideActionBarExpanded && t`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</arcgis-code-editor-shell>`;
85
+ return t`<arcgis-code-editor-shell><arcgis-code-editor slot=editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor>${!this.hideSideBar && i && t`<arcgis-editor-variables slot=side-panel .variable=${i} .hideDescriptions=${this.hideDescriptionsInFieldsPanel} .closed=${this._activeAction !== "fields"} class=${r(this._activeAction === "fields" ? "" : "hidden")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} data-panel-name=none .messageOverrides=${{ profileempty: this.messages.profileempty }}></arcgis-editor-variables>` || ""}${!this.hideSideBar && t`<arcgis-language-api-panel slot=side-panel class=${r(this._activeAction === "functions" ? "" : "hidden")} .closed=${this._activeAction !== "functions"} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${s.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && t`<calcite-action-bar slot=side-action-bar .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}>${i && t`<calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>` || ""}${i && !this.sideActionBarExpanded && t`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</arcgis-code-editor-shell>`;
86
86
  }
87
87
  }
88
88
  n("arcgis-sql-expression-editor", m);