@arcgis/coding-components 4.32.0-next.17 → 4.32.0-next.19

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 (67) hide show
  1. package/dist/arcgis-coding-components/{PJIM5CVB.js → 3L4RY47I.js} +2 -2
  2. package/dist/arcgis-coding-components/{E55X3A5I.js → 3WAL6VTQ.js} +2 -2
  3. package/dist/arcgis-coding-components/{DQDWUNRW.js → 4NW6ASPU.js} +2 -2
  4. package/dist/arcgis-coding-components/{LJH27Y2G.js → BG6T7AY3.js} +2 -2
  5. package/dist/arcgis-coding-components/{6CXAVCJD.js → BSECA2RU.js} +2 -2
  6. package/dist/arcgis-coding-components/{DQJ2C7BA.js → DZ2N5TAI.js} +2 -2
  7. package/dist/arcgis-coding-components/ETKZJLUJ.js +6 -0
  8. package/dist/arcgis-coding-components/{PKO3WCVQ.js → FLQRTGRO.js} +2 -2
  9. package/dist/arcgis-coding-components/{CB7FNZGQ.js → GOEY6DHU.js} +1 -1
  10. package/dist/arcgis-coding-components/{PTUK2NVN.js → GW4QIVKG.js} +2 -2
  11. package/dist/arcgis-coding-components/{PAGWYFQI.js → ILD5GAZP.js} +2 -2
  12. package/dist/arcgis-coding-components/{JRQTAI77.js → IYYILYHU.js} +3 -3
  13. package/dist/arcgis-coding-components/{ISEFWYKS.js → JFN5WQCV.js} +2 -2
  14. package/dist/arcgis-coding-components/{VYGQDML4.js → LIZ57PRQ.js} +2 -2
  15. package/dist/arcgis-coding-components/{XAP4VSRB.js → LJAXVC46.js} +2 -2
  16. package/dist/arcgis-coding-components/{H3ZXUPGI.js → LKU4PQIS.js} +2 -2
  17. package/dist/arcgis-coding-components/{KTIY5U7I.js → LP55G6VH.js} +2 -2
  18. package/dist/arcgis-coding-components/{7RT3IUBL.js → LVXPIL5J.js} +2 -2
  19. package/dist/arcgis-coding-components/{BXMDUOG5.js → LYMIMUDX.js} +2 -2
  20. package/dist/arcgis-coding-components/{PP4LQMW6.js → MBQDBZ5Q.js} +2 -2
  21. package/dist/arcgis-coding-components/{HEMUY4EX.js → MIMRYQDK.js} +2 -2
  22. package/dist/arcgis-coding-components/{K65MMKQZ.js → MPQONZKK.js} +2 -2
  23. package/dist/arcgis-coding-components/{GYRAGUCS.js → MQPGUAKU.js} +2 -2
  24. package/dist/arcgis-coding-components/{AN5XOTG3.js → MT6E7WAE.js} +2 -2
  25. package/dist/arcgis-coding-components/{C7AOZLHG.js → OKZIDXTH.js} +2 -2
  26. package/dist/arcgis-coding-components/OOTSJLE7.js +8 -0
  27. package/dist/arcgis-coding-components/{54R6KKGA.js → PPHYUAQB.js} +1 -1
  28. package/dist/arcgis-coding-components/{PPN3MKSY.js → Q3MEWLG6.js} +2 -2
  29. package/dist/arcgis-coding-components/{ONWSK62Q.js → QSD2HIV4.js} +2 -2
  30. package/dist/arcgis-coding-components/{EIZ2XTGD.js → RM3PUYKP.js} +2 -2
  31. package/dist/arcgis-coding-components/{ZS5XSXBA.js → TDQSMBML.js} +2 -2
  32. package/dist/arcgis-coding-components/WQIYCHVV.js +6 -0
  33. package/dist/arcgis-coding-components/{ZGVAC5ZL.js → YDXZPRQS.js} +2 -2
  34. package/dist/arcgis-coding-components/{TX2HX5VE.js → YIY2X63A.js} +1 -1
  35. package/dist/arcgis-coding-components/{472M2R72.js → YZN6YOSZ.js} +2 -2
  36. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  37. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +1 -1
  38. package/dist/chunks/arcade-defaults.js +1 -1
  39. package/dist/chunks/arcade-executor.js +1 -1
  40. package/dist/chunks/arcade-mode.js +1 -1
  41. package/dist/chunks/arcade-service-accessors.js +1 -1
  42. package/dist/chunks/fields.js +1 -1
  43. package/dist/chunks/language-defaults-base.js +1 -1
  44. package/dist/chunks/markdown.js +1 -1
  45. package/dist/chunks/monaco-importer.js +1 -1
  46. package/dist/chunks/runtime.js +7 -453
  47. package/dist/chunks/sql-expr-defaults.js +1 -1
  48. package/dist/chunks/sql-expr-mode.js +1 -1
  49. package/dist/chunks/useT9n.js +1 -1
  50. package/dist/components/arcgis-arcade-editor/customElement.js +12 -11
  51. package/dist/components/arcgis-arcade-results/customElement.js +5 -4
  52. package/dist/components/arcgis-arcade-suggestions/customElement.js +7 -6
  53. package/dist/components/arcgis-code-editor/customElement.js +11 -10
  54. package/dist/components/arcgis-editor-variables/customElement.js +12 -11
  55. package/dist/components/arcgis-language-api-panel/customElement.js +13 -12
  56. package/dist/components/arcgis-sql-expression-editor/customElement.js +7 -6
  57. package/dist/components/arcgis-sql-expression-fields/customElement.js +10 -9
  58. package/dist/docs/api.json +2 -2
  59. package/dist/docs/docs.json +2 -2
  60. package/dist/docs/web-types.json +1 -1
  61. package/dist/index.js +1 -1
  62. package/dist/loader.js +5 -4
  63. package/dist/utils/language-defaults-base.d.ts +1 -1
  64. package/package.json +7 -6
  65. package/dist/arcgis-coding-components/2JO3YPBV.js +0 -6
  66. package/dist/arcgis-coding-components/AWZRXR2G.js +0 -8
  67. package/dist/arcgis-coding-components/JBLNDPQ4.js +0 -6
@@ -5,7 +5,7 @@ import { CompletionItemKind as w, InsertTextMode as f, InsertTextFormat as d } f
5
5
  /*!
6
6
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
7
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
8
- * v4.32.0-next.17
8
+ * v4.32.0-next.19
9
9
  */
10
10
  async function S(e) {
11
11
  const { apiVersion: i, bundles: t, hiddenApiItems: r } = e.toEditorProfileDefinition(), n = await h(e.dictionaryVariables);
@@ -2,7 +2,7 @@ import { importArcade as C } from "@arcgis/core-adapter";
2
2
  /*!
3
3
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
5
- * v4.32.0-next.17
5
+ * v4.32.0-next.19
6
6
  */
7
7
  const G = "https://developers.arcgis.com/arcade/", O = 100, A = 100;
8
8
  function u(t) {
@@ -9,7 +9,7 @@ import { debounce as T, Deferred as _ } from "@arcgis/components-utils";
9
9
  /*!
10
10
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
12
- * v4.32.0-next.17
12
+ * v4.32.0-next.19
13
13
  */
14
14
  const y = [
15
15
  "<=",
@@ -3,7 +3,7 @@ import { isURL as i, hasSameOrigin as c } from "@arcgis/components-utils";
3
3
  /*!
4
4
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
6
- * v4.32.0-next.17
6
+ * v4.32.0-next.19
7
7
  */
8
8
  function a() {
9
9
  return !!window.MonacoEnvironment?.getWorkerUrl;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
- * v4.32.0-next.17
4
+ * v4.32.0-next.19
5
5
  */
6
6
  function t(e) {
7
7
  switch (e.type) {
@@ -9,7 +9,7 @@ import { Emitter as $, Uri as A } from "monaco-editor";
9
9
  /*!
10
10
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
12
- * v4.32.0-next.17
12
+ * v4.32.0-next.19
13
13
  */
14
14
  function B(t) {
15
15
  return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && g(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
@@ -5,7 +5,7 @@ import { generateTokensCSSForColorMap as te } from "monaco-editor/esm/vs/editor/
5
5
  /*!
6
6
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
7
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
8
- * v4.32.0-next.17
8
+ * v4.32.0-next.19
9
9
  */
10
10
  async function ne(l) {
11
11
  return await (await ee()).colorize(l, "arcade", { tabSize: 2 });
@@ -6,7 +6,7 @@ import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
6
6
  /*!
7
7
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
8
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
9
- * v4.32.0-next.17
9
+ * v4.32.0-next.19
10
10
  */
11
11
  function g(r, t, n, m) {
12
12
  if (!t)
@@ -1,459 +1,13 @@
1
- import { useControllerManager as O, trackPropertyKey as L, retrieveComponent as P, keyTrackResolve as C } from "@arcgis/components-controllers";
2
- import "@lit/reactive-element/decorators/state.js";
3
- import "@lit/reactive-element/decorators/property.js";
4
- import { Deferred as d, camelToKebab as g } from "@arcgis/components-utils";
5
- import { LitElement as b, isServer as A } from "lit";
6
- import { classMap as S } from "lit-html/directives/class-map.js";
7
- import "lit/directives/style-map.js";
8
- import "lit-html/directive.js";
9
- import "lit-html/directives/live.js";
10
- import { nothing as T } from "lit-html";
1
+ import { makeRuntime as t } from "@arcgis/lumina";
11
2
  /*!
12
3
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
13
4
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
14
- * v4.32.0-next.17
5
+ * v4.32.0-next.19
15
6
  */
16
- var z = ";", p = ",", N = ":", _ = (e = "", t = {}, s = P()) => {
17
- const o = {
18
- emit: (i) => {
19
- if (process.env.NODE_ENV !== "production" && !s.el.isConnected && console.warn(
20
- `Trying to emit an ${e} event on a disconnected element ${s.el.tagName.toLowerCase()}`
21
- ), e === "" && (C(), process.env.NODE_ENV !== "production" && e === ""))
22
- throw new Error("Unable to resolve event name from property name");
23
- const n = new CustomEvent(e, {
24
- detail: i,
25
- cancelable: !0,
26
- bubbles: !0,
27
- composed: !0,
28
- ...t
29
- });
30
- return s.el.dispatchEvent(n), n;
31
- }
32
- };
33
- return e === "" && L(
34
- s,
35
- (i) => {
36
- if (process.env.NODE_ENV !== "production" && i === void 0)
37
- throw new Error("createEvent must be called in property default value only");
38
- e = i;
39
- },
40
- o
41
- ), o;
42
- }, Q = _.bind(null, "");
43
- function D(e) {
44
- const t = e.prototype, s = Object.getOwnPropertyDescriptor(t, "innerText");
45
- if (s !== void 0 && s.get === s.set)
46
- return;
47
- const o = /* @__PURE__ */ new Set([
48
- // We shouldn't be overwriting this property
49
- "constructor",
50
- // Called by Lit - we proxy it to this.el in ProxyComponent
51
- "setAttribute",
52
- // Called by Lit SSR - we proxy it to this.el in ProxyComponent
53
- "removeAttribute",
54
- // Called by Lit - we proxy it to this.el in ProxyComponent
55
- "isConnected",
56
- // Called by Lit, but only in dev mode for warnings, so we don't have to proxy.
57
- "localName"
58
- ]), i = {
59
- addEventListener: "use this.listen() or this.el.addEventListener()"
60
- };
61
- Object.entries({
62
- ...Object.getOwnPropertyDescriptors(HTMLElement.prototype),
63
- ...Object.getOwnPropertyDescriptors(Element.prototype),
64
- ...Object.getOwnPropertyDescriptors(Node.prototype),
65
- ...Object.getOwnPropertyDescriptors(EventTarget.prototype)
66
- }).forEach(([n, a]) => {
67
- if (o.has(n))
68
- return;
69
- const l = (...r) => {
70
- if (n === "hasAttribute" && r[0] === "defer-hydration")
71
- return !1;
72
- throw new Error(
73
- `You should not be trying to access this.${n} directly as it won't work correctly in lazy-builds. Instead, ${i[n] ?? `use this.el.${n}`}`
74
- );
75
- };
76
- typeof a.value == "function" ? t[n] = l : Object.defineProperty(t, n, { get: l, set: l });
77
- });
78
- }
79
- function E(e) {
80
- let t = e;
81
- for (; t = t.parentNode ?? t.host; )
82
- if (t?.constructor?.lumina) {
83
- const s = t;
84
- return s.manager?.loadedCalled || s._offspring.push(e), s._postLoad.promise;
85
- }
86
- return !1;
87
- }
88
- var m = {}, X = (e, t) => function(o, i) {
89
- if (!globalThis.customElements)
90
- return;
91
- const a = (i ?? o ?? {}).resourcesUrl;
92
- a && e.setAssetPath(a), Object.entries(t).forEach(R);
93
- };
94
- function R([e, [t, s = ""]]) {
95
- if (customElements.get(e))
96
- return;
97
- const [o, i, n] = s.split(z), a = o ? o?.split(p).map(v) : void 0, l = a?.map(([c]) => c), r = class extends j {
98
- static {
99
- this.observedAttributes = a?.map(([, c]) => c).filter((c) => c !== "");
100
- }
101
- static {
102
- this._properties = l;
103
- }
104
- static {
105
- this._asyncMethods = i ? i?.split(p) : void 0;
106
- }
107
- static {
108
- this._syncMethods = n?.split(p);
109
- }
110
- static {
111
- this._name = e;
112
- }
113
- constructor() {
114
- !r._loadPromise && (r._loadPromise = t(), r._initializePrototype()), super();
115
- }
116
- };
117
- customElements.define(e, r);
118
- }
119
- var h = Object.defineProperty;
120
- function v(e) {
121
- const t = e.split(N);
122
- return t.length === 1 ? [t[0], g(t[0])] : t;
123
- }
124
- var $ = globalThis.HTMLElement ?? v, j = class extends $ {
125
- constructor() {
126
- super(), this._store = {}, this._pendingAttributes = [], this._postLoad = new d(), this._postLoaded = new d(), this._offspring = [], process.env.NODE_ENV !== "production" && (this._hmrSetProps = /* @__PURE__ */ new Set(), this._hmrSetAttributes = /* @__PURE__ */ new Set(), globalThis.devOnly$createdElements ??= [], globalThis.devOnly$createdElements.push(new WeakRef(this))), this._saveInstanceProperties();
127
- const e = this.constructor;
128
- e._LitConstructor ? this._initializeComponent({ a: e._LitConstructor }) : e._loadPromise.then(this._initializeComponent.bind(this)).catch((t) => {
129
- this._postLoaded.reject(t), setTimeout(() => {
130
- throw t;
131
- });
132
- }), process.env.NODE_ENV !== "production" && (e._hmrInstances ??= [], e._hmrInstances.push(new WeakRef(this)), Object.defineProperty(this, "_store", {
133
- value: this._store,
134
- enumerable: !1,
135
- configurable: !0
136
- }));
137
- }
138
- static {
139
- this.lumina = !0;
140
- }
141
- /** @internal */
142
- static _initializePrototype() {
143
- this._properties?.forEach(this._bindProp, this), this._asyncMethods?.forEach(this._bindAsync, this), this._syncMethods?.forEach(this._bindSync, this);
144
- }
145
- static _bindProp(e) {
146
- h(this.prototype, e, {
147
- configurable: !0,
148
- enumerable: !0,
149
- get() {
150
- return this._store[e];
151
- },
152
- set(t) {
153
- this._store[e] = t, process.env.NODE_ENV !== "production" && this._hmrSetProps.add(e);
154
- }
155
- });
156
- }
157
- static _bindAsync(e) {
158
- h(this.prototype, e, {
159
- async value(...t) {
160
- return this._litElement || await this._postLoaded.promise, await this._litElement[e](...t);
161
- },
162
- configurable: !0
163
- });
164
- }
165
- static _bindSync(e) {
166
- h(this.prototype, e, {
167
- value(...t) {
168
- if (process.env.NODE_ENV === "development" && !this._litElement) {
169
- const o = this.constructor;
170
- throw new Error(
171
- `Tried to call method ${e}() on <${o._name}> component before it's fully loaded. Please do 'await component.componentOnReady();' before calling this method.`
172
- );
173
- }
174
- return this._litElement[e](...t);
175
- },
176
- configurable: !0
177
- });
178
- }
179
- get manager() {
180
- return this._litElement?.manager;
181
- }
182
- /**
183
- * Until the custom element is registered on the page, an instance of that
184
- * element can be constructed and some properties on that instance set.
185
- *
186
- * These properties are set before the element prototype is set to this proxy
187
- * class and thus none of our getters/setters are yet registered - such
188
- * properties will be set by JavaScript on the instance directly.
189
- *
190
- * Once element is registered, the properties set in the meanwhile will shadow
191
- * the getter/setters, and thus break reactivity. The fix is to delete these
192
- * properties from the instance, and re-apply them once accessors are set.
193
- *
194
- * @example
195
- * ```ts
196
- * import { defineCustomElements } from '@arcgis/map-components';
197
- * const map = document.createElement('arcgis-map');
198
- * // This will shadow the getter/setters
199
- * map.itemId = '...';
200
- * // This finally defines the custom elements and sets the property accessors
201
- * defineCustomElements();
202
- * ```
203
- *
204
- * @remarks
205
- * This is an equivalent of the __saveInstanceProperties method in Lit's
206
- * ReactiveElement. Lit takes care of this on LitElement, but we have to take
207
- * care of this on the lazy proxy
208
- */
209
- _saveInstanceProperties() {
210
- const e = this.constructor, t = this;
211
- e._properties?.forEach((s) => {
212
- Object.hasOwn(this, s) && (this._store[s] = t[s], delete t[s]);
213
- });
214
- }
215
- /*
216
- * This method must be statically present rather than added later, or else,
217
- * browsers won't call it. Same for connected and disconnected callbacks.
218
- */
219
- attributeChangedCallback(e, t, s) {
220
- this._litElement?.attributeChangedCallback(e, t, s), this._litElement || this._pendingAttributes.push(e), process.env.NODE_ENV !== "production" && this._hmrSetAttributes.add(e);
221
- }
222
- connectedCallback() {
223
- this._litElement ? this._litElement.connectedCallback?.() : queueMicrotask(() => {
224
- this._ancestorLoad = E(this);
225
- });
226
- }
227
- disconnectedCallback() {
228
- this._litElement?.disconnectedCallback?.();
229
- }
230
- /**
231
- * Create a promise that resolves once component is fully loaded
232
- */
233
- async componentOnReady() {
234
- return await this._postLoaded.promise, this;
235
- }
236
- /** @internal */
237
- _initializeComponent(e) {
238
- const t = this.constructor, s = t._name;
239
- process.env.NODE_ENV !== "production" && Object.entries(e).forEach(([r, c]) => {
240
- (r !== "exportsForTests" && typeof c != "function" || typeof c.tagName != "string") && console.warn(
241
- `Found non-component export "${r}" in the file for the "${s}" component. This will interfere with hot module replacement. Please move "${r}" into a separate file.`
242
- );
243
- });
244
- const o = Object.values(e).find(
245
- (r) => r.tagName === s
246
- );
247
- if (process.env.NODE_ENV !== "production" && !o)
248
- throw new Error(
249
- `Unable to find the LitElement class for the "${s}" custom element in the lazy-loaded module`
250
- );
251
- const i = process.env.NODE_ENV === "production" ? `${s}--lazy` : (t._hmrIndex ?? 0) === 0 ? `${s}--lazy` : `${s}--lazy-${t._hmrIndex}`;
252
- if (!t._LitConstructor) {
253
- if (t._LitConstructor = o, o.prototype.removeAttribute = function(r) {
254
- HTMLElement.prototype.removeAttribute.call(this.el, r);
255
- }, o.prototype.setAttribute = function(r, c) {
256
- HTMLElement.prototype.setAttribute.call(this.el, r, c);
257
- }, h(o.prototype, "isConnected", {
258
- get() {
259
- return this.el.isConnected;
260
- }
261
- }), process.env.NODE_ENV !== "production" && o.shadowRootOptions !== m) {
262
- let r = o;
263
- for (; r && !Object.hasOwn(r, "lumina"); )
264
- r = Object.getPrototypeOf(r);
265
- D(r);
266
- }
267
- customElements.define(i, o);
268
- }
269
- o.lazy = this;
270
- const a = document.createElement(i);
271
- if (o.lazy = void 0, process.env.NODE_ENV !== "production" ? Object.defineProperty(this, "_litElement", {
272
- value: a,
273
- configurable: !0,
274
- enumerable: !1
275
- }) : this._litElement = a, this._pendingAttributes.forEach((r) => {
276
- const c = this.getAttribute(r);
277
- a.attributeChangedCallback(
278
- r,
279
- // Lit doesn't look at this value, thus even if attribute already exists, that's ok
280
- null,
281
- c
282
- );
283
- }), Object.entries(this._store).forEach(U, a), this._store = a, process.env.NODE_ENV !== "production") {
284
- const r = o.observedAttributes ?? [], c = t.observedAttributes ?? [], f = r.filter((u) => !c.includes(u)), y = c.filter((u) => !r.includes(u));
285
- f.length > 0 && console.warn(
286
- `The following attributes on <${t._name}> are present on the Lit element, but are missing from the lazy proxy component: ${f.join(", ")}. This either indicates a bug in Lumina, or you are creating the attribute dynamically in a way that compiler cannot infer statically. For these attributes, lazy-loading version of your component won't work correctly, thus this must be resolved`
287
- ), y.length > 0 && console.warn(
288
- `The following attributes on <${t._name}> are defined on the lazy proxy component, but not on the actual Lit element: ${y.join(", ")}. This either indicates a bug in Lumina, or you are creating the attribute dynamically in a way that compiler cannot infer statically. This is a non-critical issue, but does indicate that something is going wrong and should be fixed`
289
- );
290
- }
291
- const l = this.isConnected;
292
- (l || this._ancestorLoad) && (a.connectedCallback?.(), l || a.disconnectedCallback());
293
- }
294
- };
295
- function U([e, t]) {
296
- this[e] = t;
297
- }
298
- var x = () => {
299
- }, M = class w extends b {
300
- constructor() {
301
- super(), this.el = this.constructor.lazy ?? this, this.manager = O(this), this._postLoad = this.constructor.lazy?._postLoad ?? new d(), this._offspring = this.constructor.lazy?._offspring ?? [], this._postLoaded = this.constructor.lazy?._postLoaded ?? new d(), this._enableUpdating = this.enableUpdating, this.enableUpdating = x;
302
- const t = w.prototype.shouldUpdate;
303
- this.shouldUpdate !== t && (this._originalShouldUpdate = this.shouldUpdate, this.shouldUpdate = t), process.env.NODE_ENV !== "production" && globalThis.devOnly$luminaComponentRefCallback?.(this), A && this.el.setAttribute(this.constructor.runtime.hydratedAttribute, "");
304
- }
305
- /**
306
- * Customize Lit's default style handling to support non-shadow-root styles
307
- */
308
- static finalizeStyles(t) {
309
- process.env.NODE_ENV === "test" && Array.isArray(t) && (t = t.filter(Boolean));
310
- const s = super.finalizeStyles(t), o = this.shadowRootOptions === m;
311
- return this.runtime?.commonStyles === void 0 || o ? s : [this.runtime.commonStyles, ...s];
312
- }
313
- static createProperty(t, s) {
314
- const o = typeof s == "number" ? s : Array.isArray(s) ? s[0] : 0, i = Array.isArray(s) ? s[1] : void 0;
315
- super.createProperty(t, {
316
- /**
317
- * By default to infer attribute name from property name, Lit just
318
- * converts property name to lowercase. That is consistent with
319
- * native DOM attributes.
320
- *
321
- * However, that is not consistent with Stencil and would be a
322
- * breaking change for us. Also, kebab-case is more common among the
323
- * web components. But the most important reason is that we have
324
- * some pretty long attribute names, which would be utterly
325
- * unreadable in lowercase.
326
- *
327
- * Also, if browsers add new attributes, that may cause a conflict
328
- * with our attributes.
329
- *
330
- * Thus, overwriting Lit's default behavior to use kebab-case:
331
- */
332
- attribute: o & 1 && typeof t == "string" ? g(t) : !1,
333
- reflect: !!(o & 2),
334
- type: o & 4 ? Boolean : o & 8 ? Number : void 0,
335
- /**
336
- * At the moment in Lit, state:true just means attribute:false, so this
337
- * line is technically redundant, but let's keep it here just in case Lit
338
- * will add more meaning to state:true in the future.
339
- */
340
- state: !!(o & 16),
341
- // Controllers add this option to Lit
342
- readOnly: !!(o & 32),
343
- noAccessor: !!(o & 64),
344
- ...i
345
- });
346
- }
347
- static {
348
- this.lumina = !0;
349
- }
350
- connectedCallback() {
351
- if (this.el.hasAttribute("defer-hydration"))
352
- return;
353
- const t = !this.manager.connectedCalled;
354
- super.connectedCallback(), t && queueMicrotask(
355
- // eslint-disable-next-line @typescript-eslint/no-misused-promises, @typescript-eslint/promise-function-async
356
- () => this._load().catch((s) => {
357
- this._postLoaded.reject(s), setTimeout(() => {
358
- throw s;
359
- });
360
- })
361
- );
362
- }
363
- /**
364
- * Overwrite Lit's default behavior of attaching shadow root to the lit
365
- * element, and instead use this.el to support lazy builds.
366
- *
367
- * Also, support the case when component asked to not use shadow root
368
- */
369
- createRenderRoot() {
370
- const t = this.el.shadowRoot, s = this.constructor, o = s.shadowRootOptions, n = t ?? (o === m ? this.el : this.el.attachShadow(o));
371
- if (Object.defineProperty(this, "shadowRoot", {
372
- // Create shadow root on the proxy instance, to make Lit render content there
373
- value: n
374
- }), t)
375
- return process.env.NODE_ENV === "production" && b.prototype.createRenderRoot.call(this), t;
376
- if (this.isConnected) {
377
- const a = n.getRootNode();
378
- a.adoptedStyleSheets = [
379
- ...a.adoptedStyleSheets,
380
- ...s.elementStyles.map((l) => "styleSheet" in l ? l.styleSheet : l)
381
- ];
382
- }
383
- return n;
384
- }
385
- /** Do asynchronous component load */
386
- async _load() {
387
- const t = this.el._ancestorLoad ?? E(this.el);
388
- t && await t, await this.manager._load(), this._enableUpdating(!0), this.performUpdate(), this._postLoad.resolve(), await Promise.resolve();
389
- const s = this._offspring.filter((o) => !o.manager?.loadedCalled);
390
- s.length && await Promise.allSettled(s.map(async (o) => await o.componentOnReady())), this._offspring.length = 0, this.el.setAttribute(this.constructor.runtime.hydratedAttribute, ""), this.manager._loaded(), this._postLoaded.resolve();
391
- }
392
- /**
393
- * Overwriting default shouldUpdate simply to get access to
394
- * "changedProperties" so that we can later provide it to ControllerManager
395
- */
396
- shouldUpdate(t) {
397
- return this.$changes = t, this._originalShouldUpdate?.(t) ?? !0;
398
- }
399
- listen(t, s, o) {
400
- const i = s?.bind(this) ?? s;
401
- this.manager.onLifecycle(() => (this.el.addEventListener(t, i, o), () => this.el.removeEventListener(t, i, o)));
402
- }
403
- listenOn(t, s, o, i) {
404
- const n = o?.bind(this) ?? o;
405
- this.manager.onLifecycle(() => (t.addEventListener(s, n, i), () => t.removeEventListener(s, n, i)));
406
- }
407
- /**
408
- * Create a promise that resolves once component is fully loaded.
409
- *
410
- * @example
411
- * const map = document.createElement('arcgis-map');
412
- * document.body.append(map);
413
- * map.componentOnReady().then(() => {
414
- * console.log('Map is ready to go!');
415
- * });
416
- */
417
- async componentOnReady() {
418
- return await this._postLoaded.promise, this;
419
- }
420
- };
421
- M.$createEvent = _;
422
- if (process.env.NODE_ENV !== "production") {
423
- const e = globalThis;
424
- e.litIssuedWarnings ??= /* @__PURE__ */ new Set(), e.litIssuedWarnings.add(
425
- "Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators See https://lit.dev/msg/no-override-create-property for more information."
426
- );
427
- }
428
- function V(e) {
429
- let t;
430
- const s = (i) => {
431
- t = new URL(i, globalThis.location?.href).href;
432
- }, o = {
433
- ...e,
434
- // FEATURE: research https://vitejs.dev/guide/build.html#advanced-base-options
435
- getAssetPath(i) {
436
- const n = new URL(i, t);
437
- return n.origin !== globalThis.location?.origin ? n.href : n.pathname;
438
- },
439
- setAssetPath: s,
440
- customElement(i, n) {
441
- n.runtime = o, n.tagName = i, customElements.get(i) || customElements.define(i, n);
442
- }
443
- };
444
- return s(e.defaultAssetPath), process.env.NODE_ENV !== "production" && (globalThis.devOnly$luminaRuntime = o), o;
445
- }
446
- var Z = (e) => typeof e == "object" && e != null ? S(e) : e, tt = T;
447
- const k = V({ defaultAssetPath: "https://jsdev.arcgis.com/coding-components/next/", hydratedAttribute: "hydrated" }), { customElement: et, getAssetPath: st, setAssetPath: ot } = k;
7
+ const s = t({ defaultAssetPath: "https://jsdev.arcgis.com/coding-components/next/", hydratedAttribute: "hydrated" }), { customElement: a, getAssetPath: o, setAssetPath: m } = s;
448
8
  export {
449
- M as L,
450
- et as a,
451
- Z as b,
452
- Q as c,
453
- tt as d,
454
- st as g,
455
- X as m,
456
- m as n,
457
- k as r,
458
- ot as s
9
+ a as c,
10
+ o as g,
11
+ s as r,
12
+ m as s
459
13
  };
@@ -5,7 +5,7 @@ import { g as b } from "./runtime.js";
5
5
  /*!
6
6
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
7
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
8
- * v4.32.0-next.17
8
+ * v4.32.0-next.19
9
9
  */
10
10
  const x = (r) => {
11
11
  const e = r.variables[0], i = e && e.type === "featureSet" ? A(e) : void 0, { apiVersion: t, bundles: o, hiddenApiItems: s } = r.toEditorProfileDefinition();
@@ -8,7 +8,7 @@ import { a as d } from "./sql-expr-defaults.js";
8
8
  /*!
9
9
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
10
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
11
- * v4.32.0-next.17
11
+ * v4.32.0-next.19
12
12
  */
13
13
  let h = new _();
14
14
  class k {
@@ -3,7 +3,7 @@ import { g as t } from "./runtime.js";
3
3
  /*!
4
4
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
6
- * v4.32.0-next.17
6
+ * v4.32.0-next.19
7
7
  */
8
8
  const s = o(t);
9
9
  export {
@@ -1,9 +1,10 @@
1
- import { L as h, c as n, n as u, g, a as _ } from "../../chunks/runtime.js";
2
- import { html as t, nothing as r } from "lit";
3
- import { KeyCode as f } from "monaco-editor";
1
+ import { g as h, c as u } from "../../chunks/runtime.js";
2
+ import { html as t, nothing as n } from "lit";
3
+ import { KeyCode as g } from "monaco-editor";
4
4
  import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices";
5
5
  import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme";
6
6
  import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
7
+ import { LitElement as _, createEvent as r, noShadowRoot as f } from "@arcgis/lumina";
7
8
  import { Deferred as m, generateGuid as x } from "@arcgis/components-utils";
8
9
  import { D as b, e as c } from "../../chunks/arcade-executor.js";
9
10
  import { s as v, a as P } from "../../chunks/arcade-service-accessors.js";
@@ -14,23 +15,23 @@ import { css as w } from "@lit/reactive-element/css-tag.js";
14
15
  /*!
15
16
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
16
17
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
17
- * v4.32.0-next.17
18
+ * v4.32.0-next.19
18
19
  */
19
20
  const $ = w`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;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)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`;
20
- class y extends h {
21
+ class y extends _ {
21
22
  constructor() {
22
23
  super(...arguments), this._codeEditorElt = S(), this._componentReadyDefer = new m(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = E(), this._modelId = x(), this._openArcadeHelp = () => void window.open(b, "Arcade Help"), this._toggleSidePanel = (e) => {
23
24
  if (!e.target)
24
25
  return;
25
26
  const i = e.target?.dataset.panelName ?? "none";
26
27
  this.openedSidePanel = i === this.openedSidePanel ? "none" : i, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(console.error);
27
- }, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = n({ bubbles: !1 }), this.arcgisScriptChange = n({ bubbles: !1 });
28
+ }, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = r({ bubbles: !1 }), this.arcgisScriptChange = r({ bubbles: !1 });
28
29
  }
29
30
  static {
30
31
  this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0 };
31
32
  }
32
33
  static {
33
- this.shadowRootOptions = u;
34
+ this.shadowRootOptions = f;
34
35
  }
35
36
  static {
36
37
  this.styles = $;
@@ -79,7 +80,7 @@ class y extends h {
79
80
  // #endregion
80
81
  // #region Lifecycle
81
82
  async load() {
82
- const e = g("./assets");
83
+ const e = h("./assets");
83
84
  v(e), await this._updateEditorProfile();
84
85
  }
85
86
  willUpdate(e) {
@@ -161,7 +162,7 @@ class y extends h {
161
162
  // An unique identifier for the action.
162
163
  id: "run-script",
163
164
  label: "Run Arcade Expression",
164
- keybindings: [f.F5],
165
+ keybindings: [g.F5],
165
166
  contextMenuGroupId: "code",
166
167
  contextMenuOrder: 1,
167
168
  run: () => {
@@ -184,7 +185,7 @@ class y extends h {
184
185
  return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${A(this._codeEditorElt)}></arcgis-code-editor>`;
185
186
  }
186
187
  renderAction({ id: e, label: i, icon: a, active: o, panelName: l, iconFlipRtl: d = !1, onClick: p = this._toggleSidePanel }) {
187
- return t`<calcite-action id=${e ?? r} .text=${i} .icon=${a} .active=${o} @click=${p} data-panel-name=${l ?? r} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>` || ""}`;
188
+ return t`<calcite-action id=${e ?? n} .text=${i} .icon=${a} .active=${o} @click=${p} data-panel-name=${l ?? n} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded && t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>` || ""}`;
188
189
  }
189
190
  renderSideActionBar() {
190
191
  return this.hideSideBar ? null : t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
@@ -236,7 +237,7 @@ class y extends h {
236
237
  return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`;
237
238
  }
238
239
  }
239
- _("arcgis-arcade-editor", y);
240
+ u("arcgis-arcade-editor", y);
240
241
  export {
241
242
  y as ArcgisArcadeEditor
242
243
  };