@arcgis/coding-components 4.30.0-next.1 → 4.30.0-next.2

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 (76) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.en.json +2 -0
  3. package/dist/arcgis-coding-components/index.esm.js +2 -2
  4. package/dist/arcgis-coding-components/{p-26cb350b.js → p-1f472679.js} +2 -2
  5. package/dist/arcgis-coding-components/{p-9556a8c6.js → p-1f933dba.js} +2 -2
  6. package/dist/arcgis-coding-components/{p-68bd0d31.js → p-30100e82.js} +1 -1
  7. package/dist/arcgis-coding-components/{p-bad6d07f.js → p-30e98420.js} +10 -10
  8. package/dist/arcgis-coding-components/{p-5050b8e6.js → p-758218e2.js} +2 -2
  9. package/dist/arcgis-coding-components/{p-0ecfaaf8.js → p-8c6bf361.js} +2 -2
  10. package/dist/arcgis-coding-components/{p-3162633c.js → p-b22a71b8.js} +1 -1
  11. package/dist/arcgis-coding-components/{p-4aab897b.js → p-c4b91917.js} +3 -3
  12. package/dist/arcgis-coding-components/{p-c5c082c2.js → p-e55a59ff.js} +3 -3
  13. package/dist/arcgis-coding-components/p-f0b811ba.entry.js +6 -0
  14. package/dist/arcgis-coding-components/{p-2c66cecd.js → p-f3068c90.js} +2 -2
  15. package/dist/arcgis-coding-components/{p-01d806ab.js → p-fdf8d908.js} +2 -2
  16. package/dist/cjs/{arcade-defaults-337189cc.js → arcade-defaults-eb3968a5.js} +42 -17
  17. package/dist/cjs/{arcade-mode-3b9ec201.js → arcade-mode-5275cbeb.js} +3 -3
  18. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +15 -22
  19. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  20. package/dist/cjs/{css-9d93d685.js → css-bbfdb831.js} +1 -1
  21. package/dist/cjs/{cssMode-cf97e01f.js → cssMode-f296c8f9.js} +3 -3
  22. package/dist/cjs/{html-9bbb2b9f.js → html-bc3c7f14.js} +3 -3
  23. package/dist/cjs/{htmlMode-29fbfd01.js → htmlMode-651ef412.js} +3 -3
  24. package/dist/cjs/{index-b66d3898.js → index-d28fe547.js} +1 -1
  25. package/dist/cjs/index.cjs.js +3 -3
  26. package/dist/cjs/{javascript-ea7308ab.js → javascript-a30f18a4.js} +4 -4
  27. package/dist/cjs/{jsonMode-25c548e6.js → jsonMode-6861e18a.js} +3 -3
  28. package/dist/cjs/loader.cjs.js +2 -2
  29. package/dist/cjs/{tsMode-c54b0496.js → tsMode-8b347861.js} +3 -3
  30. package/dist/cjs/{typescript-89d35abd.js → typescript-44b2647a.js} +3 -3
  31. package/dist/components/arcade-api.js +1 -1
  32. package/dist/components/arcade-contribution.js +1 -1
  33. package/dist/components/arcade-defaults.js +33 -8
  34. package/dist/components/arcade-mode.js +1 -1
  35. package/dist/components/arcade-results.js +1 -1
  36. package/dist/components/arcade-suggestions.js +1 -1
  37. package/dist/components/arcade-variables.js +1 -1
  38. package/dist/components/arcgis-arcade-api.js +1 -1
  39. package/dist/components/arcgis-arcade-editor.js +6 -13
  40. package/dist/components/arcgis-arcade-results.js +1 -1
  41. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  42. package/dist/components/arcgis-arcade-variables.js +1 -1
  43. package/dist/components/arcgis-assets.js +2 -2
  44. package/dist/components/arcgis-code-editor.js +1 -1
  45. package/dist/components/code-editor.js +7 -7
  46. package/dist/components/fields.js +1 -1
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/index2.js +1 -1
  49. package/dist/components/markdown.js +1 -1
  50. package/dist/components/utilities.js +1 -1
  51. package/dist/esm/{arcade-defaults-80ab7068.js → arcade-defaults-631dc093.js} +42 -17
  52. package/dist/esm/{arcade-mode-145e7a14.js → arcade-mode-43856469.js} +3 -3
  53. package/dist/esm/arcgis-arcade-api_6.entry.js +15 -22
  54. package/dist/esm/arcgis-coding-components.js +3 -3
  55. package/dist/esm/{css-d2e6a792.js → css-6b2305f7.js} +1 -1
  56. package/dist/esm/{cssMode-6d9545da.js → cssMode-4a41975b.js} +3 -3
  57. package/dist/esm/{html-0af5dfb9.js → html-b3b2f1bc.js} +3 -3
  58. package/dist/esm/{htmlMode-7006edc4.js → htmlMode-cedfb87b.js} +3 -3
  59. package/dist/esm/{index-a2b632a0.js → index-84f054b0.js} +1 -1
  60. package/dist/esm/index.js +3 -3
  61. package/dist/esm/{javascript-89b3eeb2.js → javascript-2482aacb.js} +4 -4
  62. package/dist/esm/{jsonMode-a3501a18.js → jsonMode-8afe11aa.js} +3 -3
  63. package/dist/esm/loader.js +3 -3
  64. package/dist/esm/{tsMode-29dad6cb.js → tsMode-f4368447.js} +3 -3
  65. package/dist/esm/{typescript-6f3a39e0.js → typescript-40b2f5cb.js} +3 -3
  66. package/dist/loader/cdn.js +1 -1
  67. package/dist/loader/index.cjs.js +1 -1
  68. package/dist/loader/index.es2017.js +1 -1
  69. package/dist/loader/index.js +1 -1
  70. package/dist/types/components/arcade-editor/arcade-editor.d.ts +3 -3
  71. package/dist/types/components/code-editor/code-editor.d.ts +3 -3
  72. package/dist/types/utils/profile/editor-profile.d.ts +1 -1
  73. package/dist/types/utils/profile/types.d.ts +1 -1
  74. package/dist/types/utils/profile/utils.d.ts +4 -1
  75. package/package.json +9 -9
  76. package/dist/arcgis-coding-components/p-0f15d754.entry.js +0 -6
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
- import{u as t,t as e}from"./p-bad6d07f.js";import"./p-68bd0d31.js";
6
+ import{u as t,t as e}from"./p-30e98420.js";import"./p-30100e82.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
- import{t}from"./p-bad6d07f.js";import"./p-68bd0d31.js";
6
+ import{t}from"./p-30e98420.js";import"./p-30100e82.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const index = require('./index-b66d3898.js');
8
+ const index = require('./index-d28fe547.js');
9
9
 
10
10
  function _interopNamespace(e) {
11
11
  if (e && e.__esModule) return e;
@@ -120544,7 +120544,7 @@ registerLanguage({
120544
120544
  mimetypes: ["text/css"],
120545
120545
  loader: () => {
120546
120546
  {
120547
- return Promise.resolve().then(function () { return require('./css-9d93d685.js'); });
120547
+ return Promise.resolve().then(function () { return require('./css-bbfdb831.js'); });
120548
120548
  }
120549
120549
  }
120550
120550
  });
@@ -120562,7 +120562,7 @@ registerLanguage({
120562
120562
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
120563
120563
  loader: () => {
120564
120564
  {
120565
- return Promise.resolve().then(function () { return require('./html-9bbb2b9f.js'); });
120565
+ return Promise.resolve().then(function () { return require('./html-bc3c7f14.js'); });
120566
120566
  }
120567
120567
  }
120568
120568
  });
@@ -120582,7 +120582,7 @@ registerLanguage({
120582
120582
  mimetypes: ["text/javascript"],
120583
120583
  loader: () => {
120584
120584
  {
120585
- return Promise.resolve().then(function () { return require('./javascript-ea7308ab.js'); });
120585
+ return Promise.resolve().then(function () { return require('./javascript-a30f18a4.js'); });
120586
120586
  }
120587
120587
  }
120588
120588
  });
@@ -120600,7 +120600,7 @@ registerLanguage({
120600
120600
  mimetypes: ["text/typescript"],
120601
120601
  loader: () => {
120602
120602
  {
120603
- return Promise.resolve().then(function () { return require('./typescript-89d35abd.js'); });
120603
+ return Promise.resolve().then(function () { return require('./typescript-44b2647a.js'); });
120604
120604
  }
120605
120605
  }
120606
120606
  });
@@ -120721,7 +120721,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
120721
120721
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
120722
120722
  function getMode$3() {
120723
120723
  {
120724
- return Promise.resolve().then(function () { return require('./cssMode-cf97e01f.js'); });
120724
+ return Promise.resolve().then(function () { return require('./cssMode-f296c8f9.js'); });
120725
120725
  }
120726
120726
  }
120727
120727
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -120846,7 +120846,7 @@ monaco_editor_core_exports$2.languages.html = {
120846
120846
  };
120847
120847
  function getMode$2() {
120848
120848
  {
120849
- return Promise.resolve().then(function () { return require('./htmlMode-29fbfd01.js'); });
120849
+ return Promise.resolve().then(function () { return require('./htmlMode-651ef412.js'); });
120850
120850
  }
120851
120851
  }
120852
120852
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -120948,7 +120948,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
120948
120948
  monaco_editor_core_exports$1.languages.json = { jsonDefaults };
120949
120949
  function getMode$1() {
120950
120950
  {
120951
- return Promise.resolve().then(function () { return require('./jsonMode-25c548e6.js'); });
120951
+ return Promise.resolve().then(function () { return require('./jsonMode-6861e18a.js'); });
120952
120952
  }
120953
120953
  }
120954
120954
  monaco_editor_core_exports$1.languages.register({
@@ -121217,7 +121217,7 @@ monaco_editor_core_exports.languages.typescript = {
121217
121217
  };
121218
121218
  function getMode() {
121219
121219
  {
121220
- return Promise.resolve().then(function () { return require('./tsMode-c54b0496.js'); });
121220
+ return Promise.resolve().then(function () { return require('./tsMode-8b347861.js'); });
121221
121221
  }
121222
121222
  }
121223
121223
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -169062,7 +169062,18 @@ function isMapInstance(item) {
169062
169062
  typeof item === "object" &&
169063
169063
  "declaredClass" in item &&
169064
169064
  typeof item.declaredClass === "string" &&
169065
- (item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene"));
169065
+ (item.declaredClass === "esri.Map" ||
169066
+ item.declaredClass === "esri.WebMap" ||
169067
+ item.declaredClass === "esri.WebScene"));
169068
+ }
169069
+ function isWebMapInstance(item) {
169070
+ return item.declaredClass === "esri.WebMap";
169071
+ }
169072
+ function isWebSceneInstance(item) {
169073
+ return item.declaredClass === "esri.WebScene";
169074
+ }
169075
+ function isLoadableMapInstance(item) {
169076
+ return item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene";
169066
169077
  }
169067
169078
  function isPortalItemDefinition(item) {
169068
169079
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
@@ -169363,6 +169374,12 @@ function assembleMemberExpression(obj, prop) {
169363
169374
  }
169364
169375
  return `${obj}${getMemberExpressionProperty(prop)}`;
169365
169376
  }
169377
+ function getMapPortalItem(map) {
169378
+ if (isWebMapInstance(map) || isWebSceneInstance(map)) {
169379
+ return map.portalItem;
169380
+ }
169381
+ return null;
169382
+ }
169366
169383
  //#endregion
169367
169384
  //#region Editor Profile to Language Service Profile functions
169368
169385
  async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
@@ -170198,7 +170215,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170198
170215
  return null;
170199
170216
  }
170200
170217
  if (typeof this._featureSetCollections.source !== "string") {
170201
- return portalItemPageUrl(this._featureSetCollections.source.portalItem);
170218
+ return portalItemPageUrl(getMapPortalItem(this._featureSetCollections.source));
170202
170219
  }
170203
170220
  // const firstLayer = this._featureSetCollection.layers[0] ?? this._featureSetCollection.tables[0];
170204
170221
  // if (!firstLayer) {
@@ -170210,10 +170227,16 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170210
170227
  if (!this.loaded || !this._featureSetCollections) {
170211
170228
  return "";
170212
170229
  }
170213
- if (typeof this._featureSetCollections.source !== "string") {
170230
+ if (typeof this._featureSetCollections.source === "string") {
170231
+ return this._profile?.intlStrings.featureservice ?? "featureservice";
170232
+ }
170233
+ if (isWebSceneInstance(this._featureSetCollections.source)) {
170234
+ return this._profile?.intlStrings.webscene ?? "webscene";
170235
+ }
170236
+ if (isWebMapInstance(this._featureSetCollections.source)) {
170214
170237
  return this._profile?.intlStrings.webmap ?? "webmap";
170215
170238
  }
170216
- return this._profile?.intlStrings.featureservice ?? "featureservice";
170239
+ return this._profile?.intlStrings.map ?? "map";
170217
170240
  }
170218
170241
  async loadSource() {
170219
170242
  if (ee(this._loadPromise) && te(this._loadPromise)) {
@@ -170237,7 +170260,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170237
170260
  : {
170238
170261
  code: "webmapformat",
170239
170262
  formatValues: {
170240
- webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
170263
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
170241
170264
  }
170242
170265
  };
170243
170266
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
@@ -170284,8 +170307,10 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170284
170307
  return null;
170285
170308
  }
170286
170309
  async _featureSetCollectionFromMap(map) {
170287
- // Make sure the map is loaded
170288
- await map.loadAll();
170310
+ if (isLoadableMapInstance(map)) {
170311
+ // Make sure the map is loaded
170312
+ await map.loadAll();
170313
+ }
170289
170314
  // Until jsapi fix a bug we have to load the table separately
170290
170315
  await Promise.all(map.tables.map(async (t) => (await t.load())));
170291
170316
  return {
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  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:arcadeDefaults.main.CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
12
12
 
@@ -1,14 +1,14 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-b66d3898.js');
11
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
10
+ const index = require('./index-d28fe547.js');
11
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
12
12
 
13
13
  async function colorizeCode(code) {
14
14
  return await arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
@@ -3028,7 +3028,7 @@ async function getArcadeWorker(uri) {
3028
3028
  * @returns mode for arcade
3029
3029
  */
3030
3030
  async function getMode() {
3031
- return await Promise.resolve().then(function () { return require('./arcade-mode-3b9ec201.js'); });
3031
+ return await Promise.resolve().then(function () { return require('./arcade-mode-5275cbeb.js'); });
3032
3032
  }
3033
3033
  // Register the language in Monaco
3034
3034
  arcadeDefaults.languages.register({
@@ -3567,23 +3567,16 @@ const ArcgisArcadeEditor = class {
3567
3567
  this.openedSidePanel = "none";
3568
3568
  this.editorOptions = undefined;
3569
3569
  }
3570
- _profileChanged(newValue, oldValue) {
3571
- // Prevent the execution as long as the component has not been fully loaded
3572
- if (newValue === oldValue) {
3573
- return;
3574
- }
3570
+ _profileChanged() {
3575
3571
  this._updateEditorProfile().catch(console.error);
3576
3572
  }
3577
- _testDataChanged(newValue, oldValue) {
3578
- if (newValue === oldValue || !this._showExecutionPanel) {
3573
+ _testDataChanged() {
3574
+ if (!this._showExecutionPanel) {
3579
3575
  return;
3580
3576
  }
3581
3577
  this._executeScript().catch(console.error);
3582
3578
  }
3583
- _snippetChanged(newValue, oldValue) {
3584
- if (newValue === oldValue) {
3585
- return;
3586
- }
3579
+ _snippetChanged() {
3587
3580
  arcadeDefaults.arcadeDefaults.updateApiContextForModel(this._modelId, {
3588
3581
  snippets: this.snippets
3589
3582
  });
@@ -3612,7 +3605,7 @@ const ArcgisArcadeEditor = class {
3612
3605
  */
3613
3606
  async getEditorInstance() {
3614
3607
  await this._componentReadyDefer.promise;
3615
- return (await this._codeEditorElt?.getEditorInstance());
3608
+ return await this._codeEditorElt?.getEditorInstance();
3616
3609
  }
3617
3610
  /**
3618
3611
  * Returns the Arcade result for the script for the provided test data.
@@ -4358,20 +4351,20 @@ const ArcgisCodeEditor = class {
4358
4351
  this.modelId = arcadeDefaults.U();
4359
4352
  this.options = undefined;
4360
4353
  }
4361
- valuePropChange(newValue, oldValue) {
4362
- if (!this._editorInstance || newValue === oldValue) {
4354
+ valuePropChange(newValue) {
4355
+ if (!this._editorInstance) {
4363
4356
  return;
4364
4357
  }
4365
4358
  this._editorInstance.setValue(newValue ?? "");
4366
4359
  }
4367
- languagePropChange(newValue, oldValue) {
4368
- if (!this._editorInstance || newValue === oldValue) {
4360
+ languagePropChange() {
4361
+ if (!this._editorInstance) {
4369
4362
  return;
4370
4363
  }
4371
4364
  this.updateModel();
4372
4365
  }
4373
- modelIdPropChange(newValue, oldValue) {
4374
- if (!this._editorInstance || newValue === oldValue) {
4366
+ modelIdPropChange() {
4367
+ if (!this._editorInstance) {
4375
4368
  return;
4376
4369
  }
4377
4370
  this.updateModel();
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-b66d3898.js');
10
+ const index = require('./index-d28fe547.js');
11
11
 
12
12
  /*
13
13
  Stencil Client Patch Browser v4.10.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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * 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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
@@ -1,14 +1,14 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
11
- require('./index-b66d3898.js');
10
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
11
+ require('./index-d28fe547.js');
12
12
 
13
13
 
14
14
 
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const typescript = require('./typescript-89d35abd.js');
9
- require('./arcade-defaults-337189cc.js');
10
- require('./index-b66d3898.js');
8
+ const typescript = require('./typescript-44b2647a.js');
9
+ require('./arcade-defaults-eb3968a5.js');
10
+ require('./index-d28fe547.js');
11
11
 
12
12
  /*!-----------------------------------------------------------------------------
13
13
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-b66d3898.js');
10
+ const index = require('./index-d28fe547.js');
11
11
 
12
12
  const defineCustomElements = (win, options) => {
13
13
  if (typeof window === 'undefined') return undefined;
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,12 +1,12 @@
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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  'use strict';
7
7
 
8
- const arcadeDefaults = require('./arcade-defaults-337189cc.js');
9
- require('./index-b66d3898.js');
8
+ const arcadeDefaults = require('./arcade-defaults-eb3968a5.js');
9
+ require('./index-d28fe547.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * 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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, a as colorizedAllCodeElements } from './markdown.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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { languages } from 'monaco-editor';
7
7
  import { b as arcadeDefaults } from './arcade-defaults.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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { Emitter, Uri } from 'monaco-editor';
7
7
  import { InsertTextMode, InsertTextFormat, CompletionItemKind } from 'vscode-languageserver-types';
@@ -61,7 +61,18 @@ function isMapInstance(item) {
61
61
  typeof item === "object" &&
62
62
  "declaredClass" in item &&
63
63
  typeof item.declaredClass === "string" &&
64
- (item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene"));
64
+ (item.declaredClass === "esri.Map" ||
65
+ item.declaredClass === "esri.WebMap" ||
66
+ item.declaredClass === "esri.WebScene"));
67
+ }
68
+ function isWebMapInstance(item) {
69
+ return item.declaredClass === "esri.WebMap";
70
+ }
71
+ function isWebSceneInstance(item) {
72
+ return item.declaredClass === "esri.WebScene";
73
+ }
74
+ function isLoadableMapInstance(item) {
75
+ return item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene";
65
76
  }
66
77
  function isPortalItemDefinition(item) {
67
78
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
@@ -242,6 +253,12 @@ function assembleMemberExpression(obj, prop) {
242
253
  }
243
254
  return `${obj}${getMemberExpressionProperty(prop)}`;
244
255
  }
256
+ function getMapPortalItem(map) {
257
+ if (isWebMapInstance(map) || isWebSceneInstance(map)) {
258
+ return map.portalItem;
259
+ }
260
+ return null;
261
+ }
245
262
  //#endregion
246
263
  //#region Editor Profile to Language Service Profile functions
247
264
  async function variablesToLSVariable(editorVariables, kind = CompletionItemKind.Variable) {
@@ -1077,7 +1094,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1077
1094
  return null;
1078
1095
  }
1079
1096
  if (typeof this._featureSetCollections.source !== "string") {
1080
- return portalItemPageUrl(this._featureSetCollections.source.portalItem);
1097
+ return portalItemPageUrl(getMapPortalItem(this._featureSetCollections.source));
1081
1098
  }
1082
1099
  // const firstLayer = this._featureSetCollection.layers[0] ?? this._featureSetCollection.tables[0];
1083
1100
  // if (!firstLayer) {
@@ -1089,10 +1106,16 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1089
1106
  if (!this.loaded || !this._featureSetCollections) {
1090
1107
  return "";
1091
1108
  }
1092
- if (typeof this._featureSetCollections.source !== "string") {
1109
+ if (typeof this._featureSetCollections.source === "string") {
1110
+ return this._profile?.intlStrings.featureservice ?? "featureservice";
1111
+ }
1112
+ if (isWebSceneInstance(this._featureSetCollections.source)) {
1113
+ return this._profile?.intlStrings.webscene ?? "webscene";
1114
+ }
1115
+ if (isWebMapInstance(this._featureSetCollections.source)) {
1093
1116
  return this._profile?.intlStrings.webmap ?? "webmap";
1094
1117
  }
1095
- return this._profile?.intlStrings.featureservice ?? "featureservice";
1118
+ return this._profile?.intlStrings.map ?? "map";
1096
1119
  }
1097
1120
  async loadSource() {
1098
1121
  if (ee(this._loadPromise) && te(this._loadPromise)) {
@@ -1116,7 +1139,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1116
1139
  : {
1117
1140
  code: "webmapformat",
1118
1141
  formatValues: {
1119
- webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
1142
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
1120
1143
  }
1121
1144
  };
1122
1145
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
@@ -1163,8 +1186,10 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1163
1186
  return null;
1164
1187
  }
1165
1188
  async _featureSetCollectionFromMap(map) {
1166
- // Make sure the map is loaded
1167
- await map.loadAll();
1189
+ if (isLoadableMapInstance(map)) {
1190
+ // Make sure the map is loaded
1191
+ await map.loadAll();
1192
+ }
1168
1193
  // Until jsapi fix a bug we have to load the table separately
1169
1194
  await Promise.all(map.tables.map(async (t) => (await t.load())));
1170
1195
  return {
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { editor, MarkerSeverity, Range, languages, Emitter } from 'monaco-editor';
7
7
  import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat } from 'vscode-languageserver-types';
@@ -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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
7
7
  import { g as importArcade, s as supportedFields } from './fields.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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.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.1
4
+ * v4.30.0-next.2
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
7
7
  import { B, q, W, K } from './index2.js';