@arcgis/coding-components 5.2.0-next.135 → 5.2.0-next.137

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 (123) hide show
  1. package/dist/cdn/7GVCXLAE.js +2 -0
  2. package/dist/cdn/{WHOYO2EQ.js → BPCBI4SE.js} +3 -3
  3. package/dist/cdn/EQDKZIAP.js +2 -0
  4. package/dist/cdn/GDTEFKCP.js +2 -0
  5. package/dist/cdn/GJ4W3JPG.js +2 -0
  6. package/dist/cdn/J7TSCCXO.js +6 -0
  7. package/dist/cdn/JFO2HVZ6.js +2 -0
  8. package/dist/cdn/JGRWZYW5.js +3 -0
  9. package/dist/cdn/N56B3UDM.js +2 -0
  10. package/dist/cdn/{FFLWFFHU.js → OMJLVFHT.js} +1 -1
  11. package/dist/cdn/{YJ4WRZOI.js → ZJCPZ5ZN.js} +1 -1
  12. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ar.json +1 -1
  13. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bg.json +1 -1
  14. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.bs.json +1 -1
  15. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ca.json +1 -1
  16. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.cs.json +1 -1
  17. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.da.json +1 -1
  18. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.de.json +1 -1
  19. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.el.json +1 -1
  20. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.es.json +1 -1
  21. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.et.json +1 -1
  22. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fi.json +1 -1
  23. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.fr.json +1 -1
  24. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.he.json +1 -1
  25. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hr.json +1 -1
  26. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.hu.json +1 -1
  27. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.id.json +1 -1
  28. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.it.json +1 -1
  29. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ja.json +1 -1
  30. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ko.json +1 -1
  31. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lt.json +1 -1
  32. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.lv.json +1 -1
  33. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.nl.json +1 -1
  34. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.no.json +1 -1
  35. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pl.json +1 -1
  36. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-BR.json +1 -1
  37. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.pt-PT.json +1 -1
  38. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ro.json +1 -1
  39. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.ru.json +1 -1
  40. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sk.json +1 -1
  41. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sl.json +1 -1
  42. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sr.json +1 -1
  43. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.sv.json +1 -1
  44. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.th.json +1 -1
  45. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.tr.json +1 -1
  46. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.uk.json +1 -1
  47. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.vi.json +1 -1
  48. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-CN.json +1 -1
  49. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-HK.json +1 -1
  50. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.zh-TW.json +1 -1
  51. package/dist/cdn/assets/arcade-debugger-output/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/arcade-editor/t9n/messages.ar.json +1 -1
  53. package/dist/cdn/assets/arcade-editor/t9n/messages.bg.json +1 -1
  54. package/dist/cdn/assets/arcade-editor/t9n/messages.bs.json +1 -1
  55. package/dist/cdn/assets/arcade-editor/t9n/messages.ca.json +1 -1
  56. package/dist/cdn/assets/arcade-editor/t9n/messages.cs.json +1 -1
  57. package/dist/cdn/assets/arcade-editor/t9n/messages.da.json +1 -1
  58. package/dist/cdn/assets/arcade-editor/t9n/messages.de.json +1 -1
  59. package/dist/cdn/assets/arcade-editor/t9n/messages.el.json +1 -1
  60. package/dist/cdn/assets/arcade-editor/t9n/messages.es.json +1 -1
  61. package/dist/cdn/assets/arcade-editor/t9n/messages.et.json +1 -1
  62. package/dist/cdn/assets/arcade-editor/t9n/messages.fi.json +1 -1
  63. package/dist/cdn/assets/arcade-editor/t9n/messages.fr.json +1 -1
  64. package/dist/cdn/assets/arcade-editor/t9n/messages.he.json +1 -1
  65. package/dist/cdn/assets/arcade-editor/t9n/messages.hr.json +1 -1
  66. package/dist/cdn/assets/arcade-editor/t9n/messages.hu.json +1 -1
  67. package/dist/cdn/assets/arcade-editor/t9n/messages.id.json +1 -1
  68. package/dist/cdn/assets/arcade-editor/t9n/messages.it.json +1 -1
  69. package/dist/cdn/assets/arcade-editor/t9n/messages.ja.json +1 -1
  70. package/dist/cdn/assets/arcade-editor/t9n/messages.ko.json +1 -1
  71. package/dist/cdn/assets/arcade-editor/t9n/messages.lt.json +1 -1
  72. package/dist/cdn/assets/arcade-editor/t9n/messages.lv.json +1 -1
  73. package/dist/cdn/assets/arcade-editor/t9n/messages.nl.json +1 -1
  74. package/dist/cdn/assets/arcade-editor/t9n/messages.no.json +1 -1
  75. package/dist/cdn/assets/arcade-editor/t9n/messages.pl.json +1 -1
  76. package/dist/cdn/assets/arcade-editor/t9n/messages.pt-BR.json +1 -1
  77. package/dist/cdn/assets/arcade-editor/t9n/messages.pt-PT.json +1 -1
  78. package/dist/cdn/assets/arcade-editor/t9n/messages.ro.json +1 -1
  79. package/dist/cdn/assets/arcade-editor/t9n/messages.ru.json +1 -1
  80. package/dist/cdn/assets/arcade-editor/t9n/messages.sk.json +1 -1
  81. package/dist/cdn/assets/arcade-editor/t9n/messages.sl.json +1 -1
  82. package/dist/cdn/assets/arcade-editor/t9n/messages.sr.json +1 -1
  83. package/dist/cdn/assets/arcade-editor/t9n/messages.sv.json +1 -1
  84. package/dist/cdn/assets/arcade-editor/t9n/messages.th.json +1 -1
  85. package/dist/cdn/assets/arcade-editor/t9n/messages.tr.json +1 -1
  86. package/dist/cdn/assets/arcade-editor/t9n/messages.uk.json +1 -1
  87. package/dist/cdn/assets/arcade-editor/t9n/messages.vi.json +1 -1
  88. package/dist/cdn/assets/arcade-editor/t9n/messages.zh-CN.json +1 -1
  89. package/dist/cdn/assets/arcade-editor/t9n/messages.zh-HK.json +1 -1
  90. package/dist/cdn/assets/arcade-editor/t9n/messages.zh-TW.json +1 -1
  91. package/dist/cdn/assets/code-editor/sql-expr.worker.js +5582 -5412
  92. package/dist/cdn/index.js +1 -1
  93. package/dist/chunks/arcade-defaults.js +95 -102
  94. package/dist/chunks/setup-monaco-theme.js +34 -67
  95. package/dist/chunks/sql-expr-mode.js +73 -61
  96. package/dist/chunks/sql-expr-service-accessors.js +35 -2
  97. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +22 -23
  98. package/dist/components/arcgis-arcade-debugger-output/customElement.js +8 -8
  99. package/dist/components/arcgis-arcade-editor/customElement.d.ts +12 -1
  100. package/dist/components/arcgis-arcade-editor/customElement.js +104 -104
  101. package/dist/components/arcgis-code-editor/customElement.js +12 -11
  102. package/dist/components/arcgis-code-viewer/customElement.js +2 -1
  103. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +2 -0
  104. package/dist/components/arcgis-sql-expression-editor/customElement.js +13 -7
  105. package/dist/components/types.d.ts +11 -0
  106. package/dist/docs/api.json +1 -1
  107. package/dist/docs/docs.json +1 -1
  108. package/dist/docs/vscode.html-custom-data.json +1 -1
  109. package/dist/docs/web-types.json +1 -1
  110. package/dist/loader.js +6 -6
  111. package/dist/types/lumina.d.ts +1 -1
  112. package/dist/types/preact.d.ts +1 -1
  113. package/dist/types/react.d.ts +1 -1
  114. package/dist/types/stencil.d.ts +1 -1
  115. package/package.json +7 -7
  116. package/dist/cdn/DBAL7LSK.js +0 -2
  117. package/dist/cdn/EDJMOEXG.js +0 -2
  118. package/dist/cdn/FQWGIGBG.js +0 -2
  119. package/dist/cdn/M4ASZPOM.js +0 -2
  120. package/dist/cdn/SQQXRZAR.js +0 -2
  121. package/dist/cdn/XMKMX4RT.js +0 -2
  122. package/dist/cdn/XUI74PBQ.js +0 -2
  123. package/dist/cdn/YCA4A2EF.js +0 -6
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{J as s,v as e}from"./O6XP7VU2.js";import"./BFPEJYVB.js";import"./H6RQVSYM.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./WHOYO2EQ.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,isDevEnv,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./VHXEN75D.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./XMKMX4RT.js"),"debuggerStore:,outputTitle,result:"],"arcgis-arcade-editor":[()=>import("./EDJMOEXG.js"),"arcadeAssistant:,customPanels:,disableAssistant,editorInstance:,editorOptions:,enableDebugger,externalExecutor:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,openArcadeAssistant,setFocus,testRun"],"arcgis-arcade-results":[()=>import("./CP57L67B.js"),"consoleLogs:,executionTiming:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./DNFQPV52.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./YJ4WRZOI.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./OO3J7H7X.js")],"arcgis-code-viewer":[()=>import("./M4ASZPOM.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./467GNIKK.js"),"closed,heading,hideDescriptions,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./JNI62OTM.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./DBAL7LSK.js"),"hideDescriptionsInFieldsPanel,hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./4OC4PWCA.js"),"editorInstance:,editorOptions:,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)
2
+ import{J as s,v as e}from"./O6XP7VU2.js";import"./BFPEJYVB.js";import"./H6RQVSYM.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./BPCBI4SE.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,docsConfig:,editorRef:,feedbackServiceUrl,helpBase,insertText:,isDevEnv,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./VHXEN75D.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./GDTEFKCP.js"),"debuggerStore:,result:"],"arcgis-arcade-editor":[()=>import("./7GVCXLAE.js"),"arcadeAssistant:,customPanels:,disableAssistant,docsConfig:,editorInstance:,editorOptions:,enableDebugger,externalExecutor:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,openArcadeAssistant,setFocus,testRun"],"arcgis-arcade-results":[()=>import("./CP57L67B.js"),"consoleLogs:,executionTiming:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./DNFQPV52.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./ZJCPZ5ZN.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./OO3J7H7X.js")],"arcgis-code-viewer":[()=>import("./GJ4W3JPG.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./467GNIKK.js"),"closed,heading,hideDescriptions,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./JNI62OTM.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./EQDKZIAP.js"),"hideDescriptionsInFieldsPanel,hideSideBar,messageOverrides:,messages:,profile:,script;formatExpression,setFocus"],"arcgis-sql-layer-editor":[()=>import("./4OC4PWCA.js"),"editorInstance:,editorOptions:,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)
@@ -1,38 +1,38 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { h as v, i as A, m as F, L as M, E as S } from "./language-defaults-base.js";
3
- import { e as h, f as L, g as k, h as E, j as I, k as C, l as T } from "./utils2.js";
2
+ import { h as v, i as F, m as M, L as S, E as A } from "./language-defaults-base.js";
3
+ import { e as h, f as L, g as k, h as E, j as I, k as C, l as P } from "./utils2.js";
4
4
  import { supportedLocales as j, fetchT9nStringsBundle as $ } from "@arcgis/toolkit/intl";
5
- import { g as P } from "./runtime.js";
6
- import { CompletionItemKind as w, InsertTextFormat as u, InsertTextMode as f } from "vscode-languageserver-types";
7
- import { getDeclaredPixelMembers as U } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
5
+ import { g as T } from "./runtime.js";
6
+ import { CompletionItemKind as w, InsertTextFormat as p, InsertTextMode as f } from "vscode-languageserver-types";
7
+ import { getDeclaredPixelMembers as q } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
8
8
  import "@arcgis/toolkit/type";
9
- async function q(e) {
10
- const { apiVersion: r, bundles: t, hiddenApiItems: s } = e.toEditorProfileDefinition(), o = await b(e.dictionaryVariables.filter(T));
11
- return { apiVersion: r, bundles: t, variables: o, hiddenApiItems: s?.map((a) => a.toLowerCase()) };
9
+ async function B(e) {
10
+ const { apiVersion: n, bundles: t, hiddenApiItems: s } = e.toEditorProfileDefinition(), o = await x(e.dictionaryVariables.filter(P));
11
+ return { apiVersion: n, bundles: t, variables: o, hiddenApiItems: s?.map((a) => a.toLowerCase()) };
12
12
  }
13
- async function b(e, r = w.Variable) {
13
+ async function x(e, n = w.Variable) {
14
14
  return await Promise.all(
15
15
  e.map(async (t) => {
16
16
  switch (t.type) {
17
17
  case "dictionary":
18
- return await z(t, r);
18
+ return await O(t, n);
19
19
  case "pixel":
20
- return await _(t, r);
20
+ return await z(t, n);
21
21
  // Voxel is equivalent to features in regards to the languageservice.
22
22
  // They both have equivalent fields, but some voxel fields are different types (arrays)
23
23
  // than what is reported in .fields, so in the sidebar we treat a bit differently.
24
24
  // In autocomplete we don't differentiate types, so we can use the same logic as features.
25
25
  case "voxel":
26
26
  case "feature":
27
- return await K(t, r);
27
+ return await _(t, n);
28
28
  default:
29
- return B(t, r);
29
+ return K(t, n);
30
30
  }
31
31
  })
32
32
  );
33
33
  }
34
- function B(e, r) {
35
- const { name: t, type: s } = e, o = e.getDescription(), a = r === w.Field ? v(t, !1) : t;
34
+ function K(e, n) {
35
+ const { name: t, type: s } = e, o = e.getDescription(), a = n === w.Field ? v(t, !1) : t;
36
36
  return {
37
37
  name: t,
38
38
  description: o,
@@ -42,21 +42,21 @@ function B(e, r) {
42
42
  detail: t,
43
43
  insertText: a,
44
44
  insertTextMode: f.asIs,
45
- insertTextFormat: u.PlainText,
46
- kind: r,
45
+ insertTextFormat: p.PlainText,
46
+ kind: n,
47
47
  documentation: { kind: "markdown", value: o }
48
48
  }
49
49
  };
50
50
  }
51
- async function K(e, r) {
51
+ async function _(e, n) {
52
52
  const t = await e.loadSource(), { name: s } = e, o = e.getDescription(), a = {
53
53
  label: s,
54
54
  detail: s,
55
55
  insertText: s,
56
56
  insertTextMode: f.asIs,
57
- insertTextFormat: u.PlainText,
58
- kind: r
59
- }, n = {
57
+ insertTextFormat: p.PlainText,
58
+ kind: n
59
+ }, i = {
60
60
  name: s,
61
61
  description: o,
62
62
  type: "dictionary",
@@ -64,153 +64,146 @@ async function K(e, r) {
64
64
  completion: a
65
65
  };
66
66
  if (!t)
67
- return n;
68
- const [i, c] = A(t.fields, o, {
67
+ return i;
68
+ const [r, c] = F(t.fields, o, {
69
69
  includeAliases: !0
70
70
  });
71
- return n.properties = i, a.documentation = { kind: "markdown", value: c }, n;
71
+ return i.properties = r, a.documentation = { kind: "markdown", value: c }, i;
72
72
  }
73
- async function _(e, r) {
73
+ async function z(e, n) {
74
74
  const t = await e.loadSource(), s = e.toProfileVariableDefinition();
75
75
  if (s.type !== "pixel")
76
76
  throw new Error("Incorrect definition passed to pixel variable");
77
- const { name: o } = e, a = e.getDescription(), n = {
77
+ const { name: o } = e, a = e.getDescription(), i = {
78
78
  label: o,
79
79
  detail: o,
80
80
  insertText: o,
81
81
  insertTextMode: f.asIs,
82
- insertTextFormat: u.PlainText,
83
- kind: r
84
- }, i = {
82
+ insertTextFormat: p.PlainText,
83
+ kind: n
84
+ }, r = {
85
85
  name: o,
86
86
  description: a,
87
87
  type: "dictionary",
88
88
  properties: [],
89
- completion: n
89
+ completion: i
90
90
  };
91
91
  if (!t || !s.definition)
92
- return i;
93
- const c = await U(t), [d, l] = F(c, a);
94
- return i.properties = d, n.documentation = { kind: "markdown", value: l }, i;
92
+ return r;
93
+ const c = await q(t), [d, l] = M(c, a);
94
+ return r.properties = d, i.documentation = { kind: "markdown", value: l }, r;
95
95
  }
96
- async function z(e, r) {
97
- const { name: t, dictionaryVariables: s } = e, o = e.getDescription(), a = s.reduce((n, i) => {
98
- n !== "" && (n += `
96
+ async function O(e, n) {
97
+ const { name: t, dictionaryVariables: s } = e, o = e.getDescription(), a = s.reduce((i, r) => {
98
+ i !== "" && (i += `
99
99
 
100
- `), n += `**${i.name}**
101
- ${i.type}`;
102
- const c = i.getDescription();
103
- return c && (n += `
104
- ${c}`), n;
100
+ `), i += `**${r.name}**
101
+ ${r.type}`;
102
+ const c = r.getDescription();
103
+ return c && (i += `
104
+ ${c}`), i;
105
105
  }, o);
106
106
  return {
107
107
  name: t,
108
108
  description: o,
109
109
  type: "dictionary",
110
110
  // TODO(editor-profile): remove filter once we have a arcade-specific editor profile type that doesn't include SQL-layer-specific variables.
111
- properties: await b(s.filter(T), w.Field),
111
+ properties: await x(s.filter(P), w.Field),
112
112
  completion: {
113
113
  label: t,
114
114
  detail: t,
115
115
  insertText: t,
116
116
  insertTextMode: f.asIs,
117
- insertTextFormat: u.PlainText,
118
- kind: r,
117
+ insertTextFormat: p.PlainText,
118
+ kind: n,
119
119
  documentation: { kind: "markdown", value: a }
120
120
  }
121
121
  };
122
122
  }
123
123
  async function y(e = "en") {
124
- const r = x.get(e);
125
- if (r)
126
- return r;
124
+ const n = b.get(e);
125
+ if (n)
126
+ return n;
127
127
  if (!j.has(e))
128
128
  return await y("en");
129
129
  try {
130
- const t = await fetch(P(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
131
- return t.ok ? O(e, await t.json()) : e === "en" ? null : await y("en");
130
+ const t = await fetch(T(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));
131
+ return t.ok ? Q(e, await t.json()) : e === "en" ? null : await y("en");
132
132
  } catch {
133
133
  return null;
134
134
  }
135
135
  }
136
- const x = /* @__PURE__ */ new Map();
137
- function O(e, r) {
136
+ const b = /* @__PURE__ */ new Map();
137
+ function Q(e, n) {
138
138
  const t = /* @__PURE__ */ new Map();
139
- return r.forEach((s) => {
139
+ return n.forEach((s) => {
140
140
  t.set(s.id, s);
141
- }), x.set(e, t), t;
141
+ }), b.set(e, t), t;
142
142
  }
143
- async function Q(e, r = "en") {
144
- return (await y(r))?.get(e) ?? null;
143
+ async function U(e, n = "en") {
144
+ return (await y(n))?.get(e) ?? null;
145
145
  }
146
146
  function G(e) {
147
147
  return !!e && typeof e == "object" && "additionalVariables" in e && Array.isArray(e.additionalVariables);
148
148
  }
149
- function H(e, r) {
150
- return e?.map((t) => m(t, r));
149
+ function H(e) {
150
+ return e?.map((n) => m(n));
151
151
  }
152
- function m(e, r) {
152
+ function m(e) {
153
153
  switch (e.type) {
154
154
  case "dictionary":
155
155
  return {
156
156
  ...e,
157
157
  type: e.type,
158
- properties: H(e.properties, r)
158
+ properties: H(e.properties)
159
159
  };
160
160
  case "array":
161
161
  return {
162
162
  ...e,
163
- type: e.type,
164
- // TODO(5.2): Remove conversion options from the function signatures, its a safety net for a last minute patch. See issue #17618
165
- ...r?.allowUserArrayElementTypes ? {} : { elementType: { type: "number", name: "number" } }
163
+ type: e.type
166
164
  };
167
165
  default:
168
166
  return { ...e, type: e.type };
169
167
  }
170
168
  }
171
- async function J(e, r = "en") {
169
+ async function J(e, n = "en") {
172
170
  if (!h(e))
173
171
  return;
174
- const t = await Q(e.id, r);
172
+ const t = await U(e.id, n);
175
173
  if (!t)
176
174
  return;
177
175
  const s = e.definitions, o = new Map(
178
- Object.entries(s).map(([n, i]) => [n.toLowerCase(), i])
176
+ Object.entries(s).map(([i, r]) => [i.toLowerCase(), r])
179
177
  ), a = {
180
178
  bundles: [...t.bundles],
181
179
  variables: [],
182
- hiddenApiItems: e.hiddenApiItems?.map((n) => n.toLowerCase())
180
+ hiddenApiItems: e.hiddenApiItems?.map((i) => i.toLowerCase())
183
181
  };
184
- return t.variables.forEach((n) => {
185
- if (e.disabledVariables?.includes(n.name))
182
+ return t.variables.forEach((i) => {
183
+ if (e.disabledVariables?.includes(i.name))
186
184
  return;
187
- const i = o.get(n.name.toLowerCase());
188
- switch (n.type) {
185
+ const r = o.get(i.name.toLowerCase());
186
+ switch (i.type) {
189
187
  case "dictionary":
190
188
  return a.variables.push(
191
- m(
192
- {
193
- ...n,
194
- type: n.type,
195
- properties: Array.isArray(i) ? [...i] : n.properties
196
- },
197
- {
198
- allowUserArrayElementTypes: e.id === "data-pipelines"
199
- }
200
- )
189
+ m({
190
+ ...i,
191
+ type: i.type,
192
+ properties: Array.isArray(r) ? [...r] : i.properties
193
+ })
201
194
  );
202
195
  case "feature":
203
- return C(i) ? a.variables.push({ ...n, type: "feature", definition: i }) : void 0;
196
+ return C(r) ? a.variables.push({ ...i, type: "feature", definition: r }) : void 0;
204
197
  case "pixel":
205
- return I(i) ? a.variables.push({ ...n, type: n.type, definition: i }) : void 0;
198
+ return I(r) ? a.variables.push({ ...i, type: i.type, definition: r }) : void 0;
206
199
  case "voxel":
207
- return E(i) ? a.variables.push({ ...n, type: n.type, definition: i }) : void 0;
200
+ return E(r) ? a.variables.push({ ...i, type: i.type, definition: r }) : void 0;
208
201
  case "featureSet":
209
- return k(i) ? a.variables.push({ ...n, type: n.type, definition: i }) : void 0;
202
+ return k(r) ? a.variables.push({ ...i, type: i.type, definition: r }) : void 0;
210
203
  case "featureSetCollection":
211
- return L(i) ? a.variables.push({ ...n, type: n.type, definition: i }) : void 0;
204
+ return L(r) ? a.variables.push({ ...i, type: i.type, definition: r }) : void 0;
212
205
  default:
213
- return a.variables.push(m(n));
206
+ return a.variables.push(m(i));
214
207
  }
215
208
  }), G(e) && a.variables.push(...e.additionalVariables ?? []), a;
216
209
  }
@@ -236,7 +229,7 @@ const W = {
236
229
  R(e)
237
230
  )
238
231
  };
239
- class X extends M {
232
+ class X extends S {
240
233
  /**
241
234
  * Per-model update chaining to serialize profile updates.
242
235
  *
@@ -267,40 +260,40 @@ class X extends M {
267
260
  * @param locale The locale to use for the model context.
268
261
  * @returns The EditorProfile for the model.
269
262
  */
270
- async setProfileForModel(r, t, s = { locale: "en" }) {
271
- const o = this._getApiKey(r), n = (this.#e.get(o) || Promise.resolve()).then(async () => {
263
+ async setProfileForModel(n, t, s = { locale: "en" }) {
264
+ const o = this._getApiKey(n), i = (this.#e.get(o) || Promise.resolve()).then(async () => {
272
265
  const c = t, d = h(c) ? await J(c, s.locale) : c, l = await $(
273
266
  s.locale,
274
- P("./assets/editor-profile/t9n"),
267
+ T("./assets/editor-profile/t9n"),
275
268
  "messages."
276
269
  );
277
270
  if (!l)
278
271
  throw new Error(`Failed to load the language bundle for ${s.locale}`);
279
- this.disposeForModel(r);
280
- const g = new S(
272
+ this.disposeForModel(n);
273
+ const g = new A(
281
274
  d,
282
275
  l,
283
276
  s.locale,
284
277
  W
285
278
  );
286
279
  this._modelToProfileMap.set(o, g);
287
- const D = await q(g);
288
- this.updateApiContextForModel(r, {
280
+ const D = await B(g);
281
+ this.updateApiContextForModel(n, {
289
282
  locale: s.locale,
290
283
  profile: D,
291
284
  snippets: s.snippets
292
285
  });
293
- }), i = n.finally(() => {
294
- this.#e.get(o) === i && this.#e.delete(o);
286
+ }), r = i.finally(() => {
287
+ this.#e.get(o) === r && this.#e.delete(o);
295
288
  });
296
- return this.#e.set(o, i), await n;
289
+ return this.#e.set(o, r), await i;
297
290
  }
298
291
  }
299
- const p = new X(), ie = {
300
- setProfileForModel: p.setProfileForModel.bind(p),
301
- getApiLibraryForModel: p.getApiLibraryForModel.bind(p)
292
+ const u = new X(), re = {
293
+ setProfileForModel: u.setProfileForModel.bind(u),
294
+ getApiLibraryForModel: u.getApiLibraryForModel.bind(u)
302
295
  };
303
296
  export {
304
- ie as a,
305
- p as b
297
+ re as a,
298
+ u as b
306
299
  };
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { Uri as p, languages as s } from "monaco-editor";
2
+ import { languages as t } from "monaco-editor";
3
3
  import "monaco-editor/editor/standalone/browser/standaloneServices.js";
4
4
  import "monaco-editor/editor/standalone/common/standaloneTheme.js";
5
5
  import "monaco-editor/platform/hover/browser/hover.js";
@@ -8,98 +8,65 @@ import "monaco-editor/editor/common/languages/supports/tokenization.js";
8
8
  import "monaco-editor/base/browser/dom.js";
9
9
  import "monaco-editor/editor/browser/editorDom.js";
10
10
  import "monaco-editor/editor/browser/controller/mouseTarget.js";
11
- import { b as t } from "./arcade-defaults.js";
12
- import { g as l } from "./arcade-service-accessors.js";
13
- import { i as d } from "./monaco-importer.js";
11
+ import { a as s, m as g, g as d } from "./sql-expr-service-accessors.js";
12
+ import { b as o } from "./arcade-defaults.js";
13
+ import { g as m } from "./arcade-service-accessors.js";
14
14
  import { a } from "./sql-expr-defaults.js";
15
- import { g as f } from "./sql-expr-service-accessors.js";
16
- import { t as h } from "./monaco-theme.js";
17
- const k = [
18
- "arcade",
19
- "arcgis-sql-expression",
20
- "sql-layer-sql-server",
21
- "sql-layer-postgres",
22
- "sql-layer-bigquery"
23
- ], i = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map();
24
- function c(e) {
25
- let r = g.get(e);
26
- return r || (r = Promise.withResolvers(), g.set(e, r)), r;
27
- }
28
- function u(e) {
29
- c(e).resolve();
30
- }
31
- function $(e) {
32
- return k.includes(e) ? c(e).promise : Promise.resolve();
33
- }
34
- function m(e, r) {
35
- return () => {
36
- i.has(e) || i.add(e), r();
37
- };
38
- }
39
- async function A(e) {
40
- if (i.has(e))
41
- return;
42
- (await d()).createModel("", e, p.parse("")).dispose();
43
- }
44
- s.register({
45
- id: t.languageId,
15
+ import { i as p } from "./monaco-importer.js";
16
+ import { t as c } from "./monaco-theme.js";
17
+ t.register({
18
+ id: o.languageId,
46
19
  aliases: ["Arcade", "arcade"],
47
20
  extensions: [".arc"],
48
21
  mimetypes: ["application/arcade"]
49
22
  });
50
- s.onLanguage(
51
- t.languageId,
52
- m(t.languageId, () => {
53
- l().then((e) => {
54
- e.setupMode(t), u(t.languageId);
23
+ t.onLanguage(
24
+ o.languageId,
25
+ s(o.languageId, () => {
26
+ m().then((e) => {
27
+ e.setupMode(o), g(o.languageId);
55
28
  }).catch((e) => {
56
29
  throw e;
57
30
  });
58
31
  })
59
32
  );
60
- s.register({
33
+ t.register({
61
34
  id: a.languageId,
62
35
  aliases: ["EsiSqlExpression", "sql-expression"],
63
36
  extensions: [".sql-expression"],
64
37
  mimetypes: ["application/sql-expression"]
65
38
  });
66
- s.onLanguage(
39
+ t.onLanguage(
67
40
  a.languageId,
68
- m(a.languageId, () => {
69
- f().then((e) => {
70
- e.setupMode(a), u(a.languageId);
41
+ s(a.languageId, () => {
42
+ d().then((e) => {
43
+ e.setupMode(a), g(a.languageId);
71
44
  }).catch((e) => {
72
45
  throw e;
73
46
  });
74
47
  })
75
48
  );
76
- y();
77
- function y() {
78
- d().then((e) => {
79
- ["light", "dark"].forEach((r) => {
80
- const n = r === "light" ? "vs" : "vs-dark", o = h[`${r}-theme`];
81
- e.defineTheme(n, {
82
- base: n,
49
+ u();
50
+ function u() {
51
+ p().then((e) => {
52
+ ["light", "dark"].forEach((n) => {
53
+ const i = n === "light" ? "vs" : "vs-dark", r = c[`${n}-theme`];
54
+ e.defineTheme(i, {
55
+ base: i,
83
56
  inherit: !0,
84
57
  rules: [
85
- { token: "comment.arcgis", foreground: o.comment },
86
- { token: "constant.arcgis", foreground: o.constant },
87
- { token: "keyword.arcgis", foreground: o.keyword },
88
- { token: "identifier.arcgis", foreground: o.identifier },
89
- { token: "number.arcgis", foreground: o.number },
90
- { token: "string.arcgis", foreground: o.string },
91
- { token: "operator.arcgis", foreground: o.operator },
92
- { token: "predefined.arcgis", foreground: o.predefined },
93
- { token: "date.arcgis", foreground: o.date }
58
+ { token: "comment.arcgis", foreground: r.comment },
59
+ { token: "constant.arcgis", foreground: r.constant },
60
+ { token: "keyword.arcgis", foreground: r.keyword },
61
+ { token: "identifier.arcgis", foreground: r.identifier },
62
+ { token: "number.arcgis", foreground: r.number },
63
+ { token: "string.arcgis", foreground: r.string },
64
+ { token: "operator.arcgis", foreground: r.operator },
65
+ { token: "predefined.arcgis", foreground: r.predefined },
66
+ { token: "date.arcgis", foreground: r.date }
94
67
  ],
95
68
  colors: {}
96
69
  });
97
70
  });
98
71
  });
99
72
  }
100
- export {
101
- m as a,
102
- u as m,
103
- A as s,
104
- $ as w
105
- };