@arcgis/coding-components 4.33.0-next.107 → 4.33.0-next.109

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 (126) hide show
  1. package/dist/arcgis-coding-components/{XDIOX4GW.js → 3Y2627CP.js} +2 -2
  2. package/dist/arcgis-coding-components/4A3KCIXJ.js +4 -0
  3. package/dist/arcgis-coding-components/{3TUUDQHY.js → 4SUM77G6.js} +1 -1
  4. package/dist/arcgis-coding-components/{C4YL3G53.js → 5GXT7DJI.js} +2 -2
  5. package/dist/arcgis-coding-components/{T5ULTETY.js → 5OWQWSH2.js} +2 -2
  6. package/dist/arcgis-coding-components/{GSWETX5W.js → 5RHYT4EO.js} +2 -2
  7. package/dist/arcgis-coding-components/7FZREYXQ.js +4 -0
  8. package/dist/arcgis-coding-components/{VKHQY3TH.js → A7YPVNT3.js} +2 -2
  9. package/dist/arcgis-coding-components/{GY7EJG2G.js → ASUGUWIA.js} +2 -2
  10. package/dist/arcgis-coding-components/{JJ6GJDDT.js → CAF3USPW.js} +2 -2
  11. package/dist/arcgis-coding-components/{EISSQJVY.js → CBXJNCJJ.js} +2 -2
  12. package/dist/arcgis-coding-components/{JQ7VSS7H.js → CHNBIC2D.js} +2 -2
  13. package/dist/arcgis-coding-components/{PETPJYNV.js → CJPSVHWK.js} +1 -1
  14. package/dist/arcgis-coding-components/{2BE6FSTL.js → CJUW3OWD.js} +1 -1
  15. package/dist/arcgis-coding-components/{ZYEZKXQB.js → CQW3LRXV.js} +2 -2
  16. package/dist/arcgis-coding-components/{T26N7WLN.js → DD7AXDL6.js} +2 -2
  17. package/dist/arcgis-coding-components/DI6P2I7I.js +4 -0
  18. package/dist/arcgis-coding-components/{4CRKFUC4.js → DZ4GBFBV.js} +3 -3
  19. package/dist/arcgis-coding-components/F42UBPX3.js +4 -0
  20. package/dist/arcgis-coding-components/{CD7HMMHG.js → FIAZXQHO.js} +2 -2
  21. package/dist/arcgis-coding-components/{O2TMVMMV.js → HN74GEMZ.js} +2 -2
  22. package/dist/arcgis-coding-components/{7B2PAKIN.js → IGSRT6OY.js} +2 -2
  23. package/dist/arcgis-coding-components/{22CFXJJM.js.LEGAL.txt → JGYVWIOL.js} +2 -1
  24. package/dist/arcgis-coding-components/{UNE6OS2T.js → JQZ3ODVW.js} +3 -3
  25. package/dist/arcgis-coding-components/{N5IQK7RB.js → LCQ5LRWZ.js} +2 -2
  26. package/dist/arcgis-coding-components/{R65CIUFJ.js → LDIBFNEC.js} +1 -1
  27. package/dist/arcgis-coding-components/{CO3ZPGMS.js → LIXQY7SR.js} +2 -2
  28. package/dist/arcgis-coding-components/{KBPOBK72.js → MAMMTDKU.js} +2 -2
  29. package/dist/arcgis-coding-components/{APQOFW32.js → O7XUDENI.js} +2 -2
  30. package/dist/arcgis-coding-components/{H2ZLUPXB.js → QCHXYFBQ.js} +2 -2
  31. package/dist/arcgis-coding-components/{7CPSRGTI.js → QJDMPVG5.js} +2 -2
  32. package/dist/arcgis-coding-components/{MQTJI42N.js → RFKIPQPL.js} +2 -2
  33. package/dist/arcgis-coding-components/SZRBHPBE.js +4 -0
  34. package/dist/arcgis-coding-components/TQ5ZBIWK.js +4 -0
  35. package/dist/arcgis-coding-components/{QX5I6NKV.js → TRO4CFSW.js} +2 -2
  36. package/dist/arcgis-coding-components/{SUVWM53R.js → U4U7ILCC.js} +2 -2
  37. package/dist/arcgis-coding-components/{VEEPHGJL.js → WZOYYLIE.js} +2 -2
  38. package/dist/arcgis-coding-components/{22CFXJJM.js → XGDCD4ZA.js} +2 -2
  39. package/dist/arcgis-coding-components/{HBRSHYP6.js → YGTVYPV4.js} +3 -3
  40. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  41. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +39 -39
  42. package/dist/chunks/arcade-defaults.js +1 -1
  43. package/dist/chunks/arcade-executor.js +1 -1
  44. package/dist/chunks/arcade-mode.js +1 -1
  45. package/dist/chunks/arcade-service-accessors.js +1 -1
  46. package/dist/chunks/fields.js +1 -1
  47. package/dist/chunks/language-defaults-base.js +1 -1
  48. package/dist/chunks/markdown.js +1 -1
  49. package/dist/chunks/monaco-importer.js +1 -1
  50. package/dist/chunks/runtime.js +1 -1
  51. package/dist/chunks/setup-monaco.js +1 -1
  52. package/dist/chunks/sql-expr-contribution.js +1 -1
  53. package/dist/chunks/sql-expr-defaults.js +1 -1
  54. package/dist/chunks/sql-expr-mode.js +1 -1
  55. package/dist/chunks/useT9n.js +1 -1
  56. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  57. package/dist/components/arcgis-arcade-editor/customElement.js +39 -45
  58. package/dist/components/arcgis-arcade-results/customElement.js +109 -120
  59. package/dist/components/arcgis-arcade-results/functional.d.ts +73 -0
  60. package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +2 -0
  61. package/dist/components/arcgis-arcade-suggestions/customElement.js +4 -4
  62. package/dist/components/arcgis-code-editor/customElement.js +2 -2
  63. package/dist/components/arcgis-editor-variables/customElement.d.ts +2 -0
  64. package/dist/components/arcgis-editor-variables/customElement.js +7 -7
  65. package/dist/components/arcgis-language-api-panel/customElement.d.ts +2 -0
  66. package/dist/components/arcgis-language-api-panel/customElement.js +12 -10
  67. package/dist/components/arcgis-sql-expression-editor/customElement.js +12 -12
  68. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  69. package/dist/docs/api.json +3 -3
  70. package/dist/docs/docs.json +5 -5
  71. package/dist/docs/web-types.json +2 -2
  72. package/dist/index.js +1 -1
  73. package/dist/loader.js +4 -4
  74. package/dist/utils/arcade-executor.d.ts +4 -0
  75. package/dist/utils/custom-panel.d.ts +2 -1
  76. package/package.json +6 -6
  77. package/dist/arcgis-coding-components/2BE6FSTL.js.LEGAL.txt +0 -0
  78. package/dist/arcgis-coding-components/3TUUDQHY.js.LEGAL.txt +0 -0
  79. package/dist/arcgis-coding-components/4CRKFUC4.js.LEGAL.txt +0 -3
  80. package/dist/arcgis-coding-components/7B2PAKIN.js.LEGAL.txt +0 -3
  81. package/dist/arcgis-coding-components/7CPSRGTI.js.LEGAL.txt +0 -9
  82. package/dist/arcgis-coding-components/APQOFW32.js.LEGAL.txt +0 -9
  83. package/dist/arcgis-coding-components/ARPNRPTX.js +0 -4
  84. package/dist/arcgis-coding-components/ARPNRPTX.js.LEGAL.txt +0 -3
  85. package/dist/arcgis-coding-components/C4YL3G53.js.LEGAL.txt +0 -9
  86. package/dist/arcgis-coding-components/CD7HMMHG.js.LEGAL.txt +0 -9
  87. package/dist/arcgis-coding-components/CGXSA5HM.js +0 -4
  88. package/dist/arcgis-coding-components/CGXSA5HM.js.LEGAL.txt +0 -3
  89. package/dist/arcgis-coding-components/CO3ZPGMS.js.LEGAL.txt +0 -9
  90. package/dist/arcgis-coding-components/EISSQJVY.js.LEGAL.txt +0 -4
  91. package/dist/arcgis-coding-components/GSWETX5W.js.LEGAL.txt +0 -3
  92. package/dist/arcgis-coding-components/GY7EJG2G.js.LEGAL.txt +0 -3
  93. package/dist/arcgis-coding-components/H2ZLUPXB.js.LEGAL.txt +0 -3
  94. package/dist/arcgis-coding-components/HBRSHYP6.js.LEGAL.txt +0 -69
  95. package/dist/arcgis-coding-components/JJ6GJDDT.js.LEGAL.txt +0 -145
  96. package/dist/arcgis-coding-components/JQ7VSS7H.js.LEGAL.txt +0 -15
  97. package/dist/arcgis-coding-components/KBPOBK72.js.LEGAL.txt +0 -3
  98. package/dist/arcgis-coding-components/MQTJI42N.js.LEGAL.txt +0 -9
  99. package/dist/arcgis-coding-components/N5IQK7RB.js.LEGAL.txt +0 -3
  100. package/dist/arcgis-coding-components/NSLPKDYP.css.LEGAL.txt +0 -0
  101. package/dist/arcgis-coding-components/O2TMVMMV.js.LEGAL.txt +0 -0
  102. package/dist/arcgis-coding-components/OPTRUP6P.js +0 -4
  103. package/dist/arcgis-coding-components/OPTRUP6P.js.LEGAL.txt +0 -0
  104. package/dist/arcgis-coding-components/PETPJYNV.js.LEGAL.txt +0 -0
  105. package/dist/arcgis-coding-components/QJN5BRFC.css.LEGAL.txt +0 -0
  106. package/dist/arcgis-coding-components/QX5I6NKV.js.LEGAL.txt +0 -3
  107. package/dist/arcgis-coding-components/R65CIUFJ.js.LEGAL.txt +0 -3
  108. package/dist/arcgis-coding-components/R6Z5J4HN.js +0 -4
  109. package/dist/arcgis-coding-components/R6Z5J4HN.js.LEGAL.txt +0 -3
  110. package/dist/arcgis-coding-components/SUVWM53R.js.LEGAL.txt +0 -3
  111. package/dist/arcgis-coding-components/T26N7WLN.js.LEGAL.txt +0 -9
  112. package/dist/arcgis-coding-components/T5ULTETY.js.LEGAL.txt +0 -12
  113. package/dist/arcgis-coding-components/UNE6OS2T.js.LEGAL.txt +0 -3
  114. package/dist/arcgis-coding-components/V7PQEVV2.js +0 -4
  115. package/dist/arcgis-coding-components/V7PQEVV2.js.LEGAL.txt +0 -3
  116. package/dist/arcgis-coding-components/VEEPHGJL.js.LEGAL.txt +0 -9
  117. package/dist/arcgis-coding-components/VKHQY3TH.js.LEGAL.txt +0 -9
  118. package/dist/arcgis-coding-components/VTPAFXWN.js +0 -4
  119. package/dist/arcgis-coding-components/VTPAFXWN.js.LEGAL.txt +0 -3
  120. package/dist/arcgis-coding-components/XDIOX4GW.js.LEGAL.txt +0 -0
  121. package/dist/arcgis-coding-components/YVACEAOH.js +0 -4
  122. package/dist/arcgis-coding-components/YVACEAOH.js.LEGAL.txt +0 -3
  123. package/dist/arcgis-coding-components/ZYEZKXQB.js.LEGAL.txt +0 -3
  124. package/dist/arcgis-coding-components/arcgis-coding-components.esm.css.LEGAL.txt +0 -0
  125. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +0 -3
  126. /package/dist/arcgis-coding-components/{arcgis-coding-components.esm.css → stdin.css} +0 -0
@@ -1,84 +1,120 @@
1
- import { c as x } from "../../chunks/runtime.js";
2
- import { html as e } from "lit-html";
3
- import { LitElement as w, createEvent as $, safeClassMap as v, nothing as p } from "@arcgis/lumina";
4
- import { setValuesInString as d, quoteString as h } from "@arcgis/components-utils";
5
- import { M as u, v as g, B as f, f as T, a as S, b as k } from "../../chunks/arcade-executor.js";
6
- import { s as P } from "../../chunks/fields.js";
7
- import { u as C } from "../../chunks/useT9n.js";
8
- import { css as M } from "@lit/reactive-element/css-tag.js";
1
+ import { c as P } from "../../chunks/runtime.js";
2
+ import { html as t } from "lit-html";
3
+ import { nothing as y, LitElement as C, createEvent as f, safeClassMap as v } from "@arcgis/lumina";
4
+ import { setValuesInString as o, quoteString as g } from "@arcgis/components-utils";
5
+ import { B as b, v as h, M as m, f as M, a as R, b as A } from "../../chunks/arcade-executor.js";
6
+ import { u as I } from "../../chunks/useT9n.js";
7
+ import { css as L } from "@lit/reactive-element/css-tag.js";
8
+ import { s as O } from "../../chunks/fields.js";
9
9
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
10
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
11
- v4.33.0-next.107 */
12
- const A = 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 = {
11
+ v4.33.0-next.109 */
12
+ const D = L`: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 = {
13
13
  lines: !0,
14
14
  selectionMode: "none",
15
15
  scale: "s",
16
- oncalciteTreeSelect: (l) => l.currentTarget.selectedItems.forEach((t) => t.selected = !1)
17
- }, c = {
18
- onClick: (l) => {
19
- const t = l.currentTarget;
20
- t.expanded = !t.expanded;
21
- }
22
- };
23
- function n(l) {
24
- return e`<span class="dictionary-property">${l}</span><span>:&nbsp;</span>`;
25
- }
26
- function b(l, t = !1) {
27
- return e`<calcite-tree slot=${(t ? "children" : void 0) ?? p} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(l.castAsJson(), void 0, 2)}</calcite-tree-item></calcite-tree>`;
28
- }
29
- function y(l, t = !1) {
30
- return e`<calcite-tree slot=${(t ? "children" : void 0) ?? p} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n("type")}${l.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n("value")}<span class="string-value">${JSON.stringify(l, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`;
31
- }
32
- function m(l) {
33
- switch (l.type) {
16
+ oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((a) => a.selected = !1)
17
+ }, u = {
18
+ onClick: (e) => {
19
+ const a = e.currentTarget;
20
+ a.expanded = !a.expanded;
21
+ }
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
+ switch (e.type) {
34
24
  case "unknown":
35
25
  case "null":
36
- return e`<span class="constant-value">${l.type}</span>`;
26
+ return t`<span class="constant-value">${e.type}</span>`;
37
27
  case "text":
38
- return e`<span class="string-value">${h(l.value)}</span>`;
28
+ return t`<span class="string-value">${g(e.value)}</span>`;
39
29
  case "number":
40
- return e`<span class="number-value">${l.value.toString()}</span>`;
30
+ return t`<span class="number-value">${e.value.toString()}</span>`;
41
31
  case "boolean":
42
- return e`<span class="constant-value">${l.value.toString()}</span>`;
32
+ return t`<span class="constant-value">${e.value.toString()}</span>`;
43
33
  case "date":
44
- return e`<span class="date-value">${k(l)}</span>`;
34
+ return t`<span class="date-value">${A(e)}</span>`;
45
35
  case "dateOnly":
46
- return e`<span class="string-value">${h(S(l))}</span>`;
36
+ return t`<span class="string-value">${g(R(e))}</span>`;
47
37
  case "time":
48
- return e`<span class="string-value">${h(T(l))}</span>`;
38
+ return t`<span class="string-value">${g(M(e))}</span>`;
49
39
  default:
50
40
  return null;
51
41
  }
52
- }
53
- function I(l) {
54
- const t = P(l.value.fields);
55
- return e`<table><thead><tr>${t.map((i) => e`<th>${i.name}</th>`)}</tr></thead><tbody>${l.features.map((i) => e`<tr>${t.map((s) => {
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, {
45
+ count: m.toString()
46
+ })}</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: !1, t9nStrings: s });
58
+ })}</calcite-tree>`, $ = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: c }) => {
59
+ switch (e.type) {
60
+ case "null":
61
+ case "unknown":
62
+ case "text":
63
+ case "number":
64
+ case "date":
65
+ case "dateOnly":
66
+ case "time":
67
+ case "boolean":
68
+ return t`<calcite-tree-item><div class="tree-item-label">${r({ name: a })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
69
+ case "array": {
70
+ 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
+ }
73
+ 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
+ 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
+ case "feature":
78
+ case "dictionary":
79
+ 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
+ default:
82
+ return null;
83
+ }
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) => {
56
87
  try {
57
- const r = g(i.field(s.name));
58
- return e`<td>${m(r)}</td>`;
88
+ const i = h(s.field(c.name));
89
+ return t`<td>${p({ arcadeResult: i })}</td>`;
59
90
  } catch {
60
- return e`<td></td>`;
91
+ return t`<td></td>`;
61
92
  }
62
93
  })}</tr>`)}</tbody></table>`;
63
- }
64
- class L extends w {
94
+ }, d = {
95
+ onClick: (e) => {
96
+ const a = e.currentTarget;
97
+ a.expanded = !a.expanded;
98
+ }
99
+ };
100
+ class z extends C {
65
101
  constructor() {
66
- super(...arguments), this.messages = C(), this.openedResultPanel = "output", this.arcgisClose = $({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = $({ bubbles: !1 });
102
+ super(...arguments), this.messages = I(), this.openedResultPanel = "output", this.arcgisClose = f({ bubbles: !1 }), this.arcgisOpenedResultPanelChange = f({ bubbles: !1 });
67
103
  }
68
104
  static {
69
105
  this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
70
106
  }
71
107
  static {
72
- this.styles = A;
108
+ this.styles = D;
73
109
  }
74
110
  //#endregion
75
111
  //#region Private Methods
76
- updateResultPanel(t) {
77
- this.openedResultPanel = t, this.arcgisOpenedResultPanelChange.emit(t);
112
+ updateResultPanel(a) {
113
+ this.openedResultPanel = a, this.arcgisOpenedResultPanelChange.emit(a);
78
114
  }
79
- _switchResultPanel(t) {
80
- const i = t.currentTarget.dataset.panelName;
81
- i && this.updateResultPanel(i);
115
+ _switchResultPanel(a) {
116
+ const s = a.currentTarget.dataset.panelName;
117
+ s && this.updateResultPanel(s);
82
118
  }
83
119
  _emitClose() {
84
120
  this.arcgisClose.emit();
@@ -86,123 +122,76 @@ class L extends w {
86
122
  //#endregion
87
123
  //#region Rendering
88
124
  renderConsolePanel() {
89
- return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate label></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>`;
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((a) => t`<p>${a}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
90
126
  }
91
127
  renderLogPanel() {
92
128
  if (this.openedResultPanel !== "log")
93
129
  return null;
94
130
  if (this.loading)
95
- return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
96
- const t = this.result?.type === "error" ? "color-error" : "color-success";
97
- return e`<calcite-list label=results>${this.result ? e`<calcite-list-item .label=${d(this.messages.lastexecutionformat, {
131
+ return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
132
+ const a = this.result?.type === "error" ? "color-error" : "color-success";
133
+ return t`<calcite-list label=results>${this.result ? t`<calcite-list-item .label=${o(this.messages.lastexecutionformat, {
98
134
  timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
99
135
  dateStyle: "medium",
100
136
  timeStyle: "medium"
101
137
  }).format(this.result.timeStamp)
102
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${d(this.messages.compilationtimeformat, {
138
+ })}><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, {
103
139
  time: new Intl.NumberFormat(this.messages._t9nLocale, {
104
140
  style: "unit",
105
141
  unit: "millisecond",
106
142
  maximumFractionDigits: 2
107
143
  }).format(this.result.compilationTime ?? 0)
108
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${d(this.messages.executiontimeformat, {
144
+ })}><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, {
109
145
  time: new Intl.NumberFormat(this.messages._t9nLocale, {
110
146
  style: "unit",
111
147
  unit: "millisecond",
112
148
  maximumFractionDigits: 2
113
149
  }).format(this.result.executionTime ?? 0)
114
- })}><calcite-icon slot=content-start icon=information scale=s class=${v(t)}></calcite-icon></calcite-list-item>` : e`<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(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>`;
115
151
  }
116
152
  renderOutputPanel() {
117
153
  if (this.openedResultPanel !== "output")
118
154
  return null;
119
155
  if (this.loading)
120
- return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
156
+ return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;
121
157
  switch (this.result?.type) {
122
158
  case "error":
123
- return e`<div class="result-value-simple flex-adjustable">${d(this.messages.executionerrorformat, { message: this.result.value })}</div>`;
159
+ return t`<div class="result-value-simple flex-adjustable">${o(this.messages.executionerrorformat, { message: this.result.value })}</div>`;
124
160
  case "null":
125
161
  case "unknown":
126
- return e`<div class="result-value-simple ltr-container">${m(this.result)}</div>`;
162
+ return t`<div class="result-value-simple ltr-container">${p({ arcadeResult: this.result })}</div>`;
127
163
  case "text":
128
164
  case "number":
129
165
  case "date":
130
166
  case "dateOnly":
131
167
  case "time":
132
168
  case "boolean":
133
- return e`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${m(this.result)}</div>`;
169
+ return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${p({ arcadeResult: this.result })}</div>`;
134
170
  case "array": {
135
- const i = (this.result.value ?? []).slice(0, u);
136
- return e`<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=${c.onClick}><div class="tree-item-label">${this.renderArrayHeader(this.result)}</div>${this.renderArrayTree(i, !0)}</calcite-tree-item></calcite-tree></div>`;
171
+ const s = (this.result.value ?? []).slice(0, m);
172
+ 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>`;
137
173
  }
138
174
  case "geometry":
139
- return e`<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=${c.onClick}><div class="tree-item-label">${this.result.type}</div>${y(this.result.value, !0)}</calcite-tree-item></calcite-tree></div>`;
175
+ 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>`;
140
176
  case "attachment":
141
- return e`<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=${c.onClick}><div class="tree-item-label">${this.result.type}</div>${b(this.result.value, !0)}</calcite-tree-item></calcite-tree></div>`;
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>${x({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
142
178
  case "feature":
143
179
  case "dictionary":
144
180
  case "portal":
145
- return e`<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=${c.onClick}><div class="tree-item-label">${this.result.type}</div>${this.renderDictionaryTree(this.result.value, !0)}</calcite-tree-item></calcite-tree></div>`;
181
+ 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>`;
146
182
  case "featureSet":
147
- return e`<div class="result-value-table ltr-container">${this.renderFeatureSetLabel(this.result)}${I(this.result)}</div>`;
183
+ return t`<div class="result-value-table ltr-container">${F({ arcadeResult: this.result, t9nStrings: this.messages })}${_({ arcadeResult: this.result })}</div>`;
148
184
  case "knowledgeGraph":
149
- return e`<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>`;
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>`;
150
186
  default:
151
- return e`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`;
187
+ return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`;
152
188
  }
153
189
  }
154
- renderArrayHeader(t) {
155
- const i = t.value ?? [], s = Math.max(i.length - u, 0);
156
- return e`<span>${`${t.type}(${i.length ?? 0})`}</span>${s > 0 ? e`<span>&nbsp;${d(this.messages.showingfirstitemsformat, { count: u.toString() })}</span>` : null}`;
157
- }
158
- renderArrayTree(t, i = !1) {
159
- return e`<calcite-tree slot=${(i ? "children" : void 0) ?? p} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.map((s, r) => {
160
- const o = g(s);
161
- return this.renderTreeItem(o, r, !i);
162
- })}</calcite-tree>`;
163
- }
164
- renderDictionaryTree(t, i = !1) {
165
- const s = t.geometry?.();
166
- return e`<calcite-tree slot=${(i ? "children" : void 0) ?? p} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.keys().map((r) => {
167
- const o = g(t.field(r));
168
- return t.arcadeDeclaredClass === "esri.arcade.Feature" && o.type === "geometry" ? null : this.renderTreeItem(o, r);
169
- })}${s ? this.renderTreeItem({ type: "geometry", value: s }, "geometry") : null}</calcite-tree>`;
170
- }
171
- renderTreeItem(t, i, s = !1) {
172
- switch (t.type) {
173
- case "null":
174
- case "unknown":
175
- case "text":
176
- case "number":
177
- case "date":
178
- case "dateOnly":
179
- case "time":
180
- case "boolean":
181
- return e`<calcite-tree-item><div class="tree-item-label">${n(i)}${m(t)}</div></calcite-tree-item>`;
182
- case "array": {
183
- const o = (t.value ?? []).slice(0, u);
184
- return e`<calcite-tree-item .expanded=${s} @click=${c.onClick}><div class="tree-item-label">${n(i)}${this.renderArrayHeader(t)}</div>${this.renderArrayTree(o, !0)}</calcite-tree-item>`;
185
- }
186
- case "geometry":
187
- return e`<calcite-tree-item .expanded=${s} @click=${c.onClick}><div class="tree-item-label">${n(i)}<span>${t.type}</span></div>${y(t.value, !0)}</calcite-tree-item>`;
188
- case "attachment":
189
- return e`<calcite-tree-item .expanded=${s} @click=${c.onClick}><div class="tree-item-label">${n(i)}<span>${t.type}</span></div>${b(t.value, !0)}</calcite-tree-item>`;
190
- case "feature":
191
- case "dictionary":
192
- case "portal":
193
- return e`<calcite-tree-item .expanded=${s} @click=${c.onClick}><div class="tree-item-label">${n(i)}<span>${t.type}</span></div>${this.renderDictionaryTree(t.value, !0)}</calcite-tree-item>`;
194
- default:
195
- return null;
196
- }
197
- }
198
- renderFeatureSetLabel(t) {
199
- return e`<div class="value-type"><span>${t.type}:</span>${t.features.length >= f ? e`<span>&nbsp;${d(this.messages.showingfirstitemsformat, { count: f.toString() })}</span>` : null}</div>`;
200
- }
201
190
  render() {
202
- return 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></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 ? e`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : e`<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></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>`;
203
192
  }
204
193
  }
205
- x("arcgis-arcade-results", L);
194
+ P("arcgis-arcade-results", z);
206
195
  export {
207
- L as ArcgisArcadeResults
196
+ z as ArcgisArcadeResults
208
197
  };
@@ -0,0 +1,73 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ import { h, JsxNode } from '@arcgis/lumina';
3
+ import { IArcadeResultArray, IArcadeResultFeatureSet, ArcadeResult, IArcadeRuntimeDictionary } from '../../utils';
4
+ declare const strings: (value: {
5
+ close: string;
6
+ console: string;
7
+ output: string;
8
+ log: string;
9
+ consolemessage: string;
10
+ lastexecutionformat: string;
11
+ compilationtimeformat: string;
12
+ executiontimeformat: string;
13
+ runscriptmessage: string;
14
+ showingfirstitemsformat: string;
15
+ executionerrorformat: string;
16
+ }) => {
17
+ close: string;
18
+ console: string;
19
+ output: string;
20
+ log: string;
21
+ consolemessage: string;
22
+ lastexecutionformat: string;
23
+ compilationtimeformat: string;
24
+ executiontimeformat: string;
25
+ runscriptmessage: string;
26
+ showingfirstitemsformat: string;
27
+ executionerrorformat: string;
28
+ };
29
+ export declare const treeProps: h.JSX.IntrinsicElements["calcite-tree"];
30
+ export declare const DictionaryProperty: ({ name }: {
31
+ name: number | string;
32
+ }) => JsxNode;
33
+ export declare const DictionaryAsJsonTree: ({ value, subtree, }: {
34
+ value: IArcadeRuntimeDictionary;
35
+ subtree?: boolean;
36
+ }) => JsxNode;
37
+ export declare const GeometryTree: ({ value, subtree }: {
38
+ value: __esri.Geometry;
39
+ subtree?: boolean;
40
+ }) => JsxNode;
41
+ export declare const SimpleValue: ({ arcadeResult }: {
42
+ arcadeResult: ArcadeResult;
43
+ }) => JsxNode;
44
+ export declare const ArrayHeader: ({ arcadeResult, t9nStrings, }: {
45
+ arcadeResult: IArcadeResultArray;
46
+ t9nStrings: Partial<ReturnType<typeof strings>>;
47
+ }) => JsxNode;
48
+ export declare const DictionaryTree: ({ value, subtree, t9nStrings, }: {
49
+ value: IArcadeRuntimeDictionary;
50
+ t9nStrings: Partial<ReturnType<typeof strings>>;
51
+ subtree?: boolean;
52
+ }) => JsxNode;
53
+ export declare const FeatureSetLabel: ({ arcadeResult, t9nStrings, }: {
54
+ arcadeResult: IArcadeResultFeatureSet;
55
+ t9nStrings: Partial<ReturnType<typeof strings>>;
56
+ }) => JsxNode;
57
+ export declare const ArrayTree: ({ items, subtree, t9nStrings, }: {
58
+ items: unknown[];
59
+ subtree?: boolean;
60
+ t9nStrings: Partial<ReturnType<typeof strings>>;
61
+ }) => JsxNode;
62
+ export declare const FeatureSetTable: ({ arcadeResult }: {
63
+ arcadeResult: IArcadeResultFeatureSet;
64
+ }) => JsxNode;
65
+ export declare const exportsForTests: {
66
+ TreeItem: ({ arcadeResult, name, expanded, t9nStrings, }: {
67
+ arcadeResult: ArcadeResult;
68
+ name: number | string;
69
+ t9nStrings: Partial<ReturnType<typeof strings>>;
70
+ expanded?: boolean;
71
+ }) => JsxNode;
72
+ };
73
+ export {};
@@ -7,6 +7,8 @@ import { IEditorCodeSuggestion, IEditorCodeSuggestionGroup } from '../../utils/e
7
7
  export declare class ArcgisArcadeSuggestions extends LitElement {
8
8
  /** The collection of suggestions */
9
9
  suggestions: IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined;
10
+ /** When true, the component will be hidden. */
11
+ closed?: boolean | undefined;
10
12
  /** Raised when close action has been activated */
11
13
  readonly arcgisClose: TargetedEvent<this, void>;
12
14
  /** Raised when an item has been selected */
@@ -9,7 +9,7 @@ import { u as b } from "../../chunks/useT9n.js";
9
9
  import { css as _ } from "@lit/reactive-element/css-tag.js";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
12
- v4.33.0-next.107 */
12
+ v4.33.0-next.109 */
13
13
  function v(o) {
14
14
  return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
15
15
  }
@@ -18,10 +18,10 @@ class $ extends u {
18
18
  constructor() {
19
19
  super(...arguments), this._beforeBack = async () => {
20
20
  this._selectedSuggestion = void 0;
21
- }, this.messages = b(), this._colorizeStyle = "", this._filterValue = "", this.arcgisClose = r({ bubbles: !1 }), this.arcgisItemSelected = r({ bubbles: !1 });
21
+ }, this.messages = b(), this._colorizeStyle = "", this._filterValue = "", this.closed = !1, this.arcgisClose = r({ bubbles: !1 }), this.arcgisItemSelected = r({ bubbles: !1 });
22
22
  }
23
23
  static {
24
- this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedSuggestion: 16, suggestions: 0 };
24
+ this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedSuggestion: 16, suggestions: 0, closed: 5 };
25
25
  }
26
26
  static {
27
27
  this.styles = S;
@@ -80,7 +80,7 @@ class $ extends u {
80
80
  return e ? s`<calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(t) => this._emitItemSelected(t, e)} data-item=${e ?? c} ${l(g)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${f(e.documentation) ?? ""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>` : null;
81
81
  }
82
82
  render() {
83
- return s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
83
+ return this.closed ? null : s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`;
84
84
  }
85
85
  }
86
86
  n("arcgis-arcade-suggestions", $);