@arcgis/coding-components 5.1.0-next.90 → 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/{MC6EICRD.js → 6BS5M2LA.js} +1 -1
- package/dist/cdn/{KA5TX72B.js → CMZFQA5X.js} +6 -2
- package/dist/cdn/KLNTCPWU.js +2 -0
- package/dist/cdn/{NEIT2PGG.js → ODCW355N.js} +1 -1
- package/dist/cdn/Q376WIX4.js +2 -0
- package/dist/cdn/{YVF4PPDB.js → UB7TEPYB.js} +1 -1
- package/dist/cdn/{NKJUJKFG.js → XDBYQYMN.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.en.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 +92 -89
- package/dist/chunks/debugger-value-styles.js +6 -2
- package/dist/components/arcgis-code-editor-shell/customElement.js +135 -17
- package/dist/components/arcgis-code-editor-shell/index.js +1 -0
- 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/3VRELPEF.js +0 -2
- package/dist/cdn/6EKA3H3N.js +0 -2
|
@@ -1,26 +1,144 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { slotChangeHasContent as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { c as g } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as x, html as f } from "lit";
|
|
4
|
+
import { LitElement as v } from "@arcgis/lumina";
|
|
5
|
+
import { slotChangeHasContent as y } from "@arcgis/toolkit/dom";
|
|
6
|
+
import { createRef as c, ref as d } from "lit/directives/ref.js";
|
|
7
|
+
const w = x`: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:calc((var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1);align-items:center;justify-content:center;block-size:var(--calcite-size-fixed-xxl);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, u = 100, i = "results-has-content", m = "is-resizing", H = "--arcgis-coding-components-code-editor-results-panel-max-h", s = "--internal-code-editor-results-panel-h", a = "--internal-code-editor-results-panel-max-h", n = "--internal-code-editor-results-panel-bottom-drawer-controls-h";
|
|
8
|
+
class R extends v {
|
|
9
|
+
static {
|
|
10
|
+
this.styles = [w];
|
|
11
|
+
}
|
|
12
|
+
#e = void 0;
|
|
13
|
+
#i = !1;
|
|
14
|
+
#n = c();
|
|
15
|
+
#d = c();
|
|
16
|
+
#a = c();
|
|
17
|
+
#t;
|
|
18
|
+
#h(e) {
|
|
19
|
+
this.#e === e.pointerId && this.#r();
|
|
20
|
+
}
|
|
21
|
+
#g = (e) => {
|
|
22
|
+
this.#e === e.pointerId && this.#r();
|
|
23
|
+
};
|
|
24
|
+
load() {
|
|
25
|
+
this.manager.onLifecycle(() => (this.#t = new ResizeObserver(() => {
|
|
26
|
+
this.elementInternals.states.has(i) && this.#s();
|
|
27
|
+
}), this.updateComplete.then(() => this.#b()), () => {
|
|
28
|
+
this.#r(), this.#t?.disconnect(), this.#t = void 0;
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
#x() {
|
|
32
|
+
this.elementInternals.states.has(i) && this.#s(), this.#b();
|
|
33
|
+
}
|
|
34
|
+
#f(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));
|
|
36
|
+
}
|
|
37
|
+
#v(e) {
|
|
38
|
+
if (!this.elementInternals.states.has(i))
|
|
39
|
+
return;
|
|
40
|
+
this.#s();
|
|
41
|
+
const t = this.#P(e);
|
|
42
|
+
t != null && (e.preventDefault(), e.stopPropagation(), this.#i = !0, this.#c(t));
|
|
43
|
+
}
|
|
44
|
+
#y(e) {
|
|
45
|
+
if (!e.target)
|
|
46
|
+
return;
|
|
47
|
+
const r = y(e);
|
|
48
|
+
r || (this.#r(), this.#i || this.#R()), r ? (this.elementInternals.states.add(i), this.#s()) : this.elementInternals.states.delete(i);
|
|
49
|
+
}
|
|
50
|
+
#r() {
|
|
51
|
+
const e = this.#e;
|
|
52
|
+
if (!e)
|
|
53
|
+
return;
|
|
54
|
+
this.#e = void 0;
|
|
55
|
+
const t = this.#d.value;
|
|
56
|
+
t?.hasPointerCapture(e) && t.releasePointerCapture(e), this.elementInternals.states.delete(m);
|
|
57
|
+
}
|
|
58
|
+
#u(e) {
|
|
59
|
+
if (this.#e !== e.pointerId)
|
|
60
|
+
return;
|
|
61
|
+
const t = this.#o(), r = this.el.getBoundingClientRect().bottom - e.clientY - t;
|
|
62
|
+
this.#c(r, t);
|
|
63
|
+
}
|
|
64
|
+
#w() {
|
|
65
|
+
const e = Number.parseFloat(this.el.style.getPropertyValue(s));
|
|
66
|
+
if (Number.isFinite(e))
|
|
67
|
+
return e;
|
|
68
|
+
const t = Number.parseFloat(getComputedStyle(this.#n.value ?? this.el).height);
|
|
69
|
+
return Number.isFinite(t) ? Math.max(0, t - this.#o()) : u;
|
|
70
|
+
}
|
|
71
|
+
#m() {
|
|
72
|
+
return this.el.querySelector(':scope > [slot="bottom-action-bar"]');
|
|
73
|
+
}
|
|
74
|
+
#o() {
|
|
75
|
+
const e = this.#m()?.getBoundingClientRect().height ?? 0, t = this.#a.value?.getBoundingClientRect().height ?? 0;
|
|
76
|
+
return e + t;
|
|
77
|
+
}
|
|
78
|
+
#p() {
|
|
79
|
+
return getComputedStyle(this.el).getPropertyValue(H).trim() || null;
|
|
80
|
+
}
|
|
81
|
+
#l(e, t) {
|
|
82
|
+
t ? this.el.style.setProperty(e, t) : this.el.style.removeProperty(e);
|
|
83
|
+
}
|
|
84
|
+
#z(e) {
|
|
85
|
+
const t = this.#p();
|
|
86
|
+
if (!t)
|
|
87
|
+
return null;
|
|
88
|
+
const r = Number.parseFloat(t);
|
|
89
|
+
if (t.endsWith("px") && Number.isFinite(r))
|
|
90
|
+
return r;
|
|
91
|
+
if (t.endsWith("%") && Number.isFinite(r))
|
|
92
|
+
return this.el.getBoundingClientRect().height * r / 100;
|
|
93
|
+
const o = this.#n.value;
|
|
94
|
+
if (!o)
|
|
95
|
+
return null;
|
|
96
|
+
const l = this.el.style.getPropertyValue(n), p = this.el.style.getPropertyValue(s), b = this.el.style.getPropertyValue(a);
|
|
97
|
+
this.el.style.setProperty(n, `${e}px`), this.el.style.setProperty(s, `${this.el.getBoundingClientRect().height}px`), this.el.style.setProperty(a, t);
|
|
98
|
+
const h = Number.parseFloat(getComputedStyle(o).height);
|
|
99
|
+
return this.#l(n, l), this.#l(s, p), this.#l(a, b), Number.isFinite(h) ? Math.max(0, h - e) : null;
|
|
100
|
+
}
|
|
101
|
+
#b() {
|
|
102
|
+
const e = this.#t;
|
|
103
|
+
if (!e)
|
|
104
|
+
return;
|
|
105
|
+
e.disconnect(), e.observe(this.el);
|
|
106
|
+
const t = this.#a.value;
|
|
107
|
+
t && e.observe(t);
|
|
108
|
+
const r = this.#m();
|
|
109
|
+
r && e.observe(r);
|
|
110
|
+
}
|
|
111
|
+
#P(e) {
|
|
112
|
+
const t = e.shiftKey ? P : z, r = this.#w();
|
|
113
|
+
switch (e.key) {
|
|
114
|
+
case "ArrowUp":
|
|
115
|
+
return r + t;
|
|
116
|
+
case "ArrowDown":
|
|
117
|
+
return r - t;
|
|
118
|
+
default:
|
|
11
119
|
return;
|
|
12
|
-
|
|
13
|
-
this.el.classList.toggle("results-has-content", e);
|
|
14
|
-
};
|
|
120
|
+
}
|
|
15
121
|
}
|
|
16
|
-
|
|
17
|
-
this.
|
|
122
|
+
#H(e, t) {
|
|
123
|
+
const r = Math.max(0, this.el.getBoundingClientRect().height - t), o = this.#z(t), l = o == null ? r : Math.min(r, o);
|
|
124
|
+
return Math.min(Math.max(e, u), l);
|
|
125
|
+
}
|
|
126
|
+
#c(e, t = this.#o()) {
|
|
127
|
+
const r = this.#H(e, t), o = this.#p();
|
|
128
|
+
this.el.style.setProperty(n, `${t}px`), this.el.style.setProperty(s, `${r}px`), this.el.style.setProperty(a, o ?? `calc(100% - ${t}px)`);
|
|
129
|
+
}
|
|
130
|
+
#R() {
|
|
131
|
+
this.el.style.removeProperty(n), this.el.style.removeProperty(s), this.el.style.removeProperty(a);
|
|
132
|
+
}
|
|
133
|
+
#s() {
|
|
134
|
+
const e = this.#o(), t = Number.parseFloat(this.el.style.getPropertyValue(s));
|
|
135
|
+
return Number.isFinite(t) ? this.#c(t, e) : this.el.style.setProperty(n, `${e}px`), e;
|
|
18
136
|
}
|
|
19
137
|
render() {
|
|
20
|
-
return
|
|
138
|
+
return f`<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" ${d(this.#n)}><div aria-label="Resize results panel" aria-orientation=horizontal class="bottom-drawer-resize-handle" role=separator tabindex=0 @pointercancel=${this.#h} @pointerdown=${this.#f} @pointermove=${this.#u} @pointerup=${this.#h} @lostpointercapture=${this.#g} @keydown=${this.#v} ${d(this.#d)}><div class="bottom-drawer-resize-handle-bar" ${d(this.#a)}><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.#y}></slot></div></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`;
|
|
21
139
|
}
|
|
22
140
|
}
|
|
23
|
-
|
|
141
|
+
g("arcgis-code-editor-shell", R);
|
|
24
142
|
export {
|
|
25
|
-
|
|
143
|
+
R as CodeEditorShell
|
|
26
144
|
};
|