@arcgis/coding-components 5.1.0-next.54 → 5.1.0-next.56

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 (87) hide show
  1. package/dist/cdn/{PKG2K3V2.js → 23B5EVBR.js} +1 -1
  2. package/dist/cdn/2RXM4OOZ.js +2 -0
  3. package/dist/cdn/2XTHR2WZ.js +2 -0
  4. package/dist/cdn/5PWITOEV.js +2 -0
  5. package/dist/cdn/A53COIII.js +6 -0
  6. package/dist/cdn/AESP7B22.js +2 -0
  7. package/dist/cdn/AHN2NEBT.js +2 -0
  8. package/dist/cdn/{54ZOADNQ.js → BXUVVQLE.js} +1 -1
  9. package/dist/cdn/BYHBHJML.js +2 -0
  10. package/dist/cdn/CLBLJN2Z.js +7 -0
  11. package/dist/cdn/CZ2DJPO4.js +2 -0
  12. package/dist/cdn/DGFH2WPL.js +2 -0
  13. package/dist/cdn/{RJRCBNNO.js → DJYSIOXC.js} +1 -1
  14. package/dist/cdn/FLNLMLTL.js +2 -0
  15. package/dist/cdn/ITDFOKJG.js +2 -0
  16. package/dist/cdn/MH4UADDE.js +2 -0
  17. package/dist/cdn/{UZJHWA6T.js → ODKUCLFB.js} +1 -1
  18. package/dist/cdn/{PVL67WGX.js → PD5NEK47.js} +1 -1
  19. package/dist/cdn/PRB6IWVU.js +2 -0
  20. package/dist/cdn/{4A2CLADY.js → QCARFVF7.js} +1 -1
  21. package/dist/cdn/{6YD47X7H.js → QF6ON7LK.js} +1 -1
  22. package/dist/cdn/QRDRCFJZ.js +2 -0
  23. package/dist/cdn/SV4IPD4A.js +2 -0
  24. package/dist/cdn/UH44LJA7.js +4 -0
  25. package/dist/cdn/VF7TALAI.js +12 -0
  26. package/dist/cdn/VPP77CFW.js +2 -0
  27. package/dist/cdn/YPMKBMXS.js +2 -0
  28. package/dist/cdn/ZHZFKZA7.js +2 -0
  29. package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
  30. package/dist/cdn/assets/code-editor/sql-expr.worker.js +120 -117
  31. package/dist/cdn/assets/code-editor/sql-layer.worker.js +10087 -0
  32. package/dist/cdn/assets/editor-variables/t9n/messages.en.json +1 -1
  33. package/dist/cdn/assets/sql-expression-editor/t9n/messages.en.json +1 -1
  34. package/dist/cdn/assets/sql-layer-editor/t9n/messages.en.json +1 -0
  35. package/dist/cdn/index.js +1 -1
  36. package/dist/cdn/main.css +1 -1
  37. package/dist/chunks/arcade-defaults.js +98 -96
  38. package/dist/chunks/arcade-service-accessors.js +40 -28
  39. package/dist/chunks/bigquery.js +186 -0
  40. package/dist/chunks/colorize.js +1 -1
  41. package/dist/chunks/fields.js +2 -2
  42. package/dist/chunks/language-defaults-base.js +733 -464
  43. package/dist/chunks/postgres.js +209 -0
  44. package/dist/chunks/setup-monaco-theme.js +28 -20
  45. package/dist/chunks/sql-expr-defaults.js +11 -10
  46. package/dist/chunks/sql-layer-defaults.js +231 -0
  47. package/dist/chunks/sql-layer-mode.js +301 -0
  48. package/dist/chunks/sqlServer.js +288 -0
  49. package/dist/chunks/utils.js +184 -0
  50. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +134 -123
  51. package/dist/components/arcgis-arcade-editor/customElement.d.ts +17 -0
  52. package/dist/components/arcgis-arcade-editor/customElement.js +22 -22
  53. package/dist/components/arcgis-code-editor/customElement.d.ts +2 -1
  54. package/dist/components/arcgis-code-editor/customElement.js +91 -71
  55. package/dist/components/arcgis-editor-variables/customElement.js +50 -47
  56. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +12 -0
  57. package/dist/components/arcgis-sql-expression-editor/customElement.js +17 -17
  58. package/dist/components/arcgis-sql-layer-editor/customElement.d.ts +50 -0
  59. package/dist/components/arcgis-sql-layer-editor/customElement.js +92 -0
  60. package/dist/components/arcgis-sql-layer-editor/index.d.ts +1 -0
  61. package/dist/components/arcgis-sql-layer-editor/index.js +7 -0
  62. package/dist/components/types.d.ts +79 -2
  63. package/dist/docs/api.json +1 -1
  64. package/dist/docs/docs.json +1 -1
  65. package/dist/docs/vscode.html-custom-data.json +1 -1
  66. package/dist/docs/web-types.json +1 -1
  67. package/dist/index.d.ts +10 -0
  68. package/dist/loader.js +6 -5
  69. package/dist/types/lumina.d.ts +9 -2
  70. package/dist/types/preact.d.ts +10 -2
  71. package/dist/types/react.d.ts +11 -2
  72. package/dist/types/stencil.d.ts +9 -2
  73. package/dist/utils/data-catalog-datastore.d.ts +170 -0
  74. package/package.json +5 -5
  75. package/dist/cdn/5CO7XWOT.js +0 -2
  76. package/dist/cdn/5FXY5U3T.js +0 -2
  77. package/dist/cdn/CYC4AWZE.js +0 -2
  78. package/dist/cdn/GVO3LEFV.js +0 -2
  79. package/dist/cdn/J5X2KSYD.js +0 -2
  80. package/dist/cdn/QHJAF7L3.js +0 -6
  81. package/dist/cdn/T7GEIGWF.js +0 -2
  82. package/dist/cdn/TAXRVBJC.js +0 -2
  83. package/dist/cdn/VR5CATAW.js +0 -2
  84. package/dist/cdn/WTNM2NCZ.js +0 -2
  85. package/dist/cdn/XEUG3X2W.js +0 -2
  86. package/dist/cdn/ZJCI6LP6.js +0 -12
  87. package/dist/cdn/ZSVJAJND.js +0 -4
@@ -1 +1 @@
1
- {"backtotop":"Back to top","expand":"Expand","loading":"Loading","profilevariables":"Profile variables","noitems":"No items","noprofilevariablesmessage":"This profile does not have any variables.","fields":"Fields","filterthevariablesbyname":"Filter the variables by name"}
1
+ {"backtotop":"Back to top","expand":"Expand","loading":"Loading","profilevariables":"Profile variables","noitems":"No items","profileempty":"This profile does not have any variables.","fields":"Fields","tables":"Tables","filterthevariablesbyname":"Filter the variables by name"}
@@ -1 +1 @@
1
- {"fields":"Fields","functions":"Functions"}
1
+ {"fields":"Fields","functions":"Functions","profileempty":"No fields available."}
@@ -0,0 +1 @@
1
+ {"loading":"Loading","profileempty":"No datastore tables available.","tables":"Tables"}
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{I as s,u as e}from"./4BNI5KJQ.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./ZSVJAJND.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./J5X2KSYD.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./PKG2K3V2.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./6YD47X7H.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./5CO7XWOT.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./EMXJL3XV.js")],"arcgis-code-viewer":[()=>import("./XEUG3X2W.js"),"language,round"],"arcgis-editor-variables":[()=>import("./CYC4AWZE.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./PVL67WGX.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./TAXRVBJC.js"),"hideSideBar,messages:,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
2
+ import{I as s,u as e}from"./4BNI5KJQ.js";import"./BCUUVBXH.js";import"./3TTFCHAA.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./UH44LJA7.js"),"appVersion,assistantsEnabled,closed,closePanel:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./BYHBHJML.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./23B5EVBR.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./QF6ON7LK.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./PRB6IWVU.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./EMXJL3XV.js")],"arcgis-code-viewer":[()=>import("./AESP7B22.js"),"language,round"],"arcgis-editor-variables":[()=>import("./ITDFOKJG.js"),"closed,heading,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./PD5NEK47.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./2RXM4OOZ.js"),"hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./QRDRCFJZ.js"),"hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
package/dist/cdn/main.css CHANGED
@@ -1 +1 @@
1
- @layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}
1
+ @layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor,arcgis-sql-layer-editor){visibility:hidden}}
@@ -1,97 +1,98 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { i as h, a as D, b as v, c as F, d as M, e as S, g as L, f as A, m as k, L as E, E as I } from "./language-defaults-base.js";
3
- import { supportedLocales as C, fetchT9nStringsBundle as j } from "@arcgis/toolkit/intl";
4
- import { g as P } from "./runtime.js";
5
- import { CompletionItemKind as w, InsertTextFormat as p, InsertTextMode as f } from "vscode-languageserver-types";
6
- import { getDeclaredPixelMembers as $ } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
2
+ import { g as v, f as F, m as M, L as S, E as L } from "./language-defaults-base.js";
3
+ import { i as h, a as A, b as k, c as E, d as I, e as C, f as P } from "./utils.js";
4
+ import { supportedLocales as j, fetchT9nStringsBundle as $ } from "@arcgis/toolkit/intl";
5
+ import { g as T } from "./runtime.js";
6
+ import { CompletionItemKind as w, InsertTextFormat as u, InsertTextMode as f } from "vscode-languageserver-types";
7
+ import { getDeclaredPixelMembers as B } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
7
8
  import "@arcgis/toolkit/type";
8
- async function B(e) {
9
- const { apiVersion: i, bundles: t, hiddenApiItems: s } = e.toEditorProfileDefinition(), o = await T(e.dictionaryVariables);
10
- return { apiVersion: i, bundles: t, variables: o, hiddenApiItems: s?.map((a) => a.toLowerCase()) };
9
+ async function K(e) {
10
+ const { apiVersion: i, bundles: t, hiddenApiItems: o } = e.toEditorProfileDefinition(), s = await b(e.dictionaryVariables.filter(P));
11
+ return { apiVersion: i, bundles: t, variables: s, hiddenApiItems: o?.map((a) => a.toLowerCase()) };
11
12
  }
12
- async function T(e, i = w.Variable) {
13
+ async function b(e, i = w.Variable) {
13
14
  return await Promise.all(
14
15
  e.map(async (t) => {
15
16
  switch (t.type) {
16
17
  case "dictionary":
17
- return await z(t, i);
18
+ return await O(t, i);
18
19
  case "pixel":
19
- return await q(t, i);
20
+ return await z(t, i);
20
21
  // Voxel is equivalent to features in regards to the languageservice.
21
22
  // They both have equivalent fields, but some voxel fields are different types (arrays)
22
23
  // than what is reported in .fields, so in the sidebar we treat a bit differently.
23
24
  // In autocomplete we don't differentiate types, so we can use the same logic as features.
24
25
  case "voxel":
25
26
  case "feature":
26
- return await _(t, i);
27
+ return await q(t, i);
27
28
  default:
28
- return K(t, i);
29
+ return _(t, i);
29
30
  }
30
31
  })
31
32
  );
32
33
  }
33
- function K(e, i) {
34
- const { name: t, type: s } = e, o = e.getDescription(), a = i === w.Field ? L(t, !1) : t;
34
+ function _(e, i) {
35
+ const { name: t, type: o } = e, s = e.getDescription(), a = i === w.Field ? v(t, !1) : t;
35
36
  return {
36
37
  name: t,
37
- description: o,
38
- type: s,
38
+ description: s,
39
+ type: o,
39
40
  completion: {
40
41
  label: t,
41
42
  detail: t,
42
43
  insertText: a,
43
44
  insertTextMode: f.asIs,
44
- insertTextFormat: p.PlainText,
45
+ insertTextFormat: u.PlainText,
45
46
  kind: i,
46
- documentation: { kind: "markdown", value: o }
47
+ documentation: { kind: "markdown", value: s }
47
48
  }
48
49
  };
49
50
  }
50
- async function _(e, i) {
51
- const t = await e.loadSource(), { name: s } = e, o = e.getDescription(), a = {
52
- label: s,
53
- detail: s,
54
- insertText: s,
51
+ async function q(e, i) {
52
+ const t = await e.loadSource(), { name: o } = e, s = e.getDescription(), a = {
53
+ label: o,
54
+ detail: o,
55
+ insertText: o,
55
56
  insertTextMode: f.asIs,
56
- insertTextFormat: p.PlainText,
57
+ insertTextFormat: u.PlainText,
57
58
  kind: i
58
59
  }, n = {
59
- name: s,
60
- description: o,
60
+ name: o,
61
+ description: s,
61
62
  type: "dictionary",
62
63
  properties: [],
63
64
  completion: a
64
65
  };
65
66
  if (!t)
66
67
  return n;
67
- const [r, c] = A(t.fields, o, !0);
68
+ const [r, c] = F(t.fields, s, !0);
68
69
  return n.properties = r, a.documentation = { kind: "markdown", value: c }, n;
69
70
  }
70
- async function q(e, i) {
71
- const t = await e.loadSource(), s = e.toProfileVariableDefinition();
72
- if (s.type !== "pixel")
71
+ async function z(e, i) {
72
+ const t = await e.loadSource(), o = e.toProfileVariableDefinition();
73
+ if (o.type !== "pixel")
73
74
  throw new Error("Incorrect definition passed to pixel variable");
74
- const { name: o } = e, a = e.getDescription(), n = {
75
- label: o,
76
- detail: o,
77
- insertText: o,
75
+ const { name: s } = e, a = e.getDescription(), n = {
76
+ label: s,
77
+ detail: s,
78
+ insertText: s,
78
79
  insertTextMode: f.asIs,
79
- insertTextFormat: p.PlainText,
80
+ insertTextFormat: u.PlainText,
80
81
  kind: i
81
82
  }, r = {
82
- name: o,
83
+ name: s,
83
84
  description: a,
84
85
  type: "dictionary",
85
86
  properties: [],
86
87
  completion: n
87
88
  };
88
- if (!t || !s.definition)
89
+ if (!t || !o.definition)
89
90
  return r;
90
- const c = await $(t), [d, l] = k(c, a);
91
+ const c = await B(t), [d, l] = M(c, a);
91
92
  return r.properties = d, n.documentation = { kind: "markdown", value: l }, r;
92
93
  }
93
- async function z(e, i) {
94
- const { name: t, dictionaryVariables: s } = e, o = e.getDescription(), a = s.reduce((n, r) => {
94
+ async function O(e, i) {
95
+ const { name: t, dictionaryVariables: o } = e, s = e.getDescription(), a = o.reduce((n, r) => {
95
96
  n !== "" && (n += `
96
97
 
97
98
  `), n += `**${r.name}**
@@ -99,50 +100,51 @@ ${r.type}`;
99
100
  const c = r.getDescription();
100
101
  return c && (n += `
101
102
  ${c}`), n;
102
- }, o);
103
+ }, s);
103
104
  return {
104
105
  name: t,
105
- description: o,
106
+ description: s,
106
107
  type: "dictionary",
107
- properties: await T(s, w.Field),
108
+ // TODO(editor-profile): remove filter once we have a arcade-specific editor profile type that doesn't include SQL-layer-specific variables.
109
+ properties: await b(o.filter(P), w.Field),
108
110
  completion: {
109
111
  label: t,
110
112
  detail: t,
111
113
  insertText: t,
112
114
  insertTextMode: f.asIs,
113
- insertTextFormat: p.PlainText,
115
+ insertTextFormat: u.PlainText,
114
116
  kind: i,
115
117
  documentation: { kind: "markdown", value: a }
116
118
  }
117
119
  };
118
120
  }
119
121
  async function y(e = "en") {
120
- const i = b.get(e);
122
+ const i = x.get(e);
121
123
  if (i)
122
124
  return i;
123
- if (!C.has(e))
125
+ if (!j.has(e))
124
126
  return await y("en");
125
127
  try {
126
- const t = await fetch(P(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
127
- return t.ok ? O(e, await t.json()) : e === "en" ? null : await y("en");
128
+ const t = await fetch(T(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
129
+ return t.ok ? Q(e, await t.json()) : e === "en" ? null : await y("en");
128
130
  } catch {
129
131
  return null;
130
132
  }
131
133
  }
132
- const b = /* @__PURE__ */ new Map();
133
- function O(e, i) {
134
+ const x = /* @__PURE__ */ new Map();
135
+ function Q(e, i) {
134
136
  const t = /* @__PURE__ */ new Map();
135
- return i.forEach((s) => {
136
- t.set(s.id, s);
137
- }), b.set(e, t), t;
137
+ return i.forEach((o) => {
138
+ t.set(o.id, o);
139
+ }), x.set(e, t), t;
138
140
  }
139
- async function Q(e, i = "en") {
141
+ async function U(e, i = "en") {
140
142
  return (await y(i))?.get(e) ?? null;
141
143
  }
142
- function U(e) {
144
+ function G(e) {
143
145
  return !!e && typeof e == "object" && "additionalVariables" in e && Array.isArray(e.additionalVariables);
144
146
  }
145
- function G(e) {
147
+ function H(e) {
146
148
  return e?.map(m);
147
149
  }
148
150
  function m(e) {
@@ -151,7 +153,7 @@ function m(e) {
151
153
  return {
152
154
  ...e,
153
155
  type: e.type,
154
- properties: G(e.properties)
156
+ properties: H(e.properties)
155
157
  };
156
158
  case "array":
157
159
  return {
@@ -163,14 +165,14 @@ function m(e) {
163
165
  return { ...e, type: e.type };
164
166
  }
165
167
  }
166
- async function H(e, i = "en") {
168
+ async function J(e, i = "en") {
167
169
  if (!h(e))
168
170
  return;
169
- const t = await Q(e.id, i);
171
+ const t = await U(e.id, i);
170
172
  if (!t)
171
173
  return;
172
- const s = e.definitions, o = new Map(
173
- Object.entries(s).map(([n, r]) => [n.toLowerCase(), r])
174
+ const o = e.definitions, s = new Map(
175
+ Object.entries(o).map(([n, r]) => [n.toLowerCase(), r])
174
176
  ), a = {
175
177
  bundles: [...t.bundles],
176
178
  variables: [],
@@ -179,7 +181,7 @@ async function H(e, i = "en") {
179
181
  return t.variables.forEach((n) => {
180
182
  if (e.disabledVariables?.includes(n.name))
181
183
  return;
182
- const r = o.get(n.name.toLowerCase());
184
+ const r = s.get(n.name.toLowerCase());
183
185
  switch (n.type) {
184
186
  case "dictionary":
185
187
  return a.variables.push(
@@ -190,21 +192,21 @@ async function H(e, i = "en") {
190
192
  })
191
193
  );
192
194
  case "feature":
193
- return S(r) ? a.variables.push({ ...n, type: "feature", definition: r }) : void 0;
195
+ return C(r) ? a.variables.push({ ...n, type: "feature", definition: r }) : void 0;
194
196
  case "pixel":
195
- return M(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
197
+ return I(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
196
198
  case "voxel":
197
- return F(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
199
+ return E(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
198
200
  case "featureSet":
199
- return v(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
201
+ return k(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
200
202
  case "featureSetCollection":
201
- return D(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
203
+ return A(r) ? a.variables.push({ ...n, type: n.type, definition: r }) : void 0;
202
204
  default:
203
205
  return a.variables.push(m(n));
204
206
  }
205
- }), U(e) && a.variables.push(...e.additionalVariables ?? []), a;
207
+ }), G(e) && a.variables.push(...e.additionalVariables ?? []), a;
206
208
  }
207
- const J = [
209
+ const N = [
208
210
  "catalog-footprint",
209
211
  "catalog",
210
212
  "csv",
@@ -216,16 +218,16 @@ const J = [
216
218
  "subtype-sublayer",
217
219
  "wfs"
218
220
  ];
219
- function N(e) {
220
- return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" && J.includes(e.type);
221
+ function R(e) {
222
+ return !!e && typeof e == "object" && "type" in e && typeof e.type == "string" && N.includes(e.type);
221
223
  }
222
- const R = {
224
+ const W = {
223
225
  filterFsCollectionLayersFromMap: (e) => (
224
226
  // only some layers are supported in arcade feature sets, one example: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715
225
- N(e)
227
+ R(e)
226
228
  )
227
229
  };
228
- class W extends E {
230
+ class X extends S {
229
231
  /**
230
232
  * Per-model update chaining to serialize profile updates.
231
233
  *
@@ -256,40 +258,40 @@ class W extends E {
256
258
  * @param locale The locale to use for the model context.
257
259
  * @returns The EditorProfile for the model.
258
260
  */
259
- async setProfileForModel(i, t, s = { locale: "en" }) {
260
- const o = this._getApiKey(i), n = (this.#e.get(o) || Promise.resolve()).then(async () => {
261
- const c = t, d = h(c) ? await H(c, s.locale) : c, l = await j(
262
- s.locale,
263
- P("./assets/editor-profile/t9n"),
261
+ async setProfileForModel(i, t, o = { locale: "en" }) {
262
+ const s = this._getApiKey(i), n = (this.#e.get(s) || Promise.resolve()).then(async () => {
263
+ const c = t, d = h(c) ? await J(c, o.locale) : c, l = await $(
264
+ o.locale,
265
+ T("./assets/editor-profile/t9n"),
264
266
  "messages."
265
267
  );
266
268
  if (!l)
267
- throw new Error(`Failed to load the language bundle for ${s.locale}`);
269
+ throw new Error(`Failed to load the language bundle for ${o.locale}`);
268
270
  this.disposeForModel(i);
269
- const g = new I(
271
+ const g = new L(
270
272
  d,
271
273
  l,
272
- s.locale,
273
- R
274
+ o.locale,
275
+ W
274
276
  );
275
- this._modelToProfileMap.set(o, g);
276
- const x = await B(g);
277
+ this._modelToProfileMap.set(s, g);
278
+ const D = await K(g);
277
279
  this.updateApiContextForModel(i, {
278
- locale: s.locale,
279
- profile: x,
280
- snippets: s.snippets
280
+ locale: o.locale,
281
+ profile: D,
282
+ snippets: o.snippets
281
283
  });
282
284
  }), r = n.finally(() => {
283
- this.#e.get(o) === r && this.#e.delete(o);
285
+ this.#e.get(s) === r && this.#e.delete(s);
284
286
  });
285
- return this.#e.set(o, r), await n;
287
+ return this.#e.set(s, r), await n;
286
288
  }
287
289
  }
288
- const u = new W(), ne = {
289
- setProfileForModel: u.setProfileForModel.bind(u),
290
- getApiLibraryForModel: u.getApiLibraryForModel.bind(u)
290
+ const p = new X(), re = {
291
+ setProfileForModel: p.setProfileForModel.bind(p),
292
+ getApiLibraryForModel: p.getApiLibraryForModel.bind(p)
291
293
  };
292
294
  export {
293
- ne as a,
294
- u as b
295
+ re as a,
296
+ p as b
295
297
  };
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import f from "@arcgis/core/request.js";
2
+ import d from "@arcgis/core/request.js";
3
3
  import "monaco-editor";
4
4
  import { StandaloneServices as w } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
5
5
  import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
6
- import { IHoverService as m } from "monaco-editor/esm/vs/platform/hover/browser/hover.js";
6
+ import { IHoverService as y } from "monaco-editor/esm/vs/platform/hover/browser/hover.js";
7
7
  import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
8
8
  import "monaco-editor/esm/vs/base/browser/dom.js";
9
9
  import "monaco-editor/esm/vs/editor/browser/editorDom.js";
@@ -11,41 +11,53 @@ import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
11
11
  function g() {
12
12
  return !!window.MonacoEnvironment?.getWorker;
13
13
  }
14
- let i = "";
15
- const k = /* @__PURE__ */ new Map(), a = !1;
16
- async function c(t, e, r) {
14
+ let n = "";
15
+ const m = /* @__PURE__ */ new Map(), i = !1;
16
+ async function l(s, e, r) {
17
17
  if (r)
18
- return e ? e() : new Worker(t);
19
- const o = window.location.origin;
20
- if (new URL(t, window.location.href).origin !== o) {
21
- const n = await f(t, { responseType: "text" });
22
- return new Worker(URL.createObjectURL(new Blob([n.data], { type: "text/javascript" })), {
18
+ return e ? e() : new Worker(s);
19
+ const t = window.location.origin;
20
+ if (new URL(s, window.location.href).origin !== t) {
21
+ const o = await d(s, { responseType: "text" });
22
+ return new Worker(URL.createObjectURL(new Blob([o.data], { type: "text/javascript" })), {
23
23
  type: "module"
24
24
  });
25
25
  }
26
- return new Worker(t, {
26
+ return new Worker(s, {
27
27
  type: "module"
28
28
  });
29
29
  }
30
- function b(t) {
30
+ function U(s) {
31
31
  if (g())
32
32
  return;
33
- j(), i = t;
34
- const e = `${i}/code-editor`, r = {
33
+ q(), n = s;
34
+ const e = `${n}/code-editor`, r = {
35
35
  arcade: `${e}/arcade.worker.js`,
36
36
  "arcgis-sql-expression": `${e}/sql-expr.worker.js`,
37
+ "sql-layer-sql-server": `${e}/sql-layer.worker.js`,
38
+ "sql-layer-postgres": `${e}/sql-layer.worker.js`,
39
+ "sql-layer-bigquery": `${e}/sql-layer.worker.js`,
37
40
  html: `${e}/html.worker.js`,
38
41
  css: `${e}/css.worker.js`,
39
42
  typescript: `${e}/ts.worker.js`,
40
43
  json: `${e}/json.worker.js`,
41
44
  default: `${e}/editor.worker.js`
42
- }, o = {
45
+ }, t = {
43
46
  arcade: {
44
47
  url: r.arcade
45
48
  },
46
49
  "arcgis-sql-expression": {
47
50
  url: r["arcgis-sql-expression"]
48
51
  },
52
+ "sql-layer-sql-server": {
53
+ url: r["sql-layer-sql-server"]
54
+ },
55
+ "sql-layer-postgres": {
56
+ url: r["sql-layer-postgres"]
57
+ },
58
+ "sql-layer-bigquery": {
59
+ url: r["sql-layer-bigquery"]
60
+ },
49
61
  html: {
50
62
  url: r.html
51
63
  },
@@ -66,27 +78,27 @@ function b(t) {
66
78
  }
67
79
  };
68
80
  window.MonacoEnvironment = {
69
- getWorker: async (p, n) => {
70
- const s = k.get(n);
71
- if (s)
72
- return await c(s, void 0, a);
73
- const { url: u, localWorker: d } = o[n] || o.default;
74
- return await c(u, d, a);
81
+ getWorker: async (u, o) => {
82
+ const a = m.get(o);
83
+ if (a)
84
+ return await l(a, void 0, i);
85
+ const { url: p, localWorker: f } = t[o] || t.default;
86
+ return await l(p, f, i);
75
87
  }
76
88
  };
77
89
  }
78
- let l = !1;
79
- function j() {
80
- l || (w.get(m), l = !0);
90
+ let c = !1;
91
+ function q() {
92
+ c || (w.get(y), c = !0);
81
93
  }
82
94
  async function E() {
83
- return (await v()).getArcadeDiagnosticService();
95
+ return (await k()).getArcadeDiagnosticService();
84
96
  }
85
- async function v() {
97
+ async function k() {
86
98
  return await import("./arcade-mode.js");
87
99
  }
88
100
  export {
89
- v as a,
101
+ k as a,
90
102
  E as g,
91
- b as s
103
+ U as s
92
104
  };