@arcgis/coding-components 5.2.0-next.5 → 5.2.0-next.6

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 (49) hide show
  1. package/dist/cdn/{4G3EYLJY.js → 2YYB74Y3.js} +1 -1
  2. package/dist/cdn/{WWVPYM5B.js → 4HJRS4I7.js} +1 -1
  3. package/dist/cdn/DOCWTXKZ.js +12 -0
  4. package/dist/cdn/HBKQDGYR.js +2 -0
  5. package/dist/cdn/{QW7OA32G.js → HDEGIRFB.js} +1 -1
  6. package/dist/cdn/{HRM2JUGO.js → HQPGLNWP.js} +1 -1
  7. package/dist/cdn/I3XXIRZX.js +2 -0
  8. package/dist/cdn/ID5LCA7T.js +2 -0
  9. package/dist/cdn/{LUJKYDO7.js → IL7DUQH7.js} +1 -1
  10. package/dist/cdn/JEBRK3DP.js +2 -0
  11. package/dist/cdn/MZMKV7FA.js +2 -0
  12. package/dist/cdn/{IETP57KJ.js → NKDL6NEF.js} +1 -1
  13. package/dist/cdn/NL736YG3.js +6 -0
  14. package/dist/cdn/{3CHKFCKR.js → SFHJYB2X.js} +1 -1
  15. package/dist/cdn/{O3PQD5N5.js → SYW5WY2N.js} +1 -1
  16. package/dist/cdn/{CA3GVMWI.js → UDPKHTMC.js} +1 -1
  17. package/dist/cdn/UQRZDUGL.js +2 -0
  18. package/dist/cdn/{QGBZYXBS.js → XMXK333I.js} +1 -1
  19. package/dist/cdn/{QUR4WECO.js → XWUEYP6T.js} +1 -1
  20. package/dist/cdn/assets/code-editor/sql-expr.worker.js +2 -2
  21. package/dist/cdn/index.js +1 -1
  22. package/dist/chunks/arcade-defaults.js +56 -54
  23. package/dist/chunks/fields.js +18 -14
  24. package/dist/chunks/language-defaults-base.js +230 -221
  25. package/dist/chunks/sql-expr-defaults.js +63 -59
  26. package/dist/components/arcgis-arcade-debugger-console/customElement.js +6 -6
  27. package/dist/components/arcgis-arcade-editor/customElement.js +147 -151
  28. package/dist/components/arcgis-code-editor-shell/customElement.js +5 -5
  29. package/dist/components/arcgis-editor-variables/customElement.js +12 -6
  30. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
  31. package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/vscode.html-custom-data.json +1 -1
  35. package/dist/docs/web-types.json +1 -1
  36. package/dist/loader.js +2 -2
  37. package/dist/types/lumina.d.ts +1 -1
  38. package/dist/types/preact.d.ts +1 -1
  39. package/dist/types/react.d.ts +1 -1
  40. package/dist/types/stencil.d.ts +1 -1
  41. package/package.json +6 -6
  42. package/dist/cdn/4N67XYKO.js +0 -2
  43. package/dist/cdn/B5A6XU2C.js +0 -2
  44. package/dist/cdn/CQTJWVFM.js +0 -6
  45. package/dist/cdn/G5IXPOCO.js +0 -2
  46. package/dist/cdn/RMVHO2AH.js +0 -12
  47. package/dist/cdn/RO6RHW6I.js +0 -2
  48. package/dist/cdn/TWEJITWD.js +0 -2
  49. package/dist/cdn/ZTCCL565.js +0 -2
@@ -1,50 +1,54 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { i as c, b as h } from "./utils.js";
3
- import { CompletionItemKind as m, InsertTextFormat as g, InsertTextMode as b } from "vscode-languageserver-types";
4
- import { f as x, L as F, E } from "./language-defaults-base.js";
5
- import { fetchT9nStringsBundle as M } from "@arcgis/toolkit/intl";
6
- import { g as w } from "./runtime.js";
7
- const v = {
2
+ import { i as c, b as P } from "./utils.js";
3
+ import { CompletionItemKind as h, InsertTextFormat as g, InsertTextMode as F } from "vscode-languageserver-types";
4
+ import { f as b, L as w, E as x } from "./language-defaults-base.js";
5
+ import { fetchT9nStringsBundle as E } from "@arcgis/toolkit/intl";
6
+ import { g as M } from "./runtime.js";
7
+ const A = {
8
8
  allowAllRootBinaryOperators: !1,
9
9
  requiresPredicateRootNode: !1
10
10
  }, d = {
11
- "field-calculation": v,
11
+ "field-calculation": A,
12
12
  "where-clause": {
13
13
  allowAllRootBinaryOperators: !0,
14
- requiresPredicateRootNode: !0
14
+ requiresPredicateRootNode: !0,
15
+ allowGeometryFields: !0
15
16
  }
16
17
  };
17
- function A(o) {
18
+ function v(o) {
18
19
  return o && o in d ? d[o] : void 0;
19
20
  }
20
21
  const q = (o) => {
21
- const i = o.variables[0], e = i?.type === "featureSet" ? T(i) : void 0, { apiVersion: t, bundles: r, hiddenApiItems: s } = o.toEditorProfileDefinition();
22
+ const r = o.variables[0], t = r?.type === "featureSet" ? T(r) : void 0, { apiVersion: e, bundles: i, hiddenApiItems: s } = o.toEditorProfileDefinition();
22
23
  return {
23
- apiVersion: t,
24
- bundles: r,
25
- variables: e ? [e] : [],
24
+ apiVersion: e,
25
+ bundles: i,
26
+ variables: t ? [t] : [],
26
27
  hiddenApiItems: s?.map((a) => a.toLowerCase())
27
28
  };
28
29
  };
29
30
  function T(o) {
30
- const { name: i } = o, e = o.getDescription(), { definition: t } = o.toProfileVariableDefinition(), r = {
31
- label: i,
32
- detail: i,
33
- insertText: i,
34
- insertTextMode: b.asIs,
31
+ const { name: r } = o, t = o.getDescription(), { definition: e } = o.toProfileVariableDefinition(), i = {
32
+ label: r,
33
+ detail: r,
34
+ insertText: r,
35
+ insertTextMode: F.asIs,
35
36
  insertTextFormat: g.PlainText,
36
- kind: m.Field
37
+ kind: h.Field
37
38
  }, s = {
38
- name: i,
39
- description: e,
39
+ name: r,
40
+ description: t,
40
41
  type: "dictionary",
41
42
  properties: [],
42
- completion: r
43
+ completion: i
43
44
  };
44
- if (!t || !("fields" in t))
45
+ if (!e || !("fields" in e))
45
46
  return s;
46
- const [a, l] = x(t.fields, e);
47
- return s.properties = a, r.documentation = { kind: "markdown", value: l }, s;
47
+ const [a, l] = b(e.fields, t, {
48
+ includeAliases: !1,
49
+ supportGeometryFields: !0
50
+ });
51
+ return s.properties = a, i.documentation = { kind: "markdown", value: l }, s;
48
52
  }
49
53
  const u = [
50
54
  {
@@ -68,27 +72,27 @@ function L(o) {
68
72
  function S(o) {
69
73
  if (!c(o))
70
74
  return;
71
- const i = L(
75
+ const r = L(
72
76
  o.id
73
77
  /*locale*/
74
78
  );
75
- if (!i)
79
+ if (!r)
76
80
  return;
77
- const e = {
81
+ const t = {
78
82
  variables: [],
79
- hiddenApiItems: o.hiddenApiItems?.map((t) => t.toLowerCase())
83
+ hiddenApiItems: o.hiddenApiItems?.map((e) => e.toLowerCase())
80
84
  };
81
- return i.variables.forEach((t) => {
82
- if (o.disabledVariables?.includes(t.name))
85
+ return r.variables.forEach((e) => {
86
+ if (o.disabledVariables?.includes(e.name))
83
87
  return;
84
- const r = o.definitions[t.name];
85
- if (t.type === "featureSet")
86
- return h(r) ? e.variables.push({ ...t, type: t.type, definition: r }) : void 0;
87
- throw Error(`sdkVariable type not supported (yet) type: ${t.type}`);
88
- }), e;
88
+ const i = o.definitions[e.name];
89
+ if (e.type === "featureSet")
90
+ return P(i) ? t.variables.push({ ...e, type: e.type, definition: i }) : void 0;
91
+ throw Error(`sdkVariable type not supported (yet) type: ${e.type}`);
92
+ }), t;
89
93
  }
90
94
  const f = "arcgis-sql-expression";
91
- class _ extends F {
95
+ class _ extends w {
92
96
  constructor() {
93
97
  super(f, {
94
98
  apiPath: "./assets/sql-language/api",
@@ -96,42 +100,42 @@ class _ extends F {
96
100
  }), this._languageId = f, this._layerMap = /* @__PURE__ */ new Map();
97
101
  }
98
102
  // TODO: try to rely on editor profile instance instead of storing a feature layer
99
- updateFeatureLayerForModel(i, e) {
100
- const t = this._getApiKey(i);
101
- this._layerMap.set(t, e);
103
+ updateFeatureLayerForModel(r, t) {
104
+ const e = this._getApiKey(r);
105
+ this._layerMap.set(e, t);
102
106
  }
103
- getFeatureLayerForModel(i) {
104
- const e = this._getApiKey(i);
105
- return this._layerMap.get(e);
107
+ getFeatureLayerForModel(r) {
108
+ const t = this._getApiKey(r);
109
+ return this._layerMap.get(t);
106
110
  }
107
- async setProfileForModel(i, e, t = { locale: "en" }) {
108
- const r = c(e) ? A(e.id) : void 0;
109
- c(e) && (e = S(e));
110
- const s = await M(
111
- t.locale,
112
- w("./assets/editor-profile/t9n"),
111
+ async setProfileForModel(r, t, e = { locale: "en" }) {
112
+ const i = c(t) ? v(t.id) : void 0;
113
+ c(t) && (t = S(t));
114
+ const s = await E(
115
+ e.locale,
116
+ M("./assets/editor-profile/t9n"),
113
117
  "messages."
114
118
  );
115
119
  if (!s)
116
- throw new Error(`Failed to load the language bundle for ${t.locale}`);
117
- this.disposeForModel(i);
118
- const a = this._getApiKey(i), l = new E(e, s);
120
+ throw new Error(`Failed to load the language bundle for ${e.locale}`);
121
+ this.disposeForModel(r);
122
+ const a = this._getApiKey(r), l = new x(t, s, e.locale, i);
119
123
  this._modelToProfileMap.set(a, l);
120
124
  const y = q(l);
121
- this.updateApiContextForModel(i, {
122
- locale: t.locale,
125
+ this.updateApiContextForModel(r, {
126
+ locale: e.locale,
123
127
  profile: y,
124
- ...r ? { profilePolicy: r } : {}
128
+ ...i ? { profilePolicy: i } : {}
125
129
  });
126
- const p = e?.variables?.find((P) => P.name === "$layer");
127
- p && this.updateFeatureLayerForModel(i, p.definition);
130
+ const p = t?.variables?.find((m) => m.name === "$layer");
131
+ p && this.updateFeatureLayerForModel(r, p.definition);
128
132
  }
129
133
  }
130
- const n = new _(), R = {
134
+ const n = new _(), $ = {
131
135
  setProfileForModel: n.setProfileForModel.bind(n),
132
136
  getApiLibraryForModel: n.getApiLibraryForModel.bind(n)
133
137
  };
134
138
  export {
135
139
  n as a,
136
- R as s
140
+ $ as s
137
141
  };
@@ -7,8 +7,8 @@ import { u as x } from "../../chunks/useT9n.js";
7
7
  import { load as S } from "@arcgis/lumina/controllers";
8
8
  import { i as $ } from "../../chunks/monaco-importer.js";
9
9
  import { t as l } from "../../chunks/functional.js";
10
- import { d as k, g as y, c as m } from "../../chunks/debugger-value-styles.js";
11
- import { i as h, a as P, p as T, b as E, c as L, d as C, S as M, D as B, e as V } from "../../chunks/debugger-value-components.js";
10
+ import { d as k, g as y, c as h } from "../../chunks/debugger-value-styles.js";
11
+ import { i as m, a as P, p as T, b as E, c as L, d as C, S as M, D as B, e as V } from "../../chunks/debugger-value-components.js";
12
12
  import { observeAncestorsMutation as z, unsafeGetCalciteModeName as I } from "@arcgis/toolkit/dom";
13
13
  import { generateGuid as A } from "@arcgis/toolkit/string";
14
14
  import { d as p } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
@@ -49,7 +49,7 @@ class N extends f {
49
49
  return t ? t.getLineContent(e) : "";
50
50
  }
51
51
  updateTheme() {
52
- I(this.el) === "dark" ? this.elementInternals.states.add(m) : this.elementInternals.states.delete(m);
52
+ I(this.el) === "dark" ? this.elementInternals.states.add(h) : this.elementInternals.states.delete(h);
53
53
  }
54
54
  getBreakpointCode(e) {
55
55
  return e == null ? this.messages.nocontent ?? "No content" : this.getContentAtLine(e) || (this.messages.nocontent ?? "No content");
@@ -71,7 +71,7 @@ class N extends f {
71
71
  }
72
72
  }
73
73
  getExpandedDebuggerMap(e) {
74
- if (e == null || !h(e))
74
+ if (e == null || !m(e))
75
75
  return null;
76
76
  const t = e.expand();
77
77
  return Array.isArray(t) ? null : t;
@@ -83,7 +83,7 @@ class N extends f {
83
83
  });
84
84
  }
85
85
  getExpandedDebuggerChild(e, t) {
86
- if (!e || !h(e))
86
+ if (!e || !m(e))
87
87
  return;
88
88
  const a = e.expand();
89
89
  if (Array.isArray(a)) {
@@ -208,7 +208,7 @@ class N extends f {
208
208
  }
209
209
  render() {
210
210
  const { line: e } = this.debuggerStore?.executionState ?? {}, t = this.breakpoints.find((i) => i.line === e), a = this.breakpoints.findIndex((i) => i.line === e);
211
- return r`<div class="console-shell"><div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + (t?.line ?? e ?? 1) - 1)}>${this.getBreakpointCode(t?.line ?? this.breakpoints[0]?.line ?? e ?? 1)}</arcgis-code-viewer>${this.breakpoints.length ? r`<calcite-action id=${this._breakpointPopoverId ?? b} scale=s .text=${this.getBreakpointPositionText(a >= 0 ? a + 1 : 1)} text-enabled icon=chevron-down></calcite-action>` : null}${this.renderBreakpointPopover(t?.line ?? e)}</div><div class="tabs-container">${this.renderTabs()}</div></div>`;
211
+ return r`<div class="console-shell">${this.breakpoints.length && r`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${(i) => String(i + (t?.line ?? e ?? 1) - 1)}>${this.getBreakpointCode(t?.line ?? this.breakpoints[0]?.line ?? e ?? 1)}</arcgis-code-viewer>${this.breakpoints.length ? r`<calcite-action id=${this._breakpointPopoverId ?? b} scale=s .text=${this.getBreakpointPositionText(a >= 0 ? a + 1 : 1)} text-enabled icon=chevron-down></calcite-action>` : null}${this.renderBreakpointPopover(t?.line ?? e)}</div>` || ""}<div class="tabs-container">${this.renderTabs()}</div></div>`;
212
212
  }
213
213
  }
214
214
  v("arcgis-arcade-debugger-console", N);