@arcgis/coding-components 5.0.0-next.5 → 5.0.0-next.7

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 (80) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{QRDGNJA2.js → 23HBOQBZ.js} +2 -2
  3. package/dist/cdn/{YSKBMHQY.js → 27LOFPF2.js} +2 -2
  4. package/dist/cdn/{CWCTAOE7.js → 27QS4LNH.js} +2 -2
  5. package/dist/cdn/{Y2TRCN5S.js → 2NMHU46V.js} +2 -2
  6. package/dist/cdn/{3HXOX5WD.js → 2SZYMAFS.js} +2 -2
  7. package/dist/cdn/{CWTZWI2W.js → 4TA5DKU6.js} +1 -1
  8. package/dist/cdn/{TF6QB7UF.js → 6W6HHZR6.js} +2 -2
  9. package/dist/cdn/{43UV3GBL.js → 72OD6ZYF.js} +2 -2
  10. package/dist/cdn/{5BB5ZLOS.js → AVAQJQNP.js} +2 -2
  11. package/dist/cdn/{I6XB5IG5.js → BKHZCGID.js} +1 -1
  12. package/dist/cdn/{FLEFZMEN.js → CBH564BT.js} +2 -2
  13. package/dist/cdn/{CNKSQ7M3.js → CSL5IEXZ.js} +2 -2
  14. package/dist/cdn/{5DJO2HER.js → DDSKJPP3.js} +2 -2
  15. package/dist/cdn/{DNOBDCVS.js → G5SADTL5.js} +1 -1
  16. package/dist/cdn/{Q43UINX4.js → GAXNWWRE.js} +2 -2
  17. package/dist/cdn/{O2YS23OK.js → GFUZ6WM2.js} +2 -2
  18. package/dist/cdn/{GA6MUTBV.js → GSVQMMB7.js} +2 -2
  19. package/dist/cdn/HM3KGR4P.js +4 -0
  20. package/dist/cdn/{UZA4LBO4.js → HTZ6GKV4.js} +2 -2
  21. package/dist/cdn/{QQGHNCZV.js → I4LVYMSI.js} +2 -2
  22. package/dist/cdn/{BHOFIMTP.js → IKQ3SVNH.js} +2 -2
  23. package/dist/cdn/{DDZUVBII.js → J4L4JJFL.js} +2 -2
  24. package/dist/cdn/{NDMAYD3J.js → JFE6M4Y3.js} +2 -2
  25. package/dist/cdn/{ZIGZXUY6.js → JOUSRXEF.js} +2 -2
  26. package/dist/cdn/KNVFNJI6.js +4 -0
  27. package/dist/cdn/{XVXOLHWR.js → MSZLI6QU.js} +2 -2
  28. package/dist/cdn/{AUQALXQ2.js → N4FPRXJO.js} +1 -1
  29. package/dist/cdn/{42RKATY7.js → PYWGF52Z.js} +2 -2
  30. package/dist/cdn/{PQRNBT2L.js → QCZJ4SNP.js} +1 -1
  31. package/dist/cdn/{V6S4B3SW.js → REXCXF62.js} +2 -2
  32. package/dist/cdn/{ZT3PRDIO.js → RUKHZZNR.js} +2 -2
  33. package/dist/cdn/{ONUYCASC.js → SXJEEBHT.js} +2 -2
  34. package/dist/cdn/{LLPEKVOR.js → TSTU24GS.js} +2 -2
  35. package/dist/cdn/{LWHBPD5K.js → UPZPMIW5.js} +4 -4
  36. package/dist/cdn/{Z4RFJZDX.js → UWKWAKQK.js} +1 -1
  37. package/dist/cdn/{AN5Z66PT.js → VX4WCADC.js} +2 -2
  38. package/dist/cdn/{GG5JKCNX.js → WBFIECLB.js} +2 -2
  39. package/dist/cdn/{IA5NXCCG.js → WINZNQGA.js} +2 -2
  40. package/dist/cdn/{MBQGH7HL.js → WLAE6LRT.js} +2 -2
  41. package/dist/cdn/{354EVOUD.js → WLU7D66X.js} +2 -2
  42. package/dist/cdn/{U727HYIO.js → WOVRTDCM.js} +2 -2
  43. package/dist/cdn/{H4VYHCEB.js → WXU5Z7D4.js} +2 -2
  44. package/dist/cdn/{V3DAEKYH.js → XPV6WDON.js} +1 -1
  45. package/dist/cdn/{HXN33PND.js → Y5QDQLBM.js} +2 -2
  46. package/dist/cdn/index.js +2 -2
  47. package/dist/chunks/arcade-defaults.js +1 -1
  48. package/dist/chunks/arcade-executor.js +1 -1
  49. package/dist/chunks/arcade-mode.js +1 -1
  50. package/dist/chunks/arcade-service-accessors.js +1 -1
  51. package/dist/chunks/editor.js +1 -1
  52. package/dist/chunks/fields.js +1 -1
  53. package/dist/chunks/language-defaults-base.js +1 -1
  54. package/dist/chunks/markdown.js +1 -1
  55. package/dist/chunks/monaco-importer.js +1 -1
  56. package/dist/chunks/runtime.js +1 -1
  57. package/dist/chunks/setup-monaco.js +1 -1
  58. package/dist/chunks/sql-expr-contribution.js +1 -1
  59. package/dist/chunks/sql-expr-defaults.js +1 -1
  60. package/dist/chunks/sql-expr-mode.js +1 -1
  61. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  62. package/dist/chunks/useT9n.js +1 -1
  63. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  64. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  65. package/dist/components/arcgis-arcade-results/customElement.js +68 -64
  66. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  67. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  69. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  70. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  71. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  72. package/dist/docs/api.json +2 -2
  73. package/dist/docs/docs.json +2 -2
  74. package/dist/docs/web-types.json +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/loader.js +1 -1
  77. package/dist/monacoStyles.js +1 -1
  78. package/package.json +5 -5
  79. package/dist/cdn/3AULU6UL.js +0 -4
  80. package/dist/cdn/DE53UXK2.js +0 -4
@@ -1,61 +1,62 @@
1
- import { c as P } from "../../chunks/runtime.js";
2
- import { css as C, html as t } from "lit";
3
- import { nothing as y, LitElement as M, createEvent as f, safeClassMap as v } from "@arcgis/lumina";
4
- import { setValuesInString as o, quoteString as g } from "@arcgis/toolkit/string";
5
- import { B as b, v as h, M as m, f as R, a as A, b as I } from "../../chunks/arcade-executor.js";
6
- import { u as L } from "../../chunks/useT9n.js";
7
- import { s as O } from "../../chunks/fields.js";
1
+ import { c as C } from "../../chunks/runtime.js";
2
+ import { css as M, html as t } from "lit";
3
+ import { nothing as w, LitElement as F, createEvent as y, safeClassMap as v } from "@arcgis/lumina";
4
+ import { setValuesInString as o, quoteString as h } from "@arcgis/toolkit/string";
5
+ import { B as x, v as b, M as m, f as A, a as I, b as L } from "../../chunks/arcade-executor.js";
6
+ import { u as O } from "../../chunks/useT9n.js";
7
+ import { s as D } from "../../chunks/fields.js";
8
8
  import "@arcgis/toolkit/function";
9
+ import { createRef as g, ref as $ } from "lit/directives/ref.js";
9
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
11
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
11
- v5.0.0-next.5 */
12
- const D = C`: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 = {
12
+ v5.0.0-next.7 */
13
+ const _ = M`: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)}}`, a = {
13
14
  lines: !0,
14
15
  selectionMode: "none",
15
16
  scale: "s",
16
- oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((a) => a.selected = !1)
17
+ oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((l) => l.selected = !1)
17
18
  }, u = {
18
19
  onClick: (e) => {
19
- const a = e.currentTarget;
20
- a.expanded = !a.expanded;
20
+ const l = e.currentTarget;
21
+ l.expanded = !l.expanded;
21
22
  }
22
- }, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`, x = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(), void 0, 2)}</calcite-tree-item></calcite-tree>`, w = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${r({ name: "type" })}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${r({ name: "value" })}<span class="string-value">${JSON.stringify(e, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`, p = ({ arcadeResult: e }) => {
23
+ }, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`, S = ({ value: e, subtree: l = !1 }) => t`<calcite-tree slot=${(l ? "children" : void 0) ?? w} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(), void 0, 2)}</calcite-tree-item></calcite-tree>`, k = ({ value: e, subtree: l = !1 }) => t`<calcite-tree slot=${(l ? "children" : void 0) ?? w} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${r({ name: "type" })}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${r({ name: "value" })}<span class="string-value">${JSON.stringify(e, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`, p = ({ arcadeResult: e }) => {
23
24
  switch (e.type) {
24
25
  case "unknown":
25
26
  case "null":
26
27
  return t`<span class="constant-value">${e.type}</span>`;
27
28
  case "text":
28
- return t`<span class="string-value">${g(e.value)}</span>`;
29
+ return t`<span class="string-value">${h(e.value)}</span>`;
29
30
  case "number":
30
31
  return t`<span class="number-value">${e.value.toString()}</span>`;
31
32
  case "boolean":
32
33
  return t`<span class="constant-value">${e.value.toString()}</span>`;
33
34
  case "date":
34
- return t`<span class="date-value">${I(e)}</span>`;
35
+ return t`<span class="date-value">${L(e)}</span>`;
35
36
  case "dateOnly":
36
- return t`<span class="string-value">${g(A(e))}</span>`;
37
+ return t`<span class="string-value">${h(I(e))}</span>`;
37
38
  case "time":
38
- return t`<span class="string-value">${g(R(e))}</span>`;
39
+ return t`<span class="string-value">${h(A(e))}</span>`;
39
40
  default:
40
41
  return null;
41
42
  }
42
- }, S = ({ arcadeResult: e, t9nStrings: a }) => {
43
- const s = e.value ?? [], c = Math.max(s.length - m, 0);
44
- return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${c > 0 ? t`<span>&nbsp;${o(a.showingfirstitemsformat, {
43
+ }, T = ({ arcadeResult: e, t9nStrings: l }) => {
44
+ const s = e.value ?? [], i = Math.max(s.length - m, 0);
45
+ return t`<span>${`${e.type}(${s.length ?? 0})`}</span>${i > 0 ? t`<span>&nbsp;${o(l.showingfirstitemsformat, {
45
46
  count: m.toString()
46
47
  })}</span>` : null}`;
47
- }, k = ({ value: e, subtree: a, t9nStrings: s }) => {
48
- const c = e.geometry?.();
49
- return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map((i) => {
50
- const n = h(e.field(i));
51
- return e.arcadeDeclaredClass === "esri.arcade.Feature" && n.type === "geometry" ? null : $({ arcadeResult: n, name: i, t9nStrings: s });
52
- })}${c ? $({ arcadeResult: { type: "geometry", value: c }, name: "geometry", t9nStrings: s }) : null}</calcite-tree>`;
53
- }, F = ({ arcadeResult: e, t9nStrings: a }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= b ? t`<span>&nbsp;${o(a.showingfirstitemsformat, {
54
- count: b.toString()
55
- })}</span>` : null}</div>`, T = ({ 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((c, i) => {
56
- const n = h(c);
57
- return $({ arcadeResult: n, name: i, expanded: !a, t9nStrings: s });
58
- })}</calcite-tree>`, $ = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: c }) => {
48
+ }, P = ({ value: e, subtree: l, t9nStrings: s }) => {
49
+ const i = e.geometry?.();
50
+ return t`<calcite-tree slot=${"children"} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.keys().map((c) => {
51
+ const n = b(e.field(c));
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
+ }, z = ({ arcadeResult: e, t9nStrings: l }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= x ? t`<span>&nbsp;${o(l.showingfirstitemsformat, {
55
+ count: x.toString()
56
+ })}</span>` : null}</div>`, R = ({ items: e, subtree: l, t9nStrings: s }) => t`<calcite-tree slot=${"children"} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.map((i, c) => {
57
+ const n = b(i);
58
+ return f({ arcadeResult: n, name: c, expanded: !l, t9nStrings: s });
59
+ })}</calcite-tree>`, f = ({ arcadeResult: e, name: l, expanded: s, t9nStrings: i }) => {
59
60
  switch (e.type) {
60
61
  case "null":
61
62
  case "unknown":
@@ -65,85 +66,88 @@ const D = C`:host{display:flex;flex-direction:column;width:100%;background-color
65
66
  case "dateOnly":
66
67
  case "time":
67
68
  case "boolean":
68
- return t`<calcite-tree-item><div class="tree-item-label">${r({ name: a })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
69
+ return t`<calcite-tree-item><div class="tree-item-label">${r({ name: l })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
69
70
  case "array": {
70
71
  const n = (e.value ?? []).slice(0, m);
71
- return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}${S({ arcadeResult: e, t9nStrings: c })}</div>${T({ items: n, subtree: !0, t9nStrings: c })}</calcite-tree-item>`;
72
+ return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}${T({ arcadeResult: e, t9nStrings: i })}</div>${R({ items: n, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
72
73
  }
73
74
  case "geometry":
74
- return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${w({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
75
+ return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${k({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
75
76
  case "attachment":
76
- return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${x({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
77
+ return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${S({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
77
78
  case "feature":
78
79
  case "dictionary":
79
80
  case "portal":
80
- return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${k({ value: e.value, subtree: !0, t9nStrings: c })}</calcite-tree-item>`;
81
+ return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: l })}<span>${e.type}</span></div>${P({ value: e.value, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
81
82
  default:
82
83
  return null;
83
84
  }
84
- }, _ = ({ arcadeResult: e }) => {
85
- const a = O(e.value.fields);
86
- return t`<table><thead><tr>${a.map((s) => t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map((s) => t`<tr>${a.map((c) => {
85
+ }, N = ({ arcadeResult: e }) => {
86
+ const l = D(e.value.fields);
87
+ return t`<table><thead><tr>${l.map((s) => t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map((s) => t`<tr>${l.map((i) => {
87
88
  try {
88
- const i = h(s.field(c.name));
89
- return t`<td>${p({ arcadeResult: i })}</td>`;
89
+ const c = b(s.field(i.name));
90
+ return t`<td>${p({ arcadeResult: c })}</td>`;
90
91
  } catch {
91
92
  return t`<td></td>`;
92
93
  }
93
94
  })}</tr>`)}</tbody></table>`;
94
95
  }, d = {
95
96
  onClick: (e) => {
96
- const a = e.currentTarget;
97
- a.expanded = !a.expanded;
97
+ const l = e.currentTarget;
98
+ l.expanded = !l.expanded;
98
99
  }
99
100
  };
100
- class z extends M {
101
+ class j extends F {
101
102
  constructor() {
102
- super(...arguments), this.messages = L(), this.openedResultPanel = "output", this.arcgisClose = f({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = f({ bubbles: !1 });
103
+ super(...arguments), this.messages = O(), this.outputRef = g(), this.consoleRef = g(), this.logRef = g(), this.openedResultPanel = "output", this.arcgisClose = y({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = y({ bubbles: !1 });
103
104
  }
104
105
  static {
105
106
  this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
106
107
  }
107
108
  static {
108
- this.styles = D;
109
+ this.styles = _;
109
110
  }
110
- updateResultPanel(a) {
111
- this.openedResultPanel = a, this.arcgisOpenedResultPanelChange.emit(a);
111
+ loaded() {
112
+ this.openedResultPanel && (this.openedResultPanel === "output" && this.outputRef.value ? this.outputRef.value.setFocus() : this.openedResultPanel === "console" && this.consoleRef.value ? this.consoleRef.value.setFocus() : this.openedResultPanel === "log" && this.logRef.value && this.logRef.value.setFocus());
112
113
  }
113
- _switchResultPanel(a) {
114
- const s = a.currentTarget.dataset.panelName;
114
+ updateResultPanel(l) {
115
+ this.openedResultPanel = l, this.arcgisOpenedResultPanelChange.emit(l);
116
+ }
117
+ _switchResultPanel(l) {
118
+ const s = l.currentTarget.dataset.panelName;
115
119
  s && this.updateResultPanel(s);
116
120
  }
117
121
  _emitClose() {
118
122
  this.arcgisClose.emit();
119
123
  }
120
124
  renderConsolePanel() {
121
- 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>`;
125
+ 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((l) => t`<p>${l}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
122
126
  }
123
127
  renderLogPanel() {
124
128
  if (this.openedResultPanel !== "log")
125
129
  return null;
126
130
  if (this.loading)
127
131
  return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
128
- const a = this.result?.type === "error" ? "color-error" : "color-success";
132
+ const l = this.result?.type === "error" ? "color-error" : "color-success";
129
133
  return t`<calcite-list label=results>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
130
134
  timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
131
135
  dateStyle: "medium",
132
136
  timeStyle: "medium"
133
137
  }).format(this.result.timeStamp)
134
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.compilationtimeformat, {
138
+ })}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.compilationtimeformat, {
135
139
  time: new Intl.NumberFormat(this.messages._t9nLocale, {
136
140
  style: "unit",
137
141
  unit: "millisecond",
138
142
  maximumFractionDigits: 2
139
143
  }).format(this.result.compilationTime ?? 0)
140
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.executiontimeformat, {
144
+ })}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item><calcite-list-item .label=${o(this.messages.executiontimeformat, {
141
145
  time: new Intl.NumberFormat(this.messages._t9nLocale, {
142
146
  style: "unit",
143
147
  unit: "millisecond",
144
148
  maximumFractionDigits: 2
145
149
  }).format(this.result.executionTime ?? 0)
146
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item>` : t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`;
150
+ })}><calcite-icon slot=content-start icon=information scale=s class=${v(l)}></calcite-icon></calcite-list-item>` : t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`;
147
151
  }
148
152
  renderOutputPanel() {
149
153
  if (this.openedResultPanel !== "output")
@@ -165,18 +169,18 @@ class z extends M {
165
169
  return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${p({ arcadeResult: this.result })}</div>`;
166
170
  case "array": {
167
171
  const s = (this.result.value ?? []).slice(0, m);
168
- return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${S({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${T({ items: s, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
172
+ return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${T({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${R({ items: s, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
169
173
  }
170
174
  case "geometry":
171
- return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${w({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
175
+ return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${k({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
172
176
  case "attachment":
173
- return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${x({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
177
+ return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${S({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
174
178
  case "feature":
175
179
  case "dictionary":
176
180
  case "portal":
177
- return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${k({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
181
+ return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${d.onClick}><div class="tree-item-label">${this.result.type}</div>${P({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
178
182
  case "featureSet":
179
- return t`<div class="result-value-table ltr-container">${F({ arcadeResult: this.result, t9nStrings: this.messages })}${_({ arcadeResult: this.result })}</div>`;
183
+ return t`<div class="result-value-table ltr-container">${z({ arcadeResult: this.result, t9nStrings: this.messages })}${N({ arcadeResult: this.result })}</div>`;
180
184
  case "knowledgeGraph":
181
185
  return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;
182
186
  default:
@@ -184,10 +188,10 @@ class z extends M {
184
188
  }
185
189
  }
186
190
  render() {
187
- 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></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></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></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>`;
191
+ 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></calcite-loader>` : t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
188
192
  }
189
193
  }
190
- P("arcgis-arcade-results", z);
194
+ C("arcgis-arcade-results", j);
191
195
  export {
192
- z as ArcgisArcadeResults
196
+ j as ArcgisArcadeResults
193
197
  };
@@ -8,7 +8,7 @@ import { f as b } from "../../chunks/monaco-importer.js";
8
8
  import { u as _ } from "../../chunks/useT9n.js";
9
9
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
10
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
11
- v5.0.0-next.5 */
11
+ v5.0.0-next.7 */
12
12
  function v(o) {
13
13
  return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
14
14
  }
@@ -11,7 +11,7 @@ import { load as I } from "@arcgis/lumina/controllers";
11
11
  import { Range as v, Uri as s, KeyMod as n, KeyCode as r } from "monaco-editor";
12
12
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
13
13
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
14
- v5.0.0-next.5 */
14
+ v5.0.0-next.7 */
15
15
  const M = f`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`, b = {
16
16
  autoIndent: "advanced",
17
17
  automaticLayout: !0,
@@ -7,7 +7,7 @@ import { createFilterExpression as f } from "@arcgis/toolkit/string";
7
7
  import { u as m } from "../../chunks/useT9n.js";
8
8
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
9
9
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
10
- v5.0.0-next.5 */
10
+ v5.0.0-next.7 */
11
11
  const u = n`: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}}`;
12
12
  function g(l) {
13
13
  l.key === "Enter" && l.stopPropagation();
@@ -10,7 +10,7 @@ import { u as v } from "../../chunks/useT9n.js";
10
10
  import { s as d } from "../../chunks/sql-expr-contribution.js";
11
11
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
12
12
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
13
- v5.0.0-next.5 */
13
+ v5.0.0-next.7 */
14
14
  const y = 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-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)}}`;
15
15
  class I extends p {
16
16
  constructor() {
@@ -9,7 +9,7 @@ import { s as f } from "../../chunks/editor.js";
9
9
  import { getSqlExprDiagnosticService as _ } from "../../chunks/sql-expr-mode.js";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
12
- v5.0.0-next.5 */
12
+ v5.0.0-next.7 */
13
13
  const u = n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
14
14
  class m extends c {
15
15
  constructor() {
@@ -6,7 +6,7 @@ import { a as m } from "../../chunks/sql-expr-defaults.js";
6
6
  import { u as d } from "../../chunks/useT9n.js";
7
7
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
8
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
9
- v5.0.0-next.5 */
9
+ v5.0.0-next.7 */
10
10
  const h = r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
11
11
  class g extends n {
12
12
  constructor() {
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-09-30T04:36:40",
2
+ "timestamp": "2025-10-02T04:39:52",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.5",
5
+ "version": "5.0.0-next.7",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "schemaVersion": "1.0.0",
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-09-30T04:36:40",
2
+ "timestamp": "2025-10-02T04:39:52",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.5",
5
+ "version": "5.0.0-next.7",
6
6
  "typescriptVersion": "5.8.3"
7
7
  },
8
8
  "components": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@arcgis/coding-components",
4
- "version": "5.0.0-next.5",
4
+ "version": "5.0.0-next.7",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
3
3
  import { s as p } from "./chunks/sql-expr-defaults.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
6
- v5.0.0-next.5 */
6
+ v5.0.0-next.7 */
7
7
  const a = s, r = t;
8
8
  export {
9
9
  c as arcade,
package/dist/loader.js CHANGED
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
2
2
  import { makeDefineCustomElements as s } from "@arcgis/lumina";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.5 */
5
+ v5.0.0-next.7 */
6
6
  const a = s(e, {
7
7
  "arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
8
8
  "arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.5 */
3
+ v5.0.0-next.7 */
4
4
  const A = `/*!-----------------------------------------------------------
5
5
  * Copyright (c) Microsoft Corporation. All rights reserved.
6
6
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "5.0.0-next.5",
3
+ "version": "5.0.0-next.7",
4
4
  "description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -42,10 +42,10 @@
42
42
  ],
43
43
  "license": "SEE LICENSE IN LICENSE.md",
44
44
  "dependencies": {
45
- "@arcgis/arcade-languageservice": "5.0.0-next.5",
46
- "@arcgis/languages-api-utils": "5.0.0-next.5",
47
- "@arcgis/lumina": "5.0.0-next.5",
48
- "@arcgis/toolkit": "5.0.0-next.5",
45
+ "@arcgis/arcade-languageservice": "5.0.0-next.7",
46
+ "@arcgis/languages-api-utils": "5.0.0-next.7",
47
+ "@arcgis/lumina": "5.0.0-next.7",
48
+ "@arcgis/toolkit": "5.0.0-next.7",
49
49
  "lit": "^3.3.0",
50
50
  "monaco-editor": "^0.52.0",
51
51
  "tslib": "^2.8.1",
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.5 */
4
- import c from"./FLEFZMEN.js";import"./NDMAYD3J.js";import b from"./CWCTAOE7.js";import a from"./QQGHNCZV.js";import"./V3DAEKYH.js";import"./PQRNBT2L.js";import"./LWHBPD5K.js";import"./42RKATY7.js";import"./AUQALXQ2.js";import"./UZA4LBO4.js";import"./CWTZWI2W.js";import"./GG5JKCNX.js";import"./Z4RFJZDX.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.5 */
4
- import a from"./I6XB5IG5.js";import{a as R}from"./IA5NXCCG.js";import"./V6S4B3SW.js";import"./V3DAEKYH.js";import{d as T}from"./PQRNBT2L.js";import"./AUQALXQ2.js";import{A as m,B as b,D as k,g as S,h as t,l as h,z as w}from"./UZA4LBO4.js";import{d as u,h as r}from"./CWTZWI2W.js";import"./Z4RFJZDX.js";export default $arcgis.t(([{b:o,c:f,d:p,e:P,f:C,g:M}])=>{var j=S`: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={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},v={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`,L=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??b} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,O=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??b} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,$=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${u(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${P(e)}</span>`;case"dateOnly":return t`<span class="string-value">${u(C(e))}</span>`;case"time":return t`<span class="string-value">${u(M(e))}</span>`;default:return null}},_=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},F=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let d=p(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&d.type==="geometry"?null:x({arcadeResult:d,name:i,t9nStrings:s})})}${c?x({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},z=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=f?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:f.toString()})}</span>`:null}</div>`,I=({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((c,i)=>{let d=p(c);return x({arcadeResult:d,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,x=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${$({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${v.onClick}><div class="tree-item-label">${n({name:a})}${_({arcadeResult:e,t9nStrings:c})}</div>${I({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${v.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${O({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${v.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${L({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${v.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${F({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},D=({arcadeResult:e})=>{let a=T(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=p(s.field(c.name));return t`<td>${$({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`},g={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},y=class extends w{constructor(){super(...arguments),this.messages=R(),this.openedResultPanel="output",this.arcgisClose=h({bubbles:!1}),this.arcgisOpenedResultPanelChange=h({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=j}updateResultPanel(a){this.openedResultPanel=a,this.arcgisOpenedResultPanelChange.emit(a)}_switchResultPanel(a){let s=a.currentTarget.dataset.panelName;s&&this.updateResultPanel(s)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){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>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let a=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${r(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${m(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${m(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${m(a)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${r(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${$({arcadeResult:this.result})}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${$({arcadeResult:this.result})}</div>`;case"array":{let a=(this.result.value??[]).slice(0,o);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${g.onClick}><div class="tree-item-label">${_({arcadeResult:this.result,t9nStrings:this.messages})}</div>${I({items:a,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${g.onClick}><div class="tree-item-label">${this.result.type}</div>${O({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${g.onClick}><div class="tree-item-label">${this.result.type}</div>${L({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${g.onClick}><div class="tree-item-label">${this.result.type}</div>${F({value:this.result.value,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${z({arcadeResult:this.result,t9nStrings:this.messages})}${D({arcadeResult:this.result})}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}render(){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></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></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></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>`}};k("arcgis-arcade-results",y);return y},a)