@arcgis/coding-components 4.32.0-next.8 → 4.32.0-next.9

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 (77) hide show
  1. package/dist/arcgis-coding-components/2MDSFEG2.js +6 -0
  2. package/dist/arcgis-coding-components/2PI32Y2U.js +6 -0
  3. package/dist/arcgis-coding-components/3V25SSHK.js +6 -0
  4. package/dist/arcgis-coding-components/3VDNGHYC.js +6 -0
  5. package/dist/arcgis-coding-components/7WDTHUR4.js +11 -0
  6. package/dist/arcgis-coding-components/7XVSPO47.js +9 -0
  7. package/dist/arcgis-coding-components/AEKG2KZR.js +6 -0
  8. package/dist/arcgis-coding-components/AIXM3VSQ.js +8 -0
  9. package/dist/arcgis-coding-components/BPTMRHZS.js +69 -0
  10. package/dist/arcgis-coding-components/DHTXVFD4.js +51 -0
  11. package/dist/arcgis-coding-components/DPP6LIRE.css +1 -0
  12. package/dist/arcgis-coding-components/ECH2G2ZZ.js +6 -0
  13. package/dist/arcgis-coding-components/EKW5ZAMS.js +16 -0
  14. package/dist/arcgis-coding-components/FH25RZLB.js +6 -0
  15. package/dist/arcgis-coding-components/FXWBQCOX.js +6 -0
  16. package/dist/arcgis-coding-components/HISHP6LH.js +16 -0
  17. package/dist/arcgis-coding-components/KHZVCRKI.js +8 -0
  18. package/dist/arcgis-coding-components/LNXU5XHH.js +6 -0
  19. package/dist/arcgis-coding-components/N6NF6W3K.js +6 -0
  20. package/dist/arcgis-coding-components/NKEDGV5F.js +6 -0
  21. package/dist/arcgis-coding-components/NTFB2MYM.js +6 -0
  22. package/dist/arcgis-coding-components/O65WSYRU.css +1 -0
  23. package/dist/arcgis-coding-components/OKPAIUSJ.js +6 -0
  24. package/dist/arcgis-coding-components/P6B3SBFZ.js +6 -0
  25. package/dist/arcgis-coding-components/PMX66XBR.js +6 -0
  26. package/dist/arcgis-coding-components/QLSWCCDO.js +643 -0
  27. package/dist/arcgis-coding-components/QVCUOYDS.js +8 -0
  28. package/dist/arcgis-coding-components/R7VUAISU.js +6 -0
  29. package/dist/arcgis-coding-components/TAUA2L5H.js +11 -0
  30. package/dist/arcgis-coding-components/UN7QZAZG.js +6 -0
  31. package/dist/arcgis-coding-components/W4GCHDB7.js +6 -0
  32. package/dist/arcgis-coding-components/W72BHJQV.js +10 -0
  33. package/dist/arcgis-coding-components/WGGW2MMN.js +6 -0
  34. package/dist/arcgis-coding-components/WR2OQEKQ.js +6 -0
  35. package/dist/arcgis-coding-components/XI3I5HIQ.js +20 -0
  36. package/dist/arcgis-coding-components/Z4OQ4TOJ.js +9 -0
  37. package/dist/arcgis-coding-components/Z4W7MWSC.js +6 -0
  38. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -807
  39. package/dist/chunks/arcade-defaults.js +1 -1
  40. package/dist/chunks/arcade-executor.js +1 -1
  41. package/dist/chunks/arcade-mode.js +20 -19
  42. package/dist/chunks/arcade-service-accessors.js +1 -1
  43. package/dist/chunks/fields.js +1 -1
  44. package/dist/chunks/language-defaults-base.js +11 -11
  45. package/dist/chunks/markdown.js +2 -2
  46. package/dist/chunks/monaco-importer.js +28 -0
  47. package/dist/chunks/runtime.js +1 -1
  48. package/dist/chunks/sql-expr-defaults.js +1 -1
  49. package/dist/chunks/sql-expr-mode.js +31 -30
  50. package/dist/chunks/useT9n.js +1 -1
  51. package/dist/components/arcgis-arcade-editor/customElement.d.ts +4 -4
  52. package/dist/components/arcgis-arcade-editor/customElement.js +15 -14
  53. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  54. package/dist/components/arcgis-arcade-suggestions/customElement.js +2 -2
  55. package/dist/components/arcgis-code-editor/customElement.d.ts +5 -5
  56. package/dist/components/arcgis-code-editor/customElement.js +21 -20
  57. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  58. package/dist/components/arcgis-language-api-panel/customElement.js +2 -2
  59. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  60. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  61. package/dist/docs/docs.json +14 -14
  62. package/dist/docs/manifest.json +10 -10
  63. package/dist/docs/vscode.html-custom-data.json +2 -2
  64. package/dist/docs/web-types.json +3 -3
  65. package/dist/index.js +1 -1
  66. package/dist/loader.js +1 -1
  67. package/dist/types/components.d.ts +1 -5
  68. package/dist/utils/arcade-monaco/arcade-language-features.d.ts +4 -3
  69. package/dist/utils/arcade-monaco/arcade-language-syntax.d.ts +3 -3
  70. package/dist/utils/arcade-monaco/arcade-worker-manager.d.ts +2 -2
  71. package/dist/utils/language-defaults-base.d.ts +2 -1
  72. package/dist/utils/monaco-importer.d.ts +7 -0
  73. package/dist/utils/sql-expr-monaco/sql-expr-language-features.d.ts +2 -2
  74. package/dist/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +3 -3
  75. package/dist/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +2 -2
  76. package/package.json +7 -7
  77. package/dist/chunks/utilities.js +0 -22
@@ -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.8
8
+ * v4.32.0-next.9
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.8
5
+ * v4.32.0-next.9
6
6
  */
7
7
  const G = "https://developers.arcgis.com/arcade/", O = 100, A = 100;
8
8
  function u(t) {
@@ -1,11 +1,12 @@
1
- import { editor as d, Range as _, languages as p, MarkerSeverity as h, Emitter as E } from "monaco-editor";
2
- import { ArcadeKeywords as M } from "@arcgis/arcade-languageservice";
3
- import { InsertTextFormat as F, DiagnosticSeverity as f, CompletionItemKind as s } from "vscode-languageserver-types";
4
- import { debounce as S, Deferred as w } from "@arcgis/components-utils";
1
+ import { e as d } from "./monaco-importer.js";
2
+ import { ArcadeKeywords as E } from "@arcgis/arcade-languageservice";
3
+ import { InsertTextFormat as M, DiagnosticSeverity as f, CompletionItemKind as s } from "vscode-languageserver-types";
4
+ import { debounce as F, Deferred as _ } from "@arcgis/components-utils";
5
+ import { Range as w, languages as p, MarkerSeverity as h, Emitter as S } from "monaco-editor";
5
6
  /*!
6
7
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
8
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
8
- * v4.32.0-next.8
9
+ * v4.32.0-next.9
9
10
  */
10
11
  const T = [
11
12
  "<=",
@@ -78,7 +79,7 @@ const T = [
78
79
  // builtinFunctions: [...arcadeService.FunctionNames],
79
80
  // Arcade keywords. 'from' is a special case as we want to treat it as a keyword in
80
81
  // import statement but as an identifer in var statement.
81
- keywords: M.filter((t) => t !== "from"),
82
+ keywords: E.filter((t) => t !== "from"),
82
83
  operators: T,
83
84
  constants: ["true", "false", "null"],
84
85
  // we include these common regular expressions
@@ -224,7 +225,7 @@ class L {
224
225
  const o = n.getLanguageId();
225
226
  if (o !== this._languageId)
226
227
  return;
227
- const r = S(() => {
228
+ const r = F(() => {
228
229
  this._doValidate(n, o).catch((v) => {
229
230
  throw v;
230
231
  });
@@ -307,7 +308,7 @@ function D(t) {
307
308
  return { character: t.column - 1, line: t.lineNumber - 1 };
308
309
  }
309
310
  function m(t) {
310
- return new _(t.start.line + 1, t.start.character + 1, t.end.line + 1, t.end.character + 1);
311
+ return new w(t.start.line + 1, t.start.character + 1, t.end.line + 1, t.end.character + 1);
311
312
  }
312
313
  function $(t) {
313
314
  return {
@@ -380,7 +381,7 @@ class K {
380
381
  this._worker = e, this._defaults = i, this.triggerCharacters = [".", "("];
381
382
  }
382
383
  async provideCompletionItems(e, i) {
383
- const a = await this._worker(e.uri), l = this._defaults.getApiContextForModel(e.uri), c = await a.doComplete(e.uri.toString(), D(i), l), g = e.getWordUntilPosition(i), n = new _(i.lineNumber, g.startColumn, i.lineNumber, g.endColumn), o = c.items.map((r) => {
384
+ const a = await this._worker(e.uri), l = this._defaults.getApiContextForModel(e.uri), c = await a.doComplete(e.uri.toString(), D(i), l), g = e.getWordUntilPosition(i), n = new w(i.lineNumber, g.startColumn, i.lineNumber, g.endColumn), o = c.items.map((r) => {
384
385
  const u = {
385
386
  label: r.label,
386
387
  insertText: r.insertText || r.label,
@@ -393,7 +394,7 @@ class K {
393
394
  return r.textEdit && (R(r.textEdit) ? u.range = {
394
395
  insert: m(r.textEdit.insert),
395
396
  replace: m(r.textEdit.replace)
396
- } : u.range = m(r.textEdit.range), u.insertText = r.textEdit.newText), r.additionalTextEdits && (u.additionalTextEdits = r.additionalTextEdits.map($)), r.insertTextFormat === F.Snippet && (u.insertTextRules = p.CompletionItemInsertTextRule.InsertAsSnippet), r.documentation && (typeof r.documentation == "string" ? u.documentation = r.documentation : u.documentation = {
397
+ } : u.range = m(r.textEdit.range), u.insertText = r.textEdit.newText), r.additionalTextEdits && (u.additionalTextEdits = r.additionalTextEdits.map($)), r.insertTextFormat === M.Snippet && (u.insertTextRules = p.CompletionItemInsertTextRule.InsertAsSnippet), r.documentation && (typeof r.documentation == "string" ? u.documentation = r.documentation : u.documentation = {
397
398
  supportThemeIcons: !1,
398
399
  value: r.documentation.value,
399
400
  supportHtml: !0
@@ -414,7 +415,7 @@ class N {
414
415
  return (await i.doFormat(e.uri.toString(), a)).map((c) => ({ range: m(c.range), text: c.newText }));
415
416
  }
416
417
  }
417
- let x = new w();
418
+ let x = new _();
418
419
  class b {
419
420
  constructor(e) {
420
421
  this._defaults = e, this._worker = null, this._client = null, this._configChangeListener = this._defaults.onDidChange(() => this.stopWorker());
@@ -423,7 +424,7 @@ class b {
423
424
  this._configChangeListener.dispose(), this.stopWorker();
424
425
  }
425
426
  stopWorker() {
426
- this._worker && (this._worker.dispose(), this._worker = null, x = new w()), this._client = null;
427
+ this._worker && (this._worker.dispose(), this._worker = null, x = new _()), this._client = null;
427
428
  }
428
429
  /**
429
430
  * Wait for the worker to be ready.
@@ -450,7 +451,7 @@ class b {
450
451
  }
451
452
  }
452
453
  let k;
453
- async function X(...t) {
454
+ async function Z(...t) {
454
455
  return await b.waitForWorker(), await new Promise((e, i) => {
455
456
  if (!k) {
456
457
  i(new Error("Arcade not registered!"));
@@ -461,7 +462,7 @@ async function X(...t) {
461
462
  }
462
463
  class H {
463
464
  constructor() {
464
- this._onDiagnosticsChange = new E();
465
+ this._onDiagnosticsChange = new S();
465
466
  }
466
467
  /**
467
468
  * An event to signal changes to the diagnostics.
@@ -480,10 +481,10 @@ class H {
480
481
  }
481
482
  }
482
483
  const C = new H();
483
- function Z() {
484
+ function j() {
484
485
  return C;
485
486
  }
486
- function j(t) {
487
+ function q(t) {
487
488
  const e = new b(t), i = async (...a) => await e.getLanguageServiceWorker(...a);
488
489
  k = i, p.setMonarchTokensProvider(t.languageId, A), p.setLanguageConfiguration(t.languageId, y), p.registerCompletionItemProvider(
489
490
  t.languageId,
@@ -497,7 +498,7 @@ function j(t) {
497
498
  });
498
499
  }
499
500
  export {
500
- Z as getArcadeDiagnosticService,
501
- X as getArcadeWorker,
502
- j as setupMode
501
+ j as getArcadeDiagnosticService,
502
+ Z as getArcadeWorker,
503
+ q as setupMode
503
504
  };
@@ -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.8
6
+ * v4.32.0-next.9
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.8
4
+ * v4.32.0-next.9
5
5
  */
6
6
  function t(e) {
7
7
  switch (e.type) {
@@ -1,15 +1,15 @@
1
1
  import { newLayersFeatureLayer as b, importRequest as X, newPortalPortalItem as Y, newWebScene as Z, newWebMap as ee } from "@arcgis/core-adapter";
2
- import { p as te } from "./utilities.js";
3
- import { isNotNull as C, isNotUndefined as W, addLTRMark as ie, setValuesInString as T, normalizeLocale as re } from "@arcgis/components-utils";
4
- import { s as se, f as ne, a as _, b as oe } from "./fields.js";
2
+ import { p as te, e as ie } from "./monaco-importer.js";
3
+ import { isNotNull as C, isNotUndefined as W, addLTRMark as re, setValuesInString as T, normalizeLocale as se } from "@arcgis/components-utils";
4
+ import { s as ne, f as oe, a as _, b as ae } from "./fields.js";
5
5
  import { InsertTextMode as I, InsertTextFormat as M, CompletionItemKind as x } from "vscode-languageserver-types";
6
- import { Emitter as $, editor as ae, Uri as A } from "monaco-editor";
7
6
  import { g as le } from "./runtime.js";
8
7
  import { filterApiLibraryForContext as ue } from "@arcgis/languages-api-utils";
8
+ 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.8
12
+ * v4.32.0-next.9
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";
@@ -157,7 +157,7 @@ function U(t) {
157
157
  function We(t, e, i = !1) {
158
158
  let r = e;
159
159
  const s = [], n = [];
160
- return se(t).forEach((o) => {
160
+ return ne(t).forEach((o) => {
161
161
  let p = `**${o.name}**
162
162
  ${o.type}`;
163
163
  o.description && (p += `
@@ -166,7 +166,7 @@ ${o.type}`;
166
166
  `), r += `**${o.name}** (${o.alias})
167
167
  ${o.type}`, o.description && (r += `
168
168
  '${o.description}`);
169
- const c = ne(o), y = z(o.name, !1), h = _(o);
169
+ const c = oe(o), y = z(o.name, !1), h = _(o);
170
170
  if (s.push({
171
171
  name: o.name,
172
172
  description: h,
@@ -210,7 +210,7 @@ class J {
210
210
  * Returns the label string.
211
211
  */
212
212
  getLabel() {
213
- return this._label == null ? "" : typeof this._label == "string" ? ie(this._label) : T(this._profile?.intlStrings[this._label.code], this._label.formatValues);
213
+ return this._label == null ? "" : typeof this._label == "string" ? re(this._label) : T(this._profile?.intlStrings[this._label.code], this._label.formatValues);
214
214
  }
215
215
  /**
216
216
  * Returns the description string.
@@ -392,7 +392,7 @@ class Q extends v {
392
392
  label: r,
393
393
  description: _(e),
394
394
  snippet: r,
395
- icon: oe(e),
395
+ icon: ae(e),
396
396
  filterDescription: !0
397
397
  });
398
398
  }
@@ -805,7 +805,7 @@ class Ne {
805
805
  constructor(e, i) {
806
806
  this.languageId = e, this._apiConfig = i, this._onDidChange = new $(), this._modelToProfileMap = /* @__PURE__ */ new Map(), this._modelToApiContextMap = /* @__PURE__ */ new Map(), this._localeToApiLibraryPromiseMap = /* @__PURE__ */ new Map(), this._onModelContextDidChange = new $(), this._onDidModelContextChangeTimeout = -1, this.workerHost = {
807
807
  getApiLibrary: async (r) => await this.getApiLibrary(r)
808
- }, ae.onWillDisposeModel((r) => {
808
+ }, ie.onWillDisposeModel((r) => {
809
809
  this.disposeForModel(r.uri);
810
810
  });
811
811
  }
@@ -879,7 +879,7 @@ class Ne {
879
879
  }
880
880
  }
881
881
  async getApiLibrary(e) {
882
- const i = re(e);
882
+ const i = se(e);
883
883
  return this._localeToApiLibraryPromiseMap.has(i) || this._localeToApiLibraryPromiseMap.set(i, this.fetchApiLibrary(i)), await this._localeToApiLibraryPromiseMap.get(i) ?? [];
884
884
  }
885
885
  // #endregion
@@ -1,11 +1,11 @@
1
- import { editor as ee } from "monaco-editor";
1
+ import { e as ee } from "./monaco-importer.js";
2
2
  import { StandaloneServices as W } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices";
3
3
  import { IStandaloneThemeService as G } from "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme";
4
4
  import { generateTokensCSSForColorMap as te } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
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.8
8
+ * v4.32.0-next.9
9
9
  */
10
10
  async function ne(l) {
11
11
  return await ee.colorize(l, "arcade", { tabSize: 2 });
@@ -0,0 +1,28 @@
1
+ import { createFilterExpression as l } from "@arcgis/components-utils";
2
+ import "monaco-editor";
3
+ import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices";
4
+ import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme";
5
+ import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization";
6
+ /*!
7
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
+ * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
9
+ * v4.32.0-next.9
10
+ */
11
+ function g(r, t, e, s) {
12
+ if (!t)
13
+ return [];
14
+ const i = Array.isArray(t) ? t : [t];
15
+ if (!i.length)
16
+ return [];
17
+ const o = l(e);
18
+ return r.filter((n) => i.some((f) => o.test(String(n[f] ?? ""))));
19
+ }
20
+ function d(r) {
21
+ return r ? `${r.portal.url}/home/item.html?id=${r.id}` : "";
22
+ }
23
+ const { editor: h } = await import("monaco-editor/esm/vs/editor/editor.api");
24
+ export {
25
+ h as e,
26
+ g as f,
27
+ d as p
28
+ };
@@ -11,7 +11,7 @@ import { nothing as N } from "lit-html";
11
11
  /*!
12
12
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
13
13
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
14
- * v4.32.0-next.8
14
+ * v4.32.0-next.9
15
15
  */
16
16
  var R = ";", m = ",", $ = ":", j = !0, U = !0, V = !0, w = (e = "", t = {}, s = S()) => {
17
17
  const o = {
@@ -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.8
8
+ * v4.32.0-next.9
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();
@@ -1,10 +1,11 @@
1
- import { editor as a, languages as u, Emitter as T } from "monaco-editor";
2
- import { Deferred as E, debounce as N } from "@arcgis/components-utils";
1
+ import { e as a } from "./monaco-importer.js";
2
+ import { Deferred as E, debounce as T } from "@arcgis/components-utils";
3
3
  import { a as g } from "./sql-expr-defaults.js";
4
+ import { languages as u, Emitter as m } from "monaco-editor";
4
5
  /*!
5
6
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
6
7
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
7
- * v4.32.0-next.8
8
+ * v4.32.0-next.9
8
9
  */
9
10
  let h = new E();
10
11
  class _ {
@@ -41,7 +42,7 @@ class _ {
41
42
  return await this._worker?.withSyncedResources(e), o;
42
43
  }
43
44
  }
44
- const m = [
45
+ const N = [
45
46
  "AND",
46
47
  "AS",
47
48
  "BOTH",
@@ -86,7 +87,7 @@ const m = [
86
87
  "WITH",
87
88
  "YEAR",
88
89
  "ZONE"
89
- ], S = [
90
+ ], f = [
90
91
  // Logical
91
92
  "AND",
92
93
  "BETWEEN",
@@ -96,7 +97,7 @@ const m = [
96
97
  // Predicates
97
98
  "IS",
98
99
  "NULL"
99
- ], f = [
100
+ ], S = [
100
101
  // Conversion
101
102
  "CAST",
102
103
  // Datetime
@@ -164,9 +165,9 @@ const m = [
164
165
  { open: "[", close: "]", token: "delimiter.square" },
165
166
  { open: "(", close: ")", token: "delimiter.parenthesis" }
166
167
  ],
167
- keywords: m,
168
- operators: S,
169
- builtinFunctions: f,
168
+ keywords: N,
169
+ operators: f,
170
+ builtinFunctions: S,
170
171
  builtinVariables: [],
171
172
  tokenizer: {
172
173
  root: [
@@ -239,13 +240,13 @@ class R {
239
240
  }
240
241
  async provideCompletionItems(e, o) {
241
242
  try {
242
- const s = await this._worker(e.uri), c = e.getWordUntilPosition(o), r = {
243
+ const s = await this._worker(e.uri), c = e.getWordUntilPosition(o), n = {
243
244
  startLineNumber: o.lineNumber,
244
245
  endLineNumber: o.lineNumber,
245
246
  startColumn: c.startColumn,
246
247
  endColumn: c.endColumn
247
248
  }, d = this._defaults.getApiContextForModel(e.uri);
248
- return await s.doComplete(e.uri.toString(), r, o, d);
249
+ return await s.doComplete(e.uri.toString(), n, o, d);
249
250
  } catch (s) {
250
251
  return console.error(s), { suggestions: [] };
251
252
  }
@@ -257,11 +258,11 @@ class x {
257
258
  diagnosticService: c
258
259
  }) {
259
260
  this._languageId = e, this._worker = o, this._disposables = [], this._modelListeners = /* @__PURE__ */ new Map(), this._diagnosticsService = c, this._defaults = s;
260
- const r = (t) => {
261
+ const n = (t) => {
261
262
  const i = t.getLanguageId();
262
263
  if (i !== this._languageId)
263
264
  return;
264
- const l = N(() => {
265
+ const l = T(() => {
265
266
  this._doValidate(t, i).catch((w) => {
266
267
  throw w;
267
268
  });
@@ -277,14 +278,14 @@ class x {
277
278
  this._modelListeners.delete(i);
278
279
  }
279
280
  };
280
- this._disposables.push(a.onDidCreateModel(r)), this._disposables.push(a.onWillDisposeModel((t) => d(t))), this._disposables.push(
281
+ this._disposables.push(a.onDidCreateModel(n)), this._disposables.push(a.onWillDisposeModel((t) => d(t))), this._disposables.push(
281
282
  a.onDidChangeModelLanguage((t) => {
282
- d(t.model), r(t.model);
283
+ d(t.model), n(t.model);
283
284
  })
284
285
  ), this._disposables.push(
285
286
  s.onDidChange(() => {
286
287
  a.getModels().forEach((t) => {
287
- t.getLanguageId() === this._languageId && (d(t), r(t));
288
+ t.getLanguageId() === this._languageId && (d(t), n(t));
288
289
  });
289
290
  })
290
291
  ), this._disposables.push(
@@ -297,31 +298,31 @@ class x {
297
298
  dispose: () => {
298
299
  this._modelListeners.forEach((t) => t.forEach((i) => i.dispose())), this._modelListeners.clear();
299
300
  }
300
- }), a.getModels().forEach(r);
301
+ }), a.getModels().forEach(n);
301
302
  }
302
303
  async _doValidate(e, o) {
303
304
  if (e.isAttachedToEditor())
304
305
  try {
305
- const s = await this._worker(e.uri), c = this._defaults.getApiContextForModel(e.uri), r = await s.doValidation(e.uri.toString(), c);
306
- this._diagnosticsService.fireDiagnosticsChange(e.uri, r), a.setModelMarkers(e, o, r);
306
+ const s = await this._worker(e.uri), c = this._defaults.getApiContextForModel(e.uri), n = await s.doValidation(e.uri.toString(), c);
307
+ this._diagnosticsService.fireDiagnosticsChange(e.uri, n), a.setModelMarkers(e, o, n);
307
308
  } catch (s) {
308
309
  console.error(s);
309
310
  }
310
311
  }
311
312
  }
312
313
  let p;
313
- async function q(...n) {
314
+ async function y(...r) {
314
315
  return await _.waitForWorker(), await new Promise((e, o) => {
315
316
  if (!p) {
316
317
  o(new Error("sql expression worker not registered!"));
317
318
  return;
318
319
  }
319
- e(p(...n));
320
+ e(p(...r));
320
321
  });
321
322
  }
322
323
  class M {
323
324
  constructor() {
324
- this._onDiagnosticsChange = new T();
325
+ this._onDiagnosticsChange = new m();
325
326
  }
326
327
  /**
327
328
  * An event to signal changes to the diagnostics.
@@ -340,20 +341,20 @@ class M {
340
341
  }
341
342
  }
342
343
  const k = new M();
343
- function y() {
344
+ function P() {
344
345
  return k;
345
346
  }
346
- function P(n) {
347
- const e = new _(n), o = async (...c) => await e.getLanguageServiceWorker(...c);
347
+ function W(r) {
348
+ const e = new _(r), o = async (...c) => await e.getLanguageServiceWorker(...c);
348
349
  p = o, u.setMonarchTokensProvider(g.languageId, L), u.setLanguageConfiguration(g.languageId, A);
349
350
  const s = new R(o, g);
350
- u.registerCompletionItemProvider(g.languageId, s), new x(n.languageId, o, {
351
- defaults: n,
351
+ u.registerCompletionItemProvider(g.languageId, s), new x(r.languageId, o, {
352
+ defaults: r,
352
353
  diagnosticService: k
353
354
  });
354
355
  }
355
356
  export {
356
- y as getSqlExprDiagnosticService,
357
- q as getSqlExprWorker,
358
- P as setupMode
357
+ P as getSqlExprDiagnosticService,
358
+ y as getSqlExprWorker,
359
+ W as setupMode
359
360
  };
@@ -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.8
6
+ * v4.32.0-next.9
7
7
  */
8
8
  const s = o(t);
9
9
  export {
@@ -1,5 +1,5 @@
1
1
  import { PropertyValues } from 'lit';
2
- import { editor } from 'monaco-editor';
2
+ import { editor as Editor } from 'monaco-editor';
3
3
  import { ApiCategory, ApiSnippet, Diagnostic } from '@arcgis/arcade-languageservice';
4
4
  import { JsxNode, PublicLitElement as LitElement } from '@arcgis/lumina';
5
5
  import { IEditorCodeSuggestion, IEditorCodeSuggestionGroup } from '../../utils/editor-suggestions';
@@ -18,7 +18,7 @@ export declare class ArcgisArcadeEditor extends LitElement {
18
18
  * @readonly
19
19
  * @internal
20
20
  */
21
- get editorInstance(): editor.IStandaloneCodeEditor | undefined;
21
+ get editorInstance(): Editor.IStandaloneCodeEditor | undefined;
22
22
  /**
23
23
  * Options to update on the editor.
24
24
  * For example:
@@ -30,7 +30,7 @@ export declare class ArcgisArcadeEditor extends LitElement {
30
30
  *
31
31
  * To get the full list of available options, see the Monaco Editor options documentation for more details.
32
32
  */
33
- editorOptions: (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
33
+ editorOptions: (Editor.IEditorOptions & Editor.IGlobalEditorOptions) | undefined;
34
34
  /** If true, it will hide the documentation action in the side panel */
35
35
  hideDocumentationActions: boolean;
36
36
  /** If true, it will hide the side actions bar. The editor will be in a minimalistic UX. */
@@ -68,7 +68,7 @@ export declare class ArcgisArcadeEditor extends LitElement {
68
68
  * @internal
69
69
  * @deprecated Use `editorInstance` property instead.
70
70
  */
71
- getEditorInstance(): Promise<editor.IStandaloneCodeEditor | undefined>;
71
+ getEditorInstance(): Promise<Editor.IStandaloneCodeEditor | undefined>;
72
72
  /** @deprecated Use `script` property instead. */
73
73
  getScript(): Promise<string | undefined>;
74
74
  /** Returns the Arcade result for the script for the provided test data. */
@@ -1,22 +1,23 @@
1
1
  import { L as h, c as n, n as u, g, a as _ } from "../../chunks/runtime.js";
2
2
  import { html as t, nothing as r } from "lit";
3
- import { KeyCode as f } from "monaco-editor";
4
- import { Deferred as m, generateGuid as x } from "@arcgis/components-utils";
5
- import { D as b, e as c } from "../../chunks/arcade-executor.js";
6
- import { s as v, a as P } from "../../chunks/arcade-service-accessors.js";
3
+ import "../../chunks/monaco-importer.js";
4
+ import { Deferred as f, generateGuid as m } from "@arcgis/components-utils";
5
+ import { D as x, e as c } from "../../chunks/arcade-executor.js";
6
+ import { s as b, a as v } from "../../chunks/arcade-service-accessors.js";
7
7
  import { b as s } from "../../chunks/arcade-defaults.js";
8
- import { u as E } from "../../chunks/useT9n.js";
9
- import { createRef as S, ref as A } from "lit-html/directives/ref.js";
10
- import { css as w } from "@lit/reactive-element/css-tag.js";
8
+ import { u as P } from "../../chunks/useT9n.js";
9
+ import { createRef as E, ref as S } from "lit-html/directives/ref.js";
10
+ import { css as A } from "@lit/reactive-element/css-tag.js";
11
+ import { KeyCode as w } from "monaco-editor";
11
12
  /*!
12
13
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
13
14
  * See https://js.arcgis.com/4.32/esri/copyright.txt for details.
14
- * v4.32.0-next.8
15
+ * v4.32.0-next.9
15
16
  */
16
- 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}}}`;
17
+ const $ = A`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}}}`;
17
18
  class y extends h {
18
19
  constructor() {
19
- 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) => {
20
+ super(...arguments), this._codeEditorElt = E(), this._componentReadyDefer = new f(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = P(), this._modelId = m(), this._openArcadeHelp = () => void window.open(x, "Arcade Help"), this._toggleSidePanel = (e) => {
20
21
  if (!e.target)
21
22
  return;
22
23
  const i = e.target?.dataset.panelName ?? "none";
@@ -77,7 +78,7 @@ class y extends h {
77
78
  // #region Lifecycle
78
79
  async load() {
79
80
  const e = g("./assets");
80
- v(e), await this._updateEditorProfile();
81
+ b(e), await this._updateEditorProfile();
81
82
  }
82
83
  willUpdate(e) {
83
84
  (e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && s.updateApiContextForModel(this._modelId, {
@@ -87,7 +88,7 @@ class y extends h {
87
88
  /** This lifecycle method is not expected to return a promise. The returned promise will be ignored by Lit rather than awaited. */
88
89
  async loaded() {
89
90
  this._componentReadyDefer.resolve(), await this._updateApiLibrary();
90
- const e = await P();
91
+ const e = await v();
91
92
  this._disposables.push(e.onDiagnosticsChange((i) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(i.diagnostics))), this.testData && this._addExecuteScriptAction(), await this._codeEditorElt.value?.setFocus();
92
93
  }
93
94
  disconnectedCallback() {
@@ -158,7 +159,7 @@ class y extends h {
158
159
  // An unique identifier for the action.
159
160
  id: "run-script",
160
161
  label: "Run Arcade Expression",
161
- keybindings: [f.F5],
162
+ keybindings: [w.F5],
162
163
  contextMenuGroupId: "code",
163
164
  contextMenuOrder: 1,
164
165
  run: () => {
@@ -178,7 +179,7 @@ class y extends h {
178
179
  return this.testData ? t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${(this.messages.run ?? "") || ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult ? t`<calcite-action .text=${(this.messages.lastresults ?? "") || ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
179
180
  }
180
181
  renderMainPanel() {
181
- 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>`;
182
+ return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${(this.script ?? "") || ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${S(this._codeEditorElt)}></arcgis-code-editor>`;
182
183
  }
183
184
  renderAction({ id: e, label: i, icon: a, active: o, panelName: l, iconFlipRtl: d = !1, onClick: p = this._toggleSidePanel }) {
184
185
  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>` || ""}`;
@@ -8,7 +8,7 @@ import { css as M } from "@lit/reactive-element/css-tag.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.8
11
+ * v4.32.0-next.9
12
12
  */
13
13
  const A = M`: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}.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}.ltr-container{direction:ltr}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{table{display:block;max-width:fit-content;overflow-x:auto;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)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, a = {
14
14
  lines: !0,
@@ -3,13 +3,13 @@ import { ref as c } from "lit-html/directives/ref.js";
3
3
  import { html as s, nothing as l } from "lit";
4
4
  import { setFocusOnElement as g } from "@arcgis/components-utils";
5
5
  import { g as a, o as u, c as h, b as m } from "../../chunks/markdown.js";
6
- import { f } from "../../chunks/utilities.js";
6
+ import { f } from "../../chunks/monaco-importer.js";
7
7
  import { u as p } from "../../chunks/useT9n.js";
8
8
  import { css as b } from "@lit/reactive-element/css-tag.js";
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.8
12
+ * v4.32.0-next.9
13
13
  */
14
14
  function v(o) {
15
15
  return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);