@arcgis/coding-components 5.1.0-next.91 → 5.1.0-next.92
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/{SQJBYEJN.js → 6BS5M2LA.js} +1 -1
- package/dist/cdn/KLNTCPWU.js +2 -0
- package/dist/cdn/{2DDNEQDO.js → UB7TEPYB.js} +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-TW.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/debugger-value-components.js +91 -88
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/Z5TZFEAT.js +0 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { html as c } from "lit";
|
|
3
|
-
import { safeClassMap as
|
|
4
|
-
import { t as
|
|
5
|
-
import { uncapitalize as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
3
|
+
import { safeClassMap as R } from "@arcgis/lumina";
|
|
4
|
+
import { t as v } from "./debugger-value-styles.js";
|
|
5
|
+
import { uncapitalize as A, quoteString as U } from "@arcgis/toolkit/string";
|
|
6
|
+
const H = /^[$A-Z_a-z][$\w]*$/u;
|
|
7
|
+
function E(e) {
|
|
8
8
|
return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
function J(e) {
|
|
11
|
+
return H.test(e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return typeof e == "number" ? `[${e}]` : e.startsWith("name:") ? `[name="${
|
|
13
|
+
function G(e) {
|
|
14
|
+
return typeof e == "number" ? `[${e}]` : e.startsWith("name:") ? `[name="${E(e.slice(5))}"]` : e.startsWith("id:") ? `[id="${E(e.slice(3))}"]` : J(e) ? `.${e}` : `["${E(e)}"]`;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function F(e, t) {
|
|
17
17
|
if (e[t] !== '"')
|
|
18
18
|
return;
|
|
19
19
|
let n = "", r = t + 1;
|
|
@@ -33,7 +33,7 @@ function A(e, t) {
|
|
|
33
33
|
n += p, r += 1;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function K(e) {
|
|
37
37
|
if (!e)
|
|
38
38
|
return;
|
|
39
39
|
let t = 0;
|
|
@@ -66,15 +66,15 @@ function J(e) {
|
|
|
66
66
|
n.push(e.slice(o, t)), t += 1;
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
const o =
|
|
69
|
+
const $ = e.startsWith("name=", t) ? "name" : e.startsWith("id=", t) ? "id" : void 0;
|
|
70
|
+
if ($) {
|
|
71
|
+
const o = F(e, t + $.length + 1);
|
|
72
72
|
if (!o || e[o.nextIndex] !== "]")
|
|
73
73
|
return;
|
|
74
|
-
n.push(`${
|
|
74
|
+
n.push(`${$}:${o.value}`), t = o.nextIndex + 1;
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
|
-
const s =
|
|
77
|
+
const s = F(e, t);
|
|
78
78
|
if (!s || e[s.nextIndex] !== "]")
|
|
79
79
|
return;
|
|
80
80
|
n.push(s.value), t = s.nextIndex + 1;
|
|
@@ -87,29 +87,29 @@ function J(e) {
|
|
|
87
87
|
pathSegments: a
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return `${e}${
|
|
90
|
+
function de(e, t) {
|
|
91
|
+
return `${e}${G(t)}`;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function k(e, t) {
|
|
94
94
|
return e ? `${e}.${t}` : String(t);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function q(e, t) {
|
|
97
97
|
if (e)
|
|
98
|
-
return `${e}${
|
|
98
|
+
return `${e}${G(t)}`;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function fe(e) {
|
|
101
|
+
return K(e);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function M(e, t) {
|
|
104
104
|
return typeof t == "number" ? `${e}[${t}]` : `${e}.${t}`;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function X(e) {
|
|
107
107
|
return e.name ? `name:${e.name}` : `id:${e.id}`;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Y(e) {
|
|
110
110
|
return Object.entries(e).filter(([t]) => t !== "featureSet");
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function z(e, t) {
|
|
113
113
|
if (t) {
|
|
114
114
|
const n = t.featureSet;
|
|
115
115
|
return {
|
|
@@ -133,40 +133,40 @@ function Y(e, t) {
|
|
|
133
133
|
} : null;
|
|
134
134
|
}
|
|
135
135
|
function C(e) {
|
|
136
|
-
return c`<calcite-tree slot=children .lines=${
|
|
136
|
+
return c`<calcite-tree slot=children .lines=${v.lines} .selectionMode=${v.selectionMode} .scale=${v.scale} @calciteTreeSelect=${v.oncalciteTreeSelect}>${e}</calcite-tree>`;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const u =
|
|
138
|
+
function L({ lazyTreeState: e, nodePath: t, mergedCollectionItem: n, expanded: r = !1, isMetadata: p = !1, messages: a, name: f, value: $, loadPreview: s, previewLabel: o, previewSourcePath: h, previewLoading: g = !1 }) {
|
|
139
|
+
const u = z($, n);
|
|
140
140
|
if (!u)
|
|
141
141
|
return null;
|
|
142
|
-
const i = e.ensureNode(t, r, u.loadRequest),
|
|
142
|
+
const i = e.ensureNode(t, r, u.loadRequest), b = u.kind === "feature-set" ? u.featureSetValue : void 0, S = o ?? String(f), m = h ?? t, D = !!(s && S && b && typeof b.querySample == "function"), d = (l) => {
|
|
143
143
|
l.target === l.currentTarget && e.setExpanded(t, !0, u.loadRequest);
|
|
144
|
-
}, h = (l) => {
|
|
145
|
-
l.target === l.currentTarget && e.setExpanded(t, !1, u.loadRequest);
|
|
146
144
|
}, y = (l) => {
|
|
147
|
-
l.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
l.target === l.currentTarget && e.setExpanded(t, !1, u.loadRequest);
|
|
146
|
+
}, V = (l) => {
|
|
147
|
+
l.stopPropagation(), !(!s || !S || !b) && s({
|
|
148
|
+
label: S,
|
|
149
|
+
sourcePath: m,
|
|
150
|
+
value: b
|
|
151
151
|
});
|
|
152
|
-
},
|
|
152
|
+
}, w = () => c`<calcite-tree-item disabled><div class="tree-item-label"><span class="constant-value">${i.errorMessage || (a.loaderror ?? "Unable to load data.")}</span></div></calcite-tree-item>`, Q = () => u.kind !== "feature-set" || !i.schemaValue ? null : x({ name: "schema", value: i.schemaValue, messages: a, path: M(t, "schema"), lazyTreeState: e }), Z = () => u.kind !== "feature-set" || !u.mergedCollectionItem ? [] : Y(u.mergedCollectionItem).map(([l, I]) => x({ name: l, value: P(I), messages: a, path: M(t, l), lazyTreeState: e })), _ = () => {
|
|
153
153
|
if (u.kind !== "feature-set")
|
|
154
154
|
return null;
|
|
155
155
|
if (!i.expanded || i.status === "loading")
|
|
156
156
|
return C();
|
|
157
157
|
const l = [];
|
|
158
158
|
if (i.status === "error")
|
|
159
|
-
l.push(
|
|
159
|
+
l.push(w());
|
|
160
160
|
else {
|
|
161
|
-
l.push(...
|
|
162
|
-
const
|
|
163
|
-
|
|
161
|
+
l.push(...Z());
|
|
162
|
+
const I = Q();
|
|
163
|
+
I && l.push(I);
|
|
164
164
|
}
|
|
165
165
|
return l.length ? C(l) : C();
|
|
166
|
-
},
|
|
167
|
-
return c`<calcite-tree-item .expanded=${i.expanded} @calciteTreeItemExpand=${d} @calciteTreeItemCollapse=${
|
|
166
|
+
}, j = () => u.kind !== "collection" ? null : !i.expanded || i.status === "loading" ? C() : C(c`${i.status === "error" ? w() : null}${i.status === "loaded" ? i.collectionItems.map((l) => L({ name: l.name || l.id, mergedCollectionItem: l, messages: a, nodePath: M(t, l.id), lazyTreeState: e, value: l.featureSet, loadPreview: s, previewLabel: k(o, l.name || l.id), previewSourcePath: q(m, X(l)), previewLoading: g })) : null}`), O = () => u.kind === "collection" ? j() : _();
|
|
167
|
+
return c`<calcite-tree-item .expanded=${i.expanded} @calciteTreeItemExpand=${d} @calciteTreeItemCollapse=${y}><div class="tree-item-label">${T({ name: f, isMetadata: p })}<bdi>${u.displayValue}</bdi></div>${i.status === "loading" ? c`<calcite-loader slot=actions-end scale=s inline type=indeterminate .label=${a.loading ?? "Loading"} .text=${a.loading ?? "Loading"}></calcite-loader>` : null}${D ? c`<calcite-action slot=actions-end scale=s class="load-action" .text=${a.loadpreview ?? "Load preview"} text-enabled icon=play icon-flip-rtl .disabled=${g} @click=${V}></calcite-action>` : null}${O()}</calcite-tree-item>`;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function P(e) {
|
|
170
170
|
if (e == null)
|
|
171
171
|
return { type: "primitive", arcadeType: "", value: null };
|
|
172
172
|
switch (typeof e) {
|
|
@@ -180,73 +180,76 @@ function z(e) {
|
|
|
180
180
|
return { type: "primitive", arcadeType: "String", value: String(e) };
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const N = "tree-item-metadata";
|
|
184
184
|
function T({ name: e, isMetadata: t = !1 }) {
|
|
185
|
-
const n = t ? `dictionary-property ${
|
|
186
|
-
return c`<bdi class=${
|
|
185
|
+
const n = t ? `dictionary-property ${N}` : "dictionary-property", r = t ? N : void 0;
|
|
186
|
+
return c`<bdi class=${R(n)}>${e}</bdi><bdi class=${R(r)}>: </bdi>`;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const
|
|
188
|
+
function ee({ lazyTreeState: e, path: t, expanded: n = !1, value: r, subtree: p, messages: a, onLoadPreview: f, previewLabel: $, previewSourcePath: s, previewLoading: o = !1 }) {
|
|
189
|
+
const h = (d) => c`<calcite-tree slot=${"children"} .lines=${v.lines} .selectionMode=${v.selectionMode} .scale=${v.scale} @calciteTreeSelect=${v.oncalciteTreeSelect}>${d}</calcite-tree>`;
|
|
190
190
|
if (!n)
|
|
191
|
-
return
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
}}><div class="tree-item-label"><span class=${
|
|
191
|
+
return h();
|
|
192
|
+
const g = e.ensureNode(t, n), u = (d) => g.visibleChildCount >= d ? null : c`<calcite-tree-item @click=${(V) => {
|
|
193
|
+
V.stopPropagation(), e.showMore(t, d);
|
|
194
|
+
}}><div class="tree-item-label"><span class=${R(N)}>${a.showmore ?? "Show more"}</span></div></calcite-tree-item>`, i = r.expand();
|
|
195
195
|
if (Array.isArray(i)) {
|
|
196
|
-
const d = i.slice(0,
|
|
197
|
-
return
|
|
196
|
+
const d = i.slice(0, g.visibleChildCount), y = W(r) ? r.length : i.length;
|
|
197
|
+
return h(c`${d.map((V, w) => x({ name: w, value: V, messages: a, path: `${t}[${w}]`, lazyTreeState: e, onLoadPreview: f, previewLabel: k($, w), previewSourcePath: q(s, w), previewLoading: o }))}${u(i.length)}${x({ name: "length", value: { arcadeType: "Number", type: "primitive", value: y }, isMetadata: !0, messages: a, path: `${t}.length`, lazyTreeState: e })}`);
|
|
198
198
|
}
|
|
199
|
-
const
|
|
200
|
-
for (const [d,
|
|
199
|
+
const b = r.arcadeType === "Feature" ? i.get("Geometry()") : void 0, S = Math.min(g.visibleChildCount, b ? i.size - 1 : i.size), m = [];
|
|
200
|
+
for (const [d, y] of i.entries())
|
|
201
201
|
if (!(d === "Geometry()" && r.arcadeType === "Feature")) {
|
|
202
|
-
if (
|
|
202
|
+
if (m.length >= S)
|
|
203
203
|
break;
|
|
204
|
-
|
|
204
|
+
m.push([d, y]);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
return
|
|
206
|
+
const D = !!(b && g.visibleChildCount > m.length);
|
|
207
|
+
return h(c`${m.map(([d, y]) => x({ name: d, value: y, messages: a, path: `${t}.${d}`, lazyTreeState: e, onLoadPreview: f, previewLabel: k($, d), previewSourcePath: q(s, d), previewLoading: o }))}${D ? x({ name: "geometry", value: b, messages: a, path: `${t}.geometry`, lazyTreeState: e, onLoadPreview: f, previewLabel: k($, "geometry"), previewSourcePath: q(s, "geometry"), previewLoading: o }) : null}${u(i.size)}`);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function te(e) {
|
|
210
210
|
return "expand" in e;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function re(e) {
|
|
213
213
|
return e.type === "simple";
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function ne(e) {
|
|
216
216
|
return e.type === "primitive";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
return e.type === "
|
|
218
|
+
function W(e) {
|
|
219
|
+
return e.type === "sequence-container";
|
|
220
220
|
}
|
|
221
221
|
function ie(e) {
|
|
222
|
-
return e.type === "feature-set
|
|
222
|
+
return e.type === "feature-set";
|
|
223
223
|
}
|
|
224
224
|
function le(e) {
|
|
225
|
-
return
|
|
225
|
+
return e.type === "feature-set-collection";
|
|
226
|
+
}
|
|
227
|
+
function ae(e) {
|
|
228
|
+
return ie(e) || le(e);
|
|
226
229
|
}
|
|
227
|
-
function x({ lazyTreeState: e, path: t, name: n, value: r, messages: p, expanded: a, isMetadata: f = !1, onLoadPreview:
|
|
230
|
+
function x({ lazyTreeState: e, path: t, name: n, value: r, messages: p, expanded: a, isMetadata: f = !1, onLoadPreview: $, previewLabel: s, previewSourcePath: o, previewLoading: h = !1 }) {
|
|
228
231
|
if (r === void 0)
|
|
229
232
|
return null;
|
|
230
233
|
if (r === null)
|
|
231
234
|
return c`<calcite-tree-item .expanded=${a}><div class="tree-item-label">${T({ name: n, isMetadata: f })}<bdi class="uninitialized-value tree-item-metadata">${p.uninitialized ?? "uninitialized"}</bdi></div></calcite-tree-item>`;
|
|
232
|
-
if (
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
}, i = (
|
|
236
|
-
|
|
237
|
-
},
|
|
238
|
-
return c`<calcite-tree-item .expanded=${
|
|
235
|
+
if (te(r)) {
|
|
236
|
+
const g = e.ensureNode(t, a), u = (m) => {
|
|
237
|
+
m.target === m.currentTarget && e.setExpanded(t, !0);
|
|
238
|
+
}, i = (m) => {
|
|
239
|
+
m.target === m.currentTarget && e.setExpanded(t, !1);
|
|
240
|
+
}, b = typeof r.arcadeType == "string" ? r.arcadeType : "unknown", S = W(r) ? `${A(b)}(${r.length})` : A(b);
|
|
241
|
+
return c`<calcite-tree-item .expanded=${g.expanded} @calciteTreeItemExpand=${u} @calciteTreeItemCollapse=${i}><div class="tree-item-label">${T({ name: n, isMetadata: f })}<bdi>${S}</bdi></div>${ee({ expanded: g.expanded, value: r, subtree: !0, messages: p, path: t, lazyTreeState: e, onLoadPreview: $, previewLabel: s, previewSourcePath: o, previewLoading: h })}</calcite-tree-item>`;
|
|
239
242
|
}
|
|
240
|
-
return
|
|
243
|
+
return ae(r) ? L({ name: n, value: r, nodePath: t, lazyTreeState: e, messages: p, expanded: a, isMetadata: f, loadPreview: $, previewLabel: s, previewSourcePath: o, previewLoading: h }) : re(r) ? c`<calcite-tree-item .expanded=${a}><div class="tree-item-label">${T({ name: n, isMetadata: f })}${B({ value: r })}</div></calcite-tree-item>` : ne(r) ? c`<calcite-tree-item .expanded=${a}><div class="tree-item-label">${T({ name: n, isMetadata: f })}${B({ value: r })}</div></calcite-tree-item>` : null;
|
|
241
244
|
}
|
|
242
|
-
const
|
|
245
|
+
const B = ({ value: e }) => {
|
|
243
246
|
switch (e.type) {
|
|
244
247
|
case "primitive":
|
|
245
248
|
if (e.value === null)
|
|
246
249
|
return c`<bdi class="constant-value">null</bdi>`;
|
|
247
250
|
switch (e.arcadeType) {
|
|
248
251
|
case "String":
|
|
249
|
-
return c`<bdi class="string-value">${
|
|
252
|
+
return c`<bdi class="string-value">${U(String(e.value))}</bdi>`;
|
|
250
253
|
case "Number":
|
|
251
254
|
return c`<bdi class="number-value">${String(e.value)}</bdi>`;
|
|
252
255
|
case "Boolean":
|
|
@@ -264,12 +267,12 @@ const F = ({ value: e }) => {
|
|
|
264
267
|
};
|
|
265
268
|
export {
|
|
266
269
|
x as D,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
B as S,
|
|
271
|
+
le as a,
|
|
272
|
+
ie as b,
|
|
273
|
+
ne as c,
|
|
274
|
+
re as d,
|
|
275
|
+
de as e,
|
|
276
|
+
te as i,
|
|
277
|
+
fe as p
|
|
275
278
|
};
|