@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.
Files changed (59) hide show
  1. package/dist/cdn/{MC6EICRD.js → 6BS5M2LA.js} +1 -1
  2. package/dist/cdn/{KA5TX72B.js → CMZFQA5X.js} +6 -2
  3. package/dist/cdn/KLNTCPWU.js +2 -0
  4. package/dist/cdn/{NEIT2PGG.js → ODCW355N.js} +1 -1
  5. package/dist/cdn/Q376WIX4.js +2 -0
  6. package/dist/cdn/{YVF4PPDB.js → UB7TEPYB.js} +1 -1
  7. package/dist/cdn/{NKJUJKFG.js → XDBYQYMN.js} +1 -1
  8. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ar.json +1 -1
  9. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bg.json +1 -1
  10. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bs.json +1 -1
  11. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ca.json +1 -1
  12. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.cs.json +1 -1
  13. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.da.json +1 -1
  14. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.de.json +1 -1
  15. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.el.json +1 -1
  16. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.en.json +1 -1
  17. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.es.json +1 -1
  18. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.et.json +1 -1
  19. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fi.json +1 -1
  20. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fr.json +1 -1
  21. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.he.json +1 -1
  22. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hr.json +1 -1
  23. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hu.json +1 -1
  24. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.id.json +1 -1
  25. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.it.json +1 -1
  26. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ja.json +1 -1
  27. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ko.json +1 -1
  28. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lt.json +1 -1
  29. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lv.json +1 -1
  30. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.nl.json +1 -1
  31. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.no.json +1 -1
  32. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pl.json +1 -1
  33. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-BR.json +1 -1
  34. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-PT.json +1 -1
  35. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ro.json +1 -1
  36. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ru.json +1 -1
  37. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sk.json +1 -1
  38. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sl.json +1 -1
  39. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sr.json +1 -1
  40. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sv.json +1 -1
  41. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.th.json +1 -1
  42. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.tr.json +1 -1
  43. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.uk.json +1 -1
  44. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.vi.json +1 -1
  45. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-CN.json +1 -1
  46. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-HK.json +1 -1
  47. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-TW.json +1 -1
  48. package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
  49. package/dist/cdn/index.js +1 -1
  50. package/dist/chunks/debugger-value-components.js +92 -89
  51. package/dist/chunks/debugger-value-styles.js +6 -2
  52. package/dist/components/arcgis-code-editor-shell/customElement.js +135 -17
  53. package/dist/components/arcgis-code-editor-shell/index.js +1 -0
  54. package/dist/docs/api.json +1 -1
  55. package/dist/docs/docs.json +1 -1
  56. package/dist/docs/web-types.json +1 -1
  57. package/package.json +5 -5
  58. package/dist/cdn/3VRELPEF.js +0 -2
  59. 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 n } from "../../chunks/runtime.js";
3
- import { css as t, html as r } from "lit";
4
- import { LitElement as a } from "@arcgis/lumina";
5
- import { slotChangeHasContent as s } from "@arcgis/toolkit/dom";
6
- const i = t`:host{--arcgis-coding-components-internal-border: var( --arcgis-coding-components-border, 1px solid var(--calcite-color-border-3) );--arcgis-coding-components-internal-background-color: var( --arcgis-coding-components-background-color, var(--calcite-color-foreground-1) );--arcgis-coding-components-internal-side-action-bar-max-w: var(--arcgis-coding-components-side-action-bar-max-w, 25%);--arcgis-coding-components-internal-code-editor-side-panel-w: var( --arcgis-coding-components-code-editor-side-panel-w, 600px );--arcgis-coding-components-internal-code-editor-side-panel-max-w: var( --arcgis-coding-components-code-editor-side-panel-max-w, 45% );--arcgis-coding-components-internal-code-editor-results-panel-max-h: var( --arcgis-coding-components-code-editor-results-panel-max-h, 50% );--arcgis-coding-components-internal-code-editor-results-panel-h: var( --arcgis-coding-components-code-editor-results-panel-h, 50% );display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-internal-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-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}}slot[name=top-action-bar]{flex:0 0 auto}slot[name=top-action-bar]::slotted(*){border-bottom:var(--arcgis-coding-components-internal-border)}slot[name=bottom-action-bar]{flex:0 0 auto}slot[name=bottom-action-bar]::slotted(*){border-top:var(--arcgis-coding-components-internal-border)}slot[name=side-panel]::slotted(*){max-width:var(--arcgis-coding-components-internal-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-internal-code-editor-side-panel-w);border-inline-start:var(--arcgis-coding-components-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:0 0 auto;overflow:hidden}:host(.results-has-content) slot[name=results-panel]{height:var(--arcgis-coding-components-internal-code-editor-results-panel-h);max-height:var(--arcgis-coding-components-internal-code-editor-results-panel-max-h)}slot[name=results-panel]::slotted(*){border-top:var(--arcgis-coding-components-internal-border);box-sizing:border-box;flex:auto}slot[name=side-action-bar]::slotted(*){max-width:var(--arcgis-coding-components-internal-side-action-bar-max-w);border-inline-start:var(--arcgis-coding-components-internal-border)}`;
7
- class l extends a {
8
- constructor() {
9
- super(...arguments), this._onResultsPanelSlotChange = (o) => {
10
- if (!o.target)
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
- const e = s(o);
13
- this.el.classList.toggle("results-has-content", e);
14
- };
120
+ }
15
121
  }
16
- static {
17
- this.styles = [i];
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 r`<slot name=top-action-bar></slot><div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><slot name=editor></slot><slot name=bottom-action-bar></slot><slot name=results-panel @slotchange=${this._onResultsPanelSlotChange}></slot></div><slot name=side-panel></slot><slot name=side-action-bar></slot></div>`;
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
- n("arcgis-code-editor-shell", l);
141
+ g("arcgis-code-editor-shell", R);
24
142
  export {
25
- l as CodeEditorShell
143
+ R as CodeEditorShell
26
144
  };
@@ -1 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-icon";
1
2
  export * from "./customElement.js";