@arcgis/coding-components 4.30.0-next.60 → 4.30.0-next.63

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 (125) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +2 -4
  3. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  4. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +2 -0
  5. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +2 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +2 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +2 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +2 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
  43. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
  44. package/dist/arcgis-coding-components/index.esm.js +2 -2
  45. package/dist/arcgis-coding-components/{p-9c6bb77a.js → p-01413758.js} +1 -1
  46. package/dist/arcgis-coding-components/{p-6be741ea.js → p-0670e27b.js} +2 -2
  47. package/dist/arcgis-coding-components/{p-c94e9b77.js → p-0abd5ace.js} +2 -2
  48. package/dist/arcgis-coding-components/{p-53b69ec3.js → p-18ead65f.js} +10 -10
  49. package/dist/arcgis-coding-components/{p-48f37b8e.js → p-19e80d37.js} +3 -3
  50. package/dist/arcgis-coding-components/{p-55ac23d1.js → p-2017ac2c.js} +2 -2
  51. package/dist/arcgis-coding-components/{p-297663c9.js → p-28dc00db.js} +2 -2
  52. package/dist/arcgis-coding-components/{p-6d2daea8.js → p-9e0c5e68.js} +2 -2
  53. package/dist/arcgis-coding-components/{p-45801ffe.js → p-d32c4627.js} +1 -1
  54. package/dist/arcgis-coding-components/{p-a7f7c1aa.entry.js → p-de4c5904.entry.js} +2 -2
  55. package/dist/arcgis-coding-components/{p-f411a906.js → p-f855ad62.js} +2 -2
  56. package/dist/arcgis-coding-components/{p-c3c62032.js → p-fed70aa2.js} +2 -2
  57. package/dist/cjs/{arcade-defaults-25e01647.js → arcade-defaults-07a50cbf.js} +56 -49
  58. package/dist/cjs/{arcade-mode-80f256b2.js → arcade-mode-1b907fed.js} +3 -3
  59. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +4 -4
  60. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  61. package/dist/cjs/{css-a4343f63.js → css-de8a350b.js} +1 -1
  62. package/dist/cjs/{cssMode-a55308d9.js → cssMode-5448e878.js} +3 -3
  63. package/dist/cjs/{html-0d7ea22e.js → html-8fb84d33.js} +3 -3
  64. package/dist/cjs/{htmlMode-f49a890f.js → htmlMode-fdd3cb51.js} +3 -3
  65. package/dist/cjs/{index-cc90af2a.js → index-21d56cc6.js} +1 -1
  66. package/dist/cjs/index.cjs.js +3 -3
  67. package/dist/cjs/{javascript-ca83132d.js → javascript-cacb9666.js} +4 -4
  68. package/dist/cjs/{jsonMode-4ae5f2d3.js → jsonMode-0f24b8ba.js} +3 -3
  69. package/dist/cjs/loader.cjs.js +2 -2
  70. package/dist/cjs/{tsMode-f3f32f78.js → tsMode-765643c2.js} +3 -3
  71. package/dist/cjs/{typescript-a3feebd1.js → typescript-767e5d5c.js} +3 -3
  72. package/dist/components/arcade-api.js +1 -1
  73. package/dist/components/arcade-contribution.js +2 -2
  74. package/dist/components/arcade-defaults.js +44 -41
  75. package/dist/components/arcade-mode.js +1 -1
  76. package/dist/components/arcade-results.js +1 -1
  77. package/dist/components/arcade-suggestions.js +1 -1
  78. package/dist/components/arcade-variables.js +1 -1
  79. package/dist/components/arcgis-arcade-api.js +1 -1
  80. package/dist/components/arcgis-arcade-editor.js +1 -1
  81. package/dist/components/arcgis-arcade-results.js +1 -1
  82. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  83. package/dist/components/arcgis-arcade-variables.js +1 -1
  84. package/dist/components/arcgis-assets.d.ts +1 -1
  85. package/dist/components/arcgis-assets.js +1 -1
  86. package/dist/components/arcgis-code-editor.js +1 -1
  87. package/dist/components/chunk-A2KF2X73.js +1 -1
  88. package/dist/components/code-editor.js +1 -1
  89. package/dist/components/fields.js +6 -2
  90. package/dist/components/index.js +1 -1
  91. package/dist/components/index2.js +1 -1
  92. package/dist/components/markdown.js +1 -1
  93. package/dist/components/useT9n.js +1 -1
  94. package/dist/components/utilities.js +1 -1
  95. package/dist/esm/{arcade-defaults-c0b9c076.js → arcade-defaults-7673df6b.js} +56 -49
  96. package/dist/esm/{arcade-mode-792cbcf5.js → arcade-mode-01a6e0f1.js} +3 -3
  97. package/dist/esm/arcgis-arcade-api_6.entry.js +4 -4
  98. package/dist/esm/arcgis-coding-components.js +3 -3
  99. package/dist/esm/{css-5c8d2920.js → css-9df943ee.js} +1 -1
  100. package/dist/esm/{cssMode-8fa2f14c.js → cssMode-3db0f0c5.js} +3 -3
  101. package/dist/esm/{html-e888de7a.js → html-600909a8.js} +3 -3
  102. package/dist/esm/{htmlMode-774cf48f.js → htmlMode-7f9a1acf.js} +3 -3
  103. package/dist/esm/{index-052906ef.js → index-5c22feb6.js} +1 -1
  104. package/dist/esm/index.js +3 -3
  105. package/dist/esm/{javascript-b5c99634.js → javascript-f97d0854.js} +4 -4
  106. package/dist/esm/{jsonMode-48b7186d.js → jsonMode-3ebb5b18.js} +3 -3
  107. package/dist/esm/loader.js +3 -3
  108. package/dist/esm/{tsMode-a9ff7531.js → tsMode-a67861ed.js} +3 -3
  109. package/dist/esm/{typescript-9bbf3eca.js → typescript-b425890c.js} +3 -3
  110. package/dist/loader/cdn.js +1 -1
  111. package/dist/loader/index.cjs.js +1 -1
  112. package/dist/loader/index.es2017.js +1 -1
  113. package/dist/loader/index.js +1 -1
  114. package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
  115. package/dist/types/utils/profile/types.d.ts +2 -2
  116. package/dist/types/utils/profile/utils.d.ts +1 -1
  117. package/package.json +9 -10
  118. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
  119. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/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
  120. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +0 -0
  121. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/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
  122. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/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
  123. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
  124. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
  125. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
@@ -1,9 +1,9 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { g as getAssetPath } from './index-052906ef.js';
6
+ import { g as getAssetPath } from './index-5c22feb6.js';
7
7
 
8
8
  /**
9
9
  * Returns the last element of an array.
@@ -120522,7 +120522,7 @@ registerLanguage({
120522
120522
  mimetypes: ["text/css"],
120523
120523
  loader: () => {
120524
120524
  {
120525
- return import('./css-5c8d2920.js');
120525
+ return import('./css-9df943ee.js');
120526
120526
  }
120527
120527
  }
120528
120528
  });
@@ -120540,7 +120540,7 @@ registerLanguage({
120540
120540
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
120541
120541
  loader: () => {
120542
120542
  {
120543
- return import('./html-e888de7a.js');
120543
+ return import('./html-600909a8.js');
120544
120544
  }
120545
120545
  }
120546
120546
  });
@@ -120560,7 +120560,7 @@ registerLanguage({
120560
120560
  mimetypes: ["text/javascript"],
120561
120561
  loader: () => {
120562
120562
  {
120563
- return import('./javascript-b5c99634.js');
120563
+ return import('./javascript-f97d0854.js');
120564
120564
  }
120565
120565
  }
120566
120566
  });
@@ -120578,7 +120578,7 @@ registerLanguage({
120578
120578
  mimetypes: ["text/typescript"],
120579
120579
  loader: () => {
120580
120580
  {
120581
- return import('./typescript-9bbf3eca.js');
120581
+ return import('./typescript-b425890c.js');
120582
120582
  }
120583
120583
  }
120584
120584
  });
@@ -120699,7 +120699,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
120699
120699
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
120700
120700
  function getMode$3() {
120701
120701
  {
120702
- return import('./cssMode-8fa2f14c.js');
120702
+ return import('./cssMode-3db0f0c5.js');
120703
120703
  }
120704
120704
  }
120705
120705
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -120824,7 +120824,7 @@ monaco_editor_core_exports$2.languages.html = {
120824
120824
  };
120825
120825
  function getMode$2() {
120826
120826
  {
120827
- return import('./htmlMode-774cf48f.js');
120827
+ return import('./htmlMode-7f9a1acf.js');
120828
120828
  }
120829
120829
  }
120830
120830
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -120926,7 +120926,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
120926
120926
  monaco_editor_core_exports$1.languages.json = { jsonDefaults };
120927
120927
  function getMode$1() {
120928
120928
  {
120929
- return import('./jsonMode-48b7186d.js');
120929
+ return import('./jsonMode-3ebb5b18.js');
120930
120930
  }
120931
120931
  }
120932
120932
  monaco_editor_core_exports$1.languages.register({
@@ -121195,7 +121195,7 @@ monaco_editor_core_exports.languages.typescript = {
121195
121195
  };
121196
121196
  function getMode() {
121197
121197
  {
121198
- return import('./tsMode-a9ff7531.js');
121198
+ return import('./tsMode-a67861ed.js');
121199
121199
  }
121200
121200
  }
121201
121201
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -168937,6 +168937,10 @@ async function importLayersFeatureLayer() {
168937
168937
  const module = await import('@arcgis/core/layers/FeatureLayer.js');
168938
168938
  return isDefaultModule(module) ? module.default : module;
168939
168939
  }
168940
+ async function newLayersFeatureLayer(properties) {
168941
+ const ModConstructor = await importLayersFeatureLayer();
168942
+ return new ModConstructor(properties);
168943
+ }
168940
168944
  async function importPortalPortalItem() {
168941
168945
  if (isAMD) {
168942
168946
  return await window.$arcgis.import("esri/portal/PortalItem");
@@ -168985,13 +168989,6 @@ async function importRequest() {
168985
168989
  return isDefaultModule(module) ? module.default : module;
168986
168990
  }
168987
168991
 
168988
- //#region core adapter fix
168989
- async function newFeatureLayer(definition) {
168990
- const FeatureLayer = await importLayersFeatureLayer();
168991
- // Fix title for the layer. Instead of defaulting to the map viewer style.
168992
- return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
168993
- }
168994
- //#endregion
168995
168992
  //#region Type Guards
168996
168993
  function isQueryableLayerInstance(item) {
168997
168994
  return (!!item &&
@@ -169047,6 +169044,9 @@ function isFieldsDefinition(item) {
169047
169044
  function isUrlDefinition(item) {
169048
169045
  return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169049
169046
  }
169047
+ function isSupportedServiceUrlDefinition(item) {
169048
+ return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
169049
+ }
169050
169050
  function isSubtypeInstance(item) {
169051
169051
  return (!!item &&
169052
169052
  typeof item === "object" &&
@@ -169119,7 +169119,7 @@ async function supportedSourceFromDefinition(definition) {
169119
169119
  source = definition;
169120
169120
  }
169121
169121
  else {
169122
- source = await newFeatureLayer(definition);
169122
+ source = await newLayersFeatureLayer(definition);
169123
169123
  }
169124
169124
  if (isLoadableSource(source)) {
169125
169125
  await source.load();
@@ -169130,20 +169130,20 @@ async function serviceMetaData(url) {
169130
169130
  url += "/layers";
169131
169131
  const request = await importRequest();
169132
169132
  const response = await request(url, { responseType: "json", query: { f: "json" } });
169133
- const data = {
169134
- layers: response.data?.layers ?? [],
169135
- tables: response.data?.tables ?? [],
169136
- };
169137
169133
  const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169138
- const layers = getSupportedLayerInfos(data.layers, queryCapability);
169139
- const tables = getSupportedLayerInfos(data.tables, queryCapability);
169134
+ const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
169135
+ const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
169140
169136
  return { layers, tables };
169141
169137
  }
169142
169138
  function getSupportedLayerInfos(layers, queryCapability) {
169139
+ if (!layers) {
169140
+ return [];
169141
+ }
169143
169142
  return layers.filter((layer) => {
169144
169143
  switch (layer.type) {
169145
169144
  case "Feature Layer":
169146
169145
  case "Oriented Imagery Layer":
169146
+ case "Catalog Layer":
169147
169147
  case "Table": {
169148
169148
  const capabilities = layer.capabilities
169149
169149
  ? layer.capabilities
@@ -169652,7 +169652,7 @@ function fieldAlias(field) {
169652
169652
  //#endregion
169653
169653
  //#region Support functions
169654
169654
  async function getRelatedFeatureLayer(layer, relationship) {
169655
- const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169655
+ const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169656
169656
  await relatedFeatureLayer.load();
169657
169657
  return relatedFeatureLayer;
169658
169658
  }
@@ -170215,6 +170215,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170215
170215
  // Sepcial case for the subtype field
170216
170216
  if (field.name === this._source.subtypeField) {
170217
170217
  const domainDictionary = this._createDomainDictionary(field);
170218
+ domainDictionary.icon = "subtype";
170218
170219
  domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
170219
170220
  return domainDictionary;
170220
170221
  }
@@ -170677,12 +170678,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170677
170678
  }
170678
170679
  const metadata = await serviceMetaData(processedUrl);
170679
170680
  const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
170680
- const featureLayer = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170681
+ const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170681
170682
  await featureLayer.load();
170682
170683
  return this._createFeatureSetVariable(featureLayer);
170683
170684
  }));
170684
170685
  const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
170685
- const table = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170686
+ const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170686
170687
  await table.load();
170687
170688
  return this._createFeatureSetVariable(table);
170688
170689
  }));
@@ -170712,7 +170713,9 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170712
170713
  return new FeatureSetVariable(this, {
170713
170714
  profile: this._profile,
170714
170715
  declaration: { name: featureLayer.title, definition: featureLayer },
170715
- label: featureLayer.title,
170716
+ label: isFromWebMap
170717
+ ? featureLayer.title
170718
+ : featureLayer.sourceJSON.name ?? featureLayer.title,
170716
170719
  description: "",
170717
170720
  nonInteractive: true,
170718
170721
  }, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
@@ -170796,7 +170799,7 @@ function isFeatureSetDefinition(item) {
170796
170799
  return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
170797
170800
  }
170798
170801
  function isFeatureSetCollectionDefinition(item) {
170799
- return isPortalItemDefinition(item) || isMapInstance(item) || isUrlDefinition(item);
170802
+ return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
170800
170803
  }
170801
170804
  /**
170802
170805
  * Get a PredefinedProfile for a locale. If not already loaded then fetch it.
@@ -170846,7 +170849,7 @@ function isExtendedPredefinedProfileDefinition(item) {
170846
170849
  return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
170847
170850
  }
170848
170851
  function convertApiVariables(variables) {
170849
- return variables.map(convertApiVariable);
170852
+ return variables?.map(convertApiVariable);
170850
170853
  }
170851
170854
  function convertApiVariable(variable) {
170852
170855
  switch (variable.type) {
@@ -170881,40 +170884,44 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
170881
170884
  hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
170882
170885
  };
170883
170886
  // Merge the SDK variables' definitions/properties with the predefined profile definitions.
170884
- sdkPredefinedProfile.variables.forEach((sdkVariable) => {
170887
+ sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
170885
170888
  // Don't include disabled variables
170886
- if (predefinedProfile.disabledVariables?.includes(sdkVariable.name)) {
170889
+ if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
170887
170890
  return;
170888
170891
  }
170889
- // Try to get a definition from the predefined profile.
170890
- const definition = predefinedProfile.definitions[sdkVariable.name];
170892
+ // Try to get a definition from the predefined profile, for the variable that needs one.
170893
+ const definition = predefinedProfile.definitions[predefinedVariable.name];
170891
170894
  // Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
170892
170895
  // despite the type checking from the switch statement.
170893
- switch (sdkVariable.type) {
170894
- case "dictionary":
170896
+ switch (predefinedVariable.type) {
170897
+ case "dictionary": {
170895
170898
  // For dictionary, we support properties overrride
170896
170899
  return editorProfile.variables.push(convertApiVariable({
170897
- ...sdkVariable,
170898
- type: sdkVariable.type,
170899
- properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties,
170900
+ ...predefinedVariable,
170901
+ type: predefinedVariable.type,
170902
+ properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
170900
170903
  }));
170904
+ }
170901
170905
  case "feature":
170902
- if (isFeatureDefinition(definition)) {
170903
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
170906
+ // If the definition is not valid, then we don't include it.
170907
+ if (!isFeatureDefinition(definition)) {
170908
+ return;
170904
170909
  }
170905
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
170910
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170906
170911
  case "featureSet":
170907
- if (isFeatureSetDefinition(definition)) {
170908
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
170912
+ // If the definition is not valid, then we don't include it.
170913
+ if (!isFeatureSetDefinition(definition)) {
170914
+ return;
170909
170915
  }
170910
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
170916
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170911
170917
  case "featureSetCollection":
170912
- if (isFeatureSetCollectionDefinition(definition)) {
170913
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
170918
+ // If the definition is not valid, then we don't include it.
170919
+ if (!isFeatureSetCollectionDefinition(definition)) {
170920
+ return;
170914
170921
  }
170915
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
170922
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170916
170923
  default:
170917
- return editorProfile.variables.push(convertApiVariable(sdkVariable));
170924
+ return editorProfile.variables.push(convertApiVariable(predefinedVariable));
170918
170925
  }
170919
170926
  });
170920
170927
  if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { E as main, e as editor, M as MarkerSeverity, R as Range, m as languages, F as debounce, G as Emitter } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { E as main, e as editor, M as MarkerSeverity, R as Range, m as languages, F as debounce, G as Emitter } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:main.CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:main.CompletionItemKind.Keyword}));
10
10
 
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-052906ef.js';
7
- import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, D as Deferred, d as camelToKebab, s as safeCall, f as safeAsyncCall, h as startLocaleObserver, i as getElementLocales, j as isURL, k as hasSameOrigin, l as importRequest, m as languages, n as arcadeDefaults, U as Uri, o as setFocusOnElement, p as filterCollection, q as addLTRMark, r as importArcade, t as generateGuid, u as getElementTheme, K as KeyCode, v as setValuesInString, w as quoteString, x as supportedFields, y as createFilterExpression, R as Range, z as observeAncestorsMutation, A as KeyMod } from './arcade-defaults-c0b9c076.js';
6
+ import { g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-5c22feb6.js';
7
+ import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, D as Deferred, d as camelToKebab, s as safeCall, f as safeAsyncCall, h as startLocaleObserver, i as getElementLocales, j as isURL, k as hasSameOrigin, l as importRequest, m as languages, n as arcadeDefaults, U as Uri, o as setFocusOnElement, p as filterCollection, q as addLTRMark, r as importArcade, t as generateGuid, u as getElementTheme, K as KeyCode, v as setValuesInString, w as quoteString, x as supportedFields, y as createFilterExpression, R as Range, z as observeAncestorsMutation, A as KeyMod } from './arcade-defaults-7673df6b.js';
8
8
 
9
9
  async function colorizeCode(code) {
10
10
  return await editor.colorize(code, "arcade", { tabSize: 2 });
@@ -4370,7 +4370,7 @@ async function getArcadeWorker(uri) {
4370
4370
  * @returns arcade mode module
4371
4371
  */
4372
4372
  async function getMode() {
4373
- return await import('./arcade-mode-792cbcf5.js');
4373
+ return await import('./arcade-mode-01a6e0f1.js');
4374
4374
  }
4375
4375
  // Register the language in Monaco
4376
4376
  languages.register({
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { p as promiseResolve, b as bootstrapLazy } from './index-052906ef.js';
7
- export { s as setNonce } from './index-052906ef.js';
6
+ import { p as promiseResolve, b as bootstrapLazy } from './index-5c22feb6.js';
7
+ export { s as setNonce } from './index-5c22feb6.js';
8
8
 
9
9
  /*
10
10
  Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  /*!-----------------------------------------------------------------------------
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  const NAMESPACE = 'arcgis-coding-components';
7
7
 
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- export { a as arcade } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ export { a as arcade } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
@@ -1,11 +1,11 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { conf as conf$1, language as language$1 } from './typescript-9bbf3eca.js';
7
- import './arcade-defaults-c0b9c076.js';
8
- import './index-052906ef.js';
6
+ import { conf as conf$1, language as language$1 } from './typescript-b425890c.js';
7
+ import './arcade-defaults-7673df6b.js';
8
+ import './index-5c22feb6.js';
9
9
 
10
10
  /*!-----------------------------------------------------------------------------
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { b as bootstrapLazy } from './index-052906ef.js';
7
- export { s as setNonce } from './index-052906ef.js';
6
+ import { b as bootstrapLazy } from './index-5c22feb6.js';
7
+ export { s as setNonce } from './index-5c22feb6.js';
8
8
 
9
9
  const defineCustomElements = (win, options) => {
10
10
  if (typeof window === 'undefined') return undefined;
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { C as typescriptDefaults, B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { C as typescriptDefaults, B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,10 +1,10 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
- import { B as monaco_editor_core_star } from './arcade-defaults-c0b9c076.js';
7
- import './index-052906ef.js';
6
+ import { B as monaco_editor_core_star } from './arcade-defaults-7673df6b.js';
7
+ import './index-5c22feb6.js';
8
8
 
9
9
  /*!-----------------------------------------------------------------------------
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  module.exports = require('../cjs/loader.cjs.js');
7
7
  module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  module.exports = require('../cjs/loader.cjs.js');
7
7
  module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  export * from '../esm/polyfills/index.js';
7
7
  export * from '../esm/loader.js';
@@ -1,7 +1,7 @@
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.60
4
+ * v4.30.0-next.63
5
5
  */
6
6
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
7
7
  export * from '../esm/polyfills/index.js';
@@ -0,0 +1,3 @@
1
+ import type { Config } from "../../../../../../../../../../stencil-public-runtime";
2
+ declare const config: Config;
3
+ export { config };
@@ -72,7 +72,7 @@ export interface IProfileDictionary extends IProfileVariableBase {
72
72
  /**
73
73
  * The dictionary properties. Properties are variables as well.
74
74
  */
75
- properties: IProfileVariable[];
75
+ properties?: IProfileVariable[];
76
76
  }
77
77
  /**
78
78
  * Dictionary profile variable declaration. Properties of a dictionary are profile variables.
@@ -82,7 +82,7 @@ export interface IProfileArray extends IProfileVariableBase {
82
82
  /**
83
83
  * The type for the array elements.
84
84
  */
85
- elementType: IProfileVariable;
85
+ elementType?: IProfileVariable;
86
86
  }
87
87
  /**
88
88
  * Feature profile variable declaration.
@@ -1,5 +1,4 @@
1
1
  import type * as types from "./types";
2
- export declare function newFeatureLayer(definition: __esri.FeatureLayerProperties): Promise<__esri.FeatureLayer>;
3
2
  export declare function isQueryableLayerInstance(item: unknown): item is __esri.FeatureLayer;
4
3
  export declare function isSubtypeSublayerInstance(item: unknown): item is __esri.SubtypeSublayer;
5
4
  export declare function isGroupLayerInstance(item: unknown): item is __esri.GroupLayer;
@@ -12,6 +11,7 @@ export declare function isPortalItemDefinition(item: unknown): item is types.IPo
12
11
  export declare function isFeatureLayerItemDefinition(item: unknown): item is types.IFeatureLayerItemDefinition;
13
12
  export declare function isFieldsDefinition(item: unknown): item is types.IFieldsDefinition;
14
13
  export declare function isUrlDefinition(item: unknown): item is types.IUrlDefinition;
14
+ export declare function isSupportedServiceUrlDefinition(item: unknown): item is types.IUrlDefinition;
15
15
  export declare function isSubtypeInstance(item: unknown): item is __esri.Subtype;
16
16
  export declare function isCodedValueDomainInstance(item: unknown): item is __esri.CodedValueDomain;
17
17
  export declare function isInheritedDomainInstance(item: unknown): item is __esri.InheritedDomain;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@arcgis/coding-components",
3
3
  "description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
4
4
  "homepage": "https://developers.arcgis.com/javascript/latest/",
5
- "version": "4.30.0-next.60",
5
+ "version": "4.30.0-next.63",
6
6
  "module": "dist/components/index.js",
7
7
  "main": "dist/index.cjs.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -37,7 +37,6 @@
37
37
  "build:components": "stencil build",
38
38
  "build:components:dev": "stencil build --dev",
39
39
  "build:monaco-workers": "tsx ./scripts/build-monaco-workers.ts",
40
- "build:composite-storybook": "yarn awc copy-folder storybook-static-external ../../docs/storybook-static-external/coding-components",
41
40
  "test": "yarn build:test && stencil test --spec --no-build",
42
41
  "test:e2e": "stencil test --e2e",
43
42
  "test.watch": "stencil test --spec --e2e --watchAll",
@@ -48,19 +47,19 @@
48
47
  "generate": "stencil generate"
49
48
  },
50
49
  "dependencies": {
51
- "@arcgis/arcade-languageservice": "4.30.0-next.60",
52
- "@arcgis/components-controllers": "4.30.0-next.60",
53
- "@arcgis/components-utils": "4.30.0-next.60",
50
+ "@arcgis/arcade-languageservice": "4.30.0-next.63",
51
+ "@arcgis/components-controllers": "4.30.0-next.63",
52
+ "@arcgis/components-utils": "4.30.0-next.63",
54
53
  "@stencil/core": "4.9.0",
55
54
  "monaco-editor": "0.45.0",
56
55
  "vscode-languageserver-types": "^3.17.5"
57
56
  },
58
57
  "devDependencies": {
59
- "@arcgis/components-plugins": "4.30.0-next.60",
58
+ "@arcgis/components-plugins": "4.30.0-next.63",
60
59
  "@arcgis/core": ">=4.30.0-next <4.31",
61
- "@arcgis/core-adapter": "4.30.0-next.60",
62
- "@arcgis/storybook-utils": "4.30.0-next.60",
63
- "@arcgis/typescript-config": "4.30.0-next.60",
60
+ "@arcgis/core-adapter": "4.30.0-next.63",
61
+ "@arcgis/storybook-utils": "4.30.0-next.63",
62
+ "@arcgis/typescript-config": "4.30.0-next.63",
64
63
  "@esri/calcite-components": "^2.8.0",
65
64
  "@stencil/angular-output-target": "0.8.4",
66
65
  "@stencil/react-output-target": "0.5.3",
@@ -97,5 +96,5 @@
97
96
  "@arcgis/core": ">=4.30.0-next <4.31",
98
97
  "@esri/calcite-components": ">=2.8.0 <3.0.0"
99
98
  },
100
- "gitHead": "282e6fda699077409b843bc17be1decf432135e6"
99
+ "gitHead": "627e8cfcd91941343916cd2aeaaf232ebf1d9e06"
101
100
  }
@@ -1,3 +0,0 @@
1
- import type { Config } from "../../../../../../../../../stencil-public-runtime";
2
- declare const config: Config;
3
- export { config };