@arcgis/coding-components 4.30.0-next.29 → 4.30.0-next.30

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 (89) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/index.esm.js +2 -2
  3. package/dist/arcgis-coding-components/{p-2262edb5.js → p-05407167.js} +2 -2
  4. package/dist/arcgis-coding-components/p-0e4fd488.entry.js +6 -0
  5. package/dist/arcgis-coding-components/{p-eff2d3a4.js → p-1b04872b.js} +3 -3
  6. package/dist/arcgis-coding-components/{p-77ed71a8.js → p-305e6a27.js} +3 -3
  7. package/dist/arcgis-coding-components/{p-24adbb7c.js → p-38778060.js} +3 -3
  8. package/dist/arcgis-coding-components/{p-9a00ddea.js → p-3e84bed2.js} +2 -2
  9. package/dist/arcgis-coding-components/{p-23baf361.js → p-50cbdef2.js} +2 -2
  10. package/dist/arcgis-coding-components/p-51032f3c.js +68 -0
  11. package/dist/arcgis-coding-components/{p-9f9cd0b9.js → p-61a3a32b.js} +2 -2
  12. package/dist/arcgis-coding-components/{p-6df29b26.js → p-7f41598e.js} +2 -2
  13. package/dist/arcgis-coding-components/{p-9a6e0c8c.js → p-a09a2021.js} +1 -1
  14. package/dist/arcgis-coding-components/{p-622b32b2.js → p-f2b266c1.js} +1 -1
  15. package/dist/cjs/{arcade-defaults-5269f6ab.js → arcade-defaults-18a60f03.js} +663 -337
  16. package/dist/cjs/{arcade-mode-85df9043.js → arcade-mode-c53bfc0e.js} +45 -51
  17. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +366 -261
  18. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  19. package/dist/cjs/{css-894bed01.js → css-56924b29.js} +1 -1
  20. package/dist/cjs/{cssMode-0fd626db.js → cssMode-ea630257.js} +3 -3
  21. package/dist/cjs/{html-64719fae.js → html-3d953aa2.js} +3 -3
  22. package/dist/cjs/{htmlMode-ad637d19.js → htmlMode-f3da6666.js} +3 -3
  23. package/dist/cjs/{index-994ea295.js → index-084a0845.js} +1 -1
  24. package/dist/cjs/index.cjs.js +3 -3
  25. package/dist/cjs/{javascript-72aed55a.js → javascript-470dd761.js} +4 -4
  26. package/dist/cjs/{jsonMode-b98b4ca9.js → jsonMode-f2bad76f.js} +3 -3
  27. package/dist/cjs/loader.cjs.js +2 -2
  28. package/dist/cjs/{tsMode-7b613436.js → tsMode-4dbfa911.js} +3 -3
  29. package/dist/cjs/{typescript-585a7543.js → typescript-8fb2fceb.js} +3 -3
  30. package/dist/components/arcade-api.js +6 -6
  31. package/dist/components/arcade-contribution.js +9 -10
  32. package/dist/components/arcade-defaults.js +58 -58
  33. package/dist/components/arcade-mode.js +44 -50
  34. package/dist/components/arcade-results.js +27 -27
  35. package/dist/components/arcade-suggestions.js +4 -4
  36. package/dist/components/arcade-variables.js +5 -5
  37. package/dist/components/arcgis-arcade-api.js +1 -1
  38. package/dist/components/arcgis-arcade-editor.js +24 -24
  39. package/dist/components/arcgis-arcade-results.js +1 -1
  40. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  41. package/dist/components/arcgis-arcade-variables.js +1 -1
  42. package/dist/components/arcgis-assets.d.ts +1 -1
  43. package/dist/components/arcgis-assets.js +1 -1
  44. package/dist/components/arcgis-code-editor.js +1 -1
  45. package/dist/components/{chunk-MRROWYKQ.js → chunk-FQ4KFKVY.js} +305 -199
  46. package/dist/components/code-editor.js +13 -13
  47. package/dist/components/fields.js +2 -62
  48. package/dist/components/index.js +1 -1
  49. package/dist/components/index2.js +387 -3
  50. package/dist/components/markdown.js +3 -3
  51. package/dist/components/utilities.js +3 -3
  52. package/dist/esm/{arcade-defaults-87a86d11.js → arcade-defaults-3f0e1c43.js} +650 -326
  53. package/dist/esm/{arcade-mode-45fc67da.js → arcade-mode-5aef1763.js} +45 -51
  54. package/dist/esm/arcgis-arcade-api_6.entry.js +419 -314
  55. package/dist/esm/arcgis-coding-components.js +3 -3
  56. package/dist/esm/{css-08f38d73.js → css-4c710cf8.js} +1 -1
  57. package/dist/esm/{cssMode-ab8f5063.js → cssMode-54cea919.js} +3 -3
  58. package/dist/esm/{html-af497230.js → html-3908d2da.js} +3 -3
  59. package/dist/esm/{htmlMode-da083262.js → htmlMode-2fa6e6a4.js} +3 -3
  60. package/dist/esm/{index-18371544.js → index-06d390be.js} +1 -1
  61. package/dist/esm/index.js +3 -3
  62. package/dist/esm/{javascript-5e6afc56.js → javascript-1d86322d.js} +4 -4
  63. package/dist/esm/{jsonMode-71281d55.js → jsonMode-27eb619c.js} +3 -3
  64. package/dist/esm/loader.js +3 -3
  65. package/dist/esm/{tsMode-98a33527.js → tsMode-9a8f9af2.js} +3 -3
  66. package/dist/esm/{typescript-1dcc1a21.js → typescript-7a26367c.js} +3 -3
  67. package/dist/loader/cdn.js +1 -1
  68. package/dist/loader/index.cjs.js +1 -1
  69. package/dist/loader/index.es2017.js +1 -1
  70. package/dist/loader/index.js +1 -1
  71. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  72. package/package.json +9 -9
  73. package/dist/arcgis-coding-components/p-0dc0bb8a.js +0 -6
  74. package/dist/arcgis-coding-components/p-1cdc731d.js +0 -6
  75. package/dist/arcgis-coding-components/p-62e5bb1a.js +0 -6
  76. package/dist/arcgis-coding-components/p-9dc57c40.entry.js +0 -6
  77. package/dist/arcgis-coding-components/p-e2200653.js +0 -68
  78. package/dist/cjs/Accessor-U5QUEX2T-e8f5e012.js +0 -1249
  79. package/dist/cjs/chunk-CQC6TXVI-eb50b11c.js +0 -1286
  80. package/dist/cjs/decorators-5KFQ5FDO-45eeb3a7.js +0 -120
  81. package/dist/components/Accessor-U5QUEX2T.js +0 -1247
  82. package/dist/components/chunk-CQC6TXVI.js +0 -1257
  83. package/dist/components/decorators-5KFQ5FDO.js +0 -109
  84. package/dist/esm/Accessor-U5QUEX2T-0dfda39e.js +0 -1247
  85. package/dist/esm/chunk-CQC6TXVI-f8d27710.js +0 -1257
  86. package/dist/esm/decorators-5KFQ5FDO-7ae08fab.js +0 -109
  87. /package/dist/types/data/{actions-runner-2 → 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 +0 -0
  88. /package/dist/types/data/{actions-runner-2 → 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 +0 -0
  89. /package/dist/types/data/{actions-runner-2 → actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
@@ -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.29
4
+ * v4.30.0-next.30
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 { i as ie, a as ae, o as oe, r as re, v, j } 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,7 +171,7 @@ 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
177
  const layers = filterFeatureLayerInfos(data.layers, queryCapability);
@@ -287,8 +287,8 @@ function variableToLSVariable(editorVariable, kind) {
287
287
  insertTextMode: InsertTextMode.asIs,
288
288
  insertTextFormat: InsertTextFormat.PlainText,
289
289
  kind,
290
- documentation: { kind: "markdown", value: description }
291
- }
290
+ documentation: { kind: "markdown", value: description },
291
+ },
292
292
  };
293
293
  }
294
294
  async function featureToLSFeature(editorFeature, kind) {
@@ -302,14 +302,14 @@ async function featureToLSFeature(editorFeature, kind) {
302
302
  insertText: name,
303
303
  insertTextMode: InsertTextMode.asIs,
304
304
  insertTextFormat: InsertTextFormat.PlainText,
305
- kind
305
+ kind,
306
306
  };
307
307
  const result = {
308
308
  name,
309
309
  description,
310
310
  type: "dictionary",
311
311
  properties: [],
312
- completion: resultCompletion
312
+ completion: resultCompletion,
313
313
  };
314
314
  // No source definition, then it will be a feature without any known fields
315
315
  if (!source) {
@@ -347,8 +347,8 @@ async function featureToLSFeature(editorFeature, kind) {
347
347
  insertTextMode: InsertTextMode.asIs,
348
348
  insertTextFormat: InsertTextFormat.PlainText,
349
349
  kind: CompletionItemKind.Field,
350
- documentation: { kind: "markdown", value: fieldCompletionDescription }
351
- }
350
+ documentation: { kind: "markdown", value: fieldCompletionDescription },
351
+ },
352
352
  });
353
353
  if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
354
354
  return;
@@ -369,8 +369,8 @@ async function featureToLSFeature(editorFeature, kind) {
369
369
  insertTextMode: InsertTextMode.asIs,
370
370
  insertTextFormat: InsertTextFormat.PlainText,
371
371
  kind: CompletionItemKind.Field,
372
- documentation: { kind: "markdown", value: aliasCompletionDescription }
373
- }
372
+ documentation: { kind: "markdown", value: aliasCompletionDescription },
373
+ },
374
374
  });
375
375
  });
376
376
  result.properties = [...fieldProfileValues, ...aliasProfileValues];
@@ -403,8 +403,8 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
403
403
  insertTextMode: InsertTextMode.asIs,
404
404
  insertTextFormat: InsertTextFormat.PlainText,
405
405
  kind,
406
- documentation: { kind: "markdown", value: completionDescription }
407
- }
406
+ documentation: { kind: "markdown", value: completionDescription },
407
+ },
408
408
  };
409
409
  }
410
410
  /**
@@ -431,9 +431,9 @@ class ProfileItemBase {
431
431
  // If the component is under RTL, the string is messed up.
432
432
  // It is converted from $feature to feature$, This is not acceptable since the label
433
433
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
434
- return oe(this._label);
434
+ return addLTRMark(this._label);
435
435
  }
436
- return re(this._profile?.intlStrings[this._label.code], this._label.formatValues);
436
+ return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
437
437
  }
438
438
  /**
439
439
  * Returns the description string.
@@ -445,7 +445,7 @@ class ProfileItemBase {
445
445
  if (typeof this.description === "string") {
446
446
  return this.description;
447
447
  }
448
- return re(this._profile?.intlStrings[this.description.code], this.description.formatValues);
448
+ return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
449
449
  }
450
450
  /**
451
451
  * Returns true if the item pass the filter test
@@ -622,28 +622,28 @@ class DictionaryVariable extends CollectionBasedVariable {
622
622
  return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
623
623
  case "featureSet":
624
624
  return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
625
- new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
625
+ new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
626
626
  ]);
627
627
  case "featureSetCollection":
628
628
  return new FeatureSetCollectionVariable(this, {
629
629
  profile: this._profile,
630
630
  declaration,
631
631
  label: snippet,
632
- snippet
632
+ snippet,
633
633
  });
634
634
  case "dictionary":
635
635
  return new DictionaryVariable(this, {
636
636
  profile: this._profile,
637
637
  declaration,
638
638
  label: snippet,
639
- snippet
639
+ snippet,
640
640
  });
641
641
  case "array":
642
642
  return new ArrayVariable({
643
643
  profile: this._profile,
644
644
  declaration,
645
645
  label: snippet,
646
- snippet
646
+ snippet,
647
647
  });
648
648
  default:
649
649
  console.error("Editor profile: Invalid profile variable", declaration);
@@ -655,7 +655,7 @@ class DictionaryVariable extends CollectionBasedVariable {
655
655
  type: this.type,
656
656
  name: "",
657
657
  ...this.declaration,
658
- properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
658
+ properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
659
659
  };
660
660
  }
661
661
  }
@@ -686,7 +686,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
686
686
  return this._profile?.intlStrings.layer ?? "layer";
687
687
  }
688
688
  async loadSource() {
689
- if (ie(this._loadPromise) && ae(this._loadPromise)) {
689
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
690
690
  return await this._loadPromise;
691
691
  }
692
692
  this._loadPromise = this._loadSource();
@@ -721,7 +721,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
721
721
  description: fieldAlias(field),
722
722
  snippet: valueSnippet,
723
723
  icon: fieldTypeToIconName(field),
724
- filterDescription: true
724
+ filterDescription: true,
725
725
  });
726
726
  }
727
727
  _getDomainDictionary(field) {
@@ -814,7 +814,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
814
814
  return null;
815
815
  }
816
816
  const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
817
- code: "domainvalues"
817
+ code: "domainvalues",
818
818
  });
819
819
  const domainDictionary = this._createDomainDictionary(field);
820
820
  domainDictionary.variables.push(domainValuesGroup);
@@ -832,7 +832,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
832
832
  profile: this._profile,
833
833
  label: `${label}`,
834
834
  description: t.name,
835
- snippet: `"${label}"`
835
+ snippet: `"${label}"`,
836
836
  });
837
837
  }) ?? [];
838
838
  return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
@@ -843,7 +843,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
843
843
  label: `${v.code}`,
844
844
  description: v.name,
845
845
  snippet: `"${v.code}"`,
846
- filterDescription: true
846
+ filterDescription: true,
847
847
  }));
848
848
  return new GroupOfVariables(this._profile, label, values);
849
849
  }
@@ -869,8 +869,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
869
869
  code: "domainvaluesfortypeformat",
870
870
  formatValues: {
871
871
  fieldName: alias,
872
- typeName: type.name
873
- }
872
+ typeName: type.name,
873
+ },
874
874
  });
875
875
  const id = isSubtypeInstance(type) ? type.code : type.id;
876
876
  const label = `${id}`;
@@ -880,7 +880,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
880
880
  label,
881
881
  snippet,
882
882
  description: type.name,
883
- declaration: { name: alias }
883
+ declaration: { name: alias },
884
884
  });
885
885
  subtypeDictionary.variables = [domainValuesGroup];
886
886
  variables.push(subtypeDictionary);
@@ -902,7 +902,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
902
902
  description: alias,
903
903
  snippet: valueSnippet,
904
904
  icon: "form-dropdown",
905
- declaration: { name: field.name }
905
+ declaration: { name: field.name },
906
906
  });
907
907
  // Add the header group
908
908
  const headerGroup = new GroupOfVariables(this._profile, alias, [
@@ -910,8 +910,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
910
910
  profile: this._profile,
911
911
  label: valueSnippet,
912
912
  description: "",
913
- snippet: valueSnippet
914
- })
913
+ snippet: valueSnippet,
914
+ }),
915
915
  ]);
916
916
  domainDictionary.variables = [headerGroup];
917
917
  // Add the SubtypeName or DomainName snippet if available
@@ -921,7 +921,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
921
921
  profile: this._profile,
922
922
  label: subtypeOrDomainNameSnippet,
923
923
  description: "",
924
- snippet: subtypeOrDomainNameSnippet
924
+ snippet: subtypeOrDomainNameSnippet,
925
925
  }));
926
926
  }
927
927
  return domainDictionary;
@@ -951,10 +951,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
951
951
  declaration: { definition: relatedLayer },
952
952
  label: relatedLayer.title,
953
953
  description: "",
954
- nonInteractive: true
954
+ nonInteractive: true,
955
955
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
956
956
  }));
957
- relationshipsGroup.variables = relationshipItems.filter(ie);
957
+ relationshipsGroup.variables = relationshipItems.filter(isNotNull);
958
958
  if (!relationshipsGroup.variables.length) {
959
959
  return null;
960
960
  }
@@ -988,8 +988,8 @@ class FeatureVariable extends SourceBasedVariable {
988
988
  profile: this._profile,
989
989
  label: this.snippet,
990
990
  description: "",
991
- snippet: this.snippet
992
- })
991
+ snippet: this.snippet,
992
+ }),
993
993
  ]));
994
994
  // The collection of feature attribute values
995
995
  const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
@@ -1004,7 +1004,7 @@ class FeatureVariable extends SourceBasedVariable {
1004
1004
  description: "Geometry",
1005
1005
  snippet,
1006
1006
  icon: "shapes",
1007
- filterDescription: true
1007
+ filterDescription: true,
1008
1008
  });
1009
1009
  valuesGroup.variables.push(geometryProperty);
1010
1010
  }
@@ -1118,7 +1118,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1118
1118
  return this._profile?.intlStrings.map ?? "map";
1119
1119
  }
1120
1120
  async loadSource() {
1121
- if (ie(this._loadPromise) && ae(this._loadPromise)) {
1121
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
1122
1122
  return await this._loadPromise;
1123
1123
  }
1124
1124
  this._loadPromise = this._loadSource();
@@ -1139,16 +1139,16 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1139
1139
  : {
1140
1140
  code: "webmapformat",
1141
1141
  formatValues: {
1142
- webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
1143
- }
1142
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
1143
+ },
1144
1144
  };
1145
1145
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
1146
1146
  new ValueVariable({
1147
1147
  profile: this._profile,
1148
1148
  label: this.snippet,
1149
1149
  description: "",
1150
- snippet: this.snippet
1151
- })
1150
+ snippet: this.snippet,
1151
+ }),
1152
1152
  ]);
1153
1153
  // Creates the groups for the layer and tables
1154
1154
  const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
@@ -1195,7 +1195,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1195
1195
  return {
1196
1196
  layers: this._convertWebMapLayersToVariables(map.layers),
1197
1197
  tables: this._convertWebMapLayersToVariables(map.tables, true),
1198
- source: map
1198
+ source: map,
1199
1199
  };
1200
1200
  }
1201
1201
  async _featureSetCollectionFromPortalItem(definition) {
@@ -1263,7 +1263,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1263
1263
  declaration: { name: featureLayer.title, definition: featureLayer },
1264
1264
  label: featureLayer.title,
1265
1265
  description: "",
1266
- nonInteractive: true
1266
+ nonInteractive: true,
1267
1267
  }, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
1268
1268
  }
1269
1269
  _makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
@@ -1275,7 +1275,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1275
1275
  const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
1276
1276
  return [
1277
1277
  new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
1278
- new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
1278
+ new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
1279
1279
  ];
1280
1280
  }
1281
1281
  else {
@@ -1300,7 +1300,7 @@ class EditorProfile extends DictionaryVariable {
1300
1300
  // Delay the load of the variable declarations so we have a `this`
1301
1301
  super(undefined, {
1302
1302
  profile: null,
1303
- declaration: { properties: [] }
1303
+ declaration: { properties: [] },
1304
1304
  });
1305
1305
  this.definition = definition;
1306
1306
  this.intlStrings = intlStrings;
@@ -1332,7 +1332,7 @@ class EditorProfile extends DictionaryVariable {
1332
1332
  toEditorProfileDefinition() {
1333
1333
  return {
1334
1334
  ...this.definition,
1335
- variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
1335
+ variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
1336
1336
  };
1337
1337
  }
1338
1338
  }
@@ -1365,7 +1365,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
1365
1365
  if (profiles) {
1366
1366
  return profiles;
1367
1367
  }
1368
- if (!v.has(locale)) {
1368
+ if (!supportedLocales.has(locale)) {
1369
1369
  return await getSdkPredefinedProfiles("en");
1370
1370
  }
1371
1371
  try {
@@ -1411,13 +1411,13 @@ function convertApiVariable(variable) {
1411
1411
  return {
1412
1412
  ...variable,
1413
1413
  type: variable.type,
1414
- properties: convertApiVariables(variable.properties)
1414
+ properties: convertApiVariables(variable.properties),
1415
1415
  };
1416
1416
  case "array": {
1417
1417
  return {
1418
1418
  ...variable,
1419
1419
  type: variable.type,
1420
- elementType: { type: "number", name: "number" }
1420
+ elementType: { type: "number", name: "number" },
1421
1421
  };
1422
1422
  }
1423
1423
  default:
@@ -1435,7 +1435,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1435
1435
  const editorProfile = {
1436
1436
  bundles: [...sdkPredefinedProfile.bundles],
1437
1437
  variables: [],
1438
- hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
1438
+ hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
1439
1439
  };
1440
1440
  // Merge the SDK variables' definitions/properties with the predefined profile definitions.
1441
1441
  sdkPredefinedProfile.variables.forEach((sdkVariable) => {
@@ -1453,7 +1453,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1453
1453
  return editorProfile.variables.push(convertApiVariable({
1454
1454
  ...sdkVariable,
1455
1455
  type: sdkVariable.type,
1456
- properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties
1456
+ properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties,
1457
1457
  }));
1458
1458
  case "feature":
1459
1459
  if (isFeatureDefinition(definition)) {
@@ -1482,7 +1482,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
1482
1482
 
1483
1483
  const arcadeLanguageId = "arcade";
1484
1484
  const defaultContext = {
1485
- locale: "en"
1485
+ locale: "en",
1486
1486
  };
1487
1487
  class ArcadeLanguageServiceDefaults {
1488
1488
  constructor() {
@@ -1536,7 +1536,7 @@ class ArcadeLanguageServiceDefaults {
1536
1536
  if (isPredefinedProfile(definition)) {
1537
1537
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
1538
1538
  }
1539
- const intlStrings = await j(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1539
+ const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1540
1540
  if (!intlStrings) {
1541
1541
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
1542
1542
  }
@@ -1548,7 +1548,7 @@ class ArcadeLanguageServiceDefaults {
1548
1548
  this.updateApiContextForModel(modelId, {
1549
1549
  locale: apiContext.locale,
1550
1550
  profile: apiProfile,
1551
- snippets: apiContext.snippets
1551
+ snippets: apiContext.snippets,
1552
1552
  });
1553
1553
  }
1554
1554
  /**
@@ -1615,7 +1615,7 @@ class ArcadeLanguageServiceDefaults {
1615
1615
  }
1616
1616
  const arcadeDefaults = new ArcadeLanguageServiceDefaults();
1617
1617
  const arcade = {
1618
- setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
1618
+ setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
1619
1619
  };
1620
1620
 
1621
1621
  export { arcade as a, arcadeDefaults as b };