@arcgis/coding-components 5.0.0-next.115 → 5.0.0-next.116

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 (91) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{K3OFY5LP.js → 2VBQTKPJ.js} +2 -2
  3. package/dist/cdn/{MZPZFREP.js → 2VDNM4E2.js} +1 -1
  4. package/dist/cdn/4VCUCVBK.js +4 -0
  5. package/dist/cdn/{XZYQ5WFX.js → 5E34XUIB.js} +2 -2
  6. package/dist/cdn/{67E4YMD5.js → 5OKP7MR6.js} +2 -2
  7. package/dist/cdn/{FRTGBMVF.js → 7JJPXZKZ.js} +2 -2
  8. package/dist/cdn/{35UYJPMN.js → 7V25IS6A.js} +2 -2
  9. package/dist/cdn/{M4RMJ7BY.js → AFWFVZ3D.js} +2 -2
  10. package/dist/cdn/{66DRHYYQ.js → ATMZJVQS.js} +2 -2
  11. package/dist/cdn/{YAOQOXYD.js → BKDPALF4.js} +2 -2
  12. package/dist/cdn/{P7Z7Z5MP.js → D6OLHQF3.js} +2 -2
  13. package/dist/cdn/{LMVH5ZN2.js → DTYDEUN2.js} +2 -2
  14. package/dist/cdn/{HHSF5HC7.js → E3ACBLRP.js} +1 -1
  15. package/dist/cdn/{TXC5QHF3.js → EFBFASZ2.js} +1 -1
  16. package/dist/cdn/{XTDOUEEH.js → ENLUMTM2.js} +1 -1
  17. package/dist/cdn/{QXIVF4MY.js → FGWMLBVV.js} +2 -2
  18. package/dist/cdn/{DNDB4MKF.js → FXCCH2NR.js} +2 -2
  19. package/dist/cdn/{NEL3XJCE.js → GAFDXLRK.js} +1 -1
  20. package/dist/cdn/{JDCAC6XQ.js → GRGNF5BP.js} +2 -2
  21. package/dist/cdn/{B45FNYO4.js → HAU34O2T.js} +2 -2
  22. package/dist/cdn/{A7BWBOLR.js → IBKP7EVS.js} +2 -2
  23. package/dist/cdn/{3ZAHHK56.js → JHIMMZLU.js} +2 -2
  24. package/dist/cdn/{NSGHBWR3.js → JLKSWW5G.js} +2 -2
  25. package/dist/cdn/{QRS5PI4H.js → KWHR4CPP.js} +2 -2
  26. package/dist/cdn/{VAVIGXGM.js → KZ3NNHCH.js} +2 -2
  27. package/dist/cdn/{V535VIAK.js → LDRKCODQ.js} +2 -2
  28. package/dist/cdn/{6QHDE4IM.js → LHKKZWM7.js} +2 -2
  29. package/dist/cdn/{TLPEZPK6.js → NP2YJUNW.js} +2 -2
  30. package/dist/cdn/{53DJ3VCC.js → OI2LQPNO.js} +2 -2
  31. package/dist/cdn/{CIX6N6SG.js → OVHUPF6I.js} +2 -2
  32. package/dist/cdn/{4GUKMB7W.js → PCXGFTQ5.js} +2 -2
  33. package/dist/cdn/{H64WNFLJ.js → PE2O2A3D.js} +1 -1
  34. package/dist/cdn/{GOPSB5RG.js → PEDVTCDU.js} +2 -2
  35. package/dist/cdn/{YJ6WQKJ3.js → PLGJ2YGG.js} +2 -2
  36. package/dist/cdn/{ZDNJOKSY.js → QJQAOLAC.js} +2 -2
  37. package/dist/cdn/{T7I2WGK3.js → RIWO6MXU.js} +2 -2
  38. package/dist/cdn/{7ODWP34O.js → RSX4DVU2.js} +2 -2
  39. package/dist/cdn/{4L2CZR3G.js → SARGQYJB.js} +2 -2
  40. package/dist/cdn/SSXARCZF.js +8 -0
  41. package/dist/cdn/{6OIKRUA6.js → TASZMXVX.js} +2 -2
  42. package/dist/cdn/{BBLHJGDS.js → UBD2AOJU.js} +2 -2
  43. package/dist/cdn/{2OJSETYS.js → V7NFXJT4.js} +3 -3
  44. package/dist/cdn/{FRP2OPY7.js → VPJMN4YI.js} +2 -2
  45. package/dist/cdn/{FTZ6KZ3Y.js → VR2FY3BO.js} +1 -1
  46. package/dist/cdn/{FYDA2L6G.js → WCZCRBXC.js} +3 -3
  47. package/dist/cdn/{RVT6UOXG.js → XZO6ZBYE.js} +2 -2
  48. package/dist/cdn/{6P6NWMPH.js → YCFI5E4G.js} +1 -1
  49. package/dist/cdn/{76GC5SU3.js → ZFJ2WJ7H.js} +2 -2
  50. package/dist/cdn/index.js +2 -2
  51. package/dist/chunks/arcade-contribution.js +1 -1
  52. package/dist/chunks/arcade-defaults.js +113 -90
  53. package/dist/chunks/arcade-executor.js +1 -1
  54. package/dist/chunks/arcade-mode.js +1 -1
  55. package/dist/chunks/arcade-service-accessors.js +1 -1
  56. package/dist/chunks/colorize.js +1 -1
  57. package/dist/chunks/fields.js +1 -1
  58. package/dist/chunks/language-defaults-base.js +51 -51
  59. package/dist/chunks/markdown.js +1 -1
  60. package/dist/chunks/monaco-importer.js +1 -1
  61. package/dist/chunks/monaco-theme.js +1 -1
  62. package/dist/chunks/runtime.js +1 -1
  63. package/dist/chunks/sql-expr-defaults.js +1 -1
  64. package/dist/chunks/sql-expr-mode.js +1 -1
  65. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  66. package/dist/chunks/useT9n.js +1 -1
  67. package/dist/chunks/utilities.js +1 -1
  68. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  69. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  71. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  72. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  73. package/dist/components/arcgis-code-editor-shell/customElement.js +1 -1
  74. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  75. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  76. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  77. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  78. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  79. package/dist/docs/api.json +2 -2
  80. package/dist/docs/docs.json +2 -2
  81. package/dist/docs/web-types.json +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/loader.js +1 -1
  84. package/dist/utils/arcade-monaco/arcade-profile-strategy.d.ts +4 -1
  85. package/dist/utils/language-defaults-base.d.ts +1 -1
  86. package/dist/utils/profile/editor-profile.d.ts +2 -1
  87. package/dist/utils/profile/types.d.ts +17 -0
  88. package/dist/utils/profile/utils.d.ts +0 -2
  89. package/package.json +5 -5
  90. package/dist/cdn/5H3477EG.js +0 -4
  91. package/dist/cdn/BS24QWDE.js +0 -8
@@ -1,98 +1,99 @@
1
- import { i as m, c as x, a as D, d as b, e as A, g as M, f as S, m as v, L as F, E as L } from "./language-defaults-base.js";
1
+ import { i as y, c as x, a as b, d as D, e as F, g as S, f as M, m as v, L as A, E as L } from "./language-defaults-base.js";
2
2
  import { supportedLocales as k, fetchT9nStringsBundle as E } from "@arcgis/toolkit/intl";
3
- import { g as y } from "./runtime.js";
4
- import { CompletionItemKind as w, InsertTextFormat as u, InsertTextMode as p } from "vscode-languageserver-types";
3
+ import { g as m } from "./runtime.js";
4
+ import { CompletionItemKind as g, InsertTextFormat as u, InsertTextMode as p } from "vscode-languageserver-types";
5
5
  import { getDeclaredPixelMembers as I } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
6
+ import "@arcgis/toolkit/type";
6
7
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
8
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
8
- v5.0.0-next.115 */
9
+ v5.0.0-next.116 */
9
10
  async function C(e) {
10
- const { apiVersion: r, bundles: t, hiddenApiItems: i } = e.toEditorProfileDefinition(), n = await h(e.dictionaryVariables);
11
- return { apiVersion: r, bundles: t, variables: n, hiddenApiItems: i?.map((s) => s.toLowerCase()) };
11
+ const { apiVersion: i, bundles: t, hiddenApiItems: n } = e.toEditorProfileDefinition(), r = await w(e.dictionaryVariables);
12
+ return { apiVersion: i, bundles: t, variables: r, hiddenApiItems: n?.map((s) => s.toLowerCase()) };
12
13
  }
13
- async function h(e, r = w.Variable) {
14
+ async function w(e, i = g.Variable) {
14
15
  return await Promise.all(
15
16
  e.map(async (t) => {
16
17
  switch (t.type) {
17
18
  case "dictionary":
18
- return await K(t, r);
19
+ return await K(t, i);
19
20
  case "pixel":
20
- return await B(t, r);
21
+ return await B(t, i);
21
22
  // Voxel is equivalent to features in regards to the languageservice.
22
23
  // They both have equivalent fields, but some voxel fields are different types (arrays)
23
24
  // than what is reported in .fields, so in the sidebar we treat a bit differently.
24
25
  // In autocomplete we don't differentiate types, so we can use the same logic as features.
25
26
  case "voxel":
26
27
  case "feature":
27
- return await j(t, r);
28
+ return await $(t, i);
28
29
  default:
29
- return $(t, r);
30
+ return j(t, i);
30
31
  }
31
32
  })
32
33
  );
33
34
  }
34
- function $(e, r) {
35
- const { name: t, type: i } = e, n = e.getDescription();
35
+ function j(e, i) {
36
+ const { name: t, type: n } = e, r = e.getDescription();
36
37
  return {
37
38
  name: t,
38
- description: n,
39
- type: i,
39
+ description: r,
40
+ type: n,
40
41
  completion: {
41
42
  label: t,
42
43
  detail: t,
43
44
  insertText: t,
44
45
  insertTextMode: p.asIs,
45
46
  insertTextFormat: u.PlainText,
46
- kind: r,
47
- documentation: { kind: "markdown", value: n }
47
+ kind: i,
48
+ documentation: { kind: "markdown", value: r }
48
49
  }
49
50
  };
50
51
  }
51
- async function j(e, r) {
52
- const t = await e.loadSource(), { name: i } = e, n = e.getDescription(), s = {
53
- label: i,
54
- detail: i,
55
- insertText: i,
52
+ async function $(e, i) {
53
+ const t = await e.loadSource(), { name: n } = e, r = e.getDescription(), s = {
54
+ label: n,
55
+ detail: n,
56
+ insertText: n,
56
57
  insertTextMode: p.asIs,
57
58
  insertTextFormat: u.PlainText,
58
- kind: r
59
+ kind: i
59
60
  }, o = {
60
- name: i,
61
- description: n,
61
+ name: n,
62
+ description: r,
62
63
  type: "dictionary",
63
64
  properties: [],
64
65
  completion: s
65
66
  };
66
67
  if (!t)
67
68
  return o;
68
- const [a, c] = S(t.fields, n, !0);
69
+ const [a, c] = M(t.fields, r, !0);
69
70
  return o.properties = a, s.documentation = { kind: "markdown", value: c }, o;
70
71
  }
71
- async function B(e, r) {
72
- const t = await e.loadSource(), i = e.toProfileVariableDefinition();
73
- if (i.type !== "pixel")
72
+ async function B(e, i) {
73
+ const t = await e.loadSource(), n = e.toProfileVariableDefinition();
74
+ if (n.type !== "pixel")
74
75
  throw new Error("Incorrect definition passed to pixel variable");
75
- const { name: n } = e, s = e.getDescription(), o = {
76
- label: n,
77
- detail: n,
78
- insertText: n,
76
+ const { name: r } = e, s = e.getDescription(), o = {
77
+ label: r,
78
+ detail: r,
79
+ insertText: r,
79
80
  insertTextMode: p.asIs,
80
81
  insertTextFormat: u.PlainText,
81
- kind: r
82
+ kind: i
82
83
  }, a = {
83
- name: n,
84
+ name: r,
84
85
  description: s,
85
86
  type: "dictionary",
86
87
  properties: [],
87
88
  completion: o
88
89
  };
89
- if (!t || !i.definition)
90
+ if (!t || !n.definition)
90
91
  return a;
91
- const c = await I(t), [g, P] = v(c, s);
92
- return a.properties = g, o.documentation = { kind: "markdown", value: P }, a;
92
+ const c = await I(t), [T, P] = v(c, s);
93
+ return a.properties = T, o.documentation = { kind: "markdown", value: P }, a;
93
94
  }
94
- async function K(e, r) {
95
- const { name: t, dictionaryVariables: i } = e, n = e.getDescription(), s = i.reduce((o, a) => {
95
+ async function K(e, i) {
96
+ const { name: t, dictionaryVariables: n } = e, r = e.getDescription(), s = n.reduce((o, a) => {
96
97
  o !== "" && (o += `
97
98
 
98
99
  `), o += `**${a.name}**
@@ -100,45 +101,45 @@ ${a.type}`;
100
101
  const c = a.getDescription();
101
102
  return c && (o += `
102
103
  ${c}`), o;
103
- }, n);
104
+ }, r);
104
105
  return {
105
106
  name: t,
106
- description: n,
107
+ description: r,
107
108
  type: "dictionary",
108
- properties: await h(i, w.Field),
109
+ properties: await w(n, g.Field),
109
110
  completion: {
110
111
  label: t,
111
112
  detail: t,
112
113
  insertText: t,
113
114
  insertTextMode: p.asIs,
114
115
  insertTextFormat: u.PlainText,
115
- kind: r,
116
+ kind: i,
116
117
  documentation: { kind: "markdown", value: s }
117
118
  }
118
119
  };
119
120
  }
120
121
  async function f(e = "en") {
121
- const r = T.get(e);
122
- if (r)
123
- return r;
122
+ const i = h.get(e);
123
+ if (i)
124
+ return i;
124
125
  if (!k.has(e))
125
126
  return await f("en");
126
127
  try {
127
- const t = await fetch(y(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
128
+ const t = await fetch(m(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
128
129
  return t.ok ? _(e, await t.json()) : e === "en" ? null : await f("en");
129
130
  } catch {
130
131
  return null;
131
132
  }
132
133
  }
133
- const T = /* @__PURE__ */ new Map();
134
- function _(e, r) {
134
+ const h = /* @__PURE__ */ new Map();
135
+ function _(e, i) {
135
136
  const t = /* @__PURE__ */ new Map();
136
- return r.forEach((i) => {
137
- t.set(i.id, i);
138
- }), T.set(e, t), t;
137
+ return i.forEach((n) => {
138
+ t.set(n.id, n);
139
+ }), h.set(e, t), t;
139
140
  }
140
- async function q(e, r = "en") {
141
- return (await f(r))?.get(e) ?? null;
141
+ async function q(e, i = "en") {
142
+ return (await f(i))?.get(e) ?? null;
142
143
  }
143
144
  function z(e) {
144
145
  return !!e && typeof e == "object" && "additionalVariables" in e && Array.isArray(e.additionalVariables);
@@ -164,46 +165,68 @@ function d(e) {
164
165
  return { ...e, type: e.type };
165
166
  }
166
167
  }
167
- async function H(e, r = "en") {
168
- if (!m(e))
168
+ async function H(e, i = "en") {
169
+ if (!y(e))
169
170
  return;
170
- const t = await q(e.id, r);
171
+ const t = await q(e.id, i);
171
172
  if (!t)
172
173
  return;
173
- const i = {
174
+ const n = {
174
175
  bundles: [...t.bundles],
175
176
  variables: [],
176
- hiddenApiItems: e.hiddenApiItems?.map((n) => n.toLowerCase())
177
+ hiddenApiItems: e.hiddenApiItems?.map((r) => r.toLowerCase())
177
178
  };
178
- return t.variables.forEach((n) => {
179
- if (e.disabledVariables?.includes(n.name))
179
+ return t.variables.forEach((r) => {
180
+ if (e.disabledVariables?.includes(r.name))
180
181
  return;
181
- const s = e.definitions[n.name];
182
- switch (n.type) {
182
+ const s = e.definitions[r.name];
183
+ switch (r.type) {
183
184
  case "dictionary":
184
- return i.variables.push(
185
+ return n.variables.push(
185
186
  d({
186
- ...n,
187
- type: n.type,
188
- properties: Array.isArray(s) ? [...s] : n.properties
187
+ ...r,
188
+ type: r.type,
189
+ properties: Array.isArray(s) ? [...s] : r.properties
189
190
  })
190
191
  );
191
192
  case "feature":
192
- return M(s) ? i.variables.push({ ...n, type: "feature", definition: s }) : void 0;
193
+ return S(s) ? n.variables.push({ ...r, type: "feature", definition: s }) : void 0;
193
194
  case "pixel":
194
- return A(s) ? i.variables.push({ ...n, type: n.type, definition: s }) : void 0;
195
+ return F(s) ? n.variables.push({ ...r, type: r.type, definition: s }) : void 0;
195
196
  case "voxel":
196
- return b(s) ? i.variables.push({ ...n, type: n.type, definition: s }) : void 0;
197
+ return D(s) ? n.variables.push({ ...r, type: r.type, definition: s }) : void 0;
197
198
  case "featureSet":
198
- return D(s) ? i.variables.push({ ...n, type: n.type, definition: s }) : void 0;
199
+ return b(s) ? n.variables.push({ ...r, type: r.type, definition: s }) : void 0;
199
200
  case "featureSetCollection":
200
- return x(s) ? i.variables.push({ ...n, type: n.type, definition: s }) : void 0;
201
+ return x(s) ? n.variables.push({ ...r, type: r.type, definition: s }) : void 0;
201
202
  default:
202
- return i.variables.push(d(n));
203
+ return n.variables.push(d(r));
203
204
  }
204
- }), z(e) && i.variables.push(...e.additionalVariables ?? []), i;
205
+ }), z(e) && n.variables.push(...e.additionalVariables ?? []), n;
205
206
  }
206
- class J extends F {
207
+ const J = [
208
+ "catalog-footprint",
209
+ "catalog",
210
+ "csv",
211
+ "feature",
212
+ "geojson",
213
+ "knowledge-graph-sublayer",
214
+ "ogc-feature",
215
+ "oriented-imagery",
216
+ "subtype-group",
217
+ "subtype-sublayer",
218
+ "wfs"
219
+ ];
220
+ function N(e) {
221
+ return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" && J.includes(e.type);
222
+ }
223
+ const O = {
224
+ filterFsCollectionLayersFromMap: (e) => (
225
+ // only some layers are supported in arcade feature sets, one example: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715
226
+ N(e)
227
+ )
228
+ };
229
+ class Q extends A {
207
230
  constructor() {
208
231
  super("arcade", {
209
232
  apiPath: "./assets/arcade-language/api",
@@ -220,31 +243,31 @@ class J extends F {
220
243
  * @param locale The locale to use for the model context.
221
244
  * @returns The EditorProfile for the model.
222
245
  */
223
- async setProfileForModel(r, t, i = { locale: "en" }) {
224
- m(t) && (t = await H(t, i.locale));
225
- const n = await E(
226
- i.locale,
227
- y("./assets/editor-profile/t9n"),
246
+ async setProfileForModel(i, t, n = { locale: "en" }) {
247
+ y(t) && (t = await H(t, n.locale));
248
+ const r = await E(
249
+ n.locale,
250
+ m("./assets/editor-profile/t9n"),
228
251
  "messages."
229
252
  );
230
- if (!n)
231
- throw new Error(`Failed to load the language bundle for ${i.locale}`);
232
- this.disposeForModel(r);
233
- const s = this._getApiKey(r), o = new L(t, n);
253
+ if (!r)
254
+ throw new Error(`Failed to load the language bundle for ${n.locale}`);
255
+ this.disposeForModel(i);
256
+ const s = this._getApiKey(i), o = new L(t, r, n.locale, O);
234
257
  this._modelToProfileMap.set(s, o);
235
258
  const a = await C(o);
236
- this.updateApiContextForModel(r, {
237
- locale: i.locale,
259
+ this.updateApiContextForModel(i, {
260
+ locale: n.locale,
238
261
  profile: a,
239
- snippets: i.snippets
262
+ snippets: n.snippets
240
263
  });
241
264
  }
242
265
  }
243
- const l = new J(), W = {
266
+ const l = new Q(), V = {
244
267
  setProfileForModel: l.setProfileForModel.bind(l),
245
268
  getApiLibraryForModel: l.getApiLibraryForModel.bind(l)
246
269
  };
247
270
  export {
248
- W as a,
271
+ V as a,
249
272
  l as b
250
273
  };
@@ -1,7 +1,7 @@
1
1
  import { createArcadeExecutor as C } from "@arcgis/core/arcade.js";
2
2
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
- v5.0.0-next.115 */
4
+ v5.0.0-next.116 */
5
5
  const O = "https://developers.arcgis.com/arcade/", P = 100, A = 100;
6
6
  function g(t) {
7
7
  return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.arcade.featureset.support.FeatureSet";
@@ -14,7 +14,7 @@ import { rethrowError as f } from "@arcgis/toolkit/log";
14
14
  import { Deferred as b } from "@arcgis/toolkit/promise";
15
15
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
16
16
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
17
- v5.0.0-next.115 */
17
+ v5.0.0-next.116 */
18
18
  const S = [
19
19
  "<=",
20
20
  ">=",
@@ -9,7 +9,7 @@ import "monaco-editor/esm/vs/editor/browser/editorDom.js";
9
9
  import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
12
- v5.0.0-next.115 */
12
+ v5.0.0-next.116 */
13
13
  function g() {
14
14
  return !!window.MonacoEnvironment?.getWorker;
15
15
  }
@@ -4,7 +4,7 @@ import { IStandaloneThemeService as n } from "monaco-editor/esm/vs/editor/standa
4
4
  import { generateTokensCSSForColorMap as a } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
5
5
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
6
6
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
7
- v5.0.0-next.115 */
7
+ v5.0.0-next.116 */
8
8
  async function c(e, o) {
9
9
  return await (await i()).colorize(e, o, { tabSize: 2 });
10
10
  }
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.115 */
3
+ v5.0.0-next.116 */
4
4
  const n = "cube";
5
5
  function u(e, t) {
6
6
  switch (e.type) {