@arcgis/coding-components 4.30.0-next.4 → 4.30.0-next.41

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 (133) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  2. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  3. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  4. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  43. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
  44. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  45. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  46. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  47. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  48. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  49. package/dist/arcgis-coding-components/index.esm.js +2 -2
  50. package/dist/arcgis-coding-components/{p-25023832.js → p-1f57b2c8.js} +3 -3
  51. package/dist/arcgis-coding-components/{p-e88c0d1d.js → p-2656babc.js} +1 -1
  52. package/dist/arcgis-coding-components/p-41c0f095.js +7 -0
  53. package/dist/arcgis-coding-components/{p-08f272e7.js → p-4e83c7d9.js} +3 -3
  54. package/dist/arcgis-coding-components/p-55dffc4c.entry.js +6 -0
  55. package/dist/arcgis-coding-components/{p-78220a75.js → p-68167d79.js} +3 -3
  56. package/dist/arcgis-coding-components/{p-4d158786.js → p-6e9ee8e1.js} +2 -2
  57. package/dist/arcgis-coding-components/{p-b63557ba.js → p-7600673f.js} +2 -2
  58. package/dist/arcgis-coding-components/{p-73e2476b.js → p-8741dfa4.js} +2 -2
  59. package/dist/arcgis-coding-components/{p-cd9e95f9.js → p-9acb23cc.js} +2 -2
  60. package/dist/arcgis-coding-components/p-b3a3ab63.js +68 -0
  61. package/dist/arcgis-coding-components/{p-c7bb7c6a.js → p-ea30709a.js} +2 -2
  62. package/dist/cjs/{arcade-defaults-d41420df.js → arcade-defaults-acc3b5ac.js} +498 -172
  63. package/dist/cjs/{arcade-mode-55360f90.js → arcade-mode-af4f0fdf.js} +45 -51
  64. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1660 -234
  65. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  66. package/dist/cjs/{css-9a006c1a.js → css-c1dec897.js} +1 -1
  67. package/dist/cjs/{cssMode-c9458ea4.js → cssMode-8a51d0ec.js} +3 -3
  68. package/dist/cjs/{html-45d9defe.js → html-a26829c5.js} +3 -3
  69. package/dist/cjs/{htmlMode-1716753f.js → htmlMode-d59290f4.js} +3 -3
  70. package/dist/cjs/{index-25b044b5.js → index-f070b08e.js} +42 -4
  71. package/dist/cjs/index.cjs.js +3 -3
  72. package/dist/cjs/{javascript-9ce57501.js → javascript-836a3c78.js} +4 -4
  73. package/dist/cjs/{jsonMode-3945e8f7.js → jsonMode-2600ca0a.js} +3 -3
  74. package/dist/cjs/loader.cjs.js +3 -3
  75. package/dist/cjs/{tsMode-7eaeb36b.js → tsMode-b10eb9a7.js} +3 -3
  76. package/dist/cjs/{typescript-ec5da0c4.js → typescript-07dfd341.js} +3 -3
  77. package/dist/components/arcade-api.js +19 -31
  78. package/dist/components/arcade-contribution.js +71 -13
  79. package/dist/components/arcade-defaults.js +79 -74
  80. package/dist/components/arcade-mode.js +44 -50
  81. package/dist/components/arcade-results.js +46 -60
  82. package/dist/components/arcade-suggestions.js +19 -30
  83. package/dist/components/arcade-variables.js +20 -35
  84. package/dist/components/arcgis-arcade-api.js +1 -1
  85. package/dist/components/arcgis-arcade-editor.js +48 -140
  86. package/dist/components/arcgis-arcade-results.js +1 -1
  87. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  88. package/dist/components/arcgis-arcade-variables.js +1 -1
  89. package/dist/components/arcgis-assets.d.ts +1 -1
  90. package/dist/components/arcgis-assets.js +1 -1
  91. package/dist/components/arcgis-code-editor.js +1 -1
  92. package/dist/components/chunk-HXHHCYA6.js +1460 -0
  93. package/dist/components/code-editor.js +21 -18
  94. package/dist/components/fields.js +2 -66
  95. package/dist/components/index.js +1 -1
  96. package/dist/components/index2.js +388 -3
  97. package/dist/components/markdown.js +9 -11
  98. package/dist/components/utilities.js +3 -3
  99. package/dist/esm/{arcade-defaults-0bce2095.js → arcade-defaults-1f9c1af0.js} +485 -159
  100. package/dist/esm/{arcade-mode-57782d19.js → arcade-mode-c0bd49f2.js} +45 -51
  101. package/dist/esm/arcgis-arcade-api_6.entry.js +1660 -234
  102. package/dist/esm/arcgis-coding-components.js +4 -4
  103. package/dist/esm/{css-70f18054.js → css-1e20a73b.js} +1 -1
  104. package/dist/esm/{cssMode-488c3e86.js → cssMode-31dc7377.js} +3 -3
  105. package/dist/esm/{html-59102be0.js → html-f8a0ecfe.js} +3 -3
  106. package/dist/esm/{htmlMode-cfdd852e.js → htmlMode-71570d38.js} +3 -3
  107. package/dist/esm/{index-78a96626.js → index-0030b0f4.js} +42 -5
  108. package/dist/esm/index.js +3 -3
  109. package/dist/esm/{javascript-8ee5b791.js → javascript-bd547f0f.js} +4 -4
  110. package/dist/esm/{jsonMode-771e71b0.js → jsonMode-fc11c3fd.js} +3 -3
  111. package/dist/esm/loader.js +4 -4
  112. package/dist/esm/{tsMode-f95b693f.js → tsMode-201c99e8.js} +3 -3
  113. package/dist/esm/{typescript-055e39ac.js → typescript-51b03c89.js} +3 -3
  114. package/dist/loader/cdn.js +1 -1
  115. package/dist/loader/index.cjs.js +1 -1
  116. package/dist/loader/index.es2017.js +1 -1
  117. package/dist/loader/index.js +1 -1
  118. package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
  119. package/dist/types/components/arcade-editor/arcade-editor.d.ts +9 -6
  120. package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
  121. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +6 -7
  122. package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
  123. package/dist/types/components/code-editor/code-editor.d.ts +9 -1
  124. package/dist/types/components.d.ts +35 -24
  125. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +37 -0
  126. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
  127. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
  128. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  129. package/dist/types/utils/profile/types.d.ts +1 -1
  130. package/package.json +20 -19
  131. package/dist/arcgis-coding-components/p-04561935.entry.js +0 -6
  132. package/dist/arcgis-coding-components/p-871217d9.js +0 -68
  133. package/dist/arcgis-coding-components/p-c23d1605.js +0 -7
@@ -1,13 +1,13 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.4
4
+ * v4.30.0-next.41
5
5
  */
6
6
  import { Emitter, Uri } from 'monaco-editor';
7
7
  import { InsertTextMode, InsertTextFormat, CompletionItemKind } from 'vscode-languageserver-types';
8
- import { i as importLayersFeatureLayer, a as importRequest, s as supportedFields, n as newPortalPortalItem, b as newWebScene, c as newWebMap, f as fieldAlias, d as fieldTypeToIconName, e as fieldTypeToArcadeType } from './fields.js';
8
+ import { i as importLayersFeatureLayer, a as importRequest, b as isNotNull, c as isNotUndefined, n as newPortalPortalItem, d as newWebScene, e as newWebMap, f as addLTRMark, s as setValuesInString, g as supportedLocales, h as fetchT9NStringsBundle } from './index2.js';
9
9
  import { p as portalItemPageUrl } from './utilities.js';
10
- import { e as ee, t as te, G, Z, E, v } from './index2.js';
10
+ import { s as supportedFields, f as fieldAlias, a as fieldTypeToIconName, b as fieldTypeToArcadeType } from './fields.js';
11
11
  import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
12
12
 
13
13
  //#region core adapter fix
@@ -171,25 +171,30 @@ async function serviceMetaData(url) {
171
171
  const response = await request(url, { responseType: "json", query: { f: "json" } });
172
172
  const data = {
173
173
  layers: response.data?.layers ?? [],
174
- tables: response.data?.tables ?? []
174
+ tables: response.data?.tables ?? [],
175
175
  };
176
176
  const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
177
- const layers = filterFeatureLayerInfos(data.layers, queryCapability);
178
- const tables = filterFeatureLayerInfos(data.tables, queryCapability);
177
+ const layers = getSupportedLayerInfos(data.layers, queryCapability);
178
+ const tables = getSupportedLayerInfos(data.tables, queryCapability);
179
179
  return { layers, tables };
180
180
  }
181
- function filterFeatureLayerInfos(layers, queryCapability) {
181
+ function getSupportedLayerInfos(layers, queryCapability) {
182
182
  return layers.filter((layer) => {
183
- if (layer.type !== "Feature Layer" && layer.type !== "Table") {
184
- return false;
185
- }
186
- const capabilities = layer.capabilities
187
- ? layer.capabilities
188
- .toLowerCase()
189
- .split(",")
190
- .map((value) => value.trim())
191
- : [];
192
- return capabilities.includes(queryCapability);
183
+ switch (layer.type) {
184
+ case "Feature Layer":
185
+ case "Oriented Imagery Layer":
186
+ case "Table": {
187
+ const capabilities = layer.capabilities
188
+ ? layer.capabilities
189
+ .toLowerCase()
190
+ .split(",")
191
+ .map((value) => value.trim())
192
+ : [];
193
+ return capabilities.includes(queryCapability);
194
+ }
195
+ default:
196
+ return false;
197
+ }
193
198
  });
194
199
  }
195
200
  //#endregion
@@ -287,8 +292,8 @@ function variableToLSVariable(editorVariable, kind) {
287
292
  insertTextMode: InsertTextMode.asIs,
288
293
  insertTextFormat: InsertTextFormat.PlainText,
289
294
  kind,
290
- documentation: { kind: "markdown", value: description }
291
- }
295
+ documentation: { kind: "markdown", value: description },
296
+ },
292
297
  };
293
298
  }
294
299
  async function featureToLSFeature(editorFeature, kind) {
@@ -302,14 +307,14 @@ async function featureToLSFeature(editorFeature, kind) {
302
307
  insertText: name,
303
308
  insertTextMode: InsertTextMode.asIs,
304
309
  insertTextFormat: InsertTextFormat.PlainText,
305
- kind
310
+ kind,
306
311
  };
307
312
  const result = {
308
313
  name,
309
314
  description,
310
315
  type: "dictionary",
311
316
  properties: [],
312
- completion: resultCompletion
317
+ completion: resultCompletion,
313
318
  };
314
319
  // No source definition, then it will be a feature without any known fields
315
320
  if (!source) {
@@ -347,8 +352,8 @@ async function featureToLSFeature(editorFeature, kind) {
347
352
  insertTextMode: InsertTextMode.asIs,
348
353
  insertTextFormat: InsertTextFormat.PlainText,
349
354
  kind: CompletionItemKind.Field,
350
- documentation: { kind: "markdown", value: fieldCompletionDescription }
351
- }
355
+ documentation: { kind: "markdown", value: fieldCompletionDescription },
356
+ },
352
357
  });
353
358
  if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
354
359
  return;
@@ -369,8 +374,8 @@ async function featureToLSFeature(editorFeature, kind) {
369
374
  insertTextMode: InsertTextMode.asIs,
370
375
  insertTextFormat: InsertTextFormat.PlainText,
371
376
  kind: CompletionItemKind.Field,
372
- documentation: { kind: "markdown", value: aliasCompletionDescription }
373
- }
377
+ documentation: { kind: "markdown", value: aliasCompletionDescription },
378
+ },
374
379
  });
375
380
  });
376
381
  result.properties = [...fieldProfileValues, ...aliasProfileValues];
@@ -403,8 +408,8 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
403
408
  insertTextMode: InsertTextMode.asIs,
404
409
  insertTextFormat: InsertTextFormat.PlainText,
405
410
  kind,
406
- documentation: { kind: "markdown", value: completionDescription }
407
- }
411
+ documentation: { kind: "markdown", value: completionDescription },
412
+ },
408
413
  };
409
414
  }
410
415
  /**
@@ -431,9 +436,9 @@ class ProfileItemBase {
431
436
  // If the component is under RTL, the string is messed up.
432
437
  // It is converted from $feature to feature$, This is not acceptable since the label
433
438
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
434
- return G(this._label);
439
+ return addLTRMark(this._label);
435
440
  }
436
- return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
441
+ return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
437
442
  }
438
443
  /**
439
444
  * Returns the description string.
@@ -445,7 +450,7 @@ class ProfileItemBase {
445
450
  if (typeof this.description === "string") {
446
451
  return this.description;
447
452
  }
448
- return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
453
+ return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
449
454
  }
450
455
  /**
451
456
  * Returns true if the item pass the filter test
@@ -622,28 +627,28 @@ class DictionaryVariable extends CollectionBasedVariable {
622
627
  return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
623
628
  case "featureSet":
624
629
  return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
625
- new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
630
+ new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
626
631
  ]);
627
632
  case "featureSetCollection":
628
633
  return new FeatureSetCollectionVariable(this, {
629
634
  profile: this._profile,
630
635
  declaration,
631
636
  label: snippet,
632
- snippet
637
+ snippet,
633
638
  });
634
639
  case "dictionary":
635
640
  return new DictionaryVariable(this, {
636
641
  profile: this._profile,
637
642
  declaration,
638
643
  label: snippet,
639
- snippet
644
+ snippet,
640
645
  });
641
646
  case "array":
642
647
  return new ArrayVariable({
643
648
  profile: this._profile,
644
649
  declaration,
645
650
  label: snippet,
646
- snippet
651
+ snippet,
647
652
  });
648
653
  default:
649
654
  console.error("Editor profile: Invalid profile variable", declaration);
@@ -655,7 +660,7 @@ class DictionaryVariable extends CollectionBasedVariable {
655
660
  type: this.type,
656
661
  name: "",
657
662
  ...this.declaration,
658
- properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
663
+ properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
659
664
  };
660
665
  }
661
666
  }
@@ -686,7 +691,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
686
691
  return this._profile?.intlStrings.layer ?? "layer";
687
692
  }
688
693
  async loadSource() {
689
- if (ee(this._loadPromise) && te(this._loadPromise)) {
694
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
690
695
  return await this._loadPromise;
691
696
  }
692
697
  this._loadPromise = this._loadSource();
@@ -721,7 +726,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
721
726
  description: fieldAlias(field),
722
727
  snippet: valueSnippet,
723
728
  icon: fieldTypeToIconName(field),
724
- filterDescription: true
729
+ filterDescription: true,
725
730
  });
726
731
  }
727
732
  _getDomainDictionary(field) {
@@ -814,7 +819,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
814
819
  return null;
815
820
  }
816
821
  const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
817
- code: "domainvalues"
822
+ code: "domainvalues",
818
823
  });
819
824
  const domainDictionary = this._createDomainDictionary(field);
820
825
  domainDictionary.variables.push(domainValuesGroup);
@@ -832,7 +837,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
832
837
  profile: this._profile,
833
838
  label: `${label}`,
834
839
  description: t.name,
835
- snippet: `"${label}"`
840
+ snippet: `"${label}"`,
836
841
  });
837
842
  }) ?? [];
838
843
  return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
@@ -843,7 +848,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
843
848
  label: `${v.code}`,
844
849
  description: v.name,
845
850
  snippet: `"${v.code}"`,
846
- filterDescription: true
851
+ filterDescription: true,
847
852
  }));
848
853
  return new GroupOfVariables(this._profile, label, values);
849
854
  }
@@ -869,8 +874,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
869
874
  code: "domainvaluesfortypeformat",
870
875
  formatValues: {
871
876
  fieldName: alias,
872
- typeName: type.name
873
- }
877
+ typeName: type.name,
878
+ },
874
879
  });
875
880
  const id = isSubtypeInstance(type) ? type.code : type.id;
876
881
  const label = `${id}`;
@@ -880,7 +885,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
880
885
  label,
881
886
  snippet,
882
887
  description: type.name,
883
- declaration: { name: alias }
888
+ declaration: { name: alias },
884
889
  });
885
890
  subtypeDictionary.variables = [domainValuesGroup];
886
891
  variables.push(subtypeDictionary);
@@ -902,7 +907,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
902
907
  description: alias,
903
908
  snippet: valueSnippet,
904
909
  icon: "form-dropdown",
905
- declaration: { name: field.name }
910
+ declaration: { name: field.name },
906
911
  });
907
912
  // Add the header group
908
913
  const headerGroup = new GroupOfVariables(this._profile, alias, [
@@ -910,8 +915,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
910
915
  profile: this._profile,
911
916
  label: valueSnippet,
912
917
  description: "",
913
- snippet: valueSnippet
914
- })
918
+ snippet: valueSnippet,
919
+ }),
915
920
  ]);
916
921
  domainDictionary.variables = [headerGroup];
917
922
  // Add the SubtypeName or DomainName snippet if available
@@ -921,7 +926,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
921
926
  profile: this._profile,
922
927
  label: subtypeOrDomainNameSnippet,
923
928
  description: "",
924
- snippet: subtypeOrDomainNameSnippet
929
+ snippet: subtypeOrDomainNameSnippet,
925
930
  }));
926
931
  }
927
932
  return domainDictionary;
@@ -951,10 +956,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
951
956
  declaration: { definition: relatedLayer },
952
957
  label: relatedLayer.title,
953
958
  description: "",
954
- nonInteractive: true
959
+ nonInteractive: true,
955
960
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
956
961
  }));
957
- relationshipsGroup.variables = relationshipItems.filter(ee);
962
+ relationshipsGroup.variables = relationshipItems.filter(isNotNull);
958
963
  if (!relationshipsGroup.variables.length) {
959
964
  return null;
960
965
  }
@@ -968,7 +973,7 @@ class FeatureVariable extends SourceBasedVariable {
968
973
  }
969
974
  get title() {
970
975
  if (isSupportedLayerInstance(this._source)) {
971
- return this._source.title;
976
+ return this._source.title ?? "";
972
977
  }
973
978
  return { code: "feature" };
974
979
  }
@@ -982,14 +987,14 @@ class FeatureVariable extends SourceBasedVariable {
982
987
  throw new Error("Invalid definition");
983
988
  }
984
989
  // The title group and snippet
985
- const title = isSupportedLayerInstance(this._source) ? this._source.title : "";
990
+ const title = isSupportedLayerInstance(this._source) ? this._source.title ?? "" : "";
986
991
  this.variables.push(new GroupOfVariables(this._profile, title, [
987
992
  new ValueVariable({
988
993
  profile: this._profile,
989
994
  label: this.snippet,
990
995
  description: "",
991
- snippet: this.snippet
992
- })
996
+ snippet: this.snippet,
997
+ }),
993
998
  ]));
994
999
  // The collection of feature attribute values
995
1000
  const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
@@ -1004,7 +1009,7 @@ class FeatureVariable extends SourceBasedVariable {
1004
1009
  description: "Geometry",
1005
1010
  snippet,
1006
1011
  icon: "shapes",
1007
- filterDescription: true
1012
+ filterDescription: true,
1008
1013
  });
1009
1014
  valuesGroup.variables.push(geometryProperty);
1010
1015
  }
@@ -1041,7 +1046,7 @@ class FeatureSetVariable extends SourceBasedVariable {
1041
1046
  }
1042
1047
  get title() {
1043
1048
  if (isSupportedLayerInstance(this._source)) {
1044
- return this._source.title;
1049
+ return this._source.title ?? "";
1045
1050
  }
1046
1051
  return { code: "featureset" };
1047
1052
  }
@@ -1118,7 +1123,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1118
1123
  return this._profile?.intlStrings.map ?? "map";
1119
1124
  }
1120
1125
  async loadSource() {
1121
- if (ee(this._loadPromise) && te(this._loadPromise)) {
1126
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
1122
1127
  return await this._loadPromise;
1123
1128
  }
1124
1129
  this._loadPromise = this._loadSource();
@@ -1139,16 +1144,16 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1139
1144
  : {
1140
1145
  code: "webmapformat",
1141
1146
  formatValues: {
1142
- webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
1143
- }
1147
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
1148
+ },
1144
1149
  };
1145
1150
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
1146
1151
  new ValueVariable({
1147
1152
  profile: this._profile,
1148
1153
  label: this.snippet,
1149
1154
  description: "",
1150
- snippet: this.snippet
1151
- })
1155
+ snippet: this.snippet,
1156
+ }),
1152
1157
  ]);
1153
1158
  // Creates the groups for the layer and tables
1154
1159
  const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
@@ -1195,7 +1200,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1195
1200
  return {
1196
1201
  layers: this._convertWebMapLayersToVariables(map.layers),
1197
1202
  tables: this._convertWebMapLayersToVariables(map.tables, true),
1198
- source: map
1203
+ source: map,
1199
1204
  };
1200
1205
  }
1201
1206
  async _featureSetCollectionFromPortalItem(definition) {
@@ -1263,7 +1268,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1263
1268
  declaration: { name: featureLayer.title, definition: featureLayer },
1264
1269
  label: featureLayer.title,
1265
1270
  description: "",
1266
- nonInteractive: true
1271
+ nonInteractive: true,
1267
1272
  }, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
1268
1273
  }
1269
1274
  _makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
@@ -1275,7 +1280,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1275
1280
  const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
1276
1281
  return [
1277
1282
  new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
1278
- new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
1283
+ new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
1279
1284
  ];
1280
1285
  }
1281
1286
  else {
@@ -1300,7 +1305,7 @@ class EditorProfile extends DictionaryVariable {
1300
1305
  // Delay the load of the variable declarations so we have a `this`
1301
1306
  super(undefined, {
1302
1307
  profile: null,
1303
- declaration: { properties: [] }
1308
+ declaration: { properties: [] },
1304
1309
  });
1305
1310
  this.definition = definition;
1306
1311
  this.intlStrings = intlStrings;
@@ -1332,7 +1337,7 @@ class EditorProfile extends DictionaryVariable {
1332
1337
  toEditorProfileDefinition() {
1333
1338
  return {
1334
1339
  ...this.definition,
1335
- variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
1340
+ variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
1336
1341
  };
1337
1342
  }
1338
1343
  }
@@ -1365,7 +1370,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
1365
1370
  if (profiles) {
1366
1371
  return profiles;
1367
1372
  }
1368
- if (!E.has(locale)) {
1373
+ if (!supportedLocales.has(locale)) {
1369
1374
  return await getSdkPredefinedProfiles("en");
1370
1375
  }
1371
1376
  try {
@@ -1411,13 +1416,13 @@ function convertApiVariable(variable) {
1411
1416
  return {
1412
1417
  ...variable,
1413
1418
  type: variable.type,
1414
- properties: convertApiVariables(variable.properties)
1419
+ properties: convertApiVariables(variable.properties),
1415
1420
  };
1416
1421
  case "array": {
1417
1422
  return {
1418
1423
  ...variable,
1419
1424
  type: variable.type,
1420
- elementType: { type: "number", name: "number" }
1425
+ elementType: { type: "number", name: "number" },
1421
1426
  };
1422
1427
  }
1423
1428
  default:
@@ -1435,7 +1440,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1435
1440
  const editorProfile = {
1436
1441
  bundles: [...sdkPredefinedProfile.bundles],
1437
1442
  variables: [],
1438
- hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
1443
+ hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
1439
1444
  };
1440
1445
  // Merge the SDK variables' definitions/properties with the predefined profile definitions.
1441
1446
  sdkPredefinedProfile.variables.forEach((sdkVariable) => {
@@ -1453,7 +1458,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1453
1458
  return editorProfile.variables.push(convertApiVariable({
1454
1459
  ...sdkVariable,
1455
1460
  type: sdkVariable.type,
1456
- properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties
1461
+ properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties,
1457
1462
  }));
1458
1463
  case "feature":
1459
1464
  if (isFeatureDefinition(definition)) {
@@ -1482,7 +1487,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1482
1487
 
1483
1488
  const arcadeLanguageId = "arcade";
1484
1489
  const defaultContext = {
1485
- locale: "en"
1490
+ locale: "en",
1486
1491
  };
1487
1492
  class ArcadeLanguageServiceDefaults {
1488
1493
  constructor() {
@@ -1536,7 +1541,7 @@ class ArcadeLanguageServiceDefaults {
1536
1541
  if (isPredefinedProfile(definition)) {
1537
1542
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
1538
1543
  }
1539
- const intlStrings = await v(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1544
+ const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1540
1545
  if (!intlStrings) {
1541
1546
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
1542
1547
  }
@@ -1548,7 +1553,7 @@ class ArcadeLanguageServiceDefaults {
1548
1553
  this.updateApiContextForModel(modelId, {
1549
1554
  locale: apiContext.locale,
1550
1555
  profile: apiProfile,
1551
- snippets: apiContext.snippets
1556
+ snippets: apiContext.snippets,
1552
1557
  });
1553
1558
  }
1554
1559
  /**
@@ -1615,7 +1620,7 @@ class ArcadeLanguageServiceDefaults {
1615
1620
  }
1616
1621
  const arcadeDefaults = new ArcadeLanguageServiceDefaults();
1617
1622
  const arcade = {
1618
- setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
1623
+ setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
1619
1624
  };
1620
1625
 
1621
1626
  export { arcade as a, arcadeDefaults as b };