@arcgis/coding-components 5.1.0-next.87 → 5.1.0-next.89
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.
- package/dist/cdn/3VRELPEF.js +2 -0
- package/dist/cdn/4B64NBIM.js +2 -0
- package/dist/cdn/5DAIGIIS.js +2 -0
- package/dist/cdn/6EKA3H3N.js +2 -0
- package/dist/cdn/6G5URSC7.js +2 -0
- package/dist/cdn/{BVNLUX5A.js → 6HL5GBWZ.js} +1 -1
- package/dist/cdn/7B33SKQD.js +2 -0
- package/dist/cdn/{GJMI6M3I.js → BA546EMZ.js} +1 -1
- package/dist/cdn/{2PRSVBDA.js → BKBBI4SA.js} +1 -1
- package/dist/cdn/BQISDYES.js +2 -0
- package/dist/cdn/E3TJIEWT.js +2 -0
- package/dist/cdn/FEYQMPLI.js +2 -0
- package/dist/cdn/GLJQQLP2.js +2 -0
- package/dist/cdn/{4I7VT4LW.js → I22MLDO4.js} +1 -1
- package/dist/cdn/ID3QICBM.js +4 -0
- package/dist/cdn/IIER7Z56.js +2 -0
- package/dist/cdn/{LWXQURWG.js → ILQJDTTW.js} +1 -1
- package/dist/cdn/JIBWBXDI.js +3 -0
- package/dist/cdn/{KEROXLGY.js → JT3FBAVQ.js} +1 -1
- package/dist/cdn/KA5TX72B.js +64 -0
- package/dist/cdn/MC6EICRD.js +2 -0
- package/dist/cdn/MJ7MJPGA.js +2 -0
- package/dist/cdn/MTIHPCIF.js +2 -0
- package/dist/cdn/N75AXIUZ.js +2 -0
- package/dist/cdn/NEIT2PGG.js +2 -0
- package/dist/cdn/{N7KYUPBV.js → NK5J27LM.js} +1 -1
- package/dist/cdn/NKJUJKFG.js +2 -0
- package/dist/cdn/NZDJGAT2.js +2 -0
- package/dist/cdn/{JHVMGSI2.js → OI3DH7N2.js} +1 -1
- package/dist/cdn/QMNQFBIA.js +4 -0
- package/dist/cdn/{INPMAY4D.js → SM3MA3KP.js} +1 -1
- package/dist/cdn/SMAQD57G.js +2 -0
- package/dist/cdn/{6XDEGPYR.js → UOQZCTHQ.js} +1 -1
- package/dist/cdn/{QOX2FNYP.js → VA6SZILK.js} +1 -1
- package/dist/cdn/VKNLGQFU.js +2 -0
- package/dist/cdn/{YLJUOSJJ.js → XBM4ZDJT.js} +1 -1
- package/dist/cdn/YVF4PPDB.js +2 -0
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/arcade-debugger-output/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +178 -0
- package/dist/chunks/arcade-executor.js +76 -67
- package/dist/chunks/arcade-service-accessors.js +2 -2
- package/dist/chunks/colorize.js +9 -9
- package/dist/chunks/debugger-value-components.js +275 -0
- package/dist/chunks/debugger-value-styles.js +171 -0
- package/dist/chunks/functional.js +83 -0
- package/dist/chunks/setup-monaco-theme.js +1 -1
- package/dist/chunks/utilities.js +44 -34
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +201 -0
- package/dist/components/arcgis-arcade-debugger-console/index.js +11 -0
- package/dist/components/arcgis-arcade-debugger-output/customElement.js +42 -0
- package/dist/components/arcgis-arcade-debugger-output/index.js +5 -0
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +34 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +639 -111
- package/dist/components/arcgis-arcade-editor/index.js +2 -0
- package/dist/components/arcgis-arcade-results/customElement.js +52 -155
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-code-editor-shell/customElement.d.ts +2 -1
- package/dist/components/arcgis-code-editor-shell/customElement.js +17 -8
- package/dist/components/arcgis-code-viewer/customElement.d.ts +28 -1
- package/dist/components/arcgis-code-viewer/customElement.js +65 -52
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +5 -3
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/arcade-executor.d.ts +2 -1
- package/package.json +5 -5
- package/dist/cdn/3GNGWLOI.js +0 -2
- package/dist/cdn/3UZ3JCYW.js +0 -4
- package/dist/cdn/43A7UCSS.js +0 -2
- package/dist/cdn/4Y64BGY2.js +0 -2
- package/dist/cdn/BGQRJR32.js +0 -2
- package/dist/cdn/CPJ4MNMY.js +0 -2
- package/dist/cdn/G2Z2DNVW.js +0 -2
- package/dist/cdn/ISAWP6I3.js +0 -2
- package/dist/cdn/IVNVT7UT.js +0 -2
- package/dist/cdn/KD7MZWFX.js +0 -2
- package/dist/cdn/MSV4QVR2.js +0 -2
- package/dist/cdn/PX32GRG7.js +0 -2
- package/dist/cdn/QRXX4WHP.js +0 -3
- package/dist/cdn/T4G2IY4F.js +0 -2
- package/dist/cdn/TTOHS2DV.js +0 -11
- package/dist/cdn/VUYXKN7I.js +0 -2
- package/dist/cdn/YMEY2NOQ.js +0 -4
|
@@ -10,5 +10,7 @@ import "../arcgis-arcade-coding-assistant/index.js";
|
|
|
10
10
|
import "@esri/calcite-components/components/calcite-flow";
|
|
11
11
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
12
12
|
import "../arcgis-arcade-results/index.js";
|
|
13
|
+
import "../arcgis-arcade-debugger-console/index.js";
|
|
14
|
+
import "../arcgis-arcade-debugger-output/index.js";
|
|
13
15
|
import "../arcgis-code-editor-shell/index.js";
|
|
14
16
|
export * from "./customElement.js";
|
|
@@ -1,228 +1,125 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import {
|
|
5
|
-
import { setValuesInString as
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import { s as
|
|
9
|
-
import "
|
|
10
|
-
import { createRef as
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
scale: "s",
|
|
17
|
-
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((a) => a.selected = !1)
|
|
18
|
-
}, u = {
|
|
19
|
-
onClick: (e) => {
|
|
20
|
-
const a = e.currentTarget;
|
|
21
|
-
a.expanded = !a.expanded;
|
|
22
|
-
}
|
|
23
|
-
}, r = ({ name: e }) => t`<span class="dictionary-property">${e}</span><span>: </span>`, P = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? S} .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>`, R = ({ value: e, subtree: a = !1 }) => t`<calcite-tree slot=${(a ? "children" : void 0) ?? S} .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 }) => {
|
|
24
|
-
switch (e.type) {
|
|
25
|
-
case "unknown":
|
|
26
|
-
case "null":
|
|
27
|
-
return t`<span class="constant-value">${e.type}</span>`;
|
|
28
|
-
case "text":
|
|
29
|
-
return t`<span class="string-value">${g(e.value)}</span>`;
|
|
30
|
-
case "number":
|
|
31
|
-
return t`<span class="number-value">${e.value.toString()}</span>`;
|
|
32
|
-
case "boolean":
|
|
33
|
-
return t`<span class="constant-value">${e.value.toString()}</span>`;
|
|
34
|
-
case "date":
|
|
35
|
-
return t`<span class="date-value">${_(e)}</span>`;
|
|
36
|
-
case "dateOnly":
|
|
37
|
-
return t`<span class="string-value">${g(F(e))}</span>`;
|
|
38
|
-
case "time":
|
|
39
|
-
return t`<span class="string-value">${g(A(e))}</span>`;
|
|
40
|
-
default:
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
}, C = ({ arcadeResult: e, t9nStrings: a }) => {
|
|
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> ${o(a.showingfirstitemsformat, {
|
|
46
|
-
count: m.toString()
|
|
47
|
-
})}</span>` : null}`;
|
|
48
|
-
}, M = ({ value: e, subtree: a, t9nStrings: s }) => {
|
|
49
|
-
const i = e.geometry?.();
|
|
50
|
-
return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map((c) => {
|
|
51
|
-
const n = y(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
|
-
}, J = ({ arcadeResult: e, t9nStrings: a }) => t`<div class="value-type"><span>${e.type}:</span>${e.features.length >= k ? t`<span> ${o(a.showingfirstitemsformat, {
|
|
55
|
-
count: k.toString()
|
|
56
|
-
})}</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((i, c) => {
|
|
57
|
-
const n = y(i);
|
|
58
|
-
return f({ arcadeResult: n, name: c, expanded: !a, t9nStrings: s });
|
|
59
|
-
})}</calcite-tree>`, f = ({ arcadeResult: e, name: a, expanded: s, t9nStrings: i }) => {
|
|
60
|
-
switch (e.type) {
|
|
61
|
-
case "null":
|
|
62
|
-
case "unknown":
|
|
63
|
-
case "text":
|
|
64
|
-
case "number":
|
|
65
|
-
case "date":
|
|
66
|
-
case "dateOnly":
|
|
67
|
-
case "time":
|
|
68
|
-
case "boolean":
|
|
69
|
-
return t`<calcite-tree-item><div class="tree-item-label">${r({ name: a })}${p({ arcadeResult: e })}</div></calcite-tree-item>`;
|
|
70
|
-
case "array": {
|
|
71
|
-
const n = (e.value ?? []).slice(0, m);
|
|
72
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}${C({ arcadeResult: e, t9nStrings: i })}</div>${I({ items: n, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
73
|
-
}
|
|
74
|
-
case "geometry":
|
|
75
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${R({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
76
|
-
case "attachment":
|
|
77
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${P({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
78
|
-
case "feature":
|
|
79
|
-
case "dictionary":
|
|
80
|
-
case "portal":
|
|
81
|
-
return t`<calcite-tree-item .expanded=${s} @click=${u.onClick}><div class="tree-item-label">${r({ name: a })}<span>${e.type}</span></div>${M({ value: e.value, subtree: !0, t9nStrings: i })}</calcite-tree-item>`;
|
|
82
|
-
default:
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
}, G = ({ arcadeResult: e }) => {
|
|
86
|
-
const a = z(e.value.fields);
|
|
87
|
-
return t`<div class="table-scroll"><table><thead><tr>${a.map((s) => t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map((s) => t`<tr>${a.map((i) => {
|
|
88
|
-
try {
|
|
89
|
-
const c = y(s.field(i.name));
|
|
90
|
-
return t`<td>${p({ arcadeResult: c })}</td>`;
|
|
91
|
-
} catch {
|
|
92
|
-
return t`<td></td>`;
|
|
93
|
-
}
|
|
94
|
-
})}</tr>`)}</tbody></table></div>`;
|
|
95
|
-
}, b = "calcite-mode-dark";
|
|
96
|
-
function B() {
|
|
97
|
-
let e = `:host {
|
|
98
|
-
`;
|
|
99
|
-
const a = w["light-theme"];
|
|
100
|
-
Object.entries(a).forEach(([i, c]) => {
|
|
101
|
-
e += ` --arcgis-editor-${i}: ${c};
|
|
102
|
-
`;
|
|
103
|
-
}), e += `}
|
|
104
|
-
`, e += `:host(:state(${b})) {
|
|
105
|
-
`;
|
|
106
|
-
const s = w["dark-theme"];
|
|
107
|
-
return Object.entries(s).forEach(([i, c]) => {
|
|
108
|
-
e += `
|
|
109
|
-
--arcgis-editor-${i}: ${c};`;
|
|
110
|
-
}), e += `
|
|
111
|
-
}
|
|
112
|
-
`, T`
|
|
113
|
-
${O(e)}
|
|
114
|
-
`;
|
|
115
|
-
}
|
|
116
|
-
const d = {
|
|
117
|
-
onClick: (e) => {
|
|
118
|
-
const a = e.currentTarget;
|
|
119
|
-
a.expanded = !a.expanded;
|
|
2
|
+
import { c as h } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as g, html as e } from "lit";
|
|
4
|
+
import { LitElement as f, createEvent as d, safeClassMap as r } from "@arcgis/lumina";
|
|
5
|
+
import { setValuesInString as i, uncapitalize as a } from "@arcgis/toolkit/string";
|
|
6
|
+
import { M as v } from "../../chunks/arcade-executor.js";
|
|
7
|
+
import { u as b } from "../../chunks/useT9n.js";
|
|
8
|
+
import { F as $, a as x, t as s, D as y, A as R, b as P } from "../../chunks/functional.js";
|
|
9
|
+
import { d as w, g as k, c as m, b as S, G as T, a as C, S as p } from "../../chunks/debugger-value-styles.js";
|
|
10
|
+
import { createRef as o, ref as n } from "lit/directives/ref.js";
|
|
11
|
+
import { observeAncestorsMutation as M, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
|
|
12
|
+
const L = g`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden;min-height:0}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{display:flex;flex-direction:column;min-height:0;.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}}`, c = {
|
|
13
|
+
onClick: (u) => {
|
|
14
|
+
const t = u.currentTarget;
|
|
15
|
+
t.expanded = !t.expanded;
|
|
120
16
|
}
|
|
121
17
|
};
|
|
122
|
-
class
|
|
18
|
+
class F extends f {
|
|
123
19
|
constructor() {
|
|
124
|
-
super(...arguments), this.messages =
|
|
20
|
+
super(...arguments), this.messages = b(), this.outputRef = o(), this.consoleRef = o(), this.logRef = o(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel = d({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = d({ bubbles: !1, composed: !1 });
|
|
125
21
|
}
|
|
126
22
|
static {
|
|
127
|
-
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0 };
|
|
23
|
+
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, hideHeader: 5 };
|
|
128
24
|
}
|
|
129
25
|
static {
|
|
130
|
-
this.styles = [
|
|
26
|
+
this.styles = [L, k(), w];
|
|
131
27
|
}
|
|
132
28
|
load() {
|
|
133
29
|
this.manager.onLifecycle(() => {
|
|
134
|
-
const
|
|
135
|
-
return this.updateTheme(), () =>
|
|
30
|
+
const t = M(this.el, ["class"], this.updateTheme.bind(this));
|
|
31
|
+
return this.updateTheme(), () => t();
|
|
136
32
|
});
|
|
137
33
|
}
|
|
138
34
|
loaded() {
|
|
139
|
-
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());
|
|
35
|
+
this.hideHeader || 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());
|
|
140
36
|
}
|
|
141
|
-
updateResultPanel(
|
|
142
|
-
this.openedResultPanel =
|
|
37
|
+
updateResultPanel(t) {
|
|
38
|
+
this.openedResultPanel = t, this.arcgisInternalOpenedResultPanelChange.emit();
|
|
143
39
|
}
|
|
144
|
-
_switchResultPanel(
|
|
145
|
-
const
|
|
146
|
-
|
|
40
|
+
_switchResultPanel(t) {
|
|
41
|
+
const l = t.currentTarget.dataset.panelName;
|
|
42
|
+
l && this.updateResultPanel(l);
|
|
147
43
|
}
|
|
148
44
|
_emitClose() {
|
|
149
45
|
this.arcgisInternalClosePanel.emit();
|
|
150
46
|
}
|
|
151
47
|
updateTheme() {
|
|
152
|
-
|
|
48
|
+
I(this.el) === "dark" ? this.elementInternals.states.add(m) : this.elementInternals.states.delete(m);
|
|
153
49
|
}
|
|
154
50
|
renderConsolePanel() {
|
|
155
|
-
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ?
|
|
51
|
+
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : e`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((t) => e`<p>${t}</p>`) : e`<p>${this.messages.consolemessage}</p>`}</div>`;
|
|
156
52
|
}
|
|
157
53
|
renderLogPanel() {
|
|
158
54
|
if (this.openedResultPanel !== "log")
|
|
159
55
|
return null;
|
|
160
56
|
if (this.loading)
|
|
161
|
-
return
|
|
162
|
-
const
|
|
163
|
-
return
|
|
57
|
+
return e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>`;
|
|
58
|
+
const t = this.result?.type === "error" ? "color-error" : "color-success";
|
|
59
|
+
return e`<calcite-list .label=${this.messages.results ?? "Results"}>${this.result ? e`<calcite-list-item .label=${i(this.messages.lastexecutionformat, {
|
|
164
60
|
timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
|
|
165
61
|
dateStyle: "medium",
|
|
166
62
|
timeStyle: "medium"
|
|
167
63
|
}).format(this.result.timeStamp)
|
|
168
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
64
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${r(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${i(this.messages.compilationtimeformat, {
|
|
169
65
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
170
66
|
style: "unit",
|
|
171
67
|
unit: "millisecond",
|
|
172
68
|
maximumFractionDigits: 2
|
|
173
69
|
}).format(this.result.compilationTime ?? 0)
|
|
174
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
70
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${r(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${i(this.messages.executiontimeformat, {
|
|
175
71
|
time: new Intl.NumberFormat(this.messages._t9nLocale, {
|
|
176
72
|
style: "unit",
|
|
177
73
|
unit: "millisecond",
|
|
178
74
|
maximumFractionDigits: 2
|
|
179
75
|
}).format(this.result.executionTime ?? 0)
|
|
180
|
-
})}><calcite-icon slot=content-start icon=information scale=s class=${
|
|
76
|
+
})}><calcite-icon slot=content-start icon=information scale=s class=${r(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>`;
|
|
181
77
|
}
|
|
182
78
|
renderOutputPanel() {
|
|
183
79
|
if (this.openedResultPanel !== "output")
|
|
184
80
|
return null;
|
|
185
81
|
if (this.loading)
|
|
186
|
-
return
|
|
82
|
+
return e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>`;
|
|
187
83
|
switch (this.result?.type) {
|
|
188
84
|
case "error":
|
|
189
|
-
return
|
|
85
|
+
return e`<div class="result-value-simple flex-adjustable">${i(this.messages.executionerrorformat ?? "", { message: this.result.value })}</div>`;
|
|
190
86
|
case "null":
|
|
191
87
|
case "unknown":
|
|
192
|
-
return
|
|
88
|
+
return e`<div class="result-value-simple ltr-container">${p({ type: this.result.type, value: a(this.result.type) })}</div>`;
|
|
193
89
|
case "text":
|
|
194
90
|
case "number":
|
|
195
91
|
case "date":
|
|
196
92
|
case "dateOnly":
|
|
197
93
|
case "time":
|
|
198
|
-
case "boolean":
|
|
199
|
-
|
|
94
|
+
case "boolean": {
|
|
95
|
+
const { type: t, value: l } = C(this.result);
|
|
96
|
+
return e`<div class="result-value-simple ltr-container"><span class="value-type">${a(this.result.type)}: </span>${p({ type: t, value: l })}</div>`;
|
|
97
|
+
}
|
|
200
98
|
case "array": {
|
|
201
|
-
const
|
|
202
|
-
return
|
|
99
|
+
const l = (this.result.value ?? []).slice(0, v);
|
|
100
|
+
return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${P({ items: l, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
203
101
|
}
|
|
204
102
|
case "geometry":
|
|
205
|
-
return
|
|
103
|
+
return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${a(this.result.type)}</div>${T({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
206
104
|
case "attachment":
|
|
207
|
-
return
|
|
105
|
+
return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${a(this.result.type)}</div>${S({ obj: this.result.value.castAsJson(), subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
208
106
|
case "feature":
|
|
209
107
|
case "dictionary":
|
|
210
108
|
case "portal":
|
|
211
|
-
|
|
212
|
-
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>${M({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
109
|
+
return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${a(this.result.type)}</div>${y({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
213
110
|
case "featureSet":
|
|
214
|
-
return
|
|
111
|
+
return e`<div class="result-value-table ltr-container">${$({ arcadeResult: this.result, t9nStrings: this.messages })}${x({ arcadeResult: this.result })}</div>`;
|
|
215
112
|
case "knowledgeGraph":
|
|
216
|
-
return
|
|
113
|
+
return e`<div class="result-value-simple ltr-container"><span class="value-type">${a(this.result.type)}: </span><span class="string-value">${this.result.value.url}</span></div>`;
|
|
217
114
|
default:
|
|
218
|
-
return
|
|
115
|
+
return e`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`;
|
|
219
116
|
}
|
|
220
117
|
}
|
|
221
118
|
render() {
|
|
222
|
-
return
|
|
119
|
+
return e`${this.hideHeader ? null : e`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${n(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${n(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${n(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header>`}<article class="flex-adjustable">${this.loading ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : e`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
|
|
223
120
|
}
|
|
224
121
|
}
|
|
225
|
-
|
|
122
|
+
h("arcgis-arcade-results", F);
|
|
226
123
|
export {
|
|
227
|
-
|
|
124
|
+
F as ArcgisArcadeResults
|
|
228
125
|
};
|