@arcgis/coding-components 5.2.0-next.77 → 5.2.0-next.79

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.
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{K as s,w as e}from"./SMZ3LNZE.js";import"./BFPEJYVB.js";import"./H6RQVSYM.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./Q6573NF7.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./CRHXEUUE.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./CPRY6A4M.js"),"debuggerStore:,outputTitle,result:"],"arcgis-arcade-editor":[()=>import("./TNE7K4P6.js"),"arcadeAssistant:,customPanels:,disableAssistant,editorInstance:,editorOptions:,enableDebugger,externalExecutor:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,openArcadeAssistant,setFocus"],"arcgis-arcade-results":[()=>import("./46SGP3IQ.js"),"consoleLogs:,executionTiming:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./FP7M64L5.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./N5BWDIMZ.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./IVUY4N4B.js")],"arcgis-code-viewer":[()=>import("./T7CCNYHK.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./ILVYWJS4.js"),"closed,heading,hideDescriptions,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./6LPNGMDE.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./E4CYGXC6.js"),"hideDescriptionsInFieldsPanel,hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./TOQ2QWTU.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{K as s,w as e}from"./SMZ3LNZE.js";import"./BFPEJYVB.js";import"./H6RQVSYM.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./VVCAEHDP.js"),"appVersion,closed,closePanel:,diagnostics:,disableQuestionAnswerLogging,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,promptingEnabled,serviceUrl;destroy,openPrompt"],"arcgis-arcade-debugger-console":[()=>import("./CRHXEUUE.js"),"debuggerStore:,modelId"],"arcgis-arcade-debugger-output":[()=>import("./CPRY6A4M.js"),"debuggerStore:,outputTitle,result:"],"arcgis-arcade-editor":[()=>import("./MM63IOR3.js"),"arcadeAssistant:,customPanels:,disableAssistant,editorInstance:,editorOptions:,enableDebugger,externalExecutor:,hideDocumentationActions,hideSideBar,messageOverrides:,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,openArcadeAssistant,setFocus"],"arcgis-arcade-results":[()=>import("./46SGP3IQ.js"),"consoleLogs:,executionTiming:,hideHeader,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./UM4DUHEA.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./BMH6Y42N.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./IVUY4N4B.js")],"arcgis-code-viewer":[()=>import("./VBQBE2ZZ.js"),"language,lineNumbers,round"],"arcgis-editor-variables":[()=>import("./ILVYWJS4.js"),"closed,heading,hideDescriptions,loading,messageOverrides:,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./3OR3WFUJ.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./RDHNSTZG.js"),"hideDescriptionsInFieldsPanel,hideSideBar,messageOverrides:,messages:,profile:,script;setFocus"],"arcgis-sql-layer-editor":[()=>import("./M5FGCA7R.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,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { l as D, j as se, o as ae, p as oe, q as ne, r as le, s as ue, t as J, u as f, v as X, w as ce, x as pe, y as U, z as he, A as de, B as fe, C as w, D as R, E as T, F as _e, G as F, H as N, I as me, n as ye } from "./utils.js";
2
+ import { l as D, j as se, o as ae, p as oe, q as ne, r as le, s as ue, t as J, u as f, v as X, w as ce, x as pe, y as U, z as he, A as de, B as fe, C as w, D as N, E as T, F as _e, G as F, H as R, I as me, n as ye } from "./utils.js";
3
3
  import { p as be } from "./utilities.js";
4
4
  import ge from "@arcgis/core/portal/PortalItem.js";
5
5
  import De from "@arcgis/core/WebMap.js";
@@ -17,8 +17,8 @@ import { i as Pe } from "./monaco-importer.js";
17
17
  import { g as xe } from "./runtime.js";
18
18
  import { normalizeLocale as Ve } from "@arcgis/toolkit/intl";
19
19
  import { filterApiLibraryForContext as Me } from "@arcgis/languages-api-utils";
20
- import { Emitter as k, Uri as z } from "monaco-editor";
21
- function Le(s) {
20
+ import { Emitter as k, Uri as W } from "monaco-editor";
21
+ function Ee(s) {
22
22
  switch (s) {
23
23
  case "esriFieldTypeOID":
24
24
  return "oid";
@@ -58,17 +58,17 @@ function Le(s) {
58
58
  return "string";
59
59
  }
60
60
  }
61
- function Ee(s) {
61
+ function Le(s) {
62
62
  return {
63
63
  fields: s.fields.map((e) => ({
64
64
  name: e.name,
65
- type: Le(e.type),
65
+ type: Ee(e.type),
66
66
  serverType: e.type,
67
67
  nullable: e.nullable
68
68
  }))
69
69
  };
70
70
  }
71
- function W(s) {
71
+ function z(s) {
72
72
  return typeof s?.query == "object" && s.query ? s.query : {};
73
73
  }
74
74
  class $e {
@@ -117,13 +117,13 @@ class $e {
117
117
  {
118
118
  ...this._createRequestOptions(t),
119
119
  query: {
120
- ...W(this._requestOptions),
121
- ...W(t),
120
+ ...z(this._requestOptions),
121
+ ...z(t),
122
122
  tableName: e
123
123
  }
124
124
  }
125
125
  );
126
- return Ee(i);
126
+ return Le(i);
127
127
  }
128
128
  get _datastoreUrl() {
129
129
  return v(this.serviceUrl, "datastores", encodeURIComponent(this.itemId));
@@ -206,9 +206,14 @@ const Oe = [
206
206
  "FALSE",
207
207
  "DATE",
208
208
  "TIMESTAMP",
209
+ "CASE",
210
+ "WHEN",
211
+ "THEN",
212
+ "ELSE",
213
+ "END",
209
214
  "ASC",
210
215
  "DESC"
211
- ], Ue = ["<=", ">=", "<>", "!=", "=", "<", ">", "+", "-", "*", "/", "%", "||"], Re = (s, e = {}) => {
216
+ ], Ue = ["<=", ">=", "<>", "!=", "=", "<", ">", "+", "-", "*", "/", "%", "||"], Ne = (s, e = {}) => {
212
217
  const t = new Set(e.baseKeywords ?? Oe);
213
218
  for (const r of s.keywords)
214
219
  t.add(r.toUpperCase());
@@ -226,20 +231,20 @@ const Oe = [
226
231
  postgres: "sql-layer-postgres",
227
232
  bigquery: "sql-layer-bigquery",
228
233
  oracle: "sql-layer-oracle"
229
- }, K = p.postgres, Ne = {
234
+ }, K = p.postgres, Re = {
230
235
  [p.sqlServer]: "sqlServer",
231
236
  [p.postgres]: "postgres",
232
237
  [p.bigquery]: "bigquery",
233
238
  [p.oracle]: "oracle"
234
239
  };
235
240
  function Be(s) {
236
- return Ne[s];
241
+ return Re[s];
237
242
  }
238
243
  async function ke(s) {
239
- return Re(await Ge(Be(s)));
244
+ return Ne(await Ge(Be(s)));
240
245
  }
241
- const ze = /^[A-Za-z_][A-Za-z0-9_$]*$/u;
242
- function We(s) {
246
+ const We = /^[A-Za-z_][A-Za-z0-9_$]*$/u;
247
+ function ze(s) {
243
248
  return s === "esriDBMS_PostgreSQL" ? K : s === "esriDBMS_SQLServer" ? p.sqlServer : s === "esriDBMS_BigQuery" ? p.bigquery : s === "esriDBMS_Oracle" ? p.oracle : K;
244
249
  }
245
250
  function vt(s) {
@@ -250,7 +255,7 @@ function He(s) {
250
255
  }
251
256
  function Ke(s, e) {
252
257
  const t = s.trim();
253
- return t ? ze.test(t) ? e.keywords.includes(t.toUpperCase()) : !0 : !1;
258
+ return t ? We.test(t) ? e.keywords.includes(t.toUpperCase()) : !0 : !1;
254
259
  }
255
260
  function ee(s, e) {
256
261
  const t = s.trim();
@@ -266,13 +271,13 @@ function Tt(s) {
266
271
  return s.split(".").at(-1) ?? s;
267
272
  }
268
273
  function je(s) {
269
- return ke(We(s));
274
+ return ke(ze(s));
270
275
  }
271
276
  async function Je(s, e) {
272
277
  const t = new P({ url: `${s.url}/${e.relatedTableId}` });
273
278
  return await t.load(), t;
274
279
  }
275
- function L(s) {
280
+ function E(s) {
276
281
  return (e, t) => {
277
282
  if (e.type === "oid")
278
283
  return -1;
@@ -297,11 +302,11 @@ function Q(s, e) {
297
302
  return s?.every((t) => t.domains?.[e.name]?.type === "inherited") ?? !1;
298
303
  }
299
304
  const Xe = /^[a-z_$][a-z0-9_$]*$/giu;
300
- function E(s, e = !0) {
305
+ function L(s, e = !0) {
301
306
  return s.match(Xe) ? `${e ? "." : ""}${s}` : `["${s}"]`;
302
307
  }
303
308
  function te(s, e) {
304
- return s ? `${s}${E(e)}` : e;
309
+ return s ? `${s}${L(e)}` : e;
305
310
  }
306
311
  function j(s) {
307
312
  return he(s) ? s.portalItem : null;
@@ -319,7 +324,7 @@ function Pt(s, e, t) {
319
324
  `), a += `**${o.name}** (${o.alias})
320
325
  ${o.type}`, o.description && (a += `
321
326
  '${o.description}`);
322
- const g = Z(o, { supportGeometryFields: r }), _ = E(o.name, !1), G = S(o);
327
+ const g = Z(o, { supportGeometryFields: r }), _ = L(o.name, !1), G = S(o);
323
328
  if (n.push({
324
329
  name: o.name,
325
330
  description: G,
@@ -371,7 +376,7 @@ ${r.type}`, r.name && (t += `
371
376
  completion: {
372
377
  label: r.name,
373
378
  detail: r.name,
374
- insertText: E(r.name, !1),
379
+ insertText: L(r.name, !1),
375
380
  insertTextMode: M.asIs,
376
381
  insertTextFormat: V.PlainText,
377
382
  kind: x.Field
@@ -591,7 +596,7 @@ class re extends b {
591
596
  });
592
597
  }
593
598
  _getDomainDictionary(e) {
594
- return R(this._source) ? w(this._source) && this._source.subtypeField ? this._getSubtypeDomainDictionary(e) : T(this._source) && this._source.typeIdField ? this._getFeatureTypeDomainDictionary(e) : this._getFieldDomainDictionary(e) : null;
599
+ return N(this._source) ? w(this._source) && this._source.subtypeField ? this._getSubtypeDomainDictionary(e) : T(this._source) && this._source.typeIdField ? this._getFeatureTypeDomainDictionary(e) : this._getFieldDomainDictionary(e) : null;
595
600
  }
596
601
  _getSubtypeDomainDictionary(e) {
597
602
  if (!w(this._source))
@@ -626,7 +631,7 @@ class re extends b {
626
631
  return i.variables.push(t), i;
627
632
  }
628
633
  _getFieldDomainDictionary(e) {
629
- if (!R(this._source))
634
+ if (!N(this._source))
630
635
  return null;
631
636
  const t = this._source.getFieldDomain(e.name);
632
637
  if (!F(t))
@@ -640,7 +645,7 @@ class re extends b {
640
645
  if (F(t.domain))
641
646
  return this._getCodedValueDomainGroup(t.domain, { code: "subtypes" });
642
647
  const i = e?.map((r) => {
643
- const a = N(r) ? r.code : r.id;
648
+ const a = R(r) ? r.code : r.id;
644
649
  return new l({
645
650
  profile: this._profile,
646
651
  label: `${a}`,
@@ -674,7 +679,7 @@ class re extends b {
674
679
  fieldName: n,
675
680
  typeName: r.name
676
681
  }
677
- }), h = N(r) ? r.code : r.id, o = `${h}`, g = `"${h}""`, _ = new y(this, {
682
+ }), h = R(r) ? r.code : r.id, o = `${h}`, g = `"${h}""`, _ = new y(this, {
678
683
  profile: this._profile,
679
684
  label: o,
680
685
  snippet: g,
@@ -786,7 +791,7 @@ class et extends A {
786
791
  t.variables.push(n);
787
792
  }
788
793
  const i = this._source;
789
- C(this._source.fields).map((a) => i.fields.find((n) => n.name === a.name)).sort(L(i)).forEach((a) => {
794
+ C(this._source.fields).map((a) => i.fields.find((n) => n.name === a.name)).sort(E(i)).forEach((a) => {
790
795
  t.variables.push(this._getFieldProperty(a));
791
796
  });
792
797
  const r = await this._getRelationshipsProperty();
@@ -825,7 +830,7 @@ class tt extends A {
825
830
  const t = new u(this._profile, { code: "values" });
826
831
  this.variables.push(t);
827
832
  const i = await Se(this._source), r = this._source;
828
- C(this._source.fields).map((a) => r.fields.find((n) => n.name === a.name)).sort(L(r)).forEach((a) => {
833
+ C(this._source.fields).map((a) => r.fields.find((n) => n.name === a.name)).sort(E(r)).forEach((a) => {
829
834
  t.variables.push(this._getFieldProperty(a, i));
830
835
  });
831
836
  } catch (e) {
@@ -892,7 +897,7 @@ class q extends re {
892
897
  const t = this._profile?.policy, i = t && "allowGeometryFields" in t ? t.allowGeometryFields ?? !1 : !1;
893
898
  e.variables = C(this._source.fields, {
894
899
  supportGeometry: i
895
- }).sort(L(this._source)).map((a) => this._getFieldProperty(a));
900
+ }).sort(E(this._source)).map((a) => this._getFieldProperty(a));
896
901
  const r = await this._getRelationshipsProperty();
897
902
  r && this.variables.push(r);
898
903
  } catch (e) {
@@ -1231,7 +1236,7 @@ class Mt {
1231
1236
  }, 0));
1232
1237
  }
1233
1238
  _getApiKey(e) {
1234
- return z.isUri(e) || (e = z.parse(e)), e.toString();
1239
+ return W.isUri(e) || (e = W.parse(e)), e.toString();
1235
1240
  }
1236
1241
  getWorkerHostExtension() {
1237
1242
  }
@@ -1318,13 +1323,13 @@ export {
1318
1323
  $e as D,
1319
1324
  Vt as E,
1320
1325
  Mt as L,
1321
- We as a,
1326
+ ze as a,
1322
1327
  st as b,
1323
1328
  Qe as c,
1324
1329
  K as d,
1325
1330
  Tt as e,
1326
1331
  Pt as f,
1327
- E as g,
1332
+ L as g,
1328
1333
  ke as h,
1329
1334
  Be as i,
1330
1335
  xt as m,