@arcgis/coding-components 5.1.0-next.129 → 5.1.0-next.130
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/62CWTCDL.js +2 -0
- package/dist/cdn/7BZZRXL4.js +2 -0
- package/dist/cdn/7OVVVNVI.js +2 -0
- package/dist/cdn/MORS3SBZ.js +2 -0
- package/dist/cdn/MSZINSFE.js +2 -0
- package/dist/cdn/{6NF6A3IL.js → NKLH4FV4.js} +1 -1
- package/dist/cdn/ONQ5NUTY.js +2 -0
- package/dist/cdn/SWDAFYFO.js +68 -0
- package/dist/cdn/{U6KAPM53.js → TKFJEUYO.js} +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2611 -2586
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +1 -1
- package/dist/chunks/debugger-value-components.js +1 -1
- package/dist/chunks/debugger-value-styles.js +8 -8
- package/dist/chunks/functional.js +34 -34
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +1 -1
- package/dist/components/arcgis-arcade-debugger-output/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +18 -18
- package/dist/components/arcgis-code-editor-shell/customElement.js +70 -65
- 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/4B64NBIM.js +0 -2
- package/dist/cdn/7NI24N24.js +0 -2
- package/dist/cdn/B7UJ6L6F.js +0 -2
- package/dist/cdn/CNNHY73S.js +0 -2
- package/dist/cdn/TNA5F36E.js +0 -68
- package/dist/cdn/WOKELL75.js +0 -2
- package/dist/cdn/YE7HDVYS.js +0 -2
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{J as s,v as e}from"./REL6OK2I.js";import"./Y3KOWWO5.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./OYNUENPR.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./
|
|
2
|
+
import{J as s,v as e}from"./REL6OK2I.js";import"./Y3KOWWO5.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./OYNUENPR.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./TKFJEUYO.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./62CWTCDL.js"),"debuggerStore:,result:"],"arcgis-arcade-editor":[()=>import("./NKLH4FV4.js"),"arcadeAssistant:,customPanels:,disableAssistant,editorInstance:,editorOptions:,enableDebugger,externalExecutor:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,openArcadeAssistant,setFocus"],"arcgis-arcade-results":[()=>import("./MORS3SBZ.js"),"consoleLogs:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./XRARLSUB.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./66OHRRRE.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./MSZINSFE.js")],"arcgis-code-viewer":[()=>import("./Q4VU6BZR.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./2CUPMUTK.js"),"closed,heading,hideDescriptions,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./3YHAACIY.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./FHSCW2PZ.js"),"hideDescriptionsInFieldsPanel,hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./A4IJ4IXL.js"),"editorInstance:,editorOptions:,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
|
|
@@ -164,7 +164,7 @@ function L({ lazyTreeState: e, nodePath: t, mergedCollectionItem: n, expanded: r
|
|
|
164
164
|
}
|
|
165
165
|
return l.length ? C(l) : C();
|
|
166
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
|
|
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 .disabled=${g} @click=${V}></calcite-action>` : null}${O()}</calcite-tree-item>`;
|
|
168
168
|
}
|
|
169
169
|
function P(e) {
|
|
170
170
|
if (e == null)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { html as a, unsafeCSS as
|
|
2
|
+
import { html as a, unsafeCSS as v, css as m } from "lit";
|
|
3
3
|
import { nothing as y, safeClassMap as l } from "@arcgis/lumina";
|
|
4
4
|
import { classes as i } from "@arcgis/toolkit/dom";
|
|
5
5
|
import { uncapitalize as f, quoteString as c } from "@arcgis/toolkit/string";
|
|
6
|
-
import { f as g, a as
|
|
6
|
+
import { f as g, a as b, b as $ } from "./arcade-executor.js";
|
|
7
7
|
import { t as o } from "./monaco-theme.js";
|
|
8
8
|
const s = {
|
|
9
9
|
lines: !0,
|
|
10
10
|
selectionMode: "none",
|
|
11
11
|
scale: "s",
|
|
12
12
|
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((t) => t.selected = !1)
|
|
13
|
-
}, u = "tree-item-metadata", p = ({ name: e, isMetadata: t = !1 }) => a`<
|
|
13
|
+
}, u = "tree-item-metadata", p = ({ name: e, isMetadata: t = !1 }) => a`<bdi class=${l(i("dictionary-property", t && u))}>${e}</bdi><bdi class=${l(i(t && u))}>: </bdi>`, z = ({ obj: e, subtree: t }) => a`<calcite-tree slot=${"children"} .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e, void 0, 2)}</calcite-tree-item></calcite-tree>`, N = ({ value: e, subtree: t = !1 }) => a`<calcite-tree slot=${(t ? "children" : void 0) ?? y} .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${p({ name: "type" })}<bdi>${f(e.type)}</bdi></div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${p({ name: "value" })}<span class="string-value">${JSON.stringify(e, void 0, 2)}</span></div></calcite-tree-item></calcite-tree>`, C = ({ type: e, value: t }) => {
|
|
14
14
|
switch (e) {
|
|
15
15
|
case "unknown":
|
|
16
16
|
case "Unknown":
|
|
@@ -75,9 +75,9 @@ function V(e) {
|
|
|
75
75
|
case "text":
|
|
76
76
|
return { type: e.type, value: e.value };
|
|
77
77
|
case "date":
|
|
78
|
-
return { type: e.type, value: b(e) };
|
|
79
|
-
case "dateOnly":
|
|
80
78
|
return { type: e.type, value: $(e) };
|
|
79
|
+
case "dateOnly":
|
|
80
|
+
return { type: e.type, value: b(e) };
|
|
81
81
|
case "time":
|
|
82
82
|
return { type: e.type, value: g(e) };
|
|
83
83
|
}
|
|
@@ -94,14 +94,14 @@ function A() {
|
|
|
94
94
|
`, e += `:host(:state(${S})),
|
|
95
95
|
`, e += `:host([calcite-mode-dark]) {
|
|
96
96
|
`;
|
|
97
|
-
const
|
|
98
|
-
return Object.entries(
|
|
97
|
+
const d = o["dark-theme"];
|
|
98
|
+
return Object.entries(d).forEach(([n, r]) => {
|
|
99
99
|
e += `
|
|
100
100
|
--arcgis-editor-${n}: ${r};`;
|
|
101
101
|
}), e += `
|
|
102
102
|
}
|
|
103
103
|
`, m`
|
|
104
|
-
${
|
|
104
|
+
${v(e)}
|
|
105
105
|
`;
|
|
106
106
|
}
|
|
107
107
|
const E = m`
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { html as
|
|
2
|
+
import { html as a } from "lit";
|
|
3
3
|
import "@arcgis/lumina";
|
|
4
|
-
import { B as
|
|
4
|
+
import { B as y, v as p, M as $ } from "./arcade-executor.js";
|
|
5
5
|
import { uncapitalize as m, setValuesInString as v } from "@arcgis/toolkit/string";
|
|
6
6
|
import { s as g } from "./fields.js";
|
|
7
7
|
import "@arcgis/toolkit/function";
|
|
8
8
|
import { i as S, a as f, S as h, D as o, b as k, G as x } from "./debugger-value-styles.js";
|
|
9
|
-
const
|
|
9
|
+
const i = {
|
|
10
10
|
lines: !0,
|
|
11
11
|
selectionMode: "none",
|
|
12
12
|
scale: "s",
|
|
13
13
|
oncalciteTreeSelect: (e) => e.currentTarget.selectedItems.forEach((t) => t.selected = !1)
|
|
14
|
-
},
|
|
14
|
+
}, d = {
|
|
15
15
|
onClick: (e) => {
|
|
16
16
|
const t = e.currentTarget;
|
|
17
17
|
t.expanded = !t.expanded;
|
|
18
18
|
}
|
|
19
19
|
}, A = ({ arcadeResult: e, t9nStrings: t }) => {
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
count:
|
|
20
|
+
const r = e.value ?? [], c = Math.max(r.length - $, 0);
|
|
21
|
+
return a`<bdi>${`${m(e.type)}(${r.length ?? 0})`}</bdi>${c > 0 ? a`<span> ${v(t.showingfirstitemsformat, {
|
|
22
|
+
count: $.toString()
|
|
23
23
|
})}</span>` : null}`;
|
|
24
|
-
}, C = ({ value: e, subtree: t, t9nStrings:
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
const
|
|
28
|
-
return e.arcadeDeclaredClass === "esri.arcade.Feature" &&
|
|
29
|
-
})}${
|
|
30
|
-
}, B = ({ arcadeResult: e, t9nStrings: t }) =>
|
|
31
|
-
count:
|
|
32
|
-
})}</span>` : null}</div>`, D = ({ items: e, subtree: t, arrayLength:
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
})}${
|
|
24
|
+
}, C = ({ value: e, subtree: t, t9nStrings: r }) => {
|
|
25
|
+
const c = e.geometry?.();
|
|
26
|
+
return a`<calcite-tree slot=${"children"} .lines=${i.lines} .selectionMode=${i.selectionMode} .scale=${i.scale} @calciteTreeSelect=${i.oncalciteTreeSelect}>${e.keys().map((l) => {
|
|
27
|
+
const s = p(e.field(l));
|
|
28
|
+
return e.arcadeDeclaredClass === "esri.arcade.Feature" && s.type === "geometry" ? null : u({ arcadeResult: s, name: l, t9nStrings: r });
|
|
29
|
+
})}${c ? u({ arcadeResult: { type: "geometry", value: c }, name: "geometry", t9nStrings: r }) : null}</calcite-tree>`;
|
|
30
|
+
}, B = ({ arcadeResult: e, t9nStrings: t }) => a`<div class="value-type"><bdi>${m(e.type)}:</bdi>${e.features.length >= y ? a`<span> ${v(t.showingfirstitemsformat, {
|
|
31
|
+
count: y.toString()
|
|
32
|
+
})}</span>` : null}</div>`, D = ({ items: e, subtree: t, arrayLength: r = e.length, t9nStrings: c }) => a`<calcite-tree slot=${"children"} .lines=${i.lines} .selectionMode=${i.selectionMode} .scale=${i.scale} @calciteTreeSelect=${i.oncalciteTreeSelect}>${e.map((l, s) => {
|
|
33
|
+
const n = p(l);
|
|
34
|
+
return u({ arcadeResult: n, name: s, expanded: !t, t9nStrings: c });
|
|
35
|
+
})}${u({ arcadeResult: { type: "number", value: r }, name: "length", isMetadata: !0, t9nStrings: c })}</calcite-tree>`, u = ({ arcadeResult: e, name: t, isMetadata: r = !1, expanded: c, t9nStrings: l }) => {
|
|
36
36
|
switch (e.type) {
|
|
37
37
|
case "null":
|
|
38
38
|
case "unknown":
|
|
@@ -42,34 +42,34 @@ const n = {
|
|
|
42
42
|
case "dateOnly":
|
|
43
43
|
case "time":
|
|
44
44
|
case "boolean":
|
|
45
|
-
const { type:
|
|
46
|
-
return
|
|
45
|
+
const { type: s, value: n } = f(e);
|
|
46
|
+
return a`<calcite-tree-item><div class="tree-item-label">${o({ name: t, isMetadata: r })}${h({ type: s, value: n })}</div></calcite-tree-item>`;
|
|
47
47
|
case "array": {
|
|
48
|
-
const
|
|
49
|
-
return
|
|
48
|
+
const b = e.value ?? [], T = b.slice(0, $);
|
|
49
|
+
return a`<calcite-tree-item .expanded=${c} @click=${d.onClick}><div class="tree-item-label">${o({ name: t, isMetadata: r })}${A({ arcadeResult: e, t9nStrings: l })}</div>${D({ items: T, arrayLength: b.length, subtree: !0, t9nStrings: l })}</calcite-tree-item>`;
|
|
50
50
|
}
|
|
51
51
|
case "geometry":
|
|
52
|
-
return
|
|
52
|
+
return a`<calcite-tree-item .expanded=${c} @click=${d.onClick}><div class="tree-item-label">${o({ name: t, isMetadata: r })}<bdi>${m(e.type)}</bdi></div>${x({ value: e.value, subtree: !0 })}</calcite-tree-item>`;
|
|
53
53
|
case "attachment":
|
|
54
|
-
return
|
|
54
|
+
return a`<calcite-tree-item .expanded=${c} @click=${d.onClick}><div class="tree-item-label">${o({ name: t, isMetadata: r })}<bdi>${m(e.type)}</bdi></div>${k({ obj: e.value.castAsJson(), subtree: !0 })}</calcite-tree-item>`;
|
|
55
55
|
case "feature":
|
|
56
56
|
case "dictionary":
|
|
57
57
|
case "portal":
|
|
58
|
-
return
|
|
58
|
+
return a`<calcite-tree-item .expanded=${c} @click=${d.onClick}><div class="tree-item-label">${o({ name: t, isMetadata: r })}<bdi>${m(e.type)}</bdi></div>${C({ value: e.value, subtree: !0, t9nStrings: l })}</calcite-tree-item>`;
|
|
59
59
|
default:
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
62
|
}, G = ({ arcadeResult: e }) => {
|
|
63
63
|
const t = g(e.value.fields);
|
|
64
|
-
return
|
|
65
|
-
const
|
|
66
|
-
if (!S(
|
|
67
|
-
return
|
|
64
|
+
return a`<div class="table-scroll"><table><thead><tr>${t.map((r) => a`<th>${r.name}</th>`)}</tr></thead><tbody>${e.features.map((r) => a`<tr>${t.map((c) => {
|
|
65
|
+
const l = p(r.field(c.name));
|
|
66
|
+
if (!S(l))
|
|
67
|
+
return a`<td></td>`;
|
|
68
68
|
try {
|
|
69
|
-
const { type:
|
|
70
|
-
return
|
|
69
|
+
const { type: s, value: n } = f(l);
|
|
70
|
+
return a`<td>${h({ type: s, value: n })}</td>`;
|
|
71
71
|
} catch {
|
|
72
|
-
return
|
|
72
|
+
return a`<td></td>`;
|
|
73
73
|
}
|
|
74
74
|
})}</tr>`)}</tbody></table></div>`;
|
|
75
75
|
};
|
|
@@ -79,5 +79,5 @@ export {
|
|
|
79
79
|
B as F,
|
|
80
80
|
G as a,
|
|
81
81
|
D as b,
|
|
82
|
-
|
|
82
|
+
i as t
|
|
83
83
|
};
|
|
@@ -207,7 +207,7 @@ class N extends f {
|
|
|
207
207
|
return r`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${p} .selected=${e === p} @calciteTabsActivate=${(t) => this.activateTab(t.target.tab)}>${this.messages.scope ?? "Scope"}</calcite-tab-title>${g(this.previewTabsState.tabs, (t) => `title-${t.id}`, (t) => r`<calcite-tab-title .tab=${t.id} title=${t.label ?? b} closable .selected=${e === t.id} @calciteTabsActivate=${(a) => this.activateTab(a.target.tab)} @calciteTabsClose=${(a) => this.closePreviewTab(a.target)}><bdi>${t.title}</bdi></calcite-tab-title>`)}</calcite-tab-nav><calcite-tab .tab=${p} .selected=${e === p}><div class="tab-panel">${this.renderScopePanel()}</div></calcite-tab>${g(this.previewTabsState.tabs, (t) => `panel-${t.id}`, (t) => r`<calcite-tab .tab=${t.id} .selected=${e === t.id}><div class="tab-panel preview-panel">${this.renderPreviewPanel(t)}</div></calcite-tab>`)}</calcite-tabs>`;
|
|
208
208
|
}
|
|
209
209
|
render() {
|
|
210
|
-
const { line: e } = this.debuggerStore?.executionState ?? {}, t = this.breakpoints.find((i) => i.line === e), a = this.breakpoints.findIndex((i) => i.line === e);
|
|
210
|
+
const { line: e } = this.debuggerStore?.executionState ?? {}, t = e ? this.breakpoints.find((i) => i.line === e) : this.breakpoints[0], a = e ? this.breakpoints.findIndex((i) => i.line === e) : 0;
|
|
211
211
|
return r`<div class="console-shell">${this.breakpoints.length && r`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + (t?.line ?? e ?? 1) - 1)}>${this.getBreakpointCode(t?.line ?? this.breakpoints[0]?.line ?? e ?? 1)}</arcgis-code-viewer>${this.breakpoints.length ? r`<calcite-action id=${this._breakpointPopoverId ?? b} scale=s .text=${this.getBreakpointPositionText(a >= 0 ? a + 1 : 1)} text-enabled icon=chevron-down></calcite-action>` : null}${this.renderBreakpointPopover(t?.line ?? e)}</div>` || ""}<div class="tabs-container">${this.renderTabs()}</div></div>`;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -6,7 +6,7 @@ import { u as o } from "../../chunks/useT9n.js";
|
|
|
6
6
|
import { d as c, g as n, c as a, t } from "../../chunks/debugger-value-styles.js";
|
|
7
7
|
import { observeAncestorsMutation as u, unsafeGetCalciteModeName as d } from "@arcgis/toolkit/dom";
|
|
8
8
|
import { D as m } from "../../chunks/debugger-value-components.js";
|
|
9
|
-
const p = l`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);--calcite-block-padding: var(--calcite-spacing-sm);overflow:auto;calcite-flow{height:100%}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;display:block;margin:var(--calcite-spacing-md)}
|
|
9
|
+
const p = l`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);--calcite-block-padding: var(--calcite-spacing-sm);overflow:auto;calcite-flow{height:100%}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;display:block;margin:var(--calcite-spacing-md)}[class*=result-value-]{line-height:1.25rem}}`;
|
|
10
10
|
class h extends i {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.messages = o();
|
|
@@ -599,7 +599,7 @@ class we extends ie {
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
_onEditorMouseDown(e) {
|
|
602
|
-
if (!this.enableDebugger || ![this._monacoEditor.MouseTargetType.GUTTER_GLYPH_MARGIN].includes(e.target.type))
|
|
602
|
+
if (!this.enableDebugger || ![this._monacoEditor.MouseTargetType.GUTTER_GLYPH_MARGIN].includes(e.target.type) || e.target.element?.classList.contains("codicon-gutter-lightbulb"))
|
|
603
603
|
return;
|
|
604
604
|
const s = e.target.position?.lineNumber;
|
|
605
605
|
s && this._debuggerState.toggleBreakpoint(s);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as p } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as g, html as e } from "lit";
|
|
4
|
-
import { LitElement as f, createEvent as
|
|
4
|
+
import { LitElement as f, createEvent as u, safeClassMap as r } from "@arcgis/lumina";
|
|
5
5
|
import { setValuesInString as i, uncapitalize as a } from "@arcgis/toolkit/string";
|
|
6
6
|
import { M as v } from "../../chunks/arcade-executor.js";
|
|
7
7
|
import { u as b } from "../../chunks/useT9n.js";
|
|
8
8
|
import { F as $, a as x, t as s, D as y, A as R, b as P } from "../../chunks/functional.js";
|
|
9
|
-
import { d as w, g as k, c as m, b as S, G as T, a as C, S as
|
|
9
|
+
import { d as w, g as k, c as m, b as S, G as T, a as C, S as h } from "../../chunks/debugger-value-styles.js";
|
|
10
10
|
import { createRef as o, ref as n } from "lit/directives/ref.js";
|
|
11
11
|
import { observeAncestorsMutation as M, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
|
|
12
|
-
const L = g`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden;min-height:0}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}
|
|
13
|
-
onClick: (
|
|
14
|
-
const t =
|
|
12
|
+
const L = g`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden;min-height:0}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{display:flex;flex-direction:column;min-height:0;.table-scroll{overflow:auto;flex:1 1 auto;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}}`, c = {
|
|
13
|
+
onClick: (d) => {
|
|
14
|
+
const t = d.currentTarget;
|
|
15
15
|
t.expanded = !t.expanded;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
class F extends f {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.messages = b(), this.outputRef = o(), this.consoleRef = o(), this.logRef = o(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel =
|
|
20
|
+
super(...arguments), this.messages = b(), this.outputRef = o(), this.consoleRef = o(), this.logRef = o(), this.openedResultPanel = "output", this.hideHeader = !1, this.arcgisInternalClosePanel = u({ bubbles: !1, composed: !1 }), this.arcgisInternalOpenedResultPanelChange = u({ bubbles: !1, composed: !1 });
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.properties = { consoleLogs: 0, loading: 5, openedResultPanel: 3, result: 0, hideHeader: 5 };
|
|
@@ -48,7 +48,7 @@ class F extends f {
|
|
|
48
48
|
I(this.el) === "dark" ? this.elementInternals.states.add(m) : this.elementInternals.states.delete(m);
|
|
49
49
|
}
|
|
50
50
|
renderConsolePanel() {
|
|
51
|
-
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : e`<div class="console-logs-container
|
|
51
|
+
return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "loading"}></calcite-loader>` : e`<div class="console-logs-container">${this.consoleLogs?.length ? this.consoleLogs.map((t) => e`<p>${t}</p>`) : e`<p>${this.messages.consolemessage}</p>`}</div>`;
|
|
52
52
|
}
|
|
53
53
|
renderLogPanel() {
|
|
54
54
|
if (this.openedResultPanel !== "log")
|
|
@@ -85,7 +85,7 @@ class F extends f {
|
|
|
85
85
|
return e`<div class="result-value-simple flex-adjustable">${i(this.messages.executionerrorformat ?? "", { message: this.result.value })}</div>`;
|
|
86
86
|
case "null":
|
|
87
87
|
case "unknown":
|
|
88
|
-
return e`<div class="result-value-simple
|
|
88
|
+
return e`<div class="result-value-simple">${h({ type: this.result.type, value: a(this.result.type) })}</div>`;
|
|
89
89
|
case "text":
|
|
90
90
|
case "number":
|
|
91
91
|
case "date":
|
|
@@ -93,33 +93,33 @@ class F extends f {
|
|
|
93
93
|
case "time":
|
|
94
94
|
case "boolean": {
|
|
95
95
|
const { type: t, value: l } = C(this.result);
|
|
96
|
-
return e`<div class="result-value-simple
|
|
96
|
+
return e`<div class="result-value-simple"><bdi class="value-type">${a(this.result.type)}: </bdi>${h({ type: t, value: l })}</div>`;
|
|
97
97
|
}
|
|
98
98
|
case "array": {
|
|
99
99
|
const l = (this.result.value ?? []).slice(0, v);
|
|
100
|
-
return e`<div class="result-value-simple
|
|
100
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label">${R({ arcadeResult: this.result, t9nStrings: this.messages })}</div>${P({ items: l, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
101
101
|
}
|
|
102
102
|
case "geometry":
|
|
103
|
-
return e`<div class="result-value-simple
|
|
103
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${T({ value: this.result.value, subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
104
104
|
case "attachment":
|
|
105
|
-
return e`<div class="result-value-simple
|
|
105
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${S({ obj: this.result.value.castAsJson(), subtree: !0 })}</calcite-tree-item></calcite-tree></div>`;
|
|
106
106
|
case "feature":
|
|
107
107
|
case "dictionary":
|
|
108
108
|
case "portal":
|
|
109
|
-
return e`<div class="result-value-simple
|
|
109
|
+
return e`<div class="result-value-simple"><calcite-tree .lines=${s.lines} .selectionMode=${s.selectionMode} .scale=${s.scale} @calciteTreeSelect=${s.oncalciteTreeSelect}><calcite-tree-item expanded @click=${c.onClick}><div class="tree-item-label"><bdi>${a(this.result.type)}</bdi></div>${y({ value: this.result.value, subtree: !0, t9nStrings: this.messages })}</calcite-tree-item></calcite-tree></div>`;
|
|
110
110
|
case "featureSet":
|
|
111
|
-
return e`<div class="result-value-table
|
|
111
|
+
return e`<div class="result-value-table">${$({ arcadeResult: this.result, t9nStrings: this.messages })}${x({ arcadeResult: this.result })}</div>`;
|
|
112
112
|
case "knowledgeGraph":
|
|
113
|
-
return e`<div class="result-value-simple
|
|
113
|
+
return e`<div class="result-value-simple"><bdi class="value-type">${a(this.result.type)}: </bdi><bdi class="string-value">${this.result.value.url}</bdi></div>`;
|
|
114
114
|
default:
|
|
115
|
-
return e`<div class="result-value-simple flex-adjustable
|
|
115
|
+
return e`<div class="result-value-simple flex-adjustable">${this.messages.runscriptmessage}</div>`;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
119
|
return e`${this.hideHeader ? null : e`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel === "output"} .text=${this.messages.output ?? ""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${n(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "console"} .text=${this.messages.console ?? ""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${n(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel === "log"} .text=${this.messages.log ?? ""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${n(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close ?? ""} @click=${this._emitClose}></calcite-action></header>`}<article class="flex-adjustable">${this.loading ? e`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : e`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
p("arcgis-arcade-results", F);
|
|
123
123
|
export {
|
|
124
124
|
F as ArcgisArcadeResults
|
|
125
125
|
};
|
|
@@ -3,86 +3,91 @@ import { c as g } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css as f, html as x } from "lit";
|
|
4
4
|
import { LitElement as v } from "@arcgis/lumina";
|
|
5
5
|
import { slotChangeHasContent as y } from "@arcgis/toolkit/dom";
|
|
6
|
-
import { createRef as
|
|
7
|
-
const w = f`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:0;align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-sm-plus);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`, z = 10, P = 25,
|
|
6
|
+
import { createRef as l, ref as c } from "lit/directives/ref.js";
|
|
7
|
+
const w = f`:host{--internal-border: var(--arcgis-coding-components-border, 1px solid var(--calcite-color-border-3));--internal-background-color: var(--arcgis-coding-components-background-color, var(--calcite-color-foreground-1));--internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--internal-code-editor-side-panel-w: var(--arcgis-coding-components-code-editor-side-panel-w, 600px);--internal-code-editor-side-panel-max-w: var(--arcgis-coding-components-code-editor-side-panel-max-w, 45%);--internal-code-editor-results-panel-max-h: var(--arcgis-coding-components-code-editor-results-panel-max-h, 50%);--internal-code-editor-results-panel-h: var(--arcgis-coding-components-code-editor-results-panel-h, 50%);--internal-code-editor-results-panel-bottom-drawer-controls-h: 0px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--internal-border);box-sizing:border-box;background-color:var(--internal-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.bottom-drawer{display:flex;flex:0 0 auto;flex-direction:column;overflow:hidden;position:relative;box-sizing:border-box;min-height:0}.bottom-drawer-resize-handle{display:none;position:absolute;inset-inline:0;inset-block-start:0;align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-sm-plus);cursor:ns-resize;touch-action:none;user-select:none;z-index:var(--calcite-z-index-header);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);outline:none}.bottom-drawer-resize-handle-bar{display:flex;align-items:center;justify-content:center;inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transition:box-shadow .12s ease,color .12s ease,background-color .12s ease}.bottom-drawer-resize-handle-bar calcite-icon{color:inherit}}:host(:state(results-has-content)) .bottom-drawer{padding-block-start:var(--calcite-size-fixed-sm-plus);height:calc(var(--internal-code-editor-results-panel-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h));max-height:calc(var(--internal-code-editor-results-panel-max-h) + var(--internal-code-editor-results-panel-bottom-drawer-controls-h))}:host(:state(results-has-content)) .bottom-drawer-resize-handle{display:flex}:host(:state(results-has-content)) .bottom-drawer-resize-handle:focus .bottom-drawer-resize-handle-bar{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host(:state(results-has-content)) .bottom-drawer-resize-handle:hover .bottom-drawer-resize-handle-bar,:host(:state(results-has-content)) .bottom-drawer-resize-handle .bottom-drawer-resize-handle-bar,:host(:state(is-resizing)) .bottom-drawer-resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}:host(:state(results-has-content)) slot[name=bottom-action-bar]::slotted(*){border-top:0}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--internal-code-editor-side-panel-max-w);width:var(--internal-code-editor-side-panel-w);border-inline-start:var(--internal-border);box-sizing:border-box;flex:1 0 auto}slot[name=side-panel]::slotted(.hidden){display:none}slot[name=editor]::slotted(*){flex:auto;min-height:0}slot[name=results-panel]{display:flex;flex:1 1 auto;overflow:hidden;min-height:0}slot[name=results-panel]::slotted(*){border-top:var(--internal-border);box-sizing:border-box;flex:1 1 auto;min-height:0}slot[name=side-action-bar]::slotted(*){max-width:var(--internal-side-action-bar-max-w);border-inline-start:var(--internal-border)}`, z = 10, P = 25, h = 100, u = "results-has-content", m = "is-resizing", H = "--arcgis-coding-components-code-editor-results-panel-max-h", s = "--internal-code-editor-results-panel-h", n = "--internal-code-editor-results-panel-max-h", i = "--internal-code-editor-results-panel-bottom-drawer-controls-h";
|
|
8
8
|
class R extends v {
|
|
9
9
|
static {
|
|
10
10
|
this.styles = [w];
|
|
11
11
|
}
|
|
12
12
|
#e = void 0;
|
|
13
|
-
#
|
|
14
|
-
#n =
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
#t = !1;
|
|
14
|
+
#n = !1;
|
|
15
|
+
#a = l();
|
|
16
|
+
#h = l();
|
|
17
|
+
#l = l();
|
|
18
|
+
#r;
|
|
19
|
+
#u(e) {
|
|
20
|
+
this.#e === e.pointerId && this.#o();
|
|
21
|
+
}
|
|
22
|
+
#f = (e) => {
|
|
23
|
+
this.#e === e.pointerId && this.#o();
|
|
23
24
|
};
|
|
24
25
|
load() {
|
|
25
|
-
this.manager.onLifecycle(() => (this.#
|
|
26
|
-
this
|
|
27
|
-
}), this.updateComplete.then(() => this.#
|
|
28
|
-
this.#
|
|
26
|
+
this.manager.onLifecycle(() => (this.#r = new ResizeObserver(() => {
|
|
27
|
+
this.#t && this.#i();
|
|
28
|
+
}), this.updateComplete.then(() => this.#g()), () => {
|
|
29
|
+
this.#o(), this.#r?.disconnect(), this.#r = void 0;
|
|
29
30
|
}));
|
|
30
31
|
}
|
|
31
|
-
#
|
|
32
|
-
this
|
|
33
|
-
}
|
|
34
|
-
#x(e) {
|
|
35
|
-
e.button !== 0 || !this.elementInternals.states.has(i) || (e.preventDefault(), e.currentTarget instanceof HTMLElement && (e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId)), this.#e = e.pointerId, this.#i = !0, this.elementInternals.states.add(m), this.#u(e));
|
|
32
|
+
#x() {
|
|
33
|
+
this.#t && this.#i(), this.#g();
|
|
36
34
|
}
|
|
37
35
|
#v(e) {
|
|
38
|
-
|
|
39
|
-
return;
|
|
40
|
-
this.#s();
|
|
41
|
-
const t = this.#P(e);
|
|
42
|
-
t != null && (e.preventDefault(), e.stopPropagation(), this.#i = !0, this.#c(t));
|
|
36
|
+
e.button !== 0 || !this.#t || (e.preventDefault(), e.currentTarget instanceof HTMLElement && (e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId)), this.#e = e.pointerId, this.#n = !0, this.elementInternals.states.add(m), this.#m(e));
|
|
43
37
|
}
|
|
44
38
|
#y(e) {
|
|
39
|
+
if (!this.#t)
|
|
40
|
+
return;
|
|
41
|
+
this.#i();
|
|
42
|
+
const t = this.#H(e);
|
|
43
|
+
t != null && (e.preventDefault(), e.stopPropagation(), this.#n = !0, this.#d(t));
|
|
44
|
+
}
|
|
45
|
+
#w(e) {
|
|
45
46
|
if (!e.target)
|
|
46
47
|
return;
|
|
47
48
|
const r = y(e);
|
|
48
|
-
|
|
49
|
+
if (this.#t = r, r) {
|
|
50
|
+
this.elementInternals.states.add(u), this.#i();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.#o(), this.#n || this.#C(), this.elementInternals.states.delete(u);
|
|
49
54
|
}
|
|
50
|
-
#
|
|
55
|
+
#o() {
|
|
51
56
|
const e = this.#e;
|
|
52
57
|
if (!e)
|
|
53
58
|
return;
|
|
54
59
|
this.#e = void 0;
|
|
55
|
-
const t = this.#
|
|
60
|
+
const t = this.#h.value;
|
|
56
61
|
t?.hasPointerCapture(e) && t.releasePointerCapture(e), this.elementInternals.states.delete(m);
|
|
57
62
|
}
|
|
58
|
-
#
|
|
63
|
+
#m(e) {
|
|
59
64
|
if (this.#e !== e.pointerId)
|
|
60
65
|
return;
|
|
61
|
-
const t = this.#
|
|
62
|
-
this.#
|
|
66
|
+
const t = this.#s(), r = this.el.getBoundingClientRect().bottom - e.clientY - t;
|
|
67
|
+
this.#d(r, t);
|
|
63
68
|
}
|
|
64
|
-
#
|
|
69
|
+
#z() {
|
|
65
70
|
const e = Number.parseFloat(this.el.style.getPropertyValue(s));
|
|
66
71
|
if (Number.isFinite(e))
|
|
67
72
|
return e;
|
|
68
|
-
const t = Number.parseFloat(getComputedStyle(this.#
|
|
69
|
-
return Number.isFinite(t) ? Math.max(0, t - this.#
|
|
73
|
+
const t = Number.parseFloat(getComputedStyle(this.#a.value ?? this.el).height);
|
|
74
|
+
return Number.isFinite(t) ? Math.max(0, t - this.#s()) : h;
|
|
70
75
|
}
|
|
71
|
-
#
|
|
76
|
+
#p() {
|
|
72
77
|
return this.el.querySelector(':scope > [slot="bottom-action-bar"]');
|
|
73
78
|
}
|
|
74
|
-
#
|
|
75
|
-
const e = this.#
|
|
79
|
+
#s() {
|
|
80
|
+
const e = this.#p()?.getBoundingClientRect().height ?? 0, t = this.#l.value?.getBoundingClientRect().height ?? 0;
|
|
76
81
|
return e + t;
|
|
77
82
|
}
|
|
78
|
-
#
|
|
83
|
+
#b() {
|
|
79
84
|
return getComputedStyle(this.el).getPropertyValue(H).trim() || null;
|
|
80
85
|
}
|
|
81
|
-
#
|
|
86
|
+
#c(e, t) {
|
|
82
87
|
t ? this.el.style.setProperty(e, t) : this.el.style.removeProperty(e);
|
|
83
88
|
}
|
|
84
|
-
#
|
|
85
|
-
const t = this.#
|
|
89
|
+
#P(e) {
|
|
90
|
+
const t = this.#b();
|
|
86
91
|
if (!t)
|
|
87
92
|
return null;
|
|
88
93
|
const r = Number.parseFloat(t);
|
|
@@ -90,26 +95,26 @@ class R extends v {
|
|
|
90
95
|
return r;
|
|
91
96
|
if (t.endsWith("%") && Number.isFinite(r))
|
|
92
97
|
return this.el.getBoundingClientRect().height * r / 100;
|
|
93
|
-
const o = this.#
|
|
98
|
+
const o = this.#a.value;
|
|
94
99
|
if (!o)
|
|
95
100
|
return null;
|
|
96
|
-
const
|
|
97
|
-
this.el.style.setProperty(
|
|
98
|
-
const
|
|
99
|
-
return this.#
|
|
101
|
+
const a = this.el.style.getPropertyValue(i), p = this.el.style.getPropertyValue(s), b = this.el.style.getPropertyValue(n);
|
|
102
|
+
this.el.style.setProperty(i, `${e}px`), this.el.style.setProperty(s, `${this.el.getBoundingClientRect().height}px`), this.el.style.setProperty(n, t);
|
|
103
|
+
const d = Number.parseFloat(getComputedStyle(o).height);
|
|
104
|
+
return this.#c(i, a), this.#c(s, p), this.#c(n, b), Number.isFinite(d) ? Math.max(0, d - e) : null;
|
|
100
105
|
}
|
|
101
|
-
#
|
|
102
|
-
const e = this.#
|
|
106
|
+
#g() {
|
|
107
|
+
const e = this.#r;
|
|
103
108
|
if (!e)
|
|
104
109
|
return;
|
|
105
110
|
e.disconnect(), e.observe(this.el);
|
|
106
|
-
const t = this.#
|
|
111
|
+
const t = this.#l.value;
|
|
107
112
|
t && e.observe(t);
|
|
108
|
-
const r = this.#
|
|
113
|
+
const r = this.#p();
|
|
109
114
|
r && e.observe(r);
|
|
110
115
|
}
|
|
111
|
-
#
|
|
112
|
-
const t = e.shiftKey ? P : z, r = this.#
|
|
116
|
+
#H(e) {
|
|
117
|
+
const t = e.shiftKey ? P : z, r = this.#z();
|
|
113
118
|
switch (e.key) {
|
|
114
119
|
case "ArrowUp":
|
|
115
120
|
return r + t;
|
|
@@ -119,23 +124,23 @@ class R extends v {
|
|
|
119
124
|
return;
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
|
-
#
|
|
123
|
-
const r = Math.max(0, this.el.getBoundingClientRect().height - t), o = this.#
|
|
124
|
-
return Math.min(Math.max(e,
|
|
127
|
+
#R(e, t) {
|
|
128
|
+
const r = Math.max(0, this.el.getBoundingClientRect().height - t), o = this.#P(t), a = o == null ? r : Math.min(r, o);
|
|
129
|
+
return Math.min(Math.max(e, h), a);
|
|
125
130
|
}
|
|
126
|
-
#
|
|
127
|
-
const r = this.#
|
|
128
|
-
this.el.style.setProperty(
|
|
131
|
+
#d(e, t = this.#s()) {
|
|
132
|
+
const r = this.#R(e, t), o = this.#b();
|
|
133
|
+
this.el.style.setProperty(i, `${t}px`), this.el.style.setProperty(s, `${r}px`), this.el.style.setProperty(n, o ?? `calc(100% - ${t}px)`);
|
|
129
134
|
}
|
|
130
|
-
#
|
|
131
|
-
this.el.style.removeProperty(
|
|
135
|
+
#C() {
|
|
136
|
+
this.el.style.removeProperty(i), this.el.style.removeProperty(s), this.el.style.removeProperty(n);
|
|
132
137
|
}
|
|
133
|
-
#
|
|
134
|
-
const e = this.#
|
|
135
|
-
return Number.isFinite(t) ? this.#
|
|
138
|
+
#i() {
|
|
139
|
+
const e = this.#s(), t = Number.parseFloat(this.el.style.getPropertyValue(s));
|
|
140
|
+
return Number.isFinite(t) ? this.#d(t, e) : this.el.style.setProperty(i, `${e}px`), e;
|
|
136
141
|
}
|
|
137
142
|
render() {
|
|
138
|
-
return x`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${
|
|
143
|
+
return x`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><div class="bottom-drawer" ${c(this.#a)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#u} @pointerdown=${this.#v} @pointermove=${this.#m} @pointerup=${this.#u} @lostpointercapture=${this.#f} @keydown=${this.#y} ${c(this.#h)}><div class="bottom-drawer-resize-handle-bar" ${c(this.#l)}><calcite-icon icon=drag-resize-vertical scale=s></calcite-icon></div></div><slot name=bottom-action-bar @slotchange=${this.#x}></slot><slot name=results-panel @slotchange=${this.#w}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`;
|
|
139
144
|
}
|
|
140
145
|
}
|
|
141
146
|
g("arcgis-code-editor-shell", R);
|